@nexus-cross/dapp-ui 1.3.15 → 1.3.16-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 CHANGED
@@ -1,27 +1,27 @@
1
- "use strict";var Lg=Object.create;var Fa=Object.defineProperty;var Dg=Object.getOwnPropertyDescriptor;var Pg=Object.getOwnPropertyNames;var Og=Object.getPrototypeOf,Bg=Object.prototype.hasOwnProperty;var zg=(e,t)=>{for(var r in t)Fa(e,r,{get:t[r],enumerable:!0})},hd=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Pg(t))!Bg.call(e,o)&&o!==r&&Fa(e,o,{get:()=>t[o],enumerable:!(n=Dg(t,o))||n.enumerable});return e};var V=(e,t,r)=>(r=e!=null?Lg(Og(e)):{},hd(t||!e||!e.__esModule?Fa(r,"default",{value:e,enumerable:!0}):r,e)),Fg=e=>hd(Fa({},"__esModule",{value:!0}),e);var ax={};zg(ax,{APPLE_ICON:()=>Pa,AppLauncher:()=>_s,AppLauncherContent:()=>Vs,AppLauncherTrigger:()=>Hs,BINANCE_ICON:()=>La,BridgeFlow:()=>to,CHAINS_CONFIG_FILE:()=>Wo,CONNECTOR_REGISTRY:()=>qo,CROSSX_ICON:()=>Ma,ConnectButton:()=>od,ConnectorId:()=>Za,DEFAULT_SKILLS_HREF:()=>ad,DEFAULT_TRUSTED_FACTORIES:()=>io,DappUiErrorBoundary:()=>Ho,GOOGLE_ICON:()=>Da,GetOneUsd:()=>td,METAMASK_ICON:()=>Aa,PORTFOLIO_SECTIONS:()=>sa,RelayApiError:()=>Lr,RelayDeposit:()=>Po,RelayHistory:()=>Ql,RelayRecovery:()=>Zl,SOCIAL_REGISTRY:()=>Ns,SendFlow:()=>Xo,SkillsButton:()=>id,StatusTracker:()=>ed,TOKEN_STATS_QUERY_KEY:()=>fi,USER_BALANCE_QUERY_KEY:()=>pi,WALLET_REGISTRY:()=>Cs,WalletConnectModal:()=>nd,WalletInfo:()=>no,WalletPortfolio:()=>Rl,WalletPortfolioBody:()=>Jn,announceAppLauncherUsage:()=>Wa,captureDappUiException:()=>_o,createRelayClient:()=>Vt,findGetOneUsdToken:()=>Ra,getChainDisplay:()=>xd,getDappUiSentryScope:()=>Go,getOneUsdTokenKey:()=>ka,initDappUiSentry:()=>bo,isGetOneUsdActionEnabled:()=>Ca,isGetOneUsdActionSupported:()=>zo,isGetOneUsdActionVisible:()=>Bo,isGetOneUsdTargetAvailable:()=>Sa,matchesGetOneUsdToken:()=>bs,normalizeFailureReason:()=>gr,resolveEnvironment:()=>at,resolveGetOneUsdRoute:()=>Oo,setDappUiAnalyticsUser:()=>Gn,trackDappUiEvent:()=>Qo,trackDappUiFunnel:()=>Ke,useChainDisplay:()=>go,useChainsConfig:()=>vd,useGlobalMenu:()=>Vo,useRelayConfig:()=>Xl,useRelayOrders:()=>Rn,useRelayRecovery:()=>Jl,useTokenBalance:()=>mn,useTokenStats:()=>gn,useWalletDetect:()=>Ta});module.exports=Fg(ax);var Ug={};function bd(e){try{return Ug.env?.[e]}catch{return}}function wd(e){if(!(typeof process>"u"))return process.env?.[e]}function at(e){if(e)return yd(e);let t=bd("VITE_CROSSX_ENVIRONMENT")??bd("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??wd("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??wd("CROSSX_ENVIRONMENT");return yd(t)}function yd(e){switch(e?.toLowerCase()){case"dev":case"development":return"dev";case"stage":case"staging":case"stg":return"stage";default:return"production"}}var Zr=V(require("react"),1),jg={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"},Wg=3e3;function Nr(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 Os=new Map;function jn(e,t){let r=`${jg[t]}/${e}`,n=Os.get(r);return n||(n=(async()=>{let o=new AbortController,a=setTimeout(()=>o.abort(),Wg);try{let i=await fetch(r,{cache:"no-store",signal:o.signal});return i.ok?await i.json():null}catch{return null}finally{clearTimeout(a)}})().then(o=>(o===null&&Os.delete(r),o)),Os.set(r,n)),n}function Gg(e){return typeof e=="string"&&e.startsWith("https://")}async function Oe(e,t){let r=await jn("endpoints.json",t),n=Nr(r?.apis?.[e],t);if(!Gg(n))throw new Error(`[remote-config] endpoints.json missing or invalid api base: ${e} (${t})`);return n}function Ua(e,t){let r=Nr(e?.relay?.forwarderFactories,t),n=[r?.standingForwarderFactory,r?.depositorForwarderFactory].filter(o=>typeof o=="string");return n.length>0?n:void 0}var Wo="chains.json";async function xd(e,t){return(await jn(Wo,t))?.chains?.[String(e)]??{}}function go(e,t){let[r,n]=Zr.useState({});return Zr.useEffect(()=>{if(e==null){n({});return}let o=!0;return jn(Wo,t).then(a=>{o&&n(a?.chains?.[String(e)]??{})}),()=>{o=!1}},[e,t]),r}function vd(e){let[t,r]=Zr.useState({});return Zr.useEffect(()=>{let n=!0;return jn(Wo,e).then(o=>{n&&r(o?.chains??{})}),()=>{n=!1}},[e]),t}function sr(e,t,r){let[n,o]=Zr.useState(void 0),a=Zr.useRef(r);return a.current=r,Zr.useEffect(()=>{let i=!0;return jn(e,t).then(s=>{if(!i)return;let l=a.current(s);l!==void 0&&o(l)}),()=>{i=!1}},[e,t]),n}var Wn="1.3.15";var ja="__nexusCrossAppLauncherRuntime";function _g(){if(typeof window>"u")return null;let e=window;return e[ja]??(e[ja]={mode:"dapp-ui"}),e[ja]}function Hg(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 r=e.connectKitVersion??"unknown";console.info(`[CROSSx App Launcher] connect-kit-react v${r} \uCD08\uAE30\uD654 \uC644\uB8CC (dapp-ui v${Wn}, \uC0AC\uC6A9 \uBAA8\uB4DC: connect-kit)`)}else console.info(`[CROSSx App Launcher] dapp-ui v${Wn} \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 Wa(e){let t=_g();t&&(e?.mode==="connect-kit-react"?t.mode="connect-kit-react":t.mode||(t.mode="dapp-ui"),e?.connectKitVersion&&(t.connectKitVersion=e.connectKitVersion),Hg(t))}var Xr=require("@sentry/react");var Qg="https://5c82aeb32da33b5a0a14b7c5393992ca@o4511668907081728.ingest.de.sentry.io/4511705324126289",Vg=`dapp-ui@${Wn}`,ho=null,kd=.1;function Rd(){return kd}function qg(e){switch(e){case"dev":return"dev";case"stage":return"stg";default:return"prod"}}function bo(e){if(ho)return ho;if(typeof window>"u")return null;let t=qg(at(e?.environment));typeof e?.analyticsSampleRate=="number"&&(kd=Math.min(1,Math.max(0,e.analyticsSampleRate)));let r=new Xr.BrowserClient({dsn:e?.dsn??Qg,transport:Xr.makeFetchTransport,stackParser:Xr.defaultStackParser,integrations:[(0,Xr.linkedErrorsIntegration)()],environment:t,release:Vg,enabled:e?.enabled??t==="prod"}),n=new Xr.Scope;return n.setClient(r),n.setTags({package:"dapp-ui",framework:"react",source:"dapp-ui"}),r.init(),ho=n,ho}function Go(){return ho}function _o(e,t){let r=ho??bo();if(r)return r.captureException(e,t?{captureContext:{extra:t}}:void 0)}var Sd=require("react");var Ho=class extends Sd.Component{constructor(){super(...arguments);this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(r,n){_o(r,{componentStack:n.componentStack??void 0,boundary:this.props.name??"dapp-ui"})}render(){return this.state.hasError?this.props.fallback??null:this.props.children}};function ze(...e){return e.filter(Boolean).join(" ")}var Yg=/CROSSx|ONE\s?wallet|ONE\s?pocket/i;function wo(){return typeof window>"u"?!1:Yg.test(window.navigator.userAgent)}var Cd="__nexus_dapp_ui_uid",Bs=null;function Kg(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Array.from({length:32},()=>Math.floor(Math.random()*16).toString(16)).join("")}function zs(){if(Bs)return Bs;let e=null;try{e=window.localStorage.getItem(Cd)}catch{}if(!e||!e.startsWith("anon_")){e=`anon_${Kg()}`;try{window.localStorage.setItem(Cd,e)}catch{}}return Bs=e,e}async function Nd(e){if(typeof crypto>"u"||!crypto.subtle)return null;try{let t=new TextEncoder().encode(e.trim().toLowerCase()),r=await crypto.subtle.digest("SHA-256",t);return`wallet_${Array.from(new Uint8Array(r),o=>o.toString(16).padStart(2,"0")).join("").slice(0,16)}`}catch{return null}}function Zg(){let e=window.navigator.userAgent;return/ipad|tablet|(android(?!.*mobile))/i.test(e)?"tablet":/mobile|iphone|ipod|android/i.test(e)?"mobile":"desktop"}function Ed(){return{host:window.location.hostname,device_type:Zg(),is_cross_inapp:String(wo())}}var Td=!1;function Fs(){if(typeof window>"u")return null;let e=Go()??bo();return e?(Td||(Td=!0,e.setUser({id:zs()})),e):null}function Md(){return Math.random()>=Rd()}var Id=0;function Gn(e){let t=Fs();if(!t)return;let r=++Id;if(!e){t.setUser({id:zs()});return}Nd(e).then(n=>{n&&r===Id&&t.setUser({id:n})})}function Qo(e,t,r){let n=Fs();!n||Md()||n.captureMessage(`ui: ${e}_${t}`,"info",{captureContext:{tags:{...Ed(),feature:e,action:t,...r}}})}function Ke(e,t,r){let n=Fs();if(!n||Md())return;let o=r?.status??"success";n.captureMessage(`funnel: ${e}_${t}`,"info",{captureContext:{tags:{...Ed(),flow:e,funnel_step:`${e}_${t}`,funnel_status:o,...o==="failure"?{failure_reason:r?.reason??"unknown"}:{},...r?.tags}}})}function gr(e){let t=e,r=String((t&&typeof t=="object"&&"message"in t?t.message:e)??"").toLowerCase();return t?.code===4001||/reject|denied|declin|cancel/i.test(r)?"user-rejected":/insufficient (funds|gas|balance)|exceeds balance/i.test(r)?"insufficient-gas":/timeout|timed out|deadline/i.test(r)?"timeout":/revert|execution failed/i.test(r)?"contract-reverted":/network|fetch|connection|disconnected|offline/i.test(r)?"network":"unknown"}var Ad=require("react");var Ld=require("react/jsx-runtime");function Ce({feature:e,children:t}){let r=(0,Ad.useCallback)(n=>{let o=n.nativeEvent;if(o.__dappUiTracked)return;let i=n.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");Qo(e,s,l?{item_id:l}:void 0)},[e]);return(0,Ld.jsx)("div",{style:{display:"contents"},onClick:r,children:t})}var vo=V(require("react"),1),Pd=V(require("@radix-ui/react-popover"),1),Od=require("vaul");var Ga=require("react"),Us=(0,Ga.createContext)(null);function _a(){let e=(0,Ga.useContext)(Us);if(!e)throw new Error("AppLauncher compound components must be used within <AppLauncher>");return e}var Qa=V(require("react"),1),Xg="__dappUiOverlay",_n=[],yo=0,Ws=0,Ha=!1,js=!1;function Dd(){if(Ws>0){Ws-=1;return}yo=Math.max(0,yo-1),_n.pop()?.close(),Gs()}function Jg(){Ha||(window.addEventListener("popstate",Dd),Ha=!0)}function Gs(){_n.length>0||!Ha||(window.removeEventListener("popstate",Dd),Ha=!1)}function $g(){js||(js=!0,queueMicrotask(()=>{js=!1;let e=yo-_n.length;if(e<=0){Gs();return}yo-=e,Ws+=1,window.history.go(-e),Gs()}))}function Cn(e,t){let r=Qa.useRef(t);r.current=t,Qa.useEffect(()=>{if(!(!e||typeof window>"u"))return eh(()=>r.current())},[e])}function eh(e){let t={close:e};return _n.push(t),yo<_n.length&&(window.history.pushState({[Xg]:!0},""),yo+=1),Jg(),()=>{let r=_n.lastIndexOf(t);r!==-1&&(_n.splice(r,1),$g())}}var Va=require("react");function xo(e){let[t,r]=(0,Va.useState)(!1);return(0,Va.useEffect)(()=>{let n=window.matchMedia(e);r(n.matches);let o=a=>r(a.matches);return n.addEventListener("change",o),()=>n.removeEventListener("change",o)},[e]),t}function he(e,{insertAt:t}={}){if(!e||typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}he(`[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, #123235);--al-badge-text: var(--ds-accent-primary-default, #00ceb2);--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, #e7f9f8);--al-badge-text: var(--ds-accent-primary-default, #00b4b7);--al-drawer-overlay: var(--ds-overlay-dim, #00000080)}
1
+ "use strict";var Lg=Object.create;var za=Object.defineProperty;var Dg=Object.getOwnPropertyDescriptor;var Pg=Object.getOwnPropertyNames;var Og=Object.getPrototypeOf,Bg=Object.prototype.hasOwnProperty;var zg=(e,t)=>{for(var r in t)za(e,r,{get:t[r],enumerable:!0})},gd=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Pg(t))!Bg.call(e,o)&&o!==r&&za(e,o,{get:()=>t[o],enumerable:!(n=Dg(t,o))||n.enumerable});return e};var V=(e,t,r)=>(r=e!=null?Lg(Og(e)):{},gd(t||!e||!e.__esModule?za(r,"default",{value:e,enumerable:!0}):r,e)),Fg=e=>gd(za({},"__esModule",{value:!0}),e);var ax={};zg(ax,{APPLE_ICON:()=>Da,AppLauncher:()=>_s,AppLauncherContent:()=>Vs,AppLauncherTrigger:()=>Hs,BINANCE_ICON:()=>Aa,BridgeFlow:()=>to,CHAINS_CONFIG_FILE:()=>jo,CONNECTOR_REGISTRY:()=>Vo,CROSSX_ICON:()=>Ea,ConnectButton:()=>nd,ConnectorId:()=>Za,DEFAULT_SKILLS_HREF:()=>od,DEFAULT_TRUSTED_FACTORIES:()=>io,DappUiErrorBoundary:()=>_o,GOOGLE_ICON:()=>La,GetOneUsd:()=>ed,METAMASK_ICON:()=>Ma,PORTFOLIO_SECTIONS:()=>ia,RelayApiError:()=>Lr,RelayDeposit:()=>Do,RelayHistory:()=>Hl,RelayRecovery:()=>Kl,SOCIAL_REGISTRY:()=>Ns,SendFlow:()=>Zo,SkillsButton:()=>ad,StatusTracker:()=>$l,TOKEN_STATS_QUERY_KEY:()=>fi,USER_BALANCE_QUERY_KEY:()=>pi,WALLET_REGISTRY:()=>Cs,WalletConnectModal:()=>rd,WalletInfo:()=>no,WalletPortfolio:()=>Rl,WalletPortfolioBody:()=>Jn,announceAppLauncherUsage:()=>ja,captureDappUiException:()=>Go,createRelayClient:()=>Vt,findGetOneUsdToken:()=>ka,getChainDisplay:()=>yd,getDappUiSentryScope:()=>Wo,getOneUsdTokenKey:()=>va,initDappUiSentry:()=>bo,isGetOneUsdActionEnabled:()=>Sa,isGetOneUsdActionSupported:()=>Bo,isGetOneUsdActionVisible:()=>Oo,isGetOneUsdTargetAvailable:()=>Ra,matchesGetOneUsdToken:()=>bs,normalizeFailureReason:()=>gr,resolveEnvironment:()=>at,resolveGetOneUsdRoute:()=>Po,setDappUiAnalyticsUser:()=>Gn,trackDappUiEvent:()=>Ho,trackDappUiFunnel:()=>Ye,useChainDisplay:()=>go,useChainsConfig:()=>xd,useGlobalMenu:()=>Qo,useRelayConfig:()=>Zl,useRelayOrders:()=>Rn,useRelayRecovery:()=>Xl,useTokenBalance:()=>mn,useTokenStats:()=>gn,useWalletDetect:()=>Na});module.exports=Fg(ax);var Ug={};function hd(e){try{return Ug.env?.[e]}catch{return}}function bd(e){if(!(typeof process>"u"))return process.env?.[e]}function at(e){if(e)return wd(e);let t=hd("VITE_CROSSX_ENVIRONMENT")??hd("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??bd("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??bd("CROSSX_ENVIRONMENT");return wd(t)}function wd(e){switch(e?.toLowerCase()){case"dev":case"development":return"dev";case"stage":case"staging":case"stg":return"stage";default:return"production"}}var Zr=V(require("react"),1),jg={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"},Wg=3e3;function Nr(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 Os=new Map;function jn(e,t){let r=`${jg[t]}/${e}`,n=Os.get(r);return n||(n=(async()=>{let o=new AbortController,a=setTimeout(()=>o.abort(),Wg);try{let i=await fetch(r,{cache:"no-store",signal:o.signal});return i.ok?await i.json():null}catch{return null}finally{clearTimeout(a)}})().then(o=>(o===null&&Os.delete(r),o)),Os.set(r,n)),n}function Gg(e){return typeof e=="string"&&e.startsWith("https://")}async function Oe(e,t){let r=await jn("endpoints.json",t),n=Nr(r?.apis?.[e],t);if(!Gg(n))throw new Error(`[remote-config] endpoints.json missing or invalid api base: ${e} (${t})`);return n}function Fa(e,t){let r=Nr(e?.relay?.forwarderFactories,t),n=[r?.standingForwarderFactory,r?.depositorForwarderFactory].filter(o=>typeof o=="string");return n.length>0?n:void 0}var jo="chains.json";async function yd(e,t){return(await jn(jo,t))?.chains?.[String(e)]??{}}function go(e,t){let[r,n]=Zr.useState({});return Zr.useEffect(()=>{if(e==null){n({});return}let o=!0;return jn(jo,t).then(a=>{o&&n(a?.chains?.[String(e)]??{})}),()=>{o=!1}},[e,t]),r}function xd(e){let[t,r]=Zr.useState({});return Zr.useEffect(()=>{let n=!0;return jn(jo,e).then(o=>{n&&r(o?.chains??{})}),()=>{n=!1}},[e]),t}function sr(e,t,r){let[n,o]=Zr.useState(void 0),a=Zr.useRef(r);return a.current=r,Zr.useEffect(()=>{let i=!0;return jn(e,t).then(s=>{if(!i)return;let l=a.current(s);l!==void 0&&o(l)}),()=>{i=!1}},[e,t]),n}var Wn="1.3.16-beta.2";var Ua="__nexusCrossAppLauncherRuntime";function _g(){if(typeof window>"u")return null;let e=window;return e[Ua]??(e[Ua]={mode:"dapp-ui"}),e[Ua]}function Hg(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 r=e.connectKitVersion??"unknown";console.info(`[CROSSx App Launcher] connect-kit-react v${r} \uCD08\uAE30\uD654 \uC644\uB8CC (dapp-ui v${Wn}, \uC0AC\uC6A9 \uBAA8\uB4DC: connect-kit)`)}else console.info(`[CROSSx App Launcher] dapp-ui v${Wn} \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 ja(e){let t=_g();t&&(e?.mode==="connect-kit-react"?t.mode="connect-kit-react":t.mode||(t.mode="dapp-ui"),e?.connectKitVersion&&(t.connectKitVersion=e.connectKitVersion),Hg(t))}var Xr=require("@sentry/react");var Qg="https://5c82aeb32da33b5a0a14b7c5393992ca@o4511668907081728.ingest.de.sentry.io/4511705324126289",Vg=`dapp-ui@${Wn}`,ho=null,vd=.1;function kd(){return vd}function qg(e){switch(e){case"dev":return"dev";case"stage":return"stg";default:return"prod"}}function bo(e){if(ho)return ho;if(typeof window>"u")return null;let t=qg(at(e?.environment));typeof e?.analyticsSampleRate=="number"&&(vd=Math.min(1,Math.max(0,e.analyticsSampleRate)));let r=new Xr.BrowserClient({dsn:e?.dsn??Qg,transport:Xr.makeFetchTransport,stackParser:Xr.defaultStackParser,integrations:[(0,Xr.linkedErrorsIntegration)()],environment:t,release:Vg,enabled:e?.enabled??t==="prod"}),n=new Xr.Scope;return n.setClient(r),n.setTags({package:"dapp-ui",framework:"react",source:"dapp-ui"}),r.init(),ho=n,ho}function Wo(){return ho}function Go(e,t){let r=ho??bo();if(r)return r.captureException(e,t?{captureContext:{extra:t}}:void 0)}var Rd=require("react");var _o=class extends Rd.Component{constructor(){super(...arguments);this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(r,n){Go(r,{componentStack:n.componentStack??void 0,boundary:this.props.name??"dapp-ui"})}render(){return this.state.hasError?this.props.fallback??null:this.props.children}};function ze(...e){return e.filter(Boolean).join(" ")}var Yg=/CROSSx|ONE\s?wallet|ONE\s?pocket/i;function Wa(){return typeof window>"u"?!1:Yg.test(window.navigator.userAgent)}var Sd="__nexus_dapp_ui_uid",Bs=null;function Kg(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Array.from({length:32},()=>Math.floor(Math.random()*16).toString(16)).join("")}function zs(){if(Bs)return Bs;let e=null;try{e=window.localStorage.getItem(Sd)}catch{}if(!e||!e.startsWith("anon_")){e=`anon_${Kg()}`;try{window.localStorage.setItem(Sd,e)}catch{}}return Bs=e,e}async function Cd(e){if(typeof crypto>"u"||!crypto.subtle)return null;try{let t=new TextEncoder().encode(e.trim().toLowerCase()),r=await crypto.subtle.digest("SHA-256",t);return`wallet_${Array.from(new Uint8Array(r),o=>o.toString(16).padStart(2,"0")).join("").slice(0,16)}`}catch{return null}}function Zg(){let e=window.navigator.userAgent;return/ipad|tablet|(android(?!.*mobile))/i.test(e)?"tablet":/mobile|iphone|ipod|android/i.test(e)?"mobile":"desktop"}function Id(){return{host:window.location.hostname,device_type:Zg(),is_cross_inapp:String(Wa())}}var Nd=!1;function Fs(){if(typeof window>"u")return null;let e=Wo()??bo();return e?(Nd||(Nd=!0,e.setUser({id:zs()})),e):null}function Ed(){return Math.random()>=kd()}var Td=0;function Gn(e){let t=Fs();if(!t)return;let r=++Td;if(!e){t.setUser({id:zs()});return}Cd(e).then(n=>{n&&r===Td&&t.setUser({id:n})})}function Ho(e,t,r){let n=Fs();!n||Ed()||n.captureMessage(`ui: ${e}_${t}`,"info",{captureContext:{tags:{...Id(),feature:e,action:t,...r}}})}function Ye(e,t,r){let n=Fs();if(!n||Ed())return;let o=r?.status??"success";n.captureMessage(`funnel: ${e}_${t}`,"info",{captureContext:{tags:{...Id(),flow:e,funnel_step:`${e}_${t}`,funnel_status:o,...o==="failure"?{failure_reason:r?.reason??"unknown"}:{},...r?.tags}}})}function gr(e){let t=e,r=String((t&&typeof t=="object"&&"message"in t?t.message:e)??"").toLowerCase();return t?.code===4001||/reject|denied|declin|cancel/i.test(r)?"user-rejected":/insufficient (funds|gas|balance)|exceeds balance/i.test(r)?"insufficient-gas":/timeout|timed out|deadline/i.test(r)?"timeout":/revert|execution failed/i.test(r)?"contract-reverted":/network|fetch|connection|disconnected|offline/i.test(r)?"network":"unknown"}var Md=require("react");var Ad=require("react/jsx-runtime");function Ce({feature:e,children:t}){let r=(0,Md.useCallback)(n=>{let o=n.nativeEvent;if(o.__dappUiTracked)return;let i=n.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");Ho(e,s,l?{item_id:l}:void 0)},[e]);return(0,Ad.jsx)("div",{style:{display:"contents"},onClick:r,children:t})}var xo=V(require("react"),1),Dd=V(require("@radix-ui/react-popover"),1),Pd=require("vaul");var Ga=require("react"),Us=(0,Ga.createContext)(null);function _a(){let e=(0,Ga.useContext)(Us);if(!e)throw new Error("AppLauncher compound components must be used within <AppLauncher>");return e}var Qa=V(require("react"),1),Xg="__dappUiOverlay",_n=[],wo=0,Ws=0,Ha=!1,js=!1;function Ld(){if(Ws>0){Ws-=1;return}wo=Math.max(0,wo-1),_n.pop()?.close(),Gs()}function Jg(){Ha||(window.addEventListener("popstate",Ld),Ha=!0)}function Gs(){_n.length>0||!Ha||(window.removeEventListener("popstate",Ld),Ha=!1)}function $g(){js||(js=!0,queueMicrotask(()=>{js=!1;let e=wo-_n.length;if(e<=0){Gs();return}wo-=e,Ws+=1,window.history.go(-e),Gs()}))}function Cn(e,t){let r=Qa.useRef(t);r.current=t,Qa.useEffect(()=>{if(!(!e||typeof window>"u"))return eh(()=>r.current())},[e])}function eh(e){let t={close:e};return _n.push(t),wo<_n.length&&(window.history.pushState({[Xg]:!0},""),wo+=1),Jg(),()=>{let r=_n.lastIndexOf(t);r!==-1&&(_n.splice(r,1),$g())}}var Va=require("react");function yo(e){let[t,r]=(0,Va.useState)(!1);return(0,Va.useEffect)(()=>{let n=window.matchMedia(e);r(n.matches);let o=a=>r(a.matches);return n.addEventListener("change",o),()=>n.removeEventListener("change",o)},[e]),t}function he(e,{insertAt:t}={}){if(!e||typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}he(`[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, #123235);--al-badge-text: var(--ds-accent-primary-default, #00ceb2);--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, #e7f9f8);--al-badge-text: var(--ds-accent-primary-default, #00b4b7);--al-drawer-overlay: var(--ds-overlay-dim, #00000080)}
2
2
  `);he(`.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
  `);he(`@keyframes al-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
4
4
  `);he(`.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
- `);he("");var qa=require("react/jsx-runtime");function _s({env:e,theme:t="dark",mobileBreakpoint:r=768,domain:n,children:o}){let a=xo(`(max-width: ${r}px)`),[i,s]=vo.useState(!1),l=vo.useCallback(()=>s(!1),[]),d=at(e);Cn(i,l);let c=vo.useMemo(()=>({env:d,theme:t,isMobile:a,open:i,domain:n,close:l}),[d,t,a,i,n,l]);return(0,qa.jsx)(Us.Provider,{value:c,children:a?(0,qa.jsx)(Od.Drawer.Root,{direction:"right",open:i,onOpenChange:s,noBodyStyles:!0,children:o},"drawer"):(0,qa.jsx)(Pd.Root,{open:i,onOpenChange:s,children:o},"popover")})}var Ud=V(require("@radix-ui/react-popover"),1),jd=require("vaul");var lr=require("react/jsx-runtime");function Bd({size:e=18}){return(0,lr.jsxs)("svg",{className:"al-trigger-icon",width:e,height:e,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,lr.jsx)("rect",{x:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,lr.jsx)("rect",{x:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,lr.jsx)("rect",{y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,lr.jsx)("rect",{x:"7",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,lr.jsx)("rect",{x:"14",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,lr.jsx)("rect",{y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,lr.jsx)("rect",{x:"7",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,lr.jsx)("rect",{x:"14",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"})]})}function zd(){return(0,lr.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,lr.jsx)("path",{d:"M12 19L5 12M5 12L12 5M5 12H19",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Fd(){return(0,lr.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,lr.jsx)("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}var Hn=require("react/jsx-runtime");function Hs({asChild:e,children:t,className:r,style:n}){let{isMobile:o,theme:a}=_a(),i=t!=null,s=e??!0,l=r?`al-trigger-btn ${r}`:"al-trigger-btn",d=i?t:(0,Hn.jsx)("button",{type:"button",className:l,"data-theme":a,"data-track":"open",style:n,children:(0,Hn.jsx)(Bd,{size:18})});return o?(0,Hn.jsx)(Ce,{feature:"app_launcher",children:(0,Hn.jsx)(jd.Drawer.Trigger,{asChild:s,children:d})}):(0,Hn.jsx)(Ce,{feature:"app_launcher",children:(0,Hn.jsx)(Ud.Trigger,{asChild:s,children:d})})}var Jr=V(require("react"),1),Ya=V(require("@radix-ui/react-popover"),1),Qn=require("vaul");var _d=require("@tanstack/react-query");var Wd={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 th="https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",rh="https://contents.crosstoken.io/frontend/common/app-launcher/icons";function Ur(e,t){return`${e==="production"?rh:th}/${t}.png`}function Gd(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:Ur(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:Ur(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:Ur(t,"crossd"),order:5e3,type:"crossd",badge:null,isNew:!1,serviceStatus:"ending"},{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:Ur(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:Ur(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:Ur(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:Ur(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:Ur(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:Ur(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:Ur(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:Ur(t,"wave"),order:11e4,type:"wave",badge:null,isNew:!1,serviceStatus:"available"}]}}function Vo(e){let t=at(e);return(0,_d.useQuery)({queryKey:["global-menu",t],queryFn:async()=>{try{let r=await fetch(Wd[t],{cache:"no-store"});if(!r.ok)throw new Error(`Failed to fetch global menu: ${r.status}`);return r.json()}catch{return Gd(t)}},staleTime:300*1e3,gcTime:600*1e3,retry:!1,refetchOnMount:!0})}function Qs(e){return e.serviceStatus==="ending"||e.serviceStatus==="comingSoon"?e.serviceStatus:"available"}function Qd(e,t){return typeof e=="string"?e:e[t]??e.production??e.stage??e.dev}function Vd(e){return[...e].sort((t,r)=>{let n=Hd(t)-Hd(r);return n!==0?n:t.order-r.order})}function Hd(e){let t=Qs(e);return t==="comingSoon"?0:t==="ending"?2:1}var lt=require("react/jsx-runtime");function nh(e){return e.id==="cross-staking"||e.type==="cross-staking"}function Vs({align:e="end",sideOffset:t=8,className:r}){let{env:n,theme:o,isMobile:a,domain:i,close:s}=_a(),{data:l}=Vo(n),d=Jr.useMemo(()=>Vd(l?.items??[]),[l?.items]),c=24,b=Jr.useRef(null),m=Jr.useRef(!1),g=Jr.useCallback(v=>{b.current={x:v.clientX,y:v.clientY},m.current=!1},[]),y=Jr.useCallback(v=>{let R=b.current;b.current=null,R&&(m.current=Math.abs(v.clientX-R.x)>c||Math.abs(v.clientY-R.y)>c)},[]),w=Jr.useCallback(()=>{b.current=null,m.current=!0},[]),f=typeof window<"u"?window.location.pathname:"",p=Jr.useCallback((v,R)=>{let S=m.current;if(m.current=!1,S&&v.detail!==0)return;let T=R.url[n]??R.url.production,C=qd(T,i);if(!C)try{let N=new URL(T).pathname;if(f===N||f.startsWith(N+"/")){s();return}}catch{}C?window.open(T,"_blank","noopener,noreferrer"):window.location.href=T,s()},[n,i,s,f]),x=v=>{let R=v.url[n]??v.url.production,S=qd(R,i),T=Qs(v),C=T==="ending",N=Qd(v.iconUrl,n),E=!1;if(!S)try{let M=new URL(R).pathname;E=f===M||f.startsWith(M+"/")}catch{E=!1}return(0,lt.jsx)("button",{type:"button",className:"al-grid-item","data-track":"menu_item_click","data-track-id":v.id,"data-active":E||void 0,"data-service-status":T,onPointerDown:g,onPointerUp:y,onPointerCancel:w,onClick:M=>p(M,v),children:(0,lt.jsxs)("div",{className:"al-grid-item-left",children:[(0,lt.jsxs)("div",{className:"al-grid-item-icon",children:[(0,lt.jsx)("img",{src:N,alt:v.label,width:24,height:24,loading:"lazy"}),v.isNew&&(0,lt.jsx)("span",{className:"al-status-ribbon al-status-ribbon-new",children:"N"})]}),(0,lt.jsxs)("span",{className:"al-grid-item-text",children:[(0,lt.jsx)("span",{className:"al-grid-item-label",children:v.label}),C&&(0,lt.jsx)("span",{className:"al-grid-item-status-text",children:"(End Soon)"}),v.badge&&!nh(v)&&(0,lt.jsx)("span",{className:"al-badge al-badge-list",children:v.badge})]})]})},v.id)},h=(0,lt.jsx)("div",{className:"al-menu","data-theme":o,children:(0,lt.jsx)("div",{className:"al-grid",children:d.map(x)})});return a?(0,lt.jsx)(Ce,{feature:"app_launcher",children:(0,lt.jsxs)(Qn.Drawer.Portal,{children:[(0,lt.jsx)(Qn.Drawer.Overlay,{className:"al-drawer-overlay"}),(0,lt.jsxs)(Qn.Drawer.Content,{className:ze("al-drawer-content",r),"data-theme":o,children:[(0,lt.jsxs)("div",{className:"al-drawer-header",children:[(0,lt.jsx)(Qn.Drawer.Close,{className:"al-drawer-close","data-track":"close",children:(0,lt.jsx)(zd,{})}),(0,lt.jsx)(Qn.Drawer.Title,{className:"al-drawer-title",children:"CROSS Services"}),(0,lt.jsx)(Qn.Drawer.Close,{className:"al-drawer-close","data-track":"close",children:(0,lt.jsx)(Fd,{})})]}),(0,lt.jsx)("div",{className:"al-drawer-body",children:h})]})]})}):(0,lt.jsx)(Ce,{feature:"app_launcher",children:(0,lt.jsx)(Ya.Portal,{children:(0,lt.jsx)(Ya.Content,{align:e,sideOffset:t,className:ze("al-popover-content",r),"data-theme":o,children:h})})})}function qd(e,t){try{let r=new URL(e).hostname;return typeof window>"u"?!0:r!==(t??window.location.hostname)}catch{return!1}}var tr=V(require("react"),1),Of=V(require("@radix-ui/react-popover"),1),Bf=require("vaul");var Ka=require("react"),qs=(0,Ka.createContext)(null);function Nn(){let e=(0,Ka.useContext)(qs);if(!e)throw new Error("WalletInfo compound components must be used within <WalletInfo>");return e}var Yd=require("@nexus-cross/crossx-design-system"),Za=(n=>(n.CROSSx="crossx",n.MetaMask="io.metamask",n.Binance="com.binance.wallet",n))(Za||{}),qo={crossx:{name:Yd.WALLET_LABELS.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"}};var Wc=V(require("react"),1);var Ee=require("react/jsx-runtime");function Kd({size:e=16,className:t}){return(0,Ee.jsxs)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Ee.jsx)("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"}),(0,Ee.jsx)("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 Vn({size:e=16,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"4 4 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("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 pn({size:e=16,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("path",{d:"M11.6667 3.5L5.25 9.91667L2.33334 7",stroke:"currentColor",strokeWidth:1.16667,strokeLinecap:"round",strokeLinejoin:"round"})})}function jr({size:e=24,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Zd({size:e=20,className:t}){return(0,Ee.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Ee.jsx)("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"}),(0,Ee.jsx)("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 Xa({size:e=20,className:t}){return(0,Ee.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,children:(0,Ee.jsx)("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 un({size:e=20,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor",strokeWidth:1.67,strokeLinecap:"round",strokeLinejoin:"round"})})}function Tr({size:e=20,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("path",{d:"M5 8L10 13L15 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Xd({size:e=16,className:t}){return(0,Ee.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Ee.jsx)("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"}),(0,Ee.jsx)("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 Jd({size:e=16,className:t}){return(0,Ee.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Ee.jsx)("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"}),(0,Ee.jsx)("path",{d:"M1.667 1.667l16.666 16.666",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}var oh='<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>',ah=`data:image/svg+xml,${encodeURIComponent(oh)}`;function $d({size:e=42,className:t}){return(0,Ee.jsx)("img",{src:ah,width:e,height:e,alt:"",className:t,style:{display:"block"}})}function ec({size:e=20,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("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 tc({size:e=20,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("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 rc({size:e=20,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("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 nc({size:e=20,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("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 oc({size:e=20,className:t}){return(0,Ee.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Ee.jsx)("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor"}),(0,Ee.jsx)("path",{d:"M6 10.2L8.6 12.8L14 7.2",stroke:"var(--ds-accent-primary-on, #ffffff)",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})]})}var pe=V(require("react"),1);var Tn=V(require("bignumber.js"),1);function ih(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 In(e,t){if(!e||e==="0")return"0.00";let r=new Tn.default(e).shiftedBy(-t),n=r.isGreaterThanOrEqualTo(1)?2:4;return r.toFormat(n,Tn.default.ROUND_DOWN)}function dr(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}function qn(e){let t=typeof e=="string"?parseFloat(e):e;if(Number.isNaN(t)||t===0)return"$0.00";let r=t>=1?2:4,n=Math.pow(10,r);return`$${(Math.floor(t*n)/n).toLocaleString("en-US",{minimumFractionDigits:r,maximumFractionDigits:r})}`}function Ja(e,t,r){let o=new Tn.default(e).shiftedBy(-t).multipliedBy(new Tn.default(r));return o.isZero()||o.isNaN()?"$0.00":`$${(o.integerValue(Tn.default.ROUND_DOWN).isGreaterThanOrEqualTo(1)?o.decimalPlaces(2,Tn.default.ROUND_DOWN):o.decimalPlaces(4,Tn.default.ROUND_DOWN)).toFormat()}`}function ac(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 r=t;if(r.includes("e")||r.includes("E")){let i=Number(r);if(!Number.isFinite(i)||i===0)return{displayValue:"0",isLowerBound:!1};r=ih(i.toFixed(18))}let[n="0",o=""]=r.split(".");if(Number(n)>=1){let i=o.slice(0,2).padEnd(2,"0");return{displayValue:`${Number(n).toLocaleString("en-US")}.${i}`,isLowerBound:!1}}return o.length<4?{displayValue:`${n}.${o}`,isLowerBound:!1}:o.slice(0,4)==="0000"?{displayValue:"0.0001",isLowerBound:!0}:{displayValue:`0.${o.slice(0,4)}`,isLowerBound:!1}}var Ys=require("react"),sc=require("@tanstack/react-query");var It={dev:{cross:612044,bsc:97},stage:{cross:612044,bsc:97},production:{cross:612055,bsc:56}},$a="https://terms.onechain.nexus/docs/terms-july-23-2026",ei="https://terms.onechain.nexus/docs/pp-july-23-2026",ic="https://contents.crossdefi.io/Terms/terms/tos-26-07-09-oneusd.html";var sh="send:chain-info";function lh(e){if("data"in e&&e.data!==void 0){let t=e.data;if(Array.isArray(t)){let r=t[0];if(!r)throw new Error("Chain info payload is empty.");return r}return t}return e}function Ks(e,...t){let r=e.replace(/\/+$/,""),n=t.map(o=>o.replace(/^\/+|\/+$/g,"")).filter(Boolean);return[r,...n].join("/")}function lc(e,t,r,n){if(n)return t===It[e].cross?dc(t,n):r?.explorer_url?Ks(r.explorer_url,r.explorer_postfix?.transaction??"tx",n):dh(e,t,n)}function dc(e,t){return Ks("https://explorer.onechain.nexus",String(e),"tx",t)}function dh(e,t,r){let n=It[e];if(t===n.cross)return dc(t,r);if(t===n.bsc)return Ks(e==="production"?"https://bscscan.com":"https://testnet.bscscan.com","tx",r)}function Yo(e,t,r,n=!0){let o=(0,sc.useQuery)({queryKey:[sh,e,t],queryFn:async({signal:s})=>{let l=await Oe("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 c=await d.json();if("code"in c&&c.code!==void 0&&c.code!==200)throw new Error(`Chain info API error: ${c.code}`);return lh(c)},enabled:n,staleTime:3e5}),a=o.data;return{transactionUrl:(0,Ys.useMemo)(()=>lc(e,t,a,r),[t,a,e,r]),chainInfo:a,...o}}function cc(e,t,r=!0){let{chainInfo:n}=Yo(e,t,void 0,r);return{buildTxUrl:(0,Ys.useMemo)(()=>a=>lc(e,t,n,a),[e,t,n]),chainInfo:n}}var pc="0x0000000000000000000000000000000000000001";var ch="0xa9059cbb",ph=/^0x[a-fA-F0-9]{40}$/,uh="nexus-cross:dapp-ui:send:recent:",uc=10;function fh(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return e.slice(0,t)}function Ko(e){return e.toLowerCase()}function $r(e){return ph.test(e)}function En(e){return Ko(e.address)===pc}function Zs(e){return`${uh}${e.toLowerCase()}`}function ko(e){if(typeof window>"u")return[];try{let t=window.localStorage.getItem(Zs(e));if(!t)return[];let r=JSON.parse(t);return Array.isArray(r)?r.filter(n=>n!==null&&typeof n=="object"&&$r(n.address)&&typeof n.updatedAt=="number").slice(0,uc):[]}catch{return[]}}function Xs(e,t){if(typeof window>"u")return[];let r=Ko(t),n=[{address:r,updatedAt:Date.now()},...ko(e).filter(o=>o.address!==r)].slice(0,uc);try{window.localStorage.setItem(Zs(e),JSON.stringify(n))}catch{return ko(e)}return n}function Js(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(Zs(e))}catch{}}function Yn(e,t){let r=e.trim();if(!r)return{error:"Enter an amount."};if(!/^\d+(\.\d*)?$/.test(r))return{error:"Enter a valid amount."};let[n="0",o=""]=r.split(".");if(o.length>t)return{error:`Max ${t} decimal places.`};let a=BigInt(n||"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 Ro(e,t){let r=BigInt(e||"0"),n=10n**BigInt(t),o=r/n,a=r%n;if(a===0n)return o.toString();let i=fh(a.toString().padStart(t,"0"));return`${o.toString()}.${i}`}function $s(e,t){let r=e.replace(/^0x/,"").toLowerCase().padStart(64,"0"),n=t.toString(16).padStart(64,"0");return`${ch}${r}${n}`}function ti(e,t,r=10){if(t<=0)return e.toString();let n=10n**BigInt(t),o=e/n,a=e%n;if(a===0n)return o.toString();let s=a.toString().padStart(t,"0").slice(0,Math.max(0,Math.min(r,t)));return s=s.replace(/0+$/,""),s?`${o.toString()}.${s}`:o.toString()}function el(e,t){return ti(e,t,6)}function fc(e){return ti(e,9,2)}function mc(e){return e.toLocaleString("en-US")}function ri(e){return e===56||e===97}function ni(e){return e.gasPrice??e.maxFeePerGas}function gc(e,t=!1){return t?ni(e)!==void 0?"legacy":null:e.maxFeePerGas!==void 0?"dynamic":e.gasPrice!==void 0?"legacy":null}function oi(e,t=!1){if(t){let r=ni(e);return r!==void 0?e.gasLimit*r:null}return e.maxFeePerGas!==void 0?e.gasLimit*e.maxFeePerGas:e.gasPrice!==void 0?e.gasLimit*e.gasPrice:null}function ai(e){return!Number.isFinite(e)||e<=0?"$0.00":`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function hc(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 r=e,n=[];return typeof r.name=="string"&&n.push(r.name),typeof r.shortMessage=="string"&&n.push(r.shortMessage),typeof r.message=="string"&&n.push(r.message),typeof r.details=="string"&&n.push(r.details),r.cause!==void 0&&n.push(hc(r.cause,t+1)),n.join(`
6
- `).toLowerCase()}function mh(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 tl(e,t={},r="Failed to send transaction."){let n=hc(e);if(!n)return r;let o=t.nativeSymbol?.trim()||"gas token",a=t.networkName?.trim();if(n.includes("user rejected")||n.includes("userrejected")||n.includes("user denied")||n.includes("user cancelled")||n.includes("user canceled")||n.includes("action_rejected")||n.includes("rejected by user"))return"Transaction was cancelled.";if(n.includes("insufficientfunds")||n.includes("insufficient funds")||n.includes("exceeds the balance of the account")||n.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 n.includes("transaction underpriced")||n.includes("replacement transaction underpriced")||n.includes("fee too low")?"Gas fee was too low for the network. Please try again.":n.includes("nonce too low")||n.includes("nonce has already been used")||n.includes("nonce too high")?"Pending transactions are out of order. Refresh the page and try again.":n.includes("execution reverted")||n.includes("contractfunctionrevertederror")||n.includes("contractfunctionexecutionerror")?"The transaction was rejected by the contract. The recipient or token may be invalid.":n.match(/chain \d+ is not configured/)?"This network is not registered in the app. Contact support.":n.includes("http request failed")||n.includes("failed to fetch")||n.includes("network request failed")||n.includes("timeout")||n.includes("econnreset")||n.includes("rpc error")||n.includes("429")?"Network connection failed. Check your internet and try again.":n.includes("estimategas")||n.includes("gas estimation failed")?"Could not estimate the gas fee. The recipient address or amount may be invalid.":mh(e)||r}var gh=2000000000n,hh=1000000000n;async function ii(e,t,r){let n=new AbortController,o=setTimeout(()=>n.abort(),8e3),a=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:r}),signal:n.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 si(e){return BigInt(e)}function bh(e){return`0x${e.toString(16)}`}function wh(e){let t={to:e.to};return e.from&&(t.from=e.from),e.value!==void 0&&e.value>0n&&(t.value=bh(e.value)),e.data&&(t.data=e.data),t}function yh(e){return e===56||e===97}async function bc(e){try{let t=await ii(e,"eth_gasPrice",[]);return{gasPrice:si(t)}}catch{return{gasPrice:gh}}}async function xh(e,t){let r=hh;try{let n=await ii(e,"eth_maxPriorityFeePerGas",[]);r=si(n)}catch{}return{maxFeePerGas:t+r,maxPriorityFeePerGas:r}}async function vh(e,t){if(t)return bc(e);let r;try{r=(await ii(e,"eth_getBlockByNumber",["latest",!1]))?.baseFeePerGas}catch{}return r?xh(e,si(r)):bc(e)}async function wc(e,t){let r=yh(t.chainId),n=wh(t),[o,a]=await Promise.all([ii(e,"eth_estimateGas",[n]),vh(e,r)]);return{gasLimit:si(o),gasPrice:a.gasPrice,maxFeePerGas:a.maxFeePerGas,maxPriorityFeePerGas:a.maxPriorityFeePerGas}}function yc(e){let{estimateGas:t,sendTransaction:r,getTransactionReceipt:n}=e;return{canSend:!!r,canEstimateGas(o){return!!t||!!o},async estimateGas(o,a){if(t)return t(o);if(a)return wc(a,o);throw new Error("Gas estimation is not available.")},async sendTransaction(o){if(!r)throw new Error("Sending is not available for this wallet.");return r(o)},getTransactionReceipt:n}}var kh=1500,Rh=120;function xc(e){return!!(e.token||e.recipient||e.amount)}function rl({recipient:e,amount:t,token:r,balanceRaw:n}){let o={},a=e.trim(),i=Yn(t,r.quantity.decimals),s;return a?$r(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>n&&(o.amount="Amount exceeds available balance.")),!En(r)&&!$r(r.address)&&(o.token="Token contract address is invalid."),{errors:o,rawAmount:o.amount?void 0:s,recipient:a&&$r(a)?a:void 0}}function nl({token:e,walletAddress:t,recipient:r,rawAmount:n}){let o=t;return En(e)?{to:r,value:n,chainId:e.chainId,from:o}:{to:Ko(e.address),data:$s(r,n),value:0n,chainId:e.chainId,from:o}}function Sh(e){let{status:t}=e;return t==="reverted"||t==="0x0"||t===0||t===0n||t===!1}var Ch=e=>new Promise(t=>setTimeout(t,e));async function vc({repository:e,args:t,chainId:r,onSubmitted:n,pollIntervalMs:o=kh,pollMaxAttempts:a=Rh}){let i=await e.sendTransaction(t);n(i);let{getTransactionReceipt:s}=e;if(!s)return"success";for(let l=0;l<a;l+=1){let d=await s({hash:i,chainId:r}).catch(()=>null);if(d)return Sh(d)?"reverted":"success";await Ch(o)}return"timeout"}var kc=["token","recipient","amount","review"];function Rc(e){let{env:t,walletAddress:r,accountName:n,accounts:o=[],initialStep:a="recipient",token:i,tokens:s=[],onTokenChange:l,sendTransaction:d,getTransactionReceipt:c,estimateGas:b,getTokenPriceUsd:m,onSubmitted:g,onSuccess:y,onFailed:w,onExit:f,onOutlink:p}=e,x=pe.useMemo(()=>yc({sendTransaction:d,getTransactionReceipt:c,estimateGas:b}),[d,c,b]),[h,v]=pe.useState(i);pe.useEffect(()=>{v(i)},[i.address,i.chainId]);let[R,S]=pe.useState(a),[T,C]=pe.useState(""),[N,E]=pe.useState(""),[M,W]=pe.useState({}),[L,H]=pe.useState("idle"),[A,O]=pe.useState(""),[ce,X]=pe.useState(""),[P,xe]=pe.useState(null),[ne,K]=pe.useState(!1),[U,te]=pe.useState(""),Z=pe.useRef(0),[be,Ne]=pe.useState(null),[re,we]=pe.useState(""),[Fe,Ae]=pe.useState(()=>ko(r)),pt=pe.useRef(new Set),ye=pe.useCallback((B,se)=>{pt.current.has(B)||(pt.current.add(B),Ke("send",B,se))},[]);pe.useEffect(()=>{ye("opened"),a!=="token"&&ye("token_selected",{tags:{item_id:i.symbol}})},[ye,a,i.symbol]);let De=pe.useMemo(()=>at(t),[t]),{transactionUrl:ut,chainInfo:Be}=Yo(De,h.chainId,A||void 0,!0),Ge=go(h.chainId,De),Ue=Ge.nativeSymbol??Be?.currency_symbol??"",st=Ge.name??Be?.name??`Chain ID ${h.chainId}`,Ht=pe.useRef({nativeSymbol:Ue||void 0,networkName:st,tokenSymbol:h.symbol});Ht.current={nativeSymbol:Ue||void 0,networkName:st,tokenSymbol:h.symbol};let St=pe.useMemo(()=>BigInt(h.quantity.numeric||"0"),[h.quantity.numeric]),jt=pe.useMemo(()=>In(h.quantity.numeric,h.quantity.decimals),[h.quantity.numeric,h.quantity.decimals]),Ie=m?.(h),Wt=pe.useMemo(()=>{if(Ie===void 0)return;let B=parseFloat(N.replace(/,/g,""));return Number.isFinite(B)?B*Ie:0},[N,Ie]);pe.useEffect(()=>{E(""),W({})},[h.address,h.chainId]),pe.useEffect(()=>{Z.current+=1,xe(null),te(""),K(!1)},[h.address,h.chainId,T,N]),pe.useEffect(()=>{Ae(ko(r))},[r]);let tt=pe.useCallback(B=>{C(B),W(se=>({...se,recipient:void 0}))},[]),At=pe.useCallback(B=>{E(B),W(se=>({...se,amount:void 0}))},[]),qe=pe.useCallback(()=>{E(jt.replace(/,/g,"")),W(B=>({...B,amount:void 0}))},[jt]),Xe=pe.useCallback(B=>{v(B),l?.(B),ye("token_selected",{tags:{item_id:B.symbol}}),S("recipient")},[l,ye]),nr=pe.useCallback(()=>S("token"),[]),Gt=pe.useCallback(()=>{S(B=>{if(B==="result")return"review";if(B===a)return f?.(),B;let se=kc.indexOf(B);return se<=0?(f?.(),B):kc[se-1]})},[a,f]),Ye=pe.useCallback(()=>{let{errors:B}=rl({recipient:T,amount:"1",token:h,balanceRaw:St});if(B.recipient){W(se=>({...se,recipient:B.recipient}));return}W(se=>({...se,recipient:void 0})),ye("recipient_entered"),S("amount")},[T,h,St,ye]),wt=pe.useCallback(B=>{C(B),W(se=>({...se,recipient:void 0})),ye("recipient_entered"),S("amount")},[ye]),rt=pe.useCallback(()=>{let B=rl({recipient:T,amount:N,token:h,balanceRaw:St});W(B.errors),!(xc(B.errors)||B.rawAmount===void 0||!B.recipient)&&(Ne(B.rawAmount),we(B.recipient),xe(null),te(""),H("idle"),ye("amount_entered"),S("review"))},[T,N,h,St,ye]);pe.useEffect(()=>{if(R!=="review"||!re||be===null||P!==null||ne||U||!x.canEstimateGas(Be?.rpc))return;let B=++Z.current;K(!0),te(""),(async()=>{try{let se=nl({token:h,walletAddress:r,recipient:re,rawAmount:be}),ve=await x.estimateGas(se,Be?.rpc);if(Z.current!==B)return;xe(ve)}catch(se){if(Z.current!==B)return;te(tl(se,Ht.current,"Failed to estimate gas."))}finally{Z.current===B&&K(!1)}})()},[R,re,be,P,ne,U,x,Be?.rpc,h,r]);let _e=pe.useMemo(()=>{if(!En(h)||!P||be===null)return!1;let B=oi(P,ri(h.chainId));return B===null?!1:be+B>St},[h,P,be,St]),ft=pe.useCallback(async()=>{if(!(!re||be===null)&&!_e){X(""),O(""),H("submitting"),ye("submitted");try{let B="",se=await vc({repository:x,args:nl({token:h,walletAddress:r,recipient:re,rawAmount:be}),chainId:h.chainId,onSubmitted:ve=>{B=ve,O(ve),H("confirming"),Ae(Xs(r,re)),g?.({txHash:ve,chainId:h.chainId,amount:N,tokenSymbol:h.symbol,recipient:re})}});if(se==="success")H("success"),ye("confirmed"),B&&y?y?.(B):S("result");else if(se==="reverted"){let ve="Transaction reverted on-chain.";H("error"),X(ve),ye("confirmed",{status:"failure",reason:gr(new Error(ve))}),B&&w?w({txHash:B,chainId:h.chainId,message:ve}):S("result")}else{let ve="Transaction receipt was not found. Please check again later.";H("error"),X(ve),ye("confirmed",{status:"failure",reason:"timeout"}),B&&w?w({txHash:B,chainId:h.chainId,message:ve}):S("result")}}catch(B){H("error"),ye("confirmed",{status:"failure",reason:gr(B)}),X(tl(B,{nativeSymbol:Ue||void 0,networkName:st,tokenSymbol:h.symbol})),S("result")}}},[x,re,be,_e,h,N,r,g,y,w,Ue,st,ye]),[Lt,je]=pe.useState(!1),nt=pe.useRef(void 0);pe.useEffect(()=>()=>clearTimeout(nt.current),[]);let qt=pe.useCallback(async()=>{if(A)try{await navigator.clipboard.writeText(A),je(!0),clearTimeout(nt.current),nt.current=setTimeout(()=>je(!1),2e3)}catch{}},[A]),F=pe.useCallback(()=>{if(!ut||!A)return;let B=Te=>{typeof window<"u"&&window.open(Te,"_blank","noopener,noreferrer")};if(!p){B(ut);return}let se=p(ut,{category:"send",origin:"send-transaction",payload:{chainId:h.chainId,txHash:A}});if(se&&typeof se.then=="function"){let Te=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null;se.then(ot=>{if(ot===null){Te?.close();return}let or=ot??ut;if(Te)try{Te.location.href=or}catch{Te.close(),B(or)}else B(or)});return}let ve=se;ve!==null&&B(ve??ut)},[p,h.chainId,ut,A]),Je=pe.useCallback(()=>{X(""),O(""),H("idle"),xe(null),te(""),pt.current.delete("submitted"),pt.current.delete("confirmed"),S("review")},[]);return{step:R,status:L,token:h,tokens:s.length>0?s:[h],recipient:T,amount:N,amountUsd:Wt,fieldErrors:M,error:ce,txHash:A,gasEstimate:P,gasLoading:ne,gasError:U,insufficientGas:_e,reviewRawAmount:be,reviewRecipient:re,recentAddresses:Fe,accounts:o,accountName:n,walletAddress:r,resolvedEnv:De,transactionUrl:ut,networkName:st,nativeSymbol:Ue,nativeDecimals:Be?.currency_decimals??h.quantity.decimals,balanceRaw:St,balanceText:jt,priceUsd:Ie,canSelectToken:(s.length>0?s:[h]).length>1,canSend:x.canSend,getTokenPriceUsd:m,setRecipient:tt,setAmount:At,setMax:qe,selectToken:Xe,goToTokenSelect:nr,selectRecipient:wt,submitRecipient:Ye,submitAmount:rt,confirmSend:ft,retry:Je,back:Gt,hashCopied:Lt,copyHash:qt,openTransaction:F}}var Wr=V(require("react"),1);var en=require("react/jsx-runtime");function Sc({flow:e}){let{amount:t,setAmount:r,amountUsd:n,balanceText:o,balanceRaw:a,token:i,setMax:s}=e,l=Wr.useRef(null),d=Wr.useCallback(()=>{requestAnimationFrame(()=>{let w=l.current;if(!w)return;let f=w.value.length;w.setSelectionRange(f,f)})},[]);Wr.useEffect(()=>{l.current?.focus(),d()},[d]),Wr.useEffect(()=>{t===""&&(m(!1),d())},[t,d]);let c=Wr.useMemo(()=>{let w=Yn(t,i.quantity.decimals);return"value"in w&&w.value>a},[t,i.quantity.decimals,a]),[b,m]=Wr.useState(!1),g=!b&&t===""?"0.00":t,y=t.trim()===""||t.trim()==="0";return(0,en.jsx)("div",{className:"sf-body sf-amount",children:(0,en.jsxs)("div",{className:"sf-amount-center",children:[(0,en.jsx)("span",{className:"sf-amount-usd",children:n!==void 0?ai(n):"\xA0"}),(0,en.jsx)("div",{className:"sf-amount-input-wrap","data-over":c||void 0,"data-empty":y||void 0,onClick:()=>l.current?.focus(),children:(0,en.jsx)("input",{ref:l,className:"sf-amount-input",value:g,onChange:w=>{let f=w.target.value;if(b)r(f);else if(t===""){if(f.length<4)return;m(!0);let p=f.startsWith("0.00")?f.slice(4):f;r(p)}else m(!0),r(f)},placeholder:"0.00",inputMode:"decimal",autoComplete:"off","aria-label":`Amount in ${i.symbol}`,size:1})}),(0,en.jsxs)("div",{className:"sf-amount-balance",children:[(0,en.jsx)("span",{children:"Balance:"}),(0,en.jsxs)("button",{type:"button",className:"sf-amount-max",onClick:s,"data-track":"amount_max",children:[o," ",i.symbol]})]})]})})}var Gr=V(require("react"),1);var Th=new Set(["0xff42c13d927a6b9265236619161accb227b6d452","0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb"].map(e=>e.toLowerCase()));function Nc(e){return Th.has(e.toLowerCase())}var Cc={cross:"https://contents.crosstoken.io/wallet/token/images/CROSS.svg",bsc:"https://contents.crosstoken.io/wallet/token/images/BSC.svg"};function Zo(e,t){let r=It[e];if(t===r.cross)return Cc.cross;if(t===r.bsc)return Cc.bsc}var Ih={dev:"https://dev-portrait.crosstoken.io",stage:"https://dev-portrait.crosstoken.io",production:"https://portrait.crosstoken.io"};function fn(e,t,r={}){if(!t||!t.startsWith("0x"))return;let{size:n=120,bg:o,format:a="png"}=r,i=Ih[e],s=o?`&bg=${o}`:"";return`${i}/portrait/evm/${t}.${a}?size=${n}${s}`}var Kt=require("react/jsx-runtime");function Tc({size:e=20,className:t}){return(0,Kt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[(0,Kt.jsx)("circle",{cx:"9",cy:"9",r:"6",stroke:"currentColor",strokeWidth:"1.7"}),(0,Kt.jsx)("path",{d:"m17 17-3.2-3.2",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function Ic({size:e=20,className:t}){return(0,Kt.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":"true",children:(0,Kt.jsx)("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 Ec({size:e=20,className:t}){return(0,Kt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[(0,Kt.jsx)("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor",opacity:"0.12"}),(0,Kt.jsx)("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function Mc({size:e=16,className:t}){return(0,Kt.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",className:t,"aria-hidden":"true",children:(0,Kt.jsx)("path",{d:"M8 3v10m0 0 4-4m-4 4-4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ac({size:e=56,className:t}){return(0,Kt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[(0,Kt.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-accent-primary-default, #00b4b7)"}),(0,Kt.jsx)("path",{d:"M17 28.5 24.2 35.5 39 20.5",stroke:"var(--ds-accent-primary-on, #ffffff)",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Lc({size:e=56,className:t}){return(0,Kt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[(0,Kt.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-red-default, #da0b2e)"}),(0,Kt.jsx)("path",{d:"M20 20 36 36m0-16L20 36",stroke:"#ffffff",strokeWidth:"4",strokeLinecap:"round"})]})}var Ze=require("react/jsx-runtime");function Dc(e,t){return e.name||`Account ${(e.index??t)+1}`}function Pc(e){return e.trim().slice(0,1).toUpperCase()||"A"}function Oc(e){return e.toLowerCase()}function Bc({flow:e}){let{recipient:t,setRecipient:r,fieldErrors:n,recentAddresses:o,accounts:a,walletAddress:i,resolvedEnv:s,selectRecipient:l}=e,d=Gr.useMemo(()=>a.filter(h=>h.address.toLowerCase()!==i.toLowerCase()),[a,i]),c=d.length>0,b=Gr.useMemo(()=>new Map(d.map((h,v)=>[Oc(h.address),{account:h,index:v}])),[d]),[m,g]=Gr.useState("recent"),y=Gr.useRef(null);Gr.useEffect(()=>{y.current?.focus()},[]);let w="1A1A2E",f=Gr.useCallback(async()=>{try{let h=await navigator.clipboard.readText();h&&r(h.trim())}catch{}},[r]),p=t.trim().length>0,x=$r(t.trim());return(0,Ze.jsxs)("div",{className:"sf-recipient",children:[(0,Ze.jsxs)("div",{className:"sf-recipient-top",children:[(0,Ze.jsxs)("div",{className:"sf-address-field","data-filled":p||void 0,"data-invalid":n.recipient||void 0,children:[(0,Ze.jsx)("textarea",{ref:y,className:"sf-address-input",value:t,onChange:h=>r(h.target.value),placeholder:"Enter the recipient's address",autoComplete:"off",spellCheck:!1,"aria-label":"Recipient address",rows:p?2:1}),p?(0,Ze.jsx)("button",{type:"button",className:"sf-address-action",onClick:()=>r(""),"aria-label":"Clear","data-track":"recipient_clear",children:(0,Ze.jsx)(Ec,{size:20})}):(0,Ze.jsx)("button",{type:"button",className:"sf-address-action",onClick:f,"aria-label":"Paste from clipboard","data-track":"recipient_paste",children:(0,Ze.jsx)(Ic,{size:20})})]}),n.recipient&&(0,Ze.jsx)("p",{className:"sf-field-error",role:"alert",children:n.recipient}),(0,Ze.jsxs)("div",{className:"sf-tabs",role:"tablist",children:[(0,Ze.jsx)("button",{type:"button",role:"tab",className:"sf-tab","data-active":m==="recent"||void 0,"aria-selected":m==="recent",onClick:()=>g("recent"),"data-track":"recipient_tab","data-track-id":"recent",children:"Recent"}),c&&(0,Ze.jsx)("button",{type:"button",role:"tab",className:"sf-tab","data-active":m==="account"||void 0,"aria-selected":m==="account",onClick:()=>g("account"),"data-track":"recipient_tab","data-track-id":"account",children:"My Account"})]})]}),(0,Ze.jsx)("div",{className:"sf-address-list",children:m==="account"&&c?d.map((h,v)=>{let R=Dc(h,v),S=fn(s,h.address,{size:56,bg:w});return(0,Ze.jsxs)("button",{type:"button",className:"sf-address-row",onClick:()=>l(h.address),"data-track":"recipient_item",children:[(0,Ze.jsxs)("span",{className:"sf-address-avatar",children:[S&&(0,Ze.jsx)("img",{src:S,alt:"",width:40,height:40,draggable:!1,onError:T=>{T.currentTarget.style.display="none"}}),(0,Ze.jsx)("span",{className:"sf-address-avatar-fallback",children:Pc(R)})]}),(0,Ze.jsxs)("span",{className:"sf-address-meta",children:[(0,Ze.jsx)("span",{className:"sf-address-name",children:R}),(0,Ze.jsx)("span",{className:"sf-address-value",children:dr(h.address)})]})]},h.address)}):o.length>0?o.map(h=>{let v=b.get(Oc(h.address)),R=v?Dc(v.account,v.index):dr(h.address),S=fn(s,h.address,{size:56,bg:w});return(0,Ze.jsxs)("button",{type:"button",className:"sf-address-row",onClick:()=>l(h.address),"data-track":"recipient_item",children:[(0,Ze.jsxs)("span",{className:"sf-address-avatar",children:[S&&(0,Ze.jsx)("img",{src:S,alt:"",width:40,height:40,draggable:!1,onError:T=>{T.currentTarget.style.display="none"}}),(0,Ze.jsx)("span",{className:"sf-address-avatar-fallback",children:Pc(R)})]}),(0,Ze.jsxs)("span",{className:"sf-address-meta",children:[(0,Ze.jsx)("span",{className:"sf-address-name",children:R}),(0,Ze.jsx)("span",{className:"sf-address-value",children:dr(h.address)})]})]},h.address)}):(0,Ze.jsx)("div",{className:"sf-empty",children:"No send history"})}),p&&!x&&!n.recipient&&(0,Ze.jsx)("p",{className:"sf-field-error",role:"alert",children:"Enter a valid EVM recipient address."})]})}var Ct=require("react/jsx-runtime");function Fc({flow:e}){let{status:t,txHash:r,error:n,copyHash:o,hashCopied:a,openTransaction:i}=e,s=t==="error",l=t==="success";return s?(0,Ct.jsxs)("div",{className:"sf-body sf-result sf-result--error",children:[(0,Ct.jsx)("span",{className:"sf-result-icon",children:(0,Ct.jsx)(Lc,{size:56})}),(0,Ct.jsxs)("div",{className:"sf-result-copy",children:[(0,Ct.jsx)("h3",{className:"sf-result-title",children:"Transaction Failed"}),(0,Ct.jsx)("p",{className:"sf-result-desc",children:n||"Something went wrong. Please try again."})]}),r&&(0,Ct.jsx)(zc,{txHash:r,hashCopied:a,onCopy:o,onOpen:i})]}):(0,Ct.jsxs)("div",{className:"sf-body sf-result",children:[(0,Ct.jsx)("span",{className:"sf-result-icon","data-pending":!l||void 0,children:l?(0,Ct.jsx)(Ac,{size:56}):(0,Ct.jsx)("span",{className:"sf-result-spinner"})}),(0,Ct.jsxs)("div",{className:"sf-result-copy",children:[(0,Ct.jsx)("h3",{className:"sf-result-title",children:l?"Transaction Complete":"Transaction in Progress"}),(0,Ct.jsx)("p",{className:"sf-result-desc",children:l?"Your transfer was sent successfully.":"Transfer in progress. Waiting for confirmation."})]}),r&&(0,Ct.jsx)(zc,{txHash:r,hashCopied:a,onCopy:o,onOpen:i})]})}function zc({txHash:e,hashCopied:t,onCopy:r,onOpen:n}){return(0,Ct.jsxs)("div",{className:"sf-result-hash-card",children:[(0,Ct.jsx)("span",{className:"sf-result-hash-label",children:"Transaction Hash"}),(0,Ct.jsxs)("div",{className:"sf-result-hash-row",children:[(0,Ct.jsx)("button",{type:"button",className:"sf-result-hash-link",onClick:n,"aria-label":"Open transaction in explorer","data-track":"tx_link_open",children:dr(e)}),(0,Ct.jsx)("button",{type:"button",className:"sf-result-copy-btn",onClick:r,"aria-label":"Copy transaction hash","data-track":"tx_hash_copy",children:t?(0,Ct.jsx)(pn,{size:16}):"Copy"})]})]})}var Me=require("react/jsx-runtime"),li="\u2014";function Uc({flow:e}){let{token:t,reviewRawAmount:r,reviewRecipient:n,accountName:o,accounts:a,walletAddress:i,networkName:s,nativeSymbol:l,nativeDecimals:d,gasEstimate:c,gasLoading:b,gasError:m,insufficientGas:g,error:y,resolvedEnv:w}=e,f=En(t),p=r!==null?ti(r,t.quantity.decimals):"",x=o?.trim()||`Account ${(a[0]?.index??0)+1}`,h=fn(w,i,{size:56,bg:"1A1A2E"}),v=l||(f?t.symbol:""),R=ri(t.chainId),S=c?gc(c,R):null,T=c?oi(c,R):null,C=L=>L!==null&&v?`${el(L,d)} ${v}`:li,N=L=>L!==void 0?`${fc(L)} Gwei`:li,E=(()=>{if(!f||!c||T===null||r===null)return li;let L=r+T;return`${el(L,d)} ${v||t.symbol}`})(),M=L=>b?"\u2026":L,W=[{label:"Est. Tx Fee",value:M(C(T))},...S==="dynamic"?[{label:"Max Priority Fee",value:M(N(c?.maxPriorityFeePerGas))},{label:"Max Gas Fee",value:M(N(c?.maxFeePerGas))}]:S==="legacy"?[{label:"Gas Price",value:M(N(c?ni(c):void 0))}]:[],{label:"Gas Limit",value:M(c?mc(c.gasLimit):li)}];return(0,Me.jsxs)("div",{className:"sf-body sf-review",children:[(0,Me.jsxs)("div",{className:"sf-review-amount",children:[(0,Me.jsx)("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"}}),(0,Me.jsxs)("span",{className:"sf-review-amount-value",children:[p,(0,Me.jsx)("span",{className:"sf-review-amount-symbol",children:t.symbol})]})]}),(0,Me.jsxs)("div",{className:"sf-review-parties",children:[(0,Me.jsxs)("div",{className:"sf-review-card sf-review-party",children:[(0,Me.jsx)("span",{className:"sf-review-party-label",children:"From"}),(0,Me.jsxs)("div",{className:"sf-review-party-head",children:[(0,Me.jsx)("span",{className:"sf-review-party-avatar",children:h&&(0,Me.jsx)("img",{src:h,alt:"",width:28,height:28,draggable:!1,onError:L=>{L.currentTarget.style.display="none"}})}),(0,Me.jsx)("span",{className:"sf-review-party-name",children:x})]}),(0,Me.jsx)("span",{className:"sf-review-party-addr",children:i})]}),(0,Me.jsx)("span",{className:"sf-review-arrow","aria-hidden":!0,children:(0,Me.jsx)(Mc,{size:16})}),(0,Me.jsxs)("div",{className:"sf-review-card sf-review-party",children:[(0,Me.jsx)("span",{className:"sf-review-party-label",children:"To"}),(0,Me.jsx)("span",{className:"sf-review-party-addr",children:n})]})]}),(0,Me.jsxs)("section",{className:"sf-review-card",children:[(0,Me.jsx)("h3",{className:"sf-review-section-title",children:"Summary"}),(0,Me.jsxs)("div",{className:"sf-review-row",children:[(0,Me.jsx)("span",{className:"sf-review-row-label",children:"Network"}),(0,Me.jsx)("span",{className:"sf-review-row-value",children:s})]}),W.map(L=>(0,Me.jsxs)("div",{className:"sf-review-row",children:[(0,Me.jsx)("span",{className:"sf-review-row-label",children:L.label}),(0,Me.jsx)("span",{className:"sf-review-row-value",children:L.value})]},L.label))]}),(0,Me.jsxs)("section",{className:"sf-review-card",children:[(0,Me.jsx)("h3",{className:"sf-review-section-title",children:"Total"}),(0,Me.jsxs)("div",{className:"sf-review-row",children:[(0,Me.jsx)("span",{className:"sf-review-row-label",children:"Total Amount"}),(0,Me.jsxs)("span",{className:"sf-review-row-value",children:[p," ",t.symbol]})]}),f&&(0,Me.jsxs)("div",{className:"sf-review-row",children:[(0,Me.jsx)("span",{className:"sf-review-row-label",children:"Max. Total Amount"}),(0,Me.jsx)("span",{className:"sf-review-row-value",children:M(E)})]})]}),g&&!m&&!y&&(0,Me.jsxs)("div",{className:"sf-message sf-message--error",role:"alert",children:["Not enough ",v||t.symbol," to cover the amount plus the network fee. Reduce the amount and try again."]}),(m||y)&&(0,Me.jsx)("div",{className:"sf-message sf-message--error",role:"alert",children:m||y})]})}var di=V(require("react"),1);var $t=require("react/jsx-runtime");function jc({flow:e}){let[t,r]=di.useState(""),n=t.trim().toLowerCase(),o=di.useMemo(()=>n?e.tokens.filter(a=>a.symbol.toLowerCase().includes(n)||a.name.toLowerCase().includes(n)):e.tokens,[e.tokens,n]);return(0,$t.jsxs)("div",{className:"sf-body sf-token-select",children:[(0,$t.jsxs)("div",{className:"sf-search",children:[(0,$t.jsx)(Tc,{size:20}),(0,$t.jsx)("input",{className:"sf-search-input",value:t,onChange:a=>r(a.target.value),placeholder:"Search Tokens",autoComplete:"off",spellCheck:!1,"aria-label":"Search tokens"})]}),(0,$t.jsxs)("div",{className:"sf-token-list",children:[o.map(a=>{let i=`${a.chainId}:${a.address.toLowerCase()}`,s=Zo(e.resolvedEnv,a.chainId),l=e.getTokenPriceUsd?.(a);return(0,$t.jsxs)("button",{type:"button",className:"sf-token-row",onClick:()=>e.selectToken(a),"data-track":"token_item","data-track-id":a.symbol,children:[(0,$t.jsxs)("span",{className:"sf-token-left",children:[(0,$t.jsxs)("span",{className:"sf-token-icon-wrap",children:[(0,$t.jsx)("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&&(0,$t.jsx)("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"}})]}),(0,$t.jsx)("span",{className:"sf-token-name",children:a.symbol})]}),(0,$t.jsxs)("span",{className:"sf-token-right",children:[(0,$t.jsx)("span",{className:"sf-token-balance",children:In(a.quantity.numeric,a.quantity.decimals)}),l!==void 0&&(0,$t.jsx)("span",{className:"sf-token-price",children:ai(l)})]})]},i)}),o.length===0&&(0,$t.jsx)("div",{className:"sf-empty",children:"No tokens found"})]})]})}he(`.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-system-orange-default, #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-system-orange-default, #f0640d)}.sf-address-field[data-filled]{border-color:var(--ds-system-orange-default, #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-system-orange-high, #e56f00)}.sf-tab[data-active]:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;border-radius:9999px;background:var(--ds-system-orange-high, #e56f00)}.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-system-orange-default, #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-system-orange-high, #e56f00)}.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
- `);var kt=require("react/jsx-runtime"),Eh={token:"Send",recipient:"Send",amount:"Send",review:"Sign Transaction",result:""};function Xo({onClose:e,onBackToWallet:t,onConfirmSuccess:r,onSuccess:n,className:o,...a}){let i=Wc.useCallback(p=>{n?.(p),r?.(p)},[r,n]),l=Rc({...a,onSuccess:n||r?i:void 0,onExit:t}),{step:d,status:c}=l,b=$r(l.recipient.trim()),m=Yn(l.amount,l.token.quantity.decimals),g="value"in m&&m.value<=l.balanceRaw,y=c==="submitting"||c==="confirming",w=d!=="result",f=Eh[d]??"";return(0,kt.jsx)(Ce,{feature:"send",children:(0,kt.jsxs)("div",{className:ze("sf-root",o),"data-step":d,children:[(0,kt.jsxs)("header",{className:"sf-header",children:[w?(0,kt.jsx)("button",{type:"button",className:"sf-header-btn",onClick:l.back,"aria-label":"Back","data-track":"back",children:(0,kt.jsx)(un,{size:24})}):(0,kt.jsx)("span",{className:"sf-header-btn","aria-hidden":!0}),(0,kt.jsx)("span",{className:"sf-header-title",children:f}),(0,kt.jsx)("button",{type:"button",className:"sf-header-btn",onClick:e,"aria-label":"Close","data-track":"close",children:(0,kt.jsx)(jr,{size:24})})]}),d==="token"&&(0,kt.jsx)(jc,{flow:l}),d==="recipient"&&(0,kt.jsx)(Bc,{flow:l}),d==="amount"&&(0,kt.jsx)(Sc,{flow:l}),d==="review"&&(0,kt.jsx)(Uc,{flow:l}),d==="result"&&(0,kt.jsx)(Fc,{flow:l}),(0,kt.jsxs)("footer",{className:"sf-footer","data-step":d,children:[d==="recipient"&&(0,kt.jsx)("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"&&(0,kt.jsx)("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"&&(0,kt.jsxs)("div",{className:"sf-footer-row",children:[(0,kt.jsx)("button",{type:"button",className:"sf-btn sf-btn--secondary",onClick:l.back,disabled:y,"data-track":"review_cancel",children:"Cancel"}),(0,kt.jsx)("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"&&c==="success"&&(0,kt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:()=>r?.(l.txHash||void 0),"data-track":"result_ok",children:"All done"}),d==="result"&&c==="error"&&(0,kt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.retry,"data-track":"result_retry",children:"Try Again"})]})]})})}var Gc=V(require("@radix-ui/react-popover"),1),_c=require("vaul");var Kn=require("react/jsx-runtime");function Hc({asChild:e,className:t,children:r}){let{isMobile:n,theme:o,walletAddress:a}=Nn(),i=r!=null,s=e??!0,l=i?r:(0,Kn.jsxs)("button",{type:"button",className:ze("wi-trigger-btn",t),"data-theme":o,"data-mobile":n||void 0,children:[(0,Kn.jsx)(Kd,{size:n?14:16}),(0,Kn.jsx)("span",{className:"wi-trigger-address",children:dr(a)})]});return n?(0,Kn.jsx)(_c.Drawer.Trigger,{asChild:s,children:l}):(0,Kn.jsx)(Gc.Trigger,{asChild:s,children:l})}var oe=V(require("react"),1),Gi=V(require("@radix-ui/react-popover"),1),ma=require("vaul");var Eo=V(require("bignumber.js"),1);var ci=V(require("bignumber.js"),1),Mh=/^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i;function mt(e){if(e==null)return null;if(e instanceof ci.default)return e.isFinite()?e:null;if(typeof e=="number")return Number.isFinite(e)?new ci.default(e):null;let t=String(e).replace(/[,%\s]/g,"");if(!Mh.test(t))return null;let r=new ci.default(t);return r.isFinite()?r:null}var Qc=require("@tanstack/react-query"),Vc=require("react");var pi="user-balance";async function Ah(e,t,r,n){let o=new URLSearchParams({networkId:`eip155:${t}`,account:r}),a=await fetch(`${e}/v1/public/token/balance?${o}`,{cache:"no-store",signal:n});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 mn(e,t,r=!0){let n=It[e],o=[n.cross,n.bsc],a=(0,Qc.useQueries)({queries:o.map(d=>({queryKey:[pi,e,t,d],queryFn:async({signal:c})=>Ah(await Oe("walletServer",e),d,t,c),enabled:!!t&&r,staleTime:0,refetchInterval:r?5e3:!1}))}),i=a.some(d=>d.isLoading),s=a.some(d=>d.isError);return{tokens:(0,Vc.useMemo)(()=>{let d=[];for(let c of a)c.data&&d.push(...c.data);return d},[a]),isLoading:i,isError:s}}var ui=require("@tanstack/react-query"),qc=require("react");var Lh="forge-holdings",Dh="forge-token-image";async function Ph(e,t,r){let n=await fetch(`${e}/v1/users/${t}/holdings`,{cache:"no-store",signal:r});if(!n.ok)throw new Error(`Failed to fetch forge holdings: ${n.status}`);let o=await n.json();if(!o.success)throw new Error("Forge holdings API error");return o.data.items}async function Oh(e,t,r){let n=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store",signal:r});if(!n.ok)return{address:t,image_url:""};let o=await n.json();return o.success?{address:t,image_url:o.data.token.image_url}:{address:t,image_url:""}}function Yc(e,t,r=!0){let{data:n,...o}=(0,ui.useQuery)({queryKey:[Lh,e,t],queryFn:async({signal:a})=>Ph(await Oe("bondingCurve",e),t,a),enabled:!!t&&r,staleTime:0,refetchInterval:r?5e3:!1});return{holdings:n??[],...o}}function Kc(e,t,r=!0){let n=(0,ui.useQueries)({queries:t.map(a=>({queryKey:[Dh,e,a],queryFn:async({signal:i})=>Oh(await Oe("bondingCurve",e),a,i),enabled:r,staleTime:1/0}))});return{imageMap:(0,qc.useMemo)(()=>{let a=new Map;for(let i of n)i.data&&a.set(i.data.address,i.data.image_url);return a},[n])}}var Zc=require("@tanstack/react-query"),Xc=require("react");var fi="token-stats";function Ir(e,t){return`${e}:${t.toLowerCase()}`}function gn(e,t=!0){let{data:r,...n}=(0,Zc.useQuery)({queryKey:[fi,e],queryFn:async({signal:a})=>{let i=await Oe("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:(0,Xc.useMemo)(()=>{let a=new Map;if(!r?.data)return a;for(let i of r.data){let s=Ir(i.chain_id,i.address);a.set(s,i)}return a},[r]),...n}}var Jc=require("@tanstack/react-query"),Bh="crossd-apr",$c=6e4,zh="https://crossd-dashboard-api.crossdefi.io/api/v1/overview",mi,Jo;function ol(){return mi&&mi.expiresAt>Date.now()?Promise.resolve(mi.value):Jo||(Jo=(async()=>{let e=await fetch(zh,{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 r=parseFloat(t.data.est_last_epoch_apy);if(!Number.isFinite(r))throw new Error("CROSSD overview returned a non-numeric APR");let n=r*100;return mi={value:n,expiresAt:Date.now()+$c},n})().finally(()=>{Jo=void 0}),Jo)}function gi(e){let t=Math.abs(e),r=(e>=0?Math.floor:Math.ceil)(t*100)/100;return`APR ${e>=0?"+":"-"}${r}%`}function ep(){let{data:e,...t}=(0,Jc.useQuery)({queryKey:[Bh],queryFn:ol,staleTime:$c});return{aprPercent:e??null,...t}}var tp=require("@tanstack/react-query"),al=require("react");var Fh="token-info";function $o(e,t){return`${t.toLowerCase()}_${e}`}function rp(e,t=!0){let{data:r,...n}=(0,tp.useQuery)({queryKey:[Fh,e],queryFn:async({signal:i})=>{let s=await Oe("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=(0,al.useMemo)(()=>{let i=new Map;if(!r?.data)return i;for(let s of r.data){let l=$o(s.chain_id,s.address);i.set(l,s.category)}return i},[r]),a=(0,al.useMemo)(()=>{let i=new Map;if(!r?.data)return i;for(let s of r.data)i.set($o(s.chain_id,s.address),s);return i},[r]);return{categoryMap:o,infoMap:a,...n}}var np=require("react"),op=V(require("bignumber.js"),1);function ap(e,t,r){let{tokens:n,isLoading:o}=mn(e,t,r),{statsMap:a}=gn(e,r);return(0,np.useMemo)(()=>{let i=new op.default(0);for(let c of n){let b=a.get(Ir(c.chainId,c.address));if(!b)continue;let m=mt(c.quantity.numeric),g=mt(b.price);if(!m||!g)continue;let y=m.shiftedBy(-c.quantity.decimals).multipliedBy(g);y.isNaN()||(i=i.plus(y))}let s=i.toFixed(),{displayValue:l,isLowerBound:d}=ac(s);return{totalUsd:s,displayValue:l,isLowerBound:d,isLoading:o}},[n,a,o])}var Ef=require("qrcode.react");function Qt(e,t,r,n){if(!n||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;e.preventDefault();let o;try{o=n(t,r)}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,c=b=>{if(b===null){d?.close();return}let m=b??t;if(d)try{d.location.href=m}catch{d.close(),a(m)}else a(m)};o.then(c,b=>{console.error("[dapp-ui] onOutlink rejected:",b),d?.close()});return}let s=o;if(s===null)return;a(s??t)}var eo=V(require("react"),1),Au=require("vaul");var Co=require("react");var wr=V(require("bignumber.js"),1),Uh=/^(\d{4}-\d{2}-\d{2})/;function ip(e){if(!e||e.length===0)return;let t=new Map,r;for(let{key:o,cumulative:a}of e.map(i=>({key:Uh.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),r=o;if(r===void 0)return;let n=new Date().toISOString().slice(0,10);return t.get(n)??t.get(r)}function sp(e){return e.poolType==="Unknown"}function hi(e){return e.length<=12?e:`${e.slice(0,6)}...${e.slice(-4)}`}function bi(e){return e.length<=13?e:`${e.slice(0,6)}...${e.slice(-4)}`}function ea(e,t){let r=e.length+t.length;if(r>32)return"xs";if(r>24)return"sm"}function il(e){return e?.toUpperCase()==="WONE"?"ONE":e}var jh=["Request Arguments:","Details:","Docs:","Version:","Contract Call:"];function ta(e,t){console.error("[wallet-portfolio] withdraw failed:",e);let n=e instanceof Error?e.message:"";for(let a of jh){let i=n.indexOf(a);i>=0&&(n=n.slice(0,i))}return n.split(`
8
- `).map(a=>a.trim()).find(a=>a.length>0)||t}var Wh="0xe00e8bf3";function lp(e,t){let r=typeof e=="bigint"?e:BigInt(e);if(r<0n)throw new Error("poolId must be non-negative");if(t<0n)throw new Error("amount must be non-negative");let n=r.toString(16).padStart(64,"0"),o=t.toString(16).padStart(64,"0");return`${Wh}${n}${o}`}function So(e){return!e||e<=0n?"0":new wr.default(e.toString()).shiftedBy(-9).toFormat(2,wr.default.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function wi(e){return!e||e<=0n?"0":new wr.default(e.toString()).toFormat(0,wr.default.ROUND_DOWN)}function yi(e){if(!e||e<=0n)return"0";let t=new wr.default(e.toString()).shiftedBy(-18),r=t.isLessThan(1e-4)?7:4;return t.toFormat(r,wr.default.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function tn(e,t){let r=new wr.default(e).shiftedBy(-t);return!r.isFinite()||r.isZero()?"0":r.isGreaterThanOrEqualTo(1)?r.toFormat(2,wr.default.ROUND_DOWN):r.toFormat(4,wr.default.ROUND_DOWN)}function sl(e){return tn(e,0)}var ra={rate:1,symbol:"$"};function Zn(e,t=ra){let r=Number.isFinite(t.rate)&&t.rate>0?t.rate:1;return`${t.symbol||"$"}${e.times(r).toFormat(2,wr.default.ROUND_DOWN)}`}function Mn(e,t,r,n=ra){let o=new wr.default(r||"0");if(!o.isFinite()||o.isLessThanOrEqualTo(0))return null;let a=new wr.default(e||"0").shiftedBy(-t).times(o);return a.isFinite()?Zn(a,n):null}var na=(0,Co.createContext)(null);function Pt(){let e=(0,Co.useContext)(na);if(!e)throw new Error("WalletPortfolio compound components must be used within <WalletPortfolio>");return e}function Er(){let{conversionRatio:e,currencySymbol:t}=Pt();return(0,Co.useMemo)(()=>({rate:typeof e=="number"&&e>0?e:ra.rate,symbol:t||ra.symbol}),[e,t])}var dp=require("vaul");var ll=require("react/jsx-runtime");function cp({asChild:e,children:t}){let{walletAddress:r}=Pt(),n=t!=null,o=e??!0,a=n?t:(0,ll.jsx)("button",{type:"button",children:dr(r)});return(0,ll.jsx)(dp.Drawer.Trigger,{asChild:o,children:a})}var la=require("vaul");var zt=V(require("react"),1),Eu=require("@tanstack/react-query");var xi=require("react"),dl=(0,xi.createContext)(null);function pp(){return(0,xi.useContext)(dl)}var Ot=require("react/jsx-runtime");function up({size:e=22,className:t}){return(0,Ot.jsx)("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ot.jsx)("path",{d:"M14 4L7 11L14 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function fp({size:e=22,className:t}){return(0,Ot.jsxs)("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Ot.jsx)("path",{d:"M18.333 3.667v5.5h-5.5",stroke:"currentColor",strokeWidth:1.833,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Ot.jsx)("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 mp({size:e=12,className:t}){return(0,Ot.jsx)("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ot.jsx)("path",{d:"M6 11A5 5 0 106 1a5 5 0 000 10zM6 8V6M6 4h.005",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})})}function vi({size:e=16,className:t}){return(0,Ot.jsxs)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Ot.jsx)("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"}),(0,Ot.jsx)("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 ki({size:e=16,className:t}){return(0,Ot.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ot.jsx)("path",{d:"M13.333 4L6 11.333 2.667 8",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function Ri({size:e=48,className:t}){return(0,Ot.jsxs)("svg",{width:e,height:e,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Ot.jsx)("circle",{cx:"24",cy:"24",r:"24",fill:"currentColor"}),(0,Ot.jsx)("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 yr({size:e=12,className:t}){return(0,Ot.jsxs)("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:[(0,Ot.jsx)("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"}),(0,Ot.jsx)("path",{d:"M7 1H11V5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Ot.jsx)("path",{d:"M11 1L6 6",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})]})}var gp=require("@tanstack/react-query"),cl=require("react");var Gh="wp:reward-pools";function No(e,t=!0){let{data:r,...n}=(0,gp.useQuery)({queryKey:[Gh,e],queryFn:async({signal:i})=>{let s=await Oe("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=(0,cl.useMemo)(()=>r?.data.pools.filter(i=>i.pool_type==="CrossPool")??[],[r]),a=(0,cl.useMemo)(()=>r?.data.pools.filter(i=>i.pool_type==="GamePool")??[],[r]);return{crossPools:o,gamePools:a,allPools:r?.data.pools??[],...n}}var hp=require("@tanstack/react-query"),bp=require("react");var _h="wp:user-deposits";function Si(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,hp.useQuery)({queryKey:[_h,e,t],queryFn:async({signal:s})=>{let l=await Oe("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 c=await d.json();if(c.code!==200)throw new Error(`Deposits API error: ${c.code}`);return c},enabled:n,staleTime:0});return{depositMap:(0,bp.useMemo)(()=>{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}}var Np=require("@tanstack/react-query"),Tp=require("react");var wp={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},yp={dev:"https://stg.onechain.nexus/points",stage:"https://stg.onechain.nexus/points",production:"https://www.onechain.nexus/points"};var xp={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"};var pl={dev:"https://dev-stake.ogfcorp.com",stage:"https://stg-stake.ogfcorp.com",production:"https://stake.ogfcorp.com"},vp={dev:`${pl.dev}/portfolio`,stage:`${pl.stage}/portfolio`,production:`${pl.production}/portfolio`};var kp={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},Mr={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"},Ci={dev:"https://stg-swap-api.crossdefi.io",stage:"https://stg-swap-api.crossdefi.io",production:"https://swap-api.crossdefi.io"},Rp={dev:"https://stg.crossdefi.io",stage:"https://stg.crossdefi.io",production:"https://www.crossdefi.io"},Sp={dev:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",stage:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",production:"0xEFd871aF7D695A0c1709e46b565761F4cd1Ef5ba"},Cp={dev:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",stage:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",production:"0x731a104a4461ae45bfef520468b43c262d35e682"};var Hh="wp:token-info",Qh="0x0000000000000000000000000000000000000001";function rn(e,t=!0){let r=It[e].cross,{data:n,...o}=(0,Np.useQuery)({queryKey:[Hh,e],queryFn:async({signal:c})=>{let b=await Oe("walletServer",e),m=await fetch(`${b}/v1/public/token/info`,{cache:"no-store",signal:c});if(!m.ok)throw new Error(`Failed to fetch token info: ${m.status}`);let g=await m.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}=(0,Tp.useMemo)(()=>{let c=new Map,b=new Map;if(!n?.data)return{byChainAddr:c,byChainSym:b};for(let m of n.data){let g=m.address.toLowerCase();c.set(`${m.chain_id}:${g}`,m),c.set(g,m);let y=m.symbol.replace(/^t/,"").toUpperCase(),w=`${m.chain_id}:${y}`;b.has(w)||b.set(w,m),b.has(y)||b.set(y,m)}return{byChainAddr:c,byChainSym:b}},[n]);return{getTokenImage:(c,b,m)=>{let g=c.toLowerCase(),y=!!m?.chainOnly,w=a.get(`${r}:${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(),p=i.get(`${r}:${f}`);if(p?.image)return p.image;if(!y){let x=i.get(f);if(x?.image)return x.image}}return""},getTokenSymbol:(c,b,m)=>{let g=c.toLowerCase();return(a.get(`${r}:${g}`)??(m?.chainOnly?void 0:a.get(g)))?.symbol||b},getNativeToken:()=>a.get(`${r}:${Qh}`),...o}}var ul=V(require("react"),1);var Xn=require("react/jsx-runtime");function Ar({sectionKey:e,title:t,icon:r,iconFit:n="cover",isEmpty:o,loading:a=!1,children:i}){let s=pp();return ul.useEffect(()=>{s?.report(e,{loading:a,empty:o})},[s,e,a,o]),ul.useEffect(()=>()=>s?.unregister(e),[s,e]),o?null:(0,Xn.jsxs)("div",{className:"wp-svc-card",children:[(0,Xn.jsxs)("div",{className:"wp-svc-card-head",children:[(0,Xn.jsx)("img",{className:"wp-svc-card-icon",src:r,alt:"",style:{objectFit:n}}),(0,Xn.jsx)("span",{className:"wp-svc-card-title",children:t})]}),(0,Xn.jsx)("div",{className:"wp-svc-items",children:i})]})}var Ni=V(require("bignumber.js"),1),We=require("react/jsx-runtime"),Vh="ONErewards";function qh(e){return new Ni.default(e||"0").isGreaterThan(0)}function Ip(){let{env:e,walletAddress:t,onOutlink:r}=Pt(),n=Er(),o=!!t,{allPools:a,isLoading:i}=No(e,o),{depositMap:s,isLoading:l}=Si(e,t,o),{getTokenImage:d}=rn(e,o),c=(g,y)=>`${wp[e]}/gametoken/tokens/${g.deposit_token.address}?mode=rewards${y==="withdraw"?"&trade=withdraw":""}`,b=`${Mr[e]}/reward.png`,m=a.filter(g=>{let y=s.get(g.pool_address.toLowerCase()),w=y?.deposited_amount??"0",f=y?.claimable_reward??"0";return!(new Ni.default(w).isZero()&&new Ni.default(f).isZero())});return(0,We.jsx)(Ar,{sectionKey:"rewards",title:Vh,icon:b,isEmpty:m.length===0,loading:i||l,children:m.map(g=>{let y=s.get(g.pool_address.toLowerCase()),w=y?.deposited_amount??"0",f=y?.claimable_reward??"0",p=c(g,"withdraw"),x=c(g,"claim"),h=d(g.deposit_token.address,g.deposit_token.symbol),v=g.reward_tokens[0],R=v?d(v.address,v.symbol):"",S=g.reward_tokens.map(L=>L.symbol),T=S.length>0?`${g.deposit_token.symbol}-${S.join("/")}`:g.deposit_token.symbol,C=v?tn(f,v.decimals):"0",N=v?.symbol??"Reward",E=Mn(w,g.deposit_token.decimals,g.deposit_token.price,n),M=v?Mn(f,v.decimals,v.price,n):null,W=!!y&&qh(f);return(0,We.jsxs)("article",{className:"wp-item","data-side":"reward",children:[(0,We.jsxs)("div",{className:"wp-item-body",children:[(0,We.jsxs)("div",{className:"wp-item-line",children:[(0,We.jsx)("span",{className:"wp-item-label",children:"Pool (Deposit - Earn)"}),(0,We.jsxs)("div",{className:"wp-svc-token",children:[(0,We.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[h&&(0,We.jsx)("img",{className:"wp-svc-token-icon",src:h,alt:""}),R&&(0,We.jsx)("img",{className:"wp-svc-token-icon",src:R,alt:""})]}),(0,We.jsx)("span",{children:T})]})]}),(0,We.jsxs)("div",{className:"wp-item-line",children:[(0,We.jsx)("span",{className:"wp-item-label",children:"Deposited"}),(0,We.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[h&&(0,We.jsx)("img",{className:"wp-svc-token-icon",src:h,alt:""}),(0,We.jsxs)("div",{className:"wp-svc-amount",children:[(0,We.jsx)("span",{className:"wp-svc-amount-main",children:tn(w,g.deposit_token.decimals)}),E&&(0,We.jsx)("span",{className:"wp-item-usd",children:E})]})]})]}),(0,We.jsxs)("div",{className:"wp-item-line",children:[(0,We.jsxs)("span",{className:"wp-item-label",children:["Claimable (",N,")"]}),(0,We.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[R&&(0,We.jsx)("img",{className:"wp-svc-token-icon",src:R,alt:""}),(0,We.jsxs)("div",{className:"wp-svc-amount",children:[(0,We.jsx)("span",{className:"wp-svc-amount-main",children:C}),M&&(0,We.jsx)("span",{className:"wp-item-usd",children:M})]})]})]})]}),(0,We.jsxs)("div",{className:"wp-item-tags",children:[(0,We.jsxs)("a",{className:"wp-tag wp-tag--muted",href:p,target:"_blank",rel:"noopener noreferrer","data-track":"rewards_withdraw_open",onClick:L=>Qt(L,p,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:g,userDeposit:y}},r),children:[(0,We.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,We.jsx)(yr,{size:12,className:"wp-tag-icon"})]}),(0,We.jsxs)("a",{className:"wp-tag wp-tag--mint","data-disabled":!W||void 0,"aria-disabled":!W||void 0,href:W?x:void 0,target:W?"_blank":void 0,rel:W?"noopener noreferrer":void 0,onClick:L=>{if(!W){L.preventDefault();return}Qt(L,x,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:g,userDeposit:y}},r)},children:[(0,We.jsx)("span",{className:"wp-tag-label",children:"Claim"}),(0,We.jsx)(yr,{size:12,className:"wp-tag-icon"})]})]})]},g.pool_address)})})}var Fp=V(require("react"),1);var Mp=require("@tanstack/react-query"),ia=require("react");var Yh="0x70a08231",Kh="0x18160ddd",Zh="0x313ce567",Xh=8e3;async function Jh(e,t,r,n){let o=new AbortController,a=setTimeout(()=>o.abort(),Xh);n&&n.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:r}),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 $h(e){return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function oa(e){if(!(!e||e==="0x"))try{return BigInt(e)}catch{return}}async function hn(e,t,r,n,o){try{return await Jh(e,"eth_call",[o?{from:o,to:t,data:r}:{to:t,data:r},"latest"],n)}catch{return}}async function eb(e,t,r,n){let[o,a,i]=await Promise.all([hn(e,r,Yh+$h(t),n),hn(e,r,Kh,n),hn(e,r,Zh,n)]),s=oa(o);if(s===void 0)return null;let l=oa(i);return{balance:s,totalSupply:oa(a),decimals:l!==void 0?Number(l):void 0}}async function aa(e,t){let r=It[e].cross,n=await Oe("walletServer",e),o=await fetch(`${n}/v1/public/chain/info/${r}`,{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 Ep(e,t,r,n){if(!t||r.length===0)return{};let o;try{o=await aa(e,n)}catch{o=void 0}if(!o)return{};let a=await Promise.all(r.map(async s=>[s.toLowerCase(),await eb(o,t,s,n)])),i={};for(let[s,l]of a)l&&(i[s]=l);return i}var tb="wp:withdraw-token-meta",rb="0xc89039c5",nb="0x95d89b41",ob="0x313ce567";function ab(e){if(!(!e||e==="0x"))try{let t=e.replace(/^0x/,""),r=Number(BigInt("0x"+t.slice(64,128)));if(!Number.isFinite(r)||r<=0||r>64)return;let n=t.slice(128,128+r*2),o="";for(let a=0;a<n.length;a+=2)o+=String.fromCharCode(parseInt(n.slice(a,a+2),16));return o||void 0}catch{return}}function ib(e){if(!e||e==="0x")return;let r="0x"+e.replace(/^0x/,"").padStart(64,"0").slice(24,64);return/^0x[a-f0-9]{40}$/.test(r)&&r!=="0x0000000000000000000000000000000000000000"?r:void 0}async function sb(e,t,r){if(t.length===0)return{};let n;try{n=await aa(e,r)}catch{n=void 0}if(!n)return{};let o=await Promise.all(t.map(async i=>{let s=ib(await hn(n,i,rb,r));if(!s)return[i.toLowerCase(),null];let[l,d]=await Promise.all([hn(n,s,nb,r),hn(n,s,ob,r)]),c=ab(l),b=oa(d);return c?[i.toLowerCase(),{tokenAddress:s,symbol:c,decimals:b!==void 0?Number(b):18}]:[i.toLowerCase(),null]})),a={};for(let[i,s]of o)s&&(a[i]=s);return a}function Ap(e,t,r=!0){let o=r&&!!t,{allPools:a,isLoading:i}=No(e,o),{deposits:s,isLoading:l}=Si(e,t,o),d=(0,ia.useMemo)(()=>{let f=new Map;for(let p of a)f.set(p.pool_address.toLowerCase(),p);return f},[a]),c=(0,ia.useMemo)(()=>s.filter(f=>{try{return BigInt(f.deposited_amount||"0")>0n}catch{return!1}}),[s]),b=(0,ia.useMemo)(()=>c.map(f=>f.pool_address.toLowerCase()).filter(f=>!d.has(f)).sort(),[c,d]),{data:m,isLoading:g}=(0,Mp.useQuery)({queryKey:[tb,e,b],queryFn:({signal:f})=>sb(e,b,f),enabled:o&&b.length>0,staleTime:1440*60*1e3});return{positions:(0,ia.useMemo)(()=>{let f=[];for(let p of c){let x=p.pool_address.toLowerCase(),h=d.get(x);if(h){f.push({poolId:p.pool_id,poolAddress:p.pool_address,poolType:h.pool_type,tokenSymbol:h.deposit_token.symbol,tokenAddress:h.deposit_token.address,decimals:h.deposit_token.decimals,price:h.deposit_token.price,depositedRaw:p.deposited_amount});continue}let v=m?.[x];v&&f.push({poolId:p.pool_id,poolAddress:p.pool_address,poolType:"Unknown",tokenSymbol:v.symbol,tokenAddress:v.tokenAddress,decimals:v.decimals,depositedRaw:p.deposited_amount})}return f},[c,d,m]),isLoading:i||l||g}}var er=V(require("react"),1);var J=require("react/jsx-runtime"),lb=400;function db(e,t,r){if(t==="loading")return"Estimating...";if(!e||t==="error"||t==="unavailable")return"Wallet estimate";let n=e.maxFeePerGas??e.gasPrice;return!n||n<=0n||e.gasLimit<=0n?"Wallet estimate":`${yi(e.gasLimit*n)} ${r??""}`.trim()}function fl(e,t,r){return r==="loading"?"Estimating...":r==="error"||r==="unavailable"?"-":`${e} ${t}`.trim()}function cb({position:e,size:t}){return e.icon?(0,J.jsx)("img",{src:e.icon,alt:"",width:t,height:t}):(0,J.jsx)("span",{children:e.tokenSymbol.slice(0,1)})}function Lp({open:e,status:t,positions:r,initialPoolAddress:n,walletAddress:o,txHash:a,error:i,copied:s=!1,estimateWithdraw:l,onClose:d,onConfirm:c,onCopyHash:b,trackFunnel:m,nativeSymbol:g}){let[y,w]=er.useState(null),[f,p]=er.useState("idle"),x=er.useRef(0),h=er.useRef(void 0),v=er.useRef(null);er.useEffect(()=>()=>clearTimeout(h.current),[]);let R=er.useMemo(()=>{let H=n?.toLowerCase();return r.find(A=>A.poolAddress.toLowerCase()===H)??r[0]??null},[r,n]),S=er.useMemo(()=>{try{return BigInt(R?.depositedRaw??"0")}catch{return 0n}},[R?.depositedRaw]),T=R?.decimals??18;er.useEffect(()=>{!e||!R||m?.("position_selected")},[e,R,m]);let C=er.useCallback(()=>{w(null),p(l?"idle":"unavailable"),x.current+=1,v.current=null},[]);if(er.useEffect(()=>{e&&C()},[e,C]),er.useEffect(()=>{if(!e||t!=="confirm"){clearTimeout(h.current);return}if(!l||!R){clearTimeout(h.current),p("unavailable");return}if(S<=0n){clearTimeout(h.current),x.current+=1,v.current=null,w(null),p("idle");return}let H=`${R.poolAddress.toLowerCase()}:${S.toString()}`;if(v.current===H)return;v.current=H,clearTimeout(h.current);let A=x.current+1;x.current=A,p("loading"),h.current=setTimeout(()=>{l(R,S).then(O=>{x.current===A&&(w(O??null),p(O?"ready":"unavailable"))}).catch(()=>{x.current===A&&(w(null),p("error"))})},lb)},[e,t,S,l,R]),!e||!R)return null;let N=t==="submitting",E=So(y?.maxPriorityFeePerGas),M=So(y?.maxFeePerGas??y?.gasPrice),W=wi(y?.gasLimit),L=tn(R.depositedRaw,T);return(0,J.jsx)("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:H=>{H.target===H.currentTarget&&!N&&d()},children:(0,J.jsxs)("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:[(0,J.jsx)("div",{className:"wp-claim-grabber","aria-hidden":!0,children:(0,J.jsx)("span",{})}),(0,J.jsxs)("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&a?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:(0,J.jsx)(Ri,{})}),(0,J.jsxs)("div",{className:"wp-claim-copy",children:[(0,J.jsx)("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),(0,J.jsx)("p",{className:"wp-claim-desc",children:"Your withdrawal request has been submitted. Balances will update shortly after the transaction settles."})]}),(0,J.jsx)("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:(0,J.jsxs)("div",{className:"wp-claim-list-item",children:[(0,J.jsx)("span",{children:"Tx Hash"}),(0,J.jsxs)("button",{type:"button",className:"wp-claim-hash",onClick:b,"aria-label":"Copy transaction hash","data-track":"withdraw_hash_copy",children:[(0,J.jsx)("strong",{children:bi(a)}),s?(0,J.jsx)(ki,{}):(0,J.jsx)(vi,{})]})]})})]}):(0,J.jsxs)(J.Fragment,{children:[t==="error"&&(0,J.jsxs)("div",{className:"wp-claim-heading",children:[(0,J.jsx)("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),(0,J.jsx)("p",{className:"wp-claim-error-message",children:i||"The withdraw request could not be completed."})]}),(0,J.jsxs)("div",{className:"wp-claim-reward-card","data-fit":ea(R.tokenSymbol,L),"aria-label":"Deposited balance",children:[(0,J.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,J.jsx)(cb,{position:R,size:28})}),(0,J.jsx)("strong",{className:"wp-claim-reward-symbol",children:R.tokenSymbol}),(0,J.jsx)("strong",{className:"wp-claim-reward-amount",children:L})]}),(0,J.jsxs)("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:[(0,J.jsxs)("div",{className:"wp-claim-account-row",children:[(0,J.jsxs)("div",{className:"wp-claim-account",children:[(0,J.jsx)("span",{className:"wp-claim-account-avatar","aria-hidden":!0}),(0,J.jsxs)("strong",{children:[R.tokenSymbol," Pool"]})]}),(0,J.jsx)("span",{children:hi(o)})]}),(0,J.jsx)("span",{className:"wp-claim-divider","aria-hidden":!0}),(0,J.jsxs)("div",{className:"wp-claim-detail-list",children:[(0,J.jsxs)("div",{className:"wp-claim-detail-row",children:[(0,J.jsx)("span",{children:"Est. Tx Fee"}),(0,J.jsx)("strong",{children:db(y,f,g)})]}),(0,J.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,J.jsx)("span",{children:"Priority Fee Per Gas"}),(0,J.jsx)("strong",{children:fl(E,"Gwei",f)})]}),(0,J.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,J.jsx)("span",{children:"Max Fee Per Gas"}),(0,J.jsx)("strong",{children:fl(M,"Gwei",f)})]}),(0,J.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,J.jsx)("span",{children:"Gas Limit"}),(0,J.jsx)("strong",{children:fl(W,"",f)})]})]})]})]}),(0,J.jsxs)("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&(0,J.jsx)("button",{type:"button",className:"wp-claim-secondary","data-track":"withdraw_cancel",onClick:d,children:t==="error"?"Close":"Cancel"}),(0,J.jsxs)("button",{type:"button",className:"wp-claim-primary","data-track":"withdraw_confirm",onClick:()=>{if(t==="success"){d();return}R&&S>0n&&c(R,S,y)},disabled:N||(t==="confirm"||t==="error")&&S<=0n,children:[t==="success"&&"Done",t==="submitting"&&(0,J.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}),t==="error"&&"Try Again",t==="confirm"&&"Withdraw Now"]})]})]}),(0,J.jsx)("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:(0,J.jsx)("span",{})})]})})}var Bt=V(require("react"),1),Bp=require("@tanstack/react-query");var Dp=require("@tanstack/react-query");var pb="wp:reward-factory-info";function Pp(e,t=!0){let{data:r,...n}=(0,Dp.useQuery)({queryKey:[pb,e],queryFn:async({signal:o})=>{let a=await Oe("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:r?.data??null,routerAddress:r?.data.router_address??"",...n}}var ub="wp:";function Op(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function zp(e){let{env:t,walletAddress:r,sendTransaction:n,estimateGas:o}=Pt(),a=!!r,i=!!n,s=(0,Bp.useQueryClient)(),{routerAddress:l}=Pp(t,a&&i),d=Op(l),[c,b]=Bt.useState(!1),[m,g]=Bt.useState(void 0),[y,w]=Bt.useState("confirm"),[f,p]=Bt.useState(),[x,h]=Bt.useState(""),[v,R]=Bt.useState(!1),S=Bt.useRef(void 0);Bt.useEffect(()=>()=>clearTimeout(S.current),[]);let T=Bt.useRef(new Set),C=Bt.useCallback((O,ce)=>{T.current.has(O)||(T.current.add(O),Ke("withdraw",O,{...ce,tags:{section:e,...ce?.tags}}))},[e]),N=Bt.useCallback((O,ce)=>d?{to:d,value:0n,data:lp(O,ce),chainId:It[t].cross}:null,[t,d]),E=Bt.useCallback(()=>{s.invalidateQueries({predicate:O=>typeof O.queryKey[0]=="string"&&O.queryKey[0].startsWith(ub)})},[s]),M=Bt.useCallback(O=>{g(O),b(!0),w("confirm"),p(void 0),h(""),R(!1),T.current=new Set,C("opened")},[C]),W=Bt.useCallback(()=>{y!=="submitting"&&(b(!1),g(void 0),w("confirm"),p(void 0),h(""),R(!1),y==="success"&&E())},[y,E]),L=Bt.useCallback(async(O,ce)=>{if(!o)return null;let X=N(O.poolId,ce),P=Op(r);return!X||!P?null:o({...X,from:P})},[N,o,r]),H=Bt.useCallback(async()=>{if(!(!f||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(f),R(!0),clearTimeout(S.current),S.current=setTimeout(()=>R(!1),1400)}catch{R(!1)}},[f]),A=Bt.useCallback(async(O,ce,X)=>{if(!n){w("error"),h("Withdraw is not available for this wallet.");return}if(!d){w("error"),h("Withdraw contract address is not available.");return}try{w("submitting"),h("");let P=N(O.poolId,ce);if(!P){w("error"),h("Withdraw contract address is not available.");return}C("submitted");let xe=await n({...P,gas:X?.gasLimit&&X.gasLimit>0n?X.gasLimit:void 0,maxFeePerGas:X?.maxFeePerGas&&X.maxFeePerGas>0n?X.maxFeePerGas:void 0,maxPriorityFeePerGas:X?.maxPriorityFeePerGas&&X.maxPriorityFeePerGas>0n?X.maxPriorityFeePerGas:void 0});p(xe),w("success"),C("confirmed"),E()}catch(P){w("error"),h(ta(P,"Failed to request withdraw.")),C("confirmed",{status:"failure",reason:gr(P)})}},[N,E,d,n,C]);return{canWithdrawInline:i,isOpen:c,initialPoolAddress:m,status:y,txHash:f,error:x,copied:v,hasEstimator:!!o,openWithdraw:M,closeWithdraw:W,estimateWithdraw:L,confirmWithdraw:A,copyHash:H,trackFunnelOnce:C}}var dt=require("react/jsx-runtime"),fb="ONEpoints";function Up(){let{env:e,walletAddress:t,onOutlink:r}=Pt(),n=Er(),o=!!t,{getTokenImage:a,getNativeToken:i}=rn(e,o),s=zp("points"),{positions:l,isLoading:d}=Ap(e,t,o),c=Fp.useMemo(()=>l.filter(sp).map(g=>({...g,icon:a(g.tokenAddress,g.tokenSymbol)})),[l,a]),b=`${Mr[e]}/point.png`,m=yp[e];return(0,dt.jsxs)(dt.Fragment,{children:[(0,dt.jsx)(Ar,{sectionKey:"points",title:fb,icon:b,isEmpty:c.length===0,loading:d,children:c.map(g=>{let y=g.price?Mn(g.depositedRaw,g.decimals,g.price,n):null;return(0,dt.jsxs)("article",{className:"wp-item","data-side":"reward",children:[(0,dt.jsxs)("div",{className:"wp-item-body",children:[(0,dt.jsxs)("div",{className:"wp-item-line",children:[(0,dt.jsx)("span",{className:"wp-item-label",children:"Token"}),(0,dt.jsxs)("div",{className:"wp-svc-token",children:[g.icon&&(0,dt.jsx)("img",{className:"wp-svc-token-icon",src:g.icon,alt:""}),(0,dt.jsx)("span",{children:g.tokenSymbol})]})]}),(0,dt.jsxs)("div",{className:"wp-item-line",children:[(0,dt.jsx)("span",{className:"wp-item-label",children:"Deposited"}),(0,dt.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[g.icon&&(0,dt.jsx)("img",{className:"wp-svc-token-icon",src:g.icon,alt:""}),(0,dt.jsxs)("div",{className:"wp-svc-amount",children:[(0,dt.jsx)("span",{className:"wp-svc-amount-main",children:tn(g.depositedRaw,g.decimals)}),y&&(0,dt.jsx)("span",{className:"wp-item-usd",children:y})]})]})]})]}),(0,dt.jsx)("div",{className:"wp-item-tags",children:s.canWithdrawInline?(0,dt.jsx)("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"points_withdraw_open",onClick:()=>s.openWithdraw(g.poolAddress),children:(0,dt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"})}):(0,dt.jsxs)("a",{className:"wp-tag wp-tag--muted",href:m,target:"_blank",rel:"noopener noreferrer","data-track":"points_withdraw_open",onClick:w=>Qt(w,m,{category:"portfolio",origin:"portfolio-points",payload:{position:g}},r),children:[(0,dt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,dt.jsx)(yr,{size:12,className:"wp-tag-icon"})]})})]},g.poolAddress)})}),(0,dt.jsx)(Lp,{open:s.isOpen,status:s.status,positions:c,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})]})}var gl=V(require("react"),1);var jp=require("@tanstack/react-query");var mb="wp:stake-info";function Wp(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,jp.useQuery)({queryKey:[mb,e,t],queryFn:async({signal:s})=>{let l=await Oe("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 c=await d.json();if(c.code!==0&&c.code!==200)throw new Error(`Stake info API error: ${c.code}`);return c},enabled:n,staleTime:0});return{stakeInfo:o?.data,...a}}var Gp=require("@tanstack/react-query");var gb="wp:stake-rewards",hb=31;function _p(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,Gp.useQuery)({queryKey:[gb,e,t],queryFn:async({signal:i})=>{let s=await Oe("posa",e),l=await fetch(`${s}/rewards/${t}?limit=${hb}`,{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:n,staleTime:0});return{latestReward:o?.[0]??null,aprAccrued:ip(o),...a}}var Hp=require("@tanstack/react-query"),bb="wp:staking-onchain";function Qp(e,t,r=!0){let n=r&&!!t&&!!e,{data:o,...a}=(0,Hp.useQuery)({queryKey:[bb,e],queryFn:async()=>{if(!t)throw new Error("stakingRewardsReader not provided");return t(e)},enabled:n,staleTime:0});return{onchain:o,...a}}var ml=require("react"),Yp=V(require("bignumber.js"),1);function Vp(e){return e?.trim().toUpperCase()==="ONE"}function qp(e){return new Yp.default(e||"0").isGreaterThan(0)}function Ti(e,t,r=!0){let{allPools:n}=No(e,r),o=(0,ml.useMemo)(()=>{for(let d of n)for(let c of[d.deposit_token,...d.reward_tokens])if(Vp(c?.symbol)&&qp(c.price))return c.price},[n]),a=r&&o===void 0,{tokens:i}=mn(e,t,a),{statsMap:s}=gn(e,a),l=It[e].cross;return(0,ml.useMemo)(()=>{if(o)return o;let d=i.find(c=>c.chainId===l&&Vp(c.symbol));if(d){let c=s.get(Ir(d.chainId,d.address));if(c&&qp(c.price))return c.price}return"0"},[o,i,s,l])}var bn=V(require("bignumber.js"),1),Et=require("react/jsx-runtime");function wb(e){if(!e)return"\u2014";let t=new bn.default(e);return t.isFinite()?`${t.toFormat(2,bn.default.ROUND_DOWN)}%`:"\u2014"}function Kp(){let{env:e,walletAddress:t,onOutlink:r,stakingRewardsReader:n}=Pt(),o=Er(),a=!!t,{stakeInfo:i,isLoading:s}=Wp(e,t,a),{latestReward:l,aprAccrued:d,isLoading:c}=_p(e,t,a),{onchain:b}=Qp(t,n,a),m=Ti(e,t,a),{getNativeToken:g}=rn(e,a),y=g()?.symbol,w="ONEstaking",f=`${Mr[e]}/cross-staking.png`,p=vp[e],x=i?.total_stake??"0",h=gl.useMemo(()=>b?new bn.default(b.earnedWei.toString()).shiftedBy(-18).toString(10):l?.cumulative_earned??i?.rewards_earned??"0",[b,l,i]),v=gl.useMemo(()=>b?new bn.default(b.stakedWei.toString()).shiftedBy(-18):new bn.default(x),[b,x]),R=d!==void 0?new bn.default(d):void 0,S=i?.days_since_first_stake,T=R!==void 0&&R.isFinite()&&v.isGreaterThan(0)&&S!==null&&S!==void 0?R.div(v).times(365).div(Math.max(1,S)).times(100):void 0,C=!(new bn.default(x).isZero()&&new bn.default(h).isZero()),N=Mn(x,0,m,o),E=Mn(h,0,m,o);return(0,Et.jsx)(Ar,{sectionKey:"staking",title:w,icon:f,iconFit:"contain",isEmpty:!C,loading:s||c,children:(0,Et.jsxs)("article",{className:"wp-item","data-side":"stake",children:[(0,Et.jsxs)("div",{className:"wp-item-body",children:[(0,Et.jsxs)("div",{className:"wp-item-line",children:[(0,Et.jsx)("span",{className:"wp-item-label",children:"Staked"}),(0,Et.jsxs)("div",{className:"wp-svc-amount",children:[(0,Et.jsx)("span",{className:"wp-svc-amount-main",children:`${sl(x)} ${y??""}`.trim()}),N&&(0,Et.jsx)("span",{className:"wp-item-usd",children:N})]})]}),(0,Et.jsxs)("div",{className:"wp-item-line",children:[(0,Et.jsx)("span",{className:"wp-item-label",children:"Rewards Earned"}),(0,Et.jsxs)("div",{className:"wp-svc-amount",children:[(0,Et.jsx)("span",{className:"wp-svc-amount-main",children:`${sl(h)} ${y??""}`.trim()}),E&&(0,Et.jsx)("span",{className:"wp-item-usd",children:E})]})]}),(0,Et.jsxs)("div",{className:"wp-item-line",children:[(0,Et.jsx)("span",{className:"wp-item-label",children:"My APR"}),(0,Et.jsx)("span",{children:wb(T?.toString(10))})]})]}),(0,Et.jsx)("div",{className:"wp-item-tags",children:(0,Et.jsxs)("a",{className:"wp-tag wp-tag--mint",href:p,target:"_blank",rel:"noopener noreferrer","data-track":"stake_outlink",onClick:M=>Qt(M,p,{category:"portfolio",origin:"portfolio-stake",payload:{stakeInfo:i}},r),children:[(0,Et.jsx)("span",{className:"wp-tag-label",children:"Manage"}),(0,Et.jsx)(yr,{size:12,className:"wp-tag-icon"})]})})]})})}var hl=V(require("react"),1);var Zp=require("@tanstack/react-query");var yb="wp:game-swap-pools";function Xp(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,Zp.useQuery)({queryKey:[yb,e,t],queryFn:async({signal:i})=>{let s=await Oe("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:n,staleTime:0});return{pools:o??[],...a}}var Jp=require("@tanstack/react-query");var xb="wp:game-swap-lp-balances";function $p(e,t,r,n){let o=[...r].map(l=>l.toLowerCase()).sort(),a=!!t&&o.length>0,{data:i,...s}=(0,Jp.useQuery)({queryKey:[xb,e,t,o,!!n],queryFn:async({signal:l})=>{let d=n?await n(o):await Ep(e,t,o,l),c={};for(let[b,m]of Object.entries(d))c[b.toLowerCase()]=m;return c},enabled:a,staleTime:0});return{balances:i??{},...s}}var nn=V(require("bignumber.js"),1),yt=require("react/jsx-runtime"),vb="Gametoken LP",tu=18,kb=new nn.default("0.0001");function eu(e){return e?.trim().toUpperCase()==="ONE"}function Rb(e){return e&&e>0?e:tu}function Sb(e){let t=eu(e.token_a?.symbol)&&!eu(e.token_b?.symbol),r=t?e.reserve_a:e.reserve_b,n=Rb(t?e.token_a?.decimals:e.token_b?.decimals),o=new nn.default(r||"0").shiftedBy(-n);return!o.isFinite()||o.isLessThanOrEqualTo(0)?new nn.default(0):o.times(2)}function Cb(e,t,r,n){let o=e.token_a?.symbol?.trim()||"TOKEN",a=e.token_b?.symbol?.trim()||n||"?",i=t?.decimals??tu,s,l;if(t&&t.totalSupply&&t.totalSupply>BigInt(0)){let d=new nn.default(t.balance.toString()),c=new nn.default(t.totalSupply.toString()),b=d.div(c);s=b.times(100);let m=b.times(Sb(e));if(m.isGreaterThan(0)){let g=new nn.default(e.quote_usd??e.cross_usd??"0");l=g.isGreaterThan(0)?Zn(m.times(g),r):`${m.toFormat(4,nn.default.ROUND_DOWN)} ${n??""}`.trim()}}return{pool:e,tokenASymbol:o,tokenBSymbol:a,info:t,lpAmountRaw:t?.balance.toString(),lpDecimals:i,sharePercent:s,valueText:l}}function ru(){let{env:e,walletAddress:t,onOutlink:r,lpBalanceReader:n}=Pt(),o=Er(),a=!!t,{pools:i,isLoading:s}=Xp(e,t,a),l=hl.useMemo(()=>i.map(p=>p.pair_address).filter(Boolean),[i]),{balances:d,isLoading:c}=$p(e,t,l,n),{getNativeToken:b}=rn(e,a),m=b()?.symbol,g=`${Mr[e]}/game-token.png`,y=Object.keys(d).length>0,w=hl.useMemo(()=>{let p=i.map(x=>Cb(x,d[x.pair_address?.toLowerCase()],o,m));return y?p.filter(x=>x.lpAmountRaw?new nn.default(x.lpAmountRaw).shiftedBy(-x.lpDecimals).isGreaterThanOrEqualTo(kb):!1):p},[i,d,y,o,m]),f=p=>{let x=p.token_a?.address??p.pair_address;return`${kp[e]}/gametoken/tokens/${x}?trade=deposit`};return(0,yt.jsx)(Ar,{sectionKey:"gameSwap",title:vb,icon:g,iconFit:"contain",isEmpty:w.length===0,loading:s||c,children:w.map(p=>{let{pool:x}=p,h=f(x),v=`${p.tokenASymbol} / ${p.tokenBSymbol}`,R=x.token_a?.logo_url,S=x.token_b?.logo_url;return(0,yt.jsxs)("article",{className:"wp-item","data-side":"game-swap",children:[(0,yt.jsxs)("div",{className:"wp-item-body",children:[(0,yt.jsxs)("div",{className:"wp-item-line",children:[(0,yt.jsx)("span",{className:"wp-item-label",children:"Pool"}),(0,yt.jsxs)("div",{className:"wp-svc-token",children:[(0,yt.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[R&&(0,yt.jsx)("img",{className:"wp-svc-token-icon",src:R,alt:""}),S&&(0,yt.jsx)("img",{className:"wp-svc-token-icon",src:S,alt:""})]}),(0,yt.jsx)("span",{children:v})]})]}),p.lpAmountRaw!==void 0&&(0,yt.jsxs)("div",{className:"wp-item-line",children:[(0,yt.jsx)("span",{className:"wp-item-label",children:"My LP"}),(0,yt.jsxs)("span",{children:[tn(p.lpAmountRaw,p.lpDecimals)," LP"]})]}),p.sharePercent!==void 0&&(0,yt.jsxs)("div",{className:"wp-item-line",children:[(0,yt.jsx)("span",{className:"wp-item-label",children:"Pool Share"}),(0,yt.jsxs)("span",{children:[p.sharePercent.toFormat(2,nn.default.ROUND_DOWN),"%"]})]}),p.valueText!==void 0&&(0,yt.jsxs)("div",{className:"wp-item-line",children:[(0,yt.jsx)("span",{className:"wp-item-label",children:"Value"}),(0,yt.jsx)("span",{children:p.valueText})]})]}),(0,yt.jsx)("div",{className:"wp-item-tags",children:(0,yt.jsxs)("a",{className:"wp-tag wp-tag--mint",href:h,target:"_blank",rel:"noopener noreferrer","data-track":"gameswap_outlink","data-track-id":v,onClick:T=>Qt(T,h,{category:"portfolio",origin:"portfolio-game-swap",payload:{pool:x}},r),children:[(0,yt.jsx)("span",{className:"wp-tag-label",children:"Manage"}),(0,yt.jsx)(yr,{size:12,className:"wp-tag-icon"})]})})]},x.pair_address)})})}var An=V(require("bignumber.js"),1),lu=require("react");var nu=require("@tanstack/react-query");var Nb="wp:forge-pools";function ou(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,nu.useQuery)({queryKey:[Nb,e,t],queryFn:async()=>{let s=await Oe("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:n,staleTime:0}),i=o??[];return{pools:i,isEmpty:i.length===0,...a}}var au=require("@tanstack/react-query"),iu=require("react");var Tb="wp:forge-token-detail";async function Ib(e,t){let r=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store"});return r.ok?(await r.json())?.data?.token??null:null}function su(e,t,r=!0){let n=(0,au.useQueries)({queries:t.map(i=>({queryKey:[Tb,e,i],queryFn:async()=>Ib(await Oe("bondingCurve",e),i),enabled:r&&!!i,staleTime:3e4}))}),o=(0,iu.useMemo)(()=>{let i=new Map;for(let s=0;s<n.length;s++){let l=n[s]?.data,d=t[s];l&&d&&i.set(d.toLowerCase(),l)}return i},[n,t]),a=n.some(i=>i.isLoading);return{detailMap:o,isLoading:a}}var Rt=require("react/jsx-runtime"),Eb="ONEforge",du=18,Mb="https://contents.crosstoken.io/wallet/token/images/FT.png";function Ab(e){if(!e||e==="0")return"0";let t=new An.default(e).shiftedBy(-du);return t.isZero()?"0":t.isGreaterThanOrEqualTo(1)?t.toFormat(2,An.default.ROUND_DOWN):t.toFormat(4,An.default.ROUND_DOWN)}function Lb(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 Db(e,t,r,n){let o=new An.default(r||"0");if(!o.isGreaterThan(0))return null;let a=new An.default(e.total_supply||"0"),i=new An.default(e.lp_balance||"0"),s=new An.default(t?.reserve_b||"0").shiftedBy(-du);if(!a.isGreaterThan(0)||!i.isGreaterThan(0)||!s.isGreaterThan(0))return null;let l=s.times(2),c=i.div(a).times(l).times(o);return c.isFinite()?Zn(c,n):null}function cu(){let{env:e,walletAddress:t,onOutlink:r}=Pt(),n=Er(),o=!!t,{pools:a,isEmpty:i,isLoading:s}=ou(e,t,o),l=(0,lu.useMemo)(()=>a.map(g=>g.token.address),[a]),{detailMap:d}=su(e,l,o&&l.length>0),c=Ti(e,t,o),b=g=>`${xp[e]}/forge/token/${g.token.address}`,m=`${Mr[e]}/forge.png`;return(0,Rt.jsx)(Ar,{sectionKey:"forge",title:Eb,icon:m,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||Mb,f=y?.symbol||g.token.symbol,p=b(g),x=Db(g,y,c,n);return(0,Rt.jsxs)("a",{className:"wp-item","data-side":"lp",href:p,target:"_blank",rel:"noopener noreferrer","data-track":"forge_outlink","data-track-id":f,onClick:h=>Qt(h,p,{category:"portfolio",origin:"portfolio-forge",payload:{pool:g,tokenDetail:y}},r),children:[(0,Rt.jsxs)("div",{className:"wp-item-body",children:[(0,Rt.jsxs)("div",{className:"wp-item-line",children:[(0,Rt.jsx)("span",{className:"wp-item-label",children:"Asset"}),(0,Rt.jsxs)("div",{className:"wp-svc-token",children:[(0,Rt.jsx)("img",{className:"wp-svc-token-icon",src:w,alt:""}),(0,Rt.jsx)("span",{children:f}),y?.name&&(0,Rt.jsx)("span",{className:"wp-token-subtle",children:y.name})]})]}),(0,Rt.jsxs)("div",{className:"wp-item-line",children:[(0,Rt.jsx)("span",{className:"wp-item-label",children:"LP Balance"}),(0,Rt.jsx)("div",{className:"wp-svc-token wp-svc-token--amount",children:(0,Rt.jsxs)("div",{className:"wp-svc-amount",children:[(0,Rt.jsx)("span",{className:"wp-svc-amount-main",children:Ab(g.lp_balance)}),x&&(0,Rt.jsx)("span",{className:"wp-item-usd",children:x})]})})]}),(0,Rt.jsxs)("div",{className:"wp-item-line",children:[(0,Rt.jsx)("span",{className:"wp-item-label",children:"Ownership"}),(0,Rt.jsx)("span",{className:"wp-line-value",children:Lb(g.pool_ownership)})]})]}),(0,Rt.jsx)("div",{className:"wp-item-tags",children:(0,Rt.jsxs)("span",{className:"wp-tag wp-tag--muted",children:[(0,Rt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,Rt.jsx)(yr,{size:12,className:"wp-tag-icon"})]})})]},g.pair_address)})})}var xl=require("react"),Tu=V(require("bignumber.js"),1);var pu=require("@tanstack/react-query");var Pb="wp:crossd-positions";function Ob(e){let t=e??{};return(t.positions??t.data?.positions??[]).filter(n=>{if(!n?.token_id||!n.liquidity)return!1;try{return BigInt(n.liquidity)>0n}catch{return!1}})}function uu(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,pu.useQuery)({queryKey:[Pb,e,t],queryFn:async()=>{let s=await fetch(`${Ci[e]}/api/v1/positions?owner=${t}`,{cache:"no-store"});if(!s.ok)throw new Error(`crossd positions fetch failed: ${s.status}`);return Ob(await s.json())},enabled:n,staleTime:0}),i=o??[];return{positions:i,isEmpty:i.length===0,...a}}var fu=require("@tanstack/react-query"),mu=require("react");var Bb="wp:crossd-position-details";function zb(e){let t=e??{},r=t.data??t;return r?.token_id||r?.pool?r:null}function gu(e,t,r=!0){let n=(0,fu.useQueries)({queries:t.map(a=>({queryKey:[Bb,e,a],queryFn:async()=>{let i=await fetch(`${Ci[e]}/api/v1/positions/${a}`,{cache:"no-store"});if(!i.ok)throw new Error(`crossd position detail failed: ${i.status}`);return zb(await i.json())},enabled:r&&!!a,staleTime:6e4}))});return{detailMap:(0,mu.useMemo)(()=>{let a=new Map;return n.forEach((i,s)=>{let l=i.data,d=t[s];l&&d&&a.set(d,l)}),a},[n,t])}}var wn=V(require("react"),1);var ee=require("react/jsx-runtime"),Fb=300*1e3,hu="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function Ub(e,t,r){if(t)return"Estimating...";if(!e)return"Wallet estimate";let n=e.maxFeePerGas??e.gasPrice;return!n||n<=0n||e.gasLimit<=0n?"Wallet estimate":`${yi(e.gasLimit*n)} ${r??""}`.trim()}function bl(e,t,r){return r?"Estimating...":`${e} ${t}`.trim()}function bu({open:e,status:t,target:r,token0Icon:n,token1Icon:o,token0Symbol:a,token1Symbol:i,nativeSymbol:s,txHash:l,error:d,copied:c=!1,hasEstimator:b,prepareWithdraw:m,confirmWithdraw:g,onClose:y,onCopyHash:w,trackFunnel:f}){let[p,x]=wn.useState(null),[h,v]=wn.useState(null),R=wn.useRef(0);wn.useEffect(()=>{if(!e||!r)return;let Z=++R.current;x(null),v(null),f?.("dialog_opened"),m().then(be=>{R.current===Z&&(x(be),v(be?Date.now():null))})},[e,r]);let S=t==="submitting",T=t==="estimating"||t==="confirm"&&!p,C=wn.useCallback(async()=>{let Z=p,be=!h||Date.now()-h>Fb;if(!Z||be){let Ne=++R.current;if(Z=await m(),R.current!==Ne)return;x(Z),v(Z?Date.now():null)}Z&&await g(Z)},[p,h,m,g]);if(!e||!r)return null;let{position:N,detail:E}=r,M=E.pool?.token0,W=E.pool?.token1,L=a||M?.symbol||N.pool?.token0_symbol||"?",H=i||W?.symbol||N.pool?.token1_symbol||"?",A=M?.decimals??18,O=W?.decimals??18,ce=n||M?.logo_url||hu,X=o||W?.logo_url||hu,P=`${L}/${H}`,xe=p?Ro(p.expectedAmount0.toString(),A):null,ne=p?Ro(p.expectedAmount1.toString(),O):null,K=So(p?.estimate?.maxPriorityFeePerGas),U=So(p?.estimate?.maxFeePerGas??p?.estimate?.gasPrice),te=wi(p?.estimate?.gasLimit);return(0,ee.jsx)("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:Z=>{Z.target===Z.currentTarget&&!S&&y()},children:(0,ee.jsxs)("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:[(0,ee.jsx)("div",{className:"wp-claim-grabber","aria-hidden":!0,children:(0,ee.jsx)("span",{})}),(0,ee.jsxs)("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&l?(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:(0,ee.jsx)(Ri,{})}),(0,ee.jsxs)("div",{className:"wp-claim-copy",children:[(0,ee.jsx)("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),(0,ee.jsxs)("p",{className:"wp-claim-desc",children:["Your ",P," position withdrawal has been submitted. Balances will update shortly after the transaction settles."]})]}),(0,ee.jsx)("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:(0,ee.jsxs)("div",{className:"wp-claim-list-item",children:[(0,ee.jsx)("span",{children:"Tx Hash"}),(0,ee.jsxs)("button",{type:"button",className:"wp-claim-hash",onClick:w,"aria-label":"Copy transaction hash","data-track":"crossd_withdraw_hash_copy",children:[(0,ee.jsx)("strong",{children:bi(l)}),c?(0,ee.jsx)(ki,{}):(0,ee.jsx)(vi,{})]})]})})]}):(0,ee.jsxs)(ee.Fragment,{children:[t==="error"&&(0,ee.jsxs)("div",{className:"wp-claim-heading",children:[(0,ee.jsx)("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),(0,ee.jsx)("p",{className:"wp-claim-error-message",children:d||"The withdraw request could not be completed."})]}),(0,ee.jsxs)("div",{className:"wp-claim-reward-card","data-fit":ea(L,xe??""),"aria-label":`Expected ${L}`,children:[(0,ee.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,ee.jsx)("img",{src:ce,alt:"",width:28,height:28})}),(0,ee.jsx)("strong",{className:"wp-claim-reward-symbol",children:L}),(0,ee.jsx)("strong",{className:"wp-claim-reward-amount",children:xe??"Estimating..."})]}),(0,ee.jsxs)("div",{className:"wp-claim-reward-card","data-fit":ea(H,ne??""),"aria-label":`Expected ${H}`,children:[(0,ee.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,ee.jsx)("img",{src:X,alt:"",width:28,height:28})}),(0,ee.jsx)("strong",{className:"wp-claim-reward-symbol",children:H}),(0,ee.jsx)("strong",{className:"wp-claim-reward-amount",children:ne??"Estimating..."})]}),b&&(0,ee.jsx)("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:(0,ee.jsxs)("div",{className:"wp-claim-detail-list",children:[(0,ee.jsxs)("div",{className:"wp-claim-detail-row",children:[(0,ee.jsx)("span",{children:"Est. Tx Fee"}),(0,ee.jsx)("strong",{children:Ub(p?.estimate,T,s)})]}),(0,ee.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ee.jsx)("span",{children:"Priority Fee Per Gas"}),(0,ee.jsx)("strong",{children:bl(K,"Gwei",T)})]}),(0,ee.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ee.jsx)("span",{children:"Max Fee Per Gas"}),(0,ee.jsx)("strong",{children:bl(U,"Gwei",T)})]}),(0,ee.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ee.jsx)("span",{children:"Gas Limit"}),(0,ee.jsx)("strong",{children:bl(te,"",T)})]})]})})]}),(0,ee.jsxs)("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&(0,ee.jsx)("button",{type:"button",className:"wp-claim-secondary","data-track":"crossd_withdraw_cancel",onClick:y,children:t==="error"?"Close":"Cancel"}),(0,ee.jsx)("button",{type:"button",className:"wp-claim-primary","data-track":"crossd_withdraw_confirm",onClick:()=>{if(t==="success"){y();return}S||T||(f?.("confirm_clicked"),C())},disabled:S||T,children:t==="success"?"Done":S?(0,ee.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}):T?(0,ee.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Estimating"}):t==="error"?"Retry":"Withdraw"})]})]}),(0,ee.jsx)("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:(0,ee.jsx)("span",{})})]})})}var Nt=V(require("react"),1),Su=require("@tanstack/react-query");var jb="0x0c49ccbe",Wb="0xfc6f7865",Gb="0x49404b7c",_b="0xdf2ab5bb",Hb="0xac9650d8",wu=(1n<<128n)-1n,xu=600n,Qb=99n,Vb=100n;function wl(e){return e*Qb/Vb}function yu(e,t){return!!e&&!!t&&e.toLowerCase()===t.toLowerCase()}function hr(e,t){if(e<0n)throw new Error(`${t} must be non-negative`);let r=e.toString(16);if(r.length>64)throw new Error(`${t} exceeds uint256`);return r.padStart(64,"0")}function Ii(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 yl(e){return jb+hr(e.tokenId,"tokenId")+hr(e.liquidity,"liquidity")+hr(e.amount0Min,"amount0Min")+hr(e.amount1Min,"amount1Min")+hr(e.deadline,"deadline")}function qb(e){return Wb+hr(e.tokenId,"tokenId")+Ii(e.recipient,"recipient")+hr(e.amount0Max,"amount0Max")+hr(e.amount1Max,"amount1Max")}function Yb(e,t){return Gb+hr(e,"amountMinimum")+Ii(t,"recipient")}function Kb(e,t,r){return _b+Ii(e,"token")+hr(t,"amountMinimum")+Ii(r,"recipient")}function Zb(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 hr(BigInt(a.length/2),"callLength")+i.toLowerCase()}),r=BigInt(e.length)*32n,n=[];for(let o of t)n.push(hr(r,"callOffset")),r+=BigInt(o.length/2);return Hb+hr(0x20n,"arrayOffset")+hr(BigInt(e.length),"arrayLength")+n.join("")+t.join("")}function vu(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 ku(e){let t=yu(e.token0,e.wcrossAddress),r=yu(e.token1,e.wcrossAddress),n=t||r,o=[yl({tokenId:e.tokenId,liquidity:e.liquidity,amount0Min:e.amount0Min,amount1Min:e.amount1Min,deadline:e.deadline}),qb({tokenId:e.tokenId,recipient:n?e.positionManagerAddress:e.owner,amount0Max:wu,amount1Max:wu})];return n&&(o.push(Yb(0n,e.owner)),o.push(Kb(t?e.token1:e.token0,0n,e.owner))),Zb(o)}async function Ru(e,t,r){let n;try{n=await aa(e,r)}catch{n=void 0}if(!n)return null;let o=yl({tokenId:t.tokenId,liquidity:t.liquidity,amount0Min:0n,amount1Min:0n,deadline:t.deadline}),a=await hn(n,t.positionManager,o,r,t.owner);return vu(a)}var Xb="wp:",Jb=[1500,3e3,4500,6e3];function $b(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function Cu(){let{env:e,walletAddress:t,sendTransaction:r,estimateGas:n}=Pt(),o=!!r,a=(0,Su.useQueryClient)(),[i,s]=Nt.useState(!1),[l,d]=Nt.useState(null),[c,b]=Nt.useState("confirm"),[m,g]=Nt.useState(),[y,w]=Nt.useState(""),[f,p]=Nt.useState(!1),[x,h]=Nt.useState(new Set),v=Nt.useRef(void 0),R=Nt.useRef([]),S=Nt.useRef(0);Nt.useEffect(()=>()=>{clearTimeout(v.current),R.current.forEach(clearTimeout)},[]);let T=Nt.useRef(new Set),C=Nt.useCallback((A,O)=>{T.current.has(A)||(T.current.add(A),Ke("withdraw",A,{...O,tags:{section:"crossdPool",...O?.tags}}))},[]),N=Nt.useCallback(()=>{let A=()=>a.invalidateQueries({predicate:O=>typeof O.queryKey[0]=="string"&&O.queryKey[0].startsWith(Xb)});A(),R.current.forEach(clearTimeout),R.current=Jb.map(O=>setTimeout(A,O))},[a]),E=Nt.useCallback(A=>{S.current+=1,d(A),s(!0),b("confirm"),g(void 0),w(""),p(!1),T.current=new Set,C("opened")},[C]),M=Nt.useCallback(()=>{c!=="submitting"&&(S.current+=1,s(!1),d(null),b("confirm"),g(void 0),w(""),p(!1))},[c]),W=Nt.useCallback(async()=>{let A=S.current,O=$b(t),ce=l?.position.token_id,X=l?.position.liquidity,P=l?.detail.pool?.token0?.address,xe=l?.detail.pool?.token1?.address;if(!O||!ce||!X||!P||!xe)return b("error"),w("Position data is incomplete. Please refresh and retry."),null;try{b("estimating"),w("");let ne=BigInt(ce),K=BigInt(X),U=BigInt(Math.floor(Date.now()/1e3))+xu,te=Sp[e],Z=await Ru(e,{owner:O,positionManager:te,tokenId:ne,liquidity:K,deadline:U});if(S.current!==A)return null;if(!Z)return b("error"),w("Failed to estimate withdrawal amounts. Please retry."),null;let be=ku({tokenId:ne,liquidity:K,amount0Min:wl(Z.amount0),amount1Min:wl(Z.amount1),deadline:U,owner:O,positionManagerAddress:te,token0:P,token1:xe,wcrossAddress:Cp[e]}),Ne={to:te,value:0n,data:be,chainId:It[e].cross},re=null;if(n){try{re=await n({...Ne,from:O})}catch{re=null}if(S.current!==A)return null}return b("confirm"),{tx:Ne,estimate:re,expectedAmount0:Z.amount0,expectedAmount1:Z.amount1}}catch(ne){return S.current!==A||(b("error"),w(ta(ne,"Failed to prepare withdraw."))),null}},[e,n,l,t]),L=Nt.useCallback(async A=>{if(!r){b("error"),w("Withdraw is not available for this wallet.");return}try{b("submitting"),w(""),C("submitted");let O=await r({...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(O),b("success");let ce=l?.position.token_id;ce&&h(X=>{let P=new Set(X);return P.add(ce),P}),C("confirmed"),N()}catch(O){b("error"),w(ta(O,"Failed to request withdraw.")),C("confirmed",{status:"failure",reason:gr(O)})}},[N,r,l,C]),H=Nt.useCallback(async()=>{if(!(!m||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(m),p(!0),clearTimeout(v.current),v.current=setTimeout(()=>p(!1),1400)}catch{p(!1)}},[m]);return{canWithdrawInline:o,isOpen:i,target:l,withdrawnTokenIds:x,status:c,txHash:m,error:y,copied:f,hasEstimator:!!n,openWithdraw:E,closeWithdraw:M,prepareWithdraw:W,confirmWithdraw:L,copyHash:H,trackFunnelOnce:C}}var gt=require("react/jsx-runtime"),e0="ONEusd Pool",Nu="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function Iu(){let{env:e,walletAddress:t,onOutlink:r}=Pt(),n=Er(),o=!!t,{positions:a,isLoading:i}=uu(e,t,o),s=Cu(),l=(0,xl.useMemo)(()=>a.filter(C=>!C.token_id||!s.withdrawnTokenIds.has(C.token_id)),[a,s.withdrawnTokenIds]),d=(0,xl.useMemo)(()=>l.map(C=>C.token_id).filter(C=>!!C),[l]),{detailMap:c}=gu(e,d,o&&d.length>0),b=`${Rp[e]}/pool`,{getTokenImage:m,getTokenSymbol:g,getNativeToken:y}=rn(e,o),w=m("","ONEUSD",{chainOnly:!0})||`${Mr[e]}/crossd.png`,f={chainOnly:!0},p=(C,N)=>{let E=il(g(C?.address??"",C?.symbol??N,f));return E==="ONE"?y()?.symbol??"?":E??"?"},x=(C,N)=>{let E=C?.symbol??N,M=il(E);return M==="ONE"?y()?.image||Nu:m(C?.address??"",M,f)||C?.logo_url||Nu},h=s.target?.detail.pool,v=x(h?.token0,s.target?.position.pool?.token0_symbol),R=x(h?.token1,s.target?.position.pool?.token1_symbol),S=p(h?.token0,s.target?.position.pool?.token0_symbol),T=p(h?.token1,s.target?.position.pool?.token1_symbol);return(0,gt.jsxs)(gt.Fragment,{children:[(0,gt.jsx)(Ar,{sectionKey:"crossdPool",title:e0,icon:w,iconFit:"contain",isEmpty:l.length===0,loading:i,children:l.map(C=>{let N=C.token_id?c.get(C.token_id):void 0,E=`${p(N?.pool?.token0,C.pool?.token0_symbol)}/${p(N?.pool?.token1,C.pool?.token1_symbol)}`,M=C.pool?.fee_tier_percentage,W=x(N?.pool?.token0,C.pool?.token0_symbol),L=x(N?.pool?.token1,C.pool?.token1_symbol),H=Zn(new Tu.default(C.position_value_usd??"0"),n),A=s.canWithdrawInline&&!!N?.pool?.token0?.address&&!!N?.pool?.token1?.address;return(0,gt.jsxs)("article",{className:"wp-item","data-side":"crossd",children:[(0,gt.jsxs)("div",{className:"wp-item-body",children:[(0,gt.jsxs)("div",{className:"wp-item-line",children:[(0,gt.jsx)("span",{className:"wp-item-label",children:"Pool"}),(0,gt.jsxs)("div",{className:"wp-svc-token",children:[(0,gt.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[(0,gt.jsx)("img",{className:"wp-svc-token-icon",src:W,alt:""}),(0,gt.jsx)("img",{className:"wp-svc-token-icon",src:L,alt:""})]}),(0,gt.jsx)("span",{children:E}),M&&(0,gt.jsx)("span",{className:"wp-token-subtle",children:M})]})]}),(0,gt.jsxs)("div",{className:"wp-item-line",children:[(0,gt.jsx)("span",{className:"wp-item-label",children:"Position Value"}),(0,gt.jsx)("span",{className:"wp-line-value",children:H})]})]}),(0,gt.jsx)("div",{className:"wp-item-tags",children:A?(0,gt.jsx)("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:(0,gt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"})}):(0,gt.jsxs)("a",{className:"wp-tag wp-tag--muted",href:b,target:"_blank",rel:"noopener noreferrer","data-track":"crossd_pool_outlink","data-track-id":E,onClick:O=>Qt(O,b,{category:"portfolio",origin:"portfolio-crossd-pool",payload:{position:C,detail:N}},r),children:[(0,gt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,gt.jsx)(yr,{size:12,className:"wp-tag-icon"})]})})]},C.token_id)})}),(0,gt.jsx)(bu,{open:s.isOpen,status:s.status,target:s.target,token0Icon:v,token1Icon:R,token0Symbol:S,token1Symbol:T,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 sa=["rewards","points","staking","gameSwap","forge","crossdPool"];he(`.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-system-orange-default, #f0640d);--wp-green: var(--ds-accent-primary-default, #00a0a2);--wp-accent-soft: var(--ds-system-orange-lowest, #2e2820);--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-system-orange-default, #f0640d);--wp-green: var(--ds-accent-primary-default, #00a0a2);--wp-accent-soft: var(--ds-system-orange-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-svc-items,.wp-claim-content{padding:18px 14px}.wp-item-line{gap:10px}.wp-svc-token>span{max-width:168px}}.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
- `);var ke=require("react/jsx-runtime"),vl=15,t0="wp:";function Jn({env:e,theme:t="light",walletAddress:r,walletName:n,onBack:o,showHeader:a=!0,variant:i="embed",className:s,onOutlink:l,lpBalanceReader:d,stakingRewardsReader:c,sendTransaction:b,estimateGas:m,conversionRatio:g,currencySymbol:y,sections:w}){let f=at(e),p=zt.useCallback(re=>!w||w.includes(re),[w]),x=!!r,h=(0,Eu.useQueryClient)(),[v,R]=zt.useState({}),S=zt.useCallback((re,we)=>{R(Fe=>{let Ae=Fe[re];return Ae&&Ae.loading===we.loading&&Ae.empty===we.empty?Fe:{...Fe,[re]:we}})},[]),T=zt.useCallback(re=>{R(we=>{if(!(re in we))return we;let Fe={...we};return delete Fe[re],Fe})},[]),C=zt.useMemo(()=>({report:S,unregister:T}),[S,T]),[N,E]=zt.useState(vl),[M,W]=zt.useState(!1),[L,H]=zt.useState(!1),A=zt.useRef(void 0),O=zt.useCallback(()=>{h.invalidateQueries({predicate:re=>typeof re.queryKey[0]=="string"&&re.queryKey[0].startsWith(t0)})},[h]),ce=zt.useCallback(()=>{O(),W(!0),setTimeout(()=>W(!1),600),E(vl)},[O]);zt.useEffect(()=>{if(!x)return;let re=setInterval(()=>{E(we=>we<=1?(ce(),vl):we-1)},1e3);return()=>clearInterval(re)},[x,ce]);let X=zt.useCallback(()=>{o?.()},[o]),P=x?fn(f,r,{size:64}):void 0,xe=zt.useCallback(async()=>{if(!(L||!r))try{await navigator.clipboard.writeText(r),H(!0),clearTimeout(A.current),A.current=setTimeout(()=>H(!1),2e3)}catch{}},[r,L]);zt.useEffect(()=>()=>clearTimeout(A.current),[]);let ne=zt.useMemo(()=>({env:f,theme:t,open:!0,walletAddress:r,close:X,onOutlink:l,lpBalanceReader:d,stakingRewardsReader:c,sendTransaction:b,estimateGas:m,conversionRatio:g,currencySymbol:y}),[f,t,r,X,l,d,c,b,m,g,y]),K=sa.filter(p),U=K.length>0&&K.every(re=>{let we=v[re];return!!we&&!we.loading}),te=U&&K.every(re=>v[re]?.empty),Z=K.some(re=>{let we=v[re];return!!we&&!we.empty}),be=K.length>0&&!U&&!Z,Ne=(0,ke.jsxs)(ke.Fragment,{children:[a&&(0,ke.jsxs)("div",{className:"wp-header",children:[(0,ke.jsxs)("div",{className:"wp-header-account",children:[o&&(0,ke.jsx)("button",{type:"button",className:"wp-header-btn","aria-label":"Back","data-track":"back",onClick:o,children:(0,ke.jsx)(up,{})}),(0,ke.jsx)("span",{className:"wp-header-avatar","aria-hidden":!0,children:P&&(0,ke.jsx)("img",{src:P,alt:"",className:"wp-header-avatar-img",draggable:!1})}),(n||r)&&(0,ke.jsxs)("div",{className:"wp-header-account-meta",children:[n&&(0,ke.jsx)("span",{className:"wp-header-wallet-name",title:n,children:n}),r&&(0,ke.jsxs)("button",{type:"button",className:"wp-header-address-btn",onClick:xe,"aria-label":"Copy wallet address","data-track":"address_copy",children:[(0,ke.jsx)("span",{className:"wp-header-address",children:hi(r)}),(0,ke.jsx)("span",{className:"wp-header-address-copy","data-copied":L,children:L?(0,ke.jsx)(pn,{size:14}):(0,ke.jsx)(Vn,{size:14})})]})]})]}),(0,ke.jsxs)("button",{type:"button",className:"wp-header-btn wp-refresh-btn","aria-label":"Refresh portfolio","data-track":"refresh",onClick:ce,children:[(0,ke.jsx)(fp,{className:M?"wp-spin-once":void 0}),x&&(0,ke.jsx)("span",{className:"wp-refresh-badge",children:N})]})]}),(0,ke.jsx)("div",{className:"wp-body",children:(0,ke.jsxs)("div",{className:"wp-body-inner","data-empty":te||void 0,children:[p("rewards")&&(0,ke.jsx)(Ip,{}),p("points")&&(0,ke.jsx)(Up,{}),p("staking")&&(0,ke.jsx)(Kp,{}),p("gameSwap")&&(0,ke.jsx)(ru,{}),p("forge")&&(0,ke.jsx)(cu,{}),p("crossdPool")&&(0,ke.jsx)(Iu,{}),be&&(0,ke.jsx)("div",{className:"wp-portfolio-loading",role:"status","aria-label":"Loading portfolio",children:(0,ke.jsx)("span",{className:"wp-portfolio-spinner","aria-hidden":!0})}),te&&(0,ke.jsxs)("div",{className:"wp-portfolio-empty",role:"status",children:[(0,ke.jsx)("span",{className:"wp-portfolio-empty-icon","aria-hidden":!0,children:(0,ke.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,ke.jsx)("path",{d:"M20 7H5a2 2 0 0 1-2-2 2 2 0 0 1 2-2h13v4"}),(0,ke.jsx)("path",{d:"M3 5v13a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1"}),(0,ke.jsx)("circle",{cx:"16.5",cy:"13.5",r:"1",fill:"currentColor",stroke:"none"})]})}),(0,ke.jsx)("p",{className:"wp-portfolio-empty-title",children:"No assets yet"}),(0,ke.jsx)("p",{className:"wp-portfolio-empty-desc",children:"Assets you hold across ONE services will appear here."})]})]})})]});return(0,ke.jsx)(na.Provider,{value:ne,children:(0,ke.jsx)(dl.Provider,{value:C,children:(0,ke.jsx)(Ce,{feature:"wallet_portfolio",children:i==="none"?Ne:(0,ke.jsx)("div",{className:ze(i==="fullscreen"?"wp-fullscreen":"wp-embed",s),"data-theme":t,children:Ne})})})})}var $n=require("react/jsx-runtime");function Mu({className:e}){let{env:t,theme:r,walletAddress:n,close:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s}=Pt();return(0,$n.jsxs)(la.Drawer.Portal,{children:[(0,$n.jsx)(la.Drawer.Overlay,{className:"wp-overlay"}),(0,$n.jsxs)(la.Drawer.Content,{className:ze("wp-fullscreen",e),"data-theme":r,children:[(0,$n.jsx)(la.Drawer.Title,{className:"wp-sr-only",children:"Portfolio"}),(0,$n.jsx)(Jn,{env:t,theme:r,walletAddress:n,onBack:o,variant:"none",onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s})]})]})}var kl=require("react/jsx-runtime");function r0({env:e,theme:t="light",walletAddress:r,open:n,onOpenChange:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:c,currencySymbol:b,children:m}){let g=at(e),y=n!==void 0,[w,f]=eo.useState(!1),p=y?n:w,x=eo.useCallback(R=>{y||f(R),o?.(R)},[y,o]),h=eo.useCallback(()=>x(!1),[x]),v=eo.useMemo(()=>({env:g,theme:t,open:p,walletAddress:r,close:h,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:c,currencySymbol:b}),[g,t,p,r,h,a,i,s,l,d,c,b]);return(0,kl.jsx)(na.Provider,{value:v,children:(0,kl.jsx)(Au.Drawer.Root,{direction:"bottom",open:p,onOpenChange:x,noBodyStyles:!0,children:m})})}var Rl=Object.assign(r0,{Trigger:cp,Content:Mu});var le=V(require("react"),1),Io=require("react-dom"),Tl=V(require("bignumber.js"),1);var Ei=V(require("react"),1),Lu=120;function Du(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function Pu(){let[e,t]=Ei.useState(!1);return Ei.useEffect(()=>{let r=window.visualViewport,n=()=>r?.height??window.innerHeight,o=n(),a=()=>{let d=n();o=Math.max(o,d),t(o-d>Lu)},i=()=>{o=n(),t(!1)},s=d=>{Du(d.target)&&o-n()>Lu&&t(!0)},l=d=>{Du(d.target)&&t(!1)};return a(),r?.addEventListener("resize",a),window.addEventListener("resize",a),window.screen?.orientation?.addEventListener("change",i),document.addEventListener("focusin",s),document.addEventListener("focusout",l),()=>{r?.removeEventListener("resize",a),window.removeEventListener("resize",a),window.screen?.orientation?.removeEventListener("change",i),document.removeEventListener("focusin",s),document.removeEventListener("focusout",l)}},[]),e}var Mi=V(require("react"),1);function Ai(e,t=160){let[r,n]=Mi.useState(e||null);return Mi.useEffect(()=>{if(e){n(e);return}let o=window.setTimeout(()=>n(null),t);return()=>window.clearTimeout(o)},[e,t]),[e||r,e?"open":"closed"]}var on=require("react/jsx-runtime");function Ou({size:e=16,className:t}){return(0,on.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,on.jsx)("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 Bu({size:e=16,className:t}){return(0,on.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,on.jsx)("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 Sl({size:e=20,className:t}){return(0,on.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,on.jsx)("path",{d:"M10 4.167v11.666M4.167 10 10 15.833 15.833 10",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function zu({size:e=16,className:t}){return(0,on.jsx)("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:(0,on.jsx)("path",{d:"M3.333 8h9.334M8.667 4l4 4-4 4",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}var Y=V(require("react"),1);var ju=V(require("bignumber.js"),1);function Fu(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Uu(e){return!e.isFinite()||e.isNaN()||e.lte(0)?"":e.decimalPlaces(6,ju.default.ROUND_DOWN).toFixed()}function n0(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 o0(e){let t=e.fromToken.priceUsd,r=e.toToken.priceUsd,n=e.lastChangedBy==="to"?e.toAmount:e.fromAmount,o=mt(n);return!o||o.lte(0)?{fromAmount:e.fromAmount,toAmount:e.toAmount}:Fu(t)&&Fu(r)?e.lastChangedBy==="to"?{fromAmount:Uu(o.multipliedBy(r).dividedBy(t))}:{toAmount:Uu(o.multipliedBy(t).dividedBy(r))}:n0(e)?e.lastChangedBy==="to"?{fromAmount:e.toAmount}:{toAmount:e.fromAmount}:{fromAmount:e.lastChangedBy==="to"?"":e.fromAmount,toAmount:e.lastChangedBy==="from"?"":e.toAmount}}function Wu({getQuote:e,submitBridge:t}){return{canQuote:!!e,canSubmit:!!t,async getQuote(r){return e?e(r):o0(r)},async submitBridge(r){if(!t)throw new Error("Bridge submit handler is not configured.");return t(r)}}}var Gu=15,a0=18,Vu="cross_bridge_terms_accepted",i0=3600*24*365;function s0(e){let t=e.replace(/[^\d.]/g,""),r=t.indexOf(".");r!==-1&&(t=t.slice(0,r+1)+t.slice(r+1).replace(/\./g,""));let n=t.indexOf(".");if(n===-1)return t.slice(0,Gu);let o=t.slice(0,n).slice(0,Gu),a=t.slice(n+1).slice(0,a0);return`${o}.${a}`}function l0(){return typeof document>"u"?!1:document.cookie.split(";").map(e=>e.trim()).some(e=>e===`${Vu}=true`)}function d0(){if(typeof document>"u")return;let e=typeof window<"u"&&window.location.protocol==="https:"?"; Secure":"";document.cookie=[`${Vu}=true`,"Path=/",`Max-Age=${i0}`,"SameSite=Lax",e].filter(Boolean).join("; ")}function c0(e){let t=Number(e??"0");if(!Number.isFinite(t)||t<.1)return"1";let r=n=>Math.floor(n*100)/100;if(t<3){let n=r(t*3);return String(n<1?1:n)}return"10"}function _u(e){let t=e.toUpperCase();return t.startsWith("T")&&t.slice(1).startsWith("ONE")?t.slice(1):t}function p0(e,t){if(!e||!t||e.chainId!==t.chainId)return!1;let r=new Set([_u(e.symbol),_u(t.symbol)]);return r.has("ONE")&&r.has("ONEUSD")}function _r(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function Li(e){return e[0]}function Cl(e,t,r,n){if(r&&!_r(r,t))return r;let o=t?n?.(t,e):void 0;if(o?.length)return o[0];if(!t)return e[1]??Li(e);let a=e.findIndex(s=>_r(s,t)),i=a>=0?e[a+1]:void 0;return i&&!_r(i,t)?i:e.find(s=>!_r(s,t))??t}function Hu({fromToken:e,toToken:t,fromAmount:r,toAmount:n,lastChangedBy:o,slippage:a}){return{fromToken:e,toToken:t,fromAmount:r,toAmount:n,lastChangedBy:o,slippage:a}}function Di(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 r=e;return[...[e instanceof Error?e.name:r.name,e instanceof Error?e.message:r.message,r.shortMessage,r.details,r.code].filter(o=>typeof o=="string"||typeof o=="number").map(String),...Di(r.cause,t+1),...Di(r.data,t+1),...Di(r.error,t+1)]}function Nl(e){let t=Di(e).join(" ").toLowerCase(),r=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")||r}function Qu(e,t){return Nl(e)?"Transaction request was rejected.":(e instanceof Error?e.message:typeof e=="string"?e:"").split(`
10
- `)[0]?.trim()||t}function qu(e){let{tokens:t,initialFromToken:r,initialToToken:n,getToTokens:o,getApproval:a,approveBridge:i,history:s=[],initialSlippage:l="1",termsUrl:d,getQuote:c,submitBridge:b,onSubmitted:m,onSuccess:g,onFailed:y,onExit:w}=e,f=Y.useMemo(()=>Wu({getQuote:c,submitBridge:b}),[c,b]),[p,x]=Y.useState("form"),[h,v]=Y.useState(r??Li(t)),[R,S]=Y.useState(()=>Cl(t,r??Li(t),n,o)),[T,C]=Y.useState(""),[N,E]=Y.useState(""),[M,W]=Y.useState("from"),[L,H]=Y.useState(l),[A,O]=Y.useState(null),ce=Y.useMemo(()=>p0(h,R),[h,R]),X=Y.useMemo(()=>ce?"1":L==="auto"?c0(A?.priceImpact):L,[ce,L,A?.priceImpact]),[P,xe]=Y.useState(""),[ne,K]=Y.useState("idle"),[U,te]=Y.useState(""),[Z,be]=Y.useState(null),[Ne,re]=Y.useState([]),[we,Fe]=Y.useState(!1),[Ae,pt]=Y.useState(l0),[ye,De]=Y.useState(null),[ut,Be]=Y.useState(!1),[Ge,Ue]=Y.useState(null),[st,Ht]=Y.useState(null),[St,jt]=Y.useState(!1),[Ie,Wt]=Y.useState(!1),tt=Y.useRef(0),At=Y.useRef(null),qe=Y.useRef(!1),Xe=Y.useRef(!1),nr=Y.useRef(!1),Gt=Y.useRef(!1),Ye=Y.useRef(!1),wt=Y.useRef(!1),rt=Y.useRef(!1);Y.useEffect(()=>{nr.current||(nr.current=!0,Ke("bridge","opened"))},[]);let _e=Y.useCallback(()=>{At.current&&(clearTimeout(At.current),At.current=null)},[]),ft=Y.useCallback(G=>{_e(),Ht(G)},[_e]);Y.useEffect(()=>_e,[_e]),Y.useEffect(()=>{let G=t.find(He=>_r(He,h))??Li(t),Pe=G?o?.(G,t):void 0,q=Pe?.find(He=>_r(He,R))??(Pe?void 0:t.find(He=>_r(He,R)))??Cl(t,G,void 0,o);v(G),S(q)},[o,t,h,R]);let Lt=Y.useCallback((G,Pe)=>{let q=s0(G);if(!q){tt.current+=1,C(""),E(""),W(Pe),O(null),xe(""),K("idle");return}Pe==="from"?C(q):E(q),W(Pe),xe(""),!Ye.current&&Number(q)>0&&(Ye.current=!0,Ke("bridge","amount_entered"))},[]),je=Y.useCallback(()=>{tt.current+=1,C(""),E(""),W("from"),O(null),xe(""),te(""),K("idle"),De(null),Be(!1),Ue(null),jt(!1),ft(null)},[ft]),nt=Y.useCallback(G=>{_r(G,h)||(Gt.current||(Gt.current=!0,Ke("bridge","token_selected",{tags:{item_id:`from:${G.symbol}`}})),v(G),S(Cl(t,G,void 0,o)),je())},[h,o,je,t]),qt=Y.useCallback(G=>{_r(G,R)||_r(G,h)||(Gt.current||(Gt.current=!0,Ke("bridge","token_selected",{tags:{item_id:`to:${G.symbol}`}})),S(G),je())},[h,je,R]),F=Y.useMemo(()=>h?o?.(h,t)??t.filter(G=>!_r(G,h)):[],[h,o,t]),Je=Y.useCallback(()=>{h?.balance&&Lt(h.balance,"from")},[h?.balance,Lt]),B=Y.useCallback(()=>{!h||!R||(v(R),S(h),je())},[h,je,R]),se=Y.useCallback(()=>{tt.current+=1,C(""),E(""),W("from"),O(null),xe(""),te("")},[]);Y.useEffect(()=>{if(!h||!R)return;if(!T&&!N){O(null),xe(""),K(q=>q==="quoting"?"idle":q);return}let G=++tt.current,Pe=Hu({fromToken:h,toToken:R,fromAmount:T,toAmount:N,lastChangedBy:M,slippage:L});K(q=>q==="submitting"?q:f.canQuote?"quoting":"idle"),(async()=>{try{let q=await f.getQuote(Pe);if(tt.current!==G)return;q.fromAmount!==void 0&&M==="to"&&C(q.fromAmount),q.toAmount!==void 0&&M==="from"&&E(q.toAmount),O(q.summary??null),xe(q.error??"")}catch(q){if(tt.current!==G)return;xe(q instanceof Error?q.message:"Failed to quote bridge.")}finally{tt.current===G&&K(q=>q==="quoting"?"idle":q)}})()},[T,h,M,f,L,N,R]);let ve=Y.useCallback(()=>!h||!R?null:Hu({fromToken:h,toToken:R,fromAmount:T,toAmount:N,lastChangedBy:M,slippage:X}),[X,T,h,M,N,R]),Te=Y.useCallback(async(G,Pe)=>{if(!qe.current){qe.current=!0,te(""),jt(!1),Be(!1),K("submitting");try{if(!Pe?.skipApprovalCheck&&a){let He=await a(G);if(He){De(He),Ue(G),K("idle");return}}De(null),Ue(null),ft("processing");let q=await f.submitBridge(G);be(q),K("success"),re(He=>[{id:q.txHash,timestamp:new Date().toISOString(),txHash:q.txHash,fromToken:q.fromToken,toToken:q.toToken,fromAmount:q.fromAmount,toAmount:q.toAmount,summary:A??void 0,status:"pending"},...He.filter(Yr=>Yr.txHash!==q.txHash)]),se(),Wt(!0),ft(null),jt(!0),Ke("bridge","confirmed"),wt.current=!1,rt.current=!1,m?.(q),g?.(q)}catch(q){if(ft(null),Ke("bridge","confirmed",{status:"failure",reason:gr(q)}),wt.current=!1,rt.current=!1,Nl(q)){K("idle");return}let He=Qu(q,"Failed to submit bridge.");te(He),K("error"),y?.({message:He})}finally{qe.current=!1}}},[a,y,m,g,f,se,ft,A]),ot=Y.useCallback(async()=>{if(P)return;let G=ve();if(G){if(wt.current||(wt.current=!0,Ke("bridge","submitted")),!Ae){Ue(G),Fe(!0);return}await Te(G)}},[ve,P,Te,Ae]),or=Y.useCallback(async()=>{let G=Ge??ve();G&&(d0(),pt(!0),Fe(!1),await Te(G))},[ve,Ge,Te]),ur=Y.useCallback(()=>{Fe(!1),Ue(null)},[]),Or=Y.useCallback(async()=>{if(!(Xe.current||ne==="submitting"||!ye||!Ge||!i)){Xe.current=!0,te(""),K("submitting");try{await i(Ge,ye),rt.current||(rt.current=!0,Ke("bridge","approved")),De(null),K("idle"),Be(!0)}catch(G){if(Nl(G)){K("idle");return}let Pe=Qu(G,"Failed to approve token.");te(Pe),K("error"),y?.({message:Pe})}finally{Xe.current=!1}}},[ye,i,y,Ge,Te,ne]),dn=Y.useCallback(()=>{ne!=="submitting"&&(De(null),Be(!1),Ue(null),K("idle"))},[ne]),Rr=Y.useCallback(async()=>{if(ne==="submitting")return;let G=Ge??ve();if(!G){Be(!1),te("Bridge input is no longer available. Please try again."),K("error");return}Be(!1),await Te(G,{skipApprovalCheck:!0})},[ve,Ge,Te,ne]),cn=Y.useCallback(()=>{jt(!1)},[]),Br=Y.useCallback(G=>{x(G),G==="history"&&Wt(!1)},[]),ie=Y.useCallback(()=>{if(p==="history"){Br("form");return}w?.()},[w,Br,p]),Se=Y.useMemo(()=>[...s,...Ne.filter(G=>!s.some(Pe=>Pe.txHash===G.txHash))],[s,Ne]);return{step:p,setStep:Br,status:ne,error:U,quoteError:P,fromToken:h,toToken:R,tokens:t,availableToTokens:F,fromAmount:T,toAmount:N,lastChangedBy:M,slippage:L,effectiveSlippage:X,slippageLocked:ce,setSlippage:H,summary:A,history:Se,submitted:Z,canSubmit:f.canSubmit,termsOpen:we,approvalInfo:ye,approvalSuccessOpen:ut,approveBridge:i,pendingSubmitInput:Ge,submitToast:st,successDialogOpen:St,dismissSuccessDialog:cn,hasNewHistory:Ie,termsUrl:d,setFromToken:v,setToToken:S,selectFromToken:nt,selectToToken:qt,setAmount:Lt,setMax:Je,swapTokens:B,submit:ot,confirmTerms:or,cancelTerms:ur,confirmApproval:Or,cancelApproval:dn,continueAfterApproval:Rr,back:ie}}he(`.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, #00ceb2);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)}@media(prefers-reduced-motion:reduce){.bf-token-pill-face{animation:none}.bf-token-pill:active:not(:disabled),.bf-embedded-token-pill:active:not(:disabled){transform:none}}.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, #00b4b7);background:var(--ds-accent-primary-low, #e7f9f8)}.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, #00b4b7)}.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, #00b4b7);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(--bf-terms-accent);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(--bf-terms-accent);background:var(--bf-terms-accent)}.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(--bf-terms-accent);font-size:12px;font-weight:600;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, #00ceb2);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, #00ceb2);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 color-mix(in srgb,currentColor 20%,transparent);border-top-color:var(--ds-accent-primary-default, #00ceb2);border-right-color:var(--ds-accent-primary-default, #00ceb2);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-accent-primary-default, #00ceb2)}.bf-status-check:after{position:absolute;top:6px;left:5px;width:8px;height:4px;border:solid var(--ds-accent-primary-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-accent-primary-default, #00ceb2)}.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, #00ceb2);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, #00a0a2)}.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, #00a0a2)}.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, #00ceb2)}.bf-liquidity-status[data-status=normal]:before,.bf-liquidity-status:not([data-status]):before{background:var(--ds-accent-primary-default, #00ceb2)}.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, #00ceb2)}.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, #00ceb2);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, #00ceb2);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, #00a0a2)}.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, #00a0a2);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
- `);var u=require("react/jsx-runtime"),$u=le.createContext(void 0);function fa(){return le.useContext($u)}function u0(e){let[t,r]=le.useState(void 0);return le.useEffect(()=>{let n=e.current;if(!n)return;let o=()=>{let i=n.closest("[data-theme]");r(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 Yu=[{value:"0.1",label:"0.1%"},{value:"0.5",label:"0.5%"},{value:"1",label:"1%"},{value:"5",label:"5%"}],f0=[{value:"all",label:"ALL"},{value:"completed",label:"Completed"},{value:"pending",label:"Pending"}];function m0(e,t){return e==="auto"?t?`Auto ${t}%`:"Auto":e?`${e}%`:"1%"}function Ku(e){let t=e.replace(/[^\d.]/g,""),[r="",...n]=t.split("."),o=n.join("");return n.length===0?r:`${r}.${o.slice(0,2)}`}function ef(e){return`${e.chainId}:${e.address.toLowerCase()}`}function tf(e){let t=Number(e);return Number.isFinite(t)?t.toLocaleString("en-US",{maximumFractionDigits:t>=1?2:6}):e||"0"}function Zu(e,t){let r=Number(e||"0"),n=t?.priceUsd??0;return`\u2248 $${(Number.isFinite(r)?r*n:0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})} USD`}function g0(e,t=6){if(!e)return e;let[r,n=""]=e.split(".");if(!n)return r;let o=n.slice(0,t).replace(/0+$/,"");return o?`${r}.${o}`:r}function rf(e,t){if(!t)return!1;let r=mt(e),n=mt(t.balance);return!r||!n?!1:r.isGreaterThan(n)}function ca(e){if(!e.isFinite()||e.isNaN())return"0";let r=e.decimalPlaces(6,Tl.default.ROUND_DOWN).toFixed(6).replace(/\.?0+$/,""),[n="0",o]=r.split("."),a=new Tl.default(n||"0").toFormat(0);return o?`${a}.${o}`:a}function h0(e){return e.length<=14?e:`${e.slice(0,6)}...${e.slice(-6)}`}function b0(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let r=n=>n.toString().padStart(2,"0");return[`${t.getFullYear()}-${r(t.getMonth()+1)}-${r(t.getDate())}`,`${r(t.getHours())}:${r(t.getMinutes())}:${r(t.getSeconds())}`].join(" ")}function w0(e){let t=mt(e);return t?ca(t):e||"0"}function y0(e,t){if(t?.priceUsd===void 0)return null;let r=mt(e);if(!r)return null;let n=r.multipliedBy(t.priceUsd);return n.isFinite()?`$${n.toFormat(2)}`:null}function Fi(e){return e.status==="success"?"completed":e.status==="failed"?"failed":"pending"}function x0(e,t){return t==="all"?!0:Fi(e)===t}function v0(e){return e==="completed"?"Completed":e==="failed"?"Failed":"Pending"}function To(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function nf(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function of(e,t){if(!(!e||!t))return e.chainId===t.chainId?"swap":nf(e,t)||e.symbol.toLowerCase()===t.symbol.toLowerCase()?"bridge":"swap-bridge"}function af(e){return e==="swap"||e==="deposit-swap"||e==="swap-withdraw"}function Pi(e){return!e||e==="0"||Number(e)===0}function sf(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 lf(e){let t=e.fromToken,r=e.toToken,n=of(t,r),o=e.fromAmount||"0",a=e.toAmount||"0",i=n!==void 0&&!af(n),s=n!==void 0&&n!=="bridge";return{pathType:n,bridgeInfo:i?[{label:"Route",value:t&&r?`${To(t.chainId)} \u2192 ${To(r.chainId)}`:"-"},{label:"Validator Fee",value:Pi(o)?"0":"Free",tone:Pi(o)?"default":"accent"},{label:"Network Fee",value:Pi(o)?"0":"Free",tone:Pi(o)?"default":"accent"}]:void 0,swapInfo:s?[t&&r?{label:"Route",value:"",routeTokens:[{symbol:t.symbol,iconUrl:t.iconUrl},{symbol:r.symbol,iconUrl:r.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:r?{symbol:r.symbol,iconUrl:r.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 pa({token:e,size:t=20}){let r=e?.iconUrl;return(0,u.jsx)("span",{className:"bf-token-icon","data-has-image":!!r?"true":"false",style:{width:t,height:t},children:r?(0,u.jsx)("img",{src:r,alt:"",width:t,height:t,draggable:!1}):(0,u.jsx)("span",{className:"bf-token-fallback",children:e?.symbol?.slice(0,1)??"?"})})}function Oi(e,t){if(e.length===0)return;let r=e.findIndex(n=>nf(n,t));return e[(r+1)%e.length]}function Xu({label:e,token:t,amount:r,usd:n,onAmountChange:o,onTokenClick:a,locked:i=!1}){return(0,u.jsxs)("section",{className:"bf-amount-panel",children:[(0,u.jsxs)("div",{className:"bf-amount-head",children:[(0,u.jsx)("span",{children:e}),(0,u.jsxs)("span",{className:"bf-balance",children:[tf(t?.balance??"0")," ",t?.symbol??""]})]}),(0,u.jsxs)("div",{className:"bf-amount-main",children:[(0,u.jsxs)("label",{className:"bf-amount-input-wrap",children:[(0,u.jsxs)("span",{className:"bf-sr-only",children:[e," amount"]}),(0,u.jsx)("input",{type:"text",inputMode:"decimal",value:r,onChange:s=>o(s.target.value),placeholder:"0",className:"bf-amount-input","data-size":df(r)}),(0,u.jsx)("span",{className:"bf-amount-usd",children:n})]}),(0,u.jsxs)("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:[(0,u.jsxs)("span",{className:"bf-token-pill-face",children:[(0,u.jsx)(pa,{token:t}),(0,u.jsx)("span",{children:t?.symbol??"Select"})]},t?ef(t):"none"),!i&&(0,u.jsx)(Tr,{size:16})]})]})]})}function k0(e){if(!e)return"";let[t="",r]=e.replace(/,/g,"").split("."),n=t.replace(/\B(?=(\d{3})+(?!\d))/g,",");return r===void 0?n:`${n}.${r}`}function df(e){let t=e.replace(/,/g,"").trim().length;return t>26?"small":t>18?"medium":"large"}function R0(){return(0,u.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[(0,u.jsx)("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"}),(0,u.jsx)("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"}),(0,u.jsx)("circle",{cx:"10",cy:"8",r:".75",fill:"currentColor"})]})}function Ju({label:e,token:t,amount:r,onAmountChange:n,onTokenClick:o,onMax:a,locked:i}){return(0,u.jsxs)("section",{className:"bf-embedded-amount-panel",children:[(0,u.jsxs)("div",{className:"bf-embedded-amount-head",children:[(0,u.jsxs)("span",{className:"bf-embedded-amount-label",children:[(0,u.jsx)("strong",{children:e}),!(e==="From")&&(0,u.jsx)("em",{children:"estimated"})]}),t&&(0,u.jsxs)("span",{className:"bf-embedded-balance",children:[(0,u.jsx)(R0,{}),(0,u.jsx)("span",{className:"bf-embedded-balance-value",children:tf(t.balance)}),(0,u.jsx)("span",{children:t.symbol}),a&&(0,u.jsx)("button",{type:"button",onClick:a,"aria-label":"Use maximum available balance",children:"MAX"})]})]}),(0,u.jsxs)("div",{className:"bf-embedded-amount-main",children:[(0,u.jsxs)("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:[(0,u.jsxs)("span",{className:"bf-token-pill-face",children:[(0,u.jsx)(pa,{token:t}),(0,u.jsx)("span",{children:t?.symbol??"Select"})]},t?ef(t):"none"),!i&&(0,u.jsx)(Tr,{size:14})]}),(0,u.jsxs)("label",{className:"bf-embedded-input-wrap",children:[(0,u.jsxs)("span",{className:"bf-sr-only",children:[e," amount"]}),(0,u.jsx)("input",{type:"text",inputMode:"decimal",value:k0(r),onChange:l=>n(l.target.value),placeholder:"0.00",className:"bf-embedded-amount-input","data-size":df(r)})]})]})]})}function S0({flow:e,onClose:t}){let r=le.useId(),[n,o]=le.useState(null),a=Yu.find(w=>w.value===e.slippage),[i,s]=le.useState(e.slippage&&!a?e.slippage:""),l=i.trim()!==""&&i.trim()!==".",d=l?Number(i):NaN,c=Number.isFinite(d)&&d>50,b=Number.isFinite(d)&&d>5&&!c,m=w=>{e.setSlippage(w),t()},g=()=>{!l||c||(e.setSlippage(Ku(i)),t())};if(le.useEffect(()=>{o(document.body)},[]),le.useEffect(()=>{let w=f=>{f.key==="Escape"&&t()};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[t]),!n)return null;let y=fa();return(0,Io.createPortal)((0,u.jsx)("div",{className:"bf-slippage-overlay","data-theme":y,role:"presentation",onMouseDown:w=>{w.target===w.currentTarget&&t()},children:(0,u.jsxs)("section",{className:"bf-slippage-dialog",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[(0,u.jsxs)("header",{className:"bf-slippage-head",children:[(0,u.jsx)("h3",{id:r,children:"Slippage Settings"}),(0,u.jsx)("button",{type:"button",className:"bf-slippage-close",onClick:t,"aria-label":"Close slippage settings",children:(0,u.jsx)(jr,{size:24})})]}),(0,u.jsxs)("div",{className:"bf-slippage-body",children:[(0,u.jsx)("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."}),(0,u.jsxs)("div",{className:"bf-slippage-controls",children:[(0,u.jsx)("div",{className:"bf-slippage-presets",children:Yu.map(w=>(0,u.jsx)("button",{type:"button",className:"bf-slippage-preset","data-selected":!l&&e.slippage===w.value?"true":"false",onClick:()=>m(w.value),children:w.label},w.value))}),(0,u.jsxs)("label",{className:"bf-slippage-custom","data-selected":l?"true":"false",children:[(0,u.jsx)("span",{className:"bf-sr-only",children:"Custom slippage percent"}),(0,u.jsx)("input",{value:i,onChange:w=>{s(Ku(w.target.value))},onKeyDown:w=>{w.key==="Enter"&&(w.preventDefault(),g())},inputMode:"decimal",placeholder:"Enter custom slippage",autoComplete:"off",spellCheck:!1}),(0,u.jsx)("span",{"aria-hidden":"true",children:"%"})]})]}),c?(0,u.jsx)("p",{className:"bf-slippage-message","data-variant":"error",children:"Slippage cannot exceed 50%."}):b?(0,u.jsx)("p",{className:"bf-slippage-message","data-variant":"warning",children:"Your transaction may be frontrun due to high slippage."}):null,l&&(0,u.jsx)("button",{type:"button",className:"bf-slippage-apply",onClick:g,disabled:c,children:"Apply"})]})]})}),n)}function cf({flow:e,env:t}){let r=le.useId(),[n,o]=le.useState(!1),[a,i]=le.useState(null),s=fa(),l=sr("apps.json",t,m=>Nr(m?.legal?.termsUrl,t)),d=e.termsUrl??l??ic;le.useEffect(()=>{i(document.body)},[]),le.useEffect(()=>{let m=g=>{g.key==="Escape"&&e.cancelTerms()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[e]);let[c,b]=Ai(e.termsOpen);return!a||!c?null:(0,Io.createPortal)((0,u.jsx)("div",{className:"bf-action-modal-overlay","data-theme":s,"data-state":b,role:"presentation",onPointerDown:m=>{m.target===m.currentTarget&&e.cancelTerms()},children:(0,u.jsxs)("section",{className:"bf-action-modal bf-terms-modal",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[(0,u.jsx)("h3",{id:r,children:"Agree to Terms of Service"}),(0,u.jsx)("p",{className:"bf-action-modal-desc",children:"Please make sure to review the Terms of Service before using ONEUSD."}),(0,u.jsxs)("div",{className:"bf-terms-check-row","data-checked":n?"true":"false",children:[(0,u.jsx)("button",{type:"button",className:"bf-terms-check-button",role:"checkbox","aria-checked":n,"aria-label":"Agree to Terms of Use","data-track":"terms_check",onClick:()=>o(m=>!m),children:(0,u.jsx)("span",{className:"bf-terms-checkbox","data-checked":n?"true":"false","aria-hidden":"true"})}),(0,u.jsxs)("div",{className:"bf-terms-copy",children:[(0,u.jsx)("span",{className:"bf-terms-label",onClick:()=>o(m=>!m),children:"Agree to Terms of Use"}),d&&(0,u.jsx)("a",{href:d,target:"_blank",rel:"noreferrer",children:"Terms of Service"})]})]}),(0,u.jsx)("p",{className:"bf-terms-privacy",children:"I have read and acknowledged the Privacy Policy to use ONEUSD"}),(0,u.jsx)("button",{type:"button",className:"bf-action-primary",disabled:!n||e.status==="submitting",onClick:e.confirmTerms,"data-track":"terms_confirm",children:"Confirm"})]})}),a)}function C0({value:e,disabled:t=!1}){let[r,n]=le.useState(!1);return(0,u.jsx)("button",{type:"button",className:"bf-copy-button","aria-label":"Copy token address",disabled:t,onClick:()=>{t||navigator.clipboard?.writeText(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1200)})},children:r?"OK":"Copy"})}function pf({flow:e,approval:t}){let r=le.useId(),[n,o]=le.useState(null),a=fa();le.useEffect(()=>{o(document.body)},[]),le.useEffect(()=>{if(!t)return;let c=b=>{e.status!=="submitting"&&b.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[e,t]);let[i,s]=Ai(t);if(!n||!i)return null;let l=e.status==="submitting"||!e.approveBridge,d=e.status==="submitting";return(0,Io.createPortal)((0,u.jsx)("div",{className:"bf-action-modal-overlay","data-theme":a,"data-state":s,role:"presentation",children:(0,u.jsxs)("section",{className:"bf-action-modal bf-approve-modal",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[(0,u.jsxs)("h3",{id:r,children:["Approve ",i.token.symbol]}),(0,u.jsx)(pa,{token:i.token,size:72}),(0,u.jsxs)("div",{className:"bf-approve-address-box",children:[(0,u.jsx)("span",{children:"Token Address"}),(0,u.jsxs)("div",{children:[(0,u.jsx)("strong",{children:i.tokenAddress}),(0,u.jsx)(C0,{value:i.tokenAddress,disabled:d})]})]}),(0,u.jsxs)("div",{className:"bf-action-buttons",children:[(0,u.jsx)("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:e.status==="submitting",children:"Cancel"}),(0,u.jsxs)("button",{type:"button",className:"bf-action-primary",onClick:e.confirmApproval,disabled:l,"aria-busy":d,"data-track":"approve_confirm",children:[d&&(0,u.jsx)("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),(0,u.jsx)("span",{children:d?"Approving...":"Approve"})]})]})]})}),n)}function uf({flow:e}){let t=le.useId(),[r,n]=le.useState(null),o=fa();le.useEffect(()=>{n(document.body)},[]),le.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]=Ai(e.approvalSuccessOpen);if(!r||!a)return null;let s=e.status==="submitting";return(0,Io.createPortal)((0,u.jsx)("div",{className:"bf-action-modal-overlay","data-theme":o,"data-state":i,role:"presentation",children:(0,u.jsxs)("section",{className:"bf-action-modal bf-approval-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:[(0,u.jsx)("h3",{id:t,children:"Approval Success"}),(0,u.jsx)("span",{className:"bf-success-mark","aria-hidden":"true"}),(0,u.jsxs)("p",{className:"bf-action-modal-desc",children:["Token approval confirmed successfully.",(0,u.jsx)("br",{}),"Please continue to the next step."]}),(0,u.jsxs)("div",{className:"bf-action-buttons",children:[(0,u.jsx)("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:s,children:"Cancel"}),(0,u.jsxs)("button",{type:"button",className:"bf-action-primary",onClick:e.continueAfterApproval,disabled:s,"aria-busy":s,children:[s&&(0,u.jsx)("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),(0,u.jsx)("span",{children:s?"Continuing...":"Continue"})]})]})]})}),r)}function N0({fromAmount:e,toAmount:t,fromToken:r,toToken:n}){let o=le.useMemo(()=>{let i=mt(e),s=mt(t);return!i||!s||i.lte(0)||s.lte(0)?null:s.dividedBy(i)},[e,t]),a=!!(o&&r&&n&&r.symbol!==n.symbol);return(0,u.jsx)(da,{open:a,children:(0,u.jsxs)("div",{className:"bf-exchange-rate",children:[(0,u.jsxs)("span",{children:["1 ",r?.symbol]}),(0,u.jsx)("span",{"aria-hidden":"true",children:"="}),(0,u.jsxs)("span",{children:[o?ca(o):""," ",n?.symbol]})]})})}function ff({flow:e}){return e.submitToast?(0,u.jsxs)("div",{className:"bf-status-toast","data-variant":"processing",role:"status","aria-live":"polite",children:[(0,u.jsx)("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:(0,u.jsx)("span",{className:"bf-status-spinner"})}),(0,u.jsxs)("span",{className:"bf-status-toast-copy",children:[(0,u.jsx)("strong",{children:"Transaction Processing"}),(0,u.jsx)("span",{children:"Your transaction is being processed on the blockchain"})]})]}):null}function mf({message:e}){let[t,r]=le.useState(!1);return le.useEffect(()=>{if(!e){r(!1);return}r(!0);let n=window.setTimeout(()=>{r(!1)},3500);return()=>window.clearTimeout(n)},[e]),!e||!t?null:(0,u.jsxs)("div",{className:"bf-status-toast","data-variant":"error",role:"alert","aria-live":"assertive",children:[(0,u.jsx)("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:(0,u.jsx)("span",{className:"bf-status-error-mark",children:"!"})}),(0,u.jsxs)("span",{className:"bf-status-toast-copy",children:[(0,u.jsx)("strong",{children:"Error"}),(0,u.jsx)("span",{children:e})]})]})}function T0(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 gf({flow:e}){let t=le.useId(),[r,n]=le.useState(null),o=e.submitted,a=fa();return le.useEffect(()=>{n(document.body)},[]),le.useEffect(()=>{if(!e.successDialogOpen)return;let i=s=>{s.key==="Escape"&&e.dismissSuccessDialog()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[e]),!r||!e.successDialogOpen||!o?null:(0,Io.createPortal)((0,u.jsx)("div",{className:"bf-success-overlay","data-theme":a,role:"presentation",children:(0,u.jsx)("section",{className:"bf-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:(0,u.jsxs)("div",{className:"bf-success-body",children:[(0,u.jsx)("span",{className:"bf-success-mark","aria-hidden":"true"}),(0,u.jsxs)("div",{className:"bf-success-copy",children:[(0,u.jsx)("strong",{id:t,children:T0(o.pathType)}),(0,u.jsx)("span",{children:"Please check the results in the history."})]}),(0,u.jsx)("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)=>(0,u.jsxs)(le.Fragment,{children:[s>0&&(0,u.jsx)("span",{className:"bf-success-route-arrow",children:"\u2192"}),(0,u.jsx)(ua,{token:i,size:43})]},`${i.symbol}-${s}`))}),(0,u.jsx)("button",{type:"button",className:"bf-success-ok",onClick:e.dismissSuccessDialog,"data-track":"success_ok",children:"OK"})]})})}),r)}function ua({token:e,size:t=16}){let r=!!e.iconUrl;return(0,u.jsx)("span",{className:"bf-token-icon","data-has-image":r?"true":"false",style:{width:t,height:t},children:e.iconUrl?(0,u.jsx)("img",{src:e.iconUrl,alt:"",width:t,height:t,draggable:!1}):(0,u.jsx)("span",{className:"bf-token-fallback",children:e.symbol?.slice(0,1)??"?"})})}function I0({row:e}){return e.routeTokens&&e.routeTokens.length>0?(0,u.jsx)("span",{className:"bf-info-route",children:e.routeTokens.map((t,r)=>(0,u.jsxs)(le.Fragment,{children:[r>0&&(0,u.jsx)("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),(0,u.jsx)(ua,{token:t})]},`${t.symbol}-${r}`))}):e.valueToken?(0,u.jsxs)("span",{className:"bf-info-value-token",children:[(0,u.jsx)(ua,{token:e.valueToken}),(0,u.jsx)("span",{children:e.value})]}):(0,u.jsx)(u.Fragment,{children:e.value})}function hf({rows:e}){return!e||e.length===0?null:(0,u.jsx)("div",{className:"bf-info-rows",children:e.map(t=>(0,u.jsxs)("div",{className:"bf-info-row",children:[(0,u.jsx)("span",{className:"bf-info-label",children:t.label}),(0,u.jsx)("span",{className:"bf-info-value","data-tone":t.tone??"default",children:(0,u.jsx)(I0,{row:t})})]},`${t.label}-${t.value}`))})}function E0(e,t,r){return e.pathType==="bridge"?"Bridge Info":af(e.pathType)?"Swap Info":t&&r?"Swap & Bridge Info":t?"Bridge Info":"Swap Info"}function da({open:e,className:t,children:r}){let n=le.useRef(null);return e&&(n.current=r),(0,u.jsx)("div",{className:t?`bf-collapse ${t}`:"bf-collapse","data-open":e?"true":"false","aria-hidden":e?void 0:!0,children:(0,u.jsx)("div",{className:"bf-collapse-inner",children:e?r:n.current})})}function M0({summary:e,from:t,to:r,feeDelegated:n}){let o=!!e.bridgeInfo?.length,a=!!e.swapInfo?.length,i=!!e.txFee?.length,s=E0(e,o,a),[l,d]=le.useState(!0),[c,b]=le.useState(!0);return(0,u.jsxs)("div",{className:"bf-details",children:[e.liquidity&&(0,u.jsxs)("section",{className:"bf-liquidity",children:[(0,u.jsxs)("div",{className:"bf-liquidity-head",children:[(0,u.jsx)("span",{children:e.liquidity.label??"Available Liquidity"}),(0,u.jsx)("span",{className:"bf-liquidity-status","data-status":e.liquidity.status,children:e.liquidity.status??"Normal"})]}),(0,u.jsx)("div",{className:"bf-liquidity-track",children:(0,u.jsx)("span",{style:{width:`${e.liquidity.percentage??50}%`}})})]}),(o||a)&&(0,u.jsxs)("section",{className:"bf-detail-section bf-info-card","data-open":l?"true":"false",children:[(0,u.jsxs)("button",{type:"button",className:"bf-collapse-head","aria-expanded":l,onClick:()=>d(m=>!m),"data-track":"details_toggle",children:[(0,u.jsx)("h3",{children:s}),(0,u.jsx)(Tr,{size:16,className:"bf-collapse-chevron"})]}),l&&(0,u.jsx)("div",{className:"bf-collapse-body",children:(0,u.jsx)(yf,{summary:e,from:t,to:r,feeDelegated:n})})]}),i&&(0,u.jsxs)("section",{className:"bf-detail-section bf-tx-fee-section","data-open":c?"true":"false",children:[(0,u.jsxs)("button",{type:"button",className:"bf-collapse-head bf-tx-fee-head","aria-expanded":c,onClick:()=>b(m=>!m),"data-track":"details_toggle",children:[(0,u.jsx)("h3",{children:"Est. Tx Fee"}),(0,u.jsxs)("div",{className:"bf-tx-fee-total",children:[e.txFeeInfo?.isDelegateFee&&(0,u.jsx)("span",{className:"bf-fee-delegated",children:"Fee Delegated"}),e.txFeeInfo?.tokenIconUrl&&(0,u.jsx)("img",{className:"bf-tx-fee-token",src:e.txFeeInfo.tokenIconUrl,alt:e.txFeeInfo.tokenSymbol??"",width:16,height:16,draggable:!1}),(0,u.jsx)("span",{"data-delegated":e.txFeeInfo?.isDelegateFee&&Number(e.txFeeInfo?.estTxFee)>0?"true":void 0,children:g0(e.txFeeInfo?.estTxFee??"0")}),(0,u.jsx)(Tr,{size:16,className:"bf-collapse-chevron"})]})]}),c&&(0,u.jsx)("div",{className:"bf-collapse-body",children:(0,u.jsx)(hf,{rows:e.txFee})})]})]})}function A0(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 Bi(e){let t=mt(e);if(!(!t||t.lte(0)))return ca(t)}function L0(e,t,r,n){if(!r||!n)return;let o=mt(e),a=mt(t);if(!o||!a||o.lte(0)||a.lte(0))return;let i=a.dividedBy(o);if(i.gte("0.001"))return`1 ${r.symbol} = ${ca(i)} ${n.symbol}`;let s=o.dividedBy(a);return`1 ${n.symbol} = ${ca(s)} ${r.symbol}`}var D0=1,P0=5;function bf(e){return mt(e)?.toNumber()??null}function wf(e){let t=bf(e);if(t!==null){if(t>=P0)return"danger";if(t>=D0)return"warning"}}var O0=/\bin\b.*amount|amount.*\bin\b|^from\b/i,B0=/\bout\b.*amount|amount.*\bout\b|^to\b|receive/i,z0=/fee/i,F0=/impact|rate|slippage|minimum|min\.|received/i,zi=/impact/i,U0=/^route$/i;function j0(e,t,r){let n=e.find(c=>O0.test(c.label)),o=e.find(c=>B0.test(c.label)),a=new Set;n&&a.add(n),o&&a.add(o);let i=e.find(c=>U0.test(c.label)||(c.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 c of e){if(a.has(c))continue;let b=z0.test(c.label);if(!b&&!F0.test(c.label))continue;a.add(c);let m=bf(c.value),g=b&&(m===0||/^\s*free\s*$/i.test(String(c.value??"")));g&&t==="swap"||d.push({text:g?`${c.label} Free`:`${c.label} ${c.value}`,tone:g?"accent":zi.test(c.label)?c.tone==="danger"||c.tone==="warning"?c.tone:wf(c.value):void 0})}return{key:t,label:r,routeText:l,routeTokens:s,inRow:n,outRow:o,meta:d,rest:e.filter(c=>!a.has(c))}}function W0({steps:e}){return(0,u.jsx)("div",{className:"bf-route-steps",children:e.map((t,r)=>(0,u.jsxs)("div",{className:"bf-route-step","data-last":r===e.length-1?"true":"false","data-kind":t.key.startsWith("hop-")?"hop":"endpoint",children:[(0,u.jsxs)("span",{className:"bf-route-rail","aria-hidden":"true",children:[(0,u.jsx)("span",{className:"bf-route-line"}),(0,u.jsx)("span",{className:"bf-route-dot","data-final":r===e.length-1?"true":"false"})]}),(0,u.jsxs)("span",{className:"bf-route-body",children:[(0,u.jsxs)("span",{className:"bf-route-head",children:[(0,u.jsx)("span",{className:"bf-route-title",children:t.title}),(0,u.jsx)("span",{className:"bf-route-amount",children:t.routeTokens?.length?t.routeTokens.map((n,o)=>(0,u.jsxs)(le.Fragment,{children:[o>0&&(0,u.jsx)("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),(0,u.jsx)(ua,{token:n})]},`${n.symbol}-${o}`)):(0,u.jsxs)(u.Fragment,{children:[t.amountToken&&(0,u.jsx)(ua,{token:t.amountToken}),(0,u.jsx)("span",{className:"bf-route-amount-value",children:t.amount},t.amount)]})})]}),(t.meta.length>0||t.tags.length>0)&&(0,u.jsxs)("span",{className:"bf-route-meta",children:[t.meta.map(n=>(0,u.jsx)("span",{"data-tone":n.tone??"default",children:n.text},n.text)),t.tags.map(n=>(0,u.jsx)("span",{className:"bf-route-tag",children:n},n))]})]})]},t.key))})}function G0(e){if(!zi.test(e.label)||e.tone==="danger"||e.tone==="warning")return e;let t=wf(e.value);return t?{...e,tone:t}:e}function yf({summary:e,rateLine:t,from:r,to:n,feeDelegated:o,includeTxFee:a=!1}){let i=!!e.txFeeInfo?.isDelegateFee||!!o,s=le.useMemo(()=>(e.pathType==="bridge-swap"?[["bridge","Bridge"],["swap","Swap"]]:[["swap","Swap"],["bridge","Bridge"]]).map(([R,S])=>{let T=R==="swap"?e.swapInfo:e.bridgeInfo;return T?.length?j0(T,R,S):null}).filter(R=>R!==null),[e]);if(s.length===0)return null;let l=s[0],d=s[s.length-1],c=l.inRow?.valueToken??(r?.symbol?{symbol:r.symbol,iconUrl:r.iconUrl}:void 0),b=l.inRow?.value??r?.amount,m=d.outRow?.valueToken??(n?.symbol?{symbol:n.symbol,iconUrl:n.iconUrl}:void 0),g=d.outRow?.value??n?.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,p=[{key:"send",title:`Send ${c?.symbol??""}`.trim(),amount:b,amountToken:c,routeTokens:f?void 0:l.routeTokens,meta:[...w.length?[{text:"EST."}]:r?.chain?[{text:`on ${r.chain}`}]:[],...w,...f?[]:[...l.routeText?[{text:l.routeText}]:[],...l.meta.filter(v=>!zi.test(v.text))]],tags:i&&!f?["Fee delegated"]:[]},...f?s.map(v=>({key:`hop-${v.key}`,title:v.label,amount:v.routeText??"",routeTokens:v.routeTokens,meta:v.meta,tags:i&&v.key==="swap"?["Fee delegated"]:[]})):[],{key:"receive",title:`Receive ${m?.symbol??""}`.trim(),amount:g??"\u2014",amountToken:m,meta:[...n?.chain?[{text:`on ${n.chain}`}]:[],...f?[]:l.meta.filter(v=>zi.test(v.text))],tags:[]}],x=[...s.flatMap(v=>v.rest),...a?e.txFee??[]:[]].map(G0),h=!!t;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(W0,{steps:p}),(x.length>0||h)&&(0,u.jsx)("div",{className:"bf-info-section",children:(0,u.jsx)(hf,{rows:[...h?[{label:"Rate",value:t}]:[],...x]})})]})}function _0({summary:e,rateLine:t,from:r,to:n,feeDelegated:o}){let a=le.useMemo(()=>A0(e),[e]);return!a.bridgeInfo?.length&&!a.swapInfo?.length?null:(0,u.jsx)("div",{className:"bf-embedded-details",children:(0,u.jsx)(yf,{summary:a,rateLine:t,from:r,to:n,feeDelegated:o,includeTxFee:!0})})}function H0({flow:e,env:t,toastError:r}){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(cf,{flow:e,env:t}),(0,u.jsx)(pf,{flow:e,approval:e.approvalInfo??null}),(0,u.jsx)(uf,{flow:e}),(0,u.jsx)(ff,{flow:e}),(0,u.jsx)(mf,{message:e.submitToast?"":r}),(0,u.jsx)(gf,{flow:e})]})}function Q0({flow:e,env:t,isConnected:r,onRequestConnect:n,feeDelegated:o}){let a=Number(e.fromAmount)>0,i=le.useMemo(()=>a?e.summary??lf(e):null,[a,e]),s=sf(e.quoteError),l=rf(e.fromAmount,e.fromToken),d=l?"Insufficient balance":s.from,c=/insufficient liquidity|not enough liquidity/i.test(e.quoteError),b=c?void 0:s.to,m=e.quoteError&&!s.from&&!s.to?e.quoteError:"",g=e.error||m,y=e.status==="submitting",w=!a||!e.toAmount||!e.fromToken||!e.toToken||!e.canSubmit||!!e.quoteError||l||y,f=y?"":c&&a?"Insufficient Liquidity":a?"Continue":"Enter Amount";return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("main",{className:"bf-body bf-embedded-body","data-rd-scroll-area":!0,children:(0,u.jsxs)("div",{className:"bf-embedded-form",children:[(0,u.jsxs)("div",{className:"bf-embedded-fields",children:[(0,u.jsxs)("div",{className:"bf-embedded-field-group",children:[(0,u.jsx)(Ju,{label:"From",token:e.fromToken,amount:e.fromAmount,onAmountChange:p=>e.setAmount(p,"from"),onTokenClick:()=>{let p=Oi(e.tokens,e.fromToken);p&&e.selectFromToken(p)},onMax:e.setMax,locked:e.tokens.length<=1}),d&&(0,u.jsx)("div",{className:"bf-embedded-field-error",children:d})]}),(0,u.jsx)("div",{className:"bf-embedded-direction","aria-hidden":"true",children:(0,u.jsx)("span",{children:(0,u.jsx)(Sl,{size:16})})}),(0,u.jsxs)("div",{className:"bf-embedded-field-group",children:[(0,u.jsx)(Ju,{label:"To",token:e.toToken,amount:e.toAmount,onAmountChange:p=>e.setAmount(p,"to"),onTokenClick:()=>{let p=Oi(e.availableToTokens,e.toToken);p&&e.selectToToken(p)},locked:e.availableToTokens.length<=1}),b&&(0,u.jsx)("div",{className:"bf-embedded-field-error",children:b})]})]}),(0,u.jsx)(da,{open:!!i?.liquidity,children:i?.liquidity&&(0,u.jsxs)("section",{className:"bf-embedded-liquidity",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)("span",{children:i.liquidity.label??"Available Liquidity"}),(0,u.jsx)("span",{"data-status":i.liquidity.status,children:i.liquidity.status??"normal"})]}),(0,u.jsx)("span",{className:"bf-embedded-liquidity-track",children:(0,u.jsx)("span",{style:{width:`${i.liquidity.percentage??50}%`}})})]})}),(0,u.jsx)(da,{open:c&&a,children:(0,u.jsx)("div",{className:"bf-embedded-liquidity-error",role:"alert",children:"Insufficient liquidity in all pools for this pair and amount."})}),(0,u.jsx)(da,{open:!!i,children:i&&(0,u.jsx)("div",{className:"bf-embedded-summary",children:(0,u.jsx)(_0,{summary:i,feeDelegated:o,rateLine:L0(e.fromAmount,e.toAmount,e.fromToken,e.toToken),from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:Bi(e.fromAmount),chain:e.fromToken?To(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:Bi(e.toAmount),chain:e.toToken?To(e.toToken.chainId):void 0}})})}),(0,u.jsx)("div",{className:"bf-embedded-action-footer",children:r?(0,u.jsx)("button",{type:"button",className:"bf-embedded-cta",onClick:e.submit,"data-track":"next",disabled:w,"aria-busy":y,"aria-label":y?"Processing transaction":c?"Insufficient liquidity":"Continue with swap or bridge",children:y?(0,u.jsx)("span",{className:"bf-embedded-spinner","aria-hidden":"true"}):f}):(0,u.jsx)("button",{type:"button",className:"bf-embedded-cta",onClick:n,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})})]})}),(0,u.jsx)(H0,{flow:e,env:t,toastError:g})]})}function V0({item:e}){let t=Fi(e),r=y0(e.fromAmount,e.fromToken);return(0,u.jsxs)("article",{className:"bf-history-item",children:[(0,u.jsxs)("div",{className:"bf-history-item-head",children:[(0,u.jsx)("span",{className:"bf-history-status","data-status":t,children:v0(t)}),(0,u.jsx)("time",{className:"bf-history-time",dateTime:e.timestamp,children:b0(e.timestamp)})]}),(0,u.jsxs)("div",{className:"bf-history-item-body",children:[(0,u.jsxs)("strong",{className:"bf-history-amount",children:[w0(e.fromAmount)," ",e.fromToken.symbol]}),(0,u.jsxs)("div",{className:"bf-history-meta",children:[(0,u.jsx)("span",{className:"bf-history-usd",children:r??h0(e.txHash)}),(0,u.jsxs)("span",{className:"bf-history-route",children:[(0,u.jsxs)("span",{className:"bf-history-route-token",children:[(0,u.jsx)(pa,{token:e.fromToken,size:16}),(0,u.jsx)("span",{children:e.fromToken.symbol})]}),(0,u.jsx)(zu,{size:16,className:"bf-history-route-arrow"}),(0,u.jsxs)("span",{className:"bf-history-route-token",children:[(0,u.jsx)(pa,{token:e.toToken,size:16}),(0,u.jsx)("span",{children:e.toToken.symbol})]})]})]})]})]})}function q0({flow:e}){let[t,r]=le.useState("all"),n=e.history.some(i=>Fi(i)==="pending"),o=e.history.filter(i=>x0(i,t)),a=t==="all"?"No bridge history yet.":`No ${t} bridge history.`;return(0,u.jsxs)("main",{className:"bf-history-body",children:[(0,u.jsx)("nav",{className:"bf-history-tabs","aria-label":"Bridge history filters",children:f0.map(i=>(0,u.jsxs)("button",{type:"button",className:"bf-history-tab","data-active":t===i.value?"true":"false",onClick:()=>r(i.value),"data-track":"history_filter","data-track-id":i.value,children:[(0,u.jsx)("span",{children:i.label}),i.value==="pending"&&n&&(0,u.jsx)("span",{className:"bf-history-tab-dot","aria-hidden":"true"})]},i.value))}),o.length>0?(0,u.jsx)("div",{className:"bf-history-list",children:o.map(i=>(0,u.jsx)(V0,{item:i},i.id||i.txHash))}):(0,u.jsx)("div",{className:"bf-empty",children:a})]})}function Y0({flow:e,env:t,feeDelegated:r}){let[n,o]=le.useState(!1),[a,i]=le.useState(0),s=!!(e.fromAmount.trim()||e.toAmount.trim()),l=le.useMemo(()=>s?e.summary??lf(e):null,[s,e]),d=sr("apps.json",t,x=>Nr(x?.bridgePoweredBy?.url,t)),c=sf(e.quoteError),b=rf(e.fromAmount,e.fromToken),m=b?"Insufficient balance":c.from,g=e.quoteError&&!c.from&&!c.to?e.quoteError:"",y=e.error||g,w=e.history.some(x=>Fi(x)==="pending"),p=(l?.pathType??of(e.fromToken,e.toToken))!=="bridge";return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("main",{className:"bf-body",children:[(0,u.jsxs)("div",{className:"bf-toolbar",children:[(0,u.jsxs)("button",{type:"button",className:"bf-chip bf-chip-history",onClick:()=>e.setStep("history"),"data-track":"history_open",children:[(0,u.jsx)(Ou,{}),(0,u.jsx)("span",{children:"History"}),(w||e.hasNewHistory)&&(0,u.jsx)("span",{className:"bf-chip-dot","aria-hidden":"true"})]}),p&&(0,u.jsxs)("button",{type:"button",className:"bf-chip",onClick:()=>o(!0),"data-track":"slippage_open",disabled:e.slippageLocked,"aria-haspopup":"dialog","aria-expanded":n,children:[(0,u.jsx)(Bu,{}),(0,u.jsx)("span",{children:e.slippageLocked?"Auto 1%":m0(e.slippage,e.effectiveSlippage)})]})]}),(0,u.jsxs)("div",{className:"bf-swap-card","data-has-from-error":m?"true":"false",children:[(0,u.jsx)(Xu,{label:"From",token:e.fromToken,amount:e.fromAmount,usd:Zu(e.fromAmount,e.fromToken),onAmountChange:x=>e.setAmount(x,"from"),onTokenClick:()=>{let x=Oi(e.tokens,e.fromToken);x&&e.selectFromToken(x)},locked:e.tokens.length<=1}),m&&(0,u.jsx)("div",{className:"bf-field-error",children:m}),(0,u.jsx)("button",{type:"button",className:"bf-swap-toggle",onClick:()=>{e.swapTokens(),i(x=>x+360)},"data-track":"token_swap",style:{transform:`translateX(-50%) rotate(${a}deg)`,transition:"transform 0.2s ease"},children:(0,u.jsx)(Sl,{size:22})}),(0,u.jsx)(Xu,{label:"To",token:e.toToken,amount:e.toAmount,usd:Zu(e.toAmount,e.toToken),onAmountChange:x=>e.setAmount(x,"to"),onTokenClick:()=>{let x=Oi(e.availableToTokens,e.toToken);x&&e.selectToToken(x)},locked:e.availableToTokens.length<=1}),c.to&&(0,u.jsx)("div",{className:"bf-field-error",children:c.to})]}),(0,u.jsx)(N0,{fromAmount:e.fromAmount,toAmount:e.toAmount,fromToken:e.fromToken,toToken:e.toToken}),(0,u.jsx)(da,{open:!!l,children:l&&(0,u.jsx)(M0,{summary:l,feeDelegated:r,from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:Bi(e.fromAmount),chain:e.fromToken?To(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:Bi(e.toAmount),chain:e.toToken?To(e.toToken.chainId):void 0}})})]}),(0,u.jsxs)("footer",{className:"bf-footer",children:[(0,u.jsx)("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&&(0,u.jsxs)("a",{className:"bf-powered",href:d,target:"_blank",rel:"noreferrer",children:["Powered by ",(0,u.jsx)("span",{className:"bf-powered-brand",children:"CROSS DeFi"})]})]}),n&&(0,u.jsx)(S0,{flow:e,onClose:()=>o(!1)}),(0,u.jsx)(cf,{flow:e,env:t}),(0,u.jsx)(pf,{flow:e,approval:e.approvalInfo??null}),(0,u.jsx)(uf,{flow:e}),(0,u.jsx)(ff,{flow:e}),(0,u.jsx)(mf,{message:e.submitToast?"":y}),(0,u.jsx)(gf,{flow:e})]})}function to({onClose:e,onBackToWallet:t,feeDelegated:r,env:n,variant:o="default",title:a,isConnected:i,onRequestConnect:s,className:l,...d}){let c=le.useMemo(()=>at(n),[n]),b=Pu(),m=qu({...d,onExit:t}),g=le.useRef(null),y=u0(g),w=m.step==="history"?"History":a??"Swap & Bridge",f=i??!!d.walletAddress,p=o==="embedded"&&m.step==="form"&&!t?null:m.back;return(0,u.jsx)(Ce,{feature:"bridge",children:(0,u.jsx)($u.Provider,{value:y,children:(0,u.jsxs)("div",{ref:g,className:ze("bf-root",l),"data-view":m.step,"data-status":m.status,"data-variant":o,"data-soft-keyboard-open":o==="embedded"&&b?"true":"false",children:[(0,u.jsxs)("header",{className:"bf-header",children:[p?(0,u.jsx)("button",{type:"button",className:"bf-header-btn",onClick:p,"aria-label":"Back",children:(0,u.jsx)(un,{size:24})}):(0,u.jsx)("span",{className:"bf-header-spacer","aria-hidden":"true"}),(0,u.jsx)("span",{className:"bf-header-title","data-clickable":p?"true":"false",onClick:p??void 0,children:w}),(0,u.jsx)("button",{type:"button",className:"bf-header-btn",onClick:e,"aria-label":"Close",children:(0,u.jsx)(jr,{size:24})})]}),m.step==="history"?(0,u.jsx)(q0,{flow:m}):o==="embedded"?(0,u.jsx)(Q0,{flow:m,env:c,isConnected:f,onRequestConnect:s,feeDelegated:r}):(0,u.jsx)(Y0,{flow:m,env:c,feeDelegated:r})]})})})}var cr=V(require("react"),1),Tf=V(require("bignumber.js"),1);var xf=require("@tanstack/react-query");var K0="token-history";function vf(e,t,r,n,o=!0){return(0,xf.useInfiniteQuery)({queryKey:[K0,e,t,r.toLowerCase(),n.toLowerCase()],initialPageParam:void 0,queryFn:async({pageParam:a,signal:i})=>{let s=await Oe("walletServer",e),l=new URLSearchParams({chain_id:String(t),token:r,wallet:n}),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 c=await fetch(`${s}/v1/public/token/historical?${l}`,{cache:"no-store",signal:i});if(!c.ok)throw new Error(`Failed to fetch token history: ${c.status}`);let b=await c.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&&!!n&&!!r&&t>0,staleTime:1e4})}var Ui=V(require("react"),1);var Il={chart:!1,balance:!0,overview:!1,social:!1,history:!0},Z0=Object.keys(Il),X0="apps.json";function kf(e){let[t,r]=Ui.useState({visibility:Il,isLoaded:!1});return Ui.useEffect(()=>{let n=!0;return jn(X0,e).then(o=>{if(!n)return;let a=o?.tokenDetail?.sections,i={...Il};if(a)for(let s of Z0){let l=a[s];typeof l=="boolean"&&(i[s]=l)}r({visibility:i,isLoaded:!0})}),()=>{n=!1}},[e]),t}var mr=V(require("react"),1);var ji=require("@tanstack/react-query");var J0="token-price-history";function Rf(e,t,r,n,o=!0){return(0,ji.useQuery)({queryKey:[J0,e,t,r.toLowerCase(),n],queryFn:async({signal:a})=>{let i=await Oe("walletServer",e),s=new URLSearchParams({chain_id:String(t),token:r,interval:n}),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&&!!r&&t>0,staleTime:3e4,placeholderData:ji.keepPreviousData})}var ct=require("react/jsx-runtime"),$0="var(--ds-system-green-high, #00a869)",ew="var(--wi-error, #e70077)",ro=150,Wi=3,El=18,tw=18,rw=[{key:"10m",label:"10m"},{key:"1h",label:"1H"},{key:"1d",label:"1D"},{key:"7d",label:"1W"},{key:"30d",label:"1M"},{key:"1y",label:"1Y"}],nw=new Set(["7d","30d","1y"]);function ow(){let e=mr.useRef(null),[t,r]=mr.useState(0);return mr.useEffect(()=>{let n=e.current;if(!n)return;let o=new ResizeObserver(a=>{r(a[0]?.contentRect.width??0)});return o.observe(n),r(n.clientWidth),()=>o.disconnect()},[]),[e,t]}function aw(e,t){let r=new Date(e*1e3),n=t?{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}:{hour:"numeric",minute:"2-digit"};return new Intl.DateTimeFormat("en-US",n).format(r)}function iw(e,t){if(t<=0||e.length===0)return null;let r=e.length===1?[e[0],e[0]]:e,n=r.length,o=r[0],a=r[0],i=0,s=0;for(let x=1;x<n;x++)r[x]>o&&(o=r[x],i=x),r[x]<a&&(a=r[x],s=x);let l=o-a||1,d=Math.max(1,t-Wi*2),c=ro-El-tw,b=x=>n===1?t/2:Wi+x/(n-1)*d,m=x=>El+(1-(x-a)/l)*c,g=r.map((x,h)=>({x:b(h),y:m(x)})),y=g.map((x,h)=>`${h===0?"M":"L"}${x.x.toFixed(2)},${x.y.toFixed(2)}`).join(" "),w=g[0],f=g[g.length-1],p=`${y} L${f.x.toFixed(2)},${ro} L${w.x.toFixed(2)},${ro} Z`;return{values:r,points:g,linePath:y,areaPath:p,maxIdx:i,minIdx:s}}function Sf({env:e,chainId:t,tokenAddress:r}){let[n,o]=mr.useState("1d"),[a,i]=mr.useState(null),s=mr.useId(),[l,d]=ow(),{data:c,isLoading:b,isError:m}=Rf(e,t,r,n,!0),g=mr.useMemo(()=>(c??[]).filter(O=>Number.isFinite(Number(O.price))).slice().sort((O,ce)=>O.updated_at-ce.updated_at),[c]),y=mr.useMemo(()=>g.map(A=>Number(A.price)),[g]),w=mr.useMemo(()=>iw(y,d),[y,d]);mr.useEffect(()=>{i(null)},[n]);let f=g.length>0,p=a!==null&&a<y.length?a:y.length-1,x=f?y[p]:0,h=f?y[0]:0,v=h!==0?(x-h)/h*100:0,R=v>=0,S=R?$0:ew,T=(R?"+":"-")+(Math.floor(Math.abs(v)*100)/100).toFixed(2)+"%",C=a!==null&&g[a]?aw(g[a].updated_at,nw.has(n)):"",N=A=>{if(!w||d<=0)return;let O=A.currentTarget.getBoundingClientRect(),ce=A.clientX-O.left;if(w.values.length<=1){i(0);return}let P=Math.max(1,d-Wi*2),xe=Math.min(1,Math.max(0,(ce-Wi)/P)),ne=Math.round(xe*(g.length-1));i(Math.min(g.length-1,Math.max(0,ne)))},E=()=>i(null);if(!b&&(m||!f))return null;let M=a!==null&&w&&w.points[a]?w.points[a]:null,W=w?.points[w.maxIdx],L=w?.points[w.minIdx],H=A=>Math.min(Math.max(A,24),Math.max(24,d-24));return(0,ct.jsxs)("section",{className:"wi-td-chart",children:[(0,ct.jsxs)("div",{className:"wi-td-chart-panel",children:[(0,ct.jsx)("span",{className:"wi-td-chart-price",children:f?qn(x):"\u2014"}),f&&(0,ct.jsxs)("span",{className:"wi-td-chart-change","data-positive":R,children:[(0,ct.jsx)("span",{children:T}),C&&(0,ct.jsx)("span",{className:"wi-td-chart-when",children:C})]})]}),(0,ct.jsx)("div",{ref:l,className:"wi-td-chart-plot",children:b&&!f?(0,ct.jsx)("div",{className:"wi-skeleton-block wi-td-chart-skeleton"}):w&&d>0&&(0,ct.jsxs)("svg",{className:"wi-td-chart-svg",width:d,height:ro,role:"img","aria-label":"Price chart",children:[(0,ct.jsx)("defs",{children:(0,ct.jsxs)("linearGradient",{id:s,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,ct.jsx)("stop",{offset:"0%",stopColor:S,stopOpacity:.28}),(0,ct.jsx)("stop",{offset:"100%",stopColor:S,stopOpacity:0})]})}),(0,ct.jsx)("path",{d:w.areaPath,fill:`url(#${s})`}),(0,ct.jsx)("path",{d:w.linePath,fill:"none",stroke:S,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),W&&(0,ct.jsx)("text",{className:"wi-td-chart-minmax",x:H(W.x),y:Math.max(11,W.y-7),textAnchor:"middle",children:qn(w.values[w.maxIdx])}),L&&w.minIdx!==w.maxIdx&&(0,ct.jsx)("text",{className:"wi-td-chart-minmax",x:H(L.x),y:Math.min(ro-5,L.y+14),textAnchor:"middle",children:qn(w.values[w.minIdx])}),M&&(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)("line",{className:"wi-td-chart-cursor",x1:M.x,y1:El-6,x2:M.x,y2:ro}),(0,ct.jsx)("circle",{cx:M.x,cy:M.y,r:4,fill:S,stroke:"var(--wi-surface-bg, #121212)",strokeWidth:2})]}),(0,ct.jsx)("rect",{x:0,y:0,width:d,height:ro,fill:"transparent",style:{touchAction:"none"},onPointerMove:N,onPointerDown:N,onPointerLeave:E,onPointerCancel:E})]})}),(0,ct.jsx)("div",{className:"wi-td-chart-tabs",role:"tablist",children:rw.map(A=>(0,ct.jsx)("button",{type:"button",role:"tab","aria-selected":n===A.key,className:"wi-td-chart-tab","data-active":n===A.key||void 0,onClick:()=>o(A.key),"data-track":"token_detail_interval","data-track-id":A.key,children:A.label},A.key))})]})}var D=require("react/jsx-runtime"),sw="https://contents.crosstoken.io/wallet/token/images/FT.png",lw={receive:"Receive",send:"Send","bridge-in":"Bridge In","bridge-out":"Bridge Out"};function dw(e){return e.length>24?"xs":e.length>18?"sm":"md"}function cw(e){if(!e)return"";let t=e<1e12?e*1e3:e,r=Math.max(0,Math.floor((Date.now()-t)/1e3));if(r<60)return"just now";let n=Math.floor(r/60);if(n<60)return`${n}m`;let o=Math.floor(n/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 Cf(e){let[t,r]=e.split("."),n="";for(let o=0;o<t.length;o++){let a=t.length-o;o>0&&a%3===0&&(n+=","),n+=t[o]}return r?`${n}.${r}`:n}function Nf(e,t){let r=BigInt(e||"0");if(t<=2){let i=10n**BigInt(t),s=r/i,l=r%i*10n**BigInt(2-t);return`${s.toString()}.${l.toString().padStart(2,"0")}`}let n=r/10n**BigInt(t-2),o=n/100n,a=n%100n;return`${o.toString()}.${a.toString().padStart(2,"0")}`}function pw(e,t,r){let n=cr.useRef(null),o=cr.useRef(null),[a,i]=cr.useState(t);return cr.useLayoutEffect(()=>{let s=n.current,l=o.current;if(!s||!l)return;let d=()=>{let b=s.clientWidth;if(!b)return;let m=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:${m.fontFamily}`,`font-weight:${m.fontWeight}`,`letter-spacing:${m.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(r,Math.floor(t*b/y));i(w)};d();let c=new ResizeObserver(d);return c.observe(s),()=>c.disconnect()},[e,t,r]),{containerRef:n,textRef:o,fontSize:a}}function uw(e){let t=mt(e);return t?t.decimalPlaces(4,Tf.default.ROUND_DOWN).toFormat():"-"}function fw(){return(0,D.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[(0,D.jsx)("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.6"}),(0,D.jsx)("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 mw(){return(0,D.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,D.jsx)("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 gw(){return(0,D.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,D.jsx)("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 hw(){return(0,D.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,D.jsx)("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 If({env:e,isMobile:t,token:r,walletAddress:n,stat:o,tokenInfo:a,showBalance:i=!0,onBack:s,onClose:l,onSend:d,onOutlink:c}){let b=r.quantity.decimals,[m,g]=cr.useState(!1),{buildTxUrl:y,chainInfo:w}=cc(e,r.chainId,!0),{visibility:f}=kf(e),{data:p,isLoading:x,isError:h,fetchNextPage:v,hasNextPage:R,isFetchingNextPage:S,refetch:T}=vf(e,r.chainId,r.address,n,!0),C=cr.useMemo(()=>p?.pages?p.pages.flat():[],[p]),N=cr.useRef(null);cr.useEffect(()=>{if(!t)return;let U=N.current;if(!U||!R)return;let te=new IntersectionObserver(Z=>{Z[0]?.isIntersecting&&!S&&v()},{rootMargin:"120px"});return te.observe(U),()=>te.disconnect()},[t,R,S,v]);let E=cr.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(r.address).then(()=>{g(!0),setTimeout(()=>g(!1),1500)}).catch(()=>{})},[r.address]),M=Cf(Nf(r.quantity.numeric,b)),W=o?.price?Ja(r.quantity.numeric,b,o.price):null,L=i?M:"\u2022\u2022\u2022\u2022",{containerRef:H,textRef:A,fontSize:O}=pw(L,30,14),X=go(r.chainId,e).name??w?.name??`Chain ${r.chainId}`,P=w?.explorer_url,xe=a?.deployed??!0,ne=cr.useMemo(()=>{let U=[];return a?.info_url&&U.push({key:"web",label:"Website",url:a.info_url,icon:(0,D.jsx)(fw,{})}),a?.telegram_url&&U.push({key:"tg",label:"Telegram",url:a.telegram_url,icon:(0,D.jsx)(mw,{})}),a?.x_url&&U.push({key:"x",label:"X",url:a.x_url,icon:(0,D.jsx)(gw,{})}),a?.medium_url&&U.push({key:"medium",label:"Medium",url:a.medium_url,icon:(0,D.jsx)(hw,{})}),U},[a]),K=(U,te,Z,be)=>{Qt(U,te,{category:"token-detail",origin:Z,payload:{address:r.address,txHash:be}},c)};return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)("div",{className:"wi-sticky-header",children:[(0,D.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,D.jsx)("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:(0,D.jsx)(un,{size:24})}),(0,D.jsxs)("span",{className:"wi-td-header-title",children:[(0,D.jsx)("img",{src:r.icon_url,alt:"","aria-hidden":!0,className:"wi-td-header-icon",width:24,height:24,draggable:!1,onError:U=>{U.currentTarget.src=sw}}),(0,D.jsx)("span",{className:"wi-td-header-name",children:r.symbol})]}),(0,D.jsx)("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close",children:(0,D.jsx)(jr,{size:24})})]}),(0,D.jsx)("hr",{className:"wi-divider"})]}),(0,D.jsxs)("div",{className:"wi-td-scroll",children:[f.chart&&(0,D.jsx)(Sf,{env:e,chainId:r.chainId,tokenAddress:r.address}),f.balance&&(0,D.jsxs)("section",{className:"wi-td-balance-card",children:[(0,D.jsxs)("div",{className:"wi-td-balance-left",ref:H,children:[(0,D.jsx)("span",{className:"wi-td-balance-label",children:"My Balance"}),(0,D.jsx)("span",{className:"wi-td-balance-amount",ref:A,style:{fontSize:O},children:L}),i&&W&&(0,D.jsx)("span",{className:"wi-td-balance-fiat",children:W})]}),(0,D.jsx)("button",{type:"button",className:"wi-td-send-btn",onClick:()=>d(r),"aria-label":`Send ${r.symbol}`,"data-track":"token_detail_send","data-track-id":r.symbol,children:(0,D.jsx)("span",{children:"Send"})})]}),f.overview&&(0,D.jsxs)("section",{className:"wi-td-section",children:[(0,D.jsx)("h3",{className:"wi-td-section-title",children:"Crypto Overview"}),(0,D.jsxs)("div",{className:"wi-td-rows",children:[(0,D.jsxs)("div",{className:"wi-td-row",children:[(0,D.jsx)("span",{className:"wi-td-row-label",children:"Network"}),P?(0,D.jsxs)("a",{className:"wi-td-row-value wi-td-row-link",href:P,target:"_blank",rel:"noopener noreferrer",onClick:U=>K(U,P,"token-network"),children:[(0,D.jsx)("span",{children:X}),(0,D.jsx)(bw,{})]}):(0,D.jsx)("span",{className:"wi-td-row-value",children:X})]}),(0,D.jsxs)("div",{className:"wi-td-row",children:[(0,D.jsx)("span",{className:"wi-td-row-label",children:"Contract Address"}),(0,D.jsxs)("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:E,"aria-label":"Copy contract address",children:[(0,D.jsx)("span",{children:dr(r.address)}),m?(0,D.jsx)(pn,{size:14}):(0,D.jsx)(Vn,{size:14})]})]}),(0,D.jsxs)("div",{className:"wi-td-row",children:[(0,D.jsx)("span",{className:"wi-td-row-label",children:"Decimals"}),(0,D.jsx)("span",{className:"wi-td-row-value",children:b})]}),(0,D.jsxs)("div",{className:"wi-td-row",children:[(0,D.jsx)("span",{className:"wi-td-row-label",children:"Total Supply"}),(0,D.jsx)("span",{className:"wi-td-row-value",children:uw(o?.circulating_supply)})]})]})]}),f.social&&ne.length>0&&(0,D.jsxs)("section",{className:"wi-td-section",children:[(0,D.jsx)("h3",{className:"wi-td-section-title",children:"Social Media"}),(0,D.jsx)("div",{className:"wi-td-social-row",children:ne.map(U=>(0,D.jsx)("a",{className:"wi-td-social-btn",href:U.url,target:"_blank",rel:"noopener noreferrer","aria-label":U.label,onClick:te=>K(te,U.url,"token-social"),children:U.icon},U.key))})]}),f.history&&(0,D.jsxs)("section",{className:"wi-td-section",children:[(0,D.jsx)("h3",{className:"wi-td-section-title",children:"Token History"}),x&&(0,D.jsx)("div",{className:"wi-td-history-list",children:Array.from({length:3},(U,te)=>(0,D.jsxs)("div",{className:"wi-td-history-skeleton",children:[(0,D.jsx)("div",{className:"wi-skeleton-block",style:{width:90,height:14}}),(0,D.jsx)("div",{className:"wi-skeleton-block",style:{width:60,height:14}})]},`td-sk-${te}`))}),!x&&h&&(0,D.jsxs)("div",{className:"wi-td-history-empty",children:[(0,D.jsx)("span",{children:"Failed to load history."}),(0,D.jsx)("button",{type:"button",className:"wi-td-retry-btn",onClick:()=>T(),children:"Retry"})]}),!x&&!h&&C.length===0&&(0,D.jsx)("div",{className:"wi-td-history-empty",children:(0,D.jsx)("span",{children:"No transactions found."})}),!x&&!h&&C.length>0&&(0,D.jsxs)("div",{className:"wi-td-history-list",children:[C.map((U,te)=>{let Z=U.to_alias?.toLowerCase().includes("bridge")??!1,be=U.from_alias?.toLowerCase().includes("bridge")??!1,Ne=Z?"bridge-out":be?"bridge-in":U.to?.toLowerCase()===n.toLowerCase()?"receive":"send",re=Ne==="receive"||Ne==="bridge-in",we=re?U.from:U.to,Fe=Cf(Nf(U.amount,b)),Ae=y(U.tx),pt=cw(U.timestamp),ye=(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)("div",{className:"wi-td-history-top",children:[(0,D.jsx)("span",{className:"wi-td-history-type","data-direction":Ne,children:lw[Ne]}),(0,D.jsx)("span",{className:"wi-td-history-counter",children:dr(we??"")})]}),(0,D.jsxs)("div",{className:"wi-td-history-bottom",children:[(0,D.jsxs)("span",{className:"wi-td-history-meta",children:[(0,D.jsx)("span",{className:"wi-td-history-status","data-status":U.status,children:U.status==="success"?"Success":"Failed"}),pt&&(0,D.jsx)("span",{className:"wi-td-history-time",children:pt})]}),(0,D.jsxs)("span",{className:"wi-td-history-amount","data-size":dw(`${re?"+":"-"}${Fe} ${r.symbol}`),children:[re?"+":"-",Fe," ",r.symbol]})]})]}),De=`${U.tx}-${U.log_index}-${te}`;return Ae?(0,D.jsx)("a",{className:"wi-td-history-item wi-td-history-item--link",href:Ae,target:"_blank",rel:"noopener noreferrer",onClick:ut=>K(ut,Ae,"token-tx",U.tx),children:ye},De):(0,D.jsx)("div",{className:"wi-td-history-item",children:ye},De)}),R&&(t?(0,D.jsx)("div",{ref:N,className:"wi-td-history-sentinel",children:S&&(0,D.jsx)("span",{className:"wi-td-history-loading",children:"Loading\u2026"})}):(0,D.jsx)("button",{type:"button",className:"wi-td-loadmore-btn",onClick:()=>v(),disabled:S,children:S?"Loading\u2026":"Load more"}))]})]})]})]})}function bw(){return(0,D.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",className:ze("wi-td-external-icon"),"aria-hidden":!0,children:(0,D.jsx)("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"})})}var k=require("react/jsx-runtime"),ww="On-ramp is not available in your region.";function Ml(e,t,r){let n=It[e],o=r.toUpperCase();if(t===n.cross&&o.includes("ONEUSD"))return 0;if(t===n.cross&&o==="ONE")return 1;if(t===n.bsc&&o==="ONE")return 2}function yw(e){return parseInt(e.split(":")[1],10)}function xw(e){if(typeof window>"u"||!e?.length)return!1;let{origin:t,pathname:r}=window.location,n=t+r;return e.some(o=>n===o||n.startsWith(`${o}/`))}function vw(e){let t=e.lastIndexOf(".");return t===-1?{main:e,decimal:""}:{main:e.slice(0,t),decimal:e.slice(t)}}function kw(e){let t=e.toLowerCase().replace(/^0x/,""),r=t.length>=8?t.slice(0,8):t.padEnd(8,"0"),n=parseInt(r.slice(0,4),16)%360,o=(n+60+parseInt(r.slice(4,8),16)%120)%360;return`linear-gradient(135deg, hsl(${n} 85% 65%), hsl(${o} 80% 55%))`}function Rw(e,t=.5){let r=oe.useRef(null),n=oe.useRef(null),[o,a]=oe.useState(1);return oe.useLayoutEffect(()=>{let i=r.current,s=n.current;if(!i||!s)return;let l=()=>{let c=i.clientWidth;if(!c)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 m=b.offsetWidth;i.removeChild(b);let g=m>c?Math.max(t,c/m):1;a(g)};l();let d=new ResizeObserver(l);return d.observe(i),()=>d.disconnect()},[e,t]),{containerRef:r,valueRef:n,scale:o}}function Mf({align:e="end",sideOffset:t=12,className:r,children:n}){let{env:o,theme:a,isMobile:i,open:s,drawerDirection:l,modal:d,showBalance:c,showForgeToken:b,showGameToken:m,showQR:g,showBridge:y,qrLogoSrc:w,walletAddress:f,accountName:p,sendAccounts:x,profileImageUrl:h,preferredTokens:v,close:R,onSelectWallet:S,onCopyAddress:T,onBuy:C,onDisconnect:N,disconnectLabel:E,termsUrl:M,termsLabel:W,privacyUrl:L,privacyLabel:H,portalStyle:A,navContent:O,navPosition:ce,footerContent:X,view:P,setView:xe,selectedSendToken:ne,setSelectedSendToken:K,selectedDetailToken:U,setSelectedDetailToken:te,showPortfolio:Z,portfolioTitle:be,portfolioSections:Ne,showTotalAssets:re,totalAssetsLabel:we,sendTransaction:Fe,getTransactionReceipt:Ae,estimateGas:pt,onOutlink:ye,lpBalanceReader:De,stakingRewardsReader:ut,bridgeTokens:Be,bridgeHistory:Ge,getBridgeQuote:Ue,getBridgeToTokens:st,getBridgeApproval:Ht,approveBridge:St,submitBridge:jt,onReceive:Ie,onSend:Wt,onBuyDisabledMessage:tt,onBridgeDisabledMessage:At,onSendDisabledMessage:qe}=Nn(),[Xe,nr]=oe.useState(null),Gt=oe.useRef(void 0),Ye=oe.useCallback(I=>{nr(I),clearTimeout(Gt.current),Gt.current=setTimeout(()=>nr(null),4e3)},[]);oe.useEffect(()=>()=>clearTimeout(Gt.current),[]);let wt=!!tt,rt=oe.useCallback(()=>{if(wt){Ye(tt);return}let I=C?.();I&&typeof I.then=="function"&&I.catch(()=>{Ye(tt??ww)})},[wt,tt,C,Ye]),_e=!!At,ft=!!qe,{tokens:Lt,isLoading:je}=mn(o,f,s&&c),{statsMap:nt}=gn(o,c),{aprPercent:qt}=ep(),{categoryMap:F,infoMap:Je}=rp(o,c),B=c&&re,{displayValue:se,isLowerBound:ve,isLoading:Te}=ap(o,f,s&&B),[ot,or]=oe.useState(!1),ur=oe.useRef(null),[Or,dn]=oe.useState(0),{holdings:Rr,isLoading:cn}=Yc(o,f,s&&c&&b),Br=oe.useMemo(()=>Rr.map(I=>I.token),[Rr]),{imageMap:ie}=Kc(o,Br,b&&Rr.length>0),Se=oe.useMemo(()=>{let I=[],me=[],Qe=[],fr=new Map((v??[]).map((et,ir)=>[`${yw(et.chainId)}:${et.address.toLowerCase()}`,ir]));for(let et of Lt){let ir=Ml(o,et.chainId,et.symbol)!==void 0,Fr=`${et.chainId}:${et.address.toLowerCase()}`,Un=fr.get(Fr),Ps=(mt(et.quantity.numeric)??new Eo.default(0)).shiftedBy(-et.quantity.decimals);if(ir)I.push(et);else if(Un!==void 0)me.push(et);else if(Ps.isGreaterThan(0)){if(!m&&F.get($o(et.chainId,et.address))==="game")continue;Qe.push(et)}}return I.sort((et,ir)=>{let Fr=Ml(o,et.chainId,et.symbol)??99,Un=Ml(o,ir.chainId,ir.symbol)??99;return Fr-Un}),me.sort((et,ir)=>{let Fr=fr.get(`${et.chainId}:${et.address.toLowerCase()}`)??99,Un=fr.get(`${ir.chainId}:${ir.address.toLowerCase()}`)??99;return Fr-Un}),Qe.sort((et,ir)=>{let Fr=nt.get(Ir(et.chainId,et.address)),Un=nt.get(Ir(ir.chainId,ir.address)),Ps=(mt(et.quantity.numeric)??new Eo.default(0)).shiftedBy(-et.quantity.decimals).multipliedBy(mt(Fr?.price)??0);return(mt(ir.quantity.numeric)??new Eo.default(0)).shiftedBy(-ir.quantity.decimals).multipliedBy(mt(Un?.price)??0).minus(Ps).toNumber()}),[...I,...me,...Qe]},[Lt,o,nt,m,F,v]),G=oe.useMemo(()=>{if(!b)return[];let I=new Set(Lt.map(me=>me.address.toLowerCase()));return[...Rr].filter(me=>!I.has(me.token.toLowerCase())).sort((me,Qe)=>{let fr=mt(me.value)??new Eo.default(0);return(mt(Qe.value)??new Eo.default(0)).minus(fr).toNumber()})},[Rr,b,Lt]),Pe=oe.useRef(!1),[q,He]=oe.useState(null),Yr=oe.useRef(void 0),zn=q?.chainId??ne?.chainId??Se[0]?.chainId??0,{transactionUrl:Sr}=Yo(o,zn,q?.txHash,!!(q?.txHash&&zn)),Tt=oe.useCallback(I=>{Pe.current=!0,xe(I)},[xe]),[Ts,Uo]=oe.useState("recipient"),uo=oe.useCallback(()=>{K(null),Uo("recipient"),Tt("wallet")},[K,Tt]),Fn=oe.useCallback((I,me="recipient")=>{if(ft){Ye(qe);return}Uo(me),K(I),Tt("send")},[ft,qe,Ye,K,Tt]),fo=oe.useCallback(I=>{te(I),Tt("token-detail")},[te,Tt]),Is=oe.useCallback(()=>{te(null),Tt("wallet")},[te,Tt]),Es=oe.useCallback(I=>{Fn(I,"recipient")},[Fn]),mo=sr("apps.json",o,I=>Nr(I?.gametokenBridge,o)),Oa=sr("apps.json",o,I=>I?.gametokenSites),Ms=oe.useCallback(()=>{if(_e){Ye(At);return}if(mo){if(xw(Oa)){window.location.assign(mo);return}window.open(mo,"_blank","noopener,noreferrer")}},[_e,At,mo,Oa,Ye]),As=oe.useCallback(I=>{clearTimeout(Yr.current),K(null),Tt("wallet"),He({status:"pending",txHash:I.txHash,chainId:I.chainId,description:`${I.amount} ${I.tokenSymbol} to ${dr(I.recipient)}`})},[K,Tt]),_=oe.useCallback(I=>{let me=ne?.chainId;K(null),Tt("wallet"),!(!I||!me)&&(He(Qe=>({status:"success",txHash:I,chainId:me,description:Qe?.txHash===I?Qe.description:"Tap to see your transaction"})),clearTimeout(Yr.current),Yr.current=setTimeout(()=>He(null),5e3))},[ne?.chainId,K,Tt]),vt=oe.useCallback(I=>{let me=I.txHash;me&&(He({status:"error",txHash:me,chainId:I.chainId,description:I.message}),clearTimeout(Yr.current),Yr.current=setTimeout(()=>He(null),5e3))},[]),Yt=oe.useMemo(()=>{if(Ie)return Ie;if(g)return()=>Tt("qr")},[Ie,g,Tt]),Dt=oe.useMemo(()=>{if(Wt)return Wt;if(Se.length===0)return;let I=Se[0];return()=>Fn(I,"token")},[Wt,Se,Fn]),zr=oe.useCallback(()=>{if(ft){Ye(qe);return}Dt?.()},[ft,qe,Dt,Ye]);oe.useEffect(()=>{s||(Pe.current=!1,Uo("recipient"))},[s]);let Jt=oe.useRef(null);oe.useEffect(()=>{let I=Jt.current;if(!I||!i)return;let me=Qe=>{Qe.pointerType==="touch"&&Qe.stopPropagation()};return I.addEventListener("pointerdown",me),()=>I.removeEventListener("pointerdown",me)},[i]);let[ar,$e]=oe.useState(!1),Cr=oe.useRef(void 0),[Kr,jo]=oe.useState(!1);oe.useEffect(()=>{if(!Kr)return;let I=()=>jo(!1),me=fr=>{fr.key==="Escape"&&jo(!1)},Qe=setTimeout(()=>{document.addEventListener("mousedown",I,!0),document.addEventListener("keydown",me,!0)},0);return()=>{clearTimeout(Qe),document.removeEventListener("mousedown",I,!0),document.removeEventListener("keydown",me,!0)}},[Kr]),oe.useEffect(()=>{jo(!1)},[f]),oe.useEffect(()=>()=>clearTimeout(Cr.current),[]),oe.useEffect(()=>()=>clearTimeout(Yr.current),[]),oe.useEffect(()=>{let I=ur.current;if(!I||X===null){dn(0);return}let me=()=>{dn(I.offsetHeight)};if(me(),typeof ResizeObserver>"u")return;let Qe=new ResizeObserver(me);return Qe.observe(I),()=>Qe.disconnect()},[X]);let sd=oe.useCallback(async()=>{if(!ar)try{await navigator.clipboard.writeText(f),$e(!0),clearTimeout(Cr.current),Cr.current=setTimeout(()=>$e(!1),2e3),T?.(f,!0)}catch{T?.(f,!1)}},[f,T,ar]),Ba=oe.useCallback(I=>{I.currentTarget.setAttribute("data-loaded","true")},[]),ld=oe.useMemo(()=>({background:kw(f)}),[f]),za=oe.useMemo(()=>h||fn(o,f,{size:120,bg:a==="dark"?"1A1A2E":"F3F6F8"}),[h,o,f,a]),Ls=oe.useMemo(()=>vw(se),[se]),{containerRef:yg,valueRef:xg,scale:vg}=Rw(ot?"\u2022\u2022\u2022\u2022\u2022\u2022":se),dd=M||L?(0,k.jsxs)("div",{className:"wi-legal-links",children:[M&&(0,k.jsx)("a",{className:"wi-legal-link",href:M,target:"_blank",rel:"noopener noreferrer","data-track":"terms_link",onClick:I=>Qt(I,M,{category:"terms",origin:"terms"},ye),children:W}),M&&L&&(0,k.jsx)("span",{className:"wi-legal-sep","aria-hidden":!0,children:"\xB7"}),L&&(0,k.jsx)("a",{className:"wi-legal-link",href:L,target:"_blank",rel:"noopener noreferrer","data-track":"privacy_link",onClick:I=>Qt(I,L,{category:"privacy",origin:"privacy"},ye),children:H})]}):null,cd=N?(0,k.jsxs)("button",{type:"button",className:"wi-disconnect-btn","data-track":"disconnect",onClick:()=>{N(),R()},children:[(0,k.jsx)(Zd,{size:16}),(0,k.jsx)("span",{className:"wi-disconnect-label",children:E})]}):null,kg=c&&!O?(0,k.jsxs)("div",{className:"wi-action-row","aria-label":"Wallet actions",children:[(0,k.jsxs)("button",{type:"button",className:ze("wi-action-card",wt&&"wi-action-card--dimmed"),onClick:rt,disabled:!C&&!wt,"aria-disabled":wt||void 0,"aria-label":"Buy","data-track":"buy",children:[(0,k.jsx)(rc,{size:20}),(0,k.jsx)("span",{children:"Buy"})]}),y?(0,k.jsxs)("button",{type:"button",className:ze("wi-action-card",_e&&"wi-action-card--dimmed"),onClick:Ms,"aria-disabled":_e||void 0,"aria-label":"Bridge","data-track":"bridge_open",children:[(0,k.jsx)(nc,{size:20}),(0,k.jsx)("span",{children:"Bridge"})]}):(0,k.jsxs)("button",{type:"button",className:"wi-action-card",onClick:Yt,disabled:!Yt,"aria-label":"Receive","data-track":"receive",children:[(0,k.jsx)(Xa,{size:20}),(0,k.jsx)("span",{children:"Receive"})]}),(0,k.jsxs)("button",{type:"button",className:ze("wi-action-card",ft&&"wi-action-card--dimmed"),onClick:zr,disabled:!ft&&!Dt,"aria-disabled":ft||void 0,"aria-label":"Send","data-track":"send_open",children:[(0,k.jsx)(ec,{size:20}),(0,k.jsx)("span",{children:"Send"})]}),Z?(0,k.jsxs)("button",{type:"button",className:"wi-action-card",onClick:()=>Tt("portfolio"),"aria-label":"View portfolio","data-track":"portfolio_open",children:[(0,k.jsx)(tc,{size:20}),(0,k.jsx)("span",{children:"Portfolio"})]}):y?(0,k.jsxs)("button",{type:"button",className:"wi-action-card",onClick:Yt,disabled:!Yt,"aria-label":"Receive","data-track":"receive",children:[(0,k.jsx)(Xa,{size:20}),(0,k.jsx)("span",{children:"Receive"})]}):null]}):null,Rg=(0,k.jsxs)("div",{className:ze("wi-view-inner",Pe.current&&"wi-view-wallet"),children:[B&&(0,k.jsxs)("div",{className:"wi-total-section",children:[(0,k.jsxs)("div",{className:"wi-total-head",children:[(0,k.jsx)("span",{className:"wi-total-label",children:we}),(0,k.jsx)("span",{role:"button",tabIndex:0,className:"wi-total-eye",onClick:I=>{I.stopPropagation(),or(me=>!me)},onKeyDown:I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),I.stopPropagation(),or(me=>!me))},"aria-label":ot?"Show balance":"Hide balance","data-track":"balance_toggle",children:ot?(0,k.jsx)(Jd,{}):(0,k.jsx)(Xd,{})})]}),(0,k.jsx)("div",{className:"wi-total-body",ref:yg,children:Te?(0,k.jsx)("div",{className:"wi-skeleton-block wi-total-skeleton",style:{width:160,height:42}}):(0,k.jsx)("div",{className:"wi-total-value","data-hidden":ot||void 0,ref:xg,style:{"--wi-total-scale":vg},children:ot?(0,k.jsx)("span",{className:"wi-total-mask",children:"\u2022\u2022\u2022\u2022\u2022\u2022"}):(0,k.jsxs)(k.Fragment,{children:[ve&&(0,k.jsx)("span",{className:"wi-total-lte",children:"\u2264"}),(0,k.jsx)("span",{className:"wi-total-currency",children:"$"}),(0,k.jsx)("span",{className:"wi-total-amount",children:Ls.main}),Ls.decimal&&(0,k.jsx)("span",{className:"wi-total-decimal",children:Ls.decimal})]})})})]}),ce==="top"&&(O?(0,k.jsx)("div",{className:"wi-nav-fixed",children:O}):kg),c&&(0,k.jsx)("div",{ref:Jt,className:"wi-scrollable-body","data-vaul-no-drag":!0,children:(0,k.jsxs)("div",{className:"wi-token-list",children:[je&&Array.from({length:5},(I,me)=>(0,k.jsxs)("div",{className:"wi-skeleton-item",children:[(0,k.jsxs)("div",{className:"wi-skeleton-left",children:[(0,k.jsx)("div",{className:"wi-skeleton-block wi-skeleton-icon"}),(0,k.jsxs)("div",{className:"wi-skeleton-lines",children:[(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),(0,k.jsxs)("div",{className:"wi-skeleton-right",children:[(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},me)),!je&&Se.length===0&&!b&&(0,k.jsx)("div",{className:"wi-empty",children:"No Tokens Found"}),Se.map(I=>{let me=nt.get(Ir(I.chainId,I.address)),Qe=me?parseFloat(me.percent_change_24h):null,fr=Qe!==null&&Qe>=0,et=Zo(o,I.chainId),ir=Nc(I.address);return(0,k.jsxs)("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>fo(I),"aria-label":`View ${I.symbol} detail`,"data-track":"token_detail","data-track-id":I.symbol,children:[(0,k.jsxs)("div",{className:"wi-token-left",children:[(0,k.jsxs)("div",{className:"wi-token-icon-wrap",children:[(0,k.jsx)("img",{src:I.icon_url,alt:I.symbol,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:Ba,onError:Fr=>{Fr.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),et&&(0,k.jsx)("img",{src:et,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:Fr=>{Fr.currentTarget.style.display="none"}})]}),(0,k.jsxs)("div",{className:"wi-token-info",children:[(0,k.jsxs)("span",{className:"wi-token-name-row",children:[(0,k.jsx)("span",{className:"wi-token-name",children:I.symbol}),ir&&qt!==null&&(0,k.jsx)("span",{className:"wi-token-apr",children:gi(qt)})]}),me&&(0,k.jsxs)("div",{className:"wi-token-price-row",children:[(0,k.jsx)("span",{className:"wi-token-price",children:qn(me.price)}),(0,k.jsx)("span",{className:"wi-token-change","data-positive":fr,"data-zero":Qe===0||void 0,children:Qe!==null&&(Qe===0?"0%":`${fr?"+":"-"}${(fr?Math.floor:Math.ceil)(Math.abs(Qe)*100)/100}%`)})]})]})]}),(0,k.jsxs)("div",{className:"wi-token-right",children:[(0,k.jsx)("span",{className:"wi-token-balance",children:In(I.quantity.numeric,I.quantity.decimals)}),me&&(0,k.jsx)("span",{className:"wi-token-value",children:Ja(I.quantity.numeric,I.quantity.decimals,me.price)})]})]},`${I.address}-${I.chainId}`)}),b&&cn&&Array.from({length:3},(I,me)=>(0,k.jsxs)("div",{className:"wi-skeleton-item",children:[(0,k.jsxs)("div",{className:"wi-skeleton-left",children:[(0,k.jsx)("div",{className:"wi-skeleton-block wi-skeleton-icon"}),(0,k.jsxs)("div",{className:"wi-skeleton-lines",children:[(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),(0,k.jsxs)("div",{className:"wi-skeleton-right",children:[(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},`forge-sk-${me}`)),b&&!cn&&!je&&Se.length===0&&G.length===0&&(0,k.jsx)("div",{className:"wi-empty",children:"No Tokens Found"}),b&&G.map(I=>{let me=ie.get(I.token)||"",Qe=Zo(o,It[o].cross);return(0,k.jsxs)("div",{className:"wi-token-item",children:[(0,k.jsxs)("div",{className:"wi-token-left",children:[(0,k.jsxs)("div",{className:"wi-token-icon-wrap",children:[(0,k.jsx)("img",{src:me||"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:Ba,onError:fr=>{fr.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),Qe&&(0,k.jsx)("img",{src:Qe,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:fr=>{fr.currentTarget.style.display="none"}})]}),(0,k.jsxs)("div",{className:"wi-token-info",children:[(0,k.jsx)("span",{className:"wi-token-name",children:I.token_name}),(0,k.jsx)("div",{className:"wi-token-price-row",children:(0,k.jsxs)("span",{className:"wi-token-price",children:[In(I.current_price,18)," CROSS"]})})]})]}),(0,k.jsxs)("div",{className:"wi-token-right",children:[(0,k.jsx)("span",{className:"wi-token-balance",children:In(I.balance,18)}),(0,k.jsx)("span",{className:"wi-token-value",children:qn(I.current_value_usd)})]})]},`forge-${I.token}`)})]})}),ce==="bottom"&&O&&(0,k.jsx)("div",{className:"wi-nav-fixed",children:O}),cd&&(0,k.jsx)("div",{className:"wi-wallet-disconnect-row",children:cd})]},"wallet"),Sg=Z?(0,k.jsx)("div",{className:ze("wi-view-inner wi-portfolio-body",Pe.current&&"wi-view-portfolio"),children:(0,k.jsx)(Jn,{env:o,theme:a,walletAddress:f,showHeader:!1,onOutlink:ye,lpBalanceReader:De,stakingRewardsReader:ut,sendTransaction:Fe,estimateGas:pt,sections:Ne})},"portfolio"):null,Cg=ne?(0,k.jsx)("div",{className:ze("wi-view-inner wi-send-body",Pe.current&&"wi-view-send"),children:(0,k.jsx)(Xo,{env:o,theme:a,walletAddress:f,accountName:p,accounts:x,initialStep:Ts,token:ne,tokens:Se,onTokenChange:K,sendTransaction:Fe,getTransactionReceipt:Ae,estimateGas:pt,getTokenPriceUsd:I=>{let me=nt.get(Ir(I.chainId,I.address));if(!me?.price)return;let Qe=parseFloat(me.price);return Number.isFinite(Qe)?Qe:void 0},onClose:R,onBackToWallet:uo,onSubmitted:As,onSuccess:_,onFailed:vt,onOutlink:ye})},"send"):null,Ng=oe.useMemo(()=>Be||Se.map(I=>{let me=nt.get(Ir(I.chainId,I.address)),Qe=me?.price?parseFloat(me.price):void 0;return{name:I.name,symbol:I.symbol,chainId:I.chainId,address:I.address,decimals:I.quantity.decimals,balance:Ro(I.quantity.numeric,I.quantity.decimals),iconUrl:I.icon_url,priceUsd:Number.isFinite(Qe)?Qe:void 0}}),[Be,nt,Se]),Tg=(0,k.jsx)("div",{className:ze("wi-view-inner wi-bridge-body",Pe.current&&"wi-view-send"),children:(0,k.jsx)(to,{env:o,walletAddress:f,tokens:Ng,history:Ge,termsUrl:M,getQuote:Ue,getToTokens:st,getApproval:Ht,approveBridge:St,submitBridge:jt,onClose:R,onBackToWallet:uo})},"bridge"),Ig=U?(0,k.jsx)("div",{className:ze("wi-view-inner wi-token-detail-body",Pe.current&&"wi-view-send"),children:(0,k.jsx)(If,{env:o,isMobile:i,token:U,walletAddress:f,stat:nt.get(Ir(U.chainId,U.address)),tokenInfo:Je.get($o(U.chainId,U.address)),showBalance:c,onBack:Is,onClose:R,onSend:Es,onOutlink:ye})},"token-detail"):null,Ds=!!S&&p?.trim().toLowerCase()!=="my wallet",pd=(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("span",{className:"wi-receive-avatar",children:[(0,k.jsx)("span",{className:"wi-avatar-fallback",style:ld}),za&&(0,k.jsx)("img",{src:za,alt:"",className:"wi-avatar-img",width:24,height:24,draggable:!1,onLoad:Ba,onError:I=>{I.currentTarget.style.display="none"}})]}),(0,k.jsx)("span",{className:"wi-receive-account-name",children:p??"Account 1"}),Ds&&(0,k.jsx)("span",{className:"wi-receive-chevron","data-open":Kr,"aria-hidden":"true",children:(0,k.jsx)(Tr,{size:16})})]}),Eg=(0,k.jsxs)("div",{className:ze("wi-view-inner wi-qr-body",Pe.current&&"wi-view-qr"),children:[(0,k.jsxs)("div",{className:"wi-receive-section",children:[Ds?(0,k.jsx)("button",{type:"button",className:"wi-receive-account wi-receive-account--btn",onClick:()=>{jo(!0),S?.()},"aria-label":"Switch account",children:pd}):(0,k.jsx)("div",{className:"wi-receive-account",children:pd}),(0,k.jsxs)("div",{className:"wi-qr-block",children:[(0,k.jsxs)("div",{className:"wi-qr-box",children:[(0,k.jsx)(Ef.QRCodeSVG,{value:f,size:180,level:"H",marginSize:2,...w&&{imageSettings:{src:w,height:33,width:33,excavate:!0}}}),!w&&(0,k.jsx)("div",{className:"wi-qr-logo",children:(0,k.jsx)($d,{size:33})})]}),(0,k.jsx)("p",{className:"wi-qr-address",children:f})]}),(0,k.jsxs)("button",{type:"button",className:"wi-qr-copy-btn",onClick:sd,"data-track":"address_copy",children:[(0,k.jsx)("span",{className:"wi-qr-copy-icon",children:ar?(0,k.jsx)(pn,{size:16}):(0,k.jsx)(Vn,{size:16})}),(0,k.jsx)("span",{className:"wi-qr-copy-text",children:ar?"Copied!":"Copy address"})]})]}),dd&&(0,k.jsx)("div",{className:"wi-receive-footer",children:dd})]},"qr"),Mg=P==="qr"||P==="portfolio"||P==="send"||P==="bridge",ud=X!==null?(0,k.jsx)("div",{className:"wi-builtin-footer",children:X}):null,fd=(0,k.jsxs)("div",{className:"wi-account-text",children:[Ds?(0,k.jsxs)("button",{type:"button",className:"wi-account-row wi-account-row--btn",onClick:()=>{jo(!0),S?.()},"aria-label":"Switch account","aria-expanded":Kr,children:[(0,k.jsx)("span",{className:"wi-account-name",children:p??"Account 1"}),(0,k.jsx)("span",{className:"wi-account-switch","data-open":Kr,"aria-hidden":"true",children:(0,k.jsx)(Tr,{size:20})})]}):(0,k.jsx)("div",{className:"wi-account-row",children:(0,k.jsx)("span",{className:"wi-account-name",children:p??"Account 1"})}),(0,k.jsxs)("button",{type:"button",className:"wi-address-row-btn",onClick:sd,"aria-label":"Copy address","data-track":"address_copy",children:[(0,k.jsx)("span",{className:"wi-account-address",children:dr(f)}),(0,k.jsx)("span",{className:"wi-account-copy","data-copied":ar,children:ar?(0,k.jsx)(pn,{size:12}):(0,k.jsx)(Vn,{size:12})})]})]}),md=(0,k.jsxs)(k.Fragment,{children:[n,P==="qr"?(0,k.jsx)("div",{className:"wi-sticky-header",children:(0,k.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,k.jsx)("button",{type:"button",className:"wi-header-back",onClick:uo,"aria-label":"Back",children:(0,k.jsx)(un,{size:24})}),(0,k.jsx)("span",{className:"wi-receive-title",children:"Receive"}),(0,k.jsx)("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close",children:(0,k.jsx)(jr,{size:24})})]})}):P==="send"||P==="bridge"||P==="token-detail"?null:Mg?(0,k.jsxs)("div",{className:"wi-sticky-header",children:[(0,k.jsxs)("div",{className:"wi-header wi-header--wallet wi-header--sub-account",children:[(0,k.jsx)("button",{type:"button",className:"wi-header-back",onClick:uo,"aria-label":"Back",children:(0,k.jsx)(un,{size:24})}),(0,k.jsx)("div",{className:"wi-account-block wi-account-block--sub-account",children:fd}),(0,k.jsx)("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close",children:(0,k.jsx)(jr,{size:24})})]}),(0,k.jsx)("hr",{className:"wi-divider"})]}):(0,k.jsxs)("div",{className:"wi-sticky-header",children:[(0,k.jsxs)("div",{className:"wi-header wi-header--wallet",children:[(0,k.jsxs)("div",{className:"wi-account-block",children:[(0,k.jsxs)("div",{className:"wi-avatar",children:[(0,k.jsx)("div",{className:"wi-avatar-fallback",style:ld}),za&&(0,k.jsx)("img",{src:za,alt:"",className:"wi-avatar-img",width:28,height:28,draggable:!1,onLoad:Ba,onError:I=>{I.currentTarget.style.display="none"}})]}),fd]}),(0,k.jsxs)("div",{className:"wi-header-actions",children:[g&&y&&(0,k.jsx)("button",{type:"button",className:"wi-header-action wi-header-action--qr",onClick:Yt,"aria-label":"Show QR code","data-track":"receive",children:(0,k.jsx)(Xa,{size:20})}),(0,k.jsx)("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close",children:(0,k.jsx)(jr,{size:24})})]})]}),(0,k.jsx)("hr",{className:"wi-divider"})]}),(0,k.jsxs)("div",{className:"wi-view-container",children:[P==="wallet"&&Rg,P==="qr"&&Eg,P==="portfolio"&&Sg,P==="send"&&Cg,P==="bridge"&&Tg,P==="token-detail"&&Ig]}),P==="wallet"&&Xe&&(0,k.jsx)("div",{className:"wi-action-toast",role:"status","aria-live":"polite",children:Xe}),P==="wallet"&&q&&(0,k.jsxs)("a",{className:"wi-send-toast",href:Sr??"#",target:"_blank",rel:"noopener noreferrer",onClick:I=>{if(!Sr){I.preventDefault();return}Qt(I,Sr,{category:"send",origin:"send-transaction",payload:{chainId:q.chainId,txHash:q.txHash}},ye)},children:[(0,k.jsx)("span",{className:"wi-send-toast-icon","data-status":q.status,"aria-hidden":!0,children:q.status==="pending"?(0,k.jsx)("span",{className:"wi-send-toast-spinner"}):q.status==="error"?(0,k.jsx)("span",{className:"wi-send-toast-error-dot"}):(0,k.jsx)(oc,{size:20})}),(0,k.jsxs)("span",{className:"wi-send-toast-copy",children:[(0,k.jsx)("span",{className:"wi-send-toast-title",children:q.status==="pending"?"Sending...":q.status==="error"?"Send failed":"Send complete"}),(0,k.jsx)("span",{className:"wi-send-toast-desc",children:q.status==="pending"||q.status==="error"?q.description:"Tap to see your transaction"})]})]}),ud&&P!=="portfolio"&&P!=="send"&&P!=="token-detail"&&(0,k.jsx)("div",{className:"wi-sticky-footer",children:(0,k.jsx)("div",{className:"wi-footer",ref:ur,children:ud})})]}),gd={...A,...Or>0?{"--wi-footer-height":`${Or}px`}:null};return i?(0,k.jsx)(Ce,{feature:"wallet_info",children:(0,k.jsxs)(ma.Drawer.Portal,{children:[d&&(0,k.jsx)(ma.Drawer.Overlay,{className:"wi-drawer-overlay"}),(0,k.jsxs)(ma.Drawer.Content,{className:ze("wi-drawer-content",r),"data-theme":a,"data-vaul-no-drag":l==="left"||l==="right"?!0:void 0,style:gd,"data-direction":l,"data-no-balance":!c||void 0,"data-has-footer":Or>0||void 0,"data-view":P,children:[(0,k.jsx)(ma.Drawer.Title,{className:"wi-sr-only",children:"My Wallet"}),md]})]})}):(0,k.jsxs)(Ce,{feature:"wallet_info",children:[d&&s&&(0,k.jsx)("div",{className:"wi-drawer-overlay",onClick:R}),(0,k.jsx)(Gi.Portal,{children:(0,k.jsx)(Gi.Content,{align:e,sideOffset:t,className:ze("wi-popover-content",r),"data-theme":a,style:gd,"data-no-balance":!c||void 0,"data-has-footer":Or>0||void 0,"data-view":P,children:md})})]})}var Af=V(require("react"),1);function Lf({position:e="top",children:t}){let{setNavContent:r,setNavPosition:n}=Nn();return Af.useEffect(()=>(r(t),n(e),()=>r(null)),[t,e,r,n]),null}var Df=V(require("react"),1);function Pf({children:e}){let{setFooterContent:t}=Nn();return Df.useEffect(()=>(t(e),()=>t(null)),[e,t]),null}he(`[data-theme=dark].wi-popover-content,[data-theme=dark].wi-drawer-content{--wi-primary: var(--ds-system-orange-default, #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-system-orange-default, #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
+ `);he("");var qa=require("react/jsx-runtime");function _s({env:e,theme:t="dark",mobileBreakpoint:r=768,domain:n,children:o}){let a=yo(`(max-width: ${r}px)`),[i,s]=xo.useState(!1),l=xo.useCallback(()=>s(!1),[]),d=at(e);Cn(i,l);let c=xo.useMemo(()=>({env:d,theme:t,isMobile:a,open:i,domain:n,close:l}),[d,t,a,i,n,l]);return(0,qa.jsx)(Us.Provider,{value:c,children:a?(0,qa.jsx)(Pd.Drawer.Root,{direction:"right",open:i,onOpenChange:s,noBodyStyles:!0,children:o},"drawer"):(0,qa.jsx)(Dd.Root,{open:i,onOpenChange:s,children:o},"popover")})}var Fd=V(require("@radix-ui/react-popover"),1),Ud=require("vaul");var lr=require("react/jsx-runtime");function Od({size:e=18}){return(0,lr.jsxs)("svg",{className:"al-trigger-icon",width:e,height:e,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,lr.jsx)("rect",{x:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,lr.jsx)("rect",{x:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,lr.jsx)("rect",{y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,lr.jsx)("rect",{x:"7",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,lr.jsx)("rect",{x:"14",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,lr.jsx)("rect",{y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,lr.jsx)("rect",{x:"7",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,lr.jsx)("rect",{x:"14",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"})]})}function Bd(){return(0,lr.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,lr.jsx)("path",{d:"M12 19L5 12M5 12L12 5M5 12H19",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function zd(){return(0,lr.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,lr.jsx)("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}var Hn=require("react/jsx-runtime");function Hs({asChild:e,children:t,className:r,style:n}){let{isMobile:o,theme:a}=_a(),i=t!=null,s=e??!0,l=r?`al-trigger-btn ${r}`:"al-trigger-btn",d=i?t:(0,Hn.jsx)("button",{type:"button",className:l,"data-theme":a,"data-track":"open",style:n,children:(0,Hn.jsx)(Od,{size:18})});return o?(0,Hn.jsx)(Ce,{feature:"app_launcher",children:(0,Hn.jsx)(Ud.Drawer.Trigger,{asChild:s,children:d})}):(0,Hn.jsx)(Ce,{feature:"app_launcher",children:(0,Hn.jsx)(Fd.Trigger,{asChild:s,children:d})})}var Jr=V(require("react"),1),Ya=V(require("@radix-ui/react-popover"),1),Qn=require("vaul");var Gd=require("@tanstack/react-query");var jd={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 th="https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",rh="https://contents.crosstoken.io/frontend/common/app-launcher/icons";function Ur(e,t){return`${e==="production"?rh:th}/${t}.png`}function Wd(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:Ur(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:Ur(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:Ur(t,"crossd"),order:5e3,type:"crossd",badge:null,isNew:!1,serviceStatus:"ending"},{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:Ur(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:Ur(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:Ur(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:Ur(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:Ur(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:Ur(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:Ur(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:Ur(t,"wave"),order:11e4,type:"wave",badge:null,isNew:!1,serviceStatus:"available"}]}}function Qo(e){let t=at(e);return(0,Gd.useQuery)({queryKey:["global-menu",t],queryFn:async()=>{try{let r=await fetch(jd[t],{cache:"no-store"});if(!r.ok)throw new Error(`Failed to fetch global menu: ${r.status}`);return r.json()}catch{return Wd(t)}},staleTime:300*1e3,gcTime:600*1e3,retry:!1,refetchOnMount:!0})}function Qs(e){return e.serviceStatus==="ending"||e.serviceStatus==="comingSoon"?e.serviceStatus:"available"}function Hd(e,t){return typeof e=="string"?e:e[t]??e.production??e.stage??e.dev}function Qd(e){return[...e].sort((t,r)=>{let n=_d(t)-_d(r);return n!==0?n:t.order-r.order})}function _d(e){let t=Qs(e);return t==="comingSoon"?0:t==="ending"?2:1}var lt=require("react/jsx-runtime");function nh(e){return e.id==="cross-staking"||e.type==="cross-staking"}function Vs({align:e="end",sideOffset:t=8,className:r}){let{env:n,theme:o,isMobile:a,domain:i,close:s}=_a(),{data:l}=Qo(n),d=Jr.useMemo(()=>Qd(l?.items??[]),[l?.items]),c=24,b=Jr.useRef(null),f=Jr.useRef(!1),g=Jr.useCallback(v=>{b.current={x:v.clientX,y:v.clientY},f.current=!1},[]),x=Jr.useCallback(v=>{let R=b.current;b.current=null,R&&(f.current=Math.abs(v.clientX-R.x)>c||Math.abs(v.clientY-R.y)>c)},[]),w=Jr.useCallback(()=>{b.current=null,f.current=!0},[]),m=typeof window<"u"?window.location.pathname:"",p=Jr.useCallback((v,R)=>{let S=f.current;if(f.current=!1,S&&v.detail!==0)return;let E=R.url[n]??R.url.production,C=Vd(E,i);if(!C)try{let N=new URL(E);if(N.pathname===window.location.pathname&&N.search===window.location.search&&N.hash===window.location.hash){s();return}}catch{}C?window.open(E,"_blank","noopener,noreferrer"):window.location.href=E,s()},[n,i,s]),y=v=>{let R=v.url[n]??v.url.production,S=Vd(R,i),E=Qs(v),C=E==="ending",N=Hd(v.iconUrl,n),I=!1;if(!S)try{let M=new URL(R).pathname;I=m===M||m.startsWith(M+"/")}catch{I=!1}return(0,lt.jsx)("button",{type:"button",className:"al-grid-item","data-track":"menu_item_click","data-track-id":v.id,"data-active":I||void 0,"data-service-status":E,onPointerDown:g,onPointerUp:x,onPointerCancel:w,onClick:M=>p(M,v),children:(0,lt.jsxs)("div",{className:"al-grid-item-left",children:[(0,lt.jsxs)("div",{className:"al-grid-item-icon",children:[(0,lt.jsx)("img",{src:N,alt:v.label,width:24,height:24,loading:"lazy"}),v.isNew&&(0,lt.jsx)("span",{className:"al-status-ribbon al-status-ribbon-new",children:"N"})]}),(0,lt.jsxs)("span",{className:"al-grid-item-text",children:[(0,lt.jsx)("span",{className:"al-grid-item-label",children:v.label}),C&&(0,lt.jsx)("span",{className:"al-grid-item-status-text",children:"(End Soon)"}),v.badge&&!nh(v)&&(0,lt.jsx)("span",{className:"al-badge al-badge-list",children:v.badge})]})]})},v.id)},h=(0,lt.jsx)("div",{className:"al-menu","data-theme":o,children:(0,lt.jsx)("div",{className:"al-grid",children:d.map(y)})});return a?(0,lt.jsx)(Ce,{feature:"app_launcher",children:(0,lt.jsxs)(Qn.Drawer.Portal,{children:[(0,lt.jsx)(Qn.Drawer.Overlay,{className:"al-drawer-overlay"}),(0,lt.jsxs)(Qn.Drawer.Content,{className:ze("al-drawer-content",r),"data-theme":o,children:[(0,lt.jsxs)("div",{className:"al-drawer-header",children:[(0,lt.jsx)(Qn.Drawer.Close,{className:"al-drawer-close","data-track":"close",children:(0,lt.jsx)(Bd,{})}),(0,lt.jsx)(Qn.Drawer.Title,{className:"al-drawer-title",children:"CROSS Services"}),(0,lt.jsx)(Qn.Drawer.Close,{className:"al-drawer-close","data-track":"close",children:(0,lt.jsx)(zd,{})})]}),(0,lt.jsx)("div",{className:"al-drawer-body",children:h})]})]})}):(0,lt.jsx)(Ce,{feature:"app_launcher",children:(0,lt.jsx)(Ya.Portal,{children:(0,lt.jsx)(Ya.Content,{align:e,sideOffset:t,className:ze("al-popover-content",r),"data-theme":o,children:h})})})}function Vd(e,t){try{let r=new URL(e).hostname;return typeof window>"u"?!0:r!==(t??window.location.hostname)}catch{return!1}}var tr=V(require("react"),1),Pf=V(require("@radix-ui/react-popover"),1),Of=require("vaul");var Ka=require("react"),qs=(0,Ka.createContext)(null);function Nn(){let e=(0,Ka.useContext)(qs);if(!e)throw new Error("WalletInfo compound components must be used within <WalletInfo>");return e}var qd=require("@nexus-cross/crossx-design-system"),Za=(n=>(n.CROSSx="crossx",n.MetaMask="io.metamask",n.Binance="com.binance.wallet",n))(Za||{}),Vo={crossx:{name:qd.WALLET_LABELS.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"}};var jc=V(require("react"),1);var Ee=require("react/jsx-runtime");function Yd({size:e=16,className:t}){return(0,Ee.jsxs)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Ee.jsx)("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"}),(0,Ee.jsx)("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 Vn({size:e=16,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"4 4 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("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 pn({size:e=16,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("path",{d:"M11.6667 3.5L5.25 9.91667L2.33334 7",stroke:"currentColor",strokeWidth:1.16667,strokeLinecap:"round",strokeLinejoin:"round"})})}function jr({size:e=24,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Kd({size:e=20,className:t}){return(0,Ee.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Ee.jsx)("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"}),(0,Ee.jsx)("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 Xa({size:e=20,className:t}){return(0,Ee.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,children:(0,Ee.jsx)("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 un({size:e=20,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor",strokeWidth:1.67,strokeLinecap:"round",strokeLinejoin:"round"})})}function Tr({size:e=20,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("path",{d:"M5 8L10 13L15 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Zd({size:e=16,className:t}){return(0,Ee.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Ee.jsx)("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"}),(0,Ee.jsx)("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 Xd({size:e=16,className:t}){return(0,Ee.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Ee.jsx)("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"}),(0,Ee.jsx)("path",{d:"M1.667 1.667l16.666 16.666",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}var oh='<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>',ah=`data:image/svg+xml,${encodeURIComponent(oh)}`;function Jd({size:e=42,className:t}){return(0,Ee.jsx)("img",{src:ah,width:e,height:e,alt:"",className:t,style:{display:"block"}})}function $d({size:e=20,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("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 ec({size:e=20,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("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 tc({size:e=20,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("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 rc({size:e=20,className:t}){return(0,Ee.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Ee.jsx)("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 nc({size:e=20,className:t}){return(0,Ee.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Ee.jsx)("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor"}),(0,Ee.jsx)("path",{d:"M6 10.2L8.6 12.8L14 7.2",stroke:"var(--ds-accent-primary-on, #ffffff)",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})]})}var pe=V(require("react"),1);var Tn=V(require("bignumber.js"),1);function ih(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 In(e,t){if(!e||e==="0")return"0.00";let r=new Tn.default(e).shiftedBy(-t),n=r.isGreaterThanOrEqualTo(1)?2:4;return r.toFormat(n,Tn.default.ROUND_DOWN)}function dr(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}function qn(e){let t=typeof e=="string"?parseFloat(e):e;if(Number.isNaN(t)||t===0)return"$0.00";let r=t>=1?2:4,n=Math.pow(10,r);return`$${(Math.floor(t*n)/n).toLocaleString("en-US",{minimumFractionDigits:r,maximumFractionDigits:r})}`}function Ja(e,t,r){let o=new Tn.default(e).shiftedBy(-t).multipliedBy(new Tn.default(r));return o.isZero()||o.isNaN()?"$0.00":`$${(o.integerValue(Tn.default.ROUND_DOWN).isGreaterThanOrEqualTo(1)?o.decimalPlaces(2,Tn.default.ROUND_DOWN):o.decimalPlaces(4,Tn.default.ROUND_DOWN)).toFormat()}`}function oc(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 r=t;if(r.includes("e")||r.includes("E")){let i=Number(r);if(!Number.isFinite(i)||i===0)return{displayValue:"0",isLowerBound:!1};r=ih(i.toFixed(18))}let[n="0",o=""]=r.split(".");if(Number(n)>=1){let i=o.slice(0,2).padEnd(2,"0");return{displayValue:`${Number(n).toLocaleString("en-US")}.${i}`,isLowerBound:!1}}return o.length<4?{displayValue:`${n}.${o}`,isLowerBound:!1}:o.slice(0,4)==="0000"?{displayValue:"0.0001",isLowerBound:!0}:{displayValue:`0.${o.slice(0,4)}`,isLowerBound:!1}}var Ys=require("react"),ic=require("@tanstack/react-query");var Tt={dev:{cross:612044,bsc:97},stage:{cross:612044,bsc:97},production:{cross:612055,bsc:56}},$a="https://terms.onechain.nexus/docs/terms-july-23-2026",ei="https://terms.onechain.nexus/docs/pp-july-23-2026",ac="https://contents.crossdefi.io/Terms/terms/tos-26-07-09-oneusd.html";var sh="send:chain-info";function lh(e){if("data"in e&&e.data!==void 0){let t=e.data;if(Array.isArray(t)){let r=t[0];if(!r)throw new Error("Chain info payload is empty.");return r}return t}return e}function Ks(e,...t){let r=e.replace(/\/+$/,""),n=t.map(o=>o.replace(/^\/+|\/+$/g,"")).filter(Boolean);return[r,...n].join("/")}function sc(e,t,r,n){if(n)return t===Tt[e].cross?lc(t,n):r?.explorer_url?Ks(r.explorer_url,r.explorer_postfix?.transaction??"tx",n):dh(e,t,n)}function lc(e,t){return Ks("https://explorer.onechain.nexus",String(e),"tx",t)}function dh(e,t,r){let n=Tt[e];if(t===n.cross)return lc(t,r);if(t===n.bsc)return Ks(e==="production"?"https://bscscan.com":"https://testnet.bscscan.com","tx",r)}function qo(e,t,r,n=!0){let o=(0,ic.useQuery)({queryKey:[sh,e,t],queryFn:async({signal:s})=>{let l=await Oe("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 c=await d.json();if("code"in c&&c.code!==void 0&&c.code!==200)throw new Error(`Chain info API error: ${c.code}`);return lh(c)},enabled:n,staleTime:3e5}),a=o.data;return{transactionUrl:(0,Ys.useMemo)(()=>sc(e,t,a,r),[t,a,e,r]),chainInfo:a,...o}}function dc(e,t,r=!0){let{chainInfo:n}=qo(e,t,void 0,r);return{buildTxUrl:(0,Ys.useMemo)(()=>a=>sc(e,t,n,a),[e,t,n]),chainInfo:n}}var cc="0x0000000000000000000000000000000000000001";var ch="0xa9059cbb",ph=/^0x[a-fA-F0-9]{40}$/,uh="nexus-cross:dapp-ui:send:recent:",pc=10;function fh(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return e.slice(0,t)}function Yo(e){return e.toLowerCase()}function $r(e){return ph.test(e)}function En(e){return Yo(e.address)===cc}function Zs(e){return`${uh}${e.toLowerCase()}`}function vo(e){if(typeof window>"u")return[];try{let t=window.localStorage.getItem(Zs(e));if(!t)return[];let r=JSON.parse(t);return Array.isArray(r)?r.filter(n=>n!==null&&typeof n=="object"&&$r(n.address)&&typeof n.updatedAt=="number").slice(0,pc):[]}catch{return[]}}function Xs(e,t){if(typeof window>"u")return[];let r=Yo(t),n=[{address:r,updatedAt:Date.now()},...vo(e).filter(o=>o.address!==r)].slice(0,pc);try{window.localStorage.setItem(Zs(e),JSON.stringify(n))}catch{return vo(e)}return n}function Js(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(Zs(e))}catch{}}function Yn(e,t){let r=e.trim();if(!r)return{error:"Enter an amount."};if(!/^\d+(\.\d*)?$/.test(r))return{error:"Enter a valid amount."};let[n="0",o=""]=r.split(".");if(o.length>t)return{error:`Max ${t} decimal places.`};let a=BigInt(n||"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 r=BigInt(e||"0"),n=10n**BigInt(t),o=r/n,a=r%n;if(a===0n)return o.toString();let i=fh(a.toString().padStart(t,"0"));return`${o.toString()}.${i}`}function $s(e,t){let r=e.replace(/^0x/,"").toLowerCase().padStart(64,"0"),n=t.toString(16).padStart(64,"0");return`${ch}${r}${n}`}function ti(e,t,r=10){if(t<=0)return e.toString();let n=10n**BigInt(t),o=e/n,a=e%n;if(a===0n)return o.toString();let s=a.toString().padStart(t,"0").slice(0,Math.max(0,Math.min(r,t)));return s=s.replace(/0+$/,""),s?`${o.toString()}.${s}`:o.toString()}function el(e,t){return ti(e,t,6)}function uc(e){return ti(e,9,2)}function fc(e){return e.toLocaleString("en-US")}function ri(e){return e===56||e===97}function ni(e){return e.gasPrice??e.maxFeePerGas}function mc(e,t=!1){return t?ni(e)!==void 0?"legacy":null:e.maxFeePerGas!==void 0?"dynamic":e.gasPrice!==void 0?"legacy":null}function oi(e,t=!1){if(t){let r=ni(e);return r!==void 0?e.gasLimit*r:null}return e.maxFeePerGas!==void 0?e.gasLimit*e.maxFeePerGas:e.gasPrice!==void 0?e.gasLimit*e.gasPrice:null}function ai(e){return!Number.isFinite(e)||e<=0?"$0.00":`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function gc(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 r=e,n=[];return typeof r.name=="string"&&n.push(r.name),typeof r.shortMessage=="string"&&n.push(r.shortMessage),typeof r.message=="string"&&n.push(r.message),typeof r.details=="string"&&n.push(r.details),r.cause!==void 0&&n.push(gc(r.cause,t+1)),n.join(`
6
+ `).toLowerCase()}function mh(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 tl(e,t={},r="Failed to send transaction."){let n=gc(e);if(!n)return r;let o=t.nativeSymbol?.trim()||"gas token",a=t.networkName?.trim();if(n.includes("user rejected")||n.includes("userrejected")||n.includes("user denied")||n.includes("user cancelled")||n.includes("user canceled")||n.includes("action_rejected")||n.includes("rejected by user"))return"Transaction was cancelled.";if(n.includes("insufficientfunds")||n.includes("insufficient funds")||n.includes("exceeds the balance of the account")||n.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 n.includes("transaction underpriced")||n.includes("replacement transaction underpriced")||n.includes("fee too low")?"Gas fee was too low for the network. Please try again.":n.includes("nonce too low")||n.includes("nonce has already been used")||n.includes("nonce too high")?"Pending transactions are out of order. Refresh the page and try again.":n.includes("execution reverted")||n.includes("contractfunctionrevertederror")||n.includes("contractfunctionexecutionerror")?"The transaction was rejected by the contract. The recipient or token may be invalid.":n.match(/chain \d+ is not configured/)?"This network is not registered in the app. Contact support.":n.includes("http request failed")||n.includes("failed to fetch")||n.includes("network request failed")||n.includes("timeout")||n.includes("econnreset")||n.includes("rpc error")||n.includes("429")?"Network connection failed. Check your internet and try again.":n.includes("estimategas")||n.includes("gas estimation failed")?"Could not estimate the gas fee. The recipient address or amount may be invalid.":mh(e)||r}var gh=2000000000n,hh=1000000000n;async function ii(e,t,r){let n=new AbortController,o=setTimeout(()=>n.abort(),8e3),a=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:r}),signal:n.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 si(e){return BigInt(e)}function bh(e){return`0x${e.toString(16)}`}function wh(e){let t={to:e.to};return e.from&&(t.from=e.from),e.value!==void 0&&e.value>0n&&(t.value=bh(e.value)),e.data&&(t.data=e.data),t}function yh(e){return e===56||e===97}async function hc(e){try{let t=await ii(e,"eth_gasPrice",[]);return{gasPrice:si(t)}}catch{return{gasPrice:gh}}}async function xh(e,t){let r=hh;try{let n=await ii(e,"eth_maxPriorityFeePerGas",[]);r=si(n)}catch{}return{maxFeePerGas:t+r,maxPriorityFeePerGas:r}}async function vh(e,t){if(t)return hc(e);let r;try{r=(await ii(e,"eth_getBlockByNumber",["latest",!1]))?.baseFeePerGas}catch{}return r?xh(e,si(r)):hc(e)}async function bc(e,t){let r=yh(t.chainId),n=wh(t),[o,a]=await Promise.all([ii(e,"eth_estimateGas",[n]),vh(e,r)]);return{gasLimit:si(o),gasPrice:a.gasPrice,maxFeePerGas:a.maxFeePerGas,maxPriorityFeePerGas:a.maxPriorityFeePerGas}}function wc(e){let{estimateGas:t,sendTransaction:r,getTransactionReceipt:n}=e;return{canSend:!!r,canEstimateGas(o){return!!t||!!o},async estimateGas(o,a){if(t)return t(o);if(a)return bc(a,o);throw new Error("Gas estimation is not available.")},async sendTransaction(o){if(!r)throw new Error("Sending is not available for this wallet.");return r(o)},getTransactionReceipt:n}}var kh=1500,Rh=120;function yc(e){return!!(e.token||e.recipient||e.amount)}function rl({recipient:e,amount:t,token:r,balanceRaw:n}){let o={},a=e.trim(),i=Yn(t,r.quantity.decimals),s;return a?$r(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>n&&(o.amount="Amount exceeds available balance.")),!En(r)&&!$r(r.address)&&(o.token="Token contract address is invalid."),{errors:o,rawAmount:o.amount?void 0:s,recipient:a&&$r(a)?a:void 0}}function nl({token:e,walletAddress:t,recipient:r,rawAmount:n}){let o=t;return En(e)?{to:r,value:n,chainId:e.chainId,from:o}:{to:Yo(e.address),data:$s(r,n),value:0n,chainId:e.chainId,from:o}}function Sh(e){let{status:t}=e;return t==="reverted"||t==="0x0"||t===0||t===0n||t===!1}var Ch=e=>new Promise(t=>setTimeout(t,e));async function xc({repository:e,args:t,chainId:r,onSubmitted:n,pollIntervalMs:o=kh,pollMaxAttempts:a=Rh}){let i=await e.sendTransaction(t);n(i);let{getTransactionReceipt:s}=e;if(!s)return"success";for(let l=0;l<a;l+=1){let d=await s({hash:i,chainId:r}).catch(()=>null);if(d)return Sh(d)?"reverted":"success";await Ch(o)}return"timeout"}var vc=["token","recipient","amount","review"];function kc(e){let{env:t,walletAddress:r,accountName:n,accounts:o=[],initialStep:a="recipient",token:i,tokens:s=[],onTokenChange:l,sendTransaction:d,getTransactionReceipt:c,estimateGas:b,getTokenPriceUsd:f,onSubmitted:g,onSuccess:x,onFailed:w,onExit:m,onOutlink:p}=e,y=pe.useMemo(()=>wc({sendTransaction:d,getTransactionReceipt:c,estimateGas:b}),[d,c,b]),[h,v]=pe.useState(i);pe.useEffect(()=>{v(i)},[i.address,i.chainId]);let[R,S]=pe.useState(a),[E,C]=pe.useState(""),[N,I]=pe.useState(""),[M,W]=pe.useState({}),[L,H]=pe.useState("idle"),[A,O]=pe.useState(""),[ce,X]=pe.useState(""),[P,xe]=pe.useState(null),[ne,K]=pe.useState(!1),[U,te]=pe.useState(""),Z=pe.useRef(0),[be,Ne]=pe.useState(null),[re,we]=pe.useState(""),[Fe,Ae]=pe.useState(()=>vo(r)),pt=pe.useRef(new Set),ye=pe.useCallback((B,se)=>{pt.current.has(B)||(pt.current.add(B),Ye("send",B,se))},[]);pe.useEffect(()=>{ye("opened"),a!=="token"&&ye("token_selected",{tags:{item_id:i.symbol}})},[ye,a,i.symbol]);let De=pe.useMemo(()=>at(t),[t]),{transactionUrl:ut,chainInfo:Be}=qo(De,h.chainId,A||void 0,!0),Ge=go(h.chainId,De),Ue=Ge.nativeSymbol??Be?.currency_symbol??"",st=Ge.name??Be?.name??`Chain ID ${h.chainId}`,Ht=pe.useRef({nativeSymbol:Ue||void 0,networkName:st,tokenSymbol:h.symbol});Ht.current={nativeSymbol:Ue||void 0,networkName:st,tokenSymbol:h.symbol};let Rt=pe.useMemo(()=>BigInt(h.quantity.numeric||"0"),[h.quantity.numeric]),Ut=pe.useMemo(()=>In(h.quantity.numeric,h.quantity.decimals),[h.quantity.numeric,h.quantity.decimals]),Ie=f?.(h),jt=pe.useMemo(()=>{if(Ie===void 0)return;let B=parseFloat(N.replace(/,/g,""));return Number.isFinite(B)?B*Ie:0},[N,Ie]);pe.useEffect(()=>{I(""),W({})},[h.address,h.chainId]),pe.useEffect(()=>{Z.current+=1,xe(null),te(""),K(!1)},[h.address,h.chainId,E,N]),pe.useEffect(()=>{Ae(vo(r))},[r]);let tt=pe.useCallback(B=>{C(B),W(se=>({...se,recipient:void 0}))},[]),Mt=pe.useCallback(B=>{I(B),W(se=>({...se,amount:void 0}))},[]),Ve=pe.useCallback(()=>{I(Ut.replace(/,/g,"")),W(B=>({...B,amount:void 0}))},[Ut]),Ze=pe.useCallback(B=>{v(B),l?.(B),ye("token_selected",{tags:{item_id:B.symbol}}),S("recipient")},[l,ye]),nr=pe.useCallback(()=>S("token"),[]),Wt=pe.useCallback(()=>{S(B=>{if(B==="result")return"review";if(B===a)return m?.(),B;let se=vc.indexOf(B);return se<=0?(m?.(),B):vc[se-1]})},[a,m]),qe=pe.useCallback(()=>{let{errors:B}=rl({recipient:E,amount:"1",token:h,balanceRaw:Rt});if(B.recipient){W(se=>({...se,recipient:B.recipient}));return}W(se=>({...se,recipient:void 0})),ye("recipient_entered"),S("amount")},[E,h,Rt,ye]),wt=pe.useCallback(B=>{C(B),W(se=>({...se,recipient:void 0})),ye("recipient_entered"),S("amount")},[ye]),rt=pe.useCallback(()=>{let B=rl({recipient:E,amount:N,token:h,balanceRaw:Rt});W(B.errors),!(yc(B.errors)||B.rawAmount===void 0||!B.recipient)&&(Ne(B.rawAmount),we(B.recipient),xe(null),te(""),H("idle"),ye("amount_entered"),S("review"))},[E,N,h,Rt,ye]);pe.useEffect(()=>{if(R!=="review"||!re||be===null||P!==null||ne||U||!y.canEstimateGas(Be?.rpc))return;let B=++Z.current;K(!0),te(""),(async()=>{try{let se=nl({token:h,walletAddress:r,recipient:re,rawAmount:be}),ve=await y.estimateGas(se,Be?.rpc);if(Z.current!==B)return;xe(ve)}catch(se){if(Z.current!==B)return;te(tl(se,Ht.current,"Failed to estimate gas."))}finally{Z.current===B&&K(!1)}})()},[R,re,be,P,ne,U,y,Be?.rpc,h,r]);let _e=pe.useMemo(()=>{if(!En(h)||!P||be===null)return!1;let B=oi(P,ri(h.chainId));return B===null?!1:be+B>Rt},[h,P,be,Rt]),ft=pe.useCallback(async()=>{if(!(!re||be===null)&&!_e){X(""),O(""),H("submitting"),ye("submitted");try{let B="",se=await xc({repository:y,args:nl({token:h,walletAddress:r,recipient:re,rawAmount:be}),chainId:h.chainId,onSubmitted:ve=>{B=ve,O(ve),H("confirming"),Ae(Xs(r,re)),g?.({txHash:ve,chainId:h.chainId,amount:N,tokenSymbol:h.symbol,recipient:re})}});if(se==="success")H("success"),ye("confirmed"),B&&x?x?.(B):S("result");else if(se==="reverted"){let ve="Transaction reverted on-chain.";H("error"),X(ve),ye("confirmed",{status:"failure",reason:gr(new Error(ve))}),B&&w?w({txHash:B,chainId:h.chainId,message:ve}):S("result")}else{let ve="Transaction receipt was not found. Please check again later.";H("error"),X(ve),ye("confirmed",{status:"failure",reason:"timeout"}),B&&w?w({txHash:B,chainId:h.chainId,message:ve}):S("result")}}catch(B){H("error"),ye("confirmed",{status:"failure",reason:gr(B)}),X(tl(B,{nativeSymbol:Ue||void 0,networkName:st,tokenSymbol:h.symbol})),S("result")}}},[y,re,be,_e,h,N,r,g,x,w,Ue,st,ye]),[At,je]=pe.useState(!1),nt=pe.useRef(void 0);pe.useEffect(()=>()=>clearTimeout(nt.current),[]);let qt=pe.useCallback(async()=>{if(A)try{await navigator.clipboard.writeText(A),je(!0),clearTimeout(nt.current),nt.current=setTimeout(()=>je(!1),2e3)}catch{}},[A]),F=pe.useCallback(()=>{if(!ut||!A)return;let B=Te=>{typeof window<"u"&&window.open(Te,"_blank","noopener,noreferrer")};if(!p){B(ut);return}let se=p(ut,{category:"send",origin:"send-transaction",payload:{chainId:h.chainId,txHash:A}});if(se&&typeof se.then=="function"){let Te=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null;se.then(ot=>{if(ot===null){Te?.close();return}let or=ot??ut;if(Te)try{Te.location.href=or}catch{Te.close(),B(or)}else B(or)});return}let ve=se;ve!==null&&B(ve??ut)},[p,h.chainId,ut,A]),Xe=pe.useCallback(()=>{X(""),O(""),H("idle"),xe(null),te(""),pt.current.delete("submitted"),pt.current.delete("confirmed"),S("review")},[]);return{step:R,status:L,token:h,tokens:s.length>0?s:[h],recipient:E,amount:N,amountUsd:jt,fieldErrors:M,error:ce,txHash:A,gasEstimate:P,gasLoading:ne,gasError:U,insufficientGas:_e,reviewRawAmount:be,reviewRecipient:re,recentAddresses:Fe,accounts:o,accountName:n,walletAddress:r,resolvedEnv:De,transactionUrl:ut,networkName:st,nativeSymbol:Ue,nativeDecimals:Be?.currency_decimals??h.quantity.decimals,balanceRaw:Rt,balanceText:Ut,priceUsd:Ie,canSelectToken:(s.length>0?s:[h]).length>1,canSend:y.canSend,getTokenPriceUsd:f,setRecipient:tt,setAmount:Mt,setMax:Ve,selectToken:Ze,goToTokenSelect:nr,selectRecipient:wt,submitRecipient:qe,submitAmount:rt,confirmSend:ft,retry:Xe,back:Wt,hashCopied:At,copyHash:qt,openTransaction:F}}var Wr=V(require("react"),1);var en=require("react/jsx-runtime");function Rc({flow:e}){let{amount:t,setAmount:r,amountUsd:n,balanceText:o,balanceRaw:a,token:i,setMax:s}=e,l=Wr.useRef(null),d=Wr.useCallback(()=>{requestAnimationFrame(()=>{let w=l.current;if(!w)return;let m=w.value.length;w.setSelectionRange(m,m)})},[]);Wr.useEffect(()=>{l.current?.focus(),d()},[d]),Wr.useEffect(()=>{t===""&&(f(!1),d())},[t,d]);let c=Wr.useMemo(()=>{let w=Yn(t,i.quantity.decimals);return"value"in w&&w.value>a},[t,i.quantity.decimals,a]),[b,f]=Wr.useState(!1),g=!b&&t===""?"0.00":t,x=t.trim()===""||t.trim()==="0";return(0,en.jsx)("div",{className:"sf-body sf-amount",children:(0,en.jsxs)("div",{className:"sf-amount-center",children:[(0,en.jsx)("span",{className:"sf-amount-usd",children:n!==void 0?ai(n):"\xA0"}),(0,en.jsx)("div",{className:"sf-amount-input-wrap","data-over":c||void 0,"data-empty":x||void 0,onClick:()=>l.current?.focus(),children:(0,en.jsx)("input",{ref:l,className:"sf-amount-input",value:g,onChange:w=>{let m=w.target.value;if(b)r(m);else if(t===""){if(m.length<4)return;f(!0);let p=m.startsWith("0.00")?m.slice(4):m;r(p)}else f(!0),r(m)},placeholder:"0.00",inputMode:"decimal",autoComplete:"off","aria-label":`Amount in ${i.symbol}`,size:1})}),(0,en.jsxs)("div",{className:"sf-amount-balance",children:[(0,en.jsx)("span",{children:"Balance:"}),(0,en.jsxs)("button",{type:"button",className:"sf-amount-max",onClick:s,"data-track":"amount_max",children:[o," ",i.symbol]})]})]})})}var Gr=V(require("react"),1);var Th=new Set(["0xff42c13d927a6b9265236619161accb227b6d452","0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb"].map(e=>e.toLowerCase()));function Cc(e){return Th.has(e.toLowerCase())}var Sc={cross:"https://contents.crosstoken.io/wallet/token/images/CROSS.svg",bsc:"https://contents.crosstoken.io/wallet/token/images/BSC.svg"};function Ko(e,t){let r=Tt[e];if(t===r.cross)return Sc.cross;if(t===r.bsc)return Sc.bsc}var Ih={dev:"https://dev-portrait.crosstoken.io",stage:"https://dev-portrait.crosstoken.io",production:"https://portrait.crosstoken.io"};function fn(e,t,r={}){if(!t||!t.startsWith("0x"))return;let{size:n=120,bg:o,format:a="png"}=r,i=Ih[e],s=o?`&bg=${o}`:"";return`${i}/portrait/evm/${t}.${a}?size=${n}${s}`}var Kt=require("react/jsx-runtime");function Nc({size:e=20,className:t}){return(0,Kt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[(0,Kt.jsx)("circle",{cx:"9",cy:"9",r:"6",stroke:"currentColor",strokeWidth:"1.7"}),(0,Kt.jsx)("path",{d:"m17 17-3.2-3.2",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function Tc({size:e=20,className:t}){return(0,Kt.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":"true",children:(0,Kt.jsx)("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 Ic({size:e=20,className:t}){return(0,Kt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[(0,Kt.jsx)("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor",opacity:"0.12"}),(0,Kt.jsx)("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function Ec({size:e=16,className:t}){return(0,Kt.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",className:t,"aria-hidden":"true",children:(0,Kt.jsx)("path",{d:"M8 3v10m0 0 4-4m-4 4-4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function Mc({size:e=56,className:t}){return(0,Kt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[(0,Kt.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-accent-primary-default, #00b4b7)"}),(0,Kt.jsx)("path",{d:"M17 28.5 24.2 35.5 39 20.5",stroke:"var(--ds-accent-primary-on, #ffffff)",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ac({size:e=56,className:t}){return(0,Kt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[(0,Kt.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-red-default, #da0b2e)"}),(0,Kt.jsx)("path",{d:"M20 20 36 36m0-16L20 36",stroke:"#ffffff",strokeWidth:"4",strokeLinecap:"round"})]})}var Ke=require("react/jsx-runtime");function Lc(e,t){return e.name||`Account ${(e.index??t)+1}`}function Dc(e){return e.trim().slice(0,1).toUpperCase()||"A"}function Pc(e){return e.toLowerCase()}function Oc({flow:e}){let{recipient:t,setRecipient:r,fieldErrors:n,recentAddresses:o,accounts:a,walletAddress:i,resolvedEnv:s,selectRecipient:l}=e,d=Gr.useMemo(()=>a.filter(h=>h.address.toLowerCase()!==i.toLowerCase()),[a,i]),c=d.length>0,b=Gr.useMemo(()=>new Map(d.map((h,v)=>[Pc(h.address),{account:h,index:v}])),[d]),[f,g]=Gr.useState("recent"),x=Gr.useRef(null);Gr.useEffect(()=>{x.current?.focus()},[]);let w="1A1A2E",m=Gr.useCallback(async()=>{try{let h=await navigator.clipboard.readText();h&&r(h.trim())}catch{}},[r]),p=t.trim().length>0,y=$r(t.trim());return(0,Ke.jsxs)("div",{className:"sf-recipient",children:[(0,Ke.jsxs)("div",{className:"sf-recipient-top",children:[(0,Ke.jsxs)("div",{className:"sf-address-field","data-filled":p||void 0,"data-invalid":n.recipient||void 0,children:[(0,Ke.jsx)("textarea",{ref:x,className:"sf-address-input",value:t,onChange:h=>r(h.target.value),placeholder:"Enter the recipient's address",autoComplete:"off",spellCheck:!1,"aria-label":"Recipient address",rows:p?2:1}),p?(0,Ke.jsx)("button",{type:"button",className:"sf-address-action",onClick:()=>r(""),"aria-label":"Clear","data-track":"recipient_clear",children:(0,Ke.jsx)(Ic,{size:20})}):(0,Ke.jsx)("button",{type:"button",className:"sf-address-action",onClick:m,"aria-label":"Paste from clipboard","data-track":"recipient_paste",children:(0,Ke.jsx)(Tc,{size:20})})]}),n.recipient&&(0,Ke.jsx)("p",{className:"sf-field-error",role:"alert",children:n.recipient}),(0,Ke.jsxs)("div",{className:"sf-tabs",role:"tablist",children:[(0,Ke.jsx)("button",{type:"button",role:"tab",className:"sf-tab","data-active":f==="recent"||void 0,"aria-selected":f==="recent",onClick:()=>g("recent"),"data-track":"recipient_tab","data-track-id":"recent",children:"Recent"}),c&&(0,Ke.jsx)("button",{type:"button",role:"tab",className:"sf-tab","data-active":f==="account"||void 0,"aria-selected":f==="account",onClick:()=>g("account"),"data-track":"recipient_tab","data-track-id":"account",children:"My Account"})]})]}),(0,Ke.jsx)("div",{className:"sf-address-list",children:f==="account"&&c?d.map((h,v)=>{let R=Lc(h,v),S=fn(s,h.address,{size:56,bg:w});return(0,Ke.jsxs)("button",{type:"button",className:"sf-address-row",onClick:()=>l(h.address),"data-track":"recipient_item",children:[(0,Ke.jsxs)("span",{className:"sf-address-avatar",children:[S&&(0,Ke.jsx)("img",{src:S,alt:"",width:40,height:40,draggable:!1,onError:E=>{E.currentTarget.style.display="none"}}),(0,Ke.jsx)("span",{className:"sf-address-avatar-fallback",children:Dc(R)})]}),(0,Ke.jsxs)("span",{className:"sf-address-meta",children:[(0,Ke.jsx)("span",{className:"sf-address-name",children:R}),(0,Ke.jsx)("span",{className:"sf-address-value",children:dr(h.address)})]})]},h.address)}):o.length>0?o.map(h=>{let v=b.get(Pc(h.address)),R=v?Lc(v.account,v.index):dr(h.address),S=fn(s,h.address,{size:56,bg:w});return(0,Ke.jsxs)("button",{type:"button",className:"sf-address-row",onClick:()=>l(h.address),"data-track":"recipient_item",children:[(0,Ke.jsxs)("span",{className:"sf-address-avatar",children:[S&&(0,Ke.jsx)("img",{src:S,alt:"",width:40,height:40,draggable:!1,onError:E=>{E.currentTarget.style.display="none"}}),(0,Ke.jsx)("span",{className:"sf-address-avatar-fallback",children:Dc(R)})]}),(0,Ke.jsxs)("span",{className:"sf-address-meta",children:[(0,Ke.jsx)("span",{className:"sf-address-name",children:R}),(0,Ke.jsx)("span",{className:"sf-address-value",children:dr(h.address)})]})]},h.address)}):(0,Ke.jsx)("div",{className:"sf-empty",children:"No send history"})}),p&&!y&&!n.recipient&&(0,Ke.jsx)("p",{className:"sf-field-error",role:"alert",children:"Enter a valid EVM recipient address."})]})}var St=require("react/jsx-runtime");function zc({flow:e}){let{status:t,txHash:r,error:n,copyHash:o,hashCopied:a,openTransaction:i}=e,s=t==="error",l=t==="success";return s?(0,St.jsxs)("div",{className:"sf-body sf-result sf-result--error",children:[(0,St.jsx)("span",{className:"sf-result-icon",children:(0,St.jsx)(Ac,{size:56})}),(0,St.jsxs)("div",{className:"sf-result-copy",children:[(0,St.jsx)("h3",{className:"sf-result-title",children:"Transaction Failed"}),(0,St.jsx)("p",{className:"sf-result-desc",children:n||"Something went wrong. Please try again."})]}),r&&(0,St.jsx)(Bc,{txHash:r,hashCopied:a,onCopy:o,onOpen:i})]}):(0,St.jsxs)("div",{className:"sf-body sf-result",children:[(0,St.jsx)("span",{className:"sf-result-icon","data-pending":!l||void 0,children:l?(0,St.jsx)(Mc,{size:56}):(0,St.jsx)("span",{className:"sf-result-spinner"})}),(0,St.jsxs)("div",{className:"sf-result-copy",children:[(0,St.jsx)("h3",{className:"sf-result-title",children:l?"Transaction Complete":"Transaction in Progress"}),(0,St.jsx)("p",{className:"sf-result-desc",children:l?"Your transfer was sent successfully.":"Transfer in progress. Waiting for confirmation."})]}),r&&(0,St.jsx)(Bc,{txHash:r,hashCopied:a,onCopy:o,onOpen:i})]})}function Bc({txHash:e,hashCopied:t,onCopy:r,onOpen:n}){return(0,St.jsxs)("div",{className:"sf-result-hash-card",children:[(0,St.jsx)("span",{className:"sf-result-hash-label",children:"Transaction Hash"}),(0,St.jsxs)("div",{className:"sf-result-hash-row",children:[(0,St.jsx)("button",{type:"button",className:"sf-result-hash-link",onClick:n,"aria-label":"Open transaction in explorer","data-track":"tx_link_open",children:dr(e)}),(0,St.jsx)("button",{type:"button",className:"sf-result-copy-btn",onClick:r,"aria-label":"Copy transaction hash","data-track":"tx_hash_copy",children:t?(0,St.jsx)(pn,{size:16}):"Copy"})]})]})}var Me=require("react/jsx-runtime"),li="\u2014";function Fc({flow:e}){let{token:t,reviewRawAmount:r,reviewRecipient:n,accountName:o,accounts:a,walletAddress:i,networkName:s,nativeSymbol:l,nativeDecimals:d,gasEstimate:c,gasLoading:b,gasError:f,insufficientGas:g,error:x,resolvedEnv:w}=e,m=En(t),p=r!==null?ti(r,t.quantity.decimals):"",y=o?.trim()||`Account ${(a[0]?.index??0)+1}`,h=fn(w,i,{size:56,bg:"1A1A2E"}),v=l||(m?t.symbol:""),R=ri(t.chainId),S=c?mc(c,R):null,E=c?oi(c,R):null,C=L=>L!==null&&v?`${el(L,d)} ${v}`:li,N=L=>L!==void 0?`${uc(L)} Gwei`:li,I=(()=>{if(!m||!c||E===null||r===null)return li;let L=r+E;return`${el(L,d)} ${v||t.symbol}`})(),M=L=>b?"\u2026":L,W=[{label:"Est. Tx Fee",value:M(C(E))},...S==="dynamic"?[{label:"Max Priority Fee",value:M(N(c?.maxPriorityFeePerGas))},{label:"Max Gas Fee",value:M(N(c?.maxFeePerGas))}]:S==="legacy"?[{label:"Gas Price",value:M(N(c?ni(c):void 0))}]:[],{label:"Gas Limit",value:M(c?fc(c.gasLimit):li)}];return(0,Me.jsxs)("div",{className:"sf-body sf-review",children:[(0,Me.jsxs)("div",{className:"sf-review-amount",children:[(0,Me.jsx)("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"}}),(0,Me.jsxs)("span",{className:"sf-review-amount-value",children:[p,(0,Me.jsx)("span",{className:"sf-review-amount-symbol",children:t.symbol})]})]}),(0,Me.jsxs)("div",{className:"sf-review-parties",children:[(0,Me.jsxs)("div",{className:"sf-review-card sf-review-party",children:[(0,Me.jsx)("span",{className:"sf-review-party-label",children:"From"}),(0,Me.jsxs)("div",{className:"sf-review-party-head",children:[(0,Me.jsx)("span",{className:"sf-review-party-avatar",children:h&&(0,Me.jsx)("img",{src:h,alt:"",width:28,height:28,draggable:!1,onError:L=>{L.currentTarget.style.display="none"}})}),(0,Me.jsx)("span",{className:"sf-review-party-name",children:y})]}),(0,Me.jsx)("span",{className:"sf-review-party-addr",children:i})]}),(0,Me.jsx)("span",{className:"sf-review-arrow","aria-hidden":!0,children:(0,Me.jsx)(Ec,{size:16})}),(0,Me.jsxs)("div",{className:"sf-review-card sf-review-party",children:[(0,Me.jsx)("span",{className:"sf-review-party-label",children:"To"}),(0,Me.jsx)("span",{className:"sf-review-party-addr",children:n})]})]}),(0,Me.jsxs)("section",{className:"sf-review-card",children:[(0,Me.jsx)("h3",{className:"sf-review-section-title",children:"Summary"}),(0,Me.jsxs)("div",{className:"sf-review-row",children:[(0,Me.jsx)("span",{className:"sf-review-row-label",children:"Network"}),(0,Me.jsx)("span",{className:"sf-review-row-value",children:s})]}),W.map(L=>(0,Me.jsxs)("div",{className:"sf-review-row",children:[(0,Me.jsx)("span",{className:"sf-review-row-label",children:L.label}),(0,Me.jsx)("span",{className:"sf-review-row-value",children:L.value})]},L.label))]}),(0,Me.jsxs)("section",{className:"sf-review-card",children:[(0,Me.jsx)("h3",{className:"sf-review-section-title",children:"Total"}),(0,Me.jsxs)("div",{className:"sf-review-row",children:[(0,Me.jsx)("span",{className:"sf-review-row-label",children:"Total Amount"}),(0,Me.jsxs)("span",{className:"sf-review-row-value",children:[p," ",t.symbol]})]}),m&&(0,Me.jsxs)("div",{className:"sf-review-row",children:[(0,Me.jsx)("span",{className:"sf-review-row-label",children:"Max. Total Amount"}),(0,Me.jsx)("span",{className:"sf-review-row-value",children:M(I)})]})]}),g&&!f&&!x&&(0,Me.jsxs)("div",{className:"sf-message sf-message--error",role:"alert",children:["Not enough ",v||t.symbol," to cover the amount plus the network fee. Reduce the amount and try again."]}),(f||x)&&(0,Me.jsx)("div",{className:"sf-message sf-message--error",role:"alert",children:f||x})]})}var di=V(require("react"),1);var $t=require("react/jsx-runtime");function Uc({flow:e}){let[t,r]=di.useState(""),n=t.trim().toLowerCase(),o=di.useMemo(()=>n?e.tokens.filter(a=>a.symbol.toLowerCase().includes(n)||a.name.toLowerCase().includes(n)):e.tokens,[e.tokens,n]);return(0,$t.jsxs)("div",{className:"sf-body sf-token-select",children:[(0,$t.jsxs)("div",{className:"sf-search",children:[(0,$t.jsx)(Nc,{size:20}),(0,$t.jsx)("input",{className:"sf-search-input",value:t,onChange:a=>r(a.target.value),placeholder:"Search Tokens",autoComplete:"off",spellCheck:!1,"aria-label":"Search tokens"})]}),(0,$t.jsxs)("div",{className:"sf-token-list",children:[o.map(a=>{let i=`${a.chainId}:${a.address.toLowerCase()}`,s=Ko(e.resolvedEnv,a.chainId),l=e.getTokenPriceUsd?.(a);return(0,$t.jsxs)("button",{type:"button",className:"sf-token-row",onClick:()=>e.selectToken(a),"data-track":"token_item","data-track-id":a.symbol,children:[(0,$t.jsxs)("span",{className:"sf-token-left",children:[(0,$t.jsxs)("span",{className:"sf-token-icon-wrap",children:[(0,$t.jsx)("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&&(0,$t.jsx)("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"}})]}),(0,$t.jsx)("span",{className:"sf-token-name",children:a.symbol})]}),(0,$t.jsxs)("span",{className:"sf-token-right",children:[(0,$t.jsx)("span",{className:"sf-token-balance",children:In(a.quantity.numeric,a.quantity.decimals)}),l!==void 0&&(0,$t.jsx)("span",{className:"sf-token-price",children:ai(l)})]})]},i)}),o.length===0&&(0,$t.jsx)("div",{className:"sf-empty",children:"No tokens found"})]})]})}he(`.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-system-orange-default, #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-system-orange-default, #f0640d)}.sf-address-field[data-filled]{border-color:var(--ds-system-orange-default, #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-system-orange-high, #e56f00)}.sf-tab[data-active]:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;border-radius:9999px;background:var(--ds-system-orange-high, #e56f00)}.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-system-orange-default, #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-system-orange-high, #e56f00)}.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
+ `);var vt=require("react/jsx-runtime"),Eh={token:"Send",recipient:"Send",amount:"Send",review:"Sign Transaction",result:""};function Zo({onClose:e,onBackToWallet:t,onConfirmSuccess:r,onSuccess:n,className:o,...a}){let i=jc.useCallback(p=>{n?.(p),r?.(p)},[r,n]),l=kc({...a,onSuccess:n||r?i:void 0,onExit:t}),{step:d,status:c}=l,b=$r(l.recipient.trim()),f=Yn(l.amount,l.token.quantity.decimals),g="value"in f&&f.value<=l.balanceRaw,x=c==="submitting"||c==="confirming",w=d!=="result",m=Eh[d]??"";return(0,vt.jsx)(Ce,{feature:"send",children:(0,vt.jsxs)("div",{className:ze("sf-root",o),"data-step":d,children:[(0,vt.jsxs)("header",{className:"sf-header",children:[w?(0,vt.jsx)("button",{type:"button",className:"sf-header-btn",onClick:l.back,"aria-label":"Back","data-track":"back",children:(0,vt.jsx)(un,{size:24})}):(0,vt.jsx)("span",{className:"sf-header-btn","aria-hidden":!0}),(0,vt.jsx)("span",{className:"sf-header-title",children:m}),(0,vt.jsx)("button",{type:"button",className:"sf-header-btn",onClick:e,"aria-label":"Close","data-track":"close",children:(0,vt.jsx)(jr,{size:24})})]}),d==="token"&&(0,vt.jsx)(Uc,{flow:l}),d==="recipient"&&(0,vt.jsx)(Oc,{flow:l}),d==="amount"&&(0,vt.jsx)(Rc,{flow:l}),d==="review"&&(0,vt.jsx)(Fc,{flow:l}),d==="result"&&(0,vt.jsx)(zc,{flow:l}),(0,vt.jsxs)("footer",{className:"sf-footer","data-step":d,children:[d==="recipient"&&(0,vt.jsx)("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"&&(0,vt.jsx)("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"&&(0,vt.jsxs)("div",{className:"sf-footer-row",children:[(0,vt.jsx)("button",{type:"button",className:"sf-btn sf-btn--secondary",onClick:l.back,disabled:x,"data-track":"review_cancel",children:"Cancel"}),(0,vt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.confirmSend,disabled:x||!l.canSend||l.insufficientGas,"data-track":"review_send",children:x?"Sending...":"Send"})]}),d==="result"&&c==="success"&&(0,vt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:()=>r?.(l.txHash||void 0),"data-track":"result_ok",children:"All done"}),d==="result"&&c==="error"&&(0,vt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.retry,"data-track":"result_retry",children:"Try Again"})]})]})})}var Wc=V(require("@radix-ui/react-popover"),1),Gc=require("vaul");var Kn=require("react/jsx-runtime");function _c({asChild:e,className:t,children:r}){let{isMobile:n,theme:o,walletAddress:a}=Nn(),i=r!=null,s=e??!0,l=i?r:(0,Kn.jsxs)("button",{type:"button",className:ze("wi-trigger-btn",t),"data-theme":o,"data-mobile":n||void 0,children:[(0,Kn.jsx)(Yd,{size:n?14:16}),(0,Kn.jsx)("span",{className:"wi-trigger-address",children:dr(a)})]});return n?(0,Kn.jsx)(Gc.Drawer.Trigger,{asChild:s,children:l}):(0,Kn.jsx)(Wc.Trigger,{asChild:s,children:l})}var oe=V(require("react"),1),Gi=V(require("@radix-ui/react-popover"),1),fa=require("vaul");var Io=V(require("bignumber.js"),1);var ci=V(require("bignumber.js"),1),Mh=/^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i;function mt(e){if(e==null)return null;if(e instanceof ci.default)return e.isFinite()?e:null;if(typeof e=="number")return Number.isFinite(e)?new ci.default(e):null;let t=String(e).replace(/[,%\s]/g,"");if(!Mh.test(t))return null;let r=new ci.default(t);return r.isFinite()?r:null}var Hc=require("@tanstack/react-query"),Qc=require("react");var pi="user-balance";async function Ah(e,t,r,n){let o=new URLSearchParams({networkId:`eip155:${t}`,account:r}),a=await fetch(`${e}/v1/public/token/balance?${o}`,{cache:"no-store",signal:n});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 mn(e,t,r=!0){let n=Tt[e],o=[n.cross,n.bsc],a=(0,Hc.useQueries)({queries:o.map(d=>({queryKey:[pi,e,t,d],queryFn:async({signal:c})=>Ah(await Oe("walletServer",e),d,t,c),enabled:!!t&&r,staleTime:0,refetchInterval:r?5e3:!1}))}),i=a.some(d=>d.isLoading),s=a.some(d=>d.isError);return{tokens:(0,Qc.useMemo)(()=>{let d=[];for(let c of a)c.data&&d.push(...c.data);return d},[a]),isLoading:i,isError:s}}var ui=require("@tanstack/react-query"),Vc=require("react");var Lh="forge-holdings",Dh="forge-token-image";async function Ph(e,t,r){let n=await fetch(`${e}/v1/users/${t}/holdings`,{cache:"no-store",signal:r});if(!n.ok)throw new Error(`Failed to fetch forge holdings: ${n.status}`);let o=await n.json();if(!o.success)throw new Error("Forge holdings API error");return o.data.items}async function Oh(e,t,r){let n=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store",signal:r});if(!n.ok)return{address:t,image_url:""};let o=await n.json();return o.success?{address:t,image_url:o.data.token.image_url}:{address:t,image_url:""}}function qc(e,t,r=!0){let{data:n,...o}=(0,ui.useQuery)({queryKey:[Lh,e,t],queryFn:async({signal:a})=>Ph(await Oe("bondingCurve",e),t,a),enabled:!!t&&r,staleTime:0,refetchInterval:r?5e3:!1});return{holdings:n??[],...o}}function Yc(e,t,r=!0){let n=(0,ui.useQueries)({queries:t.map(a=>({queryKey:[Dh,e,a],queryFn:async({signal:i})=>Oh(await Oe("bondingCurve",e),a,i),enabled:r,staleTime:1/0}))});return{imageMap:(0,Vc.useMemo)(()=>{let a=new Map;for(let i of n)i.data&&a.set(i.data.address,i.data.image_url);return a},[n])}}var Kc=require("@tanstack/react-query"),Zc=require("react");var fi="token-stats";function Ir(e,t){return`${e}:${t.toLowerCase()}`}function gn(e,t=!0){let{data:r,...n}=(0,Kc.useQuery)({queryKey:[fi,e],queryFn:async({signal:a})=>{let i=await Oe("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:(0,Zc.useMemo)(()=>{let a=new Map;if(!r?.data)return a;for(let i of r.data){let s=Ir(i.chain_id,i.address);a.set(s,i)}return a},[r]),...n}}var Xc=require("@tanstack/react-query"),Bh="crossd-apr",Jc=6e4,zh="https://crossd-dashboard-api.crossdefi.io/api/v1/overview",mi,Xo;function ol(){return mi&&mi.expiresAt>Date.now()?Promise.resolve(mi.value):Xo||(Xo=(async()=>{let e=await fetch(zh,{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 r=parseFloat(t.data.est_last_epoch_apy);if(!Number.isFinite(r))throw new Error("CROSSD overview returned a non-numeric APR");let n=r*100;return mi={value:n,expiresAt:Date.now()+Jc},n})().finally(()=>{Xo=void 0}),Xo)}function gi(e){let t=Math.abs(e),r=(e>=0?Math.floor:Math.ceil)(t*100)/100;return`APR ${e>=0?"+":"-"}${r}%`}function $c(){let{data:e,...t}=(0,Xc.useQuery)({queryKey:[Bh],queryFn:ol,staleTime:Jc});return{aprPercent:e??null,...t}}var ep=require("@tanstack/react-query"),al=require("react");var Fh="token-info";function Jo(e,t){return`${t.toLowerCase()}_${e}`}function tp(e,t=!0){let{data:r,...n}=(0,ep.useQuery)({queryKey:[Fh,e],queryFn:async({signal:i})=>{let s=await Oe("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=(0,al.useMemo)(()=>{let i=new Map;if(!r?.data)return i;for(let s of r.data){let l=Jo(s.chain_id,s.address);i.set(l,s.category)}return i},[r]),a=(0,al.useMemo)(()=>{let i=new Map;if(!r?.data)return i;for(let s of r.data)i.set(Jo(s.chain_id,s.address),s);return i},[r]);return{categoryMap:o,infoMap:a,...n}}var rp=require("react"),np=V(require("bignumber.js"),1);function op(e,t,r){let{tokens:n,isLoading:o}=mn(e,t,r),{statsMap:a}=gn(e,r);return(0,rp.useMemo)(()=>{let i=new np.default(0);for(let c of n){let b=a.get(Ir(c.chainId,c.address));if(!b)continue;let f=mt(c.quantity.numeric),g=mt(b.price);if(!f||!g)continue;let x=f.shiftedBy(-c.quantity.decimals).multipliedBy(g);x.isNaN()||(i=i.plus(x))}let s=i.toFixed(),{displayValue:l,isLowerBound:d}=oc(s);return{totalUsd:s,displayValue:l,isLowerBound:d,isLoading:o}},[n,a,o])}var If=require("qrcode.react");function Qt(e,t,r,n){if(!n||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;e.preventDefault();let o;try{o=n(t,r)}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,c=b=>{if(b===null){d?.close();return}let f=b??t;if(d)try{d.location.href=f}catch{d.close(),a(f)}else a(f)};o.then(c,b=>{console.error("[dapp-ui] onOutlink rejected:",b),d?.close()});return}let s=o;if(s===null)return;a(s??t)}var eo=V(require("react"),1),Mu=require("vaul");var So=require("react");var wr=V(require("bignumber.js"),1),Uh=/^(\d{4}-\d{2}-\d{2})/;function ap(e){if(!e||e.length===0)return;let t=new Map,r;for(let{key:o,cumulative:a}of e.map(i=>({key:Uh.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),r=o;if(r===void 0)return;let n=new Date().toISOString().slice(0,10);return t.get(n)??t.get(r)}function ip(e){return e.poolType==="Unknown"}function hi(e){return e.length<=12?e:`${e.slice(0,6)}...${e.slice(-4)}`}function bi(e){return e.length<=13?e:`${e.slice(0,6)}...${e.slice(-4)}`}function $o(e,t){let r=e.length+t.length;if(r>32)return"xs";if(r>24)return"sm"}function il(e){return e?.toUpperCase()==="WONE"?"ONE":e}var jh=["Request Arguments:","Details:","Docs:","Version:","Contract Call:"];function ea(e,t){console.error("[wallet-portfolio] withdraw failed:",e);let n=e instanceof Error?e.message:"";for(let a of jh){let i=n.indexOf(a);i>=0&&(n=n.slice(0,i))}return n.split(`
8
+ `).map(a=>a.trim()).find(a=>a.length>0)||t}var Wh="0xe00e8bf3";function sp(e,t){let r=typeof e=="bigint"?e:BigInt(e);if(r<0n)throw new Error("poolId must be non-negative");if(t<0n)throw new Error("amount must be non-negative");let n=r.toString(16).padStart(64,"0"),o=t.toString(16).padStart(64,"0");return`${Wh}${n}${o}`}function Ro(e){return!e||e<=0n?"0":new wr.default(e.toString()).shiftedBy(-9).toFormat(2,wr.default.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function wi(e){return!e||e<=0n?"0":new wr.default(e.toString()).toFormat(0,wr.default.ROUND_DOWN)}function yi(e){if(!e||e<=0n)return"0";let t=new wr.default(e.toString()).shiftedBy(-18),r=t.isLessThan(1e-4)?7:4;return t.toFormat(r,wr.default.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function tn(e,t){let r=new wr.default(e).shiftedBy(-t);return!r.isFinite()||r.isZero()?"0":r.isGreaterThanOrEqualTo(1)?r.toFormat(2,wr.default.ROUND_DOWN):r.toFormat(4,wr.default.ROUND_DOWN)}function sl(e){return tn(e,0)}var ta={rate:1,symbol:"$"};function Zn(e,t=ta){let r=Number.isFinite(t.rate)&&t.rate>0?t.rate:1;return`${t.symbol||"$"}${e.times(r).toFormat(2,wr.default.ROUND_DOWN)}`}function Mn(e,t,r,n=ta){let o=new wr.default(r||"0");if(!o.isFinite()||o.isLessThanOrEqualTo(0))return null;let a=new wr.default(e||"0").shiftedBy(-t).times(o);return a.isFinite()?Zn(a,n):null}var ra=(0,So.createContext)(null);function Dt(){let e=(0,So.useContext)(ra);if(!e)throw new Error("WalletPortfolio compound components must be used within <WalletPortfolio>");return e}function Er(){let{conversionRatio:e,currencySymbol:t}=Dt();return(0,So.useMemo)(()=>({rate:typeof e=="number"&&e>0?e:ta.rate,symbol:t||ta.symbol}),[e,t])}var lp=require("vaul");var ll=require("react/jsx-runtime");function dp({asChild:e,children:t}){let{walletAddress:r}=Dt(),n=t!=null,o=e??!0,a=n?t:(0,ll.jsx)("button",{type:"button",children:dr(r)});return(0,ll.jsx)(lp.Drawer.Trigger,{asChild:o,children:a})}var sa=require("vaul");var Bt=V(require("react"),1),Iu=require("@tanstack/react-query");var xi=require("react"),dl=(0,xi.createContext)(null);function cp(){return(0,xi.useContext)(dl)}var Pt=require("react/jsx-runtime");function pp({size:e=22,className:t}){return(0,Pt.jsx)("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Pt.jsx)("path",{d:"M14 4L7 11L14 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function up({size:e=22,className:t}){return(0,Pt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Pt.jsx)("path",{d:"M18.333 3.667v5.5h-5.5",stroke:"currentColor",strokeWidth:1.833,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Pt.jsx)("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 fp({size:e=12,className:t}){return(0,Pt.jsx)("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Pt.jsx)("path",{d:"M6 11A5 5 0 106 1a5 5 0 000 10zM6 8V6M6 4h.005",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})})}function vi({size:e=16,className:t}){return(0,Pt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Pt.jsx)("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"}),(0,Pt.jsx)("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 ki({size:e=16,className:t}){return(0,Pt.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Pt.jsx)("path",{d:"M13.333 4L6 11.333 2.667 8",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function Ri({size:e=48,className:t}){return(0,Pt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Pt.jsx)("circle",{cx:"24",cy:"24",r:"24",fill:"currentColor"}),(0,Pt.jsx)("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 yr({size:e=12,className:t}){return(0,Pt.jsxs)("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:[(0,Pt.jsx)("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"}),(0,Pt.jsx)("path",{d:"M7 1H11V5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Pt.jsx)("path",{d:"M11 1L6 6",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})]})}var mp=require("@tanstack/react-query"),cl=require("react");var Gh="wp:reward-pools";function Co(e,t=!0){let{data:r,...n}=(0,mp.useQuery)({queryKey:[Gh,e],queryFn:async({signal:i})=>{let s=await Oe("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=(0,cl.useMemo)(()=>r?.data.pools.filter(i=>i.pool_type==="CrossPool")??[],[r]),a=(0,cl.useMemo)(()=>r?.data.pools.filter(i=>i.pool_type==="GamePool")??[],[r]);return{crossPools:o,gamePools:a,allPools:r?.data.pools??[],...n}}var gp=require("@tanstack/react-query"),hp=require("react");var _h="wp:user-deposits";function Si(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,gp.useQuery)({queryKey:[_h,e,t],queryFn:async({signal:s})=>{let l=await Oe("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 c=await d.json();if(c.code!==200)throw new Error(`Deposits API error: ${c.code}`);return c},enabled:n,staleTime:0});return{depositMap:(0,hp.useMemo)(()=>{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}}var Cp=require("@tanstack/react-query"),Np=require("react");var bp={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},wp={dev:"https://stg.onechain.nexus/points",stage:"https://stg.onechain.nexus/points",production:"https://www.onechain.nexus/points"};var yp={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"};var pl={dev:"https://dev-stake.ogfcorp.com",stage:"https://stg-stake.ogfcorp.com",production:"https://stake.ogfcorp.com"},xp={dev:`${pl.dev}/portfolio`,stage:`${pl.stage}/portfolio`,production:`${pl.production}/portfolio`};var vp={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},Mr={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"},Ci={dev:"https://stg-swap-api.crossdefi.io",stage:"https://stg-swap-api.crossdefi.io",production:"https://swap-api.crossdefi.io"},kp={dev:"https://stg.crossdefi.io",stage:"https://stg.crossdefi.io",production:"https://www.crossdefi.io"},Rp={dev:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",stage:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",production:"0xEFd871aF7D695A0c1709e46b565761F4cd1Ef5ba"},Sp={dev:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",stage:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",production:"0x731a104a4461ae45bfef520468b43c262d35e682"};var Hh="wp:token-info",Qh="0x0000000000000000000000000000000000000001";function rn(e,t=!0){let r=Tt[e].cross,{data:n,...o}=(0,Cp.useQuery)({queryKey:[Hh,e],queryFn:async({signal:c})=>{let b=await Oe("walletServer",e),f=await fetch(`${b}/v1/public/token/info`,{cache:"no-store",signal:c});if(!f.ok)throw new Error(`Failed to fetch token info: ${f.status}`);let g=await f.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}=(0,Np.useMemo)(()=>{let c=new Map,b=new Map;if(!n?.data)return{byChainAddr:c,byChainSym:b};for(let f of n.data){let g=f.address.toLowerCase();c.set(`${f.chain_id}:${g}`,f),c.set(g,f);let x=f.symbol.replace(/^t/,"").toUpperCase(),w=`${f.chain_id}:${x}`;b.has(w)||b.set(w,f),b.has(x)||b.set(x,f)}return{byChainAddr:c,byChainSym:b}},[n]);return{getTokenImage:(c,b,f)=>{let g=c.toLowerCase(),x=!!f?.chainOnly,w=a.get(`${r}:${g}`);if(w?.image)return w.image;if(!x){let m=a.get(g);if(m?.image)return m.image}if(b){let m=b.replace(/^t/,"").toUpperCase(),p=i.get(`${r}:${m}`);if(p?.image)return p.image;if(!x){let y=i.get(m);if(y?.image)return y.image}}return""},getTokenSymbol:(c,b,f)=>{let g=c.toLowerCase();return(a.get(`${r}:${g}`)??(f?.chainOnly?void 0:a.get(g)))?.symbol||b},getNativeToken:()=>a.get(`${r}:${Qh}`),...o}}var ul=V(require("react"),1);var Xn=require("react/jsx-runtime");function Ar({sectionKey:e,title:t,icon:r,iconFit:n="cover",isEmpty:o,loading:a=!1,children:i}){let s=cp();return ul.useEffect(()=>{s?.report(e,{loading:a,empty:o})},[s,e,a,o]),ul.useEffect(()=>()=>s?.unregister(e),[s,e]),o?null:(0,Xn.jsxs)("div",{className:"wp-svc-card",children:[(0,Xn.jsxs)("div",{className:"wp-svc-card-head",children:[(0,Xn.jsx)("img",{className:"wp-svc-card-icon",src:r,alt:"",style:{objectFit:n}}),(0,Xn.jsx)("span",{className:"wp-svc-card-title",children:t})]}),(0,Xn.jsx)("div",{className:"wp-svc-items",children:i})]})}var Ni=V(require("bignumber.js"),1),We=require("react/jsx-runtime"),Vh="ONErewards";function qh(e){return new Ni.default(e||"0").isGreaterThan(0)}function Tp(){let{env:e,walletAddress:t,onOutlink:r}=Dt(),n=Er(),o=!!t,{allPools:a,isLoading:i}=Co(e,o),{depositMap:s,isLoading:l}=Si(e,t,o),{getTokenImage:d}=rn(e,o),c=(g,x)=>`${bp[e]}/gametoken/tokens/${g.deposit_token.address}?mode=rewards${x==="withdraw"?"&trade=withdraw":""}`,b=`${Mr[e]}/reward.png`,f=a.filter(g=>{let x=s.get(g.pool_address.toLowerCase()),w=x?.deposited_amount??"0",m=x?.claimable_reward??"0";return!(new Ni.default(w).isZero()&&new Ni.default(m).isZero())});return(0,We.jsx)(Ar,{sectionKey:"rewards",title:Vh,icon:b,isEmpty:f.length===0,loading:i||l,children:f.map(g=>{let x=s.get(g.pool_address.toLowerCase()),w=x?.deposited_amount??"0",m=x?.claimable_reward??"0",p=c(g,"withdraw"),y=c(g,"claim"),h=d(g.deposit_token.address,g.deposit_token.symbol),v=g.reward_tokens[0],R=v?d(v.address,v.symbol):"",S=g.reward_tokens.map(L=>L.symbol),E=S.length>0?`${g.deposit_token.symbol}-${S.join("/")}`:g.deposit_token.symbol,C=v?tn(m,v.decimals):"0",N=v?.symbol??"Reward",I=Mn(w,g.deposit_token.decimals,g.deposit_token.price,n),M=v?Mn(m,v.decimals,v.price,n):null,W=!!x&&qh(m);return(0,We.jsxs)("article",{className:"wp-item","data-side":"reward",children:[(0,We.jsxs)("div",{className:"wp-item-body",children:[(0,We.jsxs)("div",{className:"wp-item-line",children:[(0,We.jsx)("span",{className:"wp-item-label",children:"Pool (Deposit - Earn)"}),(0,We.jsxs)("div",{className:"wp-svc-token",children:[(0,We.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[h&&(0,We.jsx)("img",{className:"wp-svc-token-icon",src:h,alt:""}),R&&(0,We.jsx)("img",{className:"wp-svc-token-icon",src:R,alt:""})]}),(0,We.jsx)("span",{children:E})]})]}),(0,We.jsxs)("div",{className:"wp-item-line",children:[(0,We.jsx)("span",{className:"wp-item-label",children:"Deposited"}),(0,We.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[h&&(0,We.jsx)("img",{className:"wp-svc-token-icon",src:h,alt:""}),(0,We.jsxs)("div",{className:"wp-svc-amount",children:[(0,We.jsx)("span",{className:"wp-svc-amount-main",children:tn(w,g.deposit_token.decimals)}),I&&(0,We.jsx)("span",{className:"wp-item-usd",children:I})]})]})]}),(0,We.jsxs)("div",{className:"wp-item-line",children:[(0,We.jsxs)("span",{className:"wp-item-label",children:["Claimable (",N,")"]}),(0,We.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[R&&(0,We.jsx)("img",{className:"wp-svc-token-icon",src:R,alt:""}),(0,We.jsxs)("div",{className:"wp-svc-amount",children:[(0,We.jsx)("span",{className:"wp-svc-amount-main",children:C}),M&&(0,We.jsx)("span",{className:"wp-item-usd",children:M})]})]})]})]}),(0,We.jsxs)("div",{className:"wp-item-tags",children:[(0,We.jsxs)("a",{className:"wp-tag wp-tag--muted",href:p,target:"_blank",rel:"noopener noreferrer","data-track":"rewards_withdraw_open",onClick:L=>Qt(L,p,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:g,userDeposit:x}},r),children:[(0,We.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,We.jsx)(yr,{size:12,className:"wp-tag-icon"})]}),(0,We.jsxs)("a",{className:"wp-tag wp-tag--mint","data-disabled":!W||void 0,"aria-disabled":!W||void 0,href:W?y:void 0,target:W?"_blank":void 0,rel:W?"noopener noreferrer":void 0,onClick:L=>{if(!W){L.preventDefault();return}Qt(L,y,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:g,userDeposit:x}},r)},children:[(0,We.jsx)("span",{className:"wp-tag-label",children:"Claim"}),(0,We.jsx)(yr,{size:12,className:"wp-tag-icon"})]})]})]},g.pool_address)})})}var zp=V(require("react"),1);var Ep=require("@tanstack/react-query"),aa=require("react");var Yh="0x70a08231",Kh="0x18160ddd",Zh="0x313ce567",Xh=8e3;async function Jh(e,t,r,n){let o=new AbortController,a=setTimeout(()=>o.abort(),Xh);n&&n.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:r}),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 $h(e){return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function na(e){if(!(!e||e==="0x"))try{return BigInt(e)}catch{return}}async function hn(e,t,r,n,o){try{return await Jh(e,"eth_call",[o?{from:o,to:t,data:r}:{to:t,data:r},"latest"],n)}catch{return}}async function eb(e,t,r,n){let[o,a,i]=await Promise.all([hn(e,r,Yh+$h(t),n),hn(e,r,Kh,n),hn(e,r,Zh,n)]),s=na(o);if(s===void 0)return null;let l=na(i);return{balance:s,totalSupply:na(a),decimals:l!==void 0?Number(l):void 0}}async function oa(e,t){let r=Tt[e].cross,n=await Oe("walletServer",e),o=await fetch(`${n}/v1/public/chain/info/${r}`,{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 Ip(e,t,r,n){if(!t||r.length===0)return{};let o;try{o=await oa(e,n)}catch{o=void 0}if(!o)return{};let a=await Promise.all(r.map(async s=>[s.toLowerCase(),await eb(o,t,s,n)])),i={};for(let[s,l]of a)l&&(i[s]=l);return i}var tb="wp:withdraw-token-meta",rb="0xc89039c5",nb="0x95d89b41",ob="0x313ce567";function ab(e){if(!(!e||e==="0x"))try{let t=e.replace(/^0x/,""),r=Number(BigInt("0x"+t.slice(64,128)));if(!Number.isFinite(r)||r<=0||r>64)return;let n=t.slice(128,128+r*2),o="";for(let a=0;a<n.length;a+=2)o+=String.fromCharCode(parseInt(n.slice(a,a+2),16));return o||void 0}catch{return}}function ib(e){if(!e||e==="0x")return;let r="0x"+e.replace(/^0x/,"").padStart(64,"0").slice(24,64);return/^0x[a-f0-9]{40}$/.test(r)&&r!=="0x0000000000000000000000000000000000000000"?r:void 0}async function sb(e,t,r){if(t.length===0)return{};let n;try{n=await oa(e,r)}catch{n=void 0}if(!n)return{};let o=await Promise.all(t.map(async i=>{let s=ib(await hn(n,i,rb,r));if(!s)return[i.toLowerCase(),null];let[l,d]=await Promise.all([hn(n,s,nb,r),hn(n,s,ob,r)]),c=ab(l),b=na(d);return c?[i.toLowerCase(),{tokenAddress:s,symbol:c,decimals:b!==void 0?Number(b):18}]:[i.toLowerCase(),null]})),a={};for(let[i,s]of o)s&&(a[i]=s);return a}function Mp(e,t,r=!0){let o=r&&!!t,{allPools:a,isLoading:i}=Co(e,o),{deposits:s,isLoading:l}=Si(e,t,o),d=(0,aa.useMemo)(()=>{let m=new Map;for(let p of a)m.set(p.pool_address.toLowerCase(),p);return m},[a]),c=(0,aa.useMemo)(()=>s.filter(m=>{try{return BigInt(m.deposited_amount||"0")>0n}catch{return!1}}),[s]),b=(0,aa.useMemo)(()=>c.map(m=>m.pool_address.toLowerCase()).filter(m=>!d.has(m)).sort(),[c,d]),{data:f,isLoading:g}=(0,Ep.useQuery)({queryKey:[tb,e,b],queryFn:({signal:m})=>sb(e,b,m),enabled:o&&b.length>0,staleTime:1440*60*1e3});return{positions:(0,aa.useMemo)(()=>{let m=[];for(let p of c){let y=p.pool_address.toLowerCase(),h=d.get(y);if(h){m.push({poolId:p.pool_id,poolAddress:p.pool_address,poolType:h.pool_type,tokenSymbol:h.deposit_token.symbol,tokenAddress:h.deposit_token.address,decimals:h.deposit_token.decimals,price:h.deposit_token.price,depositedRaw:p.deposited_amount});continue}let v=f?.[y];v&&m.push({poolId:p.pool_id,poolAddress:p.pool_address,poolType:"Unknown",tokenSymbol:v.symbol,tokenAddress:v.tokenAddress,decimals:v.decimals,depositedRaw:p.deposited_amount})}return m},[c,d,f]),isLoading:i||l||g}}var er=V(require("react"),1);var J=require("react/jsx-runtime"),lb=400;function db(e,t,r){if(t==="loading")return"Estimating...";if(!e||t==="error"||t==="unavailable")return"Wallet estimate";let n=e.maxFeePerGas??e.gasPrice;return!n||n<=0n||e.gasLimit<=0n?"Wallet estimate":`${yi(e.gasLimit*n)} ${r??""}`.trim()}function fl(e,t,r){return r==="loading"?"Estimating...":r==="error"||r==="unavailable"?"-":`${e} ${t}`.trim()}function cb({position:e,size:t}){return e.icon?(0,J.jsx)("img",{src:e.icon,alt:"",width:t,height:t}):(0,J.jsx)("span",{children:e.tokenSymbol.slice(0,1)})}function Ap({open:e,status:t,positions:r,initialPoolAddress:n,walletAddress:o,txHash:a,error:i,copied:s=!1,estimateWithdraw:l,onClose:d,onConfirm:c,onCopyHash:b,trackFunnel:f,nativeSymbol:g}){let[x,w]=er.useState(null),[m,p]=er.useState("idle"),y=er.useRef(0),h=er.useRef(void 0),v=er.useRef(null);er.useEffect(()=>()=>clearTimeout(h.current),[]);let R=er.useMemo(()=>{let H=n?.toLowerCase();return r.find(A=>A.poolAddress.toLowerCase()===H)??r[0]??null},[r,n]),S=er.useMemo(()=>{try{return BigInt(R?.depositedRaw??"0")}catch{return 0n}},[R?.depositedRaw]),E=R?.decimals??18;er.useEffect(()=>{!e||!R||f?.("position_selected")},[e,R,f]);let C=er.useCallback(()=>{w(null),p(l?"idle":"unavailable"),y.current+=1,v.current=null},[]);if(er.useEffect(()=>{e&&C()},[e,C]),er.useEffect(()=>{if(!e||t!=="confirm"){clearTimeout(h.current);return}if(!l||!R){clearTimeout(h.current),p("unavailable");return}if(S<=0n){clearTimeout(h.current),y.current+=1,v.current=null,w(null),p("idle");return}let H=`${R.poolAddress.toLowerCase()}:${S.toString()}`;if(v.current===H)return;v.current=H,clearTimeout(h.current);let A=y.current+1;y.current=A,p("loading"),h.current=setTimeout(()=>{l(R,S).then(O=>{y.current===A&&(w(O??null),p(O?"ready":"unavailable"))}).catch(()=>{y.current===A&&(w(null),p("error"))})},lb)},[e,t,S,l,R]),!e||!R)return null;let N=t==="submitting",I=Ro(x?.maxPriorityFeePerGas),M=Ro(x?.maxFeePerGas??x?.gasPrice),W=wi(x?.gasLimit),L=tn(R.depositedRaw,E);return(0,J.jsx)("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:H=>{H.target===H.currentTarget&&!N&&d()},children:(0,J.jsxs)("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:[(0,J.jsx)("div",{className:"wp-claim-grabber","aria-hidden":!0,children:(0,J.jsx)("span",{})}),(0,J.jsxs)("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&a?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:(0,J.jsx)(Ri,{})}),(0,J.jsxs)("div",{className:"wp-claim-copy",children:[(0,J.jsx)("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),(0,J.jsx)("p",{className:"wp-claim-desc",children:"Your withdrawal request has been submitted. Balances will update shortly after the transaction settles."})]}),(0,J.jsx)("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:(0,J.jsxs)("div",{className:"wp-claim-list-item",children:[(0,J.jsx)("span",{children:"Tx Hash"}),(0,J.jsxs)("button",{type:"button",className:"wp-claim-hash",onClick:b,"aria-label":"Copy transaction hash","data-track":"withdraw_hash_copy",children:[(0,J.jsx)("strong",{children:bi(a)}),s?(0,J.jsx)(ki,{}):(0,J.jsx)(vi,{})]})]})})]}):(0,J.jsxs)(J.Fragment,{children:[t==="error"&&(0,J.jsxs)("div",{className:"wp-claim-heading",children:[(0,J.jsx)("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),(0,J.jsx)("p",{className:"wp-claim-error-message",children:i||"The withdraw request could not be completed."})]}),(0,J.jsxs)("div",{className:"wp-claim-reward-card","data-fit":$o(R.tokenSymbol,L),"aria-label":"Deposited balance",children:[(0,J.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,J.jsx)(cb,{position:R,size:28})}),(0,J.jsx)("strong",{className:"wp-claim-reward-symbol",children:R.tokenSymbol}),(0,J.jsx)("strong",{className:"wp-claim-reward-amount",children:L})]}),(0,J.jsxs)("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:[(0,J.jsxs)("div",{className:"wp-claim-account-row",children:[(0,J.jsxs)("div",{className:"wp-claim-account",children:[(0,J.jsx)("span",{className:"wp-claim-account-avatar","aria-hidden":!0}),(0,J.jsxs)("strong",{children:[R.tokenSymbol," Pool"]})]}),(0,J.jsx)("span",{children:hi(o)})]}),(0,J.jsx)("span",{className:"wp-claim-divider","aria-hidden":!0}),(0,J.jsxs)("div",{className:"wp-claim-detail-list",children:[(0,J.jsxs)("div",{className:"wp-claim-detail-row",children:[(0,J.jsx)("span",{children:"Est. Tx Fee"}),(0,J.jsx)("strong",{children:db(x,m,g)})]}),(0,J.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,J.jsx)("span",{children:"Priority Fee Per Gas"}),(0,J.jsx)("strong",{children:fl(I,"Gwei",m)})]}),(0,J.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,J.jsx)("span",{children:"Max Fee Per Gas"}),(0,J.jsx)("strong",{children:fl(M,"Gwei",m)})]}),(0,J.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,J.jsx)("span",{children:"Gas Limit"}),(0,J.jsx)("strong",{children:fl(W,"",m)})]})]})]})]}),(0,J.jsxs)("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&(0,J.jsx)("button",{type:"button",className:"wp-claim-secondary","data-track":"withdraw_cancel",onClick:d,children:t==="error"?"Close":"Cancel"}),(0,J.jsxs)("button",{type:"button",className:"wp-claim-primary","data-track":"withdraw_confirm",onClick:()=>{if(t==="success"){d();return}R&&S>0n&&c(R,S,x)},disabled:N||(t==="confirm"||t==="error")&&S<=0n,children:[t==="success"&&"Done",t==="submitting"&&(0,J.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}),t==="error"&&"Try Again",t==="confirm"&&"Withdraw Now"]})]})]}),(0,J.jsx)("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:(0,J.jsx)("span",{})})]})})}var Ot=V(require("react"),1),Op=require("@tanstack/react-query");var Lp=require("@tanstack/react-query");var pb="wp:reward-factory-info";function Dp(e,t=!0){let{data:r,...n}=(0,Lp.useQuery)({queryKey:[pb,e],queryFn:async({signal:o})=>{let a=await Oe("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:r?.data??null,routerAddress:r?.data.router_address??"",...n}}var ub="wp:";function Pp(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function Bp(e){let{env:t,walletAddress:r,sendTransaction:n,estimateGas:o}=Dt(),a=!!r,i=!!n,s=(0,Op.useQueryClient)(),{routerAddress:l}=Dp(t,a&&i),d=Pp(l),[c,b]=Ot.useState(!1),[f,g]=Ot.useState(void 0),[x,w]=Ot.useState("confirm"),[m,p]=Ot.useState(),[y,h]=Ot.useState(""),[v,R]=Ot.useState(!1),S=Ot.useRef(void 0);Ot.useEffect(()=>()=>clearTimeout(S.current),[]);let E=Ot.useRef(new Set),C=Ot.useCallback((O,ce)=>{E.current.has(O)||(E.current.add(O),Ye("withdraw",O,{...ce,tags:{section:e,...ce?.tags}}))},[e]),N=Ot.useCallback((O,ce)=>d?{to:d,value:0n,data:sp(O,ce),chainId:Tt[t].cross}:null,[t,d]),I=Ot.useCallback(()=>{s.invalidateQueries({predicate:O=>typeof O.queryKey[0]=="string"&&O.queryKey[0].startsWith(ub)})},[s]),M=Ot.useCallback(O=>{g(O),b(!0),w("confirm"),p(void 0),h(""),R(!1),E.current=new Set,C("opened")},[C]),W=Ot.useCallback(()=>{x!=="submitting"&&(b(!1),g(void 0),w("confirm"),p(void 0),h(""),R(!1),x==="success"&&I())},[x,I]),L=Ot.useCallback(async(O,ce)=>{if(!o)return null;let X=N(O.poolId,ce),P=Pp(r);return!X||!P?null:o({...X,from:P})},[N,o,r]),H=Ot.useCallback(async()=>{if(!(!m||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(m),R(!0),clearTimeout(S.current),S.current=setTimeout(()=>R(!1),1400)}catch{R(!1)}},[m]),A=Ot.useCallback(async(O,ce,X)=>{if(!n){w("error"),h("Withdraw is not available for this wallet.");return}if(!d){w("error"),h("Withdraw contract address is not available.");return}try{w("submitting"),h("");let P=N(O.poolId,ce);if(!P){w("error"),h("Withdraw contract address is not available.");return}C("submitted");let xe=await n({...P,gas:X?.gasLimit&&X.gasLimit>0n?X.gasLimit:void 0,maxFeePerGas:X?.maxFeePerGas&&X.maxFeePerGas>0n?X.maxFeePerGas:void 0,maxPriorityFeePerGas:X?.maxPriorityFeePerGas&&X.maxPriorityFeePerGas>0n?X.maxPriorityFeePerGas:void 0});p(xe),w("success"),C("confirmed"),I()}catch(P){w("error"),h(ea(P,"Failed to request withdraw.")),C("confirmed",{status:"failure",reason:gr(P)})}},[N,I,d,n,C]);return{canWithdrawInline:i,isOpen:c,initialPoolAddress:f,status:x,txHash:m,error:y,copied:v,hasEstimator:!!o,openWithdraw:M,closeWithdraw:W,estimateWithdraw:L,confirmWithdraw:A,copyHash:H,trackFunnelOnce:C}}var dt=require("react/jsx-runtime"),fb="ONEpoints";function Fp(){let{env:e,walletAddress:t,onOutlink:r}=Dt(),n=Er(),o=!!t,{getTokenImage:a,getNativeToken:i}=rn(e,o),s=Bp("points"),{positions:l,isLoading:d}=Mp(e,t,o),c=zp.useMemo(()=>l.filter(ip).map(g=>({...g,icon:a(g.tokenAddress,g.tokenSymbol)})),[l,a]),b=`${Mr[e]}/point.png`,f=wp[e];return(0,dt.jsxs)(dt.Fragment,{children:[(0,dt.jsx)(Ar,{sectionKey:"points",title:fb,icon:b,isEmpty:c.length===0,loading:d,children:c.map(g=>{let x=g.price?Mn(g.depositedRaw,g.decimals,g.price,n):null;return(0,dt.jsxs)("article",{className:"wp-item","data-side":"reward",children:[(0,dt.jsxs)("div",{className:"wp-item-body",children:[(0,dt.jsxs)("div",{className:"wp-item-line",children:[(0,dt.jsx)("span",{className:"wp-item-label",children:"Token"}),(0,dt.jsxs)("div",{className:"wp-svc-token",children:[g.icon&&(0,dt.jsx)("img",{className:"wp-svc-token-icon",src:g.icon,alt:""}),(0,dt.jsx)("span",{children:g.tokenSymbol})]})]}),(0,dt.jsxs)("div",{className:"wp-item-line",children:[(0,dt.jsx)("span",{className:"wp-item-label",children:"Deposited"}),(0,dt.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[g.icon&&(0,dt.jsx)("img",{className:"wp-svc-token-icon",src:g.icon,alt:""}),(0,dt.jsxs)("div",{className:"wp-svc-amount",children:[(0,dt.jsx)("span",{className:"wp-svc-amount-main",children:tn(g.depositedRaw,g.decimals)}),x&&(0,dt.jsx)("span",{className:"wp-item-usd",children:x})]})]})]})]}),(0,dt.jsx)("div",{className:"wp-item-tags",children:s.canWithdrawInline?(0,dt.jsx)("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"points_withdraw_open",onClick:()=>s.openWithdraw(g.poolAddress),children:(0,dt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"})}):(0,dt.jsxs)("a",{className:"wp-tag wp-tag--muted",href:f,target:"_blank",rel:"noopener noreferrer","data-track":"points_withdraw_open",onClick:w=>Qt(w,f,{category:"portfolio",origin:"portfolio-points",payload:{position:g}},r),children:[(0,dt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,dt.jsx)(yr,{size:12,className:"wp-tag-icon"})]})})]},g.poolAddress)})}),(0,dt.jsx)(Ap,{open:s.isOpen,status:s.status,positions:c,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})]})}var gl=V(require("react"),1);var Up=require("@tanstack/react-query");var mb="wp:stake-info";function jp(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,Up.useQuery)({queryKey:[mb,e,t],queryFn:async({signal:s})=>{let l=await Oe("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 c=await d.json();if(c.code!==0&&c.code!==200)throw new Error(`Stake info API error: ${c.code}`);return c},enabled:n,staleTime:0});return{stakeInfo:o?.data,...a}}var Wp=require("@tanstack/react-query");var gb="wp:stake-rewards",hb=31;function Gp(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,Wp.useQuery)({queryKey:[gb,e,t],queryFn:async({signal:i})=>{let s=await Oe("posa",e),l=await fetch(`${s}/rewards/${t}?limit=${hb}`,{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:n,staleTime:0});return{latestReward:o?.[0]??null,aprAccrued:ap(o),...a}}var _p=require("@tanstack/react-query"),bb="wp:staking-onchain";function Hp(e,t,r=!0){let n=r&&!!t&&!!e,{data:o,...a}=(0,_p.useQuery)({queryKey:[bb,e],queryFn:async()=>{if(!t)throw new Error("stakingRewardsReader not provided");return t(e)},enabled:n,staleTime:0});return{onchain:o,...a}}var ml=require("react"),qp=V(require("bignumber.js"),1);function Qp(e){return e?.trim().toUpperCase()==="ONE"}function Vp(e){return new qp.default(e||"0").isGreaterThan(0)}function Ti(e,t,r=!0){let{allPools:n}=Co(e,r),o=(0,ml.useMemo)(()=>{for(let d of n)for(let c of[d.deposit_token,...d.reward_tokens])if(Qp(c?.symbol)&&Vp(c.price))return c.price},[n]),a=r&&o===void 0,{tokens:i}=mn(e,t,a),{statsMap:s}=gn(e,a),l=Tt[e].cross;return(0,ml.useMemo)(()=>{if(o)return o;let d=i.find(c=>c.chainId===l&&Qp(c.symbol));if(d){let c=s.get(Ir(d.chainId,d.address));if(c&&Vp(c.price))return c.price}return"0"},[o,i,s,l])}var bn=V(require("bignumber.js"),1),It=require("react/jsx-runtime");function wb(e){if(!e)return"\u2014";let t=new bn.default(e);return t.isFinite()?`${t.toFormat(2,bn.default.ROUND_DOWN)}%`:"\u2014"}function Yp(){let{env:e,walletAddress:t,onOutlink:r,stakingRewardsReader:n}=Dt(),o=Er(),a=!!t,{stakeInfo:i,isLoading:s}=jp(e,t,a),{latestReward:l,aprAccrued:d,isLoading:c}=Gp(e,t,a),{onchain:b}=Hp(t,n,a),f=Ti(e,t,a),{getNativeToken:g}=rn(e,a),x=g()?.symbol,w="ONEstaking",m=`${Mr[e]}/cross-staking.png`,p=xp[e],y=i?.total_stake??"0",h=gl.useMemo(()=>b?new bn.default(b.earnedWei.toString()).shiftedBy(-18).toString(10):l?.cumulative_earned??i?.rewards_earned??"0",[b,l,i]),v=gl.useMemo(()=>b?new bn.default(b.stakedWei.toString()).shiftedBy(-18):new bn.default(y),[b,y]),R=d!==void 0?new bn.default(d):void 0,S=i?.days_since_first_stake,E=R!==void 0&&R.isFinite()&&v.isGreaterThan(0)&&S!==null&&S!==void 0?R.div(v).times(365).div(Math.max(1,S)).times(100):void 0,C=!(new bn.default(y).isZero()&&new bn.default(h).isZero()),N=Mn(y,0,f,o),I=Mn(h,0,f,o);return(0,It.jsx)(Ar,{sectionKey:"staking",title:w,icon:m,iconFit:"contain",isEmpty:!C,loading:s||c,children:(0,It.jsxs)("article",{className:"wp-item","data-side":"stake",children:[(0,It.jsxs)("div",{className:"wp-item-body",children:[(0,It.jsxs)("div",{className:"wp-item-line",children:[(0,It.jsx)("span",{className:"wp-item-label",children:"Staked"}),(0,It.jsxs)("div",{className:"wp-svc-amount",children:[(0,It.jsx)("span",{className:"wp-svc-amount-main",children:`${sl(y)} ${x??""}`.trim()}),N&&(0,It.jsx)("span",{className:"wp-item-usd",children:N})]})]}),(0,It.jsxs)("div",{className:"wp-item-line",children:[(0,It.jsx)("span",{className:"wp-item-label",children:"Rewards Earned"}),(0,It.jsxs)("div",{className:"wp-svc-amount",children:[(0,It.jsx)("span",{className:"wp-svc-amount-main",children:`${sl(h)} ${x??""}`.trim()}),I&&(0,It.jsx)("span",{className:"wp-item-usd",children:I})]})]}),(0,It.jsxs)("div",{className:"wp-item-line",children:[(0,It.jsx)("span",{className:"wp-item-label",children:"My APR"}),(0,It.jsx)("span",{children:wb(E?.toString(10))})]})]}),(0,It.jsx)("div",{className:"wp-item-tags",children:(0,It.jsxs)("a",{className:"wp-tag wp-tag--mint",href:p,target:"_blank",rel:"noopener noreferrer","data-track":"stake_outlink",onClick:M=>Qt(M,p,{category:"portfolio",origin:"portfolio-stake",payload:{stakeInfo:i}},r),children:[(0,It.jsx)("span",{className:"wp-tag-label",children:"Manage"}),(0,It.jsx)(yr,{size:12,className:"wp-tag-icon"})]})})]})})}var hl=V(require("react"),1);var Kp=require("@tanstack/react-query");var yb="wp:game-swap-pools";function Zp(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,Kp.useQuery)({queryKey:[yb,e,t],queryFn:async({signal:i})=>{let s=await Oe("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:n,staleTime:0});return{pools:o??[],...a}}var Xp=require("@tanstack/react-query");var xb="wp:game-swap-lp-balances";function Jp(e,t,r,n){let o=[...r].map(l=>l.toLowerCase()).sort(),a=!!t&&o.length>0,{data:i,...s}=(0,Xp.useQuery)({queryKey:[xb,e,t,o,!!n],queryFn:async({signal:l})=>{let d=n?await n(o):await Ip(e,t,o,l),c={};for(let[b,f]of Object.entries(d))c[b.toLowerCase()]=f;return c},enabled:a,staleTime:0});return{balances:i??{},...s}}var nn=V(require("bignumber.js"),1),yt=require("react/jsx-runtime"),vb="Gametoken LP",eu=18,kb=new nn.default("0.0001");function $p(e){return e?.trim().toUpperCase()==="ONE"}function Rb(e){return e&&e>0?e:eu}function Sb(e){let t=$p(e.token_a?.symbol)&&!$p(e.token_b?.symbol),r=t?e.reserve_a:e.reserve_b,n=Rb(t?e.token_a?.decimals:e.token_b?.decimals),o=new nn.default(r||"0").shiftedBy(-n);return!o.isFinite()||o.isLessThanOrEqualTo(0)?new nn.default(0):o.times(2)}function Cb(e,t,r,n){let o=e.token_a?.symbol?.trim()||"TOKEN",a=e.token_b?.symbol?.trim()||n||"?",i=t?.decimals??eu,s,l;if(t&&t.totalSupply&&t.totalSupply>BigInt(0)){let d=new nn.default(t.balance.toString()),c=new nn.default(t.totalSupply.toString()),b=d.div(c);s=b.times(100);let f=b.times(Sb(e));if(f.isGreaterThan(0)){let g=new nn.default(e.quote_usd??e.cross_usd??"0");l=g.isGreaterThan(0)?Zn(f.times(g),r):`${f.toFormat(4,nn.default.ROUND_DOWN)} ${n??""}`.trim()}}return{pool:e,tokenASymbol:o,tokenBSymbol:a,info:t,lpAmountRaw:t?.balance.toString(),lpDecimals:i,sharePercent:s,valueText:l}}function tu(){let{env:e,walletAddress:t,onOutlink:r,lpBalanceReader:n}=Dt(),o=Er(),a=!!t,{pools:i,isLoading:s}=Zp(e,t,a),l=hl.useMemo(()=>i.map(p=>p.pair_address).filter(Boolean),[i]),{balances:d,isLoading:c}=Jp(e,t,l,n),{getNativeToken:b}=rn(e,a),f=b()?.symbol,g=`${Mr[e]}/game-token.png`,x=Object.keys(d).length>0,w=hl.useMemo(()=>{let p=i.map(y=>Cb(y,d[y.pair_address?.toLowerCase()],o,f));return x?p.filter(y=>y.lpAmountRaw?new nn.default(y.lpAmountRaw).shiftedBy(-y.lpDecimals).isGreaterThanOrEqualTo(kb):!1):p},[i,d,x,o,f]),m=p=>{let y=p.token_a?.address??p.pair_address;return`${vp[e]}/gametoken/tokens/${y}?trade=deposit`};return(0,yt.jsx)(Ar,{sectionKey:"gameSwap",title:vb,icon:g,iconFit:"contain",isEmpty:w.length===0,loading:s||c,children:w.map(p=>{let{pool:y}=p,h=m(y),v=`${p.tokenASymbol} / ${p.tokenBSymbol}`,R=y.token_a?.logo_url,S=y.token_b?.logo_url;return(0,yt.jsxs)("article",{className:"wp-item","data-side":"game-swap",children:[(0,yt.jsxs)("div",{className:"wp-item-body",children:[(0,yt.jsxs)("div",{className:"wp-item-line",children:[(0,yt.jsx)("span",{className:"wp-item-label",children:"Pool"}),(0,yt.jsxs)("div",{className:"wp-svc-token",children:[(0,yt.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[R&&(0,yt.jsx)("img",{className:"wp-svc-token-icon",src:R,alt:""}),S&&(0,yt.jsx)("img",{className:"wp-svc-token-icon",src:S,alt:""})]}),(0,yt.jsx)("span",{children:v})]})]}),p.lpAmountRaw!==void 0&&(0,yt.jsxs)("div",{className:"wp-item-line",children:[(0,yt.jsx)("span",{className:"wp-item-label",children:"My LP"}),(0,yt.jsxs)("span",{children:[tn(p.lpAmountRaw,p.lpDecimals)," LP"]})]}),p.sharePercent!==void 0&&(0,yt.jsxs)("div",{className:"wp-item-line",children:[(0,yt.jsx)("span",{className:"wp-item-label",children:"Pool Share"}),(0,yt.jsxs)("span",{children:[p.sharePercent.toFormat(2,nn.default.ROUND_DOWN),"%"]})]}),p.valueText!==void 0&&(0,yt.jsxs)("div",{className:"wp-item-line",children:[(0,yt.jsx)("span",{className:"wp-item-label",children:"Value"}),(0,yt.jsx)("span",{children:p.valueText})]})]}),(0,yt.jsx)("div",{className:"wp-item-tags",children:(0,yt.jsxs)("a",{className:"wp-tag wp-tag--mint",href:h,target:"_blank",rel:"noopener noreferrer","data-track":"gameswap_outlink","data-track-id":v,onClick:E=>Qt(E,h,{category:"portfolio",origin:"portfolio-game-swap",payload:{pool:y}},r),children:[(0,yt.jsx)("span",{className:"wp-tag-label",children:"Manage"}),(0,yt.jsx)(yr,{size:12,className:"wp-tag-icon"})]})})]},y.pair_address)})})}var An=V(require("bignumber.js"),1),su=require("react");var ru=require("@tanstack/react-query");var Nb="wp:forge-pools";function nu(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,ru.useQuery)({queryKey:[Nb,e,t],queryFn:async()=>{let s=await Oe("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:n,staleTime:0}),i=o??[];return{pools:i,isEmpty:i.length===0,...a}}var ou=require("@tanstack/react-query"),au=require("react");var Tb="wp:forge-token-detail";async function Ib(e,t){let r=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store"});return r.ok?(await r.json())?.data?.token??null:null}function iu(e,t,r=!0){let n=(0,ou.useQueries)({queries:t.map(i=>({queryKey:[Tb,e,i],queryFn:async()=>Ib(await Oe("bondingCurve",e),i),enabled:r&&!!i,staleTime:3e4}))}),o=(0,au.useMemo)(()=>{let i=new Map;for(let s=0;s<n.length;s++){let l=n[s]?.data,d=t[s];l&&d&&i.set(d.toLowerCase(),l)}return i},[n,t]),a=n.some(i=>i.isLoading);return{detailMap:o,isLoading:a}}var kt=require("react/jsx-runtime"),Eb="ONEforge",lu=18,Mb="https://contents.crosstoken.io/wallet/token/images/FT.png";function Ab(e){if(!e||e==="0")return"0";let t=new An.default(e).shiftedBy(-lu);return t.isZero()?"0":t.isGreaterThanOrEqualTo(1)?t.toFormat(2,An.default.ROUND_DOWN):t.toFormat(4,An.default.ROUND_DOWN)}function Lb(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 Db(e,t,r,n){let o=new An.default(r||"0");if(!o.isGreaterThan(0))return null;let a=new An.default(e.total_supply||"0"),i=new An.default(e.lp_balance||"0"),s=new An.default(t?.reserve_b||"0").shiftedBy(-lu);if(!a.isGreaterThan(0)||!i.isGreaterThan(0)||!s.isGreaterThan(0))return null;let l=s.times(2),c=i.div(a).times(l).times(o);return c.isFinite()?Zn(c,n):null}function du(){let{env:e,walletAddress:t,onOutlink:r}=Dt(),n=Er(),o=!!t,{pools:a,isEmpty:i,isLoading:s}=nu(e,t,o),l=(0,su.useMemo)(()=>a.map(g=>g.token.address),[a]),{detailMap:d}=iu(e,l,o&&l.length>0),c=Ti(e,t,o),b=g=>`${yp[e]}/forge/token/${g.token.address}`,f=`${Mr[e]}/forge.png`;return(0,kt.jsx)(Ar,{sectionKey:"forge",title:Eb,icon:f,iconFit:"contain",isEmpty:i,loading:s,children:a.map(g=>{let x=d.get(g.token.address.toLowerCase()),w=x?.image_url||x?.image||g.token.image||Mb,m=x?.symbol||g.token.symbol,p=b(g),y=Db(g,x,c,n);return(0,kt.jsxs)("a",{className:"wp-item","data-side":"lp",href:p,target:"_blank",rel:"noopener noreferrer","data-track":"forge_outlink","data-track-id":m,onClick:h=>Qt(h,p,{category:"portfolio",origin:"portfolio-forge",payload:{pool:g,tokenDetail:x}},r),children:[(0,kt.jsxs)("div",{className:"wp-item-body",children:[(0,kt.jsxs)("div",{className:"wp-item-line",children:[(0,kt.jsx)("span",{className:"wp-item-label",children:"Asset"}),(0,kt.jsxs)("div",{className:"wp-svc-token",children:[(0,kt.jsx)("img",{className:"wp-svc-token-icon",src:w,alt:""}),(0,kt.jsx)("span",{children:m}),x?.name&&(0,kt.jsx)("span",{className:"wp-token-subtle",children:x.name})]})]}),(0,kt.jsxs)("div",{className:"wp-item-line",children:[(0,kt.jsx)("span",{className:"wp-item-label",children:"LP Balance"}),(0,kt.jsx)("div",{className:"wp-svc-token wp-svc-token--amount",children:(0,kt.jsxs)("div",{className:"wp-svc-amount",children:[(0,kt.jsx)("span",{className:"wp-svc-amount-main",children:Ab(g.lp_balance)}),y&&(0,kt.jsx)("span",{className:"wp-item-usd",children:y})]})})]}),(0,kt.jsxs)("div",{className:"wp-item-line",children:[(0,kt.jsx)("span",{className:"wp-item-label",children:"Ownership"}),(0,kt.jsx)("span",{className:"wp-line-value",children:Lb(g.pool_ownership)})]})]}),(0,kt.jsx)("div",{className:"wp-item-tags",children:(0,kt.jsxs)("span",{className:"wp-tag wp-tag--muted",children:[(0,kt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,kt.jsx)(yr,{size:12,className:"wp-tag-icon"})]})})]},g.pair_address)})})}var xl=require("react"),Nu=V(require("bignumber.js"),1);var cu=require("@tanstack/react-query");var Pb="wp:crossd-positions";function Ob(e){let t=e??{};return(t.positions??t.data?.positions??[]).filter(n=>{if(!n?.token_id||!n.liquidity)return!1;try{return BigInt(n.liquidity)>0n}catch{return!1}})}function pu(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,cu.useQuery)({queryKey:[Pb,e,t],queryFn:async()=>{let s=await fetch(`${Ci[e]}/api/v1/positions?owner=${t}`,{cache:"no-store"});if(!s.ok)throw new Error(`crossd positions fetch failed: ${s.status}`);return Ob(await s.json())},enabled:n,staleTime:0}),i=o??[];return{positions:i,isEmpty:i.length===0,...a}}var uu=require("@tanstack/react-query"),fu=require("react");var Bb="wp:crossd-position-details";function zb(e){let t=e??{},r=t.data??t;return r?.token_id||r?.pool?r:null}function mu(e,t,r=!0){let n=(0,uu.useQueries)({queries:t.map(a=>({queryKey:[Bb,e,a],queryFn:async()=>{let i=await fetch(`${Ci[e]}/api/v1/positions/${a}`,{cache:"no-store"});if(!i.ok)throw new Error(`crossd position detail failed: ${i.status}`);return zb(await i.json())},enabled:r&&!!a,staleTime:6e4}))});return{detailMap:(0,fu.useMemo)(()=>{let a=new Map;return n.forEach((i,s)=>{let l=i.data,d=t[s];l&&d&&a.set(d,l)}),a},[n,t])}}var wn=V(require("react"),1);var ee=require("react/jsx-runtime"),Fb=300*1e3,gu="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function Ub(e,t,r){if(t)return"Estimating...";if(!e)return"Wallet estimate";let n=e.maxFeePerGas??e.gasPrice;return!n||n<=0n||e.gasLimit<=0n?"Wallet estimate":`${yi(e.gasLimit*n)} ${r??""}`.trim()}function bl(e,t,r){return r?"Estimating...":`${e} ${t}`.trim()}function hu({open:e,status:t,target:r,token0Icon:n,token1Icon:o,token0Symbol:a,token1Symbol:i,nativeSymbol:s,txHash:l,error:d,copied:c=!1,hasEstimator:b,prepareWithdraw:f,confirmWithdraw:g,onClose:x,onCopyHash:w,trackFunnel:m}){let[p,y]=wn.useState(null),[h,v]=wn.useState(null),R=wn.useRef(0);wn.useEffect(()=>{if(!e||!r)return;let Z=++R.current;y(null),v(null),m?.("dialog_opened"),f().then(be=>{R.current===Z&&(y(be),v(be?Date.now():null))})},[e,r]);let S=t==="submitting",E=t==="estimating"||t==="confirm"&&!p,C=wn.useCallback(async()=>{let Z=p,be=!h||Date.now()-h>Fb;if(!Z||be){let Ne=++R.current;if(Z=await f(),R.current!==Ne)return;y(Z),v(Z?Date.now():null)}Z&&await g(Z)},[p,h,f,g]);if(!e||!r)return null;let{position:N,detail:I}=r,M=I.pool?.token0,W=I.pool?.token1,L=a||M?.symbol||N.pool?.token0_symbol||"?",H=i||W?.symbol||N.pool?.token1_symbol||"?",A=M?.decimals??18,O=W?.decimals??18,ce=n||M?.logo_url||gu,X=o||W?.logo_url||gu,P=`${L}/${H}`,xe=p?ko(p.expectedAmount0.toString(),A):null,ne=p?ko(p.expectedAmount1.toString(),O):null,K=Ro(p?.estimate?.maxPriorityFeePerGas),U=Ro(p?.estimate?.maxFeePerGas??p?.estimate?.gasPrice),te=wi(p?.estimate?.gasLimit);return(0,ee.jsx)("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:Z=>{Z.target===Z.currentTarget&&!S&&x()},children:(0,ee.jsxs)("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:[(0,ee.jsx)("div",{className:"wp-claim-grabber","aria-hidden":!0,children:(0,ee.jsx)("span",{})}),(0,ee.jsxs)("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&l?(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:(0,ee.jsx)(Ri,{})}),(0,ee.jsxs)("div",{className:"wp-claim-copy",children:[(0,ee.jsx)("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),(0,ee.jsxs)("p",{className:"wp-claim-desc",children:["Your ",P," position withdrawal has been submitted. Balances will update shortly after the transaction settles."]})]}),(0,ee.jsx)("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:(0,ee.jsxs)("div",{className:"wp-claim-list-item",children:[(0,ee.jsx)("span",{children:"Tx Hash"}),(0,ee.jsxs)("button",{type:"button",className:"wp-claim-hash",onClick:w,"aria-label":"Copy transaction hash","data-track":"crossd_withdraw_hash_copy",children:[(0,ee.jsx)("strong",{children:bi(l)}),c?(0,ee.jsx)(ki,{}):(0,ee.jsx)(vi,{})]})]})})]}):(0,ee.jsxs)(ee.Fragment,{children:[t==="error"&&(0,ee.jsxs)("div",{className:"wp-claim-heading",children:[(0,ee.jsx)("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),(0,ee.jsx)("p",{className:"wp-claim-error-message",children:d||"The withdraw request could not be completed."})]}),(0,ee.jsxs)("div",{className:"wp-claim-reward-card","data-fit":$o(L,xe??""),"aria-label":`Expected ${L}`,children:[(0,ee.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,ee.jsx)("img",{src:ce,alt:"",width:28,height:28})}),(0,ee.jsx)("strong",{className:"wp-claim-reward-symbol",children:L}),(0,ee.jsx)("strong",{className:"wp-claim-reward-amount",children:xe??"Estimating..."})]}),(0,ee.jsxs)("div",{className:"wp-claim-reward-card","data-fit":$o(H,ne??""),"aria-label":`Expected ${H}`,children:[(0,ee.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,ee.jsx)("img",{src:X,alt:"",width:28,height:28})}),(0,ee.jsx)("strong",{className:"wp-claim-reward-symbol",children:H}),(0,ee.jsx)("strong",{className:"wp-claim-reward-amount",children:ne??"Estimating..."})]}),b&&(0,ee.jsx)("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:(0,ee.jsxs)("div",{className:"wp-claim-detail-list",children:[(0,ee.jsxs)("div",{className:"wp-claim-detail-row",children:[(0,ee.jsx)("span",{children:"Est. Tx Fee"}),(0,ee.jsx)("strong",{children:Ub(p?.estimate,E,s)})]}),(0,ee.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ee.jsx)("span",{children:"Priority Fee Per Gas"}),(0,ee.jsx)("strong",{children:bl(K,"Gwei",E)})]}),(0,ee.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ee.jsx)("span",{children:"Max Fee Per Gas"}),(0,ee.jsx)("strong",{children:bl(U,"Gwei",E)})]}),(0,ee.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ee.jsx)("span",{children:"Gas Limit"}),(0,ee.jsx)("strong",{children:bl(te,"",E)})]})]})})]}),(0,ee.jsxs)("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&(0,ee.jsx)("button",{type:"button",className:"wp-claim-secondary","data-track":"crossd_withdraw_cancel",onClick:x,children:t==="error"?"Close":"Cancel"}),(0,ee.jsx)("button",{type:"button",className:"wp-claim-primary","data-track":"crossd_withdraw_confirm",onClick:()=>{if(t==="success"){x();return}S||E||(m?.("confirm_clicked"),C())},disabled:S||E,children:t==="success"?"Done":S?(0,ee.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}):E?(0,ee.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Estimating"}):t==="error"?"Retry":"Withdraw"})]})]}),(0,ee.jsx)("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:(0,ee.jsx)("span",{})})]})})}var Ct=V(require("react"),1),Ru=require("@tanstack/react-query");var jb="0x0c49ccbe",Wb="0xfc6f7865",Gb="0x49404b7c",_b="0xdf2ab5bb",Hb="0xac9650d8",bu=(1n<<128n)-1n,yu=600n,Qb=99n,Vb=100n;function wl(e){return e*Qb/Vb}function wu(e,t){return!!e&&!!t&&e.toLowerCase()===t.toLowerCase()}function hr(e,t){if(e<0n)throw new Error(`${t} must be non-negative`);let r=e.toString(16);if(r.length>64)throw new Error(`${t} exceeds uint256`);return r.padStart(64,"0")}function Ii(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 yl(e){return jb+hr(e.tokenId,"tokenId")+hr(e.liquidity,"liquidity")+hr(e.amount0Min,"amount0Min")+hr(e.amount1Min,"amount1Min")+hr(e.deadline,"deadline")}function qb(e){return Wb+hr(e.tokenId,"tokenId")+Ii(e.recipient,"recipient")+hr(e.amount0Max,"amount0Max")+hr(e.amount1Max,"amount1Max")}function Yb(e,t){return Gb+hr(e,"amountMinimum")+Ii(t,"recipient")}function Kb(e,t,r){return _b+Ii(e,"token")+hr(t,"amountMinimum")+Ii(r,"recipient")}function Zb(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 hr(BigInt(a.length/2),"callLength")+i.toLowerCase()}),r=BigInt(e.length)*32n,n=[];for(let o of t)n.push(hr(r,"callOffset")),r+=BigInt(o.length/2);return Hb+hr(0x20n,"arrayOffset")+hr(BigInt(e.length),"arrayLength")+n.join("")+t.join("")}function xu(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 vu(e){let t=wu(e.token0,e.wcrossAddress),r=wu(e.token1,e.wcrossAddress),n=t||r,o=[yl({tokenId:e.tokenId,liquidity:e.liquidity,amount0Min:e.amount0Min,amount1Min:e.amount1Min,deadline:e.deadline}),qb({tokenId:e.tokenId,recipient:n?e.positionManagerAddress:e.owner,amount0Max:bu,amount1Max:bu})];return n&&(o.push(Yb(0n,e.owner)),o.push(Kb(t?e.token1:e.token0,0n,e.owner))),Zb(o)}async function ku(e,t,r){let n;try{n=await oa(e,r)}catch{n=void 0}if(!n)return null;let o=yl({tokenId:t.tokenId,liquidity:t.liquidity,amount0Min:0n,amount1Min:0n,deadline:t.deadline}),a=await hn(n,t.positionManager,o,r,t.owner);return xu(a)}var Xb="wp:",Jb=[1500,3e3,4500,6e3];function $b(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function Su(){let{env:e,walletAddress:t,sendTransaction:r,estimateGas:n}=Dt(),o=!!r,a=(0,Ru.useQueryClient)(),[i,s]=Ct.useState(!1),[l,d]=Ct.useState(null),[c,b]=Ct.useState("confirm"),[f,g]=Ct.useState(),[x,w]=Ct.useState(""),[m,p]=Ct.useState(!1),[y,h]=Ct.useState(new Set),v=Ct.useRef(void 0),R=Ct.useRef([]),S=Ct.useRef(0);Ct.useEffect(()=>()=>{clearTimeout(v.current),R.current.forEach(clearTimeout)},[]);let E=Ct.useRef(new Set),C=Ct.useCallback((A,O)=>{E.current.has(A)||(E.current.add(A),Ye("withdraw",A,{...O,tags:{section:"crossdPool",...O?.tags}}))},[]),N=Ct.useCallback(()=>{let A=()=>a.invalidateQueries({predicate:O=>typeof O.queryKey[0]=="string"&&O.queryKey[0].startsWith(Xb)});A(),R.current.forEach(clearTimeout),R.current=Jb.map(O=>setTimeout(A,O))},[a]),I=Ct.useCallback(A=>{S.current+=1,d(A),s(!0),b("confirm"),g(void 0),w(""),p(!1),E.current=new Set,C("opened")},[C]),M=Ct.useCallback(()=>{c!=="submitting"&&(S.current+=1,s(!1),d(null),b("confirm"),g(void 0),w(""),p(!1))},[c]),W=Ct.useCallback(async()=>{let A=S.current,O=$b(t),ce=l?.position.token_id,X=l?.position.liquidity,P=l?.detail.pool?.token0?.address,xe=l?.detail.pool?.token1?.address;if(!O||!ce||!X||!P||!xe)return b("error"),w("Position data is incomplete. Please refresh and retry."),null;try{b("estimating"),w("");let ne=BigInt(ce),K=BigInt(X),U=BigInt(Math.floor(Date.now()/1e3))+yu,te=Rp[e],Z=await ku(e,{owner:O,positionManager:te,tokenId:ne,liquidity:K,deadline:U});if(S.current!==A)return null;if(!Z)return b("error"),w("Failed to estimate withdrawal amounts. Please retry."),null;let be=vu({tokenId:ne,liquidity:K,amount0Min:wl(Z.amount0),amount1Min:wl(Z.amount1),deadline:U,owner:O,positionManagerAddress:te,token0:P,token1:xe,wcrossAddress:Sp[e]}),Ne={to:te,value:0n,data:be,chainId:Tt[e].cross},re=null;if(n){try{re=await n({...Ne,from:O})}catch{re=null}if(S.current!==A)return null}return b("confirm"),{tx:Ne,estimate:re,expectedAmount0:Z.amount0,expectedAmount1:Z.amount1}}catch(ne){return S.current!==A||(b("error"),w(ea(ne,"Failed to prepare withdraw."))),null}},[e,n,l,t]),L=Ct.useCallback(async A=>{if(!r){b("error"),w("Withdraw is not available for this wallet.");return}try{b("submitting"),w(""),C("submitted");let O=await r({...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(O),b("success");let ce=l?.position.token_id;ce&&h(X=>{let P=new Set(X);return P.add(ce),P}),C("confirmed"),N()}catch(O){b("error"),w(ea(O,"Failed to request withdraw.")),C("confirmed",{status:"failure",reason:gr(O)})}},[N,r,l,C]),H=Ct.useCallback(async()=>{if(!(!f||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(f),p(!0),clearTimeout(v.current),v.current=setTimeout(()=>p(!1),1400)}catch{p(!1)}},[f]);return{canWithdrawInline:o,isOpen:i,target:l,withdrawnTokenIds:y,status:c,txHash:f,error:x,copied:m,hasEstimator:!!n,openWithdraw:I,closeWithdraw:M,prepareWithdraw:W,confirmWithdraw:L,copyHash:H,trackFunnelOnce:C}}var gt=require("react/jsx-runtime"),e0="ONEusd Pool",Cu="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function Tu(){let{env:e,walletAddress:t,onOutlink:r}=Dt(),n=Er(),o=!!t,{positions:a,isLoading:i}=pu(e,t,o),s=Su(),l=(0,xl.useMemo)(()=>a.filter(C=>!C.token_id||!s.withdrawnTokenIds.has(C.token_id)),[a,s.withdrawnTokenIds]),d=(0,xl.useMemo)(()=>l.map(C=>C.token_id).filter(C=>!!C),[l]),{detailMap:c}=mu(e,d,o&&d.length>0),b=`${kp[e]}/pool`,{getTokenImage:f,getTokenSymbol:g,getNativeToken:x}=rn(e,o),w=f("","ONEUSD",{chainOnly:!0})||`${Mr[e]}/crossd.png`,m={chainOnly:!0},p=(C,N)=>{let I=il(g(C?.address??"",C?.symbol??N,m));return I==="ONE"?x()?.symbol??"?":I??"?"},y=(C,N)=>{let I=C?.symbol??N,M=il(I);return M==="ONE"?x()?.image||Cu:f(C?.address??"",M,m)||C?.logo_url||Cu},h=s.target?.detail.pool,v=y(h?.token0,s.target?.position.pool?.token0_symbol),R=y(h?.token1,s.target?.position.pool?.token1_symbol),S=p(h?.token0,s.target?.position.pool?.token0_symbol),E=p(h?.token1,s.target?.position.pool?.token1_symbol);return(0,gt.jsxs)(gt.Fragment,{children:[(0,gt.jsx)(Ar,{sectionKey:"crossdPool",title:e0,icon:w,iconFit:"contain",isEmpty:l.length===0,loading:i,children:l.map(C=>{let N=C.token_id?c.get(C.token_id):void 0,I=`${p(N?.pool?.token0,C.pool?.token0_symbol)}/${p(N?.pool?.token1,C.pool?.token1_symbol)}`,M=C.pool?.fee_tier_percentage,W=y(N?.pool?.token0,C.pool?.token0_symbol),L=y(N?.pool?.token1,C.pool?.token1_symbol),H=Zn(new Nu.default(C.position_value_usd??"0"),n),A=s.canWithdrawInline&&!!N?.pool?.token0?.address&&!!N?.pool?.token1?.address;return(0,gt.jsxs)("article",{className:"wp-item","data-side":"crossd",children:[(0,gt.jsxs)("div",{className:"wp-item-body",children:[(0,gt.jsxs)("div",{className:"wp-item-line",children:[(0,gt.jsx)("span",{className:"wp-item-label",children:"Pool"}),(0,gt.jsxs)("div",{className:"wp-svc-token",children:[(0,gt.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[(0,gt.jsx)("img",{className:"wp-svc-token-icon",src:W,alt:""}),(0,gt.jsx)("img",{className:"wp-svc-token-icon",src:L,alt:""})]}),(0,gt.jsx)("span",{children:I}),M&&(0,gt.jsx)("span",{className:"wp-token-subtle",children:M})]})]}),(0,gt.jsxs)("div",{className:"wp-item-line",children:[(0,gt.jsx)("span",{className:"wp-item-label",children:"Position Value"}),(0,gt.jsx)("span",{className:"wp-line-value",children:H})]})]}),(0,gt.jsx)("div",{className:"wp-item-tags",children:A?(0,gt.jsx)("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"crossd_pool_withdraw_open","data-track-id":I,onClick:()=>{N&&s.openWithdraw({position:C,detail:N})},children:(0,gt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"})}):(0,gt.jsxs)("a",{className:"wp-tag wp-tag--muted",href:b,target:"_blank",rel:"noopener noreferrer","data-track":"crossd_pool_outlink","data-track-id":I,onClick:O=>Qt(O,b,{category:"portfolio",origin:"portfolio-crossd-pool",payload:{position:C,detail:N}},r),children:[(0,gt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,gt.jsx)(yr,{size:12,className:"wp-tag-icon"})]})})]},C.token_id)})}),(0,gt.jsx)(hu,{open:s.isOpen,status:s.status,target:s.target,token0Icon:v,token1Icon:R,token0Symbol:S,token1Symbol:E,nativeSymbol:x()?.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 ia=["rewards","points","staking","gameSwap","forge","crossdPool"];he(`.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-system-orange-default, #f0640d);--wp-green: var(--ds-accent-primary-default, #00a0a2);--wp-accent-soft: var(--ds-system-orange-lowest, #2e2820);--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-system-orange-default, #f0640d);--wp-green: var(--ds-accent-primary-default, #00a0a2);--wp-accent-soft: var(--ds-system-orange-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-svc-items,.wp-claim-content{padding:18px 14px}.wp-item-line{gap:10px}.wp-svc-token>span{max-width:168px}}.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
+ `);var ke=require("react/jsx-runtime"),vl=15,t0="wp:";function Jn({env:e,theme:t="light",walletAddress:r,walletName:n,onBack:o,showHeader:a=!0,variant:i="embed",className:s,onOutlink:l,lpBalanceReader:d,stakingRewardsReader:c,sendTransaction:b,estimateGas:f,conversionRatio:g,currencySymbol:x,sections:w}){let m=at(e),p=Bt.useCallback(re=>!w||w.includes(re),[w]),y=!!r,h=(0,Iu.useQueryClient)(),[v,R]=Bt.useState({}),S=Bt.useCallback((re,we)=>{R(Fe=>{let Ae=Fe[re];return Ae&&Ae.loading===we.loading&&Ae.empty===we.empty?Fe:{...Fe,[re]:we}})},[]),E=Bt.useCallback(re=>{R(we=>{if(!(re in we))return we;let Fe={...we};return delete Fe[re],Fe})},[]),C=Bt.useMemo(()=>({report:S,unregister:E}),[S,E]),[N,I]=Bt.useState(vl),[M,W]=Bt.useState(!1),[L,H]=Bt.useState(!1),A=Bt.useRef(void 0),O=Bt.useCallback(()=>{h.invalidateQueries({predicate:re=>typeof re.queryKey[0]=="string"&&re.queryKey[0].startsWith(t0)})},[h]),ce=Bt.useCallback(()=>{O(),W(!0),setTimeout(()=>W(!1),600),I(vl)},[O]);Bt.useEffect(()=>{if(!y)return;let re=setInterval(()=>{I(we=>we<=1?(ce(),vl):we-1)},1e3);return()=>clearInterval(re)},[y,ce]);let X=Bt.useCallback(()=>{o?.()},[o]),P=y?fn(m,r,{size:64}):void 0,xe=Bt.useCallback(async()=>{if(!(L||!r))try{await navigator.clipboard.writeText(r),H(!0),clearTimeout(A.current),A.current=setTimeout(()=>H(!1),2e3)}catch{}},[r,L]);Bt.useEffect(()=>()=>clearTimeout(A.current),[]);let ne=Bt.useMemo(()=>({env:m,theme:t,open:!0,walletAddress:r,close:X,onOutlink:l,lpBalanceReader:d,stakingRewardsReader:c,sendTransaction:b,estimateGas:f,conversionRatio:g,currencySymbol:x}),[m,t,r,X,l,d,c,b,f,g,x]),K=ia.filter(p),U=K.length>0&&K.every(re=>{let we=v[re];return!!we&&!we.loading}),te=U&&K.every(re=>v[re]?.empty),Z=K.some(re=>{let we=v[re];return!!we&&!we.empty}),be=K.length>0&&!U&&!Z,Ne=(0,ke.jsxs)(ke.Fragment,{children:[a&&(0,ke.jsxs)("div",{className:"wp-header",children:[(0,ke.jsxs)("div",{className:"wp-header-account",children:[o&&(0,ke.jsx)("button",{type:"button",className:"wp-header-btn","aria-label":"Back","data-track":"back",onClick:o,children:(0,ke.jsx)(pp,{})}),(0,ke.jsx)("span",{className:"wp-header-avatar","aria-hidden":!0,children:P&&(0,ke.jsx)("img",{src:P,alt:"",className:"wp-header-avatar-img",draggable:!1})}),(n||r)&&(0,ke.jsxs)("div",{className:"wp-header-account-meta",children:[n&&(0,ke.jsx)("span",{className:"wp-header-wallet-name",title:n,children:n}),r&&(0,ke.jsxs)("button",{type:"button",className:"wp-header-address-btn",onClick:xe,"aria-label":"Copy wallet address","data-track":"address_copy",children:[(0,ke.jsx)("span",{className:"wp-header-address",children:hi(r)}),(0,ke.jsx)("span",{className:"wp-header-address-copy","data-copied":L,children:L?(0,ke.jsx)(pn,{size:14}):(0,ke.jsx)(Vn,{size:14})})]})]})]}),(0,ke.jsxs)("button",{type:"button",className:"wp-header-btn wp-refresh-btn","aria-label":"Refresh portfolio","data-track":"refresh",onClick:ce,children:[(0,ke.jsx)(up,{className:M?"wp-spin-once":void 0}),y&&(0,ke.jsx)("span",{className:"wp-refresh-badge",children:N})]})]}),(0,ke.jsx)("div",{className:"wp-body",children:(0,ke.jsxs)("div",{className:"wp-body-inner","data-empty":te||void 0,children:[p("rewards")&&(0,ke.jsx)(Tp,{}),p("points")&&(0,ke.jsx)(Fp,{}),p("staking")&&(0,ke.jsx)(Yp,{}),p("gameSwap")&&(0,ke.jsx)(tu,{}),p("forge")&&(0,ke.jsx)(du,{}),p("crossdPool")&&(0,ke.jsx)(Tu,{}),be&&(0,ke.jsx)("div",{className:"wp-portfolio-loading",role:"status","aria-label":"Loading portfolio",children:(0,ke.jsx)("span",{className:"wp-portfolio-spinner","aria-hidden":!0})}),te&&(0,ke.jsxs)("div",{className:"wp-portfolio-empty",role:"status",children:[(0,ke.jsx)("span",{className:"wp-portfolio-empty-icon","aria-hidden":!0,children:(0,ke.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,ke.jsx)("path",{d:"M20 7H5a2 2 0 0 1-2-2 2 2 0 0 1 2-2h13v4"}),(0,ke.jsx)("path",{d:"M3 5v13a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1"}),(0,ke.jsx)("circle",{cx:"16.5",cy:"13.5",r:"1",fill:"currentColor",stroke:"none"})]})}),(0,ke.jsx)("p",{className:"wp-portfolio-empty-title",children:"No assets yet"}),(0,ke.jsx)("p",{className:"wp-portfolio-empty-desc",children:"Assets you hold across ONE services will appear here."})]})]})})]});return(0,ke.jsx)(ra.Provider,{value:ne,children:(0,ke.jsx)(dl.Provider,{value:C,children:(0,ke.jsx)(Ce,{feature:"wallet_portfolio",children:i==="none"?Ne:(0,ke.jsx)("div",{className:ze(i==="fullscreen"?"wp-fullscreen":"wp-embed",s),"data-theme":t,children:Ne})})})})}var $n=require("react/jsx-runtime");function Eu({className:e}){let{env:t,theme:r,walletAddress:n,close:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s}=Dt();return(0,$n.jsxs)(sa.Drawer.Portal,{children:[(0,$n.jsx)(sa.Drawer.Overlay,{className:"wp-overlay"}),(0,$n.jsxs)(sa.Drawer.Content,{className:ze("wp-fullscreen",e),"data-theme":r,children:[(0,$n.jsx)(sa.Drawer.Title,{className:"wp-sr-only",children:"Portfolio"}),(0,$n.jsx)(Jn,{env:t,theme:r,walletAddress:n,onBack:o,variant:"none",onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s})]})]})}var kl=require("react/jsx-runtime");function r0({env:e,theme:t="light",walletAddress:r,open:n,onOpenChange:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:c,currencySymbol:b,children:f}){let g=at(e),x=n!==void 0,[w,m]=eo.useState(!1),p=x?n:w,y=eo.useCallback(R=>{x||m(R),o?.(R)},[x,o]),h=eo.useCallback(()=>y(!1),[y]),v=eo.useMemo(()=>({env:g,theme:t,open:p,walletAddress:r,close:h,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:c,currencySymbol:b}),[g,t,p,r,h,a,i,s,l,d,c,b]);return(0,kl.jsx)(ra.Provider,{value:v,children:(0,kl.jsx)(Mu.Drawer.Root,{direction:"bottom",open:p,onOpenChange:y,noBodyStyles:!0,children:f})})}var Rl=Object.assign(r0,{Trigger:dp,Content:Eu});var le=V(require("react"),1),To=require("react-dom"),Tl=V(require("bignumber.js"),1);var Ei=V(require("react"),1),Au=120;function Lu(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function Du(){let[e,t]=Ei.useState(!1);return Ei.useEffect(()=>{let r=window.visualViewport,n=()=>r?.height??window.innerHeight,o=n(),a=()=>{let d=n();o=Math.max(o,d),t(o-d>Au)},i=()=>{o=n(),t(!1)},s=d=>{Lu(d.target)&&o-n()>Au&&t(!0)},l=d=>{Lu(d.target)&&t(!1)};return a(),r?.addEventListener("resize",a),window.addEventListener("resize",a),window.screen?.orientation?.addEventListener("change",i),document.addEventListener("focusin",s),document.addEventListener("focusout",l),()=>{r?.removeEventListener("resize",a),window.removeEventListener("resize",a),window.screen?.orientation?.removeEventListener("change",i),document.removeEventListener("focusin",s),document.removeEventListener("focusout",l)}},[]),e}var Mi=V(require("react"),1);function Ai(e,t=160){let[r,n]=Mi.useState(e||null);return Mi.useEffect(()=>{if(e){n(e);return}let o=window.setTimeout(()=>n(null),t);return()=>window.clearTimeout(o)},[e,t]),[e||r,e?"open":"closed"]}var on=require("react/jsx-runtime");function Pu({size:e=16,className:t}){return(0,on.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,on.jsx)("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 Ou({size:e=16,className:t}){return(0,on.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,on.jsx)("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 Sl({size:e=20,className:t}){return(0,on.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,on.jsx)("path",{d:"M10 4.167v11.666M4.167 10 10 15.833 15.833 10",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function Bu({size:e=16,className:t}){return(0,on.jsx)("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:(0,on.jsx)("path",{d:"M3.333 8h9.334M8.667 4l4 4-4 4",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}var Y=V(require("react"),1);var Uu=V(require("bignumber.js"),1);function zu(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Fu(e){return!e.isFinite()||e.isNaN()||e.lte(0)?"":e.decimalPlaces(6,Uu.default.ROUND_DOWN).toFixed()}function n0(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 o0(e){let t=e.fromToken.priceUsd,r=e.toToken.priceUsd,n=e.lastChangedBy==="to"?e.toAmount:e.fromAmount,o=mt(n);return!o||o.lte(0)?{fromAmount:e.fromAmount,toAmount:e.toAmount}:zu(t)&&zu(r)?e.lastChangedBy==="to"?{fromAmount:Fu(o.multipliedBy(r).dividedBy(t))}:{toAmount:Fu(o.multipliedBy(t).dividedBy(r))}:n0(e)?e.lastChangedBy==="to"?{fromAmount:e.toAmount}:{toAmount:e.fromAmount}:{fromAmount:e.lastChangedBy==="to"?"":e.fromAmount,toAmount:e.lastChangedBy==="from"?"":e.toAmount}}function ju({getQuote:e,submitBridge:t}){return{canQuote:!!e,canSubmit:!!t,async getQuote(r){return e?e(r):o0(r)},async submitBridge(r){if(!t)throw new Error("Bridge submit handler is not configured.");return t(r)}}}var Wu=15,a0=18,Qu="cross_bridge_terms_accepted",i0=3600*24*365;function s0(e){let t=e.replace(/[^\d.]/g,""),r=t.indexOf(".");r!==-1&&(t=t.slice(0,r+1)+t.slice(r+1).replace(/\./g,""));let n=t.indexOf(".");if(n===-1)return t.slice(0,Wu);let o=t.slice(0,n).slice(0,Wu),a=t.slice(n+1).slice(0,a0);return`${o}.${a}`}function l0(){return typeof document>"u"?!1:document.cookie.split(";").map(e=>e.trim()).some(e=>e===`${Qu}=true`)}function d0(){if(typeof document>"u")return;let e=typeof window<"u"&&window.location.protocol==="https:"?"; Secure":"";document.cookie=[`${Qu}=true`,"Path=/",`Max-Age=${i0}`,"SameSite=Lax",e].filter(Boolean).join("; ")}function c0(e){let t=Number(e??"0");if(!Number.isFinite(t)||t<.1)return"1";let r=n=>Math.floor(n*100)/100;if(t<3){let n=r(t*3);return String(n<1?1:n)}return"10"}function Gu(e){let t=e.toUpperCase();return t.startsWith("T")&&t.slice(1).startsWith("ONE")?t.slice(1):t}function p0(e,t){if(!e||!t||e.chainId!==t.chainId)return!1;let r=new Set([Gu(e.symbol),Gu(t.symbol)]);return r.has("ONE")&&r.has("ONEUSD")}function _r(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function Li(e){return e[0]}function Cl(e,t,r,n){if(r&&!_r(r,t))return r;let o=t?n?.(t,e):void 0;if(o?.length)return o[0];if(!t)return e[1]??Li(e);let a=e.findIndex(s=>_r(s,t)),i=a>=0?e[a+1]:void 0;return i&&!_r(i,t)?i:e.find(s=>!_r(s,t))??t}function _u({fromToken:e,toToken:t,fromAmount:r,toAmount:n,lastChangedBy:o,slippage:a}){return{fromToken:e,toToken:t,fromAmount:r,toAmount:n,lastChangedBy:o,slippage:a}}function Di(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 r=e;return[...[e instanceof Error?e.name:r.name,e instanceof Error?e.message:r.message,r.shortMessage,r.details,r.code].filter(o=>typeof o=="string"||typeof o=="number").map(String),...Di(r.cause,t+1),...Di(r.data,t+1),...Di(r.error,t+1)]}function Nl(e){let t=Di(e).join(" ").toLowerCase(),r=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")||r}function Hu(e,t){return Nl(e)?"Transaction request was rejected.":(e instanceof Error?e.message:typeof e=="string"?e:"").split(`
10
+ `)[0]?.trim()||t}function Vu(e){let{tokens:t,initialFromToken:r,initialToToken:n,getToTokens:o,getApproval:a,approveBridge:i,history:s=[],initialSlippage:l="1",termsUrl:d,getQuote:c,submitBridge:b,onSubmitted:f,onSuccess:g,onFailed:x,onExit:w}=e,m=Y.useMemo(()=>ju({getQuote:c,submitBridge:b}),[c,b]),[p,y]=Y.useState("form"),[h,v]=Y.useState(r??Li(t)),[R,S]=Y.useState(()=>Cl(t,r??Li(t),n,o)),[E,C]=Y.useState(""),[N,I]=Y.useState(""),[M,W]=Y.useState("from"),[L,H]=Y.useState(l),[A,O]=Y.useState(null),ce=Y.useMemo(()=>p0(h,R),[h,R]),X=Y.useMemo(()=>ce?"1":L==="auto"?c0(A?.priceImpact):L,[ce,L,A?.priceImpact]),[P,xe]=Y.useState(""),[ne,K]=Y.useState("idle"),[U,te]=Y.useState(""),[Z,be]=Y.useState(null),[Ne,re]=Y.useState([]),[we,Fe]=Y.useState(!1),[Ae,pt]=Y.useState(l0),[ye,De]=Y.useState(null),[ut,Be]=Y.useState(!1),[Ge,Ue]=Y.useState(null),[st,Ht]=Y.useState(null),[Rt,Ut]=Y.useState(!1),[Ie,jt]=Y.useState(!1),tt=Y.useRef(0),Mt=Y.useRef(null),Ve=Y.useRef(!1),Ze=Y.useRef(!1),nr=Y.useRef(!1),Wt=Y.useRef(!1),qe=Y.useRef(!1),wt=Y.useRef(!1),rt=Y.useRef(!1);Y.useEffect(()=>{nr.current||(nr.current=!0,Ye("bridge","opened"))},[]);let _e=Y.useCallback(()=>{Mt.current&&(clearTimeout(Mt.current),Mt.current=null)},[]),ft=Y.useCallback(G=>{_e(),Ht(G)},[_e]);Y.useEffect(()=>_e,[_e]),Y.useEffect(()=>{let G=t.find(He=>_r(He,h))??Li(t),Pe=G?o?.(G,t):void 0,q=Pe?.find(He=>_r(He,R))??(Pe?void 0:t.find(He=>_r(He,R)))??Cl(t,G,void 0,o);v(G),S(q)},[o,t,h,R]);let At=Y.useCallback((G,Pe)=>{let q=s0(G);if(!q){tt.current+=1,C(""),I(""),W(Pe),O(null),xe(""),K("idle");return}Pe==="from"?C(q):I(q),W(Pe),xe(""),!qe.current&&Number(q)>0&&(qe.current=!0,Ye("bridge","amount_entered"))},[]),je=Y.useCallback(()=>{tt.current+=1,C(""),I(""),W("from"),O(null),xe(""),te(""),K("idle"),De(null),Be(!1),Ue(null),Ut(!1),ft(null)},[ft]),nt=Y.useCallback(G=>{_r(G,h)||(Wt.current||(Wt.current=!0,Ye("bridge","token_selected",{tags:{item_id:`from:${G.symbol}`}})),v(G),S(Cl(t,G,void 0,o)),je())},[h,o,je,t]),qt=Y.useCallback(G=>{_r(G,R)||_r(G,h)||(Wt.current||(Wt.current=!0,Ye("bridge","token_selected",{tags:{item_id:`to:${G.symbol}`}})),S(G),je())},[h,je,R]),F=Y.useMemo(()=>h?o?.(h,t)??t.filter(G=>!_r(G,h)):[],[h,o,t]),Xe=Y.useCallback(()=>{h?.balance&&At(h.balance,"from")},[h?.balance,At]),B=Y.useCallback(()=>{!h||!R||(v(R),S(h),je())},[h,je,R]),se=Y.useCallback(()=>{tt.current+=1,C(""),I(""),W("from"),O(null),xe(""),te("")},[]);Y.useEffect(()=>{if(!h||!R)return;if(!E&&!N){O(null),xe(""),K(q=>q==="quoting"?"idle":q);return}let G=++tt.current,Pe=_u({fromToken:h,toToken:R,fromAmount:E,toAmount:N,lastChangedBy:M,slippage:L});K(q=>q==="submitting"?q:m.canQuote?"quoting":"idle"),(async()=>{try{let q=await m.getQuote(Pe);if(tt.current!==G)return;q.fromAmount!==void 0&&M==="to"&&C(q.fromAmount),q.toAmount!==void 0&&M==="from"&&I(q.toAmount),O(q.summary??null),xe(q.error??"")}catch(q){if(tt.current!==G)return;xe(q instanceof Error?q.message:"Failed to quote bridge.")}finally{tt.current===G&&K(q=>q==="quoting"?"idle":q)}})()},[E,h,M,m,L,N,R]);let ve=Y.useCallback(()=>!h||!R?null:_u({fromToken:h,toToken:R,fromAmount:E,toAmount:N,lastChangedBy:M,slippage:X}),[X,E,h,M,N,R]),Te=Y.useCallback(async(G,Pe)=>{if(!Ve.current){Ve.current=!0,te(""),Ut(!1),Be(!1),K("submitting");try{if(!Pe?.skipApprovalCheck&&a){let He=await a(G);if(He){De(He),Ue(G),K("idle");return}}De(null),Ue(null),ft("processing");let q=await m.submitBridge(G);be(q),K("success"),re(He=>[{id:q.txHash,timestamp:new Date().toISOString(),txHash:q.txHash,fromToken:q.fromToken,toToken:q.toToken,fromAmount:q.fromAmount,toAmount:q.toAmount,summary:A??void 0,status:"pending"},...He.filter(Yr=>Yr.txHash!==q.txHash)]),se(),jt(!0),ft(null),Ut(!0),Ye("bridge","confirmed"),wt.current=!1,rt.current=!1,f?.(q),g?.(q)}catch(q){if(ft(null),Ye("bridge","confirmed",{status:"failure",reason:gr(q)}),wt.current=!1,rt.current=!1,Nl(q)){K("idle");return}let He=Hu(q,"Failed to submit bridge.");te(He),K("error"),x?.({message:He})}finally{Ve.current=!1}}},[a,x,f,g,m,se,ft,A]),ot=Y.useCallback(async()=>{if(P)return;let G=ve();if(G){if(wt.current||(wt.current=!0,Ye("bridge","submitted")),!Ae){Ue(G),Fe(!0);return}await Te(G)}},[ve,P,Te,Ae]),or=Y.useCallback(async()=>{let G=Ge??ve();G&&(d0(),pt(!0),Fe(!1),await Te(G))},[ve,Ge,Te]),ur=Y.useCallback(()=>{Fe(!1),Ue(null)},[]),Or=Y.useCallback(async()=>{if(!(Ze.current||ne==="submitting"||!ye||!Ge||!i)){Ze.current=!0,te(""),K("submitting");try{await i(Ge,ye),rt.current||(rt.current=!0,Ye("bridge","approved")),De(null),K("idle"),Be(!0)}catch(G){if(Nl(G)){K("idle");return}let Pe=Hu(G,"Failed to approve token.");te(Pe),K("error"),x?.({message:Pe})}finally{Ze.current=!1}}},[ye,i,x,Ge,Te,ne]),dn=Y.useCallback(()=>{ne!=="submitting"&&(De(null),Be(!1),Ue(null),K("idle"))},[ne]),Rr=Y.useCallback(async()=>{if(ne==="submitting")return;let G=Ge??ve();if(!G){Be(!1),te("Bridge input is no longer available. Please try again."),K("error");return}Be(!1),await Te(G,{skipApprovalCheck:!0})},[ve,Ge,Te,ne]),cn=Y.useCallback(()=>{Ut(!1)},[]),Br=Y.useCallback(G=>{y(G),G==="history"&&jt(!1)},[]),ie=Y.useCallback(()=>{if(p==="history"){Br("form");return}w?.()},[w,Br,p]),Se=Y.useMemo(()=>[...s,...Ne.filter(G=>!s.some(Pe=>Pe.txHash===G.txHash))],[s,Ne]);return{step:p,setStep:Br,status:ne,error:U,quoteError:P,fromToken:h,toToken:R,tokens:t,availableToTokens:F,fromAmount:E,toAmount:N,lastChangedBy:M,slippage:L,effectiveSlippage:X,slippageLocked:ce,setSlippage:H,summary:A,history:Se,submitted:Z,canSubmit:m.canSubmit,termsOpen:we,approvalInfo:ye,approvalSuccessOpen:ut,approveBridge:i,pendingSubmitInput:Ge,submitToast:st,successDialogOpen:Rt,dismissSuccessDialog:cn,hasNewHistory:Ie,termsUrl:d,setFromToken:v,setToToken:S,selectFromToken:nt,selectToToken:qt,setAmount:At,setMax:Xe,swapTokens:B,submit:ot,confirmTerms:or,cancelTerms:ur,confirmApproval:Or,cancelApproval:dn,continueAfterApproval:Rr,back:ie}}he(`.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, #00ceb2);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)}@media(prefers-reduced-motion:reduce){.bf-token-pill-face{animation:none}.bf-token-pill:active:not(:disabled),.bf-embedded-token-pill:active:not(:disabled){transform:none}}.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, #00b4b7);background:var(--ds-accent-primary-low, #e7f9f8)}.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, #00b4b7)}.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, #00b4b7);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(--bf-terms-accent);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(--bf-terms-accent);background:var(--bf-terms-accent)}.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(--bf-terms-accent);font-size:12px;font-weight:600;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, #00ceb2);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, #00ceb2);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 color-mix(in srgb,currentColor 20%,transparent);border-top-color:var(--ds-accent-primary-default, #00ceb2);border-right-color:var(--ds-accent-primary-default, #00ceb2);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-accent-primary-default, #00ceb2)}.bf-status-check:after{position:absolute;top:6px;left:5px;width:8px;height:4px;border:solid var(--ds-accent-primary-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-accent-primary-default, #00ceb2)}.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, #00ceb2);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, #00a0a2)}.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, #00a0a2)}.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, #00ceb2)}.bf-liquidity-status[data-status=normal]:before,.bf-liquidity-status:not([data-status]):before{background:var(--ds-accent-primary-default, #00ceb2)}.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, #00ceb2)}.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, #00ceb2);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, #00ceb2);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, #00a0a2)}.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, #00a0a2);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
+ `);var u=require("react/jsx-runtime"),Ju=le.createContext(void 0);function ua(){return le.useContext(Ju)}function u0(e){let[t,r]=le.useState(void 0);return le.useEffect(()=>{let n=e.current;if(!n)return;let o=()=>{let i=n.closest("[data-theme]");r(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 qu=[{value:"0.1",label:"0.1%"},{value:"0.5",label:"0.5%"},{value:"1",label:"1%"},{value:"5",label:"5%"}],f0=[{value:"all",label:"ALL"},{value:"completed",label:"Completed"},{value:"pending",label:"Pending"}];function m0(e,t){return e==="auto"?t?`Auto ${t}%`:"Auto":e?`${e}%`:"1%"}function Yu(e){let t=e.replace(/[^\d.]/g,""),[r="",...n]=t.split("."),o=n.join("");return n.length===0?r:`${r}.${o.slice(0,2)}`}function $u(e){return`${e.chainId}:${e.address.toLowerCase()}`}function ef(e){let t=Number(e);return Number.isFinite(t)?t.toLocaleString("en-US",{maximumFractionDigits:t>=1?2:6}):e||"0"}function Ku(e,t){let r=Number(e||"0"),n=t?.priceUsd??0;return`\u2248 $${(Number.isFinite(r)?r*n:0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})} USD`}function g0(e,t=6){if(!e)return e;let[r,n=""]=e.split(".");if(!n)return r;let o=n.slice(0,t).replace(/0+$/,"");return o?`${r}.${o}`:r}function tf(e,t){if(!t)return!1;let r=mt(e),n=mt(t.balance);return!r||!n?!1:r.isGreaterThan(n)}function da(e){if(!e.isFinite()||e.isNaN())return"0";let r=e.decimalPlaces(6,Tl.default.ROUND_DOWN).toFixed(6).replace(/\.?0+$/,""),[n="0",o]=r.split("."),a=new Tl.default(n||"0").toFormat(0);return o?`${a}.${o}`:a}function h0(e){return e.length<=14?e:`${e.slice(0,6)}...${e.slice(-6)}`}function b0(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let r=n=>n.toString().padStart(2,"0");return[`${t.getFullYear()}-${r(t.getMonth()+1)}-${r(t.getDate())}`,`${r(t.getHours())}:${r(t.getMinutes())}:${r(t.getSeconds())}`].join(" ")}function w0(e){let t=mt(e);return t?da(t):e||"0"}function y0(e,t){if(t?.priceUsd===void 0)return null;let r=mt(e);if(!r)return null;let n=r.multipliedBy(t.priceUsd);return n.isFinite()?`$${n.toFormat(2)}`:null}function Fi(e){return e.status==="success"?"completed":e.status==="failed"?"failed":"pending"}function x0(e,t){return t==="all"?!0:Fi(e)===t}function v0(e){return e==="completed"?"Completed":e==="failed"?"Failed":"Pending"}function No(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function rf(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function nf(e,t){if(!(!e||!t))return e.chainId===t.chainId?"swap":rf(e,t)||e.symbol.toLowerCase()===t.symbol.toLowerCase()?"bridge":"swap-bridge"}function of(e){return e==="swap"||e==="deposit-swap"||e==="swap-withdraw"}function Pi(e){return!e||e==="0"||Number(e)===0}function af(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 sf(e){let t=e.fromToken,r=e.toToken,n=nf(t,r),o=e.fromAmount||"0",a=e.toAmount||"0",i=n!==void 0&&!of(n),s=n!==void 0&&n!=="bridge";return{pathType:n,bridgeInfo:i?[{label:"Route",value:t&&r?`${No(t.chainId)} \u2192 ${No(r.chainId)}`:"-"},{label:"Validator Fee",value:Pi(o)?"0":"Free",tone:Pi(o)?"default":"accent"},{label:"Network Fee",value:Pi(o)?"0":"Free",tone:Pi(o)?"default":"accent"}]:void 0,swapInfo:s?[t&&r?{label:"Route",value:"",routeTokens:[{symbol:t.symbol,iconUrl:t.iconUrl},{symbol:r.symbol,iconUrl:r.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:r?{symbol:r.symbol,iconUrl:r.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 ca({token:e,size:t=20}){let r=e?.iconUrl;return(0,u.jsx)("span",{className:"bf-token-icon","data-has-image":!!r?"true":"false",style:{width:t,height:t},children:r?(0,u.jsx)("img",{src:r,alt:"",width:t,height:t,draggable:!1}):(0,u.jsx)("span",{className:"bf-token-fallback",children:e?.symbol?.slice(0,1)??"?"})})}function Oi(e,t){if(e.length===0)return;let r=e.findIndex(n=>rf(n,t));return e[(r+1)%e.length]}function Zu({label:e,token:t,amount:r,usd:n,onAmountChange:o,onTokenClick:a,locked:i=!1}){return(0,u.jsxs)("section",{className:"bf-amount-panel",children:[(0,u.jsxs)("div",{className:"bf-amount-head",children:[(0,u.jsx)("span",{children:e}),(0,u.jsxs)("span",{className:"bf-balance",children:[ef(t?.balance??"0")," ",t?.symbol??""]})]}),(0,u.jsxs)("div",{className:"bf-amount-main",children:[(0,u.jsxs)("label",{className:"bf-amount-input-wrap",children:[(0,u.jsxs)("span",{className:"bf-sr-only",children:[e," amount"]}),(0,u.jsx)("input",{type:"text",inputMode:"decimal",value:r,onChange:s=>o(s.target.value),placeholder:"0",className:"bf-amount-input","data-size":lf(r)}),(0,u.jsx)("span",{className:"bf-amount-usd",children:n})]}),(0,u.jsxs)("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:[(0,u.jsxs)("span",{className:"bf-token-pill-face",children:[(0,u.jsx)(ca,{token:t}),(0,u.jsx)("span",{children:t?.symbol??"Select"})]},t?$u(t):"none"),!i&&(0,u.jsx)(Tr,{size:16})]})]})]})}function k0(e){if(!e)return"";let[t="",r]=e.replace(/,/g,"").split("."),n=t.replace(/\B(?=(\d{3})+(?!\d))/g,",");return r===void 0?n:`${n}.${r}`}function lf(e){let t=e.replace(/,/g,"").trim().length;return t>26?"small":t>18?"medium":"large"}function R0(){return(0,u.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[(0,u.jsx)("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"}),(0,u.jsx)("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"}),(0,u.jsx)("circle",{cx:"10",cy:"8",r:".75",fill:"currentColor"})]})}function Xu({label:e,token:t,amount:r,onAmountChange:n,onTokenClick:o,onMax:a,locked:i}){return(0,u.jsxs)("section",{className:"bf-embedded-amount-panel",children:[(0,u.jsxs)("div",{className:"bf-embedded-amount-head",children:[(0,u.jsxs)("span",{className:"bf-embedded-amount-label",children:[(0,u.jsx)("strong",{children:e}),!(e==="From")&&(0,u.jsx)("em",{children:"estimated"})]}),t&&(0,u.jsxs)("span",{className:"bf-embedded-balance",children:[(0,u.jsx)(R0,{}),(0,u.jsx)("span",{className:"bf-embedded-balance-value",children:ef(t.balance)}),(0,u.jsx)("span",{children:t.symbol}),a&&(0,u.jsx)("button",{type:"button",onClick:a,"aria-label":"Use maximum available balance",children:"MAX"})]})]}),(0,u.jsxs)("div",{className:"bf-embedded-amount-main",children:[(0,u.jsxs)("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:[(0,u.jsxs)("span",{className:"bf-token-pill-face",children:[(0,u.jsx)(ca,{token:t}),(0,u.jsx)("span",{children:t?.symbol??"Select"})]},t?$u(t):"none"),!i&&(0,u.jsx)(Tr,{size:14})]}),(0,u.jsxs)("label",{className:"bf-embedded-input-wrap",children:[(0,u.jsxs)("span",{className:"bf-sr-only",children:[e," amount"]}),(0,u.jsx)("input",{type:"text",inputMode:"decimal",value:k0(r),onChange:l=>n(l.target.value),placeholder:"0.00",className:"bf-embedded-amount-input","data-size":lf(r)})]})]})]})}function S0({flow:e,onClose:t}){let r=le.useId(),[n,o]=le.useState(null),a=qu.find(w=>w.value===e.slippage),[i,s]=le.useState(e.slippage&&!a?e.slippage:""),l=i.trim()!==""&&i.trim()!==".",d=l?Number(i):NaN,c=Number.isFinite(d)&&d>50,b=Number.isFinite(d)&&d>5&&!c,f=w=>{e.setSlippage(w),t()},g=()=>{!l||c||(e.setSlippage(Yu(i)),t())};if(le.useEffect(()=>{o(document.body)},[]),le.useEffect(()=>{let w=m=>{m.key==="Escape"&&t()};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[t]),!n)return null;let x=ua();return(0,To.createPortal)((0,u.jsx)("div",{className:"bf-slippage-overlay","data-theme":x,role:"presentation",onMouseDown:w=>{w.target===w.currentTarget&&t()},children:(0,u.jsxs)("section",{className:"bf-slippage-dialog",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[(0,u.jsxs)("header",{className:"bf-slippage-head",children:[(0,u.jsx)("h3",{id:r,children:"Slippage Settings"}),(0,u.jsx)("button",{type:"button",className:"bf-slippage-close",onClick:t,"aria-label":"Close slippage settings",children:(0,u.jsx)(jr,{size:24})})]}),(0,u.jsxs)("div",{className:"bf-slippage-body",children:[(0,u.jsx)("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."}),(0,u.jsxs)("div",{className:"bf-slippage-controls",children:[(0,u.jsx)("div",{className:"bf-slippage-presets",children:qu.map(w=>(0,u.jsx)("button",{type:"button",className:"bf-slippage-preset","data-selected":!l&&e.slippage===w.value?"true":"false",onClick:()=>f(w.value),children:w.label},w.value))}),(0,u.jsxs)("label",{className:"bf-slippage-custom","data-selected":l?"true":"false",children:[(0,u.jsx)("span",{className:"bf-sr-only",children:"Custom slippage percent"}),(0,u.jsx)("input",{value:i,onChange:w=>{s(Yu(w.target.value))},onKeyDown:w=>{w.key==="Enter"&&(w.preventDefault(),g())},inputMode:"decimal",placeholder:"Enter custom slippage",autoComplete:"off",spellCheck:!1}),(0,u.jsx)("span",{"aria-hidden":"true",children:"%"})]})]}),c?(0,u.jsx)("p",{className:"bf-slippage-message","data-variant":"error",children:"Slippage cannot exceed 50%."}):b?(0,u.jsx)("p",{className:"bf-slippage-message","data-variant":"warning",children:"Your transaction may be frontrun due to high slippage."}):null,l&&(0,u.jsx)("button",{type:"button",className:"bf-slippage-apply",onClick:g,disabled:c,children:"Apply"})]})]})}),n)}function df({flow:e,env:t}){let r=le.useId(),[n,o]=le.useState(!1),[a,i]=le.useState(null),s=ua(),l=sr("apps.json",t,f=>Nr(f?.legal?.termsUrl,t)),d=e.termsUrl??l??ac;le.useEffect(()=>{i(document.body)},[]),le.useEffect(()=>{let f=g=>{g.key==="Escape"&&e.cancelTerms()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e]);let[c,b]=Ai(e.termsOpen);return!a||!c?null:(0,To.createPortal)((0,u.jsx)("div",{className:"bf-action-modal-overlay","data-theme":s,"data-state":b,role:"presentation",onPointerDown:f=>{f.target===f.currentTarget&&e.cancelTerms()},children:(0,u.jsxs)("section",{className:"bf-action-modal bf-terms-modal",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[(0,u.jsx)("h3",{id:r,children:"Agree to Terms of Service"}),(0,u.jsx)("p",{className:"bf-action-modal-desc",children:"Please make sure to review the Terms of Service before using ONEUSD."}),(0,u.jsxs)("div",{className:"bf-terms-check-row","data-checked":n?"true":"false",children:[(0,u.jsx)("button",{type:"button",className:"bf-terms-check-button",role:"checkbox","aria-checked":n,"aria-label":"Agree to Terms of Use","data-track":"terms_check",onClick:()=>o(f=>!f),children:(0,u.jsx)("span",{className:"bf-terms-checkbox","data-checked":n?"true":"false","aria-hidden":"true"})}),(0,u.jsxs)("div",{className:"bf-terms-copy",children:[(0,u.jsx)("span",{className:"bf-terms-label",onClick:()=>o(f=>!f),children:"Agree to Terms of Use"}),d&&(0,u.jsx)("a",{href:d,target:"_blank",rel:"noreferrer",children:"Terms of Service"})]})]}),(0,u.jsx)("p",{className:"bf-terms-privacy",children:"I have read and acknowledged the Privacy Policy to use ONEUSD"}),(0,u.jsx)("button",{type:"button",className:"bf-action-primary",disabled:!n||e.status==="submitting",onClick:e.confirmTerms,"data-track":"terms_confirm",children:"Confirm"})]})}),a)}function C0({value:e,disabled:t=!1}){let[r,n]=le.useState(!1);return(0,u.jsx)("button",{type:"button",className:"bf-copy-button","aria-label":"Copy token address",disabled:t,onClick:()=>{t||navigator.clipboard?.writeText(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1200)})},children:r?"OK":"Copy"})}function cf({flow:e,approval:t}){let r=le.useId(),[n,o]=le.useState(null),a=ua();le.useEffect(()=>{o(document.body)},[]),le.useEffect(()=>{if(!t)return;let c=b=>{e.status!=="submitting"&&b.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[e,t]);let[i,s]=Ai(t);if(!n||!i)return null;let l=e.status==="submitting"||!e.approveBridge,d=e.status==="submitting";return(0,To.createPortal)((0,u.jsx)("div",{className:"bf-action-modal-overlay","data-theme":a,"data-state":s,role:"presentation",children:(0,u.jsxs)("section",{className:"bf-action-modal bf-approve-modal",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[(0,u.jsxs)("h3",{id:r,children:["Approve ",i.token.symbol]}),(0,u.jsx)(ca,{token:i.token,size:72}),(0,u.jsxs)("div",{className:"bf-approve-address-box",children:[(0,u.jsx)("span",{children:"Token Address"}),(0,u.jsxs)("div",{children:[(0,u.jsx)("strong",{children:i.tokenAddress}),(0,u.jsx)(C0,{value:i.tokenAddress,disabled:d})]})]}),(0,u.jsxs)("div",{className:"bf-action-buttons",children:[(0,u.jsx)("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:e.status==="submitting",children:"Cancel"}),(0,u.jsxs)("button",{type:"button",className:"bf-action-primary",onClick:e.confirmApproval,disabled:l,"aria-busy":d,"data-track":"approve_confirm",children:[d&&(0,u.jsx)("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),(0,u.jsx)("span",{children:d?"Approving...":"Approve"})]})]})]})}),n)}function pf({flow:e}){let t=le.useId(),[r,n]=le.useState(null),o=ua();le.useEffect(()=>{n(document.body)},[]),le.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]=Ai(e.approvalSuccessOpen);if(!r||!a)return null;let s=e.status==="submitting";return(0,To.createPortal)((0,u.jsx)("div",{className:"bf-action-modal-overlay","data-theme":o,"data-state":i,role:"presentation",children:(0,u.jsxs)("section",{className:"bf-action-modal bf-approval-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:[(0,u.jsx)("h3",{id:t,children:"Approval Success"}),(0,u.jsx)("span",{className:"bf-success-mark","aria-hidden":"true"}),(0,u.jsxs)("p",{className:"bf-action-modal-desc",children:["Token approval confirmed successfully.",(0,u.jsx)("br",{}),"Please continue to the next step."]}),(0,u.jsxs)("div",{className:"bf-action-buttons",children:[(0,u.jsx)("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:s,children:"Cancel"}),(0,u.jsxs)("button",{type:"button",className:"bf-action-primary",onClick:e.continueAfterApproval,disabled:s,"aria-busy":s,children:[s&&(0,u.jsx)("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),(0,u.jsx)("span",{children:s?"Continuing...":"Continue"})]})]})]})}),r)}function N0({fromAmount:e,toAmount:t,fromToken:r,toToken:n}){let o=le.useMemo(()=>{let i=mt(e),s=mt(t);return!i||!s||i.lte(0)||s.lte(0)?null:s.dividedBy(i)},[e,t]),a=!!(o&&r&&n&&r.symbol!==n.symbol);return(0,u.jsx)(la,{open:a,children:(0,u.jsxs)("div",{className:"bf-exchange-rate",children:[(0,u.jsxs)("span",{children:["1 ",r?.symbol]}),(0,u.jsx)("span",{"aria-hidden":"true",children:"="}),(0,u.jsxs)("span",{children:[o?da(o):""," ",n?.symbol]})]})})}function uf({flow:e}){return e.submitToast?(0,u.jsxs)("div",{className:"bf-status-toast","data-variant":"processing",role:"status","aria-live":"polite",children:[(0,u.jsx)("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:(0,u.jsx)("span",{className:"bf-status-spinner"})}),(0,u.jsxs)("span",{className:"bf-status-toast-copy",children:[(0,u.jsx)("strong",{children:"Transaction Processing"}),(0,u.jsx)("span",{children:"Your transaction is being processed on the blockchain"})]})]}):null}function ff({message:e}){let[t,r]=le.useState(!1);return le.useEffect(()=>{if(!e){r(!1);return}r(!0);let n=window.setTimeout(()=>{r(!1)},3500);return()=>window.clearTimeout(n)},[e]),!e||!t?null:(0,u.jsxs)("div",{className:"bf-status-toast","data-variant":"error",role:"alert","aria-live":"assertive",children:[(0,u.jsx)("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:(0,u.jsx)("span",{className:"bf-status-error-mark",children:"!"})}),(0,u.jsxs)("span",{className:"bf-status-toast-copy",children:[(0,u.jsx)("strong",{children:"Error"}),(0,u.jsx)("span",{children:e})]})]})}function T0(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 mf({flow:e}){let t=le.useId(),[r,n]=le.useState(null),o=e.submitted,a=ua();return le.useEffect(()=>{n(document.body)},[]),le.useEffect(()=>{if(!e.successDialogOpen)return;let i=s=>{s.key==="Escape"&&e.dismissSuccessDialog()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[e]),!r||!e.successDialogOpen||!o?null:(0,To.createPortal)((0,u.jsx)("div",{className:"bf-success-overlay","data-theme":a,role:"presentation",children:(0,u.jsx)("section",{className:"bf-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:(0,u.jsxs)("div",{className:"bf-success-body",children:[(0,u.jsx)("span",{className:"bf-success-mark","aria-hidden":"true"}),(0,u.jsxs)("div",{className:"bf-success-copy",children:[(0,u.jsx)("strong",{id:t,children:T0(o.pathType)}),(0,u.jsx)("span",{children:"Please check the results in the history."})]}),(0,u.jsx)("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)=>(0,u.jsxs)(le.Fragment,{children:[s>0&&(0,u.jsx)("span",{className:"bf-success-route-arrow",children:"\u2192"}),(0,u.jsx)(pa,{token:i,size:43})]},`${i.symbol}-${s}`))}),(0,u.jsx)("button",{type:"button",className:"bf-success-ok",onClick:e.dismissSuccessDialog,"data-track":"success_ok",children:"OK"})]})})}),r)}function pa({token:e,size:t=16}){let r=!!e.iconUrl;return(0,u.jsx)("span",{className:"bf-token-icon","data-has-image":r?"true":"false",style:{width:t,height:t},children:e.iconUrl?(0,u.jsx)("img",{src:e.iconUrl,alt:"",width:t,height:t,draggable:!1}):(0,u.jsx)("span",{className:"bf-token-fallback",children:e.symbol?.slice(0,1)??"?"})})}function I0({row:e}){return e.routeTokens&&e.routeTokens.length>0?(0,u.jsx)("span",{className:"bf-info-route",children:e.routeTokens.map((t,r)=>(0,u.jsxs)(le.Fragment,{children:[r>0&&(0,u.jsx)("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),(0,u.jsx)(pa,{token:t})]},`${t.symbol}-${r}`))}):e.valueToken?(0,u.jsxs)("span",{className:"bf-info-value-token",children:[(0,u.jsx)(pa,{token:e.valueToken}),(0,u.jsx)("span",{children:e.value})]}):(0,u.jsx)(u.Fragment,{children:e.value})}function gf({rows:e}){return!e||e.length===0?null:(0,u.jsx)("div",{className:"bf-info-rows",children:e.map(t=>(0,u.jsxs)("div",{className:"bf-info-row",children:[(0,u.jsx)("span",{className:"bf-info-label",children:t.label}),(0,u.jsx)("span",{className:"bf-info-value","data-tone":t.tone??"default",children:(0,u.jsx)(I0,{row:t})})]},`${t.label}-${t.value}`))})}function E0(e,t,r){return e.pathType==="bridge"?"Bridge Info":of(e.pathType)?"Swap Info":t&&r?"Swap & Bridge Info":t?"Bridge Info":"Swap Info"}function la({open:e,className:t,children:r}){let n=le.useRef(null);return e&&(n.current=r),(0,u.jsx)("div",{className:t?`bf-collapse ${t}`:"bf-collapse","data-open":e?"true":"false","aria-hidden":e?void 0:!0,children:(0,u.jsx)("div",{className:"bf-collapse-inner",children:e?r:n.current})})}function M0({summary:e,from:t,to:r,feeDelegated:n}){let o=!!e.bridgeInfo?.length,a=!!e.swapInfo?.length,i=!!e.txFee?.length,s=E0(e,o,a),[l,d]=le.useState(!0),[c,b]=le.useState(!0);return(0,u.jsxs)("div",{className:"bf-details",children:[e.liquidity&&(0,u.jsxs)("section",{className:"bf-liquidity",children:[(0,u.jsxs)("div",{className:"bf-liquidity-head",children:[(0,u.jsx)("span",{children:e.liquidity.label??"Available Liquidity"}),(0,u.jsx)("span",{className:"bf-liquidity-status","data-status":e.liquidity.status,children:e.liquidity.status??"Normal"})]}),(0,u.jsx)("div",{className:"bf-liquidity-track",children:(0,u.jsx)("span",{style:{width:`${e.liquidity.percentage??50}%`}})})]}),(o||a)&&(0,u.jsxs)("section",{className:"bf-detail-section bf-info-card","data-open":l?"true":"false",children:[(0,u.jsxs)("button",{type:"button",className:"bf-collapse-head","aria-expanded":l,onClick:()=>d(f=>!f),"data-track":"details_toggle",children:[(0,u.jsx)("h3",{children:s}),(0,u.jsx)(Tr,{size:16,className:"bf-collapse-chevron"})]}),l&&(0,u.jsx)("div",{className:"bf-collapse-body",children:(0,u.jsx)(wf,{summary:e,from:t,to:r,feeDelegated:n})})]}),i&&(0,u.jsxs)("section",{className:"bf-detail-section bf-tx-fee-section","data-open":c?"true":"false",children:[(0,u.jsxs)("button",{type:"button",className:"bf-collapse-head bf-tx-fee-head","aria-expanded":c,onClick:()=>b(f=>!f),"data-track":"details_toggle",children:[(0,u.jsx)("h3",{children:"Est. Tx Fee"}),(0,u.jsxs)("div",{className:"bf-tx-fee-total",children:[e.txFeeInfo?.isDelegateFee&&(0,u.jsx)("span",{className:"bf-fee-delegated",children:"Fee Delegated"}),e.txFeeInfo?.tokenIconUrl&&(0,u.jsx)("img",{className:"bf-tx-fee-token",src:e.txFeeInfo.tokenIconUrl,alt:e.txFeeInfo.tokenSymbol??"",width:16,height:16,draggable:!1}),(0,u.jsx)("span",{"data-delegated":e.txFeeInfo?.isDelegateFee&&Number(e.txFeeInfo?.estTxFee)>0?"true":void 0,children:g0(e.txFeeInfo?.estTxFee??"0")}),(0,u.jsx)(Tr,{size:16,className:"bf-collapse-chevron"})]})]}),c&&(0,u.jsx)("div",{className:"bf-collapse-body",children:(0,u.jsx)(gf,{rows:e.txFee})})]})]})}function A0(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 Bi(e){let t=mt(e);if(!(!t||t.lte(0)))return da(t)}function L0(e,t,r,n){if(!r||!n)return;let o=mt(e),a=mt(t);if(!o||!a||o.lte(0)||a.lte(0))return;let i=a.dividedBy(o);if(i.gte("0.001"))return`1 ${r.symbol} = ${da(i)} ${n.symbol}`;let s=o.dividedBy(a);return`1 ${n.symbol} = ${da(s)} ${r.symbol}`}var D0=1,P0=5;function hf(e){return mt(e)?.toNumber()??null}function bf(e){let t=hf(e);if(t!==null){if(t>=P0)return"danger";if(t>=D0)return"warning"}}var O0=/\bin\b.*amount|amount.*\bin\b|^from\b/i,B0=/\bout\b.*amount|amount.*\bout\b|^to\b|receive/i,z0=/fee/i,F0=/impact|rate|slippage|minimum|min\.|received/i,zi=/impact/i,U0=/^route$/i;function j0(e,t,r){let n=e.find(c=>O0.test(c.label)),o=e.find(c=>B0.test(c.label)),a=new Set;n&&a.add(n),o&&a.add(o);let i=e.find(c=>U0.test(c.label)||(c.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 c of e){if(a.has(c))continue;let b=z0.test(c.label);if(!b&&!F0.test(c.label))continue;a.add(c);let f=hf(c.value),g=b&&(f===0||/^\s*free\s*$/i.test(String(c.value??"")));g&&t==="swap"||d.push({text:g?`${c.label} Free`:`${c.label} ${c.value}`,tone:g?"accent":zi.test(c.label)?c.tone==="danger"||c.tone==="warning"?c.tone:bf(c.value):void 0})}return{key:t,label:r,routeText:l,routeTokens:s,inRow:n,outRow:o,meta:d,rest:e.filter(c=>!a.has(c))}}function W0({steps:e}){return(0,u.jsx)("div",{className:"bf-route-steps",children:e.map((t,r)=>(0,u.jsxs)("div",{className:"bf-route-step","data-last":r===e.length-1?"true":"false","data-kind":t.key.startsWith("hop-")?"hop":"endpoint",children:[(0,u.jsxs)("span",{className:"bf-route-rail","aria-hidden":"true",children:[(0,u.jsx)("span",{className:"bf-route-line"}),(0,u.jsx)("span",{className:"bf-route-dot","data-final":r===e.length-1?"true":"false"})]}),(0,u.jsxs)("span",{className:"bf-route-body",children:[(0,u.jsxs)("span",{className:"bf-route-head",children:[(0,u.jsx)("span",{className:"bf-route-title",children:t.title}),(0,u.jsx)("span",{className:"bf-route-amount",children:t.routeTokens?.length?t.routeTokens.map((n,o)=>(0,u.jsxs)(le.Fragment,{children:[o>0&&(0,u.jsx)("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),(0,u.jsx)(pa,{token:n})]},`${n.symbol}-${o}`)):(0,u.jsxs)(u.Fragment,{children:[t.amountToken&&(0,u.jsx)(pa,{token:t.amountToken}),(0,u.jsx)("span",{className:"bf-route-amount-value",children:t.amount},t.amount)]})})]}),(t.meta.length>0||t.tags.length>0)&&(0,u.jsxs)("span",{className:"bf-route-meta",children:[t.meta.map(n=>(0,u.jsx)("span",{"data-tone":n.tone??"default",children:n.text},n.text)),t.tags.map(n=>(0,u.jsx)("span",{className:"bf-route-tag",children:n},n))]})]})]},t.key))})}function G0(e){if(!zi.test(e.label)||e.tone==="danger"||e.tone==="warning")return e;let t=bf(e.value);return t?{...e,tone:t}:e}function wf({summary:e,rateLine:t,from:r,to:n,feeDelegated:o,includeTxFee:a=!1}){let i=!!e.txFeeInfo?.isDelegateFee||!!o,s=le.useMemo(()=>(e.pathType==="bridge-swap"?[["bridge","Bridge"],["swap","Swap"]]:[["swap","Swap"],["bridge","Bridge"]]).map(([R,S])=>{let E=R==="swap"?e.swapInfo:e.bridgeInfo;return E?.length?j0(E,R,S):null}).filter(R=>R!==null),[e]);if(s.length===0)return null;let l=s[0],d=s[s.length-1],c=l.inRow?.valueToken??(r?.symbol?{symbol:r.symbol,iconUrl:r.iconUrl}:void 0),b=l.inRow?.value??r?.amount,f=d.outRow?.valueToken??(n?.symbol?{symbol:n.symbol,iconUrl:n.iconUrl}:void 0),g=d.outRow?.value??n?.amount;if(!b)return null;let x=e.txFeeInfo,w=a&&x&&!x.isDelegateFee?[{text:`Gas ${x.estTxFee}${x.tokenSymbol?` ${x.tokenSymbol}`:""}`}]:[],m=s.length>1,p=[{key:"send",title:`Send ${c?.symbol??""}`.trim(),amount:b,amountToken:c,routeTokens:m?void 0:l.routeTokens,meta:[...w.length?[{text:"EST."}]:r?.chain?[{text:`on ${r.chain}`}]:[],...w,...m?[]:[...l.routeText?[{text:l.routeText}]:[],...l.meta.filter(v=>!zi.test(v.text))]],tags:i&&!m?["Fee delegated"]:[]},...m?s.map(v=>({key:`hop-${v.key}`,title:v.label,amount:v.routeText??"",routeTokens:v.routeTokens,meta:v.meta,tags:i&&v.key==="swap"?["Fee delegated"]:[]})):[],{key:"receive",title:`Receive ${f?.symbol??""}`.trim(),amount:g??"\u2014",amountToken:f,meta:[...n?.chain?[{text:`on ${n.chain}`}]:[],...m?[]:l.meta.filter(v=>zi.test(v.text))],tags:[]}],y=[...s.flatMap(v=>v.rest),...a?e.txFee??[]:[]].map(G0),h=!!t;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(W0,{steps:p}),(y.length>0||h)&&(0,u.jsx)("div",{className:"bf-info-section",children:(0,u.jsx)(gf,{rows:[...h?[{label:"Rate",value:t}]:[],...y]})})]})}function _0({summary:e,rateLine:t,from:r,to:n,feeDelegated:o}){let a=le.useMemo(()=>A0(e),[e]);return!a.bridgeInfo?.length&&!a.swapInfo?.length?null:(0,u.jsx)("div",{className:"bf-embedded-details",children:(0,u.jsx)(wf,{summary:a,rateLine:t,from:r,to:n,feeDelegated:o,includeTxFee:!0})})}function H0({flow:e,env:t,toastError:r}){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(df,{flow:e,env:t}),(0,u.jsx)(cf,{flow:e,approval:e.approvalInfo??null}),(0,u.jsx)(pf,{flow:e}),(0,u.jsx)(uf,{flow:e}),(0,u.jsx)(ff,{message:e.submitToast?"":r}),(0,u.jsx)(mf,{flow:e})]})}function Q0({flow:e,env:t,isConnected:r,onRequestConnect:n,feeDelegated:o}){let a=Number(e.fromAmount)>0,i=le.useMemo(()=>a?e.summary??sf(e):null,[a,e]),s=af(e.quoteError),l=tf(e.fromAmount,e.fromToken),d=l?"Insufficient balance":s.from,c=/insufficient liquidity|not enough liquidity/i.test(e.quoteError),b=c?void 0:s.to,f=e.quoteError&&!s.from&&!s.to?e.quoteError:"",g=e.error||f,x=e.status==="submitting",w=!a||!e.toAmount||!e.fromToken||!e.toToken||!e.canSubmit||!!e.quoteError||l||x,m=x?"":c&&a?"Insufficient Liquidity":a?"Continue":"Enter Amount";return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("main",{className:"bf-body bf-embedded-body","data-rd-scroll-area":!0,children:(0,u.jsxs)("div",{className:"bf-embedded-form",children:[(0,u.jsxs)("div",{className:"bf-embedded-fields",children:[(0,u.jsxs)("div",{className:"bf-embedded-field-group",children:[(0,u.jsx)(Xu,{label:"From",token:e.fromToken,amount:e.fromAmount,onAmountChange:p=>e.setAmount(p,"from"),onTokenClick:()=>{let p=Oi(e.tokens,e.fromToken);p&&e.selectFromToken(p)},onMax:e.setMax,locked:e.tokens.length<=1}),d&&(0,u.jsx)("div",{className:"bf-embedded-field-error",children:d})]}),(0,u.jsx)("div",{className:"bf-embedded-direction","aria-hidden":"true",children:(0,u.jsx)("span",{children:(0,u.jsx)(Sl,{size:16})})}),(0,u.jsxs)("div",{className:"bf-embedded-field-group",children:[(0,u.jsx)(Xu,{label:"To",token:e.toToken,amount:e.toAmount,onAmountChange:p=>e.setAmount(p,"to"),onTokenClick:()=>{let p=Oi(e.availableToTokens,e.toToken);p&&e.selectToToken(p)},locked:e.availableToTokens.length<=1}),b&&(0,u.jsx)("div",{className:"bf-embedded-field-error",children:b})]})]}),(0,u.jsx)(la,{open:!!i?.liquidity,children:i?.liquidity&&(0,u.jsxs)("section",{className:"bf-embedded-liquidity",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)("span",{children:i.liquidity.label??"Available Liquidity"}),(0,u.jsx)("span",{"data-status":i.liquidity.status,children:i.liquidity.status??"normal"})]}),(0,u.jsx)("span",{className:"bf-embedded-liquidity-track",children:(0,u.jsx)("span",{style:{width:`${i.liquidity.percentage??50}%`}})})]})}),(0,u.jsx)(la,{open:c&&a,children:(0,u.jsx)("div",{className:"bf-embedded-liquidity-error",role:"alert",children:"Insufficient liquidity in all pools for this pair and amount."})}),(0,u.jsx)(la,{open:!!i,children:i&&(0,u.jsx)("div",{className:"bf-embedded-summary",children:(0,u.jsx)(_0,{summary:i,feeDelegated:o,rateLine:L0(e.fromAmount,e.toAmount,e.fromToken,e.toToken),from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:Bi(e.fromAmount),chain:e.fromToken?No(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:Bi(e.toAmount),chain:e.toToken?No(e.toToken.chainId):void 0}})})}),(0,u.jsx)("div",{className:"bf-embedded-action-footer",children:r?(0,u.jsx)("button",{type:"button",className:"bf-embedded-cta",onClick:e.submit,"data-track":"next",disabled:w,"aria-busy":x,"aria-label":x?"Processing transaction":c?"Insufficient liquidity":"Continue with swap or bridge",children:x?(0,u.jsx)("span",{className:"bf-embedded-spinner","aria-hidden":"true"}):m}):(0,u.jsx)("button",{type:"button",className:"bf-embedded-cta",onClick:n,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})})]})}),(0,u.jsx)(H0,{flow:e,env:t,toastError:g})]})}function V0({item:e}){let t=Fi(e),r=y0(e.fromAmount,e.fromToken);return(0,u.jsxs)("article",{className:"bf-history-item",children:[(0,u.jsxs)("div",{className:"bf-history-item-head",children:[(0,u.jsx)("span",{className:"bf-history-status","data-status":t,children:v0(t)}),(0,u.jsx)("time",{className:"bf-history-time",dateTime:e.timestamp,children:b0(e.timestamp)})]}),(0,u.jsxs)("div",{className:"bf-history-item-body",children:[(0,u.jsxs)("strong",{className:"bf-history-amount",children:[w0(e.fromAmount)," ",e.fromToken.symbol]}),(0,u.jsxs)("div",{className:"bf-history-meta",children:[(0,u.jsx)("span",{className:"bf-history-usd",children:r??h0(e.txHash)}),(0,u.jsxs)("span",{className:"bf-history-route",children:[(0,u.jsxs)("span",{className:"bf-history-route-token",children:[(0,u.jsx)(ca,{token:e.fromToken,size:16}),(0,u.jsx)("span",{children:e.fromToken.symbol})]}),(0,u.jsx)(Bu,{size:16,className:"bf-history-route-arrow"}),(0,u.jsxs)("span",{className:"bf-history-route-token",children:[(0,u.jsx)(ca,{token:e.toToken,size:16}),(0,u.jsx)("span",{children:e.toToken.symbol})]})]})]})]})]})}function q0({flow:e}){let[t,r]=le.useState("all"),n=e.history.some(i=>Fi(i)==="pending"),o=e.history.filter(i=>x0(i,t)),a=t==="all"?"No bridge history yet.":`No ${t} bridge history.`;return(0,u.jsxs)("main",{className:"bf-history-body",children:[(0,u.jsx)("nav",{className:"bf-history-tabs","aria-label":"Bridge history filters",children:f0.map(i=>(0,u.jsxs)("button",{type:"button",className:"bf-history-tab","data-active":t===i.value?"true":"false",onClick:()=>r(i.value),"data-track":"history_filter","data-track-id":i.value,children:[(0,u.jsx)("span",{children:i.label}),i.value==="pending"&&n&&(0,u.jsx)("span",{className:"bf-history-tab-dot","aria-hidden":"true"})]},i.value))}),o.length>0?(0,u.jsx)("div",{className:"bf-history-list",children:o.map(i=>(0,u.jsx)(V0,{item:i},i.id||i.txHash))}):(0,u.jsx)("div",{className:"bf-empty",children:a})]})}function Y0({flow:e,env:t,feeDelegated:r}){let[n,o]=le.useState(!1),[a,i]=le.useState(0),s=!!(e.fromAmount.trim()||e.toAmount.trim()),l=le.useMemo(()=>s?e.summary??sf(e):null,[s,e]),d=sr("apps.json",t,y=>Nr(y?.bridgePoweredBy?.url,t)),c=af(e.quoteError),b=tf(e.fromAmount,e.fromToken),f=b?"Insufficient balance":c.from,g=e.quoteError&&!c.from&&!c.to?e.quoteError:"",x=e.error||g,w=e.history.some(y=>Fi(y)==="pending"),p=(l?.pathType??nf(e.fromToken,e.toToken))!=="bridge";return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("main",{className:"bf-body",children:[(0,u.jsxs)("div",{className:"bf-toolbar",children:[(0,u.jsxs)("button",{type:"button",className:"bf-chip bf-chip-history",onClick:()=>e.setStep("history"),"data-track":"history_open",children:[(0,u.jsx)(Pu,{}),(0,u.jsx)("span",{children:"History"}),(w||e.hasNewHistory)&&(0,u.jsx)("span",{className:"bf-chip-dot","aria-hidden":"true"})]}),p&&(0,u.jsxs)("button",{type:"button",className:"bf-chip",onClick:()=>o(!0),"data-track":"slippage_open",disabled:e.slippageLocked,"aria-haspopup":"dialog","aria-expanded":n,children:[(0,u.jsx)(Ou,{}),(0,u.jsx)("span",{children:e.slippageLocked?"Auto 1%":m0(e.slippage,e.effectiveSlippage)})]})]}),(0,u.jsxs)("div",{className:"bf-swap-card","data-has-from-error":f?"true":"false",children:[(0,u.jsx)(Zu,{label:"From",token:e.fromToken,amount:e.fromAmount,usd:Ku(e.fromAmount,e.fromToken),onAmountChange:y=>e.setAmount(y,"from"),onTokenClick:()=>{let y=Oi(e.tokens,e.fromToken);y&&e.selectFromToken(y)},locked:e.tokens.length<=1}),f&&(0,u.jsx)("div",{className:"bf-field-error",children:f}),(0,u.jsx)("button",{type:"button",className:"bf-swap-toggle",onClick:()=>{e.swapTokens(),i(y=>y+360)},"data-track":"token_swap",style:{transform:`translateX(-50%) rotate(${a}deg)`,transition:"transform 0.2s ease"},children:(0,u.jsx)(Sl,{size:22})}),(0,u.jsx)(Zu,{label:"To",token:e.toToken,amount:e.toAmount,usd:Ku(e.toAmount,e.toToken),onAmountChange:y=>e.setAmount(y,"to"),onTokenClick:()=>{let y=Oi(e.availableToTokens,e.toToken);y&&e.selectToToken(y)},locked:e.availableToTokens.length<=1}),c.to&&(0,u.jsx)("div",{className:"bf-field-error",children:c.to})]}),(0,u.jsx)(N0,{fromAmount:e.fromAmount,toAmount:e.toAmount,fromToken:e.fromToken,toToken:e.toToken}),(0,u.jsx)(la,{open:!!l,children:l&&(0,u.jsx)(M0,{summary:l,feeDelegated:r,from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:Bi(e.fromAmount),chain:e.fromToken?No(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:Bi(e.toAmount),chain:e.toToken?No(e.toToken.chainId):void 0}})})]}),(0,u.jsxs)("footer",{className:"bf-footer",children:[(0,u.jsx)("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&&(0,u.jsxs)("a",{className:"bf-powered",href:d,target:"_blank",rel:"noreferrer",children:["Powered by ",(0,u.jsx)("span",{className:"bf-powered-brand",children:"CROSS DeFi"})]})]}),n&&(0,u.jsx)(S0,{flow:e,onClose:()=>o(!1)}),(0,u.jsx)(df,{flow:e,env:t}),(0,u.jsx)(cf,{flow:e,approval:e.approvalInfo??null}),(0,u.jsx)(pf,{flow:e}),(0,u.jsx)(uf,{flow:e}),(0,u.jsx)(ff,{message:e.submitToast?"":x}),(0,u.jsx)(mf,{flow:e})]})}function to({onClose:e,onBackToWallet:t,feeDelegated:r,env:n,variant:o="default",title:a,isConnected:i,onRequestConnect:s,className:l,...d}){let c=le.useMemo(()=>at(n),[n]),b=Du(),f=Vu({...d,onExit:t}),g=le.useRef(null),x=u0(g),w=f.step==="history"?"History":a??"Swap & Bridge",m=i??!!d.walletAddress,p=o==="embedded"&&f.step==="form"&&!t?null:f.back;return(0,u.jsx)(Ce,{feature:"bridge",children:(0,u.jsx)(Ju.Provider,{value:x,children:(0,u.jsxs)("div",{ref:g,className:ze("bf-root",l),"data-view":f.step,"data-status":f.status,"data-variant":o,"data-soft-keyboard-open":o==="embedded"&&b?"true":"false",children:[(0,u.jsxs)("header",{className:"bf-header",children:[p?(0,u.jsx)("button",{type:"button",className:"bf-header-btn",onClick:p,"aria-label":"Back",children:(0,u.jsx)(un,{size:24})}):(0,u.jsx)("span",{className:"bf-header-spacer","aria-hidden":"true"}),(0,u.jsx)("span",{className:"bf-header-title","data-clickable":p?"true":"false",onClick:p??void 0,children:w}),(0,u.jsx)("button",{type:"button",className:"bf-header-btn",onClick:e,"aria-label":"Close",children:(0,u.jsx)(jr,{size:24})})]}),f.step==="history"?(0,u.jsx)(q0,{flow:f}):o==="embedded"?(0,u.jsx)(Q0,{flow:f,env:c,isConnected:m,onRequestConnect:s,feeDelegated:r}):(0,u.jsx)(Y0,{flow:f,env:c,feeDelegated:r})]})})})}var cr=V(require("react"),1),Nf=V(require("bignumber.js"),1);var yf=require("@tanstack/react-query");var K0="token-history";function xf(e,t,r,n,o=!0){return(0,yf.useInfiniteQuery)({queryKey:[K0,e,t,r.toLowerCase(),n.toLowerCase()],initialPageParam:void 0,queryFn:async({pageParam:a,signal:i})=>{let s=await Oe("walletServer",e),l=new URLSearchParams({chain_id:String(t),token:r,wallet:n}),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 c=await fetch(`${s}/v1/public/token/historical?${l}`,{cache:"no-store",signal:i});if(!c.ok)throw new Error(`Failed to fetch token history: ${c.status}`);let b=await c.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&&!!n&&!!r&&t>0,staleTime:1e4})}var Ui=V(require("react"),1);var Il={chart:!1,balance:!0,overview:!1,social:!1,history:!0},Z0=Object.keys(Il),X0="apps.json";function vf(e){let[t,r]=Ui.useState({visibility:Il,isLoaded:!1});return Ui.useEffect(()=>{let n=!0;return jn(X0,e).then(o=>{if(!n)return;let a=o?.tokenDetail?.sections,i={...Il};if(a)for(let s of Z0){let l=a[s];typeof l=="boolean"&&(i[s]=l)}r({visibility:i,isLoaded:!0})}),()=>{n=!1}},[e]),t}var mr=V(require("react"),1);var ji=require("@tanstack/react-query");var J0="token-price-history";function kf(e,t,r,n,o=!0){return(0,ji.useQuery)({queryKey:[J0,e,t,r.toLowerCase(),n],queryFn:async({signal:a})=>{let i=await Oe("walletServer",e),s=new URLSearchParams({chain_id:String(t),token:r,interval:n}),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&&!!r&&t>0,staleTime:3e4,placeholderData:ji.keepPreviousData})}var ct=require("react/jsx-runtime"),$0="var(--ds-system-green-high, #00a869)",ew="var(--wi-error, #e70077)",ro=150,Wi=3,El=18,tw=18,rw=[{key:"10m",label:"10m"},{key:"1h",label:"1H"},{key:"1d",label:"1D"},{key:"7d",label:"1W"},{key:"30d",label:"1M"},{key:"1y",label:"1Y"}],nw=new Set(["7d","30d","1y"]);function ow(){let e=mr.useRef(null),[t,r]=mr.useState(0);return mr.useEffect(()=>{let n=e.current;if(!n)return;let o=new ResizeObserver(a=>{r(a[0]?.contentRect.width??0)});return o.observe(n),r(n.clientWidth),()=>o.disconnect()},[]),[e,t]}function aw(e,t){let r=new Date(e*1e3),n=t?{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}:{hour:"numeric",minute:"2-digit"};return new Intl.DateTimeFormat("en-US",n).format(r)}function iw(e,t){if(t<=0||e.length===0)return null;let r=e.length===1?[e[0],e[0]]:e,n=r.length,o=r[0],a=r[0],i=0,s=0;for(let y=1;y<n;y++)r[y]>o&&(o=r[y],i=y),r[y]<a&&(a=r[y],s=y);let l=o-a||1,d=Math.max(1,t-Wi*2),c=ro-El-tw,b=y=>n===1?t/2:Wi+y/(n-1)*d,f=y=>El+(1-(y-a)/l)*c,g=r.map((y,h)=>({x:b(h),y:f(y)})),x=g.map((y,h)=>`${h===0?"M":"L"}${y.x.toFixed(2)},${y.y.toFixed(2)}`).join(" "),w=g[0],m=g[g.length-1],p=`${x} L${m.x.toFixed(2)},${ro} L${w.x.toFixed(2)},${ro} Z`;return{values:r,points:g,linePath:x,areaPath:p,maxIdx:i,minIdx:s}}function Rf({env:e,chainId:t,tokenAddress:r}){let[n,o]=mr.useState("1d"),[a,i]=mr.useState(null),s=mr.useId(),[l,d]=ow(),{data:c,isLoading:b,isError:f}=kf(e,t,r,n,!0),g=mr.useMemo(()=>(c??[]).filter(O=>Number.isFinite(Number(O.price))).slice().sort((O,ce)=>O.updated_at-ce.updated_at),[c]),x=mr.useMemo(()=>g.map(A=>Number(A.price)),[g]),w=mr.useMemo(()=>iw(x,d),[x,d]);mr.useEffect(()=>{i(null)},[n]);let m=g.length>0,p=a!==null&&a<x.length?a:x.length-1,y=m?x[p]:0,h=m?x[0]:0,v=h!==0?(y-h)/h*100:0,R=v>=0,S=R?$0:ew,E=(R?"+":"-")+(Math.floor(Math.abs(v)*100)/100).toFixed(2)+"%",C=a!==null&&g[a]?aw(g[a].updated_at,nw.has(n)):"",N=A=>{if(!w||d<=0)return;let O=A.currentTarget.getBoundingClientRect(),ce=A.clientX-O.left;if(w.values.length<=1){i(0);return}let P=Math.max(1,d-Wi*2),xe=Math.min(1,Math.max(0,(ce-Wi)/P)),ne=Math.round(xe*(g.length-1));i(Math.min(g.length-1,Math.max(0,ne)))},I=()=>i(null);if(!b&&(f||!m))return null;let M=a!==null&&w&&w.points[a]?w.points[a]:null,W=w?.points[w.maxIdx],L=w?.points[w.minIdx],H=A=>Math.min(Math.max(A,24),Math.max(24,d-24));return(0,ct.jsxs)("section",{className:"wi-td-chart",children:[(0,ct.jsxs)("div",{className:"wi-td-chart-panel",children:[(0,ct.jsx)("span",{className:"wi-td-chart-price",children:m?qn(y):"\u2014"}),m&&(0,ct.jsxs)("span",{className:"wi-td-chart-change","data-positive":R,children:[(0,ct.jsx)("span",{children:E}),C&&(0,ct.jsx)("span",{className:"wi-td-chart-when",children:C})]})]}),(0,ct.jsx)("div",{ref:l,className:"wi-td-chart-plot",children:b&&!m?(0,ct.jsx)("div",{className:"wi-skeleton-block wi-td-chart-skeleton"}):w&&d>0&&(0,ct.jsxs)("svg",{className:"wi-td-chart-svg",width:d,height:ro,role:"img","aria-label":"Price chart",children:[(0,ct.jsx)("defs",{children:(0,ct.jsxs)("linearGradient",{id:s,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,ct.jsx)("stop",{offset:"0%",stopColor:S,stopOpacity:.28}),(0,ct.jsx)("stop",{offset:"100%",stopColor:S,stopOpacity:0})]})}),(0,ct.jsx)("path",{d:w.areaPath,fill:`url(#${s})`}),(0,ct.jsx)("path",{d:w.linePath,fill:"none",stroke:S,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),W&&(0,ct.jsx)("text",{className:"wi-td-chart-minmax",x:H(W.x),y:Math.max(11,W.y-7),textAnchor:"middle",children:qn(w.values[w.maxIdx])}),L&&w.minIdx!==w.maxIdx&&(0,ct.jsx)("text",{className:"wi-td-chart-minmax",x:H(L.x),y:Math.min(ro-5,L.y+14),textAnchor:"middle",children:qn(w.values[w.minIdx])}),M&&(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)("line",{className:"wi-td-chart-cursor",x1:M.x,y1:El-6,x2:M.x,y2:ro}),(0,ct.jsx)("circle",{cx:M.x,cy:M.y,r:4,fill:S,stroke:"var(--wi-surface-bg, #121212)",strokeWidth:2})]}),(0,ct.jsx)("rect",{x:0,y:0,width:d,height:ro,fill:"transparent",style:{touchAction:"none"},onPointerMove:N,onPointerDown:N,onPointerLeave:I,onPointerCancel:I})]})}),(0,ct.jsx)("div",{className:"wi-td-chart-tabs",role:"tablist",children:rw.map(A=>(0,ct.jsx)("button",{type:"button",role:"tab","aria-selected":n===A.key,className:"wi-td-chart-tab","data-active":n===A.key||void 0,onClick:()=>o(A.key),"data-track":"token_detail_interval","data-track-id":A.key,children:A.label},A.key))})]})}var D=require("react/jsx-runtime"),sw="https://contents.crosstoken.io/wallet/token/images/FT.png",lw={receive:"Receive",send:"Send","bridge-in":"Bridge In","bridge-out":"Bridge Out"};function dw(e){return e.length>24?"xs":e.length>18?"sm":"md"}function cw(e){if(!e)return"";let t=e<1e12?e*1e3:e,r=Math.max(0,Math.floor((Date.now()-t)/1e3));if(r<60)return"just now";let n=Math.floor(r/60);if(n<60)return`${n}m`;let o=Math.floor(n/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 Sf(e){let[t,r]=e.split("."),n="";for(let o=0;o<t.length;o++){let a=t.length-o;o>0&&a%3===0&&(n+=","),n+=t[o]}return r?`${n}.${r}`:n}function Cf(e,t){let r=BigInt(e||"0");if(t<=2){let i=10n**BigInt(t),s=r/i,l=r%i*10n**BigInt(2-t);return`${s.toString()}.${l.toString().padStart(2,"0")}`}let n=r/10n**BigInt(t-2),o=n/100n,a=n%100n;return`${o.toString()}.${a.toString().padStart(2,"0")}`}function pw(e,t,r){let n=cr.useRef(null),o=cr.useRef(null),[a,i]=cr.useState(t);return cr.useLayoutEffect(()=>{let s=n.current,l=o.current;if(!s||!l)return;let d=()=>{let b=s.clientWidth;if(!b)return;let f=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:${f.fontFamily}`,`font-weight:${f.fontWeight}`,`letter-spacing:${f.letterSpacing}`,`font-size:${t}px`].join(";"),document.body.appendChild(g);let x=g.offsetWidth;if(document.body.removeChild(g),x<=b){i(t);return}let w=Math.max(r,Math.floor(t*b/x));i(w)};d();let c=new ResizeObserver(d);return c.observe(s),()=>c.disconnect()},[e,t,r]),{containerRef:n,textRef:o,fontSize:a}}function uw(e){let t=mt(e);return t?t.decimalPlaces(4,Nf.default.ROUND_DOWN).toFormat():"-"}function fw(){return(0,D.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[(0,D.jsx)("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.6"}),(0,D.jsx)("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 mw(){return(0,D.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,D.jsx)("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 gw(){return(0,D.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,D.jsx)("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 hw(){return(0,D.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,D.jsx)("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 Tf({env:e,isMobile:t,token:r,walletAddress:n,stat:o,tokenInfo:a,showBalance:i=!0,onBack:s,onClose:l,onSend:d,onOutlink:c}){let b=r.quantity.decimals,[f,g]=cr.useState(!1),{buildTxUrl:x,chainInfo:w}=dc(e,r.chainId,!0),{visibility:m}=vf(e),{data:p,isLoading:y,isError:h,fetchNextPage:v,hasNextPage:R,isFetchingNextPage:S,refetch:E}=xf(e,r.chainId,r.address,n,!0),C=cr.useMemo(()=>p?.pages?p.pages.flat():[],[p]),N=cr.useRef(null);cr.useEffect(()=>{if(!t)return;let U=N.current;if(!U||!R)return;let te=new IntersectionObserver(Z=>{Z[0]?.isIntersecting&&!S&&v()},{rootMargin:"120px"});return te.observe(U),()=>te.disconnect()},[t,R,S,v]);let I=cr.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(r.address).then(()=>{g(!0),setTimeout(()=>g(!1),1500)}).catch(()=>{})},[r.address]),M=Sf(Cf(r.quantity.numeric,b)),W=o?.price?Ja(r.quantity.numeric,b,o.price):null,L=i?M:"\u2022\u2022\u2022\u2022",{containerRef:H,textRef:A,fontSize:O}=pw(L,30,14),X=go(r.chainId,e).name??w?.name??`Chain ${r.chainId}`,P=w?.explorer_url,xe=a?.deployed??!0,ne=cr.useMemo(()=>{let U=[];return a?.info_url&&U.push({key:"web",label:"Website",url:a.info_url,icon:(0,D.jsx)(fw,{})}),a?.telegram_url&&U.push({key:"tg",label:"Telegram",url:a.telegram_url,icon:(0,D.jsx)(mw,{})}),a?.x_url&&U.push({key:"x",label:"X",url:a.x_url,icon:(0,D.jsx)(gw,{})}),a?.medium_url&&U.push({key:"medium",label:"Medium",url:a.medium_url,icon:(0,D.jsx)(hw,{})}),U},[a]),K=(U,te,Z,be)=>{Qt(U,te,{category:"token-detail",origin:Z,payload:{address:r.address,txHash:be}},c)};return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)("div",{className:"wi-sticky-header",children:[(0,D.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,D.jsx)("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:(0,D.jsx)(un,{size:24})}),(0,D.jsxs)("span",{className:"wi-td-header-title",children:[(0,D.jsx)("img",{src:r.icon_url,alt:"","aria-hidden":!0,className:"wi-td-header-icon",width:24,height:24,draggable:!1,onError:U=>{U.currentTarget.src=sw}}),(0,D.jsx)("span",{className:"wi-td-header-name",children:r.symbol})]}),(0,D.jsx)("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close",children:(0,D.jsx)(jr,{size:24})})]}),(0,D.jsx)("hr",{className:"wi-divider"})]}),(0,D.jsxs)("div",{className:"wi-td-scroll",children:[m.chart&&(0,D.jsx)(Rf,{env:e,chainId:r.chainId,tokenAddress:r.address}),m.balance&&(0,D.jsxs)("section",{className:"wi-td-balance-card",children:[(0,D.jsxs)("div",{className:"wi-td-balance-left",ref:H,children:[(0,D.jsx)("span",{className:"wi-td-balance-label",children:"My Balance"}),(0,D.jsx)("span",{className:"wi-td-balance-amount",ref:A,style:{fontSize:O},children:L}),i&&W&&(0,D.jsx)("span",{className:"wi-td-balance-fiat",children:W})]}),(0,D.jsx)("button",{type:"button",className:"wi-td-send-btn",onClick:()=>d(r),"aria-label":`Send ${r.symbol}`,"data-track":"token_detail_send","data-track-id":r.symbol,children:(0,D.jsx)("span",{children:"Send"})})]}),m.overview&&(0,D.jsxs)("section",{className:"wi-td-section",children:[(0,D.jsx)("h3",{className:"wi-td-section-title",children:"Crypto Overview"}),(0,D.jsxs)("div",{className:"wi-td-rows",children:[(0,D.jsxs)("div",{className:"wi-td-row",children:[(0,D.jsx)("span",{className:"wi-td-row-label",children:"Network"}),P?(0,D.jsxs)("a",{className:"wi-td-row-value wi-td-row-link",href:P,target:"_blank",rel:"noopener noreferrer",onClick:U=>K(U,P,"token-network"),children:[(0,D.jsx)("span",{children:X}),(0,D.jsx)(bw,{})]}):(0,D.jsx)("span",{className:"wi-td-row-value",children:X})]}),(0,D.jsxs)("div",{className:"wi-td-row",children:[(0,D.jsx)("span",{className:"wi-td-row-label",children:"Contract Address"}),(0,D.jsxs)("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:I,"aria-label":"Copy contract address",children:[(0,D.jsx)("span",{children:dr(r.address)}),f?(0,D.jsx)(pn,{size:14}):(0,D.jsx)(Vn,{size:14})]})]}),(0,D.jsxs)("div",{className:"wi-td-row",children:[(0,D.jsx)("span",{className:"wi-td-row-label",children:"Decimals"}),(0,D.jsx)("span",{className:"wi-td-row-value",children:b})]}),(0,D.jsxs)("div",{className:"wi-td-row",children:[(0,D.jsx)("span",{className:"wi-td-row-label",children:"Total Supply"}),(0,D.jsx)("span",{className:"wi-td-row-value",children:uw(o?.circulating_supply)})]})]})]}),m.social&&ne.length>0&&(0,D.jsxs)("section",{className:"wi-td-section",children:[(0,D.jsx)("h3",{className:"wi-td-section-title",children:"Social Media"}),(0,D.jsx)("div",{className:"wi-td-social-row",children:ne.map(U=>(0,D.jsx)("a",{className:"wi-td-social-btn",href:U.url,target:"_blank",rel:"noopener noreferrer","aria-label":U.label,onClick:te=>K(te,U.url,"token-social"),children:U.icon},U.key))})]}),m.history&&(0,D.jsxs)("section",{className:"wi-td-section",children:[(0,D.jsx)("h3",{className:"wi-td-section-title",children:"Token History"}),y&&(0,D.jsx)("div",{className:"wi-td-history-list",children:Array.from({length:3},(U,te)=>(0,D.jsxs)("div",{className:"wi-td-history-skeleton",children:[(0,D.jsx)("div",{className:"wi-skeleton-block",style:{width:90,height:14}}),(0,D.jsx)("div",{className:"wi-skeleton-block",style:{width:60,height:14}})]},`td-sk-${te}`))}),!y&&h&&(0,D.jsxs)("div",{className:"wi-td-history-empty",children:[(0,D.jsx)("span",{children:"Failed to load history."}),(0,D.jsx)("button",{type:"button",className:"wi-td-retry-btn",onClick:()=>E(),children:"Retry"})]}),!y&&!h&&C.length===0&&(0,D.jsx)("div",{className:"wi-td-history-empty",children:(0,D.jsx)("span",{children:"No transactions found."})}),!y&&!h&&C.length>0&&(0,D.jsxs)("div",{className:"wi-td-history-list",children:[C.map((U,te)=>{let Z=U.to_alias?.toLowerCase().includes("bridge")??!1,be=U.from_alias?.toLowerCase().includes("bridge")??!1,Ne=Z?"bridge-out":be?"bridge-in":U.to?.toLowerCase()===n.toLowerCase()?"receive":"send",re=Ne==="receive"||Ne==="bridge-in",we=re?U.from:U.to,Fe=Sf(Cf(U.amount,b)),Ae=x(U.tx),pt=cw(U.timestamp),ye=(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)("div",{className:"wi-td-history-top",children:[(0,D.jsx)("span",{className:"wi-td-history-type","data-direction":Ne,children:lw[Ne]}),(0,D.jsx)("span",{className:"wi-td-history-counter",children:dr(we??"")})]}),(0,D.jsxs)("div",{className:"wi-td-history-bottom",children:[(0,D.jsxs)("span",{className:"wi-td-history-meta",children:[(0,D.jsx)("span",{className:"wi-td-history-status","data-status":U.status,children:U.status==="success"?"Success":"Failed"}),pt&&(0,D.jsx)("span",{className:"wi-td-history-time",children:pt})]}),(0,D.jsxs)("span",{className:"wi-td-history-amount","data-size":dw(`${re?"+":"-"}${Fe} ${r.symbol}`),children:[re?"+":"-",Fe," ",r.symbol]})]})]}),De=`${U.tx}-${U.log_index}-${te}`;return Ae?(0,D.jsx)("a",{className:"wi-td-history-item wi-td-history-item--link",href:Ae,target:"_blank",rel:"noopener noreferrer",onClick:ut=>K(ut,Ae,"token-tx",U.tx),children:ye},De):(0,D.jsx)("div",{className:"wi-td-history-item",children:ye},De)}),R&&(t?(0,D.jsx)("div",{ref:N,className:"wi-td-history-sentinel",children:S&&(0,D.jsx)("span",{className:"wi-td-history-loading",children:"Loading\u2026"})}):(0,D.jsx)("button",{type:"button",className:"wi-td-loadmore-btn",onClick:()=>v(),disabled:S,children:S?"Loading\u2026":"Load more"}))]})]})]})]})}function bw(){return(0,D.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",className:ze("wi-td-external-icon"),"aria-hidden":!0,children:(0,D.jsx)("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"})})}var k=require("react/jsx-runtime"),ww="On-ramp is not available in your region.";function Ml(e,t,r){let n=Tt[e],o=r.toUpperCase();if(t===n.cross&&o.includes("ONEUSD"))return 0;if(t===n.cross&&o==="ONE")return 1;if(t===n.bsc&&o==="ONE")return 2}function yw(e){return parseInt(e.split(":")[1],10)}function xw(e){if(typeof window>"u"||!e?.length)return!1;let{origin:t,pathname:r}=window.location,n=t+r;return e.some(o=>n===o||n.startsWith(`${o}/`))}function vw(e){let t=e.lastIndexOf(".");return t===-1?{main:e,decimal:""}:{main:e.slice(0,t),decimal:e.slice(t)}}function kw(e){let t=e.toLowerCase().replace(/^0x/,""),r=t.length>=8?t.slice(0,8):t.padEnd(8,"0"),n=parseInt(r.slice(0,4),16)%360,o=(n+60+parseInt(r.slice(4,8),16)%120)%360;return`linear-gradient(135deg, hsl(${n} 85% 65%), hsl(${o} 80% 55%))`}function Rw(e,t=.5){let r=oe.useRef(null),n=oe.useRef(null),[o,a]=oe.useState(1);return oe.useLayoutEffect(()=>{let i=r.current,s=n.current;if(!i||!s)return;let l=()=>{let c=i.clientWidth;if(!c)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 f=b.offsetWidth;i.removeChild(b);let g=f>c?Math.max(t,c/f):1;a(g)};l();let d=new ResizeObserver(l);return d.observe(i),()=>d.disconnect()},[e,t]),{containerRef:r,valueRef:n,scale:o}}function Ef({align:e="end",sideOffset:t=12,className:r,children:n}){let{env:o,theme:a,isMobile:i,open:s,drawerDirection:l,modal:d,showBalance:c,showForgeToken:b,showGameToken:f,showQR:g,showBridge:x,qrLogoSrc:w,walletAddress:m,accountName:p,sendAccounts:y,profileImageUrl:h,preferredTokens:v,close:R,onSelectWallet:S,onCopyAddress:E,onBuy:C,onDisconnect:N,disconnectLabel:I,termsUrl:M,termsLabel:W,privacyUrl:L,privacyLabel:H,portalStyle:A,navContent:O,navPosition:ce,footerContent:X,view:P,setView:xe,selectedSendToken:ne,setSelectedSendToken:K,selectedDetailToken:U,setSelectedDetailToken:te,showPortfolio:Z,portfolioTitle:be,portfolioSections:Ne,showTotalAssets:re,totalAssetsLabel:we,sendTransaction:Fe,getTransactionReceipt:Ae,estimateGas:pt,onOutlink:ye,lpBalanceReader:De,stakingRewardsReader:ut,bridgeTokens:Be,bridgeHistory:Ge,getBridgeQuote:Ue,getBridgeToTokens:st,getBridgeApproval:Ht,approveBridge:Rt,submitBridge:Ut,onReceive:Ie,onSend:jt,onBuyDisabledMessage:tt,onBridgeDisabledMessage:Mt,onSendDisabledMessage:Ve}=Nn(),[Ze,nr]=oe.useState(null),Wt=oe.useRef(void 0),qe=oe.useCallback(T=>{nr(T),clearTimeout(Wt.current),Wt.current=setTimeout(()=>nr(null),4e3)},[]);oe.useEffect(()=>()=>clearTimeout(Wt.current),[]);let wt=!!tt,rt=oe.useCallback(()=>{if(wt){qe(tt);return}let T=C?.();T&&typeof T.then=="function"&&T.catch(()=>{qe(tt??ww)})},[wt,tt,C,qe]),_e=!!Mt,ft=!!Ve,{tokens:At,isLoading:je}=mn(o,m,s&&c),{statsMap:nt}=gn(o,c),{aprPercent:qt}=$c(),{categoryMap:F,infoMap:Xe}=tp(o,c),B=c&&re,{displayValue:se,isLowerBound:ve,isLoading:Te}=op(o,m,s&&B),[ot,or]=oe.useState(!1),ur=oe.useRef(null),[Or,dn]=oe.useState(0),{holdings:Rr,isLoading:cn}=qc(o,m,s&&c&&b),Br=oe.useMemo(()=>Rr.map(T=>T.token),[Rr]),{imageMap:ie}=Yc(o,Br,b&&Rr.length>0),Se=oe.useMemo(()=>{let T=[],me=[],Qe=[],fr=new Map((v??[]).map((et,ir)=>[`${yw(et.chainId)}:${et.address.toLowerCase()}`,ir]));for(let et of At){let ir=Ml(o,et.chainId,et.symbol)!==void 0,Fr=`${et.chainId}:${et.address.toLowerCase()}`,Un=fr.get(Fr),Ps=(mt(et.quantity.numeric)??new Io.default(0)).shiftedBy(-et.quantity.decimals);if(ir)T.push(et);else if(Un!==void 0)me.push(et);else if(Ps.isGreaterThan(0)){if(!f&&F.get(Jo(et.chainId,et.address))==="game")continue;Qe.push(et)}}return T.sort((et,ir)=>{let Fr=Ml(o,et.chainId,et.symbol)??99,Un=Ml(o,ir.chainId,ir.symbol)??99;return Fr-Un}),me.sort((et,ir)=>{let Fr=fr.get(`${et.chainId}:${et.address.toLowerCase()}`)??99,Un=fr.get(`${ir.chainId}:${ir.address.toLowerCase()}`)??99;return Fr-Un}),Qe.sort((et,ir)=>{let Fr=nt.get(Ir(et.chainId,et.address)),Un=nt.get(Ir(ir.chainId,ir.address)),Ps=(mt(et.quantity.numeric)??new Io.default(0)).shiftedBy(-et.quantity.decimals).multipliedBy(mt(Fr?.price)??0);return(mt(ir.quantity.numeric)??new Io.default(0)).shiftedBy(-ir.quantity.decimals).multipliedBy(mt(Un?.price)??0).minus(Ps).toNumber()}),[...T,...me,...Qe]},[At,o,nt,f,F,v]),G=oe.useMemo(()=>{if(!b)return[];let T=new Set(At.map(me=>me.address.toLowerCase()));return[...Rr].filter(me=>!T.has(me.token.toLowerCase())).sort((me,Qe)=>{let fr=mt(me.value)??new Io.default(0);return(mt(Qe.value)??new Io.default(0)).minus(fr).toNumber()})},[Rr,b,At]),Pe=oe.useRef(!1),[q,He]=oe.useState(null),Yr=oe.useRef(void 0),zn=q?.chainId??ne?.chainId??Se[0]?.chainId??0,{transactionUrl:Sr}=qo(o,zn,q?.txHash,!!(q?.txHash&&zn)),Nt=oe.useCallback(T=>{Pe.current=!0,xe(T)},[xe]),[Ts,Fo]=oe.useState("recipient"),uo=oe.useCallback(()=>{K(null),Fo("recipient"),Nt("wallet")},[K,Nt]),Fn=oe.useCallback((T,me="recipient")=>{if(ft){qe(Ve);return}Fo(me),K(T),Nt("send")},[ft,Ve,qe,K,Nt]),fo=oe.useCallback(T=>{te(T),Nt("token-detail")},[te,Nt]),Is=oe.useCallback(()=>{te(null),Nt("wallet")},[te,Nt]),Es=oe.useCallback(T=>{Fn(T,"recipient")},[Fn]),mo=sr("apps.json",o,T=>Nr(T?.gametokenBridge,o)),Pa=sr("apps.json",o,T=>T?.gametokenSites),Ms=oe.useCallback(()=>{if(_e){qe(Mt);return}if(mo){if(xw(Pa)){window.location.assign(mo);return}window.open(mo,"_blank","noopener,noreferrer")}},[_e,Mt,mo,Pa,qe]),As=oe.useCallback(T=>{clearTimeout(Yr.current),K(null),Nt("wallet"),He({status:"pending",txHash:T.txHash,chainId:T.chainId,description:`${T.amount} ${T.tokenSymbol} to ${dr(T.recipient)}`})},[K,Nt]),_=oe.useCallback(T=>{let me=ne?.chainId;K(null),Nt("wallet"),!(!T||!me)&&(He(Qe=>({status:"success",txHash:T,chainId:me,description:Qe?.txHash===T?Qe.description:"Tap to see your transaction"})),clearTimeout(Yr.current),Yr.current=setTimeout(()=>He(null),5e3))},[ne?.chainId,K,Nt]),xt=oe.useCallback(T=>{let me=T.txHash;me&&(He({status:"error",txHash:me,chainId:T.chainId,description:T.message}),clearTimeout(Yr.current),Yr.current=setTimeout(()=>He(null),5e3))},[]),Yt=oe.useMemo(()=>{if(Ie)return Ie;if(g)return()=>Nt("qr")},[Ie,g,Nt]),Lt=oe.useMemo(()=>{if(jt)return jt;if(Se.length===0)return;let T=Se[0];return()=>Fn(T,"token")},[jt,Se,Fn]),zr=oe.useCallback(()=>{if(ft){qe(Ve);return}Lt?.()},[ft,Ve,Lt,qe]);oe.useEffect(()=>{s||(Pe.current=!1,Fo("recipient"))},[s]);let Jt=oe.useRef(null);oe.useEffect(()=>{let T=Jt.current;if(!T||!i)return;let me=Qe=>{Qe.pointerType==="touch"&&Qe.stopPropagation()};return T.addEventListener("pointerdown",me),()=>T.removeEventListener("pointerdown",me)},[i]);let[ar,Je]=oe.useState(!1),Cr=oe.useRef(void 0),[Kr,Uo]=oe.useState(!1);oe.useEffect(()=>{if(!Kr)return;let T=()=>Uo(!1),me=fr=>{fr.key==="Escape"&&Uo(!1)},Qe=setTimeout(()=>{document.addEventListener("mousedown",T,!0),document.addEventListener("keydown",me,!0)},0);return()=>{clearTimeout(Qe),document.removeEventListener("mousedown",T,!0),document.removeEventListener("keydown",me,!0)}},[Kr]),oe.useEffect(()=>{Uo(!1)},[m]),oe.useEffect(()=>()=>clearTimeout(Cr.current),[]),oe.useEffect(()=>()=>clearTimeout(Yr.current),[]),oe.useEffect(()=>{let T=ur.current;if(!T||X===null){dn(0);return}let me=()=>{dn(T.offsetHeight)};if(me(),typeof ResizeObserver>"u")return;let Qe=new ResizeObserver(me);return Qe.observe(T),()=>Qe.disconnect()},[X]);let id=oe.useCallback(async()=>{if(!ar)try{await navigator.clipboard.writeText(m),Je(!0),clearTimeout(Cr.current),Cr.current=setTimeout(()=>Je(!1),2e3),E?.(m,!0)}catch{E?.(m,!1)}},[m,E,ar]),Oa=oe.useCallback(T=>{T.currentTarget.setAttribute("data-loaded","true")},[]),sd=oe.useMemo(()=>({background:kw(m)}),[m]),Ba=oe.useMemo(()=>h||fn(o,m,{size:120,bg:a==="dark"?"1A1A2E":"F3F6F8"}),[h,o,m,a]),Ls=oe.useMemo(()=>vw(se),[se]),{containerRef:yg,valueRef:xg,scale:vg}=Rw(ot?"\u2022\u2022\u2022\u2022\u2022\u2022":se),ld=M||L?(0,k.jsxs)("div",{className:"wi-legal-links",children:[M&&(0,k.jsx)("a",{className:"wi-legal-link",href:M,target:"_blank",rel:"noopener noreferrer","data-track":"terms_link",onClick:T=>Qt(T,M,{category:"terms",origin:"terms"},ye),children:W}),M&&L&&(0,k.jsx)("span",{className:"wi-legal-sep","aria-hidden":!0,children:"\xB7"}),L&&(0,k.jsx)("a",{className:"wi-legal-link",href:L,target:"_blank",rel:"noopener noreferrer","data-track":"privacy_link",onClick:T=>Qt(T,L,{category:"privacy",origin:"privacy"},ye),children:H})]}):null,dd=N?(0,k.jsxs)("button",{type:"button",className:"wi-disconnect-btn","data-track":"disconnect",onClick:()=>{N(),R()},children:[(0,k.jsx)(Kd,{size:16}),(0,k.jsx)("span",{className:"wi-disconnect-label",children:I})]}):null,kg=c&&!O?(0,k.jsxs)("div",{className:"wi-action-row","aria-label":"Wallet actions",children:[(0,k.jsxs)("button",{type:"button",className:ze("wi-action-card",wt&&"wi-action-card--dimmed"),onClick:rt,disabled:!C&&!wt,"aria-disabled":wt||void 0,"aria-label":"Buy","data-track":"buy",children:[(0,k.jsx)(tc,{size:20}),(0,k.jsx)("span",{children:"Buy"})]}),x?(0,k.jsxs)("button",{type:"button",className:ze("wi-action-card",_e&&"wi-action-card--dimmed"),onClick:Ms,"aria-disabled":_e||void 0,"aria-label":"Bridge","data-track":"bridge_open",children:[(0,k.jsx)(rc,{size:20}),(0,k.jsx)("span",{children:"Bridge"})]}):(0,k.jsxs)("button",{type:"button",className:"wi-action-card",onClick:Yt,disabled:!Yt,"aria-label":"Receive","data-track":"receive",children:[(0,k.jsx)(Xa,{size:20}),(0,k.jsx)("span",{children:"Receive"})]}),(0,k.jsxs)("button",{type:"button",className:ze("wi-action-card",ft&&"wi-action-card--dimmed"),onClick:zr,disabled:!ft&&!Lt,"aria-disabled":ft||void 0,"aria-label":"Send","data-track":"send_open",children:[(0,k.jsx)($d,{size:20}),(0,k.jsx)("span",{children:"Send"})]}),Z?(0,k.jsxs)("button",{type:"button",className:"wi-action-card",onClick:()=>Nt("portfolio"),"aria-label":"View portfolio","data-track":"portfolio_open",children:[(0,k.jsx)(ec,{size:20}),(0,k.jsx)("span",{children:"Portfolio"})]}):x?(0,k.jsxs)("button",{type:"button",className:"wi-action-card",onClick:Yt,disabled:!Yt,"aria-label":"Receive","data-track":"receive",children:[(0,k.jsx)(Xa,{size:20}),(0,k.jsx)("span",{children:"Receive"})]}):null]}):null,Rg=(0,k.jsxs)("div",{className:ze("wi-view-inner",Pe.current&&"wi-view-wallet"),children:[B&&(0,k.jsxs)("div",{className:"wi-total-section",children:[(0,k.jsxs)("div",{className:"wi-total-head",children:[(0,k.jsx)("span",{className:"wi-total-label",children:we}),(0,k.jsx)("span",{role:"button",tabIndex:0,className:"wi-total-eye",onClick:T=>{T.stopPropagation(),or(me=>!me)},onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),T.stopPropagation(),or(me=>!me))},"aria-label":ot?"Show balance":"Hide balance","data-track":"balance_toggle",children:ot?(0,k.jsx)(Xd,{}):(0,k.jsx)(Zd,{})})]}),(0,k.jsx)("div",{className:"wi-total-body",ref:yg,children:Te?(0,k.jsx)("div",{className:"wi-skeleton-block wi-total-skeleton",style:{width:160,height:42}}):(0,k.jsx)("div",{className:"wi-total-value","data-hidden":ot||void 0,ref:xg,style:{"--wi-total-scale":vg},children:ot?(0,k.jsx)("span",{className:"wi-total-mask",children:"\u2022\u2022\u2022\u2022\u2022\u2022"}):(0,k.jsxs)(k.Fragment,{children:[ve&&(0,k.jsx)("span",{className:"wi-total-lte",children:"\u2264"}),(0,k.jsx)("span",{className:"wi-total-currency",children:"$"}),(0,k.jsx)("span",{className:"wi-total-amount",children:Ls.main}),Ls.decimal&&(0,k.jsx)("span",{className:"wi-total-decimal",children:Ls.decimal})]})})})]}),ce==="top"&&(O?(0,k.jsx)("div",{className:"wi-nav-fixed",children:O}):kg),c&&(0,k.jsx)("div",{ref:Jt,className:"wi-scrollable-body","data-vaul-no-drag":!0,children:(0,k.jsxs)("div",{className:"wi-token-list",children:[je&&Array.from({length:5},(T,me)=>(0,k.jsxs)("div",{className:"wi-skeleton-item",children:[(0,k.jsxs)("div",{className:"wi-skeleton-left",children:[(0,k.jsx)("div",{className:"wi-skeleton-block wi-skeleton-icon"}),(0,k.jsxs)("div",{className:"wi-skeleton-lines",children:[(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),(0,k.jsxs)("div",{className:"wi-skeleton-right",children:[(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},me)),!je&&Se.length===0&&!b&&(0,k.jsx)("div",{className:"wi-empty",children:"No Tokens Found"}),Se.map(T=>{let me=nt.get(Ir(T.chainId,T.address)),Qe=me?parseFloat(me.percent_change_24h):null,fr=Qe!==null&&Qe>=0,et=Ko(o,T.chainId),ir=Cc(T.address);return(0,k.jsxs)("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>fo(T),"aria-label":`View ${T.symbol} detail`,"data-track":"token_detail","data-track-id":T.symbol,children:[(0,k.jsxs)("div",{className:"wi-token-left",children:[(0,k.jsxs)("div",{className:"wi-token-icon-wrap",children:[(0,k.jsx)("img",{src:T.icon_url,alt:T.symbol,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:Oa,onError:Fr=>{Fr.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),et&&(0,k.jsx)("img",{src:et,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:Fr=>{Fr.currentTarget.style.display="none"}})]}),(0,k.jsxs)("div",{className:"wi-token-info",children:[(0,k.jsxs)("span",{className:"wi-token-name-row",children:[(0,k.jsx)("span",{className:"wi-token-name",children:T.symbol}),ir&&qt!==null&&(0,k.jsx)("span",{className:"wi-token-apr",children:gi(qt)})]}),me&&(0,k.jsxs)("div",{className:"wi-token-price-row",children:[(0,k.jsx)("span",{className:"wi-token-price",children:qn(me.price)}),(0,k.jsx)("span",{className:"wi-token-change","data-positive":fr,"data-zero":Qe===0||void 0,children:Qe!==null&&(Qe===0?"0%":`${fr?"+":"-"}${(fr?Math.floor:Math.ceil)(Math.abs(Qe)*100)/100}%`)})]})]})]}),(0,k.jsxs)("div",{className:"wi-token-right",children:[(0,k.jsx)("span",{className:"wi-token-balance",children:In(T.quantity.numeric,T.quantity.decimals)}),me&&(0,k.jsx)("span",{className:"wi-token-value",children:Ja(T.quantity.numeric,T.quantity.decimals,me.price)})]})]},`${T.address}-${T.chainId}`)}),b&&cn&&Array.from({length:3},(T,me)=>(0,k.jsxs)("div",{className:"wi-skeleton-item",children:[(0,k.jsxs)("div",{className:"wi-skeleton-left",children:[(0,k.jsx)("div",{className:"wi-skeleton-block wi-skeleton-icon"}),(0,k.jsxs)("div",{className:"wi-skeleton-lines",children:[(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),(0,k.jsxs)("div",{className:"wi-skeleton-right",children:[(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},`forge-sk-${me}`)),b&&!cn&&!je&&Se.length===0&&G.length===0&&(0,k.jsx)("div",{className:"wi-empty",children:"No Tokens Found"}),b&&G.map(T=>{let me=ie.get(T.token)||"",Qe=Ko(o,Tt[o].cross);return(0,k.jsxs)("div",{className:"wi-token-item",children:[(0,k.jsxs)("div",{className:"wi-token-left",children:[(0,k.jsxs)("div",{className:"wi-token-icon-wrap",children:[(0,k.jsx)("img",{src:me||"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:Oa,onError:fr=>{fr.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),Qe&&(0,k.jsx)("img",{src:Qe,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:fr=>{fr.currentTarget.style.display="none"}})]}),(0,k.jsxs)("div",{className:"wi-token-info",children:[(0,k.jsx)("span",{className:"wi-token-name",children:T.token_name}),(0,k.jsx)("div",{className:"wi-token-price-row",children:(0,k.jsxs)("span",{className:"wi-token-price",children:[In(T.current_price,18)," CROSS"]})})]})]}),(0,k.jsxs)("div",{className:"wi-token-right",children:[(0,k.jsx)("span",{className:"wi-token-balance",children:In(T.balance,18)}),(0,k.jsx)("span",{className:"wi-token-value",children:qn(T.current_value_usd)})]})]},`forge-${T.token}`)})]})}),ce==="bottom"&&O&&(0,k.jsx)("div",{className:"wi-nav-fixed",children:O}),dd&&(0,k.jsx)("div",{className:"wi-wallet-disconnect-row",children:dd})]},"wallet"),Sg=Z?(0,k.jsx)("div",{className:ze("wi-view-inner wi-portfolio-body",Pe.current&&"wi-view-portfolio"),children:(0,k.jsx)(Jn,{env:o,theme:a,walletAddress:m,showHeader:!1,onOutlink:ye,lpBalanceReader:De,stakingRewardsReader:ut,sendTransaction:Fe,estimateGas:pt,sections:Ne})},"portfolio"):null,Cg=ne?(0,k.jsx)("div",{className:ze("wi-view-inner wi-send-body",Pe.current&&"wi-view-send"),children:(0,k.jsx)(Zo,{env:o,theme:a,walletAddress:m,accountName:p,accounts:y,initialStep:Ts,token:ne,tokens:Se,onTokenChange:K,sendTransaction:Fe,getTransactionReceipt:Ae,estimateGas:pt,getTokenPriceUsd:T=>{let me=nt.get(Ir(T.chainId,T.address));if(!me?.price)return;let Qe=parseFloat(me.price);return Number.isFinite(Qe)?Qe:void 0},onClose:R,onBackToWallet:uo,onSubmitted:As,onSuccess:_,onFailed:xt,onOutlink:ye})},"send"):null,Ng=oe.useMemo(()=>Be||Se.map(T=>{let me=nt.get(Ir(T.chainId,T.address)),Qe=me?.price?parseFloat(me.price):void 0;return{name:T.name,symbol:T.symbol,chainId:T.chainId,address:T.address,decimals:T.quantity.decimals,balance:ko(T.quantity.numeric,T.quantity.decimals),iconUrl:T.icon_url,priceUsd:Number.isFinite(Qe)?Qe:void 0}}),[Be,nt,Se]),Tg=(0,k.jsx)("div",{className:ze("wi-view-inner wi-bridge-body",Pe.current&&"wi-view-send"),children:(0,k.jsx)(to,{env:o,walletAddress:m,tokens:Ng,history:Ge,termsUrl:M,getQuote:Ue,getToTokens:st,getApproval:Ht,approveBridge:Rt,submitBridge:Ut,onClose:R,onBackToWallet:uo})},"bridge"),Ig=U?(0,k.jsx)("div",{className:ze("wi-view-inner wi-token-detail-body",Pe.current&&"wi-view-send"),children:(0,k.jsx)(Tf,{env:o,isMobile:i,token:U,walletAddress:m,stat:nt.get(Ir(U.chainId,U.address)),tokenInfo:Xe.get(Jo(U.chainId,U.address)),showBalance:c,onBack:Is,onClose:R,onSend:Es,onOutlink:ye})},"token-detail"):null,Ds=!!S&&p?.trim().toLowerCase()!=="my wallet",cd=(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("span",{className:"wi-receive-avatar",children:[(0,k.jsx)("span",{className:"wi-avatar-fallback",style:sd}),Ba&&(0,k.jsx)("img",{src:Ba,alt:"",className:"wi-avatar-img",width:24,height:24,draggable:!1,onLoad:Oa,onError:T=>{T.currentTarget.style.display="none"}})]}),(0,k.jsx)("span",{className:"wi-receive-account-name",children:p??"Account 1"}),Ds&&(0,k.jsx)("span",{className:"wi-receive-chevron","data-open":Kr,"aria-hidden":"true",children:(0,k.jsx)(Tr,{size:16})})]}),Eg=(0,k.jsxs)("div",{className:ze("wi-view-inner wi-qr-body",Pe.current&&"wi-view-qr"),children:[(0,k.jsxs)("div",{className:"wi-receive-section",children:[Ds?(0,k.jsx)("button",{type:"button",className:"wi-receive-account wi-receive-account--btn",onClick:()=>{Uo(!0),S?.()},"aria-label":"Switch account",children:cd}):(0,k.jsx)("div",{className:"wi-receive-account",children:cd}),(0,k.jsxs)("div",{className:"wi-qr-block",children:[(0,k.jsxs)("div",{className:"wi-qr-box",children:[(0,k.jsx)(If.QRCodeSVG,{value:m,size:180,level:"H",marginSize:2,...w&&{imageSettings:{src:w,height:33,width:33,excavate:!0}}}),!w&&(0,k.jsx)("div",{className:"wi-qr-logo",children:(0,k.jsx)(Jd,{size:33})})]}),(0,k.jsx)("p",{className:"wi-qr-address",children:m})]}),(0,k.jsxs)("button",{type:"button",className:"wi-qr-copy-btn",onClick:id,"data-track":"address_copy",children:[(0,k.jsx)("span",{className:"wi-qr-copy-icon",children:ar?(0,k.jsx)(pn,{size:16}):(0,k.jsx)(Vn,{size:16})}),(0,k.jsx)("span",{className:"wi-qr-copy-text",children:ar?"Copied!":"Copy address"})]})]}),ld&&(0,k.jsx)("div",{className:"wi-receive-footer",children:ld})]},"qr"),Mg=P==="qr"||P==="portfolio"||P==="send"||P==="bridge",pd=X!==null?(0,k.jsx)("div",{className:"wi-builtin-footer",children:X}):null,ud=(0,k.jsxs)("div",{className:"wi-account-text",children:[Ds?(0,k.jsxs)("button",{type:"button",className:"wi-account-row wi-account-row--btn",onClick:()=>{Uo(!0),S?.()},"aria-label":"Switch account","aria-expanded":Kr,children:[(0,k.jsx)("span",{className:"wi-account-name",children:p??"Account 1"}),(0,k.jsx)("span",{className:"wi-account-switch","data-open":Kr,"aria-hidden":"true",children:(0,k.jsx)(Tr,{size:20})})]}):(0,k.jsx)("div",{className:"wi-account-row",children:(0,k.jsx)("span",{className:"wi-account-name",children:p??"Account 1"})}),(0,k.jsxs)("button",{type:"button",className:"wi-address-row-btn",onClick:id,"aria-label":"Copy address","data-track":"address_copy",children:[(0,k.jsx)("span",{className:"wi-account-address",children:dr(m)}),(0,k.jsx)("span",{className:"wi-account-copy","data-copied":ar,children:ar?(0,k.jsx)(pn,{size:12}):(0,k.jsx)(Vn,{size:12})})]})]}),fd=(0,k.jsxs)(k.Fragment,{children:[n,P==="qr"?(0,k.jsx)("div",{className:"wi-sticky-header",children:(0,k.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,k.jsx)("button",{type:"button",className:"wi-header-back",onClick:uo,"aria-label":"Back",children:(0,k.jsx)(un,{size:24})}),(0,k.jsx)("span",{className:"wi-receive-title",children:"Receive"}),(0,k.jsx)("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close",children:(0,k.jsx)(jr,{size:24})})]})}):P==="send"||P==="bridge"||P==="token-detail"?null:Mg?(0,k.jsxs)("div",{className:"wi-sticky-header",children:[(0,k.jsxs)("div",{className:"wi-header wi-header--wallet wi-header--sub-account",children:[(0,k.jsx)("button",{type:"button",className:"wi-header-back",onClick:uo,"aria-label":"Back",children:(0,k.jsx)(un,{size:24})}),(0,k.jsx)("div",{className:"wi-account-block wi-account-block--sub-account",children:ud}),(0,k.jsx)("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close",children:(0,k.jsx)(jr,{size:24})})]}),(0,k.jsx)("hr",{className:"wi-divider"})]}):(0,k.jsxs)("div",{className:"wi-sticky-header",children:[(0,k.jsxs)("div",{className:"wi-header wi-header--wallet",children:[(0,k.jsxs)("div",{className:"wi-account-block",children:[(0,k.jsxs)("div",{className:"wi-avatar",children:[(0,k.jsx)("div",{className:"wi-avatar-fallback",style:sd}),Ba&&(0,k.jsx)("img",{src:Ba,alt:"",className:"wi-avatar-img",width:28,height:28,draggable:!1,onLoad:Oa,onError:T=>{T.currentTarget.style.display="none"}})]}),ud]}),(0,k.jsxs)("div",{className:"wi-header-actions",children:[g&&x&&(0,k.jsx)("button",{type:"button",className:"wi-header-action wi-header-action--qr",onClick:Yt,"aria-label":"Show QR code","data-track":"receive",children:(0,k.jsx)(Xa,{size:20})}),(0,k.jsx)("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close",children:(0,k.jsx)(jr,{size:24})})]})]}),(0,k.jsx)("hr",{className:"wi-divider"})]}),(0,k.jsxs)("div",{className:"wi-view-container",children:[P==="wallet"&&Rg,P==="qr"&&Eg,P==="portfolio"&&Sg,P==="send"&&Cg,P==="bridge"&&Tg,P==="token-detail"&&Ig]}),P==="wallet"&&Ze&&(0,k.jsx)("div",{className:"wi-action-toast",role:"status","aria-live":"polite",children:Ze}),P==="wallet"&&q&&(0,k.jsxs)("a",{className:"wi-send-toast",href:Sr??"#",target:"_blank",rel:"noopener noreferrer",onClick:T=>{if(!Sr){T.preventDefault();return}Qt(T,Sr,{category:"send",origin:"send-transaction",payload:{chainId:q.chainId,txHash:q.txHash}},ye)},children:[(0,k.jsx)("span",{className:"wi-send-toast-icon","data-status":q.status,"aria-hidden":!0,children:q.status==="pending"?(0,k.jsx)("span",{className:"wi-send-toast-spinner"}):q.status==="error"?(0,k.jsx)("span",{className:"wi-send-toast-error-dot"}):(0,k.jsx)(nc,{size:20})}),(0,k.jsxs)("span",{className:"wi-send-toast-copy",children:[(0,k.jsx)("span",{className:"wi-send-toast-title",children:q.status==="pending"?"Sending...":q.status==="error"?"Send failed":"Send complete"}),(0,k.jsx)("span",{className:"wi-send-toast-desc",children:q.status==="pending"||q.status==="error"?q.description:"Tap to see your transaction"})]})]}),pd&&P!=="portfolio"&&P!=="send"&&P!=="token-detail"&&(0,k.jsx)("div",{className:"wi-sticky-footer",children:(0,k.jsx)("div",{className:"wi-footer",ref:ur,children:pd})})]}),md={...A,...Or>0?{"--wi-footer-height":`${Or}px`}:null};return i?(0,k.jsx)(Ce,{feature:"wallet_info",children:(0,k.jsxs)(fa.Drawer.Portal,{children:[d&&(0,k.jsx)(fa.Drawer.Overlay,{className:"wi-drawer-overlay"}),(0,k.jsxs)(fa.Drawer.Content,{className:ze("wi-drawer-content",r),"data-theme":a,"data-vaul-no-drag":l==="left"||l==="right"?!0:void 0,style:md,"data-direction":l,"data-no-balance":!c||void 0,"data-has-footer":Or>0||void 0,"data-view":P,children:[(0,k.jsx)(fa.Drawer.Title,{className:"wi-sr-only",children:"My Wallet"}),fd]})]})}):(0,k.jsxs)(Ce,{feature:"wallet_info",children:[d&&s&&(0,k.jsx)("div",{className:"wi-drawer-overlay",onClick:R}),(0,k.jsx)(Gi.Portal,{children:(0,k.jsx)(Gi.Content,{align:e,sideOffset:t,className:ze("wi-popover-content",r),"data-theme":a,style:md,"data-no-balance":!c||void 0,"data-has-footer":Or>0||void 0,"data-view":P,children:fd})})]})}var Mf=V(require("react"),1);function Af({position:e="top",children:t}){let{setNavContent:r,setNavPosition:n}=Nn();return Mf.useEffect(()=>(r(t),n(e),()=>r(null)),[t,e,r,n]),null}var Lf=V(require("react"),1);function Df({children:e}){let{setFooterContent:t}=Nn();return Lf.useEffect(()=>(t(e),()=>t(null)),[e,t]),null}he(`[data-theme=dark].wi-popover-content,[data-theme=dark].wi-drawer-content{--wi-primary: var(--ds-system-orange-default, #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-system-orange-default, #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)}
12
12
  `);he(`.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}
13
13
  `);he(`@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}}
14
14
  `);he(`.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-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, #00d5aa);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-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-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-system-orange-default, #f0640d)}.wi-send-toast-spinner{width:18px;height:18px;border:2px solid rgba(255,159,33,.22);border-top-color:var(--ds-system-orange-on-inverted, #ff9f21);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-system-orange-on-inverted, #ff9f21)}.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}
15
15
  `);he(`.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, #019d92);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, #f0640d);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))}
16
16
  `);he(`.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}
17
- `);var _i=require("react/jsx-runtime");function Sw({env:e,theme:t="dark",mobileBreakpoint:r=768,drawerDirection:n,modal:o,showBalance:a=!1,showForgeToken:i=!1,showGameToken:s=!0,showQR:l=!0,showBridge:d=!0,qrLogoSrc:c,walletAddress:b,accountName:m,sendAccounts:g,profileImageUrl:y,connectorId:w,connectorName:f,connectorIconUrl:p,preferredTokens:x=[],onSelectWallet:h,onCopyAddress:v,onBuy:R,onBuyDisabledMessage:S,onBridgeDisabledMessage:T,onSendDisabledMessage:C,onDisconnect:N,disconnectLabel:E="Disconnect",termsUrl:M=$a,termsLabel:W="Terms of Service",privacyUrl:L=ei,privacyLabel:H="Privacy Policy",open:A,onOpenChange:O,showPortfolio:ce=!1,portfolioTitle:X="My Portfolio",portfolioSections:P,showTotalAssets:xe=!0,totalAssetsLabel:ne="Total Assets USD",sendTransaction:K,getTransactionReceipt:U,estimateGas:te,onOutlink:Z,lpBalanceReader:be,stakingRewardsReader:Ne,bridgeTokens:re,bridgeHistory:we,getBridgeQuote:Fe,getBridgeToTokens:Ae,getBridgeApproval:pt,approveBridge:ye,submitBridge:De,onReceive:ut,onBridge:Be,onSend:Ge,style:Ue,children:st}){let Ht=at(e),St=w?qo[w]:void 0,jt=f??St?.name,Ie=p??St?.iconUrl,Wt=xo(`(max-width: ${r}px)`),tt=n??(a?"right":"bottom"),At=tt==="left"||tt==="right",qe=o??!1,Xe=A!==void 0,[nr,Gt]=tr.useState(!1),Ye=Xe?A:nr,wt=tr.useCallback(ur=>{Xe||Gt(ur),O?.(ur)},[Xe,O]),rt=tr.useCallback(()=>wt(!1),[wt]);Cn(Ye,rt);let[_e,ft]=tr.useState(null),[Lt,je]=tr.useState("top"),[nt,qt]=tr.useState(null),[F,Je]=tr.useState("wallet"),[B,se]=tr.useState(null),[ve,Te]=tr.useState(null);tr.useEffect(()=>{Ye||(Je("wallet"),se(null),Te(null))},[Ye]),tr.useEffect(()=>{Gn(b)},[b]);let ot=tr.useCallback(()=>{Js(b),N?.()},[N,b]),or=tr.useMemo(()=>({env:Ht,theme:t,isMobile:Wt,open:Ye,drawerDirection:tt,modal:qe,showBalance:a,showForgeToken:i,showGameToken:s,showQR:l,showBridge:d,qrLogoSrc:c,walletAddress:b,accountName:m,sendAccounts:g,profileImageUrl:y,connectorName:jt,connectorIconUrl:Ie,preferredTokens:x,close:rt,onSelectWallet:h,onCopyAddress:v,onBuy:R,onBuyDisabledMessage:S,onBridgeDisabledMessage:T,onSendDisabledMessage:C,onDisconnect:N?ot:void 0,disconnectLabel:E,termsUrl:M,termsLabel:W,privacyUrl:L,privacyLabel:H,portalStyle:Ue,navContent:_e,navPosition:Lt,setNavContent:ft,setNavPosition:je,footerContent:nt,setFooterContent:qt,view:F,setView:Je,selectedSendToken:B,setSelectedSendToken:se,selectedDetailToken:ve,setSelectedDetailToken:Te,showPortfolio:ce,portfolioTitle:X,portfolioSections:P,showTotalAssets:xe,totalAssetsLabel:ne,sendTransaction:K,getTransactionReceipt:U,estimateGas:te,onOutlink:Z,lpBalanceReader:be,stakingRewardsReader:Ne,bridgeTokens:re,bridgeHistory:we,getBridgeQuote:Fe,getBridgeToTokens:Ae,getBridgeApproval:pt,approveBridge:ye,submitBridge:De,onReceive:ut,onBridge:Be,onSend:Ge}),[Ht,t,Wt,Ye,tt,qe,a,i,s,l,d,c,b,m,g,y,jt,Ie,x,rt,h,v,R,S,T,C,N,ot,E,M,W,L,H,Ue,_e,Lt,nt,F,B,ve,ce,X,P,xe,ne,K,U,te,Z,be,Ne,re,we,Fe,Ae,pt,ye,De,ut,Be,Ge]);return(0,_i.jsx)(qs.Provider,{value:or,children:Wt?(0,_i.jsx)(Bf.Drawer.Root,{direction:tt,open:Ye,onOpenChange:wt,handleOnly:At,noBodyStyles:!0,repositionInputs:!1,children:st},"drawer"):(0,_i.jsx)(Of.Root,{open:Ye,onOpenChange:wt,children:st},"popover")})}var no=Object.assign(Sw,{Trigger:Hc,Content:Mf,Nav:Lf,Footer:Pf});var Ve=V(require("react"),1);var ps=V(require("react"),1);var Hi=require("react"),Al=(0,Hi.createContext)(null);function ga(){let e=(0,Hi.useContext)(Al);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}var pm=V(require("react"),1);var Qi=require("react"),Vi=(0,Qi.createContext)(null);function Hr(){let e=(0,Qi.useContext)(Vi);if(!e)throw new Error("ResponsiveShell compound components must be used within <ResponsiveShell>");return e}var Ln=require("react");function zf(){let e=null,t=new Set;return{getSnapshot:()=>e,publish(r){if(r!==e){e=r;for(let n of[...t])n()}},subscribe(r){return t.add(r),()=>{t.delete(r)}}}}var Ll=(0,Ln.createContext)(null);function Cw(){let e=(0,Ln.useContext)(Ll);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}function Ff(){let e=Cw(),[t,r]=(0,Ln.useState)(e.getSnapshot);return(0,Ln.useLayoutEffect)(()=>(r(e.getSnapshot()),e.subscribe(()=>r(e.getSnapshot()))),[e]),t}he(`.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-system-orange-default, #5b5bf6);--rd-accent-contrast: var(--ds-system-orange-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-system-orange-default, #8181ff);--rd-accent-contrast: var(--ds-system-orange-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-system-orange-default, #5b5bf6);--rd-accent-contrast: var(--ds-system-orange-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}}
18
- `);var Ft=require("react/jsx-runtime");function Uf({minNotice:e,arrivalStatus:t}){let r=t.amount&&t.symbol?`${t.amount} ${t.symbol} arrived`:t.amount?`${t.amount} arrived`:void 0,n=(()=>{switch(t.phase){case"detected":if(e.remaining!==void 0){let o=`${e.remaining} ${e.symbol}`;return r?`${r} at the processing address. Waiting for ${o} more to reach the minimum.`:`Deposit detected. Waiting for ${o} more to reach the minimum.`}return r?`${r} 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 n?(0,Ft.jsxs)("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:[(0,Ft.jsx)("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),(0,Ft.jsx)("span",{children:n})]},`live:${t.phase}:${n}`):e.remaining!==void 0?(0,Ft.jsxs)("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:[(0,Ft.jsx)("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),(0,Ft.jsxs)("span",{children:["Waiting for"," ",(0,Ft.jsxs)("b",{children:[e.remaining," ",e.symbol]})," ","more to arrive at the processing address."]})]},`pending:${e.remaining}:${e.symbol}`):null}function jf({minNotice:e,onlySend:t,showWalletCreditNote:r=!1}){return(0,Ft.jsxs)("div",{className:"rd-checklist","data-rd-checklist":"",children:[(0,Ft.jsxs)("div",{className:"rd-checklist-row","data-rd-checklist-only":"",children:[(0,Ft.jsx)("span",{className:"rd-checklist-mark rd-checklist-mark-warn","aria-hidden":"true",children:"!"}),(0,Ft.jsxs)("span",{children:[(0,Ft.jsxs)("b",{children:[t.chainName," ",t.symbol," only"]})," \xB7 ",(0,Ft.jsxs)("b",{className:"rd-checklist-accent",children:[e.min," ",e.symbol," minimum"]})]})]}),(0,Ft.jsxs)("div",{className:"rd-checklist-row",children:[(0,Ft.jsx)("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u21BB"}),(0,Ft.jsx)("span",{children:"Reusable \u2014 deposit as many times as you like"})]}),r&&(0,Ft.jsxs)("div",{className:"rd-checklist-row rd-checklist-credit","data-rd-checklist-credit":"",children:[(0,Ft.jsx)("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u2192"}),(0,Ft.jsx)("span",{children:"Credited to your ONEchain wallet"})]})]})}var ao=require("react");var ha="0x0000000000000000000000000000000000000000",Nw=/^0x[0-9a-fA-F]{40}$/;function ht(e){return Nw.test(e)}function Zt(e,t){let r=e<0n,o=(r?-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 r?`-${s}`:s}function qi(e,t){let r=e.match(/^(-?)(\d+)(?:\.(\d+))?$/);if(!r)throw new Error(`parseUnits: invalid decimal string "${e}"`);let[,n,o,a=""]=r;if(a.length>t)throw new Error(`parseUnits: too many decimal places for ${t} decimals`);let i=BigInt(o+a.padEnd(t,"0"));return n==="-"?-i:i}var yn=require("react");var Dl="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTQwIDU0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc0MDAwXzM4NTkwKSI+CjxtYXNrIGlkPSJtYXNrMF83NDAwMF8zODU5MCIgc3R5bGU9Im1hc2stdHlwZTpsdW1pbmFuY2UiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjAiIHk9IjAiIHdpZHRoPSI1NDAiIGhlaWdodD0iNTQwIj4KPHBhdGggZD0iTTI3MCAwQzU2Ljg1NjMgMCAwIDU2Ljg1NjMgMCAyNzBDMCA0ODMuMTQ0IDU2Ljg1NjMgNTQwIDI3MCA1NDBDNDgzLjE0NCA1NDAgNTQwIDQ4My4xNDQgNTQwIDI3MEM1NDAgNTYuODU2MyA0ODMuMTQ0IDAgMjcwIDBaIiBmaWxsPSJ3aGl0ZSIvPgo8L21hc2s+CjxnIG1hc2s9InVybCgjbWFzazBfNzQwMDBfMzg1OTApIj4KPHBhdGggZD0iTTUzOS43MzEgMC4yNzA1MDhIMFY1NDAuMDAxSDUzOS43MzFWMC4yNzA1MDhaIiBmaWxsPSJ1cmwoI3BhaW50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HQsXU72hp+2TjLTB+7gMEjxm4kGN7cuQtMHzoIU2dTrywzKbzLTB44Ude5SbHRN0YpiuNfzltD0eR2OghRRuoOVnCsGHJM3ZKbPGDgJUuSGDa8qW09Sft5Nlsz0gQO4CFLEeb1ecgg11vySmT7YHNsHKQyj/TplrhWf6ARbMtMHG2Nrf9F1qV+7UFaQF2zITB9si42DFP6xfufizWRF+TAeMtMHW2LTIEU+rNwl+wsh70QjMn2wHTYMUuQfCjsWbSn7wFeEqIl/SmT6TMRW2CxIkf+gemaYjNC7JZHpg02wDTYKUrQ+rHVZxVJynXu0PJ8LmXPasZDnYANsgU2CFG0DhVdkCsKMm+J2JOZi5szcgxRt/SKnaPeCTiU3eqrS6r2KKHNjjkGK9of1Lu73r/W79OpQ2KXkHHk+o7G7CGNuKxLxXMbM2JkDc2FOQYoUAOx2049/l4Cd3UQs10mS60vhtfzsPBLxbMbE2BgjY2XMQYoU2UIavS+2XseiDaQQ+d4iovOpeB8W5WkM3YazDIQ7K/zsRn4Xv5PfzRgYC2MKUqSIs1tC4dWZZTl4UVtZ9q7HiUehi/h775H//4aI7z0OZ5LeVJvNw/fyM/wsn8Fn8Zl8Nr+D36Wvsp/if7BfCn8ECvocAAAAAElFTkSuQmCC";function Wf(e){switch(e.toUpperCase()){case"ONEUSD":return Dl;case"PONEUSD":return Tw;case"USDT":return Iw;case"USDC":return Ew;default:return}}var j=require("react/jsx-runtime");function Gf(e){let t=e.trim();return t?t.slice(0,2).toUpperCase():"?"}function Mw({size:e,bg:t,fg:r="#ffffff",children:n}){return(0,j.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:[(0,j.jsx)("circle",{cx:"12",cy:"12",r:"12",fill:t}),(0,j.jsx)("g",{fill:r,stroke:r,children:n})]})}function Pl({size:e,bg:t,fg:r="#ffffff",text:n}){return(0,j.jsx)(Mw,{size:e,bg:t,fg:r,children:(0,j.jsx)("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",fontSize:"10",fontWeight:700,fontFamily:"inherit",stroke:"none",fill:r,children:n})})}function Mo({size:e,viewBox:t="0 0 24 24",children:r}){return(0,j.jsx)("svg",{width:e,height:e,viewBox:t,"aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:r})}function Aw({size:e}){let t=(0,yn.useId)();return(0,j.jsxs)(Mo,{size:e,children:[(0,j.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,j.jsx)("path",{fill:"#000",d:"M24 0H0v24h24z"}),(0,j.jsx)("path",{fill:"#8FFCF3",d:"M12 4v5.912l5 2.237z"}),(0,j.jsx)("path",{fill:"#CABCF8",d:"m12 4-5 8.148 5-2.235z"}),(0,j.jsx)("path",{fill:"#CBA7F5",d:"M12 15.98V20l5-6.92z"}),(0,j.jsx)("path",{fill:"#74A0F3",d:"M12 20v-4.02l-5-2.9z"}),(0,j.jsx)("path",{fill:"#CBA7F5",d:"m12 15.049 5-2.9-5-2.236z"}),(0,j.jsx)("path",{fill:"#74A0F3",d:"m7 12.149 5 2.9V9.913z"}),(0,j.jsx)("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"}),(0,j.jsx)("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"})]}),(0,j.jsx)("defs",{children:(0,j.jsx)("clipPath",{id:t,children:(0,j.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function Lw({size:e}){let t=(0,yn.useId)();return(0,j.jsxs)(Mo,{size:e,children:[(0,j.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,j.jsx)("path",{fill:"#F0B90B",d:"M24 0H0v24h24z"}),(0,j.jsx)("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"})]}),(0,j.jsx)("defs",{children:(0,j.jsx)("clipPath",{id:t,children:(0,j.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function Dw({size:e}){let t=(0,yn.useId)();return(0,j.jsxs)(Mo,{size:e,viewBox:"0 0 111 111",children:[(0,j.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,j.jsx)("path",{fill:"#fff",d:"M0 0h111v111H0z"}),(0,j.jsx)("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"})]}),(0,j.jsx)("defs",{children:(0,j.jsx)("clipPath",{id:t,children:(0,j.jsx)("path",{fill:"#fff",d:"M0 0h111v111H0z"})})})]})}function Pw({size:e}){let t=(0,yn.useId)();return(0,j.jsxs)(Mo,{size:e,children:[(0,j.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,j.jsx)("path",{fill:"#213147",d:"M24 0H0v24h24z"}),(0,j.jsx)("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"}),(0,j.jsx)("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"}),(0,j.jsx)("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"}),(0,j.jsx)("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"})]}),(0,j.jsx)("defs",{children:(0,j.jsx)("clipPath",{id:t,children:(0,j.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function Ow({size:e}){let t=(0,yn.useId)(),r=(0,yn.useId)();return(0,j.jsxs)(Mo,{size:e,children:[(0,j.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,j.jsx)("path",{fill:`url(#${r})`,d:"M24 0H0v24h24z"}),(0,j.jsx)("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"})]}),(0,j.jsxs)("defs",{children:[(0,j.jsxs)("linearGradient",{id:r,x1:"3.948",x2:"19.217",y1:"16.617",y2:"7.645",gradientUnits:"userSpaceOnUse",children:[(0,j.jsx)("stop",{stopColor:"#A726C1"}),(0,j.jsx)("stop",{offset:".88",stopColor:"#803BDF"}),(0,j.jsx)("stop",{offset:"1",stopColor:"#7B3FE4"})]}),(0,j.jsx)("clipPath",{id:t,children:(0,j.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function Bw({size:e}){let t=(0,yn.useId)(),r=(0,yn.useId)();return(0,j.jsxs)(Mo,{size:e,children:[(0,j.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,j.jsx)("path",{fill:`url(#${r})`,d:"M24 0H0v24h24z"}),(0,j.jsx)("path",{fill:"#fff",d:"M17.7 8.358a.55.55 0 0 1-.365.145H4.515c-.455 0-.684-.52-.37-.825l2.106-2.03a.54.54 0 0 1 .364-.15h12.87c.46 0 .685.524.365.83zm0 10.005c-.1.09-.23.14-.365.14H4.515c-.455 0-.684-.516-.37-.82l2.106-2.036a.53.53 0 0 1 .364-.145h12.87c.46 0 .685.52.365.825zm0-7.72a.55.55 0 0 0-.365-.14H4.515c-.455 0-.684.515-.37.82l2.106 2.035c.1.091.23.143.364.144h12.87c.46 0 .685-.52.365-.824z"})]}),(0,j.jsxs)("defs",{children:[(0,j.jsxs)("linearGradient",{id:r,x1:"4.001",x2:"20.408",y1:"50.258",y2:"50.108",gradientUnits:"userSpaceOnUse",children:[(0,j.jsx)("stop",{stopColor:"#599DB0"}),(0,j.jsx)("stop",{offset:"1",stopColor:"#47F8C3"})]}),(0,j.jsx)("clipPath",{id:t,children:(0,j.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function Yi({chainId:e,chainName:t,size:r=20}){switch(e){case 1:return(0,j.jsx)(Aw,{size:r});case 56:return(0,j.jsx)(Lw,{size:r});case 8453:return(0,j.jsx)(Dw,{size:r});case 42161:return(0,j.jsx)(Pw,{size:r});case 137:return(0,j.jsx)(Ow,{size:r});case 792703809:return(0,j.jsx)(Bw,{size:r});case 612055:return(0,j.jsx)(Pl,{size:r,bg:"#0b1f3a",text:"CR"});default:return(0,j.jsx)(Pl,{size:r,bg:"#676b7a",text:Gf(t??String(e))})}}function oo({symbol:e,logoUrl:t,size:r=20}){let n=t&&t.trim().length>0?t.trim():Wf(e);return n?(0,j.jsx)("img",{src:n,alt:"","aria-hidden":"true",width:r,height:r,style:{display:"block",flex:"none",borderRadius:"50%",objectFit:"cover"}}):(0,j.jsx)(Pl,{size:r,bg:"#676b7a",text:Gf(e)})}var _f=require("qrcode.react"),ue=require("react/jsx-runtime");function Ki(){return(0,ue.jsxs)("div",{className:"rd-deposit-head","data-testid":"rd-address-skeleton","aria-hidden":"true",children:[(0,ue.jsx)("span",{className:"rd-skeleton rd-skeleton-qr"}),(0,ue.jsx)("span",{className:"rd-skeleton rd-skeleton-address"})]})}function zw(e){let{depositAddress:t,originChainId:r,originCurrency:n,amountWei:o,isNative:a}=e;if(a)return o!==void 0?`ethereum:${t}@${r}?value=${o.toString()}`:`ethereum:${t}@${r}`;let i=new URLSearchParams({address:t});return o!==void 0&&i.set("uint256",o.toString()),`ethereum:${n}@${r}/transfer?${i.toString()}`}function Fw(e){let{depositAddress:t,splMint:r,humanAmount:n}=e,o=new URLSearchParams;return n&&o.set("amount",n),o.set("spl-token",r),`solana:${t}?${o.toString()}`}function Hf({depositAddress:e,originChainId:t,originChainName:r,originCurrency:n,amount:o,tokenSymbol:a,tokenDecimals:i,kind:s="evm",depositState:l,onDeposit:d,canDeposit:c,oneClickEnabled:b=!0}){let[m,g]=(0,ao.useState)(!1),[y,w]=(0,ao.useState)("address"),f=(0,ao.useId)();(0,ao.useEffect)(()=>{w("address")},[e]);let p=n.toLowerCase()===ha,x=s==="svm";async function h(){try{await navigator.clipboard.writeText(e),g(!0),setTimeout(()=>g(!1),1500)}catch{}}let v;if(o)try{let A=BigInt(o);A>0n&&(v=A)}catch{}let R=v!==void 0,S;if(R)try{S=Zt(v,i)}catch{S=o}let T=x?Fw({depositAddress:e,splMint:n,humanAmount:S??""}):zw({depositAddress:e,originChainId:t,originCurrency:n,amountWei:v,isNative:p}),{isSubmitting:C,isConfirming:N,isConfirmed:E,needsSwitch:M,txHash:W,reverted:L,error:H}=l;return(0,ue.jsxs)("section",{className:"rd-stack",children:[(0,ue.jsxs)("div",{className:"rd-deposit-head","data-compact-view":y,children:[(0,ue.jsxs)("div",{className:"rd-deposit-qr-pane",children:[(0,ue.jsxs)("div",{className:"rd-deposit-qr",children:[(0,ue.jsx)(_f.QRCodeSVG,{value:T,size:144,level:"H"}),(0,ue.jsx)("span",{className:"rd-deposit-qr-badge","aria-hidden":"true",children:(0,ue.jsx)(Yi,{chainId:t,chainName:r,size:28})})]}),(0,ue.jsx)("button",{type:"button",className:"rd-mobile-address-toggle","aria-label":"Show address and copy",onClick:()=>w("address"),children:(0,ue.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,ue.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2.25",stroke:"currentColor",strokeWidth:"1.8"}),(0,ue.jsx)("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"})]})})]}),(0,ue.jsxs)("div",{className:"rd-deposit-address",children:[(0,ue.jsx)("span",{className:"rd-deposit-address-label",children:(0,ue.jsxs)("button",{type:"button",className:"rd-address-term","aria-describedby":f,children:["Deposit address",(0,ue.jsx)("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."})]})}),(0,ue.jsx)("button",{type:"button",className:"rd-mobile-qr-toggle","aria-label":"Show deposit QR code","aria-pressed":y==="qr",onClick:()=>w("qr"),children:(0,ue.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:(0,ue.jsx)("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"})})}),(0,ue.jsx)("span",{className:"rd-address-full",title:e,children:e}),(0,ue.jsxs)("button",{type:"button",className:"rd-address-copy",onClick:h,"aria-label":`Copy deposit address ${e}`,children:[m?(0,ue.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,ue.jsx)("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,ue.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,ue.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),(0,ue.jsx)("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"})]}),(0,ue.jsx)("span",{"aria-live":"polite",children:m?"Copied":"Copy address"})]})]})]}),!x&&c&&(0,ue.jsxs)(ue.Fragment,{children:[(0,ue.jsx)("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?M?"Switching network...":"Confirm in wallet...":`One-click deposit ${a}${M?` (switch to ${r})`:""}`}),H&&(0,ue.jsx)("div",{className:"rd-callout rd-callout-danger",children:H}),W&&(0,ue.jsxs)("p",{className:"rd-card-hint",children:["Tx: ",(0,ue.jsx)("span",{style:{fontFamily:"monospace"},children:W})]}),E&&L&&(0,ue.jsx)("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),E&&!L&&(0,ue.jsx)("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."})]}),x&&(0,ue.jsxs)("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"," ",R?(0,ue.jsxs)(ue.Fragment,{children:["exactly"," ",(0,ue.jsxs)("strong",{children:[S," ",a]})]}):(0,ue.jsxs)(ue.Fragment,{children:["any amount of ",(0,ue.jsx)("strong",{children:a})]}),"."]}),(R||!x&&!c&&b)&&(0,ue.jsxs)("p",{className:"rd-card-hint",children:[R&&(0,ue.jsxs)(ue.Fragment,{children:["Send exactly"," ",(0,ue.jsxs)("strong",{children:[S," ",a]})," ","on ",r," to this address."]}),!x&&!c&&b&&!R&&"Enter an amount to deposit in one click."]})]})}var Qr=require("react"),Dn=V(require("@radix-ui/react-popover"),1);var rr=require("react/jsx-runtime");function ba({value:e,options:t,onChange:r,disabled:n,ariaLabel:o,id:a}){let i=(0,Qr.useId)(),s=a??i,l=`${s}-listbox`,[d,c]=(0,Qr.useState)(!1),b=t.findIndex(E=>E.value===e),[m,g]=(0,Qr.useState)(b>=0?b:0),y=(0,Qr.useRef)(null),w=(0,Qr.useRef)([]),f=!!n||t.length===0,p=b>=0?t[b]:void 0;(0,Qr.useEffect)(()=>{d&&w.current[m]?.scrollIntoView?.({block:"nearest"})},[d,m]);let[x,h]=(0,Qr.useState)(null);function v(){f||(h(y.current?.closest("[data-theme]")?.getAttribute("data-theme")??null),g(b>=0?b:0),c(!0))}function R(E){c(!1),E&&y.current?.focus()}function S(E){let M=t[E];M&&(r(M.value),R(!0))}function T(){f||(d?R(!1):v())}function C(E){if(!f)switch(E.key){case"ArrowDown":E.preventDefault(),d?g(M=>Math.min(M+1,t.length-1)):v();break;case"ArrowUp":E.preventDefault(),d?g(M=>Math.max(M-1,0)):v();break;case"Enter":case" ":E.preventDefault(),d?S(m):v();break;case"Escape":d&&(E.preventDefault(),R(!0));break;case"Tab":d&&c(!1);break;default:break}}let N=d&&t[m]?`${s}-option-${m}`:void 0;return(0,rr.jsx)(Dn.Root,{open:d,onOpenChange:E=>E?v():R(!1),children:(0,rr.jsxs)("div",{className:"rd-dropdown",children:[(0,rr.jsx)(Dn.Trigger,{asChild:!0,children:(0,rr.jsxs)("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:T,onKeyDown:C,children:[(0,rr.jsxs)("span",{className:"rd-dropdown-trigger-content",children:[p?.icon,(0,rr.jsxs)("span",{className:"rd-dropdown-trigger-label",children:[p?.label??"",p?.subLabel&&(0,rr.jsx)("small",{className:"rd-dropdown-trigger-sub",children:p.subLabel})]})]}),(0,rr.jsx)("span",{className:"rd-dropdown-chevron","aria-hidden":"true",children:(0,rr.jsx)(Tr,{size:16})})]})}),d&&(0,rr.jsx)(Dn.Portal,{children:(0,rr.jsx)(Dn.Content,{className:"rd-dropdown-popover","data-theme":x??void 0,side:"bottom",align:"start",sideOffset:5,collisionPadding:12,onOpenAutoFocus:E=>E.preventDefault(),onCloseAutoFocus:E=>E.preventDefault(),children:(0,rr.jsx)("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 W=E.value===e,L=M===m;return(0,rr.jsxs)("li",{id:`${s}-option-${M}`,role:"option","aria-selected":W,ref:H=>{w.current[M]=H},className:["rd-dropdown-option",L?"rd-dropdown-option-active":"",W?"rd-dropdown-option-selected":""].filter(Boolean).join(" "),onPointerEnter:()=>g(M),onClick:H=>{H.preventDefault(),S(M)},children:[E.icon,(0,rr.jsx)("span",{className:"rd-dropdown-option-label",children:E.label}),W&&(0,rr.jsx)("span",{className:"rd-dropdown-option-check","aria-hidden":"true",children:"\u2713"})]},E.value)})})})})]})})}var bt=require("react/jsx-runtime");function Uw(e,t){if(!e)return"--";try{return Zt(BigInt(e),t)}catch{return"--"}}function Qf({quote:e,isLoading:t,error:r,humanAmount:n,originSymbol:o,destination:a}){return(0,bt.jsxs)("div",{className:"rd-stack","data-rd-quote-preview":"",children:[t&&(0,bt.jsxs)("div",{className:"rd-quote-strip","data-testid":"rd-quote-skeleton",children:[(0,bt.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"}),(0,bt.jsx)("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),(0,bt.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"})]}),!t&&r&&(0,bt.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a quote: ",r.message]}),!t&&!r&&e&&o&&(0,bt.jsxs)(bt.Fragment,{children:[(0,bt.jsxs)("div",{className:"rd-quote-strip",children:[(0,bt.jsxs)("span",{className:"rd-quote-strip-side",children:[(0,bt.jsxs)("b",{children:[n," ",o]}),(0,bt.jsx)("small",{children:"You send"})]}),(0,bt.jsx)("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),(0,bt.jsxs)("span",{className:"rd-quote-strip-side rd-quote-strip-end",children:[(0,bt.jsxs)("b",{children:["~",Uw(e.expectedCrossd,a.decimals)," ",a.symbol]}),(0,bt.jsx)("small",{children:"You receive"})]})]}),e.belowMin&&(0,bt.jsx)("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)&&(0,bt.jsxs)("p",{className:"rd-quote-strip-hint",children:[e.feeUsd&&(0,bt.jsxs)(bt.Fragment,{children:["Bridge fee: $",e.feeUsd,", already deducted from the amount above. You also pay your own network fee to send the deposit."," "]}),e.assumesParity&&(0,bt.jsxs)(bt.Fragment,{children:["Assumes 1:1 parity between bridged USDT and ",a.symbol,"; the final amount may differ slightly."]})]})]}),!t&&!r&&!e&&(0,bt.jsx)("p",{className:"rd-muted",children:"Enter an amount to see a quote."})]})}var Ol=require("react");var Vf={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 qf(e,t){let r=Vf[e];if(!(!r||!t))return{url:`${r.base}/token/${t}`,name:r.name}}var jw={1:"Ethereum",56:"BNB Smart Chain",137:"Polygon",8453:"Base",42161:"Arbitrum",612055:"ONEchain",792703809:"Solana"};function Ao(e){return jw[e]??`Chain ${e}`}function Zi(e,t){let r=Vf[e];if(!(!r||!t))return{url:`${r.base}/tx/${t}`,name:r.name}}var Mt=require("react/jsx-runtime");function Ww(e){let t=new Map;for(let r of e.origins)t.has(r.chainId)||t.set(r.chainId,r.chainName);return Array.from(t,([r,n])=>({chainId:r,chainName:n}))}function Yf(e,t){return t===void 0?[]:e.origins.filter(r=>r.chainId===t)}function Gw(e,t){let r=Zt(e,t),n=r.indexOf(".");return n===-1?r:`${r.slice(0,n)}.${r.slice(n+1,n+1+4)}`.replace(/\.?0+$/,"")||r.slice(0,n)}function Kf({catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:a=!0,balance:i,balanceLoading:s,insufficientBalance:l,onMax:d,disabled:c}){let b=(0,Ol.useMemo)(()=>Ww(e),[e]),m=(0,Ol.useMemo)(()=>Yf(e,t?.chainId),[e,t?.chainId]);function g(p){let x=Number(p),h=Yf(e,x)[0];h&&r(h)}function y(p){let x=m.find(h=>h.token.address.toLowerCase()===p.toLowerCase());x&&r(x)}let w=i?`${Gw(i.value,i.decimals)} ${i.symbol}`:void 0,f=l?`Amount exceeds your balance${w?` (${w})`:""}`:void 0;return(0,Mt.jsxs)("section",{className:"rd-stack","data-rd-source-form":"",children:[(0,Mt.jsxs)("div",{className:"rd-field",children:[(0,Mt.jsxs)("div",{className:"rd-field-label-row",children:[(0,Mt.jsx)("span",{className:"rd-field-label",children:"From"}),t&&(()=>{let p=qf(t.chainId,t.token.address);return p?(0,Mt.jsxs)("a",{className:"rd-token-explorer-link",href:p.url,target:"_blank",rel:"noopener noreferrer",title:`View ${t.token.symbol} on ${p.name}`,children:[p.name," \u2197"]}):null})()]}),(0,Mt.jsxs)("div",{className:"rd-field-row",children:[(0,Mt.jsx)(ba,{ariaLabel:"Origin chain",value:t?String(t.chainId):"",onChange:g,disabled:c,options:b.map(p=>({value:String(p.chainId),label:p.chainName,subLabel:"Network",icon:(0,Mt.jsx)(Yi,{chainId:p.chainId,chainName:p.chainName,size:22})}))}),(0,Mt.jsx)(ba,{ariaLabel:"Token",value:t?.token.address??"",onChange:y,disabled:c||m.length===0,options:m.map(p=>({value:p.token.address,label:p.token.symbol,subLabel:`${p.token.decimals} decimals`,icon:(0,Mt.jsx)(oo,{symbol:p.token.symbol,logoUrl:p.token.logoUrl,size:22})}))})]})]}),a&&(0,Mt.jsxs)("label",{className:"rd-field",children:[(0,Mt.jsx)("span",{className:"rd-field-label",children:"Amount (optional)"}),(0,Mt.jsxs)("div",{className:"rd-amount-input","data-rd-invalid":f?"":void 0,children:[(0,Mt.jsx)("input",{type:"text",inputMode:"decimal",placeholder:"0.0",value:n,onChange:p=>{let x=p.target.value;if(x===""){o(x);return}x.startsWith(".")&&(x=`0${x}`),/^\d*\.?\d{0,4}$/.test(x)&&(x=x.replace(/^0+(?=\d)/,""),!((x.split(".")[0]??"").length>12)&&o(x))},disabled:c||!t,"data-vaul-no-drag":!0}),t&&(0,Mt.jsx)("span",{className:"rd-amount-input-suffix",children:t.token.symbol}),d&&!c&&(0,Mt.jsx)("button",{type:"button",className:"rd-amount-input-max",onClick:d,disabled:c||!t,children:"Max"})]}),(w||s)&&(0,Mt.jsxs)("span",{className:"rd-amount-meta",children:[(0,Mt.jsx)("span",{}),(0,Mt.jsx)("span",{children:s?"Balance: \u2026":w?`Balance: ${w}`:""})]}),f&&(0,Mt.jsx)("span",{className:"rd-callout rd-callout-danger",children:f})]})]})}var de=require("react/jsx-runtime");function Zf({catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:a,minNotice:i,amountHint:s,onMax:l,recipient:d,onChangeRecipient:c,showRecipientInput:b,recipientValid:m,balance:g,balanceLoading:y,insufficientBalance:w,targetOptions:f,selectedTarget:p,onChangeTarget:x,showTargetSelector:h,quote:v,quoteLoading:R,quoteError:S,depositAddress:T,depositAddressLoading:C,depositAddressError:N,arrivalStatus:E,amountSmallestUnits:M,depositState:W,onDeposit:L,canDeposit:H,oneClickEnabled:A,locked:O,onRequestConnect:ce}){let X=f.length>1&&h,{phase:P,isSubmitting:xe,isConfirming:ne,isConfirmed:K,needsSwitch:U,reverted:te,error:Z}=W,be=p?.symbol??e.destination.symbol;return(0,de.jsxs)(de.Fragment,{children:[i&&(0,de.jsx)(Uf,{minNotice:i,arrivalStatus:E}),O?(0,de.jsxs)("section",{className:"rd-locked-card","data-rd-locked":"",children:[(0,de.jsx)("span",{className:"rd-locked-glyph","aria-hidden":"true",children:(0,de.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,de.jsx)("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"}),(0,de.jsx)("path",{d:"M4 9h15",stroke:"currentColor",strokeWidth:"1.7"}),(0,de.jsx)("path",{d:"M15 11.5h5v4h-5a2 2 0 0 1 0-4Z",fill:"currentColor",opacity:"0.18",stroke:"currentColor",strokeWidth:"1.5"}),(0,de.jsx)("circle",{cx:"15.7",cy:"13.5",r:"0.8",fill:"currentColor"})]})}),(0,de.jsx)("h3",{className:"rd-locked-title",children:"Connect your wallet"}),(0,de.jsx)("p",{className:"rd-locked-text",children:"Connect to get your personal deposit address."}),b&&(0,de.jsx)("p",{className:"rd-card-hint",children:"Or enter a recipient address to get one without connecting."}),ce&&(0,de.jsxs)("button",{type:"button",className:"rd-button-primary rd-locked-action","data-track":"connect",onClick:ce,children:[(0,de.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,de.jsx)("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"}),(0,de.jsx)("path",{d:"M15 10.5h5v4h-5a2 2 0 0 1 0-4Z",stroke:"currentColor",strokeWidth:"1.8"})]}),"Connect Wallet"]})]}):T?(0,de.jsx)(Hf,{depositAddress:T,originChainId:t.chainId,originChainName:t.chainName,originCurrency:t.token.address,amount:M,tokenSymbol:t.token.symbol,tokenDecimals:t.token.decimals,depositState:W,onDeposit:L,canDeposit:H,oneClickEnabled:A}):C?(0,de.jsxs)(de.Fragment,{children:[(0,de.jsx)(Ki,{}),A&&M&&(0,de.jsx)("span",{className:"rd-skeleton rd-skeleton-cta","aria-hidden":"true"}),(0,de.jsx)("p",{className:"rd-sr-only",role:"status",children:"Preparing your deposit address..."})]}):N?(0,de.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a deposit address: ",N.message]}):null,(0,de.jsx)(Kf,{catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:a,balance:g,balanceLoading:y,insufficientBalance:w,onMax:l}),(0,de.jsxs)("div",{className:"rd-field","data-rd-delivery":"",children:[(0,de.jsx)("span",{className:"rd-field-label",children:"Deliver as"}),X?(0,de.jsx)(ba,{ariaLabel:"Delivery token",value:p?.symbol??"",onChange:x,options:f.map(Ne=>({value:Ne.symbol,label:Ne.symbol,subLabel:"on ONEchain",icon:(0,de.jsx)(oo,{symbol:Ne.symbol,size:22})}))}):(0,de.jsxs)("div",{className:"rd-static-target",children:[(0,de.jsx)(oo,{symbol:be,size:22}),(0,de.jsx)("span",{children:be})]}),b&&(0,de.jsxs)("label",{className:"rd-delivery-recipient",children:[(0,de.jsx)("input",{type:"text",placeholder:"0x...","aria-label":"ONEchain recipient address",value:d,onChange:Ne=>c(Ne.target.value),"data-vaul-no-drag":!0}),(0,de.jsx)("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."}),!m&&(0,de.jsx)("span",{className:"rd-callout rd-callout-danger",children:"Not a valid address"})]})]}),p?.external&&(0,de.jsxs)("div",{className:"rd-callout rd-callout-muted",children:["Delivered as ",p.symbol," via an external adapter."]}),s&&(0,de.jsx)("div",{className:"rd-callout rd-callout-warning","data-rd-amount-hint":"",children:s}),n.trim()&&(0,de.jsx)(Qf,{quote:v,isLoading:R,error:S,humanAmount:n,originSymbol:t.token.symbol,destination:e.destination}),i&&(0,de.jsx)(jf,{minNotice:i,onlySend:{symbol:t.token.symbol,chainName:t.chainName},showWalletCreditNote:!b&&m}),A&&P!=="idle"&&!H&&(0,de.jsxs)("div",{className:"rd-card",children:[xe&&(0,de.jsxs)("p",{className:"rd-muted",children:[(0,de.jsx)("span",{className:"rd-spinner"})," ",U?"Switching network...":"Confirm in wallet..."]}),ne&&(0,de.jsxs)("p",{className:"rd-muted",children:[(0,de.jsx)("span",{className:"rd-spinner"})," Confirming..."]}),W.txHash&&(0,de.jsxs)("p",{className:"rd-card-hint",children:["Tx: ",(0,de.jsx)("span",{style:{fontFamily:"monospace"},children:W.txHash})]}),K&&te&&(0,de.jsx)("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),K&&!te&&(0,de.jsx)("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."}),Z&&(0,de.jsx)("div",{className:"rd-callout rd-callout-danger",children:Z})]})]})}var Vr=require("react"),Jf=require("react-dom");var Q=require("react/jsx-runtime");function ya({requiresIdentity:e=!1}){return(0,Q.jsxs)("div",{className:"rd-history-empty",role:"status","data-variant":e?"disconnected":"empty","data-testid":e?"rd-history-empty-state":"rd-history-no-transfers",children:[(0,Q.jsx)("span",{className:"rd-history-empty-icon","aria-hidden":"true",children:(0,Q.jsxs)("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,Q.jsx)("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"}),(0,Q.jsx)("path",{d:"M14 3.8V7h3",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"}),(0,Q.jsx)("circle",{cx:"16.5",cy:"16.5",r:"3.7",stroke:"currentColor",strokeWidth:"1.7"}),(0,Q.jsx)("path",{d:"M16.5 14.5v2.2l1.4.8",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,Q.jsx)("h3",{className:"rd-history-empty-title",children:e?"Connect to view history":"No transfers yet"}),(0,Q.jsx)("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&&(0,Q.jsxs)("span",{className:"rd-history-empty-live",children:[(0,Q.jsx)("span",{"aria-hidden":"true"}),"Updates automatically"]})]})}var wa=56;function $f(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function _w(e){let t=e.trim().toUpperCase(),n={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(n)return n;let o=t.toLowerCase().replace(/_/g," ").trim();return o?`${o[0].toUpperCase()}${o.slice(1)}`:"Processing"}function Hw(e){return e==="COMPLETED"?"rd-status-pill rd-status-pill-success":$f(e)?"rd-status-pill rd-status-pill-failure":"rd-status-pill"}function Xi(e,t){if(e){if(t===void 0)return e;try{return Zt(BigInt(e),t)}catch{return e}}}function Qw(e,t=4){let r=e.indexOf(".");if(r<0)return e;let n=e.slice(0,r+1+t).replace(/0+$/,"").replace(/\.$/,"");return n===""?"0":n}function Vw(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Xf(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function Bl({amount:e,symbol:t,className:r}){let n=e?`${e}${t?` ${t}`:""}`:"",o=(0,Vr.useId)(),a=(0,Vr.useRef)(null),i=(0,Vr.useRef)(null),[s,l]=(0,Vr.useState)(!1),[d,c]=(0,Vr.useState)({top:-9999,left:-9999,visibility:"hidden"});return(0,Vr.useEffect)(()=>{if(!s)return;let b=()=>{let m=a.current,g=i.current;if(!m||!g)return;let y=m.getBoundingClientRect(),w=g.getBoundingClientRect(),f=12,p=8,x=Math.max(f,window.innerWidth-w.width-f),h=Math.min(Math.max(y.left+y.width/2-w.width/2,f),x),v=y.top-w.height-p,R=v>=f?v:y.bottom+p,S=Math.max(f,window.innerHeight-w.height-f),T=Math.min(Math.max(R,f),S),C=window.getComputedStyle(m);c({top:T,left:h,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?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)("span",{ref:a,className:r,"aria-label":n,"aria-describedby":s?o:void 0,"data-full-value":n,onMouseEnter:()=>{c({top:-9999,left:-9999,visibility:"hidden"}),l(!0)},onMouseLeave:()=>l(!1),children:[Qw(e),t?` ${t}`:""]}),s&&typeof document<"u"&&(0,Jf.createPortal)((0,Q.jsx)("span",{ref:i,id:o,role:"tooltip","data-rd-history-floating-tooltip":"",style:d,children:n}),document.body)]}):(0,Q.jsx)("span",{className:r,children:"-"})}function qw(e){let t=(e.deposits??[]).filter(n=>n.originChainId),r=new Set(t.map(n=>`${n.originChainId}:${(n.originCurrency??"").toLowerCase()}`));if(t.length>0){let n=t[0];return{chainId:n.originChainId,currency:n.originCurrency??"",routes:r.size}}return{chainId:e.originChainId,currency:e.originCurrency,routes:1}}function Yw(e,t){if(!e)return;let r,n;try{r=BigInt(e),n=t.map(s=>BigInt(s.amount))}catch{return}let o=n.reduce((s,l)=>s+l,0n);if(o<=0n)return;let a=n.map(s=>r*s/o),i=a.reduce((s,l)=>s+l,0n);return a[a.length-1]+=r-i,a}function Ji({label:e,chainId:t,txHash:r,amount:n,shared:o,missingLabel:a="Pending"}){let i=r?Zi(t,r):void 0;return(0,Q.jsxs)("div",{className:"rd-history-step",children:[(0,Q.jsx)("span",{className:`rd-history-step-dot${r?" rd-history-step-dot-done":""}`}),(0,Q.jsx)("span",{className:"rd-history-step-label",children:e}),(0,Q.jsx)("span",{className:"rd-history-step-chain",children:Ao(t)}),n&&(0,Q.jsx)(Bl,{amount:n,className:"rd-history-step-amount"}),(0,Q.jsxs)("span",{className:"rd-history-step-tx",children:[i?(0,Q.jsx)("a",{href:i.url,target:"_blank",rel:"noreferrer",title:r,"aria-label":`${e} transaction on ${Ao(t)}`,children:Xf(r)}):r?(0,Q.jsx)("span",{title:r,children:Xf(r)}):(0,Q.jsx)("span",{className:"rd-muted",children:a}),o&&r&&(0,Q.jsx)("span",{className:"rd-history-step-shared",title:"Shared by deposits processed together",children:"combined transfer"})]})]})}function Kw(e){let t=e.deposits??[],r=e.amountOut||e.expectedOut||void 0;if(t.length>=2){let i=Yw(r,t);if(i)return t.map((s,l)=>({key:`${e.orderId}:${s.txHash}:${s.blockNumber}`,order:e,chainId:s.originChainId??wa,currency:s.originCurrency??"",routes:1,sentRaw:s.amount,receivedRaw:i[l].toString(),receivedIsEstimate:!0,deposit:s,sharedLegs:!0}))}let{chainId:n,currency:o,routes:a}=qw(e);return[{key:e.orderId,order:e,chainId:n,currency:o,routes:a,sentRaw:e.amountIn,receivedRaw:r,receivedIsEstimate:!e.amountOut&&!!e.expectedOut,sharedLegs:!1}]}function $i({orders:e,isLoading:t,error:r,catalog:n,showTitle:o=!0}){let[a,i]=(0,Vr.useState)({}),s=l=>i(d=>({...d,[l]:!d[l]}));return(0,Q.jsxs)("section",{className:o?"rd-card":"rd-stack","data-rd-orders-list":"",children:[o&&(0,Q.jsx)("div",{className:"rd-card-header",children:(0,Q.jsx)("h2",{className:"rd-card-title",children:"Transfer history"})}),t&&e.length===0&&(0,Q.jsxs)("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[(0,Q.jsx)("span",{className:"rd-spinner"})," Loading orders..."]}),r&&(0,Q.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load your orders: ",r.message]}),!t&&!r&&e.length===0&&(0,Q.jsx)(ya,{}),e.length>0&&(0,Q.jsx)("div",{className:"rd-history-table","data-vaul-no-drag":!0,children:e.flatMap(Kw).map(l=>{let{order:d}=l,c=n?.origins.find(N=>N.chainId===l.chainId&&N.token.address.toLowerCase()===l.currency.toLowerCase()),b=(d.target?n?.targets.find(N=>N.symbol.toLowerCase()===d.target.toLowerCase()):void 0)??n?.targets.find(N=>N.isDefault),m=b?.symbol??n?.destination.symbol??"",g=b?.decimals??n?.destination.decimals,y=n?.origins.find(N=>N.chainId===wa),w=Xi(l.sentRaw,y?.token.decimals),f=y?.token.symbol??"USDT",p=Xi(l.receivedRaw,g),x=d.deposits??[],h=!!a[l.key],v=Vw(d.completedAt??d.createdAt),R=_w(d.status),T=d.status==="COMPLETED"||$f(d.status)?"Details unavailable":"Pending",C=l.receivedIsEstimate?"Estimated on ONEchain":"Received on ONEchain";return(0,Q.jsxs)("div",{className:"rd-history-group",children:[(0,Q.jsxs)("button",{type:"button",className:"rd-history-row-button",onClick:()=>s(l.key),"aria-expanded":h,"aria-label":`Toggle transfer details: ${R}, ${v}`,children:[(0,Q.jsxs)("span",{className:"rd-history-card-top",children:[(0,Q.jsx)("span",{className:"rd-history-asset",children:l.routes>1?(0,Q.jsxs)(Q.Fragment,{children:["Multiple deposits ",(0,Q.jsxs)("span",{className:"rd-muted",children:["\xB7 ",l.routes," chains"]})]}):(0,Q.jsxs)(Q.Fragment,{children:[c?.token.symbol??m," ",(0,Q.jsxs)("span",{className:"rd-muted",children:["from ",Ao(l.chainId)]})]})}),(0,Q.jsx)("span",{className:Hw(d.status),title:d.status,children:R})]}),(0,Q.jsxs)("span",{className:"rd-history-card-amounts",children:[(0,Q.jsxs)("span",{className:"rd-history-amount-block",children:[(0,Q.jsx)("span",{className:"rd-history-amount-label",children:"Processing address"}),(0,Q.jsx)(Bl,{amount:w,symbol:f,className:"rd-history-num"})]}),(0,Q.jsx)("span",{className:"rd-history-card-arrow","aria-hidden":"true",children:"\u2192"}),(0,Q.jsxs)("span",{className:"rd-history-amount-block",children:[(0,Q.jsx)("span",{className:"rd-history-amount-label",children:C}),(0,Q.jsx)(Bl,{amount:p,symbol:m,className:`rd-history-num rd-history-received${l.receivedIsEstimate?" rd-history-received-estimate":""}`})]})]}),(0,Q.jsxs)("span",{className:"rd-history-card-foot",children:[(0,Q.jsxs)("span",{className:"rd-history-date",children:[d.completedAt?"Completed":"Started"," \xB7 ",v]}),(0,Q.jsx)("span",{className:"rd-history-chevron","aria-hidden":"true",children:(0,Q.jsx)(Tr,{size:16})})]})]}),h&&(0,Q.jsxs)("div",{className:"rd-history-detail",children:[l.deposit?(0,Q.jsx)(Ji,{label:"Deposit confirmed",chainId:l.deposit.originChainId??wa,txHash:l.deposit.originTxHash||l.deposit.txHash,amount:Xi(l.deposit.amount,y?.token.decimals)}):x.length>0?x.map(N=>(0,Q.jsx)(Ji,{label:"Deposit confirmed",chainId:N.originChainId??wa,txHash:N.originTxHash||N.txHash,amount:Xi(N.amount,y?.token.decimals)},`${N.txHash}-${N.blockNumber}`)):(0,Q.jsxs)("div",{className:"rd-history-step",children:[(0,Q.jsx)("span",{className:"rd-history-step-dot"}),(0,Q.jsx)("span",{className:"rd-history-step-label",children:"Deposit confirmed"}),(0,Q.jsx)("span",{className:"rd-muted",children:"Details unavailable"})]}),(0,Q.jsx)(Ji,{label:"Bridge",chainId:wa,txHash:d.bscBridgeTx,shared:l.sharedLegs,missingLabel:T}),(0,Q.jsx)(Ji,{label:"ONEchain delivery",chainId:n?.destination.chainId??612055,txHash:d.deliveryTxHash,shared:l.sharedLegs,missingLabel:T})]})]},l.key)})})]})}var so=require("react");var _t=require("react");var Lr=class extends Error{constructor(t,r,n){super(r),this.name="RelayApiError",this.status=t,this.body=n}};function Vt(e){let t=e.baseUrl.replace(/\/+$/,"");async function r(n,o){let a={...o?.headers};o?.body!=null&&(a["Content-Type"]="application/json");let i;try{i=await fetch(`${t}${n}`,{...o,headers:a})}catch(l){throw new Lr(0,`network error calling ${n}: ${l.message}`)}let s=await i.text();if(!i.ok){let l=`request to ${n} failed with status ${i.status}`,d;try{d=JSON.parse(s);let c=d;c?.error&&(l=c.error)}catch{d=s||void 0}throw new Lr(i.status,l,d)}try{return JSON.parse(s)}catch{throw new Lr(i.status,`expected a JSON response from ${n} but got ${s?"a non-JSON body":"an empty body"}`,s||void 0)}}return{getConfig(){return r("/v1/config").then(n=>({...n,targets:n.targets??[]}))},getQuote(n){return r("/v1/quote",{method:"POST",body:JSON.stringify(n)})},getDepositAddress(n,o){let a=new URLSearchParams({user:n.user,originChainId:String(n.originChainId),originCurrency:n.originCurrency});return o&&a.set("target",o),r(`/v1/deposit-address?${a.toString()}`)},getOrder(n){return r(`/v1/orders/${encodeURIComponent(n)}`)},listOrders(n){let o=new URLSearchParams({user:n});return r(`/v1/orders?${o.toString()}`).then(a=>a.orders??[])},ordersStreamUrl(n){return`${t}/v1/orders/stream?user=${encodeURIComponent(n)}`},getRecovery(n){let o=new URLSearchParams({user:n.user});return n.target&&o.set("target",n.target),r(`/v1/recovery?${o.toString()}`)}}}var em=[{type:"function",name:"deploy",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}],zl=[{type:"function",name:"execute",stateMutability:"nonpayable",inputs:[],outputs:[]},{type:"function",name:"sweepToUser",stateMutability:"nonpayable",inputs:[{name:"tokenAddr",type:"address"}],outputs:[]}],Fl=[{type:"function",name:"computeAddress",stateMutability:"view",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}];var io=["0x486BEEc35A9a9915213Ea02AD3709738335F7702","0x3438735303911aBe113AdF14b18eE730cC24893b","0xA3B548Ab23043e6B24A087515fe1306379683533","0x44317d07378390543d99Ee76374E86C1Ef6cF832"];function es(e,t){return!e||!t?!1:e.toLowerCase()===t.toLowerCase()}function Zw(e,t){return t.some(r=>es(r,e))}function ts(e){if(!e||e.length===0)return io;let t=new Set,r=[];for(let n of e){if(typeof n!="string"||!ht(n))continue;let o=n.toLowerCase();t.has(o)||(t.add(o),r.push(n))}return r.length>0?r:io}async function tm(e,t,{factory:r,forwarder:n,recipient:o,version:a,trusted:i=io}){if(!r||!n||!o||a===void 0)return{ok:!1,reason:"address verification is missing inputs (factory/forwarder/recipient/version)"};if(!Zw(r,i))return{ok:!1,reason:`factory ${r} 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:r,abi:Fl,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 es(s,n)?{ok:!0}:{ok:!1,reason:`forwarder address mismatch: the API returned ${n}, but factory ${r} derives ${s} for this account -- refusing to sign`}}async function rm(e,t,{forwarder:r,recipient:n,version:o,trusted:a=io}){if(!r||!n||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:Fl,functionName:"computeAddress",args:[n,BigInt(o)]})}catch{return}}));return i.some(s=>es(s,r))?{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: ${r} is not the address any known factory derives for this account -- refusing to deposit`}}function nm(e,t){return es(e,t)}var Pn=56,Ul={step:"idle"};function Xw(e){return e.tokens?.find(t=>t.recoverable)?.address??e.token}function xa(e={}){let t=(0,_t.useRef)(e);t.current=e;let r=e.wallet,n=r?.walletChainId,o=e.recipient,a=o&&ht(o)?o:void 0,[i,s]=(0,_t.useState)({}),l=(0,_t.useCallback)((m,g)=>{s(y=>({...y,[m.toLowerCase()]:g}))},[]),d=(0,_t.useCallback)(m=>m?i[m.toLowerCase()]??Ul:Ul,[i]),c=(0,_t.useMemo)(()=>Object.values(i).some(m=>m.step==="switching"||m.step==="deploying"||m.step==="recovering"),[i]);return{recover:(0,_t.useCallback)(async(m,g,y)=>{if(!a||!m?.forwarder)return;let w=m.forwarder;l(w,{step:"switching"});try{if(n!==Pn){if(!r?.switchChain)throw new Error("wallet cannot switch chains");await r.switchChain(Pn)}if(!r?.writeContract||!r?.readContract||!r?.waitForReceipt)throw new Error("wallet is missing contract capabilities required for recovery");let f=await tm(r.readContract,Pn,{factory:m.factory,forwarder:m.forwarder,recipient:a,version:m.version,trusted:t.current.trustedFactories});if(!f.ok)throw new Error(`address verification failed: ${f.reason}`);let p;if(!m.isDeployed){if(l(w,{step:"deploying"}),p=await r.writeContract({address:m.factory,abi:em,functionName:"deploy",args:[a,BigInt(m.version)],chainId:Pn}),l(w,{step:"deploying",deployTxHash:p}),(await r.waitForReceipt({chainId:Pn,hash:p})).status==="reverted")throw new Error(`forwarder deploy reverted on-chain (tx ${p})`);t.current.onChanged?.()}l(w,{step:"recovering",deployTxHash:p});let x=g==="execute"?await r.writeContract({address:m.forwarder,abi:zl,functionName:"execute",args:[],chainId:Pn}):await r.writeContract({address:m.forwarder,abi:zl,functionName:"sweepToUser",args:[y??Xw(m)],chainId:Pn});if(l(w,{step:"recovering",deployTxHash:p,actionTxHash:x}),(await r.waitForReceipt({chainId:Pn,hash:x})).status==="reverted")throw new Error(`recovery transaction reverted on-chain (tx ${x})`);l(w,{step:"done",deployTxHash:p,actionTxHash:x}),t.current.onRecoverySuccess?.({action:g,forwarder:m.forwarder,actionTxHash:x,...p?{deployTxHash:p}:{}}),t.current.onChanged?.()}catch(f){let p=f instanceof Error?f:new Error(String(f));s(x=>{let h=w.toLowerCase();return{...x,[h]:{...x[h]??Ul,step:"error",error:p.message}}}),t.current.onError?.(p)}},[a,n,r,l]),stateFor:d,busy:c}}function om(e={}){let t=(0,_t.useRef)(e);t.current=e;let r=(0,_t.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRecovery: either `client` or `apiBaseUrl` must be provided");return Vt({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.recipient,o=n&&ht(n)?n:void 0,[a,i]=(0,_t.useState)(),[s,l]=(0,_t.useState)(!1),[d,c]=(0,_t.useState)(),[b,m]=(0,_t.useState)(0),g=e.target,y=e.enabled??!0,w=e.refetchInterval;(0,_t.useEffect)(()=>{if(!o||!y){i(void 0),c(void 0),l(!1);return}let v=!1,R=!1,S=!0;async function T(){if(!(v||R)){R=!0,S&&l(!0);try{let N=await r.getRecovery({user:o,target:g});if(v)return;i(N),c(void 0)}catch(N){if(v)return;let E=N instanceof Error?N:new Error(String(N));c(E),t.current.onError?.(E),E instanceof Lr&&E.status===401&&t.current.onUnauthorized?.()}finally{R=!1,!v&&S&&l(!1),S=!1}}}T();let C=typeof w=="number"&&Number.isFinite(w)&&w>0?setInterval(()=>{T()},w):void 0;return()=>{v=!0,C&&clearInterval(C)}},[r,o,b,g,y,w]);let f=(0,_t.useCallback)(()=>m(v=>v+1),[]),p=xa({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:f}),x=(0,_t.useCallback)(async(v,R)=>{a&&await p.recover(a,v,R)},[p,a]),h=p.stateFor(a?.forwarder);return{info:a,loading:s,error:d,refresh:f,recover:x,recoveryState:h}}var Jw="BSC_FUNDED";function am(e){if(!e)return 0n;try{let t=BigInt(e);return t>0n?t:0n}catch{return 0n}}function $w(e,t){return e.target||t}function Lo(e,t=[]){let r=e.find(o=>o.isDefault)?.symbol,n=new Map;for(let o of e){if(!o.info?.forwarder)continue;let a=o.info.forwarder.toLowerCase(),i=n.get(a);if(i){i.targets.push(o.symbol);continue}n.set(a,{forwarder:o.info.forwarder,targets:[o.symbol],info:o.info,deposits:[],depositsTotal:0n})}for(let o of n.values()){let a=new Set(o.targets);for(let i of t){if(i.status!==Jw)continue;let s=$w(i,r);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+=am(l.amount)}o.deposits.sort((i,s)=>i.blockNumber-s.blockNumber)}return[...n.values()]}function im(e){return e.filter(t=>(t.info.tokens??[]).some(r=>r.recoverable)?!0:am(t.info.balance)>0n&&t.info.suggestedAction!=="none")}function rs(e){return e.reduce((t,r)=>t+(r.info.tokens??[]).filter(n=>n.recoverable).length,0)}var z=require("react/jsx-runtime"),ey=56;function ty(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 ry="This balance may already be processing. Recover only if it remains stuck.",ns="USDT",sm="primary";function ny(e){return`${e} more recoverable under other delivery tokens -- switch the delivery token above to recover ${e===1?"it":"them"}.`}function oy(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 dm({message:e}){let[t,r]=(0,so.useState)("idle");(0,so.useEffect)(()=>{if(t==="idle")return;let a=window.setTimeout(()=>r("idle"),1500);return()=>window.clearTimeout(a)},[t]);async function n(){if(typeof navigator>"u"||!navigator.clipboard){r("failed");return}try{await navigator.clipboard.writeText(e),r("copied")}catch{r("failed")}}let o=t==="copied"?"Copied technical details":t==="failed"?"Copy failed":"Copy technical details";return(0,z.jsxs)("details",{className:"rd-error-details",children:[(0,z.jsx)("summary",{children:"View technical details"}),(0,z.jsxs)("div",{className:"rd-error-log",children:[(0,z.jsx)("button",{type:"button",className:"rd-error-copy",onClick:()=>{n()},"aria-label":o,"aria-live":"polite",title:o,children:t==="copied"?(0,z.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,z.jsx)("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,z.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,z.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),(0,z.jsx)("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"})]})}),(0,z.jsx)("code",{children:e})]})]})}function va(e){if(!e)return 0n;try{return BigInt(e)}catch{return 0n}}function xn(e,t){try{return Zt(e,t)}catch{return e.toString()}}function lm(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function ay(e){let t=va(e.bridgeMinWei),r=[];for(let a of e.tokens??[]){let i=va(a.balance);if(!(i<=0n)){if(a.suggestedAction==="execute"){r.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,action:{kind:"execute"}});continue}if(a.recoverable){r.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,action:{kind:"sweep",tokenAddress:a.address}});continue}r.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,...t>i?{shortfall:t-i,minimum:t}:{}})}}let n=va(e.balance),o=r.some(a=>a.action?.kind==="execute");return n>0n&&e.suggestedAction==="execute"&&!o?r.unshift({key:sm,symbol:ns,decimals:e.decimals,balance:n,action:{kind:"execute"}}):r.length===0&&n>0n&&e.suggestedAction!=="none"&&r.push({key:sm,symbol:ns,decimals:e.decimals,balance:n,action:{kind:"sweep"}}),r}function iy({deposit:e,decimals:t}){let r=e.originChainId??ey,n=e.originTxHash||e.txHash,o=n?Zi(r,n):void 0;return(0,z.jsxs)("div",{className:"rd-history-step","data-testid":"recovery-deposit-row",children:[(0,z.jsx)("span",{className:"rd-history-step-dot rd-history-step-dot-done"}),(0,z.jsx)("span",{className:"rd-history-step-chain",children:Ao(r)}),(0,z.jsx)("span",{className:"rd-history-step-amount",children:xn(va(e.amount),t)}),(0,z.jsx)("span",{className:"rd-history-step-tx",children:o?(0,z.jsx)("a",{href:o.url,target:"_blank",rel:"noreferrer",title:n,children:lm(n)}):n?(0,z.jsx)("span",{title:n,children:lm(n)}):null})]})}function sy({group:e,showTargetLabel:t,busy:r,state:n,onRecover:o,actingRowKey:a,rowKeyOf:i}){let{info:s}=e,l=ay(s),d=va(s.balance),c=l.length===1?`${xn(l[0].balance,l[0].decimals)}`:`${l.length} assets`,b=e.deposits.length>0&&e.depositsTotal>=d,m=d>e.depositsTotal?d-e.depositsTotal:0n,g=n.step==="switching"||n.step==="deploying"||n.step==="recovering",w=l.find(p=>i(p)===a)?.action?.kind;function f(){if(n.step==="switching")return"Switching to BNB Chain\u2026";if(n.step==="deploying")return"Confirm in wallet\u2026 (1/2 \u2014 preparing your deposit address)";let p=w==="execute"?"continuing ONEchain delivery":"returning funds";return n.deployTxHash?`Confirm in wallet\u2026 (2/2 \u2014 ${p})`:`Confirm in wallet\u2026 (${p})`}return(0,z.jsxs)("div",{className:"rd-recover-group","data-testid":"forwarder-section",children:[t&&(0,z.jsxs)("p",{className:"rd-recover-group-label",children:["Delivery target \xB7 ",(0,z.jsx)("b",{children:e.targets.join(", ")})]}),(0,z.jsxs)("div",{className:"rd-recover-sum",children:[(0,z.jsx)("span",{className:"rd-recover-sum-label",children:"Funds awaiting processing"}),(0,z.jsxs)("span",{className:"rd-recover-sum-value",title:l.length===1?`${c} ${l[0].symbol}`:c,children:[c,l.length===1&&(0,z.jsxs)(z.Fragment,{children:[" ",(0,z.jsx)("span",{className:"rd-recover-sum-unit",children:l[0].symbol})]})]})]}),e.deposits.length>0&&(0,z.jsxs)("details",{className:"rd-recover-made-of",children:[(0,z.jsxs)("summary",{className:"rd-recover-made-of-label",children:["Deposit history \xB7 ",e.deposits.length," ",e.deposits.length===1?"transfer":"transfers"]}),(0,z.jsxs)("div",{className:"rd-recover-made-of-body",children:[e.deposits.map(p=>(0,z.jsx)(iy,{deposit:p,decimals:s.decimals},`${p.txHash}-${p.blockNumber}`)),!b&&(0,z.jsxs)("p",{className:"rd-token-row-status","data-testid":"deposits-incomplete-note",children:["These transfers explain ",xn(e.depositsTotal,s.decimals)," of"," ",xn(d,s.decimals)," ",ns,". The remaining"," ",xn(m,s.decimals)," ",ns," is still included when you act."]})]})]}),(0,z.jsx)("div",{className:"rd-token-list",children:l.map(p=>{let x=i(p),h=g&&a===x;return(0,z.jsxs)("div",{className:"rd-token-row","data-token-symbol":p.symbol,children:[(0,z.jsx)(oo,{symbol:p.symbol,size:26}),(0,z.jsxs)("div",{className:"rd-token-row-info",children:[l.length>1&&(0,z.jsxs)("span",{className:"rd-token-row-amount",children:[xn(p.balance,p.decimals)," ",(0,z.jsx)("span",{className:"rd-token-row-symbol",children:p.symbol})]}),h?(0,z.jsx)("span",{className:"rd-token-row-step",role:"status","aria-live":"polite",children:f()}):p.shortfall!==void 0&&p.minimum!==void 0?(0,z.jsxs)("span",{className:"rd-token-row-warn",children:["Needs ",(0,z.jsxs)("b",{children:[xn(p.shortfall,p.decimals)," ",p.symbol]})," more to reach the"," ",xn(p.minimum,p.decimals)," ",p.symbol," minimum. Add it through"," ",(0,z.jsx)("b",{children:"Deposit to CROSS"})," and both amounts will process together."]}):p.action?(0,z.jsx)("span",{className:"rd-token-row-status",children:p.action.kind==="execute"?"Ready to continue delivery to ONEchain":"Ready to return to your BNB Chain wallet"}):(0,z.jsx)("span",{className:"rd-token-row-status",children:"Waiting for processing"})]}),h?(0,z.jsx)("span",{className:"rd-spinner rd-token-row-spinner"}):p.action&&(0,z.jsx)("button",{type:"button",className:"rd-button-primary rd-token-row-action",onClick:()=>o(p),disabled:r,children:p.action.kind==="execute"?"Continue delivery":"Return to wallet"})]},p.key)})}),!s.isDeployed&&n.step==="idle"&&(0,z.jsxs)("div",{className:"rd-callout rd-callout-warning","data-testid":"two-tx-notice",children:["The first action from this address needs ",(0,z.jsx)("b",{children:"two wallet confirmations"}),": prepare the address, then move the funds. Later actions need one."]}),s.inFlight&&(0,z.jsx)("p",{className:"rd-muted rd-token-row-status",children:s.inFlightReason||ry}),n.step==="done"&&(0,z.jsx)("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."}),n.step==="error"&&n.error&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("div",{className:"rd-callout rd-callout-danger",role:"alert",children:oy(n.error)}),(0,z.jsx)(dm,{message:n.error})]})]})}function os(e){let{info:t,loading:r,error:n,refresh:o}=om(ty(e)),a=r||e.targets!==void 0&&e.targetsLoading===!0,i=xa({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]=(0,so.useState)(),d=e.targets!==void 0?[...e.targets]:t?[{symbol:e.target??"",isDefault:!0,info:t}]:[],c=im(Lo(d,e.orders??[])),b=c.length>0,m=e.targets!==void 0?e.onRecovered:o,g=e.wallet?.walletAddress,y=e.wallet?.getBalance,[w,f]=(0,so.useState)();return(0,so.useEffect)(()=>{if(!b||!y||!g){f(void 0);return}let p=!1;return y({chainId:56,address:g}).then(x=>{p||f({value:x.value,decimals:x.decimals})}).catch(()=>{p||f(void 0)}),()=>{p=!0}},[b,y,g]),(0,z.jsxs)("section",{className:e.showTitle??!0?"rd-card":"rd-stack","data-rd-recover-funds":"",children:[(e.showTitle??!0)&&(0,z.jsx)("div",{className:"rd-card-header",children:(0,z.jsx)("h2",{className:"rd-card-title",children:"Recover stuck funds"})}),typeof e.otherTargetsRecoverable=="number"&&e.otherTargetsRecoverable>0&&(0,z.jsx)("div",{className:"rd-callout rd-callout-muted","data-testid":"other-targets-recoverable-note",children:ny(e.otherTargetsRecoverable)}),a&&(0,z.jsxs)("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[(0,z.jsx)("span",{className:"rd-spinner"})," Checking for recoverable funds\u2026"]}),n&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("div",{className:"rd-callout rd-callout-danger",role:"alert",children:"Couldn't check recoverable funds. Please try again."}),(0,z.jsx)(dm,{message:n.message})]}),!a&&!n&&!b&&(0,z.jsxs)("div",{className:"rd-recover-empty",role:"status","data-testid":"rd-recover-empty-state",children:[(0,z.jsx)("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:(0,z.jsxs)("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,z.jsx)("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"}),(0,z.jsx)("path",{d:"M5 10h14",stroke:"currentColor",strokeWidth:"1.7"}),(0,z.jsx)("path",{d:"m9.2 14 1.7 1.7 3.9-4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,z.jsx)("h3",{className:"rd-recover-sum-value rd-recover-sum-empty rd-recover-empty-title",children:"Nothing to recover"}),(0,z.jsx)("p",{className:"rd-recover-empty-copy",children:"No funds are waiting at your deposit addresses. If funds become stuck, they will appear here."}),m&&(0,z.jsxs)("button",{type:"button",className:"rd-button-secondary rd-recover-empty-refresh",onClick:m,"data-track":"refresh_recovery",children:[(0,z.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,z.jsx)("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&&!n&&c.map(p=>(0,z.jsx)(sy,{group:p,showTargetLabel:c.length>1||p.targets.length>1,busy:i.busy,state:i.stateFor(p.forwarder),actingRowKey:s,rowKeyOf:x=>`${p.forwarder.toLowerCase()}:${x.key}`,onRecover:x=>{x.action&&(l(`${p.forwarder.toLowerCase()}:${x.key}`),i.recover(p.info,x.action.kind,x.action.tokenAddress))}},p.forwarder.toLowerCase())),!a&&!n&&b&&(0,z.jsxs)("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&&(0,z.jsxs)(z.Fragment,{children:[" ",(0,z.jsxs)("b",{children:[xn(w.value,w.decimals)," BNB"]})]}),!w&&" unavailable","."]}),!a&&!n&&b&&(0,z.jsx)("p",{className:"rd-recover-foot",children:"Delivery continues to ONEchain; returned funds go to your connected BNB Chain wallet."})]})}var xt=V(require("react"),1),br=V(require("@radix-ui/react-dialog"),1),lo=require("vaul");he(`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}
19
- `);var Xt=require("react/jsx-runtime"),cm=24;function jl(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function ly(e,t,r){let n=r?.offsetTop??t.top,o=r?r.offsetTop+r.height:t.bottom,a=Math.max(t.top,n)+cm,i=Math.min(t.bottom,o)-cm;return e.top<a?e.top-a:e.bottom>i?e.bottom-i:0}function dy(){let e=xt.useRef(0),[t,r]=xt.useState({keyboardHeight:0,viewportHeight:0});return xt.useEffect(()=>{let n=window.visualViewport;if(!n)return;let o=()=>{e.current=Math.max(e.current,window.innerHeight,document.documentElement.clientHeight,n.height+n.offsetTop);let a=Math.max(0,e.current-n.height-n.offsetTop),i=n.height;r(s=>s.keyboardHeight===a&&s.viewportHeight===i?s:{keyboardHeight:a,viewportHeight:i})};return o(),n.addEventListener("resize",o),n.addEventListener("scroll",o),()=>{n.removeEventListener("resize",o),n.removeEventListener("scroll",o)}},[]),t}function cy(e){let t=`(max-width: ${e}px)`,[r,n]=xt.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(t).matches);return xt.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia(t);n(o.matches);let a=i=>n(i.matches);return o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[t]),r}function vn({theme:e="dark",mobileBreakpoint:t=768,drawerDirection:r="bottom",dialogWidth:n,drawerMaxWidth:o,drawerMinWidth:a,style:i,open:s,onOpenChange:l,children:d}){let c=cy(t),[b,m]=xt.useState(!1),g=s!==void 0,y=g?s:b,w=xt.useCallback(h=>{g||m(h),l?.(h)},[g,l]);Cn(y,xt.useCallback(()=>w(!1),[w]));let f=xt.useMemo(()=>{let h={};return n&&(h["--rd-dialog-width"]=n),o&&(h["--rd-drawer-max-width"]=o),a&&(h["--rd-drawer-min-width"]=a),{...h,...i}},[n,o,a,i]),p=xt.useMemo(()=>({open:y,setOpen:w,isMobile:c,theme:e,drawerDirection:r,portalStyle:f}),[y,w,c,e,r,f]),x=(0,Xt.jsx)("div",{"data-theme":e,style:f,children:d});return c?(0,Xt.jsx)(Vi.Provider,{value:p,children:(0,Xt.jsx)(lo.Drawer.Root,{direction:r,open:y,onOpenChange:w,noBodyStyles:!0,children:x},"drawer")}):(0,Xt.jsx)(Vi.Provider,{value:p,children:(0,Xt.jsx)(br.Root,{open:y,onOpenChange:w,children:x})})}function Do({asChild:e,children:t,dataAttributes:r}){let{isMobile:n}=Hr(),o=n?lo.Drawer.Trigger:br.Trigger;return(0,Xt.jsx)(o,{asChild:e,...r,children:t})}function kn({className:e,ariaTitle:t,children:r}){let{open:n,isMobile:o,theme:a,drawerDirection:i,portalStyle:s}=Hr(),{keyboardHeight:l,viewportHeight:d}=dy(),c=wo(),b=xt.useRef(null),m=xt.useRef(null),g=xt.useRef(null),y=xt.useRef(null),w=xt.useRef(!1),f=xt.useRef(!1);xt.useEffect(()=>()=>{m.current&&clearTimeout(m.current),g.current&&clearTimeout(g.current)},[]),xt.useEffect(()=>{m.current&&clearTimeout(m.current),g.current&&clearTimeout(g.current);let v=document.activeElement;!n&&jl(v)&&b.current?.contains(v)&&v.blur(),y.current=null,w.current=!1,f.current=!1,b.current?.querySelectorAll("[data-rd-scroll-area]").forEach(R=>{R.scrollTo?.({top:0,behavior:"auto"})})},[n]),xt.useEffect(()=>{if(l>0){f.current=!0;return}if(!f.current||!w.current)return;let v=y.current;v&&(g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{let R=document.activeElement;if(jl(R)&&v.contains(R)){g.current=null;return}v.scrollTo?.({top:0,behavior:"smooth"}),y.current=null,w.current=!1,f.current=!1,g.current=null},80))},[l]);let p=o&&i==="bottom"&&l>0&&!c,x=p?{bottom:l,maxHeight:`min(85dvh, calc(${d}px - env(safe-area-inset-top, 0px)))`}:void 0,h=xt.useCallback(v=>{if(!o||i!=="bottom"||!jl(v.target))return;let R=v.target,S=R.closest("[data-rd-scroll-area]");S&&(y.current=S,w.current=!0,m.current&&clearTimeout(m.current),g.current&&clearTimeout(g.current),m.current=setTimeout(()=>{let T=ly(R.getBoundingClientRect(),S.getBoundingClientRect(),window.visualViewport);Math.abs(T)>=1&&S.scrollBy?.({top:T,behavior:"auto"}),m.current=null},280))},[i,o]);return o?(0,Xt.jsxs)(lo.Drawer.Portal,{children:[(0,Xt.jsx)(lo.Drawer.Overlay,{className:"rd-overlay"}),(0,Xt.jsxs)(lo.Drawer.Content,{ref:b,className:ze("rd-drawer-content",e),"data-theme":a,"data-rd-shell":"drawer","data-rd-in-app":c?"true":"false","data-rd-keyboard-adjusted":p?"true":"false",style:{...s,...x},onFocusCapture:h,children:[(0,Xt.jsx)(lo.Drawer.Title,{className:"rd-sr-only",children:t}),(0,Xt.jsx)("div",{className:"rd-drawer-handle"}),r]})]}):(0,Xt.jsxs)(br.Portal,{children:[(0,Xt.jsx)(br.Overlay,{className:"rd-overlay"}),(0,Xt.jsxs)(br.Content,{className:ze("rd-dialog-content",e),"data-theme":a,"data-rd-shell":"dialog",style:s,children:[(0,Xt.jsx)(br.Title,{className:"rd-sr-only",children:t}),(0,Xt.jsx)(br.Description,{className:"rd-sr-only",children:t}),r]})]})}var fe=require("react/jsx-runtime");function py({id:e,activeView:t,recoverableCount:r,onChange:n}){let o=["deposit","history","recover"];return(0,fe.jsx)("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(0,fe.jsxs)("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:()=>n(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,c=o[d];n(c),document.getElementById(`${e}-${c}-tab`)?.focus()},children:[(0,fe.jsx)("span",{children:i}),a==="recover"&&r>0&&(0,fe.jsx)("span",{className:"rd-recovery-badge","data-testid":"recovery-badge",children:r})]},a)})})}function um({className:e}){let t=ga();return(0,fe.jsx)(Ce,{feature:"relay",children:(0,fe.jsx)(kn,{ariaTitle:"Deposit",className:["rd-deposit-shell",e??t.className].filter(Boolean).join(" "),children:(0,fe.jsx)(uy,{})})})}function uy(){let e=ga(),{theme:t}=Hr(),r=Ff(),n=pm.useId();if(!r)return null;let{activeView:o,setActiveView:a,recoveryOpen:i,resolvedApiBaseUrl:s,wallet:l,catalog:d,catalogLoading:c,catalogError:b,origin:m,setOrigin:g,amount:y,setAmount:w,recipient:f,setRecipient:p,recipientValid:x,balance:h,balanceLoading:v,insufficientBalance:R,depositAddress:S,depositAddressLoading:T,depositAddressError:C,arrivalStatus:N,quote:E,quoteLoading:M,quoteError:W,canDeposit:L,deposit:H,depositState:A,targetOptions:O,selectedTarget:ce,setSelectedTarget:X,showAmountInput:P,minNotice:xe,showRecipientInput:ne,showTargetSelector:K,showOneClick:U,showConnectPrompt:te,showRecipientHint:Z,canRecover:be,recoverableCount:Ne,recoveryTargetsLoading:re,recoveryTargets:we,recoveryOrders:Fe,historyOrdersLoading:Ae,historyOrdersError:pt,refreshRecovery:ye,trustedFactories:De,amountHint:ut,amountSmallestUnits:Be,onMax:Ge}=r;return(0,fe.jsxs)("div",{className:"rd-root rd-wizard","data-theme":t,"data-rd-scroll-area":!0,children:[(0,fe.jsx)(py,{id:n,activeView:o,recoverableCount:Ne,onChange:a}),i&&(0,fe.jsx)("div",{className:"rd-deposit-tab-panel",id:`${n}-recover-panel`,role:"tabpanel","aria-labelledby":`${n}-recover-tab`,children:be?(0,fe.jsx)(os,{client:e.client,apiBaseUrl:s,recipient:f,target:ce?.symbol,wallet:l,trustedFactories:De,targets:(d?.targets.length??0)>0?we:void 0,targetsLoading:re,orders:Fe,onRecovered:ye,onRecoverySuccess:e.onRecoverySuccess,onError:e.onError,showTitle:!1}):(0,fe.jsxs)("div",{className:"rd-recover-empty",role:"status","data-variant":"unavailable","data-testid":"rd-recovery-unavailable-note",children:[(0,fe.jsx)("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:(0,fe.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,fe.jsx)("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),(0,fe.jsx)("path",{d:"M8 10V7.5a4 4 0 0 1 8 0V10",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),(0,fe.jsx)("circle",{cx:"12",cy:"15",r:"1.2",fill:"currentColor"})]})}),(0,fe.jsx)("h3",{className:"rd-recover-empty-title",children:"Recovery unavailable"}),(0,fe.jsx)("p",{className:"rd-recover-empty-copy",children:"Connect a wallet that supports recovery transactions to continue."})]})}),o==="history"&&(0,fe.jsx)("div",{className:"rd-deposit-tab-panel",id:`${n}-history-panel`,role:"tabpanel","aria-labelledby":`${n}-history-tab`,children:x&&f.trim()?(0,fe.jsx)($i,{orders:Fe,isLoading:c||Ae,error:b??pt,catalog:d,showTitle:!1}):(0,fe.jsx)(ya,{requiresIdentity:!0})}),o==="deposit"&&(0,fe.jsxs)("div",{className:"rd-deposit-tab-panel",id:`${n}-deposit-panel`,role:"tabpanel","aria-labelledby":`${n}-deposit-tab`,children:[c&&(0,fe.jsxs)("div",{className:"rd-skeleton-form","data-testid":"rd-source-skeleton","aria-hidden":"true",children:[(0,fe.jsx)(Ki,{}),te&&e.onRequestConnect&&(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-cta"}),(0,fe.jsxs)("section",{className:"rd-stack",children:[(0,fe.jsxs)("div",{className:"rd-field",children:[(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"18%"}}),(0,fe.jsxs)("div",{className:"rd-field-row",children:[(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),P&&(0,fe.jsxs)("div",{className:"rd-field",children:[(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"34%"}}),(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),(0,fe.jsxs)("div",{className:"rd-field",children:[(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"24%"}}),(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),(ne||f.trim().length>0)&&(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"58%",marginTop:"0.5rem"}}),(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),ne&&(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"82%"}})]})]}),(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-notice"})]}),c&&(0,fe.jsx)("p",{className:"rd-sr-only",role:"status",children:"Loading deposit options..."}),b&&(0,fe.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Failed to load configuration: ",b.message]}),Z&&(0,fe.jsx)("div",{className:"rd-callout rd-callout-muted",children:ne?"Connect a wallet or provide a recipient address to fetch your deposit address.":"Connect a wallet to fetch your deposit address."}),d&&m&&(0,fe.jsx)(Zf,{catalog:d,origin:m,onChangeOrigin:g,amount:y,onChangeAmount:w,showAmountInput:P,minNotice:xe,amountHint:ut,onMax:Ge,recipient:f,onChangeRecipient:p,showRecipientInput:ne,recipientValid:x,balance:h,balanceLoading:v,insufficientBalance:R,targetOptions:O,selectedTarget:ce,onChangeTarget:X,showTargetSelector:K,quote:E,quoteLoading:M,quoteError:W,depositAddress:S,depositAddressLoading:T,depositAddressError:C,arrivalStatus:N,amountSmallestUnits:Be,depositState:A,onDeposit:()=>{H()},canDeposit:L&&U,oneClickEnabled:U,locked:te,onRequestConnect:e.onRequestConnect})]})]})}var as=require("react/jsx-runtime");function fm({asChild:e,children:t}){return(0,as.jsx)(Ce,{feature:"relay",children:(0,as.jsx)(Do,{asChild:e??t!=null,children:t??(0,as.jsx)("button",{type:"button","data-track":"open",children:"Deposit"})})})}var Le=V(require("react"),1);var ge=require("react");var is=require("react");function mm(e,t){let[r,n]=(0,is.useState)(e);return(0,is.useEffect)(()=>{let o=setTimeout(()=>n(e),t);return()=>clearTimeout(o)},[e,t]),r}var fy=500,hm=56,gm={chainId:hm,token:"0x55d398326f99059fF775485246999027B3197955"},bm=3e4,my=5e3;function gy(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?bm:Math.max(my,e*1e3)}var hy=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function Wl(e,t){let r=e.trim();if(!r)return null;try{let n=qi(r,t);return n>0n?n:null}catch{return null}}function wm(e={}){let t=(0,ge.useRef)(e);t.current=e;let r=(0,ge.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useDepositAddress: either `client` or `apiBaseUrl` must be provided");return Vt({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.wallet,o=n?.walletAddress,a=!!o,i=n?.walletChainId,[s,l]=(0,ge.useState)(),[d,c]=(0,ge.useState)(!0),[b,m]=(0,ge.useState)();(0,ge.useEffect)(()=>{let ie=!1;return c(!0),r.getConfig().then(Se=>{ie||(l(Se),m(void 0))}).catch(Se=>{ie||m(Se instanceof Error?Se:new Error(String(Se)))}).finally(()=>{ie||c(!1)}),()=>{ie=!0}},[r]);let g=e.chains,y=(0,ge.useMemo)(()=>{if(!s)return[];if(!g||g.length===0)return s.origins;let ie=new Set(g);return s.origins.filter(Se=>ie.has(Se.chainId))},[s,g]),w=(0,ge.useMemo)(()=>s?{...s,origins:y}:void 0,[s,y]),[f,p]=(0,ge.useState)();(0,ge.useEffect)(()=>{if(f||y.length===0)return;let ie=t.current.defaultToken,Se=ie?y.find(G=>G.chainId===ie.chainId&&G.token.address.toLowerCase()===ie.address.toLowerCase()):void 0;p(Se??y[0])},[y,f]);let[x,h]=(0,ge.useState)(),v=(0,ge.useCallback)(()=>{_e(void 0),nt(!1),F(!1),B(!1),Lt(void 0)},[]),R=(0,ge.useCallback)(ie=>{p(ie),h(void 0),v()},[v]),S=f?.kind==="svm",[T,C]=(0,ge.useState)(""),N=e.amount!==void 0?e.amount:T,E=(0,ge.useCallback)(ie=>{C(ie),h(void 0),v()},[v]),M=mm(N,fy),W=f?Wl(M,f.token.decimals):null,L=f?Wl(N,f.token.decimals):null,[H,A]=(0,ge.useState)(""),[O,ce]=(0,ge.useState)(!1),X=e.recipient!==void 0?e.recipient:H,P=(0,ge.useCallback)(ie=>{A(ie),ce(!0),h(void 0),v()},[v]);(0,ge.useEffect)(()=>{e.recipient===void 0&&o&&!O&&A(o)},[o,O,e.recipient]);let xe=X.length===0||ht(X),ne=X.length>0&&ht(X)?X:void 0,[K,U]=(0,ge.useState)(),[te,Z]=(0,ge.useState)(!1),[be,Ne]=(0,ge.useState)(0),re=n?.getBalance;(0,ge.useEffect)(()=>{if(!re||!o||!f||S){U(void 0),Z(!1);return}let ie=!1;Z(!0);let Se=f.token.address.toLowerCase()===ha?void 0:f.token.address;return re({chainId:f.chainId,address:o,token:Se}).then(G=>{ie||U({...G,formatted:Zt(G.value,G.decimals)})}).catch(()=>{ie||U(void 0)}).finally(()=>{ie||Z(!1)}),()=>{ie=!0}},[re,o,f,S,be]);let we=K?.value??null,Fe=!S&&L!==null&&we!==null&&L>we,[Ae,pt]=(0,ge.useState)(),[ye,De]=(0,ge.useState)(!1),[ut,Be]=(0,ge.useState)(),Ge=f?.chainId,Ue=f?.token.address,st=e.target;(0,ge.useEffect)(()=>{if(!ne||!Ge||!Ue){pt(void 0),Be(void 0),De(!1);return}let ie=!1;return pt(void 0),Be(void 0),De(!0),(st?r.getDepositAddress({user:ne,originChainId:Ge,originCurrency:Ue},st):r.getDepositAddress({user:ne,originChainId:Ge,originCurrency:Ue})).then(G=>{ie||(pt(G),Be(void 0),t.current.onDepositAddress?.(G))}).catch(G=>{if(ie)return;pt(void 0);let Pe=G instanceof Error?G:new Error(String(G));Be(Pe),t.current.onError?.(Pe)}).finally(()=>{ie||De(!1)}),()=>{ie=!0}},[r,ne,Ge,Ue,st]);let Ht=[Ge??"",(Ue??"").toLowerCase(),(ne??"").toLowerCase(),st??"",N.trim()].join("|"),St=(0,ge.useRef)(Ht);(0,ge.useEffect)(()=>{St.current!==Ht&&(St.current=Ht,h(void 0),v())},[Ht,v]);let[jt,Ie]=(0,ge.useState)(),[Wt,tt]=(0,ge.useState)(!1),[At,qe]=(0,ge.useState)(),Xe=W?.toString();(0,ge.useEffect)(()=>{if(!Ge||!Ue||!Xe){Ie(void 0),qe(void 0),tt(!1);return}let ie=!1,Se,G=!0;async function Pe(){G&&tt(!0);let q=bm;try{let He=await r.getQuote({originChainId:Ge,originCurrency:Ue,amount:Xe});if(ie)return;Ie(He),qe(void 0),q=gy(He.ttl)}catch(He){if(ie)return;Ie(void 0),qe(He instanceof Error?He:new Error(String(He)))}finally{ie||tt(!1),G=!1}ie||(Se=setTimeout(Pe,q))}return Pe(),()=>{ie=!0,Se&&clearTimeout(Se)}},[r,Ge,Ue,Xe]);let[nr,Gt]=(0,ge.useState)(!1),[Ye,wt]=(0,ge.useState)(!1),[rt,_e]=(0,ge.useState)(),[ft,Lt]=(0,ge.useState)(),[je,nt]=(0,ge.useState)(!1),[qt,F]=(0,ge.useState)(!1),[Je,B]=(0,ge.useState)(!1),se=n?.waitForReceipt,ve=(0,ge.useRef)(void 0);(0,ge.useEffect)(()=>{if(!rt||!f||!se)return;let ie=!1;return nt(!0),F(!1),B(!1),se({chainId:f.chainId,hash:rt}).then(Se=>{ie||(F(!0),B(Se.status==="reverted"),Ne(G=>G+1),Se.status!=="reverted"&&rt!==ve.current&&(ve.current=rt,t.current.onDeposited?.(rt)))}).catch(Se=>{ie||Lt(Se instanceof Error?Se.message:String(Se))}).finally(()=>{ie||nt(!1)}),()=>{ie=!0}},[rt,se]);let Te=i!==void 0&&f!==void 0&&i!==f.chainId,ot=nr||Ye,or=x??ft,ur="idle";or?ur="error":qt?ur="confirmed":je?ur="confirming":ot&&(ur=nr?"switching":"pending");let Or={phase:ur,isSubmitting:ot,isConfirming:je,isConfirmed:qt,needsSwitch:Te,txHash:rt,reverted:qt&&Je,error:or},dn=!!(f&&Ae&&Ae.originChainId===f.chainId&&Ae.originCurrency.toLowerCase()===f.token.address.toLowerCase()),Rr=!!(n?.sendTransaction&&n?.writeContract&&n?.readContract&&n?.waitForReceipt),cn=!!(a&&Rr&&f&&!S&&Ae&&dn&&L&&L>0n&&!Fe&&!ot&&!je),Br=(0,ge.useCallback)(async()=>{if(S||!f||!Ae||!n?.sendTransaction||!n?.writeContract)return;h(void 0);let ie=Wl(N,f.token.decimals);if(!ie||ie<=0n){h("enter an amount to use the one-click deposit");return}let Se=f.token.address.toLowerCase()===ha,G=Ae.depositAddress,Pe=await rm(n?.readContract,hm,{forwarder:Ae.forwarder,recipient:ne,version:Ae.version,trusted:t.current.trustedFactories});if(!Pe.ok){h(`address verification failed: ${Pe.reason}`);return}if(f.chainId===gm.chainId&&f.token.address.toLowerCase()===gm.token.toLowerCase()&&!nm(G,Ae.forwarder)){h("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(Te){if(!n?.switchChain)throw new Error("wallet cannot switch chains");Gt(!0);try{await n.switchChain(f.chainId)}finally{Gt(!1)}}v(),wt(!0);try{let He=Se?await n.sendTransaction({chainId:f.chainId,to:G,value:ie}):await n.writeContract({chainId:f.chainId,address:f.token.address,abi:hy,functionName:"transfer",args:[G,ie]});_e(He)}finally{wt(!1)}}catch(He){h(He.message)}},[S,f,Ae,N,Te,n,ne,v]);return{address:o,isConnected:a,catalog:w,catalogLoading:d,catalogError:b,origin:f,setOrigin:R,recipient:X,setRecipient:P,recipientValid:xe,amount:N,setAmount:E,balance:K,balanceLoading:te,insufficientBalance:Fe,isSvmOrigin:S,depositAddress:Ae?.depositAddress,depositAddressResult:Ae,depositAddressLoading:ye,depositAddressError:ut,quote:jt,quoteLoading:Wt,quoteError:At,canDeposit:cn,deposit:Br,depositState:Or}}var qr=require("react");var by=3e4,wy=300;function Rn(e){let t=(0,qr.useRef)(e);t.current=e;let{client:r,enabled:n=!0,live:o=!0}=e,a=e.refetchInterval??e.fallbackPollMs??by,i=e.recipient&&ht(e.recipient)?e.recipient:void 0,[s,l]=(0,qr.useState)([]),[d,c]=(0,qr.useState)(!1),[b,m]=(0,qr.useState)(),[g,y]=(0,qr.useState)(!1),[w,f]=(0,qr.useState)(),[p,x]=(0,qr.useState)(0);return(0,qr.useEffect)(()=>{if(!i){l([]),m(void 0),c(!1),y(!1),f(void 0),x(0);return}if(!n){l([]),m(void 0),c(!1),y(!1),f(void 0),x(0);return}let h=!1,v=!0,R,S=0,T=0;async function C(){let W=++S;T+=1,v&&c(!0);try{let L=await r.listOrders(i);if(h)return;W===S&&(l(L),m(void 0))}catch(L){if(h)return;let H=L instanceof Error?L:new Error(String(L));W===S&&(m(H),t.current.onError?.(H))}finally{T-=1,!h&&W===S&&(c(!1),y(!0),f(i),x(L=>L+1)),v=!1}}function N(){R&&clearTimeout(R),R=setTimeout(()=>{R=void 0,h||C()},wy)}C();let E;o&&typeof EventSource<"u"&&(E=new EventSource(r.ordersStreamUrl(i)),E.addEventListener("orders-changed",N),E.onopen=()=>{N()});let M=o&&Number.isFinite(a)&&a>0?setInterval(()=>{T===0&&C()},a):void 0;return()=>{h=!0,R&&clearTimeout(R),M&&clearInterval(M),E?.close()}},[r,i,n,o,a]),{orders:s,ordersLoading:d,ordersError:b,ordersInitialized:g,ordersForRecipient:w,ordersRevision:p}}var ss=require("react");function ym(e,t){if(t){let r=e.find(n=>n.symbol===t);if(r)return r}return e.find(r=>r.isDefault)??e[0]}function xm({catalogTargets:e,filter:t,defaultTarget:r}){let n=(0,ss.useMemo)(()=>{if(!t||t.length===0)return e;let l=new Set(t);return e.filter(d=>l.has(d.symbol))},[e,t]),[o,a]=(0,ss.useState)(()=>ym(n,r)?.symbol),i=(o!==void 0?n.find(l=>l.symbol===o):void 0)??ym(n,r);function s(l){n.some(d=>d.symbol===l)&&a(l)}return{options:n,selected:i,setSelected:s}}var yy={dev:"https://dev-relay-protocol-api.onechain.nexus",stage:"https://dev-relay-protocol-api.onechain.nexus",production:"https://relay-protocol-api.onechain.nexus"};function On(e){return e.apiBaseUrl?e.apiBaseUrl:yy[at(e.environment)]}var ds=require("react/jsx-runtime"),vm=1e3;function xy(e,t,r,n,o){let a=e.requireWalletConnection??e.showRecipientInput===!1,i=r.walletAddress&&ht(r.walletAddress)?r.walletAddress:void 0;return{client:e.client,apiBaseUrl:n,wallet:r,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 ls(e,t){let r=e.trim();if(!r)return 0n;try{let n=qi(r,t);return n>0n?n:0n}catch{return 0n}}function vy(e,t,r,n){if(t!==void 0&&e.forwarderVersion!==t)return!1;let o=e.target?.trim();return o?!!(r&&o.toLowerCase()===r.toLowerCase()):n}function km(e,t,r){return`${e}:${t.toLowerCase()}:${r}`}function ky(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Rm({open:e,children:t}){let[r]=Le.useState(zf);return(0,ds.jsxs)(Ll.Provider,{value:r,children:[e&&(0,ds.jsx)(Ry,{store:r}),t]})}function Ry({store:e}){let t=ga(),{showTargetSelector:r=!0}=t,n=t.requireWalletConnection??t.showRecipientInput===!1,o=!!(t.walletAddress&&ht(t.walletAddress)),[a,i]=Le.useState("deposit"),s=a==="recover",l=Le.useCallback(_=>{i(vt=>(typeof _=="function"?_(vt==="recover"):_)?"recover":"deposit")},[]);Le.useEffect(()=>{Ke("relay","opened")},[]);let[d,c]=Le.useState(void 0),b=Le.useMemo(()=>On({apiBaseUrl:t.apiBaseUrl,environment:t.environment}),[t.apiBaseUrl,t.environment]),m=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=at(t.environment),y=sr("apps.json",g,_=>({min:Nr(_?.relay?.minDepositAmount,g),max:Nr(_?.relay?.maxDepositAmount,g),trustedFactories:Ua(_,g)})),w=Le.useMemo(()=>t.trustedFactories??ts(y?.trustedFactories),[t.trustedFactories,y?.trustedFactories]),{isConnected:f,catalog:p,catalogLoading:x,catalogError:h,origin:v,setOrigin:R,amount:S,setAmount:T,recipient:C,setRecipient:N,recipientValid:E,balance:M,balanceLoading:W,insufficientBalance:L,depositAddress:H,depositAddressResult:A,depositAddressLoading:O,depositAddressError:ce,quote:X,quoteLoading:P,quoteError:xe,canDeposit:ne,deposit:K,depositState:U}=wm(xy(t,d,m,b,w)),{options:te,selected:Z,setSelected:be}=xm({catalogTargets:p?.targets??[],filter:t.targetTokens,defaultTarget:t.defaultTarget});Le.useEffect(()=>{c(Z?.symbol)},[Z?.symbol]);let Ne=t.amount===void 0&&!t.hideAmount,re=!n&&(t.showRecipientInput??!0)&&t.recipient===void 0,we=E&&C.trim().length>0&&ht(C),Fe=!n&&t.recipient!==void 0&&t.recipient.trim().length>0,Ae=n?!o||!we:!f&&!Fe&&!we,pt=!!p&&!we&&!Ae,ye=(t.showRecovery??!1)&&o&&!!(m.writeContract&&m.readContract&&m.waitForReceipt),De=Le.useMemo(()=>t.client?t.client:Vt({baseUrl:b}),[t.client,b]),[ut,Be]=Le.useState({}),[Ge,Ue]=Le.useState(!1),[st,Ht]=Le.useState(0),St=Le.useCallback(()=>Ht(_=>_+1),[]),jt=U.isConfirmed,Ie=we&&(!!A||a!=="deposit"),{orders:Wt,ordersLoading:tt,ordersError:At,ordersInitialized:qe,ordersForRecipient:Xe}=Rn({client:De,recipient:Ie?C:void 0,enabled:Ie,refetchInterval:vm}),nr=Wt,Gt=Z??p?.targets.find(_=>_.isDefault),Ye=Gt?.symbol??p?.destination.symbol,wt=Gt?.isDefault??!0,rt=A?.version,_e=Le.useMemo(()=>Wt.filter(_=>vy(_,rt,Ye,wt)),[Wt,rt,Ye,wt]),ft=Le.useRef(void 0),[Lt,je]=Le.useState(),[nt,qt]=Le.useState(),F=`${C.toLowerCase()}:${Ye?.toLowerCase()??""}:${rt??""}`;Le.useEffect(()=>{let _=Xe?.toLowerCase()===C.toLowerCase();if(!Ie||!qe||!_||At){Ie||(ft.current=void 0,je(void 0),qt(void 0));return}let vt=new Set(_e.map($e=>$e.orderId)),Yt=new Set(_e.flatMap($e=>($e.deposits??[]).map(Cr=>km($e.orderId,Cr.txHash,Cr.blockNumber)))),Dt=ft.current;if(!Dt||Dt.key!==F){ft.current={key:F,orderIds:vt,depositKeys:Yt,statuses:new Map(_e.map($e=>[$e.orderId,$e.status]))},je(void 0),qt(void 0);return}let zr,Jt=0n,ar=!1;for(let $e of _e)for(let Cr of $e.deposits??[]){let Kr=km($e.orderId,Cr.txHash,Cr.blockNumber);if(!Dt.depositKeys.has(Kr)){zr??(zr=$e);try{Jt+=BigInt(Cr.amount),ar=!0}catch{}}}zr??(zr=_e.find($e=>!Dt.orderIds.has($e.orderId))),zr??(zr=_e.find($e=>Dt.statuses.get($e.orderId)!==$e.status));for(let $e of vt)Dt.orderIds.add($e);for(let $e of Yt)Dt.depositKeys.add($e);for(let $e of _e)Dt.statuses.set($e.orderId,$e.status);zr&&(je(zr.orderId),ar&&qt(Jt))},[F,_e,Xe,Ie,C,At,qe]),Le.useEffect(()=>{let _=p?.targets??[];if(!ye||!we||_.length===0){Be({}),Ue(!1);return}let vt=!1;return Ue(!0),Promise.all(_.map(Yt=>De.getRecovery({user:C,target:Yt.symbol}).catch(()=>{}))).then(Yt=>{if(vt)return;let Dt={};_.forEach((zr,Jt)=>{let ar=Yt[Jt];ar&&(Dt[zr.symbol]=ar)}),Be(Dt),Ue(!1)}),()=>{vt=!0}},[De,ye,we,C,p,jt,st]);let Je=Le.useMemo(()=>(p?.targets??[]).map(_=>({symbol:_.symbol,isDefault:_.isDefault,info:ut[_.symbol]})).filter(_=>_.info!==void 0),[p,ut]),B=Le.useMemo(()=>rs(Lo(Je)),[Je]),[se,ve]=Le.useState(void 0),[Te,ot]=Le.useState(),or=!!p&&(p?.targets.length??0)>0&&!d;Le.useEffect(()=>{if(!we||!v||!A||or){ve(void 0),ot(void 0);return}let _=!1,vt=!1,Yt=A.forwarder.toLowerCase();ve(void 0),ot(void 0);async function Dt(){if(!(_||vt)){vt=!0;try{let Jt=await De.getRecovery({user:C,target:d||void 0});if(_)return;if(Jt?.forwarder&&Jt.forwarder.toLowerCase()!==Yt){ve(void 0),ot(void 0);return}if(ot(Jt),!Jt||Jt.suggestedAction!=="sweep"){ve(void 0);return}let ar;try{ar=BigInt(Jt.balance)}catch{ve(void 0);return}let $e=Number(Jt.decimals);if(ar<=0n||!Number.isInteger($e)||$e<0){ve(void 0);return}let Cr=Jt.tokens?.find(Kr=>Kr.address?.toLowerCase()===Jt.token?.toLowerCase()&&Kr.symbol)?.symbol;ve({balance:ar,decimals:$e,symbol:Cr})}catch{}finally{vt=!1}}}Dt();let zr=setInterval(()=>{Dt()},vm);return()=>{_=!0,clearInterval(zr)}},[De,we,C,d,or,v,A,jt]);let ur=Le.useCallback(()=>{!v||!M||T(Zt(M.value,v.token.decimals))},[v,M,T]),Or=Le.useRef(!1),dn=!!H;Le.useEffect(()=>{!dn||Or.current||(Or.current=!0,Ke("relay","deposit_address_shown"))},[dn]);let Rr=U.txHash;Le.useEffect(()=>{Rr&&Ke("relay","deposit_submitted")},[Rr]);let cn=(()=>{let _=Number(y?.min);return Number.isFinite(_)&&_>=0?String(y?.min):"6"})(),Br=(()=>{let _=Number(y?.max);return Number.isFinite(_)&&_>0?String(y?.max):void 0})(),ie=(()=>{if(!v)return 0n;let _=ls(cn,v.token.decimals),vt=BigInt(v.minAmount);return _>vt?_:vt})(),Se=v?Zt(ie,v.token.decimals):cn,G=(()=>{if(!v||!se||ie<=0n)return;let _=v.token.decimals,vt=se.decimals,Yt=_>=vt?se.balance*10n**BigInt(_-vt):se.balance/10n**BigInt(vt-_);if(Yt>=ie)return;let Dt=ie-Yt;return{pending:Zt(se.balance,vt),pendingSymbol:se.symbol,remaining:Zt(Dt,_)}})(),Pe=p?.origins.find(_=>_.chainId===56&&!!(Te?.token&&_.token.address.toLowerCase()===Te.token.toLowerCase()))??p?.origins.find(_=>_.chainId===56&&_.token.symbol.toUpperCase()==="USDT"),q=Number.isInteger(Te?.decimals)&&(Te?.decimals??-1)>=0?Te.decimals:Pe?.token.decimals,He=Te?.tokens?.find(_=>_.address?.toLowerCase()===Te.token?.toLowerCase()&&_.symbol)?.symbol??Pe?.token.symbol,Yr=nt!==void 0&&q!==void 0?Zt(nt,q):void 0,zn=(()=>{if(!v||q===void 0)return;let _=v.token.decimals;if(q>=_)return ie*10n**BigInt(q-_);let vt=10n**BigInt(_-q);return(ie+vt-1n)/vt})(),Sr=Lt?_e.find(_=>_.orderId===Lt):void 0,Tt=Sr??_e.find(_=>_.status==="BSC_FUNDED"||_.status==="BRIDGE_INITIATED"||_.status==="BRIDGE_PENDING"),Ts=(()=>{if(!Tt||zn===void 0)return!1;try{return BigInt(Tt.amountIn)>=zn}catch{return!1}})(),Uo=(()=>{if(!Te||zn===void 0)return!1;try{return BigInt(Te.balance)>0n&&BigInt(Te.balance)>=zn}catch{return!1}})(),uo=(()=>{let _={amount:Yr,symbol:He,backendStatus:Tt?.status};return!A||!Ie||!qe?{phase:"connecting",..._}:Xe?.toLowerCase()!==C.toLowerCase()||At?{phase:"unavailable",..._}:Sr?.status==="COMPLETED"?{phase:"completed",..._,backendStatus:Sr.status}:Sr&&ky(Sr.status)?{phase:"failed",..._,backendStatus:Sr.status}:Tt?.status==="BRIDGE_INITIATED"||Tt?.status==="BRIDGE_PENDING"?{phase:"processing",..._}:Tt?.status==="BSC_FUNDED"&&Ts||Uo?{phase:"funded",..._}:Sr?{phase:"detected",..._,backendStatus:Sr.status}:{phase:"waiting",..._}})(),Fn=v&&Br?ls(Br,v.token.decimals):void 0,fo=v&&S.trim()?ls(S,v.token.decimals):0n,Is=!!(v&&fo>0n&&fo<ie),Es=!!(v&&Fn!==void 0&&fo>0n&&fo>Fn),mo=(()=>{if(v){if(Is)return`Amount is below the ${Se} ${v.token.symbol} minimum.`;if(Es)return`Amount is above the ${Br} ${v.token.symbol} maximum.`}})(),Oa=t.showOneClickDeposit??!1,Ms=v&&S.trim()?ls(S,v.token.decimals).toString():void 0,As={activeView:a,setActiveView:i,recoveryOpen:s,setRecoveryOpen:l,resolvedApiBaseUrl:b,wallet:m,catalog:p,catalogLoading:x,catalogError:h,origin:v,setOrigin:R,amount:S,setAmount:T,recipient:C,setRecipient:N,recipientValid:E,balance:M,balanceLoading:W,insufficientBalance:L,depositAddress:H,depositAddressLoading:O,depositAddressError:ce,arrivalStatus:uo,quote:X,quoteLoading:P,quoteError:xe,canDeposit:ne,deposit:K,depositState:U,targetOptions:te,selectedTarget:Z,setSelectedTarget:be,showAmountInput:Ne,minNotice:v?{min:Se,symbol:v.token.symbol,...G}:void 0,showRecipientInput:re,showTargetSelector:r,showOneClick:Oa,showConnectPrompt:Ae,showRecipientHint:pt,canRecover:ye,recoverableCount:B,recoveryTargetsLoading:Ge,recoveryTargets:Je,recoveryOrders:nr,historyOrdersLoading:tt,historyOrdersError:At,refreshRecovery:St,trustedFactories:w,amountHint:mo,amountSmallestUnits:Ms,onMax:Ne&&M&&M.value>0n?ur:void 0};return Le.useLayoutEffect(()=>{e.publish(As)}),Le.useLayoutEffect(()=>()=>e.publish(null),[e]),null}var cs=require("react/jsx-runtime");function Sy(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:c}=e,[b,m]=ps.useState(!1),g=l!==void 0,y=g?l:b,w=ps.useCallback(f=>{g||m(f),d?.(f)},[g,d]);return(0,cs.jsx)(Al.Provider,{value:e,children:(0,cs.jsx)(Rm,{open:y,children:(0,cs.jsx)(vn,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:y,onOpenChange:w,children:c})})})}var Po=Object.assign(Sy,{Trigger:fm,Content:um});var us=require("react"),Gl=(0,us.createContext)(null);function _l(){let e=(0,us.useContext)(Gl);if(!e)throw new Error("RelayHistory compound components must be used within <RelayHistory>");return e}var xr=V(require("react"),1);var Bn=require("react/jsx-runtime");function Sm({className:e}){let t=_l(),{open:r}=Hr();return xr.useEffect(()=>{r&&Ke("relay","history_opened")},[r]),(0,Bn.jsx)(Ce,{feature:"relay",children:(0,Bn.jsx)(kn,{ariaTitle:"Transfer history",className:e??t.className,children:(0,Bn.jsx)(Cy,{})})})}function Cy(){let e=_l(),{theme:t}=Hr(),r=xr.useMemo(()=>{if(e.client)return e.client;let f=On({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return Vt({baseUrl:f})},[e.client,e.apiBaseUrl,e.environment]),n=e.recipient??e.walletAddress,o=!!(n&&ht(n)),[a,i]=xr.useState(),[s,l]=xr.useState(!1),[d,c]=xr.useState(),b=xr.useRef(e.onError);b.current=e.onError,xr.useEffect(()=>{if(!o){i(void 0),l(!1),c(void 0);return}let f=!1;return i(void 0),l(!0),c(void 0),r.getConfig().then(p=>{f||i(p)}).catch(p=>{if(f)return;let x=p instanceof Error?p:new Error(String(p));c(x),b.current?.(x)}).finally(()=>{f||l(!1)}),()=>{f=!0}},[r,o]);let{orders:m,ordersLoading:g,ordersError:y}=Rn({client:r,recipient:o?n:void 0,enabled:!!a,onError:e.onError}),w=xr.useCallback(f=>{if(!e.onOutlink)return;let x=f.target.closest?.('a[target="_blank"]');x?.href&&e.onOutlink(x.href)},[e.onOutlink]);return(0,Bn.jsx)("div",{className:"rd-root rd-wizard","data-theme":t,children:o?(0,Bn.jsx)("div",{onClick:w,children:(0,Bn.jsx)($i,{orders:m,isLoading:s||g,error:d??y,catalog:a,showTitle:!1})}):(0,Bn.jsx)(ya,{requiresIdentity:!0})})}var fs=require("react/jsx-runtime");function Cm({asChild:e,children:t}){return(0,fs.jsx)(Ce,{feature:"relay",children:(0,fs.jsx)(Do,{asChild:e??t!=null,children:t??(0,fs.jsx)("button",{type:"button","data-track":"open",children:"History"})})})}var Hl=require("react/jsx-runtime");function Ny(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o="min(640px, calc(100vw - 32px))",drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:c}=e;return(0,Hl.jsx)(Gl.Provider,{value:e,children:(0,Hl.jsx)(vn,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:c})})}var Ql=Object.assign(Ny,{Trigger:Cm,Content:Sm});var Dr=V(require("react"),1);var vr=V(require("react"),1);var ms=[],Ty=3e4;function Nm({client:e,recipient:t}){let[r,n]=vr.useState({targets:ms}),[o,a]=vr.useState(0),i=vr.useRef(void 0),s=vr.useRef(void 0),l=t&&ht(t)?t.toLowerCase():void 0;vr.useEffect(()=>{if(!l){n({targets:ms});return}let w=!1,f=i.current;if(!f||f.client!==e||f.recipientKey!==l||f.generation!==o){let p=(async()=>{let x,h=[];try{h=(await e.getConfig()).targets}catch(C){x=C instanceof Error?C:new Error(String(C))}let v=h.length===0?[()=>e.getRecovery({user:l})]:h.map(C=>()=>e.getRecovery({user:l,target:C.symbol})),R=await Promise.all(v.map(async C=>{try{return{info:await C()}}catch(N){return{error:N instanceof Error?N:new Error(String(N))}}})),S=h.length===0?R[0]?.info?[{symbol:"",isDefault:!0,info:R[0].info}]:[]:h.flatMap((C,N)=>R[N]?.info?[{symbol:C.symbol,isDefault:C.isDefault,info:R[N].info}]:[]),T=R.find(C=>C.error)?.error;return{targets:S,badgeFailed:!!(x||T&&S.length===0),error:x??T}})().catch(x=>({targets:ms,badgeFailed:!0,error:x instanceof Error?x:new Error(String(x))}));f={client:e,recipientKey:l,generation:o,promise:p},i.current=f,p.finally(()=>{s.current={client:e,recipientKey:l,at:Date.now()},i.current?.promise===p&&(i.current=void 0)})}return f.promise.then(p=>{w||n({recipientKey:l,targets:p.targets,badgeFailed:p.badgeFailed,error:p.error})}),()=>{w=!0}},[e,l,o]);let d=vr.useCallback(()=>a(w=>w+1),[]),c=vr.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<Ty||a(p=>p+1)},[e,l]),b=l&&r.recipientKey===l?r.targets:ms,m=l&&r.recipientKey===l?r.error:void 0,g=!!(l&&r.recipientKey!==l),y=!!(l&&r.recipientKey===l&&r.badgeFailed);return vr.useMemo(()=>({count:y?0:rs(Lo(b)),targets:b,loading:g,error:m,refresh:d,refreshIfStale:c}),[b,g,y,m,d,c])}var gs=require("react"),Vl=(0,gs.createContext)(null);function ql(){let e=(0,gs.useContext)(Vl);if(!e)throw new Error("RelayRecovery compound components must be used within <RelayRecovery>");return e}function Yl(){return ql().props}function Tm(){return ql().recovery}function Im(){return ql().recovery.count}var co=V(require("react"),1);var an=require("react/jsx-runtime");function Em({className:e}){let t=Yl(),{open:r}=Hr();return co.useEffect(()=>{r&&Ke("relay","recovery_opened")},[r]),(0,an.jsx)(Ce,{feature:"relay",children:(0,an.jsx)(kn,{ariaTitle:"Recover stuck funds",className:e??t.className,children:(0,an.jsx)(Iy,{})})})}function Iy(){let e=Yl(),{targets:t,loading:r,refresh:n}=Tm(),{theme:o}=Hr(),a=co.useMemo(()=>On({apiBaseUrl:e.apiBaseUrl,environment:e.environment}),[e.apiBaseUrl,e.environment]),i=co.useMemo(()=>e.client?e.client:Vt({baseUrl:a}),[e.client,a]),s=co.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&&ht(e.walletAddress)?e.walletAddress:void 0,d=!!(l&&(!e.recipient||ht(e.recipient)&&e.recipient.toLowerCase()===l.toLowerCase())),c=d?l:void 0,b=at(e.environment),m=sr("apps.json",b,x=>Ua(x,b)),g=co.useMemo(()=>e.trustedFactories??ts(m),[e.trustedFactories,m]),y=!!(e.writeContract&&e.readContract&&e.waitForReceipt),w=!!c&&y,f=c,{orders:p}=Rn({client:i,recipient:w?f:void 0,enabled:w,live:!1});return(0,an.jsxs)("div",{className:"rd-root rd-wizard","data-theme":o,children:[!l&&(0,an.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-connect-note",children:"Connect a wallet to check recoverable funds."}),l&&!d&&(0,an.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-recipient-note",children:"Recovery is only available for the connected wallet."}),d&&!y&&(0,an.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-unsupported-note",children:"This wallet can't sign recovery transactions."}),w&&(0,an.jsx)(os,{client:e.client,apiBaseUrl:a,recipient:c,wallet:s,trustedFactories:g,targets:t,targetsLoading:r,orders:p,onRecovered:n,onRecoverySuccess:e.onRecoverySuccess,showTitle:!1,onError:e.onError})]})}var hs=require("react/jsx-runtime");function Mm({asChild:e,children:t}){let r=Im();return(0,hs.jsx)(Ce,{feature:"relay",children:(0,hs.jsx)(Do,{asChild:e??t!=null,dataAttributes:{"data-rd-recovery-count":r},children:t??(0,hs.jsx)("button",{type:"button","data-track":"open",children:"Recover"})})})}var Kl=require("react/jsx-runtime");function Ey(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:c}=e,[b,m]=Dr.useState(!1),g=l!==void 0,y=g?l:b,w=Dr.useCallback(S=>{g||m(S),d?.(S)},[g,d]),f=Dr.useMemo(()=>{if(e.client)return e.client;let S=On({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return Vt({baseUrl:S})},[e.client,e.apiBaseUrl,e.environment]),p=e.walletAddress&&ht(e.walletAddress)?e.walletAddress:void 0,x=p&&(!e.recipient||ht(e.recipient)&&e.recipient.toLowerCase()===p.toLowerCase())?p:void 0,h=Nm({client:f,recipient:x});Dr.useEffect(()=>{y&&h.refreshIfStale()},[y,h.refreshIfStale]);let v=Dr.useRef(void 0);Dr.useEffect(()=>{!y||!h.error||v.current===h.error||(v.current=h.error,e.onError?.(h.error))},[y,h.error,e.onError]);let R=Dr.useMemo(()=>({props:e,recovery:h}),[e,h]);return(0,Kl.jsx)(Vl.Provider,{value:R,children:(0,Kl.jsx)(vn,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:y,onOpenChange:w,children:c})})}var Zl=Object.assign(Ey,{Trigger:Mm,Content:Em});var kr=require("react");function Xl(e={}){let t=(0,kr.useRef)(e);t.current=e;let r=(0,kr.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayConfig: either `client` or `apiBaseUrl` must be provided");return Vt({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.enabled??!0,o=e.refetchInterval,[a,i]=(0,kr.useState)(),[s,l]=(0,kr.useState)(!1),[d,c]=(0,kr.useState)(),[b,m]=(0,kr.useState)(0);(0,kr.useEffect)(()=>{if(!n){i(void 0),l(!1),c(void 0);return}let y=!1,w=!1;i(void 0),l(!0),c(void 0);async function f(){if(!(y||w)){w=!0;try{let x=await r.getConfig();if(y)return;i(x),c(void 0)}catch(x){if(y)return;let h=x instanceof Error?x:new Error(String(x));c(h),t.current.onError?.(h)}finally{w=!1,y||l(!1)}}}f();let p=typeof o=="number"&&Number.isFinite(o)&&o>0?setInterval(()=>{f()},o):void 0;return()=>{y=!0,p&&clearInterval(p)}},[r,n,b,o]);let g=(0,kr.useCallback)(()=>m(y=>y+1),[]);return{config:a,loading:s,error:d,refresh:g}}var Lm=require("@tanstack/react-query"),Pr=require("react");var My=1,Am=new WeakMap;function Ay(e){let t=Am.get(e);if(t!==void 0)return t;let r=My++;return Am.set(e,r),r}function Jl(e={}){let t=(0,Pr.useRef)(e);t.current=e;let r=(0,Pr.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayRecovery: either `client` or `apiBaseUrl` must be provided");return Vt({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.recipient,o=n&&ht(n)?n:void 0,a=e.target,i=e.query,s=(0,Pr.useMemo)(()=>Ay(r),[r]),l=(0,Pr.useMemo)(()=>["relay","recovery",s,o??null,a??null],[s,o,a]),d=(0,Lm.useQuery)({retry:!1,...i,queryKey:l,queryFn:async()=>{if(!o)throw new Error("useRelayRecovery: a valid EVM recipient is required");return r.getRecovery({user:o,target:a})},enabled:o?i?.enabled:!1}),c=(0,Pr.useRef)(0);(0,Pr.useEffect)(()=>{let w=d.error,f=d.errorUpdatedAt;!w||f===c.current||(c.current=f,t.current.onError?.(w),w instanceof Lr&&w.status===401&&t.current.onUnauthorized?.())},[d.error,d.errorUpdatedAt]);let b=(0,Pr.useCallback)(()=>{d.refetch()},[d.refetch]),m=xa({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:b}),g=d.data,y=(0,Pr.useCallback)(async(w,f)=>{g&&await m.recover(g,w,f)},[m,g]);return{info:g,loading:d.isLoading,error:d.error??void 0,isFetching:d.isFetching,refresh:b,recover:y,recoveryState:m.stateFor(g?.forwarder)}}var it=require("react/jsx-runtime"),Ly={bscBridge:"https://bscscan.com/tx/",crossFinalize:"https://scan.crosstoken.io/tx/",crossExecute:"https://scan.crosstoken.io/tx/"},Dy={bscBridge:"Bridge tx (BSC)",crossFinalize:"Finalize tx (CROSS)",crossExecute:"Execute tx (CROSS)"};function Py(e){return e==="done"?"\u2713":e==="active"?"\u25CF":""}function Dm(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Oy(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 ed({orderId:e,order:t,error:r}){let n=!t&&!r;return(0,it.jsxs)("section",{className:"rd-card",children:[(0,it.jsxs)("div",{className:"rd-card-header",children:[(0,it.jsx)("h2",{className:"rd-card-title",children:"4. Status"}),t&&(0,it.jsx)("span",{className:`rd-status-pill${t.status==="COMPLETED"?" rd-status-pill-success":Dm(t.status)?" rd-status-pill-failure":""}`,children:t.status})]}),(0,it.jsxs)("p",{className:"rd-card-hint",children:["Order ",e]}),n&&(0,it.jsxs)("p",{className:"rd-muted",children:[(0,it.jsx)("span",{className:"rd-spinner"})," Loading status..."]}),r&&(0,it.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load order status: ",r.message]}),t&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("ol",{className:"rd-stepper",children:t.steps.map((o,a)=>(0,it.jsxs)("li",{className:Oy(o.status),children:[(0,it.jsxs)("div",{className:"rd-stepper-rail",children:[(0,it.jsx)("span",{className:"rd-stepper-dot",children:Py(o.status)}),a<t.steps.length-1&&(0,it.jsx)("span",{className:"rd-stepper-line"})]}),(0,it.jsxs)("div",{className:"rd-stepper-body",children:[(0,it.jsx)("div",{className:"rd-stepper-label",children:o.label}),o.key==="bridge"&&t.txs.bscBridge&&(0,it.jsx)("div",{className:"rd-stepper-meta",children:(0,it.jsx)($l,{orderTxs:t.txs,txKey:"bscBridge"})}),o.key==="deliver"&&(t.txs.crossFinalize||t.txs.crossExecute)&&(0,it.jsxs)("div",{className:"rd-stepper-meta",children:[t.txs.crossFinalize&&(0,it.jsx)($l,{orderTxs:t.txs,txKey:"crossFinalize"}),t.txs.crossExecute&&(0,it.jsx)($l,{orderTxs:t.txs,txKey:"crossExecute"})]})]})]},o.key))}),Dm(t.status)&&(0,it.jsxs)("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"&&(0,it.jsx)("div",{className:"rd-callout rd-callout-success",children:"crossd delivered. This order is complete."})]})]})}function $l({orderTxs:e,txKey:t}){let r=e[t];return r?(0,it.jsxs)("a",{href:`${Ly[t]}${r}`,target:"_blank",rel:"noreferrer",children:[Dy[t],": ",r.slice(0,10),"..."]}):null}function ka(e){return`${e.chainId}:${e.address.toLowerCase()}`}function bs(e,t){return ka(e)===ka(t)}function Ra(e,t){if(t)return e.find(r=>bs(r,t))}function Oo(e,t,r){return t?{fromTokens:(r==="swap"?[t.swap.from]:t.bridge.from).map(o=>Ra(e,o)).filter(o=>!!o),targetToken:Ra(e,t.target)}:{fromTokens:[],targetToken:void 0}}function Sa(e,t){return e.some(r=>r.chainId===t.chainId&&r.address.toLowerCase()===t.address.toLowerCase())}function Pm(e){let t=/^v?(\d+(?:\.\d+)*)(?:-([0-9A-Za-z.-]+))?$/.exec(e.trim());return t?{parts:t[1].split(".").map(r=>Number(r)),prerelease:t[2]??null}:null}function By(e,t){let r=Pm(e),n=Pm(t);if(!r||!n)return null;let o=Math.max(r.parts.length,n.parts.length);for(let a=0;a<o;a+=1){let i=(r.parts[a]??0)-(n.parts[a]??0);if(i!==0)return i<0?-1:1}return r.prerelease===n.prerelease?0:r.prerelease===null?1:n.prerelease===null||r.prerelease<n.prerelease?-1:1}function Om(e,t=Wn){if(!e)return!0;let r=By(t,e);return r===null?!0:r>=0}var Bm={swap:"swap",bridge:"bridge",transfer:"transferCrypto"};function Bo(e,t){return t?.[Bm[e]]??e!=="transfer"}function zo(e,t){return Om(t?.[Bm[e]])}function Ca(e,t,r){return Bo(e,t)&&zo(e,r)}var zm={dev:"https://stg.oneusd.money/",stage:"https://stg.oneusd.money/",production:"https://www.oneusd.money/"};function Fm(e){let t=e.trim().toLowerCase().replace(/\.$/,"");return t==="oneusd.money"||t.endsWith(".oneusd.money")}function Um(e,t){return e?.items?.find(({id:n,type:o})=>n.toLowerCase()==="oneusd"||o.toLowerCase()==="oneusd")?.url[t]}var ws=V(require("react"),1);function jm(e){let[t,r]=ws.useState(null);return ws.useEffect(()=>{if(!e)return;let n=!0;return ol().then(o=>{n&&r(o)}).catch(()=>{}),()=>{n=!1}},[e]),t}function Wm(e,t){return t==="bridge"?!0:e==="bridge"||e==="bridge-swap"||e==="swap-bridge"}function zy(e){if(!e)return"";let[t="0",r=""]=e.replace(/,/g,"").split("."),o=(t.replace(/^0+(?=\d)/,"")||"0").replace(/\B(?=(\d{3})+(?!\d))/g,","),a=r.slice(0,6).replace(/0+$/,"");return a?`${o}.${a}`:o}function Fy(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function Gm(e,t){return Wm(e.pathType,t)?"Bridging":"Swapping"}function _m(e,t){let r=zy(e.toAmount);if(Wm(e.pathType,t)){let n=`arriving on ${Fy(e.toToken.chainId)}`;return r?`${r} ${n}`:n}return r?`${r} Swapped`:"Transaction completed"}var pr=require("react/jsx-runtime");function Hm(e){return(0,pr.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,pr.jsx)("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 Qm(e){return(0,pr.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[(0,pr.jsx)("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"}),(0,pr.jsx)("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 Vm(e){return(0,pr.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[(0,pr.jsx)("rect",{x:"4",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,pr.jsx)("rect",{x:"14",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,pr.jsx)("rect",{x:"4",y:"14",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,pr.jsx)("path",{d:"M14 14h2v2h-2zM18 18h2v2h-2z",fill:"currentColor"})]})}function qm(e){return(0,pr.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,pr.jsx)("path",{d:"m9 6 6 6-6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ym(e){return(0,pr.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,pr.jsx)("path",{d:"m6 6 12 12M18 6 6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}he(`.gou-fab{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 .25s ease,padding .25s 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 .25s ease,height .25s 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 .2s ease,opacity .2s 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:24px;padding:24px}.gou-close{position:absolute;top:16px;right:16px;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-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-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}}
20
- `);var ae=require("react/jsx-runtime"),Uy=[{id:"swap",label:"Swap",eta:"Instant",Icon:Hm},{id:"bridge",label:"Bridge",Icon:Qm},{id:"transfer",label:"Transfer Crypto",eta:"QR deposit",Icon:Vm}],jy=4e3;function Km(e){return e instanceof Error?e.message:typeof e=="string"?e:"Unknown error"}function ys(e,t){try{e?.(t)}catch{}}function Wy({compactTrigger:e,collapseOnScroll:t,scrollThreshold:r}){let[n,o]=Ve.useState(!1),[a,i]=Ve.useState(!1);return Ve.useEffect(()=>{o(wo())},[]),Ve.useEffect(()=>{if(t===!1){i(!1);return}let s=()=>i(window.scrollY>(r??200));return s(),window.addEventListener("scroll",s,{passive:!0}),()=>window.removeEventListener("scroll",s)},[t,r]),!!(e||n||a)}function Gy({loading:e}){return(0,ae.jsxs)("div",{className:"gou-route-state",role:"status",children:[e&&(0,ae.jsx)("span",{className:"gou-spinner","aria-hidden":"true"}),(0,ae.jsx)("h3",{children:e?"Preparing route":"Route unavailable"}),(0,ae.jsx)("p",{children:e?"Loading token and contract configuration.":"The configured ONEUSD route is not available in this environment."})]})}function td({walletAddress:e,tokens:t,pairs:r,loading:n=!1,bridge:o,relay:a,env:i,targetSymbol:s,relayTargetSymbol:l="ONEUSD",targetIconUrl:d,mode:c="floating",buttonComponent:b,theme:m="dark",mobileBreakpoint:g=768,drawerDirection:y="bottom",dialogWidth:w="480px",drawerMaxWidth:f,drawerMinWidth:p,style:x,className:h,contentClassName:v,hidden:R=!1,compactTrigger:S,collapseOnScroll:T=!0,scrollThreshold:C=200,waitForTransaction:N,transactionResultDurationMs:E=jy,onRequestConnect:M,onEvent:W}){let[L,H]=Ve.useState(!1),[A,O]=Ve.useState(null),[ce,X]=Ve.useState(!1),[P,xe]=Ve.useState(null),[ne,K]=Ve.useState(!1),U=Ve.useRef(0),te=Ve.useRef(!1),Z=Ve.useRef(null),be=Ve.useRef(!0),Ne=Wy({compactTrigger:S,collapseOnScroll:T,scrollThreshold:C}),re=Ve.useMemo(()=>at(i),[i]),we=sr("apps.json",re,F=>F?.getOneUsd?.modes),Fe=sr("apps.json",re,F=>F?.getOneUsd?.minVersions),pt=sr("app-launcher-v2.json",re,F=>Um(F,re))??zm[re],ye=Ve.useMemo(()=>Uy.filter(({id:F})=>Bo(F,we)),[we]),De=ye.length>0,ut=jm(!R&&De),Be=Ve.useMemo(()=>Oo(t,r,"swap"),[r,t]),Ge=Ve.useMemo(()=>Oo(t,r,"bridge"),[r,t]),Ue=Be.targetToken??Ge.targetToken,st=s??Ue?.symbol??"ONEUSD",Ht=d??Ue?.iconUrl??Dl,St=c==="floating"&&Ne,jt=c==="button"&&b?b:"button";Ve.useEffect(()=>(be.current=!0,()=>{be.current=!1,Z.current&&clearTimeout(Z.current)}),[]),Ve.useEffect(()=>{K(!Fm(window.location.hostname))},[]),Ve.useEffect(()=>{De||H(!1)},[De]);let Ie=Ve.useCallback(F=>W?.(F),[W]),Wt=Ve.useCallback(()=>{P||!De||(Ie({name:"fab_click",state:St?"icon_only":"expanded"}),H(!0))},[Ie,De,P,St]),tt=Ve.useCallback(F=>{P||!Ca(F,we,Fe)||(Ie({name:"action_select",action:F}),H(!1),F==="transfer"&&X(!0),O(F))},[Ie,we,Fe,P]),At=Ve.useCallback(F=>{Ie({name:"connect_click",action:F}),Promise.resolve(M?.()).catch(Je=>{Ie({name:"failure",action:F,message:Km(Je)})})},[Ie,M]),qe=A==="swap"||A==="bridge"?A:null,Xe=qe==="swap"?Be:Ge,nr=!!(r&&Xe.targetToken&&Xe.fromTokens.length>0),Gt=Ve.useMemo(()=>{if(!Xe.targetToken)return;let F=Xe.targetToken;return Je=>{let B=o.getToTokens?.(Je,t);return B&&!Sa(B,F)?[]:[F]}},[o.getToTokens,Xe.targetToken,t]),{onSubmitted:Ye,onSuccess:wt,onFailed:rt,..._e}=o,{onDeposited:ft,onError:Lt,...je}=a??{},nt=Ve.useCallback((F,Je,B,se,ve)=>{!be.current||U.current!==F||(xe({id:F,phase:Je,action:B,label:se,txHash:ve}),Z.current&&clearTimeout(Z.current),Z.current=setTimeout(()=>{!be.current||U.current!==F||(te.current=!1,xe(null),Z.current=null)},Math.max(0,E)))},[E]),qt=Ve.useCallback((F,Je)=>{if(te.current)return;te.current=!0;let B=++U.current,se=Gm(F,Je);xe({id:B,phase:"pending",action:Je,label:se,txHash:F.txHash}),H(!1),O(null),ys(Ye,F),Promise.resolve().then(()=>N?.(F)).then(()=>{!be.current||U.current!==B||(nt(B,"success",Je,_m(F,Je),F.txHash),Ie({name:"success",action:Je,txHash:F.txHash}))}).catch(ve=>{if(!be.current||U.current!==B)return;let Te=Km(ve);nt(B,"failure",Je,"Transaction failed",F.txHash),ys(rt,{message:Te,txHash:F.txHash}),Ie({name:"failure",action:Je,message:Te})})},[Ie,rt,Ye,nt,N]);return(0,ae.jsx)(Ce,{feature:"get_one_usd",children:(0,ae.jsxs)("div",{className:h,"data-theme":m,"data-gou-mode":c,children:[(0,ae.jsxs)(vn,{theme:m,mobileBreakpoint:g,drawerDirection:y,dialogWidth:w,drawerMaxWidth:f,drawerMinWidth:p,open:L,onOpenChange:H,children:[!R&&De&&(c==="button"||!P)&&(0,ae.jsxs)(jt,{type:"button",className:"gou-fab",style:x,"data-trigger-mode":c,"data-icon-only":St?"true":"false",onClick:Wt,disabled:!!P,"aria-label":`Get ${st}`,"data-track":"fab_click",children:[c==="floating"&&(0,ae.jsxs)("span",{className:"gou-tooltip",children:["Choose how to get ",st]}),(0,ae.jsx)("span",{className:"gou-fab-icon-frame",children:(0,ae.jsx)("img",{className:"gou-fab-icon",src:Ht,alt:""})}),(0,ae.jsxs)("span",{className:"gou-fab-label gou-fab-trigger-copy",children:[(0,ae.jsxs)("span",{children:["Get ",st]}),ut!==null&&(0,ae.jsx)("span",{className:"gou-fab-apr",children:gi(ut)})]})]}),P&&(0,ae.jsxs)("div",{className:"gou-fab gou-fab-status",style:c==="floating"?x:void 0,"data-floating-status":"true","data-icon-only":"false","data-tx-phase":P.phase,role:"status","aria-live":"polite","aria-label":P.phase==="pending"?`${P.label} transaction in progress`:P.label,children:[(0,ae.jsxs)("span",{className:"gou-fab-icon-frame",children:[(0,ae.jsx)("img",{className:"gou-fab-icon",src:Ht,alt:""}),P.phase==="pending"&&(0,ae.jsx)("span",{className:"gou-fab-progress-ring","aria-hidden":"true"})]}),(0,ae.jsx)("span",{className:"gou-fab-label",children:P.phase==="pending"?(0,ae.jsxs)(ae.Fragment,{children:[P.label,(0,ae.jsxs)("span",{className:"gou-fab-dots","aria-hidden":"true",children:[(0,ae.jsx)("span",{children:"."}),(0,ae.jsx)("span",{children:"."}),(0,ae.jsx)("span",{children:"."})]})]}):P.label})]}),(0,ae.jsx)(kn,{ariaTitle:`Get ${st}`,className:`gou-shell gou-chooser ${v??""}`,children:(0,ae.jsxs)("div",{className:"gou-chooser-body",children:[(0,ae.jsx)("button",{type:"button",className:"gou-close",onClick:()=>H(!1),"aria-label":"Close",children:(0,ae.jsx)(Ym,{})}),(0,ae.jsxs)("header",{className:"gou-intro",children:[(0,ae.jsxs)("h2",{children:["Get ",st]}),ne&&(0,ae.jsxs)("a",{className:"gou-intro-link",href:pt,target:"_blank",rel:"noopener noreferrer","aria-label":"What is ONEUSD? Opens in a new tab","data-track":"oneusd_learn_more",children:[(0,ae.jsx)(mp,{size:16,className:"gou-intro-link-icon"}),(0,ae.jsx)("span",{children:"What is ONEUSD?"})]})]}),(0,ae.jsx)("ul",{className:"gou-actions",children:ye.map(({id:F,label:Je,eta:B,Icon:se})=>{let ve=F==="swap"?`Swap the ${Be.fromTokens[0]?.symbol??"ONE"} you already hold`:F==="bridge"?`Bridge USDT to ${st}`:"Deposit from any chain or exchange",Te=F==="swap"?r?.swap.feeDelegated:F==="bridge"?r?.bridge.feeDelegated:!1,ot=zo(F,Fe);return(0,ae.jsx)("li",{children:(0,ae.jsxs)("button",{type:"button",className:"gou-action",onClick:()=>tt(F),disabled:!ot,"data-supported":ot?"true":"false","data-track":"action_select","data-track-id":F,children:[(0,ae.jsx)("span",{className:"gou-action-icon",children:(0,ae.jsx)(se,{})}),(0,ae.jsxs)("span",{className:"gou-action-copy",children:[(0,ae.jsxs)("span",{className:"gou-action-title",children:[(0,ae.jsx)("span",{children:Je}),Te&&ot&&(0,ae.jsx)("span",{className:"gou-badge",children:"Fee Delegated"}),!ot&&(0,ae.jsx)("span",{className:"gou-badge","data-tone":"muted",children:"Update required"})]}),(0,ae.jsx)("span",{className:"gou-action-description",children:ot?B?`${ve} \xB7 ${B}`:ve:"Update the app to use this option"})]}),(0,ae.jsx)(qm,{className:"gou-action-chevron"})]})},F)})})]})})]}),(0,ae.jsx)(vn,{theme:m,mobileBreakpoint:g,drawerDirection:y,dialogWidth:w,drawerMaxWidth:f,drawerMinWidth:p,open:!!qe,onOpenChange:F=>{F||O(null)},children:(0,ae.jsx)(kn,{ariaTitle:`${qe==="bridge"?"Bridge":"Swap"} to ${st}`,className:`gou-shell gou-execution ${v??""}`,children:nr?(0,ae.jsx)(to,{..._e,env:i,variant:"embedded",title:qe==="bridge"?"Bridge":"Swap",feeDelegated:r?.swap.feeDelegated,walletAddress:e??"",isConnected:!!e,onRequestConnect:()=>At(qe??"swap"),tokens:Xe.fromTokens,initialFromToken:Xe.fromTokens[0],initialToToken:Xe.targetToken,getToTokens:Gt,onClose:()=>O(null),onBackToWallet:()=>{O(null),H(!0)},onSubmitted:F=>{qt(F,qe??"swap")},onSuccess:F=>{ys(wt,F)},onFailed:F=>{ys(rt,F),Ie({name:"failure",action:qe??"swap",message:F.message})}},`${qe}:${Xe.fromTokens.map(F=>`${F.chainId}:${F.address}`).join(",")}`):(0,ae.jsx)(Gy,{loading:n||!r})})}),ce&&(0,ae.jsx)(Po,{...je,environment:je.environment??i,theme:je.theme??m,mobileBreakpoint:je.mobileBreakpoint??g,drawerDirection:je.drawerDirection??y,dialogWidth:je.dialogWidth??w,drawerMaxWidth:je.drawerMaxWidth??f,drawerMinWidth:je.drawerMinWidth??p,walletAddress:e,open:A==="transfer",onOpenChange:F=>{F||O(null)},requireWalletConnection:!0,showRecovery:je.showRecovery??!0,showRecipientInput:!1,hideAmount:!0,targetTokens:[l],defaultTarget:l,onRequestConnect:()=>At("transfer"),onDeposited:F=>{ft?.(F),Ie({name:"success",action:"transfer",txHash:F})},onError:F=>{Lt?.(F),Ie({name:"failure",action:"transfer",message:F.message})},children:(0,ae.jsx)(Po.Content,{})})]})})}var ln=V(require("react"),1),fg=V(require("@radix-ui/react-dialog"),1),mg=require("vaul");var xs=require("react"),vs=(0,xs.createContext)(null);function Na(){let e=(0,xs.useContext)(vs);if(!e)throw new Error("WalletConnectModal compound components must be used within <WalletConnectModal>");return e}var po=require("react");function Ta(){let[e,t]=(0,po.useState)([]),[r,n]=(0,po.useState)(!0);(0,po.useEffect)(()=>{if(typeof window>"u"){n(!1);return}let a=[],i=l=>{let{info:d}=l.detail;d?.rdns&&!a.some(c=>c.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(()=>n(!1),500);return()=>{window.removeEventListener("eip6963:announceProvider",i),window.removeEventListener("eip6963:crossAnnounceProvider",i),clearTimeout(s)}},[]);let o=(0,po.useCallback)(a=>e.some(i=>i.rdns===a),[e]);return{wallets:e,isDetected:o,isLoading:r}}var Zm=V(require("@radix-ui/react-dialog"),1),Xm=require("vaul");var ks=require("react/jsx-runtime");function Jm({asChild:e,children:t}){let{isMobile:r}=Na(),n=r?Xm.Drawer.Trigger:Zm.Trigger;return(0,ks.jsx)(Ce,{feature:"wallet_connect",children:(0,ks.jsx)(n,{asChild:e??t!=null,children:t??(0,ks.jsx)("button",{type:"button","data-track":"open",children:"Connect Wallet"})})})}var cg=require("react"),pg=require("@nexus-cross/crossx-design-system"),sn=V(require("@radix-ui/react-dialog"),1),Ia=require("vaul");var Ss=require("@nexus-cross/crossx-design-system");var Re=require("react/jsx-runtime"),_y='<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>',Hy=`data:image/svg+xml,${encodeURIComponent(_y)}`;function Rs(){return(0,Re.jsx)("img",{src:Hy,width:40,height:40,alt:"",style:{display:"block"}})}function $m(){return(0,Re.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[(0,Re.jsxs)("g",{clipPath:"url(#clip0_1331_27065)",children:[(0,Re.jsx)("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"}),(0,Re.jsx)("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"}),(0,Re.jsx)("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"}),(0,Re.jsx)("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"}),(0,Re.jsx)("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"}),(0,Re.jsx)("path",{d:"M22.1857 36.1951V39.831H17.6699V36.1951H22.1857Z",fill:"#C0C4CD"}),(0,Re.jsx)("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"})]}),(0,Re.jsx)("defs",{children:(0,Re.jsx)("clipPath",{id:"clip0_1331_27065",children:(0,Re.jsx)("rect",{width:"40",height:"40",fill:"white"})})})]})}function eg(){return(0,Re.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Re.jsx)("path",{d:"M12.23 16.81L20 9.04L27.77 16.81L32.29 12.29L20 0L7.71 12.29L12.23 16.81Z",fill:"#F3BA2F"}),(0,Re.jsx)("path",{d:"M9.04 20L4.52 15.48L0 20L4.52 24.52L9.04 20Z",fill:"#F3BA2F"}),(0,Re.jsx)("path",{d:"M12.23 23.19L20 30.96L27.77 23.19L32.29 27.71L20 40L7.71 27.71L12.23 23.19Z",fill:"#F3BA2F"}),(0,Re.jsx)("path",{d:"M35.48 24.52L40 20L35.48 15.48L30.96 20L35.48 24.52Z",fill:"#F3BA2F"}),(0,Re.jsx)("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 tg(){return(0,Re.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"246",viewBox:"0 0 247 246",fill:"none",children:[(0,Re.jsx)("rect",{width:"247.005",height:"245.105",rx:"36",fill:"#121212"}),(0,Re.jsx)("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"}),(0,Re.jsx)("path",{d:"M59.8364 99.8915V59.7551H12.0414L30.4787 77.8377V99.8915H59.8364Z",fill:"#2FD7FF"}),(0,Re.jsx)("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 rg(){return(0,Re.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Re.jsxs)("g",{clipPath:"url(#clip0_1185_7785)",children:[(0,Re.jsx)("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"}),(0,Re.jsx)("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"})]}),(0,Re.jsx)("defs",{children:(0,Re.jsx)("clipPath",{id:"clip0_1185_7785",children:(0,Re.jsx)("rect",{width:"28",height:"28",fill:"white"})})})]})}function ng(){return(0,Re.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[(0,Re.jsx)("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"}),(0,Re.jsx)("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"}),(0,Re.jsx)("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"}),(0,Re.jsx)("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 og(){return(0,Re.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Re.jsx)("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 ag(){return(0,Re.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Re.jsx)("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var Cs={cross_embedded:{id:"cross_embedded",name:Ss.WALLET_LABELS.social,description:"Sign in with Google or Apple",icon:Rs},cross_wallet:{id:"cross_wallet",name:Ss.WALLET_LABELS.app,description:"App approval is required",icon:Rs,featured:!0},cross_extension:{id:"cross_extension",name:Ss.WALLET_LABELS.extension,description:"Browser extension approval is required",icon:Rs,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:$m,rdns:"io.metamask"},binance:{id:"binance",name:"Binance",description:"Mobile app only \u2014 Add CROSS network first",icon:eg},verse8:{id:"verse8",name:"Verse8 Wallet",description:"Optimized for Forge and Verse8 ecosystem",icon:tg,badge:"For Forge"},tron:{id:"tron",name:"Tron Wallet",description:"Dedicated for Tron-based transactions and assets",icon:rg,badge:"For SHOP"}};function rd(e){return Cs[e]}var Ns={google:{id:"google",name:"Google",icon:ng},apple:{id:"apple",name:"Apple",icon:og}};function ig(e){return Ns[e]}var $=require("react/jsx-runtime");function sg(e,t){Ke("connect","wallet_selected",{tags:{item_id:e}});let r=t?.();r instanceof Promise&&r.then(()=>Ke("connect","connected"),n=>Ke("connect","connected",{status:"failure",reason:gr(n)}))}function Qy({wallet:e,detected:t,onConnect:r}){let n=()=>{if(e.installUrl&&!t){window.open(e.installUrl,"_blank","noopener,noreferrer");return}r()},o=e.icon,a=e.featured===!0;return(0,$.jsxs)("button",{type:"button",className:ze("wcm-wallet-item",a&&"wcm-wallet-item--featured"),"data-track":"wallet_item_click","data-track-id":e.id,onClick:n,children:[(0,$.jsxs)("div",{className:"wcm-wallet-item-left",children:[(0,$.jsx)("div",{className:"wcm-wallet-icon",children:(0,$.jsx)(o,{})}),(0,$.jsxs)("div",{className:"wcm-wallet-name-row",children:[(0,$.jsx)("span",{className:"wcm-wallet-name",children:e.name}),e.badge&&(0,$.jsx)("span",{className:"wcm-wallet-badge",children:e.badge})]})]}),e.installUrl&&(t?(0,$.jsx)("span",{className:"wcm-installed-label",children:"Installed"}):(0,$.jsx)("span",{className:"wcm-install-btn",children:"Install"}))]})}function Vy({social:e,onSignIn:t}){let r=e.icon,n=`Sign in with ${e.name}`;return(0,$.jsxs)("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":n,children:[(0,$.jsx)("span",{className:"wcm-social-icon",children:(0,$.jsx)(r,{})}),(0,$.jsx)("span",{className:"wcm-social-name",children:n})]})}function lg(){let{wallets:e,activeWalletIds:t,socialProviders:r,activeSocialIds:n,termsUrl:o,privacyUrl:a,isDetected:i,close:s,isMobile:l}=Na(),d=t.filter(m=>{let g=rd(m).visibility;return!g||g==="always"?!0:g==="desktop-only"?!l:g==="mobile-only"?l:!0}),c=n.length>0,b=d.length>0;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)("div",{className:"wcm-header",children:[(0,$.jsxs)("div",{className:"wcm-header-text",children:[(0,$.jsx)("h2",{className:"wcm-title",children:pg.WALLET_LABELS.default}),!l&&(0,$.jsx)("p",{className:"wcm-subtitle",children:"Sign in instantly with your social account"})]}),(0,$.jsx)("button",{type:"button",className:"wcm-close-btn","data-track":"close",onClick:s,"aria-label":"Close",children:(0,$.jsx)(ag,{})})]}),(0,$.jsxs)("div",{className:"wcm-body",children:[c&&(0,$.jsxs)($.Fragment,{children:[!l&&(0,$.jsxs)("div",{className:"wcm-section-header",children:[(0,$.jsx)("span",{className:"wcm-section-title",children:"Social Account Wallet Connect"}),(0,$.jsx)("span",{className:"wcm-recommended-badge",children:"Recommended"})]}),(0,$.jsx)("div",{className:"wcm-social-grid",children:n.map(m=>{let g=ig(m);return(0,$.jsx)(Vy,{social:g,onSignIn:()=>{sg(m,r[m]),s()}},m)})}),b&&(0,$.jsxs)("div",{className:"wcm-separator",children:[(0,$.jsx)("div",{className:"wcm-separator-line"}),(0,$.jsx)("span",{className:"wcm-separator-text",children:"Other Wallets"}),(0,$.jsx)("div",{className:"wcm-separator-line"})]})]}),b&&(0,$.jsx)("div",{className:"wcm-wallet-list",children:d.map(m=>{let g=rd(m),y=g.rdns?i(g.rdns):!1;return(0,$.jsx)(Qy,{wallet:g,detected:y,onConnect:()=>{sg(m,e[m]),s()}},m)})}),(0,$.jsxs)("p",{className:"wcm-terms",children:["By continuing, you agree to NEXUS"," ",(0,$.jsx)(dg,{href:o,track:"terms_link",children:"Terms of Service"})," ","and consent to its"," ",(0,$.jsx)(dg,{href:a,track:"privacy_link",children:"Privacy Policy"}),"."]})]})]})}function dg({href:e,track:t,children:r}){return e?(0,$.jsx)("a",{className:"wcm-terms-link",href:e,target:"_blank",rel:"noopener noreferrer","data-track":t,children:r}):(0,$.jsx)("span",{className:"wcm-terms-link",children:r})}function ug({className:e}){let{isMobile:t,theme:r,portalStyle:n,open:o}=Na();return(0,cg.useEffect)(()=>{o&&Ke("connect","opened")},[o]),t?(0,$.jsx)(Ce,{feature:"wallet_connect",children:(0,$.jsxs)(Ia.Drawer.Portal,{children:[(0,$.jsx)(Ia.Drawer.Overlay,{className:"wcm-overlay"}),(0,$.jsxs)(Ia.Drawer.Content,{className:ze("wcm-drawer-content",e),"data-theme":r,style:n,children:[(0,$.jsx)(Ia.Drawer.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),(0,$.jsx)("div",{className:"wcm-drawer-handle"}),(0,$.jsx)("div",{className:"wcm-drawer-body",children:(0,$.jsx)(lg,{})})]})]})}):(0,$.jsx)(Ce,{feature:"wallet_connect",children:(0,$.jsxs)(sn.Portal,{children:[(0,$.jsx)(sn.Overlay,{className:"wcm-overlay"}),(0,$.jsxs)(sn.Content,{className:ze("wcm-dialog-content",e),"data-theme":r,style:n,children:[(0,$.jsx)(sn.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),(0,$.jsx)(sn.Description,{className:"wcm-sr-only",children:"Sign in with a social provider or pick a wallet to connect."}),(0,$.jsx)("div",{className:"wcm-dialog-body",children:(0,$.jsx)(lg,{})})]})]})})}he(`.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-system-orange-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-system-orange-high, #e56f00);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}
17
+ `);var _i=require("react/jsx-runtime");function Sw({env:e,theme:t="dark",mobileBreakpoint:r=768,drawerDirection:n,modal:o,showBalance:a=!1,showForgeToken:i=!1,showGameToken:s=!0,showQR:l=!0,showBridge:d=!0,qrLogoSrc:c,walletAddress:b,accountName:f,sendAccounts:g,profileImageUrl:x,connectorId:w,connectorName:m,connectorIconUrl:p,preferredTokens:y=[],onSelectWallet:h,onCopyAddress:v,onBuy:R,onBuyDisabledMessage:S,onBridgeDisabledMessage:E,onSendDisabledMessage:C,onDisconnect:N,disconnectLabel:I="Disconnect",termsUrl:M=$a,termsLabel:W="Terms of Service",privacyUrl:L=ei,privacyLabel:H="Privacy Policy",open:A,onOpenChange:O,showPortfolio:ce=!1,portfolioTitle:X="My Portfolio",portfolioSections:P,showTotalAssets:xe=!0,totalAssetsLabel:ne="Total Assets USD",sendTransaction:K,getTransactionReceipt:U,estimateGas:te,onOutlink:Z,lpBalanceReader:be,stakingRewardsReader:Ne,bridgeTokens:re,bridgeHistory:we,getBridgeQuote:Fe,getBridgeToTokens:Ae,getBridgeApproval:pt,approveBridge:ye,submitBridge:De,onReceive:ut,onBridge:Be,onSend:Ge,style:Ue,children:st}){let Ht=at(e),Rt=w?Vo[w]:void 0,Ut=m??Rt?.name,Ie=p??Rt?.iconUrl,jt=yo(`(max-width: ${r}px)`),tt=n??(a?"right":"bottom"),Mt=tt==="left"||tt==="right",Ve=o??!1,Ze=A!==void 0,[nr,Wt]=tr.useState(!1),qe=Ze?A:nr,wt=tr.useCallback(ur=>{Ze||Wt(ur),O?.(ur)},[Ze,O]),rt=tr.useCallback(()=>wt(!1),[wt]);Cn(qe,rt);let[_e,ft]=tr.useState(null),[At,je]=tr.useState("top"),[nt,qt]=tr.useState(null),[F,Xe]=tr.useState("wallet"),[B,se]=tr.useState(null),[ve,Te]=tr.useState(null);tr.useEffect(()=>{qe||(Xe("wallet"),se(null),Te(null))},[qe]),tr.useEffect(()=>{Gn(b)},[b]);let ot=tr.useCallback(()=>{Js(b),N?.()},[N,b]),or=tr.useMemo(()=>({env:Ht,theme:t,isMobile:jt,open:qe,drawerDirection:tt,modal:Ve,showBalance:a,showForgeToken:i,showGameToken:s,showQR:l,showBridge:d,qrLogoSrc:c,walletAddress:b,accountName:f,sendAccounts:g,profileImageUrl:x,connectorName:Ut,connectorIconUrl:Ie,preferredTokens:y,close:rt,onSelectWallet:h,onCopyAddress:v,onBuy:R,onBuyDisabledMessage:S,onBridgeDisabledMessage:E,onSendDisabledMessage:C,onDisconnect:N?ot:void 0,disconnectLabel:I,termsUrl:M,termsLabel:W,privacyUrl:L,privacyLabel:H,portalStyle:Ue,navContent:_e,navPosition:At,setNavContent:ft,setNavPosition:je,footerContent:nt,setFooterContent:qt,view:F,setView:Xe,selectedSendToken:B,setSelectedSendToken:se,selectedDetailToken:ve,setSelectedDetailToken:Te,showPortfolio:ce,portfolioTitle:X,portfolioSections:P,showTotalAssets:xe,totalAssetsLabel:ne,sendTransaction:K,getTransactionReceipt:U,estimateGas:te,onOutlink:Z,lpBalanceReader:be,stakingRewardsReader:Ne,bridgeTokens:re,bridgeHistory:we,getBridgeQuote:Fe,getBridgeToTokens:Ae,getBridgeApproval:pt,approveBridge:ye,submitBridge:De,onReceive:ut,onBridge:Be,onSend:Ge}),[Ht,t,jt,qe,tt,Ve,a,i,s,l,d,c,b,f,g,x,Ut,Ie,y,rt,h,v,R,S,E,C,N,ot,I,M,W,L,H,Ue,_e,At,nt,F,B,ve,ce,X,P,xe,ne,K,U,te,Z,be,Ne,re,we,Fe,Ae,pt,ye,De,ut,Be,Ge]);return(0,_i.jsx)(qs.Provider,{value:or,children:jt?(0,_i.jsx)(Of.Drawer.Root,{direction:tt,open:qe,onOpenChange:wt,handleOnly:Mt,noBodyStyles:!0,repositionInputs:!1,children:st},"drawer"):(0,_i.jsx)(Pf.Root,{open:qe,onOpenChange:wt,children:st},"popover")})}var no=Object.assign(Sw,{Trigger:_c,Content:Ef,Nav:Af,Footer:Df});var $e=V(require("react"),1);var ps=V(require("react"),1);var Hi=require("react"),Al=(0,Hi.createContext)(null);function ma(){let e=(0,Hi.useContext)(Al);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}var pm=V(require("react"),1);var Qi=require("react"),Vi=(0,Qi.createContext)(null);function Hr(){let e=(0,Qi.useContext)(Vi);if(!e)throw new Error("ResponsiveShell compound components must be used within <ResponsiveShell>");return e}var Ln=require("react");function Bf(){let e=null,t=new Set;return{getSnapshot:()=>e,publish(r){if(r!==e){e=r;for(let n of[...t])n()}},subscribe(r){return t.add(r),()=>{t.delete(r)}}}}var Ll=(0,Ln.createContext)(null);function Cw(){let e=(0,Ln.useContext)(Ll);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}function zf(){let e=Cw(),[t,r]=(0,Ln.useState)(e.getSnapshot);return(0,Ln.useLayoutEffect)(()=>(r(e.getSnapshot()),e.subscribe(()=>r(e.getSnapshot()))),[e]),t}he(`.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-system-orange-default, #5b5bf6);--rd-accent-contrast: var(--ds-system-orange-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-system-orange-default, #8181ff);--rd-accent-contrast: var(--ds-system-orange-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-system-orange-default, #5b5bf6);--rd-accent-contrast: var(--ds-system-orange-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}}
18
+ `);var zt=require("react/jsx-runtime");function Ff({minNotice:e,arrivalStatus:t}){let r=t.amount&&t.symbol?`${t.amount} ${t.symbol} arrived`:t.amount?`${t.amount} arrived`:void 0,n=(()=>{switch(t.phase){case"detected":if(e.remaining!==void 0){let o=`${e.remaining} ${e.symbol}`;return r?`${r} at the processing address. Waiting for ${o} more to reach the minimum.`:`Deposit detected. Waiting for ${o} more to reach the minimum.`}return r?`${r} 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 n?(0,zt.jsxs)("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:[(0,zt.jsx)("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),(0,zt.jsx)("span",{children:n})]},`live:${t.phase}:${n}`):e.remaining!==void 0?(0,zt.jsxs)("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:[(0,zt.jsx)("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),(0,zt.jsxs)("span",{children:["Waiting for"," ",(0,zt.jsxs)("b",{children:[e.remaining," ",e.symbol]})," ","more to arrive at the processing address."]})]},`pending:${e.remaining}:${e.symbol}`):null}function Uf({minNotice:e,onlySend:t,showWalletCreditNote:r=!1}){return(0,zt.jsxs)("div",{className:"rd-checklist","data-rd-checklist":"",children:[(0,zt.jsxs)("div",{className:"rd-checklist-row","data-rd-checklist-only":"",children:[(0,zt.jsx)("span",{className:"rd-checklist-mark rd-checklist-mark-warn","aria-hidden":"true",children:"!"}),(0,zt.jsxs)("span",{children:[(0,zt.jsxs)("b",{children:[t.chainName," ",t.symbol," only"]})," \xB7 ",(0,zt.jsxs)("b",{className:"rd-checklist-accent",children:[e.min," ",e.symbol," minimum"]})]})]}),(0,zt.jsxs)("div",{className:"rd-checklist-row",children:[(0,zt.jsx)("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u21BB"}),(0,zt.jsx)("span",{children:"Reusable \u2014 deposit as many times as you like"})]}),r&&(0,zt.jsxs)("div",{className:"rd-checklist-row rd-checklist-credit","data-rd-checklist-credit":"",children:[(0,zt.jsx)("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u2192"}),(0,zt.jsx)("span",{children:"Credited to your ONEchain wallet"})]})]})}var ao=require("react");var ga="0x0000000000000000000000000000000000000000",Nw=/^0x[0-9a-fA-F]{40}$/;function ht(e){return Nw.test(e)}function Zt(e,t){let r=e<0n,o=(r?-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 r?`-${s}`:s}function qi(e,t){let r=e.match(/^(-?)(\d+)(?:\.(\d+))?$/);if(!r)throw new Error(`parseUnits: invalid decimal string "${e}"`);let[,n,o,a=""]=r;if(a.length>t)throw new Error(`parseUnits: too many decimal places for ${t} decimals`);let i=BigInt(o+a.padEnd(t,"0"));return n==="-"?-i:i}var yn=require("react");var Dl="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTQwIDU0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ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iDaQQ+d4iovOpeB8W5WkM3YazDIQ7K/zsRn4Xv5PfzRgYC2MKUqSIs1tC4dWZZTl4UVtZ9q7HiUehi/h775H//4aI7z0OZ5LeVJvNw/fyM/wsn8Fn8Zl8Nr+D36Wvsp/if7BfCn8ECvocAAAAAElFTkSuQmCC";function jf(e){switch(e.toUpperCase()){case"ONEUSD":return Dl;case"PONEUSD":return Tw;case"USDT":return Iw;case"USDC":return Ew;default:return}}var j=require("react/jsx-runtime");function Wf(e){let t=e.trim();return t?t.slice(0,2).toUpperCase():"?"}function Mw({size:e,bg:t,fg:r="#ffffff",children:n}){return(0,j.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:[(0,j.jsx)("circle",{cx:"12",cy:"12",r:"12",fill:t}),(0,j.jsx)("g",{fill:r,stroke:r,children:n})]})}function Pl({size:e,bg:t,fg:r="#ffffff",text:n}){return(0,j.jsx)(Mw,{size:e,bg:t,fg:r,children:(0,j.jsx)("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",fontSize:"10",fontWeight:700,fontFamily:"inherit",stroke:"none",fill:r,children:n})})}function Eo({size:e,viewBox:t="0 0 24 24",children:r}){return(0,j.jsx)("svg",{width:e,height:e,viewBox:t,"aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:r})}function Aw({size:e}){let t=(0,yn.useId)();return(0,j.jsxs)(Eo,{size:e,children:[(0,j.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,j.jsx)("path",{fill:"#000",d:"M24 0H0v24h24z"}),(0,j.jsx)("path",{fill:"#8FFCF3",d:"M12 4v5.912l5 2.237z"}),(0,j.jsx)("path",{fill:"#CABCF8",d:"m12 4-5 8.148 5-2.235z"}),(0,j.jsx)("path",{fill:"#CBA7F5",d:"M12 15.98V20l5-6.92z"}),(0,j.jsx)("path",{fill:"#74A0F3",d:"M12 20v-4.02l-5-2.9z"}),(0,j.jsx)("path",{fill:"#CBA7F5",d:"m12 15.049 5-2.9-5-2.236z"}),(0,j.jsx)("path",{fill:"#74A0F3",d:"m7 12.149 5 2.9V9.913z"}),(0,j.jsx)("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"}),(0,j.jsx)("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"})]}),(0,j.jsx)("defs",{children:(0,j.jsx)("clipPath",{id:t,children:(0,j.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function Lw({size:e}){let t=(0,yn.useId)();return(0,j.jsxs)(Eo,{size:e,children:[(0,j.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,j.jsx)("path",{fill:"#F0B90B",d:"M24 0H0v24h24z"}),(0,j.jsx)("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"})]}),(0,j.jsx)("defs",{children:(0,j.jsx)("clipPath",{id:t,children:(0,j.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function Dw({size:e}){let t=(0,yn.useId)();return(0,j.jsxs)(Eo,{size:e,viewBox:"0 0 111 111",children:[(0,j.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,j.jsx)("path",{fill:"#fff",d:"M0 0h111v111H0z"}),(0,j.jsx)("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"})]}),(0,j.jsx)("defs",{children:(0,j.jsx)("clipPath",{id:t,children:(0,j.jsx)("path",{fill:"#fff",d:"M0 0h111v111H0z"})})})]})}function Pw({size:e}){let t=(0,yn.useId)();return(0,j.jsxs)(Eo,{size:e,children:[(0,j.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,j.jsx)("path",{fill:"#213147",d:"M24 0H0v24h24z"}),(0,j.jsx)("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"}),(0,j.jsx)("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"}),(0,j.jsx)("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"}),(0,j.jsx)("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"})]}),(0,j.jsx)("defs",{children:(0,j.jsx)("clipPath",{id:t,children:(0,j.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function Ow({size:e}){let t=(0,yn.useId)(),r=(0,yn.useId)();return(0,j.jsxs)(Eo,{size:e,children:[(0,j.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,j.jsx)("path",{fill:`url(#${r})`,d:"M24 0H0v24h24z"}),(0,j.jsx)("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"})]}),(0,j.jsxs)("defs",{children:[(0,j.jsxs)("linearGradient",{id:r,x1:"3.948",x2:"19.217",y1:"16.617",y2:"7.645",gradientUnits:"userSpaceOnUse",children:[(0,j.jsx)("stop",{stopColor:"#A726C1"}),(0,j.jsx)("stop",{offset:".88",stopColor:"#803BDF"}),(0,j.jsx)("stop",{offset:"1",stopColor:"#7B3FE4"})]}),(0,j.jsx)("clipPath",{id:t,children:(0,j.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function Bw({size:e}){let t=(0,yn.useId)(),r=(0,yn.useId)();return(0,j.jsxs)(Eo,{size:e,children:[(0,j.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,j.jsx)("path",{fill:`url(#${r})`,d:"M24 0H0v24h24z"}),(0,j.jsx)("path",{fill:"#fff",d:"M17.7 8.358a.55.55 0 0 1-.365.145H4.515c-.455 0-.684-.52-.37-.825l2.106-2.03a.54.54 0 0 1 .364-.15h12.87c.46 0 .685.524.365.83zm0 10.005c-.1.09-.23.14-.365.14H4.515c-.455 0-.684-.516-.37-.82l2.106-2.036a.53.53 0 0 1 .364-.145h12.87c.46 0 .685.52.365.825zm0-7.72a.55.55 0 0 0-.365-.14H4.515c-.455 0-.684.515-.37.82l2.106 2.035c.1.091.23.143.364.144h12.87c.46 0 .685-.52.365-.824z"})]}),(0,j.jsxs)("defs",{children:[(0,j.jsxs)("linearGradient",{id:r,x1:"4.001",x2:"20.408",y1:"50.258",y2:"50.108",gradientUnits:"userSpaceOnUse",children:[(0,j.jsx)("stop",{stopColor:"#599DB0"}),(0,j.jsx)("stop",{offset:"1",stopColor:"#47F8C3"})]}),(0,j.jsx)("clipPath",{id:t,children:(0,j.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function Yi({chainId:e,chainName:t,size:r=20}){switch(e){case 1:return(0,j.jsx)(Aw,{size:r});case 56:return(0,j.jsx)(Lw,{size:r});case 8453:return(0,j.jsx)(Dw,{size:r});case 42161:return(0,j.jsx)(Pw,{size:r});case 137:return(0,j.jsx)(Ow,{size:r});case 792703809:return(0,j.jsx)(Bw,{size:r});case 612055:return(0,j.jsx)(Pl,{size:r,bg:"#0b1f3a",text:"CR"});default:return(0,j.jsx)(Pl,{size:r,bg:"#676b7a",text:Wf(t??String(e))})}}function oo({symbol:e,logoUrl:t,size:r=20}){let n=t&&t.trim().length>0?t.trim():jf(e);return n?(0,j.jsx)("img",{src:n,alt:"","aria-hidden":"true",width:r,height:r,style:{display:"block",flex:"none",borderRadius:"50%",objectFit:"cover"}}):(0,j.jsx)(Pl,{size:r,bg:"#676b7a",text:Wf(e)})}var Gf=require("qrcode.react"),ue=require("react/jsx-runtime");function Ki(){return(0,ue.jsxs)("div",{className:"rd-deposit-head","data-testid":"rd-address-skeleton","aria-hidden":"true",children:[(0,ue.jsx)("span",{className:"rd-skeleton rd-skeleton-qr"}),(0,ue.jsx)("span",{className:"rd-skeleton rd-skeleton-address"})]})}function zw(e){let{depositAddress:t,originChainId:r,originCurrency:n,amountWei:o,isNative:a}=e;if(a)return o!==void 0?`ethereum:${t}@${r}?value=${o.toString()}`:`ethereum:${t}@${r}`;let i=new URLSearchParams({address:t});return o!==void 0&&i.set("uint256",o.toString()),`ethereum:${n}@${r}/transfer?${i.toString()}`}function Fw(e){let{depositAddress:t,splMint:r,humanAmount:n}=e,o=new URLSearchParams;return n&&o.set("amount",n),o.set("spl-token",r),`solana:${t}?${o.toString()}`}function _f({depositAddress:e,originChainId:t,originChainName:r,originCurrency:n,amount:o,tokenSymbol:a,tokenDecimals:i,kind:s="evm",depositState:l,onDeposit:d,canDeposit:c,oneClickEnabled:b=!0}){let[f,g]=(0,ao.useState)(!1),[x,w]=(0,ao.useState)("address"),m=(0,ao.useId)();(0,ao.useEffect)(()=>{w("address")},[e]);let p=n.toLowerCase()===ga,y=s==="svm";async function h(){try{await navigator.clipboard.writeText(e),g(!0),setTimeout(()=>g(!1),1500)}catch{}}let v;if(o)try{let A=BigInt(o);A>0n&&(v=A)}catch{}let R=v!==void 0,S;if(R)try{S=Zt(v,i)}catch{S=o}let E=y?Fw({depositAddress:e,splMint:n,humanAmount:S??""}):zw({depositAddress:e,originChainId:t,originCurrency:n,amountWei:v,isNative:p}),{isSubmitting:C,isConfirming:N,isConfirmed:I,needsSwitch:M,txHash:W,reverted:L,error:H}=l;return(0,ue.jsxs)("section",{className:"rd-stack",children:[(0,ue.jsxs)("div",{className:"rd-deposit-head","data-compact-view":x,children:[(0,ue.jsxs)("div",{className:"rd-deposit-qr-pane",children:[(0,ue.jsxs)("div",{className:"rd-deposit-qr",children:[(0,ue.jsx)(Gf.QRCodeSVG,{value:E,size:144,level:"H"}),(0,ue.jsx)("span",{className:"rd-deposit-qr-badge","aria-hidden":"true",children:(0,ue.jsx)(Yi,{chainId:t,chainName:r,size:28})})]}),(0,ue.jsx)("button",{type:"button",className:"rd-mobile-address-toggle","aria-label":"Show address and copy",onClick:()=>w("address"),children:(0,ue.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,ue.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2.25",stroke:"currentColor",strokeWidth:"1.8"}),(0,ue.jsx)("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"})]})})]}),(0,ue.jsxs)("div",{className:"rd-deposit-address",children:[(0,ue.jsx)("span",{className:"rd-deposit-address-label",children:(0,ue.jsxs)("button",{type:"button",className:"rd-address-term","aria-describedby":m,children:["Deposit address",(0,ue.jsx)("span",{id:m,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."})]})}),(0,ue.jsx)("button",{type:"button",className:"rd-mobile-qr-toggle","aria-label":"Show deposit QR code","aria-pressed":x==="qr",onClick:()=>w("qr"),children:(0,ue.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:(0,ue.jsx)("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"})})}),(0,ue.jsx)("span",{className:"rd-address-full",title:e,children:e}),(0,ue.jsxs)("button",{type:"button",className:"rd-address-copy",onClick:h,"aria-label":`Copy deposit address ${e}`,children:[f?(0,ue.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,ue.jsx)("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,ue.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,ue.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),(0,ue.jsx)("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"})]}),(0,ue.jsx)("span",{"aria-live":"polite",children:f?"Copied":"Copy address"})]})]})]}),!y&&c&&(0,ue.jsxs)(ue.Fragment,{children:[(0,ue.jsx)("button",{type:"button",className:"rd-button-primary rd-button-block",onClick:d,disabled:C||N||I&&!L,children:I&&!L?"Deposit sent":N?"Confirming...":C?M?"Switching network...":"Confirm in wallet...":`One-click deposit ${a}${M?` (switch to ${r})`:""}`}),H&&(0,ue.jsx)("div",{className:"rd-callout rd-callout-danger",children:H}),W&&(0,ue.jsxs)("p",{className:"rd-card-hint",children:["Tx: ",(0,ue.jsx)("span",{style:{fontFamily:"monospace"},children:W})]}),I&&L&&(0,ue.jsx)("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),I&&!L&&(0,ue.jsx)("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."})]}),y&&(0,ue.jsxs)("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"," ",R?(0,ue.jsxs)(ue.Fragment,{children:["exactly"," ",(0,ue.jsxs)("strong",{children:[S," ",a]})]}):(0,ue.jsxs)(ue.Fragment,{children:["any amount of ",(0,ue.jsx)("strong",{children:a})]}),"."]}),(R||!y&&!c&&b)&&(0,ue.jsxs)("p",{className:"rd-card-hint",children:[R&&(0,ue.jsxs)(ue.Fragment,{children:["Send exactly"," ",(0,ue.jsxs)("strong",{children:[S," ",a]})," ","on ",r," to this address."]}),!y&&!c&&b&&!R&&"Enter an amount to deposit in one click."]})]})}var Qr=require("react"),Dn=V(require("@radix-ui/react-popover"),1);var rr=require("react/jsx-runtime");function ha({value:e,options:t,onChange:r,disabled:n,ariaLabel:o,id:a}){let i=(0,Qr.useId)(),s=a??i,l=`${s}-listbox`,[d,c]=(0,Qr.useState)(!1),b=t.findIndex(I=>I.value===e),[f,g]=(0,Qr.useState)(b>=0?b:0),x=(0,Qr.useRef)(null),w=(0,Qr.useRef)([]),m=!!n||t.length===0,p=b>=0?t[b]:void 0;(0,Qr.useEffect)(()=>{d&&w.current[f]?.scrollIntoView?.({block:"nearest"})},[d,f]);let[y,h]=(0,Qr.useState)(null);function v(){m||(h(x.current?.closest("[data-theme]")?.getAttribute("data-theme")??null),g(b>=0?b:0),c(!0))}function R(I){c(!1),I&&x.current?.focus()}function S(I){let M=t[I];M&&(r(M.value),R(!0))}function E(){m||(d?R(!1):v())}function C(I){if(!m)switch(I.key){case"ArrowDown":I.preventDefault(),d?g(M=>Math.min(M+1,t.length-1)):v();break;case"ArrowUp":I.preventDefault(),d?g(M=>Math.max(M-1,0)):v();break;case"Enter":case" ":I.preventDefault(),d?S(f):v();break;case"Escape":d&&(I.preventDefault(),R(!0));break;case"Tab":d&&c(!1);break;default:break}}let N=d&&t[f]?`${s}-option-${f}`:void 0;return(0,rr.jsx)(Dn.Root,{open:d,onOpenChange:I=>I?v():R(!1),children:(0,rr.jsxs)("div",{className:"rd-dropdown",children:[(0,rr.jsx)(Dn.Trigger,{asChild:!0,children:(0,rr.jsxs)("button",{type:"button",id:s,ref:x,className:"rd-dropdown-trigger","aria-haspopup":"listbox","aria-expanded":d,"aria-controls":l,"aria-activedescendant":N,"aria-label":o,disabled:m,onClick:E,onKeyDown:C,children:[(0,rr.jsxs)("span",{className:"rd-dropdown-trigger-content",children:[p?.icon,(0,rr.jsxs)("span",{className:"rd-dropdown-trigger-label",children:[p?.label??"",p?.subLabel&&(0,rr.jsx)("small",{className:"rd-dropdown-trigger-sub",children:p.subLabel})]})]}),(0,rr.jsx)("span",{className:"rd-dropdown-chevron","aria-hidden":"true",children:(0,rr.jsx)(Tr,{size:16})})]})}),d&&(0,rr.jsx)(Dn.Portal,{children:(0,rr.jsx)(Dn.Content,{className:"rd-dropdown-popover","data-theme":y??void 0,side:"bottom",align:"start",sideOffset:5,collisionPadding:12,onOpenAutoFocus:I=>I.preventDefault(),onCloseAutoFocus:I=>I.preventDefault(),children:(0,rr.jsx)("ul",{className:"rd-dropdown-listbox",role:"listbox",id:l,"aria-label":o,tabIndex:-1,"data-vaul-no-drag":!0,children:t.map((I,M)=>{let W=I.value===e,L=M===f;return(0,rr.jsxs)("li",{id:`${s}-option-${M}`,role:"option","aria-selected":W,ref:H=>{w.current[M]=H},className:["rd-dropdown-option",L?"rd-dropdown-option-active":"",W?"rd-dropdown-option-selected":""].filter(Boolean).join(" "),onPointerEnter:()=>g(M),onClick:H=>{H.preventDefault(),S(M)},children:[I.icon,(0,rr.jsx)("span",{className:"rd-dropdown-option-label",children:I.label}),W&&(0,rr.jsx)("span",{className:"rd-dropdown-option-check","aria-hidden":"true",children:"\u2713"})]},I.value)})})})})]})})}var bt=require("react/jsx-runtime");function Uw(e,t){if(!e)return"--";try{return Zt(BigInt(e),t)}catch{return"--"}}function Hf({quote:e,isLoading:t,error:r,humanAmount:n,originSymbol:o,destination:a}){return(0,bt.jsxs)("div",{className:"rd-stack","data-rd-quote-preview":"",children:[t&&(0,bt.jsxs)("div",{className:"rd-quote-strip","data-testid":"rd-quote-skeleton",children:[(0,bt.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"}),(0,bt.jsx)("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),(0,bt.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"})]}),!t&&r&&(0,bt.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a quote: ",r.message]}),!t&&!r&&e&&o&&(0,bt.jsxs)(bt.Fragment,{children:[(0,bt.jsxs)("div",{className:"rd-quote-strip",children:[(0,bt.jsxs)("span",{className:"rd-quote-strip-side",children:[(0,bt.jsxs)("b",{children:[n," ",o]}),(0,bt.jsx)("small",{children:"You send"})]}),(0,bt.jsx)("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),(0,bt.jsxs)("span",{className:"rd-quote-strip-side rd-quote-strip-end",children:[(0,bt.jsxs)("b",{children:["~",Uw(e.expectedCrossd,a.decimals)," ",a.symbol]}),(0,bt.jsx)("small",{children:"You receive"})]})]}),e.belowMin&&(0,bt.jsx)("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)&&(0,bt.jsxs)("p",{className:"rd-quote-strip-hint",children:[e.feeUsd&&(0,bt.jsxs)(bt.Fragment,{children:["Bridge fee: $",e.feeUsd,", already deducted from the amount above. You also pay your own network fee to send the deposit."," "]}),e.assumesParity&&(0,bt.jsxs)(bt.Fragment,{children:["Assumes 1:1 parity between bridged USDT and ",a.symbol,"; the final amount may differ slightly."]})]})]}),!t&&!r&&!e&&(0,bt.jsx)("p",{className:"rd-muted",children:"Enter an amount to see a quote."})]})}var Ol=require("react");var Qf={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 Vf(e,t){let r=Qf[e];if(!(!r||!t))return{url:`${r.base}/token/${t}`,name:r.name}}var jw={1:"Ethereum",56:"BNB Smart Chain",137:"Polygon",8453:"Base",42161:"Arbitrum",612055:"ONEchain",792703809:"Solana"};function Mo(e){return jw[e]??`Chain ${e}`}function Zi(e,t){let r=Qf[e];if(!(!r||!t))return{url:`${r.base}/tx/${t}`,name:r.name}}var Et=require("react/jsx-runtime");function Ww(e){let t=new Map;for(let r of e.origins)t.has(r.chainId)||t.set(r.chainId,r.chainName);return Array.from(t,([r,n])=>({chainId:r,chainName:n}))}function qf(e,t){return t===void 0?[]:e.origins.filter(r=>r.chainId===t)}function Gw(e,t){let r=Zt(e,t),n=r.indexOf(".");return n===-1?r:`${r.slice(0,n)}.${r.slice(n+1,n+1+4)}`.replace(/\.?0+$/,"")||r.slice(0,n)}function Yf({catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:a=!0,balance:i,balanceLoading:s,insufficientBalance:l,onMax:d,disabled:c}){let b=(0,Ol.useMemo)(()=>Ww(e),[e]),f=(0,Ol.useMemo)(()=>qf(e,t?.chainId),[e,t?.chainId]);function g(p){let y=Number(p),h=qf(e,y)[0];h&&r(h)}function x(p){let y=f.find(h=>h.token.address.toLowerCase()===p.toLowerCase());y&&r(y)}let w=i?`${Gw(i.value,i.decimals)} ${i.symbol}`:void 0,m=l?`Amount exceeds your balance${w?` (${w})`:""}`:void 0;return(0,Et.jsxs)("section",{className:"rd-stack","data-rd-source-form":"",children:[(0,Et.jsxs)("div",{className:"rd-field",children:[(0,Et.jsxs)("div",{className:"rd-field-label-row",children:[(0,Et.jsx)("span",{className:"rd-field-label",children:"From"}),t&&(()=>{let p=Vf(t.chainId,t.token.address);return p?(0,Et.jsxs)("a",{className:"rd-token-explorer-link",href:p.url,target:"_blank",rel:"noopener noreferrer",title:`View ${t.token.symbol} on ${p.name}`,children:[p.name," \u2197"]}):null})()]}),(0,Et.jsxs)("div",{className:"rd-field-row",children:[(0,Et.jsx)(ha,{ariaLabel:"Origin chain",value:t?String(t.chainId):"",onChange:g,disabled:c,options:b.map(p=>({value:String(p.chainId),label:p.chainName,subLabel:"Network",icon:(0,Et.jsx)(Yi,{chainId:p.chainId,chainName:p.chainName,size:22})}))}),(0,Et.jsx)(ha,{ariaLabel:"Token",value:t?.token.address??"",onChange:x,disabled:c||f.length===0,options:f.map(p=>({value:p.token.address,label:p.token.symbol,subLabel:`${p.token.decimals} decimals`,icon:(0,Et.jsx)(oo,{symbol:p.token.symbol,logoUrl:p.token.logoUrl,size:22})}))})]})]}),a&&(0,Et.jsxs)("label",{className:"rd-field",children:[(0,Et.jsx)("span",{className:"rd-field-label",children:"Amount (optional)"}),(0,Et.jsxs)("div",{className:"rd-amount-input","data-rd-invalid":m?"":void 0,children:[(0,Et.jsx)("input",{type:"text",inputMode:"decimal",placeholder:"0.0",value:n,onChange:p=>{let y=p.target.value;if(y===""){o(y);return}y.startsWith(".")&&(y=`0${y}`),/^\d*\.?\d{0,4}$/.test(y)&&(y=y.replace(/^0+(?=\d)/,""),!((y.split(".")[0]??"").length>12)&&o(y))},disabled:c||!t,"data-vaul-no-drag":!0}),t&&(0,Et.jsx)("span",{className:"rd-amount-input-suffix",children:t.token.symbol}),d&&!c&&(0,Et.jsx)("button",{type:"button",className:"rd-amount-input-max",onClick:d,disabled:c||!t,children:"Max"})]}),(w||s)&&(0,Et.jsxs)("span",{className:"rd-amount-meta",children:[(0,Et.jsx)("span",{}),(0,Et.jsx)("span",{children:s?"Balance: \u2026":w?`Balance: ${w}`:""})]}),m&&(0,Et.jsx)("span",{className:"rd-callout rd-callout-danger",children:m})]})]})}var de=require("react/jsx-runtime");function Kf({catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:a,minNotice:i,amountHint:s,onMax:l,recipient:d,onChangeRecipient:c,showRecipientInput:b,recipientValid:f,balance:g,balanceLoading:x,insufficientBalance:w,targetOptions:m,selectedTarget:p,onChangeTarget:y,showTargetSelector:h,quote:v,quoteLoading:R,quoteError:S,depositAddress:E,depositAddressLoading:C,depositAddressError:N,arrivalStatus:I,amountSmallestUnits:M,depositState:W,onDeposit:L,canDeposit:H,oneClickEnabled:A,locked:O,onRequestConnect:ce}){let X=m.length>1&&h,{phase:P,isSubmitting:xe,isConfirming:ne,isConfirmed:K,needsSwitch:U,reverted:te,error:Z}=W,be=p?.symbol??e.destination.symbol;return(0,de.jsxs)(de.Fragment,{children:[i&&(0,de.jsx)(Ff,{minNotice:i,arrivalStatus:I}),O?(0,de.jsxs)("section",{className:"rd-locked-card","data-rd-locked":"",children:[(0,de.jsx)("span",{className:"rd-locked-glyph","aria-hidden":"true",children:(0,de.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,de.jsx)("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"}),(0,de.jsx)("path",{d:"M4 9h15",stroke:"currentColor",strokeWidth:"1.7"}),(0,de.jsx)("path",{d:"M15 11.5h5v4h-5a2 2 0 0 1 0-4Z",fill:"currentColor",opacity:"0.18",stroke:"currentColor",strokeWidth:"1.5"}),(0,de.jsx)("circle",{cx:"15.7",cy:"13.5",r:"0.8",fill:"currentColor"})]})}),(0,de.jsx)("h3",{className:"rd-locked-title",children:"Connect your wallet"}),(0,de.jsx)("p",{className:"rd-locked-text",children:"Connect to get your personal deposit address."}),b&&(0,de.jsx)("p",{className:"rd-card-hint",children:"Or enter a recipient address to get one without connecting."}),ce&&(0,de.jsxs)("button",{type:"button",className:"rd-button-primary rd-locked-action","data-track":"connect",onClick:ce,children:[(0,de.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,de.jsx)("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"}),(0,de.jsx)("path",{d:"M15 10.5h5v4h-5a2 2 0 0 1 0-4Z",stroke:"currentColor",strokeWidth:"1.8"})]}),"Connect Wallet"]})]}):E?(0,de.jsx)(_f,{depositAddress:E,originChainId:t.chainId,originChainName:t.chainName,originCurrency:t.token.address,amount:M,tokenSymbol:t.token.symbol,tokenDecimals:t.token.decimals,depositState:W,onDeposit:L,canDeposit:H,oneClickEnabled:A}):C?(0,de.jsxs)(de.Fragment,{children:[(0,de.jsx)(Ki,{}),A&&M&&(0,de.jsx)("span",{className:"rd-skeleton rd-skeleton-cta","aria-hidden":"true"}),(0,de.jsx)("p",{className:"rd-sr-only",role:"status",children:"Preparing your deposit address..."})]}):N?(0,de.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a deposit address: ",N.message]}):null,(0,de.jsx)(Yf,{catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:a,balance:g,balanceLoading:x,insufficientBalance:w,onMax:l}),(0,de.jsxs)("div",{className:"rd-field","data-rd-delivery":"",children:[(0,de.jsx)("span",{className:"rd-field-label",children:"Deliver as"}),X?(0,de.jsx)(ha,{ariaLabel:"Delivery token",value:p?.symbol??"",onChange:y,options:m.map(Ne=>({value:Ne.symbol,label:Ne.symbol,subLabel:"on ONEchain",icon:(0,de.jsx)(oo,{symbol:Ne.symbol,size:22})}))}):(0,de.jsxs)("div",{className:"rd-static-target",children:[(0,de.jsx)(oo,{symbol:be,size:22}),(0,de.jsx)("span",{children:be})]}),b&&(0,de.jsxs)("label",{className:"rd-delivery-recipient",children:[(0,de.jsx)("input",{type:"text",placeholder:"0x...","aria-label":"ONEchain recipient address",value:d,onChange:Ne=>c(Ne.target.value),"data-vaul-no-drag":!0}),(0,de.jsx)("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."}),!f&&(0,de.jsx)("span",{className:"rd-callout rd-callout-danger",children:"Not a valid address"})]})]}),p?.external&&(0,de.jsxs)("div",{className:"rd-callout rd-callout-muted",children:["Delivered as ",p.symbol," via an external adapter."]}),s&&(0,de.jsx)("div",{className:"rd-callout rd-callout-warning","data-rd-amount-hint":"",children:s}),n.trim()&&(0,de.jsx)(Hf,{quote:v,isLoading:R,error:S,humanAmount:n,originSymbol:t.token.symbol,destination:e.destination}),i&&(0,de.jsx)(Uf,{minNotice:i,onlySend:{symbol:t.token.symbol,chainName:t.chainName},showWalletCreditNote:!b&&f}),A&&P!=="idle"&&!H&&(0,de.jsxs)("div",{className:"rd-card",children:[xe&&(0,de.jsxs)("p",{className:"rd-muted",children:[(0,de.jsx)("span",{className:"rd-spinner"})," ",U?"Switching network...":"Confirm in wallet..."]}),ne&&(0,de.jsxs)("p",{className:"rd-muted",children:[(0,de.jsx)("span",{className:"rd-spinner"})," Confirming..."]}),W.txHash&&(0,de.jsxs)("p",{className:"rd-card-hint",children:["Tx: ",(0,de.jsx)("span",{style:{fontFamily:"monospace"},children:W.txHash})]}),K&&te&&(0,de.jsx)("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),K&&!te&&(0,de.jsx)("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."}),Z&&(0,de.jsx)("div",{className:"rd-callout rd-callout-danger",children:Z})]})]})}var Vr=require("react"),Xf=require("react-dom");var Q=require("react/jsx-runtime");function wa({requiresIdentity:e=!1}){return(0,Q.jsxs)("div",{className:"rd-history-empty",role:"status","data-variant":e?"disconnected":"empty","data-testid":e?"rd-history-empty-state":"rd-history-no-transfers",children:[(0,Q.jsx)("span",{className:"rd-history-empty-icon","aria-hidden":"true",children:(0,Q.jsxs)("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,Q.jsx)("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"}),(0,Q.jsx)("path",{d:"M14 3.8V7h3",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"}),(0,Q.jsx)("circle",{cx:"16.5",cy:"16.5",r:"3.7",stroke:"currentColor",strokeWidth:"1.7"}),(0,Q.jsx)("path",{d:"M16.5 14.5v2.2l1.4.8",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,Q.jsx)("h3",{className:"rd-history-empty-title",children:e?"Connect to view history":"No transfers yet"}),(0,Q.jsx)("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&&(0,Q.jsxs)("span",{className:"rd-history-empty-live",children:[(0,Q.jsx)("span",{"aria-hidden":"true"}),"Updates automatically"]})]})}var ba=56;function Jf(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function _w(e){let t=e.trim().toUpperCase(),n={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(n)return n;let o=t.toLowerCase().replace(/_/g," ").trim();return o?`${o[0].toUpperCase()}${o.slice(1)}`:"Processing"}function Hw(e){return e==="COMPLETED"?"rd-status-pill rd-status-pill-success":Jf(e)?"rd-status-pill rd-status-pill-failure":"rd-status-pill"}function Xi(e,t){if(e){if(t===void 0)return e;try{return Zt(BigInt(e),t)}catch{return e}}}function Qw(e,t=4){let r=e.indexOf(".");if(r<0)return e;let n=e.slice(0,r+1+t).replace(/0+$/,"").replace(/\.$/,"");return n===""?"0":n}function Vw(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Zf(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function Bl({amount:e,symbol:t,className:r}){let n=e?`${e}${t?` ${t}`:""}`:"",o=(0,Vr.useId)(),a=(0,Vr.useRef)(null),i=(0,Vr.useRef)(null),[s,l]=(0,Vr.useState)(!1),[d,c]=(0,Vr.useState)({top:-9999,left:-9999,visibility:"hidden"});return(0,Vr.useEffect)(()=>{if(!s)return;let b=()=>{let f=a.current,g=i.current;if(!f||!g)return;let x=f.getBoundingClientRect(),w=g.getBoundingClientRect(),m=12,p=8,y=Math.max(m,window.innerWidth-w.width-m),h=Math.min(Math.max(x.left+x.width/2-w.width/2,m),y),v=x.top-w.height-p,R=v>=m?v:x.bottom+p,S=Math.max(m,window.innerHeight-w.height-m),E=Math.min(Math.max(R,m),S),C=window.getComputedStyle(f);c({top:E,left:h,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?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)("span",{ref:a,className:r,"aria-label":n,"aria-describedby":s?o:void 0,"data-full-value":n,onMouseEnter:()=>{c({top:-9999,left:-9999,visibility:"hidden"}),l(!0)},onMouseLeave:()=>l(!1),children:[Qw(e),t?` ${t}`:""]}),s&&typeof document<"u"&&(0,Xf.createPortal)((0,Q.jsx)("span",{ref:i,id:o,role:"tooltip","data-rd-history-floating-tooltip":"",style:d,children:n}),document.body)]}):(0,Q.jsx)("span",{className:r,children:"-"})}function qw(e){let t=(e.deposits??[]).filter(n=>n.originChainId),r=new Set(t.map(n=>`${n.originChainId}:${(n.originCurrency??"").toLowerCase()}`));if(t.length>0){let n=t[0];return{chainId:n.originChainId,currency:n.originCurrency??"",routes:r.size}}return{chainId:e.originChainId,currency:e.originCurrency,routes:1}}function Yw(e,t){if(!e)return;let r,n;try{r=BigInt(e),n=t.map(s=>BigInt(s.amount))}catch{return}let o=n.reduce((s,l)=>s+l,0n);if(o<=0n)return;let a=n.map(s=>r*s/o),i=a.reduce((s,l)=>s+l,0n);return a[a.length-1]+=r-i,a}function Ji({label:e,chainId:t,txHash:r,amount:n,shared:o,missingLabel:a="Pending"}){let i=r?Zi(t,r):void 0;return(0,Q.jsxs)("div",{className:"rd-history-step",children:[(0,Q.jsx)("span",{className:`rd-history-step-dot${r?" rd-history-step-dot-done":""}`}),(0,Q.jsx)("span",{className:"rd-history-step-label",children:e}),(0,Q.jsx)("span",{className:"rd-history-step-chain",children:Mo(t)}),n&&(0,Q.jsx)(Bl,{amount:n,className:"rd-history-step-amount"}),(0,Q.jsxs)("span",{className:"rd-history-step-tx",children:[i?(0,Q.jsx)("a",{href:i.url,target:"_blank",rel:"noreferrer",title:r,"aria-label":`${e} transaction on ${Mo(t)}`,children:Zf(r)}):r?(0,Q.jsx)("span",{title:r,children:Zf(r)}):(0,Q.jsx)("span",{className:"rd-muted",children:a}),o&&r&&(0,Q.jsx)("span",{className:"rd-history-step-shared",title:"Shared by deposits processed together",children:"combined transfer"})]})]})}function Kw(e){let t=e.deposits??[],r=e.amountOut||e.expectedOut||void 0;if(t.length>=2){let i=Yw(r,t);if(i)return t.map((s,l)=>({key:`${e.orderId}:${s.txHash}:${s.blockNumber}`,order:e,chainId:s.originChainId??ba,currency:s.originCurrency??"",routes:1,sentRaw:s.amount,receivedRaw:i[l].toString(),receivedIsEstimate:!0,deposit:s,sharedLegs:!0}))}let{chainId:n,currency:o,routes:a}=qw(e);return[{key:e.orderId,order:e,chainId:n,currency:o,routes:a,sentRaw:e.amountIn,receivedRaw:r,receivedIsEstimate:!e.amountOut&&!!e.expectedOut,sharedLegs:!1}]}function $i({orders:e,isLoading:t,error:r,catalog:n,showTitle:o=!0}){let[a,i]=(0,Vr.useState)({}),s=l=>i(d=>({...d,[l]:!d[l]}));return(0,Q.jsxs)("section",{className:o?"rd-card":"rd-stack","data-rd-orders-list":"",children:[o&&(0,Q.jsx)("div",{className:"rd-card-header",children:(0,Q.jsx)("h2",{className:"rd-card-title",children:"Transfer history"})}),t&&e.length===0&&(0,Q.jsxs)("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[(0,Q.jsx)("span",{className:"rd-spinner"})," Loading orders..."]}),r&&(0,Q.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load your orders: ",r.message]}),!t&&!r&&e.length===0&&(0,Q.jsx)(wa,{}),e.length>0&&(0,Q.jsx)("div",{className:"rd-history-table","data-vaul-no-drag":!0,children:e.flatMap(Kw).map(l=>{let{order:d}=l,c=n?.origins.find(N=>N.chainId===l.chainId&&N.token.address.toLowerCase()===l.currency.toLowerCase()),b=(d.target?n?.targets.find(N=>N.symbol.toLowerCase()===d.target.toLowerCase()):void 0)??n?.targets.find(N=>N.isDefault),f=b?.symbol??n?.destination.symbol??"",g=b?.decimals??n?.destination.decimals,x=n?.origins.find(N=>N.chainId===ba),w=Xi(l.sentRaw,x?.token.decimals),m=x?.token.symbol??"USDT",p=Xi(l.receivedRaw,g),y=d.deposits??[],h=!!a[l.key],v=Vw(d.completedAt??d.createdAt),R=_w(d.status),E=d.status==="COMPLETED"||Jf(d.status)?"Details unavailable":"Pending",C=l.receivedIsEstimate?"Estimated on ONEchain":"Received on ONEchain";return(0,Q.jsxs)("div",{className:"rd-history-group",children:[(0,Q.jsxs)("button",{type:"button",className:"rd-history-row-button",onClick:()=>s(l.key),"aria-expanded":h,"aria-label":`Toggle transfer details: ${R}, ${v}`,children:[(0,Q.jsxs)("span",{className:"rd-history-card-top",children:[(0,Q.jsx)("span",{className:"rd-history-asset",children:l.routes>1?(0,Q.jsxs)(Q.Fragment,{children:["Multiple deposits ",(0,Q.jsxs)("span",{className:"rd-muted",children:["\xB7 ",l.routes," chains"]})]}):(0,Q.jsxs)(Q.Fragment,{children:[c?.token.symbol??f," ",(0,Q.jsxs)("span",{className:"rd-muted",children:["from ",Mo(l.chainId)]})]})}),(0,Q.jsx)("span",{className:Hw(d.status),title:d.status,children:R})]}),(0,Q.jsxs)("span",{className:"rd-history-card-amounts",children:[(0,Q.jsxs)("span",{className:"rd-history-amount-block",children:[(0,Q.jsx)("span",{className:"rd-history-amount-label",children:"Processing address"}),(0,Q.jsx)(Bl,{amount:w,symbol:m,className:"rd-history-num"})]}),(0,Q.jsx)("span",{className:"rd-history-card-arrow","aria-hidden":"true",children:"\u2192"}),(0,Q.jsxs)("span",{className:"rd-history-amount-block",children:[(0,Q.jsx)("span",{className:"rd-history-amount-label",children:C}),(0,Q.jsx)(Bl,{amount:p,symbol:f,className:`rd-history-num rd-history-received${l.receivedIsEstimate?" rd-history-received-estimate":""}`})]})]}),(0,Q.jsxs)("span",{className:"rd-history-card-foot",children:[(0,Q.jsxs)("span",{className:"rd-history-date",children:[d.completedAt?"Completed":"Started"," \xB7 ",v]}),(0,Q.jsx)("span",{className:"rd-history-chevron","aria-hidden":"true",children:(0,Q.jsx)(Tr,{size:16})})]})]}),h&&(0,Q.jsxs)("div",{className:"rd-history-detail",children:[l.deposit?(0,Q.jsx)(Ji,{label:"Deposit confirmed",chainId:l.deposit.originChainId??ba,txHash:l.deposit.originTxHash||l.deposit.txHash,amount:Xi(l.deposit.amount,x?.token.decimals)}):y.length>0?y.map(N=>(0,Q.jsx)(Ji,{label:"Deposit confirmed",chainId:N.originChainId??ba,txHash:N.originTxHash||N.txHash,amount:Xi(N.amount,x?.token.decimals)},`${N.txHash}-${N.blockNumber}`)):(0,Q.jsxs)("div",{className:"rd-history-step",children:[(0,Q.jsx)("span",{className:"rd-history-step-dot"}),(0,Q.jsx)("span",{className:"rd-history-step-label",children:"Deposit confirmed"}),(0,Q.jsx)("span",{className:"rd-muted",children:"Details unavailable"})]}),(0,Q.jsx)(Ji,{label:"Bridge",chainId:ba,txHash:d.bscBridgeTx,shared:l.sharedLegs,missingLabel:E}),(0,Q.jsx)(Ji,{label:"ONEchain delivery",chainId:n?.destination.chainId??612055,txHash:d.deliveryTxHash,shared:l.sharedLegs,missingLabel:E})]})]},l.key)})})]})}var so=require("react");var Gt=require("react");var Lr=class extends Error{constructor(t,r,n){super(r),this.name="RelayApiError",this.status=t,this.body=n}};function Vt(e){let t=e.baseUrl.replace(/\/+$/,"");async function r(n,o){let a={...o?.headers};o?.body!=null&&(a["Content-Type"]="application/json");let i;try{i=await fetch(`${t}${n}`,{...o,headers:a})}catch(l){throw new Lr(0,`network error calling ${n}: ${l.message}`)}let s=await i.text();if(!i.ok){let l=`request to ${n} failed with status ${i.status}`,d;try{d=JSON.parse(s);let c=d;c?.error&&(l=c.error)}catch{d=s||void 0}throw new Lr(i.status,l,d)}try{return JSON.parse(s)}catch{throw new Lr(i.status,`expected a JSON response from ${n} but got ${s?"a non-JSON body":"an empty body"}`,s||void 0)}}return{getConfig(){return r("/v1/config").then(n=>({...n,targets:n.targets??[]}))},getQuote(n){return r("/v1/quote",{method:"POST",body:JSON.stringify(n)})},getDepositAddress(n,o){let a=new URLSearchParams({user:n.user,originChainId:String(n.originChainId),originCurrency:n.originCurrency});return o&&a.set("target",o),r(`/v1/deposit-address?${a.toString()}`)},getOrder(n){return r(`/v1/orders/${encodeURIComponent(n)}`)},listOrders(n){let o=new URLSearchParams({user:n});return r(`/v1/orders?${o.toString()}`).then(a=>a.orders??[])},ordersStreamUrl(n){return`${t}/v1/orders/stream?user=${encodeURIComponent(n)}`},getRecovery(n){let o=new URLSearchParams({user:n.user});return n.target&&o.set("target",n.target),r(`/v1/recovery?${o.toString()}`)}}}var $f=[{type:"function",name:"deploy",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}],zl=[{type:"function",name:"execute",stateMutability:"nonpayable",inputs:[],outputs:[]},{type:"function",name:"sweepToUser",stateMutability:"nonpayable",inputs:[{name:"tokenAddr",type:"address"}],outputs:[]}],Fl=[{type:"function",name:"computeAddress",stateMutability:"view",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}];var io=["0x486BEEc35A9a9915213Ea02AD3709738335F7702","0x3438735303911aBe113AdF14b18eE730cC24893b","0xA3B548Ab23043e6B24A087515fe1306379683533","0x44317d07378390543d99Ee76374E86C1Ef6cF832"];function es(e,t){return!e||!t?!1:e.toLowerCase()===t.toLowerCase()}function Zw(e,t){return t.some(r=>es(r,e))}function ts(e){if(!e||e.length===0)return io;let t=new Set,r=[];for(let n of e){if(typeof n!="string"||!ht(n))continue;let o=n.toLowerCase();t.has(o)||(t.add(o),r.push(n))}return r.length>0?r:io}async function em(e,t,{factory:r,forwarder:n,recipient:o,version:a,trusted:i=io}){if(!r||!n||!o||a===void 0)return{ok:!1,reason:"address verification is missing inputs (factory/forwarder/recipient/version)"};if(!Zw(r,i))return{ok:!1,reason:`factory ${r} 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:r,abi:Fl,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 es(s,n)?{ok:!0}:{ok:!1,reason:`forwarder address mismatch: the API returned ${n}, but factory ${r} derives ${s} for this account -- refusing to sign`}}async function tm(e,t,{forwarder:r,recipient:n,version:o,trusted:a=io}){if(!r||!n||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:Fl,functionName:"computeAddress",args:[n,BigInt(o)]})}catch{return}}));return i.some(s=>es(s,r))?{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: ${r} is not the address any known factory derives for this account -- refusing to deposit`}}function rm(e,t){return es(e,t)}var Pn=56,Ul={step:"idle"};function Xw(e){return e.tokens?.find(t=>t.recoverable)?.address??e.token}function ya(e={}){let t=(0,Gt.useRef)(e);t.current=e;let r=e.wallet,n=r?.walletChainId,o=e.recipient,a=o&&ht(o)?o:void 0,[i,s]=(0,Gt.useState)({}),l=(0,Gt.useCallback)((f,g)=>{s(x=>({...x,[f.toLowerCase()]:g}))},[]),d=(0,Gt.useCallback)(f=>f?i[f.toLowerCase()]??Ul:Ul,[i]),c=(0,Gt.useMemo)(()=>Object.values(i).some(f=>f.step==="switching"||f.step==="deploying"||f.step==="recovering"),[i]);return{recover:(0,Gt.useCallback)(async(f,g,x)=>{if(!a||!f?.forwarder)return;let w=f.forwarder;l(w,{step:"switching"});try{if(n!==Pn){if(!r?.switchChain)throw new Error("wallet cannot switch chains");await r.switchChain(Pn)}if(!r?.writeContract||!r?.readContract||!r?.waitForReceipt)throw new Error("wallet is missing contract capabilities required for recovery");let m=await em(r.readContract,Pn,{factory:f.factory,forwarder:f.forwarder,recipient:a,version:f.version,trusted:t.current.trustedFactories});if(!m.ok)throw new Error(`address verification failed: ${m.reason}`);let p;if(!f.isDeployed){if(l(w,{step:"deploying"}),p=await r.writeContract({address:f.factory,abi:$f,functionName:"deploy",args:[a,BigInt(f.version)],chainId:Pn}),l(w,{step:"deploying",deployTxHash:p}),(await r.waitForReceipt({chainId:Pn,hash:p})).status==="reverted")throw new Error(`forwarder deploy reverted on-chain (tx ${p})`);t.current.onChanged?.()}l(w,{step:"recovering",deployTxHash:p});let y=g==="execute"?await r.writeContract({address:f.forwarder,abi:zl,functionName:"execute",args:[],chainId:Pn}):await r.writeContract({address:f.forwarder,abi:zl,functionName:"sweepToUser",args:[x??Xw(f)],chainId:Pn});if(l(w,{step:"recovering",deployTxHash:p,actionTxHash:y}),(await r.waitForReceipt({chainId:Pn,hash:y})).status==="reverted")throw new Error(`recovery transaction reverted on-chain (tx ${y})`);l(w,{step:"done",deployTxHash:p,actionTxHash:y}),t.current.onRecoverySuccess?.({action:g,forwarder:f.forwarder,actionTxHash:y,...p?{deployTxHash:p}:{}}),t.current.onChanged?.()}catch(m){let p=m instanceof Error?m:new Error(String(m));s(y=>{let h=w.toLowerCase();return{...y,[h]:{...y[h]??Ul,step:"error",error:p.message}}}),t.current.onError?.(p)}},[a,n,r,l]),stateFor:d,busy:c}}function nm(e={}){let t=(0,Gt.useRef)(e);t.current=e;let r=(0,Gt.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRecovery: either `client` or `apiBaseUrl` must be provided");return Vt({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.recipient,o=n&&ht(n)?n:void 0,[a,i]=(0,Gt.useState)(),[s,l]=(0,Gt.useState)(!1),[d,c]=(0,Gt.useState)(),[b,f]=(0,Gt.useState)(0),g=e.target,x=e.enabled??!0,w=e.refetchInterval;(0,Gt.useEffect)(()=>{if(!o||!x){i(void 0),c(void 0),l(!1);return}let v=!1,R=!1,S=!0;async function E(){if(!(v||R)){R=!0,S&&l(!0);try{let N=await r.getRecovery({user:o,target:g});if(v)return;i(N),c(void 0)}catch(N){if(v)return;let I=N instanceof Error?N:new Error(String(N));c(I),t.current.onError?.(I),I instanceof Lr&&I.status===401&&t.current.onUnauthorized?.()}finally{R=!1,!v&&S&&l(!1),S=!1}}}E();let C=typeof w=="number"&&Number.isFinite(w)&&w>0?setInterval(()=>{E()},w):void 0;return()=>{v=!0,C&&clearInterval(C)}},[r,o,b,g,x,w]);let m=(0,Gt.useCallback)(()=>f(v=>v+1),[]),p=ya({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:m}),y=(0,Gt.useCallback)(async(v,R)=>{a&&await p.recover(a,v,R)},[p,a]),h=p.stateFor(a?.forwarder);return{info:a,loading:s,error:d,refresh:m,recover:y,recoveryState:h}}var Jw="BSC_FUNDED";function om(e){if(!e)return 0n;try{let t=BigInt(e);return t>0n?t:0n}catch{return 0n}}function $w(e,t){return e.target||t}function Ao(e,t=[]){let r=e.find(o=>o.isDefault)?.symbol,n=new Map;for(let o of e){if(!o.info?.forwarder)continue;let a=o.info.forwarder.toLowerCase(),i=n.get(a);if(i){i.targets.push(o.symbol);continue}n.set(a,{forwarder:o.info.forwarder,targets:[o.symbol],info:o.info,deposits:[],depositsTotal:0n})}for(let o of n.values()){let a=new Set(o.targets);for(let i of t){if(i.status!==Jw)continue;let s=$w(i,r);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+=om(l.amount)}o.deposits.sort((i,s)=>i.blockNumber-s.blockNumber)}return[...n.values()]}function am(e){return e.filter(t=>(t.info.tokens??[]).some(r=>r.recoverable)?!0:om(t.info.balance)>0n&&t.info.suggestedAction!=="none")}function rs(e){return e.reduce((t,r)=>t+(r.info.tokens??[]).filter(n=>n.recoverable).length,0)}var z=require("react/jsx-runtime"),ey=56;function ty(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 ry="This balance may already be processing. Recover only if it remains stuck.",ns="USDT",im="primary";function ny(e){return`${e} more recoverable under other delivery tokens -- switch the delivery token above to recover ${e===1?"it":"them"}.`}function oy(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 lm({message:e}){let[t,r]=(0,so.useState)("idle");(0,so.useEffect)(()=>{if(t==="idle")return;let a=window.setTimeout(()=>r("idle"),1500);return()=>window.clearTimeout(a)},[t]);async function n(){if(typeof navigator>"u"||!navigator.clipboard){r("failed");return}try{await navigator.clipboard.writeText(e),r("copied")}catch{r("failed")}}let o=t==="copied"?"Copied technical details":t==="failed"?"Copy failed":"Copy technical details";return(0,z.jsxs)("details",{className:"rd-error-details",children:[(0,z.jsx)("summary",{children:"View technical details"}),(0,z.jsxs)("div",{className:"rd-error-log",children:[(0,z.jsx)("button",{type:"button",className:"rd-error-copy",onClick:()=>{n()},"aria-label":o,"aria-live":"polite",title:o,children:t==="copied"?(0,z.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,z.jsx)("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,z.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,z.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),(0,z.jsx)("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"})]})}),(0,z.jsx)("code",{children:e})]})]})}function xa(e){if(!e)return 0n;try{return BigInt(e)}catch{return 0n}}function xn(e,t){try{return Zt(e,t)}catch{return e.toString()}}function sm(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function ay(e){let t=xa(e.bridgeMinWei),r=[];for(let a of e.tokens??[]){let i=xa(a.balance);if(!(i<=0n)){if(a.suggestedAction==="execute"){r.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,action:{kind:"execute"}});continue}if(a.recoverable){r.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,action:{kind:"sweep",tokenAddress:a.address}});continue}r.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,...t>i?{shortfall:t-i,minimum:t}:{}})}}let n=xa(e.balance),o=r.some(a=>a.action?.kind==="execute");return n>0n&&e.suggestedAction==="execute"&&!o?r.unshift({key:im,symbol:ns,decimals:e.decimals,balance:n,action:{kind:"execute"}}):r.length===0&&n>0n&&e.suggestedAction!=="none"&&r.push({key:im,symbol:ns,decimals:e.decimals,balance:n,action:{kind:"sweep"}}),r}function iy({deposit:e,decimals:t}){let r=e.originChainId??ey,n=e.originTxHash||e.txHash,o=n?Zi(r,n):void 0;return(0,z.jsxs)("div",{className:"rd-history-step","data-testid":"recovery-deposit-row",children:[(0,z.jsx)("span",{className:"rd-history-step-dot rd-history-step-dot-done"}),(0,z.jsx)("span",{className:"rd-history-step-chain",children:Mo(r)}),(0,z.jsx)("span",{className:"rd-history-step-amount",children:xn(xa(e.amount),t)}),(0,z.jsx)("span",{className:"rd-history-step-tx",children:o?(0,z.jsx)("a",{href:o.url,target:"_blank",rel:"noreferrer",title:n,children:sm(n)}):n?(0,z.jsx)("span",{title:n,children:sm(n)}):null})]})}function sy({group:e,showTargetLabel:t,busy:r,state:n,onRecover:o,actingRowKey:a,rowKeyOf:i}){let{info:s}=e,l=ay(s),d=xa(s.balance),c=l.length===1?`${xn(l[0].balance,l[0].decimals)}`:`${l.length} assets`,b=e.deposits.length>0&&e.depositsTotal>=d,f=d>e.depositsTotal?d-e.depositsTotal:0n,g=n.step==="switching"||n.step==="deploying"||n.step==="recovering",w=l.find(p=>i(p)===a)?.action?.kind;function m(){if(n.step==="switching")return"Switching to BNB Chain\u2026";if(n.step==="deploying")return"Confirm in wallet\u2026 (1/2 \u2014 preparing your deposit address)";let p=w==="execute"?"continuing ONEchain delivery":"returning funds";return n.deployTxHash?`Confirm in wallet\u2026 (2/2 \u2014 ${p})`:`Confirm in wallet\u2026 (${p})`}return(0,z.jsxs)("div",{className:"rd-recover-group","data-testid":"forwarder-section",children:[t&&(0,z.jsxs)("p",{className:"rd-recover-group-label",children:["Delivery target \xB7 ",(0,z.jsx)("b",{children:e.targets.join(", ")})]}),(0,z.jsxs)("div",{className:"rd-recover-sum",children:[(0,z.jsx)("span",{className:"rd-recover-sum-label",children:"Funds awaiting processing"}),(0,z.jsxs)("span",{className:"rd-recover-sum-value",title:l.length===1?`${c} ${l[0].symbol}`:c,children:[c,l.length===1&&(0,z.jsxs)(z.Fragment,{children:[" ",(0,z.jsx)("span",{className:"rd-recover-sum-unit",children:l[0].symbol})]})]})]}),e.deposits.length>0&&(0,z.jsxs)("details",{className:"rd-recover-made-of",children:[(0,z.jsxs)("summary",{className:"rd-recover-made-of-label",children:["Deposit history \xB7 ",e.deposits.length," ",e.deposits.length===1?"transfer":"transfers"]}),(0,z.jsxs)("div",{className:"rd-recover-made-of-body",children:[e.deposits.map(p=>(0,z.jsx)(iy,{deposit:p,decimals:s.decimals},`${p.txHash}-${p.blockNumber}`)),!b&&(0,z.jsxs)("p",{className:"rd-token-row-status","data-testid":"deposits-incomplete-note",children:["These transfers explain ",xn(e.depositsTotal,s.decimals)," of"," ",xn(d,s.decimals)," ",ns,". The remaining"," ",xn(f,s.decimals)," ",ns," is still included when you act."]})]})]}),(0,z.jsx)("div",{className:"rd-token-list",children:l.map(p=>{let y=i(p),h=g&&a===y;return(0,z.jsxs)("div",{className:"rd-token-row","data-token-symbol":p.symbol,children:[(0,z.jsx)(oo,{symbol:p.symbol,size:26}),(0,z.jsxs)("div",{className:"rd-token-row-info",children:[l.length>1&&(0,z.jsxs)("span",{className:"rd-token-row-amount",children:[xn(p.balance,p.decimals)," ",(0,z.jsx)("span",{className:"rd-token-row-symbol",children:p.symbol})]}),h?(0,z.jsx)("span",{className:"rd-token-row-step",role:"status","aria-live":"polite",children:m()}):p.shortfall!==void 0&&p.minimum!==void 0?(0,z.jsxs)("span",{className:"rd-token-row-warn",children:["Needs ",(0,z.jsxs)("b",{children:[xn(p.shortfall,p.decimals)," ",p.symbol]})," more to reach the"," ",xn(p.minimum,p.decimals)," ",p.symbol," minimum. Add it through"," ",(0,z.jsx)("b",{children:"Deposit to CROSS"})," and both amounts will process together."]}):p.action?(0,z.jsx)("span",{className:"rd-token-row-status",children:p.action.kind==="execute"?"Ready to continue delivery to ONEchain":"Ready to return to your BNB Chain wallet"}):(0,z.jsx)("span",{className:"rd-token-row-status",children:"Waiting for processing"})]}),h?(0,z.jsx)("span",{className:"rd-spinner rd-token-row-spinner"}):p.action&&(0,z.jsx)("button",{type:"button",className:"rd-button-primary rd-token-row-action",onClick:()=>o(p),disabled:r,children:p.action.kind==="execute"?"Continue delivery":"Return to wallet"})]},p.key)})}),!s.isDeployed&&n.step==="idle"&&(0,z.jsxs)("div",{className:"rd-callout rd-callout-warning","data-testid":"two-tx-notice",children:["The first action from this address needs ",(0,z.jsx)("b",{children:"two wallet confirmations"}),": prepare the address, then move the funds. Later actions need one."]}),s.inFlight&&(0,z.jsx)("p",{className:"rd-muted rd-token-row-status",children:s.inFlightReason||ry}),n.step==="done"&&(0,z.jsx)("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."}),n.step==="error"&&n.error&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("div",{className:"rd-callout rd-callout-danger",role:"alert",children:oy(n.error)}),(0,z.jsx)(lm,{message:n.error})]})]})}function os(e){let{info:t,loading:r,error:n,refresh:o}=nm(ty(e)),a=r||e.targets!==void 0&&e.targetsLoading===!0,i=ya({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]=(0,so.useState)(),d=e.targets!==void 0?[...e.targets]:t?[{symbol:e.target??"",isDefault:!0,info:t}]:[],c=am(Ao(d,e.orders??[])),b=c.length>0,f=e.targets!==void 0?e.onRecovered:o,g=e.wallet?.walletAddress,x=e.wallet?.getBalance,[w,m]=(0,so.useState)();return(0,so.useEffect)(()=>{if(!b||!x||!g){m(void 0);return}let p=!1;return x({chainId:56,address:g}).then(y=>{p||m({value:y.value,decimals:y.decimals})}).catch(()=>{p||m(void 0)}),()=>{p=!0}},[b,x,g]),(0,z.jsxs)("section",{className:e.showTitle??!0?"rd-card":"rd-stack","data-rd-recover-funds":"",children:[(e.showTitle??!0)&&(0,z.jsx)("div",{className:"rd-card-header",children:(0,z.jsx)("h2",{className:"rd-card-title",children:"Recover stuck funds"})}),typeof e.otherTargetsRecoverable=="number"&&e.otherTargetsRecoverable>0&&(0,z.jsx)("div",{className:"rd-callout rd-callout-muted","data-testid":"other-targets-recoverable-note",children:ny(e.otherTargetsRecoverable)}),a&&(0,z.jsxs)("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[(0,z.jsx)("span",{className:"rd-spinner"})," Checking for recoverable funds\u2026"]}),n&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("div",{className:"rd-callout rd-callout-danger",role:"alert",children:"Couldn't check recoverable funds. Please try again."}),(0,z.jsx)(lm,{message:n.message})]}),!a&&!n&&!b&&(0,z.jsxs)("div",{className:"rd-recover-empty",role:"status","data-testid":"rd-recover-empty-state",children:[(0,z.jsx)("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:(0,z.jsxs)("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,z.jsx)("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"}),(0,z.jsx)("path",{d:"M5 10h14",stroke:"currentColor",strokeWidth:"1.7"}),(0,z.jsx)("path",{d:"m9.2 14 1.7 1.7 3.9-4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,z.jsx)("h3",{className:"rd-recover-sum-value rd-recover-sum-empty rd-recover-empty-title",children:"Nothing to recover"}),(0,z.jsx)("p",{className:"rd-recover-empty-copy",children:"No funds are waiting at your deposit addresses. If funds become stuck, they will appear here."}),f&&(0,z.jsxs)("button",{type:"button",className:"rd-button-secondary rd-recover-empty-refresh",onClick:f,"data-track":"refresh_recovery",children:[(0,z.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,z.jsx)("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&&!n&&c.map(p=>(0,z.jsx)(sy,{group:p,showTargetLabel:c.length>1||p.targets.length>1,busy:i.busy,state:i.stateFor(p.forwarder),actingRowKey:s,rowKeyOf:y=>`${p.forwarder.toLowerCase()}:${y.key}`,onRecover:y=>{y.action&&(l(`${p.forwarder.toLowerCase()}:${y.key}`),i.recover(p.info,y.action.kind,y.action.tokenAddress))}},p.forwarder.toLowerCase())),!a&&!n&&b&&(0,z.jsxs)("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&&(0,z.jsxs)(z.Fragment,{children:[" ",(0,z.jsxs)("b",{children:[xn(w.value,w.decimals)," BNB"]})]}),!w&&" unavailable","."]}),!a&&!n&&b&&(0,z.jsx)("p",{className:"rd-recover-foot",children:"Delivery continues to ONEchain; returned funds go to your connected BNB Chain wallet."})]})}var _t=V(require("react"),1),br=V(require("@radix-ui/react-dialog"),1),lo=require("vaul");he(`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}
19
+ `);var Xt=require("react/jsx-runtime"),dm=24;function cm(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function ly(e,t,r){let n=r?.offsetTop??t.top,o=r?r.offsetTop+r.height:t.bottom,a=Math.max(t.top,n)+dm,i=Math.min(t.bottom,o)-dm;return e.top<a?e.top-a:e.bottom>i?e.bottom-i:0}function dy(){let e=_t.useRef(0),[t,r]=_t.useState({keyboardHeight:0,keyboardOverlap:0,viewportHeight:0});return _t.useEffect(()=>{let n=window.visualViewport;if(!n)return;let o=()=>{let a=Math.max(window.innerHeight,document.documentElement.clientHeight);e.current=Math.max(e.current,a,n.height+n.offsetTop);let i=Math.max(0,e.current-n.height-n.offsetTop),s=Math.max(0,e.current-a),l=Math.max(0,i-s),d=n.height;r(c=>c.keyboardHeight===i&&c.keyboardOverlap===l&&c.viewportHeight===d?c:{keyboardHeight:i,keyboardOverlap:l,viewportHeight:d})};return o(),n.addEventListener("resize",o),n.addEventListener("scroll",o),()=>{n.removeEventListener("resize",o),n.removeEventListener("scroll",o)}},[]),t}function cy(e){let t=`(max-width: ${e}px)`,[r,n]=_t.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(t).matches);return _t.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia(t);n(o.matches);let a=i=>n(i.matches);return o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[t]),r}function vn({theme:e="dark",mobileBreakpoint:t=768,drawerDirection:r="bottom",dialogWidth:n,drawerMaxWidth:o,drawerMinWidth:a,style:i,open:s,onOpenChange:l,children:d}){let c=cy(t),[b,f]=_t.useState(!1),g=s!==void 0,x=g?s:b,w=_t.useCallback(h=>{g||f(h),l?.(h)},[g,l]);Cn(x,_t.useCallback(()=>w(!1),[w]));let m=_t.useMemo(()=>{let h={};return n&&(h["--rd-dialog-width"]=n),o&&(h["--rd-drawer-max-width"]=o),a&&(h["--rd-drawer-min-width"]=a),{...h,...i}},[n,o,a,i]),p=_t.useMemo(()=>({open:x,setOpen:w,isMobile:c,theme:e,drawerDirection:r,portalStyle:m}),[x,w,c,e,r,m]),y=(0,Xt.jsx)("div",{"data-theme":e,style:m,children:d});return c?(0,Xt.jsx)(Vi.Provider,{value:p,children:(0,Xt.jsx)(lo.Drawer.Root,{direction:r,open:x,onOpenChange:w,noBodyStyles:!0,children:y},"drawer")}):(0,Xt.jsx)(Vi.Provider,{value:p,children:(0,Xt.jsx)(br.Root,{open:x,onOpenChange:w,children:y})})}function Lo({asChild:e,children:t,dataAttributes:r}){let{isMobile:n}=Hr(),o=n?lo.Drawer.Trigger:br.Trigger;return(0,Xt.jsx)(o,{asChild:e,...r,children:t})}function kn({className:e,ariaTitle:t,children:r}){let{open:n,isMobile:o,theme:a,drawerDirection:i,portalStyle:s}=Hr(),{keyboardHeight:l,keyboardOverlap:d,viewportHeight:c}=dy(),b=Wa(),f=_t.useRef(null),g=_t.useRef(null);_t.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),_t.useEffect(()=>{g.current&&clearTimeout(g.current);let p=document.activeElement;!n&&cm(p)&&f.current?.contains(p)&&p.blur(),f.current?.querySelectorAll("[data-rd-scroll-area]").forEach(y=>{y.scrollTo?.({top:0,behavior:"auto"})})},[n]);let x=o&&i==="bottom"&&l>0,w=x?{bottom:d,maxHeight:`min(85dvh, calc(${c}px - env(safe-area-inset-top, 0px)))`}:void 0,m=_t.useCallback(p=>{if(!o||i!=="bottom"||!cm(p.target))return;let y=p.target,h=y.closest("[data-rd-scroll-area]");h&&(g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{let v=ly(y.getBoundingClientRect(),h.getBoundingClientRect(),window.visualViewport);Math.abs(v)>=1&&h.scrollBy?.({top:v,behavior:"auto"}),g.current=null},280))},[i,o]);return o?(0,Xt.jsxs)(lo.Drawer.Portal,{children:[(0,Xt.jsx)(lo.Drawer.Overlay,{className:"rd-overlay"}),(0,Xt.jsxs)(lo.Drawer.Content,{ref:f,className:ze("rd-drawer-content",e),"data-theme":a,"data-rd-shell":"drawer","data-rd-in-app":b?"true":"false","data-rd-keyboard-adjusted":x?"true":"false",style:{...s,...w},onFocusCapture:m,children:[(0,Xt.jsx)(lo.Drawer.Title,{className:"rd-sr-only",children:t}),(0,Xt.jsx)("div",{className:"rd-drawer-handle"}),r]})]}):(0,Xt.jsxs)(br.Portal,{children:[(0,Xt.jsx)(br.Overlay,{className:"rd-overlay"}),(0,Xt.jsxs)(br.Content,{className:ze("rd-dialog-content",e),"data-theme":a,"data-rd-shell":"dialog",style:s,children:[(0,Xt.jsx)(br.Title,{className:"rd-sr-only",children:t}),(0,Xt.jsx)(br.Description,{className:"rd-sr-only",children:t}),r]})]})}var fe=require("react/jsx-runtime");function py({id:e,activeView:t,recoverableCount:r,onChange:n}){let o=["deposit","history","recover"];return(0,fe.jsx)("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(0,fe.jsxs)("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:()=>n(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,c=o[d];n(c),document.getElementById(`${e}-${c}-tab`)?.focus()},children:[(0,fe.jsx)("span",{children:i}),a==="recover"&&r>0&&(0,fe.jsx)("span",{className:"rd-recovery-badge","data-testid":"recovery-badge",children:r})]},a)})})}function um({className:e}){let t=ma();return(0,fe.jsx)(Ce,{feature:"relay",children:(0,fe.jsx)(kn,{ariaTitle:"Deposit",className:["rd-deposit-shell",e??t.className].filter(Boolean).join(" "),children:(0,fe.jsx)(uy,{})})})}function uy(){let e=ma(),{theme:t}=Hr(),r=zf(),n=pm.useId();if(!r)return null;let{activeView:o,setActiveView:a,recoveryOpen:i,resolvedApiBaseUrl:s,wallet:l,catalog:d,catalogLoading:c,catalogError:b,origin:f,setOrigin:g,amount:x,setAmount:w,recipient:m,setRecipient:p,recipientValid:y,balance:h,balanceLoading:v,insufficientBalance:R,depositAddress:S,depositAddressLoading:E,depositAddressError:C,arrivalStatus:N,quote:I,quoteLoading:M,quoteError:W,canDeposit:L,deposit:H,depositState:A,targetOptions:O,selectedTarget:ce,setSelectedTarget:X,showAmountInput:P,minNotice:xe,showRecipientInput:ne,showTargetSelector:K,showOneClick:U,showConnectPrompt:te,showRecipientHint:Z,canRecover:be,recoverableCount:Ne,recoveryTargetsLoading:re,recoveryTargets:we,recoveryOrders:Fe,historyOrdersLoading:Ae,historyOrdersError:pt,refreshRecovery:ye,trustedFactories:De,amountHint:ut,amountSmallestUnits:Be,onMax:Ge}=r;return(0,fe.jsxs)("div",{className:"rd-root rd-wizard","data-theme":t,"data-rd-scroll-area":!0,children:[(0,fe.jsx)(py,{id:n,activeView:o,recoverableCount:Ne,onChange:a}),i&&(0,fe.jsx)("div",{className:"rd-deposit-tab-panel",id:`${n}-recover-panel`,role:"tabpanel","aria-labelledby":`${n}-recover-tab`,children:be?(0,fe.jsx)(os,{client:e.client,apiBaseUrl:s,recipient:m,target:ce?.symbol,wallet:l,trustedFactories:De,targets:(d?.targets.length??0)>0?we:void 0,targetsLoading:re,orders:Fe,onRecovered:ye,onRecoverySuccess:e.onRecoverySuccess,onError:e.onError,showTitle:!1}):(0,fe.jsxs)("div",{className:"rd-recover-empty",role:"status","data-variant":"unavailable","data-testid":"rd-recovery-unavailable-note",children:[(0,fe.jsx)("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:(0,fe.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,fe.jsx)("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),(0,fe.jsx)("path",{d:"M8 10V7.5a4 4 0 0 1 8 0V10",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),(0,fe.jsx)("circle",{cx:"12",cy:"15",r:"1.2",fill:"currentColor"})]})}),(0,fe.jsx)("h3",{className:"rd-recover-empty-title",children:"Recovery unavailable"}),(0,fe.jsx)("p",{className:"rd-recover-empty-copy",children:"Connect a wallet that supports recovery transactions to continue."})]})}),o==="history"&&(0,fe.jsx)("div",{className:"rd-deposit-tab-panel",id:`${n}-history-panel`,role:"tabpanel","aria-labelledby":`${n}-history-tab`,children:y&&m.trim()?(0,fe.jsx)($i,{orders:Fe,isLoading:c||Ae,error:b??pt,catalog:d,showTitle:!1}):(0,fe.jsx)(wa,{requiresIdentity:!0})}),o==="deposit"&&(0,fe.jsxs)("div",{className:"rd-deposit-tab-panel",id:`${n}-deposit-panel`,role:"tabpanel","aria-labelledby":`${n}-deposit-tab`,children:[c&&(0,fe.jsxs)("div",{className:"rd-skeleton-form","data-testid":"rd-source-skeleton","aria-hidden":"true",children:[(0,fe.jsx)(Ki,{}),te&&e.onRequestConnect&&(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-cta"}),(0,fe.jsxs)("section",{className:"rd-stack",children:[(0,fe.jsxs)("div",{className:"rd-field",children:[(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"18%"}}),(0,fe.jsxs)("div",{className:"rd-field-row",children:[(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),P&&(0,fe.jsxs)("div",{className:"rd-field",children:[(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"34%"}}),(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),(0,fe.jsxs)("div",{className:"rd-field",children:[(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"24%"}}),(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),(ne||m.trim().length>0)&&(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"58%",marginTop:"0.5rem"}}),(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),ne&&(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"82%"}})]})]}),(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-notice"})]}),c&&(0,fe.jsx)("p",{className:"rd-sr-only",role:"status",children:"Loading deposit options..."}),b&&(0,fe.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Failed to load configuration: ",b.message]}),Z&&(0,fe.jsx)("div",{className:"rd-callout rd-callout-muted",children:ne?"Connect a wallet or provide a recipient address to fetch your deposit address.":"Connect a wallet to fetch your deposit address."}),d&&f&&(0,fe.jsx)(Kf,{catalog:d,origin:f,onChangeOrigin:g,amount:x,onChangeAmount:w,showAmountInput:P,minNotice:xe,amountHint:ut,onMax:Ge,recipient:m,onChangeRecipient:p,showRecipientInput:ne,recipientValid:y,balance:h,balanceLoading:v,insufficientBalance:R,targetOptions:O,selectedTarget:ce,onChangeTarget:X,showTargetSelector:K,quote:I,quoteLoading:M,quoteError:W,depositAddress:S,depositAddressLoading:E,depositAddressError:C,arrivalStatus:N,amountSmallestUnits:Be,depositState:A,onDeposit:()=>{H()},canDeposit:L&&U,oneClickEnabled:U,locked:te,onRequestConnect:e.onRequestConnect})]})]})}var as=require("react/jsx-runtime");function fm({asChild:e,children:t}){return(0,as.jsx)(Ce,{feature:"relay",children:(0,as.jsx)(Lo,{asChild:e??t!=null,children:t??(0,as.jsx)("button",{type:"button","data-track":"open",children:"Deposit"})})})}var Le=V(require("react"),1);var ge=require("react");var is=require("react");function mm(e,t){let[r,n]=(0,is.useState)(e);return(0,is.useEffect)(()=>{let o=setTimeout(()=>n(e),t);return()=>clearTimeout(o)},[e,t]),r}var fy=500,hm=56,gm={chainId:hm,token:"0x55d398326f99059fF775485246999027B3197955"},bm=3e4,my=5e3;function gy(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?bm:Math.max(my,e*1e3)}var hy=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function jl(e,t){let r=e.trim();if(!r)return null;try{let n=qi(r,t);return n>0n?n:null}catch{return null}}function wm(e={}){let t=(0,ge.useRef)(e);t.current=e;let r=(0,ge.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useDepositAddress: either `client` or `apiBaseUrl` must be provided");return Vt({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.wallet,o=n?.walletAddress,a=!!o,i=n?.walletChainId,[s,l]=(0,ge.useState)(),[d,c]=(0,ge.useState)(!0),[b,f]=(0,ge.useState)();(0,ge.useEffect)(()=>{let ie=!1;return c(!0),r.getConfig().then(Se=>{ie||(l(Se),f(void 0))}).catch(Se=>{ie||f(Se instanceof Error?Se:new Error(String(Se)))}).finally(()=>{ie||c(!1)}),()=>{ie=!0}},[r]);let g=e.chains,x=(0,ge.useMemo)(()=>{if(!s)return[];if(!g||g.length===0)return s.origins;let ie=new Set(g);return s.origins.filter(Se=>ie.has(Se.chainId))},[s,g]),w=(0,ge.useMemo)(()=>s?{...s,origins:x}:void 0,[s,x]),[m,p]=(0,ge.useState)();(0,ge.useEffect)(()=>{if(m||x.length===0)return;let ie=t.current.defaultToken,Se=ie?x.find(G=>G.chainId===ie.chainId&&G.token.address.toLowerCase()===ie.address.toLowerCase()):void 0;p(Se??x[0])},[x,m]);let[y,h]=(0,ge.useState)(),v=(0,ge.useCallback)(()=>{_e(void 0),nt(!1),F(!1),B(!1),At(void 0)},[]),R=(0,ge.useCallback)(ie=>{p(ie),h(void 0),v()},[v]),S=m?.kind==="svm",[E,C]=(0,ge.useState)(""),N=e.amount!==void 0?e.amount:E,I=(0,ge.useCallback)(ie=>{C(ie),h(void 0),v()},[v]),M=mm(N,fy),W=m?jl(M,m.token.decimals):null,L=m?jl(N,m.token.decimals):null,[H,A]=(0,ge.useState)(""),[O,ce]=(0,ge.useState)(!1),X=e.recipient!==void 0?e.recipient:H,P=(0,ge.useCallback)(ie=>{A(ie),ce(!0),h(void 0),v()},[v]);(0,ge.useEffect)(()=>{e.recipient===void 0&&o&&!O&&A(o)},[o,O,e.recipient]);let xe=X.length===0||ht(X),ne=X.length>0&&ht(X)?X:void 0,[K,U]=(0,ge.useState)(),[te,Z]=(0,ge.useState)(!1),[be,Ne]=(0,ge.useState)(0),re=n?.getBalance;(0,ge.useEffect)(()=>{if(!re||!o||!m||S){U(void 0),Z(!1);return}let ie=!1;Z(!0);let Se=m.token.address.toLowerCase()===ga?void 0:m.token.address;return re({chainId:m.chainId,address:o,token:Se}).then(G=>{ie||U({...G,formatted:Zt(G.value,G.decimals)})}).catch(()=>{ie||U(void 0)}).finally(()=>{ie||Z(!1)}),()=>{ie=!0}},[re,o,m,S,be]);let we=K?.value??null,Fe=!S&&L!==null&&we!==null&&L>we,[Ae,pt]=(0,ge.useState)(),[ye,De]=(0,ge.useState)(!1),[ut,Be]=(0,ge.useState)(),Ge=m?.chainId,Ue=m?.token.address,st=e.target;(0,ge.useEffect)(()=>{if(!ne||!Ge||!Ue){pt(void 0),Be(void 0),De(!1);return}let ie=!1;return pt(void 0),Be(void 0),De(!0),(st?r.getDepositAddress({user:ne,originChainId:Ge,originCurrency:Ue},st):r.getDepositAddress({user:ne,originChainId:Ge,originCurrency:Ue})).then(G=>{ie||(pt(G),Be(void 0),t.current.onDepositAddress?.(G))}).catch(G=>{if(ie)return;pt(void 0);let Pe=G instanceof Error?G:new Error(String(G));Be(Pe),t.current.onError?.(Pe)}).finally(()=>{ie||De(!1)}),()=>{ie=!0}},[r,ne,Ge,Ue,st]);let Ht=[Ge??"",(Ue??"").toLowerCase(),(ne??"").toLowerCase(),st??"",N.trim()].join("|"),Rt=(0,ge.useRef)(Ht);(0,ge.useEffect)(()=>{Rt.current!==Ht&&(Rt.current=Ht,h(void 0),v())},[Ht,v]);let[Ut,Ie]=(0,ge.useState)(),[jt,tt]=(0,ge.useState)(!1),[Mt,Ve]=(0,ge.useState)(),Ze=W?.toString();(0,ge.useEffect)(()=>{if(!Ge||!Ue||!Ze){Ie(void 0),Ve(void 0),tt(!1);return}let ie=!1,Se,G=!0;async function Pe(){G&&tt(!0);let q=bm;try{let He=await r.getQuote({originChainId:Ge,originCurrency:Ue,amount:Ze});if(ie)return;Ie(He),Ve(void 0),q=gy(He.ttl)}catch(He){if(ie)return;Ie(void 0),Ve(He instanceof Error?He:new Error(String(He)))}finally{ie||tt(!1),G=!1}ie||(Se=setTimeout(Pe,q))}return Pe(),()=>{ie=!0,Se&&clearTimeout(Se)}},[r,Ge,Ue,Ze]);let[nr,Wt]=(0,ge.useState)(!1),[qe,wt]=(0,ge.useState)(!1),[rt,_e]=(0,ge.useState)(),[ft,At]=(0,ge.useState)(),[je,nt]=(0,ge.useState)(!1),[qt,F]=(0,ge.useState)(!1),[Xe,B]=(0,ge.useState)(!1),se=n?.waitForReceipt,ve=(0,ge.useRef)(void 0);(0,ge.useEffect)(()=>{if(!rt||!m||!se)return;let ie=!1;return nt(!0),F(!1),B(!1),se({chainId:m.chainId,hash:rt}).then(Se=>{ie||(F(!0),B(Se.status==="reverted"),Ne(G=>G+1),Se.status!=="reverted"&&rt!==ve.current&&(ve.current=rt,t.current.onDeposited?.(rt)))}).catch(Se=>{ie||At(Se instanceof Error?Se.message:String(Se))}).finally(()=>{ie||nt(!1)}),()=>{ie=!0}},[rt,se]);let Te=i!==void 0&&m!==void 0&&i!==m.chainId,ot=nr||qe,or=y??ft,ur="idle";or?ur="error":qt?ur="confirmed":je?ur="confirming":ot&&(ur=nr?"switching":"pending");let Or={phase:ur,isSubmitting:ot,isConfirming:je,isConfirmed:qt,needsSwitch:Te,txHash:rt,reverted:qt&&Xe,error:or},dn=!!(m&&Ae&&Ae.originChainId===m.chainId&&Ae.originCurrency.toLowerCase()===m.token.address.toLowerCase()),Rr=!!(n?.sendTransaction&&n?.writeContract&&n?.readContract&&n?.waitForReceipt),cn=!!(a&&Rr&&m&&!S&&Ae&&dn&&L&&L>0n&&!Fe&&!ot&&!je),Br=(0,ge.useCallback)(async()=>{if(S||!m||!Ae||!n?.sendTransaction||!n?.writeContract)return;h(void 0);let ie=jl(N,m.token.decimals);if(!ie||ie<=0n){h("enter an amount to use the one-click deposit");return}let Se=m.token.address.toLowerCase()===ga,G=Ae.depositAddress,Pe=await tm(n?.readContract,hm,{forwarder:Ae.forwarder,recipient:ne,version:Ae.version,trusted:t.current.trustedFactories});if(!Pe.ok){h(`address verification failed: ${Pe.reason}`);return}if(m.chainId===gm.chainId&&m.token.address.toLowerCase()===gm.token.toLowerCase()&&!rm(G,Ae.forwarder)){h("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(Te){if(!n?.switchChain)throw new Error("wallet cannot switch chains");Wt(!0);try{await n.switchChain(m.chainId)}finally{Wt(!1)}}v(),wt(!0);try{let He=Se?await n.sendTransaction({chainId:m.chainId,to:G,value:ie}):await n.writeContract({chainId:m.chainId,address:m.token.address,abi:hy,functionName:"transfer",args:[G,ie]});_e(He)}finally{wt(!1)}}catch(He){h(He.message)}},[S,m,Ae,N,Te,n,ne,v]);return{address:o,isConnected:a,catalog:w,catalogLoading:d,catalogError:b,origin:m,setOrigin:R,recipient:X,setRecipient:P,recipientValid:xe,amount:N,setAmount:I,balance:K,balanceLoading:te,insufficientBalance:Fe,isSvmOrigin:S,depositAddress:Ae?.depositAddress,depositAddressResult:Ae,depositAddressLoading:ye,depositAddressError:ut,quote:Ut,quoteLoading:jt,quoteError:Mt,canDeposit:cn,deposit:Br,depositState:Or}}var qr=require("react");var by=3e4,wy=300;function Rn(e){let t=(0,qr.useRef)(e);t.current=e;let{client:r,enabled:n=!0,live:o=!0}=e,a=e.refetchInterval??e.fallbackPollMs??by,i=e.recipient&&ht(e.recipient)?e.recipient:void 0,[s,l]=(0,qr.useState)([]),[d,c]=(0,qr.useState)(!1),[b,f]=(0,qr.useState)(),[g,x]=(0,qr.useState)(!1),[w,m]=(0,qr.useState)(),[p,y]=(0,qr.useState)(0);return(0,qr.useEffect)(()=>{if(!i){l([]),f(void 0),c(!1),x(!1),m(void 0),y(0);return}if(!n){l([]),f(void 0),c(!1),x(!1),m(void 0),y(0);return}let h=!1,v=!0,R,S=0,E=0;async function C(){let W=++S;E+=1,v&&c(!0);try{let L=await r.listOrders(i);if(h)return;W===S&&(l(L),f(void 0))}catch(L){if(h)return;let H=L instanceof Error?L:new Error(String(L));W===S&&(f(H),t.current.onError?.(H))}finally{E-=1,!h&&W===S&&(c(!1),x(!0),m(i),y(L=>L+1)),v=!1}}function N(){R&&clearTimeout(R),R=setTimeout(()=>{R=void 0,h||C()},wy)}C();let I;o&&typeof EventSource<"u"&&(I=new EventSource(r.ordersStreamUrl(i)),I.addEventListener("orders-changed",N),I.onopen=()=>{N()});let M=o&&Number.isFinite(a)&&a>0?setInterval(()=>{E===0&&C()},a):void 0;return()=>{h=!0,R&&clearTimeout(R),M&&clearInterval(M),I?.close()}},[r,i,n,o,a]),{orders:s,ordersLoading:d,ordersError:b,ordersInitialized:g,ordersForRecipient:w,ordersRevision:p}}var ss=require("react");function ym(e,t){if(t){let r=e.find(n=>n.symbol===t);if(r)return r}return e.find(r=>r.isDefault)??e[0]}function xm({catalogTargets:e,filter:t,defaultTarget:r}){let n=(0,ss.useMemo)(()=>{if(!t||t.length===0)return e;let l=new Set(t);return e.filter(d=>l.has(d.symbol))},[e,t]),[o,a]=(0,ss.useState)(()=>ym(n,r)?.symbol),i=(o!==void 0?n.find(l=>l.symbol===o):void 0)??ym(n,r);function s(l){n.some(d=>d.symbol===l)&&a(l)}return{options:n,selected:i,setSelected:s}}var yy={dev:"https://dev-relay-protocol-api.onechain.nexus",stage:"https://dev-relay-protocol-api.onechain.nexus",production:"https://relay-protocol-api.onechain.nexus"};function On(e){return e.apiBaseUrl?e.apiBaseUrl:yy[at(e.environment)]}var ds=require("react/jsx-runtime"),vm=1e3;function xy(e,t,r,n,o){let a=e.requireWalletConnection??e.showRecipientInput===!1,i=r.walletAddress&&ht(r.walletAddress)?r.walletAddress:void 0;return{client:e.client,apiBaseUrl:n,wallet:r,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 ls(e,t){let r=e.trim();if(!r)return 0n;try{let n=qi(r,t);return n>0n?n:0n}catch{return 0n}}function vy(e,t,r,n){if(t!==void 0&&e.forwarderVersion!==t)return!1;let o=e.target?.trim();return o?!!(r&&o.toLowerCase()===r.toLowerCase()):n}function km(e,t,r){return`${e}:${t.toLowerCase()}:${r}`}function ky(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Rm({open:e,children:t}){let[r]=Le.useState(Bf);return(0,ds.jsxs)(Ll.Provider,{value:r,children:[e&&(0,ds.jsx)(Ry,{store:r}),t]})}function Ry({store:e}){let t=ma(),{showTargetSelector:r=!0}=t,n=t.requireWalletConnection??t.showRecipientInput===!1,o=!!(t.walletAddress&&ht(t.walletAddress)),[a,i]=Le.useState("deposit"),s=a==="recover",l=Le.useCallback(_=>{i(xt=>(typeof _=="function"?_(xt==="recover"):_)?"recover":"deposit")},[]);Le.useEffect(()=>{Ye("relay","opened")},[]);let[d,c]=Le.useState(void 0),b=Le.useMemo(()=>On({apiBaseUrl:t.apiBaseUrl,environment:t.environment}),[t.apiBaseUrl,t.environment]),f=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=at(t.environment),x=sr("apps.json",g,_=>({min:Nr(_?.relay?.minDepositAmount,g),max:Nr(_?.relay?.maxDepositAmount,g),trustedFactories:Fa(_,g)})),w=Le.useMemo(()=>t.trustedFactories??ts(x?.trustedFactories),[t.trustedFactories,x?.trustedFactories]),{isConnected:m,catalog:p,catalogLoading:y,catalogError:h,origin:v,setOrigin:R,amount:S,setAmount:E,recipient:C,setRecipient:N,recipientValid:I,balance:M,balanceLoading:W,insufficientBalance:L,depositAddress:H,depositAddressResult:A,depositAddressLoading:O,depositAddressError:ce,quote:X,quoteLoading:P,quoteError:xe,canDeposit:ne,deposit:K,depositState:U}=wm(xy(t,d,f,b,w)),{options:te,selected:Z,setSelected:be}=xm({catalogTargets:p?.targets??[],filter:t.targetTokens,defaultTarget:t.defaultTarget});Le.useEffect(()=>{c(Z?.symbol)},[Z?.symbol]);let Ne=t.amount===void 0&&!t.hideAmount,re=!n&&(t.showRecipientInput??!0)&&t.recipient===void 0,we=I&&C.trim().length>0&&ht(C),Fe=!n&&t.recipient!==void 0&&t.recipient.trim().length>0,Ae=n?!o||!we:!m&&!Fe&&!we,pt=!!p&&!we&&!Ae,ye=(t.showRecovery??!1)&&o&&!!(f.writeContract&&f.readContract&&f.waitForReceipt),De=Le.useMemo(()=>t.client?t.client:Vt({baseUrl:b}),[t.client,b]),[ut,Be]=Le.useState({}),[Ge,Ue]=Le.useState(!1),[st,Ht]=Le.useState(0),Rt=Le.useCallback(()=>Ht(_=>_+1),[]),Ut=U.isConfirmed,Ie=we&&(!!A||a!=="deposit"),{orders:jt,ordersLoading:tt,ordersError:Mt,ordersInitialized:Ve,ordersForRecipient:Ze}=Rn({client:De,recipient:Ie?C:void 0,enabled:Ie,refetchInterval:vm}),nr=jt,Wt=Z??p?.targets.find(_=>_.isDefault),qe=Wt?.symbol??p?.destination.symbol,wt=Wt?.isDefault??!0,rt=A?.version,_e=Le.useMemo(()=>jt.filter(_=>vy(_,rt,qe,wt)),[jt,rt,qe,wt]),ft=Le.useRef(void 0),[At,je]=Le.useState(),[nt,qt]=Le.useState(),F=`${C.toLowerCase()}:${qe?.toLowerCase()??""}:${rt??""}`;Le.useEffect(()=>{let _=Ze?.toLowerCase()===C.toLowerCase();if(!Ie||!Ve||!_||Mt){Ie||(ft.current=void 0,je(void 0),qt(void 0));return}let xt=new Set(_e.map(Je=>Je.orderId)),Yt=new Set(_e.flatMap(Je=>(Je.deposits??[]).map(Cr=>km(Je.orderId,Cr.txHash,Cr.blockNumber)))),Lt=ft.current;if(!Lt||Lt.key!==F){ft.current={key:F,orderIds:xt,depositKeys:Yt,statuses:new Map(_e.map(Je=>[Je.orderId,Je.status]))},je(void 0),qt(void 0);return}let zr,Jt=0n,ar=!1;for(let Je of _e)for(let Cr of Je.deposits??[]){let Kr=km(Je.orderId,Cr.txHash,Cr.blockNumber);if(!Lt.depositKeys.has(Kr)){zr??(zr=Je);try{Jt+=BigInt(Cr.amount),ar=!0}catch{}}}zr??(zr=_e.find(Je=>!Lt.orderIds.has(Je.orderId))),zr??(zr=_e.find(Je=>Lt.statuses.get(Je.orderId)!==Je.status));for(let Je of xt)Lt.orderIds.add(Je);for(let Je of Yt)Lt.depositKeys.add(Je);for(let Je of _e)Lt.statuses.set(Je.orderId,Je.status);zr&&(je(zr.orderId),ar&&qt(Jt))},[F,_e,Ze,Ie,C,Mt,Ve]),Le.useEffect(()=>{let _=p?.targets??[];if(!ye||!we||_.length===0){Be({}),Ue(!1);return}let xt=!1;return Ue(!0),Promise.all(_.map(Yt=>De.getRecovery({user:C,target:Yt.symbol}).catch(()=>{}))).then(Yt=>{if(xt)return;let Lt={};_.forEach((zr,Jt)=>{let ar=Yt[Jt];ar&&(Lt[zr.symbol]=ar)}),Be(Lt),Ue(!1)}),()=>{xt=!0}},[De,ye,we,C,p,Ut,st]);let Xe=Le.useMemo(()=>(p?.targets??[]).map(_=>({symbol:_.symbol,isDefault:_.isDefault,info:ut[_.symbol]})).filter(_=>_.info!==void 0),[p,ut]),B=Le.useMemo(()=>rs(Ao(Xe)),[Xe]),[se,ve]=Le.useState(void 0),[Te,ot]=Le.useState(),or=!!p&&(p?.targets.length??0)>0&&!d;Le.useEffect(()=>{if(!we||!v||!A||or){ve(void 0),ot(void 0);return}let _=!1,xt=!1,Yt=A.forwarder.toLowerCase();ve(void 0),ot(void 0);async function Lt(){if(!(_||xt)){xt=!0;try{let Jt=await De.getRecovery({user:C,target:d||void 0});if(_)return;if(Jt?.forwarder&&Jt.forwarder.toLowerCase()!==Yt){ve(void 0),ot(void 0);return}if(ot(Jt),!Jt||Jt.suggestedAction!=="sweep"){ve(void 0);return}let ar;try{ar=BigInt(Jt.balance)}catch{ve(void 0);return}let Je=Number(Jt.decimals);if(ar<=0n||!Number.isInteger(Je)||Je<0){ve(void 0);return}let Cr=Jt.tokens?.find(Kr=>Kr.address?.toLowerCase()===Jt.token?.toLowerCase()&&Kr.symbol)?.symbol;ve({balance:ar,decimals:Je,symbol:Cr})}catch{}finally{xt=!1}}}Lt();let zr=setInterval(()=>{Lt()},vm);return()=>{_=!0,clearInterval(zr)}},[De,we,C,d,or,v,A,Ut]);let ur=Le.useCallback(()=>{!v||!M||E(Zt(M.value,v.token.decimals))},[v,M,E]),Or=Le.useRef(!1),dn=!!H;Le.useEffect(()=>{!dn||Or.current||(Or.current=!0,Ye("relay","deposit_address_shown"))},[dn]);let Rr=U.txHash;Le.useEffect(()=>{Rr&&Ye("relay","deposit_submitted")},[Rr]);let cn=(()=>{let _=Number(x?.min);return Number.isFinite(_)&&_>=0?String(x?.min):"6"})(),Br=(()=>{let _=Number(x?.max);return Number.isFinite(_)&&_>0?String(x?.max):void 0})(),ie=(()=>{if(!v)return 0n;let _=ls(cn,v.token.decimals),xt=BigInt(v.minAmount);return _>xt?_:xt})(),Se=v?Zt(ie,v.token.decimals):cn,G=(()=>{if(!v||!se||ie<=0n)return;let _=v.token.decimals,xt=se.decimals,Yt=_>=xt?se.balance*10n**BigInt(_-xt):se.balance/10n**BigInt(xt-_);if(Yt>=ie)return;let Lt=ie-Yt;return{pending:Zt(se.balance,xt),pendingSymbol:se.symbol,remaining:Zt(Lt,_)}})(),Pe=p?.origins.find(_=>_.chainId===56&&!!(Te?.token&&_.token.address.toLowerCase()===Te.token.toLowerCase()))??p?.origins.find(_=>_.chainId===56&&_.token.symbol.toUpperCase()==="USDT"),q=Number.isInteger(Te?.decimals)&&(Te?.decimals??-1)>=0?Te.decimals:Pe?.token.decimals,He=Te?.tokens?.find(_=>_.address?.toLowerCase()===Te.token?.toLowerCase()&&_.symbol)?.symbol??Pe?.token.symbol,Yr=nt!==void 0&&q!==void 0?Zt(nt,q):void 0,zn=(()=>{if(!v||q===void 0)return;let _=v.token.decimals;if(q>=_)return ie*10n**BigInt(q-_);let xt=10n**BigInt(_-q);return(ie+xt-1n)/xt})(),Sr=At?_e.find(_=>_.orderId===At):void 0,Nt=Sr??_e.find(_=>_.status==="BSC_FUNDED"||_.status==="BRIDGE_INITIATED"||_.status==="BRIDGE_PENDING"),Ts=(()=>{if(!Nt||zn===void 0)return!1;try{return BigInt(Nt.amountIn)>=zn}catch{return!1}})(),Fo=(()=>{if(!Te||zn===void 0)return!1;try{return BigInt(Te.balance)>0n&&BigInt(Te.balance)>=zn}catch{return!1}})(),uo=(()=>{let _={amount:Yr,symbol:He,backendStatus:Nt?.status};return!A||!Ie||!Ve?{phase:"connecting",..._}:Ze?.toLowerCase()!==C.toLowerCase()||Mt?{phase:"unavailable",..._}:Sr?.status==="COMPLETED"?{phase:"completed",..._,backendStatus:Sr.status}:Sr&&ky(Sr.status)?{phase:"failed",..._,backendStatus:Sr.status}:Nt?.status==="BRIDGE_INITIATED"||Nt?.status==="BRIDGE_PENDING"?{phase:"processing",..._}:Nt?.status==="BSC_FUNDED"&&Ts||Fo?{phase:"funded",..._}:Sr?{phase:"detected",..._,backendStatus:Sr.status}:{phase:"waiting",..._}})(),Fn=v&&Br?ls(Br,v.token.decimals):void 0,fo=v&&S.trim()?ls(S,v.token.decimals):0n,Is=!!(v&&fo>0n&&fo<ie),Es=!!(v&&Fn!==void 0&&fo>0n&&fo>Fn),mo=(()=>{if(v){if(Is)return`Amount is below the ${Se} ${v.token.symbol} minimum.`;if(Es)return`Amount is above the ${Br} ${v.token.symbol} maximum.`}})(),Pa=t.showOneClickDeposit??!1,Ms=v&&S.trim()?ls(S,v.token.decimals).toString():void 0,As={activeView:a,setActiveView:i,recoveryOpen:s,setRecoveryOpen:l,resolvedApiBaseUrl:b,wallet:f,catalog:p,catalogLoading:y,catalogError:h,origin:v,setOrigin:R,amount:S,setAmount:E,recipient:C,setRecipient:N,recipientValid:I,balance:M,balanceLoading:W,insufficientBalance:L,depositAddress:H,depositAddressLoading:O,depositAddressError:ce,arrivalStatus:uo,quote:X,quoteLoading:P,quoteError:xe,canDeposit:ne,deposit:K,depositState:U,targetOptions:te,selectedTarget:Z,setSelectedTarget:be,showAmountInput:Ne,minNotice:v?{min:Se,symbol:v.token.symbol,...G}:void 0,showRecipientInput:re,showTargetSelector:r,showOneClick:Pa,showConnectPrompt:Ae,showRecipientHint:pt,canRecover:ye,recoverableCount:B,recoveryTargetsLoading:Ge,recoveryTargets:Xe,recoveryOrders:nr,historyOrdersLoading:tt,historyOrdersError:Mt,refreshRecovery:Rt,trustedFactories:w,amountHint:mo,amountSmallestUnits:Ms,onMax:Ne&&M&&M.value>0n?ur:void 0};return Le.useLayoutEffect(()=>{e.publish(As)}),Le.useLayoutEffect(()=>()=>e.publish(null),[e]),null}var cs=require("react/jsx-runtime");function Sy(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:c}=e,[b,f]=ps.useState(!1),g=l!==void 0,x=g?l:b,w=ps.useCallback(m=>{g||f(m),d?.(m)},[g,d]);return(0,cs.jsx)(Al.Provider,{value:e,children:(0,cs.jsx)(Rm,{open:x,children:(0,cs.jsx)(vn,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:x,onOpenChange:w,children:c})})})}var Do=Object.assign(Sy,{Trigger:fm,Content:um});var us=require("react"),Wl=(0,us.createContext)(null);function Gl(){let e=(0,us.useContext)(Wl);if(!e)throw new Error("RelayHistory compound components must be used within <RelayHistory>");return e}var xr=V(require("react"),1);var Bn=require("react/jsx-runtime");function Sm({className:e}){let t=Gl(),{open:r}=Hr();return xr.useEffect(()=>{r&&Ye("relay","history_opened")},[r]),(0,Bn.jsx)(Ce,{feature:"relay",children:(0,Bn.jsx)(kn,{ariaTitle:"Transfer history",className:e??t.className,children:(0,Bn.jsx)(Cy,{})})})}function Cy(){let e=Gl(),{theme:t}=Hr(),r=xr.useMemo(()=>{if(e.client)return e.client;let m=On({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return Vt({baseUrl:m})},[e.client,e.apiBaseUrl,e.environment]),n=e.recipient??e.walletAddress,o=!!(n&&ht(n)),[a,i]=xr.useState(),[s,l]=xr.useState(!1),[d,c]=xr.useState(),b=xr.useRef(e.onError);b.current=e.onError,xr.useEffect(()=>{if(!o){i(void 0),l(!1),c(void 0);return}let m=!1;return i(void 0),l(!0),c(void 0),r.getConfig().then(p=>{m||i(p)}).catch(p=>{if(m)return;let y=p instanceof Error?p:new Error(String(p));c(y),b.current?.(y)}).finally(()=>{m||l(!1)}),()=>{m=!0}},[r,o]);let{orders:f,ordersLoading:g,ordersError:x}=Rn({client:r,recipient:o?n:void 0,enabled:!!a,onError:e.onError}),w=xr.useCallback(m=>{if(!e.onOutlink)return;let y=m.target.closest?.('a[target="_blank"]');y?.href&&e.onOutlink(y.href)},[e.onOutlink]);return(0,Bn.jsx)("div",{className:"rd-root rd-wizard","data-theme":t,children:o?(0,Bn.jsx)("div",{onClick:w,children:(0,Bn.jsx)($i,{orders:f,isLoading:s||g,error:d??x,catalog:a,showTitle:!1})}):(0,Bn.jsx)(wa,{requiresIdentity:!0})})}var fs=require("react/jsx-runtime");function Cm({asChild:e,children:t}){return(0,fs.jsx)(Ce,{feature:"relay",children:(0,fs.jsx)(Lo,{asChild:e??t!=null,children:t??(0,fs.jsx)("button",{type:"button","data-track":"open",children:"History"})})})}var _l=require("react/jsx-runtime");function Ny(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o="min(640px, calc(100vw - 32px))",drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:c}=e;return(0,_l.jsx)(Wl.Provider,{value:e,children:(0,_l.jsx)(vn,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:c})})}var Hl=Object.assign(Ny,{Trigger:Cm,Content:Sm});var Dr=V(require("react"),1);var vr=V(require("react"),1);var ms=[],Ty=3e4;function Nm({client:e,recipient:t}){let[r,n]=vr.useState({targets:ms}),[o,a]=vr.useState(0),i=vr.useRef(void 0),s=vr.useRef(void 0),l=t&&ht(t)?t.toLowerCase():void 0;vr.useEffect(()=>{if(!l){n({targets:ms});return}let w=!1,m=i.current;if(!m||m.client!==e||m.recipientKey!==l||m.generation!==o){let p=(async()=>{let y,h=[];try{h=(await e.getConfig()).targets}catch(C){y=C instanceof Error?C:new Error(String(C))}let v=h.length===0?[()=>e.getRecovery({user:l})]:h.map(C=>()=>e.getRecovery({user:l,target:C.symbol})),R=await Promise.all(v.map(async C=>{try{return{info:await C()}}catch(N){return{error:N instanceof Error?N:new Error(String(N))}}})),S=h.length===0?R[0]?.info?[{symbol:"",isDefault:!0,info:R[0].info}]:[]:h.flatMap((C,N)=>R[N]?.info?[{symbol:C.symbol,isDefault:C.isDefault,info:R[N].info}]:[]),E=R.find(C=>C.error)?.error;return{targets:S,badgeFailed:!!(y||E&&S.length===0),error:y??E}})().catch(y=>({targets:ms,badgeFailed:!0,error:y instanceof Error?y:new Error(String(y))}));m={client:e,recipientKey:l,generation:o,promise:p},i.current=m,p.finally(()=>{s.current={client:e,recipientKey:l,at:Date.now()},i.current?.promise===p&&(i.current=void 0)})}return m.promise.then(p=>{w||n({recipientKey:l,targets:p.targets,badgeFailed:p.badgeFailed,error:p.error})}),()=>{w=!0}},[e,l,o]);let d=vr.useCallback(()=>a(w=>w+1),[]),c=vr.useCallback(()=>{if(!l)return;let w=i.current;if(w?.client===e&&w.recipientKey===l)return;let m=s.current;m?.client===e&&m.recipientKey===l&&Date.now()-m.at<Ty||a(p=>p+1)},[e,l]),b=l&&r.recipientKey===l?r.targets:ms,f=l&&r.recipientKey===l?r.error:void 0,g=!!(l&&r.recipientKey!==l),x=!!(l&&r.recipientKey===l&&r.badgeFailed);return vr.useMemo(()=>({count:x?0:rs(Ao(b)),targets:b,loading:g,error:f,refresh:d,refreshIfStale:c}),[b,g,x,f,d,c])}var gs=require("react"),Ql=(0,gs.createContext)(null);function Vl(){let e=(0,gs.useContext)(Ql);if(!e)throw new Error("RelayRecovery compound components must be used within <RelayRecovery>");return e}function ql(){return Vl().props}function Tm(){return Vl().recovery}function Im(){return Vl().recovery.count}var co=V(require("react"),1);var an=require("react/jsx-runtime");function Em({className:e}){let t=ql(),{open:r}=Hr();return co.useEffect(()=>{r&&Ye("relay","recovery_opened")},[r]),(0,an.jsx)(Ce,{feature:"relay",children:(0,an.jsx)(kn,{ariaTitle:"Recover stuck funds",className:e??t.className,children:(0,an.jsx)(Iy,{})})})}function Iy(){let e=ql(),{targets:t,loading:r,refresh:n}=Tm(),{theme:o}=Hr(),a=co.useMemo(()=>On({apiBaseUrl:e.apiBaseUrl,environment:e.environment}),[e.apiBaseUrl,e.environment]),i=co.useMemo(()=>e.client?e.client:Vt({baseUrl:a}),[e.client,a]),s=co.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&&ht(e.walletAddress)?e.walletAddress:void 0,d=!!(l&&(!e.recipient||ht(e.recipient)&&e.recipient.toLowerCase()===l.toLowerCase())),c=d?l:void 0,b=at(e.environment),f=sr("apps.json",b,y=>Fa(y,b)),g=co.useMemo(()=>e.trustedFactories??ts(f),[e.trustedFactories,f]),x=!!(e.writeContract&&e.readContract&&e.waitForReceipt),w=!!c&&x,m=c,{orders:p}=Rn({client:i,recipient:w?m:void 0,enabled:w,live:!1});return(0,an.jsxs)("div",{className:"rd-root rd-wizard","data-theme":o,children:[!l&&(0,an.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-connect-note",children:"Connect a wallet to check recoverable funds."}),l&&!d&&(0,an.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-recipient-note",children:"Recovery is only available for the connected wallet."}),d&&!x&&(0,an.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-unsupported-note",children:"This wallet can't sign recovery transactions."}),w&&(0,an.jsx)(os,{client:e.client,apiBaseUrl:a,recipient:c,wallet:s,trustedFactories:g,targets:t,targetsLoading:r,orders:p,onRecovered:n,onRecoverySuccess:e.onRecoverySuccess,showTitle:!1,onError:e.onError})]})}var hs=require("react/jsx-runtime");function Mm({asChild:e,children:t}){let r=Im();return(0,hs.jsx)(Ce,{feature:"relay",children:(0,hs.jsx)(Lo,{asChild:e??t!=null,dataAttributes:{"data-rd-recovery-count":r},children:t??(0,hs.jsx)("button",{type:"button","data-track":"open",children:"Recover"})})})}var Yl=require("react/jsx-runtime");function Ey(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:c}=e,[b,f]=Dr.useState(!1),g=l!==void 0,x=g?l:b,w=Dr.useCallback(S=>{g||f(S),d?.(S)},[g,d]),m=Dr.useMemo(()=>{if(e.client)return e.client;let S=On({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return Vt({baseUrl:S})},[e.client,e.apiBaseUrl,e.environment]),p=e.walletAddress&&ht(e.walletAddress)?e.walletAddress:void 0,y=p&&(!e.recipient||ht(e.recipient)&&e.recipient.toLowerCase()===p.toLowerCase())?p:void 0,h=Nm({client:m,recipient:y});Dr.useEffect(()=>{x&&h.refreshIfStale()},[x,h.refreshIfStale]);let v=Dr.useRef(void 0);Dr.useEffect(()=>{!x||!h.error||v.current===h.error||(v.current=h.error,e.onError?.(h.error))},[x,h.error,e.onError]);let R=Dr.useMemo(()=>({props:e,recovery:h}),[e,h]);return(0,Yl.jsx)(Ql.Provider,{value:R,children:(0,Yl.jsx)(vn,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:x,onOpenChange:w,children:c})})}var Kl=Object.assign(Ey,{Trigger:Mm,Content:Em});var kr=require("react");function Zl(e={}){let t=(0,kr.useRef)(e);t.current=e;let r=(0,kr.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayConfig: either `client` or `apiBaseUrl` must be provided");return Vt({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.enabled??!0,o=e.refetchInterval,[a,i]=(0,kr.useState)(),[s,l]=(0,kr.useState)(!1),[d,c]=(0,kr.useState)(),[b,f]=(0,kr.useState)(0);(0,kr.useEffect)(()=>{if(!n){i(void 0),l(!1),c(void 0);return}let x=!1,w=!1;i(void 0),l(!0),c(void 0);async function m(){if(!(x||w)){w=!0;try{let y=await r.getConfig();if(x)return;i(y),c(void 0)}catch(y){if(x)return;let h=y instanceof Error?y:new Error(String(y));c(h),t.current.onError?.(h)}finally{w=!1,x||l(!1)}}}m();let p=typeof o=="number"&&Number.isFinite(o)&&o>0?setInterval(()=>{m()},o):void 0;return()=>{x=!0,p&&clearInterval(p)}},[r,n,b,o]);let g=(0,kr.useCallback)(()=>f(x=>x+1),[]);return{config:a,loading:s,error:d,refresh:g}}var Lm=require("@tanstack/react-query"),Pr=require("react");var My=1,Am=new WeakMap;function Ay(e){let t=Am.get(e);if(t!==void 0)return t;let r=My++;return Am.set(e,r),r}function Xl(e={}){let t=(0,Pr.useRef)(e);t.current=e;let r=(0,Pr.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayRecovery: either `client` or `apiBaseUrl` must be provided");return Vt({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.recipient,o=n&&ht(n)?n:void 0,a=e.target,i=e.query,s=(0,Pr.useMemo)(()=>Ay(r),[r]),l=(0,Pr.useMemo)(()=>["relay","recovery",s,o??null,a??null],[s,o,a]),d=(0,Lm.useQuery)({retry:!1,...i,queryKey:l,queryFn:async()=>{if(!o)throw new Error("useRelayRecovery: a valid EVM recipient is required");return r.getRecovery({user:o,target:a})},enabled:o?i?.enabled:!1}),c=(0,Pr.useRef)(0);(0,Pr.useEffect)(()=>{let w=d.error,m=d.errorUpdatedAt;!w||m===c.current||(c.current=m,t.current.onError?.(w),w instanceof Lr&&w.status===401&&t.current.onUnauthorized?.())},[d.error,d.errorUpdatedAt]);let b=(0,Pr.useCallback)(()=>{d.refetch()},[d.refetch]),f=ya({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:b}),g=d.data,x=(0,Pr.useCallback)(async(w,m)=>{g&&await f.recover(g,w,m)},[f,g]);return{info:g,loading:d.isLoading,error:d.error??void 0,isFetching:d.isFetching,refresh:b,recover:x,recoveryState:f.stateFor(g?.forwarder)}}var it=require("react/jsx-runtime"),Ly={bscBridge:"https://bscscan.com/tx/",crossFinalize:"https://scan.crosstoken.io/tx/",crossExecute:"https://scan.crosstoken.io/tx/"},Dy={bscBridge:"Bridge tx (BSC)",crossFinalize:"Finalize tx (CROSS)",crossExecute:"Execute tx (CROSS)"};function Py(e){return e==="done"?"\u2713":e==="active"?"\u25CF":""}function Dm(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Oy(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 $l({orderId:e,order:t,error:r}){let n=!t&&!r;return(0,it.jsxs)("section",{className:"rd-card",children:[(0,it.jsxs)("div",{className:"rd-card-header",children:[(0,it.jsx)("h2",{className:"rd-card-title",children:"4. Status"}),t&&(0,it.jsx)("span",{className:`rd-status-pill${t.status==="COMPLETED"?" rd-status-pill-success":Dm(t.status)?" rd-status-pill-failure":""}`,children:t.status})]}),(0,it.jsxs)("p",{className:"rd-card-hint",children:["Order ",e]}),n&&(0,it.jsxs)("p",{className:"rd-muted",children:[(0,it.jsx)("span",{className:"rd-spinner"})," Loading status..."]}),r&&(0,it.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load order status: ",r.message]}),t&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("ol",{className:"rd-stepper",children:t.steps.map((o,a)=>(0,it.jsxs)("li",{className:Oy(o.status),children:[(0,it.jsxs)("div",{className:"rd-stepper-rail",children:[(0,it.jsx)("span",{className:"rd-stepper-dot",children:Py(o.status)}),a<t.steps.length-1&&(0,it.jsx)("span",{className:"rd-stepper-line"})]}),(0,it.jsxs)("div",{className:"rd-stepper-body",children:[(0,it.jsx)("div",{className:"rd-stepper-label",children:o.label}),o.key==="bridge"&&t.txs.bscBridge&&(0,it.jsx)("div",{className:"rd-stepper-meta",children:(0,it.jsx)(Jl,{orderTxs:t.txs,txKey:"bscBridge"})}),o.key==="deliver"&&(t.txs.crossFinalize||t.txs.crossExecute)&&(0,it.jsxs)("div",{className:"rd-stepper-meta",children:[t.txs.crossFinalize&&(0,it.jsx)(Jl,{orderTxs:t.txs,txKey:"crossFinalize"}),t.txs.crossExecute&&(0,it.jsx)(Jl,{orderTxs:t.txs,txKey:"crossExecute"})]})]})]},o.key))}),Dm(t.status)&&(0,it.jsxs)("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"&&(0,it.jsx)("div",{className:"rd-callout rd-callout-success",children:"crossd delivered. This order is complete."})]})]})}function Jl({orderTxs:e,txKey:t}){let r=e[t];return r?(0,it.jsxs)("a",{href:`${Ly[t]}${r}`,target:"_blank",rel:"noreferrer",children:[Dy[t],": ",r.slice(0,10),"..."]}):null}function va(e){return`${e.chainId}:${e.address.toLowerCase()}`}function bs(e,t){return va(e)===va(t)}function ka(e,t){if(t)return e.find(r=>bs(r,t))}function Po(e,t,r){return t?{fromTokens:(r==="swap"?[t.swap.from]:t.bridge.from).map(o=>ka(e,o)).filter(o=>!!o),targetToken:ka(e,t.target)}:{fromTokens:[],targetToken:void 0}}function Ra(e,t){return e.some(r=>r.chainId===t.chainId&&r.address.toLowerCase()===t.address.toLowerCase())}function Pm(e){let t=/^v?(\d+(?:\.\d+)*)(?:-([0-9A-Za-z.-]+))?$/.exec(e.trim());return t?{parts:t[1].split(".").map(r=>Number(r)),prerelease:t[2]??null}:null}function By(e,t){let r=Pm(e),n=Pm(t);if(!r||!n)return null;let o=Math.max(r.parts.length,n.parts.length);for(let a=0;a<o;a+=1){let i=(r.parts[a]??0)-(n.parts[a]??0);if(i!==0)return i<0?-1:1}return r.prerelease===n.prerelease?0:r.prerelease===null?1:n.prerelease===null||r.prerelease<n.prerelease?-1:1}function Om(e,t=Wn){if(!e)return!0;let r=By(t,e);return r===null?!0:r>=0}var Bm={swap:"swap",bridge:"bridge",transfer:"transferCrypto"};function Oo(e,t){return t?.[Bm[e]]??e!=="transfer"}function Bo(e,t){return Om(t?.[Bm[e]])}function Sa(e,t,r){return Oo(e,t)&&Bo(e,r)}var zm={dev:"https://stg.oneusd.money/",stage:"https://stg.oneusd.money/",production:"https://www.oneusd.money/"};function Fm(e){let t=e.trim().toLowerCase().replace(/\.$/,"");return t==="oneusd.money"||t.endsWith(".oneusd.money")}function Um(e,t){return e?.items?.find(({id:n,type:o})=>n.toLowerCase()==="oneusd"||o.toLowerCase()==="oneusd")?.url[t]}var ws=V(require("react"),1);function jm(e){let[t,r]=ws.useState(null);return ws.useEffect(()=>{if(!e)return;let n=!0;return ol().then(o=>{n&&r(o)}).catch(()=>{}),()=>{n=!1}},[e]),t}function Wm(e,t){return t==="bridge"?!0:e==="bridge"||e==="bridge-swap"||e==="swap-bridge"}function zy(e){if(!e)return"";let[t="0",r=""]=e.replace(/,/g,"").split("."),o=(t.replace(/^0+(?=\d)/,"")||"0").replace(/\B(?=(\d{3})+(?!\d))/g,","),a=r.slice(0,6).replace(/0+$/,"");return a?`${o}.${a}`:o}function Fy(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function Gm(e,t){return Wm(e.pathType,t)?"Bridging":"Swapping"}function _m(e,t){let r=zy(e.toAmount);if(Wm(e.pathType,t)){let n=`arriving on ${Fy(e.toToken.chainId)}`;return r?`${r} ${n}`:n}return r?`${r} Swapped`:"Transaction completed"}var pr=require("react/jsx-runtime");function Hm(e){return(0,pr.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,pr.jsx)("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 Qm(e){return(0,pr.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[(0,pr.jsx)("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"}),(0,pr.jsx)("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 Vm(e){return(0,pr.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[(0,pr.jsx)("rect",{x:"4",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,pr.jsx)("rect",{x:"14",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,pr.jsx)("rect",{x:"4",y:"14",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,pr.jsx)("path",{d:"M14 14h2v2h-2zM18 18h2v2h-2z",fill:"currentColor"})]})}function qm(e){return(0,pr.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,pr.jsx)("path",{d:"m9 6 6 6-6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ym(e){return(0,pr.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,pr.jsx)("path",{d:"m6 6 12 12M18 6 6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}he(`.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:24px;padding:24px}.gou-close{position:absolute;top:16px;right:16px;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-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-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}}
20
+ `);var ae=require("react/jsx-runtime"),Uy=[{id:"swap",label:"Swap",eta:"Instant",Icon:Hm},{id:"bridge",label:"Bridge",Icon:Qm},{id:"transfer",label:"Transfer Crypto",eta:"QR deposit",Icon:Vm}],jy=4e3;function Km(e){return e instanceof Error?e.message:typeof e=="string"?e:"Unknown error"}function ys(e,t){try{e?.(t)}catch{}}function Wy({compactTrigger:e,collapseOnScroll:t,scrollThreshold:r}){let[n,o]=$e.useState(!1);return $e.useEffect(()=>{if(t===!1){o(!1);return}let a=r??200,i=a+24,s=Math.max(0,a-24),l=0,d=window.scrollY>a;o(d);let c=()=>{l=0;let f=d?window.scrollY>s:window.scrollY>i;f!==d&&(d=f,o(f))},b=()=>{l||(l=requestAnimationFrame(c))};return window.addEventListener("scroll",b,{passive:!0}),()=>{l&&cancelAnimationFrame(l),window.removeEventListener("scroll",b)}},[t,r]),!!(e||n)}function Gy({loading:e}){return(0,ae.jsxs)("div",{className:"gou-route-state",role:"status",children:[e&&(0,ae.jsx)("span",{className:"gou-spinner","aria-hidden":"true"}),(0,ae.jsx)("h3",{children:e?"Preparing route":"Route unavailable"}),(0,ae.jsx)("p",{children:e?"Loading token and contract configuration.":"The configured ONEUSD route is not available in this environment."})]})}function ed({walletAddress:e,tokens:t,pairs:r,loading:n=!1,bridge:o,relay:a,env:i,targetSymbol:s,relayTargetSymbol:l="ONEUSD",targetIconUrl:d,mode:c="floating",buttonComponent:b,theme:f="dark",mobileBreakpoint:g=768,drawerDirection:x="bottom",dialogWidth:w="480px",drawerMaxWidth:m,drawerMinWidth:p,style:y,className:h,contentClassName:v,hidden:R=!1,compactTrigger:S,collapseOnScroll:E=!0,scrollThreshold:C=200,waitForTransaction:N,transactionResultDurationMs:I=jy,onRequestConnect:M,onEvent:W}){let[L,H]=$e.useState(!1),[A,O]=$e.useState(null),[ce,X]=$e.useState(!1),[P,xe]=$e.useState(null),[ne,K]=$e.useState(!1),U=$e.useRef(0),te=$e.useRef(!1),Z=$e.useRef(null),be=$e.useRef(!0),Ne=Wy({compactTrigger:S,collapseOnScroll:E,scrollThreshold:C}),re=$e.useMemo(()=>at(i),[i]),we=sr("apps.json",re,F=>F?.getOneUsd?.modes),Fe=sr("apps.json",re,F=>F?.getOneUsd?.minVersions),pt=sr("app-launcher-v2.json",re,F=>Um(F,re))??zm[re],ye=$e.useMemo(()=>Uy.filter(({id:F})=>Oo(F,we)),[we]),De=ye.length>0,ut=jm(!R&&De),Be=$e.useMemo(()=>Po(t,r,"swap"),[r,t]),Ge=$e.useMemo(()=>Po(t,r,"bridge"),[r,t]),Ue=Be.targetToken??Ge.targetToken,st=s??Ue?.symbol??"ONEUSD",Ht=d??Ue?.iconUrl??Dl,Rt=c==="floating"&&Ne,Ut=c==="button"&&b?b:"button";$e.useEffect(()=>(be.current=!0,()=>{be.current=!1,Z.current&&clearTimeout(Z.current)}),[]),$e.useEffect(()=>{K(!Fm(window.location.hostname))},[]),$e.useEffect(()=>{De||H(!1)},[De]);let Ie=$e.useCallback(F=>W?.(F),[W]),jt=$e.useCallback(()=>{P||!De||(Ie({name:"fab_click",state:Rt?"icon_only":"expanded"}),H(!0))},[Ie,De,P,Rt]),tt=$e.useCallback(F=>{P||!Sa(F,we,Fe)||(Ie({name:"action_select",action:F}),H(!1),F==="transfer"&&X(!0),O(F))},[Ie,we,Fe,P]),Mt=$e.useCallback(F=>{Ie({name:"connect_click",action:F}),Promise.resolve(M?.()).catch(Xe=>{Ie({name:"failure",action:F,message:Km(Xe)})})},[Ie,M]),Ve=A==="swap"||A==="bridge"?A:null,Ze=Ve==="swap"?Be:Ge,nr=!!(r&&Ze.targetToken&&Ze.fromTokens.length>0),Wt=$e.useMemo(()=>{if(!Ze.targetToken)return;let F=Ze.targetToken;return Xe=>{let B=o.getToTokens?.(Xe,t);return B&&!Ra(B,F)?[]:[F]}},[o.getToTokens,Ze.targetToken,t]),{onSubmitted:qe,onSuccess:wt,onFailed:rt,..._e}=o,{onDeposited:ft,onError:At,...je}=a??{},nt=$e.useCallback((F,Xe,B,se,ve)=>{!be.current||U.current!==F||(xe({id:F,phase:Xe,action:B,label:se,txHash:ve}),Z.current&&clearTimeout(Z.current),Z.current=setTimeout(()=>{!be.current||U.current!==F||(te.current=!1,xe(null),Z.current=null)},Math.max(0,I)))},[I]),qt=$e.useCallback((F,Xe)=>{if(te.current)return;te.current=!0;let B=++U.current,se=Gm(F,Xe);xe({id:B,phase:"pending",action:Xe,label:se,txHash:F.txHash}),H(!1),O(null),ys(qe,F),Promise.resolve().then(()=>N?.(F)).then(()=>{!be.current||U.current!==B||(nt(B,"success",Xe,_m(F,Xe),F.txHash),Ie({name:"success",action:Xe,txHash:F.txHash}))}).catch(ve=>{if(!be.current||U.current!==B)return;let Te=Km(ve);nt(B,"failure",Xe,"Transaction failed",F.txHash),ys(rt,{message:Te,txHash:F.txHash}),Ie({name:"failure",action:Xe,message:Te})})},[Ie,rt,qe,nt,N]);return(0,ae.jsx)(Ce,{feature:"get_one_usd",children:(0,ae.jsxs)("div",{className:h,"data-theme":f,"data-gou-mode":c,children:[(0,ae.jsxs)(vn,{theme:f,mobileBreakpoint:g,drawerDirection:x,dialogWidth:w,drawerMaxWidth:m,drawerMinWidth:p,open:L,onOpenChange:H,children:[!R&&De&&(c==="button"||!P)&&(0,ae.jsxs)(Ut,{type:"button",className:"gou-fab",style:y,"data-trigger-mode":c,"data-icon-only":Rt?"true":"false",onClick:jt,disabled:!!P,"aria-label":`Get ${st}`,"data-track":"fab_click",children:[c==="floating"&&(0,ae.jsxs)("span",{className:"gou-tooltip",children:["Choose how to get ",st]}),(0,ae.jsx)("span",{className:"gou-fab-icon-frame",children:(0,ae.jsx)("img",{className:"gou-fab-icon",src:Ht,alt:""})}),(0,ae.jsxs)("span",{className:"gou-fab-label gou-fab-trigger-copy",children:[(0,ae.jsxs)("span",{children:["Get ",st]}),ut!==null&&(0,ae.jsx)("span",{className:"gou-fab-apr",children:gi(ut)})]})]}),P&&(0,ae.jsxs)("div",{className:"gou-fab gou-fab-status",style:c==="floating"?y:void 0,"data-floating-status":"true","data-icon-only":"false","data-tx-phase":P.phase,role:"status","aria-live":"polite","aria-label":P.phase==="pending"?`${P.label} transaction in progress`:P.label,children:[(0,ae.jsxs)("span",{className:"gou-fab-icon-frame",children:[(0,ae.jsx)("img",{className:"gou-fab-icon",src:Ht,alt:""}),P.phase==="pending"&&(0,ae.jsx)("span",{className:"gou-fab-progress-ring","aria-hidden":"true"})]}),(0,ae.jsx)("span",{className:"gou-fab-label",children:P.phase==="pending"?(0,ae.jsxs)(ae.Fragment,{children:[P.label,(0,ae.jsxs)("span",{className:"gou-fab-dots","aria-hidden":"true",children:[(0,ae.jsx)("span",{children:"."}),(0,ae.jsx)("span",{children:"."}),(0,ae.jsx)("span",{children:"."})]})]}):P.label})]}),(0,ae.jsx)(kn,{ariaTitle:`Get ${st}`,className:`gou-shell gou-chooser ${v??""}`,children:(0,ae.jsxs)("div",{className:"gou-chooser-body",children:[(0,ae.jsx)("button",{type:"button",className:"gou-close",onClick:()=>H(!1),"aria-label":"Close",children:(0,ae.jsx)(Ym,{})}),(0,ae.jsxs)("header",{className:"gou-intro",children:[(0,ae.jsxs)("h2",{children:["Get ",st]}),ne&&(0,ae.jsxs)("a",{className:"gou-intro-link",href:pt,target:"_blank",rel:"noopener noreferrer","aria-label":"What is ONEUSD? Opens in a new tab","data-track":"oneusd_learn_more",children:[(0,ae.jsx)(fp,{size:16,className:"gou-intro-link-icon"}),(0,ae.jsx)("span",{children:"What is ONEUSD?"})]})]}),(0,ae.jsx)("ul",{className:"gou-actions",children:ye.map(({id:F,label:Xe,eta:B,Icon:se})=>{let ve=F==="swap"?`Swap the ${Be.fromTokens[0]?.symbol??"ONE"} you already hold`:F==="bridge"?`Bridge USDT to ${st}`:"Deposit from any chain or exchange",Te=F==="swap"?r?.swap.feeDelegated:F==="bridge"?r?.bridge.feeDelegated:!1,ot=Bo(F,Fe);return(0,ae.jsx)("li",{children:(0,ae.jsxs)("button",{type:"button",className:"gou-action",onClick:()=>tt(F),disabled:!ot,"data-supported":ot?"true":"false","data-track":"action_select","data-track-id":F,children:[(0,ae.jsx)("span",{className:"gou-action-icon",children:(0,ae.jsx)(se,{})}),(0,ae.jsxs)("span",{className:"gou-action-copy",children:[(0,ae.jsxs)("span",{className:"gou-action-title",children:[(0,ae.jsx)("span",{children:Xe}),Te&&ot&&(0,ae.jsx)("span",{className:"gou-badge",children:"Fee Delegated"}),!ot&&(0,ae.jsx)("span",{className:"gou-badge","data-tone":"muted",children:"Update required"})]}),(0,ae.jsx)("span",{className:"gou-action-description",children:ot?B?`${ve} \xB7 ${B}`:ve:"Update the app to use this option"})]}),(0,ae.jsx)(qm,{className:"gou-action-chevron"})]})},F)})})]})})]}),(0,ae.jsx)(vn,{theme:f,mobileBreakpoint:g,drawerDirection:x,dialogWidth:w,drawerMaxWidth:m,drawerMinWidth:p,open:!!Ve,onOpenChange:F=>{F||O(null)},children:(0,ae.jsx)(kn,{ariaTitle:`${Ve==="bridge"?"Bridge":"Swap"} to ${st}`,className:`gou-shell gou-execution ${v??""}`,children:nr?(0,ae.jsx)(to,{..._e,env:i,variant:"embedded",title:Ve==="bridge"?"Bridge":"Swap",feeDelegated:r?.swap.feeDelegated,walletAddress:e??"",isConnected:!!e,onRequestConnect:()=>Mt(Ve??"swap"),tokens:Ze.fromTokens,initialFromToken:Ze.fromTokens[0],initialToToken:Ze.targetToken,getToTokens:Wt,onClose:()=>O(null),onBackToWallet:()=>{O(null),H(!0)},onSubmitted:F=>{qt(F,Ve??"swap")},onSuccess:F=>{ys(wt,F)},onFailed:F=>{ys(rt,F),Ie({name:"failure",action:Ve??"swap",message:F.message})}},`${Ve}:${Ze.fromTokens.map(F=>`${F.chainId}:${F.address}`).join(",")}`):(0,ae.jsx)(Gy,{loading:n||!r})})}),ce&&(0,ae.jsx)(Do,{...je,environment:je.environment??i,theme:je.theme??f,mobileBreakpoint:je.mobileBreakpoint??g,drawerDirection:je.drawerDirection??x,dialogWidth:je.dialogWidth??w,drawerMaxWidth:je.drawerMaxWidth??m,drawerMinWidth:je.drawerMinWidth??p,walletAddress:e,open:A==="transfer",onOpenChange:F=>{F||O(null)},requireWalletConnection:!0,showRecovery:je.showRecovery??!0,showRecipientInput:!1,hideAmount:!0,targetTokens:[l],defaultTarget:l,onRequestConnect:()=>Mt("transfer"),onDeposited:F=>{ft?.(F),Ie({name:"success",action:"transfer",txHash:F})},onError:F=>{At?.(F),Ie({name:"failure",action:"transfer",message:F.message})},children:(0,ae.jsx)(Do.Content,{})})]})})}var ln=V(require("react"),1),fg=V(require("@radix-ui/react-dialog"),1),mg=require("vaul");var xs=require("react"),vs=(0,xs.createContext)(null);function Ca(){let e=(0,xs.useContext)(vs);if(!e)throw new Error("WalletConnectModal compound components must be used within <WalletConnectModal>");return e}var po=require("react");function Na(){let[e,t]=(0,po.useState)([]),[r,n]=(0,po.useState)(!0);(0,po.useEffect)(()=>{if(typeof window>"u"){n(!1);return}let a=[],i=l=>{let{info:d}=l.detail;d?.rdns&&!a.some(c=>c.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(()=>n(!1),500);return()=>{window.removeEventListener("eip6963:announceProvider",i),window.removeEventListener("eip6963:crossAnnounceProvider",i),clearTimeout(s)}},[]);let o=(0,po.useCallback)(a=>e.some(i=>i.rdns===a),[e]);return{wallets:e,isDetected:o,isLoading:r}}var Zm=V(require("@radix-ui/react-dialog"),1),Xm=require("vaul");var ks=require("react/jsx-runtime");function Jm({asChild:e,children:t}){let{isMobile:r}=Ca(),n=r?Xm.Drawer.Trigger:Zm.Trigger;return(0,ks.jsx)(Ce,{feature:"wallet_connect",children:(0,ks.jsx)(n,{asChild:e??t!=null,children:t??(0,ks.jsx)("button",{type:"button","data-track":"open",children:"Connect Wallet"})})})}var cg=require("react"),pg=require("@nexus-cross/crossx-design-system"),sn=V(require("@radix-ui/react-dialog"),1),Ta=require("vaul");var Ss=require("@nexus-cross/crossx-design-system");var Re=require("react/jsx-runtime"),_y='<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>',Hy=`data:image/svg+xml,${encodeURIComponent(_y)}`;function Rs(){return(0,Re.jsx)("img",{src:Hy,width:40,height:40,alt:"",style:{display:"block"}})}function $m(){return(0,Re.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[(0,Re.jsxs)("g",{clipPath:"url(#clip0_1331_27065)",children:[(0,Re.jsx)("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"}),(0,Re.jsx)("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"}),(0,Re.jsx)("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"}),(0,Re.jsx)("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"}),(0,Re.jsx)("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"}),(0,Re.jsx)("path",{d:"M22.1857 36.1951V39.831H17.6699V36.1951H22.1857Z",fill:"#C0C4CD"}),(0,Re.jsx)("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"})]}),(0,Re.jsx)("defs",{children:(0,Re.jsx)("clipPath",{id:"clip0_1331_27065",children:(0,Re.jsx)("rect",{width:"40",height:"40",fill:"white"})})})]})}function eg(){return(0,Re.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Re.jsx)("path",{d:"M12.23 16.81L20 9.04L27.77 16.81L32.29 12.29L20 0L7.71 12.29L12.23 16.81Z",fill:"#F3BA2F"}),(0,Re.jsx)("path",{d:"M9.04 20L4.52 15.48L0 20L4.52 24.52L9.04 20Z",fill:"#F3BA2F"}),(0,Re.jsx)("path",{d:"M12.23 23.19L20 30.96L27.77 23.19L32.29 27.71L20 40L7.71 27.71L12.23 23.19Z",fill:"#F3BA2F"}),(0,Re.jsx)("path",{d:"M35.48 24.52L40 20L35.48 15.48L30.96 20L35.48 24.52Z",fill:"#F3BA2F"}),(0,Re.jsx)("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 tg(){return(0,Re.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"246",viewBox:"0 0 247 246",fill:"none",children:[(0,Re.jsx)("rect",{width:"247.005",height:"245.105",rx:"36",fill:"#121212"}),(0,Re.jsx)("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"}),(0,Re.jsx)("path",{d:"M59.8364 99.8915V59.7551H12.0414L30.4787 77.8377V99.8915H59.8364Z",fill:"#2FD7FF"}),(0,Re.jsx)("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 rg(){return(0,Re.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Re.jsxs)("g",{clipPath:"url(#clip0_1185_7785)",children:[(0,Re.jsx)("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"}),(0,Re.jsx)("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"})]}),(0,Re.jsx)("defs",{children:(0,Re.jsx)("clipPath",{id:"clip0_1185_7785",children:(0,Re.jsx)("rect",{width:"28",height:"28",fill:"white"})})})]})}function ng(){return(0,Re.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[(0,Re.jsx)("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"}),(0,Re.jsx)("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"}),(0,Re.jsx)("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"}),(0,Re.jsx)("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 og(){return(0,Re.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Re.jsx)("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 ag(){return(0,Re.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Re.jsx)("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var Cs={cross_embedded:{id:"cross_embedded",name:Ss.WALLET_LABELS.social,description:"Sign in with Google or Apple",icon:Rs},cross_wallet:{id:"cross_wallet",name:Ss.WALLET_LABELS.app,description:"App approval is required",icon:Rs,featured:!0},cross_extension:{id:"cross_extension",name:Ss.WALLET_LABELS.extension,description:"Browser extension approval is required",icon:Rs,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:$m,rdns:"io.metamask"},binance:{id:"binance",name:"Binance",description:"Mobile app only \u2014 Add CROSS network first",icon:eg},verse8:{id:"verse8",name:"Verse8 Wallet",description:"Optimized for Forge and Verse8 ecosystem",icon:tg,badge:"For Forge"},tron:{id:"tron",name:"Tron Wallet",description:"Dedicated for Tron-based transactions and assets",icon:rg,badge:"For SHOP"}};function td(e){return Cs[e]}var Ns={google:{id:"google",name:"Google",icon:ng},apple:{id:"apple",name:"Apple",icon:og}};function ig(e){return Ns[e]}var $=require("react/jsx-runtime");function sg(e,t){Ye("connect","wallet_selected",{tags:{item_id:e}});let r=t?.();r instanceof Promise&&r.then(()=>Ye("connect","connected"),n=>Ye("connect","connected",{status:"failure",reason:gr(n)}))}function Qy({wallet:e,detected:t,onConnect:r}){let n=()=>{if(e.installUrl&&!t){window.open(e.installUrl,"_blank","noopener,noreferrer");return}r()},o=e.icon,a=e.featured===!0;return(0,$.jsxs)("button",{type:"button",className:ze("wcm-wallet-item",a&&"wcm-wallet-item--featured"),"data-track":"wallet_item_click","data-track-id":e.id,onClick:n,children:[(0,$.jsxs)("div",{className:"wcm-wallet-item-left",children:[(0,$.jsx)("div",{className:"wcm-wallet-icon",children:(0,$.jsx)(o,{})}),(0,$.jsxs)("div",{className:"wcm-wallet-name-row",children:[(0,$.jsx)("span",{className:"wcm-wallet-name",children:e.name}),e.badge&&(0,$.jsx)("span",{className:"wcm-wallet-badge",children:e.badge})]})]}),e.installUrl&&(t?(0,$.jsx)("span",{className:"wcm-installed-label",children:"Installed"}):(0,$.jsx)("span",{className:"wcm-install-btn",children:"Install"}))]})}function Vy({social:e,onSignIn:t}){let r=e.icon,n=`Sign in with ${e.name}`;return(0,$.jsxs)("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":n,children:[(0,$.jsx)("span",{className:"wcm-social-icon",children:(0,$.jsx)(r,{})}),(0,$.jsx)("span",{className:"wcm-social-name",children:n})]})}function lg(){let{wallets:e,activeWalletIds:t,socialProviders:r,activeSocialIds:n,termsUrl:o,privacyUrl:a,isDetected:i,close:s,isMobile:l}=Ca(),d=t.filter(f=>{let g=td(f).visibility;return!g||g==="always"?!0:g==="desktop-only"?!l:g==="mobile-only"?l:!0}),c=n.length>0,b=d.length>0;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)("div",{className:"wcm-header",children:[(0,$.jsxs)("div",{className:"wcm-header-text",children:[(0,$.jsx)("h2",{className:"wcm-title",children:pg.WALLET_LABELS.default}),!l&&(0,$.jsx)("p",{className:"wcm-subtitle",children:"Sign in instantly with your social account"})]}),(0,$.jsx)("button",{type:"button",className:"wcm-close-btn","data-track":"close",onClick:s,"aria-label":"Close",children:(0,$.jsx)(ag,{})})]}),(0,$.jsxs)("div",{className:"wcm-body",children:[c&&(0,$.jsxs)($.Fragment,{children:[!l&&(0,$.jsxs)("div",{className:"wcm-section-header",children:[(0,$.jsx)("span",{className:"wcm-section-title",children:"Social Account Wallet Connect"}),(0,$.jsx)("span",{className:"wcm-recommended-badge",children:"Recommended"})]}),(0,$.jsx)("div",{className:"wcm-social-grid",children:n.map(f=>{let g=ig(f);return(0,$.jsx)(Vy,{social:g,onSignIn:()=>{sg(f,r[f]),s()}},f)})}),b&&(0,$.jsxs)("div",{className:"wcm-separator",children:[(0,$.jsx)("div",{className:"wcm-separator-line"}),(0,$.jsx)("span",{className:"wcm-separator-text",children:"Other Wallets"}),(0,$.jsx)("div",{className:"wcm-separator-line"})]})]}),b&&(0,$.jsx)("div",{className:"wcm-wallet-list",children:d.map(f=>{let g=td(f),x=g.rdns?i(g.rdns):!1;return(0,$.jsx)(Qy,{wallet:g,detected:x,onConnect:()=>{sg(f,e[f]),s()}},f)})}),(0,$.jsxs)("p",{className:"wcm-terms",children:["By continuing, you agree to NEXUS"," ",(0,$.jsx)(dg,{href:o,track:"terms_link",children:"Terms of Service"})," ","and consent to its"," ",(0,$.jsx)(dg,{href:a,track:"privacy_link",children:"Privacy Policy"}),"."]})]})]})}function dg({href:e,track:t,children:r}){return e?(0,$.jsx)("a",{className:"wcm-terms-link",href:e,target:"_blank",rel:"noopener noreferrer","data-track":t,children:r}):(0,$.jsx)("span",{className:"wcm-terms-link",children:r})}function ug({className:e}){let{isMobile:t,theme:r,portalStyle:n,open:o}=Ca();return(0,cg.useEffect)(()=>{o&&Ye("connect","opened")},[o]),t?(0,$.jsx)(Ce,{feature:"wallet_connect",children:(0,$.jsxs)(Ta.Drawer.Portal,{children:[(0,$.jsx)(Ta.Drawer.Overlay,{className:"wcm-overlay"}),(0,$.jsxs)(Ta.Drawer.Content,{className:ze("wcm-drawer-content",e),"data-theme":r,style:n,children:[(0,$.jsx)(Ta.Drawer.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),(0,$.jsx)("div",{className:"wcm-drawer-handle"}),(0,$.jsx)("div",{className:"wcm-drawer-body",children:(0,$.jsx)(lg,{})})]})]})}):(0,$.jsx)(Ce,{feature:"wallet_connect",children:(0,$.jsxs)(sn.Portal,{children:[(0,$.jsx)(sn.Overlay,{className:"wcm-overlay"}),(0,$.jsxs)(sn.Content,{className:ze("wcm-dialog-content",e),"data-theme":r,style:n,children:[(0,$.jsx)(sn.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),(0,$.jsx)(sn.Description,{className:"wcm-sr-only",children:"Sign in with a social provider or pick a wallet to connect."}),(0,$.jsx)("div",{className:"wcm-dialog-body",children:(0,$.jsx)(lg,{})})]})]})})}he(`.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-system-orange-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-system-orange-high, #e56f00);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}
21
21
  `);he(`@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)}}
22
- `);var Fo=require("react/jsx-runtime"),qy={};function Yy({wallets:e,socialProviders:t=qy,termsUrl:r,privacyUrl:n,theme:o="dark",mobileBreakpoint:a=768,drawerDirection:i="bottom",dialogWidth:s,drawerMaxWidth:l,drawerMinWidth:d,style:c,open:b,onOpenChange:m,children:g}){let y=xo(`(max-width: ${a}px)`),[w,f]=ln.useState(!1),p=b!==void 0,x=p?b:w,h=ln.useCallback(M=>{p||f(M),m?.(M)},[p,m]),v=ln.useCallback(()=>h(!1),[h]);Cn(x,v);let{isDetected:R}=Ta(),S=ln.useMemo(()=>Object.keys(e),[e]),T=ln.useMemo(()=>Object.keys(t),[t]),C=ln.useMemo(()=>{let M={};return s&&(M["--wcm-dialog-width"]=s),l&&(M["--wcm-drawer-max-width"]=l),d&&(M["--wcm-drawer-min-width"]=d),{...M,...c}},[s,l,d,c]),N=ln.useMemo(()=>({theme:o,isMobile:y,open:x,setOpen:h,close:v,wallets:e,activeWalletIds:S,socialProviders:t,activeSocialIds:T,termsUrl:r??$a,privacyUrl:n??ei,isDetected:R,portalStyle:C}),[o,y,x,h,v,e,S,t,T,r,n,R,C]),E=(0,Fo.jsx)("div",{"data-theme":o,style:C,children:g});return y?(0,Fo.jsx)(vs.Provider,{value:N,children:(0,Fo.jsx)(mg.Drawer.Root,{direction:i,open:x,onOpenChange:h,noBodyStyles:!0,children:E},"drawer")}):(0,Fo.jsx)(vs.Provider,{value:N,children:(0,Fo.jsx)(fg.Root,{open:x,onOpenChange:h,children:E})})}var nd=Object.assign(Yy,{Trigger:Jm,Content:ug});var hg=require("@nexus-cross/crossx-design-system"),bg=V(require("react"),1);he(`.cb-button{--cb-bg: var(--ds-accent-gradient, linear-gradient(196deg, #ff2589 16%, #ff823d 84%));--cb-bg-hover: var(--cb-bg);--cb-color: #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}
22
+ `);var zo=require("react/jsx-runtime"),qy={};function Yy({wallets:e,socialProviders:t=qy,termsUrl:r,privacyUrl:n,theme:o="dark",mobileBreakpoint:a=768,drawerDirection:i="bottom",dialogWidth:s,drawerMaxWidth:l,drawerMinWidth:d,style:c,open:b,onOpenChange:f,children:g}){let x=yo(`(max-width: ${a}px)`),[w,m]=ln.useState(!1),p=b!==void 0,y=p?b:w,h=ln.useCallback(M=>{p||m(M),f?.(M)},[p,f]),v=ln.useCallback(()=>h(!1),[h]);Cn(y,v);let{isDetected:R}=Na(),S=ln.useMemo(()=>Object.keys(e),[e]),E=ln.useMemo(()=>Object.keys(t),[t]),C=ln.useMemo(()=>{let M={};return s&&(M["--wcm-dialog-width"]=s),l&&(M["--wcm-drawer-max-width"]=l),d&&(M["--wcm-drawer-min-width"]=d),{...M,...c}},[s,l,d,c]),N=ln.useMemo(()=>({theme:o,isMobile:x,open:y,setOpen:h,close:v,wallets:e,activeWalletIds:S,socialProviders:t,activeSocialIds:E,termsUrl:r??$a,privacyUrl:n??ei,isDetected:R,portalStyle:C}),[o,x,y,h,v,e,S,t,E,r,n,R,C]),I=(0,zo.jsx)("div",{"data-theme":o,style:C,children:g});return x?(0,zo.jsx)(vs.Provider,{value:N,children:(0,zo.jsx)(mg.Drawer.Root,{direction:i,open:y,onOpenChange:h,noBodyStyles:!0,children:I},"drawer")}):(0,zo.jsx)(vs.Provider,{value:N,children:(0,zo.jsx)(fg.Root,{open:y,onOpenChange:h,children:I})})}var rd=Object.assign(Yy,{Trigger:Jm,Content:ug});var hg=require("@nexus-cross/crossx-design-system"),bg=V(require("react"),1);he(`.cb-button{--cb-bg: var(--ds-accent-gradient, linear-gradient(196deg, #ff2589 16%, #ff823d 84%));--cb-bg-hover: var(--cb-bg);--cb-color: #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}
23
23
  `);he(`.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)}}
24
- `);var Ky='<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>',Zy='<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>',Xy='<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>',Jy='<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>',$y='<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 Ea(e){return`data:image/svg+xml,${encodeURIComponent(e)}`}var Ma=Ea(Ky),Aa=Ea(Zy),La=Ea(Xy),Da=Ea(Jy),Pa=Ea($y);var Ut=require("react/jsx-runtime");function od({isConnecting:e,address:t,provider:r,providerName:n,accountName:o,sendAccounts:a,onConnect:i,onDisconnect:s,onCopy:l,onSelectWallet:d,onBuy:c,onBuyDisabledMessage:b,label:m="Connect Wallet",connectingLabel:g="Connecting...",disconnectLabel:y,className:w,theme:f="dark",env:p,showBalance:x=!0,showPortfolio:h,drawerDirection:v,modal:R,connectorId:S,style:T,walletInfoStyle:C,sendTransaction:N,getTransactionReceipt:E,estimateGas:M,onReceive:W,onBridge:L,onSend:H,bridgeTokens:A,bridgeHistory:O,getBridgeQuote:ce,getBridgeToTokens:X,getBridgeApproval:P,approveBridge:xe,submitBridge:ne}){let K=w?`cb-button ${w}`:"cb-button",U=w?`cb-pill ${w}`:"cb-pill";if(bg.useEffect(()=>{Gn(t)},[t]),e)return(0,Ut.jsxs)("button",{type:"button",disabled:!0,className:K,style:T,"aria-busy":"true",children:[(0,Ut.jsx)("span",{className:"cb-spinner","aria-hidden":"true"}),(0,Ut.jsx)("span",{className:"cb-button-label",children:g})]});if(t){let te=n??nx(r),Z=r?tx[r]:void 0;return(0,Ut.jsx)(Ce,{feature:"connect_button",children:(0,Ut.jsxs)(no,{env:p,theme:f,drawerDirection:v,modal:R,showBalance:x,showPortfolio:h,walletAddress:t,accountName:o,sendAccounts:a,connectorId:S,onSelectWallet:d,onCopyAddress:l?(be,Ne)=>{Ne&&l()}:void 0,onDisconnect:s,disconnectLabel:y,style:C,sendTransaction:N,getTransactionReceipt:E,estimateGas:M,onReceive:W,onBridge:L,onBuy:c,onBuyDisabledMessage:b,onSend:H,bridgeTokens:A,bridgeHistory:O,getBridgeQuote:ce,getBridgeToTokens:X,getBridgeApproval:P,approveBridge:xe,submitBridge:ne,children:[(0,Ut.jsx)(no.Trigger,{asChild:!0,children:(0,Ut.jsxs)("button",{type:"button",className:U,"data-track":"wallet_pill_open",style:T,"aria-label":`Connected with ${te}: ${gg(t)}`,children:[Z?(0,Ut.jsx)("img",{src:Z,alt:"",width:18,height:18,className:"cb-pill-icon","data-provider":r}):(0,Ut.jsx)("span",{className:"cb-pill-icon-placeholder","aria-hidden":"true"}),(0,Ut.jsx)("span",{className:"cb-pill-address",children:gg(t)})]})}),(0,Ut.jsx)(no.Content,{align:"end",sideOffset:8})]})})}return(0,Ut.jsx)(Ce,{feature:"connect_button",children:(0,Ut.jsxs)("button",{type:"button",onClick:i,className:K,"data-track":"connect_click",style:T,"aria-label":typeof m=="string"?m:"Connect Wallet",children:[(0,Ut.jsx)(ex,{}),(0,Ut.jsx)("span",{className:"cb-button-label",children:m})]})})}function ex(){return(0,Ut.jsxs)("svg",{className:"cb-button-icon",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,Ut.jsx)("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"}),(0,Ut.jsx)("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"}),(0,Ut.jsx)("path",{d:"M12.75 11.25H12.7575",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}var tx={google:Da,apple:Pa,cross:Ma,metamask:Aa,binance:La},rx={google:"Google",apple:"Apple",cross:hg.WALLET_LABELS.default,metamask:"MetaMask",binance:"Binance Wallet"};function nx(e){return e?rx[e]:"Wallet"}function gg(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}var wg=V(require("react"),1);he(`.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)}
24
+ `);var Ky='<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>',Zy='<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>',Xy='<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>',Jy='<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>',$y='<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 Ia(e){return`data:image/svg+xml,${encodeURIComponent(e)}`}var Ea=Ia(Ky),Ma=Ia(Zy),Aa=Ia(Xy),La=Ia(Jy),Da=Ia($y);var Ft=require("react/jsx-runtime");function nd({isConnecting:e,address:t,provider:r,providerName:n,accountName:o,sendAccounts:a,onConnect:i,onDisconnect:s,onCopy:l,onSelectWallet:d,onBuy:c,onBuyDisabledMessage:b,label:f="Connect Wallet",connectingLabel:g="Connecting...",disconnectLabel:x,className:w,theme:m="dark",env:p,showBalance:y=!0,showPortfolio:h,drawerDirection:v,modal:R,connectorId:S,style:E,walletInfoStyle:C,sendTransaction:N,getTransactionReceipt:I,estimateGas:M,onReceive:W,onBridge:L,onSend:H,bridgeTokens:A,bridgeHistory:O,getBridgeQuote:ce,getBridgeToTokens:X,getBridgeApproval:P,approveBridge:xe,submitBridge:ne}){let K=w?`cb-button ${w}`:"cb-button",U=w?`cb-pill ${w}`:"cb-pill";if(bg.useEffect(()=>{Gn(t)},[t]),e)return(0,Ft.jsxs)("button",{type:"button",disabled:!0,className:K,style:E,"aria-busy":"true",children:[(0,Ft.jsx)("span",{className:"cb-spinner","aria-hidden":"true"}),(0,Ft.jsx)("span",{className:"cb-button-label",children:g})]});if(t){let te=n??nx(r),Z=r?tx[r]:void 0;return(0,Ft.jsx)(Ce,{feature:"connect_button",children:(0,Ft.jsxs)(no,{env:p,theme:m,drawerDirection:v,modal:R,showBalance:y,showPortfolio:h,walletAddress:t,accountName:o,sendAccounts:a,connectorId:S,onSelectWallet:d,onCopyAddress:l?(be,Ne)=>{Ne&&l()}:void 0,onDisconnect:s,disconnectLabel:x,style:C,sendTransaction:N,getTransactionReceipt:I,estimateGas:M,onReceive:W,onBridge:L,onBuy:c,onBuyDisabledMessage:b,onSend:H,bridgeTokens:A,bridgeHistory:O,getBridgeQuote:ce,getBridgeToTokens:X,getBridgeApproval:P,approveBridge:xe,submitBridge:ne,children:[(0,Ft.jsx)(no.Trigger,{asChild:!0,children:(0,Ft.jsxs)("button",{type:"button",className:U,"data-track":"wallet_pill_open",style:E,"aria-label":`Connected with ${te}: ${gg(t)}`,children:[Z?(0,Ft.jsx)("img",{src:Z,alt:"",width:18,height:18,className:"cb-pill-icon","data-provider":r}):(0,Ft.jsx)("span",{className:"cb-pill-icon-placeholder","aria-hidden":"true"}),(0,Ft.jsx)("span",{className:"cb-pill-address",children:gg(t)})]})}),(0,Ft.jsx)(no.Content,{align:"end",sideOffset:8})]})})}return(0,Ft.jsx)(Ce,{feature:"connect_button",children:(0,Ft.jsxs)("button",{type:"button",onClick:i,className:K,"data-track":"connect_click",style:E,"aria-label":typeof f=="string"?f:"Connect Wallet",children:[(0,Ft.jsx)(ex,{}),(0,Ft.jsx)("span",{className:"cb-button-label",children:f})]})})}function ex(){return(0,Ft.jsxs)("svg",{className:"cb-button-icon",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,Ft.jsx)("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"}),(0,Ft.jsx)("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"}),(0,Ft.jsx)("path",{d:"M12.75 11.25H12.7575",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}var tx={google:La,apple:Da,cross:Ea,metamask:Ma,binance:Aa},rx={google:"Google",apple:"Apple",cross:hg.WALLET_LABELS.default,metamask:"MetaMask",binance:"Binance Wallet"};function nx(e){return e?rx[e]:"Wallet"}function gg(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}var wg=V(require("react"),1);he(`.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)}
25
25
  `);he(`.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)}}
26
- `);var Sn=require("react/jsx-runtime"),ad="https://www.onechain.nexus/skills";function id({label:e="Skills",href:t,onClick:r,className:n,style:o,theme:a,disabled:i=!1,isLoading:s=!1,loadingLabel:l="Loading...",openInNewTab:d=!1,type:c="button"}){let[b,m]=wg.useState(!1),g=at(),y=sr("apps.json",g,R=>Nr(R?.skills,g)),w=t??y,f=async R=>{if(w&&!r){d?window.open(w,"_blank","noopener,noreferrer"):window.location.href=w;return}if(r)try{m(!0),await r()}finally{m(!1)}},p=i||s||b,x=s||b,h=x?l:e,v=n?`sb-button ${n}`:"sb-button";return(0,Sn.jsx)(Ce,{feature:"skills",children:(0,Sn.jsxs)("button",{type:c,onClick:f,disabled:p,className:v,"data-theme":a,"data-track":"click",style:o,"aria-busy":x,children:[x?(0,Sn.jsx)("span",{className:"sb-spinner","aria-hidden":"true"}):(0,Sn.jsx)(ox,{}),(0,Sn.jsx)("span",{className:"sb-label",children:h})]})})}function ox(){return(0,Sn.jsx)("svg",{className:"sb-button-icon",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,Sn.jsx)("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"})})}Wa({mode:"dapp-ui"});0&&(module.exports={APPLE_ICON,AppLauncher,AppLauncherContent,AppLauncherTrigger,BINANCE_ICON,BridgeFlow,CHAINS_CONFIG_FILE,CONNECTOR_REGISTRY,CROSSX_ICON,ConnectButton,ConnectorId,DEFAULT_SKILLS_HREF,DEFAULT_TRUSTED_FACTORIES,DappUiErrorBoundary,GOOGLE_ICON,GetOneUsd,METAMASK_ICON,PORTFOLIO_SECTIONS,RelayApiError,RelayDeposit,RelayHistory,RelayRecovery,SOCIAL_REGISTRY,SendFlow,SkillsButton,StatusTracker,TOKEN_STATS_QUERY_KEY,USER_BALANCE_QUERY_KEY,WALLET_REGISTRY,WalletConnectModal,WalletInfo,WalletPortfolio,WalletPortfolioBody,announceAppLauncherUsage,captureDappUiException,createRelayClient,findGetOneUsdToken,getChainDisplay,getDappUiSentryScope,getOneUsdTokenKey,initDappUiSentry,isGetOneUsdActionEnabled,isGetOneUsdActionSupported,isGetOneUsdActionVisible,isGetOneUsdTargetAvailable,matchesGetOneUsdToken,normalizeFailureReason,resolveEnvironment,resolveGetOneUsdRoute,setDappUiAnalyticsUser,trackDappUiEvent,trackDappUiFunnel,useChainDisplay,useChainsConfig,useGlobalMenu,useRelayConfig,useRelayOrders,useRelayRecovery,useTokenBalance,useTokenStats,useWalletDetect});
26
+ `);var Sn=require("react/jsx-runtime"),od="https://www.onechain.nexus/skills";function ad({label:e="Skills",href:t,onClick:r,className:n,style:o,theme:a,disabled:i=!1,isLoading:s=!1,loadingLabel:l="Loading...",openInNewTab:d=!1,type:c="button"}){let[b,f]=wg.useState(!1),g=at(),x=sr("apps.json",g,R=>Nr(R?.skills,g)),w=t??x,m=async R=>{if(w&&!r){d?window.open(w,"_blank","noopener,noreferrer"):window.location.href=w;return}if(r)try{f(!0),await r()}finally{f(!1)}},p=i||s||b,y=s||b,h=y?l:e,v=n?`sb-button ${n}`:"sb-button";return(0,Sn.jsx)(Ce,{feature:"skills",children:(0,Sn.jsxs)("button",{type:c,onClick:m,disabled:p,className:v,"data-theme":a,"data-track":"click",style:o,"aria-busy":y,children:[y?(0,Sn.jsx)("span",{className:"sb-spinner","aria-hidden":"true"}):(0,Sn.jsx)(ox,{}),(0,Sn.jsx)("span",{className:"sb-label",children:h})]})})}function ox(){return(0,Sn.jsx)("svg",{className:"sb-button-icon",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,Sn.jsx)("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"})})}ja({mode:"dapp-ui"});0&&(module.exports={APPLE_ICON,AppLauncher,AppLauncherContent,AppLauncherTrigger,BINANCE_ICON,BridgeFlow,CHAINS_CONFIG_FILE,CONNECTOR_REGISTRY,CROSSX_ICON,ConnectButton,ConnectorId,DEFAULT_SKILLS_HREF,DEFAULT_TRUSTED_FACTORIES,DappUiErrorBoundary,GOOGLE_ICON,GetOneUsd,METAMASK_ICON,PORTFOLIO_SECTIONS,RelayApiError,RelayDeposit,RelayHistory,RelayRecovery,SOCIAL_REGISTRY,SendFlow,SkillsButton,StatusTracker,TOKEN_STATS_QUERY_KEY,USER_BALANCE_QUERY_KEY,WALLET_REGISTRY,WalletConnectModal,WalletInfo,WalletPortfolio,WalletPortfolioBody,announceAppLauncherUsage,captureDappUiException,createRelayClient,findGetOneUsdToken,getChainDisplay,getDappUiSentryScope,getOneUsdTokenKey,initDappUiSentry,isGetOneUsdActionEnabled,isGetOneUsdActionSupported,isGetOneUsdActionVisible,isGetOneUsdTargetAvailable,matchesGetOneUsdToken,normalizeFailureReason,resolveEnvironment,resolveGetOneUsdRoute,setDappUiAnalyticsUser,trackDappUiEvent,trackDappUiFunnel,useChainDisplay,useChainsConfig,useGlobalMenu,useRelayConfig,useRelayOrders,useRelayRecovery,useTokenBalance,useTokenStats,useWalletDetect});
27
27
  //# sourceMappingURL=index.cjs.map