@nexus-cross/dapp-ui 1.4.2 → 1.5.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.cjs +28 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -3
- package/dist/index.d.ts +48 -3
- package/dist/index.js +19 -18
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
"use strict";var k0=Object.create;var oi=Object.defineProperty;var R0=Object.getOwnPropertyDescriptor;var C0=Object.getOwnPropertyNames;var S0=Object.getPrototypeOf,N0=Object.prototype.hasOwnProperty;var T0=(e,t)=>{for(var r in t)oi(e,r,{get:t[r],enumerable:!0})},oc=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of C0(t))!N0.call(e,o)&&o!==r&&oi(e,o,{get:()=>t[o],enumerable:!(n=R0(t,o))||n.enumerable});return e};var V=(e,t,r)=>(r=e!=null?k0(S0(e)):{},oc(t||!e||!e.__esModule?oi(r,"default",{value:e,enumerable:!0}):r,e)),I0=e=>oc(oi({},"__esModule",{value:!0}),e);var mv={};T0(mv,{APPLE_ICON:()=>Ya,AppLauncher:()=>bl,AppLauncherContent:()=>xl,AppLauncherTrigger:()=>wl,BINANCE_ICON:()=>Va,BridgeFlow:()=>co,CHAINS_CONFIG_FILE:()=>Kn,CONNECTOR_REGISTRY:()=>oa,CROSSX_ICON:()=>_a,ConnectButton:()=>Wd,ConnectorId:()=>yi,DEFAULT_SKILLS_HREF:()=>Gd,DEFAULT_TRUSTED_FACTORIES:()=>go,DappUiErrorBoundary:()=>ta,GOOGLE_ICON:()=>qa,GetOneUsd:()=>Ud,METAMASK_ICON:()=>Qa,OnePopBody:()=>Sa,OnePopGetTokenTrigger:()=>ud,PORTFOLIO_SECTIONS:()=>ba,RelayApiError:()=>Fr,RelayDeposit:()=>_o,RelayHistory:()=>Td,RelayRecovery:()=>Ld,SOCIAL_REGISTRY:()=>_i,SendFlow:()=>la,SkillsButton:()=>Hd,StatusTracker:()=>Bd,TOKEN_STATS_QUERY_KEY:()=>zi,USER_BALANCE_QUERY_KEY:()=>Oi,WALLET_PORTFOLIO_QUERY_PREFIX:()=>ql,WALLET_REGISTRY:()=>Po,WalletConnectModal:()=>jd,WalletInfo:()=>uo,WalletPortfolio:()=>nd,WalletPortfolioBody:()=>io,announceAppLauncherUsage:()=>ci,captureDappUiException:()=>ea,createRelayClient:()=>er,findGetOneUsdToken:()=>Ba,getChainDisplay:()=>pc,getDappUiSentryScope:()=>$o,getOneUsdTokenKey:()=>Oa,initDappUiSentry:()=>To,invalidateWalletPortfolioQueries:()=>In,isGetOneUsdActionEnabled:()=>Fa,isGetOneUsdActionSupported:()=>qo,isGetOneUsdActionVisible:()=>Vo,isGetOneUsdTargetAvailable:()=>za,matchesGetOneUsdToken:()=>Vs,normalizeFailureReason:()=>Rr,resolveEnvironment:()=>it,resolveGetOneUsdRoute:()=>Qo,selectChainMeta:()=>li,setDappUiAnalyticsUser:()=>Xn,trackDappUiEvent:()=>ra,trackDappUiFunnel:()=>$e,useChainDisplay:()=>So,useChainsConfig:()=>uc,useGlobalMenu:()=>na,useRelayConfig:()=>Dd,useRelayOrders:()=>Ln,useRelayRecovery:()=>Pd,useTokenBalance:()=>Sn,useTokenStats:()=>Nn,useWalletDetect:()=>Wa});module.exports=I0(mv);var E0={};function ac(e){try{return E0.env?.[e]}catch{return}}function ic(e){if(!(typeof process>"u"))return process.env?.[e]}function it(e){if(e)return sc(e);let t=ac("VITE_CROSSX_ENVIRONMENT")??ac("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??ic("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??ic("CROSSX_ENVIRONMENT");return sc(t)}function sc(e){switch(e?.toLowerCase()){case"dev":case"development":return"dev";case"stage":case"staging":case"stg":return"stage";default:return"production"}}var nn=V(require("react"),1);var Jo="eip155";function Lr(e){return`${Jo}:${e}`}function lc(e){let t=e.indexOf(":");return t>0?e.slice(0,t):void 0}function dc(e){let t=lc(e);return t===void 0||t===Jo}function ai(e){if(typeof e=="number")return Number.isSafeInteger(e)&&e>0?e:void 0;if(typeof e!="string")return;let t=e.trim(),r=lc(t);if(r!==void 0&&r!==Jo)return;let n=r===Jo?t.slice(Jo.length+1):t;if(!/^\d+$/.test(n))return;let o=Number(n);return Number.isSafeInteger(o)&&o>0?o:void 0}function cc(e){let t=ai(e);return t===void 0?void 0:Lr(t)}var A0={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"},M0=3e3;function Dr(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 dl=new Map;function xn(e,t){let r=`${A0[t]}/${e}`,n=dl.get(r);return n||(n=(async()=>{let o=new AbortController,a=setTimeout(()=>o.abort(),M0);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&&dl.delete(r),o)),dl.set(r,n)),n}function L0(e){return typeof e=="string"&&e.startsWith("https://")}async function je(e,t){let r=await xn("endpoints.json",t),n=Dr(r?.apis?.[e],t);if(!L0(n))throw new Error(`[remote-config] endpoints.json missing or invalid api base: ${e} (${t})`);return n}var ii="apps.json";function si(e,t){let r=Dr(e?.relay?.forwarderFactories,t),n=[r?.standingForwarderFactory,r?.depositorForwarderFactory].filter(o=>typeof o=="string");return n.length>0?n:void 0}var Kn="chains.json";function li(e,t){return e?e[Lr(t)]??e[String(t)]??{}:{}}async function pc(e,t){let r=await xn(Kn,t);return li(r?.chains,e)}function So(e,t){let[r,n]=nn.useState({});return nn.useEffect(()=>{if(e==null){n({});return}let o=!0;return xn(Kn,t).then(a=>{o&&n(li(a?.chains,e))}),()=>{o=!1}},[e,t]),r}function uc(e){let[t,r]=nn.useState({});return nn.useEffect(()=>{let n=!0;return xn(Kn,e).then(o=>{n&&r(o?.chains??{})}),()=>{n=!1}},[e]),t}function qt(e,t,r){let[n,o]=nn.useState(void 0),a=nn.useRef(r);return a.current=r,nn.useEffect(()=>{let i=!0;return xn(e,t).then(s=>{if(!i)return;let l=a.current(s);l!==void 0&&o(l)}),()=>{i=!1}},[e,t]),n}var Zn="1.4.2";var di="__nexusCrossAppLauncherRuntime";function D0(){if(typeof window>"u")return null;let e=window;return e[di]??(e[di]={mode:"dapp-ui"}),e[di]}function P0(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${Zn}, \uC0AC\uC6A9 \uBAA8\uB4DC: connect-kit)`)}else console.info(`[CROSSx App Launcher] dapp-ui v${Zn} \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 ci(e){let t=D0();t&&(e?.mode==="connect-kit-react"?t.mode="connect-kit-react":t.mode||(t.mode="dapp-ui"),e?.connectKitVersion&&(t.connectKitVersion=e.connectKitVersion),P0(t))}var on=require("@sentry/react");var O0="https://5c82aeb32da33b5a0a14b7c5393992ca@o4511668907081728.ingest.de.sentry.io/4511705324126289",B0=`dapp-ui@${Zn}`,No=null,fc=.1;function mc(){return fc}function z0(e){switch(e){case"dev":return"dev";case"stage":return"stg";default:return"prod"}}function To(e){if(No)return No;if(typeof window>"u")return null;let t=z0(it(e?.environment));typeof e?.analyticsSampleRate=="number"&&(fc=Math.min(1,Math.max(0,e.analyticsSampleRate)));let r=new on.BrowserClient({dsn:e?.dsn??O0,transport:on.makeFetchTransport,stackParser:on.defaultStackParser,integrations:[(0,on.linkedErrorsIntegration)()],environment:t,release:B0,enabled:e?.enabled??t==="prod"}),n=new on.Scope;return n.setClient(r),n.setTags({package:"dapp-ui",framework:"react",source:"dapp-ui"}),r.init(),No=n,No}function $o(){return No}function ea(e,t){let r=No??To();if(r)return r.captureException(e,t?{captureContext:{extra:t}}:void 0)}var gc=require("react");var ta=class extends gc.Component{constructor(){super(...arguments);this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(r,n){ea(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 Pe(...e){return e.filter(Boolean).join(" ")}var F0=/CROSSx|ONE\s?wallet|ONE\s?pocket/i;function Io(){return typeof window>"u"?!1:F0.test(window.navigator.userAgent)}var hc="__nexus_dapp_ui_uid",cl=null;function U0(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Array.from({length:32},()=>Math.floor(Math.random()*16).toString(16)).join("")}function pl(){if(cl)return cl;let e=null;try{e=window.localStorage.getItem(hc)}catch{}if(!e||!e.startsWith("anon_")){e=`anon_${U0()}`;try{window.localStorage.setItem(hc,e)}catch{}}return cl=e,e}async function bc(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 j0(){let e=window.navigator.userAgent;return/ipad|tablet|(android(?!.*mobile))/i.test(e)?"tablet":/mobile|iphone|ipod|android/i.test(e)?"mobile":"desktop"}function xc(){return{host:window.location.hostname,device_type:j0(),is_cross_inapp:String(Io())}}var wc=!1;function ul(){if(typeof window>"u")return null;let e=$o()??To();return e?(wc||(wc=!0,e.setUser({id:pl()})),e):null}function vc(){return Math.random()>=mc()}var yc=0;function Xn(e){let t=ul();if(!t)return;let r=++yc;if(!e){t.setUser({id:pl()});return}bc(e).then(n=>{n&&r===yc&&t.setUser({id:n})})}function ra(e,t,r){let n=ul();!n||vc()||n.captureMessage(`ui: ${e}_${t}`,"info",{captureContext:{tags:{...xc(),feature:e,action:t,...r}}})}function $e(e,t,r){let n=ul();if(!n||vc())return;let o=r?.status??"success";n.captureMessage(`funnel: ${e}_${t}`,"info",{captureContext:{tags:{...xc(),flow:e,funnel_step:`${e}_${t}`,funnel_status:o,...o==="failure"?{failure_reason:r?.reason??"unknown"}:{},...r?.tags}}})}function Rr(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 kc=require("react");var Rc=require("react/jsx-runtime");function Le({feature:e,children:t}){let r=(0,kc.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");ra(e,s,l?{item_id:l}:void 0)},[e]);return(0,Rc.jsx)("div",{style:{display:"contents"},onClick:r,children:t})}var Mo=V(require("react"),1),Sc=V(require("@radix-ui/react-popover"),1),Nc=require("vaul");var pi=require("react"),fl=(0,pi.createContext)(null);function ui(){let e=(0,pi.useContext)(fl);if(!e)throw new Error("AppLauncher compound components must be used within <AppLauncher>");return e}var mi=V(require("react"),1),W0="__dappUiOverlay",Jn=[],Eo=0,gl=0,fi=!1,ml=!1;function Cc(){if(gl>0){gl-=1;return}Eo=Math.max(0,Eo-1),Jn.pop()?.close(),hl()}function G0(){fi||(window.addEventListener("popstate",Cc),fi=!0)}function hl(){Jn.length>0||!fi||(window.removeEventListener("popstate",Cc),fi=!1)}function H0(){ml||(ml=!0,queueMicrotask(()=>{ml=!1;let e=Eo-Jn.length;if(e<=0){hl();return}Eo-=e,gl+=1,window.history.go(-e),hl()}))}function Pn(e,t){let r=mi.useRef(t);r.current=t,mi.useEffect(()=>{if(!(!e||typeof window>"u"))return _0(()=>r.current())},[e])}function _0(e){let t={close:e};return Jn.push(t),Eo<Jn.length&&(window.history.pushState({[W0]:!0},""),Eo+=1),G0(),()=>{let r=Jn.lastIndexOf(t);r!==-1&&(Jn.splice(r,1),H0())}}var gi=require("react");function Ao(e){let[t,r]=(0,gi.useState)(!1);return(0,gi.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 we(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))}we(`[data-theme=dark]{--al-bg: var(--ds-surface-default, #1e232e);--al-bg-hover: var(--ds-surface-medium, #252b39);--al-text: var(--ds-content-highest, #ffffff);--al-text-secondary: var(--ds-content-medium, #ffffffa6);--al-border: var(--ds-border-default, #ffffff12);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .7));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #3a261f;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #422a1f);--al-badge-text: var(--ds-accent-primary-default, #f0640d);--al-drawer-overlay: var(--ds-overlay-dim, #000000b3)}[data-theme=light]{--al-bg: var(--ds-surface-default, #ffffff);--al-bg-hover: var(--ds-surface-medium, #f5f7fa);--al-text: var(--ds-content-highest, #000000);--al-text-secondary: var(--ds-content-medium, #000000a6);--al-border: var(--ds-border-default, #00000012);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .15));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #fff1eb;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #fff5ee);--al-badge-text: var(--ds-accent-primary-default, #ff8438);--al-drawer-overlay: var(--ds-overlay-dim, #00000080)}
|
|
2
|
-
`);
|
|
3
|
-
`);
|
|
4
|
-
`);
|
|
5
|
-
`);we("");var hi=require("react/jsx-runtime");function bl({env:e,theme:t="dark",mobileBreakpoint:r=768,domain:n,children:o}){let a=Ao(`(max-width: ${r}px)`),[i,s]=Mo.useState(!1),l=Mo.useCallback(()=>s(!1),[]),d=it(e);Pn(i,l);let p=Mo.useMemo(()=>({env:d,theme:t,isMobile:a,open:i,domain:n,close:l}),[d,t,a,i,n,l]);return(0,hi.jsx)(fl.Provider,{value:p,children:a?(0,hi.jsx)(Nc.Drawer.Root,{direction:"right",open:i,onOpenChange:s,noBodyStyles:!0,children:o},"drawer"):(0,hi.jsx)(Sc.Root,{open:i,onOpenChange:s,children:o},"popover")})}var Ac=V(require("@radix-ui/react-popover"),1),Mc=require("vaul");var br=require("react/jsx-runtime");function Tc({size:e=18}){return(0,br.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,br.jsx)("rect",{width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,br.jsx)("rect",{x:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,br.jsx)("rect",{x:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,br.jsx)("rect",{y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,br.jsx)("rect",{x:"7",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,br.jsx)("rect",{x:"14",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,br.jsx)("rect",{y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,br.jsx)("rect",{x:"7",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,br.jsx)("rect",{x:"14",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"})]})}function Ic(){return(0,br.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,br.jsx)("path",{d:"M12 19L5 12M5 12L12 5M5 12H19",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ec(){return(0,br.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,br.jsx)("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}var $n=require("react/jsx-runtime");function wl({asChild:e,children:t,className:r,style:n}){let{isMobile:o,theme:a}=ui(),i=t!=null,s=e??!0,l=r?`al-trigger-btn ${r}`:"al-trigger-btn",d=i?t:(0,$n.jsx)("button",{type:"button",className:l,"data-theme":a,"data-track":"open",style:n,children:(0,$n.jsx)(Tc,{size:18})});return o?(0,$n.jsx)(Le,{feature:"app_launcher",children:(0,$n.jsx)(Mc.Drawer.Trigger,{asChild:s,children:d})}):(0,$n.jsx)(Le,{feature:"app_launcher",children:(0,$n.jsx)(Ac.Trigger,{asChild:s,children:d})})}var an=V(require("react"),1),bi=V(require("@radix-ui/react-popover"),1),eo=require("vaul");var Pc=require("@tanstack/react-query");var Lc={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 Q0="https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",V0="https://contents.crosstoken.io/frontend/common/app-launcher/icons";function Vr(e,t){return`${e==="production"?V0:Q0}/${t}.png`}function Dc(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:Vr(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:Vr(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:Vr(t,"crossd"),order:5e3,type:"crossd",badge:null,isNew:!1,serviceStatus:"ending"},{id:"onepop",label:"ONEpop",description:"Send crypto with just an X handle.",url:{dev:"https://dev.onechain.nexus/pop",stage:"https://stg.onechain.nexus/pop",production:"https://onechain.nexus/pop"},iconUrl:t==="production"?"https://contents.onechain.nexus/frontend/common/app-launcher/icons/onepop.png":"https://stg-contents.onechain.nexus/frontend/common/app-launcher/icons/onepop.png",order:5500,type:"onepop",badge:null,isNew:!0,serviceStatus:"available"},{id:"prediction",label:"Prediction",description:"Prediction market",url:{dev:"https://stg-prediction.crossdefi.io",stage:"https://stg-prediction.crossdefi.io",production:"https://prediction.crossdefi.io/"},iconUrl:Vr(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:Vr(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:Vr(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:Vr(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:Vr(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:Vr(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:Vr(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:Vr(t,"wave"),order:11e4,type:"wave",badge:null,isNew:!1,serviceStatus:"available"}]}}function na(e){let t=it(e);return(0,Pc.useQuery)({queryKey:["global-menu",t],queryFn:async()=>{try{let r=await fetch(Lc[t],{cache:"no-store"});if(!r.ok)throw new Error(`Failed to fetch global menu: ${r.status}`);return r.json()}catch{return Dc(t)}},staleTime:300*1e3,gcTime:600*1e3,retry:!1,refetchOnMount:!0})}function yl(e){return e.serviceStatus==="ending"||e.serviceStatus==="comingSoon"?e.serviceStatus:"available"}function Bc(e,t){return typeof e=="string"?e:e[t]??e.production??e.stage??e.dev}function zc(e){return[...e].sort((t,r)=>{let n=Oc(t)-Oc(r);return n!==0?n:t.order-r.order})}function Oc(e){let t=yl(e);return t==="comingSoon"?0:t==="ending"?2:1}var dt=require("react/jsx-runtime");function q0(e){return e.id==="cross-staking"||e.type==="cross-staking"}function xl({align:e="end",sideOffset:t=8,className:r}){let{env:n,theme:o,isMobile:a,domain:i,close:s}=ui(),{data:l}=na(n),d=an.useMemo(()=>zc(l?.items??[]),[l?.items]),p=24,b=an.useRef(null),g=an.useRef(!1),h=an.useCallback(v=>{b.current={x:v.clientX,y:v.clientY},g.current=!1},[]),x=an.useCallback(v=>{let R=b.current;b.current=null,R&&(g.current=Math.abs(v.clientX-R.x)>p||Math.abs(v.clientY-R.y)>p)},[]),y=an.useCallback(()=>{b.current=null,g.current=!0},[]),u=typeof window<"u"?window.location.pathname:"",c=an.useCallback((v,R)=>{let C=g.current;if(g.current=!1,C&&v.detail!==0)return;let T=R.url[n]??R.url.production,S=Fc(T,i);if(!S)try{let N=new URL(T);if(N.pathname===window.location.pathname&&N.search===window.location.search&&N.hash===window.location.hash){s();return}}catch{}if(S){let N=window.open(T,"_blank");if(N){N.opener=null,s();return}}window.location.href=T},[n,i,s]),w=v=>{let R=v.url[n]??v.url.production,C=Fc(R,i),T=yl(v),S=T==="ending",N=Bc(v.iconUrl,n),I=!1;if(!C)try{let M=new URL(R).pathname;I=u===M||u.startsWith(M+"/")}catch{I=!1}return(0,dt.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":T,onPointerDown:h,onPointerUp:x,onPointerCancel:y,onClick:M=>c(M,v),children:(0,dt.jsxs)("div",{className:"al-grid-item-left",children:[(0,dt.jsxs)("div",{className:"al-grid-item-icon",children:[(0,dt.jsx)("img",{src:N,alt:v.label,width:24,height:24,loading:"lazy"}),v.isNew&&(0,dt.jsx)("span",{className:"al-status-ribbon al-status-ribbon-new",children:"N"})]}),(0,dt.jsxs)("span",{className:"al-grid-item-text",children:[(0,dt.jsx)("span",{className:"al-grid-item-label",children:v.label}),S&&(0,dt.jsx)("span",{className:"al-grid-item-status-text",children:"(End Soon)"}),v.badge&&!q0(v)&&(0,dt.jsx)("span",{className:"al-badge al-badge-list",children:v.badge})]})]})},v.id)},m=(0,dt.jsx)("div",{className:"al-menu","data-theme":o,children:(0,dt.jsx)("div",{className:"al-grid",children:d.map(w)})});return a?(0,dt.jsx)(Le,{feature:"app_launcher",children:(0,dt.jsxs)(eo.Drawer.Portal,{children:[(0,dt.jsx)(eo.Drawer.Overlay,{className:"al-drawer-overlay"}),(0,dt.jsxs)(eo.Drawer.Content,{className:Pe("al-drawer-content",r),"data-theme":o,children:[(0,dt.jsxs)("div",{className:"al-drawer-header",children:[(0,dt.jsx)(eo.Drawer.Close,{className:"al-drawer-close","data-track":"close",children:(0,dt.jsx)(Ic,{})}),(0,dt.jsx)(eo.Drawer.Title,{className:"al-drawer-title",children:"ONE Services"}),(0,dt.jsx)(eo.Drawer.Close,{className:"al-drawer-close","data-track":"close",children:(0,dt.jsx)(Ec,{})})]}),(0,dt.jsx)("div",{className:"al-drawer-body",children:m})]})]})}):(0,dt.jsx)(Le,{feature:"app_launcher",children:(0,dt.jsx)(bi.Portal,{children:(0,dt.jsx)(bi.Content,{align:e,sideOffset:t,className:Pe("al-popover-content",r),"data-theme":o,children:m})})})}function Fc(e,t){try{let r=new URL(e).hostname;return typeof window>"u"?!0:r!==(t??window.location.hostname)}catch{return!1}}var ur=V(require("react"),1),cg=V(require("@radix-ui/react-popover"),1),pg=require("vaul");var wi=require("react"),vl=(0,wi.createContext)(null);function On(){let e=(0,wi.useContext)(vl);if(!e)throw new Error("WalletInfo compound components must be used within <WalletInfo>");return e}var Uc=require("@nexus-cross/crossx-design-system"),yi=(n=>(n.CROSSx="crossx",n.MetaMask="io.metamask",n.Binance="com.binance.wallet",n))(yi||{}),oa={crossx:{name:Uc.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 Dp=V(require("react"),1);var ke=require("react/jsx-runtime");function jc({size:e=16,className:t}){return(0,ke.jsxs)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,ke.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,ke.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 to({size:e=16,className:t}){return(0,ke.jsx)("svg",{width:e,height:e,viewBox:"4 4 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,ke.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 vn({size:e=16,className:t}){return(0,ke.jsx)("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,ke.jsx)("path",{d:"M11.6667 3.5L5.25 9.91667L2.33334 7",stroke:"currentColor",strokeWidth:1.16667,strokeLinecap:"round",strokeLinejoin:"round"})})}function Nr({size:e=24,className:t}){return(0,ke.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,ke.jsx)("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Wc({size:e=20,className:t}){return(0,ke.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,ke.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,ke.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 xi({size:e=20,className:t}){return(0,ke.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,children:(0,ke.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 qr({size:e=20,className:t}){return(0,ke.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,ke.jsx)("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor",strokeWidth:1.67,strokeLinecap:"round",strokeLinejoin:"round"})})}function Pr({size:e=20,className:t}){return(0,ke.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,ke.jsx)("path",{d:"M5 8L10 13L15 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Gc({size:e=16,className:t}){return(0,ke.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,ke.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,ke.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 Hc({size:e=16,className:t}){return(0,ke.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,ke.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,ke.jsx)("path",{d:"M1.667 1.667l16.666 16.666",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}var Y0='<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>',K0=`data:image/svg+xml,${encodeURIComponent(Y0)}`;function _c({size:e=42,className:t}){return(0,ke.jsx)("img",{src:K0,width:e,height:e,alt:"",className:t,style:{display:"block"}})}function Qc({size:e=20,className:t}){return(0,ke.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,ke.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 Vc({size:e=24,className:t}){return(0,ke.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,ke.jsx)("defs",{children:(0,ke.jsxs)("linearGradient",{id:"wi-send-solid-grad",x1:"3",y1:"21",x2:"21",y2:"3",gradientUnits:"userSpaceOnUse",children:[(0,ke.jsx)("stop",{stopColor:"var(--wi-send-solid-from, #f62e61)"}),(0,ke.jsx)("stop",{offset:"1",stopColor:"var(--wi-send-solid-to, #f7564a)"})]})}),(0,ke.jsx)("path",{d:"M20.98 3.02a1.2 1.2 0 0 0-1.28-.28L3.6 8.9a1.2 1.2 0 0 0 .07 2.26l6.06 1.9a.6.6 0 0 1 .39.4l1.9 6.06a1.2 1.2 0 0 0 2.26.07l6.16-16.1a1.2 1.2 0 0 0-.46-1.47Z",fill:"url(#wi-send-solid-grad)"})]})}function qc({size:e=20,className:t}){return(0,ke.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,ke.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 Yc({size:e=20,className:t}){return(0,ke.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,ke.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 Kc({size:e=20,className:t}){return(0,ke.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,ke.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 Zc({size:e=20,className:t}){return(0,ke.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,ke.jsx)("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor"}),(0,ke.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 fe=V(require("react"),1);var Bn=V(require("bignumber.js"),1);function Z0(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 kn(e,t){if(!e||e==="0")return"0.00";let r=new Bn.default(e).shiftedBy(-t),n=r.isGreaterThanOrEqualTo(1)?2:4;return r.toFormat(n,Bn.default.ROUND_DOWN)}function wr(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}function ro(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 vi(e,t,r){let o=new Bn.default(e).shiftedBy(-t).multipliedBy(new Bn.default(r));return o.isZero()||o.isNaN()?"$0.00":`$${(o.integerValue(Bn.default.ROUND_DOWN).isGreaterThanOrEqualTo(1)?o.decimalPlaces(2,Bn.default.ROUND_DOWN):o.decimalPlaces(4,Bn.default.ROUND_DOWN)).toFormat()}`}function Xc(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=Z0(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 Rl=require("react"),ep=require("@tanstack/react-query");var Ut={dev:{cross:612044,bsc:97},stage:{cross:612044,bsc:97},production:{cross:612055,bsc:56}},Jc={dev:[Lr(612044),Lr(97),Lr(998)],stage:[Lr(612044),Lr(97),Lr(998)],production:[Lr(612055),Lr(56)]};function kl(e){return Jc[e]}var ki="https://terms.onechain.nexus/docs/terms-july-23-2026",Ri="https://terms.onechain.nexus/docs/pp-july-23-2026",$c="https://contents.crossdefi.io/Terms/terms/tos-26-07-09-oneusd.html";var X0="send:chain-info";function J0(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 Cl(e,...t){let r=e.replace(/\/+$/,""),n=t.map(o=>o.replace(/^\/+|\/+$/g,"")).filter(Boolean);return[r,...n].join("/")}function tp(e,t,r,n){if(n)return t===Ut[e].cross?rp(t,n):r?.explorer_url?Cl(r.explorer_url,r.explorer_postfix?.transaction??"tx",n):$0(e,t,n)}function rp(e,t){return Cl("https://explorer.onechain.nexus",String(e),"tx",t)}function $0(e,t,r){let n=Ut[e];if(t===n.cross)return rp(t,r);if(t===n.bsc)return Cl(e==="production"?"https://bscscan.com":"https://testnet.bscscan.com","tx",r)}function aa(e,t,r,n=!0){let o=(0,ep.useQuery)({queryKey:[X0,e,t],queryFn:async({signal:s})=>{let l=await je("walletServer",e),d=await fetch(`${l}/v1/public/chain/info/${t}`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Failed to fetch chain info: ${d.status}`);let p=await d.json();if("code"in p&&p.code!==void 0&&p.code!==200)throw new Error(`Chain info API error: ${p.code}`);return J0(p)},enabled:n,staleTime:3e5}),a=o.data;return{transactionUrl:(0,Rl.useMemo)(()=>tp(e,t,a,r),[t,a,e,r]),chainInfo:a,...o}}function np(e,t,r=!0){let{chainInfo:n}=aa(e,t,void 0,r);return{buildTxUrl:(0,Rl.useMemo)(()=>a=>tp(e,t,n,a),[e,t,n]),chainInfo:n}}var op="0x0000000000000000000000000000000000000001";var eb="0xa9059cbb",tb=/^0x[a-fA-F0-9]{40}$/,rb="nexus-cross:dapp-ui:send:recent:",ap=10;function nb(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return e.slice(0,t)}function ia(e){return e.toLowerCase()}function sn(e){return tb.test(e)}function zn(e){return ia(e.address)===op}function Sl(e){return`${rb}${e.toLowerCase()}`}function Lo(e){if(typeof window>"u")return[];try{let t=window.localStorage.getItem(Sl(e));if(!t)return[];let r=JSON.parse(t);return Array.isArray(r)?r.filter(n=>n!==null&&typeof n=="object"&&sn(n.address)&&typeof n.updatedAt=="number").slice(0,ap):[]}catch{return[]}}function Nl(e,t){if(typeof window>"u")return[];let r=ia(t),n=[{address:r,updatedAt:Date.now()},...Lo(e).filter(o=>o.address!==r)].slice(0,ap);try{window.localStorage.setItem(Sl(e),JSON.stringify(n))}catch{return Lo(e)}return n}function Tl(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(Sl(e))}catch{}}function Rn(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 Do(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=nb(a.toString().padStart(t,"0"));return`${o.toString()}.${i}`}function Il(e,t){let r=e.replace(/^0x/,"").toLowerCase().padStart(64,"0"),n=t.toString(16).padStart(64,"0");return`${eb}${r}${n}`}function ln(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 ln(e,t,6)}function ip(e){return ln(e,9,2)}function sp(e){return e.toLocaleString("en-US")}function Ci(e){return e===56||e===97}function Si(e){return e.gasPrice??e.maxFeePerGas}function lp(e,t=!1){return t?Si(e)!==void 0?"legacy":null:e.maxFeePerGas!==void 0?"dynamic":e.gasPrice!==void 0?"legacy":null}function Ni(e,t=!1){if(t){let r=Si(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 Ti(e){return!Number.isFinite(e)||e<=0?"$0.00":`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function dp(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(dp(r.cause,t+1)),n.join(`
|
|
6
|
-
`).toLowerCase()}function ob(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 Al(e,t={},r="Failed to send transaction."){let n=dp(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.":ob(e)||r}var ab=2000000000n,ib=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 Ei(e){return BigInt(e)}function sb(e){return`0x${e.toString(16)}`}function lb(e){let t={to:e.to};return e.from&&(t.from=e.from),e.value!==void 0&&e.value>0n&&(t.value=sb(e.value)),e.data&&(t.data=e.data),t}function db(e){return e===56||e===97}async function cp(e){try{let t=await Ii(e,"eth_gasPrice",[]);return{gasPrice:Ei(t)}}catch{return{gasPrice:ab}}}async function cb(e,t){let r=ib;try{let n=await Ii(e,"eth_maxPriorityFeePerGas",[]);r=Ei(n)}catch{}return{maxFeePerGas:t+r,maxPriorityFeePerGas:r}}async function pb(e,t){if(t)return cp(e);let r;try{r=(await Ii(e,"eth_getBlockByNumber",["latest",!1]))?.baseFeePerGas}catch{}return r?cb(e,Ei(r)):cp(e)}async function pp(e,t){let r=db(t.chainId),n=lb(t),[o,a]=await Promise.all([Ii(e,"eth_estimateGas",[n]),pb(e,r)]);return{gasLimit:Ei(o),gasPrice:a.gasPrice,maxFeePerGas:a.maxFeePerGas,maxPriorityFeePerGas:a.maxPriorityFeePerGas}}function up(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 pp(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 ub=1500,fb=120;function fp(e){return!!(e.token||e.recipient||e.amount)}function Ml({recipient:e,amount:t,token:r,balanceRaw:n}){let o={},a=e.trim(),i=Rn(t,r.quantity.decimals),s;return a?sn(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.")),!zn(r)&&!sn(r.address)&&(o.token="Token contract address is invalid."),{errors:o,rawAmount:o.amount?void 0:s,recipient:a&&sn(a)?a:void 0}}function Ll({token:e,walletAddress:t,recipient:r,rawAmount:n}){let o=t;return zn(e)?{to:r,value:n,chainId:e.chainId,from:o}:{to:ia(e.address),data:Il(r,n),value:0n,chainId:e.chainId,from:o}}function mb(e){let{status:t}=e;return t==="reverted"||t==="0x0"||t===0||t===0n||t===!1}var gb=e=>new Promise(t=>setTimeout(t,e));async function mp({repository:e,args:t,chainId:r,onSubmitted:n,pollIntervalMs:o=ub,pollMaxAttempts:a=fb}){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 mb(d)?"reverted":"success";await gb(o)}return"timeout"}var gp=["token","recipient","amount","review"];function hp(e){let{env:t,walletAddress:r,accountName:n,accounts:o=[],initialStep:a="recipient",token:i,tokens:s=[],onTokenChange:l,sendTransaction:d,getTransactionReceipt:p,estimateGas:b,getTokenPriceUsd:g,onSubmitted:h,onSuccess:x,onFailed:y,onExit:u,onOutlink:c}=e,w=fe.useMemo(()=>up({sendTransaction:d,getTransactionReceipt:p,estimateGas:b}),[d,p,b]),[m,v]=fe.useState(i);fe.useEffect(()=>{v(i)},[i.address,i.chainId]);let[R,C]=fe.useState(a),[T,S]=fe.useState(""),[N,I]=fe.useState(""),[M,O]=fe.useState({}),[D,W]=fe.useState("idle"),[A,G]=fe.useState(""),[J,ee]=fe.useState(""),[re,L]=fe.useState(null),[te,ae]=fe.useState(!1),[F,ne]=fe.useState(""),$=fe.useRef(0),[ye,ve]=fe.useState(null),[Be,he]=fe.useState(""),[Re,Ce]=fe.useState(()=>Lo(r)),rt=fe.useRef(new Set),Ae=fe.useCallback((Q,be)=>{rt.current.has(Q)||(rt.current.add(Q),$e("send",Q,be))},[]);fe.useEffect(()=>{Ae("opened"),a!=="token"&&Ae("token_selected",{tags:{item_id:i.symbol}})},[Ae,a,i.symbol]);let Qe=fe.useMemo(()=>it(t),[t]),{transactionUrl:ut,chainInfo:Fe}=aa(Qe,m.chainId,A||void 0,!0),Ye=So(m.chainId,Qe),We=Ye.nativeSymbol??Fe?.currency_symbol??"",Lt=Ye.name??Fe?.name??`Chain ID ${m.chainId}`,Xt=fe.useRef({nativeSymbol:We||void 0,networkName:Lt,tokenSymbol:m.symbol});Xt.current={nativeSymbol:We||void 0,networkName:Lt,tokenSymbol:m.symbol};let ft=fe.useMemo(()=>BigInt(m.quantity.numeric||"0"),[m.quantity.numeric]),Dt=fe.useMemo(()=>kn(m.quantity.numeric,m.quantity.decimals),[m.quantity.numeric,m.quantity.decimals]),bt=g?.(m),kt=fe.useMemo(()=>{if(bt===void 0)return;let Q=parseFloat(N.replace(/,/g,""));return Number.isFinite(Q)?Q*bt:0},[N,bt]);fe.useEffect(()=>{I(""),O({})},[m.address,m.chainId]),fe.useEffect(()=>{$.current+=1,L(null),ne(""),ae(!1)},[m.address,m.chainId,T,N]),fe.useEffect(()=>{Ce(Lo(r))},[r]);let It=fe.useCallback(Q=>{S(Q),O(be=>({...be,recipient:void 0}))},[]),Rt=fe.useCallback(Q=>{I(Q),O(be=>({...be,amount:void 0}))},[]),Et=fe.useCallback(()=>{I(Dt.replace(/,/g,"")),O(Q=>({...Q,amount:void 0}))},[Dt]),nt=fe.useCallback(Q=>{v(Q),l?.(Q),Ae("token_selected",{tags:{item_id:Q.symbol}}),C("recipient")},[l,Ae]),ir=fe.useCallback(()=>C("token"),[]),zt=fe.useCallback(()=>{C(Q=>{if(Q==="result")return"review";if(Q===a)return u?.(),Q;let be=gp.indexOf(Q);return be<=0?(u?.(),Q):gp[be-1]})},[a,u]),sr=fe.useCallback(()=>{let{errors:Q}=Ml({recipient:T,amount:"1",token:m,balanceRaw:ft});if(Q.recipient){O(be=>({...be,recipient:Q.recipient}));return}O(be=>({...be,recipient:void 0})),Ae("recipient_entered"),C("amount")},[T,m,ft,Ae]),Ke=fe.useCallback(Q=>{S(Q),O(be=>({...be,recipient:void 0})),Ae("recipient_entered"),C("amount")},[Ae]),wt=fe.useCallback(()=>{let Q=Ml({recipient:T,amount:N,token:m,balanceRaw:ft});O(Q.errors),!(fp(Q.errors)||Q.rawAmount===void 0||!Q.recipient)&&(ve(Q.rawAmount),he(Q.recipient),L(null),ne(""),W("idle"),Ae("amount_entered"),C("review"))},[T,N,m,ft,Ae]);fe.useEffect(()=>{if(R!=="review"||!Be||ye===null||re!==null||te||F||!w.canEstimateGas(Fe?.rpc))return;let Q=++$.current;ae(!0),ne(""),(async()=>{try{let be=Ll({token:m,walletAddress:r,recipient:Be,rawAmount:ye}),Te=await w.estimateGas(be,Fe?.rpc);if($.current!==Q)return;L(Te)}catch(be){if($.current!==Q)return;ne(Al(be,Xt.current,"Failed to estimate gas."))}finally{$.current===Q&&ae(!1)}})()},[R,Be,ye,re,te,F,w,Fe?.rpc,m,r]);let Ze=fe.useMemo(()=>{if(!zn(m)||!re||ye===null)return!1;let Q=Ni(re,Ci(m.chainId));return Q===null?!1:ye+Q>ft},[m,re,ye,ft]),ot=fe.useCallback(async()=>{if(!(!Be||ye===null)&&!Ze){ee(""),G(""),W("submitting"),Ae("submitted");try{let Q="",be=await mp({repository:w,args:Ll({token:m,walletAddress:r,recipient:Be,rawAmount:ye}),chainId:m.chainId,onSubmitted:Te=>{Q=Te,G(Te),W("confirming"),Ce(Nl(r,Be)),h?.({txHash:Te,chainId:m.chainId,amount:N,tokenSymbol:m.symbol,recipient:Be})}});if(be==="success")W("success"),Ae("confirmed"),Q&&x?x?.(Q):C("result");else if(be==="reverted"){let Te="Transaction reverted on-chain.";W("error"),ee(Te),Ae("confirmed",{status:"failure",reason:Rr(new Error(Te))}),Q&&y?y({txHash:Q,chainId:m.chainId,message:Te}):C("result")}else{let Te="Transaction receipt was not found. Please check again later.";W("error"),ee(Te),Ae("confirmed",{status:"failure",reason:"timeout"}),Q&&y?y({txHash:Q,chainId:m.chainId,message:Te}):C("result")}}catch(Q){W("error"),Ae("confirmed",{status:"failure",reason:Rr(Q)}),ee(Al(Q,{nativeSymbol:We||void 0,networkName:Lt,tokenSymbol:m.symbol})),C("result")}}},[w,Be,ye,Ze,m,N,r,h,x,y,We,Lt,Ae]),[lt,Ge]=fe.useState(!1),Ct=fe.useRef(void 0);fe.useEffect(()=>()=>clearTimeout(Ct.current),[]);let lr=fe.useCallback(async()=>{if(A)try{await navigator.clipboard.writeText(A),Ge(!0),clearTimeout(Ct.current),Ct.current=setTimeout(()=>Ge(!1),2e3)}catch{}},[A]),tr=fe.useCallback(()=>{if(!ut||!A)return;let Q=Se=>{typeof window<"u"&&window.open(Se,"_blank","noopener,noreferrer")};if(!c){Q(ut);return}let be=c(ut,{category:"send",origin:"send-transaction",payload:{chainId:m.chainId,txHash:A}});if(be&&typeof be.then=="function"){let Se=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null;be.then(Xe=>{if(Xe===null){Se?.close();return}let Jt=Xe??ut;if(Se)try{Se.location.href=Jt}catch{Se.close(),Q(Jt)}else Q(Jt)});return}let Te=be;Te!==null&&Q(Te??ut)},[c,m.chainId,ut,A]),St=fe.useCallback(()=>{ee(""),G(""),W("idle"),L(null),ne(""),rt.current.delete("submitted"),rt.current.delete("confirmed"),C("review")},[]);return{step:R,status:D,token:m,tokens:s.length>0?s:[m],recipient:T,amount:N,amountUsd:kt,fieldErrors:M,error:J,txHash:A,gasEstimate:re,gasLoading:te,gasError:F,insufficientGas:Ze,reviewRawAmount:ye,reviewRecipient:Be,recentAddresses:Re,accounts:o,accountName:n,walletAddress:r,resolvedEnv:Qe,transactionUrl:ut,networkName:Lt,nativeSymbol:We,nativeDecimals:Fe?.currency_decimals??m.quantity.decimals,balanceRaw:ft,balanceText:Dt,priceUsd:bt,canSelectToken:(s.length>0?s:[m]).length>1,canSend:w.canSend,getTokenPriceUsd:g,setRecipient:It,setAmount:Rt,setMax:Et,selectToken:nt,goToTokenSelect:ir,selectRecipient:Ke,submitRecipient:sr,submitAmount:wt,confirmSend:ot,retry:St,back:zt,hashCopied:lt,copyHash:lr,openTransaction:tr}}var Yr=V(require("react"),1);var dn=require("react/jsx-runtime");function bp({flow:e}){let{amount:t,setAmount:r,amountUsd:n,balanceText:o,balanceRaw:a,token:i,setMax:s}=e,l=Yr.useRef(null),d=Yr.useCallback(()=>{requestAnimationFrame(()=>{let y=l.current;if(!y)return;let u=y.value.length;y.setSelectionRange(u,u)})},[]);Yr.useEffect(()=>{l.current?.focus(),d()},[d]),Yr.useEffect(()=>{t===""&&(g(!1),d())},[t,d]);let p=Yr.useMemo(()=>{let y=Rn(t,i.quantity.decimals);return"value"in y&&y.value>a},[t,i.quantity.decimals,a]),[b,g]=Yr.useState(!1),h=!b&&t===""?"0.00":t,x=t.trim()===""||t.trim()==="0";return(0,dn.jsx)("div",{className:"sf-body sf-amount",children:(0,dn.jsxs)("div",{className:"sf-amount-center",children:[(0,dn.jsx)("span",{className:"sf-amount-usd",children:n!==void 0?Ti(n):"\xA0"}),(0,dn.jsx)("div",{className:"sf-amount-input-wrap","data-over":p||void 0,"data-empty":x||void 0,onClick:()=>l.current?.focus(),children:(0,dn.jsx)("input",{ref:l,className:"sf-amount-input",value:h,onChange:y=>{let u=y.target.value;if(b)r(u);else if(t===""){if(u.length<4)return;g(!0);let c=u.startsWith("0.00")?u.slice(4):u;r(c)}else g(!0),r(u)},placeholder:"0.00",inputMode:"decimal",autoComplete:"off","aria-label":`Amount in ${i.symbol}`,size:1})}),(0,dn.jsxs)("div",{className:"sf-amount-balance",children:[(0,dn.jsx)("span",{children:"Balance:"}),(0,dn.jsxs)("button",{type:"button",className:"sf-amount-max",onClick:s,"data-track":"amount_max",children:[o," ",i.symbol]})]})]})})}var Kr=V(require("react"),1);var bb=new Set(["0xff42c13d927a6b9265236619161accb227b6d452","0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb"].map(e=>e.toLowerCase()));function Dl(e){return bb.has(e.toLowerCase())}var wb="0x0000000000000000000000000000000000000001",yb={dev:"0x26ca2a92ea9659e073621bb85b9117dc5944cff1",stage:"0x26ca2a92ea9659e073621bb85b9117dc5944cff1",production:"0x6bf62ca91e397b5a7d1d6bce97d9092065d7a510"},xb={dev:"0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb",stage:"0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb",production:"0xff42c13d927a6b9265236619161accb227b6d452"};function Ai(e){let t=Ut[e];return[{chainId:t.cross,address:wb},{chainId:t.bsc,address:yb[e]},{chainId:t.cross,address:xb[e]}].map(({chainId:r,address:n})=>({chainId:r,address:n.toLowerCase()}))}var wp={cross:"https://contents.crosstoken.io/wallet/token/images/CROSS.svg",bsc:"https://contents.crosstoken.io/wallet/token/images/BSC.svg"};function sa(e,t){let r=Ut[e];if(t===r.cross)return wp.cross;if(t===r.bsc)return wp.bsc}var vb={dev:"https://dev-portrait.crosstoken.io",stage:"https://dev-portrait.crosstoken.io",production:"https://portrait.crosstoken.io"};function Cn(e,t,r={}){if(!t||!t.startsWith("0x"))return;let{size:n=120,bg:o,format:a="png"}=r,i=vb[e],s=o?`&bg=${o}`:"";return`${i}/portrait/evm/${t}.${a}?size=${n}${s}`}var nr=require("react/jsx-runtime");function yp({size:e=20,className:t}){return(0,nr.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[(0,nr.jsx)("circle",{cx:"9",cy:"9",r:"6",stroke:"currentColor",strokeWidth:"1.7"}),(0,nr.jsx)("path",{d:"m17 17-3.2-3.2",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function xp({size:e=20,className:t}){return(0,nr.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":"true",children:(0,nr.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 vp({size:e=20,className:t}){return(0,nr.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[(0,nr.jsx)("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor",opacity:"0.12"}),(0,nr.jsx)("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function kp({size:e=16,className:t}){return(0,nr.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",className:t,"aria-hidden":"true",children:(0,nr.jsx)("path",{d:"M8 3v10m0 0 4-4m-4 4-4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function Rp({size:e=56,className:t}){return(0,nr.jsxs)("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[(0,nr.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-green-default, #00b4b7)"}),(0,nr.jsx)("path",{d:"M17 28.5 24.2 35.5 39 20.5",stroke:"var(--ds-system-green-on, #ffffff)",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Cp({size:e=56,className:t}){return(0,nr.jsxs)("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[(0,nr.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-red-default, #da0b2e)"}),(0,nr.jsx)("path",{d:"M20 20 36 36m0-16L20 36",stroke:"#ffffff",strokeWidth:"4",strokeLinecap:"round"})]})}var et=require("react/jsx-runtime");function Sp(e,t){return e.name||`Account ${(e.index??t)+1}`}function Np(e){return e.trim().slice(0,1).toUpperCase()||"A"}function Tp(e){return e.toLowerCase()}function Ip({flow:e}){let{recipient:t,setRecipient:r,fieldErrors:n,recentAddresses:o,accounts:a,walletAddress:i,resolvedEnv:s,selectRecipient:l}=e,d=Kr.useMemo(()=>a.filter(m=>m.address.toLowerCase()!==i.toLowerCase()),[a,i]),p=d.length>0,b=Kr.useMemo(()=>new Map(d.map((m,v)=>[Tp(m.address),{account:m,index:v}])),[d]),[g,h]=Kr.useState("recent"),x=Kr.useRef(null);Kr.useEffect(()=>{x.current?.focus()},[]);let y="1A1A2E",u=Kr.useCallback(async()=>{try{let m=await navigator.clipboard.readText();m&&r(m.trim())}catch{}},[r]),c=t.trim().length>0,w=sn(t.trim());return(0,et.jsxs)("div",{className:"sf-recipient",children:[(0,et.jsxs)("div",{className:"sf-recipient-top",children:[(0,et.jsxs)("div",{className:"sf-address-field","data-filled":c||void 0,"data-invalid":n.recipient||void 0,children:[(0,et.jsx)("textarea",{ref:x,className:"sf-address-input",value:t,onChange:m=>r(m.target.value),placeholder:"Enter the recipient's address",autoComplete:"off",spellCheck:!1,"aria-label":"Recipient address",rows:c?2:1}),c?(0,et.jsx)("button",{type:"button",className:"sf-address-action",onClick:()=>r(""),"aria-label":"Clear","data-track":"recipient_clear",children:(0,et.jsx)(vp,{size:20})}):(0,et.jsx)("button",{type:"button",className:"sf-address-action",onClick:u,"aria-label":"Paste from clipboard","data-track":"recipient_paste",children:(0,et.jsx)(xp,{size:20})})]}),n.recipient&&(0,et.jsx)("p",{className:"sf-field-error",role:"alert",children:n.recipient}),(0,et.jsxs)("div",{className:"sf-tabs",role:"tablist",children:[(0,et.jsx)("button",{type:"button",role:"tab",className:"sf-tab","data-active":g==="recent"||void 0,"aria-selected":g==="recent",onClick:()=>h("recent"),"data-track":"recipient_tab","data-track-id":"recent",children:"Recent"}),p&&(0,et.jsx)("button",{type:"button",role:"tab",className:"sf-tab","data-active":g==="account"||void 0,"aria-selected":g==="account",onClick:()=>h("account"),"data-track":"recipient_tab","data-track-id":"account",children:"My Account"})]})]}),(0,et.jsx)("div",{className:"sf-address-list",children:g==="account"&&p?d.map((m,v)=>{let R=Sp(m,v),C=Cn(s,m.address,{size:56,bg:y});return(0,et.jsxs)("button",{type:"button",className:"sf-address-row",onClick:()=>l(m.address),"data-track":"recipient_item",children:[(0,et.jsxs)("span",{className:"sf-address-avatar",children:[C&&(0,et.jsx)("img",{src:C,alt:"",width:40,height:40,draggable:!1,onError:T=>{T.currentTarget.style.display="none"}}),(0,et.jsx)("span",{className:"sf-address-avatar-fallback",children:Np(R)})]}),(0,et.jsxs)("span",{className:"sf-address-meta",children:[(0,et.jsx)("span",{className:"sf-address-name",children:R}),(0,et.jsx)("span",{className:"sf-address-value",children:wr(m.address)})]})]},m.address)}):o.length>0?o.map(m=>{let v=b.get(Tp(m.address)),R=v?Sp(v.account,v.index):wr(m.address),C=Cn(s,m.address,{size:56,bg:y});return(0,et.jsxs)("button",{type:"button",className:"sf-address-row",onClick:()=>l(m.address),"data-track":"recipient_item",children:[(0,et.jsxs)("span",{className:"sf-address-avatar",children:[C&&(0,et.jsx)("img",{src:C,alt:"",width:40,height:40,draggable:!1,onError:T=>{T.currentTarget.style.display="none"}}),(0,et.jsx)("span",{className:"sf-address-avatar-fallback",children:Np(R)})]}),(0,et.jsxs)("span",{className:"sf-address-meta",children:[(0,et.jsx)("span",{className:"sf-address-name",children:R}),(0,et.jsx)("span",{className:"sf-address-value",children:wr(m.address)})]})]},m.address)}):(0,et.jsx)("div",{className:"sf-empty",children:"No send history"})}),c&&!w&&!n.recipient&&(0,et.jsx)("p",{className:"sf-field-error",role:"alert",children:"Enter a valid EVM recipient address."})]})}var At=require("react/jsx-runtime");function Ap({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,At.jsxs)("div",{className:"sf-body sf-result sf-result--error",children:[(0,At.jsx)("span",{className:"sf-result-icon",children:(0,At.jsx)(Cp,{size:56})}),(0,At.jsxs)("div",{className:"sf-result-copy",children:[(0,At.jsx)("h3",{className:"sf-result-title",children:"Transaction Failed"}),(0,At.jsx)("p",{className:"sf-result-desc",children:n||"Something went wrong. Please try again."})]}),r&&(0,At.jsx)(Ep,{txHash:r,hashCopied:a,onCopy:o,onOpen:i})]}):(0,At.jsxs)("div",{className:"sf-body sf-result",children:[(0,At.jsx)("span",{className:"sf-result-icon","data-pending":!l||void 0,children:l?(0,At.jsx)(Rp,{size:56}):(0,At.jsx)("span",{className:"sf-result-spinner"})}),(0,At.jsxs)("div",{className:"sf-result-copy",children:[(0,At.jsx)("h3",{className:"sf-result-title",children:l?"Transaction Complete":"Transaction in Progress"}),(0,At.jsx)("p",{className:"sf-result-desc",children:l?"Your transfer was sent successfully.":"Transfer in progress. Waiting for confirmation."})]}),r&&(0,At.jsx)(Ep,{txHash:r,hashCopied:a,onCopy:o,onOpen:i})]})}function Ep({txHash:e,hashCopied:t,onCopy:r,onOpen:n}){return(0,At.jsxs)("div",{className:"sf-result-hash-card",children:[(0,At.jsx)("span",{className:"sf-result-hash-label",children:"Transaction Hash"}),(0,At.jsxs)("div",{className:"sf-result-hash-row",children:[(0,At.jsx)("button",{type:"button",className:"sf-result-hash-link",onClick:n,"aria-label":"Open transaction in explorer","data-track":"tx_link_open",children:wr(e)}),(0,At.jsx)("button",{type:"button",className:"sf-result-copy-btn",onClick:r,"aria-label":"Copy transaction hash","data-track":"tx_hash_copy",children:t?(0,At.jsx)(vn,{size:16}):"Copy"})]})]})}var Oe=require("react/jsx-runtime"),Mi="\u2014";function Mp({flow:e}){let{token:t,reviewRawAmount:r,reviewRecipient:n,accountName:o,accounts:a,walletAddress:i,networkName:s,nativeSymbol:l,nativeDecimals:d,gasEstimate:p,gasLoading:b,gasError:g,insufficientGas:h,error:x,resolvedEnv:y}=e,u=zn(t),c=r!==null?ln(r,t.quantity.decimals):"",w=o?.trim()||`Account ${(a[0]?.index??0)+1}`,m=Cn(y,i,{size:56,bg:"1A1A2E"}),v=l||(u?t.symbol:""),R=Ci(t.chainId),C=p?lp(p,R):null,T=p?Ni(p,R):null,S=D=>D!==null&&v?`${El(D,d)} ${v}`:Mi,N=D=>D!==void 0?`${ip(D)} Gwei`:Mi,I=(()=>{if(!u||!p||T===null||r===null)return Mi;let D=r+T;return`${El(D,d)} ${v||t.symbol}`})(),M=D=>b?"\u2026":D,O=[{label:"Est. Tx Fee",value:M(S(T))},...C==="dynamic"?[{label:"Max Priority Fee",value:M(N(p?.maxPriorityFeePerGas))},{label:"Max Gas Fee",value:M(N(p?.maxFeePerGas))}]:C==="legacy"?[{label:"Gas Price",value:M(N(p?Si(p):void 0))}]:[],{label:"Gas Limit",value:M(p?sp(p.gasLimit):Mi)}];return(0,Oe.jsxs)("div",{className:"sf-body sf-review",children:[(0,Oe.jsxs)("div",{className:"sf-review-amount",children:[(0,Oe.jsx)("img",{className:"sf-review-amount-icon",src:t.icon_url,alt:"",width:40,height:40,draggable:!1,onError:D=>{D.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),(0,Oe.jsxs)("span",{className:"sf-review-amount-value",children:[c,(0,Oe.jsx)("span",{className:"sf-review-amount-symbol",children:t.symbol})]})]}),(0,Oe.jsxs)("div",{className:"sf-review-parties",children:[(0,Oe.jsxs)("div",{className:"sf-review-card sf-review-party",children:[(0,Oe.jsx)("span",{className:"sf-review-party-label",children:"From"}),(0,Oe.jsxs)("div",{className:"sf-review-party-head",children:[(0,Oe.jsx)("span",{className:"sf-review-party-avatar",children:m&&(0,Oe.jsx)("img",{src:m,alt:"",width:28,height:28,draggable:!1,onError:D=>{D.currentTarget.style.display="none"}})}),(0,Oe.jsx)("span",{className:"sf-review-party-name",children:w})]}),(0,Oe.jsx)("span",{className:"sf-review-party-addr",children:i})]}),(0,Oe.jsx)("span",{className:"sf-review-arrow","aria-hidden":!0,children:(0,Oe.jsx)(kp,{size:16})}),(0,Oe.jsxs)("div",{className:"sf-review-card sf-review-party",children:[(0,Oe.jsx)("span",{className:"sf-review-party-label",children:"To"}),(0,Oe.jsx)("span",{className:"sf-review-party-addr",children:n})]})]}),(0,Oe.jsxs)("section",{className:"sf-review-card",children:[(0,Oe.jsx)("h3",{className:"sf-review-section-title",children:"Summary"}),(0,Oe.jsxs)("div",{className:"sf-review-row",children:[(0,Oe.jsx)("span",{className:"sf-review-row-label",children:"Network"}),(0,Oe.jsx)("span",{className:"sf-review-row-value",children:s})]}),O.map(D=>(0,Oe.jsxs)("div",{className:"sf-review-row",children:[(0,Oe.jsx)("span",{className:"sf-review-row-label",children:D.label}),(0,Oe.jsx)("span",{className:"sf-review-row-value",children:D.value})]},D.label))]}),(0,Oe.jsxs)("section",{className:"sf-review-card",children:[(0,Oe.jsx)("h3",{className:"sf-review-section-title",children:"Total"}),(0,Oe.jsxs)("div",{className:"sf-review-row",children:[(0,Oe.jsx)("span",{className:"sf-review-row-label",children:"Total Amount"}),(0,Oe.jsxs)("span",{className:"sf-review-row-value",children:[c," ",t.symbol]})]}),u&&(0,Oe.jsxs)("div",{className:"sf-review-row",children:[(0,Oe.jsx)("span",{className:"sf-review-row-label",children:"Max. Total Amount"}),(0,Oe.jsx)("span",{className:"sf-review-row-value",children:M(I)})]})]}),h&&!g&&!x&&(0,Oe.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."]}),(g||x)&&(0,Oe.jsx)("div",{className:"sf-message sf-message--error",role:"alert",children:g||x})]})}var Li=V(require("react"),1);var cr=require("react/jsx-runtime");function Lp({flow:e}){let[t,r]=Li.useState(""),n=t.trim().toLowerCase(),o=Li.useMemo(()=>n?e.tokens.filter(a=>a.symbol.toLowerCase().includes(n)||a.name.toLowerCase().includes(n)):e.tokens,[e.tokens,n]);return(0,cr.jsxs)("div",{className:"sf-body sf-token-select",children:[(0,cr.jsxs)("div",{className:"sf-search",children:[(0,cr.jsx)(yp,{size:20}),(0,cr.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,cr.jsxs)("div",{className:"sf-token-list",children:[o.map(a=>{let i=`${a.chainId}:${a.address.toLowerCase()}`,s=sa(e.resolvedEnv,a.chainId),l=e.getTokenPriceUsd?.(a);return(0,cr.jsxs)("button",{type:"button",className:"sf-token-row",onClick:()=>e.selectToken(a),"data-track":"token_item","data-track-id":a.symbol,children:[(0,cr.jsxs)("span",{className:"sf-token-left",children:[(0,cr.jsxs)("span",{className:"sf-token-icon-wrap",children:[(0,cr.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,cr.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,cr.jsx)("span",{className:"sf-token-name",children:a.symbol})]}),(0,cr.jsxs)("span",{className:"sf-token-right",children:[(0,cr.jsx)("span",{className:"sf-token-balance",children:kn(a.quantity.numeric,a.quantity.decimals)}),l!==void 0&&(0,cr.jsx)("span",{className:"sf-token-price",children:Ti(l)})]})]},i)}),o.length===0&&(0,cr.jsx)("div",{className:"sf-empty",children:"No tokens found"})]})]})}we(`.sf-root{display:flex;flex-direction:column;flex:1;min-height:0;font-family:inherit}.sf-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:24px;flex-shrink:0;position:relative;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.sf-header .sf-header-btn:last-child{position:absolute;top:24px;right:24px}.sf-header-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;filter:none;transition:color .15s ease}.sf-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85));filter:none}.sf-header-title{position:absolute;left:50%;transform:translate(-50%);text-align:center;font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);pointer-events:none}.sf-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent;overscroll-behavior:contain}[data-theme=light] .sf-body{scrollbar-color:rgba(0,0,0,.12) transparent}.sf-body::-webkit-scrollbar{width:4px;height:4px}.sf-body::-webkit-scrollbar-track,.sf-body::-webkit-scrollbar-corner{background:transparent}.sf-body::-webkit-scrollbar-thumb{border-radius:4px;background:#ffffff26}.sf-body::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .sf-body::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .sf-body::-webkit-scrollbar-thumb:hover{background:#0003}.sf-empty{padding:32px 0;text-align:center;font-family:inherit;font-size:14px;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-field-error{margin:8px 24px 0;font-family:inherit;font-size:12px;line-height:1.5;color:var(--ds-system-red-default, #da0b2e)}.sf-message--error{margin:16px 0 0;padding:12px 16px;background:var(--ds-system-red-low, #ffeeee);color:var(--ds-system-red-high, #d20609);font-family:inherit;font-size:13px;line-height:1.5;border-radius:12px;width:100%;box-sizing:border-box}.sf-footer{display:flex;flex-shrink:0;padding:16px 24px 24px}.sf-footer:empty{display:none}.sf-footer-row{display:flex;gap:8px;width:100%}.sf-footer-row .sf-btn,.sf-footer-row .sf-btn--secondary{flex:1 1 0;min-width:0}.sf-footer>.sf-btn{width:100%}.sf-btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:1;height:48px;padding:0 24px;border:none;border-radius:12px;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;transition:background-color .15s ease,transform .1s ease}.sf-btn--primary{background:var(--ds-accent-gradient, linear-gradient(196deg, #ff2589 16%, #ff823d 84%));color:#fff}.sf-btn--primary:hover:not(:disabled):not([data-disabled]){filter:brightness(1.05)}.sf-btn--primary:active:not(:disabled):not([data-disabled]){transform:scale(.97)}.sf-btn--primary[data-disabled],.sf-btn--primary:disabled{background:var(--ds-accent-gradient, linear-gradient(196deg, #ff2589 16%, #ff823d 84%));color:#fff;cursor:default;opacity:.5}.sf-btn--secondary{flex:0 0 120px;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-token-select{padding:0;display:flex;flex-direction:column}.sf-token-select .sf-search{margin:16px 24px}.sf-token-select .sf-token-list{width:100%;margin-top:0}.sf-search{display:flex;align-items:center;gap:8px;padding:12px 16px;border-radius:12px;border:1.5px solid transparent;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-low, rgba(0, 0, 0, .4));box-sizing:border-box;transition:border-color .15s ease}.sf-search:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.sf-search:focus-within{border-color:var(--ds-accent-primary-high, #f0640d)}.sf-search-input{flex:1;min-width:0;border:none;background:transparent;outline:none;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-search-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-token-list{display:flex;flex-direction:column;margin-top:8px}.sf-token-row{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 24px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;border-radius:0;box-sizing:border-box;transition:background-color .15s ease}.sf-token-row:hover{background:var(--ds-surface-medium, rgba(0, 0, 0, .04))}.sf-token-left{display:flex;align-items:center;gap:16px;min-width:0}.sf-token-icon-wrap{position:relative;width:40px;height:40px;flex-shrink:0}.sf-token-icon{width:40px;height:40px;border-radius:0;object-fit:contain}.sf-token-chain-badge{position:absolute;right:-2px;bottom:-2px;width:16px;height:16px;border-radius:50%;object-fit:cover}.sf-token-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.sf-token-right{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0}.sf-token-balance{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);white-space:nowrap}.sf-token-price{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.sf-recipient{display:flex;flex-direction:column;flex:1;min-height:0}.sf-recipient-top{display:flex;flex-direction:column;flex-shrink:0;padding:16px 24px 0}.sf-address-field{display:flex;align-items:center;gap:8px;padding:12px;border-radius:12px;border:1.5px solid transparent;background:var(--ds-surface-medium, #f5f7fa);transition:border-color .15s ease;box-sizing:border-box}.sf-address-field:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.sf-address-field:focus-within{border-color:var(--ds-accent-primary-high, #f0640d)}.sf-address-field[data-filled]{border-color:var(--ds-accent-primary-high, #f0640d)}.sf-address-field[data-invalid]{border-color:var(--ds-system-red-default, #da0b2e)}.sf-address-input{flex:1;min-width:0;border:none;background:transparent;outline:none;resize:none;overflow:hidden;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));word-break:break-word;overflow-wrap:anywhere}.sf-address-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-address-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:none;background:transparent;border-radius:6px;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease}.sf-address-action:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-address-field[data-filled] .sf-address-action{border-radius:9999px}.sf-tabs{display:flex;gap:0;margin:16px 0 0}.sf-tab{position:relative;padding:8px 12px;border:none;background:transparent;cursor:pointer;font-family:inherit;font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-tab[data-active]{color:var(--ds-accent-primary-high, #f0640d)}.sf-tab[data-active]:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;border-radius:9999px;background:var(--ds-accent-primary-high, #f0640d)}.sf-address-list{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;margin-top:8px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .sf-address-list{scrollbar-color:rgba(0,0,0,.12) transparent}.sf-address-list::-webkit-scrollbar{width:4px}.sf-address-list::-webkit-scrollbar-track{background:transparent}.sf-address-list::-webkit-scrollbar-thumb{border-radius:4px;background:#ffffff26}[data-theme=light] .sf-address-list::-webkit-scrollbar-thumb{background:#0000001f}.sf-address-row{display:flex;align-items:center;gap:16px;width:100%;padding:12px 24px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;border-radius:0;box-sizing:border-box;transition:background-color .15s ease}.sf-address-row:hover{background:var(--ds-surface-medium, rgba(0, 0, 0, .04))}.sf-address-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:50%;overflow:hidden;background:var(--ds-surface-high, #edf1f2);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-size:14px;font-weight:600}.sf-address-avatar img{position:absolute;inset:0;z-index:1;width:100%;height:100%;object-fit:cover}.sf-address-avatar-fallback{position:relative;z-index:0}.sf-address-meta{display:flex;flex-direction:column;min-width:0}.sf-address-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sf-address-value{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-drawer-content .sf-header{padding:16px}.wi-drawer-content .sf-header .sf-header-btn:last-child{top:16px;right:16px}.wi-drawer-content .sf-token-select{padding:0}.wi-drawer-content .sf-token-select .sf-search{margin:16px}.wi-drawer-content .sf-token-row{padding:12px 16px}.wi-drawer-content .sf-recipient-top{padding:16px 16px 0}.wi-drawer-content .sf-address-row{padding:12px 16px}.wi-drawer-content .sf-footer{padding:12px 16px 24px}.wi-drawer-content .sf-field-error,.wi-drawer-content .sf-message--error{margin:16px 0 0;width:auto}.sf-amount{display:flex;flex-direction:column}.sf-amount-center{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;padding:64px 24px 48px;text-align:center}.sf-amount-usd{font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));min-height:21px}.sf-amount-input-wrap{display:flex;justify-content:center;max-width:100%}.sf-amount-input{width:auto;max-width:100%;border:none;background:transparent;outline:none;text-align:center;font-family:inherit;font-size:40px;font-weight:700;line-height:1.25;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);field-sizing:content}.sf-amount-input-wrap[data-empty] .sf-amount-input,.sf-amount-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-amount-input-wrap[data-over] .sf-amount-input{color:var(--ds-system-red-default, #da0b2e)}.sf-amount-balance{display:inline-flex;align-items:center;gap:4px;font-family:inherit;font-size:14px;font-weight:400;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-amount-max{border:none;background:transparent;padding:0;cursor:pointer;font:inherit;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-decoration:underline;text-underline-offset:2px;transition:color .15s ease}.sf-amount-max:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-drawer-content .sf-amount-center{padding:64px 16px 48px}.sf-review{display:flex;flex-direction:column;gap:16px;padding:24px}.sf-review-amount{display:flex;align-items:center;gap:12px;padding:0;background:transparent}.sf-review-amount-icon{width:40px;height:40px;border-radius:0;object-fit:contain;flex-shrink:0}.sf-review-amount-value{display:inline-flex;flex-direction:column;align-items:flex-start;gap:0;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);word-break:break-all}.sf-review-amount-symbol{font-size:12px;font-weight:400;line-height:1.5;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-parties{position:relative;display:flex;flex-direction:column;gap:0}.sf-review-arrow{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-4px auto;border-radius:50%;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-card{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa)}.sf-review-party-label{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-party-head{display:flex;align-items:center;gap:8px}.sf-review-party-avatar{display:inline-flex;width:24px;height:24px;border-radius:50%;overflow:hidden;background:var(--ds-surface-high, #edf1f2);flex-shrink:0}.sf-review-party-avatar img{width:100%;height:100%;object-fit:cover}.sf-review-party-name{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-review-party-addr{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));word-break:break-all}.sf-review-section-title{margin:0 0 4px;font-family:inherit;font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-highest, #000000)}.sf-review-row{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.sf-review-row-label{font-family:inherit;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-row-value{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));text-align:left;word-break:break-all}.wi-drawer-content .sf-review{padding:16px}.sf-result{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;padding:48px 24px;text-align:center}.sf-result-icon{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px}.sf-result-spinner{width:56px;height:56px;border-radius:50%;border:4px solid var(--ds-border-medium, rgba(0, 0, 0, .18));border-top-color:var(--ds-accent-primary-high, #f0640d);animation:sf-spin .8s linear infinite}@keyframes sf-spin{to{transform:rotate(360deg)}}.sf-result-copy{display:flex;flex-direction:column;gap:8px}.sf-result-title{margin:0;font-family:inherit;font-size:18px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-highest, #000000)}.sf-result-desc{margin:0;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-result-hash-card{display:flex;flex-direction:column;gap:8px;width:100%;padding:16px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);text-align:left}.sf-result-hash-label{font-family:inherit;font-size:12px;font-weight:500;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-result-hash-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.sf-result-hash-link{border:none;background:transparent;padding:0;cursor:pointer;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;color:var(--ds-accent-primary-high, #f0640d)}.sf-result-copy-btn{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:28px;padding:0 10px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));border-radius:8px;background:var(--ds-surface-default, #ffffff);cursor:pointer;font-family:inherit;font-size:12px;font-weight:500;color:var(--ds-content-high, rgba(0, 0, 0, .85))}
|
|
7
|
-
`);var Nt=require("react/jsx-runtime"),kb={token:"Send",recipient:"Send",amount:"Send",review:"Sign Transaction",result:""};function la({onClose:e,onBackToWallet:t,onConfirmSuccess:r,onSuccess:n,className:o,...a}){let i=Dp.useCallback(c=>{n?.(c),r?.(c)},[r,n]),l=hp({...a,onSuccess:n||r?i:void 0,onExit:t}),{step:d,status:p}=l,b=sn(l.recipient.trim()),g=Rn(l.amount,l.token.quantity.decimals),h="value"in g&&g.value<=l.balanceRaw,x=p==="submitting"||p==="confirming",y=d!=="result",u=kb[d]??"";return(0,Nt.jsx)(Le,{feature:"send",children:(0,Nt.jsxs)("div",{className:Pe("sf-root",o),"data-step":d,children:[(0,Nt.jsxs)("header",{className:"sf-header",children:[y?(0,Nt.jsx)("button",{type:"button",className:"sf-header-btn",onClick:l.back,"aria-label":"Back","data-track":"back",children:(0,Nt.jsx)(qr,{size:24})}):(0,Nt.jsx)("span",{className:"sf-header-btn","aria-hidden":!0}),(0,Nt.jsx)("span",{className:"sf-header-title",children:u}),(0,Nt.jsx)("button",{type:"button",className:"sf-header-btn",onClick:e,"aria-label":"Close","data-track":"close",children:(0,Nt.jsx)(Nr,{size:24})})]}),d==="token"&&(0,Nt.jsx)(Lp,{flow:l}),d==="recipient"&&(0,Nt.jsx)(Ip,{flow:l}),d==="amount"&&(0,Nt.jsx)(bp,{flow:l}),d==="review"&&(0,Nt.jsx)(Mp,{flow:l}),d==="result"&&(0,Nt.jsx)(Ap,{flow:l}),(0,Nt.jsxs)("footer",{className:"sf-footer","data-step":d,children:[d==="recipient"&&(0,Nt.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,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.submitAmount,"data-disabled":!h||void 0,"aria-disabled":!h,"data-track":"amount_next",children:"Next"}),d==="review"&&(0,Nt.jsxs)("div",{className:"sf-footer-row",children:[(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--secondary",onClick:l.back,disabled:x,"data-track":"review_cancel",children:"Cancel"}),(0,Nt.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"&&p==="success"&&(0,Nt.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"&&p==="error"&&(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.retry,"data-track":"result_retry",children:"Try Again"})]})]})})}var Pp=V(require("@radix-ui/react-popover"),1),Op=require("vaul");var no=require("react/jsx-runtime");function Bp({asChild:e,className:t,children:r}){let{isMobile:n,theme:o,walletAddress:a}=On(),i=r!=null,s=e??!0,l=i?r:(0,no.jsxs)("button",{type:"button",className:Pe("wi-trigger-btn",t),"data-theme":o,"data-mobile":n||void 0,children:[(0,no.jsx)(jc,{size:n?14:16}),(0,no.jsx)("span",{className:"wi-trigger-address",children:wr(a)})]});return n?(0,no.jsx)(Op.Drawer.Trigger,{asChild:s,children:l}):(0,no.jsx)(Pp.Trigger,{asChild:s,children:l})}var oe=V(require("react"),1),bs=V(require("@radix-ui/react-popover"),1),Ta=require("vaul");var fd=V(require("bignumber.js"),1);var Di=V(require("bignumber.js"),1),Rb=/^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i;function xt(e){if(e==null)return null;if(e instanceof Di.default)return e.isFinite()?e:null;if(typeof e=="number")return Number.isFinite(e)?new Di.default(e):null;let t=String(e).replace(/[,%\s]/g,"");if(!Rb.test(t))return null;let r=new Di.default(t);return r.isFinite()?r:null}var Wp=require("@tanstack/react-query"),Gp=require("react");var Pi=V(require("react"),1);function zp(e){if(!e||typeof e!="object")return;let t=[],r=new Set,n=[],o=[];for(let[a,i]of Object.entries(e)){if(i?.balance!==!0)continue;if(!dc(a)){n.push(a);continue}let s=cc(a);if(s===void 0){o.push(a);continue}r.has(s)||(r.add(s),t.push(s))}if(t.length!==0)return{chainIds:t,skippedNonEvm:n,skippedMalformed:o}}var Fp=new Set;function Up(e,t){Fp.has(e)||(Fp.add(e),console.warn(t))}function jp(e){let t=qt(Kn,e,Pi.useCallback(n=>{let o=zp(n?.chains);if(o)return o.skippedNonEvm.length>0&&Up(`${e}:non-evm`,`[dapp-ui] chains.json (${e}): EVM \uC774 \uC544\uB2CC \uCCB4\uC778\uC740 \uC790\uC0B0 \uBAA9\uB85D\uC5D0\uC11C \uC81C\uC678\uD569\uB2C8\uB2E4 \u2014 ${o.skippedNonEvm.join(", ")}`),o.skippedMalformed.length>0&&Up(`${e}:malformed`,`[dapp-ui] chains.json (${e}): chainId \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC544 \uC81C\uC678\uD569\uB2C8\uB2E4 \u2014 ${o.skippedMalformed.join(", ")}`),o.chainIds},[e])),r=Pi.useMemo(()=>kl(e),[e]);return t??r}var Oi="user-balance";async function Cb(e,t,r,n){let o=new URLSearchParams({networkId: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 Sn(e,t,r=!0){let n=jp(e),o=(0,Wp.useQueries)({queries:n.map(l=>({queryKey:[Oi,e,t,l],queryFn:async({signal:d})=>Cb(await je("walletServer",e),l,t,d),enabled:!!t&&r,staleTime:0,refetchInterval:r?5e3:!1}))}),a=o.some(l=>l.isLoading),i=o.some(l=>l.isError);return{tokens:(0,Gp.useMemo)(()=>{let l=[];for(let d of o)d.data&&l.push(...d.data);return l},[o]),isLoading:a,isError:i}}var Bi=require("@tanstack/react-query"),Hp=require("react");var Sb="forge-holdings",Nb="forge-token-image";async function Tb(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 Ib(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 _p(e,t,r=!0){let{data:n,...o}=(0,Bi.useQuery)({queryKey:[Sb,e,t],queryFn:async({signal:a})=>Tb(await je("bondingCurve",e),t,a),enabled:!!t&&r,staleTime:0,refetchInterval:r?5e3:!1});return{holdings:n??[],...o}}function Qp(e,t,r=!0){let n=(0,Bi.useQueries)({queries:t.map(a=>({queryKey:[Nb,e,a],queryFn:async({signal:i})=>Ib(await je("bondingCurve",e),a,i),enabled:r,staleTime:1/0}))});return{imageMap:(0,Hp.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 Vp=require("@tanstack/react-query"),qp=require("react");var zi="token-stats";function cn(e,t){return`${e}:${t.toLowerCase()}`}function Nn(e,t=!0){let{data:r,...n}=(0,Vp.useQuery)({queryKey:[zi,e],queryFn:async({signal:a})=>{let i=await je("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,qp.useMemo)(()=>{let a=new Map;if(!r?.data)return a;for(let i of r.data){let s=cn(i.chain_id,i.address);a.set(s,i)}return a},[r]),...n}}var Yp=require("@tanstack/react-query"),Eb="crossd-apr",Kp=6e4,Ab="https://crossd-dashboard-api.crossdefi.io/api/v1/overview",Fi,da;function Pl(){return Fi&&Fi.expiresAt>Date.now()?Promise.resolve(Fi.value):da||(da=(async()=>{let e=await fetch(Ab,{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 Fi={value:n,expiresAt:Date.now()+Kp},n})().finally(()=>{da=void 0}),da)}function Ui(e){let t=Math.abs(e),r=(e>=0?Math.floor:Math.ceil)(t*100)/100;return`APR ${e>=0?"+":"-"}${r}%`}function Zp(){let{data:e,...t}=(0,Yp.useQuery)({queryKey:[Eb],queryFn:Pl,staleTime:Kp});return{aprPercent:e??null,...t}}var Xp=require("@tanstack/react-query"),Ol=require("react");var Mb="token-info";function ji(e,t){return`${t.toLowerCase()}_${e}`}function Jp(e,t=!0){let{data:r,...n}=(0,Xp.useQuery)({queryKey:[Mb,e],queryFn:async({signal:i})=>{let s=await je("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,Ol.useMemo)(()=>{let i=new Map;if(!r?.data)return i;for(let s of r.data){let l=ji(s.chain_id,s.address);i.set(l,s.category)}return i},[r]),a=(0,Ol.useMemo)(()=>{let i=new Map;if(!r?.data)return i;for(let s of r.data)i.set(ji(s.chain_id,s.address),s);return i},[r]);return{categoryMap:o,infoMap:a,...n}}var $p=require("react"),eu=V(require("bignumber.js"),1);function tu(e,t,r){let{tokens:n,isLoading:o}=Sn(e,t,r),{statsMap:a}=Nn(e,r);return(0,$p.useMemo)(()=>{let i=new eu.default(0);for(let p of n){let b=a.get(cn(p.chainId,p.address));if(!b)continue;let g=xt(p.quantity.numeric),h=xt(b.price);if(!g||!h)continue;let x=g.shiftedBy(-p.quantity.decimals).multipliedBy(h);x.isNaN()||(i=i.plus(x))}let s=i.toFixed(),{displayValue:l,isLowerBound:d}=Xc(s);return{totalUsd:s,displayValue:l,isLowerBound:d,isLoading:o}},[n,a,o])}var zl=V(require("bignumber.js"),1);var Lb=/^0x[0-9a-f]{40}$/i;function nu(e){if(!Array.isArray(e)||e.length===0)return;let t=[];for(let r of e){if(!r||typeof r!="object")return;let{chainId:n,address:o}=r,a=ai(n);if(a===void 0||typeof o!="string")return;let i=o.trim();if(!Lb.test(i))return;t.push({chainId:a,address:i.toLowerCase()})}return t}function Db(e){return new Map(e.map((t,r)=>[`${t.chainId}:${t.address.toLowerCase()}`,r]))}var Pb=new zl.default("0.0001");function Bl(e){return(xt(e.quantity.numeric)??new zl.default(0)).shiftedBy(-e.quantity.decimals)}function ru(e,t){return`${e}:${t.toLowerCase()}`}function Ob(e,t){return`${t.toLowerCase()}_${e}`}function ou({env:e,tokens:t,pinnedTokens:r,preferredTokens:n,statsMap:o,categoryMap:a,showGameToken:i}){let s=[],l=[],d=[],p=[],b=new Set;for(let u of o.values())b.add(u.chain_id);let g=b.size>0,h=Db(r??Ai(e)),x=new Map;(n??[]).forEach((u,c)=>{let w=ai(u.chainId);w!==void 0&&x.set(`${w}:${u.address.toLowerCase()}`,c)});for(let u of t){let c=`${u.chainId}:${u.address.toLowerCase()}`,w=h.has(c),m=x.get(c);if(w)s.push(u);else if(m!==void 0)d.push(u);else if(Bl(u).isGreaterThanOrEqualTo(Pb)){if(!i&&a.get(Ob(u.chainId,u.address))==="game")continue;g&&!b.has(u.chainId)?l.push(u):p.push(u)}}s.sort((u,c)=>{let w=h.get(`${u.chainId}:${u.address.toLowerCase()}`)??99,m=h.get(`${c.chainId}:${c.address.toLowerCase()}`)??99;return w-m}),d.sort((u,c)=>{let w=x.get(`${u.chainId}:${u.address.toLowerCase()}`)??99,m=x.get(`${c.chainId}:${c.address.toLowerCase()}`)??99;return w-m});let y=(u,c)=>{let w=o.get(ru(u.chainId,u.address)),m=o.get(ru(c.chainId,c.address)),v=Bl(u).multipliedBy(xt(w?.price)??0);return Bl(c).multipliedBy(xt(m?.price)??0).minus(v).toNumber()};return l.sort(y),p.sort(y),[...s,...l,...d,...p]}var Wi=V(require("react"),1);var au=new Set;function Bb(e){au.has(e)||(au.add(e),console.warn(`[dapp-ui] apps.json walletInfo.pinnedTokens (${e}) \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC544 \uBB34\uC2DC\uD569\uB2C8\uB2E4 \u2014 \uAE30\uBCF8 \uACE0\uC815 \uBAA9\uB85D\uC73C\uB85C \uD3F4\uBC31\uD569\uB2C8\uB2E4.`))}function iu(e){let t=qt(ii,e,Wi.useCallback(n=>{let o=n?.walletInfo?.pinnedTokens;if(o===void 0)return;let a=nu(o);if(!a){Bb(e);return}return a},[e])),r=Wi.useMemo(()=>Ai(e),[e]);return t??r}var ng=require("qrcode.react");var og=require("@nexus-cross/crossx-design-system");var gu=require("@nexus-cross/crossx-design-system");var Hi=require("@nexus-cross/crossx-design-system");var Ee=require("react/jsx-runtime"),zb='<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>',Fb=`data:image/svg+xml,${encodeURIComponent(zb)}`;function Gi(){return(0,Ee.jsx)("img",{src:Fb,width:40,height:40,alt:"",style:{display:"block"}})}function su(){return(0,Ee.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[(0,Ee.jsxs)("g",{clipPath:"url(#clip0_1331_27065)",children:[(0,Ee.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,Ee.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,Ee.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,Ee.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,Ee.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,Ee.jsx)("path",{d:"M22.1857 36.1951V39.831H17.6699V36.1951H22.1857Z",fill:"#C0C4CD"}),(0,Ee.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,Ee.jsx)("defs",{children:(0,Ee.jsx)("clipPath",{id:"clip0_1331_27065",children:(0,Ee.jsx)("rect",{width:"40",height:"40",fill:"white"})})})]})}function lu(){return(0,Ee.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ee.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,Ee.jsx)("path",{d:"M9.04 20L4.52 15.48L0 20L4.52 24.52L9.04 20Z",fill:"#F3BA2F"}),(0,Ee.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,Ee.jsx)("path",{d:"M35.48 24.52L40 20L35.48 15.48L30.96 20L35.48 24.52Z",fill:"#F3BA2F"}),(0,Ee.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 du(){return(0,Ee.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"246",viewBox:"0 0 247 246",fill:"none",children:[(0,Ee.jsx)("rect",{width:"247.005",height:"245.105",rx:"36",fill:"#121212"}),(0,Ee.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,Ee.jsx)("path",{d:"M59.8364 99.8915V59.7551H12.0414L30.4787 77.8377V99.8915H59.8364Z",fill:"#2FD7FF"}),(0,Ee.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 cu(){return(0,Ee.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ee.jsxs)("g",{clipPath:"url(#clip0_1185_7785)",children:[(0,Ee.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,Ee.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,Ee.jsx)("defs",{children:(0,Ee.jsx)("clipPath",{id:"clip0_1185_7785",children:(0,Ee.jsx)("rect",{width:"28",height:"28",fill:"white"})})})]})}function pu(){return(0,Ee.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ee.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,Ee.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,Ee.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,Ee.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 uu(){return(0,Ee.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Ee.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 fu(){return(0,Ee.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ee.jsx)("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var Po={cross_embedded:{id:"cross_embedded",name:Hi.WALLET_LABELS.social,description:"Sign in with Google or Apple",icon:Gi},cross_wallet:{id:"cross_wallet",name:Hi.WALLET_LABELS.app,description:"App approval is required",icon:Gi,featured:!0},cross_extension:{id:"cross_extension",name:Hi.WALLET_LABELS.extension,description:"Browser extension approval is required",icon:Gi,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:su,rdns:"io.metamask"},binance:{id:"binance",name:"Binance",description:"Mobile app only \u2014 Add CROSS network first",icon:lu},verse8:{id:"verse8",name:"Verse8 Wallet",description:"Optimized for Forge and Verse8 ecosystem",icon:du,badge:"For Forge"},tron:{id:"tron",name:"Tron Wallet",description:"Dedicated for Tron-based transactions and assets",icon:cu,badge:"For SHOP"}};function Fl(e){return Po[e]}var _i={google:{id:"google",name:"Google",icon:pu},apple:{id:"apple",name:"Apple",icon:uu}};function mu(e){return _i[e]}var hu="dappui.wcm.last-selected",Ub=new Set(["google","apple"]);function bu(e){try{window.localStorage.setItem(hu,e)}catch{}}function wu(){let e=null;try{e=window.localStorage.getItem(hu)}catch{return}if(e)return Ub.has(e)?gu.WALLET_LABELS.default:Po[e]?.name}function $t(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,p=b=>{if(b===null){d?.close();return}let g=b??t;if(d)try{d.location.href=g}catch{d.close(),a(g)}else a(g)};o.then(p,b=>{console.error("[dapp-ui] onOutlink rejected:",b),d?.close()});return}let s=o;if(s===null)return;a(s??t)}var lo=V(require("react"),1),Qf=require("vaul");var Bo=require("react");var Tr=V(require("bignumber.js"),1),jb=/^(\d{4}-\d{2}-\d{2})/;function yu(e){if(!e||e.length===0)return;let t=new Map,r;for(let{key:o,cumulative:a}of e.map(i=>({key:jb.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 xu(e){return e.poolType==="Unknown"}function Qi(e){return e.length<=12?e:`${e.slice(0,6)}...${e.slice(-4)}`}function Vi(e){return e.length<=13?e:`${e.slice(0,6)}...${e.slice(-4)}`}function ca(e,t){let r=e.length+t.length;if(r>32)return"xs";if(r>24)return"sm"}function Ul(e){return e?.toUpperCase()==="WONE"?"ONE":e}var Wb=["Request Arguments:","Details:","Docs:","Version:","Contract Call:"];function pa(e,t){console.error("[wallet-portfolio] withdraw failed:",e);let n=e instanceof Error?e.message:"";for(let a of Wb){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 Gb="0xe00e8bf3";function vu(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`${Gb}${n}${o}`}function Oo(e){return!e||e<=0n?"0":new Tr.default(e.toString()).shiftedBy(-9).toFormat(2,Tr.default.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function qi(e){return!e||e<=0n?"0":new Tr.default(e.toString()).toFormat(0,Tr.default.ROUND_DOWN)}function Yi(e){if(!e||e<=0n)return"0";let t=new Tr.default(e.toString()).shiftedBy(-18),r=t.isLessThan(1e-4)?7:4;return t.toFormat(r,Tr.default.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function pn(e,t){let r=new Tr.default(e).shiftedBy(-t);return!r.isFinite()||r.isZero()?"0":r.isGreaterThanOrEqualTo(1)?r.toFormat(2,Tr.default.ROUND_DOWN):r.toFormat(4,Tr.default.ROUND_DOWN)}function jl(e){return pn(e,0)}var ua={rate:1,symbol:"$"};function oo(e,t=ua){let r=Number.isFinite(t.rate)&&t.rate>0?t.rate:1;return`${t.symbol||"$"}${e.times(r).toFormat(2,Tr.default.ROUND_DOWN)}`}function Fn(e,t,r,n=ua){let o=new Tr.default(r||"0");if(!o.isFinite()||o.isLessThanOrEqualTo(0))return null;let a=new Tr.default(e||"0").shiftedBy(-t).times(o);return a.isFinite()?oo(a,n):null}var fa=(0,Bo.createContext)(null);function jt(){let e=(0,Bo.useContext)(fa);if(!e)throw new Error("WalletPortfolio compound components must be used within <WalletPortfolio>");return e}function Or(){let{conversionRatio:e,currencySymbol:t}=jt();return(0,Bo.useMemo)(()=>({rate:typeof e=="number"&&e>0?e:ua.rate,symbol:t||ua.symbol}),[e,t])}var ku=require("vaul");var Wl=require("react/jsx-runtime");function Ru({asChild:e,children:t}){let{walletAddress:r}=jt(),n=t!=null,o=e??!0,a=n?t:(0,Wl.jsx)("button",{type:"button",children:wr(r)});return(0,Wl.jsx)(ku.Drawer.Trigger,{asChild:o,children:a})}var wa=require("vaul");var Ht=V(require("react"),1),Hf=require("@tanstack/react-query");var Ki=require("react"),Gl=(0,Ki.createContext)(null);function Cu(){return(0,Ki.useContext)(Gl)}var Wt=require("react/jsx-runtime");function Su({size:e=22,className:t}){return(0,Wt.jsx)("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Wt.jsx)("path",{d:"M14 4L7 11L14 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Nu({size:e=22,className:t}){return(0,Wt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Wt.jsx)("path",{d:"M18.333 3.667v5.5h-5.5",stroke:"currentColor",strokeWidth:1.833,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Wt.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 Tu({size:e=12,className:t}){return(0,Wt.jsx)("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Wt.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 Zi({size:e=16,className:t}){return(0,Wt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Wt.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,Wt.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 Xi({size:e=16,className:t}){return(0,Wt.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Wt.jsx)("path",{d:"M13.333 4L6 11.333 2.667 8",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function Ji({size:e=48,className:t}){return(0,Wt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Wt.jsx)("circle",{cx:"24",cy:"24",r:"24",fill:"currentColor"}),(0,Wt.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 Ir({size:e=12,className:t}){return(0,Wt.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,Wt.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,Wt.jsx)("path",{d:"M7 1H11V5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Wt.jsx)("path",{d:"M11 1L6 6",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})]})}var Iu=require("@tanstack/react-query"),Hl=require("react");var Hb="wp:reward-pools";function zo(e,t=!0){let{data:r,...n}=(0,Iu.useQuery)({queryKey:[Hb,e],queryFn:async({signal:i})=>{let s=await je("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,Hl.useMemo)(()=>r?.data.pools.filter(i=>i.pool_type==="CrossPool")??[],[r]),a=(0,Hl.useMemo)(()=>r?.data.pools.filter(i=>i.pool_type==="GamePool")??[],[r]);return{crossPools:o,gamePools:a,allPools:r?.data.pools??[],...n}}var Eu=require("@tanstack/react-query"),Au=require("react");var _b="wp:user-deposits";function $i(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,Eu.useQuery)({queryKey:[_b,e,t],queryFn:async({signal:s})=>{let l=await je("gameReward",e),d=await fetch(`${l}/v1/users/${t}/deposits`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Deposits fetch failed: ${d.status}`);let p=await d.json();if(p.code!==200)throw new Error(`Deposits API error: ${p.code}`);return p},enabled:n,staleTime:0});return{depositMap:(0,Au.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 Uu=require("@tanstack/react-query"),ju=require("react");var Mu={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},Lu={dev:"https://stg.onechain.nexus/points",stage:"https://stg.onechain.nexus/points",production:"https://www.onechain.nexus/points"};var Du={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"};var _l={dev:"https://dev-stake.ogfcorp.com",stage:"https://stg-stake.ogfcorp.com",production:"https://stake.ogfcorp.com"},Pu={dev:`${_l.dev}/portfolio`,stage:`${_l.stage}/portfolio`,production:`${_l.production}/portfolio`};var Ou={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},Br={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"},es={dev:"https://stg-swap-api.crossdefi.io",stage:"https://stg-swap-api.crossdefi.io",production:"https://swap-api.crossdefi.io"},Bu={dev:"https://stg.crossdefi.io",stage:"https://stg.crossdefi.io",production:"https://www.crossdefi.io"},zu={dev:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",stage:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",production:"0xEFd871aF7D695A0c1709e46b565761F4cd1Ef5ba"},Fu={dev:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",stage:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",production:"0x731a104a4461ae45bfef520468b43c262d35e682"};var Qb="wp:token-info",Vb="0x0000000000000000000000000000000000000001";function un(e,t=!0){let r=Ut[e].cross,{data:n,...o}=(0,Uu.useQuery)({queryKey:[Qb,e],queryFn:async({signal:p})=>{let b=await je("walletServer",e),g=await fetch(`${b}/v1/public/token/info`,{cache:"no-store",signal:p});if(!g.ok)throw new Error(`Failed to fetch token info: ${g.status}`);let h=await g.json();if(h.code!==200)throw new Error(`Token info API error: ${h.code}`);return h},enabled:t,staleTime:300*1e3}),{byChainAddr:a,byChainSym:i}=(0,ju.useMemo)(()=>{let p=new Map,b=new Map;if(!n?.data)return{byChainAddr:p,byChainSym:b};for(let g of n.data){let h=g.address.toLowerCase();p.set(`${g.chain_id}:${h}`,g),p.set(h,g);let x=g.symbol.replace(/^t/,"").toUpperCase(),y=`${g.chain_id}:${x}`;b.has(y)||b.set(y,g),b.has(x)||b.set(x,g)}return{byChainAddr:p,byChainSym:b}},[n]);return{getTokenImage:(p,b,g)=>{let h=p.toLowerCase(),x=!!g?.chainOnly,y=a.get(`${r}:${h}`);if(y?.image)return y.image;if(!x){let u=a.get(h);if(u?.image)return u.image}if(b){let u=b.replace(/^t/,"").toUpperCase(),c=i.get(`${r}:${u}`);if(c?.image)return c.image;if(!x){let w=i.get(u);if(w?.image)return w.image}}return""},getTokenSymbol:(p,b,g)=>{let h=p.toLowerCase();return(a.get(`${r}:${h}`)??(g?.chainOnly?void 0:a.get(h)))?.symbol||b},getNativeToken:()=>a.get(`${r}:${Vb}`),...o}}var Ql=V(require("react"),1);var ao=require("react/jsx-runtime");function zr({sectionKey:e,title:t,icon:r,iconFit:n="cover",isEmpty:o,loading:a=!1,children:i}){let s=Cu();return Ql.useEffect(()=>{s?.report(e,{loading:a,empty:o})},[s,e,a,o]),Ql.useEffect(()=>()=>s?.unregister(e),[s,e]),o?null:(0,ao.jsxs)("div",{className:"wp-svc-card",children:[(0,ao.jsxs)("div",{className:"wp-svc-card-head",children:[(0,ao.jsx)("img",{className:"wp-svc-card-icon",src:r,alt:"",style:{objectFit:n}}),(0,ao.jsx)("span",{className:"wp-svc-card-title",children:t})]}),(0,ao.jsx)("div",{className:"wp-svc-items",children:i})]})}var ts=V(require("bignumber.js"),1),_e=require("react/jsx-runtime"),qb="ONErewards";function Yb(e){return new ts.default(e||"0").isGreaterThan(0)}function Wu(){let{env:e,walletAddress:t,onOutlink:r}=jt(),n=Or(),o=!!t,{allPools:a,isLoading:i}=zo(e,o),{depositMap:s,isLoading:l}=$i(e,t,o),{getTokenImage:d}=un(e,o),p=(h,x)=>`${Mu[e]}/gametoken/tokens/${h.deposit_token.address}?mode=rewards${x==="withdraw"?"&trade=withdraw":""}`,b=`${Br[e]}/reward.png`,g=a.filter(h=>{let x=s.get(h.pool_address.toLowerCase()),y=x?.deposited_amount??"0",u=x?.claimable_reward??"0";return!(new ts.default(y).isZero()&&new ts.default(u).isZero())});return(0,_e.jsx)(zr,{sectionKey:"rewards",title:qb,icon:b,isEmpty:g.length===0,loading:i||l,children:g.map(h=>{let x=s.get(h.pool_address.toLowerCase()),y=x?.deposited_amount??"0",u=x?.claimable_reward??"0",c=p(h,"withdraw"),w=p(h,"claim"),m=d(h.deposit_token.address,h.deposit_token.symbol),v=h.reward_tokens[0],R=v?d(v.address,v.symbol):"",C=h.reward_tokens.map(D=>D.symbol),T=C.length>0?`${h.deposit_token.symbol}-${C.join("/")}`:h.deposit_token.symbol,S=v?pn(u,v.decimals):"0",N=v?.symbol??"Reward",I=Fn(y,h.deposit_token.decimals,h.deposit_token.price,n),M=v?Fn(u,v.decimals,v.price,n):null,O=!!x&&Yb(u);return(0,_e.jsxs)("article",{className:"wp-item","data-side":"reward",children:[(0,_e.jsxs)("div",{className:"wp-item-body",children:[(0,_e.jsxs)("div",{className:"wp-item-line",children:[(0,_e.jsxs)("span",{className:"wp-item-label",children:["Pool",(0,_e.jsx)("span",{className:"wp-item-label-sub",children:" (Deposit - Earn)"})]}),(0,_e.jsxs)("div",{className:"wp-svc-token",children:[(0,_e.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[m&&(0,_e.jsx)("img",{className:"wp-svc-token-icon",src:m,alt:""}),R&&(0,_e.jsx)("img",{className:"wp-svc-token-icon",src:R,alt:""})]}),(0,_e.jsx)("span",{children:T})]})]}),(0,_e.jsxs)("div",{className:"wp-item-line",children:[(0,_e.jsx)("span",{className:"wp-item-label",children:"Deposited"}),(0,_e.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[m&&(0,_e.jsx)("img",{className:"wp-svc-token-icon",src:m,alt:""}),(0,_e.jsxs)("div",{className:"wp-svc-amount",children:[(0,_e.jsx)("span",{className:"wp-svc-amount-main",children:pn(y,h.deposit_token.decimals)}),I&&(0,_e.jsx)("span",{className:"wp-item-usd",children:I})]})]})]}),(0,_e.jsxs)("div",{className:"wp-item-line",children:[(0,_e.jsxs)("span",{className:"wp-item-label",children:["Claimable (",N,")"]}),(0,_e.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[R&&(0,_e.jsx)("img",{className:"wp-svc-token-icon",src:R,alt:""}),(0,_e.jsxs)("div",{className:"wp-svc-amount",children:[(0,_e.jsx)("span",{className:"wp-svc-amount-main",children:S}),M&&(0,_e.jsx)("span",{className:"wp-item-usd",children:M})]})]})]})]}),(0,_e.jsxs)("div",{className:"wp-item-tags",children:[(0,_e.jsxs)("a",{className:"wp-tag wp-tag--muted",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"rewards_withdraw_open",onClick:D=>$t(D,c,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:h,userDeposit:x}},r),children:[(0,_e.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,_e.jsx)(Ir,{size:12,className:"wp-tag-icon"})]}),(0,_e.jsxs)("a",{className:"wp-tag wp-tag--mint","data-disabled":!O||void 0,"aria-disabled":!O||void 0,href:O?w:void 0,target:O?"_blank":void 0,rel:O?"noopener noreferrer":void 0,onClick:D=>{if(!O){D.preventDefault();return}$t(D,w,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:h,userDeposit:x}},r)},children:[(0,_e.jsx)("span",{className:"wp-tag-label",children:"Claim"}),(0,_e.jsx)(Ir,{size:12,className:"wp-tag-icon"})]})]})]},h.pool_address)})})}var Xu=V(require("react"),1);var Hu=require("@tanstack/react-query"),ha=require("react");var Kb="0x70a08231",Zb="0x18160ddd",Xb="0x313ce567",Jb=8e3;async function $b(e,t,r,n){let o=new AbortController,a=setTimeout(()=>o.abort(),Jb);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 ew(e){return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function ma(e){if(!(!e||e==="0x"))try{return BigInt(e)}catch{return}}async function Tn(e,t,r,n,o){try{return await $b(e,"eth_call",[o?{from:o,to:t,data:r}:{to:t,data:r},"latest"],n)}catch{return}}async function tw(e,t,r,n){let[o,a,i]=await Promise.all([Tn(e,r,Kb+ew(t),n),Tn(e,r,Zb,n),Tn(e,r,Xb,n)]),s=ma(o);if(s===void 0)return null;let l=ma(i);return{balance:s,totalSupply:ma(a),decimals:l!==void 0?Number(l):void 0}}async function ga(e,t){let r=Ut[e].cross,n=await je("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 Gu(e,t,r,n){if(!t||r.length===0)return{};let o;try{o=await ga(e,n)}catch{o=void 0}if(!o)return{};let a=await Promise.all(r.map(async s=>[s.toLowerCase(),await tw(o,t,s,n)])),i={};for(let[s,l]of a)l&&(i[s]=l);return i}var rw="wp:withdraw-token-meta",nw="0xc89039c5",ow="0x95d89b41",aw="0x313ce567";function iw(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 sw(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 lw(e,t,r){if(t.length===0)return{};let n;try{n=await ga(e,r)}catch{n=void 0}if(!n)return{};let o=await Promise.all(t.map(async i=>{let s=sw(await Tn(n,i,nw,r));if(!s)return[i.toLowerCase(),null];let[l,d]=await Promise.all([Tn(n,s,ow,r),Tn(n,s,aw,r)]),p=iw(l),b=ma(d);return p?[i.toLowerCase(),{tokenAddress:s,symbol:p,decimals:b!==void 0?Number(b):18}]:[i.toLowerCase(),null]})),a={};for(let[i,s]of o)s&&(a[i]=s);return a}function _u(e,t,r=!0){let o=r&&!!t,{allPools:a,isLoading:i}=zo(e,o),{deposits:s,isLoading:l}=$i(e,t,o),d=(0,ha.useMemo)(()=>{let u=new Map;for(let c of a)u.set(c.pool_address.toLowerCase(),c);return u},[a]),p=(0,ha.useMemo)(()=>s.filter(u=>{try{return BigInt(u.deposited_amount||"0")>0n}catch{return!1}}),[s]),b=(0,ha.useMemo)(()=>p.map(u=>u.pool_address.toLowerCase()).filter(u=>!d.has(u)).sort(),[p,d]),{data:g,isLoading:h}=(0,Hu.useQuery)({queryKey:[rw,e,b],queryFn:({signal:u})=>lw(e,b,u),enabled:o&&b.length>0,staleTime:1440*60*1e3});return{positions:(0,ha.useMemo)(()=>{let u=[];for(let c of p){let w=c.pool_address.toLowerCase(),m=d.get(w);if(m){u.push({poolId:c.pool_id,poolAddress:c.pool_address,poolType:m.pool_type,tokenSymbol:m.deposit_token.symbol,tokenAddress:m.deposit_token.address,decimals:m.deposit_token.decimals,price:m.deposit_token.price,depositedRaw:c.deposited_amount});continue}let v=g?.[w];v&&u.push({poolId:c.pool_id,poolAddress:c.pool_address,poolType:"Unknown",tokenSymbol:v.symbol,tokenAddress:v.tokenAddress,decimals:v.decimals,depositedRaw:c.deposited_amount})}return u},[p,d,g]),isLoading:i||l||h}}var pr=V(require("react"),1);var ie=require("react/jsx-runtime"),dw=400;function cw(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 Vl(e,t,r){return r==="loading"?"Estimating...":r==="error"||r==="unavailable"?"-":`${e} ${t}`.trim()}function pw({position:e,size:t}){return e.icon?(0,ie.jsx)("img",{src:e.icon,alt:"",width:t,height:t}):(0,ie.jsx)("span",{children:e.tokenSymbol.slice(0,1)})}function Qu({open:e,status:t,positions:r,initialPoolAddress:n,walletAddress:o,txHash:a,error:i,copied:s=!1,estimateWithdraw:l,onClose:d,onConfirm:p,onCopyHash:b,trackFunnel:g,nativeSymbol:h}){let[x,y]=pr.useState(null),[u,c]=pr.useState("idle"),w=pr.useRef(0),m=pr.useRef(void 0),v=pr.useRef(null);pr.useEffect(()=>()=>clearTimeout(m.current),[]);let R=pr.useMemo(()=>{let W=n?.toLowerCase();return r.find(A=>A.poolAddress.toLowerCase()===W)??r[0]??null},[r,n]),C=pr.useMemo(()=>{try{return BigInt(R?.depositedRaw??"0")}catch{return 0n}},[R?.depositedRaw]),T=R?.decimals??18;pr.useEffect(()=>{!e||!R||g?.("position_selected")},[e,R,g]);let S=pr.useCallback(()=>{y(null),c(l?"idle":"unavailable"),w.current+=1,v.current=null},[]);if(pr.useEffect(()=>{e&&S()},[e,S]),pr.useEffect(()=>{if(!e||t!=="confirm"){clearTimeout(m.current);return}if(!l||!R){clearTimeout(m.current),c("unavailable");return}if(C<=0n){clearTimeout(m.current),w.current+=1,v.current=null,y(null),c("idle");return}let W=`${R.poolAddress.toLowerCase()}:${C.toString()}`;if(v.current===W)return;v.current=W,clearTimeout(m.current);let A=w.current+1;w.current=A,c("loading"),m.current=setTimeout(()=>{l(R,C).then(G=>{w.current===A&&(y(G??null),c(G?"ready":"unavailable"))}).catch(()=>{w.current===A&&(y(null),c("error"))})},dw)},[e,t,C,l,R]),!e||!R)return null;let N=t==="submitting",I=Oo(x?.maxPriorityFeePerGas),M=Oo(x?.maxFeePerGas??x?.gasPrice),O=qi(x?.gasLimit),D=pn(R.depositedRaw,T);return(0,ie.jsx)("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:W=>{W.target===W.currentTarget&&!N&&d()},children:(0,ie.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,ie.jsx)("div",{className:"wp-claim-grabber","aria-hidden":!0,children:(0,ie.jsx)("span",{})}),(0,ie.jsxs)("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&a?(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:(0,ie.jsx)(Ji,{})}),(0,ie.jsxs)("div",{className:"wp-claim-copy",children:[(0,ie.jsx)("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),(0,ie.jsx)("p",{className:"wp-claim-desc",children:"Your withdrawal request has been submitted. Balances will update shortly after the transaction settles."})]}),(0,ie.jsx)("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:(0,ie.jsxs)("div",{className:"wp-claim-list-item",children:[(0,ie.jsx)("span",{children:"Tx Hash"}),(0,ie.jsxs)("button",{type:"button",className:"wp-claim-hash",onClick:b,"aria-label":"Copy transaction hash","data-track":"withdraw_hash_copy",children:[(0,ie.jsx)("strong",{children:Vi(a)}),s?(0,ie.jsx)(Xi,{}):(0,ie.jsx)(Zi,{})]})]})})]}):(0,ie.jsxs)(ie.Fragment,{children:[t==="error"&&(0,ie.jsxs)("div",{className:"wp-claim-heading",children:[(0,ie.jsx)("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),(0,ie.jsx)("p",{className:"wp-claim-error-message",children:i||"The withdraw request could not be completed."})]}),(0,ie.jsxs)("div",{className:"wp-claim-reward-card","data-fit":ca(R.tokenSymbol,D),"aria-label":"Deposited balance",children:[(0,ie.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,ie.jsx)(pw,{position:R,size:28})}),(0,ie.jsx)("strong",{className:"wp-claim-reward-symbol",children:R.tokenSymbol}),(0,ie.jsx)("strong",{className:"wp-claim-reward-amount",children:D})]}),(0,ie.jsxs)("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:[(0,ie.jsxs)("div",{className:"wp-claim-account-row",children:[(0,ie.jsxs)("div",{className:"wp-claim-account",children:[(0,ie.jsx)("span",{className:"wp-claim-account-avatar","aria-hidden":!0}),(0,ie.jsxs)("strong",{children:[R.tokenSymbol," Pool"]})]}),(0,ie.jsx)("span",{children:Qi(o)})]}),(0,ie.jsx)("span",{className:"wp-claim-divider","aria-hidden":!0}),(0,ie.jsxs)("div",{className:"wp-claim-detail-list",children:[(0,ie.jsxs)("div",{className:"wp-claim-detail-row",children:[(0,ie.jsx)("span",{children:"Est. Tx Fee"}),(0,ie.jsx)("strong",{children:cw(x,u,h)})]}),(0,ie.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ie.jsx)("span",{children:"Priority Fee Per Gas"}),(0,ie.jsx)("strong",{children:Vl(I,"Gwei",u)})]}),(0,ie.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ie.jsx)("span",{children:"Max Fee Per Gas"}),(0,ie.jsx)("strong",{children:Vl(M,"Gwei",u)})]}),(0,ie.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ie.jsx)("span",{children:"Gas Limit"}),(0,ie.jsx)("strong",{children:Vl(O,"",u)})]})]})]})]}),(0,ie.jsxs)("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&(0,ie.jsx)("button",{type:"button",className:"wp-claim-secondary","data-track":"withdraw_cancel",onClick:d,children:t==="error"?"Close":"Cancel"}),(0,ie.jsxs)("button",{type:"button",className:"wp-claim-primary","data-track":"withdraw_confirm",onClick:()=>{if(t==="success"){d();return}R&&C>0n&&p(R,C,x)},disabled:N||(t==="confirm"||t==="error")&&C<=0n,children:[t==="success"&&"Done",t==="submitting"&&(0,ie.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}),t==="error"&&"Try Again",t==="confirm"&&"Withdraw Now"]})]})]}),(0,ie.jsx)("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:(0,ie.jsx)("span",{})})]})})}var Gt=V(require("react"),1),Ku=require("@tanstack/react-query");var Vu=require("@tanstack/react-query");var uw="wp:reward-factory-info";function qu(e,t=!0){let{data:r,...n}=(0,Vu.useQuery)({queryKey:[uw,e],queryFn:async({signal:o})=>{let a=await je("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 ql="wp:";function In(e){return e.invalidateQueries({predicate:t=>typeof t.queryKey[0]=="string"&&t.queryKey[0].startsWith("wp:")})}function Yu(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function Zu(e){let{env:t,walletAddress:r,sendTransaction:n,estimateGas:o}=jt(),a=!!r,i=!!n,s=(0,Ku.useQueryClient)(),{routerAddress:l}=qu(t,a&&i),d=Yu(l),[p,b]=Gt.useState(!1),[g,h]=Gt.useState(void 0),[x,y]=Gt.useState("confirm"),[u,c]=Gt.useState(),[w,m]=Gt.useState(""),[v,R]=Gt.useState(!1),C=Gt.useRef(void 0);Gt.useEffect(()=>()=>clearTimeout(C.current),[]);let T=Gt.useRef(new Set),S=Gt.useCallback((G,J)=>{T.current.has(G)||(T.current.add(G),$e("withdraw",G,{...J,tags:{section:e,...J?.tags}}))},[e]),N=Gt.useCallback((G,J)=>d?{to:d,value:0n,data:vu(G,J),chainId:Ut[t].cross}:null,[t,d]),I=Gt.useCallback(()=>{In(s)},[s]),M=Gt.useCallback(G=>{h(G),b(!0),y("confirm"),c(void 0),m(""),R(!1),T.current=new Set,S("opened")},[S]),O=Gt.useCallback(()=>{x!=="submitting"&&(b(!1),h(void 0),y("confirm"),c(void 0),m(""),R(!1),x==="success"&&I())},[x,I]),D=Gt.useCallback(async(G,J)=>{if(!o)return null;let ee=N(G.poolId,J),re=Yu(r);return!ee||!re?null:o({...ee,from:re})},[N,o,r]),W=Gt.useCallback(async()=>{if(!(!u||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(u),R(!0),clearTimeout(C.current),C.current=setTimeout(()=>R(!1),1400)}catch{R(!1)}},[u]),A=Gt.useCallback(async(G,J,ee)=>{if(!n){y("error"),m("Withdraw is not available for this wallet.");return}if(!d){y("error"),m("Withdraw contract address is not available.");return}try{y("submitting"),m("");let re=N(G.poolId,J);if(!re){y("error"),m("Withdraw contract address is not available.");return}S("submitted");let L=await n({...re,gas:ee?.gasLimit&&ee.gasLimit>0n?ee.gasLimit:void 0,maxFeePerGas:ee?.maxFeePerGas&&ee.maxFeePerGas>0n?ee.maxFeePerGas:void 0,maxPriorityFeePerGas:ee?.maxPriorityFeePerGas&&ee.maxPriorityFeePerGas>0n?ee.maxPriorityFeePerGas:void 0});c(L),y("success"),S("confirmed"),I()}catch(re){y("error"),m(pa(re,"Failed to request withdraw.")),S("confirmed",{status:"failure",reason:Rr(re)})}},[N,I,d,n,S]);return{canWithdrawInline:i,isOpen:p,initialPoolAddress:g,status:x,txHash:u,error:w,copied:v,hasEstimator:!!o,openWithdraw:M,closeWithdraw:O,estimateWithdraw:D,confirmWithdraw:A,copyHash:W,trackFunnelOnce:S}}var ct=require("react/jsx-runtime"),fw="ONEpoints";function Ju(){let{env:e,walletAddress:t,onOutlink:r}=jt(),n=Or(),o=!!t,{getTokenImage:a,getNativeToken:i}=un(e,o),s=Zu("points"),{positions:l,isLoading:d}=_u(e,t,o),p=Xu.useMemo(()=>l.filter(xu).map(h=>({...h,icon:a(h.tokenAddress,h.tokenSymbol)})),[l,a]),b=`${Br[e]}/point.png`,g=Lu[e];return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(zr,{sectionKey:"points",title:fw,icon:b,isEmpty:p.length===0,loading:d,children:p.map(h=>{let x=h.price?Fn(h.depositedRaw,h.decimals,h.price,n):null;return(0,ct.jsxs)("article",{className:"wp-item","data-side":"reward",children:[(0,ct.jsxs)("div",{className:"wp-item-body",children:[(0,ct.jsxs)("div",{className:"wp-item-line",children:[(0,ct.jsx)("span",{className:"wp-item-label",children:"Token"}),(0,ct.jsxs)("div",{className:"wp-svc-token",children:[h.icon&&(0,ct.jsx)("img",{className:"wp-svc-token-icon",src:h.icon,alt:""}),(0,ct.jsx)("span",{children:h.tokenSymbol})]})]}),(0,ct.jsxs)("div",{className:"wp-item-line",children:[(0,ct.jsx)("span",{className:"wp-item-label",children:"Deposited"}),(0,ct.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[h.icon&&(0,ct.jsx)("img",{className:"wp-svc-token-icon",src:h.icon,alt:""}),(0,ct.jsxs)("div",{className:"wp-svc-amount",children:[(0,ct.jsx)("span",{className:"wp-svc-amount-main",children:pn(h.depositedRaw,h.decimals)}),x&&(0,ct.jsx)("span",{className:"wp-item-usd",children:x})]})]})]})]}),(0,ct.jsx)("div",{className:"wp-item-tags",children:s.canWithdrawInline?(0,ct.jsx)("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"points_withdraw_open",onClick:()=>s.openWithdraw(h.poolAddress),children:(0,ct.jsx)("span",{className:"wp-tag-label",children:"Withdraw"})}):(0,ct.jsxs)("a",{className:"wp-tag wp-tag--muted",href:g,target:"_blank",rel:"noopener noreferrer","data-track":"points_withdraw_open",onClick:y=>$t(y,g,{category:"portfolio",origin:"portfolio-points",payload:{position:h}},r),children:[(0,ct.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,ct.jsx)(Ir,{size:12,className:"wp-tag-icon"})]})})]},h.poolAddress)})}),(0,ct.jsx)(Qu,{open:s.isOpen,status:s.status,positions:p,initialPoolAddress:s.initialPoolAddress,walletAddress:t,txHash:s.txHash,error:s.error,copied:s.copied,estimateWithdraw:s.hasEstimator?s.estimateWithdraw:void 0,onClose:s.closeWithdraw,onConfirm:s.confirmWithdraw,onCopyHash:s.copyHash,trackFunnel:s.trackFunnelOnce,nativeSymbol:i()?.symbol})]})}var Kl=V(require("react"),1);var $u=require("@tanstack/react-query");var mw="wp:stake-info";function ef(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,$u.useQuery)({queryKey:[mw,e,t],queryFn:async({signal:s})=>{let l=await je("posa",e),d=await fetch(`${l}/stake/${t}`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Stake info fetch failed: ${d.status}`);let p=await d.json();if(p.code!==0&&p.code!==200)throw new Error(`Stake info API error: ${p.code}`);return p},enabled:n,staleTime:0});return{stakeInfo:o?.data,...a}}var tf=require("@tanstack/react-query");var gw="wp:stake-rewards",hw=31;function rf(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,tf.useQuery)({queryKey:[gw,e,t],queryFn:async({signal:i})=>{let s=await je("posa",e),l=await fetch(`${s}/rewards/${t}?limit=${hw}`,{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:yu(o),...a}}var nf=require("@tanstack/react-query"),bw="wp:staking-onchain";function of(e,t,r=!0){let n=r&&!!t&&!!e,{data:o,...a}=(0,nf.useQuery)({queryKey:[bw,e],queryFn:async()=>{if(!t)throw new Error("stakingRewardsReader not provided");return t(e)},enabled:n,staleTime:0});return{onchain:o,...a}}var Yl=require("react"),lf=V(require("bignumber.js"),1);function af(e){return e?.trim().toUpperCase()==="ONE"}function sf(e){return new lf.default(e||"0").isGreaterThan(0)}function rs(e,t,r=!0){let{allPools:n}=zo(e,r),o=(0,Yl.useMemo)(()=>{for(let d of n)for(let p of[d.deposit_token,...d.reward_tokens])if(af(p?.symbol)&&sf(p.price))return p.price},[n]),a=r&&o===void 0,{tokens:i}=Sn(e,t,a),{statsMap:s}=Nn(e,a),l=Ut[e].cross;return(0,Yl.useMemo)(()=>{if(o)return o;let d=i.find(p=>p.chainId===l&&af(p.symbol));if(d){let p=s.get(cn(d.chainId,d.address));if(p&&sf(p.price))return p.price}return"0"},[o,i,s,l])}var En=V(require("bignumber.js"),1),Ot=require("react/jsx-runtime");function ww(e){if(!e)return"\u2014";let t=new En.default(e);return t.isFinite()?`${t.toFormat(2,En.default.ROUND_DOWN)}%`:"\u2014"}function df(){let{env:e,walletAddress:t,onOutlink:r,stakingRewardsReader:n}=jt(),o=Or(),a=!!t,{stakeInfo:i,isLoading:s}=ef(e,t,a),{latestReward:l,aprAccrued:d,isLoading:p}=rf(e,t,a),{onchain:b}=of(t,n,a),g=rs(e,t,a),{getNativeToken:h}=un(e,a),x=h()?.symbol,y="ONEstaking",u=`${Br[e]}/cross-staking.png`,c=Pu[e],w=i?.total_stake??"0",m=Kl.useMemo(()=>b?new En.default(b.earnedWei.toString()).shiftedBy(-18).toString(10):l?.cumulative_earned??i?.rewards_earned??"0",[b,l,i]),v=Kl.useMemo(()=>b?new En.default(b.stakedWei.toString()).shiftedBy(-18):new En.default(w),[b,w]),R=d!==void 0?new En.default(d):void 0,C=i?.days_since_first_stake,T=R!==void 0&&R.isFinite()&&v.isGreaterThan(0)&&C!==null&&C!==void 0?R.div(v).times(365).div(Math.max(1,C)).times(100):void 0,S=!(new En.default(w).isZero()&&new En.default(m).isZero()),N=Fn(w,0,g,o),I=Fn(m,0,g,o);return(0,Ot.jsx)(zr,{sectionKey:"staking",title:y,icon:u,iconFit:"contain",isEmpty:!S,loading:s||p,children:(0,Ot.jsxs)("article",{className:"wp-item","data-side":"stake",children:[(0,Ot.jsxs)("div",{className:"wp-item-body",children:[(0,Ot.jsxs)("div",{className:"wp-item-line",children:[(0,Ot.jsx)("span",{className:"wp-item-label",children:"Staked"}),(0,Ot.jsxs)("div",{className:"wp-svc-amount",children:[(0,Ot.jsx)("span",{className:"wp-svc-amount-main",children:`${jl(w)} ${x??""}`.trim()}),N&&(0,Ot.jsx)("span",{className:"wp-item-usd",children:N})]})]}),(0,Ot.jsxs)("div",{className:"wp-item-line",children:[(0,Ot.jsx)("span",{className:"wp-item-label",children:"Rewards Earned"}),(0,Ot.jsxs)("div",{className:"wp-svc-amount",children:[(0,Ot.jsx)("span",{className:"wp-svc-amount-main",children:`${jl(m)} ${x??""}`.trim()}),I&&(0,Ot.jsx)("span",{className:"wp-item-usd",children:I})]})]}),(0,Ot.jsxs)("div",{className:"wp-item-line",children:[(0,Ot.jsx)("span",{className:"wp-item-label",children:"My APR"}),(0,Ot.jsx)("span",{children:ww(T?.toString(10))})]})]}),(0,Ot.jsx)("div",{className:"wp-item-tags",children:(0,Ot.jsxs)("a",{className:"wp-tag wp-tag--mint",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"stake_outlink",onClick:M=>$t(M,c,{category:"portfolio",origin:"portfolio-stake",payload:{stakeInfo:i}},r),children:[(0,Ot.jsx)("span",{className:"wp-tag-label",children:"Manage"}),(0,Ot.jsx)(Ir,{size:12,className:"wp-tag-icon"})]})})]})})}var Zl=V(require("react"),1);var cf=require("@tanstack/react-query");var yw="wp:game-swap-pools";function pf(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,cf.useQuery)({queryKey:[yw,e,t],queryFn:async({signal:i})=>{let s=await je("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 uf=require("@tanstack/react-query");var xw="wp:game-swap-lp-balances";function ff(e,t,r,n){let o=[...r].map(l=>l.toLowerCase()).sort(),a=!!t&&o.length>0,{data:i,...s}=(0,uf.useQuery)({queryKey:[xw,e,t,o,!!n],queryFn:async({signal:l})=>{let d=n?await n(o):await Gu(e,t,o,l),p={};for(let[b,g]of Object.entries(d))p[b.toLowerCase()]=g;return p},enabled:a,staleTime:0});return{balances:i??{},...s}}var fn=V(require("bignumber.js"),1),vt=require("react/jsx-runtime"),vw="Gametoken LP",gf=18,kw=new fn.default("0.0001");function mf(e){return e?.trim().toUpperCase()==="ONE"}function Rw(e){return e&&e>0?e:gf}function Cw(e){let t=mf(e.token_a?.symbol)&&!mf(e.token_b?.symbol),r=t?e.reserve_a:e.reserve_b,n=Rw(t?e.token_a?.decimals:e.token_b?.decimals),o=new fn.default(r||"0").shiftedBy(-n);return!o.isFinite()||o.isLessThanOrEqualTo(0)?new fn.default(0):o.times(2)}function Sw(e,t,r,n){let o=e.token_a?.symbol?.trim()||"TOKEN",a=e.token_b?.symbol?.trim()||n||"?",i=t?.decimals??gf,s,l;if(t&&t.totalSupply&&t.totalSupply>BigInt(0)){let d=new fn.default(t.balance.toString()),p=new fn.default(t.totalSupply.toString()),b=d.div(p);s=b.times(100);let g=b.times(Cw(e));if(g.isGreaterThan(0)){let h=new fn.default(e.quote_usd??e.cross_usd??"0");l=h.isGreaterThan(0)?oo(g.times(h),r):`${g.toFormat(4,fn.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 hf(){let{env:e,walletAddress:t,onOutlink:r,lpBalanceReader:n}=jt(),o=Or(),a=!!t,{pools:i,isLoading:s}=pf(e,t,a),l=Zl.useMemo(()=>i.map(c=>c.pair_address).filter(Boolean),[i]),{balances:d,isLoading:p}=ff(e,t,l,n),{getNativeToken:b}=un(e,a),g=b()?.symbol,h=`${Br[e]}/game-token.png`,x=Object.keys(d).length>0,y=Zl.useMemo(()=>{let c=i.map(w=>Sw(w,d[w.pair_address?.toLowerCase()],o,g));return x?c.filter(w=>w.lpAmountRaw?new fn.default(w.lpAmountRaw).shiftedBy(-w.lpDecimals).isGreaterThanOrEqualTo(kw):!1):c},[i,d,x,o,g]),u=c=>{let w=c.token_a?.address??c.pair_address;return`${Ou[e]}/gametoken/tokens/${w}?trade=deposit`};return(0,vt.jsx)(zr,{sectionKey:"gameSwap",title:vw,icon:h,iconFit:"contain",isEmpty:y.length===0,loading:s||p,children:y.map(c=>{let{pool:w}=c,m=u(w),v=`${c.tokenASymbol} / ${c.tokenBSymbol}`,R=w.token_a?.logo_url,C=w.token_b?.logo_url;return(0,vt.jsxs)("article",{className:"wp-item","data-side":"game-swap",children:[(0,vt.jsxs)("div",{className:"wp-item-body",children:[(0,vt.jsxs)("div",{className:"wp-item-line",children:[(0,vt.jsx)("span",{className:"wp-item-label",children:"Pool"}),(0,vt.jsxs)("div",{className:"wp-svc-token",children:[(0,vt.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[R&&(0,vt.jsx)("img",{className:"wp-svc-token-icon",src:R,alt:""}),C&&(0,vt.jsx)("img",{className:"wp-svc-token-icon",src:C,alt:""})]}),(0,vt.jsx)("span",{children:v})]})]}),c.lpAmountRaw!==void 0&&(0,vt.jsxs)("div",{className:"wp-item-line",children:[(0,vt.jsx)("span",{className:"wp-item-label",children:"My LP"}),(0,vt.jsxs)("span",{children:[pn(c.lpAmountRaw,c.lpDecimals)," LP"]})]}),c.sharePercent!==void 0&&(0,vt.jsxs)("div",{className:"wp-item-line",children:[(0,vt.jsx)("span",{className:"wp-item-label",children:"Pool Share"}),(0,vt.jsxs)("span",{children:[c.sharePercent.toFormat(2,fn.default.ROUND_DOWN),"%"]})]}),c.valueText!==void 0&&(0,vt.jsxs)("div",{className:"wp-item-line",children:[(0,vt.jsx)("span",{className:"wp-item-label",children:"Value"}),(0,vt.jsx)("span",{children:c.valueText})]})]}),(0,vt.jsx)("div",{className:"wp-item-tags",children:(0,vt.jsxs)("a",{className:"wp-tag wp-tag--mint",href:m,target:"_blank",rel:"noopener noreferrer","data-track":"gameswap_outlink","data-track-id":v,onClick:T=>$t(T,m,{category:"portfolio",origin:"portfolio-game-swap",payload:{pool:w}},r),children:[(0,vt.jsx)("span",{className:"wp-tag-label",children:"Manage"}),(0,vt.jsx)(Ir,{size:12,className:"wp-tag-icon"})]})})]},w.pair_address)})})}var Un=V(require("bignumber.js"),1),kf=require("react");var bf=require("@tanstack/react-query");var Nw="wp:forge-pools";function wf(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,bf.useQuery)({queryKey:[Nw,e,t],queryFn:async()=>{let s=await je("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 yf=require("@tanstack/react-query"),xf=require("react");var Tw="wp:forge-token-detail";async function Iw(e,t){let r=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store"});return r.ok?(await r.json())?.data?.token??null:null}function vf(e,t,r=!0){let n=(0,yf.useQueries)({queries:t.map(i=>({queryKey:[Tw,e,i],queryFn:async()=>Iw(await je("bondingCurve",e),i),enabled:r&&!!i,staleTime:3e4}))}),o=(0,xf.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 Tt=require("react/jsx-runtime"),Ew="ONEforge",Rf=18,Aw="https://contents.crosstoken.io/wallet/token/images/FT.png";function Mw(e){if(!e||e==="0")return"0";let t=new Un.default(e).shiftedBy(-Rf);return t.isZero()?"0":t.isGreaterThanOrEqualTo(1)?t.toFormat(2,Un.default.ROUND_DOWN):t.toFormat(4,Un.default.ROUND_DOWN)}function Lw(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 Dw(e,t,r,n){let o=new Un.default(r||"0");if(!o.isGreaterThan(0))return null;let a=new Un.default(e.total_supply||"0"),i=new Un.default(e.lp_balance||"0"),s=new Un.default(t?.reserve_b||"0").shiftedBy(-Rf);if(!a.isGreaterThan(0)||!i.isGreaterThan(0)||!s.isGreaterThan(0))return null;let l=s.times(2),p=i.div(a).times(l).times(o);return p.isFinite()?oo(p,n):null}function Cf(){let{env:e,walletAddress:t,onOutlink:r}=jt(),n=Or(),o=!!t,{pools:a,isEmpty:i,isLoading:s}=wf(e,t,o),l=(0,kf.useMemo)(()=>a.map(h=>h.token.address),[a]),{detailMap:d}=vf(e,l,o&&l.length>0),p=rs(e,t,o),b=h=>`${Du[e]}/forge/token/${h.token.address}`,g=`${Br[e]}/forge.png`;return(0,Tt.jsx)(zr,{sectionKey:"forge",title:Ew,icon:g,iconFit:"contain",isEmpty:i,loading:s,children:a.map(h=>{let x=d.get(h.token.address.toLowerCase()),y=x?.image_url||x?.image||h.token.image||Aw,u=x?.symbol||h.token.symbol,c=b(h),w=Dw(h,x,p,n);return(0,Tt.jsxs)("a",{className:"wp-item","data-side":"lp",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"forge_outlink","data-track-id":u,onClick:m=>$t(m,c,{category:"portfolio",origin:"portfolio-forge",payload:{pool:h,tokenDetail:x}},r),children:[(0,Tt.jsxs)("div",{className:"wp-item-body",children:[(0,Tt.jsxs)("div",{className:"wp-item-line",children:[(0,Tt.jsx)("span",{className:"wp-item-label",children:"Asset"}),(0,Tt.jsxs)("div",{className:"wp-svc-token",children:[(0,Tt.jsx)("img",{className:"wp-svc-token-icon",src:y,alt:""}),(0,Tt.jsx)("span",{children:u}),x?.name&&(0,Tt.jsx)("span",{className:"wp-token-subtle",children:x.name})]})]}),(0,Tt.jsxs)("div",{className:"wp-item-line",children:[(0,Tt.jsx)("span",{className:"wp-item-label",children:"LP Balance"}),(0,Tt.jsx)("div",{className:"wp-svc-token wp-svc-token--amount",children:(0,Tt.jsxs)("div",{className:"wp-svc-amount",children:[(0,Tt.jsx)("span",{className:"wp-svc-amount-main",children:Mw(h.lp_balance)}),w&&(0,Tt.jsx)("span",{className:"wp-item-usd",children:w})]})})]}),(0,Tt.jsxs)("div",{className:"wp-item-line",children:[(0,Tt.jsx)("span",{className:"wp-item-label",children:"Ownership"}),(0,Tt.jsx)("span",{className:"wp-line-value",children:Lw(h.pool_ownership)})]})]}),(0,Tt.jsx)("div",{className:"wp-item-tags",children:(0,Tt.jsxs)("span",{className:"wp-tag wp-tag--muted",children:[(0,Tt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,Tt.jsx)(Ir,{size:12,className:"wp-tag-icon"})]})})]},h.pair_address)})})}var ed=require("react"),Wf=V(require("bignumber.js"),1);var Sf=require("@tanstack/react-query");var Pw="wp:crossd-positions";function Ow(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 Nf(e,t,r=!0){let n=r&&!!t,{data:o,...a}=(0,Sf.useQuery)({queryKey:[Pw,e,t],queryFn:async()=>{let s=await fetch(`${es[e]}/api/v1/positions?owner=${t}`,{cache:"no-store"});if(!s.ok)throw new Error(`crossd positions fetch failed: ${s.status}`);return Ow(await s.json())},enabled:n,staleTime:0}),i=o??[];return{positions:i,isEmpty:i.length===0,...a}}var Tf=require("@tanstack/react-query"),If=require("react");var Bw="wp:crossd-position-details";function zw(e){let t=e??{},r=t.data??t;return r?.token_id||r?.pool?r:null}function Ef(e,t,r=!0){let n=(0,Tf.useQueries)({queries:t.map(a=>({queryKey:[Bw,e,a],queryFn:async()=>{let i=await fetch(`${es[e]}/api/v1/positions/${a}`,{cache:"no-store"});if(!i.ok)throw new Error(`crossd position detail failed: ${i.status}`);return zw(await i.json())},enabled:r&&!!a,staleTime:6e4}))});return{detailMap:(0,If.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 An=V(require("react"),1);var de=require("react/jsx-runtime"),Fw=300*1e3,Af="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function Uw(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 Xl(e,t,r){return r?"Estimating...":`${e} ${t}`.trim()}function Mf({open:e,status:t,target:r,token0Icon:n,token1Icon:o,token0Symbol:a,token1Symbol:i,nativeSymbol:s,txHash:l,error:d,copied:p=!1,hasEstimator:b,prepareWithdraw:g,confirmWithdraw:h,onClose:x,onCopyHash:y,trackFunnel:u}){let[c,w]=An.useState(null),[m,v]=An.useState(null),R=An.useRef(0);An.useEffect(()=>{if(!e||!r)return;let $=++R.current;w(null),v(null),u?.("dialog_opened"),g().then(ye=>{R.current===$&&(w(ye),v(ye?Date.now():null))})},[e,r]);let C=t==="submitting",T=t==="estimating"||t==="confirm"&&!c,S=An.useCallback(async()=>{let $=c,ye=!m||Date.now()-m>Fw;if(!$||ye){let ve=++R.current;if($=await g(),R.current!==ve)return;w($),v($?Date.now():null)}$&&await h($)},[c,m,g,h]);if(!e||!r)return null;let{position:N,detail:I}=r,M=I.pool?.token0,O=I.pool?.token1,D=a||M?.symbol||N.pool?.token0_symbol||"?",W=i||O?.symbol||N.pool?.token1_symbol||"?",A=M?.decimals??18,G=O?.decimals??18,J=n||M?.logo_url||Af,ee=o||O?.logo_url||Af,re=`${D}/${W}`,L=c?Do(c.expectedAmount0.toString(),A):null,te=c?Do(c.expectedAmount1.toString(),G):null,ae=Oo(c?.estimate?.maxPriorityFeePerGas),F=Oo(c?.estimate?.maxFeePerGas??c?.estimate?.gasPrice),ne=qi(c?.estimate?.gasLimit);return(0,de.jsx)("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:$=>{$.target===$.currentTarget&&!C&&x()},children:(0,de.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,de.jsx)("div",{className:"wp-claim-grabber","aria-hidden":!0,children:(0,de.jsx)("span",{})}),(0,de.jsxs)("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&l?(0,de.jsxs)(de.Fragment,{children:[(0,de.jsx)("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:(0,de.jsx)(Ji,{})}),(0,de.jsxs)("div",{className:"wp-claim-copy",children:[(0,de.jsx)("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),(0,de.jsxs)("p",{className:"wp-claim-desc",children:["Your ",re," position withdrawal has been submitted. Balances will update shortly after the transaction settles."]})]}),(0,de.jsx)("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:(0,de.jsxs)("div",{className:"wp-claim-list-item",children:[(0,de.jsx)("span",{children:"Tx Hash"}),(0,de.jsxs)("button",{type:"button",className:"wp-claim-hash",onClick:y,"aria-label":"Copy transaction hash","data-track":"crossd_withdraw_hash_copy",children:[(0,de.jsx)("strong",{children:Vi(l)}),p?(0,de.jsx)(Xi,{}):(0,de.jsx)(Zi,{})]})]})})]}):(0,de.jsxs)(de.Fragment,{children:[t==="error"&&(0,de.jsxs)("div",{className:"wp-claim-heading",children:[(0,de.jsx)("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),(0,de.jsx)("p",{className:"wp-claim-error-message",children:d||"The withdraw request could not be completed."})]}),(0,de.jsxs)("div",{className:"wp-claim-reward-card","data-fit":ca(D,L??""),"aria-label":`Expected ${D}`,children:[(0,de.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,de.jsx)("img",{src:J,alt:"",width:28,height:28})}),(0,de.jsx)("strong",{className:"wp-claim-reward-symbol",children:D}),(0,de.jsx)("strong",{className:"wp-claim-reward-amount",children:L??"Estimating..."})]}),(0,de.jsxs)("div",{className:"wp-claim-reward-card","data-fit":ca(W,te??""),"aria-label":`Expected ${W}`,children:[(0,de.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,de.jsx)("img",{src:ee,alt:"",width:28,height:28})}),(0,de.jsx)("strong",{className:"wp-claim-reward-symbol",children:W}),(0,de.jsx)("strong",{className:"wp-claim-reward-amount",children:te??"Estimating..."})]}),b&&(0,de.jsx)("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:(0,de.jsxs)("div",{className:"wp-claim-detail-list",children:[(0,de.jsxs)("div",{className:"wp-claim-detail-row",children:[(0,de.jsx)("span",{children:"Est. Tx Fee"}),(0,de.jsx)("strong",{children:Uw(c?.estimate,T,s)})]}),(0,de.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,de.jsx)("span",{children:"Priority Fee Per Gas"}),(0,de.jsx)("strong",{children:Xl(ae,"Gwei",T)})]}),(0,de.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,de.jsx)("span",{children:"Max Fee Per Gas"}),(0,de.jsx)("strong",{children:Xl(F,"Gwei",T)})]}),(0,de.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,de.jsx)("span",{children:"Gas Limit"}),(0,de.jsx)("strong",{children:Xl(ne,"",T)})]})]})})]}),(0,de.jsxs)("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&(0,de.jsx)("button",{type:"button",className:"wp-claim-secondary","data-track":"crossd_withdraw_cancel",onClick:x,children:t==="error"?"Close":"Cancel"}),(0,de.jsx)("button",{type:"button",className:"wp-claim-primary","data-track":"crossd_withdraw_confirm",onClick:()=>{if(t==="success"){x();return}C||T||(u?.("confirm_clicked"),S())},disabled:C||T,children:t==="success"?"Done":C?(0,de.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}):T?(0,de.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Estimating"}):t==="error"?"Retry":"Withdraw"})]})]}),(0,de.jsx)("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:(0,de.jsx)("span",{})})]})})}var Mt=V(require("react"),1),Ff=require("@tanstack/react-query");var jw="0x0c49ccbe",Ww="0xfc6f7865",Gw="0x49404b7c",Hw="0xdf2ab5bb",_w="0xac9650d8",Lf=(1n<<128n)-1n,Pf=600n,Qw=99n,Vw=100n;function Jl(e){return e*Qw/Vw}function Df(e,t){return!!e&&!!t&&e.toLowerCase()===t.toLowerCase()}function Cr(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 ns(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 $l(e){return jw+Cr(e.tokenId,"tokenId")+Cr(e.liquidity,"liquidity")+Cr(e.amount0Min,"amount0Min")+Cr(e.amount1Min,"amount1Min")+Cr(e.deadline,"deadline")}function qw(e){return Ww+Cr(e.tokenId,"tokenId")+ns(e.recipient,"recipient")+Cr(e.amount0Max,"amount0Max")+Cr(e.amount1Max,"amount1Max")}function Yw(e,t){return Gw+Cr(e,"amountMinimum")+ns(t,"recipient")}function Kw(e,t,r){return Hw+ns(e,"token")+Cr(t,"amountMinimum")+ns(r,"recipient")}function Zw(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 Cr(BigInt(a.length/2),"callLength")+i.toLowerCase()}),r=BigInt(e.length)*32n,n=[];for(let o of t)n.push(Cr(r,"callOffset")),r+=BigInt(o.length/2);return _w+Cr(0x20n,"arrayOffset")+Cr(BigInt(e.length),"arrayLength")+n.join("")+t.join("")}function Of(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 Bf(e){let t=Df(e.token0,e.wcrossAddress),r=Df(e.token1,e.wcrossAddress),n=t||r,o=[$l({tokenId:e.tokenId,liquidity:e.liquidity,amount0Min:e.amount0Min,amount1Min:e.amount1Min,deadline:e.deadline}),qw({tokenId:e.tokenId,recipient:n?e.positionManagerAddress:e.owner,amount0Max:Lf,amount1Max:Lf})];return n&&(o.push(Yw(0n,e.owner)),o.push(Kw(t?e.token1:e.token0,0n,e.owner))),Zw(o)}async function zf(e,t,r){let n;try{n=await ga(e,r)}catch{n=void 0}if(!n)return null;let o=$l({tokenId:t.tokenId,liquidity:t.liquidity,amount0Min:0n,amount1Min:0n,deadline:t.deadline}),a=await Tn(n,t.positionManager,o,r,t.owner);return Of(a)}var Xw=[1500,3e3,4500,6e3];function Jw(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function Uf(){let{env:e,walletAddress:t,sendTransaction:r,estimateGas:n}=jt(),o=!!r,a=(0,Ff.useQueryClient)(),[i,s]=Mt.useState(!1),[l,d]=Mt.useState(null),[p,b]=Mt.useState("confirm"),[g,h]=Mt.useState(),[x,y]=Mt.useState(""),[u,c]=Mt.useState(!1),[w,m]=Mt.useState(new Set),v=Mt.useRef(void 0),R=Mt.useRef([]),C=Mt.useRef(0);Mt.useEffect(()=>()=>{clearTimeout(v.current),R.current.forEach(clearTimeout)},[]);let T=Mt.useRef(new Set),S=Mt.useCallback((A,G)=>{T.current.has(A)||(T.current.add(A),$e("withdraw",A,{...G,tags:{section:"crossdPool",...G?.tags}}))},[]),N=Mt.useCallback(()=>{let A=()=>In(a);A(),R.current.forEach(clearTimeout),R.current=Xw.map(G=>setTimeout(A,G))},[a]),I=Mt.useCallback(A=>{C.current+=1,d(A),s(!0),b("confirm"),h(void 0),y(""),c(!1),T.current=new Set,S("opened")},[S]),M=Mt.useCallback(()=>{p!=="submitting"&&(C.current+=1,s(!1),d(null),b("confirm"),h(void 0),y(""),c(!1))},[p]),O=Mt.useCallback(async()=>{let A=C.current,G=Jw(t),J=l?.position.token_id,ee=l?.position.liquidity,re=l?.detail.pool?.token0?.address,L=l?.detail.pool?.token1?.address;if(!G||!J||!ee||!re||!L)return b("error"),y("Position data is incomplete. Please refresh and retry."),null;try{b("estimating"),y("");let te=BigInt(J),ae=BigInt(ee),F=BigInt(Math.floor(Date.now()/1e3))+Pf,ne=zu[e],$=await zf(e,{owner:G,positionManager:ne,tokenId:te,liquidity:ae,deadline:F});if(C.current!==A)return null;if(!$)return b("error"),y("Failed to estimate withdrawal amounts. Please retry."),null;let ye=Bf({tokenId:te,liquidity:ae,amount0Min:Jl($.amount0),amount1Min:Jl($.amount1),deadline:F,owner:G,positionManagerAddress:ne,token0:re,token1:L,wcrossAddress:Fu[e]}),ve={to:ne,value:0n,data:ye,chainId:Ut[e].cross},Be=null;if(n){try{Be=await n({...ve,from:G})}catch{Be=null}if(C.current!==A)return null}return b("confirm"),{tx:ve,estimate:Be,expectedAmount0:$.amount0,expectedAmount1:$.amount1}}catch(te){return C.current!==A||(b("error"),y(pa(te,"Failed to prepare withdraw."))),null}},[e,n,l,t]),D=Mt.useCallback(async A=>{if(!r){b("error"),y("Withdraw is not available for this wallet.");return}try{b("submitting"),y(""),S("submitted");let G=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});h(G),b("success");let J=l?.position.token_id;J&&m(ee=>{let re=new Set(ee);return re.add(J),re}),S("confirmed"),N()}catch(G){b("error"),y(pa(G,"Failed to request withdraw.")),S("confirmed",{status:"failure",reason:Rr(G)})}},[N,r,l,S]),W=Mt.useCallback(async()=>{if(!(!g||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(g),c(!0),clearTimeout(v.current),v.current=setTimeout(()=>c(!1),1400)}catch{c(!1)}},[g]);return{canWithdrawInline:o,isOpen:i,target:l,withdrawnTokenIds:w,status:p,txHash:g,error:x,copied:u,hasEstimator:!!n,openWithdraw:I,closeWithdraw:M,prepareWithdraw:O,confirmWithdraw:D,copyHash:W,trackFunnelOnce:S}}var mt=require("react/jsx-runtime"),$w="ONEusd Pool",jf="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function Gf(){let{env:e,walletAddress:t,onOutlink:r}=jt(),n=Or(),o=!!t,{positions:a,isLoading:i}=Nf(e,t,o),s=Uf(),l=(0,ed.useMemo)(()=>a.filter(S=>!S.token_id||!s.withdrawnTokenIds.has(S.token_id)),[a,s.withdrawnTokenIds]),d=(0,ed.useMemo)(()=>l.map(S=>S.token_id).filter(S=>!!S),[l]),{detailMap:p}=Ef(e,d,o&&d.length>0),b=`${Bu[e]}/pool`,{getTokenImage:g,getTokenSymbol:h,getNativeToken:x}=un(e,o),y=g("","ONEUSD",{chainOnly:!0})||`${Br[e]}/crossd.png`,u={chainOnly:!0},c=(S,N)=>{let I=Ul(h(S?.address??"",S?.symbol??N,u));return I==="ONE"?x()?.symbol??"?":I??"?"},w=(S,N)=>{let I=S?.symbol??N,M=Ul(I);return M==="ONE"?x()?.image||jf:g(S?.address??"",M,u)||S?.logo_url||jf},m=s.target?.detail.pool,v=w(m?.token0,s.target?.position.pool?.token0_symbol),R=w(m?.token1,s.target?.position.pool?.token1_symbol),C=c(m?.token0,s.target?.position.pool?.token0_symbol),T=c(m?.token1,s.target?.position.pool?.token1_symbol);return(0,mt.jsxs)(mt.Fragment,{children:[(0,mt.jsx)(zr,{sectionKey:"crossdPool",title:$w,icon:y,iconFit:"contain",isEmpty:l.length===0,loading:i,children:l.map(S=>{let N=S.token_id?p.get(S.token_id):void 0,I=`${c(N?.pool?.token0,S.pool?.token0_symbol)}/${c(N?.pool?.token1,S.pool?.token1_symbol)}`,M=S.pool?.fee_tier_percentage,O=w(N?.pool?.token0,S.pool?.token0_symbol),D=w(N?.pool?.token1,S.pool?.token1_symbol),W=oo(new Wf.default(S.position_value_usd??"0"),n),A=s.canWithdrawInline&&!!N?.pool?.token0?.address&&!!N?.pool?.token1?.address;return(0,mt.jsxs)("article",{className:"wp-item","data-side":"crossd",children:[(0,mt.jsxs)("div",{className:"wp-item-body",children:[(0,mt.jsxs)("div",{className:"wp-item-line",children:[(0,mt.jsx)("span",{className:"wp-item-label",children:"Pool"}),(0,mt.jsxs)("div",{className:"wp-svc-token",children:[(0,mt.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[(0,mt.jsx)("img",{className:"wp-svc-token-icon",src:O,alt:""}),(0,mt.jsx)("img",{className:"wp-svc-token-icon",src:D,alt:""})]}),(0,mt.jsx)("span",{children:I}),M&&(0,mt.jsx)("span",{className:"wp-token-subtle",children:M})]})]}),(0,mt.jsxs)("div",{className:"wp-item-line",children:[(0,mt.jsx)("span",{className:"wp-item-label",children:"Position Value"}),(0,mt.jsx)("span",{className:"wp-line-value",children:W})]})]}),(0,mt.jsx)("div",{className:"wp-item-tags",children:A?(0,mt.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:S,detail:N})},children:(0,mt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"})}):(0,mt.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:G=>$t(G,b,{category:"portfolio",origin:"portfolio-crossd-pool",payload:{position:S,detail:N}},r),children:[(0,mt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,mt.jsx)(Ir,{size:12,className:"wp-tag-icon"})]})})]},S.token_id)})}),(0,mt.jsx)(Mf,{open:s.isOpen,status:s.status,target:s.target,token0Icon:v,token1Icon:R,token0Symbol:C,token1Symbol:T,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 ba=["rewards","points","staking","gameSwap","forge","crossdPool"];we(`.wp-fullscreen[data-theme=dark],.wp-embed[data-theme=dark]{--wp-bg: var(--ds-bg-default, #202530);--wp-header-bg: var(--ds-surface-default, #252b39);--wp-card: var(--ds-surface-medium, #252b39);--wp-control: #292f40;--wp-border: var(--ds-border-default, #292f40);--wp-panel-border: var(--ds-border-medium, rgba(255, 255, 255, .18));--wp-panel-shadow: 0px 4px 30px -1px rgba(0, 0, 0, .28);--wp-text: var(--ds-content-highest, #ffffff);--wp-text-60: var(--ds-content-high, rgba(255, 255, 255, .85));--wp-text-40: var(--ds-content-medium, rgba(255, 255, 255, .65));--wp-text-30: var(--ds-content-low, rgba(255, 255, 255, .4));--wp-chrome-text: #ffffff;--wp-tooltip-bg: #151a23;--wp-tooltip-text: #ffffff;--wp-mint: var(--ds-accent-primary-high, #f0640d);--wp-green: var(--ds-system-green-high, #00a0a2);--wp-accent-soft: var(--ds-accent-primary-lowest, #362519);--wp-red: var(--ds-system-red-default, #e70077);--wp-blue: #0488fc;--wp-purple: #7346f3;--wp-orange: #ff9d00;--wp-claim-primary: #ed0a72;--wp-claim-primary-text: #ffffff;--wp-claim-secondary-bg: var(--wp-control);--wp-claim-success: #00d4aa;--wp-claim-success-soft: rgba(0, 212, 170, .18);--wp-claim-error: #ff3aa3;--wp-claim-error-soft: rgba(255, 58, 163, .16)}.wp-fullscreen[data-theme=light],.wp-embed[data-theme=light]{--wp-bg: var(--ds-bg-dim, #f5f7fa);--wp-header-bg: var(--ds-surface-default, #ffffff);--wp-card: var(--ds-surface-default, #ffffff);--wp-control: var(--ds-surface-medium, #f5f7fa);--wp-border: var(--ds-border-default, rgba(0, 0, 0, .07));--wp-panel-border: var(--ds-border-medium, rgba(0, 0, 0, .18));--wp-panel-shadow: 0px 4px 30px -1px rgba(0, 0, 0, .15);--wp-text: var(--ds-content-highest, #000000);--wp-text-60: var(--ds-content-high, rgba(0, 0, 0, .85));--wp-text-40: var(--ds-content-medium, rgba(0, 0, 0, .65));--wp-text-30: var(--ds-content-low, rgba(0, 0, 0, .4));--wp-chrome-text: var(--ds-content-high, rgba(0, 0, 0, .85));--wp-card-shadow: none;--wp-tooltip-bg: #192023;--wp-tooltip-text: #ffffff;--wp-mint: var(--ds-accent-primary-high, #f0640d);--wp-green: var(--ds-system-green-high, #00a0a2);--wp-accent-soft: var(--ds-accent-primary-low, #fff5ee);--wp-red: var(--ds-system-red-default, #e70077);--wp-blue: #0488fc;--wp-purple: #7346f3;--wp-orange: #ff9d00;--wp-claim-primary: #ed0a72;--wp-claim-primary-text: #ffffff;--wp-claim-secondary-bg: #ffffff;--wp-claim-success: #019d92;--wp-claim-success-soft: rgba(1, 157, 146, .15);--wp-claim-error: #e70077;--wp-claim-error-soft: rgba(231, 0, 119, .12)}.wp-fullscreen{position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;max-height:100dvh!important;z-index:50;background:var(--wp-bg);display:flex;flex-direction:column;overflow:hidden;font-family:inherit;font-feature-settings:"calt" 0,"lnum" 1,"pnum" 1;box-sizing:border-box;-webkit-font-smoothing:antialiased;color:var(--wp-chrome-text)}.wp-embed{width:100%;height:100%;min-height:0;background:var(--wp-bg);display:flex;flex-direction:column;overflow:hidden;position:relative;font-family:inherit;font-feature-settings:"calt" 0,"lnum" 1,"pnum" 1;box-sizing:border-box;-webkit-font-smoothing:antialiased;color:var(--wp-chrome-text)}.wp-overlay{position:fixed;inset:0;z-index:49;background:#0009}.wp-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:73px;padding:24px;position:relative;border-bottom:1px solid var(--wp-border);background:var(--wp-header-bg);color:var(--wp-chrome-text);flex-shrink:0;box-sizing:border-box}.wp-fullscreen .wp-header{height:60px;min-height:60px;padding:11px 20px;border-bottom:none;background:transparent}.wp-fullscreen .wp-header-btn{width:22px;height:22px;color:var(--wp-chrome-text)}.wp-fullscreen .wp-header-btn:hover{color:var(--wp-chrome-text)}.wp-header-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wp-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wp-header-edge{display:flex;align-items:center;width:24px;min-width:24px}.wp-header-edge--right{justify-content:flex-end}.wp-header-edge--right .wp-header-btn{position:absolute;top:24px;right:24px}.wp-header-spacer{display:block;width:24px;height:24px}.wp-header-avatar{width:38px;height:38px;flex-shrink:0;border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:var(--wp-header-avatar-bg)}.wp-header-avatar-img{width:30px;height:30px;object-fit:cover;display:block}.wp-fullscreen[data-theme=dark] .wp-header-avatar,.wp-embed[data-theme=dark] .wp-header-avatar{--wp-header-avatar-bg: hsl(221.3 24.6% 25.5%)}.wp-fullscreen[data-theme=light] .wp-header-avatar,.wp-embed[data-theme=light] .wp-header-avatar{--wp-header-avatar-bg: rgba(18, 18, 18, .1)}.wp-refresh-btn{position:relative}.wp-refresh-badge{position:absolute;top:-6px;right:-8px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--wp-mint);color:#fff;font-size:10px;font-weight:600;line-height:16px;text-align:center}.wp-spin-once{animation:wp-spin-once .6s ease-in-out}@keyframes wp-spin-once{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.wp-header-title{flex:1;font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;text-align:center;color:var(--ds-content-highest, #000000);margin:0}.wp-header-account{flex:1;display:flex;align-items:center;gap:12px;min-width:0}.wp-header-account-meta{display:flex;flex-direction:column;justify-content:center;min-width:0;gap:2px}.wp-header-wallet-name{min-width:0;font-family:inherit;font-size:15px;font-weight:600;line-height:1.4;letter-spacing:0;color:var(--wp-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-header-address-btn{display:inline-flex;align-items:center;gap:4px;align-self:flex-start;max-width:100%;padding:0;border:0;background:transparent;cursor:pointer;font:inherit}.wp-header-address{min-width:0;font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;color:var(--wp-text-40);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-header-address-copy{display:inline-flex;align-items:center;flex-shrink:0;color:var(--wp-text-40);transition:color .15s ease}.wp-header-address-btn:hover .wp-header-address-copy{color:var(--wp-text-60)}.wp-header-address-copy[data-copied=true]{color:var(--wp-mint)}.wp-top{flex-shrink:0;padding:0 16px 16px;display:flex;flex-direction:column;gap:16px}.wp-identity{display:flex;flex-direction:column;gap:8px}.wp-address{display:inline-flex;align-items:center;gap:8px}.wp-address-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-address-chevron{display:inline-flex;align-items:center;color:var(--wp-text-40)}.wp-total{font-size:28px;font-weight:600;line-height:1.3;color:var(--wp-text);margin:0}.wp-asset{display:flex;flex-direction:column;gap:8px}.wp-asset-head{display:flex;align-items:center;gap:4px}.wp-asset-head-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-asset-head-icon{display:inline-flex;color:var(--wp-text-40)}.wp-bar{display:flex;height:20px;border-radius:4px;overflow:hidden}.wp-bar-seg{display:flex;align-items:center;justify-content:center;min-width:8px}.wp-bar-seg-pct{font-size:10px;font-weight:400;line-height:1.3;color:#fff;white-space:nowrap}.wp-legend{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap}.wp-legend-item{display:flex;align-items:center;gap:4px}.wp-legend-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.wp-legend-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-tabs{flex-shrink:0;padding:8px 16px}.wp-tabs-inner{display:flex;align-items:center;padding:0 2px}.wp-tabs-list{display:flex;gap:20px;flex:1}.wp-tab{display:flex;flex-direction:column;align-items:center;justify-content:space-between;height:44px;padding-top:12px;background:transparent;border:none;cursor:pointer}.wp-tab-text{font-size:14px;font-weight:600;line-height:1.4;color:var(--wp-text-30);white-space:nowrap}.wp-tab[data-active=true] .wp-tab-text{color:var(--wp-mint)}.wp-tab-bar{width:20px;height:4px;border-radius:2px;background:var(--wp-mint);opacity:0}.wp-tab[data-active=true] .wp-tab-bar{opacity:1}.wp-tabs-filter-wrap{position:relative;display:flex;align-items:center;width:44px;height:44px;flex-shrink:0}.wp-tabs-filter-grad{position:absolute;inset:0;background:linear-gradient(to left,var(--wp-bg) 74%,transparent);pointer-events:none}.wp-tabs-filter{position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--wp-text-40)}.wp-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--wp-border) transparent}.wp-body::-webkit-scrollbar{width:4px}.wp-body::-webkit-scrollbar-track{background:transparent}.wp-body::-webkit-scrollbar-thumb{background:var(--wp-border);border-radius:4px}.wp-body-inner{padding:16px 16px 32px;display:flex;flex-direction:column;gap:32px}.wp-fullscreen .wp-body-inner{padding-top:8px;gap:24px}.wp-summary-card{display:flex;flex-direction:column;gap:8px;width:100%;padding:0;border-radius:0;background:transparent;box-shadow:none;box-sizing:border-box}.wp-summary-head{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:4px}.wp-summary-label{font-size:14px;font-weight:400;line-height:1.5;letter-spacing:0;color:var(--wp-text-40);white-space:nowrap}.wp-address{display:inline-flex;align-items:center;gap:8px;min-width:0}.wp-address-avatar{width:16px;height:16px;border-radius:50%;flex-shrink:0;background:radial-gradient(circle at 68% 34%,#ff78d1 0 18%,transparent 19%),radial-gradient(circle at 34% 66%,#00d4aa 0 20%,transparent 21%),linear-gradient(135deg,#7346f3,#0488fc)}.wp-address-label{font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;color:var(--wp-text-40);white-space:nowrap}.wp-address-chevron{display:inline-flex;align-items:center;color:var(--wp-text-40);flex-shrink:0}.wp-summary-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;border-radius:999px;background:#019d921a;color:var(--wp-mint);font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;white-space:nowrap}.wp-summary-estimate{position:relative;display:inline-flex;align-items:center;gap:6px;flex-shrink:0}.wp-estimate-info{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--wp-text-40);cursor:help}.wp-estimate-tooltip{position:absolute;top:calc(100% + 8px);left:0;right:auto;z-index:3;display:flex;flex-direction:column;gap:8px;width:min(280px,calc(100vw - 48px));padding:12px;border-radius:8px;background:var(--wp-tooltip-bg);box-shadow:0 12px 32px #0000003d;color:var(--wp-tooltip-text);font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;text-align:left;white-space:normal;opacity:0;pointer-events:none;transform:translateY(-4px);visibility:hidden;transition:opacity .15s ease,transform .15s ease,visibility .15s ease}.wp-estimate-tooltip-title{display:block;font-size:12px;font-weight:600;line-height:1.3}.wp-estimate-tooltip-group{display:flex;flex-direction:column;gap:4px}.wp-estimate-tooltip-item{display:block;color:#ffffffc7}.wp-estimate-tooltip-item:before{content:"- "}.wp-estimate-info:hover .wp-estimate-tooltip,.wp-estimate-info:focus .wp-estimate-tooltip,.wp-estimate-info:focus-visible .wp-estimate-tooltip{opacity:1;transform:translateY(0);visibility:visible}.wp-total{font-family:var( --wp-total-font-family, Sora, Inter, system-ui, -apple-system, sans-serif );font-size:36px;font-weight:600;line-height:1.25;letter-spacing:0;color:var(--wp-text);margin:0}.wp-svc-card{display:flex;flex-direction:column;gap:12px;width:100%}.wp-svc-card-head{display:flex;align-items:center;gap:6px}.wp-svc-card-icon{width:24px;height:24px;border-radius:4px;flex-shrink:0;object-fit:cover}.wp-svc-card-title{font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wp-svc-items{display:flex;flex-direction:column;gap:8px;width:100%;padding:0;border-radius:0;background:transparent;box-shadow:none;box-sizing:border-box}.wp-item{position:relative;display:flex;flex-direction:column;gap:20px;width:100%;padding:12px;border-radius:12px;background:var(--wp-card);box-shadow:var(--wp-card-shadow, none);box-sizing:border-box;color:inherit;text-decoration:none;cursor:pointer;outline:none;transition:opacity .15s ease}.wp-item+.wp-item{padding-top:12px;border-top:0}.wp-item:hover{opacity:.88}.wp-item-body{display:flex;flex-direction:column;gap:12px;min-width:0}.wp-order-head{display:flex;align-items:center;width:100%}.wp-item-line{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:21px;min-width:0}.wp-item-label{flex-shrink:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-30);white-space:nowrap}.wp-line-value,.wp-order-side{min-width:0;overflow:hidden;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-order-side--buy{color:var(--wp-mint)}.wp-order-side--sell{color:var(--wp-red)}.wp-svc-token{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;min-height:21px}.wp-svc-token>span{font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-svc-token-icon{width:16px;height:16px;border-radius:50%;flex-shrink:0;object-fit:cover}.wp-item[data-side=reward] .wp-svc-token-icon{border-radius:0;object-fit:contain}.wp-svc-token--amount{align-items:flex-start}.wp-svc-token--amount>.wp-svc-token-icon{margin-top:2.5px}.wp-token-stack{display:inline-flex;align-items:center;justify-content:flex-end;width:29px;min-width:29px;overflow:visible}.wp-token-stack .wp-svc-token-icon+.wp-svc-token-icon{margin-left:-3.5px}.wp-token-subtle,.wp-item-usd{color:var(--wp-text-30)!important}.wp-svc-amount{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:1px;min-width:0}.wp-svc-amount-main{font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.wp-svc-amount .wp-item-usd{font-size:12px;font-weight:500;line-height:1.35}.wp-order-token{display:flex;align-items:center;gap:8px;min-width:0}.wp-order-token .wp-svc-token-icon{width:32px;height:32px}.wp-order-token-meta{display:flex;min-width:0;flex-direction:column;justify-content:center}.wp-order-token-symbol{overflow:hidden;color:var(--wp-text-60);font-size:14px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.wp-order-token-pair{overflow:hidden;color:var(--wp-text-30);font-size:12px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.wp-item-tags{display:flex;align-items:stretch;gap:8px;width:100%}.wp-tag{appearance:none;display:inline-flex;flex:1 1 0;align-items:center;justify-content:center;gap:0;min-width:0;min-height:33px;padding:6px 10px;border-radius:6px;border:0;background:var(--wp-control);font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:0;color:var(--wp-text-40);text-align:center;text-decoration:none;white-space:nowrap;box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,color .15s ease,transform .15s ease}a.wp-tag,button.wp-tag{cursor:pointer}.wp-tag:hover{background:var(--wp-control);transform:none}.wp-tag:focus-visible{outline:2px solid var(--wp-mint);outline-offset:2px}.wp-tag[aria-disabled=true],.wp-tag[data-disabled]{cursor:default;opacity:.48;pointer-events:none}.wp-tag-label{display:inline-flex;align-items:center}.wp-tag-icon{display:none}.wp-tag:hover .wp-tag-icon{transform:none}.wp-tag--mint{color:var(--wp-mint);background:var(--wp-accent-soft)}.wp-tag--mint:hover{background:var(--wp-accent-soft)}.wp-tag--muted{color:var(--wp-text-40)}.wp-body-inner[data-empty]{min-height:100%;box-sizing:border-box;justify-content:center}.wp-portfolio-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:280px;padding:32px 24px;text-align:center}.wp-portfolio-empty-icon{display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin-bottom:6px;border-radius:50%;background:var(--wp-card);box-shadow:var(--wp-card-shadow, none);color:var(--wp-text-30)}.wp-portfolio-empty-title{margin:0;font-size:15px;font-weight:600;line-height:1.3;color:var(--wp-text-60)}.wp-portfolio-empty-desc{margin:0;font-size:13px;font-weight:400;line-height:1.4;color:var(--wp-text-30)}.wp-portfolio-loading{display:flex;align-items:center;justify-content:center;min-height:280px;padding:32px 24px}.wp-portfolio-spinner{width:22px;height:22px;border:2px solid var(--wp-border);border-top-color:var(--wp-mint);border-radius:50%;animation:wp-claim-spin .8s linear infinite}.wp-claim-overlay{position:absolute;inset:0;z-index:8;display:flex;align-items:flex-end;justify-content:center;background:#00000094;box-sizing:border-box}.wp-claim-sheet{display:flex;flex-direction:column;width:100%;max-height:calc(100% - 24px);overflow:hidden;border-radius:24px 24px 0 0;background:var(--wp-bg);color:var(--wp-text);box-shadow:0 -18px 48px #00000042;animation:wp-claim-slide-up .22s ease-out}@keyframes wp-claim-slide-up{0%{transform:translateY(18px);opacity:0}to{transform:translateY(0);opacity:1}}.wi-popover-content .wp-claim-sheet{min-height:min(600px,calc(100% - 24px))}.wi-popover-content .wp-claim-content{flex:1 1 auto}.wi-popover-content .wp-claim-actions{margin-top:auto}.wp-claim-grabber{display:flex;align-items:flex-start;justify-content:center;height:38px;min-height:38px;padding-top:12px;box-sizing:border-box}.wp-claim-grabber span{display:block;width:52px;height:5px;border-radius:999px;background:var(--wp-control)}.wp-claim-content{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;padding:20px;box-sizing:border-box}.wp-claim-icon{display:inline-flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:50%;flex-shrink:0}.wp-claim-icon--success{background:var(--wp-claim-success-soft);color:var(--wp-claim-success)}.wp-claim-icon--pending{background:#9b8cef29;color:var(--wp-claim-primary)}.wp-claim-icon--error{background:var(--wp-claim-error-soft);color:var(--wp-claim-error);font-size:30px;font-weight:600;line-height:1}.wp-claim-icon--token{background:#00d4aa29}.wp-claim-icon--token img{width:48px;height:48px;border-radius:50%;object-fit:cover}.wp-claim-icon--token span{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;background:var(--wp-mint);color:#101820;font-size:18px;font-weight:600}.wp-claim-spinner{width:36px;height:36px;border-radius:50%;border:3px solid rgba(155,140,239,.28);border-top-color:var(--wp-claim-primary);animation:wp-claim-spin .8s linear infinite}@keyframes wp-claim-spin{to{transform:rotate(360deg)}}.wp-claim-copy{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;text-align:center}.wp-claim-title{margin:0;font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;color:var(--wp-text)}.wp-claim-desc{max-width:335px;margin:0;font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;color:var(--wp-text-40)}.wp-claim-heading{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.wp-claim-error-message{margin:0;color:var(--wp-claim-error);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0}.wp-claim-reward-card{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;min-height:60px;padding:16px 8px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-reward-token{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;flex-shrink:0;overflow:hidden;background:var(--wp-control)}.wp-claim-reward-token img{width:28px;height:28px;object-fit:cover}.wp-claim-reward-token span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--wp-mint);color:#101820;font-size:13px;font-weight:600;line-height:1}.wp-claim-reward-symbol{flex:1 1 auto;min-width:0;overflow:hidden;color:var(--wp-text);font-size:18px;font-weight:600;line-height:1.3;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.wp-claim-reward-amount{flex-shrink:0;color:var(--wp-text);font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-reward-card[data-fit=sm] .wp-claim-reward-symbol{font-size:14px}.wp-claim-reward-card[data-fit=sm] .wp-claim-reward-amount{font-size:16px}.wp-claim-reward-card[data-fit=xs] .wp-claim-reward-symbol{font-size:12px}.wp-claim-reward-card[data-fit=xs] .wp-claim-reward-amount{font-size:13px}.wp-claim-account-card{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-account-row{display:flex;align-items:center;justify-content:space-between;gap:4px;width:100%;min-height:40px}.wp-claim-account-row>span{flex-shrink:0;color:var(--wp-text-40);font-size:14px;font-weight:400;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-account{display:flex;align-items:center;gap:8px;min-width:0}.wp-claim-account strong{overflow:hidden;color:var(--wp-text);font-size:15px;font-weight:600;line-height:1.6;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.wp-claim-account-avatar{width:32px;height:32px;border-radius:50%;flex-shrink:0;background:radial-gradient(circle at 30% 28%,#d87aff 0 12%,transparent 13%),radial-gradient(circle at 68% 28%,#f0a1ff 0 12%,transparent 13%),radial-gradient(circle at 32% 70%,#b561e7 0 13%,transparent 14%),radial-gradient(circle at 70% 70%,#d4a2ff 0 13%,transparent 14%),radial-gradient(circle at 50% 50%,#8c4fc4 0 18%,transparent 19%),#4a315f;box-shadow:inset 0 0 0 3.37px var(--wp-control)}.wp-claim-divider{display:block;width:100%;height:1px;background:var(--wp-border)}.wp-claim-detail-list{display:flex;flex-direction:column;gap:8px;width:100%}.wp-claim-detail-row{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;min-height:20px}.wp-claim-detail-row>span{min-width:0;color:var(--wp-text-40);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-detail-row--sub>span:before{content:"";display:inline-block;width:3px;height:3px;margin:0 8px 3px;background:currentColor}.wp-claim-detail-row strong{min-width:0;overflow:hidden;color:var(--wp-text);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-list{display:flex;flex-direction:column;gap:8px;width:100%;padding-bottom:8px}.wp-claim-list-item{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px;padding:8px 16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-list-item>span{flex-shrink:0;font-size:14px;font-weight:400;line-height:1.3;color:var(--wp-text-40);white-space:nowrap}.wp-claim-list-item strong{display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;overflow:hidden;color:var(--wp-text);font-size:14px;font-weight:400;line-height:1.3;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-list-item img{width:16px;height:16px;border-radius:50%;flex-shrink:0}.wp-claim-hash{appearance:none;display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;padding:0;border:none;background:transparent;color:var(--wp-text);cursor:pointer;font:inherit}.wp-claim-hash svg{flex-shrink:0;color:var(--wp-text-60)}.wp-claim-gas-card{display:flex;flex-direction:column;gap:4px;width:100%;padding:14px 16px;border-radius:8px;border:1px solid var(--wp-border);background:var(--wp-card);box-sizing:border-box}.wp-claim-gas-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:28px}.wp-claim-gas-row>span{min-width:0;font-size:12px;font-weight:400;line-height:1.3;color:var(--wp-text-40)}.wp-claim-gas-row strong{min-width:0;overflow:hidden;color:var(--wp-text);font-size:12px;font-weight:400;line-height:1.3;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-gas-row--primary{min-height:32px}.wp-claim-gas-row--primary>span,.wp-claim-gas-row--primary strong{font-size:14px;color:var(--wp-text)}.wp-claim-fee-label{position:relative;display:inline-flex;align-items:center;text-decoration:underline dotted;text-underline-offset:3px;cursor:help;overflow:visible!important}.wp-claim-fee-tooltip{position:absolute;left:0;bottom:calc(100% + 8px);z-index:2;width:min(260px,calc(100vw - 64px));padding:10px 12px;border-radius:8px;background:var(--wp-tooltip-bg);color:var(--wp-tooltip-text);box-shadow:0 12px 32px #0000003d;font-size:11px;font-weight:400;line-height:1.4;text-align:left;text-decoration:none;white-space:normal;opacity:0;pointer-events:none;transform:translateY(4px);visibility:hidden;transition:opacity .15s ease,transform .15s ease,visibility .15s ease}.wp-claim-fee-label:hover .wp-claim-fee-tooltip,.wp-claim-fee-label:focus .wp-claim-fee-tooltip,.wp-claim-fee-label:focus-visible .wp-claim-fee-tooltip{opacity:1;transform:translateY(0);visibility:visible}.wp-claim-actions{display:flex;align-items:center;gap:8px;width:100%}.wp-claim-primary,.wp-claim-secondary{appearance:none;display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:0;height:52px;padding:0 24px;border:none;border-radius:40px;font-family:inherit;font-size:15px;font-weight:600;line-height:1.3;letter-spacing:0;white-space:nowrap;cursor:pointer}.wp-claim-primary{background:var(--wp-claim-primary);color:var(--wp-claim-primary-text)}.wp-claim-primary:disabled{cursor:default;opacity:.72}.wp-claim-secondary{background:var(--wp-claim-secondary-bg, var(--wp-control));color:var(--wp-claim-primary)}.wp-claim-actions[data-count="2"] .wp-claim-primary{flex:1 1 0}.wp-claim-actions[data-count="2"] .wp-claim-secondary{flex:0 0 120px}.wp-claim-button-spinner{width:16px;height:16px;border-radius:50%;border:2px solid rgba(32,37,48,.28);border-top-color:var(--wp-claim-primary-text);animation:wp-claim-spin .8s linear infinite}.wp-claim-home-indicator{display:flex;align-items:flex-end;justify-content:center;height:34px;min-height:34px;padding-bottom:8px;box-sizing:border-box}.wp-claim-home-indicator span{display:block;width:134px;height:5px;border-radius:16px;background:var(--wp-text-40)}@media(max-width:359px){.wp-header{gap:12px;padding:0 12px}.wp-total{font-size:24px}.wp-body-inner{padding:0 12px 128px;gap:20px}.wp-claim-content{padding:18px 14px}.wp-item-line{gap:10px}.wp-svc-token>span{max-width:168px}}@media(max-width:360px){.wp-item-label-sub{display:none}}.wp-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.wi-drawer-content .wp-header,.wi-portfolio-body .wp-header{padding:16px}.wi-drawer-content .wp-header-edge--right .wp-header-btn,.wi-portfolio-body .wp-header-edge--right .wp-header-btn{top:16px;right:16px}.wp-withdraw-amount-card{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-withdraw-amount-row{display:flex;align-items:center;gap:8px;width:100%}.wp-withdraw-input{flex:1 1 auto;min-width:0;padding:0;border:none;background:transparent;color:var(--wp-text);font-family:inherit;font-size:24px;font-weight:600;line-height:1.3;letter-spacing:0;text-align:left;outline:none}.wp-withdraw-input::placeholder{color:var(--wp-text-30)}.wp-withdraw-input[aria-invalid=true]{color:var(--wp-claim-error)}.wp-withdraw-input-symbol{flex-shrink:0;color:var(--wp-text-40);font-size:15px;font-weight:600;line-height:1.3}.wp-withdraw-quick-row{display:flex;align-items:center;gap:8px;width:100%}.wp-withdraw-quick{appearance:none;flex:1 1 0;min-width:0;height:32px;padding:0 10px;border:1px solid var(--wp-border);border-radius:999px;background:transparent;color:var(--wp-text-60);font-family:inherit;font-size:13px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer}.wp-withdraw-quick:hover:not(:disabled){border-color:var(--wp-claim-primary);color:var(--wp-claim-primary)}.wp-withdraw-quick:disabled{cursor:default;opacity:.5}.wp-withdraw-content{overflow-y:auto}.wp-withdraw-token-list{display:flex;flex-direction:column;gap:8px;width:100%;max-height:216px;overflow-y:auto}.wp-withdraw-token{appearance:none;display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:10px 12px;border:1px solid var(--wp-border);border-radius:8px;background:var(--wp-card);color:var(--wp-text);font-family:inherit;text-align:left;cursor:pointer;box-sizing:border-box}.wp-withdraw-token[data-selected]{border-color:var(--wp-claim-primary);box-shadow:inset 0 0 0 1px var(--wp-claim-primary)}.wp-withdraw-token:disabled{cursor:default;opacity:.6}.wp-withdraw-token-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;flex-shrink:0;overflow:hidden;background:var(--wp-control)}.wp-withdraw-token-icon img{width:28px;height:28px;object-fit:cover}.wp-withdraw-token-icon span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--wp-mint);color:#101820;font-size:13px;font-weight:600;line-height:1}.wp-withdraw-token-symbol{flex:1 1 auto;min-width:0;overflow:hidden;font-size:15px;font-weight:600;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}.wp-withdraw-token-amount{flex-shrink:0;color:var(--wp-text-40);font-size:13px;font-weight:500;line-height:1.3;white-space:nowrap}
|
|
9
|
-
`);var Ne=require("react/jsx-runtime"),td=15;function io({env:e,theme:t="light",walletAddress:r,walletName:n,onBack:o,showHeader:a=!0,autoRefresh:i=!0,variant:s="embed",className:l,onOutlink:d,lpBalanceReader:p,stakingRewardsReader:b,sendTransaction:g,estimateGas:h,conversionRatio:x,currencySymbol:y,sections:u}){let c=it(e),w=Ht.useCallback(he=>!u||u.includes(he),[u]),m=!!r,v=(0,Hf.useQueryClient)(),[R,C]=Ht.useState({}),T=Ht.useCallback((he,Re)=>{C(Ce=>{let rt=Ce[he];return rt&&rt.loading===Re.loading&&rt.empty===Re.empty?Ce:{...Ce,[he]:Re}})},[]),S=Ht.useCallback(he=>{C(Re=>{if(!(he in Re))return Re;let Ce={...Re};return delete Ce[he],Ce})},[]),N=Ht.useMemo(()=>({report:T,unregister:S}),[T,S]),[I,M]=Ht.useState(td),[O,D]=Ht.useState(!1),[W,A]=Ht.useState(!1),G=Ht.useRef(void 0),J=Ht.useCallback(()=>{In(v)},[v]),ee=Ht.useCallback(()=>{J(),D(!0),setTimeout(()=>D(!1),600),M(td)},[J]);Ht.useEffect(()=>{if(!m||!i)return;let he=setInterval(()=>{M(Re=>Re<=1?(ee(),td):Re-1)},1e3);return()=>clearInterval(he)},[m,i,ee]);let re=Ht.useCallback(()=>{o?.()},[o]),L=m?Cn(c,r,{size:64}):void 0,te=Ht.useCallback(async()=>{if(!(W||!r))try{await navigator.clipboard.writeText(r),A(!0),clearTimeout(G.current),G.current=setTimeout(()=>A(!1),2e3)}catch{}},[r,W]);Ht.useEffect(()=>()=>clearTimeout(G.current),[]);let ae=Ht.useMemo(()=>({env:c,theme:t,open:!0,walletAddress:r,close:re,onOutlink:d,lpBalanceReader:p,stakingRewardsReader:b,sendTransaction:g,estimateGas:h,conversionRatio:x,currencySymbol:y}),[c,t,r,re,d,p,b,g,h,x,y]),F=ba.filter(w),ne=F.length>0&&F.every(he=>{let Re=R[he];return!!Re&&!Re.loading}),$=ne&&F.every(he=>R[he]?.empty),ye=F.some(he=>{let Re=R[he];return!!Re&&!Re.empty}),ve=F.length>0&&!ne&&!ye,Be=(0,Ne.jsxs)(Ne.Fragment,{children:[a&&(0,Ne.jsxs)("div",{className:"wp-header",children:[(0,Ne.jsxs)("div",{className:"wp-header-account",children:[o&&(0,Ne.jsx)("button",{type:"button",className:"wp-header-btn","aria-label":"Back","data-track":"back",onClick:o,children:(0,Ne.jsx)(Su,{})}),(0,Ne.jsx)("span",{className:"wp-header-avatar","aria-hidden":!0,children:L&&(0,Ne.jsx)("img",{src:L,alt:"",className:"wp-header-avatar-img",draggable:!1})}),(n||r)&&(0,Ne.jsxs)("div",{className:"wp-header-account-meta",children:[n&&(0,Ne.jsx)("span",{className:"wp-header-wallet-name",title:n,children:n}),r&&(0,Ne.jsxs)("button",{type:"button",className:"wp-header-address-btn",onClick:te,"aria-label":"Copy wallet address","data-track":"address_copy",children:[(0,Ne.jsx)("span",{className:"wp-header-address",children:Qi(r)}),(0,Ne.jsx)("span",{className:"wp-header-address-copy","data-copied":W,children:W?(0,Ne.jsx)(vn,{size:14}):(0,Ne.jsx)(to,{size:14})})]})]})]}),(0,Ne.jsxs)("button",{type:"button",className:"wp-header-btn wp-refresh-btn","aria-label":"Refresh portfolio","data-track":"refresh",onClick:ee,children:[(0,Ne.jsx)(Nu,{className:O?"wp-spin-once":void 0}),m&&(0,Ne.jsx)("span",{className:"wp-refresh-badge",children:I})]})]}),(0,Ne.jsx)("div",{className:"wp-body",children:(0,Ne.jsxs)("div",{className:"wp-body-inner","data-empty":$||void 0,children:[w("rewards")&&(0,Ne.jsx)(Wu,{}),w("points")&&(0,Ne.jsx)(Ju,{}),w("staking")&&(0,Ne.jsx)(df,{}),w("gameSwap")&&(0,Ne.jsx)(hf,{}),w("forge")&&(0,Ne.jsx)(Cf,{}),w("crossdPool")&&(0,Ne.jsx)(Gf,{}),ve&&(0,Ne.jsx)("div",{className:"wp-portfolio-loading",role:"status","aria-label":"Loading portfolio",children:(0,Ne.jsx)("span",{className:"wp-portfolio-spinner","aria-hidden":!0})}),$&&(0,Ne.jsxs)("div",{className:"wp-portfolio-empty",role:"status",children:[(0,Ne.jsx)("span",{className:"wp-portfolio-empty-icon","aria-hidden":!0,children:(0,Ne.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ne.jsx)("path",{d:"M20 7H5a2 2 0 0 1-2-2 2 2 0 0 1 2-2h13v4"}),(0,Ne.jsx)("path",{d:"M3 5v13a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1"}),(0,Ne.jsx)("circle",{cx:"16.5",cy:"13.5",r:"1",fill:"currentColor",stroke:"none"})]})}),(0,Ne.jsx)("p",{className:"wp-portfolio-empty-title",children:"No assets yet"}),(0,Ne.jsx)("p",{className:"wp-portfolio-empty-desc",children:"Assets you hold across ONE services will appear here."})]})]})})]});return(0,Ne.jsx)(fa.Provider,{value:ae,children:(0,Ne.jsx)(Gl.Provider,{value:N,children:(0,Ne.jsx)(Le,{feature:"wallet_portfolio",children:s==="none"?Be:(0,Ne.jsx)("div",{className:Pe(s==="fullscreen"?"wp-fullscreen":"wp-embed",l),"data-theme":t,children:Be})})})})}var so=require("react/jsx-runtime");function _f({className:e}){let{env:t,theme:r,walletAddress:n,close:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s}=jt();return(0,so.jsxs)(wa.Drawer.Portal,{children:[(0,so.jsx)(wa.Drawer.Overlay,{className:"wp-overlay"}),(0,so.jsxs)(wa.Drawer.Content,{className:Pe("wp-fullscreen",e),"data-theme":r,children:[(0,so.jsx)(wa.Drawer.Title,{className:"wp-sr-only",children:"Portfolio"}),(0,so.jsx)(io,{env:t,theme:r,walletAddress:n,onBack:o,variant:"none",onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s})]})]})}var rd=require("react/jsx-runtime");function e1({env:e,theme:t="light",walletAddress:r,open:n,onOpenChange:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:p,currencySymbol:b,children:g}){let h=it(e),x=n!==void 0,[y,u]=lo.useState(!1),c=x?n:y,w=lo.useCallback(R=>{x||u(R),o?.(R)},[x,o]),m=lo.useCallback(()=>w(!1),[w]),v=lo.useMemo(()=>({env:h,theme:t,open:c,walletAddress:r,close:m,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:p,currencySymbol:b}),[h,t,c,r,m,a,i,s,l,d,p,b]);return(0,rd.jsx)(fa.Provider,{value:v,children:(0,rd.jsx)(Qf.Drawer.Root,{direction:"bottom",open:c,onOpenChange:w,noBodyStyles:!0,children:g})})}var nd=Object.assign(e1,{Trigger:Ru,Content:_f});var pe=V(require("react"),1),Uo=require("react-dom"),sd=V(require("bignumber.js"),1);var os=V(require("react"),1),Vf=120;function qf(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function Yf(){let[e,t]=os.useState(!1);return os.useEffect(()=>{let r=window.visualViewport,n=()=>r?.height??window.innerHeight,o=n(),a=()=>{let d=n();o=Math.max(o,d),t(o-d>Vf)},i=()=>{o=n(),t(!1)},s=d=>{qf(d.target)&&o-n()>Vf&&t(!0)},l=d=>{qf(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 as=V(require("react"),1);function is(e,t=160){let[r,n]=as.useState(e||null);return as.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 mn=require("react/jsx-runtime");function Kf({size:e=16,className:t}){return(0,mn.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,mn.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 Zf({size:e=16,className:t}){return(0,mn.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,mn.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 od({size:e=20,className:t}){return(0,mn.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,mn.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 Xf({size:e=16,className:t}){return(0,mn.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,mn.jsx)("path",{d:"M3.333 8h9.334M8.667 4l4 4-4 4",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}var X=V(require("react"),1);var em=V(require("bignumber.js"),1);function Jf(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function $f(e){return!e.isFinite()||e.isNaN()||e.lte(0)?"":e.decimalPlaces(6,em.default.ROUND_DOWN).toFixed()}function t1(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 r1(e){let t=e.fromToken.priceUsd,r=e.toToken.priceUsd,n=e.lastChangedBy==="to"?e.toAmount:e.fromAmount,o=xt(n);return!o||o.lte(0)?{fromAmount:e.fromAmount,toAmount:e.toAmount}:Jf(t)&&Jf(r)?e.lastChangedBy==="to"?{fromAmount:$f(o.multipliedBy(r).dividedBy(t))}:{toAmount:$f(o.multipliedBy(t).dividedBy(r))}:t1(e)?e.lastChangedBy==="to"?{fromAmount:e.toAmount}:{toAmount:e.fromAmount}:{fromAmount:e.lastChangedBy==="to"?"":e.fromAmount,toAmount:e.lastChangedBy==="from"?"":e.toAmount}}function tm({getQuote:e,submitBridge:t}){return{canQuote:!!e,canSubmit:!!t,async getQuote(r){return e?e(r):r1(r)},async submitBridge(r){if(!t)throw new Error("Bridge submit handler is not configured.");return t(r)}}}var rm=15,n1=18,im="cross_bridge_terms_accepted",o1=3600*24*365;function a1(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,rm);let o=t.slice(0,n).slice(0,rm),a=t.slice(n+1).slice(0,n1);return`${o}.${a}`}function i1(){return typeof document>"u"?!1:document.cookie.split(";").map(e=>e.trim()).some(e=>e===`${im}=true`)}function s1(){if(typeof document>"u")return;let e=typeof window<"u"&&window.location.protocol==="https:"?"; Secure":"";document.cookie=[`${im}=true`,"Path=/",`Max-Age=${o1}`,"SameSite=Lax",e].filter(Boolean).join("; ")}function l1(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 nm(e){let t=e.toUpperCase();return t.startsWith("T")&&t.slice(1).startsWith("ONE")?t.slice(1):t}function d1(e,t){if(!e||!t||e.chainId!==t.chainId)return!1;let r=new Set([nm(e.symbol),nm(t.symbol)]);return r.has("ONE")&&r.has("ONEUSD")}function Zr(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function ss(e){return e[0]}function ad(e,t,r,n){if(r&&!Zr(r,t))return r;let o=t?n?.(t,e):void 0;if(o?.length)return o[0];if(!t)return e[1]??ss(e);let a=e.findIndex(s=>Zr(s,t)),i=a>=0?e[a+1]:void 0;return i&&!Zr(i,t)?i:e.find(s=>!Zr(s,t))??t}function om({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 ls(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),...ls(r.cause,t+1),...ls(r.data,t+1),...ls(r.error,t+1)]}function id(e){let t=ls(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 am(e,t){return id(e)?"Transaction request was rejected.":(e instanceof Error?e.message:typeof e=="string"?e:"").split(`
|
|
10
|
-
`)[0]?.trim()||t}function sm(e){let{tokens:t,initialFromToken:r,initialToToken:n,getToTokens:o,getApproval:a,approveBridge:i,history:s=[],initialSlippage:l="1",termsUrl:d,getQuote:p,submitBridge:b,onSubmitted:g,onSuccess:h,onFailed:x,onExit:y}=e,u=X.useMemo(()=>tm({getQuote:p,submitBridge:b}),[p,b]),[c,w]=X.useState("form"),[m,v]=X.useState(r??ss(t)),[R,C]=X.useState(()=>ad(t,r??ss(t),n,o)),[T,S]=X.useState(""),[N,I]=X.useState(""),[M,O]=X.useState("from"),[D,W]=X.useState(l),[A,G]=X.useState(null),J=X.useMemo(()=>d1(m,R),[m,R]),ee=X.useMemo(()=>J?"1":D==="auto"?l1(A?.priceImpact):D,[J,D,A?.priceImpact]),[re,L]=X.useState(""),[te,ae]=X.useState("idle"),[F,ne]=X.useState(""),[$,ye]=X.useState(null),[ve,Be]=X.useState([]),[he,Re]=X.useState(!1),[Ce,rt]=X.useState(i1),[Ae,Qe]=X.useState(null),[ut,Fe]=X.useState(!1),[Ye,We]=X.useState(null),[Lt,Xt]=X.useState(null),[ft,Dt]=X.useState(!1),[bt,kt]=X.useState(!1),It=X.useRef(0),Rt=X.useRef(null),Et=X.useRef(!1),nt=X.useRef(!1),ir=X.useRef(!1),zt=X.useRef(!1),sr=X.useRef(!1),Ke=X.useRef(!1),wt=X.useRef(!1);X.useEffect(()=>{ir.current||(ir.current=!0,$e("bridge","opened"))},[]);let Ze=X.useCallback(()=>{Rt.current&&(clearTimeout(Rt.current),Rt.current=null)},[]),ot=X.useCallback(j=>{Ze(),Xt(j)},[Ze]);X.useEffect(()=>Ze,[Ze]),X.useEffect(()=>{let j=t.find(He=>Zr(He,m))??ss(t),Me=j?o?.(j,t):void 0,Z=Me?.find(He=>Zr(He,R))??(Me?void 0:t.find(He=>Zr(He,R)))??ad(t,j,void 0,o);v(j),C(Z)},[o,t,m,R]);let lt=X.useCallback((j,Me)=>{let Z=a1(j);if(!Z){It.current+=1,S(""),I(""),O(Me),G(null),L(""),ae("idle");return}Me==="from"?S(Z):I(Z),O(Me),L(""),!sr.current&&Number(Z)>0&&(sr.current=!0,$e("bridge","amount_entered"))},[]),Ge=X.useCallback(()=>{It.current+=1,S(""),I(""),O("from"),G(null),L(""),ne(""),ae("idle"),Qe(null),Fe(!1),We(null),Dt(!1),ot(null)},[ot]),Ct=X.useCallback(j=>{Zr(j,m)||(zt.current||(zt.current=!0,$e("bridge","token_selected",{tags:{item_id:`from:${j.symbol}`}})),v(j),C(ad(t,j,void 0,o)),Ge())},[m,o,Ge,t]),lr=X.useCallback(j=>{Zr(j,R)||Zr(j,m)||(zt.current||(zt.current=!0,$e("bridge","token_selected",{tags:{item_id:`to:${j.symbol}`}})),C(j),Ge())},[m,Ge,R]),tr=X.useMemo(()=>m?o?.(m,t)??t.filter(j=>!Zr(j,m)):[],[m,o,t]),St=X.useCallback(()=>{m?.balance&<(m.balance,"from")},[m?.balance,lt]),Q=X.useCallback(()=>{!m||!R||(v(R),C(m),Ge())},[m,Ge,R]),be=X.useCallback(()=>{It.current+=1,S(""),I(""),O("from"),G(null),L(""),ne("")},[]);X.useEffect(()=>{if(!m||!R)return;if(!T&&!N){G(null),L(""),ae(Z=>Z==="quoting"?"idle":Z);return}let j=++It.current,Me=om({fromToken:m,toToken:R,fromAmount:T,toAmount:N,lastChangedBy:M,slippage:D});ae(Z=>Z==="submitting"?Z:u.canQuote?"quoting":"idle"),(async()=>{try{let Z=await u.getQuote(Me);if(It.current!==j)return;Z.fromAmount!==void 0&&M==="to"&&S(Z.fromAmount),Z.toAmount!==void 0&&M==="from"&&I(Z.toAmount),G(Z.summary??null),L(Z.error??"")}catch(Z){if(It.current!==j)return;L(Z instanceof Error?Z.message:"Failed to quote bridge.")}finally{It.current===j&&ae(Z=>Z==="quoting"?"idle":Z)}})()},[T,m,M,u,D,N,R]);let Te=X.useCallback(()=>!m||!R?null:om({fromToken:m,toToken:R,fromAmount:T,toAmount:N,lastChangedBy:M,slippage:ee}),[ee,T,m,M,N,R]),Se=X.useCallback(async(j,Me)=>{if(!Et.current){Et.current=!0,ne(""),Dt(!1),Fe(!1),ae("submitting");try{if(!Me?.skipApprovalCheck&&a){let He=await a(j);if(He){Qe(He),We(j),ae("idle");return}}Qe(null),We(null),ot("processing");let Z=await u.submitBridge(j);ye(Z),ae("success"),Be(He=>[{id:Z.txHash,timestamp:new Date().toISOString(),txHash:Z.txHash,fromToken:Z.fromToken,toToken:Z.toToken,fromAmount:Z.fromAmount,toAmount:Z.toAmount,summary:A??void 0,status:"pending"},...He.filter(gr=>gr.txHash!==Z.txHash)]),be(),kt(!0),ot(null),Dt(!0),$e("bridge","confirmed"),Ke.current=!1,wt.current=!1,g?.(Z),h?.(Z)}catch(Z){if(ot(null),$e("bridge","confirmed",{status:"failure",reason:Rr(Z)}),Ke.current=!1,wt.current=!1,id(Z)){ae("idle");return}let He=am(Z,"Failed to submit bridge.");ne(He),ae("error"),x?.({message:He})}finally{Et.current=!1}}},[a,x,g,h,u,be,ot,A]),Xe=X.useCallback(async()=>{if(re)return;let j=Te();if(j){if(Ke.current||(Ke.current=!0,$e("bridge","submitted")),!Ce){We(j),Re(!0);return}await Se(j)}},[Te,re,Se,Ce]),Jt=X.useCallback(async()=>{let j=Ye??Te();j&&(s1(),rt(!0),Re(!1),await Se(j))},[Te,Ye,Se]),Pt=X.useCallback(()=>{Re(!1),We(null)},[]),Ft=X.useCallback(async()=>{if(!(nt.current||te==="submitting"||!Ae||!Ye||!i)){nt.current=!0,ne(""),ae("submitting");try{await i(Ye,Ae),wt.current||(wt.current=!0,$e("bridge","approved")),Qe(null),ae("idle"),Fe(!0)}catch(j){if(id(j)){ae("idle");return}let Me=am(j,"Failed to approve token.");ne(Me),ae("error"),x?.({message:Me})}finally{nt.current=!1}}},[Ae,i,x,Ye,Se,te]),mr=X.useCallback(()=>{te!=="submitting"&&(Qe(null),Fe(!1),We(null),ae("idle"))},[te]),z=X.useCallback(async()=>{if(te==="submitting")return;let j=Ye??Te();if(!j){Fe(!1),ne("Bridge input is no longer available. Please try again."),ae("error");return}Fe(!1),await Se(j,{skipApprovalCheck:!0})},[Te,Ye,Se,te]),De=X.useCallback(()=>{Dt(!1)},[]),tt=X.useCallback(j=>{w(j),j==="history"&&kt(!1)},[]),K=X.useCallback(()=>{if(c==="history"){tt("form");return}y?.()},[y,tt,c]),Ie=X.useMemo(()=>[...s,...ve.filter(j=>!s.some(Me=>Me.txHash===j.txHash))],[s,ve]);return{step:c,setStep:tt,status:te,error:F,quoteError:re,fromToken:m,toToken:R,tokens:t,availableToTokens:tr,fromAmount:T,toAmount:N,lastChangedBy:M,slippage:D,effectiveSlippage:ee,slippageLocked:J,setSlippage:W,summary:A,history:Ie,submitted:$,canSubmit:u.canSubmit,termsOpen:he,approvalInfo:Ae,approvalSuccessOpen:ut,approveBridge:i,pendingSubmitInput:Ye,submitToast:Lt,successDialogOpen:ft,dismissSuccessDialog:De,hasNewHistory:bt,termsUrl:d,setFromToken:v,setToToken:C,selectFromToken:Ct,selectToToken:lr,setAmount:lt,setMax:St,swapTokens:Q,submit:Xe,confirmTerms:Jt,cancelTerms:Pt,confirmApproval:Ft,cancelApproval:mr,continueAfterApproval:z,back:K}}we(`.bf-root{--bf-bg: var(--ds-bg-default, #1e232e);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .08));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .07));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .4));--bf-toast-bg: var(--bf-bg);--bf-toast-strong: var(--bf-text-high);--bf-toast-color: var(--bf-text-medium);position:relative;display:flex;flex:1;min-height:0;flex-direction:column;container:bf-flow / inline-size;overflow:hidden;background:var(--bf-bg);color:var(--ds-content-highest, #ffffff);font-family:inherit}[data-theme=dark].wi-popover-content .bf-root,[data-theme=dark].wi-drawer-content .bf-root{--bf-bg: var(--ds-bg-default, #121212);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .1));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .05));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .7));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .5))}[data-theme=light].wi-popover-content .bf-root,[data-theme=light].wi-drawer-content .bf-root{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .05));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .7));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .5))}[data-theme=dark].gou-shell .bf-root,.gou-shell[data-theme=dark] .bf-root{--bf-bg: var(--ds-bg-default, #121212);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .1));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .05));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .7));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .5))}[data-theme=light].gou-shell .bf-root,.gou-shell[data-theme=light] .bf-root{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .05));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .7));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .5))}.bf-root[data-view=history]{background:var(--ds-bg-dim, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-header{position:relative;display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:24px;border-bottom:1px solid var(--bf-border);background:var(--ds-bg-default, var(--bf-bg));box-sizing:border-box}.bf-root[data-view=history] .bf-header{padding:24px;border-bottom-color:var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff)}.bf-header-btn{display:inline-flex;width:24px;height:24px;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease}.bf-header-spacer{width:24px;height:24px;flex-shrink:0}.bf-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-header .bf-header-btn:last-child{position:absolute;top:24px;right:24px}.bf-header-title{position:absolute;left:50%;transform:translate(-50%);font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--bf-text-high);white-space:nowrap}.bf-header-title[data-clickable=true]{cursor:pointer}.bf-root[data-view=history] .bf-header-title{color:var(--ds-content-highest, #000000)}.bf-body,.bf-history-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;box-sizing:border-box}.bf-body{padding:24px}.bf-history-body{display:flex;flex-direction:column;gap:12px;padding:24px;background:var(--ds-bg-dim, #f5f7fa)}.bf-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.bf-chip{display:inline-flex;align-items:center;gap:4px;min-height:33px;padding:6px 8px;border:0;border-radius:12px;background:var(--bf-surface);color:var(--bf-text-medium);font:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-chip:hover:not(:disabled){color:var(--bf-text-high);background:var(--bf-surface-hover)}.bf-chip:disabled{cursor:default}.bf-chip-history{position:relative}.bf-chip-dot{position:absolute;top:4px;right:4px;width:6px;height:6px;border-radius:999px;background:var(--ds-system-red-default, #da0b2e)}.bf-swap-card{position:relative;display:flex;flex-direction:column;gap:12px;margin-bottom:12px}.bf-field-error{margin-top:-4px;color:var(--ds-system-red-default, #ff2b5f);font-size:13px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-amount-panel{display:flex;min-height:110px;flex-direction:column;gap:8px;padding:16px;border:1px solid transparent;border-radius:12px;background:var(--bf-surface);box-sizing:border-box;transition:border-color .2s ease}.bf-amount-panel:hover{border-color:var(--bf-border)}.bf-amount-head{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--bf-text-high);font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-balance{display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;color:var(--bf-text-low);font-size:12px;white-space:nowrap}.bf-amount-main{display:flex;align-items:center;justify-content:space-between;gap:12px}.bf-amount-input-wrap{display:flex;min-width:0;flex:1;flex-direction:column;gap:4px}.bf-amount-input{width:100%;min-width:0;padding:0;border:0;background:transparent;color:var(--bf-text-high);font:inherit;font-size:18px;font-size:clamp(15px,4.5cqi,18px);font-weight:600;line-height:1.5;letter-spacing:-.01em;outline:none}.bf-amount-input[data-size=medium]{font-size:16px;font-size:clamp(14px,4cqi,16px)}.bf-amount-input[data-size=small]{font-size:14px;font-size:clamp(12px,3.5cqi,14px)}.bf-amount-input::placeholder{color:var(--ds-content-lowest, rgba(0, 0, 0, .25))}.bf-amount-usd{overflow:hidden;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;white-space:nowrap;text-overflow:ellipsis}.bf-token-pill{display:inline-flex;flex-shrink:0;align-items:center;gap:6px;min-height:33px;padding:6px 8px 6px 6px;border:1px solid var(--bf-border);border-radius:9999px;background:var(--bf-bg);color:var(--bf-text-high);font:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;perspective:220px;overflow:hidden;transition:transform .12s ease,background .15s ease}.bf-token-pill:hover:not(:disabled):not([data-locked=true]){background:var(--bf-surface-hover)}.bf-token-pill:disabled{cursor:default;opacity:.6}.bf-token-pill[data-locked=true]{cursor:default}.bf-token-icon{position:relative;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;overflow:hidden;border-radius:0;background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000);font-size:11px;font-weight:700}.bf-token-icon[data-has-image=true]{background:transparent}.bf-token-icon img{width:100%;height:100%;border-radius:0;object-fit:cover}.bf-token-fallback{line-height:1}.bf-token-pill-face{display:inline-flex;align-items:center;gap:6px;transform-origin:center bottom;animation:bf-token-roll-up .32s cubic-bezier(.22,1,.36,1)}@keyframes bf-token-roll-up{0%{opacity:0;transform:translateY(90%) rotateX(-80deg)}60%{opacity:1}}.bf-token-pill:active:not(:disabled),.bf-embedded-token-pill:active:not(:disabled){transform:scale(.96)}.bf-token-search:focus-within{border-color:var(--ds-accent-primary-default, #f0640d)}.bf-token-search input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--bf-text-high);font:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-token-search input::placeholder{color:var(--bf-text-low)}.bf-token-list{display:flex;min-height:0;flex:1;flex-direction:column;gap:0;overflow-y:auto;overflow-x:hidden;padding:0 24px 24px;scrollbar-width:thin;box-sizing:border-box}.bf-token-row{position:relative;display:flex;width:100%;min-height:69px;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid transparent;border-radius:12px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;box-sizing:border-box}.bf-token-row:hover:not([data-selected=true]){background:var(--ds-surface-medium, rgba(18, 18, 18, .05))}.bf-token-row[data-selected=true]{border-color:var(--ds-accent-primary-default, #ff8438);background:var(--ds-surface-medium, rgba(18, 18, 18, .05))}.bf-token-row-left{display:inline-flex;min-width:0;align-items:center;gap:16px}.bf-token-meta{display:flex;min-width:0;flex-direction:column}.bf-token-symbol{overflow:hidden;color:var(--bf-text-high);font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.bf-token-name{overflow:hidden;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.bf-token-row-right{display:flex;min-width:86px;max-width:42%;flex-shrink:0;flex-direction:column;align-items:flex-end}.bf-token-balance,.bf-token-price{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-token-balance{color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-token-price{color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-token-row[data-selected=true] .bf-token-symbol{color:var(--bf-text-high)}.bf-token-row[data-selected=true] .bf-token-balance{color:var(--bf-text-high);font-size:16px}.bf-token-row[data-selected=true] .bf-token-price{color:var(--bf-text-low);font-size:14px}.bf-token-empty{padding:32px 16px;color:var(--bf-text-low);font-size:14px;font-weight:500;line-height:1.5;text-align:center}.bf-slippage-overlay{position:fixed;inset:0;z-index:100002;display:flex;align-items:center;justify-content:center;padding:24px;background:#00000085;pointer-events:auto;box-sizing:border-box}.bf-slippage-dialog{display:flex;width:min(480px,calc(100vw - 48px));height:auto;min-height:min(316px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);flex-direction:column;overflow:hidden;border:1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));border-radius:24px;background:var(--ds-surface-default, #ffffff);color:var(--ds-content-highest, #000000);box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));box-sizing:border-box}.bf-slippage-head{position:relative;display:flex;min-height:73px;flex-shrink:0;align-items:center;justify-content:flex-start;padding:24px 56px 24px 24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff);box-sizing:border-box}.bf-slippage-head h3{margin:0;color:var(--ds-content-highest, #000000);font-size:20px;font-weight:600;line-height:1.25;letter-spacing:0}.bf-slippage-close{position:absolute;top:24px;right:24px;display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer}.bf-slippage-close:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-slippage-body{display:flex;flex:1;min-height:0;flex-direction:column;gap:24px;padding:24px;box-sizing:border-box}.bf-slippage-desc{margin:0;color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-controls{display:flex;flex-direction:column;gap:12px;width:100%}.bf-slippage-presets{display:flex;gap:8px;width:100%}.bf-slippage-preset{appearance:none;display:inline-flex;flex:1 1 0;min-width:0;min-height:48px;align-items:center;justify-content:center;padding:12px 8px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;box-sizing:border-box}.bf-slippage-preset:hover,.bf-slippage-preset[data-selected=true]{border-color:var(--ds-accent-primary-default, #ff8438);background:var(--ds-accent-primary-low, #fff5ee)}.bf-slippage-custom{display:flex;min-height:48px;align-items:center;gap:8px;padding:12px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85));box-sizing:border-box}.bf-slippage-custom:focus-within,.bf-slippage-custom[data-selected=true]{border-color:var(--ds-accent-primary-default, #ff8438)}.bf-slippage-custom input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--ds-content-high, rgba(0, 0, 0, .85));font:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-custom input::placeholder{color:var(--ds-content-lowest, rgba(0, 0, 0, .25))}.bf-slippage-custom span:not(.bf-sr-only){flex-shrink:0;color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-apply{appearance:none;margin-top:auto;width:100%;min-height:48px;padding:12px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #ff8438);color:var(--ds-accent-primary-on-primary, #ffffff);font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;box-sizing:border-box}.bf-slippage-apply:hover{filter:brightness(.96)}.bf-slippage-apply:disabled{cursor:not-allowed;opacity:.5;filter:none}.bf-slippage-message{margin:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-message[data-variant=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-slippage-message[data-variant=error]{color:var(--ds-system-red-default, #da0b2e)}.bf-action-modal-overlay{--bf-bg: var(--ds-bg-default, #1e232e);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .08));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .12));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .92));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .4));position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;padding:24px;background:#040912b8;pointer-events:auto;box-sizing:border-box;animation:bf-overlay-in .18s ease-out}.bf-action-modal-overlay[data-theme=light]{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .08));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .65));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .4))}.bf-action-modal{display:flex;width:min(480px,calc(100vw - 48px));flex-direction:column;align-items:center;gap:24px;padding:48px 24px 24px;border:1px solid var(--bf-border);border-radius:24px;background:var(--bf-bg);color:#fff;box-shadow:0 24px 80px #00000073;box-sizing:border-box;animation:bf-modal-in .2s cubic-bezier(.16,1,.3,1)}.bf-action-modal-overlay[data-state=closed]{animation:bf-overlay-out .15s ease-in forwards}.bf-action-modal-overlay[data-state=closed] .bf-action-modal{animation:bf-modal-out .15s ease-in forwards}@keyframes bf-overlay-in{0%{opacity:0}}@keyframes bf-overlay-out{to{opacity:0}}@keyframes bf-modal-in{0%{opacity:0;transform:translateY(8px) scale(.96)}}@keyframes bf-modal-out{to{opacity:0;transform:translateY(4px) scale(.98)}}@media(prefers-reduced-motion:reduce){.bf-action-modal-overlay,.bf-action-modal,.bf-action-modal-overlay[data-state=closed],.bf-action-modal-overlay[data-state=closed] .bf-action-modal{animation:none}}.bf-action-modal h3{width:100%;margin:0;color:var(--bf-text-high);font-size:24px;font-weight:700;line-height:1.25;text-align:left;letter-spacing:0}.bf-action-modal-desc{max-width:380px;margin:0;color:var(--bf-text-low);font-size:15px;font-weight:500;line-height:1.45;text-align:center;letter-spacing:0}.bf-terms-modal{--bf-terms-accent: #f3742e;padding:24px;gap:24px}.bf-terms-modal h3{font-size:20px;font-weight:600;line-height:1.6;text-align:center}.bf-terms-modal .bf-action-modal-desc{font-size:14px;line-height:1.45}.bf-terms-check-row{display:grid;width:100%;min-height:56px;grid-template-columns:20px minmax(0,1fr);align-items:center;column-gap:12px;padding:16px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-surface);color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.4;box-sizing:border-box}.bf-terms-check-button{appearance:none;display:inline-flex;min-width:0;width:20px;height:20px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;touch-action:manipulation}.bf-terms-copy{display:flex;width:100%;min-width:0;align-items:baseline;justify-content:space-between;column-gap:12px;row-gap:4px;flex-wrap:wrap}.bf-terms-label{min-width:0;cursor:pointer;touch-action:manipulation}.bf-terms-check-button:focus-visible .bf-terms-checkbox{outline:2px solid var(--ds-accent-primary-default, #f0640d);outline-offset:2px}.bf-terms-checkbox{position:relative;display:inline-flex;width:20px;height:20px;align-items:center;justify-content:center;border:1px solid rgba(124,143,180,.72);border-radius:4px;background:transparent;box-sizing:border-box}.bf-terms-checkbox[data-checked=true]{border-color:var(--ds-accent-primary-default, #f0640d);background:var(--ds-accent-primary-default, #f0640d)}.bf-terms-checkbox[data-checked=true]:after{width:8px;height:4px;border:solid #ffffff;border-width:0 0 2px 2px;content:"";transform:rotate(-45deg) translate(1px,-1px)}.bf-terms-check-row a{position:relative;z-index:1;color:var(--ds-accent-primary-default, #f0640d);font-size:14px;font-weight:700;text-decoration:none;white-space:nowrap}.bf-terms-check-row a:hover{text-decoration:underline}.bf-terms-privacy{max-width:100%;margin:0;color:var(--bf-text-low);font-size:clamp(8px,2.4vw,12px);white-space:nowrap;font-weight:500;line-height:1.45;text-align:center;letter-spacing:0}.bf-action-primary,.bf-action-secondary{display:inline-flex;width:100%;min-height:56px;align-items:center;justify-content:center;padding:14px 16px;border:0;border-radius:12px;font:inherit;font-size:18px;font-weight:700;line-height:1.4;letter-spacing:0;cursor:pointer}.bf-action-primary{background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000)}.bf-action-primary:disabled{cursor:not-allowed;opacity:.35}.bf-terms-modal .bf-action-primary{min-height:52px;background:var(--bf-terms-accent);color:#fff;font-size:16px;font-weight:600}.bf-terms-modal .bf-action-primary:disabled{background:var(--bf-surface);color:var(--bf-text-low);opacity:1}.bf-action-primary[aria-busy=true]{gap:8px;opacity:1}.bf-action-button-spinner{width:18px;height:18px;border:2px solid rgba(0,0,0,.22);border-top-color:currentColor;border-right-color:currentColor;border-radius:999px;animation:bf-loading-spin .9s linear infinite}.bf-action-secondary{background:var(--bf-surface);color:var(--bf-text-low)}.bf-action-secondary:disabled{cursor:not-allowed;opacity:.5}.bf-approve-address-box{display:flex;width:100%;flex-direction:column;gap:10px;padding:16px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-surface);box-sizing:border-box}.bf-approve-address-box>span{color:var(--bf-text-low);font-size:14px;font-weight:700;line-height:1.4}.bf-approve-address-box>div{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-approve-address-box strong{min-width:0;overflow:hidden;color:var(--bf-text-high);font-size:15px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.bf-copy-button{flex-shrink:0;min-width:48px;min-height:32px;padding:6px 10px;border:1px solid rgba(0,206,178,.65);border-radius:8px;background:transparent;color:var(--ds-accent-primary-default, #f0640d);font:inherit;font-size:12px;font-weight:700;line-height:1.2;cursor:pointer}.bf-copy-button:disabled{cursor:not-allowed;opacity:.45}.bf-action-buttons{display:grid;width:100%;grid-template-columns:1fr 1fr;gap:12px}.bf-approval-success-modal{gap:28px}.bf-success-mark{position:relative;display:inline-flex;width:96px;height:96px;flex-shrink:0;align-items:center;justify-content:center;border:12px solid rgba(0,206,178,.12);border-radius:999px;background:#00ceb2a8;box-shadow:0 0 0 10px #00ceb20f;box-sizing:border-box}.bf-success-mark:after{width:34px;height:18px;border:solid #ffffff;border-width:0 0 6px 6px;content:"";transform:rotate(-45deg) translate(2px,-3px)}.bf-status-toast{position:absolute;right:16px;bottom:14px;left:16px;z-index:5;display:flex;align-items:center;gap:12px;min-height:52px;padding:12px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-toast-bg);color:var(--bf-toast-color);box-shadow:0 8px 24px #0000003d;box-sizing:border-box}.bf-status-toast-icon{display:inline-flex;width:28px;height:28px;flex-shrink:0;align-items:center;justify-content:center;border-radius:999px}.bf-status-spinner{width:20px;height:20px;border:3px solid rgba(255,255,255,.18);border-top-color:var(--ds-accent-primary-default, #f0640d);border-right-color:var(--ds-accent-primary-default, #f0640d);border-radius:999px;animation:bf-loading-spin .9s linear infinite}.bf-status-check{position:relative;width:20px;height:20px;border-radius:999px;background:var(--ds-system-green-default, #00ceb2)}.bf-status-check:after{position:absolute;top:6px;left:5px;width:8px;height:4px;border:solid var(--ds-system-green-on, #000000);border-width:0 0 2px 2px;content:"";transform:rotate(-45deg)}.bf-status-toast-copy{display:flex;min-width:0;flex:1;flex-direction:column}.bf-status-toast-copy strong,.bf-status-toast-copy span{overflow:hidden;text-overflow:ellipsis}.bf-status-toast-copy strong{color:var(--bf-toast-strong);font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-status-toast-copy span{color:var(--bf-toast-color);font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em}.bf-status-toast[data-variant=success] .bf-status-toast-copy span{color:var(--ds-system-green-on-inverted, #00e8c9)}.bf-status-toast[data-variant=error]{border:1px solid rgba(255,43,95,.28);background:var(--bf-toast-bg)}.bf-status-toast[data-variant=error] .bf-status-toast-copy strong{color:var(--bf-toast-strong)}.bf-status-error-mark{display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;border-radius:999px;background:var(--ds-system-red-default, #ff2b5f);color:#fff;font-size:14px;font-weight:700;line-height:1}.bf-status-toast[data-variant=error] .bf-status-toast-copy span{color:var(--bf-toast-color)}.bf-success-overlay{--bf-bg: var(--ds-bg-default, #1e232e);--bf-border: var(--ds-border-default, rgba(255, 255, 255, .12));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .92));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;padding:24px;background:#000000b8;pointer-events:auto;box-sizing:border-box}.bf-success-overlay[data-theme=light]{--bf-bg: #ffffff;--bf-border: rgba(18, 18, 18, .08);--bf-text-high: rgba(18, 18, 18, .85);--bf-text-medium: rgba(18, 18, 18, .65);--bf-text-low: rgba(18, 18, 18, .4)}.bf-success-modal{display:flex;width:min(480px,calc(100vw - 48px));flex-direction:column;overflow:hidden;border:1px solid var(--bf-border);border-radius:24px;background:var(--bf-bg);color:var(--bf-text-high);box-shadow:0 24px 80px #00000073;box-sizing:border-box}.bf-success-head{display:flex;min-height:73px;align-items:center;justify-content:space-between;gap:16px;padding:24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));box-sizing:border-box}.bf-success-head h3{min-width:0;margin:0;overflow:hidden;color:var(--ds-content-highest, #000000);font-size:20px;font-weight:600;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.bf-success-close{display:inline-flex;width:24px;height:24px;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer}.bf-success-close:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-success-body{display:flex;flex-direction:column;align-items:center;gap:24px;padding:40px 24px 24px;box-sizing:border-box}.bf-success-copy{display:flex;width:100%;flex-direction:column;align-items:center;gap:4px;color:var(--bf-text-medium);text-align:center}.bf-success-copy strong{color:var(--bf-text-high);font-size:24px;font-weight:700;line-height:1.25;letter-spacing:0}.bf-success-copy span{color:var(--bf-text-medium);font-size:15px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-success-route{display:flex;align-items:center;justify-content:center;gap:12px}.bf-success-route .bf-token-icon{width:48px!important;height:48px!important;background:transparent;font-size:18px}.bf-success-route-arrow{color:var(--bf-text-low);font-size:24px;font-weight:500;line-height:1}.bf-success-ok{display:inline-flex;width:100%;min-height:48px;align-items:center;justify-content:center;padding:12px;border:0;border-radius:12px;background:#00b4b7e0;color:#fff;font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}@media(max-width:767px){.bf-success-body{padding:40px 24px 24px}.bf-success-copy strong{font-size:22px}.bf-success-copy span{font-size:14px}.bf-success-mark{width:88px;height:88px}.bf-success-route .bf-token-icon{width:44px!important;height:44px!important}}@keyframes bf-loading-spin{to{transform:rotate(360deg)}}.bf-swap-toggle{position:absolute;top:100px;left:50%;z-index:1;display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;padding:0;border:0;border-radius:9999px;background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000);box-shadow:0 1px 5px #0000001f;cursor:pointer}.bf-swap-card[data-has-from-error=true] .bf-swap-toggle{top:132px}.bf-details{display:flex;flex-direction:column;gap:24px}.bf-collapse{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .22s ease,opacity .14s ease,margin-top .22s ease}.bf-collapse[data-open=true]{grid-template-rows:1fr;opacity:1}.bf-collapse:not([data-open=true]){margin-top:calc(-1 * var(--bf-collapse-gap, 0px))}.bf-collapse-inner{overflow:hidden;min-height:0}@keyframes bf-value-in{0%{opacity:.25;transform:translateY(-2px)}}.bf-info-value,.bf-route-amount-value,.bf-route-meta>span{animation:bf-value-in .24s ease-out}@media(prefers-reduced-motion:reduce){.bf-collapse{transition:none}.bf-info-value,.bf-route-amount-value,.bf-route-meta>span{animation:none}}.bf-exchange-rate{display:flex;width:100%;align-items:center;justify-content:center;gap:4px;padding:0 0 24px;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-detail-section,.bf-history-card{display:flex;flex-direction:column;gap:12px;padding:0;border-radius:12px;background:transparent;box-sizing:border-box}.bf-liquidity{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;background:var(--bf-surface);box-sizing:border-box}.bf-root[data-view=history] .bf-liquidity,.bf-root[data-view=history] .bf-detail-section,.bf-root[data-view=history] .bf-history-card{background:var(--ds-surface-default, #ffffff)}.bf-detail-section h3{margin:0;color:var(--bf-text-high);font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-tx-fee-section{gap:12px}.bf-tx-fee-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.bf-collapse-head{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin:0;padding:0;background:none;border:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.bf-detail-section[data-open=true] .bf-collapse-head{padding-bottom:12px;border-bottom:1px solid var(--bf-border)}.bf-collapse-chevron{flex-shrink:0;color:var(--bf-text-low);transition:transform .2s ease}.bf-detail-section[data-open=true] .bf-collapse-chevron{transform:rotate(180deg)}.bf-collapse-body{display:flex;flex-direction:column;gap:14px}.bf-root[data-view=history] .bf-detail-section[data-open=true] .bf-collapse-head{border-bottom-color:var(--ds-border-default, rgba(0, 0, 0, .07))}.bf-root[data-view=history] .bf-collapse-chevron{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-tx-fee-total{display:inline-flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;color:var(--bf-text-medium);font-size:14px;font-weight:600;line-height:1.4;text-align:right}.bf-tx-fee-total>span[data-delegated=true]{text-decoration:line-through;text-decoration-thickness:2px;text-decoration-color:currentColor}.bf-fee-delegated{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:2px 8px;border-radius:6px;background:#379cff2e;color:#4eb3ff;font-size:10px;font-weight:500;line-height:1.3;white-space:nowrap}.bf-tx-fee-token{width:16px;height:16px;flex-shrink:0;border-radius:999px;object-fit:cover}.bf-info-card{gap:14px}.bf-info-section{display:flex;flex-direction:column;gap:10px}.bf-info-section+.bf-info-section{padding-top:2px}.bf-info-section h4{margin:0;color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.5}.bf-root[data-view=history] .bf-detail-section h3,.bf-root[data-view=history] .bf-info-section h4{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-route-steps{display:flex;flex-direction:column}.bf-route-step{display:grid;min-width:0;grid-template-columns:18px minmax(0,1fr);column-gap:10px}.bf-route-rail{position:relative;display:flex;justify-content:center}.bf-route-line{position:absolute;top:9px;bottom:-4px;width:1px;background:var(--bf-border)}.bf-route-step[data-last=true] .bf-route-line{display:none}.bf-route-dot{z-index:1;width:9px;height:9px;margin-top:5px;border:2px solid var(--bf-text-low);border-radius:999px;background:var(--bf-bg);box-sizing:border-box}.bf-route-dot[data-final=true]{border-color:var(--ds-accent-primary-default, #00ceb2)}.bf-route-body{display:flex;min-width:0;flex-direction:column;gap:2px;padding-bottom:14px}.bf-route-step[data-last=true] .bf-route-body{padding-bottom:0}.bf-route-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-route-title{min-width:0;overflow:hidden;color:var(--bf-text-high);font-size:13px;font-weight:620;letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap}.bf-route-amount{display:inline-flex;flex-shrink:0;align-items:center;gap:4px;color:var(--bf-text-medium);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}.bf-route-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;color:var(--bf-text-low);font-size:12px;line-height:1.45;font-variant-numeric:tabular-nums}.bf-route-step[data-kind=hop] .bf-route-title{color:var(--bf-text-medium);font-weight:600}.bf-route-step[data-kind=hop] .bf-route-amount{color:var(--bf-text-low);font-weight:500}.bf-route-step[data-kind=hop] .bf-route-dot{width:7px;height:7px;margin-top:6px;border-width:1px}.bf-route-meta>span[data-tone=accent]{color:var(--ds-accent-primary-default, #00ceb2);font-weight:600}.bf-route-meta>span[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00);font-weight:600}.bf-route-meta>span[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e);font-weight:600}.bf-route-tag{padding:1px 6px;border-radius:5px;background:var(--ds-accent-primary-low, rgba(0, 206, 178, .12));color:var(--ds-accent-primary-high, #00a0a2);font-size:10px;font-weight:700;letter-spacing:.01em}.bf-info-rows{display:flex;flex-direction:column;gap:8px}.bf-info-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-liquidity-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-info-label{display:inline-flex;align-items:center;gap:6px;min-width:0;color:var(--bf-text-low)}.bf-info-value{display:flex;min-width:0;align-items:center;justify-content:flex-end;gap:4px;color:var(--bf-text-medium);text-align:right}.bf-info-route,.bf-info-value-token{display:inline-flex;align-items:center;gap:4px}.bf-info-route .bf-token-icon,.bf-info-value-token .bf-token-icon{flex-shrink:0}.bf-info-route-arrow{display:inline-flex;align-items:center;color:var(--bf-text-medium);font-size:12px;line-height:1}.bf-root[data-view=history] .bf-info-route-arrow{color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.bf-info-value[data-tone=accent]{color:var(--ds-accent-primary-high, #f0640d)}.bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-info-value[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e)}.bf-root[data-view=history] .bf-info-label,.bf-root[data-view=history] .bf-liquidity-head{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-root[data-view=history] .bf-info-value{color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.bf-root[data-view=history] .bf-info-value[data-tone=accent]{color:var(--ds-accent-primary-high, #f0640d)}.bf-root[data-view=history] .bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-root[data-view=history] .bf-info-value[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e)}.bf-liquidity-status{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:600;line-height:1.4;white-space:nowrap}.bf-liquidity-status:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0}.bf-liquidity-status[data-status=normal],.bf-liquidity-status:not([data-status]){background:#00ceb21f;color:var(--ds-accent-primary-default, #f0640d)}.bf-liquidity-status[data-status=normal]:before,.bf-liquidity-status:not([data-status]):before{background:var(--ds-accent-primary-default, #f0640d)}.bf-liquidity-status[data-status=low]{background:#e56f001f;color:#e56f00}.bf-liquidity-status[data-status=low]:before{background:#e56f00}.bf-liquidity-status[data-status=rebalancing]{background:#da0b2e1a;color:#da0b2e}.bf-liquidity-status[data-status=rebalancing]:before{background:#da0b2e}.bf-liquidity-track{height:8px;overflow:hidden;border-radius:999px;background:var(--bf-surface-hover)}.bf-liquidity-track span{display:block;height:100%;border-radius:inherit;background:var(--ds-accent-primary-default, #f0640d)}.bf-error{padding:12px;border-radius:12px;background:#da0b2e1f;color:var(--ds-system-red-default, #da0b2e);font-size:13px;line-height:1.4}.bf-footer{display:flex;flex-shrink:0;flex-direction:column;align-items:center;gap:10px;padding:12px 24px 24px;background:var(--ds-bg-default, var(--bf-bg))}.bf-next{width:100%;min-height:48px;padding:12px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000);font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-next:disabled{cursor:default;opacity:.6}.bf-powered{display:inline-flex;align-items:center;gap:3px;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-decoration:none}.bf-powered:focus-visible{border-radius:4px;outline:2px solid var(--ds-accent-primary-default, #f0640d);outline-offset:2px}.bf-powered-brand{text-decoration:underline;text-underline-offset:2px}.bf-history-tabs{display:flex;align-items:center;gap:4px;width:100%}.bf-history-tab{position:relative;display:inline-flex;min-height:37px;align-items:center;justify-content:center;padding:8px 12px;border:0;background:transparent;color:var(--ds-content-lowest, rgba(0, 0, 0, .25));font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;cursor:pointer}.bf-history-tab[data-active=true]{color:var(--ds-accent-primary-high, #f0640d)}.bf-history-tab[data-active=true]:after{position:absolute;right:8px;bottom:0;left:8px;height:3px;border-radius:999px;background:var(--ds-accent-primary-high, #f0640d);content:""}.bf-history-tab-dot{position:absolute;top:8px;right:4px;width:6px;height:6px;border-radius:999px;background:var(--ds-system-red-default, #da0b2e)}.bf-history-list{display:flex;flex-direction:column;gap:12px}.bf-history-item{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:var(--ds-surface-default, #ffffff);box-sizing:border-box}.bf-history-item-head,.bf-history-meta,.bf-history-route,.bf-history-route-token{display:inline-flex;align-items:center}.bf-history-item-head{justify-content:space-between;gap:12px;width:100%}.bf-history-status{display:inline-flex;min-height:24px;align-items:center;justify-content:center;padding:3px 8px;border-radius:4px;background:var(--ds-system-orange-low, #fcf5e9);color:var(--ds-system-orange-high, #e56f00);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;white-space:nowrap}.bf-history-status[data-status=completed]{background:var(--ds-system-green-low, #e7f9f8);color:var(--ds-system-green-high, #00a0a2)}.bf-history-status[data-status=failed]{background:var(--ds-system-red-low, rgba(218, 11, 46, .12));color:var(--ds-system-red-default, #da0b2e)}.bf-history-time{min-width:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;text-align:right;white-space:nowrap}.bf-history-item-body{display:flex;flex-direction:column;gap:4px}.bf-history-amount{color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-history-meta{justify-content:space-between;gap:12px;min-width:0}.bf-history-usd{min-width:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-history-route{justify-content:flex-end;gap:4px;min-width:0;color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:12px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-history-route-token{gap:4px;min-width:0}.bf-history-route-token span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-history-route-arrow{flex-shrink:0;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-empty{padding:32px 16px;text-align:center;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:14px}.bf-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:767px){.bf-slippage-overlay{align-items:flex-end;padding:0}.bf-slippage-dialog{width:100%;height:auto;min-height:316px;max-height:82dvh;border-right:0;border-bottom:0;border-left:0;border-radius:24px 24px 0 0}}.wi-drawer-content .bf-header{padding:16px}.wi-drawer-content .bf-header .bf-header-btn:last-child{top:16px;right:16px}.wi-drawer-content .bf-body,.wi-drawer-content .bf-history-body{padding:16px}.bf-root[data-variant=embedded]{--bf-bg: #1c1c1d;--bf-surface: #212224;--bf-surface-hover: rgba(255, 255, 255, .08);--bf-border: rgba(255, 255, 255, .1);--bf-text-high: rgba(255, 255, 255, .85);--bf-text-medium: rgba(255, 255, 255, .65);--bf-text-low: rgba(255, 255, 255, .4);--bf-embedded-primary: #f3742e;--bf-embedded-on-primary: #ffffff;background:var(--bf-bg);color:#fff}.gou-shell[data-theme=light] .bf-root[data-variant=embedded]{--bf-bg: #ffffff;--bf-surface: #ffffff;--bf-surface-hover: rgba(0, 0, 0, .03);--bf-border: rgba(0, 0, 0, .06);--bf-text-high: rgba(0, 0, 0, .85);--bf-text-medium: rgba(0, 0, 0, .65);--bf-text-low: rgba(0, 0, 0, .4);color:#000}.bf-root[data-variant=embedded] .bf-header{min-height:64px;justify-content:flex-start;gap:12px;padding:16px 20px 12px;border-bottom-color:var(--bf-border);background:var(--bf-bg)}.bf-root[data-variant=embedded] .bf-header .bf-header-btn:last-child{top:16px;right:20px}.bf-root[data-variant=embedded] .bf-header-btn{color:var(--bf-text-medium)}.bf-root[data-variant=embedded] .bf-header-title{position:static;flex:1;padding-right:36px;transform:none;color:var(--bf-text-high);font-size:18px;font-weight:600;line-height:1.5;text-align:left}.bf-root[data-variant=embedded] .bf-header-spacer{display:none}.bf-root[data-variant=embedded] .bf-embedded-body{padding:20px}.bf-embedded-form{display:flex;width:100%;min-width:0;flex-direction:column;gap:20px;--bf-collapse-gap: 20px}.bf-embedded-fields{position:relative;display:flex;width:100%;flex-direction:column}.bf-embedded-field-group{display:flex;width:100%;flex-direction:column;gap:8px}.bf-embedded-amount-panel{display:flex;width:100%;min-width:0;flex-direction:column;padding:16px;border:1px solid rgba(255,255,255,.025);border-radius:12px;background:#212224;box-sizing:border-box}.gou-shell[data-theme=light] .bf-embedded-amount-panel{border-color:#00000014;background:#fff}.bf-embedded-amount-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.bf-embedded-amount-label{display:inline-flex;min-width:0;align-items:center;gap:8px;white-space:nowrap}.bf-embedded-amount-label strong{color:var(--bf-text-medium);font-size:14px;font-weight:700;line-height:1.5}.bf-embedded-amount-label>span{color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5}.bf-embedded-amount-label em{padding:2px 6px;border-radius:9999px;background:#f3742e1a;color:var(--bf-embedded-primary);font-size:11px;font-style:normal;font-weight:500;line-height:1.25}.bf-embedded-balance{display:inline-flex;min-width:0;max-width:100%;flex-shrink:1;align-items:center;justify-content:flex-end;gap:6px;overflow:hidden;color:var(--bf-text-medium);font-size:12px;font-weight:600;line-height:1.5;text-align:right;white-space:nowrap}.bf-embedded-balance>svg,.bf-embedded-balance>span:not(.bf-embedded-balance-value){flex-shrink:0}.bf-embedded-balance-value{min-width:0;overflow:hidden;text-overflow:ellipsis}.bf-embedded-balance button{flex-shrink:0;padding:2px 8px;border:0;border-radius:9999px;background:#f3742e26;color:var(--bf-embedded-primary);font:inherit;font-size:11px;font-weight:700;line-height:1.4;cursor:pointer}.bf-embedded-balance button:hover{background:#f3742e40}.bf-embedded-amount-main{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-embedded-token-pill{display:inline-flex;height:32px;flex-shrink:0;align-items:center;gap:6px;padding:0 12px 0 6px;border:1px solid rgba(255,255,255,.1);border-radius:9999px;background:#ffffff0d;color:#fff;font:inherit;font-size:14px;font-weight:700;line-height:1.5;cursor:pointer;perspective:220px;overflow:hidden;transition:transform .12s ease,background .15s ease}.gou-shell[data-theme=light] .bf-embedded-token-pill{border-color:#0000000f;background:#00000008;color:#000}.bf-embedded-token-pill:disabled{cursor:default;opacity:1}.bf-embedded-input-wrap{display:flex;min-width:0;flex:1}.bf-embedded-amount-input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:#fff;font:inherit;font-size:24px;font-size:clamp(18px,6cqi,24px);font-weight:700;line-height:32px;text-align:right}.gou-shell[data-theme=light] .bf-embedded-amount-input{color:#000}.bf-embedded-amount-input[data-size=medium]{font-size:20px;font-size:clamp(16px,5cqi,20px);line-height:28px}.bf-embedded-amount-input[data-size=small]{font-size:16px;font-size:clamp(14px,4cqi,16px);line-height:24px}.bf-embedded-amount-input::placeholder{color:var(--bf-text-low);opacity:1}.bf-embedded-field-error{color:#ff3c53;font-size:12px;font-weight:400;line-height:1.5}.bf-embedded-direction{position:relative;z-index:10;display:flex;width:100%;align-items:center;justify-content:center;margin:-12px 0}.bf-embedded-direction>span{display:inline-flex;width:36px;height:36px;align-items:center;justify-content:center;border-radius:9999px;background:var(--bf-embedded-primary);color:var(--bf-embedded-on-primary)}.bf-embedded-summary{display:flex;width:100%;flex-direction:column;gap:12px}.bf-embedded-details{display:flex;width:100%;flex-direction:column;gap:16px;padding:0 16px 16px;box-sizing:border-box}.bf-embedded-details .bf-info-section{gap:12px}.bf-embedded-details .bf-info-section+.bf-info-section{padding-top:0}.bf-embedded-details .bf-info-section h4{color:#fffc;font-size:14px;font-weight:700}.gou-shell[data-theme=light] .bf-embedded-details .bf-info-section h4{color:#000c}.bf-embedded-details .bf-info-rows{gap:12px}.bf-embedded-details .bf-info-row{min-height:20px;font-size:13px;font-weight:600}.bf-embedded-details .bf-info-label{gap:6px;color:var(--bf-text-medium);font-size:13px;font-weight:400}.bf-embedded-details .bf-info-value{color:var(--bf-text-medium);font-size:13px;font-weight:600}.bf-embedded-details .bf-info-value[data-tone=accent]{color:var(--bf-embedded-primary)}.bf-embedded-details .bf-info-route-arrow{color:var(--bf-text-medium)}.bf-embedded-liquidity{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;background:var(--bf-surface)}.bf-embedded-liquidity>div{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--bf-text-medium);font-size:14px}.bf-embedded-liquidity>div>span:last-child{text-transform:capitalize}.bf-embedded-liquidity-track{display:block;height:8px;overflow:hidden;border-radius:9999px;background:var(--bf-surface-hover)}.bf-embedded-liquidity-track>span{display:block;height:100%;border-radius:inherit;background:var(--bf-embedded-primary)}.bf-embedded-liquidity-error{padding:12px 16px;border:1px solid rgba(255,60,83,.3);border-radius:8px;background:#ff3c531a;color:#ff3c53;font-size:14px;line-height:1.5;text-align:center}.bf-embedded-action-footer{width:100%;flex-shrink:0}.bf-embedded-cta{display:flex;width:100%;height:52px;flex-shrink:0;align-items:center;justify-content:center;padding:0 16px;border:0;border-radius:12px;background:var(--bf-embedded-primary);color:var(--bf-embedded-on-primary);font:inherit;font-size:16px;font-weight:600;line-height:1.5;cursor:pointer;transition:opacity .15s ease,background-color .15s ease;box-sizing:border-box}.bf-embedded-cta:hover:not(:disabled){background:#f3742ee6}.bf-embedded-cta:disabled{cursor:not-allowed;opacity:.6}.bf-embedded-spinner{width:20px;height:20px;border:2px solid var(--bf-embedded-on-primary);border-top-color:transparent;border-radius:9999px;animation:bf-loading-spin .9s linear infinite}@media(max-width:767px){.bf-root[data-variant=embedded] .bf-header{min-height:50px;padding:12px 16px 8px;border-bottom:0}.bf-root[data-variant=embedded] .bf-header .bf-header-btn:last-child{display:none}.bf-root[data-variant=embedded] .bf-embedded-body{padding:12px 16px calc(env(safe-area-inset-bottom,0px) + 12px);overscroll-behavior:contain;scroll-padding-bottom:calc(env(safe-area-inset-bottom,0px) + 76px);-webkit-overflow-scrolling:touch}.bf-root[data-variant=embedded] .bf-embedded-action-footer{position:sticky;bottom:0;z-index:20;padding-top:12px;background:var(--bf-bg);isolation:isolate}.bf-root[data-variant=embedded] .bf-embedded-action-footer:after{position:absolute;z-index:-1;top:100%;right:0;left:0;height:calc(env(safe-area-inset-bottom,0px) + 32px);background:var(--bf-bg);box-shadow:0 16px 0 16px var(--bf-bg);content:"";pointer-events:none}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-action-footer{position:static;padding-top:0}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-action-footer:after{display:none}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-body{scroll-padding-bottom:24px}.bf-embedded-amount-head{gap:8px}.bf-embedded-amount-label{gap:6px}.bf-embedded-balance{gap:4px}}
|
|
11
|
-
`);var f=require("react/jsx-runtime"),fm=pe.createContext(void 0);function Ra(){return pe.useContext(fm)}function c1(e){let[t,r]=pe.useState(void 0);return pe.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 lm=[{value:"0.1",label:"0.1%"},{value:"0.5",label:"0.5%"},{value:"1",label:"1%"},{value:"5",label:"5%"}],p1=[{value:"all",label:"ALL"},{value:"completed",label:"Completed"},{value:"pending",label:"Pending"}];function u1(e,t){return e==="auto"?t?`Auto ${t}%`:"Auto":e?`${e}%`:"1%"}function dm(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 mm(e){return`${e.chainId}:${e.address.toLowerCase()}`}function gm(e){let t=Number(e);return Number.isFinite(t)?t.toLocaleString("en-US",{maximumFractionDigits:t>=1?2:6}):e||"0"}function cm(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 f1(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 hm(e,t){if(!t)return!1;let r=xt(e),n=xt(t.balance);return!r||!n?!1:r.isGreaterThan(n)}function xa(e){if(!e.isFinite()||e.isNaN())return"0";let r=e.decimalPlaces(6,sd.default.ROUND_DOWN).toFixed(6).replace(/\.?0+$/,""),[n="0",o]=r.split("."),a=new sd.default(n||"0").toFormat(0);return o?`${a}.${o}`:a}function m1(e){return e.length<=14?e:`${e.slice(0,6)}...${e.slice(-6)}`}function g1(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 h1(e){let t=xt(e);return t?xa(t):e||"0"}function b1(e,t){if(t?.priceUsd===void 0)return null;let r=xt(e);if(!r)return null;let n=r.multipliedBy(t.priceUsd);return n.isFinite()?`$${n.toFormat(2)}`:null}function fs(e){return e.status==="success"?"completed":e.status==="failed"?"failed":"pending"}function w1(e,t){return t==="all"?!0:fs(e)===t}function y1(e){return e==="completed"?"Completed":e==="failed"?"Failed":"Pending"}function Fo(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function bm(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function wm(e,t){if(!(!e||!t))return e.chainId===t.chainId?"swap":bm(e,t)||e.symbol.toLowerCase()===t.symbol.toLowerCase()?"bridge":"swap-bridge"}function ym(e){return e==="swap"||e==="deposit-swap"||e==="swap-withdraw"}function ds(e){return!e||e==="0"||Number(e)===0}function xm(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 vm(e){let t=e.fromToken,r=e.toToken,n=wm(t,r),o=e.fromAmount||"0",a=e.toAmount||"0",i=n!==void 0&&!ym(n),s=n!==void 0&&n!=="bridge";return{pathType:n,bridgeInfo:i?[{label:"Route",value:t&&r?`${Fo(t.chainId)} \u2192 ${Fo(r.chainId)}`:"-"},{label:"Validator Fee",value:ds(o)?"0":"Free",tone:ds(o)?"default":"accent"},{label:"Network Fee",value:ds(o)?"0":"Free",tone:ds(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 va({token:e,size:t=20}){let r=e?.iconUrl;return(0,f.jsx)("span",{className:"bf-token-icon","data-has-image":!!r?"true":"false",style:{width:t,height:t},children:r?(0,f.jsx)("img",{src:r,alt:"",width:t,height:t,draggable:!1}):(0,f.jsx)("span",{className:"bf-token-fallback",children:e?.symbol?.slice(0,1)??"?"})})}function cs(e,t){if(e.length===0)return;let r=e.findIndex(n=>bm(n,t));return e[(r+1)%e.length]}function pm({label:e,token:t,amount:r,usd:n,onAmountChange:o,onTokenClick:a,locked:i=!1}){return(0,f.jsxs)("section",{className:"bf-amount-panel",children:[(0,f.jsxs)("div",{className:"bf-amount-head",children:[(0,f.jsx)("span",{children:e}),(0,f.jsxs)("span",{className:"bf-balance",children:[gm(t?.balance??"0")," ",t?.symbol??""]})]}),(0,f.jsxs)("div",{className:"bf-amount-main",children:[(0,f.jsxs)("label",{className:"bf-amount-input-wrap",children:[(0,f.jsxs)("span",{className:"bf-sr-only",children:[e," amount"]}),(0,f.jsx)("input",{type:"text",inputMode:"decimal",value:r,onChange:s=>o(s.target.value),placeholder:"0",className:"bf-amount-input","data-size":km(r)}),(0,f.jsx)("span",{className:"bf-amount-usd",children:n})]}),(0,f.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,f.jsxs)("span",{className:"bf-token-pill-face",children:[(0,f.jsx)(va,{token:t}),(0,f.jsx)("span",{children:t?.symbol??"Select"})]},t?mm(t):"none"),!i&&(0,f.jsx)(Pr,{size:16})]})]})]})}function x1(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 km(e){let t=e.replace(/,/g,"").trim().length;return t>26?"small":t>18?"medium":"large"}function v1(){return(0,f.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[(0,f.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,f.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,f.jsx)("circle",{cx:"10",cy:"8",r:".75",fill:"currentColor"})]})}function um({label:e,token:t,amount:r,onAmountChange:n,onTokenClick:o,onMax:a,locked:i}){return(0,f.jsxs)("section",{className:"bf-embedded-amount-panel",children:[(0,f.jsxs)("div",{className:"bf-embedded-amount-head",children:[(0,f.jsxs)("span",{className:"bf-embedded-amount-label",children:[(0,f.jsx)("strong",{children:e}),!(e==="From")&&(0,f.jsx)("em",{children:"estimated"})]}),t&&(0,f.jsxs)("span",{className:"bf-embedded-balance",children:[(0,f.jsx)(v1,{}),(0,f.jsx)("span",{className:"bf-embedded-balance-value",children:gm(t.balance)}),(0,f.jsx)("span",{children:t.symbol}),a&&(0,f.jsx)("button",{type:"button",onClick:a,"aria-label":"Use maximum available balance",children:"MAX"})]})]}),(0,f.jsxs)("div",{className:"bf-embedded-amount-main",children:[(0,f.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,f.jsxs)("span",{className:"bf-token-pill-face",children:[(0,f.jsx)(va,{token:t}),(0,f.jsx)("span",{children:t?.symbol??"Select"})]},t?mm(t):"none"),!i&&(0,f.jsx)(Pr,{size:14})]}),(0,f.jsxs)("label",{className:"bf-embedded-input-wrap",children:[(0,f.jsxs)("span",{className:"bf-sr-only",children:[e," amount"]}),(0,f.jsx)("input",{type:"text",inputMode:"decimal",value:x1(r),onChange:l=>n(l.target.value),placeholder:"0.00",className:"bf-embedded-amount-input","data-size":km(r)})]})]})]})}function k1({flow:e,onClose:t}){let r=pe.useId(),[n,o]=pe.useState(null),a=lm.find(y=>y.value===e.slippage),[i,s]=pe.useState(e.slippage&&!a?e.slippage:""),l=i.trim()!==""&&i.trim()!==".",d=l?Number(i):NaN,p=Number.isFinite(d)&&d>50,b=Number.isFinite(d)&&d>5&&!p,g=y=>{e.setSlippage(y),t()},h=()=>{!l||p||(e.setSlippage(dm(i)),t())};if(pe.useEffect(()=>{o(document.body)},[]),pe.useEffect(()=>{let y=u=>{u.key==="Escape"&&t()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[t]),!n)return null;let x=Ra();return(0,Uo.createPortal)((0,f.jsx)("div",{className:"bf-slippage-overlay","data-theme":x,role:"presentation",onMouseDown:y=>{y.target===y.currentTarget&&t()},children:(0,f.jsxs)("section",{className:"bf-slippage-dialog",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[(0,f.jsxs)("header",{className:"bf-slippage-head",children:[(0,f.jsx)("h3",{id:r,children:"Slippage Settings"}),(0,f.jsx)("button",{type:"button",className:"bf-slippage-close",onClick:t,"aria-label":"Close slippage settings",children:(0,f.jsx)(Nr,{size:24})})]}),(0,f.jsxs)("div",{className:"bf-slippage-body",children:[(0,f.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,f.jsxs)("div",{className:"bf-slippage-controls",children:[(0,f.jsx)("div",{className:"bf-slippage-presets",children:lm.map(y=>(0,f.jsx)("button",{type:"button",className:"bf-slippage-preset","data-selected":!l&&e.slippage===y.value?"true":"false",onClick:()=>g(y.value),children:y.label},y.value))}),(0,f.jsxs)("label",{className:"bf-slippage-custom","data-selected":l?"true":"false",children:[(0,f.jsx)("span",{className:"bf-sr-only",children:"Custom slippage percent"}),(0,f.jsx)("input",{value:i,onChange:y=>{s(dm(y.target.value))},onKeyDown:y=>{y.key==="Enter"&&(y.preventDefault(),h())},inputMode:"decimal",placeholder:"Enter custom slippage",autoComplete:"off",spellCheck:!1}),(0,f.jsx)("span",{"aria-hidden":"true",children:"%"})]})]}),p?(0,f.jsx)("p",{className:"bf-slippage-message","data-variant":"error",children:"Slippage cannot exceed 50%."}):b?(0,f.jsx)("p",{className:"bf-slippage-message","data-variant":"warning",children:"Your transaction may be frontrun due to high slippage."}):null,l&&(0,f.jsx)("button",{type:"button",className:"bf-slippage-apply",onClick:h,disabled:p,children:"Apply"})]})]})}),n)}function Rm({flow:e,env:t}){let r=pe.useId(),[n,o]=pe.useState(!1),[a,i]=pe.useState(null),s=Ra(),l=qt("apps.json",t,g=>Dr(g?.legal?.termsUrl,t)),d=e.termsUrl??l??$c;pe.useEffect(()=>{i(document.body)},[]),pe.useEffect(()=>{let g=h=>{h.key==="Escape"&&e.cancelTerms()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[e]);let[p,b]=is(e.termsOpen);return!a||!p?null:(0,Uo.createPortal)((0,f.jsx)("div",{className:"bf-action-modal-overlay","data-theme":s,"data-state":b,role:"presentation",onPointerDown:g=>{g.target===g.currentTarget&&e.cancelTerms()},children:(0,f.jsxs)("section",{className:"bf-action-modal bf-terms-modal",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[(0,f.jsx)("h3",{id:r,children:"Agree to Terms of Service"}),(0,f.jsx)("p",{className:"bf-action-modal-desc",children:"Please make sure to review the Terms of Service before using ONEUSD."}),(0,f.jsxs)("div",{className:"bf-terms-check-row","data-checked":n?"true":"false",children:[(0,f.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(g=>!g),children:(0,f.jsx)("span",{className:"bf-terms-checkbox","data-checked":n?"true":"false","aria-hidden":"true"})}),(0,f.jsxs)("div",{className:"bf-terms-copy",children:[(0,f.jsx)("span",{className:"bf-terms-label",onClick:()=>o(g=>!g),children:"Agree to Terms of Use"}),d&&(0,f.jsx)("a",{href:d,target:"_blank",rel:"noreferrer",children:"Terms of Service"})]})]}),(0,f.jsx)("p",{className:"bf-terms-privacy",children:"I have read and acknowledged the Privacy Policy to use ONEUSD"}),(0,f.jsx)("button",{type:"button",className:"bf-action-primary",disabled:!n||e.status==="submitting",onClick:e.confirmTerms,"data-track":"terms_confirm",children:"Confirm"})]})}),a)}function R1({value:e,disabled:t=!1}){let[r,n]=pe.useState(!1);return(0,f.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 Cm({flow:e,approval:t}){let r=pe.useId(),[n,o]=pe.useState(null),a=Ra();pe.useEffect(()=>{o(document.body)},[]),pe.useEffect(()=>{if(!t)return;let p=b=>{e.status!=="submitting"&&b.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[e,t]);let[i,s]=is(t);if(!n||!i)return null;let l=e.status==="submitting"||!e.approveBridge,d=e.status==="submitting";return(0,Uo.createPortal)((0,f.jsx)("div",{className:"bf-action-modal-overlay","data-theme":a,"data-state":s,role:"presentation",children:(0,f.jsxs)("section",{className:"bf-action-modal bf-approve-modal",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[(0,f.jsxs)("h3",{id:r,children:["Approve ",i.token.symbol]}),(0,f.jsx)(va,{token:i.token,size:72}),(0,f.jsxs)("div",{className:"bf-approve-address-box",children:[(0,f.jsx)("span",{children:"Token Address"}),(0,f.jsxs)("div",{children:[(0,f.jsx)("strong",{children:i.tokenAddress}),(0,f.jsx)(R1,{value:i.tokenAddress,disabled:d})]})]}),(0,f.jsxs)("div",{className:"bf-action-buttons",children:[(0,f.jsx)("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:e.status==="submitting",children:"Cancel"}),(0,f.jsxs)("button",{type:"button",className:"bf-action-primary",onClick:e.confirmApproval,disabled:l,"aria-busy":d,"data-track":"approve_confirm",children:[d&&(0,f.jsx)("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),(0,f.jsx)("span",{children:d?"Approving...":"Approve"})]})]})]})}),n)}function Sm({flow:e}){let t=pe.useId(),[r,n]=pe.useState(null),o=Ra();pe.useEffect(()=>{n(document.body)},[]),pe.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]=is(e.approvalSuccessOpen);if(!r||!a)return null;let s=e.status==="submitting";return(0,Uo.createPortal)((0,f.jsx)("div",{className:"bf-action-modal-overlay","data-theme":o,"data-state":i,role:"presentation",children:(0,f.jsxs)("section",{className:"bf-action-modal bf-approval-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:[(0,f.jsx)("h3",{id:t,children:"Approval Success"}),(0,f.jsx)("span",{className:"bf-success-mark","aria-hidden":"true"}),(0,f.jsxs)("p",{className:"bf-action-modal-desc",children:["Token approval confirmed successfully.",(0,f.jsx)("br",{}),"Please continue to the next step."]}),(0,f.jsxs)("div",{className:"bf-action-buttons",children:[(0,f.jsx)("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:s,children:"Cancel"}),(0,f.jsxs)("button",{type:"button",className:"bf-action-primary",onClick:e.continueAfterApproval,disabled:s,"aria-busy":s,children:[s&&(0,f.jsx)("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),(0,f.jsx)("span",{children:s?"Continuing...":"Continue"})]})]})]})}),r)}function C1({fromAmount:e,toAmount:t,fromToken:r,toToken:n}){let o=pe.useMemo(()=>{let i=xt(e),s=xt(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,f.jsx)(ya,{open:a,children:(0,f.jsxs)("div",{className:"bf-exchange-rate",children:[(0,f.jsxs)("span",{children:["1 ",r?.symbol]}),(0,f.jsx)("span",{"aria-hidden":"true",children:"="}),(0,f.jsxs)("span",{children:[o?xa(o):""," ",n?.symbol]})]})})}function Nm({flow:e}){return e.submitToast?(0,f.jsxs)("div",{className:"bf-status-toast","data-variant":"processing",role:"status","aria-live":"polite",children:[(0,f.jsx)("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:(0,f.jsx)("span",{className:"bf-status-spinner"})}),(0,f.jsxs)("span",{className:"bf-status-toast-copy",children:[(0,f.jsx)("strong",{children:"Transaction Processing"}),(0,f.jsx)("span",{children:"Your transaction is being processed on the blockchain"})]})]}):null}function Tm({message:e}){let[t,r]=pe.useState(!1);return pe.useEffect(()=>{if(!e){r(!1);return}r(!0);let n=window.setTimeout(()=>{r(!1)},3500);return()=>window.clearTimeout(n)},[e]),!e||!t?null:(0,f.jsxs)("div",{className:"bf-status-toast","data-variant":"error",role:"alert","aria-live":"assertive",children:[(0,f.jsx)("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:(0,f.jsx)("span",{className:"bf-status-error-mark",children:"!"})}),(0,f.jsxs)("span",{className:"bf-status-toast-copy",children:[(0,f.jsx)("strong",{children:"Error"}),(0,f.jsx)("span",{children:e})]})]})}function S1(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 Im({flow:e}){let t=pe.useId(),[r,n]=pe.useState(null),o=e.submitted,a=Ra();return pe.useEffect(()=>{n(document.body)},[]),pe.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,Uo.createPortal)((0,f.jsx)("div",{className:"bf-success-overlay","data-theme":a,role:"presentation",children:(0,f.jsx)("section",{className:"bf-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:(0,f.jsxs)("div",{className:"bf-success-body",children:[(0,f.jsx)("span",{className:"bf-success-mark","aria-hidden":"true"}),(0,f.jsxs)("div",{className:"bf-success-copy",children:[(0,f.jsx)("strong",{id:t,children:S1(o.pathType)}),(0,f.jsx)("span",{children:"Please check the results in the history."})]}),(0,f.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,f.jsxs)(pe.Fragment,{children:[s>0&&(0,f.jsx)("span",{className:"bf-success-route-arrow",children:"\u2192"}),(0,f.jsx)(ka,{token:i,size:43})]},`${i.symbol}-${s}`))}),(0,f.jsx)("button",{type:"button",className:"bf-success-ok",onClick:e.dismissSuccessDialog,"data-track":"success_ok",children:"OK"})]})})}),r)}function ka({token:e,size:t=16}){let r=!!e.iconUrl;return(0,f.jsx)("span",{className:"bf-token-icon","data-has-image":r?"true":"false",style:{width:t,height:t},children:e.iconUrl?(0,f.jsx)("img",{src:e.iconUrl,alt:"",width:t,height:t,draggable:!1}):(0,f.jsx)("span",{className:"bf-token-fallback",children:e.symbol?.slice(0,1)??"?"})})}function N1({row:e}){return e.routeTokens&&e.routeTokens.length>0?(0,f.jsx)("span",{className:"bf-info-route",children:e.routeTokens.map((t,r)=>(0,f.jsxs)(pe.Fragment,{children:[r>0&&(0,f.jsx)("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),(0,f.jsx)(ka,{token:t})]},`${t.symbol}-${r}`))}):e.valueToken?(0,f.jsxs)("span",{className:"bf-info-value-token",children:[(0,f.jsx)(ka,{token:e.valueToken}),(0,f.jsx)("span",{children:e.value})]}):(0,f.jsx)(f.Fragment,{children:e.value})}function Em({rows:e}){return!e||e.length===0?null:(0,f.jsx)("div",{className:"bf-info-rows",children:e.map(t=>(0,f.jsxs)("div",{className:"bf-info-row",children:[(0,f.jsx)("span",{className:"bf-info-label",children:t.label}),(0,f.jsx)("span",{className:"bf-info-value","data-tone":t.tone??"default",children:(0,f.jsx)(N1,{row:t})})]},`${t.label}-${t.value}`))})}function T1(e,t,r){return e.pathType==="bridge"?"Bridge Info":ym(e.pathType)?"Swap Info":t&&r?"Swap & Bridge Info":t?"Bridge Info":"Swap Info"}function ya({open:e,className:t,children:r}){let n=pe.useRef(null);return e&&(n.current=r),(0,f.jsx)("div",{className:t?`bf-collapse ${t}`:"bf-collapse","data-open":e?"true":"false","aria-hidden":e?void 0:!0,children:(0,f.jsx)("div",{className:"bf-collapse-inner",children:e?r:n.current})})}function I1({summary:e,from:t,to:r,feeDelegated:n}){let o=!!e.bridgeInfo?.length,a=!!e.swapInfo?.length,i=!!e.txFee?.length,s=T1(e,o,a),[l,d]=pe.useState(!0),[p,b]=pe.useState(!0);return(0,f.jsxs)("div",{className:"bf-details",children:[e.liquidity&&(0,f.jsxs)("section",{className:"bf-liquidity",children:[(0,f.jsxs)("div",{className:"bf-liquidity-head",children:[(0,f.jsx)("span",{children:e.liquidity.label??"Available Liquidity"}),(0,f.jsx)("span",{className:"bf-liquidity-status","data-status":e.liquidity.status,children:e.liquidity.status??"Normal"})]}),(0,f.jsx)("div",{className:"bf-liquidity-track",children:(0,f.jsx)("span",{style:{width:`${e.liquidity.percentage??50}%`}})})]}),(o||a)&&(0,f.jsxs)("section",{className:"bf-detail-section bf-info-card","data-open":l?"true":"false",children:[(0,f.jsxs)("button",{type:"button",className:"bf-collapse-head","aria-expanded":l,onClick:()=>d(g=>!g),"data-track":"details_toggle",children:[(0,f.jsx)("h3",{children:s}),(0,f.jsx)(Pr,{size:16,className:"bf-collapse-chevron"})]}),l&&(0,f.jsx)("div",{className:"bf-collapse-body",children:(0,f.jsx)(Lm,{summary:e,from:t,to:r,feeDelegated:n})})]}),i&&(0,f.jsxs)("section",{className:"bf-detail-section bf-tx-fee-section","data-open":p?"true":"false",children:[(0,f.jsxs)("button",{type:"button",className:"bf-collapse-head bf-tx-fee-head","aria-expanded":p,onClick:()=>b(g=>!g),"data-track":"details_toggle",children:[(0,f.jsx)("h3",{children:"Est. Tx Fee"}),(0,f.jsxs)("div",{className:"bf-tx-fee-total",children:[e.txFeeInfo?.isDelegateFee&&(0,f.jsx)("span",{className:"bf-fee-delegated",children:"Fee Delegated"}),e.txFeeInfo?.tokenIconUrl&&(0,f.jsx)("img",{className:"bf-tx-fee-token",src:e.txFeeInfo.tokenIconUrl,alt:e.txFeeInfo.tokenSymbol??"",width:16,height:16,draggable:!1}),(0,f.jsx)("span",{"data-delegated":e.txFeeInfo?.isDelegateFee&&Number(e.txFeeInfo?.estTxFee)>0?"true":void 0,children:f1(e.txFeeInfo?.estTxFee??"0")}),(0,f.jsx)(Pr,{size:16,className:"bf-collapse-chevron"})]})]}),p&&(0,f.jsx)("div",{className:"bf-collapse-body",children:(0,f.jsx)(Em,{rows:e.txFee})})]})]})}function E1(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 ps(e){let t=xt(e);if(!(!t||t.lte(0)))return xa(t)}function A1(e,t,r,n){if(!r||!n)return;let o=xt(e),a=xt(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} = ${xa(i)} ${n.symbol}`;let s=o.dividedBy(a);return`1 ${n.symbol} = ${xa(s)} ${r.symbol}`}var M1=1,L1=5;function Am(e){return xt(e)?.toNumber()??null}function Mm(e){let t=Am(e);if(t!==null){if(t>=L1)return"danger";if(t>=M1)return"warning"}}var D1=/\bin\b.*amount|amount.*\bin\b|^from\b/i,P1=/\bout\b.*amount|amount.*\bout\b|^to\b|receive/i,O1=/fee/i,B1=/impact|rate|slippage|minimum|min\.|received/i,us=/impact/i,z1=/^route$/i;function F1(e,t,r){let n=e.find(p=>D1.test(p.label)),o=e.find(p=>P1.test(p.label)),a=new Set;n&&a.add(n),o&&a.add(o);let i=e.find(p=>z1.test(p.label)||(p.routeTokens?.length??0)>0),s=i?.routeTokens?.length?i.routeTokens:void 0,l=i&&!s?i.value:void 0;i&&a.add(i);let d=[];for(let p of e){if(a.has(p))continue;let b=O1.test(p.label);if(!b&&!B1.test(p.label))continue;a.add(p);let g=Am(p.value),h=b&&(g===0||/^\s*free\s*$/i.test(String(p.value??"")));h&&t==="swap"||d.push({text:h?`${p.label} Free`:`${p.label} ${p.value}`,tone:h?"accent":us.test(p.label)?p.tone==="danger"||p.tone==="warning"?p.tone:Mm(p.value):void 0})}return{key:t,label:r,routeText:l,routeTokens:s,inRow:n,outRow:o,meta:d,rest:e.filter(p=>!a.has(p))}}function U1({steps:e}){return(0,f.jsx)("div",{className:"bf-route-steps",children:e.map((t,r)=>(0,f.jsxs)("div",{className:"bf-route-step","data-last":r===e.length-1?"true":"false","data-kind":t.key.startsWith("hop-")?"hop":"endpoint",children:[(0,f.jsxs)("span",{className:"bf-route-rail","aria-hidden":"true",children:[(0,f.jsx)("span",{className:"bf-route-line"}),(0,f.jsx)("span",{className:"bf-route-dot","data-final":r===e.length-1?"true":"false"})]}),(0,f.jsxs)("span",{className:"bf-route-body",children:[(0,f.jsxs)("span",{className:"bf-route-head",children:[(0,f.jsx)("span",{className:"bf-route-title",children:t.title}),(0,f.jsx)("span",{className:"bf-route-amount",children:t.routeTokens?.length?t.routeTokens.map((n,o)=>(0,f.jsxs)(pe.Fragment,{children:[o>0&&(0,f.jsx)("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),(0,f.jsx)(ka,{token:n})]},`${n.symbol}-${o}`)):(0,f.jsxs)(f.Fragment,{children:[t.amountToken&&(0,f.jsx)(ka,{token:t.amountToken}),(0,f.jsx)("span",{className:"bf-route-amount-value",children:t.amount},t.amount)]})})]}),(t.meta.length>0||t.tags.length>0)&&(0,f.jsxs)("span",{className:"bf-route-meta",children:[t.meta.map(n=>(0,f.jsx)("span",{"data-tone":n.tone??"default",children:n.text},n.text)),t.tags.map(n=>(0,f.jsx)("span",{className:"bf-route-tag",children:n},n))]})]})]},t.key))})}function j1(e){if(!us.test(e.label)||e.tone==="danger"||e.tone==="warning")return e;let t=Mm(e.value);return t?{...e,tone:t}:e}function Lm({summary:e,rateLine:t,from:r,to:n,feeDelegated:o,includeTxFee:a=!1}){let i=!!e.txFeeInfo?.isDelegateFee||!!o,s=pe.useMemo(()=>(e.pathType==="bridge-swap"?[["bridge","Bridge"],["swap","Swap"]]:[["swap","Swap"],["bridge","Bridge"]]).map(([R,C])=>{let T=R==="swap"?e.swapInfo:e.bridgeInfo;return T?.length?F1(T,R,C):null}).filter(R=>R!==null),[e]);if(s.length===0)return null;let l=s[0],d=s[s.length-1],p=l.inRow?.valueToken??(r?.symbol?{symbol:r.symbol,iconUrl:r.iconUrl}:void 0),b=l.inRow?.value??r?.amount,g=d.outRow?.valueToken??(n?.symbol?{symbol:n.symbol,iconUrl:n.iconUrl}:void 0),h=d.outRow?.value??n?.amount;if(!b)return null;let x=e.txFeeInfo,y=a&&x&&!x.isDelegateFee?[{text:`Gas ${x.estTxFee}${x.tokenSymbol?` ${x.tokenSymbol}`:""}`}]:[],u=s.length>1,c=[{key:"send",title:`Send ${p?.symbol??""}`.trim(),amount:b,amountToken:p,routeTokens:u?void 0:l.routeTokens,meta:[...y.length?[{text:"EST."}]:r?.chain?[{text:`on ${r.chain}`}]:[],...y,...u?[]:[...l.routeText?[{text:l.routeText}]:[],...l.meta.filter(v=>!us.test(v.text))]],tags:i&&!u?["Fee delegated"]:[]},...u?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 ${g?.symbol??""}`.trim(),amount:h??"\u2014",amountToken:g,meta:[...n?.chain?[{text:`on ${n.chain}`}]:[],...u?[]:l.meta.filter(v=>us.test(v.text))],tags:[]}],w=[...s.flatMap(v=>v.rest),...a?e.txFee??[]:[]].map(j1),m=!!t;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(U1,{steps:c}),(w.length>0||m)&&(0,f.jsx)("div",{className:"bf-info-section",children:(0,f.jsx)(Em,{rows:[...m?[{label:"Rate",value:t}]:[],...w]})})]})}function W1({summary:e,rateLine:t,from:r,to:n,feeDelegated:o}){let a=pe.useMemo(()=>E1(e),[e]);return!a.bridgeInfo?.length&&!a.swapInfo?.length?null:(0,f.jsx)("div",{className:"bf-embedded-details",children:(0,f.jsx)(Lm,{summary:a,rateLine:t,from:r,to:n,feeDelegated:o,includeTxFee:!0})})}function G1({flow:e,env:t,toastError:r}){return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Rm,{flow:e,env:t}),(0,f.jsx)(Cm,{flow:e,approval:e.approvalInfo??null}),(0,f.jsx)(Sm,{flow:e}),(0,f.jsx)(Nm,{flow:e}),(0,f.jsx)(Tm,{message:e.submitToast?"":r}),(0,f.jsx)(Im,{flow:e})]})}function H1({flow:e,env:t,isConnected:r,onRequestConnect:n,feeDelegated:o}){let a=Number(e.fromAmount)>0,i=pe.useMemo(()=>a?e.summary??vm(e):null,[a,e]),s=xm(e.quoteError),l=hm(e.fromAmount,e.fromToken),d=l?"Insufficient balance":s.from,p=/insufficient liquidity|not enough liquidity/i.test(e.quoteError),b=p?void 0:s.to,g=e.quoteError&&!s.from&&!s.to?e.quoteError:"",h=e.error||g,x=e.status==="submitting",y=!a||!e.toAmount||!e.fromToken||!e.toToken||!e.canSubmit||!!e.quoteError||l||x,u=x?"":p&&a?"Insufficient Liquidity":a?"Continue":"Enter Amount";return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("main",{className:"bf-body bf-embedded-body","data-rd-scroll-area":!0,children:(0,f.jsxs)("div",{className:"bf-embedded-form",children:[(0,f.jsxs)("div",{className:"bf-embedded-fields",children:[(0,f.jsxs)("div",{className:"bf-embedded-field-group",children:[(0,f.jsx)(um,{label:"From",token:e.fromToken,amount:e.fromAmount,onAmountChange:c=>e.setAmount(c,"from"),onTokenClick:()=>{let c=cs(e.tokens,e.fromToken);c&&e.selectFromToken(c)},onMax:e.setMax,locked:e.tokens.length<=1}),d&&(0,f.jsx)("div",{className:"bf-embedded-field-error",children:d})]}),(0,f.jsx)("div",{className:"bf-embedded-direction","aria-hidden":"true",children:(0,f.jsx)("span",{children:(0,f.jsx)(od,{size:16})})}),(0,f.jsxs)("div",{className:"bf-embedded-field-group",children:[(0,f.jsx)(um,{label:"To",token:e.toToken,amount:e.toAmount,onAmountChange:c=>e.setAmount(c,"to"),onTokenClick:()=>{let c=cs(e.availableToTokens,e.toToken);c&&e.selectToToken(c)},locked:e.availableToTokens.length<=1}),b&&(0,f.jsx)("div",{className:"bf-embedded-field-error",children:b})]})]}),(0,f.jsx)(ya,{open:!!i?.liquidity,children:i?.liquidity&&(0,f.jsxs)("section",{className:"bf-embedded-liquidity",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("span",{children:i.liquidity.label??"Available Liquidity"}),(0,f.jsx)("span",{"data-status":i.liquidity.status,children:i.liquidity.status??"normal"})]}),(0,f.jsx)("span",{className:"bf-embedded-liquidity-track",children:(0,f.jsx)("span",{style:{width:`${i.liquidity.percentage??50}%`}})})]})}),(0,f.jsx)(ya,{open:p&&a,children:(0,f.jsx)("div",{className:"bf-embedded-liquidity-error",role:"alert",children:"Insufficient liquidity in all pools for this pair and amount."})}),(0,f.jsx)(ya,{open:!!i,children:i&&(0,f.jsx)("div",{className:"bf-embedded-summary",children:(0,f.jsx)(W1,{summary:i,feeDelegated:o,rateLine:A1(e.fromAmount,e.toAmount,e.fromToken,e.toToken),from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:ps(e.fromAmount),chain:e.fromToken?Fo(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:ps(e.toAmount),chain:e.toToken?Fo(e.toToken.chainId):void 0}})})}),(0,f.jsx)("div",{className:"bf-embedded-action-footer",children:r?(0,f.jsx)("button",{type:"button",className:"bf-embedded-cta",onClick:e.submit,"data-track":"next",disabled:y,"aria-busy":x,"aria-label":x?"Processing transaction":p?"Insufficient liquidity":"Continue with swap or bridge",children:x?(0,f.jsx)("span",{className:"bf-embedded-spinner","aria-hidden":"true"}):u}):(0,f.jsx)("button",{type:"button",className:"bf-embedded-cta",onClick:n,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})})]})}),(0,f.jsx)(G1,{flow:e,env:t,toastError:h})]})}function _1({item:e}){let t=fs(e),r=b1(e.fromAmount,e.fromToken);return(0,f.jsxs)("article",{className:"bf-history-item",children:[(0,f.jsxs)("div",{className:"bf-history-item-head",children:[(0,f.jsx)("span",{className:"bf-history-status","data-status":t,children:y1(t)}),(0,f.jsx)("time",{className:"bf-history-time",dateTime:e.timestamp,children:g1(e.timestamp)})]}),(0,f.jsxs)("div",{className:"bf-history-item-body",children:[(0,f.jsxs)("strong",{className:"bf-history-amount",children:[h1(e.fromAmount)," ",e.fromToken.symbol]}),(0,f.jsxs)("div",{className:"bf-history-meta",children:[(0,f.jsx)("span",{className:"bf-history-usd",children:r??m1(e.txHash)}),(0,f.jsxs)("span",{className:"bf-history-route",children:[(0,f.jsxs)("span",{className:"bf-history-route-token",children:[(0,f.jsx)(va,{token:e.fromToken,size:16}),(0,f.jsx)("span",{children:e.fromToken.symbol})]}),(0,f.jsx)(Xf,{size:16,className:"bf-history-route-arrow"}),(0,f.jsxs)("span",{className:"bf-history-route-token",children:[(0,f.jsx)(va,{token:e.toToken,size:16}),(0,f.jsx)("span",{children:e.toToken.symbol})]})]})]})]})]})}function Q1({flow:e}){let[t,r]=pe.useState("all"),n=e.history.some(i=>fs(i)==="pending"),o=e.history.filter(i=>w1(i,t)),a=t==="all"?"No bridge history yet.":`No ${t} bridge history.`;return(0,f.jsxs)("main",{className:"bf-history-body",children:[(0,f.jsx)("nav",{className:"bf-history-tabs","aria-label":"Bridge history filters",children:p1.map(i=>(0,f.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,f.jsx)("span",{children:i.label}),i.value==="pending"&&n&&(0,f.jsx)("span",{className:"bf-history-tab-dot","aria-hidden":"true"})]},i.value))}),o.length>0?(0,f.jsx)("div",{className:"bf-history-list",children:o.map(i=>(0,f.jsx)(_1,{item:i},i.id||i.txHash))}):(0,f.jsx)("div",{className:"bf-empty",children:a})]})}function V1({flow:e,env:t,feeDelegated:r}){let[n,o]=pe.useState(!1),[a,i]=pe.useState(0),s=!!(e.fromAmount.trim()||e.toAmount.trim()),l=pe.useMemo(()=>s?e.summary??vm(e):null,[s,e]),d=qt("apps.json",t,w=>Dr(w?.bridgePoweredBy?.url,t)),p=xm(e.quoteError),b=hm(e.fromAmount,e.fromToken),g=b?"Insufficient balance":p.from,h=e.quoteError&&!p.from&&!p.to?e.quoteError:"",x=e.error||h,y=e.history.some(w=>fs(w)==="pending"),c=(l?.pathType??wm(e.fromToken,e.toToken))!=="bridge";return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("main",{className:"bf-body",children:[(0,f.jsxs)("div",{className:"bf-toolbar",children:[(0,f.jsxs)("button",{type:"button",className:"bf-chip bf-chip-history",onClick:()=>e.setStep("history"),"data-track":"history_open",children:[(0,f.jsx)(Kf,{}),(0,f.jsx)("span",{children:"History"}),(y||e.hasNewHistory)&&(0,f.jsx)("span",{className:"bf-chip-dot","aria-hidden":"true"})]}),c&&(0,f.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,f.jsx)(Zf,{}),(0,f.jsx)("span",{children:e.slippageLocked?"Auto 1%":u1(e.slippage,e.effectiveSlippage)})]})]}),(0,f.jsxs)("div",{className:"bf-swap-card","data-has-from-error":g?"true":"false",children:[(0,f.jsx)(pm,{label:"From",token:e.fromToken,amount:e.fromAmount,usd:cm(e.fromAmount,e.fromToken),onAmountChange:w=>e.setAmount(w,"from"),onTokenClick:()=>{let w=cs(e.tokens,e.fromToken);w&&e.selectFromToken(w)},locked:e.tokens.length<=1}),g&&(0,f.jsx)("div",{className:"bf-field-error",children:g}),(0,f.jsx)("button",{type:"button",className:"bf-swap-toggle",onClick:()=>{e.swapTokens(),i(w=>w+360)},"data-track":"token_swap",style:{transform:`translateX(-50%) rotate(${a}deg)`,transition:"transform 0.2s ease"},children:(0,f.jsx)(od,{size:22})}),(0,f.jsx)(pm,{label:"To",token:e.toToken,amount:e.toAmount,usd:cm(e.toAmount,e.toToken),onAmountChange:w=>e.setAmount(w,"to"),onTokenClick:()=>{let w=cs(e.availableToTokens,e.toToken);w&&e.selectToToken(w)},locked:e.availableToTokens.length<=1}),p.to&&(0,f.jsx)("div",{className:"bf-field-error",children:p.to})]}),(0,f.jsx)(C1,{fromAmount:e.fromAmount,toAmount:e.toAmount,fromToken:e.fromToken,toToken:e.toToken}),(0,f.jsx)(ya,{open:!!l,children:l&&(0,f.jsx)(I1,{summary:l,feeDelegated:r,from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:ps(e.fromAmount),chain:e.fromToken?Fo(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:ps(e.toAmount),chain:e.toToken?Fo(e.toToken.chainId):void 0}})})]}),(0,f.jsxs)("footer",{className:"bf-footer",children:[(0,f.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,f.jsxs)("a",{className:"bf-powered",href:d,target:"_blank",rel:"noreferrer",children:["Powered by ",(0,f.jsx)("span",{className:"bf-powered-brand",children:"CROSS DeFi"})]})]}),n&&(0,f.jsx)(k1,{flow:e,onClose:()=>o(!1)}),(0,f.jsx)(Rm,{flow:e,env:t}),(0,f.jsx)(Cm,{flow:e,approval:e.approvalInfo??null}),(0,f.jsx)(Sm,{flow:e}),(0,f.jsx)(Nm,{flow:e}),(0,f.jsx)(Tm,{message:e.submitToast?"":x}),(0,f.jsx)(Im,{flow:e})]})}function co({onClose:e,onBackToWallet:t,feeDelegated:r,env:n,variant:o="default",title:a,isConnected:i,onRequestConnect:s,className:l,...d}){let p=pe.useMemo(()=>it(n),[n]),b=Yf(),g=sm({...d,onExit:t}),h=pe.useRef(null),x=c1(h),y=g.step==="history"?"History":a??"Swap & Bridge",u=i??!!d.walletAddress,c=o==="embedded"&&g.step==="form"&&!t?null:g.back;return(0,f.jsx)(Le,{feature:"bridge",children:(0,f.jsx)(fm.Provider,{value:x,children:(0,f.jsxs)("div",{ref:h,className:Pe("bf-root",l),"data-view":g.step,"data-status":g.status,"data-variant":o,"data-soft-keyboard-open":o==="embedded"&&b?"true":"false",children:[(0,f.jsxs)("header",{className:"bf-header",children:[c?(0,f.jsx)("button",{type:"button",className:"bf-header-btn",onClick:c,"aria-label":"Back",children:(0,f.jsx)(qr,{size:24})}):(0,f.jsx)("span",{className:"bf-header-spacer","aria-hidden":"true"}),(0,f.jsx)("span",{className:"bf-header-title","data-clickable":c?"true":"false",onClick:c??void 0,children:y}),(0,f.jsx)("button",{type:"button",className:"bf-header-btn",onClick:e,"aria-label":"Close",children:(0,f.jsx)(Nr,{size:24})})]}),g.step==="history"?(0,f.jsx)(Q1,{flow:g}):o==="embedded"?(0,f.jsx)(H1,{flow:g,env:p,isConnected:u,onRequestConnect:s,feeDelegated:r}):(0,f.jsx)(V1,{flow:g,env:p,feeDelegated:r})]})})})}var yr=V(require("react"),1),jm=V(require("bignumber.js"),1);var Dm=require("@tanstack/react-query");var q1="token-history";function Pm(e,t,r,n,o=!0){return(0,Dm.useInfiniteQuery)({queryKey:[q1,e,t,r.toLowerCase(),n.toLowerCase()],initialPageParam:void 0,queryFn:async({pageParam:a,signal:i})=>{let s=await je("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 p=await fetch(`${s}/v1/public/token/historical?${l}`,{cache:"no-store",signal:i});if(!p.ok)throw new Error(`Failed to fetch token history: ${p.status}`);let b=await p.json();if(b.code!==200)throw new Error(`Token history API error: ${b.code}`);return b.data??[]},getNextPageParam:a=>{if(!a||a.length===0)return;let i=a[a.length-1];return{last_timestamp:i.timestamp,last_log_index:i.log_index,last_tx_index:i.tx_index}},enabled:o&&!!n&&!!r&&t>0,staleTime:1e4})}var ms=V(require("react"),1);var ld={chart:!1,balance:!0,overview:!1,social:!1,history:!0},Y1=Object.keys(ld);function Om(e){let[t,r]=ms.useState({visibility:ld,isLoaded:!1});return ms.useEffect(()=>{let n=!0;return xn(ii,e).then(o=>{if(!n)return;let a=o?.tokenDetail?.sections,i={...ld};if(a)for(let s of Y1){let l=a[s];typeof l=="boolean"&&(i[s]=l)}r({visibility:i,isLoaded:!0})}),()=>{n=!1}},[e]),t}var kr=V(require("react"),1);var gs=require("@tanstack/react-query");var K1="token-price-history";function Bm(e,t,r,n,o=!0){return(0,gs.useQuery)({queryKey:[K1,e,t,r.toLowerCase(),n],queryFn:async({signal:a})=>{let i=await je("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:gs.keepPreviousData})}var pt=require("react/jsx-runtime"),Z1="var(--ds-system-green-high, #00a869)",X1="var(--wi-error, #e70077)",po=150,hs=3,dd=18,J1=18,$1=[{key:"10m",label:"10m"},{key:"1h",label:"1H"},{key:"1d",label:"1D"},{key:"7d",label:"1W"},{key:"30d",label:"1M"},{key:"1y",label:"1Y"}],ey=new Set(["7d","30d","1y"]);function ty(){let e=kr.useRef(null),[t,r]=kr.useState(0);return kr.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 ry(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 ny(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 w=1;w<n;w++)r[w]>o&&(o=r[w],i=w),r[w]<a&&(a=r[w],s=w);let l=o-a||1,d=Math.max(1,t-hs*2),p=po-dd-J1,b=w=>n===1?t/2:hs+w/(n-1)*d,g=w=>dd+(1-(w-a)/l)*p,h=r.map((w,m)=>({x:b(m),y:g(w)})),x=h.map((w,m)=>`${m===0?"M":"L"}${w.x.toFixed(2)},${w.y.toFixed(2)}`).join(" "),y=h[0],u=h[h.length-1],c=`${x} L${u.x.toFixed(2)},${po} L${y.x.toFixed(2)},${po} Z`;return{values:r,points:h,linePath:x,areaPath:c,maxIdx:i,minIdx:s}}function zm({env:e,chainId:t,tokenAddress:r}){let[n,o]=kr.useState("1d"),[a,i]=kr.useState(null),s=kr.useId(),[l,d]=ty(),{data:p,isLoading:b,isError:g}=Bm(e,t,r,n,!0),h=kr.useMemo(()=>(p??[]).filter(G=>Number.isFinite(Number(G.price))).slice().sort((G,J)=>G.updated_at-J.updated_at),[p]),x=kr.useMemo(()=>h.map(A=>Number(A.price)),[h]),y=kr.useMemo(()=>ny(x,d),[x,d]);kr.useEffect(()=>{i(null)},[n]);let u=h.length>0,c=a!==null&&a<x.length?a:x.length-1,w=u?x[c]:0,m=u?x[0]:0,v=m!==0?(w-m)/m*100:0,R=v>=0,C=R?Z1:X1,T=(R?"+":"-")+(Math.floor(Math.abs(v)*100)/100).toFixed(2)+"%",S=a!==null&&h[a]?ry(h[a].updated_at,ey.has(n)):"",N=A=>{if(!y||d<=0)return;let G=A.currentTarget.getBoundingClientRect(),J=A.clientX-G.left;if(y.values.length<=1){i(0);return}let re=Math.max(1,d-hs*2),L=Math.min(1,Math.max(0,(J-hs)/re)),te=Math.round(L*(h.length-1));i(Math.min(h.length-1,Math.max(0,te)))},I=()=>i(null);if(!b&&(g||!u))return null;let M=a!==null&&y&&y.points[a]?y.points[a]:null,O=y?.points[y.maxIdx],D=y?.points[y.minIdx],W=A=>Math.min(Math.max(A,24),Math.max(24,d-24));return(0,pt.jsxs)("section",{className:"wi-td-chart",children:[(0,pt.jsxs)("div",{className:"wi-td-chart-panel",children:[(0,pt.jsx)("span",{className:"wi-td-chart-price",children:u?ro(w):"\u2014"}),u&&(0,pt.jsxs)("span",{className:"wi-td-chart-change","data-positive":R,children:[(0,pt.jsx)("span",{children:T}),S&&(0,pt.jsx)("span",{className:"wi-td-chart-when",children:S})]})]}),(0,pt.jsx)("div",{ref:l,className:"wi-td-chart-plot",children:b&&!u?(0,pt.jsx)("div",{className:"wi-skeleton-block wi-td-chart-skeleton"}):y&&d>0&&(0,pt.jsxs)("svg",{className:"wi-td-chart-svg",width:d,height:po,role:"img","aria-label":"Price chart",children:[(0,pt.jsx)("defs",{children:(0,pt.jsxs)("linearGradient",{id:s,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,pt.jsx)("stop",{offset:"0%",stopColor:C,stopOpacity:.28}),(0,pt.jsx)("stop",{offset:"100%",stopColor:C,stopOpacity:0})]})}),(0,pt.jsx)("path",{d:y.areaPath,fill:`url(#${s})`}),(0,pt.jsx)("path",{d:y.linePath,fill:"none",stroke:C,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),O&&(0,pt.jsx)("text",{className:"wi-td-chart-minmax",x:W(O.x),y:Math.max(11,O.y-7),textAnchor:"middle",children:ro(y.values[y.maxIdx])}),D&&y.minIdx!==y.maxIdx&&(0,pt.jsx)("text",{className:"wi-td-chart-minmax",x:W(D.x),y:Math.min(po-5,D.y+14),textAnchor:"middle",children:ro(y.values[y.minIdx])}),M&&(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)("line",{className:"wi-td-chart-cursor",x1:M.x,y1:dd-6,x2:M.x,y2:po}),(0,pt.jsx)("circle",{cx:M.x,cy:M.y,r:4,fill:C,stroke:"var(--wi-surface-bg, #121212)",strokeWidth:2})]}),(0,pt.jsx)("rect",{x:0,y:0,width:d,height:po,fill:"transparent",style:{touchAction:"none"},onPointerMove:N,onPointerDown:N,onPointerLeave:I,onPointerCancel:I})]})}),(0,pt.jsx)("div",{className:"wi-td-chart-tabs",role:"tablist",children:$1.map(A=>(0,pt.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 B=require("react/jsx-runtime"),oy="https://contents.crosstoken.io/wallet/token/images/FT.png",ay={receive:"Receive",send:"Send","bridge-in":"Bridge In","bridge-out":"Bridge Out"};function iy(e){return e.length>24?"xs":e.length>18?"sm":"md"}function sy(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 Fm(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 Um(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 ly(e,t,r){let n=yr.useRef(null),o=yr.useRef(null),[a,i]=yr.useState(t);return yr.useLayoutEffect(()=>{let s=n.current,l=o.current;if(!s||!l)return;let d=()=>{let b=s.clientWidth;if(!b)return;let g=window.getComputedStyle(l),h=document.createElement("span");h.textContent=l.textContent,h.style.cssText=["position:absolute","left:-9999px","top:-9999px","visibility:hidden","white-space:nowrap",`font-family:${g.fontFamily}`,`font-weight:${g.fontWeight}`,`letter-spacing:${g.letterSpacing}`,`font-size:${t}px`].join(";"),document.body.appendChild(h);let x=h.offsetWidth;if(document.body.removeChild(h),x<=b){i(t);return}let y=Math.max(r,Math.floor(t*b/x));i(y)};d();let p=new ResizeObserver(d);return p.observe(s),()=>p.disconnect()},[e,t,r]),{containerRef:n,textRef:o,fontSize:a}}function dy(e){let t=xt(e);return t?t.decimalPlaces(4,jm.default.ROUND_DOWN).toFormat():"-"}function cy(){return(0,B.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[(0,B.jsx)("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.6"}),(0,B.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 py(){return(0,B.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,B.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 uy(){return(0,B.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,B.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 fy(){return(0,B.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,B.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 Wm({env:e,isMobile:t,token:r,walletAddress:n,stat:o,tokenInfo:a,showBalance:i=!0,onBack:s,onClose:l,onSend:d,onOutlink:p}){let b=r.quantity.decimals,[g,h]=yr.useState(!1),{buildTxUrl:x,chainInfo:y}=np(e,r.chainId,!0),{visibility:u}=Om(e),{data:c,isLoading:w,isError:m,fetchNextPage:v,hasNextPage:R,isFetchingNextPage:C,refetch:T}=Pm(e,r.chainId,r.address,n,!0),S=yr.useMemo(()=>c?.pages?c.pages.flat():[],[c]),N=yr.useRef(null);yr.useEffect(()=>{if(!t)return;let F=N.current;if(!F||!R)return;let ne=new IntersectionObserver($=>{$[0]?.isIntersecting&&!C&&v()},{rootMargin:"120px"});return ne.observe(F),()=>ne.disconnect()},[t,R,C,v]);let I=yr.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(r.address).then(()=>{h(!0),setTimeout(()=>h(!1),1500)}).catch(()=>{})},[r.address]),M=Fm(Um(r.quantity.numeric,b)),O=o?.price?vi(r.quantity.numeric,b,o.price):null,D=i?M:"\u2022\u2022\u2022\u2022",{containerRef:W,textRef:A,fontSize:G}=ly(D,30,14),ee=So(r.chainId,e).name??y?.name??`Chain ${r.chainId}`,re=y?.explorer_url,L=a?.deployed??!0,te=yr.useMemo(()=>{let F=[];return a?.info_url&&F.push({key:"web",label:"Website",url:a.info_url,icon:(0,B.jsx)(cy,{})}),a?.telegram_url&&F.push({key:"tg",label:"Telegram",url:a.telegram_url,icon:(0,B.jsx)(py,{})}),a?.x_url&&F.push({key:"x",label:"X",url:a.x_url,icon:(0,B.jsx)(uy,{})}),a?.medium_url&&F.push({key:"medium",label:"Medium",url:a.medium_url,icon:(0,B.jsx)(fy,{})}),F},[a]),ae=(F,ne,$,ye)=>{$t(F,ne,{category:"token-detail",origin:$,payload:{address:r.address,txHash:ye}},p)};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"wi-sticky-header",children:[(0,B.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,B.jsx)("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:(0,B.jsx)(qr,{size:24})}),(0,B.jsxs)("span",{className:"wi-td-header-title",children:[(0,B.jsx)("img",{src:r.icon_url,alt:"","aria-hidden":!0,className:"wi-td-header-icon",width:24,height:24,draggable:!1,onError:F=>{F.currentTarget.src=oy}}),(0,B.jsx)("span",{className:"wi-td-header-name",children:r.symbol})]}),(0,B.jsx)("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close",children:(0,B.jsx)(Nr,{size:24})})]}),(0,B.jsx)("hr",{className:"wi-divider"})]}),(0,B.jsxs)("div",{className:"wi-td-scroll",children:[u.chart&&(0,B.jsx)(zm,{env:e,chainId:r.chainId,tokenAddress:r.address}),u.balance&&(0,B.jsxs)("section",{className:"wi-td-balance-card",children:[(0,B.jsxs)("div",{className:"wi-td-balance-left",ref:W,children:[(0,B.jsx)("span",{className:"wi-td-balance-label",children:"My Balance"}),(0,B.jsx)("span",{className:"wi-td-balance-amount",ref:A,style:{fontSize:G},children:D}),i&&O&&(0,B.jsx)("span",{className:"wi-td-balance-fiat",children:O})]}),(0,B.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,B.jsx)("span",{children:"Send"})})]}),u.overview&&(0,B.jsxs)("section",{className:"wi-td-section",children:[(0,B.jsx)("h3",{className:"wi-td-section-title",children:"Crypto Overview"}),(0,B.jsxs)("div",{className:"wi-td-rows",children:[(0,B.jsxs)("div",{className:"wi-td-row",children:[(0,B.jsx)("span",{className:"wi-td-row-label",children:"Network"}),re?(0,B.jsxs)("a",{className:"wi-td-row-value wi-td-row-link",href:re,target:"_blank",rel:"noopener noreferrer",onClick:F=>ae(F,re,"token-network"),children:[(0,B.jsx)("span",{children:ee}),(0,B.jsx)(my,{})]}):(0,B.jsx)("span",{className:"wi-td-row-value",children:ee})]}),(0,B.jsxs)("div",{className:"wi-td-row",children:[(0,B.jsx)("span",{className:"wi-td-row-label",children:"Contract Address"}),(0,B.jsxs)("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:I,"aria-label":"Copy contract address",children:[(0,B.jsx)("span",{children:wr(r.address)}),g?(0,B.jsx)(vn,{size:14}):(0,B.jsx)(to,{size:14})]})]}),(0,B.jsxs)("div",{className:"wi-td-row",children:[(0,B.jsx)("span",{className:"wi-td-row-label",children:"Decimals"}),(0,B.jsx)("span",{className:"wi-td-row-value",children:b})]}),(0,B.jsxs)("div",{className:"wi-td-row",children:[(0,B.jsx)("span",{className:"wi-td-row-label",children:"Total Supply"}),(0,B.jsx)("span",{className:"wi-td-row-value",children:dy(o?.circulating_supply)})]})]})]}),u.social&&te.length>0&&(0,B.jsxs)("section",{className:"wi-td-section",children:[(0,B.jsx)("h3",{className:"wi-td-section-title",children:"Social Media"}),(0,B.jsx)("div",{className:"wi-td-social-row",children:te.map(F=>(0,B.jsx)("a",{className:"wi-td-social-btn",href:F.url,target:"_blank",rel:"noopener noreferrer","aria-label":F.label,onClick:ne=>ae(ne,F.url,"token-social"),children:F.icon},F.key))})]}),u.history&&(0,B.jsxs)("section",{className:"wi-td-section",children:[(0,B.jsx)("h3",{className:"wi-td-section-title",children:"Token History"}),w&&(0,B.jsx)("div",{className:"wi-td-history-list",children:Array.from({length:3},(F,ne)=>(0,B.jsxs)("div",{className:"wi-td-history-skeleton",children:[(0,B.jsx)("div",{className:"wi-skeleton-block",style:{width:90,height:14}}),(0,B.jsx)("div",{className:"wi-skeleton-block",style:{width:60,height:14}})]},`td-sk-${ne}`))}),!w&&m&&(0,B.jsxs)("div",{className:"wi-td-history-empty",children:[(0,B.jsx)("span",{children:"Failed to load history."}),(0,B.jsx)("button",{type:"button",className:"wi-td-retry-btn",onClick:()=>T(),children:"Retry"})]}),!w&&!m&&S.length===0&&(0,B.jsx)("div",{className:"wi-td-history-empty",children:(0,B.jsx)("span",{children:"No transactions found."})}),!w&&!m&&S.length>0&&(0,B.jsxs)("div",{className:"wi-td-history-list",children:[S.map((F,ne)=>{let $=F.to_alias?.toLowerCase().includes("bridge")??!1,ye=F.from_alias?.toLowerCase().includes("bridge")??!1,ve=$?"bridge-out":ye?"bridge-in":F.to?.toLowerCase()===n.toLowerCase()?"receive":"send",Be=ve==="receive"||ve==="bridge-in",he=Be?F.from:F.to,Re=Fm(Um(F.amount,b)),Ce=x(F.tx),rt=sy(F.timestamp),Ae=(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"wi-td-history-top",children:[(0,B.jsx)("span",{className:"wi-td-history-type","data-direction":ve,children:ay[ve]}),(0,B.jsx)("span",{className:"wi-td-history-counter",children:wr(he??"")})]}),(0,B.jsxs)("div",{className:"wi-td-history-bottom",children:[(0,B.jsxs)("span",{className:"wi-td-history-meta",children:[(0,B.jsx)("span",{className:"wi-td-history-status","data-status":F.status,children:F.status==="success"?"Success":"Failed"}),rt&&(0,B.jsx)("span",{className:"wi-td-history-time",children:rt})]}),(0,B.jsxs)("span",{className:"wi-td-history-amount","data-size":iy(`${Be?"+":"-"}${Re} ${r.symbol}`),children:[Be?"+":"-",Re," ",r.symbol]})]})]}),Qe=`${F.tx}-${F.log_index}-${ne}`;return Ce?(0,B.jsx)("a",{className:"wi-td-history-item wi-td-history-item--link",href:Ce,target:"_blank",rel:"noopener noreferrer",onClick:ut=>ae(ut,Ce,"token-tx",F.tx),children:Ae},Qe):(0,B.jsx)("div",{className:"wi-td-history-item",children:Ae},Qe)}),R&&(t?(0,B.jsx)("div",{ref:N,className:"wi-td-history-sentinel",children:C&&(0,B.jsx)("span",{className:"wi-td-history-loading",children:"Loading\u2026"})}):(0,B.jsx)("button",{type:"button",className:"wi-td-loadmore-btn",onClick:()=>v(),disabled:C,children:C?"Loading\u2026":"Load more"}))]})]})]})]})}function my(){return(0,B.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",className:Pe("wi-td-external-icon"),"aria-hidden":!0,children:(0,B.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 Xr=V(require("react"),1);var Gm={dev:"https://dev.onechain.nexus/pop",stage:"https://stg.onechain.nexus/pop",production:"https://onechain.nexus/pop"};function _m(e,t){let r=Gm[e]??Gm.production;return t==="send"?r:`${r}/${t}`}var Hm={dev:"https://stg.onechain.nexus/gametoken/bridge",stage:"https://stg.onechain.nexus/gametoken/bridge",production:"https://www.onechain.nexus/gametoken/bridge"};function Qm(e){return Hm[e]??Hm.production}var q=require("react/jsx-runtime");function cd({size:e=20,className:t}){return(0,q.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,q.jsx)("path",{d:"M1.66675 7.91662C1.66677 6.98929 1.94808 6.08377 2.47353 5.31967C2.99898 4.55557 3.74385 3.96883 4.60976 3.63695C5.47567 3.30507 6.42188 3.24366 7.32343 3.46082C8.22497 3.67799 9.03944 4.16352 9.65925 4.85329C9.7029 4.89996 9.75568 4.93718 9.81431 4.96262C9.87294 4.98806 9.93617 5.00119 10.0001 5.00119C10.064 5.00119 10.1272 4.98806 10.1859 4.96262C10.2445 4.93718 10.2973 4.89996 10.3409 4.85329C10.9588 4.15904 11.7734 3.66943 12.6764 3.44962C13.5795 3.22982 14.528 3.29024 15.3958 3.62286C16.2636 3.95547 17.0096 4.5445 17.5343 5.31154C18.0591 6.07858 18.3378 6.98725 18.3334 7.91662C18.3334 9.82495 17.0834 11.25 15.8334 12.5L11.2567 16.9275C11.1015 17.1058 10.91 17.249 10.6951 17.3477C10.4802 17.4464 10.2468 17.4982 10.0103 17.4997C9.77386 17.5012 9.53979 17.4523 9.32365 17.3564C9.10752 17.2605 8.91427 17.1196 8.75675 16.9433L4.16675 12.5C2.91675 11.25 1.66675 9.83329 1.66675 7.91662Z",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),(0,q.jsx)("path",{d:"M8.84839 8.28833H10V13.4938",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Vm({size:e=24,className:t}){return(0,q.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,q.jsx)("path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"}),(0,q.jsx)("path",{d:"m21.854 2.147-10.94 10.939",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})]})}function qm({size:e=24,className:t}){return(0,q.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,q.jsxs)("g",{stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("path",{d:"M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17"}),(0,q.jsx)("path",{d:"m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9"}),(0,q.jsx)("path",{d:"m2 16 6 6"}),(0,q.jsx)("circle",{cx:"16",cy:"9",r:"2.9"}),(0,q.jsx)("circle",{cx:"6",cy:"5",r:"3"})]})})}function Ym({size:e=24,className:t}){return(0,q.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,q.jsxs)("g",{stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("path",{d:"M15 12h-5M15 8h-5"}),(0,q.jsx)("path",{d:"M19 17V5a2 2 0 0 0-2-2H4"}),(0,q.jsx)("path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"})]})})}function Ca({size:e=12,className:t}){return(0,q.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,q.jsx)("path",{d:"m9 18 6-6-6-6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Km({size:e=20,className:t}){return(0,q.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,q.jsx)("rect",{width:"20",height:"20",rx:"4.8",fill:"currentColor"}),(0,q.jsx)("path",{d:"M11.53 9.05 15.7 4.4h-.99l-3.62 4.04L8.2 4.4H4.86l4.37 6.1-4.37 4.87h.99l3.82-4.26 3.05 4.26h3.34zm-1.35 1.51-.44-.61-3.52-4.9h1.52l2.84 3.96.44.61 3.7 5.14h-1.52z",fill:"var(--wi-op-x-glyph, #ffffff)"})]})}function Zm({size:e=20,className:t}){return(0,q.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,q.jsxs)("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("circle",{cx:"9",cy:"7",r:"3.4"}),(0,q.jsx)("path",{d:"M2.6 20.4a6.4 6.4 0 0 1 10.2-5.15"}),(0,q.jsx)("circle",{cx:"17.5",cy:"17.5",r:"2.1"}),(0,q.jsx)("path",{d:"M19.6 17.5v1.05a1.55 1.55 0 0 0 3.1 0v-1.05a5.2 5.2 0 1 0-2.05 4.14"})]})})}function Xm({size:e=20,className:t}){return(0,q.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,q.jsxs)("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("path",{d:"M12.5 3 5 13.5h5.5L10 21l7.5-10.5H12z"}),(0,q.jsx)("path",{d:"M20 4.5 21.5 3M20.5 8h2M17 2.5V1"})]})})}function Jm({size:e=20,className:t}){return(0,q.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,q.jsxs)("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("rect",{x:"2.5",y:"5.5",width:"19",height:"13",rx:"2.5"}),(0,q.jsx)("path",{d:"M12 9v6"}),(0,q.jsx)("path",{d:"m9.5 12.5 2.5 2.5 2.5-2.5"})]})})}function $m({className:e}){return(0,q.jsxs)("svg",{width:"116",height:"24",viewBox:"0 0 116 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"ONEpop",className:e,children:[(0,q.jsx)("path",{d:"M38.1949 4.06787C33.7184 4.06787 30.085 7.69479 30.085 12.1647C30.085 16.6346 33.7184 20.2616 38.1949 20.2616C42.6713 20.2616 46.3048 16.6346 46.3048 12.1647C46.3048 7.69479 42.6713 4.06787 38.1949 4.06787ZM38.1949 16.6216C35.7312 16.6216 33.7315 14.6284 33.7315 12.1647C33.7315 9.70103 35.7312 7.70786 38.1949 7.70786C40.6586 7.70786 42.6583 9.70103 42.6583 12.1647C42.6583 14.6284 40.6586 16.6216 38.1949 16.6216Z",fill:"currentColor"}),(0,q.jsx)("path",{d:"M52.0033 4.81283C51.6438 4.40113 51.1537 4.11359 50.5721 4.11359C49.5657 4.11359 48.7554 4.93046 48.7554 5.93031V18.4513C48.7554 19.4577 49.5722 20.2681 50.5721 20.2681C51.5719 20.2681 52.3888 19.4512 52.3888 18.4513V10.7727L60.5837 19.5492C60.9431 19.9609 61.4332 20.2485 62.0148 20.2485C63.0212 20.2485 63.8316 19.4316 63.8316 18.4317C63.8316 17.9351 63.6094 17.5038 63.3153 17.1639L51.9967 4.81936L52.0033 4.81283Z",fill:"currentColor"}),(0,q.jsx)("path",{d:"M61.8643 12.3934C62.9034 12.3934 63.7398 11.5504 63.7398 10.5179V5.96953C63.7398 4.93047 62.8968 4.09399 61.8643 4.09399C60.8318 4.09399 59.9888 4.93701 59.9888 5.96953V10.5179C59.9888 11.5569 60.8318 12.3934 61.8643 12.3934Z",fill:"currentColor"}),(0,q.jsx)("path",{d:"M76.9017 7.74704C77.9081 7.74704 78.7249 6.93016 78.7249 5.93031C78.7249 4.93046 77.9081 4.11359 76.9017 4.11359H68.5108C67.5044 4.11359 66.6875 4.93046 66.6875 5.93031V18.4513C66.6875 19.4577 67.5044 20.2681 68.5108 20.2681H76.9017C77.9081 20.2681 78.7249 19.4512 78.7249 18.4513C78.7249 17.4515 77.9081 16.6346 76.9017 16.6346H70.3275V14.0075H76.2286C77.235 14.0075 78.0518 13.1907 78.0518 12.1908C78.0518 11.191 77.235 10.3741 76.2286 10.3741H70.3275V7.74704H76.9017Z",fill:"currentColor"}),(0,q.jsx)("path",{d:"M84.5951 23.1908C84.3206 23.1908 84.105 23.1124 83.9481 22.9555C83.7913 22.7987 83.7129 22.5765 83.7129 22.2889V10.7416C83.7129 10.441 83.7913 10.2188 83.9481 10.0751C84.105 9.91823 84.3206 9.83981 84.5951 9.83981C84.8827 9.83981 85.0983 9.91823 85.2421 10.0751C85.3989 10.2188 85.4773 10.441 85.4773 10.7416V12.5257L85.2617 12.1728C85.4708 11.4539 85.8825 10.8789 86.4968 10.4476C87.1111 10.0163 87.8495 9.8006 88.7122 9.8006C89.5617 9.8006 90.3002 10.0032 90.9275 10.4084C91.5549 10.8004 92.045 11.369 92.3979 12.114C92.7508 12.8459 92.9272 13.7216 92.9272 14.741C92.9272 15.7474 92.7508 16.6297 92.3979 17.3877C92.0581 18.1327 91.5679 18.7078 90.9275 19.1129C90.3002 19.505 89.5617 19.7011 88.7122 19.7011C87.8626 19.7011 87.1307 19.4854 86.5164 19.0541C85.9021 18.6228 85.4904 18.0543 85.2813 17.3485H85.4969V22.2889C85.4969 22.5765 85.4185 22.7987 85.2617 22.9555C85.1048 23.1124 84.8827 23.1908 84.5951 23.1908ZM88.3004 18.2895C88.8625 18.2895 89.3526 18.1523 89.7708 17.8778C90.2021 17.6034 90.5354 17.2047 90.7707 16.6819C91.0059 16.1591 91.1236 15.5122 91.1236 14.741C91.1236 13.5909 90.8687 12.7152 90.359 12.114C89.8492 11.5128 89.1631 11.2122 88.3004 11.2122C87.7254 11.2122 87.2222 11.3494 86.7909 11.6239C86.3726 11.8853 86.0459 12.2774 85.8106 12.8002C85.5884 13.323 85.4773 13.9699 85.4773 14.741C85.4773 15.8912 85.7322 16.7734 86.2419 17.3877C86.7517 17.9889 87.4378 18.2895 88.3004 18.2895Z",fill:"currentColor"}),(0,q.jsx)("path",{d:"M99.2775 19.7011C98.3365 19.7011 97.5196 19.4985 96.8269 19.0933C96.1342 18.6882 95.5983 18.1131 95.2193 17.3681C94.8403 16.6231 94.6508 15.7474 94.6508 14.741C94.6508 13.983 94.7553 13.3033 94.9644 12.7021C95.1866 12.0878 95.5003 11.565 95.9055 11.1337C96.3106 10.7024 96.7942 10.3757 97.3562 10.1535C97.9313 9.91823 98.5718 9.8006 99.2775 9.8006C100.219 9.8006 101.035 10.0032 101.728 10.4084C102.421 10.8135 102.957 11.3886 103.336 12.1336C103.715 12.8655 103.904 13.7347 103.904 14.741C103.904 15.4991 103.793 16.1853 103.571 16.7996C103.362 17.4139 103.055 17.9366 102.65 18.368C102.244 18.7993 101.754 19.1326 101.179 19.3678C100.617 19.59 99.9833 19.7011 99.2775 19.7011ZM99.2775 18.2895C99.8526 18.2895 100.349 18.1523 100.768 17.8778C101.199 17.6034 101.526 17.2047 101.748 16.6819C101.983 16.1591 102.101 15.5122 102.101 14.741C102.101 13.5909 101.846 12.7152 101.336 12.114C100.826 11.5128 100.14 11.2122 99.2775 11.2122C98.7155 11.2122 98.2189 11.3494 97.7876 11.6239C97.3693 11.8853 97.0426 12.2774 96.8073 12.8002C96.572 13.323 96.4544 13.9699 96.4544 14.741C96.4544 15.8912 96.7093 16.7734 97.219 17.3877C97.7418 17.9889 98.428 18.2895 99.2775 18.2895Z",fill:"currentColor"}),(0,q.jsx)("path",{d:"M107.072 23.1908C106.797 23.1908 106.582 23.1124 106.425 22.9555C106.268 22.7987 106.19 22.5765 106.19 22.2889V10.7416C106.19 10.441 106.268 10.2188 106.425 10.0751C106.582 9.91823 106.797 9.83981 107.072 9.83981C107.359 9.83981 107.575 9.91823 107.719 10.0751C107.876 10.2188 107.954 10.441 107.954 10.7416V12.5257L107.738 12.1728C107.948 11.4539 108.359 10.8789 108.974 10.4476C109.588 10.0163 110.326 9.8006 111.189 9.8006C112.038 9.8006 112.777 10.0032 113.404 10.4084C114.032 10.8004 114.522 11.369 114.875 12.114C115.228 12.8459 115.404 13.7216 115.404 14.741C115.404 15.7474 115.228 16.6297 114.875 17.3877C114.535 18.1327 114.045 18.7078 113.404 19.1129C112.777 19.505 112.038 19.7011 111.189 19.7011C110.339 19.7011 109.607 19.4854 108.993 19.0541C108.379 18.6228 107.967 18.0543 107.758 17.3485H107.974V22.2889C107.974 22.5765 107.895 22.7987 107.738 22.9555C107.582 23.1124 107.359 23.1908 107.072 23.1908ZM110.777 18.2895C111.339 18.2895 111.829 18.1523 112.248 17.8778C112.679 17.6034 113.012 17.2047 113.247 16.6819C113.483 16.1591 113.6 15.5122 113.6 14.741C113.6 13.5909 113.345 12.7152 112.836 12.114C112.326 11.5128 111.64 11.2122 110.777 11.2122C110.202 11.2122 109.699 11.3494 109.268 11.6239C108.849 11.8853 108.523 12.2774 108.287 12.8002C108.065 13.323 107.954 13.9699 107.954 14.741C107.954 15.8912 108.209 16.7734 108.719 17.3877C109.228 17.9889 109.915 18.2895 110.777 18.2895Z",fill:"currentColor"}),(0,q.jsx)("path",{d:"M14.7326 0.727918C12.9726 1.59329 11.6096 4.00482 11.0833 5.59357C9.88384 4.95085 7.89924 3.76837 5.7791 4.00482C3.25593 4.28622 1.16093 5.72223 0.333058 8.59505C-0.616745 11.891 0.425001 15.7904 3.97287 17.5788C7.25977 19.2357 10.3262 21.1047 11.8468 22.2197C13.3673 23.3348 14.6332 24.4164 15.5435 23.8398C17.1655 23.054 20.2401 19.6295 22.4534 16.1013C24.3507 13.0769 25.9439 7.65453 23.3488 3.26211C21.2608 -0.0620856 17.6891 -0.725834 14.7326 0.727918Z",fill:"url(#wi-op-logo-heart)"}),(0,q.jsx)("mask",{id:"wi-op-logo-mask",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"25",height:"24",children:(0,q.jsx)("path",{d:"M14.7326 0.727918C12.9726 1.59329 11.6096 4.00482 11.0833 5.59357C9.88384 4.95085 7.89924 3.76837 5.7791 4.00482C3.25593 4.28622 1.16093 5.72223 0.333058 8.59505C-0.616745 11.891 0.425001 15.7904 3.97287 17.5788C7.25977 19.2357 10.3262 21.1047 11.8468 22.2197C13.3673 23.3348 14.6332 24.4164 15.5435 23.8398C17.1655 23.054 20.2401 19.6295 22.4534 16.1013C24.3507 13.0769 25.9439 7.65453 23.3488 3.26211C21.2608 -0.0620856 17.6891 -0.725834 14.7326 0.727918Z",fill:"white"})}),(0,q.jsxs)("g",{mask:"url(#wi-op-logo-mask)",children:[(0,q.jsx)("path",{d:"M29.5305 -3.85553H-1.43018V24.7597H29.5305V-3.85553Z",fill:"url(#wi-op-logo-base)"}),(0,q.jsx)("path",{d:"M12.7993 24.7597H29.5372V1.58752L12.7993 13.5165V24.7597Z",fill:"url(#wi-op-logo-shine-r)"}),(0,q.jsx)("path",{d:"M12.8037 24.7598H-1.63916V2.94476L12.8037 13.5166V24.7598Z",fill:"url(#wi-op-logo-shine-l)"})]}),(0,q.jsx)("path",{d:"M13.4339 7.58409L9.79429 9.73601C9.1523 10.1136 8.92988 10.962 9.2989 11.6189C9.66791 12.2759 10.4969 12.5035 11.1389 12.1259L14.2174 10.305L12.7515 11.9138V18.2247C12.7515 18.9852 13.3581 19.6059 14.1012 19.6059C14.8442 19.6059 15.4508 18.9852 15.4508 18.2247V8.77903C15.4508 8.51521 15.37 8.25656 15.2689 8.08586C14.8897 7.43407 14.0708 7.20129 13.4288 7.57891L13.4339 7.58409Z",fill:"white"}),(0,q.jsxs)("defs",{children:[(0,q.jsxs)("linearGradient",{id:"wi-op-logo-heart",x1:"12.3679",y1:"-0.18782",x2:"12.3679",y2:"23.9797",gradientUnits:"userSpaceOnUse",children:[(0,q.jsx)("stop",{stopColor:"#F1603C"}),(0,q.jsx)("stop",{offset:"1",stopColor:"#EE2566"})]}),(0,q.jsxs)("linearGradient",{id:"wi-op-logo-base",x1:"-5.01624",y1:"-7.30565",x2:"28.6827",y2:"29.4172",gradientUnits:"userSpaceOnUse",children:[(0,q.jsx)("stop",{stopColor:"#F3752D"}),(0,q.jsx)("stop",{offset:"1",stopColor:"#EC1272"})]}),(0,q.jsxs)("linearGradient",{id:"wi-op-logo-shine-r",x1:"10.2312",y1:"2.71613",x2:"23.8708",y2:"13.2539",gradientUnits:"userSpaceOnUse",children:[(0,q.jsx)("stop",{stopColor:"white",stopOpacity:"0.5"}),(0,q.jsx)("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]}),(0,q.jsxs)("linearGradient",{id:"wi-op-logo-shine-l",x1:"24.1414",y1:"-2.87687",x2:"12.838",y2:"18.379",gradientUnits:"userSpaceOnUse",children:[(0,q.jsx)("stop",{stopColor:"white",stopOpacity:"0.5"}),(0,q.jsx)("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]})]})]})}var gy="data:image/webp;base64,UklGRiIfAABXRUJQVlA4WAoAAAAQAAAA9QAA1wAAQUxQSDQJAAABsMf/nzG31uyzu9lNurFtp7Zt27btHtuu3YPatnWM1A2q08bJJmmyu/P7XfSm+2Bm/rsnIiaA/JNAndnDLyQiJi4uNios0MfdIEJ699Dkhv2mLP10zdadu3dsXv7e/HFta0T6GIXG6B/fbPznp9Lz7FjViqzrG+Z1TA4wioolpvOru++WISLCf/8XICAiOh6feKtznEVEvNNG//AYEZFSCviSQBERH+8YmeQhGh415p4vRQQKAOhUAEC0HpmYWE0kTAmTzlUiUgCUFRDLDw8N14uCLqjHvnIECig/IOavauIhBua09x4hUkBlAuLvk0J1AuDT/Tggpajk4i9TjNwXNi8bAVDph9q68Z0ubnk5UkDlp/e38JyU8h1FQBUCZo9w5zd9rd0IgCp9PMrCa1LtIwiAqn08xMxnutSDCKhewIzOBi6L3YmA6v6pDo+FbUBQG+4J5S+PjxwIqHbHm2685TKqGAHVn9NVx1e6RrcRUAvPhfFV8F4E1ETHGy48ZV5mB43AB/V5quUjBNTKNWZ+8tuPFDUzp1EVDGYP36CQ0NDQ4EBvV6OOO6TxFQDagd8Y/8vkG5XSrt+kJe998sWXX3zy9pzBXWrH+Jr4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Uc6kLTepaSfDjMMO13nc83Bp1gf9kmweID6+5MqNSxgHbv+z//3BrktV/Rl7DfiqPdxlkFinc/i09y+qlDycF6SDyMXIsRWi1IIvY4rojOw7PdSyYIzuQi1ul2IviqZrwjvgitwN/22Ogzpt6VUaERFfLjCSmwNIwt2hcaH3+ZB4sj7qP784wlWjexf/5iN8j6tHK6zzw4Q+QLcMcNksKjPFBaupKpIcBCUxs8o7wxVHzyRhdr/7JP7qiXejoFAtYPP/bcBCgAAAAAAAAAAA==";function eg({className:e}){return(0,q.jsx)("svg",{width:"82",height:"72",viewBox:"0 0 82 72",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,className:e,children:(0,q.jsx)("image",{href:gy,width:"82",height:"72",preserveAspectRatio:"xMidYMid meet"})})}we(`.wi-op-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;display:flex;flex-direction:column;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .wi-op-scroll{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-op-scroll::-webkit-scrollbar{width:4px}.wi-op-scroll::-webkit-scrollbar-track{background:transparent}.wi-op-scroll::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}[data-theme=light] .wi-op-scroll::-webkit-scrollbar-thumb{background:#0000001f}.wi-op-header-title{position:absolute;left:50%;transform:translate(-50%);display:inline-flex;align-items:center;pointer-events:none}.wi-op-logo{display:block;flex-shrink:0;color:var(--ds-content-highest, #000000)}.wi-op-logo-img{height:24px;width:auto;object-fit:contain}.wi-op-hero{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:24px;flex-shrink:0}.wi-op-hero-copy{display:flex;flex-direction:column;gap:6px;min-width:0}.wi-op-hero-title{display:flex;flex-direction:column;margin:0;font-family:inherit;font-size:18px;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000)}.wi-op-hero-title-row{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap}.wi-op-x-badge{flex-shrink:0;color:var(--ds-content-highest, #000000)}[data-theme=light] .wi-op-x-badge{--wi-op-x-glyph: #ffffff}[data-theme=dark] .wi-op-x-badge{--wi-op-x-glyph: #1e232e}.wi-op-hero-sub{margin:0;font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-hero-art{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:120px;height:72px}.wi-op-hero-img{max-width:100%;max-height:72px;object-fit:contain}.wi-op-panel{display:flex;flex-direction:column;gap:8px;padding:0 24px;flex-shrink:0}.wi-op-balance-card{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa)}.wi-op-balance-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.wi-op-balance-label{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-op-balance-body{display:flex;align-items:center;gap:4px;min-width:0}.wi-op-balance-icon{width:24px;height:24px;border-radius:50%;object-fit:cover;flex-shrink:0}.wi-op-balance-value{font-family:inherit;font-size:28px;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-link-btn{appearance:none;display:inline-flex;align-items:center;gap:4px;padding:0;border:none;background:transparent;font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;flex-shrink:0;transition:color .15s ease}.wi-op-link-btn:hover:not(:disabled){color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-link-btn:disabled{cursor:default;opacity:.5}.wi-op-balance-head>[data-gou-mode=button]{display:contents}.wi-op-action-row{display:flex;align-items:stretch;gap:8px}.wi-op-action-card{appearance:none;display:flex;flex:1 1 0;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 8px;border:none;border-radius:10px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-align:center;cursor:pointer;transition:background-color .15s ease,transform .1s ease}.wi-op-action-card>svg{flex-shrink:0}.wi-op-action-card:hover:not(:disabled){background:#2e3544}[data-theme=light] .wi-op-action-card:hover:not(:disabled){background:#e4e8ef}.wi-op-action-card:active:not(:disabled){transform:scale(.95)}.wi-op-action-card:disabled{cursor:default;opacity:.45}.wi-op-cta-row{display:flex;flex-direction:column;gap:10px;padding:24px;flex-shrink:0}.wi-op-cta-skeleton{border-radius:10px}.wi-op-cta{appearance:none;display:flex;align-items:center;justify-content:center;width:100%;padding:12px 16px;border:none;border-radius:10px;font-family:inherit;font-size:16px;font-weight:600;line-height:1;cursor:pointer;transition:filter .15s ease,transform .1s ease,background-color .15s ease}.wi-op-cta:active:not(:disabled){transform:scale(.985)}.wi-op-cta:disabled{cursor:default;opacity:.5}.wi-op-cta--gradient{background:linear-gradient(193.7deg,#f62e61 16.1%,#f7564a 83.9%);color:#fff}.wi-op-cta--gradient:hover:not(:disabled){filter:brightness(1.05)}.wi-op-cta--purple{background:var(--ds-system-purple-high, #7346f3);color:var(--ds-system-purple-on, #ffffff)}.wi-op-cta--purple:hover:not(:disabled){filter:brightness(1.08)}.wi-op-cta--outline{background:transparent;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-cta--outline:hover:not(:disabled){background:var(--ds-surface-medium, #f5f7fa)}.wi-op-features{display:flex;flex-direction:column;padding:0 24px 8px;flex-shrink:0}.wi-op-feature{display:flex;align-items:center;gap:6px;padding:12px 0}.wi-op-feature+.wi-op-feature{border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-op-feature-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;flex-shrink:0;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-accent-primary-high, #f0640d)}.wi-op-feature-copy{display:flex;flex-direction:column;min-width:0}.wi-op-feature-title{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-feature-desc{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-activity{display:flex;flex-direction:column;gap:8px;padding:0 24px 8px;flex-shrink:0}.wi-op-activity-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.wi-op-activity-heading{display:flex;flex-direction:column;min-width:0}.wi-op-activity-title{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-activity-currency{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-activity-list{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}.wi-op-activity-item{display:flex;align-items:flex-start;gap:6px;padding:12px 0}.wi-op-activity-item+.wi-op-activity-item{border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-op-activity-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;overflow:hidden;flex-shrink:0;background:var(--ds-surface-medium, #f5f7fa)}.wi-op-activity-avatar img{width:100%;height:100%;object-fit:cover}.wi-op-activity-initial{font-family:inherit;font-size:13px;font-weight:600;line-height:1;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-op-activity-copy{display:flex;flex-direction:column;flex:1 1 0;min-width:0}.wi-op-activity-meta{display:flex;align-items:center;gap:6px;min-width:0}.wi-op-activity-peer{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-activity-sep{width:1px;height:14px;flex-shrink:0;background:var(--ds-border-medium, rgba(0, 0, 0, .18))}.wi-op-activity-time{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap;flex-shrink:0}.wi-op-activity-amount{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-badge{display:inline-flex;align-items:center;justify-content:center;padding:3px 6px;border-radius:4px;flex-shrink:0;font-family:inherit;font-size:12px;font-weight:500;line-height:1}.wi-op-badge--claimed{background:var(--ds-system-green-low, #e7f9f8);color:var(--ds-system-green-high, #00a0a2)}.wi-op-badge--waiting{background:var(--ds-accent-primary-low, #fff5ee);color:var(--ds-accent-primary-high, #f0640d)}.wi-op-badge--refunded{background:var(--ds-system-red-low, #ffeeee);color:var(--ds-system-red-high, #d20609)}.wi-op-badge--ready{background:var(--ds-system-blue-low, #ecf8fc);color:var(--ds-system-blue-high, #008dca)}.wi-op-footer{display:flex;align-items:center;justify-content:center;padding:16px 24px;flex-shrink:0;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-drawer-content .wi-op-hero,.wi-drawer-content .wi-op-cta-row,.wi-drawer-content .wi-op-panel,.wi-drawer-content .wi-op-features,.wi-drawer-content .wi-op-activity,.wi-drawer-content .wi-op-footer{padding-left:16px;padding-right:16px}
|
|
12
|
-
`);var P=require("react/jsx-runtime"),hy=6,by={claimed:"Claimed",waiting:"Waiting",refunded:"Refunded",ready:"Ready"};function tg(e,t){let r;try{r=BigInt(e||"0")}catch{return"0.00"}let n=r<0n;n&&(r=-r);let o,a;if(t<=2){let i=10n**BigInt(t);o=r/i,a=r%i*10n**BigInt(2-t)}else{let i=r/10n**BigInt(t-2);o=i/100n,a=i%100n}return`${n?"-":""}${wy(o.toString())}.${a.toString().padStart(2,"0")}`}function wy(e){let t="";for(let r=0;r<e.length;r++){let n=e.length-r;r>0&&n%3===0&&(t+=","),t+=e[r]}return t}function yy(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 ago`;let o=Math.floor(n/60);if(o<24)return`${o}h ago`;let a=Math.floor(o/24);if(a<30)return`${a}d ago`;let i=Math.floor(a/30);return i<12?`${i}mo ago`:`${Math.floor(i/12)}y ago`}function xy(e){let t=e.trim();return t?t.startsWith("@")?t:`@${t}`:""}function Sa({env:e="production",balanceDisplay:t,balanceIconUrl:r,isBalanceLoading:n,summary:o,logoSrc:a,heroSrc:i,onBack:s,onClose:l,onSend:d,onClaim:p,onActivity:b,onRepliesSeen:g,onBoard:h,onGetToken:x,getTokenSlot:y}){let u=o?.activity??[],c=u.length>0,w=o?.claimableCount??0,m=o?.repliesWaitingCount??0,v=o?.isLoading??!1,R=o?.xConnected??!1,C=Xr.useCallback(A=>{window.open(_m(e,A),"_blank","noopener,noreferrer")},[e]),T=Xr.useCallback(()=>d?d():C("send"),[d,C]),S=Xr.useCallback(()=>p?p():C("claim"),[p,C]),N=Xr.useCallback(()=>{if(g?.(),b)return b();C("activity")},[b,g,C]),I=Xr.useCallback(()=>h?h():C("board"),[h,C]),M=Xr.useCallback(()=>{if(x)return x();window.open(Qm(e),"_blank","noopener,noreferrer")},[x,e]),O=Xr.useMemo(()=>!o||w<=0?null:tg(o.claimableTotalRaw,o.claimableDecimals??18),[o,w]),D=Xr.useMemo(()=>u.slice(0,hy),[u]),W=Xr.useCallback(A=>{A.currentTarget.style.display="none"},[]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{className:"wi-sticky-header",children:[(0,P.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,P.jsx)("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:(0,P.jsx)(qr,{size:24})}),(0,P.jsx)("span",{className:"wi-op-header-title",children:a?(0,P.jsx)("img",{src:a,alt:"ONEpop",className:"wi-op-logo-img",height:24,draggable:!1,onError:W}):(0,P.jsx)($m,{className:"wi-op-logo"})}),(0,P.jsx)("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close",children:(0,P.jsx)(Nr,{size:24})})]}),(0,P.jsx)("hr",{className:"wi-divider"})]}),(0,P.jsxs)("div",{className:"wi-op-scroll","data-vaul-no-drag":!0,children:[(0,P.jsxs)("section",{className:"wi-op-hero",children:[(0,P.jsxs)("div",{className:"wi-op-hero-copy",children:[(0,P.jsxs)("h2",{className:"wi-op-hero-title",children:[(0,P.jsx)("span",{children:"Send money with"}),(0,P.jsxs)("span",{className:"wi-op-hero-title-row",children:["just an",(0,P.jsx)(Km,{size:20,className:"wi-op-x-badge"}),"@handle."]})]}),(0,P.jsx)("p",{className:"wi-op-hero-sub",children:"They don't even need a wallet yet."})]}),(0,P.jsx)("div",{className:"wi-op-hero-art","aria-hidden":!0,children:i?(0,P.jsx)("img",{src:i,alt:"",className:"wi-op-hero-img",draggable:!1,onError:W}):(0,P.jsx)(eg,{})})]}),(0,P.jsxs)("section",{className:"wi-op-panel",children:[(0,P.jsxs)("div",{className:"wi-op-balance-card",children:[(0,P.jsxs)("div",{className:"wi-op-balance-head",children:[(0,P.jsx)("span",{className:"wi-op-balance-label",children:"Available"}),y??(0,P.jsxs)("button",{type:"button",className:"wi-op-link-btn",onClick:M,"data-track":"onepop_get_token",children:[(0,P.jsx)("span",{children:"Get ONEUSD"}),(0,P.jsx)(Ca,{size:12})]})]}),(0,P.jsx)("div",{className:"wi-op-balance-body",children:n?(0,P.jsx)("div",{className:"wi-skeleton-block",style:{width:140,height:32}}):(0,P.jsxs)(P.Fragment,{children:[r&&(0,P.jsx)("img",{src:r,alt:"","aria-hidden":!0,className:"wi-op-balance-icon",width:24,height:24,draggable:!1,onError:W}),(0,P.jsx)("span",{className:"wi-op-balance-value",children:t??"0.00"})]})})]}),(0,P.jsxs)("div",{className:"wi-op-action-row","aria-label":"ONEpop actions",children:[(0,P.jsxs)("button",{type:"button",className:"wi-op-action-card",onClick:T,"aria-label":"Send POP","data-track":"onepop_send",children:[(0,P.jsx)(Vm,{size:24}),(0,P.jsx)("span",{children:"Send POP"})]}),(0,P.jsxs)("button",{type:"button",className:"wi-op-action-card",onClick:S,"aria-label":"Claim POPs","data-track":"onepop_claim",children:[(0,P.jsx)(qm,{size:24}),(0,P.jsx)("span",{children:"Claim POPs"})]}),R&&(0,P.jsxs)("button",{type:"button",className:"wi-op-action-card",onClick:N,"aria-label":"Activity","data-track":"onepop_activity",children:[(0,P.jsx)(Ym,{size:24}),(0,P.jsx)("span",{children:"Activity"})]})]})]}),(0,P.jsx)("section",{className:"wi-op-cta-row",children:v?(0,P.jsx)("div",{className:"wi-skeleton-block wi-op-cta-skeleton",style:{height:40}}):(0,P.jsxs)(P.Fragment,{children:[!c&&w<=0&&(0,P.jsx)("button",{type:"button",className:"wi-op-cta wi-op-cta--gradient",onClick:T,"data-track":"onepop_send_first",children:"Send your first POP!"}),w>0?(0,P.jsx)("button",{type:"button",className:"wi-op-cta wi-op-cta--purple",onClick:S,"data-track":"onepop_claim_banner",children:`${w} POP${w===1?"":"s"} waiting to claim (total ${O})`}):!c&&(0,P.jsx)("button",{type:"button",className:"wi-op-cta wi-op-cta--purple",onClick:I,"data-track":"onepop_claim_maybe",children:"You might have POPs waiting"}),m>0&&(0,P.jsx)("button",{type:"button",className:"wi-op-cta wi-op-cta--outline",onClick:N,"data-track":"onepop_replies",children:`${m} ${m===1?"reply":"replies"} waiting`})]})}),c?(0,P.jsxs)("section",{className:"wi-op-activity",children:[(0,P.jsxs)("div",{className:"wi-op-activity-head",children:[(0,P.jsxs)("div",{className:"wi-op-activity-heading",children:[(0,P.jsx)("span",{className:"wi-op-activity-title",children:"Recent activity"}),(0,P.jsx)("span",{className:"wi-op-activity-currency",children:"Currency: ONEUSD"})]}),(0,P.jsxs)("button",{type:"button",className:"wi-op-link-btn",onClick:N,"data-track":"onepop_see_all_activity",children:[(0,P.jsx)("span",{children:"See all activity"}),(0,P.jsx)(Ca,{size:16})]})]}),(0,P.jsx)("ul",{className:"wi-op-activity-list",children:D.map(A=>(0,P.jsx)(vy,{item:A},A.id))})]}):(0,P.jsxs)("section",{className:"wi-op-features",children:[(0,P.jsx)(pd,{icon:(0,P.jsx)(Zm,{size:20}),title:"No wallet address needed",desc:"just their @handle"}),(0,P.jsx)(pd,{icon:(0,P.jsx)(Xm,{size:20}),title:"Claim instantly",desc:"social login, zero gas"}),(0,P.jsx)(pd,{icon:(0,P.jsx)(Jm,{size:20}),title:"Refund anytime",desc:"get it back if unclaimed"})]})]}),(0,P.jsx)("div",{className:"wi-op-footer",children:(0,P.jsx)("span",{children:"Powered by ONEpop"})})]})}function pd({icon:e,title:t,desc:r}){return(0,P.jsxs)("div",{className:"wi-op-feature",children:[(0,P.jsx)("span",{className:"wi-op-feature-icon","aria-hidden":!0,children:e}),(0,P.jsxs)("span",{className:"wi-op-feature-copy",children:[(0,P.jsx)("span",{className:"wi-op-feature-title",children:t}),(0,P.jsx)("span",{className:"wi-op-feature-desc",children:r})]})]})}function vy({item:e}){let t=xy(e.handle),r=e.direction==="sent"?`Sent to ${t}`:`Claimed from ${t}`,n=t.replace("@","").charAt(0).toUpperCase()||"?";return(0,P.jsxs)("li",{className:"wi-op-activity-item",children:[(0,P.jsx)("span",{className:"wi-op-activity-avatar","aria-hidden":!0,children:e.avatarUrl?(0,P.jsx)("img",{src:e.avatarUrl,alt:"",width:30,height:30,draggable:!1,onError:o=>{o.currentTarget.style.display="none"}}):(0,P.jsx)("span",{className:"wi-op-activity-initial",children:n})}),(0,P.jsxs)("span",{className:"wi-op-activity-copy",children:[(0,P.jsxs)("span",{className:"wi-op-activity-meta",children:[(0,P.jsx)("span",{className:"wi-op-activity-peer",children:r}),(0,P.jsx)("span",{className:"wi-op-activity-sep","aria-hidden":!0}),(0,P.jsx)("span",{className:"wi-op-activity-time",children:yy(e.timestamp)})]}),(0,P.jsx)("span",{className:"wi-op-activity-amount",children:tg(e.amountRaw,e.decimals)})]}),(0,P.jsx)("span",{className:Pe("wi-op-badge",`wi-op-badge--${e.status}`),"data-status":e.status,children:by[e.status]})]})}var rg=V(require("react"),1);var Na=require("react/jsx-runtime"),ud=rg.forwardRef(function({className:t,children:r,...n},o){return(0,Na.jsxs)("button",{...n,ref:o,type:"button",className:"wi-op-link-btn","data-track":"onepop_get_token",children:[(0,Na.jsx)("span",{children:"Get ONEUSD"}),(0,Na.jsx)(Ca,{size:12})]})});var k=require("react/jsx-runtime"),ky="On-ramp is not available in your region.";function Ry(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 Cy(e){let t=e.lastIndexOf(".");return t===-1?{main:e,decimal:""}:{main:e.slice(0,t),decimal:e.slice(t)}}function Sy(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 Ny(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 p=i.clientWidth;if(!p)return;let b=s.cloneNode(!0);b.style.setProperty("--wi-total-scale","1"),b.style.position="absolute",b.style.left="-9999px",b.style.top="-9999px",b.style.visibility="hidden",b.style.maxWidth="none",b.style.width="max-content",i.appendChild(b);let g=b.offsetWidth;i.removeChild(b);let h=g>p?Math.max(t,p/g):1;a(h)};l();let d=new ResizeObserver(l);return d.observe(i),()=>d.disconnect()},[e,t]),{containerRef:r,valueRef:n,scale:o}}function ag({align:e="end",sideOffset:t=12,className:r,children:n}){let{env:o,theme:a,isMobile:i,open:s,drawerDirection:l,modal:d,showBalance:p,showForgeToken:b,showGameToken:g,showQR:h,showBridge:x,qrLogoSrc:y,walletAddress:u,accountName:c,sendAccounts:w,profileImageUrl:m,connectorName:v,preferredTokens:R,close:C,onSelectWallet:T,onCopyAddress:S,onBuy:N,onDisconnect:I,disconnectLabel:M,termsUrl:O,termsLabel:D,privacyUrl:W,privacyLabel:A,portalStyle:G,navContent:J,navPosition:ee,footerContent:re,view:L,setView:te,selectedSendToken:ae,setSelectedSendToken:F,selectedDetailToken:ne,setSelectedDetailToken:$,showPortfolio:ye,showOnePop:ve,onePopSummary:Be,onOnePopOpen:he,onOnePopSend:Re,onOnePopClaim:Ce,onOnePopActivity:rt,onOnePopRepliesSeen:Ae,onePopLogoSrc:Qe,onePopGetTokenSlot:ut,onePopHeroSrc:Fe,portfolioTitle:Ye,portfolioSections:We,showTotalAssets:Lt,totalAssetsLabel:Xt,sendTransaction:ft,getTransactionReceipt:Dt,estimateGas:bt,onOutlink:kt,lpBalanceReader:It,stakingRewardsReader:Rt,bridgeTokens:Et,bridgeHistory:nt,getBridgeQuote:ir,getBridgeToTokens:zt,getBridgeApproval:sr,approveBridge:Ke,submitBridge:wt,onReceive:Ze,onSend:ot,onBuyDisabledMessage:lt,onBridgeDisabledMessage:Ge,onSendDisabledMessage:Ct}=On(),[lr,tr]=oe.useState();oe.useEffect(()=>{tr(wu()??(Io()?og.WALLET_LABELS.default:void 0))},[]);let St=c??v??lr??"Account",[Q,be]=oe.useState(null),Te=oe.useRef(void 0),Se=oe.useCallback(E=>{be(E),clearTimeout(Te.current),Te.current=setTimeout(()=>be(null),4e3)},[]);oe.useEffect(()=>()=>clearTimeout(Te.current),[]);let Xe=!!lt,Jt=oe.useCallback(()=>{if(Xe){Se(lt);return}let E=N?.();E&&typeof E.then=="function"&&E.catch(()=>{Se(lt??ky)})},[Xe,lt,N,Se]),Pt=!!Ge,Ft=!!Ct,{tokens:mr,isLoading:z}=Sn(o,u,s&&p),{statsMap:De}=Nn(o,p),{aprPercent:tt}=Zp(),{categoryMap:K,infoMap:Ie}=Jp(o,p),j=p&&Lt,{displayValue:Me,isLowerBound:Z,isLoading:He}=tu(o,u,s&&j),[gr,Vn]=oe.useState(!1),Wr=oe.useRef(null),[Gr,Ka]=oe.useState(0),{holdings:qn,isLoading:Za}=_p(o,u,s&&p&&b),Xa=oe.useMemo(()=>qn.map(E=>E.token),[qn]),{imageMap:vo}=Qp(o,Xa,b&&qn.length>0),Ja=iu(o),xr=oe.useMemo(()=>ou({env:o,tokens:mr,pinnedTokens:Ja,preferredTokens:R,statsMap:De,categoryMap:K,showGameToken:g}),[mr,o,De,g,K,Ja,R]),$a=oe.useMemo(()=>{if(!b)return[];let E=new Set(mr.map(ce=>ce.address.toLowerCase()));return[...qn].filter(ce=>!E.has(ce.token.toLowerCase())).sort((ce,at)=>{let Qr=xt(ce.value)??new fd.default(0);return(xt(at.value)??new fd.default(0)).minus(Qr).toNumber()})},[qn,b,mr]),Hr=oe.useRef(!1),[dr,Yn]=oe.useState(null),_=oe.useRef(void 0),yt=dr?.chainId??ae?.chainId??xr[0]?.chainId??0,{transactionUrl:hr}=aa(o,yt,dr?.txHash,!!(dr?.txHash&&yt)),Ue=oe.useCallback(E=>{Hr.current=!0,te(E)},[te]),[_r,rr]=oe.useState("recipient"),vr=oe.useCallback(()=>{F(null),rr("recipient"),Ue("wallet")},[F,Ue]),Je=oe.useCallback((E,ce="recipient")=>{if(Ft){Se(Ct);return}rr(ce),F(E),Ue("send")},[Ft,Ct,Se,F,Ue]),rn=oe.useCallback(E=>{$(E),Ue("token-detail")},[$,Ue]),ko=oe.useCallback(()=>{he?.(),Ue("onepop")},[he,Ue]),Jh=oe.useCallback(()=>{$(null),Ue("wallet")},[$,Ue]),$h=oe.useCallback(E=>{Je(E,"recipient")},[Je]),ei=qt("apps.json",o,E=>Dr(E?.gametokenBridge,o)),_d=qt("apps.json",o,E=>E?.gametokenSites),e0=oe.useCallback(()=>{if(Pt){Se(Ge);return}if(ei){if(Ry(_d)){window.location.assign(ei);return}window.open(ei,"_blank","noopener,noreferrer")}},[Pt,Ge,ei,_d,Se]),t0=oe.useCallback(E=>{clearTimeout(_.current),F(null),Ue("wallet"),Yn({status:"pending",txHash:E.txHash,chainId:E.chainId,description:`${E.amount} ${E.tokenSymbol} to ${wr(E.recipient)}`})},[F,Ue]),r0=oe.useCallback(E=>{let ce=ae?.chainId;F(null),Ue("wallet"),!(!E||!ce)&&(Yn(at=>({status:"success",txHash:E,chainId:ce,description:at?.txHash===E?at.description:"Tap to see your transaction"})),clearTimeout(_.current),_.current=setTimeout(()=>Yn(null),5e3))},[ae?.chainId,F,Ue]),n0=oe.useCallback(E=>{let ce=E.txHash;ce&&(Yn({status:"error",txHash:ce,chainId:E.chainId,description:E.message}),clearTimeout(_.current),_.current=setTimeout(()=>Yn(null),5e3))},[]),Ko=oe.useMemo(()=>{if(Ze)return Ze;if(h)return()=>Ue("qr")},[Ze,h,Ue]),ti=oe.useMemo(()=>{if(ot)return ot;if(xr.length===0)return;let E=xr[0];return()=>Je(E,"token")},[ot,xr,Je]),Qd=oe.useCallback(()=>{if(Ft){Se(Ct);return}ti?.()},[Ft,Ct,ti,Se]);oe.useEffect(()=>{s||(Hr.current=!1,rr("recipient"))},[s]);let Vd=oe.useRef(null);oe.useEffect(()=>{let E=Vd.current;if(!E||!i)return;let ce=at=>{at.pointerType==="touch"&&at.stopPropagation()};return E.addEventListener("pointerdown",ce),()=>E.removeEventListener("pointerdown",ce)},[i]);let[Ro,qd]=oe.useState(!1),ol=oe.useRef(void 0),[Zo,Xo]=oe.useState(!1);oe.useEffect(()=>{if(!Zo)return;let E=()=>Xo(!1),ce=Qr=>{Qr.key==="Escape"&&Xo(!1)},at=setTimeout(()=>{document.addEventListener("mousedown",E,!0),document.addEventListener("keydown",ce,!0)},0);return()=>{clearTimeout(at),document.removeEventListener("mousedown",E,!0),document.removeEventListener("keydown",ce,!0)}},[Zo]),oe.useEffect(()=>{Xo(!1)},[u]),oe.useEffect(()=>()=>clearTimeout(ol.current),[]),oe.useEffect(()=>()=>clearTimeout(_.current),[]),oe.useEffect(()=>{let E=Wr.current;if(!E||re===null){Ka(0);return}let ce=()=>{Ka(E.offsetHeight)};if(ce(),typeof ResizeObserver>"u")return;let at=new ResizeObserver(ce);return at.observe(E),()=>at.disconnect()},[re]);let Yd=oe.useCallback(async()=>{if(!Ro)try{await navigator.clipboard.writeText(u),qd(!0),clearTimeout(ol.current),ol.current=setTimeout(()=>qd(!1),2e3),S?.(u,!0)}catch{S?.(u,!1)}},[u,S,Ro]),ri=oe.useCallback(E=>{E.currentTarget.setAttribute("data-loaded","true")},[]),Kd=oe.useMemo(()=>({background:Sy(u)}),[u]),ni=oe.useMemo(()=>m||Cn(o,u,{size:120,bg:a==="dark"?"1A1A2E":"F3F6F8"}),[m,o,u,a]),al=oe.useMemo(()=>Cy(Me),[Me]),{containerRef:o0,valueRef:a0,scale:i0}=Ny(gr?"\u2022\u2022\u2022\u2022\u2022\u2022":Me),Zd=O||W?(0,k.jsxs)("div",{className:"wi-legal-links",children:[O&&(0,k.jsx)("a",{className:"wi-legal-link",href:O,target:"_blank",rel:"noopener noreferrer","data-track":"terms_link",onClick:E=>$t(E,O,{category:"terms",origin:"terms"},kt),children:D}),O&&W&&(0,k.jsx)("span",{className:"wi-legal-sep","aria-hidden":!0,children:"\xB7"}),W&&(0,k.jsx)("a",{className:"wi-legal-link",href:W,target:"_blank",rel:"noopener noreferrer","data-track":"privacy_link",onClick:E=>$t(E,W,{category:"privacy",origin:"privacy"},kt),children:A})]}):null,Xd=I?(0,k.jsxs)("button",{type:"button",className:"wi-disconnect-btn","data-track":"disconnect",onClick:()=>{I(),C()},children:[(0,k.jsx)(Wc,{size:16}),(0,k.jsx)("span",{className:"wi-disconnect-label",children:M})]}):null,s0=p&&!J,l0=!j,d0=(0,k.jsxs)("button",{type:"button",className:Pe("wi-action-card",Ft&&"wi-action-card--dimmed"),onClick:Qd,disabled:!Ft&&!ti,"aria-disabled":Ft||void 0,"aria-label":"Send","data-track":"send_open",children:[(0,k.jsx)(Qc,{size:20}),(0,k.jsx)("span",{children:"Send"})]}),c0=s0?(0,k.jsxs)("div",{className:"wi-action-row","aria-label":"Wallet actions",children:[(0,k.jsxs)("button",{type:"button",className:Pe("wi-action-card",Xe&&"wi-action-card--dimmed"),onClick:Jt,disabled:!N&&!Xe,"aria-disabled":Xe||void 0,"aria-label":"Buy","data-track":"buy",children:[(0,k.jsx)(Yc,{size:20}),(0,k.jsx)("span",{children:"Buy"})]}),x?(0,k.jsxs)("button",{type:"button",className:Pe("wi-action-card",Pt&&"wi-action-card--dimmed"),onClick:e0,"aria-disabled":Pt||void 0,"aria-label":"Bridge","data-track":"bridge_open",children:[(0,k.jsx)(Kc,{size:20}),(0,k.jsx)("span",{children:"Bridge"})]}):(0,k.jsxs)("button",{type:"button",className:"wi-action-card",onClick:Ko,disabled:!Ko,"aria-label":"Receive","data-track":"receive",children:[(0,k.jsx)(xi,{size:20}),(0,k.jsx)("span",{children:"Receive"})]}),l0&&d0,ve&&(0,k.jsxs)("button",{type:"button",className:"wi-action-card",onClick:ko,"aria-label":"Open ONEpop","data-track":"onepop_open",children:[(0,k.jsx)(cd,{size:20}),(0,k.jsx)("span",{children:"ONEpop"})]}),ye?(0,k.jsxs)("button",{type:"button",className:"wi-action-card",onClick:()=>Ue("portfolio"),"aria-label":"View portfolio","data-track":"portfolio_open",children:[(0,k.jsx)(qc,{size:20}),(0,k.jsx)("span",{children:"Portfolio"})]}):x?(0,k.jsxs)("button",{type:"button",className:"wi-action-card",onClick:Ko,disabled:!Ko,"aria-label":"Receive","data-track":"receive",children:[(0,k.jsx)(xi,{size:20}),(0,k.jsx)("span",{children:"Receive"})]}):null]}):null,p0=(0,k.jsxs)("div",{className:Pe("wi-view-inner",Hr.current&&"wi-view-wallet"),children:[j&&(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:Xt}),(0,k.jsx)("span",{role:"button",tabIndex:0,className:"wi-total-eye",onClick:E=>{E.stopPropagation(),Vn(ce=>!ce)},onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),E.stopPropagation(),Vn(ce=>!ce))},"aria-label":gr?"Show balance":"Hide balance","data-track":"balance_toggle",children:gr?(0,k.jsx)(Hc,{}):(0,k.jsx)(Gc,{})})]}),(0,k.jsxs)("div",{className:"wi-total-body",children:[(0,k.jsx)("div",{className:"wi-total-value-wrap",ref:o0,children:He?(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":gr||void 0,ref:a0,style:{"--wi-total-scale":i0},children:gr?(0,k.jsx)("span",{className:"wi-total-mask",children:"\u2022\u2022\u2022\u2022\u2022\u2022"}):(0,k.jsxs)(k.Fragment,{children:[Z&&(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:al.main}),al.decimal&&(0,k.jsx)("span",{className:"wi-total-decimal",children:al.decimal})]})})}),(0,k.jsx)("button",{type:"button",className:Pe("wi-total-send",Ft&&"wi-total-send--dimmed"),onClick:Qd,disabled:!Ft&&!ti,"aria-disabled":Ft||void 0,"aria-label":"Send","data-track":"send_open",children:(0,k.jsx)(Vc,{size:27})})]})]}),ee==="top"&&(J?(0,k.jsx)("div",{className:"wi-nav-fixed",children:J}):c0),p&&(0,k.jsx)("div",{ref:Vd,className:"wi-scrollable-body","data-vaul-no-drag":!0,children:(0,k.jsxs)("div",{className:"wi-token-list",children:[z&&Array.from({length:5},(E,ce)=>(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}})]})]},ce)),!z&&xr.length===0&&!b&&(0,k.jsx)("div",{className:"wi-empty",children:"No Tokens Found"}),xr.map(E=>{let ce=De.get(cn(E.chainId,E.address)),at=ce?parseFloat(ce.percent_change_24h):null,Qr=at!==null&&at>=0,sl=sa(o,E.chainId),v0=Dl(E.address);return(0,k.jsxs)("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>rn(E),"aria-label":`View ${E.symbol} detail`,"data-track":"token_detail","data-track-id":E.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:E.icon_url,alt:E.symbol,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:ri,onError:ll=>{ll.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),sl&&(0,k.jsx)("img",{src:sl,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:ll=>{ll.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:E.symbol}),v0&&tt!==null&&(0,k.jsx)("span",{className:"wi-token-apr",children:Ui(tt)})]}),ce&&(0,k.jsxs)("div",{className:"wi-token-price-row",children:[(0,k.jsx)("span",{className:"wi-token-price",children:ro(ce.price)}),(0,k.jsx)("span",{className:"wi-token-change","data-positive":Qr,"data-zero":at===0||void 0,children:at!==null&&(at===0?"0%":`${Qr?"+":"-"}${(Qr?Math.floor:Math.ceil)(Math.abs(at)*100)/100}%`)})]})]})]}),(0,k.jsxs)("div",{className:"wi-token-right",children:[(0,k.jsx)("span",{className:"wi-token-balance",children:kn(E.quantity.numeric,E.quantity.decimals)}),ce&&(0,k.jsx)("span",{className:"wi-token-value",children:vi(E.quantity.numeric,E.quantity.decimals,ce.price)})]})]},`${E.address}-${E.chainId}`)}),b&&Za&&Array.from({length:3},(E,ce)=>(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-${ce}`)),b&&!Za&&!z&&xr.length===0&&$a.length===0&&(0,k.jsx)("div",{className:"wi-empty",children:"No Tokens Found"}),b&&$a.map(E=>{let ce=vo.get(E.token)||"",at=sa(o,Ut[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:ce||"https://contents.crosstoken.io/wallet/token/images/FT.png",alt:E.token_name,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:ri,onError:Qr=>{Qr.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),at&&(0,k.jsx)("img",{src:at,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:Qr=>{Qr.currentTarget.style.display="none"}})]}),(0,k.jsxs)("div",{className:"wi-token-info",children:[(0,k.jsx)("span",{className:"wi-token-name",children:E.token_name}),(0,k.jsx)("div",{className:"wi-token-price-row",children:(0,k.jsxs)("span",{className:"wi-token-price",children:[kn(E.current_price,18)," CROSS"]})})]})]}),(0,k.jsxs)("div",{className:"wi-token-right",children:[(0,k.jsx)("span",{className:"wi-token-balance",children:kn(E.balance,18)}),(0,k.jsx)("span",{className:"wi-token-value",children:ro(E.current_value_usd)})]})]},`forge-${E.token}`)})]})}),ee==="bottom"&&J&&(0,k.jsx)("div",{className:"wi-nav-fixed",children:J}),Xd&&(0,k.jsx)("div",{className:"wi-wallet-disconnect-row",children:Xd})]},"wallet"),u0=ye?(0,k.jsx)("div",{className:Pe("wi-view-inner wi-portfolio-body",Hr.current&&"wi-view-portfolio"),children:(0,k.jsx)(io,{env:o,theme:a,walletAddress:u,showHeader:!1,onOutlink:kt,lpBalanceReader:It,stakingRewardsReader:Rt,sendTransaction:ft,estimateGas:bt,sections:We})},"portfolio"):null,f0=ae?(0,k.jsx)("div",{className:Pe("wi-view-inner wi-send-body",Hr.current&&"wi-view-send"),children:(0,k.jsx)(la,{env:o,theme:a,walletAddress:u,accountName:St,accounts:w,initialStep:_r,token:ae,tokens:xr,onTokenChange:F,sendTransaction:ft,getTransactionReceipt:Dt,estimateGas:bt,getTokenPriceUsd:E=>{let ce=De.get(cn(E.chainId,E.address));if(!ce?.price)return;let at=parseFloat(ce.price);return Number.isFinite(at)?at:void 0},onClose:C,onBackToWallet:vr,onSubmitted:t0,onSuccess:r0,onFailed:n0,onOutlink:kt})},"send"):null,m0=oe.useMemo(()=>Et||xr.map(E=>{let ce=De.get(cn(E.chainId,E.address)),at=ce?.price?parseFloat(ce.price):void 0;return{name:E.name,symbol:E.symbol,chainId:E.chainId,address:E.address,decimals:E.quantity.decimals,balance:Do(E.quantity.numeric,E.quantity.decimals),iconUrl:E.icon_url,priceUsd:Number.isFinite(at)?at:void 0}}),[Et,De,xr]),g0=(0,k.jsx)("div",{className:Pe("wi-view-inner wi-bridge-body",Hr.current&&"wi-view-send"),children:(0,k.jsx)(co,{env:o,walletAddress:u,tokens:m0,history:nt,termsUrl:O,getQuote:ir,getToTokens:zt,getApproval:sr,approveBridge:Ke,submitBridge:wt,onClose:C,onBackToWallet:vr})},"bridge"),h0=ne?(0,k.jsx)("div",{className:Pe("wi-view-inner wi-token-detail-body",Hr.current&&"wi-view-send"),children:(0,k.jsx)(Wm,{env:o,isMobile:i,token:ne,walletAddress:u,stat:De.get(cn(ne.chainId,ne.address)),tokenInfo:Ie.get(ji(ne.chainId,ne.address)),showBalance:p,onBack:Jh,onClose:C,onSend:$h,onOutlink:kt})},"token-detail"):null,Co=oe.useMemo(()=>{let E=Ut[o].cross;return xr.find(ce=>ce.chainId===E&&Dl(ce.address))??xr.find(ce=>ce.chainId===E&&ce.symbol.toUpperCase().includes("ONEUSD"))},[xr,o]),b0=oe.useMemo(()=>{if(Co)return kn(Co.quantity.numeric,Co.quantity.decimals)},[Co]),w0=ve?(0,k.jsx)("div",{className:Pe("wi-view-inner wi-onepop-body",Hr.current&&"wi-view-send"),children:(0,k.jsx)(Sa,{env:o,balanceDisplay:b0,balanceIconUrl:Co?.icon_url,isBalanceLoading:z&&!Co,summary:Be,logoSrc:Qe,heroSrc:Fe,getTokenSlot:ut,onBack:vr,onClose:C,onSend:Re,onClaim:Ce,onActivity:rt,onRepliesSeen:Ae})},"onepop"):null,il=!!T&&c?.trim().toLowerCase()!=="my wallet",Jd=(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("span",{className:"wi-receive-avatar",children:[(0,k.jsx)("span",{className:"wi-avatar-fallback",style:Kd}),ni&&(0,k.jsx)("img",{src:ni,alt:"",className:"wi-avatar-img",width:24,height:24,draggable:!1,onLoad:ri,onError:E=>{E.currentTarget.style.display="none"}})]}),(0,k.jsx)("span",{className:"wi-receive-account-name",children:St}),il&&(0,k.jsx)("span",{className:"wi-receive-chevron","data-open":Zo,"aria-hidden":"true",children:(0,k.jsx)(Pr,{size:16})})]}),y0=(0,k.jsxs)("div",{className:Pe("wi-view-inner wi-qr-body",Hr.current&&"wi-view-qr"),children:[(0,k.jsxs)("div",{className:"wi-receive-section",children:[il?(0,k.jsx)("button",{type:"button",className:"wi-receive-account wi-receive-account--btn",onClick:()=>{Xo(!0),T?.()},"aria-label":"Switch account",children:Jd}):(0,k.jsx)("div",{className:"wi-receive-account",children:Jd}),(0,k.jsxs)("div",{className:"wi-qr-block",children:[(0,k.jsxs)("div",{className:"wi-qr-box",children:[(0,k.jsx)(ng.QRCodeSVG,{value:u,size:180,level:"H",marginSize:2,...y&&{imageSettings:{src:y,height:33,width:33,excavate:!0}}}),!y&&(0,k.jsx)("div",{className:"wi-qr-logo",children:(0,k.jsx)(_c,{size:33})})]}),(0,k.jsx)("p",{className:"wi-qr-address",children:u})]}),(0,k.jsxs)("button",{type:"button",className:"wi-qr-copy-btn",onClick:Yd,"data-track":"address_copy",children:[(0,k.jsx)("span",{className:"wi-qr-copy-icon",children:Ro?(0,k.jsx)(vn,{size:16}):(0,k.jsx)(to,{size:16})}),(0,k.jsx)("span",{className:"wi-qr-copy-text",children:Ro?"Copied!":"Copy address"})]})]}),Zd&&(0,k.jsx)("div",{className:"wi-receive-footer",children:Zd})]},"qr"),x0=L==="qr"||L==="portfolio"||L==="send"||L==="bridge",$d=re!==null?(0,k.jsx)("div",{className:"wi-builtin-footer",children:re}):null,ec=(0,k.jsxs)("div",{className:"wi-account-text",children:[il?(0,k.jsxs)("button",{type:"button",className:"wi-account-row wi-account-row--btn",onClick:()=>{Xo(!0),T?.()},"aria-label":"Switch account","aria-expanded":Zo,children:[(0,k.jsx)("span",{className:"wi-account-name",children:St}),(0,k.jsx)("span",{className:"wi-account-switch","data-open":Zo,"aria-hidden":"true",children:(0,k.jsx)(Pr,{size:20})})]}):(0,k.jsx)("div",{className:"wi-account-row",children:(0,k.jsx)("span",{className:"wi-account-name",children:St})}),(0,k.jsxs)("button",{type:"button",className:"wi-address-row-btn",onClick:Yd,"aria-label":"Copy address","data-track":"address_copy",children:[(0,k.jsx)("span",{className:"wi-account-address",children:wr(u)}),(0,k.jsx)("span",{className:"wi-account-copy","data-copied":Ro,children:Ro?(0,k.jsx)(vn,{size:12}):(0,k.jsx)(to,{size:12})})]})]}),tc=(0,k.jsxs)(k.Fragment,{children:[n,L==="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:vr,"aria-label":"Back",children:(0,k.jsx)(qr,{size:24})}),(0,k.jsx)("span",{className:"wi-receive-title",children:"Receive"}),(0,k.jsx)("button",{type:"button",className:"wi-header-action",onClick:C,"aria-label":"Close",children:(0,k.jsx)(Nr,{size:24})})]})}):L==="send"||L==="bridge"||L==="token-detail"||L==="onepop"?null:x0?(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:vr,"aria-label":"Back",children:(0,k.jsx)(qr,{size:24})}),(0,k.jsx)("div",{className:"wi-account-block wi-account-block--sub-account",children:ec}),(0,k.jsx)("button",{type:"button",className:"wi-header-action",onClick:C,"aria-label":"Close",children:(0,k.jsx)(Nr,{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:Kd}),ni&&(0,k.jsx)("img",{src:ni,alt:"",className:"wi-avatar-img",width:28,height:28,draggable:!1,onLoad:ri,onError:E=>{E.currentTarget.style.display="none"}})]}),ec]}),(0,k.jsxs)("div",{className:"wi-header-actions",children:[h&&x&&(0,k.jsx)("button",{type:"button",className:"wi-header-action wi-header-action--qr",onClick:Ko,"aria-label":"Show QR code","data-track":"receive",children:(0,k.jsx)(xi,{size:20})}),(0,k.jsx)("button",{type:"button",className:"wi-header-action",onClick:C,"aria-label":"Close",children:(0,k.jsx)(Nr,{size:24})})]})]}),(0,k.jsx)("hr",{className:"wi-divider"})]}),(0,k.jsxs)("div",{className:"wi-view-container",children:[L==="wallet"&&p0,L==="qr"&&y0,L==="portfolio"&&u0,L==="send"&&f0,L==="bridge"&&g0,L==="token-detail"&&h0,L==="onepop"&&w0]}),(L==="wallet"||L==="onepop")&&Q&&(0,k.jsx)("div",{className:"wi-action-toast",role:"status","aria-live":"polite",children:Q}),L==="wallet"&&dr&&(0,k.jsxs)("a",{className:"wi-send-toast",href:hr??"#",target:"_blank",rel:"noopener noreferrer",onClick:E=>{if(!hr){E.preventDefault();return}$t(E,hr,{category:"send",origin:"send-transaction",payload:{chainId:dr.chainId,txHash:dr.txHash}},kt)},children:[(0,k.jsx)("span",{className:"wi-send-toast-icon","data-status":dr.status,"aria-hidden":!0,children:dr.status==="pending"?(0,k.jsx)("span",{className:"wi-send-toast-spinner"}):dr.status==="error"?(0,k.jsx)("span",{className:"wi-send-toast-error-dot"}):(0,k.jsx)(Zc,{size:20})}),(0,k.jsxs)("span",{className:"wi-send-toast-copy",children:[(0,k.jsx)("span",{className:"wi-send-toast-title",children:dr.status==="pending"?"Sending...":dr.status==="error"?"Send failed":"Send complete"}),(0,k.jsx)("span",{className:"wi-send-toast-desc",children:dr.status==="pending"||dr.status==="error"?dr.description:"Tap to see your transaction"})]})]}),$d&&L!=="portfolio"&&L!=="send"&&L!=="token-detail"&&L!=="onepop"&&(0,k.jsx)("div",{className:"wi-sticky-footer",children:(0,k.jsx)("div",{className:"wi-footer",ref:Wr,children:$d})})]}),rc={...G,...Gr>0?{"--wi-footer-height":`${Gr}px`}:null},nc=oe.useCallback(E=>{let ce=E.detail.originalEvent.target;ce instanceof Element&&ce.closest("[data-rd-shell]")!==null&&E.preventDefault()},[]);return i?(0,k.jsx)(Le,{feature:"wallet_info",children:(0,k.jsxs)(Ta.Drawer.Portal,{children:[d&&(0,k.jsx)(Ta.Drawer.Overlay,{className:"wi-drawer-overlay"}),(0,k.jsxs)(Ta.Drawer.Content,{className:Pe("wi-drawer-content",r),"data-theme":a,"data-vaul-no-drag":l==="left"||l==="right"?!0:void 0,style:rc,"data-direction":l,"data-no-balance":!p||void 0,"data-has-footer":Gr>0||void 0,"data-view":L,onInteractOutside:nc,children:[(0,k.jsx)(Ta.Drawer.Title,{className:"wi-sr-only",children:"My Wallet"}),tc]})]})}):(0,k.jsxs)(Le,{feature:"wallet_info",children:[d&&s&&(0,k.jsx)("div",{className:"wi-drawer-overlay",onClick:C}),(0,k.jsx)(bs.Portal,{children:(0,k.jsx)(bs.Content,{align:e,sideOffset:t,className:Pe("wi-popover-content",r),"data-theme":a,style:rc,"data-no-balance":!p||void 0,"data-has-footer":Gr>0||void 0,"data-view":L,onInteractOutside:nc,children:tc})})]})}var ig=V(require("react"),1);function sg({position:e="top",children:t}){let{setNavContent:r,setNavPosition:n}=On();return ig.useEffect(()=>(r(t),n(e),()=>r(null)),[t,e,r,n]),null}var lg=V(require("react"),1);function dg({children:e}){let{setFooterContent:t}=On();return lg.useEffect(()=>(t(e),()=>t(null)),[e,t]),null}we(`[data-theme=dark].wi-popover-content,[data-theme=dark].wi-drawer-content{--wi-primary: var(--ds-accent-primary-high, #f0640d);--wi-secondary: var(--ds-system-red-default, #e70077);--wi-surface-bg: var(--ds-bg-default, #121212);--wi-surface-default: var(--ds-surface-medium, rgba(255, 255, 255, .05));--wi-surface-subtle: var(--ds-surface-high, rgba(255, 255, 255, .1));--wi-border-default: var(--ds-border-default, rgba(255, 255, 255, .05));--wi-border-subtle: var(--ds-border-medium, rgba(255, 255, 255, .1));--wi-texticon-primary: var(--ds-content-highest, #ffffff);--wi-texticon-secondary: var(--ds-content-medium, rgba(255, 255, 255, .7));--wi-texticon-tertiary: var(--ds-content-low, rgba(255, 255, 255, .5));--wi-on-primary: var(--ds-accent-primary-on, #ffffff);--wi-error: var(--ds-system-red-default, #e70077);--wi-shadow: 0 2px 16px -2px rgba(0, 0, 0, .4)}[data-theme=light].wi-popover-content,[data-theme=light].wi-drawer-content{--wi-primary: var(--ds-accent-primary-high, #f0640d);--wi-secondary: var(--ds-system-red-default, #e70077);--wi-surface-bg: var(--ds-bg-default, #ffffff);--wi-surface-default: var(--ds-surface-medium, rgba(18, 18, 18, .05));--wi-surface-subtle: var(--ds-surface-high, rgba(18, 18, 18, .1));--wi-border-default: var(--ds-border-default, rgba(18, 18, 18, .05));--wi-border-subtle: var(--ds-border-medium, rgba(18, 18, 18, .1));--wi-texticon-primary: var(--ds-content-highest, #121212);--wi-texticon-secondary: var(--ds-content-medium, rgba(18, 18, 18, .7));--wi-texticon-tertiary: var(--ds-content-low, rgba(18, 18, 18, .5));--wi-on-primary: var(--ds-accent-primary-on, #ffffff);--wi-error: var(--ds-system-red-default, #e70077);--wi-shadow: 0 2px 16px -2px rgba(0, 0, 0, .15)}
|
|
13
|
-
`);
|
|
14
|
-
`);
|
|
15
|
-
`);we(`.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, #f0640d);outline-offset:2px}.wi-account-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wi-account-switch{display:inline-flex;align-items:center;justify-content:center;padding:2px 0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));border-radius:4px;flex-shrink:0;transition:color .15s ease,transform .2s ease}.wi-account-switch[data-open=true]{transform:rotate(180deg)}.wi-account-row--btn:hover .wi-account-switch{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-address-row-btn{display:inline-flex;align-items:center;gap:4px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-medium, rgba(0, 0, 0, .65));font:inherit;text-align:left;min-width:0;transition:color .15s ease}.wi-address-row-btn:hover .wi-account-address,.wi-address-row-btn:hover .wi-account-copy{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-account-address{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wi-account-copy{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;color:var(--wi-texticon-tertiary);flex-shrink:0;transition:color .15s ease}.wi-account-copy[data-copied=true]{color:var(--ds-system-green-high, #00a869)}.wi-header-actions{display:flex;align-items:center;gap:16px;flex-shrink:0;margin-top:-4px}.wi-header-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;border-radius:0;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wi-header-action:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-header-action--qr{width:32px;height:32px;border-radius:8px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));transition:background-color .15s ease,color .15s ease}.wi-header-action--qr:hover{background:var(--ds-surface-high, rgba(0, 0, 0, .08));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-header--receive{align-items:center;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-header--receive .wi-header-action,.wi-header--sub-account .wi-header-action{position:absolute;top:24px;right:24px}.wi-receive-title{position:absolute;left:50%;transform:translate(-50%);font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);text-align:center;pointer-events:none}.wi-header-info{flex:1;display:flex;flex-direction:column;gap:8px;min-width:0}.wi-header-title{font-family:inherit;font-size:16px;font-weight:600;line-height:1.3;color:var(--wi-texticon-primary);margin:0}.wi-header-close{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;border:none;background:var(--wi-surface-default);border-radius:8px;cursor:pointer;color:var(--ds-content-low, #00000066);transition:opacity .15s ease}.wi-header-close:hover{opacity:.7}.wi-total-section{margin:24px 24px 0;padding:0;flex-shrink:0;display:flex;flex-direction:column;gap:8px;border:none;background:transparent;border-radius:12px;color:inherit;font:inherit;text-align:left;width:auto}.wi-action-row{display:flex;align-items:flex-start;gap:8px;width:auto;margin:24px 24px 0}.wi-action-card{appearance:none;display:flex;flex:1 1 0;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 8px;border:none;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-align:center;cursor:pointer;transition:background-color .15s ease,color .15s ease}.wi-action-card:hover:not(:disabled){background:#2e3544!important;color:var(--ds-content-high, rgba(0, 0, 0, .85))}:root[data-ds-theme=light] .wi-action-card:hover:not(:disabled){background:#e4e8ef!important;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-action-card:disabled{cursor:default}.wi-action-card>svg{flex-shrink:0}.wi-action-card:not(:disabled){transition:background-color .15s ease,transform .1s ease}.wi-action-card:active:not(:disabled){transform:scale(.93)}.wi-total-head{display:flex;align-items:center;gap:4px}.wi-total-body{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.wi-total-value-wrap{position:relative;flex:1 1 auto;min-width:0}.wi-total-send{appearance:none;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;flex-shrink:0;border:none;border-radius:9px;background:var(--ds-surface-medium, #f5f7fa);cursor:pointer;transition:background-color .15s ease,transform .1s ease}.wi-total-send:hover:not(:disabled){background:#2e3544}:root[data-ds-theme=light] .wi-total-send:hover:not(:disabled){background:#e4e8ef}.wi-total-send:active:not(:disabled){transform:scale(.93)}.wi-total-send:disabled{cursor:default;opacity:.45}.wi-total-send--dimmed{opacity:.4;cursor:pointer}.wi-total-send--dimmed:hover{opacity:.5}.wi-total-label{font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-total-eye{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease;border-radius:4px}.wi-total-eye:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-total-eye:focus-visible{outline:1px solid var(--wi-texticon-secondary);outline-offset:2px}.wi-total-value{display:flex;align-items:baseline;gap:0;font-family:inherit;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000);font-variant-numeric:tabular-nums;min-height:45px;white-space:nowrap}.wi-total-currency,.wi-total-amount,.wi-total-decimal{font-size:calc(36px * var(--wi-total-scale, 1));color:var(--ds-content-highest, #000000)}.wi-total-lte{margin-right:2px;font-weight:500;font-size:calc(22px * var(--wi-total-scale, 1));color:var(--wi-texticon-secondary)}.wi-total-mask{letter-spacing:2px;font-size:calc(32px * var(--wi-total-scale, 1));color:var(--wi-texticon-secondary)}.wi-total-skeleton{border-radius:6px}.wi-scrollable-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:8px 0 0;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent;overscroll-behavior:contain}.wi-drawer-content .wi-scrollable-body{touch-action:pan-y}[data-theme=light] .wi-scrollable-body{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-scrollable-body::-webkit-scrollbar{width:4px}.wi-scrollable-body::-webkit-scrollbar-track{background:transparent}.wi-scrollable-body::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}.wi-scrollable-body::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .wi-scrollable-body::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .wi-scrollable-body::-webkit-scrollbar-thumb:hover{background:#0003}.wi-nav-fixed{flex-shrink:0;padding:0 24px}.wi-token-list{display:flex;flex-direction:column;gap:0;padding:8px 0}.wi-token-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 24px;border:none;background:transparent;text-align:left;font-family:inherit;width:100%;box-sizing:border-box}.wi-token-item--button{cursor:pointer;background:var(--ds-surface-default, #ffffff);transition:none}.wi-token-item--button:hover{background:#252b39!important}:root[data-ds-theme=light] .wi-token-item--button:hover{background:#eff3f8!important}button.wi-token-item:focus-visible{outline:2px solid var(--wi-primary);outline-offset:2px;border-radius:4px}.wi-token-left{display:flex;align-items:center;gap:16px;min-width:0}.wi-token-icon-wrap{position:relative;width:40px;height:40px;flex-shrink:0}.wi-token-icon{width:40px;height:40px;border-radius:0;object-fit:contain;opacity:0;transition:opacity .2s ease}.wi-token-icon[data-loaded=true]{opacity:1}.wi-token-chain-badge{position:absolute;right:0;bottom:0;width:14px;height:14px;border-radius:50%;background:var(--wi-surface-bg);box-shadow:0 0 0 1.5px var(--wi-surface-bg);object-fit:contain}.wi-token-info{display:flex;flex-direction:column;min-width:0}.wi-token-name-row{display:flex;align-items:center;gap:6px;min-width:0}.wi-token-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-token-apr{flex-shrink:0;font-family:inherit;font-size:12px;font-weight:600;line-height:1;color:var(--ds-system-purple-high, #9b78ff);background:var(--ds-system-purple-low, #2e2854);padding:4px;border-radius:6px;white-space:nowrap}.wi-token-price-row{display:flex;align-items:center;gap:8px}.wi-token-price{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wi-token-change{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;white-space:nowrap}.wi-token-change[data-positive=true]{color:var(--ds-system-green-high, #00a0a2)}.wi-token-change[data-positive=false]{color:var(--ds-system-red-high, #a80927)}.wi-token-change[data-zero]{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-token-right{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0}.wi-token-balance{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);white-space:nowrap}.wi-token-value{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wi-sticky-footer{flex-shrink:0}.wi-footer{padding:16px 24px 24px}.wi-builtin-footer{display:flex;flex-direction:column;gap:8px;align-items:stretch}.wi-wallet-disconnect-row{display:flex;justify-content:flex-end;flex-shrink:0;padding:16px 24px;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-send-toast{position:absolute;left:15px;right:15px;bottom:20px;z-index:2;display:flex;align-items:center;gap:12px;min-height:52px;padding:12px;border-radius:12px;background:var(--ds-surface-inverted, #1e232e);color:var(--ds-content-inverted, #ffffff);box-sizing:border-box;text-decoration:none}.wi-action-toast{position:absolute;left:15px;right:15px;bottom:20px;z-index:3;padding:12px 14px;border-radius:12px;background:var(--ds-surface-inverted, #1e232e);color:var(--ds-content-inverted, #ffffff);font-size:14px;line-height:1.4;text-align:center;box-sizing:border-box;animation:wi-action-toast-in .18s ease-out}.wi-popover-content:has(.wi-wallet-disconnect-row) .wi-action-toast,.wi-drawer-content:has(.wi-wallet-disconnect-row) .wi-action-toast{bottom:72px}@keyframes wi-action-toast-in{0%{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}.wi-action-card--dimmed{opacity:.4;cursor:pointer}.wi-action-card--dimmed:hover{opacity:.5}.wi-popover-content:has(.wi-wallet-disconnect-row) .wi-send-toast,.wi-drawer-content:has(.wi-wallet-disconnect-row) .wi-send-toast{bottom:72px}.wi-send-toast:hover{opacity:.92}.wi-send-toast-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;flex-shrink:0;color:var(--ds-accent-primary-high, #f0640d)}.wi-send-toast-spinner{width:18px;height:18px;border:2px solid rgba(255,159,33,.22);border-top-color:var(--ds-accent-primary-on-inverted, #ff8438);border-radius:50%;animation:wi-send-toast-spin .8s linear infinite}.wi-send-toast-error-dot{width:18px;height:18px;border-radius:50%;background:var(--ds-system-red-default, #ff3358)}@keyframes wi-send-toast-spin{to{transform:rotate(360deg)}}.wi-send-toast-copy{display:flex;min-width:0;flex-direction:column}.wi-send-toast-title{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-inverted, #ffffff)}.wi-send-toast-desc{font-family:inherit;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-accent-primary-on-inverted, #ff8438)}.wi-send-toast-icon[data-status=error]+.wi-send-toast-copy .wi-send-toast-desc{color:var(--ds-system-red-default, #ff3358)}.wi-disconnect-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:16px;padding:0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;cursor:pointer;transition:color .15s ease}.wi-disconnect-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-disconnect-label{white-space:nowrap}.wi-legal-links{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:100%;flex-shrink:0;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-receive-avatar .wi-avatar-fallback{position:absolute;inset:0;border-radius:50%;z-index:0}.wi-receive-avatar .wi-avatar-img{width:24px;height:24px}.wi-legal-link{color:var(--ds-content-low, rgba(0, 0, 0, .4));text-decoration:underline;text-underline-offset:2px;transition:color .15s ease}.wi-legal-link:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-legal-sep{color:inherit}.wi-empty{display:flex;align-items:center;justify-content:center;padding:32px 0;font-family:inherit;font-size:16px;color:var(--wi-texticon-secondary)}.wi-skeleton-item{display:flex;align-items:center;justify-content:space-between;padding:4px 0}.wi-skeleton-left{display:flex;align-items:center;gap:12px}.wi-skeleton-block{border-radius:6px;background:var(--wi-border-default);position:relative;overflow:hidden}.wi-skeleton-block:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.06) 50%,transparent 100%);animation:wi-shimmer 1.5s ease-in-out infinite}[data-theme=light] .wi-skeleton-block:after{background:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.04) 50%,transparent 100%)}.wi-skeleton-icon{width:32px;height:32px;border-radius:50%;flex-shrink:0}.wi-skeleton-lines{display:flex;flex-direction:column;gap:6px}.wi-skeleton-right{display:flex;flex-direction:column;align-items:flex-end;gap:6px}.wi-header-back{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wi-header-back:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-view-container{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.wi-popover-content[data-view=qr] .wi-view-container,.wi-drawer-content[data-view=qr] .wi-view-container{flex:1;min-height:0}.wi-view-inner{display:flex;flex-direction:column;flex:1;min-height:0}.wi-view-wallet{animation:wi-slide-in-left .25s ease-out}.wi-view-qr,.wi-view-portfolio{animation:wi-slide-in-right .25s ease-out}.wi-qr-body{flex:1;min-height:0;display:flex;flex-direction:column}.wi-portfolio-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.wi-portfolio-body>.wp-embed{flex:1;min-height:0}.wi-portfolio-body .wp-body-inner{padding:16px 16px 32px;gap:32px}.wi-receive-section{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:24px}.wi-receive-account{display:inline-flex;align-items:center;gap:8px;padding:4px 8px 4px 4px;border:0;background:var(--ds-surface-high, #edf1f2);border-radius:9999px;font-family:inherit;color:inherit}.wi-receive-account--btn{cursor:pointer;transition:none}.wi-receive-account--btn:hover{background:#2e3544}:root[data-ds-theme=light] .wi-receive-account--btn:hover{background:#e4e8ef}.wi-receive-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;overflow:hidden;flex-shrink:0}.wi-receive-account-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-receive-account>svg{color:var(--ds-content-medium, rgba(0, 0, 0, .65));flex-shrink:0}.wi-receive-chevron{display:inline-flex;align-items:center;color:var(--ds-content-medium, rgba(0, 0, 0, .65));flex-shrink:0;transition:transform .2s ease}.wi-receive-chevron[data-open=true]{transform:rotate(180deg)}.wi-qr-block{display:flex;flex-direction:column;align-items:center;gap:16px}.wi-qr-box{position:relative;display:flex;align-items:center;justify-content:center;padding:10px;background:#fff;border-radius:6px;overflow:hidden}.wi-qr-logo{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none}.wi-qr-address{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:16px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-align:center;word-break:break-all;max-width:281px;margin:0}.wi-qr-copy-btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:12px 16px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff);border-radius:12px;cursor:pointer;transition:border-color .15s ease}.wi-qr-copy-btn:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.wi-qr-copy-icon{display:inline-flex;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-qr-copy-text{font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-receive-footer{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:16px 24px;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-drawer-content .wi-header{padding:16px}.wi-drawer-content .wi-header--receive .wi-header-action,.wi-drawer-content .wi-header--sub-account .wi-header-action{top:16px;right:16px}.wi-drawer-content .wi-total-section,.wi-drawer-content .wi-action-row{margin:16px 16px 0}.wi-drawer-content .wi-nav-fixed{padding:0 16px}.wi-drawer-content .wi-token-item{padding:12px 16px}.wi-drawer-content .wi-wallet-disconnect-row{padding:16px}
|
|
16
|
-
`);
|
|
17
|
-
`);
|
|
18
|
-
`);var ws=require("react/jsx-runtime");function Ty({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:p,walletAddress:b,accountName:g,sendAccounts:h,profileImageUrl:x,connectorId:y,connectorName:u,connectorIconUrl:c,preferredTokens:w=[],onSelectWallet:m,onCopyAddress:v,onBuy:R,onBuyDisabledMessage:C,onBridgeDisabledMessage:T,onSendDisabledMessage:S,onDisconnect:N,disconnectLabel:I="Disconnect",termsUrl:M=ki,termsLabel:O="Terms of Service",privacyUrl:D=Ri,privacyLabel:W="Privacy Policy",open:A,onOpenChange:G,showPortfolio:J=!1,showOnePop:ee=!1,onePopSummary:re,onOnePopOpen:L,onOnePopSend:te,onOnePopClaim:ae,onOnePopActivity:F,onOnePopRepliesSeen:ne,onePopGetTokenSlot:$,onePopLogoSrc:ye,onePopHeroSrc:ve,portfolioTitle:Be="My Portfolio",portfolioSections:he,showTotalAssets:Re=!0,totalAssetsLabel:Ce="Total Assets USD",sendTransaction:rt,getTransactionReceipt:Ae,estimateGas:Qe,onOutlink:ut,lpBalanceReader:Fe,stakingRewardsReader:Ye,bridgeTokens:We,bridgeHistory:Lt,getBridgeQuote:Xt,getBridgeToTokens:ft,getBridgeApproval:Dt,approveBridge:bt,submitBridge:kt,onReceive:It,onBridge:Rt,onSend:Et,style:nt,children:ir}){let zt=it(e),sr=y?oa[y]:void 0,Ke=u??sr?.name,wt=c??sr?.iconUrl,Ze=Ao(`(max-width: ${r}px)`),ot=n??(a?"right":"bottom"),lt=ot==="left"||ot==="right",Ge=o??!1,Ct=A!==void 0,[lr,tr]=ur.useState(!1),St=Ct?A:lr,Q=ur.useCallback(Z=>{Ct||tr(Z),G?.(Z)},[Ct,G]),be=ur.useCallback(()=>Q(!1),[Q]);Pn(St,be);let[Te,Se]=ur.useState(null),[Xe,Jt]=ur.useState("top"),[Pt,Ft]=ur.useState(null),[mr,z]=ur.useState("wallet"),[De,tt]=ur.useState(null),[K,Ie]=ur.useState(null);ur.useEffect(()=>{St||(z("wallet"),tt(null),Ie(null))},[St]),ur.useEffect(()=>{Xn(b)},[b]);let j=ur.useCallback(()=>{Tl(b),N?.()},[N,b]),Me=ur.useMemo(()=>({env:zt,theme:t,isMobile:Ze,open:St,drawerDirection:ot,modal:Ge,showBalance:a,showForgeToken:i,showGameToken:s,showQR:l,showBridge:d,qrLogoSrc:p,walletAddress:b,accountName:g,sendAccounts:h,profileImageUrl:x,connectorName:Ke,connectorIconUrl:wt,preferredTokens:w,close:be,onSelectWallet:m,onCopyAddress:v,onBuy:R,onBuyDisabledMessage:C,onBridgeDisabledMessage:T,onSendDisabledMessage:S,onDisconnect:N?j:void 0,disconnectLabel:I,termsUrl:M,termsLabel:O,privacyUrl:D,privacyLabel:W,portalStyle:nt,navContent:Te,navPosition:Xe,setNavContent:Se,setNavPosition:Jt,footerContent:Pt,setFooterContent:Ft,view:mr,setView:z,selectedSendToken:De,setSelectedSendToken:tt,selectedDetailToken:K,setSelectedDetailToken:Ie,showPortfolio:J,showOnePop:ee,onePopSummary:re,onOnePopOpen:L,onOnePopSend:te,onOnePopClaim:ae,onOnePopActivity:F,onOnePopRepliesSeen:ne,onePopGetTokenSlot:$,onePopLogoSrc:ye,onePopHeroSrc:ve,portfolioTitle:Be,portfolioSections:he,showTotalAssets:Re,totalAssetsLabel:Ce,sendTransaction:rt,getTransactionReceipt:Ae,estimateGas:Qe,onOutlink:ut,lpBalanceReader:Fe,stakingRewardsReader:Ye,bridgeTokens:We,bridgeHistory:Lt,getBridgeQuote:Xt,getBridgeToTokens:ft,getBridgeApproval:Dt,approveBridge:bt,submitBridge:kt,onReceive:It,onBridge:Rt,onSend:Et}),[zt,t,Ze,St,ot,Ge,a,i,s,l,d,p,b,g,h,x,Ke,wt,w,be,m,v,R,C,T,S,N,j,I,M,O,D,W,nt,Te,Xe,Pt,mr,De,K,J,ee,re,L,te,ae,F,ne,$,ye,ve,Be,he,Re,Ce,rt,Ae,Qe,ut,Fe,Ye,We,Lt,Xt,ft,Dt,bt,kt,It,Rt,Et]);return(0,ws.jsx)(vl.Provider,{value:Me,children:Ze?(0,ws.jsx)(pg.Drawer.Root,{direction:ot,open:St,onOpenChange:Q,handleOnly:lt,noBodyStyles:!0,repositionInputs:!1,children:ir},"drawer"):(0,ws.jsx)(cg.Root,{open:St,onOpenChange:Q,children:ir},"popover")})}var uo=Object.assign(Ty,{Trigger:Bp,Content:ag,Nav:sg,Footer:dg});var qe=V(require("react"),1);var js=V(require("react"),1);var ys=require("react"),md=(0,ys.createContext)(null);function Ia(){let e=(0,ys.useContext)(md);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}var Wg=V(require("react"),1);var xs=require("react"),vs=(0,xs.createContext)(null);function Jr(){let e=(0,xs.useContext)(vs);if(!e)throw new Error("ResponsiveShell compound components must be used within <ResponsiveShell>");return e}var jn=require("react");function ug(){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 gd=(0,jn.createContext)(null);function Iy(){let e=(0,jn.useContext)(gd);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}function fg(){let e=Iy(),[t,r]=(0,jn.useState)(e.getSnapshot);return(0,jn.useLayoutEffect)(()=>(r(e.getSnapshot()),e.subscribe(()=>r(e.getSnapshot()))),[e]),t}we(`.rd-root{--rd-bg: var(--ds-bg-dim, #f7f8fb);--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-text-muted: var(--ds-content-medium, #676b7a);--rd-accent: var(--ds-accent-primary-high, #5b5bf6);--rd-accent-contrast: var(--ds-accent-primary-on, #ffffff);--rd-success: var(--ds-system-green-default, #1e9e6a);--rd-success-bg: var(--ds-system-green-low, #e6f7f0);--rd-warning: #b8860b;--rd-warning-bg: #fdf3d9;--rd-danger: var(--ds-system-red-default, #d1394a);--rd-danger-bg: var(--ds-system-red-low, #fbe8ea);--rd-radius: 14px;--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06));--rd-on-accent: #ffffff;width:100%;max-width:640px;box-sizing:border-box;margin:0 auto;display:flex;flex-direction:column;gap:1.25rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:var(--rd-bg);color:var(--rd-text);-webkit-font-smoothing:antialiased;color-scheme:light dark}.rd-root[data-theme=dark]{color-scheme:dark;--rd-bg: var(--ds-bg-default, #0f1117);--rd-surface: var(--ds-surface-default, #171923);--rd-surface-alt: var(--ds-surface-medium, #1e212c);--rd-border: var(--ds-border-default, #2a2d3a);--rd-text: var(--ds-content-highest, #eef0f6);--rd-text-muted: var(--ds-content-medium, #9498a8);--rd-accent: var(--ds-accent-primary-high, #8181ff);--rd-accent-contrast: var(--ds-accent-primary-on, #0f1117);--rd-success: var(--ds-system-green-default, #3fd68f);--rd-success-bg: var(--ds-system-green-low, #123626);--rd-warning: #e0b23c;--rd-warning-bg: #3a2f10;--rd-danger: var(--ds-system-red-default, #ff6b7a);--rd-danger-bg: var(--ds-system-red-low, #3a1418);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35))}.rd-root[data-theme=light]{color-scheme:light;--rd-bg: var(--ds-bg-dim, #f7f8fb);--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-text-muted: var(--ds-content-medium, #676b7a);--rd-accent: var(--ds-accent-primary-high, #5b5bf6);--rd-accent-contrast: var(--ds-accent-primary-on, #ffffff);--rd-success: var(--ds-system-green-default, #1e9e6a);--rd-success-bg: var(--ds-system-green-low, #e6f7f0);--rd-warning: #b8860b;--rd-warning-bg: #fdf3d9;--rd-danger: var(--ds-system-red-default, #d1394a);--rd-danger-bg: var(--ds-system-red-low, #fbe8ea);--rd-radius: 14px;--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06))}.rd-root *{box-sizing:border-box}.rd-card{background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:var(--rd-radius);box-shadow:var(--rd-shadow);padding:1.25rem;display:flex;flex-direction:column;gap:.9rem}.rd-card-header{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.rd-card-title{font-size:1rem;font-weight:650;margin:0}.rd-card-hint{font-size:.8rem;color:var(--rd-text-muted)}.rd-token-address{display:flex;flex-direction:column;gap:.1rem}.rd-token-address-addr{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.78rem;color:var(--rd-text);overflow-wrap:anywhere;user-select:all}.rd-token-address-meta{font-size:.72rem;color:var(--rd-text-muted)}.rd-field{display:flex;flex-direction:column;gap:.35rem}.rd-field-label{font-size:.69rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-root .rd-field-label-row{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.rd-root .rd-token-explorer-link{font-size:.75rem;font-weight:500;color:var(--rd-accent);text-decoration:none;white-space:nowrap}.rd-root .rd-token-explorer-link:hover{text-decoration:underline}.rd-field-row{display:grid;grid-template-columns:1fr 1fr;gap:.625rem}.rd-root select,.rd-root input[type=text],.rd-root input[type=number]{width:100%;padding:.6rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:16px;font-family:inherit}.rd-root select:focus,.rd-root input:focus{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-dropdown{position:relative;min-width:0}.rd-root .rd-dropdown-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.55rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:.9rem;font-family:inherit;font-weight:600;text-align:left;cursor:pointer}.rd-root .rd-static-target{display:flex;align-items:center;gap:.55rem;padding:.55rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:.9rem;font-weight:600;min-width:0;overflow-wrap:anywhere}.rd-root .rd-dropdown-trigger:disabled{cursor:not-allowed}.rd-dropdown-trigger:focus,.rd-dropdown-trigger:focus-visible{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-dropdown-trigger-content{display:flex;align-items:center;gap:.55rem;min-width:0}.rd-dropdown-trigger-label{display:flex;flex-direction:column;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.2}.rd-dropdown-trigger-sub{font-size:.66rem;font-weight:500;line-height:1.3;color:var(--rd-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-dropdown-chevron{display:inline-flex;flex:none;color:var(--rd-text-muted);line-height:1}.rd-dropdown-popover{z-index:100002;width:var(--radix-popover-trigger-width);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-accent: var(--ds-system-orange-default, #5b5bf6);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06))}.rd-dropdown-popover[data-theme=dark]{color-scheme:dark;--rd-surface: var(--ds-surface-default, #171923);--rd-surface-alt: var(--ds-surface-medium, #1e212c);--rd-border: var(--ds-border-default, #2a2d3a);--rd-text: var(--ds-content-highest, #eef0f6);--rd-accent: var(--ds-system-orange-default, #8181ff);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35))}.rd-dropdown-popover *{box-sizing:border-box}.rd-dropdown-listbox{margin:0;padding:.3rem;list-style:none;max-height:min(15rem,var(--radix-popover-content-available-height, 15rem));overflow-y:auto;overscroll-behavior:contain;background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:10px;box-shadow:var(--rd-shadow);font-family:inherit;color:var(--rd-text)}.rd-dropdown-option{display:flex;align-items:center;gap:.55rem;padding:.5rem .6rem;border-radius:8px;font-size:.9rem;color:var(--rd-text);cursor:pointer}.rd-dropdown-option-active{background:var(--rd-surface-alt)}.rd-dropdown-option-selected{font-weight:650}.rd-dropdown-option-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-dropdown-option-check{flex:none;color:var(--rd-accent);font-size:.8rem}.rd-amount-input{display:flex;align-items:baseline;gap:.5rem;padding:.6rem .75rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt)}.rd-amount-input:focus-within{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-amount-input[data-rd-invalid]{border-color:var(--rd-danger)}.rd-root .rd-amount-input input[type=text]{flex:1 1 auto;width:auto;min-width:0;padding:0;border:0;border-radius:0;background:none;font-size:22px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.2}.rd-root .rd-amount-input input[type=text]:focus{outline:none}.rd-amount-input-suffix{flex:none;font-size:.8rem;font-weight:700;color:var(--rd-text-muted);pointer-events:none}.rd-root .rd-amount-input-max{flex:none;padding:0;font-size:.69rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--rd-accent);background:transparent;border:0;border-radius:0;cursor:pointer;line-height:1}.rd-amount-input-max:hover:not(:disabled){text-decoration:underline}.rd-amount-input-max:disabled{opacity:.5;cursor:not-allowed}.rd-amount-meta{display:flex;align-items:baseline;justify-content:space-between;gap:.75rem;font-size:.75rem;color:var(--rd-text-muted);padding:0 .15rem;font-variant-numeric:tabular-nums}.rd-root button{font-family:inherit;font-size:.95rem;font-weight:650;border-radius:10px;border:1px solid transparent;padding:.7rem 1.1rem;cursor:pointer;transition:opacity .12s ease,transform .12s ease}.rd-root button:active:not(:disabled){transform:translateY(1px)}.rd-root button:disabled{cursor:not-allowed;opacity:.55}.rd-button-primary{background:var(--rd-accent);color:var(--rd-accent-contrast)}.rd-button-secondary{background:var(--rd-surface-alt);color:var(--rd-text);border-color:var(--rd-border)}.rd-button-block{width:100%}.rd-callout{border-radius:10px;padding:.65rem .85rem;font-size:.85rem;line-height:1.4}.rd-callout-warning{background:var(--rd-warning-bg);color:var(--rd-warning)}.rd-callout-danger{background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-callout-success{background:var(--rd-success-bg);color:var(--rd-success)}.rd-callout-muted{background:var(--rd-surface-alt);color:var(--rd-text-muted)}.rd-quote-strip{display:flex;align-items:center;justify-content:space-between;gap:.625rem;padding:.7rem .85rem;border-radius:14px;background:color-mix(in srgb,var(--rd-accent) 10%,var(--rd-surface));border:1px solid color-mix(in srgb,var(--rd-accent) 35%,transparent)}.rd-quote-strip-side{display:flex;flex-direction:column;min-width:0;gap:.1rem;font-size:.9rem;font-weight:700;color:var(--rd-text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.rd-quote-strip-end{text-align:right;align-items:flex-end}.rd-quote-strip-side small{font-size:.69rem;font-weight:600;color:var(--rd-text-muted);letter-spacing:.02em}.rd-quote-strip-arrow{flex:none;color:var(--rd-accent);font-weight:800}.rd-quote-strip-hint{font-size:.72rem;line-height:1.45;color:var(--rd-text-muted);padding:0 .15rem}.rd-deposit-address{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr auto;align-items:start;gap:.7rem;min-height:172px;background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:16px;box-shadow:var(--rd-shadow);padding:.85rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px;color:var(--rd-text-muted)}.rd-deposit-address-label{grid-column:1;grid-row:1;position:relative;display:inline-flex;align-items:center;gap:.35rem;width:fit-content;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.rd-root button.rd-address-term{position:static;width:auto;height:auto;display:inline;padding:0 0 2px;border:0;border-bottom:1px dotted currentColor;border-radius:0;background:transparent;color:var(--rd-text-muted);font:700 .69rem/1 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;letter-spacing:.08em;text-transform:uppercase}.rd-root button.rd-address-term:hover,.rd-root button.rd-address-term:focus-visible{color:var(--rd-accent);outline:none}.rd-address-tooltip{position:absolute;z-index:20;top:calc(100% + 8px);left:0;width:min(250px,calc(100vw - 48px));padding:9px 11px;border:1px solid var(--rd-border);border-radius:10px;background:var(--rd-surface);box-shadow:var(--rd-shadow);color:var(--rd-text);font-size:11.5px;font-weight:500;line-height:1.45;letter-spacing:normal;text-align:left;text-transform:none;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-3px);transition:opacity .12s ease,transform .12s ease,visibility .12s ease}.rd-address-term:hover .rd-address-tooltip,.rd-address-term:focus .rd-address-tooltip,.rd-address-term:focus-visible .rd-address-tooltip{opacity:1;visibility:visible;transform:translateY(0)}.rd-address-full{grid-column:1 / -1;grid-row:2;align-self:center;min-width:0;color:var(--rd-text);font-weight:600;line-height:1.55;overflow-wrap:anywhere;word-break:break-all}.rd-root .rd-address-copy{grid-column:1 / -1;grid-row:3;width:100%;min-height:36px;display:inline-flex;align-items:center;justify-content:center;gap:.4rem;margin:0;padding:.5rem .7rem;border-radius:10px;border:0;background:var(--rd-accent);color:var(--rd-accent-contrast);font-family:inherit;font-size:.75rem;font-weight:800;letter-spacing:.03em;line-height:1}.rd-root .rd-address-copy svg{flex:none}.rd-root .rd-address-copy:hover:not(:disabled){opacity:.92}.rd-root button.rd-mobile-qr-toggle,.rd-root button.rd-mobile-address-toggle{display:none;place-items:center;width:34px;height:34px;padding:0;border:1px solid color-mix(in srgb,var(--rd-accent) 24%,var(--rd-border));border-radius:11px;background:color-mix(in srgb,var(--rd-accent) 10%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 1px 2px color-mix(in srgb,var(--rd-text) 8%,transparent);transition:transform .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}.rd-root button.rd-mobile-qr-toggle{grid-column:2;grid-row:1;justify-self:end;align-self:start}.rd-root button.rd-mobile-address-toggle{position:absolute;z-index:2;top:.85rem;right:.85rem;background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:0 4px 14px color-mix(in srgb,var(--rd-text) 16%,transparent)}.rd-root button.rd-mobile-qr-toggle:hover:not(:disabled),.rd-root button.rd-mobile-address-toggle:hover:not(:disabled){border-color:color-mix(in srgb,var(--rd-accent) 45%,var(--rd-border));color:var(--rd-accent);background:color-mix(in srgb,var(--rd-accent) 15%,var(--rd-surface));box-shadow:0 5px 16px color-mix(in srgb,var(--rd-accent) 18%,transparent);transform:translateY(-1px)}.rd-root button.rd-mobile-qr-toggle:active:not(:disabled),.rd-root button.rd-mobile-address-toggle:active:not(:disabled){transform:scale(.96)}.rd-deposit-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.9rem;container:rd-deposit-head / inline-size}.rd-deposit-head>.rd-deposit-qr-pane{flex:none}.rd-deposit-head>.rd-deposit-address{flex:1 1 12rem;min-width:0}@container rd-deposit-head (max-width: 23.75rem){.rd-deposit-head>.rd-deposit-address{flex-basis:100%;width:100%}.rd-deposit-head>.rd-skeleton-qr{display:none}.rd-deposit-head>.rd-skeleton-address{flex-basis:100%;width:100%}.rd-root button.rd-mobile-qr-toggle,.rd-root button.rd-mobile-address-toggle{display:grid}.rd-deposit-head[data-compact-view=address]>.rd-deposit-qr-pane,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-address{display:none}.rd-deposit-head[data-compact-view=address]>.rd-deposit-address,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane{animation:rd-compact-pane-in .26s cubic-bezier(.22,1,.36,1)}.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane{width:100%}}@keyframes rd-compact-pane-in{0%{opacity:0;transform:translateY(6px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}.rd-deposit-qr{position:relative;display:grid;place-items:center;width:172px;height:172px;background:#fff;border-radius:16px;border:1px solid var(--rd-border);box-shadow:var(--rd-shadow);margin:0 auto}.rd-deposit-qr-pane{position:relative;display:grid;place-items:center;min-height:172px}.rd-deposit-qr-badge{position:absolute;inset:0;margin:auto;width:36px;height:36px;display:grid;place-items:center;background:#fff;border-radius:50%;pointer-events:none}.rd-stepper{display:flex;flex-direction:column;gap:0}.rd-stepper-item{display:flex;gap:.75rem;position:relative;padding-bottom:1.25rem}.rd-stepper-item:last-child{padding-bottom:0}.rd-stepper-rail{display:flex;flex-direction:column;align-items:center}.rd-stepper-dot{width:22px;height:22px;border-radius:50%;border:2px solid var(--rd-border);background:var(--rd-surface);display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:700;flex:none;color:var(--rd-text-muted)}.rd-stepper-item-done .rd-stepper-dot{background:var(--rd-success);border-color:var(--rd-success);color:var(--rd-on-accent)}.rd-stepper-item-active .rd-stepper-dot{border-color:var(--rd-accent);color:var(--rd-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-accent) 20%,transparent)}.rd-stepper-line{flex:1;width:2px;background:var(--rd-border);margin:2px 0}.rd-stepper-item-done .rd-stepper-line{background:var(--rd-success)}.rd-stepper-body{padding-top:1px}.rd-stepper-label{font-weight:600;font-size:.9rem}.rd-stepper-item-pending .rd-stepper-label{color:var(--rd-text-muted)}.rd-stepper-meta{margin-top:.25rem;font-size:.78rem;color:var(--rd-text-muted);display:flex;flex-direction:column;gap:.15rem}.rd-stepper-meta a{color:var(--rd-accent);text-decoration:none}.rd-stepper-meta a:hover{text-decoration:underline}.rd-status-pill{display:inline-flex;align-items:center;gap:.35rem;font-size:.75rem;font-weight:650;padding:.2rem .55rem;border-radius:999px;background:var(--rd-surface-alt);color:var(--rd-text-muted);width:fit-content}.rd-status-pill-success{background:var(--rd-success-bg);color:var(--rd-success)}.rd-status-pill-failure{background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-spinner{display:inline-block;width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:rd-spin .7s linear infinite;vertical-align:-.15em}@keyframes rd-spin{to{transform:rotate(360deg)}}.rd-muted{color:var(--rd-text-muted)}.rd-settings-row{display:flex;justify-content:flex-end}.rd-root .rd-icon-button{position:relative;display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border-radius:50%;border:1px solid var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted)}.rd-root .rd-icon-button:hover:not(:disabled){color:var(--rd-text);background:var(--rd-surface-alt)}.rd-recovery-badge{position:absolute;top:-.3rem;right:-.3rem;display:flex;align-items:center;justify-content:center;min-width:1.05rem;height:1.05rem;padding:0 .25rem;border-radius:999px;background:var(--rd-danger, #d1394a);color:#fff;font-size:.65rem;font-weight:700;line-height:1;border:2px solid var(--rd-surface, #ffffff)}.rd-recover-group{display:flex;flex-direction:column;gap:.75rem}.rd-recover-group+.rd-recover-group{border-top:1px solid var(--rd-border);padding-top:1rem;margin-top:.5rem}.rd-recover-group-label{margin:0;font-size:.8rem;color:var(--rd-text-muted)}.rd-recover-made-of{display:block;padding:.65rem .8rem;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:10px}.rd-recover-made-of-label{cursor:pointer;font-size:.72rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-recover-made-of-body{display:flex;flex-direction:column;gap:.4rem;margin-top:.6rem}.rd-error-details{margin-top:-.4rem;padding:0 .15rem;color:var(--rd-text-muted);font-size:.72rem}.rd-error-details summary{width:max-content;cursor:pointer;list-style:none;font-weight:600}.rd-error-details summary::-webkit-details-marker{display:none}.rd-error-details summary:before{display:inline-block;margin-right:.35rem;content:"\\203a";transition:transform .12s ease}.rd-error-details[open] summary:before{transform:rotate(90deg)}.rd-error-log{position:relative;margin-top:.5rem}.rd-root button.rd-error-copy{position:absolute;z-index:1;top:.45rem;right:.45rem;display:inline-flex;align-items:center;justify-content:center;width:1.65rem;height:1.65rem;padding:0;border:1px solid var(--rd-border);border-radius:6px;background:var(--rd-surface);color:var(--rd-text-muted)}.rd-root button.rd-error-copy:hover:not(:disabled){background:var(--rd-surface-alt);color:var(--rd-text)}.rd-error-details code{display:block;max-height:6rem;overflow:auto;padding:.6rem 2.7rem .6rem .7rem;border:1px solid var(--rd-border);border-radius:8px;background:var(--rd-surface-alt);color:var(--rd-text-muted);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.68rem;line-height:1.45;overflow-wrap:anywhere;scrollbar-color:var(--rd-border) transparent;scrollbar-width:thin;white-space:pre-wrap}.rd-error-details code::-webkit-scrollbar{width:4px;height:4px}.rd-error-details code::-webkit-scrollbar-thumb{border-radius:999px;background:var(--rd-border)}.rd-token-list{display:flex;flex-direction:column;gap:.5rem}.rd-token-row{display:flex;align-items:center;gap:10px;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;padding:12px 14px}.rd-token-row-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;overflow-wrap:anywhere}.rd-token-row-symbol{font-weight:700}.rd-token-row-amount{font-variant-numeric:tabular-nums;font-size:14px;font-weight:700;color:var(--rd-text);white-space:nowrap}.rd-token-row-status{font-size:11.5px;line-height:1.45;color:var(--rd-text-muted)}.rd-token-row-warn{font-size:11.5px;line-height:1.45;color:var(--rd-warning)}.rd-token-row-warn b{font-weight:750;font-variant-numeric:tabular-nums}.rd-token-row-step{font-size:11.5px;line-height:1.45;font-weight:650;color:var(--rd-accent)}.rd-root .rd-token-row-action{flex:none;width:auto;padding:9px 16px;font-size:13px;font-weight:700}.rd-token-row-spinner{flex:none;font-size:18px;color:var(--rd-accent)}.rd-recover-sum{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;padding:16px 14px;container:rd-recover-sum / inline-size}.rd-recover-sum-label{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-recover-sum-value{max-width:100%;overflow:hidden;font-size:22px;font-size:clamp(18px,7cqi,28px);font-weight:800;line-height:1.15;font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap;color:var(--rd-text)}.rd-recover-sum-unit{display:block;margin:.35rem 0 0;font-size:15px;font-weight:700;color:var(--rd-text-muted)}.rd-recover-sum-empty{font-size:17px;font-weight:700;color:var(--rd-text-muted)}.rd-recover-empty{display:flex;min-height:min(20rem,48vh);flex:1 1 auto;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;padding:2.5rem 1.5rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 11%,transparent),transparent 48%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-recover-empty-icon{display:grid;width:4.25rem;height:4.25rem;place-items:center;margin-bottom:.2rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-recover-empty[data-variant=unavailable] .rd-recover-empty-icon{border-color:var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:none}.rd-recover-empty-title,.rd-recover-sum-value.rd-recover-empty-title{max-width:100%;margin:0;overflow:visible;color:var(--rd-text);font-size:1.15rem;font-weight:750;line-height:1.35;white-space:normal}.rd-recover-empty-copy{max-width:23rem;margin:0;color:var(--rd-text-muted);font-size:.82rem;line-height:1.55;text-wrap:balance}.rd-root button.rd-recover-empty-refresh{display:inline-flex;min-height:2.6rem;align-items:center;justify-content:center;gap:.45rem;margin-top:.45rem;padding:.65rem 1rem;color:var(--rd-text);font-size:.82rem}.rd-root button.rd-recover-empty-refresh:hover:not(:disabled){border-color:color-mix(in srgb,var(--rd-accent) 35%,var(--rd-border));background:color-mix(in srgb,var(--rd-accent) 9%,var(--rd-surface));color:var(--rd-accent)}[data-rd-recover-funds].rd-stack{flex:1 1 auto}.rd-recover-foot{margin-top:auto;padding-top:.5rem;text-align:center;font-size:11.5px;line-height:1.45;color:var(--rd-text-muted)}.rd-history-table{display:flex;min-width:0;flex-direction:column;gap:.6rem;font-size:.875rem}.rd-history-empty{display:flex;min-height:min(20rem,48vh);flex:1 1 auto;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;padding:2.5rem 1.5rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 10%,transparent),transparent 48%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-history-empty-icon{display:grid;width:4.25rem;height:4.25rem;place-items:center;margin-bottom:.2rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-history-empty[data-variant=disconnected] .rd-history-empty-icon{border-color:var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:none}.rd-history-empty-title{margin:0;color:var(--rd-text);font-size:1.15rem;font-weight:750;line-height:1.35}.rd-history-empty-copy{max-width:22rem;margin:0;color:var(--rd-text-muted);font-size:.82rem;line-height:1.55;text-wrap:balance}.rd-history-empty-live{display:inline-flex;align-items:center;gap:.4rem;margin-top:.35rem;color:var(--rd-text-muted);font-size:.72rem;font-weight:650}.rd-history-empty-live>span{width:.45rem;height:.45rem;border-radius:50%;background:var(--rd-success);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-success) 15%,transparent)}.rd-history-group{min-width:0;max-width:100%;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;overflow:hidden}.rd-history-row-button{width:100%;min-width:0;display:flex;flex-direction:column;gap:.75rem;padding:1rem;background:none;border:none;border-radius:inherit;color:inherit;font:inherit;text-align:left;cursor:pointer}.rd-history-row-button[aria-expanded=true]{border-radius:12px 12px 0 0}.rd-history-row-button:hover{background:color-mix(in srgb,var(--rd-border) 30%,transparent)}.rd-history-row-button:focus-visible{outline:2px solid var(--rd-accent);outline-offset:-2px}.rd-history-card-top{display:flex;align-items:center;gap:.5rem;min-width:0}.rd-history-card-top>.rd-status-pill{margin-left:auto;flex:none}.rd-history-card-top>.rd-status-pill:not(.rd-status-pill-success):not(.rd-status-pill-failure){background:color-mix(in srgb,var(--rd-accent) 12%,transparent);color:var(--rd-accent)}.rd-history-asset{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-history-card-amounts{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:.75rem;padding:.75rem;border-radius:10px;background:var(--rd-surface)}.rd-history-amount-block{display:flex;max-width:100%;flex-direction:column;gap:.15rem;min-width:0}.rd-history-amount-block:last-child{align-items:flex-end;text-align:right}.rd-history-amount-label{color:var(--rd-text-muted);font-size:.68rem;font-weight:650;line-height:1.2}.rd-history-num{max-width:100%;overflow:hidden;font-variant-numeric:tabular-nums;font-size:.875rem;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.rd-history-num[data-full-value],.rd-history-step-amount[data-full-value]{cursor:help}[data-rd-history-floating-tooltip]{position:fixed;z-index:100100;width:max-content;max-width:calc(100vw - 1.5rem);padding:.45rem .65rem;border:1px solid;border-radius:8px;font-size:.72rem;font-weight:600;line-height:1.35;text-align:left;white-space:normal;overflow-wrap:anywhere;pointer-events:none}.rd-history-card-arrow{display:inline-flex;align-items:center;justify-content:center;color:var(--rd-text-muted);font-size:.85rem}.rd-history-received{color:var(--rd-success)}.rd-history-received-estimate{color:var(--rd-text-muted);font-weight:600}.rd-history-card-foot{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.rd-history-date{color:var(--rd-text-muted);font-size:.78rem;font-variant-numeric:tabular-nums}.rd-history-chevron{display:inline-flex;flex:none;align-items:center;justify-content:center;color:var(--rd-text-muted);text-align:center;transition:transform .16s ease}.rd-history-row-button[aria-expanded=true] .rd-history-chevron{transform:rotate(180deg)}.rd-history-detail{display:flex;min-width:0;flex-direction:column;gap:.375rem;padding:.65rem .9rem .8rem;border-top:1px solid var(--rd-border)}.rd-history-step{display:grid;min-width:0;grid-template-columns:.5rem auto 1fr auto auto;gap:.5rem;align-items:center}.rd-history-step-dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--rd-border)}.rd-history-step-dot-done{background:var(--rd-success)}.rd-history-step-label{font-weight:600}.rd-history-step-chain{color:var(--rd-text-muted)}.rd-history-step-amount{font-variant-numeric:tabular-nums;color:var(--rd-text-muted)}.rd-history-step-tx{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.rd-history-step-shared{margin-left:.4rem;color:var(--rd-text-muted);font-size:.72rem}.rd-skeleton{border-radius:10px;background:linear-gradient(90deg,var(--rd-surface-alt) 25%,color-mix(in srgb,var(--rd-surface-alt) 55%,var(--rd-surface)) 42%,var(--rd-surface-alt) 60%);background-size:220% 100%;animation:rd-skeleton-wave 1.4s ease-in-out infinite}@keyframes rd-skeleton-wave{0%{background-position:130% 0}to{background-position:-90% 0}}@media(prefers-reduced-motion:reduce){.rd-skeleton,.rd-checklist-status,.rd-deposit-head[data-compact-view=address]>.rd-deposit-address,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane,.rd-checklist-status-waiting .rd-checklist-status-dot,.rd-checklist-status-detected .rd-checklist-status-dot{animation:none}}.rd-skeleton-form{display:flex;flex-direction:column;gap:.85rem}.rd-skeleton-qr{flex:none;width:172px;height:172px;border-radius:16px}.rd-skeleton-address{flex:1 1 12rem;min-width:0;height:172px;border-radius:16px}.rd-skeleton-line{height:.9rem;width:40%}.rd-skeleton-field{height:48px}.rd-skeleton-notice{height:96px}.rd-skeleton-cta{height:48px}.rd-wizard{flex:1 1 auto;min-height:0;overflow-y:auto;container:rd-wizard / inline-size;padding:1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom,0px));scroll-padding:1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom,0px));overscroll-behavior:contain;-webkit-overflow-scrolling:touch;max-width:none;gap:.85rem}.rd-deposit-tabs{--rd-tab-count: 3;--rd-active-tab-index: 0;position:sticky;top:-1rem;z-index:2;display:flex;flex:0 0 auto;justify-content:space-around;margin:-1rem -1.25rem 0;padding:1rem 1.25rem 0;border-bottom:1px solid var(--rd-border);background:var(--rd-surface)}.rd-deposit-tabs[data-active-index="1"]{--rd-active-tab-index: 1}.rd-deposit-tabs[data-active-index="2"]{--rd-active-tab-index: 2}.rd-deposit-tabs:after{position:absolute;bottom:-1px;left:1.25rem;width:calc((100% - 2.5rem) / var(--rd-tab-count));height:2px;background:var(--rd-accent);content:"";pointer-events:none;transform:translate(calc(var(--rd-active-tab-index) * 100%));transition:transform .22s cubic-bezier(.22,1,.36,1),width .18s ease}.rd-root .rd-deposit-tab{position:relative;display:inline-flex;flex:1 1 0;min-width:0;min-height:2.75rem;align-items:center;justify-content:center;gap:.4rem;padding:.85rem .35rem;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--rd-text-muted);font:inherit;font-size:.875rem;font-weight:650;line-height:1.2;transition:border-color .16s ease,background-color .16s ease,color .16s ease}.rd-root .rd-deposit-tab[data-active=true]{color:var(--rd-text)}.rd-root .rd-deposit-tab:hover:not(:disabled),.rd-root .rd-deposit-tab:focus-visible{outline:none;background:color-mix(in srgb,var(--rd-accent) 7%,transparent);color:var(--rd-text)}.rd-deposit-tab>.rd-recovery-badge{position:static;flex:none;min-width:1rem;height:1rem;padding:0 .2rem;border-width:0}.rd-deposit-tab-panel{display:flex;min-width:0;flex:1 1 auto;flex-direction:column;gap:.85rem;transform-origin:top center;animation:rd-deposit-tab-in .18s cubic-bezier(.22,1,.36,1)}@keyframes rd-deposit-tab-in{0%{opacity:0;transform:translateY(.35rem)}to{opacity:1;transform:translateY(0)}}.rd-stack{display:flex;min-width:0;flex-direction:column;gap:.75rem}.rd-wizard-header{display:flex;align-items:center;gap:.5rem;margin-bottom:0}.rd-wizard-heading{font-size:1rem;font-weight:700;color:var(--rd-text);margin:0}.rd-wizard-actions{margin-left:auto;display:flex;align-items:center;gap:.25rem}.rd-min-notice-pending{color:var(--rd-text-muted)}.rd-min-notice-pending b{font-weight:750;color:var(--rd-warning);font-variant-numeric:tabular-nums}.rd-locked-card{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1.25rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 12%,transparent),transparent 52%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-locked-glyph{display:grid;width:3rem;height:3rem;place-items:center;margin-bottom:.1rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);line-height:0;box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-locked-title{margin:0;color:var(--rd-text);font-size:1rem;font-weight:750;line-height:1.3}.rd-locked-text{max-width:22rem;margin:0;color:var(--rd-text-muted);font-size:.8rem;line-height:1.45}.rd-locked-card>.rd-card-hint{max-width:22rem;margin:-.2rem 0 0;text-wrap:balance}.rd-root button.rd-locked-action{display:inline-flex;width:min(18rem,100%);min-height:2.6rem;align-items:center;justify-content:center;gap:.5rem;margin-top:.25rem}.rd-delivery-recipient{display:flex;flex-direction:column;gap:.3rem;margin-top:.5rem}.rd-checklist-credit{font-size:clamp(10px,2.7vw,11.5px);white-space:nowrap}.rd-checklist{background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:14px;padding:11px 14px;display:flex;flex-direction:column;gap:7px}.rd-checklist-row{display:flex;align-items:flex-start;gap:.5rem;font-size:12.5px;line-height:1.5;color:var(--rd-text)}.rd-checklist-row[data-rd-checklist-only]{align-items:center;white-space:nowrap;font-size:clamp(10.5px,2.8vw,12.5px)}.rd-checklist-mark{flex:none;width:1.05rem;text-align:center;font-weight:800;color:var(--rd-text-muted)}.rd-checklist-mark-warn{color:var(--rd-warning)}.rd-checklist-accent{color:var(--rd-accent);font-weight:750;font-variant-numeric:tabular-nums}.rd-checklist-status{min-height:54px;display:flex;align-items:center;gap:.65rem;padding:10px 12px;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:12px;background:var(--rd-surface-alt);color:var(--rd-text-muted);font-size:12.5px;line-height:1.45;transform-origin:top center;animation:rd-status-enter .48s cubic-bezier(.22,1,.36,1)}.rd-checklist-status-waiting,.rd-checklist-status-detected{border-color:color-mix(in srgb,var(--rd-warning) 42%,var(--rd-border));box-shadow:0 0 0 1px color-mix(in srgb,var(--rd-warning) 10%,transparent)}@keyframes rd-status-enter{0%{opacity:0;transform:translateY(-10px) scale(.985);box-shadow:0 0 color-mix(in srgb,var(--rd-accent) 28%,transparent)}65%{opacity:1;transform:translateY(1px) scale(1);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-accent) 16%,transparent)}to{opacity:1;transform:translateY(0);box-shadow:0 0 0 0 transparent}}.rd-checklist-status-dot{flex:none;width:9px;height:9px;border-radius:50%;background:var(--rd-warning);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-warning) 14%,transparent)}.rd-checklist-status-waiting .rd-checklist-status-dot,.rd-checklist-status-detected .rd-checklist-status-dot{animation:rd-status-breathe 1.8s ease-in-out infinite}@keyframes rd-status-breathe{0%,to{opacity:.82;transform:scale(.96);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-warning) 10%,transparent)}50%{opacity:1;transform:scale(1);box-shadow:0 0 0 5px color-mix(in srgb,var(--rd-warning) 15%,transparent)}}.rd-checklist-status-funded,.rd-checklist-status-processing{color:var(--rd-text);border-color:color-mix(in srgb,var(--rd-accent) 40%,transparent)}.rd-checklist-status-funded .rd-checklist-status-dot,.rd-checklist-status-processing .rd-checklist-status-dot{background:var(--rd-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-accent) 14%,transparent)}.rd-checklist-status-completed{border-color:color-mix(in srgb,var(--rd-success) 40%,transparent);background:var(--rd-success-bg);color:var(--rd-success)}.rd-checklist-status-completed .rd-checklist-status-dot{background:var(--rd-success);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-success) 14%,transparent)}.rd-checklist-status-failed{border-color:color-mix(in srgb,var(--rd-danger) 40%,transparent);background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-checklist-status-failed .rd-checklist-status-dot{background:var(--rd-danger);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-danger) 14%,transparent)}@container rd-wizard (max-width: 30rem){.rd-recover-sum{padding-inline:.75rem}.rd-recover-sum-value{font-size:clamp(1rem,6cqi,1.5rem)}[data-rd-recover-funds] .rd-callout,.rd-token-row-status,.rd-token-row-warn,.rd-token-row-step,.rd-recover-foot{overflow-wrap:anywhere}.rd-token-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;padding:.875rem}.rd-root .rd-token-row-action{width:100%;min-height:2.75rem;grid-column:1 / -1}.rd-token-row-spinner{grid-column:1 / -1;justify-self:center}}@container rd-wizard (max-width: 24rem){.rd-history-card-top{flex-direction:column;align-items:flex-start}.rd-history-card-top>.rd-status-pill{max-width:100%;margin-left:0;white-space:normal}.rd-history-asset{overflow:visible;text-overflow:clip;white-space:normal}.rd-history-card-amounts{grid-template-columns:minmax(0,1fr);gap:.45rem}.rd-history-amount-block{width:100%}.rd-history-amount-block:last-child{align-items:flex-start;text-align:left}.rd-history-card-arrow{display:inline-flex;justify-self:center;margin:0;transform:rotate(90deg);transform-origin:center}.rd-history-card-foot{align-items:flex-start}.rd-history-date{min-width:0;line-height:1.4;overflow-wrap:anywhere}.rd-history-step{grid-template-columns:.5rem minmax(0,1fr);grid-template-areas:"dot label" ". chain" ". amount" ". tx";column-gap:.5rem;row-gap:.25rem;align-items:start;padding-block:.65rem;line-height:1.35}.rd-history-step+.rd-history-step{border-top:1px solid var(--rd-border)}.rd-history-step-dot{grid-area:dot;margin-top:.35rem}.rd-history-step-label{grid-area:label}.rd-history-step-chain{grid-area:chain}.rd-history-step-amount{grid-area:amount}.rd-history-step-tx{grid-area:tx;min-width:0;max-width:100%}.rd-history-step-tx a{overflow-wrap:anywhere}.rd-history-step-shared{display:block;margin:.15rem 0 0}.rd-history-step>.rd-muted{grid-area:tx}}@container rd-wizard (max-width: 22rem){.rd-root .rd-deposit-tab{gap:.2rem;padding-inline:.15rem;font-size:.8rem}.rd-history-row-button,.rd-history-detail{padding-inline:.75rem}}@media(prefers-reduced-motion:reduce){.rd-deposit-tabs:after,.rd-root .rd-deposit-tab{transition:none}.rd-deposit-tab-panel{animation:none}}
|
|
19
|
-
`);var _t=require("react/jsx-runtime");function mg({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,_t.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,_t.jsx)("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),(0,_t.jsx)("span",{children:n})]},`live:${t.phase}:${n}`):e.remaining!==void 0?(0,_t.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,_t.jsx)("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),(0,_t.jsxs)("span",{children:["Waiting for"," ",(0,_t.jsxs)("b",{children:[e.remaining," ",e.symbol]})," ","more to arrive at the processing address."]})]},`pending:${e.remaining}:${e.symbol}`):null}function gg({minNotice:e,onlySend:t,showWalletCreditNote:r=!1}){return(0,_t.jsxs)("div",{className:"rd-checklist","data-rd-checklist":"",children:[(0,_t.jsxs)("div",{className:"rd-checklist-row","data-rd-checklist-only":"",children:[(0,_t.jsx)("span",{className:"rd-checklist-mark rd-checklist-mark-warn","aria-hidden":"true",children:"!"}),(0,_t.jsxs)("span",{children:[(0,_t.jsxs)("b",{children:[t.chainName," ",t.symbol," only"]})," \xB7 ",(0,_t.jsxs)("b",{className:"rd-checklist-accent",children:[e.min," ",e.symbol," minimum"]})]})]}),(0,_t.jsxs)("div",{className:"rd-checklist-row",children:[(0,_t.jsx)("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u21BB"}),(0,_t.jsx)("span",{children:"Reusable \u2014 deposit as many times as you like"})]}),r&&(0,_t.jsxs)("div",{className:"rd-checklist-row rd-checklist-credit","data-rd-checklist-credit":"",children:[(0,_t.jsx)("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u2192"}),(0,_t.jsx)("span",{children:"Credited to your ONEchain wallet"})]})]})}var mo=require("react");var Ea="0x0000000000000000000000000000000000000000",Ey=/^0x[0-9a-fA-F]{40}$/;function gt(e){return Ey.test(e)}function or(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 ks(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 Wn=require("react");var hd="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTQwIDU0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc0MDAwXzM4NTkwK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Rn4Xv5PfzRgYC2MKUqSIs1tC4dWZZTl4UVtZ9q7HiUehi/h775H//4aI7z0OZ5LeVJvNw/fyM/wsn8Fn8Zl8Nr+D36Wvsp/if7BfCn8ECvocAAAAAElFTkSuQmCC";function hg(e){switch(e.toUpperCase()){case"ONEUSD":return hd;case"PONEUSD":return Ay;case"USDT":return My;case"USDC":return Ly;default:return}}var H=require("react/jsx-runtime");function bg(e){let t=e.trim();return t?t.slice(0,2).toUpperCase():"?"}function Dy({size:e,bg:t,fg:r="#ffffff",children:n}){return(0,H.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,H.jsx)("circle",{cx:"12",cy:"12",r:"12",fill:t}),(0,H.jsx)("g",{fill:r,stroke:r,children:n})]})}function bd({size:e,bg:t,fg:r="#ffffff",text:n}){return(0,H.jsx)(Dy,{size:e,bg:t,fg:r,children:(0,H.jsx)("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",fontSize:"10",fontWeight:700,fontFamily:"inherit",stroke:"none",fill:r,children:n})})}function jo({size:e,viewBox:t="0 0 24 24",children:r}){return(0,H.jsx)("svg",{width:e,height:e,viewBox:t,"aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:r})}function Py({size:e}){let t=(0,Wn.useId)();return(0,H.jsxs)(jo,{size:e,children:[(0,H.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,H.jsx)("path",{fill:"#000",d:"M24 0H0v24h24z"}),(0,H.jsx)("path",{fill:"#8FFCF3",d:"M12 4v5.912l5 2.237z"}),(0,H.jsx)("path",{fill:"#CABCF8",d:"m12 4-5 8.148 5-2.235z"}),(0,H.jsx)("path",{fill:"#CBA7F5",d:"M12 15.98V20l5-6.92z"}),(0,H.jsx)("path",{fill:"#74A0F3",d:"M12 20v-4.02l-5-2.9z"}),(0,H.jsx)("path",{fill:"#CBA7F5",d:"m12 15.049 5-2.9-5-2.236z"}),(0,H.jsx)("path",{fill:"#74A0F3",d:"m7 12.149 5 2.9V9.913z"}),(0,H.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,H.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,H.jsx)("defs",{children:(0,H.jsx)("clipPath",{id:t,children:(0,H.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function Oy({size:e}){let t=(0,Wn.useId)();return(0,H.jsxs)(jo,{size:e,children:[(0,H.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,H.jsx)("path",{fill:"#F0B90B",d:"M24 0H0v24h24z"}),(0,H.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,H.jsx)("defs",{children:(0,H.jsx)("clipPath",{id:t,children:(0,H.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function By({size:e}){let t=(0,Wn.useId)();return(0,H.jsxs)(jo,{size:e,viewBox:"0 0 111 111",children:[(0,H.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,H.jsx)("path",{fill:"#fff",d:"M0 0h111v111H0z"}),(0,H.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,H.jsx)("defs",{children:(0,H.jsx)("clipPath",{id:t,children:(0,H.jsx)("path",{fill:"#fff",d:"M0 0h111v111H0z"})})})]})}function zy({size:e}){let t=(0,Wn.useId)();return(0,H.jsxs)(jo,{size:e,children:[(0,H.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,H.jsx)("path",{fill:"#213147",d:"M24 0H0v24h24z"}),(0,H.jsxs)("g",{transform:"translate(12 12) scale(1.28) translate(-12 -12)",children:[(0,H.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,H.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,H.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,H.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,H.jsx)("defs",{children:(0,H.jsx)("clipPath",{id:t,children:(0,H.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function Fy({size:e}){let t=(0,Wn.useId)(),r=(0,Wn.useId)();return(0,H.jsxs)(jo,{size:e,children:[(0,H.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,H.jsx)("path",{fill:`url(#${r})`,d:"M24 0H0v24h24z"}),(0,H.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,H.jsxs)("defs",{children:[(0,H.jsxs)("linearGradient",{id:r,x1:"3.948",x2:"19.217",y1:"16.617",y2:"7.645",gradientUnits:"userSpaceOnUse",children:[(0,H.jsx)("stop",{stopColor:"#A726C1"}),(0,H.jsx)("stop",{offset:".88",stopColor:"#803BDF"}),(0,H.jsx)("stop",{offset:"1",stopColor:"#7B3FE4"})]}),(0,H.jsx)("clipPath",{id:t,children:(0,H.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function Uy({size:e}){let t=(0,Wn.useId)();return(0,H.jsxs)(jo,{size:e,children:[(0,H.jsx)("path",{fill:"#000",d:"M24 0H0v24h24z"}),(0,H.jsx)("g",{transform:"translate(5 5.9) scale(0.1386)",children:(0,H.jsx)("path",{fill:`url(#${t})`,d:"M100.48 69.3817L83.8068 86.8015C83.4444 87.1799 83.0058 87.4816 82.5185 87.6878C82.0312 87.894 81.5055 88.0003 80.9743 88H1.93563C1.55849 88 1.18957 87.8926 0.874202 87.6912C0.558829 87.4897 0.31074 87.2029 0.160416 86.8659C0.0100923 86.529 -0.0359181 86.1566 0.0280382 85.7945C0.0919944 85.4324 0.263131 85.0964 0.520422 84.8278L17.2061 67.408C17.5676 67.0306 18.0047 66.7295 18.4904 66.5234C18.9762 66.3172 19.5002 66.2104 20.0301 66.2095H99.0644C99.4415 66.2095 99.8104 66.3169 100.126 66.5183C100.441 66.7198 100.689 67.0067 100.84 67.3436C100.99 67.6806 101.036 68.0529 100.972 68.415C100.908 68.7771 100.737 69.1131 100.48 69.3817ZM83.8068 34.3032C83.4444 33.9248 83.0058 33.6231 82.5185 33.4169C82.0312 33.2108 81.5055 33.1045 80.9743 33.1048H1.93563C1.55849 33.1048 1.18957 33.2121 0.874202 33.4136C0.558829 33.6151 0.31074 33.9019 0.160416 34.2388C0.0100923 34.5758 -0.0359181 34.9482 0.0280382 35.3103C0.0919944 35.6723 0.263131 36.0083 0.520422 36.277L17.2061 53.6968C17.5676 54.0742 18.0047 54.3752 18.4904 54.5814C18.9762 54.7875 19.5002 54.8944 20.0301 54.8952H99.0644C99.4415 54.8952 99.8104 54.7879 100.126 54.5864C100.441 54.3849 100.689 54.0981 100.84 53.7612C100.99 53.4242 101.036 53.0518 100.972 52.6897C100.908 52.3277 100.737 51.9917 100.48 51.723L83.8068 34.3032ZM1.93563 21.7905H80.9743C81.5055 21.7907 82.0312 21.6845 82.5185 21.4783C83.0058 21.2721 83.4444 20.9704 83.8068 20.592L100.48 3.17219C100.737 2.90357 100.908 2.56758 100.972 2.2055C101.036 1.84342 100.99 1.47103 100.84 1.13408C100.689 0.79713 100.441 0.510296 100.126 0.308823C99.8104 0.107349 99.4415 1.24074e-05 99.0644 0L20.0301 0C19.5002 0.000878397 18.9762 0.107699 18.4904 0.313848C18.0047 0.519998 17.5676 0.821087 17.2061 1.19848L0.524723 18.6183C0.267681 18.8866 0.0966198 19.2223 0.0325185 19.5839C-0.0315829 19.9456 0.0140624 20.3177 0.163856 20.6545C0.31365 20.9913 0.561081 21.2781 0.875804 21.4799C1.19053 21.6817 1.55886 21.7896 1.93563 21.7905Z"})}),(0,H.jsx)("defs",{children:(0,H.jsxs)("linearGradient",{id:t,x1:"8.52558",y1:"90.0973",x2:"88.9933",y2:"-3.01622",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(5 5.9) scale(0.1386)",children:[(0,H.jsx)("stop",{offset:"0.08",stopColor:"#9945FF"}),(0,H.jsx)("stop",{offset:"0.3",stopColor:"#8752F3"}),(0,H.jsx)("stop",{offset:"0.5",stopColor:"#5497D5"}),(0,H.jsx)("stop",{offset:"0.6",stopColor:"#43B4CA"}),(0,H.jsx)("stop",{offset:"0.72",stopColor:"#28E0B9"}),(0,H.jsx)("stop",{offset:"0.97",stopColor:"#19FB9B"})]})})]})}function Rs({chainId:e,chainName:t,size:r=20}){switch(e){case 1:return(0,H.jsx)(Py,{size:r});case 56:return(0,H.jsx)(Oy,{size:r});case 8453:return(0,H.jsx)(By,{size:r});case 42161:return(0,H.jsx)(zy,{size:r});case 137:return(0,H.jsx)(Fy,{size:r});case 792703809:return(0,H.jsx)(Uy,{size:r});case 612055:return(0,H.jsx)(bd,{size:r,bg:"#0b1f3a",text:"CR"});default:return(0,H.jsx)(bd,{size:r,bg:"#676b7a",text:bg(t??String(e))})}}function fo({symbol:e,logoUrl:t,size:r=20}){let n=t&&t.trim().length>0?t.trim():hg(e);return n?(0,H.jsx)("img",{src:n,alt:"","aria-hidden":"true",width:r,height:r,style:{display:"block",flex:"none",borderRadius:"50%",objectFit:"cover"}}):(0,H.jsx)(bd,{size:r,bg:"#676b7a",text:bg(e)})}var wg=require("qrcode.react"),me=require("react/jsx-runtime");function Cs(){return(0,me.jsxs)("div",{className:"rd-deposit-head","data-testid":"rd-address-skeleton","aria-hidden":"true",children:[(0,me.jsx)("span",{className:"rd-skeleton rd-skeleton-qr"}),(0,me.jsx)("span",{className:"rd-skeleton rd-skeleton-address"})]})}function jy(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 Wy(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 yg({depositAddress:e,originChainId:t,originChainName:r,originCurrency:n,amount:o,tokenSymbol:a,tokenDecimals:i,kind:s="evm",depositState:l,onDeposit:d,canDeposit:p,oneClickEnabled:b=!0}){let[g,h]=(0,mo.useState)(!1),[x,y]=(0,mo.useState)("address"),u=(0,mo.useId)();(0,mo.useEffect)(()=>{y("address")},[e]);let c=n.toLowerCase()===Ea,w=s==="svm";async function m(){try{await navigator.clipboard.writeText(e),h(!0),setTimeout(()=>h(!1),1500)}catch{}}let v;if(o)try{let A=BigInt(o);A>0n&&(v=A)}catch{}let R=v!==void 0,C;if(R)try{C=or(v,i)}catch{C=o}let T=w?Wy({depositAddress:e,splMint:n,humanAmount:C??""}):jy({depositAddress:e,originChainId:t,originCurrency:n,amountWei:v,isNative:c}),{isSubmitting:S,isConfirming:N,isConfirmed:I,needsSwitch:M,txHash:O,reverted:D,error:W}=l;return(0,me.jsxs)("section",{className:"rd-stack",children:[(0,me.jsxs)("div",{className:"rd-deposit-head","data-compact-view":x,children:[(0,me.jsxs)("div",{className:"rd-deposit-qr-pane",children:[(0,me.jsxs)("div",{className:"rd-deposit-qr",children:[(0,me.jsx)(wg.QRCodeSVG,{value:T,size:144,level:"H"}),(0,me.jsx)("span",{className:"rd-deposit-qr-badge","aria-hidden":"true",children:(0,me.jsx)(Rs,{chainId:t,chainName:r,size:28})})]}),(0,me.jsx)("button",{type:"button",className:"rd-mobile-address-toggle","aria-label":"Show address and copy",onClick:()=>y("address"),children:(0,me.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,me.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2.25",stroke:"currentColor",strokeWidth:"1.8"}),(0,me.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,me.jsxs)("div",{className:"rd-deposit-address",children:[(0,me.jsx)("span",{className:"rd-deposit-address-label",children:(0,me.jsxs)("button",{type:"button",className:"rd-address-term","aria-describedby":u,children:["Deposit address",(0,me.jsx)("span",{id:u,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,me.jsx)("button",{type:"button",className:"rd-mobile-qr-toggle","aria-label":"Show deposit QR code","aria-pressed":x==="qr",onClick:()=>y("qr"),children:(0,me.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:(0,me.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,me.jsx)("span",{className:"rd-address-full",title:e,children:e}),(0,me.jsxs)("button",{type:"button",className:"rd-address-copy",onClick:m,"aria-label":`Copy deposit address ${e}`,children:[g?(0,me.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,me.jsx)("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,me.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,me.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),(0,me.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,me.jsx)("span",{"aria-live":"polite",children:g?"Copied":"Copy address"})]})]})]}),!w&&p&&(0,me.jsxs)(me.Fragment,{children:[(0,me.jsx)("button",{type:"button",className:"rd-button-primary rd-button-block",onClick:d,disabled:S||N||I&&!D,children:I&&!D?"Deposit sent":N?"Confirming...":S?M?"Switching network...":"Confirm in wallet...":`One-click deposit ${a}${M?` (switch to ${r})`:""}`}),W&&(0,me.jsx)("div",{className:"rd-callout rd-callout-danger",children:W}),O&&(0,me.jsxs)("p",{className:"rd-card-hint",children:["Tx: ",(0,me.jsx)("span",{style:{fontFamily:"monospace"},children:O})]}),I&&D&&(0,me.jsx)("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),I&&!D&&(0,me.jsx)("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."})]}),w&&(0,me.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,me.jsxs)(me.Fragment,{children:["exactly"," ",(0,me.jsxs)("strong",{children:[C," ",a]})]}):(0,me.jsxs)(me.Fragment,{children:["any amount of ",(0,me.jsx)("strong",{children:a})]}),"."]}),(R||!w&&!p&&b)&&(0,me.jsxs)("p",{className:"rd-card-hint",children:[R&&(0,me.jsxs)(me.Fragment,{children:["Send exactly"," ",(0,me.jsxs)("strong",{children:[C," ",a]})," ","on ",r," to this address."]}),!w&&!p&&b&&!R&&"Enter an amount to deposit in one click."]})]})}var $r=require("react"),Gn=V(require("@radix-ui/react-popover"),1);var fr=require("react/jsx-runtime");function Aa({value:e,options:t,onChange:r,disabled:n,ariaLabel:o,id:a}){let i=(0,$r.useId)(),s=a??i,l=`${s}-listbox`,[d,p]=(0,$r.useState)(!1),b=t.findIndex(I=>I.value===e),[g,h]=(0,$r.useState)(b>=0?b:0),x=(0,$r.useRef)(null),y=(0,$r.useRef)([]),u=!!n||t.length===0,c=b>=0?t[b]:void 0;(0,$r.useEffect)(()=>{d&&y.current[g]?.scrollIntoView?.({block:"nearest"})},[d,g]);let[w,m]=(0,$r.useState)(null);function v(){u||(m(x.current?.closest("[data-theme]")?.getAttribute("data-theme")??null),h(b>=0?b:0),p(!0))}function R(I){p(!1),I&&x.current?.focus()}function C(I){let M=t[I];M&&(r(M.value),R(!0))}function T(){u||(d?R(!1):v())}function S(I){if(!u)switch(I.key){case"ArrowDown":I.preventDefault(),d?h(M=>Math.min(M+1,t.length-1)):v();break;case"ArrowUp":I.preventDefault(),d?h(M=>Math.max(M-1,0)):v();break;case"Enter":case" ":I.preventDefault(),d?C(g):v();break;case"Escape":d&&(I.preventDefault(),R(!0));break;case"Tab":d&&p(!1);break;default:break}}let N=d&&t[g]?`${s}-option-${g}`:void 0;return(0,fr.jsx)(Gn.Root,{open:d,onOpenChange:I=>I?v():R(!1),children:(0,fr.jsxs)("div",{className:"rd-dropdown",children:[(0,fr.jsx)(Gn.Trigger,{asChild:!0,children:(0,fr.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:u,onClick:T,onKeyDown:S,children:[(0,fr.jsxs)("span",{className:"rd-dropdown-trigger-content",children:[c?.icon,(0,fr.jsxs)("span",{className:"rd-dropdown-trigger-label",children:[c?.label??"",c?.subLabel&&(0,fr.jsx)("small",{className:"rd-dropdown-trigger-sub",children:c.subLabel})]})]}),(0,fr.jsx)("span",{className:"rd-dropdown-chevron","aria-hidden":"true",children:(0,fr.jsx)(Pr,{size:16})})]})}),d&&(0,fr.jsx)(Gn.Portal,{children:(0,fr.jsx)(Gn.Content,{className:"rd-dropdown-popover","data-theme":w??void 0,side:"bottom",align:"start",sideOffset:5,collisionPadding:12,onOpenAutoFocus:I=>I.preventDefault(),onCloseAutoFocus:I=>I.preventDefault(),children:(0,fr.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 O=I.value===e,D=M===g;return(0,fr.jsxs)("li",{id:`${s}-option-${M}`,role:"option","aria-selected":O,ref:W=>{y.current[M]=W},className:["rd-dropdown-option",D?"rd-dropdown-option-active":"",O?"rd-dropdown-option-selected":""].filter(Boolean).join(" "),onPointerEnter:()=>h(M),onClick:W=>{W.preventDefault(),C(M)},children:[I.icon,(0,fr.jsx)("span",{className:"rd-dropdown-option-label",children:I.label}),O&&(0,fr.jsx)("span",{className:"rd-dropdown-option-check","aria-hidden":"true",children:"\u2713"})]},I.value)})})})})]})})}var ht=require("react/jsx-runtime");function Gy(e,t){if(!e)return"--";try{return or(BigInt(e),t)}catch{return"--"}}function xg({quote:e,isLoading:t,error:r,humanAmount:n,originSymbol:o,destination:a}){return(0,ht.jsxs)("div",{className:"rd-stack","data-rd-quote-preview":"",children:[t&&(0,ht.jsxs)("div",{className:"rd-quote-strip","data-testid":"rd-quote-skeleton",children:[(0,ht.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"}),(0,ht.jsx)("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),(0,ht.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"})]}),!t&&r&&(0,ht.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a quote: ",r.message]}),!t&&!r&&e&&o&&(0,ht.jsxs)(ht.Fragment,{children:[(0,ht.jsxs)("div",{className:"rd-quote-strip",children:[(0,ht.jsxs)("span",{className:"rd-quote-strip-side",children:[(0,ht.jsxs)("b",{children:[n," ",o]}),(0,ht.jsx)("small",{children:"You send"})]}),(0,ht.jsx)("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),(0,ht.jsxs)("span",{className:"rd-quote-strip-side rd-quote-strip-end",children:[(0,ht.jsxs)("b",{children:["~",Gy(e.expectedCrossd,a.decimals)," ",a.symbol]}),(0,ht.jsx)("small",{children:"You receive"})]})]}),e.belowMin&&(0,ht.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,ht.jsxs)("p",{className:"rd-quote-strip-hint",children:[e.feeUsd&&(0,ht.jsxs)(ht.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,ht.jsxs)(ht.Fragment,{children:["Assumes 1:1 parity between bridged USDT and ",a.symbol,"; the final amount may differ slightly."]})]})]}),!t&&!r&&!e&&(0,ht.jsx)("p",{className:"rd-muted",children:"Enter an amount to see a quote."})]})}var wd=require("react");var vg={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 kg(e,t){let r=vg[e];if(!(!r||!t))return{url:`${r.base}/token/${t}`,name:r.name}}var Hy={1:"Ethereum",56:"BNB Smart Chain",137:"Polygon",8453:"Base",42161:"Arbitrum",612055:"ONEchain",792703809:"Solana"};function Wo(e){return Hy[e]??`Chain ${e}`}function Ss(e,t){let r=vg[e];if(!(!r||!t))return{url:`${r.base}/tx/${t}`,name:r.name}}var Bt=require("react/jsx-runtime");function _y(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 Rg(e,t){return t===void 0?[]:e.origins.filter(r=>r.chainId===t)}function Qy(e,t){let r=or(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 Cg({catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:a=!0,balance:i,balanceLoading:s,insufficientBalance:l,onMax:d,disabled:p}){let b=(0,wd.useMemo)(()=>_y(e),[e]),g=(0,wd.useMemo)(()=>Rg(e,t?.chainId),[e,t?.chainId]);function h(c){let w=Number(c),m=Rg(e,w)[0];m&&r(m)}function x(c){let w=g.find(m=>m.token.address.toLowerCase()===c.toLowerCase());w&&r(w)}let y=i?`${Qy(i.value,i.decimals)} ${i.symbol}`:void 0,u=l?`Amount exceeds your balance${y?` (${y})`:""}`:void 0;return(0,Bt.jsxs)("section",{className:"rd-stack","data-rd-source-form":"",children:[(0,Bt.jsxs)("div",{className:"rd-field",children:[(0,Bt.jsxs)("div",{className:"rd-field-label-row",children:[(0,Bt.jsx)("span",{className:"rd-field-label",children:"From"}),t&&(()=>{let c=kg(t.chainId,t.token.address);return c?(0,Bt.jsxs)("a",{className:"rd-token-explorer-link",href:c.url,target:"_blank",rel:"noopener noreferrer",title:`View ${t.token.symbol} on ${c.name}`,children:[c.name," \u2197"]}):null})()]}),(0,Bt.jsxs)("div",{className:"rd-field-row",children:[(0,Bt.jsx)(Aa,{ariaLabel:"Origin chain",value:t?String(t.chainId):"",onChange:h,disabled:p,options:b.map(c=>({value:String(c.chainId),label:c.chainName,subLabel:"Network",icon:(0,Bt.jsx)(Rs,{chainId:c.chainId,chainName:c.chainName,size:22})}))}),(0,Bt.jsx)(Aa,{ariaLabel:"Token",value:t?.token.address??"",onChange:x,disabled:p||g.length===0,options:g.map(c=>({value:c.token.address,label:c.token.symbol,subLabel:`${c.token.decimals} decimals`,icon:(0,Bt.jsx)(fo,{symbol:c.token.symbol,logoUrl:c.token.logoUrl,size:22})}))})]})]}),a&&(0,Bt.jsxs)("label",{className:"rd-field",children:[(0,Bt.jsx)("span",{className:"rd-field-label",children:"Amount (optional)"}),(0,Bt.jsxs)("div",{className:"rd-amount-input","data-rd-invalid":u?"":void 0,children:[(0,Bt.jsx)("input",{type:"text",inputMode:"decimal",placeholder:"0.0",value:n,onChange:c=>{let w=c.target.value;if(w===""){o(w);return}w.startsWith(".")&&(w=`0${w}`),/^\d*\.?\d{0,4}$/.test(w)&&(w=w.replace(/^0+(?=\d)/,""),!((w.split(".")[0]??"").length>12)&&o(w))},disabled:p||!t,"data-vaul-no-drag":!0}),t&&(0,Bt.jsx)("span",{className:"rd-amount-input-suffix",children:t.token.symbol}),d&&!p&&(0,Bt.jsx)("button",{type:"button",className:"rd-amount-input-max",onClick:d,disabled:p||!t,children:"Max"})]}),(y||s)&&(0,Bt.jsxs)("span",{className:"rd-amount-meta",children:[(0,Bt.jsx)("span",{}),(0,Bt.jsx)("span",{children:s?"Balance: \u2026":y?`Balance: ${y}`:""})]}),u&&(0,Bt.jsx)("span",{className:"rd-callout rd-callout-danger",children:u})]})]})}var ue=require("react/jsx-runtime");function Sg({catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:a,minNotice:i,amountHint:s,onMax:l,recipient:d,onChangeRecipient:p,showRecipientInput:b,recipientValid:g,balance:h,balanceLoading:x,insufficientBalance:y,targetOptions:u,selectedTarget:c,onChangeTarget:w,showTargetSelector:m,quote:v,quoteLoading:R,quoteError:C,depositAddress:T,depositAddressLoading:S,depositAddressError:N,arrivalStatus:I,amountSmallestUnits:M,depositState:O,onDeposit:D,canDeposit:W,oneClickEnabled:A,locked:G,onRequestConnect:J}){let ee=u.length>1&&m,{phase:re,isSubmitting:L,isConfirming:te,isConfirmed:ae,needsSwitch:F,reverted:ne,error:$}=O,ye=c?.symbol??e.destination.symbol;return(0,ue.jsxs)(ue.Fragment,{children:[i&&(0,ue.jsx)(mg,{minNotice:i,arrivalStatus:I}),G?(0,ue.jsxs)("section",{className:"rd-locked-card","data-rd-locked":"",children:[(0,ue.jsx)("span",{className:"rd-locked-glyph","aria-hidden":"true",children:(0,ue.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,ue.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,ue.jsx)("path",{d:"M4 9h15",stroke:"currentColor",strokeWidth:"1.7"}),(0,ue.jsx)("path",{d:"M15 11.5h5v4h-5a2 2 0 0 1 0-4Z",fill:"currentColor",opacity:"0.18",stroke:"currentColor",strokeWidth:"1.5"}),(0,ue.jsx)("circle",{cx:"15.7",cy:"13.5",r:"0.8",fill:"currentColor"})]})}),(0,ue.jsx)("h3",{className:"rd-locked-title",children:"Connect your wallet"}),(0,ue.jsx)("p",{className:"rd-locked-text",children:"Connect to get your personal deposit address."}),b&&(0,ue.jsx)("p",{className:"rd-card-hint",children:"Or enter a recipient address to get one without connecting."}),J&&(0,ue.jsxs)("button",{type:"button",className:"rd-button-primary rd-locked-action","data-track":"connect",onClick:J,children:[(0,ue.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,ue.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,ue.jsx)("path",{d:"M15 10.5h5v4h-5a2 2 0 0 1 0-4Z",stroke:"currentColor",strokeWidth:"1.8"})]}),"Connect Wallet"]})]}):T?(0,ue.jsx)(yg,{depositAddress:T,originChainId:t.chainId,originChainName:t.chainName,originCurrency:t.token.address,amount:M,tokenSymbol:t.token.symbol,tokenDecimals:t.token.decimals,depositState:O,onDeposit:D,canDeposit:W,oneClickEnabled:A}):S?(0,ue.jsxs)(ue.Fragment,{children:[(0,ue.jsx)(Cs,{}),A&&M&&(0,ue.jsx)("span",{className:"rd-skeleton rd-skeleton-cta","aria-hidden":"true"}),(0,ue.jsx)("p",{className:"rd-sr-only",role:"status",children:"Preparing your deposit address..."})]}):N?(0,ue.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a deposit address: ",N.message]}):null,(0,ue.jsx)(Cg,{catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:a,balance:h,balanceLoading:x,insufficientBalance:y,onMax:l}),(0,ue.jsxs)("div",{className:"rd-field","data-rd-delivery":"",children:[(0,ue.jsx)("span",{className:"rd-field-label",children:"Deliver as"}),ee?(0,ue.jsx)(Aa,{ariaLabel:"Delivery token",value:c?.symbol??"",onChange:w,options:u.map(ve=>({value:ve.symbol,label:ve.symbol,subLabel:"on ONEchain",icon:(0,ue.jsx)(fo,{symbol:ve.symbol,size:22})}))}):(0,ue.jsxs)("div",{className:"rd-static-target",children:[(0,ue.jsx)(fo,{symbol:ye,size:22}),(0,ue.jsx)("span",{children:ye})]}),b&&(0,ue.jsxs)("label",{className:"rd-delivery-recipient",children:[(0,ue.jsx)("input",{type:"text",placeholder:"0x...","aria-label":"ONEchain recipient address",value:d,onChange:ve=>p(ve.target.value),"data-vaul-no-drag":!0}),(0,ue.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."}),!g&&(0,ue.jsx)("span",{className:"rd-callout rd-callout-danger",children:"Not a valid address"})]})]}),c?.external&&(0,ue.jsxs)("div",{className:"rd-callout rd-callout-muted",children:["Delivered as ",c.symbol," via an external adapter."]}),s&&(0,ue.jsx)("div",{className:"rd-callout rd-callout-warning","data-rd-amount-hint":"",children:s}),n.trim()&&(0,ue.jsx)(xg,{quote:v,isLoading:R,error:C,humanAmount:n,originSymbol:t.token.symbol,destination:e.destination}),i&&(0,ue.jsx)(gg,{minNotice:i,onlySend:{symbol:t.token.symbol,chainName:t.chainName},showWalletCreditNote:!b&&g}),A&&re!=="idle"&&!W&&(0,ue.jsxs)("div",{className:"rd-card",children:[L&&(0,ue.jsxs)("p",{className:"rd-muted",children:[(0,ue.jsx)("span",{className:"rd-spinner"})," ",F?"Switching network...":"Confirm in wallet..."]}),te&&(0,ue.jsxs)("p",{className:"rd-muted",children:[(0,ue.jsx)("span",{className:"rd-spinner"})," Confirming..."]}),O.txHash&&(0,ue.jsxs)("p",{className:"rd-card-hint",children:["Tx: ",(0,ue.jsx)("span",{style:{fontFamily:"monospace"},children:O.txHash})]}),ae&&ne&&(0,ue.jsx)("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),ae&&!ne&&(0,ue.jsx)("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."}),$&&(0,ue.jsx)("div",{className:"rd-callout rd-callout-danger",children:$})]})]})}var en=require("react"),Tg=require("react-dom");var Y=require("react/jsx-runtime");function La({requiresIdentity:e=!1}){return(0,Y.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,Y.jsx)("span",{className:"rd-history-empty-icon","aria-hidden":"true",children:(0,Y.jsxs)("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,Y.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,Y.jsx)("path",{d:"M14 3.8V7h3",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"}),(0,Y.jsx)("circle",{cx:"16.5",cy:"16.5",r:"3.7",stroke:"currentColor",strokeWidth:"1.7"}),(0,Y.jsx)("path",{d:"M16.5 14.5v2.2l1.4.8",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,Y.jsx)("h3",{className:"rd-history-empty-title",children:e?"Connect to view history":"No transfers yet"}),(0,Y.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,Y.jsxs)("span",{className:"rd-history-empty-live",children:[(0,Y.jsx)("span",{"aria-hidden":"true"}),"Updates automatically"]})]})}var Ma=56;function Ig(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Vy(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 qy(e){return e==="COMPLETED"?"rd-status-pill rd-status-pill-success":Ig(e)?"rd-status-pill rd-status-pill-failure":"rd-status-pill"}function Ns(e,t){if(e){if(t===void 0)return e;try{return or(BigInt(e),t)}catch{return e}}}function Yy(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 Ky(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Ng(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function yd({amount:e,symbol:t,className:r}){let n=e?`${e}${t?` ${t}`:""}`:"",o=(0,en.useId)(),a=(0,en.useRef)(null),i=(0,en.useRef)(null),[s,l]=(0,en.useState)(!1),[d,p]=(0,en.useState)({top:-9999,left:-9999,visibility:"hidden"});return(0,en.useEffect)(()=>{if(!s)return;let b=()=>{let g=a.current,h=i.current;if(!g||!h)return;let x=g.getBoundingClientRect(),y=h.getBoundingClientRect(),u=12,c=8,w=Math.max(u,window.innerWidth-y.width-u),m=Math.min(Math.max(x.left+x.width/2-y.width/2,u),w),v=x.top-y.height-c,R=v>=u?v:x.bottom+c,C=Math.max(u,window.innerHeight-y.height-u),T=Math.min(Math.max(R,u),C),S=window.getComputedStyle(g);p({top:T,left:m,visibility:"visible",backgroundColor:S.getPropertyValue("--rd-text").trim()||"#eef0f6",borderColor:S.getPropertyValue("--rd-border").trim()||"#2a2d3a",boxShadow:S.getPropertyValue("--rd-shadow").trim()||"0 8px 24px rgba(0, 0, 0, 0.35)",color:S.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,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)("span",{ref:a,className:r,"aria-label":n,"aria-describedby":s?o:void 0,"data-full-value":n,onMouseEnter:()=>{p({top:-9999,left:-9999,visibility:"hidden"}),l(!0)},onMouseLeave:()=>l(!1),children:[Yy(e),t?` ${t}`:""]}),s&&typeof document<"u"&&(0,Tg.createPortal)((0,Y.jsx)("span",{ref:i,id:o,role:"tooltip","data-rd-history-floating-tooltip":"",style:d,children:n}),document.body)]}):(0,Y.jsx)("span",{className:r,children:"-"})}function Zy(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 Xy(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 Ts({label:e,chainId:t,txHash:r,amount:n,shared:o,missingLabel:a="Pending"}){let i=r?Ss(t,r):void 0;return(0,Y.jsxs)("div",{className:"rd-history-step",children:[(0,Y.jsx)("span",{className:`rd-history-step-dot${r?" rd-history-step-dot-done":""}`}),(0,Y.jsx)("span",{className:"rd-history-step-label",children:e}),(0,Y.jsx)("span",{className:"rd-history-step-chain",children:Wo(t)}),n&&(0,Y.jsx)(yd,{amount:n,className:"rd-history-step-amount"}),(0,Y.jsxs)("span",{className:"rd-history-step-tx",children:[i?(0,Y.jsx)("a",{href:i.url,target:"_blank",rel:"noreferrer",title:r,"aria-label":`${e} transaction on ${Wo(t)}`,children:Ng(r)}):r?(0,Y.jsx)("span",{title:r,children:Ng(r)}):(0,Y.jsx)("span",{className:"rd-muted",children:a}),o&&r&&(0,Y.jsx)("span",{className:"rd-history-step-shared",title:"Shared by deposits processed together",children:"combined transfer"})]})]})}function Jy(e){let t=e.deposits??[],r=e.amountOut||e.expectedOut||void 0;if(t.length>=2){let i=Xy(r,t);if(i)return t.map((s,l)=>({key:`${e.orderId}:${s.txHash}:${s.blockNumber}`,order:e,chainId:s.originChainId??Ma,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}=Zy(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 Is({orders:e,isLoading:t,error:r,catalog:n,showTitle:o=!0}){let[a,i]=(0,en.useState)({}),s=l=>i(d=>({...d,[l]:!d[l]}));return(0,Y.jsxs)("section",{className:o?"rd-card":"rd-stack","data-rd-orders-list":"",children:[o&&(0,Y.jsx)("div",{className:"rd-card-header",children:(0,Y.jsx)("h2",{className:"rd-card-title",children:"Transfer history"})}),t&&e.length===0&&(0,Y.jsxs)("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[(0,Y.jsx)("span",{className:"rd-spinner"})," Loading orders..."]}),r&&(0,Y.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load your orders: ",r.message]}),!t&&!r&&e.length===0&&(0,Y.jsx)(La,{}),e.length>0&&(0,Y.jsx)("div",{className:"rd-history-table","data-vaul-no-drag":!0,children:e.flatMap(Jy).map(l=>{let{order:d}=l,p=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),g=b?.symbol??n?.destination.symbol??"",h=b?.decimals??n?.destination.decimals,x=n?.origins.find(N=>N.chainId===Ma),y=Ns(l.sentRaw,x?.token.decimals),u=x?.token.symbol??"USDT",c=Ns(l.receivedRaw,h),w=d.deposits??[],m=!!a[l.key],v=Ky(d.completedAt??d.createdAt),R=Vy(d.status),T=d.status==="COMPLETED"||Ig(d.status)?"Details unavailable":"Pending",S=l.receivedIsEstimate?"Estimated on ONEchain":"Received on ONEchain";return(0,Y.jsxs)("div",{className:"rd-history-group",children:[(0,Y.jsxs)("button",{type:"button",className:"rd-history-row-button",onClick:()=>s(l.key),"aria-expanded":m,"aria-label":`Toggle transfer details: ${R}, ${v}`,children:[(0,Y.jsxs)("span",{className:"rd-history-card-top",children:[(0,Y.jsx)("span",{className:"rd-history-asset",children:l.routes>1?(0,Y.jsxs)(Y.Fragment,{children:["Multiple deposits ",(0,Y.jsxs)("span",{className:"rd-muted",children:["\xB7 ",l.routes," chains"]})]}):(0,Y.jsxs)(Y.Fragment,{children:[p?.token.symbol??g," ",(0,Y.jsxs)("span",{className:"rd-muted",children:["from ",Wo(l.chainId)]})]})}),(0,Y.jsx)("span",{className:qy(d.status),title:d.status,children:R})]}),(0,Y.jsxs)("span",{className:"rd-history-card-amounts",children:[(0,Y.jsxs)("span",{className:"rd-history-amount-block",children:[(0,Y.jsx)("span",{className:"rd-history-amount-label",children:"Processing address"}),(0,Y.jsx)(yd,{amount:y,symbol:u,className:"rd-history-num"})]}),(0,Y.jsx)("span",{className:"rd-history-card-arrow","aria-hidden":"true",children:"\u2192"}),(0,Y.jsxs)("span",{className:"rd-history-amount-block",children:[(0,Y.jsx)("span",{className:"rd-history-amount-label",children:S}),(0,Y.jsx)(yd,{amount:c,symbol:g,className:`rd-history-num rd-history-received${l.receivedIsEstimate?" rd-history-received-estimate":""}`})]})]}),(0,Y.jsxs)("span",{className:"rd-history-card-foot",children:[(0,Y.jsxs)("span",{className:"rd-history-date",children:[d.completedAt?"Completed":"Started"," \xB7 ",v]}),(0,Y.jsx)("span",{className:"rd-history-chevron","aria-hidden":"true",children:(0,Y.jsx)(Pr,{size:16})})]})]}),m&&(0,Y.jsxs)("div",{className:"rd-history-detail",children:[l.deposit?(0,Y.jsx)(Ts,{label:"Deposit confirmed",chainId:l.deposit.originChainId??Ma,txHash:l.deposit.originTxHash||l.deposit.txHash,amount:Ns(l.deposit.amount,x?.token.decimals)}):w.length>0?w.map(N=>(0,Y.jsx)(Ts,{label:"Deposit confirmed",chainId:N.originChainId??Ma,txHash:N.originTxHash||N.txHash,amount:Ns(N.amount,x?.token.decimals)},`${N.txHash}-${N.blockNumber}`)):(0,Y.jsxs)("div",{className:"rd-history-step",children:[(0,Y.jsx)("span",{className:"rd-history-step-dot"}),(0,Y.jsx)("span",{className:"rd-history-step-label",children:"Deposit confirmed"}),(0,Y.jsx)("span",{className:"rd-muted",children:"Details unavailable"})]}),(0,Y.jsx)(Ts,{label:"Bridge",chainId:Ma,txHash:d.bscBridgeTx,shared:l.sharedLegs,missingLabel:T}),(0,Y.jsx)(Ts,{label:"ONEchain delivery",chainId:n?.destination.chainId??612055,txHash:d.deliveryTxHash,shared:l.sharedLegs,missingLabel:T})]})]},l.key)})})]})}var ho=require("react");var Yt=require("react");var Fr=class extends Error{constructor(t,r,n){super(r),this.name="RelayApiError",this.status=t,this.body=n}};function er(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 Fr(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 p=d;p?.error&&(l=p.error)}catch{d=s||void 0}throw new Fr(i.status,l,d)}try{return JSON.parse(s)}catch{throw new Fr(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 Eg=[{type:"function",name:"deploy",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}],xd=[{type:"function",name:"execute",stateMutability:"nonpayable",inputs:[],outputs:[]},{type:"function",name:"sweepToUser",stateMutability:"nonpayable",inputs:[{name:"tokenAddr",type:"address"}],outputs:[]}],vd=[{type:"function",name:"computeAddress",stateMutability:"view",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}];var go=["0x486BEEc35A9a9915213Ea02AD3709738335F7702","0x3438735303911aBe113AdF14b18eE730cC24893b","0xA3B548Ab23043e6B24A087515fe1306379683533","0x44317d07378390543d99Ee76374E86C1Ef6cF832"];function Es(e,t){return!e||!t?!1:e.toLowerCase()===t.toLowerCase()}function $y(e,t){return t.some(r=>Es(r,e))}function As(e){if(!e||e.length===0)return go;let t=new Set,r=[];for(let n of e){if(typeof n!="string"||!gt(n))continue;let o=n.toLowerCase();t.has(o)||(t.add(o),r.push(n))}return r.length>0?r:go}async function Ag(e,t,{factory:r,forwarder:n,recipient:o,version:a,trusted:i=go}){if(!r||!n||!o||a===void 0)return{ok:!1,reason:"address verification is missing inputs (factory/forwarder/recipient/version)"};if(!$y(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:vd,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 Mg(e,t,{forwarder:r,recipient:n,version:o,trusted:a=go}){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:vd,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 Lg(e,t){return Es(e,t)}var Hn=56,kd={step:"idle"};function ex(e){return e.tokens?.find(t=>t.recoverable)?.address??e.token}function Da(e={}){let t=(0,Yt.useRef)(e);t.current=e;let r=e.wallet,n=r?.walletChainId,o=e.recipient,a=o&>(o)?o:void 0,[i,s]=(0,Yt.useState)({}),l=(0,Yt.useCallback)((g,h)=>{s(x=>({...x,[g.toLowerCase()]:h}))},[]),d=(0,Yt.useCallback)(g=>g?i[g.toLowerCase()]??kd:kd,[i]),p=(0,Yt.useMemo)(()=>Object.values(i).some(g=>g.step==="switching"||g.step==="deploying"||g.step==="recovering"),[i]);return{recover:(0,Yt.useCallback)(async(g,h,x)=>{if(!a||!g?.forwarder)return;let y=g.forwarder;l(y,{step:"switching"});try{if(n!==Hn){if(!r?.switchChain)throw new Error("wallet cannot switch chains");await r.switchChain(Hn)}if(!r?.writeContract||!r?.readContract||!r?.waitForReceipt)throw new Error("wallet is missing contract capabilities required for recovery");let u=await Ag(r.readContract,Hn,{factory:g.factory,forwarder:g.forwarder,recipient:a,version:g.version,trusted:t.current.trustedFactories});if(!u.ok)throw new Error(`address verification failed: ${u.reason}`);let c;if(!g.isDeployed){if(l(y,{step:"deploying"}),c=await r.writeContract({address:g.factory,abi:Eg,functionName:"deploy",args:[a,BigInt(g.version)],chainId:Hn}),l(y,{step:"deploying",deployTxHash:c}),(await r.waitForReceipt({chainId:Hn,hash:c})).status==="reverted")throw new Error(`forwarder deploy reverted on-chain (tx ${c})`);t.current.onChanged?.()}l(y,{step:"recovering",deployTxHash:c});let w=h==="execute"?await r.writeContract({address:g.forwarder,abi:xd,functionName:"execute",args:[],chainId:Hn}):await r.writeContract({address:g.forwarder,abi:xd,functionName:"sweepToUser",args:[x??ex(g)],chainId:Hn});if(l(y,{step:"recovering",deployTxHash:c,actionTxHash:w}),(await r.waitForReceipt({chainId:Hn,hash:w})).status==="reverted")throw new Error(`recovery transaction reverted on-chain (tx ${w})`);l(y,{step:"done",deployTxHash:c,actionTxHash:w}),t.current.onRecoverySuccess?.({action:h,forwarder:g.forwarder,actionTxHash:w,...c?{deployTxHash:c}:{}}),t.current.onChanged?.()}catch(u){let c=u instanceof Error?u:new Error(String(u));s(w=>{let m=y.toLowerCase();return{...w,[m]:{...w[m]??kd,step:"error",error:c.message}}}),t.current.onError?.(c)}},[a,n,r,l]),stateFor:d,busy:p}}function Dg(e={}){let t=(0,Yt.useRef)(e);t.current=e;let r=(0,Yt.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRecovery: either `client` or `apiBaseUrl` must be provided");return er({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.recipient,o=n&>(n)?n:void 0,[a,i]=(0,Yt.useState)(),[s,l]=(0,Yt.useState)(!1),[d,p]=(0,Yt.useState)(),[b,g]=(0,Yt.useState)(0),h=e.target,x=e.enabled??!0,y=e.refetchInterval;(0,Yt.useEffect)(()=>{if(!o||!x){i(void 0),p(void 0),l(!1);return}let v=!1,R=!1,C=!0;async function T(){if(!(v||R)){R=!0,C&&l(!0);try{let N=await r.getRecovery({user:o,target:h});if(v)return;i(N),p(void 0)}catch(N){if(v)return;let I=N instanceof Error?N:new Error(String(N));p(I),t.current.onError?.(I),I instanceof Fr&&I.status===401&&t.current.onUnauthorized?.()}finally{R=!1,!v&&C&&l(!1),C=!1}}}T();let S=typeof y=="number"&&Number.isFinite(y)&&y>0?setInterval(()=>{T()},y):void 0;return()=>{v=!0,S&&clearInterval(S)}},[r,o,b,h,x,y]);let u=(0,Yt.useCallback)(()=>g(v=>v+1),[]),c=Da({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:u}),w=(0,Yt.useCallback)(async(v,R)=>{a&&await c.recover(a,v,R)},[c,a]),m=c.stateFor(a?.forwarder);return{info:a,loading:s,error:d,refresh:u,recover:w,recoveryState:m}}var tx="BSC_FUNDED";function Pg(e){if(!e)return 0n;try{let t=BigInt(e);return t>0n?t:0n}catch{return 0n}}function rx(e,t){return e.target||t}function Go(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!==tx)continue;let s=rx(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+=Pg(l.amount)}o.deposits.sort((i,s)=>i.blockNumber-s.blockNumber)}return[...n.values()]}function Og(e){return e.filter(t=>(t.info.tokens??[]).some(r=>r.recoverable)?!0:Pg(t.info.balance)>0n&&t.info.suggestedAction!=="none")}function Ms(e){return e.reduce((t,r)=>t+(r.info.tokens??[]).filter(n=>n.recoverable).length,0)}var U=require("react/jsx-runtime"),nx=56;function ox(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 ax="This balance may already be processing. Recover only if it remains stuck.",Ls="USDT",Bg="primary";function ix(e){return`${e} more recoverable under other delivery tokens -- switch the delivery token above to recover ${e===1?"it":"them"}.`}function sx(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 Fg({message:e}){let[t,r]=(0,ho.useState)("idle");(0,ho.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,U.jsxs)("details",{className:"rd-error-details",children:[(0,U.jsx)("summary",{children:"View technical details"}),(0,U.jsxs)("div",{className:"rd-error-log",children:[(0,U.jsx)("button",{type:"button",className:"rd-error-copy",onClick:()=>{n()},"aria-label":o,"aria-live":"polite",title:o,children:t==="copied"?(0,U.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,U.jsx)("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,U.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,U.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),(0,U.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,U.jsx)("code",{children:e})]})]})}function Pa(e){if(!e)return 0n;try{return BigInt(e)}catch{return 0n}}function Mn(e,t){try{return or(e,t)}catch{return e.toString()}}function zg(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function lx(e){let t=Pa(e.bridgeMinWei),r=[];for(let a of e.tokens??[]){let i=Pa(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=Pa(e.balance),o=r.some(a=>a.action?.kind==="execute");return n>0n&&e.suggestedAction==="execute"&&!o?r.unshift({key:Bg,symbol:Ls,decimals:e.decimals,balance:n,action:{kind:"execute"}}):r.length===0&&n>0n&&e.suggestedAction!=="none"&&r.push({key:Bg,symbol:Ls,decimals:e.decimals,balance:n,action:{kind:"sweep"}}),r}function dx({deposit:e,decimals:t}){let r=e.originChainId??nx,n=e.originTxHash||e.txHash,o=n?Ss(r,n):void 0;return(0,U.jsxs)("div",{className:"rd-history-step","data-testid":"recovery-deposit-row",children:[(0,U.jsx)("span",{className:"rd-history-step-dot rd-history-step-dot-done"}),(0,U.jsx)("span",{className:"rd-history-step-chain",children:Wo(r)}),(0,U.jsx)("span",{className:"rd-history-step-amount",children:Mn(Pa(e.amount),t)}),(0,U.jsx)("span",{className:"rd-history-step-tx",children:o?(0,U.jsx)("a",{href:o.url,target:"_blank",rel:"noreferrer",title:n,children:zg(n)}):n?(0,U.jsx)("span",{title:n,children:zg(n)}):null})]})}function cx({group:e,showTargetLabel:t,busy:r,state:n,onRecover:o,actingRowKey:a,rowKeyOf:i}){let{info:s}=e,l=lx(s),d=Pa(s.balance),p=l.length===1?`${Mn(l[0].balance,l[0].decimals)}`:`${l.length} assets`,b=e.deposits.length>0&&e.depositsTotal>=d,g=d>e.depositsTotal?d-e.depositsTotal:0n,h=n.step==="switching"||n.step==="deploying"||n.step==="recovering",y=l.find(c=>i(c)===a)?.action?.kind;function u(){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 c=y==="execute"?"continuing ONEchain delivery":"returning funds";return n.deployTxHash?`Confirm in wallet\u2026 (2/2 \u2014 ${c})`:`Confirm in wallet\u2026 (${c})`}return(0,U.jsxs)("div",{className:"rd-recover-group","data-testid":"forwarder-section",children:[t&&(0,U.jsxs)("p",{className:"rd-recover-group-label",children:["Delivery target \xB7 ",(0,U.jsx)("b",{children:e.targets.join(", ")})]}),(0,U.jsxs)("div",{className:"rd-recover-sum",children:[(0,U.jsx)("span",{className:"rd-recover-sum-label",children:"Funds awaiting processing"}),(0,U.jsxs)("span",{className:"rd-recover-sum-value",title:l.length===1?`${p} ${l[0].symbol}`:p,children:[p,l.length===1&&(0,U.jsxs)(U.Fragment,{children:[" ",(0,U.jsx)("span",{className:"rd-recover-sum-unit",children:l[0].symbol})]})]})]}),e.deposits.length>0&&(0,U.jsxs)("details",{className:"rd-recover-made-of",children:[(0,U.jsxs)("summary",{className:"rd-recover-made-of-label",children:["Deposit history \xB7 ",e.deposits.length," ",e.deposits.length===1?"transfer":"transfers"]}),(0,U.jsxs)("div",{className:"rd-recover-made-of-body",children:[e.deposits.map(c=>(0,U.jsx)(dx,{deposit:c,decimals:s.decimals},`${c.txHash}-${c.blockNumber}`)),!b&&(0,U.jsxs)("p",{className:"rd-token-row-status","data-testid":"deposits-incomplete-note",children:["These transfers explain ",Mn(e.depositsTotal,s.decimals)," of"," ",Mn(d,s.decimals)," ",Ls,". The remaining"," ",Mn(g,s.decimals)," ",Ls," is still included when you act."]})]})]}),(0,U.jsx)("div",{className:"rd-token-list",children:l.map(c=>{let w=i(c),m=h&&a===w;return(0,U.jsxs)("div",{className:"rd-token-row","data-token-symbol":c.symbol,children:[(0,U.jsx)(fo,{symbol:c.symbol,size:26}),(0,U.jsxs)("div",{className:"rd-token-row-info",children:[l.length>1&&(0,U.jsxs)("span",{className:"rd-token-row-amount",children:[Mn(c.balance,c.decimals)," ",(0,U.jsx)("span",{className:"rd-token-row-symbol",children:c.symbol})]}),m?(0,U.jsx)("span",{className:"rd-token-row-step",role:"status","aria-live":"polite",children:u()}):c.shortfall!==void 0&&c.minimum!==void 0?(0,U.jsxs)("span",{className:"rd-token-row-warn",children:["Needs ",(0,U.jsxs)("b",{children:[Mn(c.shortfall,c.decimals)," ",c.symbol]})," more to reach the"," ",Mn(c.minimum,c.decimals)," ",c.symbol," minimum. Add it through"," ",(0,U.jsx)("b",{children:"Deposit to CROSS"})," and both amounts will process together."]}):c.action?(0,U.jsx)("span",{className:"rd-token-row-status",children:c.action.kind==="execute"?"Ready to continue delivery to ONEchain":"Ready to return to your BNB Chain wallet"}):(0,U.jsx)("span",{className:"rd-token-row-status",children:"Waiting for processing"})]}),m?(0,U.jsx)("span",{className:"rd-spinner rd-token-row-spinner"}):c.action&&(0,U.jsx)("button",{type:"button",className:"rd-button-primary rd-token-row-action",onClick:()=>o(c),disabled:r,children:c.action.kind==="execute"?"Continue delivery":"Return to wallet"})]},c.key)})}),!s.isDeployed&&n.step==="idle"&&(0,U.jsxs)("div",{className:"rd-callout rd-callout-warning","data-testid":"two-tx-notice",children:["The first action from this address needs ",(0,U.jsx)("b",{children:"two wallet confirmations"}),": prepare the address, then move the funds. Later actions need one."]}),s.inFlight&&(0,U.jsx)("p",{className:"rd-muted rd-token-row-status",children:s.inFlightReason||ax}),n.step==="done"&&(0,U.jsx)("div",{className:"rd-callout rd-callout-success",role:"status","aria-live":"polite",children:y==="execute"?"ONEchain delivery restarted.":"Funds returned to your connected BNB Chain wallet."}),n.step==="error"&&n.error&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)("div",{className:"rd-callout rd-callout-danger",role:"alert",children:sx(n.error)}),(0,U.jsx)(Fg,{message:n.error})]})]})}function Ds(e){let{info:t,loading:r,error:n,refresh:o}=Dg(ox(e)),a=r||e.targets!==void 0&&e.targetsLoading===!0,i=Da({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,ho.useState)(),d=e.targets!==void 0?[...e.targets]:t?[{symbol:e.target??"",isDefault:!0,info:t}]:[],p=Og(Go(d,e.orders??[])),b=p.length>0,g=e.targets!==void 0?e.onRecovered:o,h=e.wallet?.walletAddress,x=e.wallet?.getBalance,[y,u]=(0,ho.useState)();return(0,ho.useEffect)(()=>{if(!b||!x||!h){u(void 0);return}let c=!1;return x({chainId:56,address:h}).then(w=>{c||u({value:w.value,decimals:w.decimals})}).catch(()=>{c||u(void 0)}),()=>{c=!0}},[b,x,h]),(0,U.jsxs)("section",{className:e.showTitle??!0?"rd-card":"rd-stack","data-rd-recover-funds":"",children:[(e.showTitle??!0)&&(0,U.jsx)("div",{className:"rd-card-header",children:(0,U.jsx)("h2",{className:"rd-card-title",children:"Recover stuck funds"})}),typeof e.otherTargetsRecoverable=="number"&&e.otherTargetsRecoverable>0&&(0,U.jsx)("div",{className:"rd-callout rd-callout-muted","data-testid":"other-targets-recoverable-note",children:ix(e.otherTargetsRecoverable)}),a&&(0,U.jsxs)("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[(0,U.jsx)("span",{className:"rd-spinner"})," Checking for recoverable funds\u2026"]}),n&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)("div",{className:"rd-callout rd-callout-danger",role:"alert",children:"Couldn't check recoverable funds. Please try again."}),(0,U.jsx)(Fg,{message:n.message})]}),!a&&!n&&!b&&(0,U.jsxs)("div",{className:"rd-recover-empty",role:"status","data-testid":"rd-recover-empty-state",children:[(0,U.jsx)("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:(0,U.jsxs)("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,U.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,U.jsx)("path",{d:"M5 10h14",stroke:"currentColor",strokeWidth:"1.7"}),(0,U.jsx)("path",{d:"m9.2 14 1.7 1.7 3.9-4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,U.jsx)("h3",{className:"rd-recover-sum-value rd-recover-sum-empty rd-recover-empty-title",children:"Nothing to recover"}),(0,U.jsx)("p",{className:"rd-recover-empty-copy",children:"No funds are waiting at your deposit addresses. If funds become stuck, they will appear here."}),g&&(0,U.jsxs)("button",{type:"button",className:"rd-button-secondary rd-recover-empty-refresh",onClick:g,"data-track":"refresh_recovery",children:[(0,U.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,U.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&&p.map(c=>(0,U.jsx)(cx,{group:c,showTargetLabel:p.length>1||c.targets.length>1,busy:i.busy,state:i.stateFor(c.forwarder),actingRowKey:s,rowKeyOf:w=>`${c.forwarder.toLowerCase()}:${w.key}`,onRecover:w=>{w.action&&(l(`${c.forwarder.toLowerCase()}:${w.key}`),i.recover(c.info,w.action.kind,w.action.tokenAddress))}},c.forwarder.toLowerCase())),!a&&!n&&b&&(0,U.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:",y&&(0,U.jsxs)(U.Fragment,{children:[" ",(0,U.jsxs)("b",{children:[Mn(y.value,y.decimals)," BNB"]})]}),!y&&" unavailable","."]}),!a&&!n&&b&&(0,U.jsx)("p",{className:"rd-recover-foot",children:"Delivery continues to ONEchain; returned funds go to your connected BNB Chain wallet."})]})}var Kt=V(require("react"),1),Sr=V(require("@radix-ui/react-dialog"),1),bo=require("vaul");we(`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}
|
|
20
|
-
`);var ar=require("react/jsx-runtime"),Ug=24;function jg(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function px(e,t,r){let n=r?.offsetTop??t.top,o=r?r.offsetTop+r.height:t.bottom,a=Math.max(t.top,n)+Ug,i=Math.min(t.bottom,o)-Ug;return e.top<a?e.top-a:e.bottom>i?e.bottom-i:0}function ux(){let e=Kt.useRef(0),[t,r]=Kt.useState({keyboardHeight:0,keyboardOverlap:0,viewportHeight:0});return Kt.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(p=>p.keyboardHeight===i&&p.keyboardOverlap===l&&p.viewportHeight===d?p:{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 fx(e){let t=`(max-width: ${e}px)`,[r,n]=Kt.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(t).matches);return Kt.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 gn({theme:e="dark",mobileBreakpoint:t=768,drawerDirection:r="bottom",dialogWidth:n,drawerMaxWidth:o,drawerMinWidth:a,style:i,open:s,onOpenChange:l,children:d}){let p=fx(t),[b,g]=Kt.useState(!1),h=s!==void 0,x=h?s:b,y=Kt.useCallback(m=>{h||g(m),l?.(m)},[h,l]);Pn(x,Kt.useCallback(()=>y(!1),[y]));let u=Kt.useMemo(()=>{let m={};return n&&(m["--rd-dialog-width"]=n),o&&(m["--rd-drawer-max-width"]=o),a&&(m["--rd-drawer-min-width"]=a),{...m,...i}},[n,o,a,i]),c=Kt.useMemo(()=>({open:x,setOpen:y,isMobile:p,theme:e,drawerDirection:r,portalStyle:u}),[x,y,p,e,r,u]),w=(0,ar.jsx)("div",{"data-theme":e,style:u,children:d});return p?(0,ar.jsx)(vs.Provider,{value:c,children:(0,ar.jsx)(bo.Drawer.Root,{direction:r,open:x,onOpenChange:y,noBodyStyles:!0,children:w},"drawer")}):(0,ar.jsx)(vs.Provider,{value:c,children:(0,ar.jsx)(Sr.Root,{open:x,onOpenChange:y,children:w})})}function Ho({asChild:e,children:t,dataAttributes:r}){let{isMobile:n}=Jr(),o=n?bo.Drawer.Trigger:Sr.Trigger;return(0,ar.jsx)(o,{asChild:e,...r,children:t})}function hn({className:e,ariaTitle:t,children:r}){let{open:n,isMobile:o,theme:a,drawerDirection:i,portalStyle:s}=Jr(),{keyboardHeight:l,keyboardOverlap:d,viewportHeight:p}=ux(),b=Io(),g=Kt.useRef(null),h=Kt.useRef(null);Kt.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),Kt.useEffect(()=>{h.current&&clearTimeout(h.current);let c=document.activeElement;!n&&jg(c)&&g.current?.contains(c)&&c.blur(),g.current?.querySelectorAll("[data-rd-scroll-area]").forEach(w=>{w.scrollTo?.({top:0,behavior:"auto"})})},[n]);let x=o&&i==="bottom"&&l>0,y=x?{bottom:d,maxHeight:`min(85dvh, calc(${p}px - env(safe-area-inset-top, 0px)))`}:void 0,u=Kt.useCallback(c=>{if(!o||i!=="bottom"||!jg(c.target))return;let w=c.target,m=w.closest("[data-rd-scroll-area]");m&&(h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{let v=px(w.getBoundingClientRect(),m.getBoundingClientRect(),window.visualViewport);Math.abs(v)>=1&&m.scrollBy?.({top:v,behavior:"auto"}),h.current=null},280))},[i,o]);return o?(0,ar.jsxs)(bo.Drawer.Portal,{children:[(0,ar.jsx)(bo.Drawer.Overlay,{className:"rd-overlay"}),(0,ar.jsxs)(bo.Drawer.Content,{ref:g,className:Pe("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,...y},onFocusCapture:u,children:[(0,ar.jsx)(bo.Drawer.Title,{className:"rd-sr-only",children:t}),(0,ar.jsx)("div",{className:"rd-drawer-handle"}),r]})]}):(0,ar.jsxs)(Sr.Portal,{children:[(0,ar.jsx)(Sr.Overlay,{className:"rd-overlay"}),(0,ar.jsxs)(Sr.Content,{className:Pe("rd-dialog-content",e),"data-theme":a,"data-rd-shell":"dialog",style:s,children:[(0,ar.jsx)(Sr.Title,{className:"rd-sr-only",children:t}),(0,ar.jsx)(Sr.Description,{className:"rd-sr-only",children:t}),r]})]})}var ge=require("react/jsx-runtime");function mx({id:e,activeView:t,recoverableCount:r,onChange:n}){let o=["deposit","history","recover"];return(0,ge.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,ge.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,p=o[d];n(p),document.getElementById(`${e}-${p}-tab`)?.focus()},children:[(0,ge.jsx)("span",{children:i}),a==="recover"&&r>0&&(0,ge.jsx)("span",{className:"rd-recovery-badge","data-testid":"recovery-badge",children:r})]},a)})})}function Gg({className:e}){let t=Ia();return(0,ge.jsx)(Le,{feature:"relay",children:(0,ge.jsx)(hn,{ariaTitle:"Deposit",className:["rd-deposit-shell",e??t.className].filter(Boolean).join(" "),children:(0,ge.jsx)(gx,{})})})}function gx(){let e=Ia(),{theme:t}=Jr(),r=fg(),n=Wg.useId();if(!r)return null;let{activeView:o,setActiveView:a,recoveryOpen:i,resolvedApiBaseUrl:s,wallet:l,catalog:d,catalogLoading:p,catalogError:b,origin:g,setOrigin:h,amount:x,setAmount:y,recipient:u,setRecipient:c,recipientValid:w,balance:m,balanceLoading:v,insufficientBalance:R,depositAddress:C,depositAddressLoading:T,depositAddressError:S,arrivalStatus:N,quote:I,quoteLoading:M,quoteError:O,canDeposit:D,deposit:W,depositState:A,targetOptions:G,selectedTarget:J,setSelectedTarget:ee,showAmountInput:re,minNotice:L,showRecipientInput:te,showTargetSelector:ae,showOneClick:F,showConnectPrompt:ne,showRecipientHint:$,canRecover:ye,recoverableCount:ve,recoveryTargetsLoading:Be,recoveryTargets:he,recoveryOrders:Re,historyOrdersLoading:Ce,historyOrdersError:rt,refreshRecovery:Ae,trustedFactories:Qe,amountHint:ut,amountSmallestUnits:Fe,onMax:Ye}=r;return(0,ge.jsxs)("div",{className:"rd-root rd-wizard","data-theme":t,"data-rd-scroll-area":!0,children:[(0,ge.jsx)(mx,{id:n,activeView:o,recoverableCount:ve,onChange:a}),i&&(0,ge.jsx)("div",{className:"rd-deposit-tab-panel",id:`${n}-recover-panel`,role:"tabpanel","aria-labelledby":`${n}-recover-tab`,children:ye?(0,ge.jsx)(Ds,{client:e.client,apiBaseUrl:s,recipient:u,target:J?.symbol,wallet:l,trustedFactories:Qe,targets:(d?.targets.length??0)>0?he:void 0,targetsLoading:Be,orders:Re,onRecovered:Ae,onRecoverySuccess:e.onRecoverySuccess,onError:e.onError,showTitle:!1}):(0,ge.jsxs)("div",{className:"rd-recover-empty",role:"status","data-variant":"unavailable","data-testid":"rd-recovery-unavailable-note",children:[(0,ge.jsx)("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:(0,ge.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,ge.jsx)("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),(0,ge.jsx)("path",{d:"M8 10V7.5a4 4 0 0 1 8 0V10",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),(0,ge.jsx)("circle",{cx:"12",cy:"15",r:"1.2",fill:"currentColor"})]})}),(0,ge.jsx)("h3",{className:"rd-recover-empty-title",children:"Recovery unavailable"}),(0,ge.jsx)("p",{className:"rd-recover-empty-copy",children:"Connect a wallet that supports recovery transactions to continue."})]})}),o==="history"&&(0,ge.jsx)("div",{className:"rd-deposit-tab-panel",id:`${n}-history-panel`,role:"tabpanel","aria-labelledby":`${n}-history-tab`,children:w&&u.trim()?(0,ge.jsx)(Is,{orders:Re,isLoading:p||Ce,error:b??rt,catalog:d,showTitle:!1}):(0,ge.jsx)(La,{requiresIdentity:!0})}),o==="deposit"&&(0,ge.jsxs)("div",{className:"rd-deposit-tab-panel",id:`${n}-deposit-panel`,role:"tabpanel","aria-labelledby":`${n}-deposit-tab`,children:[p&&(0,ge.jsxs)("div",{className:"rd-skeleton-form","data-testid":"rd-source-skeleton","aria-hidden":"true",children:[(0,ge.jsx)(Cs,{}),ne&&e.onRequestConnect&&(0,ge.jsx)("span",{className:"rd-skeleton rd-skeleton-cta"}),(0,ge.jsxs)("section",{className:"rd-stack",children:[(0,ge.jsxs)("div",{className:"rd-field",children:[(0,ge.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"18%"}}),(0,ge.jsxs)("div",{className:"rd-field-row",children:[(0,ge.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),(0,ge.jsx)("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),re&&(0,ge.jsxs)("div",{className:"rd-field",children:[(0,ge.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"34%"}}),(0,ge.jsx)("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),(0,ge.jsxs)("div",{className:"rd-field",children:[(0,ge.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"24%"}}),(0,ge.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),(te||u.trim().length>0)&&(0,ge.jsxs)(ge.Fragment,{children:[(0,ge.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"58%",marginTop:"0.5rem"}}),(0,ge.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),te&&(0,ge.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"82%"}})]})]}),(0,ge.jsx)("span",{className:"rd-skeleton rd-skeleton-notice"})]}),p&&(0,ge.jsx)("p",{className:"rd-sr-only",role:"status",children:"Loading deposit options..."}),b&&(0,ge.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Failed to load configuration: ",b.message]}),$&&(0,ge.jsx)("div",{className:"rd-callout rd-callout-muted",children:te?"Connect a wallet or provide a recipient address to fetch your deposit address.":"Connect a wallet to fetch your deposit address."}),d&&g&&(0,ge.jsx)(Sg,{catalog:d,origin:g,onChangeOrigin:h,amount:x,onChangeAmount:y,showAmountInput:re,minNotice:L,amountHint:ut,onMax:Ye,recipient:u,onChangeRecipient:c,showRecipientInput:te,recipientValid:w,balance:m,balanceLoading:v,insufficientBalance:R,targetOptions:G,selectedTarget:J,onChangeTarget:ee,showTargetSelector:ae,quote:I,quoteLoading:M,quoteError:O,depositAddress:C,depositAddressLoading:T,depositAddressError:S,arrivalStatus:N,amountSmallestUnits:Fe,depositState:A,onDeposit:()=>{W()},canDeposit:D&&F,oneClickEnabled:F,locked:ne,onRequestConnect:e.onRequestConnect})]})]})}var Ps=require("react/jsx-runtime");function Hg({asChild:e,children:t}){return(0,Ps.jsx)(Le,{feature:"relay",children:(0,Ps.jsx)(Ho,{asChild:e??t!=null,children:t??(0,Ps.jsx)("button",{type:"button","data-track":"open",children:"Deposit"})})})}var ze=V(require("react"),1);var xe=require("react");var Os=require("react");function _g(e,t){let[r,n]=(0,Os.useState)(e);return(0,Os.useEffect)(()=>{let o=setTimeout(()=>n(e),t);return()=>clearTimeout(o)},[e,t]),r}var hx=500,Vg=56,Qg={chainId:Vg,token:"0x55d398326f99059fF775485246999027B3197955"},qg=3e4,bx=5e3;function wx(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?qg:Math.max(bx,e*1e3)}var yx=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function Rd(e,t){let r=e.trim();if(!r)return null;try{let n=ks(r,t);return n>0n?n:null}catch{return null}}function Yg(e={}){let t=(0,xe.useRef)(e);t.current=e;let r=(0,xe.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useDepositAddress: either `client` or `apiBaseUrl` must be provided");return er({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.wallet,o=n?.walletAddress,a=!!o,i=n?.walletChainId,[s,l]=(0,xe.useState)(),[d,p]=(0,xe.useState)(!0),[b,g]=(0,xe.useState)();(0,xe.useEffect)(()=>{let K=!1;return p(!0),r.getConfig().then(Ie=>{K||(l(Ie),g(void 0))}).catch(Ie=>{K||g(Ie instanceof Error?Ie:new Error(String(Ie)))}).finally(()=>{K||p(!1)}),()=>{K=!0}},[r]);let h=e.chains,x=(0,xe.useMemo)(()=>{if(!s)return[];if(!h||h.length===0)return s.origins;let K=new Set(h);return s.origins.filter(Ie=>K.has(Ie.chainId))},[s,h]),y=(0,xe.useMemo)(()=>s?{...s,origins:x}:void 0,[s,x]),[u,c]=(0,xe.useState)();(0,xe.useEffect)(()=>{if(u||x.length===0)return;let K=t.current.defaultToken,Ie=K?x.find(j=>j.chainId===K.chainId&&j.token.address.toLowerCase()===K.address.toLowerCase()):void 0;c(Ie??x[0])},[x,u]);let[w,m]=(0,xe.useState)(),v=(0,xe.useCallback)(()=>{Ze(void 0),Ct(!1),tr(!1),Q(!1),lt(void 0)},[]),R=(0,xe.useCallback)(K=>{c(K),m(void 0),v()},[v]),C=u?.kind==="svm",[T,S]=(0,xe.useState)(""),N=e.amount!==void 0?e.amount:T,I=(0,xe.useCallback)(K=>{S(K),m(void 0),v()},[v]),M=_g(N,hx),O=u?Rd(M,u.token.decimals):null,D=u?Rd(N,u.token.decimals):null,[W,A]=(0,xe.useState)(""),[G,J]=(0,xe.useState)(!1),ee=e.recipient!==void 0?e.recipient:W,re=(0,xe.useCallback)(K=>{A(K),J(!0),m(void 0),v()},[v]);(0,xe.useEffect)(()=>{e.recipient===void 0&&o&&!G&&A(o)},[o,G,e.recipient]);let L=ee.length===0||gt(ee),te=ee.length>0&>(ee)?ee:void 0,[ae,F]=(0,xe.useState)(),[ne,$]=(0,xe.useState)(!1),[ye,ve]=(0,xe.useState)(0),Be=n?.getBalance;(0,xe.useEffect)(()=>{if(!Be||!o||!u||C){F(void 0),$(!1);return}let K=!1;$(!0);let Ie=u.token.address.toLowerCase()===Ea?void 0:u.token.address;return Be({chainId:u.chainId,address:o,token:Ie}).then(j=>{K||F({...j,formatted:or(j.value,j.decimals)})}).catch(()=>{K||F(void 0)}).finally(()=>{K||$(!1)}),()=>{K=!0}},[Be,o,u,C,ye]);let he=ae?.value??null,Re=!C&&D!==null&&he!==null&&D>he,[Ce,rt]=(0,xe.useState)(),[Ae,Qe]=(0,xe.useState)(!1),[ut,Fe]=(0,xe.useState)(),Ye=u?.chainId,We=u?.token.address,Lt=e.target;(0,xe.useEffect)(()=>{if(!te||!Ye||!We){rt(void 0),Fe(void 0),Qe(!1);return}let K=!1;return rt(void 0),Fe(void 0),Qe(!0),(Lt?r.getDepositAddress({user:te,originChainId:Ye,originCurrency:We},Lt):r.getDepositAddress({user:te,originChainId:Ye,originCurrency:We})).then(j=>{K||(rt(j),Fe(void 0),t.current.onDepositAddress?.(j))}).catch(j=>{if(K)return;rt(void 0);let Me=j instanceof Error?j:new Error(String(j));Fe(Me),t.current.onError?.(Me)}).finally(()=>{K||Qe(!1)}),()=>{K=!0}},[r,te,Ye,We,Lt]);let Xt=[Ye??"",(We??"").toLowerCase(),(te??"").toLowerCase(),Lt??"",N.trim()].join("|"),ft=(0,xe.useRef)(Xt);(0,xe.useEffect)(()=>{ft.current!==Xt&&(ft.current=Xt,m(void 0),v())},[Xt,v]);let[Dt,bt]=(0,xe.useState)(),[kt,It]=(0,xe.useState)(!1),[Rt,Et]=(0,xe.useState)(),nt=O?.toString();(0,xe.useEffect)(()=>{if(!Ye||!We||!nt){bt(void 0),Et(void 0),It(!1);return}let K=!1,Ie,j=!0;async function Me(){j&&It(!0);let Z=qg;try{let He=await r.getQuote({originChainId:Ye,originCurrency:We,amount:nt});if(K)return;bt(He),Et(void 0),Z=wx(He.ttl)}catch(He){if(K)return;bt(void 0),Et(He instanceof Error?He:new Error(String(He)))}finally{K||It(!1),j=!1}K||(Ie=setTimeout(Me,Z))}return Me(),()=>{K=!0,Ie&&clearTimeout(Ie)}},[r,Ye,We,nt]);let[ir,zt]=(0,xe.useState)(!1),[sr,Ke]=(0,xe.useState)(!1),[wt,Ze]=(0,xe.useState)(),[ot,lt]=(0,xe.useState)(),[Ge,Ct]=(0,xe.useState)(!1),[lr,tr]=(0,xe.useState)(!1),[St,Q]=(0,xe.useState)(!1),be=n?.waitForReceipt,Te=(0,xe.useRef)(void 0);(0,xe.useEffect)(()=>{if(!wt||!u||!be)return;let K=!1;return Ct(!0),tr(!1),Q(!1),be({chainId:u.chainId,hash:wt}).then(Ie=>{K||(tr(!0),Q(Ie.status==="reverted"),ve(j=>j+1),Ie.status!=="reverted"&&wt!==Te.current&&(Te.current=wt,t.current.onDeposited?.(wt)))}).catch(Ie=>{K||lt(Ie instanceof Error?Ie.message:String(Ie))}).finally(()=>{K||Ct(!1)}),()=>{K=!0}},[wt,be]);let Se=i!==void 0&&u!==void 0&&i!==u.chainId,Xe=ir||sr,Jt=w??ot,Pt="idle";Jt?Pt="error":lr?Pt="confirmed":Ge?Pt="confirming":Xe&&(Pt=ir?"switching":"pending");let Ft={phase:Pt,isSubmitting:Xe,isConfirming:Ge,isConfirmed:lr,needsSwitch:Se,txHash:wt,reverted:lr&&St,error:Jt},mr=!!(u&&Ce&&Ce.originChainId===u.chainId&&Ce.originCurrency.toLowerCase()===u.token.address.toLowerCase()),z=!!(n?.sendTransaction&&n?.writeContract&&n?.readContract&&n?.waitForReceipt),De=!!(a&&z&&u&&!C&&Ce&&mr&&D&&D>0n&&!Re&&!Xe&&!Ge),tt=(0,xe.useCallback)(async()=>{if(C||!u||!Ce||!n?.sendTransaction||!n?.writeContract)return;m(void 0);let K=Rd(N,u.token.decimals);if(!K||K<=0n){m("enter an amount to use the one-click deposit");return}let Ie=u.token.address.toLowerCase()===Ea,j=Ce.depositAddress,Me=await Mg(n?.readContract,Vg,{forwarder:Ce.forwarder,recipient:te,version:Ce.version,trusted:t.current.trustedFactories});if(!Me.ok){m(`address verification failed: ${Me.reason}`);return}if(u.chainId===Qg.chainId&&u.token.address.toLowerCase()===Qg.token.toLowerCase()&&!Lg(j,Ce.forwarder)){m("address verification failed: deposit address does not match the verified forwarder (expected them to be identical on this route; check the backend's direct_same_token setting)");return}try{if(Se){if(!n?.switchChain)throw new Error("wallet cannot switch chains");zt(!0);try{await n.switchChain(u.chainId)}finally{zt(!1)}}v(),Ke(!0);try{let He=Ie?await n.sendTransaction({chainId:u.chainId,to:j,value:K}):await n.writeContract({chainId:u.chainId,address:u.token.address,abi:yx,functionName:"transfer",args:[j,K]});Ze(He)}finally{Ke(!1)}}catch(He){m(He.message)}},[C,u,Ce,N,Se,n,te,v]);return{address:o,isConnected:a,catalog:y,catalogLoading:d,catalogError:b,origin:u,setOrigin:R,recipient:ee,setRecipient:re,recipientValid:L,amount:N,setAmount:I,balance:ae,balanceLoading:ne,insufficientBalance:Re,isSvmOrigin:C,depositAddress:Ce?.depositAddress,depositAddressResult:Ce,depositAddressLoading:Ae,depositAddressError:ut,quote:Dt,quoteLoading:kt,quoteError:Rt,canDeposit:De,deposit:tt,depositState:Ft}}var tn=require("react");var xx=3e4,vx=300;function Ln(e){let t=(0,tn.useRef)(e);t.current=e;let{client:r,enabled:n=!0,live:o=!0}=e,a=e.refetchInterval??e.fallbackPollMs??xx,i=e.recipient&>(e.recipient)?e.recipient:void 0,[s,l]=(0,tn.useState)([]),[d,p]=(0,tn.useState)(!1),[b,g]=(0,tn.useState)(),[h,x]=(0,tn.useState)(!1),[y,u]=(0,tn.useState)(),[c,w]=(0,tn.useState)(0);return(0,tn.useEffect)(()=>{if(!i){l([]),g(void 0),p(!1),x(!1),u(void 0),w(0);return}if(!n){l([]),g(void 0),p(!1),x(!1),u(void 0),w(0);return}let m=!1,v=!0,R,C=0,T=0;async function S(){let O=++C;T+=1,v&&p(!0);try{let D=await r.listOrders(i);if(m)return;O===C&&(l(D),g(void 0))}catch(D){if(m)return;let W=D instanceof Error?D:new Error(String(D));O===C&&(g(W),t.current.onError?.(W))}finally{T-=1,!m&&O===C&&(p(!1),x(!0),u(i),w(D=>D+1)),v=!1}}function N(){R&&clearTimeout(R),R=setTimeout(()=>{R=void 0,m||S()},vx)}S();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(()=>{T===0&&S()},a):void 0;return()=>{m=!0,R&&clearTimeout(R),M&&clearInterval(M),I?.close()}},[r,i,n,o,a]),{orders:s,ordersLoading:d,ordersError:b,ordersInitialized:h,ordersForRecipient:y,ordersRevision:c}}var Bs=require("react");function Kg(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 Zg({catalogTargets:e,filter:t,defaultTarget:r}){let n=(0,Bs.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,Bs.useState)(()=>Kg(n,r)?.symbol),i=(o!==void 0?n.find(l=>l.symbol===o):void 0)??Kg(n,r);function s(l){n.some(d=>d.symbol===l)&&a(l)}return{options:n,selected:i,setSelected:s}}var kx={dev:"https://dev-relay-protocol-api.onechain.nexus",stage:"https://dev-relay-protocol-api.onechain.nexus",production:"https://relay-protocol-api.onechain.nexus"};function _n(e){return e.apiBaseUrl?e.apiBaseUrl:kx[it(e.environment)]}var Fs=require("react/jsx-runtime"),Xg=1e3;function Rx(e,t,r,n,o){let a=e.requireWalletConnection??e.showRecipientInput===!1,i=r.walletAddress&>(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 zs(e,t){let r=e.trim();if(!r)return 0n;try{let n=ks(r,t);return n>0n?n:0n}catch{return 0n}}function Cx(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 Jg(e,t,r){return`${e}:${t.toLowerCase()}:${r}`}function Sx(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function $g({open:e,children:t}){let[r]=ze.useState(ug);return(0,Fs.jsxs)(gd.Provider,{value:r,children:[e&&(0,Fs.jsx)(Nx,{store:r}),t]})}function Nx({store:e}){let t=Ia(),{showTargetSelector:r=!0}=t,n=t.requireWalletConnection??t.showRecipientInput===!1,o=!!(t.walletAddress&>(t.walletAddress)),[a,i]=ze.useState("deposit"),s=a==="recover",l=ze.useCallback(_=>{i(yt=>(typeof _=="function"?_(yt==="recover"):_)?"recover":"deposit")},[]);ze.useEffect(()=>{$e("relay","opened")},[]);let[d,p]=ze.useState(void 0),b=ze.useMemo(()=>_n({apiBaseUrl:t.apiBaseUrl,environment:t.environment}),[t.apiBaseUrl,t.environment]),g=ze.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]),h=it(t.environment),x=qt("apps.json",h,_=>({min:Dr(_?.relay?.minDepositAmount,h),max:Dr(_?.relay?.maxDepositAmount,h),trustedFactories:si(_,h)})),y=ze.useMemo(()=>t.trustedFactories??As(x?.trustedFactories),[t.trustedFactories,x?.trustedFactories]),{isConnected:u,catalog:c,catalogLoading:w,catalogError:m,origin:v,setOrigin:R,amount:C,setAmount:T,recipient:S,setRecipient:N,recipientValid:I,balance:M,balanceLoading:O,insufficientBalance:D,depositAddress:W,depositAddressResult:A,depositAddressLoading:G,depositAddressError:J,quote:ee,quoteLoading:re,quoteError:L,canDeposit:te,deposit:ae,depositState:F}=Yg(Rx(t,d,g,b,y)),{options:ne,selected:$,setSelected:ye}=Zg({catalogTargets:c?.targets??[],filter:t.targetTokens,defaultTarget:t.defaultTarget});ze.useEffect(()=>{p($?.symbol)},[$?.symbol]);let ve=t.amount===void 0&&!t.hideAmount,Be=!n&&(t.showRecipientInput??!0)&&t.recipient===void 0,he=I&&S.trim().length>0&>(S),Re=!n&&t.recipient!==void 0&&t.recipient.trim().length>0,Ce=n?!o||!he:!u&&!Re&&!he,rt=!!c&&!he&&!Ce,Ae=(t.showRecovery??!1)&&o&&!!(g.writeContract&&g.readContract&&g.waitForReceipt),Qe=ze.useMemo(()=>t.client?t.client:er({baseUrl:b}),[t.client,b]),[ut,Fe]=ze.useState({}),[Ye,We]=ze.useState(!1),[Lt,Xt]=ze.useState(0),ft=ze.useCallback(()=>Xt(_=>_+1),[]),Dt=F.isConfirmed,bt=he&&(!!A||a!=="deposit"),{orders:kt,ordersLoading:It,ordersError:Rt,ordersInitialized:Et,ordersForRecipient:nt}=Ln({client:Qe,recipient:bt?S:void 0,enabled:bt,refetchInterval:Xg}),ir=kt,zt=$??c?.targets.find(_=>_.isDefault),sr=zt?.symbol??c?.destination.symbol,Ke=zt?.isDefault??!0,wt=A?.version,Ze=ze.useMemo(()=>kt.filter(_=>Cx(_,wt,sr,Ke)),[kt,wt,sr,Ke]),ot=ze.useRef(void 0),[lt,Ge]=ze.useState(),[Ct,lr]=ze.useState(),tr=`${S.toLowerCase()}:${sr?.toLowerCase()??""}:${wt??""}`;ze.useEffect(()=>{let _=nt?.toLowerCase()===S.toLowerCase();if(!bt||!Et||!_||Rt){bt||(ot.current=void 0,Ge(void 0),lr(void 0));return}let yt=new Set(Ze.map(Je=>Je.orderId)),hr=new Set(Ze.flatMap(Je=>(Je.deposits??[]).map(rn=>Jg(Je.orderId,rn.txHash,rn.blockNumber)))),Ue=ot.current;if(!Ue||Ue.key!==tr){ot.current={key:tr,orderIds:yt,depositKeys:hr,statuses:new Map(Ze.map(Je=>[Je.orderId,Je.status]))},Ge(void 0),lr(void 0);return}let _r,rr=0n,vr=!1;for(let Je of Ze)for(let rn of Je.deposits??[]){let ko=Jg(Je.orderId,rn.txHash,rn.blockNumber);if(!Ue.depositKeys.has(ko)){_r??(_r=Je);try{rr+=BigInt(rn.amount),vr=!0}catch{}}}_r??(_r=Ze.find(Je=>!Ue.orderIds.has(Je.orderId))),_r??(_r=Ze.find(Je=>Ue.statuses.get(Je.orderId)!==Je.status));for(let Je of yt)Ue.orderIds.add(Je);for(let Je of hr)Ue.depositKeys.add(Je);for(let Je of Ze)Ue.statuses.set(Je.orderId,Je.status);_r&&(Ge(_r.orderId),vr&&lr(rr))},[tr,Ze,nt,bt,S,Rt,Et]),ze.useEffect(()=>{let _=c?.targets??[];if(!Ae||!he||_.length===0){Fe({}),We(!1);return}let yt=!1;return We(!0),Promise.all(_.map(hr=>Qe.getRecovery({user:S,target:hr.symbol}).catch(()=>{}))).then(hr=>{if(yt)return;let Ue={};_.forEach((_r,rr)=>{let vr=hr[rr];vr&&(Ue[_r.symbol]=vr)}),Fe(Ue),We(!1)}),()=>{yt=!0}},[Qe,Ae,he,S,c,Dt,Lt]);let St=ze.useMemo(()=>(c?.targets??[]).map(_=>({symbol:_.symbol,isDefault:_.isDefault,info:ut[_.symbol]})).filter(_=>_.info!==void 0),[c,ut]),Q=ze.useMemo(()=>Ms(Go(St)),[St]),[be,Te]=ze.useState(void 0),[Se,Xe]=ze.useState(),Jt=!!c&&(c?.targets.length??0)>0&&!d;ze.useEffect(()=>{if(!he||!v||!A||Jt){Te(void 0),Xe(void 0);return}let _=!1,yt=!1,hr=A.forwarder.toLowerCase();Te(void 0),Xe(void 0);async function Ue(){if(!(_||yt)){yt=!0;try{let rr=await Qe.getRecovery({user:S,target:d||void 0});if(_)return;if(rr?.forwarder&&rr.forwarder.toLowerCase()!==hr){Te(void 0),Xe(void 0);return}if(Xe(rr),!rr||rr.suggestedAction!=="sweep"){Te(void 0);return}let vr;try{vr=BigInt(rr.balance)}catch{Te(void 0);return}let Je=Number(rr.decimals);if(vr<=0n||!Number.isInteger(Je)||Je<0){Te(void 0);return}let rn=rr.tokens?.find(ko=>ko.address?.toLowerCase()===rr.token?.toLowerCase()&&ko.symbol)?.symbol;Te({balance:vr,decimals:Je,symbol:rn})}catch{}finally{yt=!1}}}Ue();let _r=setInterval(()=>{Ue()},Xg);return()=>{_=!0,clearInterval(_r)}},[Qe,he,S,d,Jt,v,A,Dt]);let Pt=ze.useCallback(()=>{!v||!M||T(or(M.value,v.token.decimals))},[v,M,T]),Ft=ze.useRef(!1),mr=!!W;ze.useEffect(()=>{!mr||Ft.current||(Ft.current=!0,$e("relay","deposit_address_shown"))},[mr]);let z=F.txHash;ze.useEffect(()=>{z&&$e("relay","deposit_submitted")},[z]);let De=(()=>{let _=Number(x?.min);return Number.isFinite(_)&&_>=0?String(x?.min):"6"})(),tt=(()=>{let _=Number(x?.max);return Number.isFinite(_)&&_>0?String(x?.max):void 0})(),K=(()=>{if(!v)return 0n;let _=zs(De,v.token.decimals),yt=BigInt(v.minAmount);return _>yt?_:yt})(),Ie=v?or(K,v.token.decimals):De,j=(()=>{if(!v||!be||K<=0n)return;let _=v.token.decimals,yt=be.decimals,hr=_>=yt?be.balance*10n**BigInt(_-yt):be.balance/10n**BigInt(yt-_);if(hr>=K)return;let Ue=K-hr;return{pending:or(be.balance,yt),pendingSymbol:be.symbol,remaining:or(Ue,_)}})(),Me=c?.origins.find(_=>_.chainId===56&&!!(Se?.token&&_.token.address.toLowerCase()===Se.token.toLowerCase()))??c?.origins.find(_=>_.chainId===56&&_.token.symbol.toUpperCase()==="USDT"),Z=Number.isInteger(Se?.decimals)&&(Se?.decimals??-1)>=0?Se.decimals:Me?.token.decimals,He=Se?.tokens?.find(_=>_.address?.toLowerCase()===Se.token?.toLowerCase()&&_.symbol)?.symbol??Me?.token.symbol,gr=Ct!==void 0&&Z!==void 0?or(Ct,Z):void 0,Vn=(()=>{if(!v||Z===void 0)return;let _=v.token.decimals;if(Z>=_)return K*10n**BigInt(Z-_);let yt=10n**BigInt(_-Z);return(K+yt-1n)/yt})(),Wr=lt?Ze.find(_=>_.orderId===lt):void 0,Gr=Wr??Ze.find(_=>_.status==="BSC_FUNDED"||_.status==="BRIDGE_INITIATED"||_.status==="BRIDGE_PENDING"),Ka=(()=>{if(!Gr||Vn===void 0)return!1;try{return BigInt(Gr.amountIn)>=Vn}catch{return!1}})(),qn=(()=>{if(!Se||Vn===void 0)return!1;try{return BigInt(Se.balance)>0n&&BigInt(Se.balance)>=Vn}catch{return!1}})(),Za=(()=>{let _={amount:gr,symbol:He,backendStatus:Gr?.status};return!A||!bt||!Et?{phase:"connecting",..._}:nt?.toLowerCase()!==S.toLowerCase()||Rt?{phase:"unavailable",..._}:Wr?.status==="COMPLETED"?{phase:"completed",..._,backendStatus:Wr.status}:Wr&&Sx(Wr.status)?{phase:"failed",..._,backendStatus:Wr.status}:Gr?.status==="BRIDGE_INITIATED"||Gr?.status==="BRIDGE_PENDING"?{phase:"processing",..._}:Gr?.status==="BSC_FUNDED"&&Ka||qn?{phase:"funded",..._}:Wr?{phase:"detected",..._,backendStatus:Wr.status}:{phase:"waiting",..._}})(),Xa=v&&tt?zs(tt,v.token.decimals):void 0,vo=v&&C.trim()?zs(C,v.token.decimals):0n,Ja=!!(v&&vo>0n&&vo<K),xr=!!(v&&Xa!==void 0&&vo>0n&&vo>Xa),$a=(()=>{if(v){if(Ja)return`Amount is below the ${Ie} ${v.token.symbol} minimum.`;if(xr)return`Amount is above the ${tt} ${v.token.symbol} maximum.`}})(),Hr=t.showOneClickDeposit??!1,dr=v&&C.trim()?zs(C,v.token.decimals).toString():void 0,Yn={activeView:a,setActiveView:i,recoveryOpen:s,setRecoveryOpen:l,resolvedApiBaseUrl:b,wallet:g,catalog:c,catalogLoading:w,catalogError:m,origin:v,setOrigin:R,amount:C,setAmount:T,recipient:S,setRecipient:N,recipientValid:I,balance:M,balanceLoading:O,insufficientBalance:D,depositAddress:W,depositAddressLoading:G,depositAddressError:J,arrivalStatus:Za,quote:ee,quoteLoading:re,quoteError:L,canDeposit:te,deposit:ae,depositState:F,targetOptions:ne,selectedTarget:$,setSelectedTarget:ye,showAmountInput:ve,minNotice:v?{min:Ie,symbol:v.token.symbol,...j}:void 0,showRecipientInput:Be,showTargetSelector:r,showOneClick:Hr,showConnectPrompt:Ce,showRecipientHint:rt,canRecover:Ae,recoverableCount:Q,recoveryTargetsLoading:Ye,recoveryTargets:St,recoveryOrders:ir,historyOrdersLoading:It,historyOrdersError:Rt,refreshRecovery:ft,trustedFactories:y,amountHint:$a,amountSmallestUnits:dr,onMax:ve&&M&&M.value>0n?Pt:void 0};return ze.useLayoutEffect(()=>{e.publish(Yn)}),ze.useLayoutEffect(()=>()=>e.publish(null),[e]),null}var Us=require("react/jsx-runtime");function Tx(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e,[b,g]=js.useState(!1),h=l!==void 0,x=h?l:b,y=js.useCallback(u=>{h||g(u),d?.(u)},[h,d]);return(0,Us.jsx)(md.Provider,{value:e,children:(0,Us.jsx)($g,{open:x,children:(0,Us.jsx)(gn,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:x,onOpenChange:y,children:p})})})}var _o=Object.assign(Tx,{Trigger:Hg,Content:Gg});var Ws=require("react"),Cd=(0,Ws.createContext)(null);function Sd(){let e=(0,Ws.useContext)(Cd);if(!e)throw new Error("RelayHistory compound components must be used within <RelayHistory>");return e}var Er=V(require("react"),1);var Qn=require("react/jsx-runtime");function eh({className:e}){let t=Sd(),{open:r}=Jr();return Er.useEffect(()=>{r&&$e("relay","history_opened")},[r]),(0,Qn.jsx)(Le,{feature:"relay",children:(0,Qn.jsx)(hn,{ariaTitle:"Transfer history",className:e??t.className,children:(0,Qn.jsx)(Ix,{})})})}function Ix(){let e=Sd(),{theme:t}=Jr(),r=Er.useMemo(()=>{if(e.client)return e.client;let u=_n({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return er({baseUrl:u})},[e.client,e.apiBaseUrl,e.environment]),n=e.recipient??e.walletAddress,o=!!(n&>(n)),[a,i]=Er.useState(),[s,l]=Er.useState(!1),[d,p]=Er.useState(),b=Er.useRef(e.onError);b.current=e.onError,Er.useEffect(()=>{if(!o){i(void 0),l(!1),p(void 0);return}let u=!1;return i(void 0),l(!0),p(void 0),r.getConfig().then(c=>{u||i(c)}).catch(c=>{if(u)return;let w=c instanceof Error?c:new Error(String(c));p(w),b.current?.(w)}).finally(()=>{u||l(!1)}),()=>{u=!0}},[r,o]);let{orders:g,ordersLoading:h,ordersError:x}=Ln({client:r,recipient:o?n:void 0,enabled:!!a,onError:e.onError}),y=Er.useCallback(u=>{if(!e.onOutlink)return;let w=u.target.closest?.('a[target="_blank"]');w?.href&&e.onOutlink(w.href)},[e.onOutlink]);return(0,Qn.jsx)("div",{className:"rd-root rd-wizard","data-theme":t,children:o?(0,Qn.jsx)("div",{onClick:y,children:(0,Qn.jsx)(Is,{orders:g,isLoading:s||h,error:d??x,catalog:a,showTitle:!1})}):(0,Qn.jsx)(La,{requiresIdentity:!0})})}var Gs=require("react/jsx-runtime");function th({asChild:e,children:t}){return(0,Gs.jsx)(Le,{feature:"relay",children:(0,Gs.jsx)(Ho,{asChild:e??t!=null,children:t??(0,Gs.jsx)("button",{type:"button","data-track":"open",children:"History"})})})}var Nd=require("react/jsx-runtime");function Ex(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:p}=e;return(0,Nd.jsx)(Cd.Provider,{value:e,children:(0,Nd.jsx)(gn,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p})})}var Td=Object.assign(Ex,{Trigger:th,Content:eh});var Ur=V(require("react"),1);var Ar=V(require("react"),1);var Hs=[],Ax=3e4;function rh({client:e,recipient:t}){let[r,n]=Ar.useState({targets:Hs}),[o,a]=Ar.useState(0),i=Ar.useRef(void 0),s=Ar.useRef(void 0),l=t&>(t)?t.toLowerCase():void 0;Ar.useEffect(()=>{if(!l){n({targets:Hs});return}let y=!1,u=i.current;if(!u||u.client!==e||u.recipientKey!==l||u.generation!==o){let c=(async()=>{let w,m=[];try{m=(await e.getConfig()).targets}catch(S){w=S instanceof Error?S:new Error(String(S))}let v=m.length===0?[()=>e.getRecovery({user:l})]:m.map(S=>()=>e.getRecovery({user:l,target:S.symbol})),R=await Promise.all(v.map(async S=>{try{return{info:await S()}}catch(N){return{error:N instanceof Error?N:new Error(String(N))}}})),C=m.length===0?R[0]?.info?[{symbol:"",isDefault:!0,info:R[0].info}]:[]:m.flatMap((S,N)=>R[N]?.info?[{symbol:S.symbol,isDefault:S.isDefault,info:R[N].info}]:[]),T=R.find(S=>S.error)?.error;return{targets:C,badgeFailed:!!(w||T&&C.length===0),error:w??T}})().catch(w=>({targets:Hs,badgeFailed:!0,error:w instanceof Error?w:new Error(String(w))}));u={client:e,recipientKey:l,generation:o,promise:c},i.current=u,c.finally(()=>{s.current={client:e,recipientKey:l,at:Date.now()},i.current?.promise===c&&(i.current=void 0)})}return u.promise.then(c=>{y||n({recipientKey:l,targets:c.targets,badgeFailed:c.badgeFailed,error:c.error})}),()=>{y=!0}},[e,l,o]);let d=Ar.useCallback(()=>a(y=>y+1),[]),p=Ar.useCallback(()=>{if(!l)return;let y=i.current;if(y?.client===e&&y.recipientKey===l)return;let u=s.current;u?.client===e&&u.recipientKey===l&&Date.now()-u.at<Ax||a(c=>c+1)},[e,l]),b=l&&r.recipientKey===l?r.targets:Hs,g=l&&r.recipientKey===l?r.error:void 0,h=!!(l&&r.recipientKey!==l),x=!!(l&&r.recipientKey===l&&r.badgeFailed);return Ar.useMemo(()=>({count:x?0:Ms(Go(b)),targets:b,loading:h,error:g,refresh:d,refreshIfStale:p}),[b,h,x,g,d,p])}var _s=require("react"),Id=(0,_s.createContext)(null);function Ed(){let e=(0,_s.useContext)(Id);if(!e)throw new Error("RelayRecovery compound components must be used within <RelayRecovery>");return e}function Ad(){return Ed().props}function nh(){return Ed().recovery}function oh(){return Ed().recovery.count}var wo=V(require("react"),1);var bn=require("react/jsx-runtime");function ah({className:e}){let t=Ad(),{open:r}=Jr();return wo.useEffect(()=>{r&&$e("relay","recovery_opened")},[r]),(0,bn.jsx)(Le,{feature:"relay",children:(0,bn.jsx)(hn,{ariaTitle:"Recover stuck funds",className:e??t.className,children:(0,bn.jsx)(Mx,{})})})}function Mx(){let e=Ad(),{targets:t,loading:r,refresh:n}=nh(),{theme:o}=Jr(),a=wo.useMemo(()=>_n({apiBaseUrl:e.apiBaseUrl,environment:e.environment}),[e.apiBaseUrl,e.environment]),i=wo.useMemo(()=>e.client?e.client:er({baseUrl:a}),[e.client,a]),s=wo.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&>(e.walletAddress)?e.walletAddress:void 0,d=!!(l&&(!e.recipient||gt(e.recipient)&&e.recipient.toLowerCase()===l.toLowerCase())),p=d?l:void 0,b=it(e.environment),g=qt("apps.json",b,w=>si(w,b)),h=wo.useMemo(()=>e.trustedFactories??As(g),[e.trustedFactories,g]),x=!!(e.writeContract&&e.readContract&&e.waitForReceipt),y=!!p&&x,u=p,{orders:c}=Ln({client:i,recipient:y?u:void 0,enabled:y,live:!1});return(0,bn.jsxs)("div",{className:"rd-root rd-wizard","data-theme":o,children:[!l&&(0,bn.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-connect-note",children:"Connect a wallet to check recoverable funds."}),l&&!d&&(0,bn.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-recipient-note",children:"Recovery is only available for the connected wallet."}),d&&!x&&(0,bn.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-unsupported-note",children:"This wallet can't sign recovery transactions."}),y&&(0,bn.jsx)(Ds,{client:e.client,apiBaseUrl:a,recipient:p,wallet:s,trustedFactories:h,targets:t,targetsLoading:r,orders:c,onRecovered:n,onRecoverySuccess:e.onRecoverySuccess,showTitle:!1,onError:e.onError})]})}var Qs=require("react/jsx-runtime");function ih({asChild:e,children:t}){let r=oh();return(0,Qs.jsx)(Le,{feature:"relay",children:(0,Qs.jsx)(Ho,{asChild:e??t!=null,dataAttributes:{"data-rd-recovery-count":r},children:t??(0,Qs.jsx)("button",{type:"button","data-track":"open",children:"Recover"})})})}var Md=require("react/jsx-runtime");function Lx(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e,[b,g]=Ur.useState(!1),h=l!==void 0,x=h?l:b,y=Ur.useCallback(C=>{h||g(C),d?.(C)},[h,d]),u=Ur.useMemo(()=>{if(e.client)return e.client;let C=_n({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return er({baseUrl:C})},[e.client,e.apiBaseUrl,e.environment]),c=e.walletAddress&>(e.walletAddress)?e.walletAddress:void 0,w=c&&(!e.recipient||gt(e.recipient)&&e.recipient.toLowerCase()===c.toLowerCase())?c:void 0,m=rh({client:u,recipient:w});Ur.useEffect(()=>{x&&m.refreshIfStale()},[x,m.refreshIfStale]);let v=Ur.useRef(void 0);Ur.useEffect(()=>{!x||!m.error||v.current===m.error||(v.current=m.error,e.onError?.(m.error))},[x,m.error,e.onError]);let R=Ur.useMemo(()=>({props:e,recovery:m}),[e,m]);return(0,Md.jsx)(Id.Provider,{value:R,children:(0,Md.jsx)(gn,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:x,onOpenChange:y,children:p})})}var Ld=Object.assign(Lx,{Trigger:ih,Content:ah});var Mr=require("react");function Dd(e={}){let t=(0,Mr.useRef)(e);t.current=e;let r=(0,Mr.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayConfig: either `client` or `apiBaseUrl` must be provided");return er({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.enabled??!0,o=e.refetchInterval,[a,i]=(0,Mr.useState)(),[s,l]=(0,Mr.useState)(!1),[d,p]=(0,Mr.useState)(),[b,g]=(0,Mr.useState)(0);(0,Mr.useEffect)(()=>{if(!n){i(void 0),l(!1),p(void 0);return}let x=!1,y=!1;i(void 0),l(!0),p(void 0);async function u(){if(!(x||y)){y=!0;try{let w=await r.getConfig();if(x)return;i(w),p(void 0)}catch(w){if(x)return;let m=w instanceof Error?w:new Error(String(w));p(m),t.current.onError?.(m)}finally{y=!1,x||l(!1)}}}u();let c=typeof o=="number"&&Number.isFinite(o)&&o>0?setInterval(()=>{u()},o):void 0;return()=>{x=!0,c&&clearInterval(c)}},[r,n,b,o]);let h=(0,Mr.useCallback)(()=>g(x=>x+1),[]);return{config:a,loading:s,error:d,refresh:h}}var lh=require("@tanstack/react-query"),jr=require("react");var Dx=1,sh=new WeakMap;function Px(e){let t=sh.get(e);if(t!==void 0)return t;let r=Dx++;return sh.set(e,r),r}function Pd(e={}){let t=(0,jr.useRef)(e);t.current=e;let r=(0,jr.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayRecovery: either `client` or `apiBaseUrl` must be provided");return er({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.recipient,o=n&>(n)?n:void 0,a=e.target,i=e.query,s=(0,jr.useMemo)(()=>Px(r),[r]),l=(0,jr.useMemo)(()=>["relay","recovery",s,o??null,a??null],[s,o,a]),d=(0,lh.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}),p=(0,jr.useRef)(0);(0,jr.useEffect)(()=>{let y=d.error,u=d.errorUpdatedAt;!y||u===p.current||(p.current=u,t.current.onError?.(y),y instanceof Fr&&y.status===401&&t.current.onUnauthorized?.())},[d.error,d.errorUpdatedAt]);let b=(0,jr.useCallback)(()=>{d.refetch()},[d.refetch]),g=Da({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:b}),h=d.data,x=(0,jr.useCallback)(async(y,u)=>{h&&await g.recover(h,y,u)},[g,h]);return{info:h,loading:d.isLoading,error:d.error??void 0,isFetching:d.isFetching,refresh:b,recover:x,recoveryState:g.stateFor(h?.forwarder)}}var st=require("react/jsx-runtime"),Ox={bscBridge:"https://bscscan.com/tx/",crossFinalize:"https://scan.crosstoken.io/tx/",crossExecute:"https://scan.crosstoken.io/tx/"},Bx={bscBridge:"Bridge tx (BSC)",crossFinalize:"Finalize tx (CROSS)",crossExecute:"Execute tx (CROSS)"};function zx(e){return e==="done"?"\u2713":e==="active"?"\u25CF":""}function dh(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Fx(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 Bd({orderId:e,order:t,error:r}){let n=!t&&!r;return(0,st.jsxs)("section",{className:"rd-card",children:[(0,st.jsxs)("div",{className:"rd-card-header",children:[(0,st.jsx)("h2",{className:"rd-card-title",children:"4. Status"}),t&&(0,st.jsx)("span",{className:`rd-status-pill${t.status==="COMPLETED"?" rd-status-pill-success":dh(t.status)?" rd-status-pill-failure":""}`,children:t.status})]}),(0,st.jsxs)("p",{className:"rd-card-hint",children:["Order ",e]}),n&&(0,st.jsxs)("p",{className:"rd-muted",children:[(0,st.jsx)("span",{className:"rd-spinner"})," Loading status..."]}),r&&(0,st.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load order status: ",r.message]}),t&&(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)("ol",{className:"rd-stepper",children:t.steps.map((o,a)=>(0,st.jsxs)("li",{className:Fx(o.status),children:[(0,st.jsxs)("div",{className:"rd-stepper-rail",children:[(0,st.jsx)("span",{className:"rd-stepper-dot",children:zx(o.status)}),a<t.steps.length-1&&(0,st.jsx)("span",{className:"rd-stepper-line"})]}),(0,st.jsxs)("div",{className:"rd-stepper-body",children:[(0,st.jsx)("div",{className:"rd-stepper-label",children:o.label}),o.key==="bridge"&&t.txs.bscBridge&&(0,st.jsx)("div",{className:"rd-stepper-meta",children:(0,st.jsx)(Od,{orderTxs:t.txs,txKey:"bscBridge"})}),o.key==="deliver"&&(t.txs.crossFinalize||t.txs.crossExecute)&&(0,st.jsxs)("div",{className:"rd-stepper-meta",children:[t.txs.crossFinalize&&(0,st.jsx)(Od,{orderTxs:t.txs,txKey:"crossFinalize"}),t.txs.crossExecute&&(0,st.jsx)(Od,{orderTxs:t.txs,txKey:"crossExecute"})]})]})]},o.key))}),dh(t.status)&&(0,st.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,st.jsx)("div",{className:"rd-callout rd-callout-success",children:"crossd delivered. This order is complete."})]})]})}function Od({orderTxs:e,txKey:t}){let r=e[t];return r?(0,st.jsxs)("a",{href:`${Ox[t]}${r}`,target:"_blank",rel:"noreferrer",children:[Bx[t],": ",r.slice(0,10),"..."]}):null}function Oa(e){return`${e.chainId}:${e.address.toLowerCase()}`}function Vs(e,t){return Oa(e)===Oa(t)}function Ba(e,t){if(t)return e.find(r=>Vs(r,t))}function Qo(e,t,r){return t?{fromTokens:(r==="swap"?[t.swap.from]:t.bridge.from).map(o=>Ba(e,o)).filter(o=>!!o),targetToken:Ba(e,t.target)}:{fromTokens:[],targetToken:void 0}}function za(e,t){return e.some(r=>r.chainId===t.chainId&&r.address.toLowerCase()===t.address.toLowerCase())}function ch(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 Ux(e,t){let r=ch(e),n=ch(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 ph(e,t=Zn){if(!e)return!0;let r=Ux(t,e);return r===null?!0:r>=0}var uh={swap:"swap",bridge:"bridge",transfer:"transferCrypto",stake:"stake"};function Vo(e,t){return t?.[uh[e]]??e!=="transfer"}function qo(e,t){return ph(t?.[uh[e]])}function Fa(e,t,r){return Vo(e,t)&&qo(e,r)}var fh={dev:"https://stg.oneusd.money/",stage:"https://stg.oneusd.money/",production:"https://www.oneusd.money/"};function mh(e){let t=e.trim().toLowerCase().replace(/\.$/,"");return t==="oneusd.money"||t.endsWith(".oneusd.money")}function gh(e,t){return e?.items?.find(({id:n,type:o})=>n.toLowerCase()==="oneusd"||o.toLowerCase()==="oneusd")?.url[t]}var qs=V(require("react"),1);var jx="contracts.json",Wx=/^0x[0-9a-fA-F]{40}$/;function hh(e){return typeof e=="string"&&Wx.test(e)?e:void 0}function Gx(e,t,r){let n=hh(r);if(n)return n;let o=e?.envToNetwork?.[t]??(t==="production"?"mainnet":"testnet"),a=e?.soneusd?.VAULT;return hh(typeof a=="string"?a:a?.[o])}function bh(e,t){let[r,n]=qs.useState(void 0);qs.useEffect(()=>{let a=!0;return n(void 0),xn(jx,e).then(i=>{a&&n(i)}),()=>{a=!1}},[e]);let o=Gx(r,e,t);return{loading:r===void 0&&!o,address:o}}var wh=(1n<<256n)-1n,zd=[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],Ys=[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"previewDeposit",stateMutability:"view",inputs:[{name:"assets",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"paused",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bool"}]},{type:"function",name:"deposit",stateMutability:"nonpayable",inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],outputs:[{name:"shares",type:"uint256"}]}];function Ua(e){if(typeof e=="bigint")return e;if(typeof e=="number"&&Number.isSafeInteger(e)||typeof e=="string"&&/^(0x[0-9a-fA-F]+|\d+)$/.test(e))return BigInt(e);throw new Error("Unexpected contract read result")}var Ks=V(require("react"),1);function yh(e){let[t,r]=Ks.useState(null);return Ks.useEffect(()=>{if(!e)return;let n=!0;return Pl().then(o=>{n&&r(o)}).catch(()=>{}),()=>{n=!1}},[e]),t}function xh(e,t){return t==="bridge"?!0:e==="bridge"||e==="bridge-swap"||e==="swap-bridge"}function Hx(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 _x(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function vh(e,t){return xh(e.pathType,t)?"Bridging":"Swapping"}function kh(e,t){let r=Hx(e.toAmount);if(xh(e.pathType,t)){let n=`arriving on ${_x(e.toToken.chainId)}`;return r?`${r} ${n}`:n}return r?`${r} Swapped`:"Transaction completed"}var Qt=require("react/jsx-runtime");function Rh(e){return(0,Qt.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,Qt.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 Ch(e){return(0,Qt.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[(0,Qt.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,Qt.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 Sh(e){return(0,Qt.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[(0,Qt.jsx)("rect",{x:"4",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,Qt.jsx)("rect",{x:"14",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,Qt.jsx)("rect",{x:"4",y:"14",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,Qt.jsx)("path",{d:"M14 14h2v2h-2zM18 18h2v2h-2z",fill:"currentColor"})]})}function Nh(e){return(0,Qt.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[(0,Qt.jsx)("ellipse",{cx:"12",cy:"6.5",rx:"7",ry:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),(0,Qt.jsx)("path",{d:"M5 6.5v4c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-4",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),(0,Qt.jsx)("path",{d:"M5 10.5v4c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-4",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),(0,Qt.jsx)("path",{d:"M5 14.5v3c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-3",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function Zs(e){return(0,Qt.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,Qt.jsx)("path",{d:"m9 6 6 6-6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Xs(e){return(0,Qt.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,Qt.jsx)("path",{d:"m6 6 12 12M18 6 6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}var Zt=V(require("react"),1);var Js=V(require("react"),1),Qx={dev:"https://stg-crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview",stage:"https://stg-crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview",production:"https://crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview"},Vx=6e4,Th=new Map,Fd=new Map;function qx(e){let t=Qx[e],r=Th.get(t);if(r&&r.expiresAt>Date.now())return Promise.resolve(r.value);let n=Fd.get(t);if(n)return n;let o=(async()=>{let a=await fetch(t,{cache:"no-store"});if(!a.ok)throw new Error(`Failed to fetch sONEUSD yield: ${a.status}`);let i=await a.json();if(i.code!==200)throw new Error(`sONEUSD yield API error: ${i.code}`);let s=i.data?.yield,l=s?.available&&Number.isFinite(s.apr_bps)&&Number.isFinite(s.apy_bps)?{aprBps:s.apr_bps,apyBps:s.apy_bps}:null;return Th.set(t,{value:l,expiresAt:Date.now()+Vx}),l})().finally(()=>{Fd.delete(t)});return Fd.set(t,o),o}function Ih(e){let t=Math.trunc(e/100),r=Math.abs(Math.trunc(e%100));return`${t}.${String(r).padStart(2,"0")}`}function Eh(e,t){let[r,n]=Js.useState(void 0);return Js.useEffect(()=>{if(!t)return;let o=!0;return qx(e).then(a=>{o&&n(a)}).catch(()=>{o&&n(null)}),()=>{o=!1}},[t,e]),r}var Ve=require("react/jsx-runtime"),yo="sONEUSD",Yx=300,$s=6,Ah=[25,50,75,100];function Mh(e,t){return t>=100?e:e*BigInt(t)/100n}function Lh(e){return e instanceof Error?e.message:typeof e=="string"?e:"Transaction failed"}function Kx(e,t){let r=e.replace(/[^\d.]/g,""),[n="",...o]=r.split(".");return o.length===0?n:`${n}.${o.join("").slice(0,t)}`}function Zx(e,t,r,n){let[o,a]=Zt.useState(null),[i,s]=Zt.useState(null),[l,d]=Zt.useState(0),p=Zt.useCallback(()=>d(g=>g+1),[]),{readContract:b}=e;return Zt.useEffect(()=>{if(!n){a(null);return}let g=!1;s(null);let h=n,x={chainId:t.chainId,address:t.address,abi:zd},y={chainId:t.chainId,address:r,abi:Ys};return Promise.all([b({...x,functionName:"balanceOf",args:[h]}),b({...x,functionName:"allowance",args:[h,r]}),b({...y,functionName:"balanceOf",args:[h]}),b({...y,functionName:"paused",args:[]})]).then(([u,c,w,m])=>{g||a({balance:Ua(u),allowance:Ua(c),shares:Ua(w),paused:m===!0})}).catch(u=>{g||s(Lh(u))}),()=>{g=!0}},[b,t.address,t.chainId,r,n,l]),{position:o,error:i,refetch:p}}function Xx(e,t,r,n){let[o,a]=Zt.useState(null);return Zt.useEffect(()=>{if(n===null){a(null);return}let i=!1,s=setTimeout(()=>{e({chainId:t.chainId,address:r,abi:Ys,functionName:"previewDeposit",args:[n]}).then(l=>{i||a(Ua(l))}).catch(()=>{i||a(null)})},Yx);return()=>{i=!0,clearTimeout(s)}},[n,e,t.chainId,r]),o}function Dh({env:e,walletAddress:t,walletChainId:r,token:n,vaultAddress:o,ports:a,locked:i,onRequestConnect:s,onBack:l,onClose:d,onSubmitted:p,onFailed:b}){let[g,h]=Zt.useState(""),[x,y]=Zt.useState("idle"),[u,c]=Zt.useState(null),w=Zt.useRef(!0);Zt.useEffect(()=>(w.current=!0,()=>{w.current=!1}),[]);let{position:m,error:v,refetch:R}=Zx(a,n,o,t),C=Eh(e,!0),T=Zt.useMemo(()=>g.trim()?Rn(g,n.decimals):null,[g,n.decimals]),S=T&&"value"in T?T.value:null,N=S!==null&&m!==null&&S>m.balance,I=T&&"error"in T?T.error:N?`Exceeds your ${n.symbol} balance.`:null,M=Xx(a.readContract,n,o,S!==null&&!N?S:null),O=x!=="idle",D=S!==null&&m!==null&&m.allowance<S,W=!O&&!i&&!!t&&m!==null&&!m.paused&&S!==null&&!N,A=Zt.useCallback(L=>{if(!m||O)return;let te=Mh(m.balance,L);h(te>0n?ln(te,n.decimals,n.decimals):""),c(null)},[O,m,n.decimals]),G=S!==null&&m!==null&&m.balance>0n?Ah.find(L=>Mh(m.balance,L)===S)??null:null,J=Zt.useCallback(async()=>{if(!W||!t||S===null||!m)return;let L=t;c(null);try{if(r!==void 0&&r!==n.chainId){if(!a.switchChain)throw new Error(`Switch your wallet to chain ${n.chainId} first.`);y("switching"),await a.switchChain(n.chainId)}if(m.allowance<S){y("approving");let ae=await a.writeContract({chainId:n.chainId,address:n.address,abi:zd,functionName:"approve",args:[o,wh]});if(a.waitForReceipt&&(y("confirming-approval"),(await a.waitForReceipt({chainId:n.chainId,hash:ae})).status!=="success"))throw new Error("Approval reverted.");if(!w.current)return;R()}y("staking");let te=await a.writeContract({chainId:n.chainId,address:o,abi:Ys,functionName:"deposit",args:[S,L]});if(!w.current)return;y("idle"),h(""),p({txHash:te,chainId:n.chainId,amount:S,amountText:ln(S,n.decimals,$s)})}catch(te){if(!w.current)return;let ae=Lh(te);y("idle"),c(ae),b(ae)}},[S,W,b,p,a,m,R,n.address,n.chainId,n.decimals,o,t,r]),ee=x==="switching"?"Switching network...":x==="approving"?`Approve ${n.symbol} in your wallet...`:x==="confirming-approval"?"Confirming approval...":x==="staking"?"Confirm in your wallet...":D?`Approve ${n.symbol}`:"Stake",re=u??I??v;return(0,Ve.jsxs)("div",{className:"gou-chooser-body gou-stake","data-busy":O?"true":"false",children:[(0,Ve.jsx)("button",{type:"button",className:"gou-close",onClick:d,disabled:O,"aria-label":"Close",children:(0,Ve.jsx)(Xs,{})}),(0,Ve.jsxs)("header",{className:"gou-intro gou-stake-header",children:[(0,Ve.jsx)("button",{type:"button",className:"gou-stake-back",onClick:l,disabled:O,"aria-label":"Back",children:(0,Ve.jsx)(Zs,{})}),(0,Ve.jsxs)("h2",{children:["Stake ",n.symbol]})]}),(0,Ve.jsxs)("form",{className:"gou-stake-form",onSubmit:L=>{L.preventDefault(),J()},children:[(0,Ve.jsxs)("div",{className:"gou-stake-row",children:[(0,Ve.jsx)("label",{htmlFor:"gou-stake-amount",children:"Amount"}),(0,Ve.jsxs)("span",{children:["Balance:"," ",(0,Ve.jsxs)("strong",{className:"gou-stake-balance",children:[m?ln(m.balance,n.decimals,$s):t?"\u2026":"0"," ",n.symbol]})]})]}),(0,Ve.jsxs)("div",{className:"gou-stake-input","data-invalid":re?"true":"false",children:[(0,Ve.jsx)("input",{id:"gou-stake-amount",type:"text",inputMode:"decimal",autoComplete:"off",placeholder:"0",value:g,disabled:O,onChange:L=>{h(Kx(L.target.value,n.decimals)),c(null)}}),(0,Ve.jsx)("span",{children:n.symbol})]}),(0,Ve.jsx)("div",{className:"gou-stake-quick",role:"group","aria-label":"Quick amount",children:Ah.map(L=>(0,Ve.jsx)("button",{type:"button","aria-pressed":G===L,disabled:O||!m||m.balance===0n,onClick:()=>A(L),"data-track":"stake_quick_amount","data-track-id":String(L),children:L>=100?"MAX":`${L}%`},L))}),re&&(0,Ve.jsx)("p",{className:"gou-stake-error",role:"alert",children:re}),(0,Ve.jsxs)("dl",{className:"gou-stake-estimate",children:[C&&(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)("dt",{title:"Annualized without compounding. Trailing 7-day vault yield.",children:"APR"}),(0,Ve.jsxs)("dd",{className:"gou-stake-apr",children:[Ih(C.aprBps),"%"]})]}),(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)("dt",{children:"You receive"}),(0,Ve.jsx)("dd",{children:M!==null?`\u2248 ${ln(M,n.decimals,$s)} ${yo}`:`0 ${yo}`})]}),(0,Ve.jsxs)("div",{children:[(0,Ve.jsxs)("dt",{children:["Your ",yo]}),(0,Ve.jsx)("dd",{className:"gou-stake-shares",children:m?`${ln(m.shares,n.decimals,$s)} ${yo}`:t?"\u2026":`0 ${yo}`})]})]}),m?.paused&&(0,Ve.jsx)("p",{className:"gou-stake-error",role:"alert",children:"Staking is paused right now. Try again later."}),t?(0,Ve.jsx)("button",{type:"submit",className:"gou-stake-submit",disabled:!W,"data-track":"stake_submit",children:ee}):(0,Ve.jsx)("button",{type:"button",className:"gou-stake-submit",onClick:s,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})]})]})}we(`.gou-fab{--gou-collapse-duration: .24s;--gou-collapse-ease: cubic-bezier(.32, .72, 0, 1);position:fixed;right:var(--gou-right, 2rem);bottom:calc(env(safe-area-inset-bottom,0px) + var(--gou-bottom, 2rem));z-index:var(--gou-z-index, 40);display:inline-flex;width:max-content;align-items:center;gap:8px;padding:4px 20px 4px 4px;border:0;border-radius:9999px;background:#fff;color:#121212;box-shadow:0 4px 20px #00000073;font:inherit;cursor:pointer;transition:gap var(--gou-collapse-duration) var(--gou-collapse-ease),padding var(--gou-collapse-duration) var(--gou-collapse-ease),transform .15s ease,background .15s ease;-webkit-tap-highlight-color:transparent}[data-theme=light] .gou-fab{background:#121212;color:#fff;box-shadow:0 4px 20px #00000040}.gou-fab:active:not(:disabled){transform:scale(.96)}.gou-fab:focus-visible{outline:3px solid #f3742e;outline-offset:3px}.gou-fab[data-icon-only=true]{gap:0;padding:0}.gou-fab:disabled{cursor:default}.gou-fab[data-trigger-mode=button]{position:relative;right:auto;bottom:auto;z-index:auto;vertical-align:middle}[data-gou-mode=button]{display:inline-block}.gou-fab-status{pointer-events:none;cursor:default}.gou-fab-icon-frame{position:relative;display:inline-flex;width:38px;height:38px;flex-shrink:0;border-radius:9999px;transition:width var(--gou-collapse-duration) var(--gou-collapse-ease),height var(--gou-collapse-duration) var(--gou-collapse-ease)}.gou-fab-icon{display:block;width:100%;height:100%;border-radius:inherit;object-fit:contain}.gou-fab[data-icon-only=true] .gou-fab-icon-frame{width:52px;height:52px}.gou-fab-progress-ring{position:absolute;inset:-2px;border:2px solid rgba(243,116,46,.25);border-top-color:#f3742e;border-radius:9999px;animation:gou-spin .9s linear infinite}.gou-fab-label{overflow:hidden;max-width:180px;opacity:1;font-size:14px;font-weight:600;line-height:1.5;white-space:nowrap;transition:max-width var(--gou-collapse-duration) var(--gou-collapse-ease),opacity calc(var(--gou-collapse-duration) * .6) var(--gou-collapse-ease)}.gou-fab[data-icon-only=true] .gou-fab-label{max-width:0;opacity:0}.gou-fab[data-tx-phase] .gou-fab-label{max-width:260px}.gou-fab-trigger-copy{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;line-height:1.25}.gou-fab-apr{color:var(--ds-system-orange-high, #ff7a3d);font-size:11px;font-weight:600;line-height:1.25}.gou-fab[data-tx-phase=success]{animation:gou-result-success 1.2s ease-out}.gou-fab[data-tx-phase=failure]{animation:gou-result-failure 1.2s ease-out}.gou-fab-dots>span{animation:gou-status-dot 1.4s ease-in-out infinite}.gou-fab-dots>span:nth-child(2){animation-delay:.2s}.gou-fab-dots>span:nth-child(3){animation-delay:.4s}.gou-tooltip{position:absolute;right:0;bottom:calc(100% + 8px);pointer-events:none;padding:6px 10px;border-radius:8px;background:#121212;color:#fff;box-shadow:0 8px 24px #0000002e;font-size:12px;font-weight:500;opacity:0;white-space:nowrap;transition:opacity .2s ease}[data-theme=dark] .gou-tooltip{background:#f5f5f5;color:#121212}.gou-fab:hover .gou-tooltip{opacity:1}.gou-shell{--ds-bg-default: #1c1c1d;--ds-bg-dim: #181819;--ds-surface-default: #1c1c1d;--ds-surface-medium: #212224;--ds-surface-high: rgba(255, 255, 255, .08);--ds-border-default: rgba(255, 255, 255, .1);--ds-content-highest: #ffffff;--ds-content-high: rgba(255, 255, 255, .85);--ds-content-medium: rgba(255, 255, 255, .65);--ds-content-low: rgba(255, 255, 255, .4);--ds-accent-primary-default: #f3742e;--ds-accent-primary-high: #f3742e;--ds-accent-primary-low: rgba(243, 116, 46, .1);--ds-accent-primary-on: #ffffff;--gou-bg: #1c1c1d;--gou-card: #212224;--gou-card-hover: rgba(255, 255, 255, .08);--gou-border: rgba(255, 255, 255, .1);--gou-text: #ffffff;--gou-muted: rgba(255, 255, 255, .65);background:var(--gou-bg);color:var(--gou-text)}.gou-shell[data-theme=light]{--ds-bg-default: #ffffff;--ds-bg-dim: #fafbfd;--ds-surface-default: #ffffff;--ds-surface-medium: rgba(0, 0, 0, .01);--ds-surface-high: rgba(0, 0, 0, .03);--ds-border-default: rgba(0, 0, 0, .06);--ds-content-highest: #000000;--ds-content-high: rgba(0, 0, 0, .85);--ds-content-medium: rgba(0, 0, 0, .65);--ds-content-low: rgba(0, 0, 0, .4);--gou-bg: #ffffff;--gou-card: #ffffff;--gou-card-hover: rgba(0, 0, 0, .03);--gou-border: rgba(0, 0, 0, .06);--gou-text: #000000;--gou-muted: rgba(0, 0, 0, .65)}.gou-chooser{overflow:hidden}.gou-chooser-body{position:relative;display:flex;flex-direction:column;gap:28px;padding:32px}.gou-close{position:absolute;top:24px;right:24px;display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;padding:0;border:0;border-radius:9999px;background:transparent;color:var(--gou-muted);cursor:pointer}.gou-close:hover{background:var(--gou-card-hover);color:var(--gou-text)}.gou-close svg{width:20px;height:20px}.gou-intro{display:flex;flex-direction:column;gap:6px;padding:0 32px 0 0;text-align:left}.gou-intro h2{margin:0;color:var(--gou-text);font-size:20px;font-weight:650;line-height:1.6}.gou-intro-link{display:inline-flex;width:fit-content;align-items:center;gap:4px;color:var(--ds-accent-primary-default, #f3742e);font-size:14px;font-weight:600;line-height:1.5;text-decoration:none}.gou-intro-link-icon{flex-shrink:0}.gou-intro-link>span{text-decoration:underline;text-underline-offset:3px}.gou-intro-link:focus-visible{outline:2px solid #f3742e;outline-offset:3px;border-radius:4px}.gou-actions{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}.gou-action{display:flex;width:100%;min-width:0;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--gou-border);border-radius:12px;background:var(--gou-card);color:var(--gou-text);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s ease,background .15s ease}.gou-action:hover:not(:disabled){border-color:#f3742e;background:var(--gou-card-hover)}.gou-action:disabled{cursor:not-allowed;opacity:.5}.gou-action:focus-visible{outline:2px solid #f3742e;outline-offset:2px}.gou-action-icon{display:inline-flex;width:32px;height:32px;flex-shrink:0;align-items:center;justify-content:center;border:1px solid var(--gou-border);border-radius:9px;color:var(--gou-text);transition:border-color .15s ease,color .15s ease}.gou-action:hover:not(:disabled) .gou-action-icon{border-color:var(--ds-accent-primary-default, #f3742e);color:var(--ds-accent-primary-default, #f3742e)}.gou-action-icon svg{width:17px;height:17px}.gou-action-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:2px}.gou-action-title{display:flex;min-width:0;align-items:center;gap:6px;font-size:16px;font-weight:650}.gou-action-description{color:var(--gou-muted);font-size:14px;line-height:1.45}.gou-action-chevron{width:18px;height:18px;flex-shrink:0;color:var(--gou-muted)}.gou-badge{flex-shrink:0;padding:2px 6px;border-radius:5px;background:#f3742e24;color:#f3742e;font-size:10px;font-weight:650}.gou-badge[data-tone=muted]{background:var(--gou-card-hover);color:var(--gou-muted)}.gou-stake-header{flex-direction:row;align-items:center;gap:8px}.gou-stake-estimate .gou-stake-apr{color:var(--ds-accent-primary-default, #f3742e)}.gou-stake-back{display:inline-flex;width:32px;height:32px;flex-shrink:0;align-items:center;justify-content:center;margin-left:-8px;padding:0;border:0;border-radius:9999px;background:transparent;color:var(--gou-muted);cursor:pointer}.gou-stake-back svg{width:20px;height:20px;transform:rotate(180deg)}.gou-stake-back:hover:not(:disabled){background:var(--gou-card-hover);color:var(--gou-text)}.gou-stake-back:disabled,.gou-stake[data-busy=true] .gou-close{cursor:default;opacity:.4}.gou-stake-form{display:flex;flex-direction:column;gap:12px}.gou-stake-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px;color:var(--gou-muted);font-size:13px}.gou-stake-row label{font-weight:600}.gou-stake-balance{color:var(--gou-text);font-weight:600}.gou-stake-quick{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.gou-stake-quick button{height:32px;padding:0;border:1px solid var(--gou-border);border-radius:8px;background:transparent;color:var(--gou-muted);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:border-color .15s ease,color .15s ease}.gou-stake-quick button:hover:not(:disabled){border-color:var(--ds-accent-primary-default, #f3742e);color:var(--gou-text)}.gou-stake-quick button[aria-pressed=true]{border-color:var(--ds-accent-primary-default, #f3742e);background:var(--ds-accent-primary-low, rgba(243, 116, 46, .1));color:var(--ds-accent-primary-default, #f3742e)}.gou-stake-quick button:disabled{cursor:default;opacity:.4}.gou-stake-input{display:flex;align-items:center;gap:8px;padding:0 14px;border:1px solid var(--gou-border);border-radius:12px;background:var(--gou-card);transition:border-color .15s ease}.gou-stake-input:focus-within{border-color:var(--ds-accent-primary-default, #f3742e)}.gou-stake-input[data-invalid=true]{border-color:var(--ds-status-error-default, #ff3c53)}.gou-stake-input input{min-width:0;flex:1;height:48px;border:0;background:transparent;color:var(--gou-text);font:inherit;font-size:18px;font-weight:650;outline:none}.gou-stake-input input::placeholder{color:var(--ds-content-low)}.gou-stake-input input:disabled{opacity:.6}.gou-stake-input>span{flex-shrink:0;color:var(--gou-muted);font-size:14px;font-weight:600}.gou-stake-error{margin:0;color:var(--ds-status-error-default, #ff3c53);font-size:13px;line-height:1.45}.gou-stake-estimate{display:flex;flex-direction:column;gap:8px;margin:0;padding:12px 14px;border:1px solid var(--gou-border);border-radius:12px;color:var(--gou-muted);font-size:14px}.gou-stake-estimate>div{display:flex;justify-content:space-between;gap:8px}.gou-stake-estimate dd{margin:0;color:var(--gou-text);font-weight:600}.gou-stake-estimate .gou-stake-shares{color:var(--gou-muted);font-weight:500}.gou-stake-submit{width:100%;margin-top:4px;padding:14px 16px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #f3742e);color:var(--ds-accent-primary-on, #ffffff);font:inherit;font-size:16px;font-weight:650;cursor:pointer}.gou-stake-submit:disabled{cursor:not-allowed;opacity:.45}.gou-stake-submit:focus-visible{outline:2px solid #f3742e;outline-offset:2px}.gou-execution{height:auto;max-height:90dvh;overflow:hidden}.gou-execution .bf-root{width:100%;max-height:90dvh}.gou-connect-required,.gou-route-state{display:flex;min-height:360px;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px;text-align:center}.gou-connect-required h3,.gou-route-state h3{margin:0;color:var(--gou-text);font-size:18px}.gou-connect-required p,.gou-route-state p{max-width:320px;margin:0;color:var(--gou-muted);font-size:14px;line-height:1.5}.gou-lock{font-size:28px}.gou-connect-required button{width:100%;max-width:320px;margin-top:10px;padding:12px 16px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #00ceb2);color:var(--ds-accent-primary-on, #001b18);font:inherit;font-size:16px;font-weight:650;cursor:pointer}.gou-spinner{width:28px;height:28px;border:3px solid var(--gou-border);border-top-color:var(--ds-accent-primary-default, #00ceb2);border-radius:9999px;animation:gou-spin .8s linear infinite}@keyframes gou-spin{to{transform:rotate(360deg)}}@keyframes gou-status-dot{0%,60%,to{opacity:.2}30%{opacity:1}}@keyframes gou-result-success{0%{outline:0 solid rgba(30,202,119,0)}30%{outline:3px solid rgba(30,202,119,.75)}to{outline:0 solid rgba(30,202,119,0)}}@keyframes gou-result-failure{0%{outline:0 solid rgba(255,60,83,0)}30%{outline:3px solid rgba(255,60,83,.75)}to{outline:0 solid rgba(255,60,83,0)}}@media(max-width:767px){.gou-fab{right:var(--gou-right-mobile, 1rem)}.gou-fab-icon-frame{width:32px;height:32px}.gou-fab[data-icon-only=true] .gou-fab-icon-frame{width:40px;height:40px}.gou-chooser-body{padding:24px 16px 28px}.gou-close{top:16px;right:16px}.gou-execution{height:auto;max-height:70dvh}.gou-execution .bf-root{max-height:calc(70dvh - 24px)}}@media(prefers-reduced-motion:reduce){.gou-fab,.gou-fab-icon-frame,.gou-fab-label,.gou-tooltip{transition:none}.gou-spinner,.gou-fab-progress-ring{animation-duration:1.6s}.gou-fab[data-tx-phase=success],.gou-fab[data-tx-phase=failure],.gou-fab-dots>span{animation:none}}
|
|
21
|
-
`);var se=require("react/jsx-runtime"),Jx=[{id:"swap",label:"Swap",eta:"Instant",Icon:Rh},{id:"bridge",label:"Bridge",Icon:Ch},{id:"transfer",label:"Transfer Crypto",eta:"QR deposit",Icon:Sh},{id:"stake",label:"Stake",eta:"Earn yield",Icon:Nh}],$x=4e3;function Ph(e){return e instanceof Error?e.message:typeof e=="string"?e:"Unknown error"}function el(e,t){try{e?.(t)}catch{}}function ev({compactTrigger:e,collapseOnScroll:t,scrollThreshold:r}){let[n,o]=qe.useState(!1);return qe.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 p=()=>{l=0;let g=d?window.scrollY>s:window.scrollY>i;g!==d&&(d=g,o(g))},b=()=>{l||(l=requestAnimationFrame(p))};return window.addEventListener("scroll",b,{passive:!0}),()=>{l&&cancelAnimationFrame(l),window.removeEventListener("scroll",b)}},[t,r]),!!(e||n)}function Oh({loading:e}){return(0,se.jsxs)("div",{className:"gou-route-state",role:"status",children:[e&&(0,se.jsx)("span",{className:"gou-spinner","aria-hidden":"true"}),(0,se.jsx)("h3",{children:e?"Preparing route":"Route unavailable"}),(0,se.jsx)("p",{children:e?"Loading token and contract configuration.":"The configured ONEUSD route is not available in this environment."})]})}function Ud({walletAddress:e,tokens:t,pairs:r,loading:n=!1,bridge:o,relay:a,stake:i,env:s,targetSymbol:l,relayTargetSymbol:d="ONEUSD",targetIconUrl:p,mode:b="floating",buttonComponent:g,theme:h="dark",mobileBreakpoint:x=768,drawerDirection:y="bottom",dialogWidth:u="560px",drawerMaxWidth:c,drawerMinWidth:w,style:m,className:v,contentClassName:R,hidden:C=!1,compactTrigger:T,collapseOnScroll:S=!0,scrollThreshold:N=200,waitForTransaction:I,transactionResultDurationMs:M=$x,onRequestConnect:O,onEvent:D}){let[W,A]=qe.useState(!1),[G,J]=qe.useState(null),[ee,re]=qe.useState(!1),[L,te]=qe.useState(null),[ae,F]=qe.useState(!1),ne=qe.useRef(0),$=qe.useRef(!1),ye=qe.useRef(null),ve=qe.useRef(!0),Be=ev({compactTrigger:T,collapseOnScroll:S,scrollThreshold:N}),he=qe.useMemo(()=>it(s),[s]),Re=qt("apps.json",he,z=>z?.getOneUsd?.modes),Ce=qt("apps.json",he,z=>z?.getOneUsd?.minVersions),Ae=qt("app-launcher-v2.json",he,z=>gh(z,he))??fh[he],Qe=qe.useMemo(()=>Qo(t,r,"swap"),[r,t]),ut=qe.useMemo(()=>Qo(t,r,"bridge"),[r,t]),Fe=Qe.targetToken??ut.targetToken,Ye=i?.readContract??a?.readContract,We=i?.writeContract??a?.writeContract,Lt=i?.switchChain??a?.switchChain,Xt=i?.waitForReceipt??a?.waitForReceipt,ft=qe.useMemo(()=>Ye&&We?{readContract:Ye,writeContract:We,switchChain:Lt,waitForReceipt:Xt}:null,[Ye,Lt,Xt,We]),{address:Dt,loading:bt}=bh(he,i?.vaultAddress),kt=!!(ft&&Dt&&Fe),It=qe.useMemo(()=>Jx.filter(({id:z})=>Vo(z,Re)),[Re]),Rt=It.length>0,Et=yh(!C&&Rt),nt=l??Fe?.symbol??"ONEUSD",ir=p??Fe?.iconUrl??hd,zt=b==="floating"&&Be,sr=b==="button"&&g?g:"button";qe.useEffect(()=>(ve.current=!0,()=>{ve.current=!1,ye.current&&clearTimeout(ye.current)}),[]),qe.useEffect(()=>{F(!mh(window.location.hostname))},[]),qe.useEffect(()=>{Rt||A(!1)},[Rt]);let Ke=qe.useCallback(z=>D?.(z),[D]),wt=qe.useCallback(()=>{L||!Rt||(Ke({name:"fab_click",state:zt?"icon_only":"expanded"}),A(!0))},[Ke,Rt,L,zt]),Ze=qe.useCallback(z=>{L||!Fa(z,Re,Ce)||z==="stake"&&!kt||(Ke({name:"action_select",action:z}),A(!1),z==="transfer"&&re(!0),J(z))},[Ke,Re,Ce,kt,L]),ot=qe.useCallback(z=>{Ke({name:"connect_click",action:z}),Promise.resolve(O?.()).catch(De=>{Ke({name:"failure",action:z,message:Ph(De)})})},[Ke,O]),lt=G==="swap"||G==="bridge"?G:null,Ge=lt==="swap"?Qe:ut,Ct=!!(r&&Ge.targetToken&&Ge.fromTokens.length>0),lr=qe.useMemo(()=>{if(!Ge.targetToken)return;let z=Ge.targetToken;return De=>{let tt=o.getToTokens?.(De,t);return tt&&!za(tt,z)?[]:[z]}},[o.getToTokens,Ge.targetToken,t]),{onSubmitted:tr,onSuccess:St,onFailed:Q,...be}=o,{onDeposited:Te,onError:Se,...Xe}=a??{},Jt=qe.useCallback((z,De,tt,K,Ie)=>{!ve.current||ne.current!==z||(te({id:z,phase:De,action:tt,label:K,txHash:Ie}),ye.current&&clearTimeout(ye.current),ye.current=setTimeout(()=>{!ve.current||ne.current!==z||($.current=!1,te(null),ye.current=null)},Math.max(0,M)))},[M]),Pt=qe.useCallback(z=>{if($.current)return!1;$.current=!0;let{action:De,txHash:tt,pendingLabel:K,successNote:Ie,wait:j,onFailed:Me}=z,Z=++ne.current;return te({id:Z,phase:"pending",action:De,label:K,txHash:tt}),A(!1),J(null),Promise.resolve().then(j).then(()=>{!ve.current||ne.current!==Z||(Jt(Z,"success",De,Ie,tt),Ke({name:"success",action:De,txHash:tt}))}).catch(He=>{if(!ve.current||ne.current!==Z)return;let gr=Ph(He);Jt(Z,"failure",De,"Transaction failed",tt),Me?.(gr),Ke({name:"failure",action:De,message:gr})}),!0},[Ke,Jt]),Ft=qe.useCallback((z,De)=>{Pt({action:De,txHash:z.txHash,pendingLabel:vh(z,De),successNote:kh(z,De),wait:async()=>{await I?.(z)},onFailed:K=>el(Q,{message:K,txHash:z.txHash})})&&el(tr,z)},[Q,tr,Pt,I]),mr=qe.useCallback(z=>{let De=ft?.waitForReceipt;Pt({action:"stake",txHash:z.txHash,pendingLabel:"Staking",successNote:`${z.amountText} ${Fe?.symbol??"ONEUSD"} staked`,wait:async()=>{if(!De)return;if((await De({chainId:z.chainId,hash:z.txHash})).status!=="success")throw new Error("Transaction reverted.")}})},[ft,Fe?.symbol,Pt]);return(0,se.jsx)(Le,{feature:"get_one_usd",children:(0,se.jsxs)("div",{className:v,"data-theme":h,"data-gou-mode":b,children:[(0,se.jsxs)(gn,{theme:h,mobileBreakpoint:x,drawerDirection:y,dialogWidth:u,drawerMaxWidth:c,drawerMinWidth:w,open:W,onOpenChange:A,children:[!C&&Rt&&(b==="button"||!L)&&(0,se.jsxs)(sr,{type:"button",className:"gou-fab",style:m,"data-trigger-mode":b,"data-icon-only":zt?"true":"false",onClick:wt,disabled:!!L,"aria-label":`Get ${nt}`,"data-track":"fab_click",children:[b==="floating"&&(0,se.jsxs)("span",{className:"gou-tooltip",children:["Choose how to get ",nt]}),(0,se.jsx)("span",{className:"gou-fab-icon-frame",children:(0,se.jsx)("img",{className:"gou-fab-icon",src:ir,alt:""})}),(0,se.jsxs)("span",{className:"gou-fab-label gou-fab-trigger-copy",children:[(0,se.jsxs)("span",{children:["Get ",nt]}),Et!==null&&(0,se.jsx)("span",{className:"gou-fab-apr",children:Ui(Et)})]})]}),L&&(0,se.jsxs)("div",{className:"gou-fab gou-fab-status",style:b==="floating"?m:void 0,"data-floating-status":"true","data-icon-only":"false","data-tx-phase":L.phase,role:"status","aria-live":"polite","aria-label":L.phase==="pending"?`${L.label} transaction in progress`:L.label,children:[(0,se.jsxs)("span",{className:"gou-fab-icon-frame",children:[(0,se.jsx)("img",{className:"gou-fab-icon",src:ir,alt:""}),L.phase==="pending"&&(0,se.jsx)("span",{className:"gou-fab-progress-ring","aria-hidden":"true"})]}),(0,se.jsx)("span",{className:"gou-fab-label",children:L.phase==="pending"?(0,se.jsxs)(se.Fragment,{children:[L.label,(0,se.jsxs)("span",{className:"gou-fab-dots","aria-hidden":"true",children:[(0,se.jsx)("span",{children:"."}),(0,se.jsx)("span",{children:"."}),(0,se.jsx)("span",{children:"."})]})]}):L.label})]}),(0,se.jsx)(hn,{ariaTitle:`Get ${nt}`,className:`gou-shell gou-chooser ${R??""}`,children:(0,se.jsxs)("div",{className:"gou-chooser-body",children:[(0,se.jsx)("button",{type:"button",className:"gou-close",onClick:()=>A(!1),"aria-label":"Close",children:(0,se.jsx)(Xs,{})}),(0,se.jsxs)("header",{className:"gou-intro",children:[(0,se.jsxs)("h2",{children:["Get ",nt]}),ae&&(0,se.jsxs)("a",{className:"gou-intro-link",href:Ae,target:"_blank",rel:"noopener noreferrer","aria-label":"What is ONEUSD? Opens in a new tab","data-track":"oneusd_learn_more",children:[(0,se.jsx)(Tu,{size:16,className:"gou-intro-link-icon"}),(0,se.jsx)("span",{children:"What is ONEUSD?"})]})]}),(0,se.jsx)("ul",{className:"gou-actions",children:It.map(({id:z,label:De,eta:tt,Icon:K})=>{let Ie=z==="swap"?`Swap the ${Qe.fromTokens[0]?.symbol??"ONE"} you already hold`:z==="bridge"?`Bridge USDT to ${nt}`:z==="stake"?`Deposit ${nt} to receive ${yo}`:"Deposit from any chain or exchange",j=z==="swap"?r?.swap.feeDelegated:z==="bridge"?r?.bridge.feeDelegated:!1,Me=qo(z,Ce),Z=z==="stake"&&bt,He=z==="stake"&&Me&&!Z&&!kt,gr=Me&&!He&&!Z;return(0,se.jsx)("li",{children:(0,se.jsxs)("button",{type:"button",className:"gou-action",onClick:()=>Ze(z),disabled:!gr,"data-supported":gr?"true":"false","data-track":"action_select","data-track-id":z,children:[(0,se.jsx)("span",{className:"gou-action-icon",children:(0,se.jsx)(K,{})}),(0,se.jsxs)("span",{className:"gou-action-copy",children:[(0,se.jsxs)("span",{className:"gou-action-title",children:[(0,se.jsx)("span",{children:De}),j&&gr&&(0,se.jsx)("span",{className:"gou-badge",children:"Fee Delegated"}),!Me&&(0,se.jsx)("span",{className:"gou-badge","data-tone":"muted",children:"Update required"}),He&&(0,se.jsx)("span",{className:"gou-badge","data-tone":"muted",children:"Coming soon"})]}),(0,se.jsx)("span",{className:"gou-action-description",children:Me?He?"Staking is not available in this environment yet":tt?`${Ie} \xB7 ${tt}`:Ie:"Update the app to use this option"})]}),(0,se.jsx)(Zs,{className:"gou-action-chevron"})]})},z)})})]})})]}),(0,se.jsx)(gn,{theme:h,mobileBreakpoint:x,drawerDirection:y,dialogWidth:u,drawerMaxWidth:c,drawerMinWidth:w,open:!!lt,onOpenChange:z=>{z||J(null)},children:(0,se.jsx)(hn,{ariaTitle:`${lt==="bridge"?"Bridge":"Swap"} to ${nt}`,className:`gou-shell gou-execution ${R??""}`,children:Ct?(0,se.jsx)(co,{...be,env:s,variant:"embedded",title:lt==="bridge"?"Bridge":"Swap",feeDelegated:r?.swap.feeDelegated,walletAddress:e??"",isConnected:!!e,onRequestConnect:()=>ot(lt??"swap"),tokens:Ge.fromTokens,initialFromToken:Ge.fromTokens[0],initialToToken:Ge.targetToken,getToTokens:lr,onClose:()=>J(null),onBackToWallet:()=>{J(null),A(!0)},onSubmitted:z=>{Ft(z,lt??"swap")},onSuccess:z=>{el(St,z)},onFailed:z=>{el(Q,z),Ke({name:"failure",action:lt??"swap",message:z.message})}},`${lt}:${Ge.fromTokens.map(z=>`${z.chainId}:${z.address}`).join(",")}`):(0,se.jsx)(Oh,{loading:n||!r})})}),(0,se.jsx)(gn,{theme:h,mobileBreakpoint:x,drawerDirection:y,dialogWidth:u,drawerMaxWidth:c,drawerMinWidth:w,open:G==="stake",onOpenChange:z=>{z||J(null)},children:(0,se.jsx)(hn,{ariaTitle:`Stake ${nt}`,className:`gou-shell gou-chooser ${R??""}`,children:G==="stake"&&ft&&Dt&&Fe?(0,se.jsx)(Dh,{env:he,walletAddress:e,walletChainId:i?.walletChainId??a?.walletChainId,token:Fe,vaultAddress:Dt,ports:ft,locked:!!L,onRequestConnect:()=>ot("stake"),onBack:()=>{J(null),A(!0)},onClose:()=>J(null),onSubmitted:mr,onFailed:z=>Ke({name:"failure",action:"stake",message:z})}):(0,se.jsx)(Oh,{loading:n||!r})})}),ee&&(0,se.jsx)(_o,{...Xe,environment:Xe.environment??s,theme:Xe.theme??h,mobileBreakpoint:Xe.mobileBreakpoint??x,drawerDirection:Xe.drawerDirection??y,dialogWidth:Xe.dialogWidth??u,drawerMaxWidth:Xe.drawerMaxWidth??c,drawerMinWidth:Xe.drawerMinWidth??w,walletAddress:e,open:G==="transfer",onOpenChange:z=>{z||J(null)},requireWalletConnection:!0,showRecovery:Xe.showRecovery??!0,showRecipientInput:!1,hideAmount:!0,targetTokens:[d],defaultTarget:d,onRequestConnect:()=>ot("transfer"),onDeposited:z=>{Te?.(z),Ke({name:"success",action:"transfer",txHash:z})},onError:z=>{Se?.(z),Ke({name:"failure",action:"transfer",message:z.message})},children:(0,se.jsx)(_o.Content,{})})]})})}var yn=V(require("react"),1),Qh=V(require("@radix-ui/react-dialog"),1),Vh=require("vaul");var tl=require("react"),rl=(0,tl.createContext)(null);function ja(){let e=(0,tl.useContext)(rl);if(!e)throw new Error("WalletConnectModal compound components must be used within <WalletConnectModal>");return e}var xo=require("react");function Wa(){let[e,t]=(0,xo.useState)([]),[r,n]=(0,xo.useState)(!0);(0,xo.useEffect)(()=>{if(typeof window>"u"){n(!1);return}let a=[],i=l=>{let{info:d}=l.detail;d?.rdns&&!a.some(p=>p.rdns===d.rdns)&&(a.push({rdns:d.rdns,name:d.name,icon:d.icon}),t([...a]))};window.addEventListener("eip6963:announceProvider",i),window.addEventListener("eip6963:crossAnnounceProvider",i),window.dispatchEvent(new Event("eip6963:requestProvider")),window.dispatchEvent(new Event("eip6963:crossRequestProvider"));let s=setTimeout(()=>n(!1),500);return()=>{window.removeEventListener("eip6963:announceProvider",i),window.removeEventListener("eip6963:crossAnnounceProvider",i),clearTimeout(s)}},[]);let o=(0,xo.useCallback)(a=>e.some(i=>i.rdns===a),[e]);return{wallets:e,isDetected:o,isLoading:r}}var Bh=V(require("@radix-ui/react-dialog"),1),zh=require("vaul");var nl=require("react/jsx-runtime");function Fh({asChild:e,children:t}){let{isMobile:r}=ja(),n=r?zh.Drawer.Trigger:Bh.Trigger;return(0,nl.jsx)(Le,{feature:"wallet_connect",children:(0,nl.jsx)(n,{asChild:e??t!=null,children:t??(0,nl.jsx)("button",{type:"button","data-track":"open",children:"Connect Wallet"})})})}var Gh=require("react"),Hh=require("@nexus-cross/crossx-design-system"),wn=V(require("@radix-ui/react-dialog"),1),Ga=require("vaul");var le=require("react/jsx-runtime");function Uh(e,t){$e("connect","wallet_selected",{tags:{item_id:e}}),bu(e);let r=t?.();r instanceof Promise&&r.then(()=>$e("connect","connected"),n=>$e("connect","connected",{status:"failure",reason:Rr(n)}))}function tv({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,le.jsxs)("button",{type:"button",className:Pe("wcm-wallet-item",a&&"wcm-wallet-item--featured"),"data-track":"wallet_item_click","data-track-id":e.id,onClick:n,children:[(0,le.jsxs)("div",{className:"wcm-wallet-item-left",children:[(0,le.jsx)("div",{className:"wcm-wallet-icon",children:(0,le.jsx)(o,{})}),(0,le.jsxs)("div",{className:"wcm-wallet-name-row",children:[(0,le.jsx)("span",{className:"wcm-wallet-name",children:e.name}),e.badge&&(0,le.jsx)("span",{className:"wcm-wallet-badge",children:e.badge})]})]}),e.installUrl&&(t?(0,le.jsx)("span",{className:"wcm-installed-label",children:"Installed"}):(0,le.jsx)("span",{className:"wcm-install-btn",children:"Install"}))]})}function rv({social:e,onSignIn:t}){let r=e.icon,n=`Sign in with ${e.name}`;return(0,le.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,le.jsx)("span",{className:"wcm-social-icon",children:(0,le.jsx)(r,{})}),(0,le.jsx)("span",{className:"wcm-social-name",children:n})]})}function jh(){let{wallets:e,activeWalletIds:t,socialProviders:r,activeSocialIds:n,termsUrl:o,privacyUrl:a,isDetected:i,close:s,isMobile:l}=ja(),d=t.filter(g=>{let h=Fl(g).visibility;return!h||h==="always"?!0:h==="desktop-only"?!l:h==="mobile-only"?l:!0}),p=n.length>0,b=d.length>0;return(0,le.jsxs)(le.Fragment,{children:[(0,le.jsxs)("div",{className:"wcm-header",children:[(0,le.jsxs)("div",{className:"wcm-header-text",children:[(0,le.jsx)("h2",{className:"wcm-title",children:Hh.WALLET_LABELS.default}),!l&&(0,le.jsx)("p",{className:"wcm-subtitle",children:"Sign in instantly with your social account"})]}),(0,le.jsx)("button",{type:"button",className:"wcm-close-btn","data-track":"close",onClick:s,"aria-label":"Close",children:(0,le.jsx)(fu,{})})]}),(0,le.jsxs)("div",{className:"wcm-body",children:[p&&(0,le.jsxs)(le.Fragment,{children:[!l&&(0,le.jsxs)("div",{className:"wcm-section-header",children:[(0,le.jsx)("span",{className:"wcm-section-title",children:"Social Account Wallet Connect"}),(0,le.jsx)("span",{className:"wcm-recommended-badge",children:"Recommended"})]}),(0,le.jsx)("div",{className:"wcm-social-grid",children:n.map(g=>{let h=mu(g);return(0,le.jsx)(rv,{social:h,onSignIn:()=>{Uh(g,r[g]),s()}},g)})}),b&&(0,le.jsxs)("div",{className:"wcm-separator",children:[(0,le.jsx)("div",{className:"wcm-separator-line"}),(0,le.jsx)("span",{className:"wcm-separator-text",children:"Other Wallets"}),(0,le.jsx)("div",{className:"wcm-separator-line"})]})]}),b&&(0,le.jsx)("div",{className:"wcm-wallet-list",children:d.map(g=>{let h=Fl(g),x=h.rdns?i(h.rdns):!1;return(0,le.jsx)(tv,{wallet:h,detected:x,onConnect:()=>{Uh(g,e[g]),s()}},g)})}),(0,le.jsxs)("p",{className:"wcm-terms",children:["By continuing, you agree to NEXUS"," ",(0,le.jsx)(Wh,{href:o,track:"terms_link",children:"Terms of Service"})," ","and consent to its"," ",(0,le.jsx)(Wh,{href:a,track:"privacy_link",children:"Privacy Policy"}),"."]})]})]})}function Wh({href:e,track:t,children:r}){return e?(0,le.jsx)("a",{className:"wcm-terms-link",href:e,target:"_blank",rel:"noopener noreferrer","data-track":t,children:r}):(0,le.jsx)("span",{className:"wcm-terms-link",children:r})}function _h({className:e}){let{isMobile:t,theme:r,portalStyle:n,open:o}=ja();return(0,Gh.useEffect)(()=>{o&&$e("connect","opened")},[o]),t?(0,le.jsx)(Le,{feature:"wallet_connect",children:(0,le.jsxs)(Ga.Drawer.Portal,{children:[(0,le.jsx)(Ga.Drawer.Overlay,{className:"wcm-overlay"}),(0,le.jsxs)(Ga.Drawer.Content,{className:Pe("wcm-drawer-content",e),"data-theme":r,style:n,children:[(0,le.jsx)(Ga.Drawer.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),(0,le.jsx)("div",{className:"wcm-drawer-handle"}),(0,le.jsx)("div",{className:"wcm-drawer-body",children:(0,le.jsx)(jh,{})})]})]})}):(0,le.jsx)(Le,{feature:"wallet_connect",children:(0,le.jsxs)(wn.Portal,{children:[(0,le.jsx)(wn.Overlay,{className:"wcm-overlay"}),(0,le.jsxs)(wn.Content,{className:Pe("wcm-dialog-content",e),"data-theme":r,style:n,children:[(0,le.jsx)(wn.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),(0,le.jsx)(wn.Description,{className:"wcm-sr-only",children:"Sign in with a social provider or pick a wallet to connect."}),(0,le.jsx)("div",{className:"wcm-dialog-body",children:(0,le.jsx)(jh,{})})]})]})})}we(`.wcm-overlay{position:fixed;inset:0;z-index:100000;background:var(--ds-overlay-dim, rgba(0, 0, 0, .5));-webkit-backdrop-filter:var(--ds-bg-blur-7, blur(3.5px));backdrop-filter:var(--ds-bg-blur-7, blur(3.5px))}.wcm-dialog-content{-webkit-font-smoothing:antialiased;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:100001;width:var(--wcm-dialog-width, 480px);max-height:90vh;overflow:hidden;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-radius:24px;box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));outline:none;animation:wcm-dialog-show .2s ease-out;font-family:inherit}.wcm-dialog-content[data-state=closed]{animation:wcm-dialog-hide .15s ease-in}.wcm-dialog-body,.wcm-drawer-body{scrollbar-width:thin;scrollbar-color:var(--ds-border-medium, rgba(0, 0, 0, .18)) transparent}.wcm-dialog-body::-webkit-scrollbar,.wcm-drawer-body::-webkit-scrollbar{width:4px}.wcm-dialog-body::-webkit-scrollbar-track,.wcm-drawer-body::-webkit-scrollbar-track{background:transparent}.wcm-dialog-body::-webkit-scrollbar-thumb,.wcm-drawer-body::-webkit-scrollbar-thumb{background:var(--ds-border-medium, rgba(0, 0, 0, .18));border-radius:4px}.wcm-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;bottom:0;left:0;right:0;z-index:100001;width:100%;max-width:var(--wcm-drawer-max-width, none);min-width:var(--wcm-drawer-min-width, 0);max-height:85dvh;margin:0 auto;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-top-left-radius:16px;border-top-right-radius:16px;outline:none;font-family:inherit;box-sizing:border-box}.wcm-drawer-content[data-vaul-drawer-direction=right]{inset:0 0 0 auto;max-height:100vh;width:var(--wcm-drawer-max-width, 400px);max-width:100vw;border-radius:16px 0 0 16px}.wcm-drawer-content[data-vaul-drawer-direction=left]{inset:0 auto 0 0;max-height:100vh;width:var(--wcm-drawer-max-width, 400px);max-width:100vw;border-radius:0 16px 16px 0}.wcm-drawer-content[data-vaul-drawer-direction=top]{inset:0 0 auto;border-radius:0 0 16px 16px}.wcm-drawer-handle{width:60px;height:4px;border-radius:999px;background:var(--ds-border-medium, rgba(0, 0, 0, .18));margin:12px auto 8px;flex-shrink:0}.wcm-drawer-content[data-vaul-drawer-direction=left] .wcm-drawer-handle,.wcm-drawer-content[data-vaul-drawer-direction=right] .wcm-drawer-handle{display:none}.wcm-dialog-body,.wcm-drawer-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.wcm-drawer-body{overscroll-behavior:contain}.wcm-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wcm-header-text{display:flex;flex-direction:column;gap:4px;min-width:0}.wcm-title{font-family:Inter,sans-serif;font-weight:600;font-size:20px;line-height:1.25;letter-spacing:0;color:var(--ds-content-highest, #000000);margin:0}.wcm-subtitle{font-family:Inter,sans-serif;font-weight:400;font-size:14px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));margin:0}.wcm-close-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;border:none;background:transparent;color:var(--ds-content-low, #00000066);cursor:pointer;padding:0;transition:opacity .15s ease}.wcm-close-btn:hover{opacity:.6}.wcm-close-btn>svg{width:24px;height:24px}.wcm-divider{display:none}.wcm-body{display:flex;flex-direction:column;gap:16px;padding:24px}.wcm-section-header{display:flex;align-items:center;gap:8px;width:100%}.wcm-section-title{font-family:Inter,sans-serif;font-weight:600;font-size:16px;line-height:1;letter-spacing:0;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wcm-recommended-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:var(--ds-accent-primary-low, #fff5ee);border-radius:9999px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-accent-primary-high, #f0640d);white-space:nowrap}.wcm-social-grid{display:grid;gap:8px;width:100%}.wcm-dialog-body .wcm-social-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wcm-drawer-body .wcm-social-grid{grid-template-columns:1fr}.wcm-social-item{display:flex;background:var(--ds-surface-medium, #f5f7fa);border:none;border-radius:12px;cursor:pointer;transition:none;font-family:inherit;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wcm-social-item:hover{background:#2e3544!important}:root[data-ds-theme=light] .wcm-social-item:hover{background:#eff3f8!important}.wcm-social-item[data-provider=apple] .wcm-social-icon{color:#000}[data-theme=dark] .wcm-social-item[data-provider=apple] .wcm-social-icon{color:#fff}.wcm-dialog-body .wcm-social-item{flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:16px}.wcm-drawer-body .wcm-social-item{flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;padding:16px}.wcm-social-icon{flex-shrink:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center}.wcm-social-icon>svg{width:32px;height:32px}.wcm-social-name{font-family:Inter,sans-serif;font-weight:600;font-size:14px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wcm-separator{display:flex;align-items:center;gap:12px;width:100%}.wcm-separator-line{flex:1;height:1px;background:var(--ds-border-default, rgba(0, 0, 0, .07))}.wcm-separator-text{font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wcm-wallet-list{display:flex;flex-direction:column;gap:8px}.wcm-wallet-item{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:20px 16px;background:var(--ds-surface-medium, #f5f7fa);border:none;border-radius:12px;cursor:pointer;text-align:left;transition:none;font-family:inherit}.wcm-wallet-item:hover{background:#2e3544!important}:root[data-ds-theme=light] .wcm-wallet-item:hover{background:#eff3f8!important}.wcm-wallet-item-left{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.wcm-wallet-icon{flex-shrink:0;width:28px;height:28px;display:flex;align-items:center;justify-content:center}.wcm-wallet-icon>svg,.wcm-wallet-icon>img{width:28px;height:28px;border-radius:0;object-fit:cover}.wcm-wallet-name-row{display:flex;align-items:center;gap:8px;min-width:0}.wcm-wallet-name{font-family:Inter,sans-serif;font-weight:600;font-size:16px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wcm-wallet-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:var(--ds-system-purple-low, #f5f3ff);border:.5px solid var(--ds-system-purple-default, #7e54f4);border-radius:9999px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-system-purple-high, #7346f3);white-space:nowrap}.wcm-install-btn{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:#ff8438;border-radius:6px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:#fff;white-space:nowrap}.wcm-installed-label{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wcm-terms{font-family:Inter,sans-serif;font-weight:400;font-size:12px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-align:center;margin:0}.wcm-terms-link{color:var(--ds-content-high, rgba(0, 0, 0, .85));text-decoration:underline;text-underline-position:from-font}.wcm-terms-link:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85));text-decoration:underline}.wcm-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}
|
|
22
|
-
`);we(`@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)}}
|
|
23
|
-
`);
|
|
24
|
-
`);
|
|
25
|
-
`);var av='<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>',iv='<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>',sv='<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>',lv='<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>',dv='<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 Ha(e){return`data:image/svg+xml,${encodeURIComponent(e)}`}var _a=Ha(av),Qa=Ha(iv),Va=Ha(sv),qa=Ha(lv),Ya=Ha(dv);var Vt=require("react/jsx-runtime");function Wd({isConnecting:e,address:t,provider:r,providerName:n,accountName:o,sendAccounts:a,onConnect:i,onDisconnect:s,onCopy:l,onSelectWallet:d,onBuy:p,onBuyDisabledMessage:b,label:g="Connect Wallet",connectingLabel:h="Connecting...",disconnectLabel:x,className:y,theme:u="dark",env:c,showBalance:w=!0,showPortfolio:m,drawerDirection:v,modal:R,connectorId:C,style:T,walletInfoStyle:S,sendTransaction:N,getTransactionReceipt:I,estimateGas:M,onReceive:O,onBridge:D,onSend:W,bridgeTokens:A,bridgeHistory:G,getBridgeQuote:J,getBridgeToTokens:ee,getBridgeApproval:re,approveBridge:L,submitBridge:te}){let ae=y?`cb-button ${y}`:"cb-button",F=y?`cb-pill ${y}`:"cb-pill";if(Kh.useEffect(()=>{Xn(t)},[t]),e)return(0,Vt.jsxs)("button",{type:"button",disabled:!0,className:ae,style:T,"aria-busy":"true",children:[(0,Vt.jsx)("span",{className:"cb-spinner","aria-hidden":"true"}),(0,Vt.jsx)("span",{className:"cb-button-label",children:h})]});if(t){let ne=n??uv(r),$=r?pv[r]:void 0;return(0,Vt.jsx)(Le,{feature:"connect_button",children:(0,Vt.jsxs)(uo,{env:c,theme:u,drawerDirection:v,modal:R,showBalance:w,showPortfolio:m,walletAddress:t,accountName:o,sendAccounts:a,connectorName:n??(r?Zh[r]:void 0),connectorId:C,onSelectWallet:d,onCopyAddress:l?(ye,ve)=>{ve&&l()}:void 0,onDisconnect:s,disconnectLabel:x,style:S,sendTransaction:N,getTransactionReceipt:I,estimateGas:M,onReceive:O,onBridge:D,onBuy:p,onBuyDisabledMessage:b,onSend:W,bridgeTokens:A,bridgeHistory:G,getBridgeQuote:J,getBridgeToTokens:ee,getBridgeApproval:re,approveBridge:L,submitBridge:te,children:[(0,Vt.jsx)(uo.Trigger,{asChild:!0,children:(0,Vt.jsxs)("button",{type:"button",className:F,"data-track":"wallet_pill_open",style:T,"aria-label":`Connected with ${ne}: ${qh(t)}`,children:[$?(0,Vt.jsx)("img",{src:$,alt:"",width:18,height:18,className:"cb-pill-icon","data-provider":r}):(0,Vt.jsx)("span",{className:"cb-pill-icon-placeholder","aria-hidden":"true"}),(0,Vt.jsx)("span",{className:"cb-pill-address",children:qh(t)})]})}),(0,Vt.jsx)(uo.Content,{align:"end",sideOffset:8})]})})}return(0,Vt.jsx)(Le,{feature:"connect_button",children:(0,Vt.jsxs)("button",{type:"button",onClick:i,className:ae,"data-track":"connect_click",style:T,"aria-label":typeof g=="string"?g:"Connect Wallet",children:[(0,Vt.jsx)(cv,{}),(0,Vt.jsx)("span",{className:"cb-button-label",children:g})]})})}function cv(){return(0,Vt.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,Vt.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,Vt.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,Vt.jsx)("path",{d:"M12.75 11.25H12.7575",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}var pv={google:qa,apple:Ya,cross:_a,metamask:Qa,binance:Va},Zh={google:"Google",apple:"Apple",cross:Yh.WALLET_LABELS.default,metamask:"MetaMask",binance:"Binance Wallet"};function uv(e){return e?Zh[e]:"Wallet"}function qh(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}var Xh=V(require("react"),1);we(`.sb-button{--sb-bg: var(--ds-surface-default, #ffffff);--sb-border: var(--ds-border-default, rgba(0, 0, 0, .07));--sb-border-hover: var(--ds-border-default, rgba(0, 0, 0, .07));--sb-color: var(--ds-content-medium, rgba(0, 0, 0, .65));--sb-color-hover: var(--ds-content-high, rgba(0, 0, 0, .85));--sb-radius: 8px;--sb-height: 36px;--sb-padding: 1px 11px;--sb-gap: 4px;--sb-font-size: 14px;--sb-font-weight: 500;--sb-line-height: 21px;--sb-letter-spacing: 0;--sb-blur: 0px;--sb-border-width: 1px;--sb-icon-size: 18px;--sb-icon-hover-rotation: 180deg;--sb-spinner-size: 18px;--sb-spinner-thumb: currentColor;--sb-spinner-track: color-mix(in srgb, currentColor 20%, transparent);--sb-disabled-opacity: .6;--sb-press-scale: .95;--sb-hover-duration: .2s;--sb-icon-duration: .3s;--sb-easing: ease}.sb-button[data-theme=dark]{--sb-bg: var(--ds-surface-default, #1e232e);--sb-border: var(--ds-border-default, #ffffff12);--sb-border-hover: var(--ds-border-medium, #ffffff2e);--sb-color: var(--ds-content-medium, #ffffffa6);--sb-color-hover: var(--ds-content-high, #ffffffd9)}.sb-button[data-theme=light]{--sb-bg: var(--ds-surface-default, #ffffff);--sb-border: var(--ds-border-default, #00000012);--sb-border-hover: var(--ds-border-medium, #0000002e);--sb-color: var(--ds-content-medium, #000000a6);--sb-color-hover: var(--ds-content-high, #000000d9)}
|
|
26
|
-
`);we(`.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)}}
|
|
27
|
-
`);
|
|
1
|
+
"use strict";var Ib=Object.create;var fi=Object.defineProperty;var Eb=Object.getOwnPropertyDescriptor;var Ab=Object.getOwnPropertyNames;var Mb=Object.getPrototypeOf,Lb=Object.prototype.hasOwnProperty;var Db=(e,t)=>{for(var n in t)fi(e,n,{get:t[n],enumerable:!0})},Dc=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ab(t))!Lb.call(e,o)&&o!==n&&fi(e,o,{get:()=>t[o],enumerable:!(r=Eb(t,o))||r.enumerable});return e};var H=(e,t,n)=>(n=e!=null?Ib(Mb(e)):{},Dc(t||!e||!e.__esModule?fi(n,"default",{value:e,enumerable:!0}):n,e)),Pb=e=>Dc(fi({},"__esModule",{value:!0}),e);var H2={};Db(H2,{APPLE_ICON:()=>ri,AppLauncher:()=>Ul,AppLauncherContent:()=>Gl,AppLauncherTrigger:()=>jl,BINANCE_ICON:()=>ti,BridgeFlow:()=>go,CHAINS_CONFIG_FILE:()=>to,CONNECTOR_REGISTRY:()=>pa,CROSSX_ICON:()=>$a,ConnectButton:()=>hc,ConnectorId:()=>Ii,DEFAULT_SKILLS_HREF:()=>bc,DEFAULT_TRUSTED_FACTORIES:()=>ko,DappUiErrorBoundary:()=>sa,GOOGLE_ICON:()=>ni,GetOneUsd:()=>mc,METAMASK_ICON:()=>ei,OnePopBody:()=>Da,OnePopGetTokenTrigger:()=>Ud,PORTFOLIO_SECTIONS:()=>Na,RelayApiError:()=>Wn,RelayDeposit:()=>Yo,RelayHistory:()=>nc,RelayRecovery:()=>sc,SOCIAL_REGISTRY:()=>ns,SendFlow:()=>ha,SkillsButton:()=>wc,StatusTracker:()=>pc,TOKEN_STATS_QUERY_KEY:()=>Ki,USER_BALANCE_QUERY_KEY:()=>qi,WALLET_PORTFOLIO_QUERY_PREFIX:()=>md,WALLET_REGISTRY:()=>Fo,WalletConnectModal:()=>gc,WalletInfo:()=>yo,WalletInfoPage:()=>Gd,WalletPortfolio:()=>Rd,WalletPortfolioBody:()=>uo,announceAppLauncherUsage:()=>yi,captureDappUiException:()=>ia,createRelayClient:()=>rn,findGetOneUsdToken:()=>Va,getChainDisplay:()=>jc,getDappUiSentryScope:()=>aa,getOneUsdTokenKey:()=>_a,initDappUiSentry:()=>Mo,invalidateWalletPortfolioQueries:()=>Ar,isGetOneUsdActionEnabled:()=>qa,isGetOneUsdActionSupported:()=>Xo,isGetOneUsdActionVisible:()=>Zo,isGetOneUsdTargetAvailable:()=>Qa,matchesGetOneUsdToken:()=>il,normalizeFailureReason:()=>Nn,resolveEnvironment:()=>it,resolveGetOneUsdRoute:()=>Ko,selectChainMeta:()=>bi,setDappUiAnalyticsUser:()=>ro,trackDappUiEvent:()=>la,trackDappUiFunnel:()=>Je,useChainDisplay:()=>Fr,useChainsConfig:()=>Wc,useGlobalMenu:()=>da,useRelayConfig:()=>lc,useRelayOrders:()=>Pr,useRelayRecovery:()=>dc,useTokenBalance:()=>Tr,useTokenStats:()=>Ir,useWalletDetect:()=>Za});module.exports=Pb(H2);var Ob={};function Pc(e){try{return Ob.env?.[e]}catch{return}}function Oc(e){if(!(typeof process>"u"))return process.env?.[e]}function it(e){if(e)return Bc(e);let t=Pc("VITE_CROSSX_ENVIRONMENT")??Pc("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??Oc("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??Oc("CROSSX_ENVIRONMENT");return Bc(t)}function Bc(e){switch(e?.toLowerCase()){case"dev":case"development":return"dev";case"stage":case"staging":case"stg":return"stage";default:return"production"}}var ar=H(require("react"),1);var oa="eip155";function On(e){return`${oa}:${e}`}function zc(e){let t=e.indexOf(":");return t>0?e.slice(0,t):void 0}function Fc(e){let t=zc(e);return t===void 0||t===oa}function mi(e){if(typeof e=="number")return Number.isSafeInteger(e)&&e>0?e:void 0;if(typeof e!="string")return;let t=e.trim(),n=zc(t);if(n!==void 0&&n!==oa)return;let r=n===oa?t.slice(oa.length+1):t;if(!/^\d+$/.test(r))return;let o=Number(r);return Number.isSafeInteger(o)&&o>0?o:void 0}function Uc(e){let t=mi(e);return t===void 0?void 0:On(t)}var Bb={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"},zb=3e3;function Bn(e,t){if(e!=null)return typeof e=="object"&&!Array.isArray(e)&&("dev"in e||"stage"in e||"production"in e)?e[t]:e}var Ml=new Map;function kr(e,t){let n=`${Bb[t]}/${e}`,r=Ml.get(n);return r||(r=(async()=>{let o=new AbortController,a=setTimeout(()=>o.abort(),zb);try{let i=await fetch(n,{cache:"no-store",signal:o.signal});return i.ok?await i.json():null}catch{return null}finally{clearTimeout(a)}})().then(o=>(o===null&&Ml.delete(n),o)),Ml.set(n,r)),r}function Fb(e){return typeof e=="string"&&e.startsWith("https://")}async function Be(e,t){let n=await kr("endpoints.json",t),r=Bn(n?.apis?.[e],t);if(!Fb(r))throw new Error(`[remote-config] endpoints.json missing or invalid api base: ${e} (${t})`);return r}var gi="apps.json";function hi(e,t){let n=Bn(e?.relay?.forwarderFactories,t),r=[n?.standingForwarderFactory,n?.depositorForwarderFactory].filter(o=>typeof o=="string");return r.length>0?r:void 0}var to="chains.json";function bi(e,t){return e?e[On(t)]??e[String(t)]??{}:{}}async function jc(e,t){let n=await kr(to,t);return bi(n?.chains,e)}function Fr(e,t){let[n,r]=ar.useState({});return ar.useEffect(()=>{if(e==null){r({});return}let o=!0;return kr(to,t).then(a=>{o&&r(bi(a?.chains,e))}),()=>{o=!1}},[e,t]),n}function Wc(e){let[t,n]=ar.useState({});return ar.useEffect(()=>{let r=!0;return kr(to,e).then(o=>{r&&n(o?.chains??{})}),()=>{r=!1}},[e]),t}function Xt(e,t,n){let[r,o]=ar.useState(void 0),a=ar.useRef(n);return a.current=n,ar.useEffect(()=>{let i=!0;return kr(e,t).then(s=>{if(!i)return;let l=a.current(s);l!==void 0&&o(l)}),()=>{i=!1}},[e,t]),r}var no="1.5.0-beta.2";var wi="__nexusCrossAppLauncherRuntime";function Ub(){if(typeof window>"u")return null;let e=window;return e[wi]??(e[wi]={mode:"dapp-ui"}),e[wi]}function jb(e){if(e.scheduled)return;e.scheduled=!0;let t=()=>{if(e.scheduled=!1,e.loggedMode!==e.mode){if(e.mode==="connect-kit-react"){let n=e.connectKitVersion??"unknown";console.info(`[CROSSx App Launcher] connect-kit-react v${n} \uCD08\uAE30\uD654 \uC644\uB8CC (dapp-ui v${no}, \uC0AC\uC6A9 \uBAA8\uB4DC: connect-kit)`)}else console.info(`[CROSSx App Launcher] dapp-ui v${no} \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 yi(e){let t=Ub();t&&(e?.mode==="connect-kit-react"?t.mode="connect-kit-react":t.mode||(t.mode="dapp-ui"),e?.connectKitVersion&&(t.connectKitVersion=e.connectKitVersion),jb(t))}var ir=require("@sentry/react");var Wb="https://5c82aeb32da33b5a0a14b7c5393992ca@o4511668907081728.ingest.de.sentry.io/4511705324126289",Gb=`dapp-ui@${no}`,Ao=null,Gc=.1;function Hc(){return Gc}function Hb(e){switch(e){case"dev":return"dev";case"stage":return"stg";default:return"prod"}}function Mo(e){if(Ao)return Ao;if(typeof window>"u")return null;let t=Hb(it(e?.environment));typeof e?.analyticsSampleRate=="number"&&(Gc=Math.min(1,Math.max(0,e.analyticsSampleRate)));let n=new ir.BrowserClient({dsn:e?.dsn??Wb,transport:ir.makeFetchTransport,stackParser:ir.defaultStackParser,integrations:[(0,ir.linkedErrorsIntegration)()],environment:t,release:Gb,enabled:e?.enabled??t==="prod"}),r=new ir.Scope;return r.setClient(n),r.setTags({package:"dapp-ui",framework:"react",source:"dapp-ui"}),n.init(),Ao=r,Ao}function aa(){return Ao}function ia(e,t){let n=Ao??Mo();if(n)return n.captureException(e,t?{captureContext:{extra:t}}:void 0)}var _c=require("react");var sa=class extends _c.Component{constructor(){super(...arguments);this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n,r){ia(n,{componentStack:r.componentStack??void 0,boundary:this.props.name??"dapp-ui"})}render(){return this.state.hasError?this.props.fallback??null:this.props.children}};function Ie(...e){return e.filter(Boolean).join(" ")}var _b=/CROSSx|ONE\s?wallet|ONE\s?pocket/i;function Lo(){return typeof window>"u"?!1:_b.test(window.navigator.userAgent)}var Vc="__nexus_dapp_ui_uid",Ll=null;function Vb(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Array.from({length:32},()=>Math.floor(Math.random()*16).toString(16)).join("")}function Dl(){if(Ll)return Ll;let e=null;try{e=window.localStorage.getItem(Vc)}catch{}if(!e||!e.startsWith("anon_")){e=`anon_${Vb()}`;try{window.localStorage.setItem(Vc,e)}catch{}}return Ll=e,e}async function Qc(e){if(typeof crypto>"u"||!crypto.subtle)return null;try{let t=new TextEncoder().encode(e.trim().toLowerCase()),n=await crypto.subtle.digest("SHA-256",t);return`wallet_${Array.from(new Uint8Array(n),o=>o.toString(16).padStart(2,"0")).join("").slice(0,16)}`}catch{return null}}function Qb(){let e=window.navigator.userAgent;return/ipad|tablet|(android(?!.*mobile))/i.test(e)?"tablet":/mobile|iphone|ipod|android/i.test(e)?"mobile":"desktop"}function Kc(){return{host:window.location.hostname,device_type:Qb(),is_cross_inapp:String(Lo())}}var qc=!1;function Pl(){if(typeof window>"u")return null;let e=aa()??Mo();return e?(qc||(qc=!0,e.setUser({id:Dl()})),e):null}function Zc(){return Math.random()>=Hc()}var Yc=0;function ro(e){let t=Pl();if(!t)return;let n=++Yc;if(!e){t.setUser({id:Dl()});return}Qc(e).then(r=>{r&&n===Yc&&t.setUser({id:r})})}function la(e,t,n){let r=Pl();!r||Zc()||r.captureMessage(`ui: ${e}_${t}`,"info",{captureContext:{tags:{...Kc(),feature:e,action:t,...n}}})}function Je(e,t,n){let r=Pl();if(!r||Zc())return;let o=n?.status??"success";r.captureMessage(`funnel: ${e}_${t}`,"info",{captureContext:{tags:{...Kc(),flow:e,funnel_step:`${e}_${t}`,funnel_status:o,...o==="failure"?{failure_reason:n?.reason??"unknown"}:{},...n?.tags}}})}function Nn(e){let t=e,n=String((t&&typeof t=="object"&&"message"in t?t.message:e)??"").toLowerCase();return t?.code===4001||/reject|denied|declin|cancel/i.test(n)?"user-rejected":/insufficient (funds|gas|balance)|exceeds balance/i.test(n)?"insufficient-gas":/timeout|timed out|deadline/i.test(n)?"timeout":/revert|execution failed/i.test(n)?"contract-reverted":/network|fetch|connection|disconnected|offline/i.test(n)?"network":"unknown"}var Xc=require("react");var Jc=require("react/jsx-runtime");function Me({feature:e,children:t}){let n=(0,Xc.useCallback)(r=>{let o=r.nativeEvent;if(o.__dappUiTracked)return;let i=r.target?.closest?.("[data-track]");if(!i)return;let s=i.getAttribute("data-track");if(!s)return;o.__dappUiTracked=!0;let l=i.getAttribute("data-track-id");la(e,s,l?{item_id:l}:void 0)},[e]);return(0,Jc.jsx)("div",{style:{display:"contents"},onClick:n,children:t})}var Oo=H(require("react"),1),ep=H(require("@radix-ui/react-popover"),1),tp=require("vaul");var xi=require("react"),Ol=(0,xi.createContext)(null);function vi(){let e=(0,xi.useContext)(Ol);if(!e)throw new Error("AppLauncher compound components must be used within <AppLauncher>");return e}var Ci=H(require("react"),1),qb="__dappUiOverlay",oo=[],Do=0,zl=0,ki=!1,Bl=!1;function $c(){if(zl>0){zl-=1;return}Do=Math.max(0,Do-1),oo.pop()?.close(),Fl()}function Yb(){ki||(window.addEventListener("popstate",$c),ki=!0)}function Fl(){oo.length>0||!ki||(window.removeEventListener("popstate",$c),ki=!1)}function Kb(){Bl||(Bl=!0,queueMicrotask(()=>{Bl=!1;let e=Do-oo.length;if(e<=0){Fl();return}Do-=e,zl+=1,window.history.go(-e),Fl()}))}function Qn(e,t){let n=Ci.useRef(t);n.current=t,Ci.useEffect(()=>{if(!(!e||typeof window>"u"))return Zb(()=>n.current())},[e])}function Zb(e){let t={close:e};return oo.push(t),Do<oo.length&&(window.history.pushState({[qb]:!0},""),Do+=1),Yb(),()=>{let n=oo.lastIndexOf(t);n!==-1&&(oo.splice(n,1),Kb())}}var Ri=require("react");function Po(e){let[t,n]=(0,Ri.useState)(!1);return(0,Ri.useEffect)(()=>{let r=window.matchMedia(e);n(r.matches);let o=a=>n(a.matches);return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[e]),t}function he(e,{insertAt:t}={}){if(!e||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}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, #2e2854);--al-badge-text: var(--ds-accent-primary-default, #a392ff);--al-drawer-overlay: var(--ds-overlay-dim, #000000b3)}[data-theme=light]{--al-bg: var(--ds-surface-default, #ffffff);--al-bg-hover: var(--ds-surface-medium, #f5f7fa);--al-text: var(--ds-content-highest, #000000);--al-text-secondary: var(--ds-content-medium, #000000a6);--al-border: var(--ds-border-default, #00000012);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .15));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #fff1eb;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #f5f3ff);--al-badge-text: var(--ds-accent-primary-default, #7e54f4);--al-drawer-overlay: var(--ds-overlay-dim, #00000080)}
|
|
2
|
+
`);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
|
+
`);he(`@keyframes al-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
|
|
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 Ni=require("react/jsx-runtime");function Ul({env:e,theme:t="dark",mobileBreakpoint:n=768,domain:r,children:o}){let a=Po(`(max-width: ${n}px)`),[i,s]=Oo.useState(!1),l=Oo.useCallback(()=>s(!1),[]),d=it(e);Qn(i,l);let p=Oo.useMemo(()=>({env:d,theme:t,isMobile:a,open:i,domain:r,close:l}),[d,t,a,i,r,l]);return(0,Ni.jsx)(Ol.Provider,{value:p,children:a?(0,Ni.jsx)(tp.Drawer.Root,{direction:"right",open:i,onOpenChange:s,noBodyStyles:!0,children:o},"drawer"):(0,Ni.jsx)(ep.Root,{open:i,onOpenChange:s,children:o},"popover")})}var ap=H(require("@radix-ui/react-popover"),1),ip=require("vaul");var wn=require("react/jsx-runtime");function np({size:e=18}){return(0,wn.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,wn.jsx)("rect",{width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"7",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"14",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"7",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"14",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"})]})}function rp(){return(0,wn.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,wn.jsx)("path",{d:"M12 19L5 12M5 12L12 5M5 12H19",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function op(){return(0,wn.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,wn.jsx)("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}var ao=require("react/jsx-runtime");function jl({asChild:e,children:t,className:n,style:r}){let{isMobile:o,theme:a}=vi(),i=t!=null,s=e??!0,l=n?`al-trigger-btn ${n}`:"al-trigger-btn",d=i?t:(0,ao.jsx)("button",{type:"button",className:l,"data-theme":a,"data-track":"open",style:r,children:(0,ao.jsx)(np,{size:18})});return o?(0,ao.jsx)(Me,{feature:"app_launcher",children:(0,ao.jsx)(ip.Drawer.Trigger,{asChild:s,children:d})}):(0,ao.jsx)(Me,{feature:"app_launcher",children:(0,ao.jsx)(ap.Trigger,{asChild:s,children:d})})}var lr=H(require("react"),1),Si=H(require("@radix-ui/react-popover"),1),io=require("vaul");var dp=require("@tanstack/react-query");var sp={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 Xb="https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",Jb="https://contents.crosstoken.io/frontend/common/app-launcher/icons";function sr(e,t){return`${e==="production"?Jb:Xb}/${t}.png`}function lp(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:sr(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:sr(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:sr(t,"crossd"),order:5e3,type:"crossd",badge:null,isNew:!1,serviceStatus:"ending"},{id:"onepop",label:"ONEpop",description:"Send crypto with just an X handle.",url:{dev:"https://dev.onechain.nexus/pop",stage:"https://stg.onechain.nexus/pop",production:"https://onechain.nexus/pop"},iconUrl:t==="production"?"https://contents.onechain.nexus/frontend/common/app-launcher/icons/onepop.png":"https://stg-contents.onechain.nexus/frontend/common/app-launcher/icons/onepop.png",order:5500,type:"onepop",badge:null,isNew:!0,serviceStatus:"available"},{id:"prediction",label:"Prediction",description:"Prediction market",url:{dev:"https://stg-prediction.crossdefi.io",stage:"https://stg-prediction.crossdefi.io",production:"https://prediction.crossdefi.io/"},iconUrl:sr(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:sr(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:sr(t,"cross-staking"),order:7500,type:"cross-staking",badge:null,isNew:!0,serviceStatus:"available"},{id:"play",label:"Quest",description:"Discover and play games on CROSS.",url:{dev:"https://stg.onechain.nexus/quest",stage:"https://stg.onechain.nexus/quest",production:"https://www.onechain.nexus/quest"},iconUrl:sr(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:sr(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:sr(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:sr(t,"wave"),order:11e4,type:"wave",badge:null,isNew:!1,serviceStatus:"available"}]}}function da(e){let t=it(e);return(0,dp.useQuery)({queryKey:["global-menu",t],queryFn:async()=>{try{let n=await fetch(sp[t],{cache:"no-store"});if(!n.ok)throw new Error(`Failed to fetch global menu: ${n.status}`);return n.json()}catch{return lp(t)}},staleTime:300*1e3,gcTime:600*1e3,retry:!1,refetchOnMount:!0})}function Wl(e){return e.serviceStatus==="ending"||e.serviceStatus==="comingSoon"?e.serviceStatus:"available"}function pp(e,t){return typeof e=="string"?e:e[t]??e.production??e.stage??e.dev}function up(e){return[...e].sort((t,n)=>{let r=cp(t)-cp(n);return r!==0?r:t.order-n.order})}function cp(e){let t=Wl(e);return t==="comingSoon"?0:t==="ending"?2:1}var dt=require("react/jsx-runtime");function $b(e){return e.id==="cross-staking"||e.type==="cross-staking"}function Gl({align:e="end",sideOffset:t=8,className:n}){let{env:r,theme:o,isMobile:a,domain:i,close:s}=vi(),{data:l}=da(r),d=lr.useMemo(()=>up(l?.items??[]),[l?.items]),p=24,h=lr.useRef(null),u=lr.useRef(!1),g=lr.useCallback(k=>{h.current={x:k.clientX,y:k.clientY},u.current=!1},[]),x=lr.useCallback(k=>{let C=h.current;h.current=null,C&&(u.current=Math.abs(k.clientX-C.x)>p||Math.abs(k.clientY-C.y)>p)},[]),y=lr.useCallback(()=>{h.current=null,u.current=!0},[]),f=typeof window<"u"?window.location.pathname:"",c=lr.useCallback((k,C)=>{let N=u.current;if(u.current=!1,N&&k.detail!==0)return;let T=C.url[r]??C.url.production,R=fp(T,i);if(!R)try{let S=new URL(T);if(S.pathname===window.location.pathname&&S.search===window.location.search&&S.hash===window.location.hash){s();return}}catch{}if(R){let S=window.open(T,"_blank");if(S){S.opener=null,s();return}}window.location.href=T},[r,i,s]),b=k=>{let C=k.url[r]??k.url.production,N=fp(C,i),T=Wl(k),R=T==="ending",S=pp(k.iconUrl,r),E=!1;if(!N)try{let A=new URL(C).pathname;E=f===A||f.startsWith(A+"/")}catch{E=!1}return(0,dt.jsx)("button",{type:"button",className:"al-grid-item","data-track":"menu_item_click","data-track-id":k.id,"data-active":E||void 0,"data-service-status":T,onPointerDown:g,onPointerUp:x,onPointerCancel:y,onClick:A=>c(A,k),children:(0,dt.jsxs)("div",{className:"al-grid-item-left",children:[(0,dt.jsxs)("div",{className:"al-grid-item-icon",children:[(0,dt.jsx)("img",{src:S,alt:k.label,width:24,height:24,loading:"lazy"}),k.isNew&&(0,dt.jsx)("span",{className:"al-status-ribbon al-status-ribbon-new",children:"N"})]}),(0,dt.jsxs)("span",{className:"al-grid-item-text",children:[(0,dt.jsx)("span",{className:"al-grid-item-label",children:k.label}),R&&(0,dt.jsx)("span",{className:"al-grid-item-status-text",children:"(End Soon)"}),k.badge&&!$b(k)&&(0,dt.jsx)("span",{className:"al-badge al-badge-list",children:k.badge})]})]})},k.id)},w=(0,dt.jsx)("div",{className:"al-menu","data-theme":o,children:(0,dt.jsx)("div",{className:"al-grid",children:d.map(b)})});return a?(0,dt.jsx)(Me,{feature:"app_launcher",children:(0,dt.jsxs)(io.Drawer.Portal,{children:[(0,dt.jsx)(io.Drawer.Overlay,{className:"al-drawer-overlay"}),(0,dt.jsxs)(io.Drawer.Content,{className:Ie("al-drawer-content",n),"data-theme":o,children:[(0,dt.jsxs)("div",{className:"al-drawer-header",children:[(0,dt.jsx)(io.Drawer.Close,{className:"al-drawer-close","data-track":"close",children:(0,dt.jsx)(rp,{})}),(0,dt.jsx)(io.Drawer.Title,{className:"al-drawer-title",children:"ONE Services"}),(0,dt.jsx)(io.Drawer.Close,{className:"al-drawer-close","data-track":"close",children:(0,dt.jsx)(op,{})})]}),(0,dt.jsx)("div",{className:"al-drawer-body",children:w})]})]})}):(0,dt.jsx)(Me,{feature:"app_launcher",children:(0,dt.jsx)(Si.Portal,{children:(0,dt.jsx)(Si.Content,{align:e,sideOffset:t,className:Ie("al-popover-content",n),"data-theme":o,children:w})})})}function fp(e,t){try{let n=new URL(e).hostname;return typeof window>"u"?!0:n!==(t??window.location.hostname)}catch{return!1}}var Ba=H(require("react"),1),oh=H(require("@radix-ui/react-popover"),1),ah=require("vaul");var Ti=require("react"),ca=(0,Ti.createContext)(null);function Ur(){let e=(0,Ti.useContext)(ca);if(!e)throw new Error("WalletInfo compound components must be used within <WalletInfo>");return e}var gn=H(require("react"),1);var mp=require("@nexus-cross/crossx-design-system"),Ii=(r=>(r.CROSSx="crossx",r.MetaMask="io.metamask",r.Binance="com.binance.wallet",r))(Ii||{}),pa={crossx:{name:mp.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 lu=H(require("react"),1);var be=require("react/jsx-runtime");function gp({size:e=16,className:t}){return(0,be.jsxs)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,be.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,be.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 Cr({size:e=16,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"4 4 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.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 qn({size:e=16,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.jsx)("path",{d:"M11.6667 3.5L5.25 9.91667L2.33334 7",stroke:"currentColor",strokeWidth:1.16667,strokeLinecap:"round",strokeLinejoin:"round"})})}function vn({size:e=24,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.jsx)("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function hp({size:e=20,className:t}){return(0,be.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,be.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,be.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 Ei({size:e=20,className:t}){return(0,be.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,children:(0,be.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 En({size:e=20,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.jsx)("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor",strokeWidth:1.67,strokeLinecap:"round",strokeLinejoin:"round"})})}function zn({size:e=20,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.jsx)("path",{d:"M5 8L10 13L15 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function bp({size:e=16,className:t}){return(0,be.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,be.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,be.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 wp({size:e=16,className:t}){return(0,be.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,be.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,be.jsx)("path",{d:"M1.667 1.667l16.666 16.666",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}var ew='<svg width="100%" height="100%" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_72837_24069)"><mask id="mask0_72837_24069" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"><path d="M50 0C10.5289 0 0 10.5289 0 50C0 89.4711 10.5289 100 50 100C89.4711 100 100 89.4711 100 50C100 10.5289 89.4711 0 50 0Z" fill="white"/></mask><g mask="url(#mask0_72837_24069)"><path d="M99.9501 0.0499268H0V100H99.9501V0.0499268Z" fill="url(#paint0_linear_72837_24069)"/><path d="M34.9302 100H99.9751V19.0619L34.9302 60.7286V100Z" fill="url(#paint1_linear_72837_24069)"/><path d="M34.9301 100H0V23.8024L34.9301 60.7285V100Z" fill="url(#paint2_linear_72837_24069)"/></g><g filter="url(#filter0_d_72837_24069)"><path d="M49.9503 21.4821L31.9862 31.8613C28.8176 33.6827 27.7198 37.7745 29.5411 40.9432C31.3625 44.1118 35.4543 45.2096 38.623 43.3883L53.8176 34.6058L46.582 42.3653V72.8044C46.582 76.4721 49.576 79.4661 53.2437 79.4661C56.9114 79.4661 59.9054 76.4721 59.9054 72.8044V27.2455C59.9054 25.9731 59.5062 24.7256 59.0072 23.9022C57.1359 20.7585 53.094 19.6358 49.9254 21.4571L49.9503 21.4821Z" fill="white"/></g></g><defs><filter id="filter0_d_72837_24069" x="7.4286" y="-0.650014" width="87.831" height="115.47" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="7.06088" dy="7.06088"/><feGaussianBlur stdDeviation="14.1467"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_72837_24069"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_72837_24069" result="shape"/></filter><linearGradient id="paint0_linear_72837_24069" x1="-11.5768" y1="-12.001" x2="106.562" y2="106.986" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_72837_24069" x1="24.9501" y1="23.004" x2="73.6278" y2="64.8453" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_72837_24069" x1="62.3503" y1="3.46804" x2="16.3423" y2="63.3732" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_72837_24069"><rect width="100" height="100" fill="white"/></clipPath></defs></svg>',tw=`data:image/svg+xml,${encodeURIComponent(ew)}`;function yp({size:e=42,className:t}){return(0,be.jsx)("img",{src:tw,width:e,height:e,alt:"",className:t,style:{display:"block"}})}function xp({size:e=20,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.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 vp({size:e=24,className:t}){return(0,be.jsxs)("svg",{width:e,height:e,viewBox:"-2.5 -2.5 26.67 26.67",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,be.jsx)("defs",{children:(0,be.jsxs)("linearGradient",{id:"wi-send-solid-grad",x1:"21.6678",y1:"10.8341",x2:"3.99487",y2:"19.2366",gradientUnits:"userSpaceOnUse",children:[(0,be.jsx)("stop",{stopColor:"var(--wi-send-solid-from, #f62e61)"}),(0,be.jsx)("stop",{offset:"1",stopColor:"var(--wi-send-solid-to, #f7564a)"})]})}),(0,be.jsx)("path",{d:"M19.7662 0.0826863C20.8951 -0.311758 21.9796 0.772686 21.5851 1.90158L15.0018 20.7127C14.574 21.9327 12.874 22.0016 12.3496 20.8205L9.1729 13.6738L13.644 9.20158C13.7912 9.0436 13.8713 8.83466 13.8675 8.61877C13.8637 8.40288 13.7763 8.1969 13.6236 8.04422C13.4709 7.89154 13.2649 7.80408 13.049 7.80027C12.8331 7.79646 12.6242 7.8766 12.4662 8.0238L7.99401 12.4949L0.847345 9.31824C-0.333766 8.79269 -0.263766 7.0938 0.955123 6.66602L19.7662 0.0826863Z",fill:"url(#wi-send-solid-grad)"})]})}function kp({size:e=20,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.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 Cp({size:e=20,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.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 Rp({size:e=20,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.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 Np({size:e=20,className:t}){return(0,be.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,be.jsx)("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor"}),(0,be.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"})]})}function ua({size:e=14,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":!0,children:(0,be.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"})})}function Sp({className:e}){return(0,be.jsxs)("svg",{viewBox:"0 0 540 540",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":!0,children:[(0,be.jsx)("path",{d:"M341.385 435.217V376.643H326.742V362H370.672V376.643H356.029V435.217H341.385Z"}),(0,be.jsx)("path",{d:"M261.725 435.217V362H305.656V376.643H276.369V391.287H305.656V405.93H276.369V435.217H261.725Z"}),(0,be.jsx)("path",{d:"M167.422 435.217V362H182.066V376.643H196.709V391.287H211.352V405.93H225.996V362H240.639V435.217H225.996V420.573H211.352V405.93H196.709V391.287H182.066V435.217H167.422Z"}),(0,be.jsx)("path",{d:"M237.374 204.563C243.054 204.563 248.502 202.307 252.518 198.29C256.534 194.274 258.791 188.826 258.791 183.146C258.791 177.466 256.534 172.019 252.518 168.002C248.502 163.986 243.054 161.73 237.374 161.73C231.694 161.73 226.247 163.986 222.23 168.002C218.214 172.019 215.957 177.466 215.957 183.146C215.957 188.826 218.214 194.274 222.23 198.29C226.247 202.307 231.694 204.563 237.374 204.563ZM371.228 145.667L269.499 86.7713L167.77 145.667V263.459L269.499 322.355L371.228 263.459V145.667ZM269.499 111.518L349.812 158.014V231.687L300.96 202.389L215.604 266.404L189.187 251.112V158.014L269.499 111.518ZM269.499 297.608L235.746 278.065L302.288 228.164L345.1 253.843L269.499 297.608Z"})]})}var we=H(require("react"),1);var jr=H(require("bignumber.js"),1);function nw(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return t>0&&e.charCodeAt(t-1)===46&&t--,e.slice(0,t)}function Rr(e,t){if(!e||e==="0")return"0.00";let n=new jr.default(e).shiftedBy(-t),r=n.isGreaterThanOrEqualTo(1)?2:4;return n.toFormat(r,jr.default.ROUND_DOWN)}function dn(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}function so(e){let t=typeof e=="string"?parseFloat(e):e;if(Number.isNaN(t)||t===0)return"$0.00";let n=t>=1?2:4,r=Math.pow(10,n);return`$${(Math.floor(t*r)/r).toLocaleString("en-US",{minimumFractionDigits:n,maximumFractionDigits:n})}`}function Ai(e,t,n){let o=new jr.default(e).shiftedBy(-t).multipliedBy(new jr.default(n));return o.isZero()||o.isNaN()?"$0.00":`$${(o.integerValue(jr.default.ROUND_DOWN).isGreaterThanOrEqualTo(1)?o.decimalPlaces(2,jr.default.ROUND_DOWN):o.decimalPlaces(4,jr.default.ROUND_DOWN)).toFormat()}`}function Tp(e){if(e===""||e===null||e===void 0)return{displayValue:"0",isLowerBound:!1};let t=typeof e=="number"?e.toString():e;if(t==="0"||t==="0.0")return{displayValue:"0",isLowerBound:!1};let n=t;if(n.includes("e")||n.includes("E")){let i=Number(n);if(!Number.isFinite(i)||i===0)return{displayValue:"0",isLowerBound:!1};n=nw(i.toFixed(18))}let[r="0",o=""]=n.split(".");if(Number(r)>=1){let i=o.slice(0,2).padEnd(2,"0");return{displayValue:`${Number(r).toLocaleString("en-US")}.${i}`,isLowerBound:!1}}return o.length<4?{displayValue:`${r}.${o}`,isLowerBound:!1}:o.slice(0,4)==="0000"?{displayValue:"0.0001",isLowerBound:!0}:{displayValue:`0.${o.slice(0,4)}`,isLowerBound:!1}}var _l=require("react"),Ap=require("@tanstack/react-query");var At={dev:{cross:612044,bsc:97},stage:{cross:612044,bsc:97},production:{cross:612055,bsc:56}},Ip={dev:[On(612044),On(97),On(998)],stage:[On(612044),On(97),On(998)],production:[On(612055),On(56)]};function Hl(e){return Ip[e]}var Mi="https://terms.onechain.nexus/docs/terms-july-23-2026",Li="https://terms.onechain.nexus/docs/pp-july-23-2026",Ep="https://contents.crossdefi.io/Terms/terms/tos-26-07-09-oneusd.html";var rw="send:chain-info";function ow(e){if("data"in e&&e.data!==void 0){let t=e.data;if(Array.isArray(t)){let n=t[0];if(!n)throw new Error("Chain info payload is empty.");return n}return t}return e}function Vl(e,...t){let n=e.replace(/\/+$/,""),r=t.map(o=>o.replace(/^\/+|\/+$/g,"")).filter(Boolean);return[n,...r].join("/")}function Mp(e,t,n,r){if(r)return t===At[e].cross?Lp(t,r):n?.explorer_url?Vl(n.explorer_url,n.explorer_postfix?.transaction??"tx",r):aw(e,t,r)}function Lp(e,t){return Vl("https://explorer.onechain.nexus",String(e),"tx",t)}function aw(e,t,n){let r=At[e];if(t===r.cross)return Lp(t,n);if(t===r.bsc)return Vl(e==="production"?"https://bscscan.com":"https://testnet.bscscan.com","tx",n)}function fa(e,t,n,r=!0){let o=(0,Ap.useQuery)({queryKey:[rw,e,t],queryFn:async({signal:s})=>{let l=await Be("walletServer",e),d=await fetch(`${l}/v1/public/chain/info/${t}`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Failed to fetch chain info: ${d.status}`);let p=await d.json();if("code"in p&&p.code!==void 0&&p.code!==200)throw new Error(`Chain info API error: ${p.code}`);return ow(p)},enabled:r,staleTime:3e5}),a=o.data;return{transactionUrl:(0,_l.useMemo)(()=>Mp(e,t,a,n),[t,a,e,n]),chainInfo:a,...o}}function Di(e,t,n=!0){let{chainInfo:r}=fa(e,t,void 0,n);return{buildTxUrl:(0,_l.useMemo)(()=>a=>Mp(e,t,r,a),[e,t,r]),chainInfo:r}}var Dp="0x0000000000000000000000000000000000000001";var iw="0xa9059cbb",sw=/^0x[a-fA-F0-9]{40}$/,lw="nexus-cross:dapp-ui:send:recent:",Pp=10;function dw(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return e.slice(0,t)}function ma(e){return e.toLowerCase()}function dr(e){return sw.test(e)}function Wr(e){return ma(e.address)===Dp}function Ql(e){return`${lw}${e.toLowerCase()}`}function Bo(e){if(typeof window>"u")return[];try{let t=window.localStorage.getItem(Ql(e));if(!t)return[];let n=JSON.parse(t);return Array.isArray(n)?n.filter(r=>r!==null&&typeof r=="object"&&dr(r.address)&&typeof r.updatedAt=="number").slice(0,Pp):[]}catch{return[]}}function ql(e,t){if(typeof window>"u")return[];let n=ma(t),r=[{address:n,updatedAt:Date.now()},...Bo(e).filter(o=>o.address!==n)].slice(0,Pp);try{window.localStorage.setItem(Ql(e),JSON.stringify(r))}catch{return Bo(e)}return r}function Yl(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(Ql(e))}catch{}}function Nr(e,t){let n=e.trim();if(!n)return{error:"Enter an amount."};if(!/^\d+(\.\d*)?$/.test(n))return{error:"Enter a valid amount."};let[r="0",o=""]=n.split(".");if(o.length>t)return{error:`Max ${t} decimal places.`};let a=BigInt(r||"0"),i=o.padEnd(t,"0"),s=i?BigInt(i):0n,l=10n**BigInt(t),d=a*l+s;return d<=0n?{error:"Amount must be greater than 0."}:{value:d}}function zo(e,t){let n=BigInt(e||"0"),r=10n**BigInt(t),o=n/r,a=n%r;if(a===0n)return o.toString();let i=dw(a.toString().padStart(t,"0"));return`${o.toString()}.${i}`}function Kl(e,t){let n=e.replace(/^0x/,"").toLowerCase().padStart(64,"0"),r=t.toString(16).padStart(64,"0");return`${iw}${n}${r}`}function cr(e,t,n=10){if(t<=0)return e.toString();let r=10n**BigInt(t),o=e/r,a=e%r;if(a===0n)return o.toString();let s=a.toString().padStart(t,"0").slice(0,Math.max(0,Math.min(n,t)));return s=s.replace(/0+$/,""),s?`${o.toString()}.${s}`:o.toString()}function Zl(e,t){return cr(e,t,6)}function Op(e){return cr(e,9,2)}function Bp(e){return e.toLocaleString("en-US")}function Pi(e){return e===56||e===97}function Oi(e){return e.gasPrice??e.maxFeePerGas}function zp(e,t=!1){return t?Oi(e)!==void 0?"legacy":null:e.maxFeePerGas!==void 0?"dynamic":e.gasPrice!==void 0?"legacy":null}function Bi(e,t=!1){if(t){let n=Oi(e);return n!==void 0?e.gasLimit*n:null}return e.maxFeePerGas!==void 0?e.gasLimit*e.maxFeePerGas:e.gasPrice!==void 0?e.gasLimit*e.gasPrice:null}function zi(e){return!Number.isFinite(e)||e<=0?"$0.00":`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function Fp(e,t=0){if(t>4||e===null||e===void 0)return"";if(typeof e=="string")return e.toLowerCase();if(typeof e!="object")return"";let n=e,r=[];return typeof n.name=="string"&&r.push(n.name),typeof n.shortMessage=="string"&&r.push(n.shortMessage),typeof n.message=="string"&&r.push(n.message),typeof n.details=="string"&&r.push(n.details),n.cause!==void 0&&r.push(Fp(n.cause,t+1)),r.join(`
|
|
6
|
+
`).toLowerCase()}function cw(e){if(e instanceof Error)return e.message;if(typeof e=="string")return e;if(e&&typeof e=="object"){let t=e;if(typeof t.shortMessage=="string")return t.shortMessage;if(typeof t.message=="string")return t.message}return""}function Xl(e,t={},n="Failed to send transaction."){let r=Fp(e);if(!r)return n;let o=t.nativeSymbol?.trim()||"gas token",a=t.networkName?.trim();if(r.includes("user rejected")||r.includes("userrejected")||r.includes("user denied")||r.includes("user cancelled")||r.includes("user canceled")||r.includes("action_rejected")||r.includes("rejected by user"))return"Transaction was cancelled.";if(r.includes("insufficientfunds")||r.includes("insufficient funds")||r.includes("exceeds the balance of the account")||r.includes("insufficient balance for transfer")){let i=a?` on ${a}`:"";return`Not enough ${o} to cover the gas fee.Please top up your ${o} balance and try again.`}return r.includes("transaction underpriced")||r.includes("replacement transaction underpriced")||r.includes("fee too low")?"Gas fee was too low for the network. Please try again.":r.includes("nonce too low")||r.includes("nonce has already been used")||r.includes("nonce too high")?"Pending transactions are out of order. Refresh the page and try again.":r.includes("execution reverted")||r.includes("contractfunctionrevertederror")||r.includes("contractfunctionexecutionerror")?"The transaction was rejected by the contract. The recipient or token may be invalid.":r.match(/chain \d+ is not configured/)?"This network is not registered in the app. Contact support.":r.includes("http request failed")||r.includes("failed to fetch")||r.includes("network request failed")||r.includes("timeout")||r.includes("econnreset")||r.includes("rpc error")||r.includes("429")?"Network connection failed. Check your internet and try again.":r.includes("estimategas")||r.includes("gas estimation failed")?"Could not estimate the gas fee. The recipient address or amount may be invalid.":cw(e)||n}var pw=2000000000n,uw=1000000000n;async function Fi(e,t,n){let r=new AbortController,o=setTimeout(()=>r.abort(),8e3),a=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:n}),signal:r.signal}).finally(()=>clearTimeout(o));if(!a.ok)throw new Error(`RPC ${t} HTTP ${a.status}`);let i=await a.json();if(i.error)throw new Error(`RPC ${t}: ${i.error.message}`);if(i.result===void 0)throw new Error(`RPC ${t}: empty result`);return i.result}function Ui(e){return BigInt(e)}function fw(e){return`0x${e.toString(16)}`}function mw(e){let t={to:e.to};return e.from&&(t.from=e.from),e.value!==void 0&&e.value>0n&&(t.value=fw(e.value)),e.data&&(t.data=e.data),t}function gw(e){return e===56||e===97}async function Up(e){try{let t=await Fi(e,"eth_gasPrice",[]);return{gasPrice:Ui(t)}}catch{return{gasPrice:pw}}}async function hw(e,t){let n=uw;try{let r=await Fi(e,"eth_maxPriorityFeePerGas",[]);n=Ui(r)}catch{}return{maxFeePerGas:t+n,maxPriorityFeePerGas:n}}async function bw(e,t){if(t)return Up(e);let n;try{n=(await Fi(e,"eth_getBlockByNumber",["latest",!1]))?.baseFeePerGas}catch{}return n?hw(e,Ui(n)):Up(e)}async function jp(e,t){let n=gw(t.chainId),r=mw(t),[o,a]=await Promise.all([Fi(e,"eth_estimateGas",[r]),bw(e,n)]);return{gasLimit:Ui(o),gasPrice:a.gasPrice,maxFeePerGas:a.maxFeePerGas,maxPriorityFeePerGas:a.maxPriorityFeePerGas}}function Wp(e){let{estimateGas:t,sendTransaction:n,getTransactionReceipt:r}=e;return{canSend:!!n,canEstimateGas(o){return!!t||!!o},async estimateGas(o,a){if(t)return t(o);if(a)return jp(a,o);throw new Error("Gas estimation is not available.")},async sendTransaction(o){if(!n)throw new Error("Sending is not available for this wallet.");return n(o)},getTransactionReceipt:r}}var ww=1500,yw=120;function Gp(e){return!!(e.token||e.recipient||e.amount)}function Jl({recipient:e,amount:t,token:n,balanceRaw:r}){let o={},a=e.trim(),i=Nr(t,n.quantity.decimals),s;return a?dr(a)||(o.recipient="Enter a valid EVM recipient address."):o.recipient="Enter a recipient address.","error"in i?o.amount=i.error:(s=i.value,s>r&&(o.amount="Amount exceeds available balance.")),!Wr(n)&&!dr(n.address)&&(o.token="Token contract address is invalid."),{errors:o,rawAmount:o.amount?void 0:s,recipient:a&&dr(a)?a:void 0}}function $l({token:e,walletAddress:t,recipient:n,rawAmount:r}){let o=t;return Wr(e)?{to:n,value:r,chainId:e.chainId,from:o}:{to:ma(e.address),data:Kl(n,r),value:0n,chainId:e.chainId,from:o}}function xw(e){let{status:t}=e;return t==="reverted"||t==="0x0"||t===0||t===0n||t===!1}var vw=e=>new Promise(t=>setTimeout(t,e));async function Hp({repository:e,args:t,chainId:n,onSubmitted:r,pollIntervalMs:o=ww,pollMaxAttempts:a=yw}){let i=await e.sendTransaction(t);r(i);let{getTransactionReceipt:s}=e;if(!s)return"success";for(let l=0;l<a;l+=1){let d=await s({hash:i,chainId:n}).catch(()=>null);if(d)return xw(d)?"reverted":"success";await vw(o)}return"timeout"}var _p=["token","recipient","amount","review"];function Vp(e){let{env:t,walletAddress:n,accountName:r,accounts:o=[],initialStep:a="recipient",token:i,tokens:s=[],onTokenChange:l,sendTransaction:d,getTransactionReceipt:p,estimateGas:h,getTokenPriceUsd:u,onSubmitted:g,onSuccess:x,onFailed:y,onExit:f,onOutlink:c}=e,b=we.useMemo(()=>Wp({sendTransaction:d,getTransactionReceipt:p,estimateGas:h}),[d,p,h]),[w,k]=we.useState(i);we.useEffect(()=>{k(i)},[i.address,i.chainId]);let[C,N]=we.useState(a),[T,R]=we.useState(""),[S,E]=we.useState(""),[A,F]=we.useState({}),[D,G]=we.useState("idle"),[M,j]=we.useState(""),[le,oe]=we.useState(""),[ne,Q]=we.useState(null),[ee,z]=we.useState(!1),[q,ae]=we.useState(""),Z=we.useRef(0),[pe,Se]=we.useState(null),[Ue,fe]=we.useState(""),[Re,Ce]=we.useState(()=>Bo(n)),tt=we.useRef(new Set),Le=we.useCallback((V,ve)=>{tt.current.has(V)||(tt.current.add(V),Je("send",V,ve))},[]);we.useEffect(()=>{Le("opened"),a!=="token"&&Le("token_selected",{tags:{item_id:i.symbol}})},[Le,a,i.symbol]);let $e=we.useMemo(()=>it(t),[t]),{transactionUrl:wt,chainInfo:Ge}=fa($e,w.chainId,M||void 0,!0),Qe=Fr(w.chainId,$e),He=Qe.nativeSymbol??Ge?.currency_symbol??"",Dt=Qe.name??Ge?.name??`Chain ID ${w.chainId}`,tn=we.useRef({nativeSymbol:He||void 0,networkName:Dt,tokenSymbol:w.symbol});tn.current={nativeSymbol:He||void 0,networkName:Dt,tokenSymbol:w.symbol};let yt=we.useMemo(()=>BigInt(w.quantity.numeric||"0"),[w.quantity.numeric]),Pt=we.useMemo(()=>Rr(w.quantity.numeric,w.quantity.decimals),[w.quantity.numeric,w.quantity.decimals]),Tt=u?.(w),nn=we.useMemo(()=>{if(Tt===void 0)return;let V=parseFloat(S.replace(/,/g,""));return Number.isFinite(V)?V*Tt:0},[S,Tt]);we.useEffect(()=>{E(""),F({})},[w.address,w.chainId]),we.useEffect(()=>{Z.current+=1,Q(null),ae(""),z(!1)},[w.address,w.chainId,T,S]),we.useEffect(()=>{Ce(Bo(n))},[n]);let It=we.useCallback(V=>{R(V),F(ve=>({...ve,recipient:void 0}))},[]),ut=we.useCallback(V=>{E(V),F(ve=>({...ve,amount:void 0}))},[]),Ot=we.useCallback(()=>{E(Pt.replace(/,/g,"")),F(V=>({...V,amount:void 0}))},[Pt]),rt=we.useCallback(V=>{k(V),l?.(V),Le("token_selected",{tags:{item_id:V.symbol}}),N("recipient")},[l,Le]),on=we.useCallback(()=>N("token"),[]),ft=we.useCallback(()=>{N(V=>{if(V==="result")return"review";if(V===a)return f?.(),V;let ve=_p.indexOf(V);return ve<=0?(f?.(),V):_p[ve-1]})},[a,f]),fn=we.useCallback(()=>{let{errors:V}=Jl({recipient:T,amount:"1",token:w,balanceRaw:yt});if(V.recipient){F(ve=>({...ve,recipient:V.recipient}));return}F(ve=>({...ve,recipient:void 0})),Le("recipient_entered"),N("amount")},[T,w,yt,Le]),Ze=we.useCallback(V=>{R(V),F(ve=>({...ve,recipient:void 0})),Le("recipient_entered"),N("amount")},[Le]),lt=we.useCallback(()=>{let V=Jl({recipient:T,amount:S,token:w,balanceRaw:yt});F(V.errors),!(Gp(V.errors)||V.rawAmount===void 0||!V.recipient)&&(Se(V.rawAmount),fe(V.recipient),Q(null),ae(""),G("idle"),Le("amount_entered"),N("review"))},[T,S,w,yt,Le]);we.useEffect(()=>{if(C!=="review"||!Ue||pe===null||ne!==null||ee||q||!b.canEstimateGas(Ge?.rpc))return;let V=++Z.current;z(!0),ae(""),(async()=>{try{let ve=$l({token:w,walletAddress:n,recipient:Ue,rawAmount:pe}),Ne=await b.estimateGas(ve,Ge?.rpc);if(Z.current!==V)return;Q(Ne)}catch(ve){if(Z.current!==V)return;ae(Xl(ve,tn.current,"Failed to estimate gas."))}finally{Z.current===V&&z(!1)}})()},[C,Ue,pe,ne,ee,q,b,Ge?.rpc,w,n]);let nt=we.useMemo(()=>{if(!Wr(w)||!ne||pe===null)return!1;let V=Bi(ne,Pi(w.chainId));return V===null?!1:pe+V>yt},[w,ne,pe,yt]),Et=we.useCallback(async()=>{if(!(!Ue||pe===null)&&!nt){oe(""),j(""),G("submitting"),Le("submitted");try{let V="",ve=await Hp({repository:b,args:$l({token:w,walletAddress:n,recipient:Ue,rawAmount:pe}),chainId:w.chainId,onSubmitted:Ne=>{V=Ne,j(Ne),G("confirming"),Ce(ql(n,Ue)),g?.({txHash:Ne,chainId:w.chainId,amount:S,tokenSymbol:w.symbol,recipient:Ue})}});if(ve==="success")G("success"),Le("confirmed"),V&&x?x?.(V):N("result");else if(ve==="reverted"){let Ne="Transaction reverted on-chain.";G("error"),oe(Ne),Le("confirmed",{status:"failure",reason:Nn(new Error(Ne))}),V&&y?y({txHash:V,chainId:w.chainId,message:Ne}):N("result")}else{let Ne="Transaction receipt was not found. Please check again later.";G("error"),oe(Ne),Le("confirmed",{status:"failure",reason:"timeout"}),V&&y?y({txHash:V,chainId:w.chainId,message:Ne}):N("result")}}catch(V){G("error"),Le("confirmed",{status:"failure",reason:Nn(V)}),oe(Xl(V,{nativeSymbol:He||void 0,networkName:Dt,tokenSymbol:w.symbol})),N("result")}}},[b,Ue,pe,nt,w,S,n,g,x,y,He,Dt,Le]),[Rt,Xe]=we.useState(!1),an=we.useRef(void 0);we.useEffect(()=>()=>clearTimeout(an.current),[]);let sn=we.useCallback(async()=>{if(M)try{await navigator.clipboard.writeText(M),Xe(!0),clearTimeout(an.current),an.current=setTimeout(()=>Xe(!1),2e3)}catch{}},[M]),Yt=we.useCallback(()=>{if(!wt||!M)return;let V=ze=>{typeof window<"u"&&window.open(ze,"_blank","noopener,noreferrer")};if(!c){V(wt);return}let ve=c(wt,{category:"send",origin:"send-transaction",payload:{chainId:w.chainId,txHash:M}});if(ve&&typeof ve.then=="function"){let ze=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null;ve.then(ot=>{if(ot===null){ze?.close();return}let Kt=ot??wt;if(ze)try{ze.location.href=Kt}catch{ze.close(),V(Kt)}else V(Kt)});return}let Ne=ve;Ne!==null&&V(Ne??wt)},[c,w.chainId,wt,M]),ln=we.useCallback(()=>{oe(""),j(""),G("idle"),Q(null),ae(""),tt.current.delete("submitted"),tt.current.delete("confirmed"),N("review")},[]);return{step:C,status:D,token:w,tokens:s.length>0?s:[w],recipient:T,amount:S,amountUsd:nn,fieldErrors:A,error:le,txHash:M,gasEstimate:ne,gasLoading:ee,gasError:q,insufficientGas:nt,reviewRawAmount:pe,reviewRecipient:Ue,recentAddresses:Re,accounts:o,accountName:r,walletAddress:n,resolvedEnv:$e,transactionUrl:wt,networkName:Dt,nativeSymbol:He,nativeDecimals:Ge?.currency_decimals??w.quantity.decimals,balanceRaw:yt,balanceText:Pt,priceUsd:Tt,canSelectToken:(s.length>0?s:[w]).length>1,canSend:b.canSend,getTokenPriceUsd:u,setRecipient:It,setAmount:ut,setMax:Ot,selectToken:rt,goToTokenSelect:on,selectRecipient:Ze,submitRecipient:fn,submitAmount:lt,confirmSend:Et,retry:ln,back:ft,hashCopied:Rt,copyHash:sn,openTransaction:Yt}}var Yn=H(require("react"),1);var pr=require("react/jsx-runtime");function Qp({flow:e}){let{amount:t,setAmount:n,amountUsd:r,balanceText:o,balanceRaw:a,token:i,setMax:s}=e,l=Yn.useRef(null),d=Yn.useCallback(()=>{requestAnimationFrame(()=>{let y=l.current;if(!y)return;let f=y.value.length;y.setSelectionRange(f,f)})},[]);Yn.useEffect(()=>{l.current?.focus(),d()},[d]),Yn.useEffect(()=>{t===""&&(u(!1),d())},[t,d]);let p=Yn.useMemo(()=>{let y=Nr(t,i.quantity.decimals);return"value"in y&&y.value>a},[t,i.quantity.decimals,a]),[h,u]=Yn.useState(!1),g=!h&&t===""?"0.00":t,x=t.trim()===""||t.trim()==="0";return(0,pr.jsx)("div",{className:"sf-body sf-amount",children:(0,pr.jsxs)("div",{className:"sf-amount-center",children:[(0,pr.jsx)("span",{className:"sf-amount-usd",children:r!==void 0?zi(r):"\xA0"}),(0,pr.jsx)("div",{className:"sf-amount-input-wrap","data-over":p||void 0,"data-empty":x||void 0,onClick:()=>l.current?.focus(),children:(0,pr.jsx)("input",{ref:l,className:"sf-amount-input",value:g,onChange:y=>{let f=y.target.value;if(h)n(f);else if(t===""){if(f.length<4)return;u(!0);let c=f.startsWith("0.00")?f.slice(4):f;n(c)}else u(!0),n(f)},placeholder:"0.00",inputMode:"decimal",autoComplete:"off","aria-label":`Amount in ${i.symbol}`,size:1})}),(0,pr.jsxs)("div",{className:"sf-amount-balance",children:[(0,pr.jsx)("span",{children:"Balance:"}),(0,pr.jsxs)("button",{type:"button",className:"sf-amount-max",onClick:s,"data-track":"amount_max",children:[o," ",i.symbol]})]})]})})}var Zn=H(require("react"),1);var Cw=new Set(["0xff42c13d927a6b9265236619161accb227b6d452","0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb"].map(e=>e.toLowerCase()));function ed(e){return Cw.has(e.toLowerCase())}var Rw="0x0000000000000000000000000000000000000001",Nw={dev:"0x26ca2a92ea9659e073621bb85b9117dc5944cff1",stage:"0x26ca2a92ea9659e073621bb85b9117dc5944cff1",production:"0x6bf62ca91e397b5a7d1d6bce97d9092065d7a510"},Sw={dev:"0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb",stage:"0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb",production:"0xff42c13d927a6b9265236619161accb227b6d452"};function ji(e){let t=At[e];return[{chainId:t.cross,address:Rw},{chainId:t.bsc,address:Nw[e]},{chainId:t.cross,address:Sw[e]}].map(({chainId:n,address:r})=>({chainId:n,address:r.toLowerCase()}))}var qp={cross:"https://contents.crosstoken.io/wallet/token/images/CROSS.svg",bsc:"https://contents.crosstoken.io/wallet/token/images/BSC.svg"};function ga(e,t){let n=At[e];if(t===n.cross)return qp.cross;if(t===n.bsc)return qp.bsc}var Tw={dev:"https://dev-portrait.crosstoken.io",stage:"https://dev-portrait.crosstoken.io",production:"https://portrait.crosstoken.io"};function Sr(e,t,n={}){if(!t||!t.startsWith("0x"))return;let{size:r=120,bg:o,format:a="png"}=n,i=Tw[e],s=o?`&bg=${o}`:"";return`${i}/portrait/evm/${t}.${a}?size=${r}${s}`}var cn=require("react/jsx-runtime");function Yp({size:e=20,className:t}){return(0,cn.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[(0,cn.jsx)("circle",{cx:"9",cy:"9",r:"6",stroke:"currentColor",strokeWidth:"1.7"}),(0,cn.jsx)("path",{d:"m17 17-3.2-3.2",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function Kp({size:e=20,className:t}){return(0,cn.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":"true",children:(0,cn.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 Zp({size:e=20,className:t}){return(0,cn.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[(0,cn.jsx)("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor",opacity:"0.12"}),(0,cn.jsx)("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function Xp({size:e=16,className:t}){return(0,cn.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",className:t,"aria-hidden":"true",children:(0,cn.jsx)("path",{d:"M8 3v10m0 0 4-4m-4 4-4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function Jp({size:e=56,className:t}){return(0,cn.jsxs)("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[(0,cn.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-green-default, #00b4b7)"}),(0,cn.jsx)("path",{d:"M17 28.5 24.2 35.5 39 20.5",stroke:"var(--ds-system-green-on, #ffffff)",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})]})}function $p({size:e=56,className:t}){return(0,cn.jsxs)("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[(0,cn.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-red-default, #da0b2e)"}),(0,cn.jsx)("path",{d:"M20 20 36 36m0-16L20 36",stroke:"#ffffff",strokeWidth:"4",strokeLinecap:"round"})]})}var Kn=H(require("react"),1),Iw=240;function Wi(e,t,n,r=[]){let o=Kn.useRef(null),[a,i]=Kn.useState(null),[s,l]=Kn.useState(null),d=Kn.useCallback(h=>{h!==e&&(l(n.indexOf(h)>n.indexOf(e)?"from-right":"from-left"),t(h))},[e,t,n]);Kn.useEffect(()=>{if(!s)return;let h=window.setTimeout(()=>l(null),Iw+60);return()=>window.clearTimeout(h)},[s,e]),Kn.useLayoutEffect(()=>{let h=o.current;if(!h)return;let u=()=>{let x=h.querySelector("[data-active]");x&&i({left:x.offsetLeft+4,width:Math.max(x.offsetWidth-8,0)})};if(u(),typeof ResizeObserver>"u")return;let g=new ResizeObserver(u);return g.observe(h),h.querySelectorAll('[role="tab"]').forEach(x=>g.observe(x)),()=>g.disconnect()},[e,...r]);let p=a?{width:a.width,transform:`translateX(${a.left}px)`}:void 0;return{tabsRef:o,indicatorStyle:p,slide:s,select:d}}var je=require("react/jsx-runtime"),Ew=["recent","account"];function eu(e,t){return e.name||`Account ${(e.index??t)+1}`}function tu(e){return e.trim().slice(0,1).toUpperCase()||"A"}function nu(e){return e.toLowerCase()}function ru({flow:e}){let{recipient:t,setRecipient:n,fieldErrors:r,recentAddresses:o,accounts:a,walletAddress:i,resolvedEnv:s,selectRecipient:l}=e,d=Zn.useMemo(()=>a.filter(T=>T.address.toLowerCase()!==i.toLowerCase()),[a,i]),p=d.length>0,h=Zn.useMemo(()=>new Map(d.map((T,R)=>[nu(T.address),{account:T,index:R}])),[d]),[u,g]=Zn.useState("recent"),{tabsRef:x,indicatorStyle:y,slide:f,select:c}=Wi(u,g,Ew,[p]),b=Zn.useRef(null);Zn.useEffect(()=>{b.current?.focus()},[]);let w="1A1A2E",k=Zn.useCallback(async()=>{try{let T=await navigator.clipboard.readText();T&&n(T.trim())}catch{}},[n]),C=t.trim().length>0,N=dr(t.trim());return(0,je.jsxs)("div",{className:"sf-recipient",children:[(0,je.jsxs)("div",{className:"sf-recipient-top",children:[(0,je.jsxs)("div",{className:"sf-address-field","data-filled":C||void 0,"data-invalid":r.recipient||void 0,children:[(0,je.jsx)("textarea",{ref:b,className:"sf-address-input",value:t,onChange:T=>n(T.target.value),placeholder:"Enter the recipient's address",autoComplete:"off",spellCheck:!1,"aria-label":"Recipient address",rows:C?2:1}),C?(0,je.jsx)("button",{type:"button",className:"sf-address-action",onClick:()=>n(""),"aria-label":"Clear","data-track":"recipient_clear",children:(0,je.jsx)(Zp,{size:20})}):(0,je.jsx)("button",{type:"button",className:"sf-address-action",onClick:k,"aria-label":"Paste from clipboard","data-track":"recipient_paste",children:(0,je.jsx)(Kp,{size:20})})]}),r.recipient&&(0,je.jsx)("p",{className:"sf-field-error",role:"alert",children:r.recipient}),(0,je.jsxs)("div",{ref:x,className:"sf-tabs",role:"tablist",children:[(0,je.jsx)("button",{type:"button",role:"tab",className:"sf-tab","data-active":u==="recent"||void 0,"aria-selected":u==="recent",onClick:()=>c("recent"),"data-track":"recipient_tab","data-track-id":"recent",children:"Recent"}),p&&(0,je.jsx)("button",{type:"button",role:"tab",className:"sf-tab","data-active":u==="account"||void 0,"aria-selected":u==="account",onClick:()=>c("account"),"data-track":"recipient_tab","data-track-id":"account",children:"My Account"}),y&&(0,je.jsx)("span",{className:"sf-tab-indicator","aria-hidden":!0,"data-animate":f?!0:void 0,style:y})]})]}),(0,je.jsx)("div",{className:"sf-address-list","data-tab-slide":f??void 0,children:u==="account"&&p?d.map((T,R)=>{let S=eu(T,R),E=Sr(s,T.address,{size:56,bg:w});return(0,je.jsxs)("button",{type:"button",className:"sf-address-row",onClick:()=>l(T.address),"data-track":"recipient_item",children:[(0,je.jsxs)("span",{className:"sf-address-avatar",children:[E&&(0,je.jsx)("img",{src:E,alt:"",width:40,height:40,draggable:!1,onError:A=>{A.currentTarget.style.display="none"}}),(0,je.jsx)("span",{className:"sf-address-avatar-fallback",children:tu(S)})]}),(0,je.jsxs)("span",{className:"sf-address-meta",children:[(0,je.jsx)("span",{className:"sf-address-name",children:S}),(0,je.jsx)("span",{className:"sf-address-value",children:dn(T.address)})]})]},T.address)}):o.length>0?o.map(T=>{let R=h.get(nu(T.address)),S=R?eu(R.account,R.index):dn(T.address),E=Sr(s,T.address,{size:56,bg:w});return(0,je.jsxs)("button",{type:"button",className:"sf-address-row",onClick:()=>l(T.address),"data-track":"recipient_item",children:[(0,je.jsxs)("span",{className:"sf-address-avatar",children:[E&&(0,je.jsx)("img",{src:E,alt:"",width:40,height:40,draggable:!1,onError:A=>{A.currentTarget.style.display="none"}}),(0,je.jsx)("span",{className:"sf-address-avatar-fallback",children:tu(S)})]}),(0,je.jsxs)("span",{className:"sf-address-meta",children:[(0,je.jsx)("span",{className:"sf-address-name",children:S}),(0,je.jsx)("span",{className:"sf-address-value",children:dn(T.address)})]})]},T.address)}):(0,je.jsxs)("div",{className:"sf-history-empty",role:"status",children:[(0,je.jsx)("span",{className:"sf-history-empty-icon","aria-hidden":!0,children:(0,je.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,je.jsx)("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8M3 3v5h5M12 7v5l4 2"})})}),(0,je.jsx)("p",{className:"sf-history-empty-title",children:"No send history"}),(0,je.jsx)("p",{className:"sf-history-empty-desc",children:"Addresses you send to will appear here."})]})},u),C&&!N&&!r.recipient&&(0,je.jsx)("p",{className:"sf-field-error",role:"alert",children:"Enter a valid EVM recipient address."})]})}var Mt=require("react/jsx-runtime");function au({flow:e}){let{status:t,txHash:n,error:r,copyHash:o,hashCopied:a,openTransaction:i}=e,s=t==="error",l=t==="success";return s?(0,Mt.jsxs)("div",{className:"sf-body sf-result sf-result--error",children:[(0,Mt.jsx)("span",{className:"sf-result-icon",children:(0,Mt.jsx)($p,{size:56})}),(0,Mt.jsxs)("div",{className:"sf-result-copy",children:[(0,Mt.jsx)("h3",{className:"sf-result-title",children:"Transaction Failed"}),(0,Mt.jsx)("p",{className:"sf-result-desc",children:r||"Something went wrong. Please try again."})]}),n&&(0,Mt.jsx)(ou,{txHash:n,hashCopied:a,onCopy:o,onOpen:i})]}):(0,Mt.jsxs)("div",{className:"sf-body sf-result",children:[(0,Mt.jsx)("span",{className:"sf-result-icon","data-pending":!l||void 0,children:l?(0,Mt.jsx)(Jp,{size:56}):(0,Mt.jsx)("span",{className:"sf-result-spinner"})}),(0,Mt.jsxs)("div",{className:"sf-result-copy",children:[(0,Mt.jsx)("h3",{className:"sf-result-title",children:l?"Transaction Complete":"Transaction in Progress"}),(0,Mt.jsx)("p",{className:"sf-result-desc",children:l?"Your transfer was sent successfully.":"Transfer in progress. Waiting for confirmation."})]}),n&&(0,Mt.jsx)(ou,{txHash:n,hashCopied:a,onCopy:o,onOpen:i})]})}function ou({txHash:e,hashCopied:t,onCopy:n,onOpen:r}){return(0,Mt.jsxs)("div",{className:"sf-result-hash-card",children:[(0,Mt.jsx)("span",{className:"sf-result-hash-label",children:"Transaction Hash"}),(0,Mt.jsxs)("div",{className:"sf-result-hash-row",children:[(0,Mt.jsx)("button",{type:"button",className:"sf-result-hash-link",onClick:r,"aria-label":"Open transaction in explorer","data-track":"tx_link_open",children:dn(e)}),(0,Mt.jsx)("button",{type:"button",className:"sf-result-copy-btn",onClick:n,"aria-label":"Copy transaction hash","data-track":"tx_hash_copy",children:t?(0,Mt.jsx)(qn,{size:16}):"Copy"})]})]})}var Fe=require("react/jsx-runtime"),Gi="\u2014";function iu({flow:e}){let{token:t,reviewRawAmount:n,reviewRecipient:r,accountName:o,accounts:a,walletAddress:i,networkName:s,nativeSymbol:l,nativeDecimals:d,gasEstimate:p,gasLoading:h,gasError:u,insufficientGas:g,error:x,resolvedEnv:y}=e,f=Wr(t),c=n!==null?cr(n,t.quantity.decimals):"",b=o?.trim()||`Account ${(a[0]?.index??0)+1}`,w=Sr(y,i,{size:56,bg:"1A1A2E"}),k=l||(f?t.symbol:""),C=Pi(t.chainId),N=p?zp(p,C):null,T=p?Bi(p,C):null,R=D=>D!==null&&k?`${Zl(D,d)} ${k}`:Gi,S=D=>D!==void 0?`${Op(D)} Gwei`:Gi,E=(()=>{if(!f||!p||T===null||n===null)return Gi;let D=n+T;return`${Zl(D,d)} ${k||t.symbol}`})(),A=D=>h?"\u2026":D,F=[{label:"Est. Tx Fee",value:A(R(T))},...N==="dynamic"?[{label:"Max Priority Fee",value:A(S(p?.maxPriorityFeePerGas))},{label:"Max Gas Fee",value:A(S(p?.maxFeePerGas))}]:N==="legacy"?[{label:"Gas Price",value:A(S(p?Oi(p):void 0))}]:[],{label:"Gas Limit",value:A(p?Bp(p.gasLimit):Gi)}];return(0,Fe.jsxs)("div",{className:"sf-body sf-review",children:[(0,Fe.jsxs)("div",{className:"sf-review-amount",children:[(0,Fe.jsx)("img",{className:"sf-review-amount-icon",src:t.icon_url,alt:"",width:40,height:40,draggable:!1,onError:D=>{D.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),(0,Fe.jsxs)("span",{className:"sf-review-amount-value",children:[c,(0,Fe.jsx)("span",{className:"sf-review-amount-symbol",children:t.symbol})]})]}),(0,Fe.jsxs)("div",{className:"sf-review-parties",children:[(0,Fe.jsxs)("div",{className:"sf-review-card sf-review-party",children:[(0,Fe.jsx)("span",{className:"sf-review-party-label",children:"From"}),(0,Fe.jsxs)("div",{className:"sf-review-party-head",children:[(0,Fe.jsx)("span",{className:"sf-review-party-avatar",children:w&&(0,Fe.jsx)("img",{src:w,alt:"",width:28,height:28,draggable:!1,onError:D=>{D.currentTarget.style.display="none"}})}),(0,Fe.jsx)("span",{className:"sf-review-party-name",children:b})]}),(0,Fe.jsx)("span",{className:"sf-review-party-addr",children:i})]}),(0,Fe.jsx)("span",{className:"sf-review-arrow","aria-hidden":!0,children:(0,Fe.jsx)(Xp,{size:16})}),(0,Fe.jsxs)("div",{className:"sf-review-card sf-review-party",children:[(0,Fe.jsx)("span",{className:"sf-review-party-label",children:"To"}),(0,Fe.jsx)("span",{className:"sf-review-party-addr",children:r})]})]}),(0,Fe.jsxs)("section",{className:"sf-review-card",children:[(0,Fe.jsx)("h3",{className:"sf-review-section-title",children:"Summary"}),(0,Fe.jsxs)("div",{className:"sf-review-row",children:[(0,Fe.jsx)("span",{className:"sf-review-row-label",children:"Network"}),(0,Fe.jsx)("span",{className:"sf-review-row-value",children:s})]}),F.map(D=>(0,Fe.jsxs)("div",{className:"sf-review-row",children:[(0,Fe.jsx)("span",{className:"sf-review-row-label",children:D.label}),(0,Fe.jsx)("span",{className:"sf-review-row-value",children:D.value})]},D.label))]}),(0,Fe.jsxs)("section",{className:"sf-review-card",children:[(0,Fe.jsx)("h3",{className:"sf-review-section-title",children:"Total"}),(0,Fe.jsxs)("div",{className:"sf-review-row",children:[(0,Fe.jsx)("span",{className:"sf-review-row-label",children:"Total Amount"}),(0,Fe.jsxs)("span",{className:"sf-review-row-value",children:[c," ",t.symbol]})]}),f&&(0,Fe.jsxs)("div",{className:"sf-review-row",children:[(0,Fe.jsx)("span",{className:"sf-review-row-label",children:"Max. Total Amount"}),(0,Fe.jsx)("span",{className:"sf-review-row-value",children:A(E)})]})]}),g&&!u&&!x&&(0,Fe.jsxs)("div",{className:"sf-message sf-message--error",role:"alert",children:["Not enough ",k||t.symbol," to cover the amount plus the network fee. Reduce the amount and try again."]}),(u||x)&&(0,Fe.jsx)("div",{className:"sf-message sf-message--error",role:"alert",children:u||x})]})}var Hi=H(require("react"),1);var mn=require("react/jsx-runtime");function su({flow:e}){let[t,n]=Hi.useState(""),r=t.trim().toLowerCase(),o=Hi.useMemo(()=>r?e.tokens.filter(a=>a.symbol.toLowerCase().includes(r)||a.name.toLowerCase().includes(r)):e.tokens,[e.tokens,r]);return(0,mn.jsxs)("div",{className:"sf-body sf-token-select",children:[(0,mn.jsxs)("div",{className:"sf-search",children:[(0,mn.jsx)(Yp,{size:20}),(0,mn.jsx)("input",{className:"sf-search-input",value:t,onChange:a=>n(a.target.value),placeholder:"Search Tokens",autoComplete:"off",spellCheck:!1,"aria-label":"Search tokens"})]}),(0,mn.jsxs)("div",{className:"sf-token-list",children:[o.map(a=>{let i=`${a.chainId}:${a.address.toLowerCase()}`,s=ga(e.resolvedEnv,a.chainId),l=e.getTokenPriceUsd?.(a);return(0,mn.jsxs)("button",{type:"button",className:"sf-token-row",onClick:()=>e.selectToken(a),"data-track":"token_item","data-track-id":a.symbol,children:[(0,mn.jsxs)("span",{className:"sf-token-left",children:[(0,mn.jsxs)("span",{className:"sf-token-icon-wrap",children:[(0,mn.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,mn.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,mn.jsx)("span",{className:"sf-token-name",children:a.symbol})]}),(0,mn.jsxs)("span",{className:"sf-token-right",children:[(0,mn.jsx)("span",{className:"sf-token-balance",children:Rr(a.quantity.numeric,a.quantity.decimals)}),l!==void 0&&(0,mn.jsx)("span",{className:"sf-token-price",children:zi(l)})]})]},i)}),o.length===0&&(0,mn.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-history-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:48px 24px;text-align:center}.sf-history-empty-icon{display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin-bottom:6px;border-radius:50%;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-history-empty-title{margin:0;font-size:15px;font-weight:600;line-height:1.3;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-history-empty-desc{margin:0;font-size:13px;line-height:1.4;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-field-error{margin:8px 24px 0;font-family:inherit;font-size:12px;line-height:1.5;color:var(--ds-system-red-default, #da0b2e)}.sf-message--error{margin:16px 0 0;padding:12px 16px;background:var(--ds-system-red-low, #ffeeee);color:var(--ds-system-red-high, #d20609);font-family:inherit;font-size:13px;line-height:1.5;border-radius:12px;width:100%;box-sizing:border-box}.sf-footer{display:flex;flex-shrink:0;padding:16px 24px 24px}.sf-footer:empty{display:none}.sf-footer-row{display:flex;gap:8px;width:100%}.sf-footer-row .sf-btn,.sf-footer-row .sf-btn--secondary{flex:1 1 0;min-width:0}.sf-footer>.sf-btn{width:100%}.sf-btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:1;height:48px;padding:0 24px;border:none;border-radius:12px;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;transition:background-color .15s ease,transform .1s ease}.sf-btn--primary{background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff)}.sf-btn--primary:hover:not(:disabled):not([data-disabled]){filter:brightness(1.05)}.sf-btn--primary:active:not(:disabled):not([data-disabled]){transform:scale(.97)}.sf-btn--primary[data-disabled],.sf-btn--primary:disabled{background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);cursor:default;opacity:.5}.sf-btn--secondary{flex:0 0 120px;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-token-select{padding:0;display:flex;flex-direction:column}.sf-token-select .sf-search{margin:16px 24px}.sf-token-select .sf-token-list{width:100%;margin-top:0}.sf-search{display:flex;align-items:center;gap:8px;padding:12px 16px;border-radius:12px;border:1.5px solid transparent;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-low, rgba(0, 0, 0, .4));box-sizing:border-box;transition:border-color .15s ease}.sf-search:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.sf-search:focus-within{border-color:var(--ds-accent-primary-high, #7346f3)}.sf-search-input{flex:1;min-width:0;border:none;background:transparent;outline:none;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-search-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-token-list{display:flex;flex-direction:column;margin-top:8px}.sf-token-row{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 24px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;border-radius:0;box-sizing:border-box;transition:background-color .15s ease}.sf-token-row:hover{background:var(--ds-surface-medium, rgba(0, 0, 0, .04))}.sf-token-left{display:flex;align-items:center;gap:16px;min-width:0}.sf-token-icon-wrap{position:relative;width:36px;height:36px;flex-shrink:0}.sf-token-icon{width:36px;height:36px;border-radius:0;object-fit:contain}.sf-token-chain-badge{position:absolute;right:-2px;bottom:-2px;width:16px;height:16px;border-radius:50%;object-fit:cover}.sf-token-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.sf-token-right{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0}.sf-token-balance{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);white-space:nowrap}.sf-token-price{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.sf-recipient{display:flex;flex-direction:column;flex:1;min-height:0}.sf-recipient-top{display:flex;flex-direction:column;flex-shrink:0;padding:16px 24px 0}.sf-address-field{display:flex;align-items:center;gap:8px;padding:12px;border-radius:12px;border:1.5px solid transparent;background:var(--ds-surface-medium, #f5f7fa);transition:border-color .15s ease;box-sizing:border-box}.sf-address-field:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.sf-address-field:focus-within{border-color:var(--ds-accent-primary-high, #7346f3)}.sf-address-field[data-filled]{border-color:var(--ds-accent-primary-high, #7346f3)}.sf-address-field[data-invalid]{border-color:var(--ds-system-red-default, #da0b2e)}.sf-address-input{flex:1;min-width:0;border:none;background:transparent;outline:none;resize:none;overflow:hidden;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));word-break:break-word;overflow-wrap:anywhere}.sf-address-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-address-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:none;background:transparent;border-radius:6px;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease}.sf-address-action:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-address-field[data-filled] .sf-address-action{border-radius:9999px}.sf-tabs{position:relative;display:flex;gap:20px;margin:16px 0 0}.sf-tab{position:relative;padding:10px 0 12px;border:none;background:transparent;cursor:pointer;font-family:inherit;font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-tab[data-active]{color:var(--ds-content-highest, #000000)}.sf-tab-indicator{position:absolute;left:0;bottom:0;height:3px;border-radius:3px;background:var(--ds-content-highest, #000000);pointer-events:none}.sf-tab-indicator[data-animate]{transition:transform .24s cubic-bezier(.22,1,.36,1),width .24s cubic-bezier(.22,1,.36,1)}.sf-address-list[data-tab-slide=from-right]{animation:sf-tab-slide-from-right .24s cubic-bezier(.22,1,.36,1)}.sf-address-list[data-tab-slide=from-left]{animation:sf-tab-slide-from-left .24s cubic-bezier(.22,1,.36,1)}@keyframes sf-tab-slide-from-right{0%{opacity:0;transform:translate(32px)}to{opacity:1;transform:none}}@keyframes sf-tab-slide-from-left{0%{opacity:0;transform:translate(-32px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.sf-tab-indicator[data-animate]{transition:none}.sf-address-list[data-tab-slide]{animation:none}}.sf-address-list{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;margin-top:8px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .sf-address-list{scrollbar-color:rgba(0,0,0,.12) transparent}.sf-address-list::-webkit-scrollbar{width:4px}.sf-address-list::-webkit-scrollbar-track{background:transparent}.sf-address-list::-webkit-scrollbar-thumb{border-radius:4px;background:#ffffff26}[data-theme=light] .sf-address-list::-webkit-scrollbar-thumb{background:#0000001f}.sf-address-row{display:flex;align-items:center;gap:16px;width:100%;padding:12px 24px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;border-radius:0;box-sizing:border-box;transition:background-color .15s ease}.sf-address-row:hover{background:var(--ds-surface-medium, rgba(0, 0, 0, .04))}.sf-address-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:50%;overflow:hidden;background:var(--ds-surface-high, #edf1f2);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-size:14px;font-weight:600}.sf-address-avatar img{position:absolute;inset:0;z-index:1;width:100%;height:100%;object-fit:cover}.sf-address-avatar-fallback{position:relative;z-index:0}.sf-address-meta{display:flex;flex-direction:column;min-width:0}.sf-address-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sf-address-value{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-drawer-content .sf-header{padding:16px}.wi-drawer-content .sf-header .sf-header-btn:last-child{top:16px;right:16px}.wi-drawer-content .sf-token-select{padding:0}.wi-drawer-content .sf-token-select .sf-search{margin:16px}.wi-drawer-content .sf-token-row{padding:12px 16px}.wi-drawer-content .sf-recipient-top{padding:16px 16px 0}.wi-drawer-content .sf-address-row{padding:12px 16px}.wi-drawer-content .sf-footer{padding:12px 16px 24px}.wi-drawer-content .sf-field-error,.wi-drawer-content .sf-message--error{margin:16px 0 0;width:auto}.sf-amount{display:flex;flex-direction:column}.sf-amount-center{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;padding:64px 24px 48px;text-align:center}.sf-amount-usd{font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));min-height:21px}.sf-amount-input-wrap{display:flex;justify-content:center;max-width:100%}.sf-amount-input{width:auto;max-width:100%;border:none;background:transparent;outline:none;text-align:center;font-family:inherit;font-size:40px;font-weight:700;line-height:1.25;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);field-sizing:content}.sf-amount-input-wrap[data-empty] .sf-amount-input,.sf-amount-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-amount-input-wrap[data-over] .sf-amount-input{color:var(--ds-system-red-default, #da0b2e)}.sf-amount-balance{display:inline-flex;align-items:center;gap:4px;font-family:inherit;font-size:14px;font-weight:400;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-amount-max{border:none;background:transparent;padding:0;cursor:pointer;font:inherit;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-decoration:underline;text-underline-offset:2px;transition:color .15s ease}.sf-amount-max:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-drawer-content .sf-amount-center{padding:64px 16px 48px}.sf-review{display:flex;flex-direction:column;gap:16px;padding:24px}.sf-review-amount{display:flex;align-items:center;gap:12px;padding:0;background:transparent}.sf-review-amount-icon{width:40px;height:40px;border-radius:0;object-fit:contain;flex-shrink:0}.sf-review-amount-value{display:inline-flex;flex-direction:column;align-items:flex-start;gap:0;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);word-break:break-all}.sf-review-amount-symbol{font-size:12px;font-weight:400;line-height:1.5;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-parties{position:relative;display:flex;flex-direction:column;gap:0}.sf-review-arrow{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-4px auto;border-radius:50%;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-card{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa)}.sf-review-party-label{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-party-head{display:flex;align-items:center;gap:8px}.sf-review-party-avatar{display:inline-flex;width:24px;height:24px;border-radius:50%;overflow:hidden;background:var(--ds-surface-high, #edf1f2);flex-shrink:0}.sf-review-party-avatar img{width:100%;height:100%;object-fit:cover}.sf-review-party-name{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-review-party-addr{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));word-break:break-all}.sf-review-section-title{margin:0 0 4px;font-family:inherit;font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-highest, #000000)}.sf-review-row{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.sf-review-row-label{font-family:inherit;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-row-value{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));text-align:left;word-break:break-all}.wi-drawer-content .sf-review{padding:16px}.sf-result{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;padding:48px 24px;text-align:center}.sf-result-icon{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px}.sf-result-spinner{width:56px;height:56px;border-radius:50%;border:4px solid var(--ds-border-medium, rgba(0, 0, 0, .18));border-top-color:var(--ds-accent-primary-high, #7346f3);animation:sf-spin .8s linear infinite}@keyframes sf-spin{to{transform:rotate(360deg)}}.sf-result-copy{display:flex;flex-direction:column;gap:8px}.sf-result-title{margin:0;font-family:inherit;font-size:18px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-highest, #000000)}.sf-result-desc{margin:0;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-result-hash-card{display:flex;flex-direction:column;gap:8px;width:100%;padding:16px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);text-align:left}.sf-result-hash-label{font-family:inherit;font-size:12px;font-weight:500;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-result-hash-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.sf-result-hash-link{border:none;background:transparent;padding:0;cursor:pointer;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;color:var(--ds-accent-primary-high, #7346f3)}.sf-result-copy-btn{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:28px;padding:0 10px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));border-radius:8px;background:var(--ds-surface-default, #ffffff);cursor:pointer;font-family:inherit;font-size:12px;font-weight:500;color:var(--ds-content-high, rgba(0, 0, 0, .85))}
|
|
7
|
+
`);var Nt=require("react/jsx-runtime"),Aw={token:"Send",recipient:"Send",amount:"Send",review:"Sign Transaction",result:""};function ha({onClose:e,onBackToWallet:t,onConfirmSuccess:n,onSuccess:r,className:o,...a}){let i=lu.useCallback(c=>{r?.(c),n?.(c)},[n,r]),l=Vp({...a,onSuccess:r||n?i:void 0,onExit:t}),{step:d,status:p}=l,h=dr(l.recipient.trim()),u=Nr(l.amount,l.token.quantity.decimals),g="value"in u&&u.value<=l.balanceRaw,x=p==="submitting"||p==="confirming",y=d!=="result",f=Aw[d]??"";return(0,Nt.jsx)(Me,{feature:"send",children:(0,Nt.jsxs)("div",{className:Ie("sf-root",o),"data-step":d,children:[(0,Nt.jsxs)("header",{className:"sf-header",children:[y?(0,Nt.jsx)("button",{type:"button",className:"sf-header-btn",onClick:l.back,"aria-label":"Back","data-track":"back",children:(0,Nt.jsx)(En,{size:24})}):(0,Nt.jsx)("span",{className:"sf-header-btn","aria-hidden":!0}),(0,Nt.jsx)("span",{className:"sf-header-title",children:f}),(0,Nt.jsx)("button",{type:"button",className:"sf-header-btn",onClick:e,"aria-label":"Close","data-track":"close","data-wi-close":!0,children:(0,Nt.jsx)(vn,{size:24})})]}),d==="token"&&(0,Nt.jsx)(su,{flow:l}),d==="recipient"&&(0,Nt.jsx)(ru,{flow:l}),d==="amount"&&(0,Nt.jsx)(Qp,{flow:l}),d==="review"&&(0,Nt.jsx)(iu,{flow:l}),d==="result"&&(0,Nt.jsx)(au,{flow:l}),(0,Nt.jsxs)("footer",{className:"sf-footer","data-step":d,children:[d==="recipient"&&(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.submitRecipient,"data-disabled":!h||void 0,"aria-disabled":!h,"data-track":"recipient_next",children:"Next"}),d==="amount"&&(0,Nt.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,Nt.jsxs)("div",{className:"sf-footer-row",children:[(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--secondary",onClick:l.back,disabled:x,"data-track":"review_cancel",children:"Cancel"}),(0,Nt.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"&&p==="success"&&(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:()=>n?.(l.txHash||void 0),"data-track":"result_ok",children:"All done"}),d==="result"&&p==="error"&&(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.retry,"data-track":"result_retry",children:"Try Again"})]})]})})}function _i({env:e,theme:t="dark",showBalance:n=!1,showForgeToken:r=!1,showGameToken:o=!0,showQR:a=!0,showBridge:i=!0,showNft:s=!1,qrLogoSrc:l,walletAddress:d,accountName:p,sendAccounts:h,profileImageUrl:u,connectorId:g,connectorName:x,connectorIconUrl:y,preferredTokens:f=[],onSelectWallet:c,onCopyAddress:b,onBuy:w,onBuyDisabledMessage:k,onBridgeDisabledMessage:C,onSendDisabledMessage:N,onDisconnect:T,disconnectLabel:R="Disconnect",termsUrl:S=Mi,termsLabel:E="Terms of Service",privacyUrl:A=Li,privacyLabel:F="Privacy Policy",showPortfolio:D=!1,showOnePop:G=!1,onePopSummary:M,onOnePopOpen:j,onOnePopSend:le,onOnePopClaim:oe,onOnePopActivity:ne,onOnePopRepliesSeen:Q,onePopGetTokenSlot:ee,onePopLogoSrc:z,onePopHeroSrc:q,portfolioTitle:ae="My Portfolio",portfolioSections:Z,showTotalAssets:pe=!0,totalAssetsLabel:Se="Total Assets USD",sendTransaction:Ue,getTransactionReceipt:fe,estimateGas:Re,onOutlink:Ce,lpBalanceReader:tt,stakingRewardsReader:Le,bridgeTokens:$e,bridgeHistory:wt,getBridgeQuote:Ge,getBridgeToTokens:Qe,getBridgeApproval:He,approveBridge:Dt,submitBridge:tn,onReceive:yt,onBridge:Pt,onSend:Tt,style:nn},{presentation:It,open:ut,isMobile:Ot,drawerDirection:rt,modal:on,close:ft}){let fn=it(e),Ze=g?pa[g]:void 0,lt=x??Ze?.name,nt=y??Ze?.iconUrl,[Et,Rt]=gn.useState(null),[Xe,an]=gn.useState("top"),[sn,Yt]=gn.useState(null),[ln,V]=gn.useState("wallet"),[ve,Ne]=gn.useState(null),[ze,ot]=gn.useState(null),[Kt,Bt]=gn.useState(null),[Cn,Rn]=gn.useState(null),O=gn.useCallback(()=>{V("wallet"),Ne(null),ot(null),Bt(null),Rn(null)},[]);gn.useEffect(()=>{ut||O()},[ut,O]);let De=ft??O;gn.useEffect(()=>{ro(d)},[d]);let qe=gn.useCallback(()=>{Yl(d),T?.()},[T,d]);return gn.useMemo(()=>({presentation:It,env:fn,theme:t,isMobile:Ot,open:ut,drawerDirection:rt,modal:on,showBalance:n,showForgeToken:r,showGameToken:o,showQR:a,showBridge:i,showNft:s,qrLogoSrc:l,walletAddress:d,accountName:p,sendAccounts:h,profileImageUrl:u,connectorName:lt,connectorIconUrl:nt,preferredTokens:f,close:De,onSelectWallet:c,onCopyAddress:b,onBuy:w,onBuyDisabledMessage:k,onBridgeDisabledMessage:C,onSendDisabledMessage:N,onDisconnect:T?qe:void 0,disconnectLabel:R,termsUrl:S,termsLabel:E,privacyUrl:A,privacyLabel:F,portalStyle:nn,navContent:Et,navPosition:Xe,setNavContent:Rt,setNavPosition:an,footerContent:sn,setFooterContent:Yt,view:ln,setView:V,selectedSendToken:ve,setSelectedSendToken:Ne,selectedDetailToken:ze,setSelectedDetailToken:ot,selectedNftCollection:Kt,setSelectedNftCollection:Bt,selectedNft:Cn,setSelectedNft:Rn,showPortfolio:D,showOnePop:G,onePopSummary:M,onOnePopOpen:j,onOnePopSend:le,onOnePopClaim:oe,onOnePopActivity:ne,onOnePopRepliesSeen:Q,onePopGetTokenSlot:ee,onePopLogoSrc:z,onePopHeroSrc:q,portfolioTitle:ae,portfolioSections:Z,showTotalAssets:pe,totalAssetsLabel:Se,sendTransaction:Ue,getTransactionReceipt:fe,estimateGas:Re,onOutlink:Ce,lpBalanceReader:tt,stakingRewardsReader:Le,bridgeTokens:$e,bridgeHistory:wt,getBridgeQuote:Ge,getBridgeToTokens:Qe,getBridgeApproval:He,approveBridge:Dt,submitBridge:tn,onReceive:yt,onBridge:Pt,onSend:Tt}),[It,fn,t,Ot,ut,rt,on,n,r,o,a,i,s,l,d,p,h,u,lt,nt,f,De,c,b,w,k,C,N,T,qe,R,S,E,A,F,nn,Et,Xe,sn,ln,ve,ze,Kt,Cn,D,G,M,j,le,oe,ne,Q,ee,z,q,ae,Z,pe,Se,Ue,fe,Re,Ce,tt,Le,$e,wt,Ge,Qe,He,Dt,tn,yt,Pt,Tt])}var du=H(require("@radix-ui/react-popover"),1),cu=require("vaul");var lo=require("react/jsx-runtime");function pu({asChild:e,className:t,children:n}){let{isMobile:r,theme:o,walletAddress:a}=Ur(),i=n!=null,s=e??!0,l=i?n:(0,lo.jsxs)("button",{type:"button",className:Ie("wi-trigger-btn",t),"data-theme":o,"data-mobile":r||void 0,children:[(0,lo.jsx)(gp,{size:r?14:16}),(0,lo.jsx)("span",{className:"wi-trigger-address",children:dn(a)})]});return r?(0,lo.jsx)(cu.Drawer.Trigger,{asChild:s,children:l}):(0,lo.jsx)(du.Trigger,{asChild:s,children:l})}var J=H(require("react"),1),As=H(require("@radix-ui/react-popover"),1),Oa=require("vaul");var jd=H(require("bignumber.js"),1);var Vi=H(require("bignumber.js"),1),Mw=/^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i;function kt(e){if(e==null)return null;if(e instanceof Vi.default)return e.isFinite()?e:null;if(typeof e=="number")return Number.isFinite(e)?new Vi.default(e):null;let t=String(e).replace(/[,%\s]/g,"");if(!Mw.test(t))return null;let n=new Vi.default(t);return n.isFinite()?n:null}var hu=require("@tanstack/react-query"),bu=require("react");var Qi=H(require("react"),1);function uu(e){if(!e||typeof e!="object")return;let t=[],n=new Set,r=[],o=[];for(let[a,i]of Object.entries(e)){if(i?.balance!==!0)continue;if(!Fc(a)){r.push(a);continue}let s=Uc(a);if(s===void 0){o.push(a);continue}n.has(s)||(n.add(s),t.push(s))}if(t.length!==0)return{chainIds:t,skippedNonEvm:r,skippedMalformed:o}}var fu=new Set;function mu(e,t){fu.has(e)||(fu.add(e),console.warn(t))}function gu(e){let t=Xt(to,e,Qi.useCallback(r=>{let o=uu(r?.chains);if(o)return o.skippedNonEvm.length>0&&mu(`${e}:non-evm`,`[dapp-ui] chains.json (${e}): EVM \uC774 \uC544\uB2CC \uCCB4\uC778\uC740 \uC790\uC0B0 \uBAA9\uB85D\uC5D0\uC11C \uC81C\uC678\uD569\uB2C8\uB2E4 \u2014 ${o.skippedNonEvm.join(", ")}`),o.skippedMalformed.length>0&&mu(`${e}:malformed`,`[dapp-ui] chains.json (${e}): chainId \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC544 \uC81C\uC678\uD569\uB2C8\uB2E4 \u2014 ${o.skippedMalformed.join(", ")}`),o.chainIds},[e])),n=Qi.useMemo(()=>Hl(e),[e]);return t??n}var qi="user-balance";async function Lw(e,t,n,r){let o=new URLSearchParams({networkId:t,account:n}),a=await fetch(`${e}/v1/public/token/balance?${o}`,{cache:"no-store",signal:r});if(!a.ok)throw new Error(`Failed to fetch token balance: ${a.status}`);let i=await a.json();if(i.code!==200)throw new Error(`Token balance API error: ${i.code}`);return i.data}function Tr(e,t,n=!0){let r=gu(e),o=(0,hu.useQueries)({queries:r.map(l=>({queryKey:[qi,e,t,l],queryFn:async({signal:d})=>Lw(await Be("walletServer",e),l,t,d),enabled:!!t&&n,staleTime:0,refetchInterval:n?5e3:!1}))}),a=o.some(l=>l.isLoading),i=o.some(l=>l.isError);return{tokens:(0,bu.useMemo)(()=>{let l=[];for(let d of o)d.data&&l.push(...d.data);return l},[o]),isLoading:a,isError:i}}var Yi=require("@tanstack/react-query"),wu=require("react");var Dw="forge-holdings",Pw="forge-token-image";async function Ow(e,t,n){let r=await fetch(`${e}/v1/users/${t}/holdings`,{cache:"no-store",signal:n});if(!r.ok)throw new Error(`Failed to fetch forge holdings: ${r.status}`);let o=await r.json();if(!o.success)throw new Error("Forge holdings API error");return o.data.items}async function Bw(e,t,n){let r=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store",signal:n});if(!r.ok)return{address:t,image_url:""};let o=await r.json();return o.success?{address:t,image_url:o.data.token.image_url}:{address:t,image_url:""}}function yu(e,t,n=!0){let{data:r,...o}=(0,Yi.useQuery)({queryKey:[Dw,e,t],queryFn:async({signal:a})=>Ow(await Be("bondingCurve",e),t,a),enabled:!!t&&n,staleTime:0,refetchInterval:n?5e3:!1});return{holdings:r??[],...o}}function xu(e,t,n=!0){let r=(0,Yi.useQueries)({queries:t.map(a=>({queryKey:[Pw,e,a],queryFn:async({signal:i})=>Bw(await Be("bondingCurve",e),a,i),enabled:n,staleTime:1/0}))});return{imageMap:(0,wu.useMemo)(()=>{let a=new Map;for(let i of r)i.data&&a.set(i.data.address,i.data.image_url);return a},[r])}}var vu=require("@tanstack/react-query"),ku=require("react");var Ki="token-stats";function ur(e,t){return`${e}:${t.toLowerCase()}`}function Ir(e,t=!0){let{data:n,...r}=(0,vu.useQuery)({queryKey:[Ki,e],queryFn:async({signal:a})=>{let i=await Be("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,ku.useMemo)(()=>{let a=new Map;if(!n?.data)return a;for(let i of n.data){let s=ur(i.chain_id,i.address);a.set(s,i)}return a},[n]),...r}}var Cu=require("@tanstack/react-query"),zw="crossd-apr",Ru=6e4,Fw="https://crossd-dashboard-api.crossdefi.io/api/v1/overview",Zi,ba;function td(){return Zi&&Zi.expiresAt>Date.now()?Promise.resolve(Zi.value):ba||(ba=(async()=>{let e=await fetch(Fw,{cache:"no-store"});if(!e.ok)throw new Error(`Failed to fetch CROSSD overview: ${e.status}`);let t=await e.json();if(t.code!==200)throw new Error(`CROSSD overview API error: ${t.code}`);let n=parseFloat(t.data.est_last_epoch_apy);if(!Number.isFinite(n))throw new Error("CROSSD overview returned a non-numeric APR");let r=n*100;return Zi={value:r,expiresAt:Date.now()+Ru},r})().finally(()=>{ba=void 0}),ba)}function Xi(e){let t=Math.abs(e),n=(e>=0?Math.floor:Math.ceil)(t*100)/100;return`APR ${e>=0?"+":"-"}${n}%`}function Nu(){let{data:e,...t}=(0,Cu.useQuery)({queryKey:[zw],queryFn:td,staleTime:Ru});return{aprPercent:e??null,...t}}var Su=require("@tanstack/react-query"),nd=require("react");var Uw="token-info";function Ji(e,t){return`${t.toLowerCase()}_${e}`}function Tu(e,t=!0){let{data:n,...r}=(0,Su.useQuery)({queryKey:[Uw,e],queryFn:async({signal:i})=>{let s=await Be("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,nd.useMemo)(()=>{let i=new Map;if(!n?.data)return i;for(let s of n.data){let l=Ji(s.chain_id,s.address);i.set(l,s.category)}return i},[n]),a=(0,nd.useMemo)(()=>{let i=new Map;if(!n?.data)return i;for(let s of n.data)i.set(Ji(s.chain_id,s.address),s);return i},[n]);return{categoryMap:o,infoMap:a,...r}}var Iu=require("react"),Eu=H(require("bignumber.js"),1);function Au(e,t,n){let{tokens:r,isLoading:o}=Tr(e,t,n),{statsMap:a}=Ir(e,n);return(0,Iu.useMemo)(()=>{let i=new Eu.default(0);for(let p of r){let h=a.get(ur(p.chainId,p.address));if(!h)continue;let u=kt(p.quantity.numeric),g=kt(h.price);if(!u||!g)continue;let x=u.shiftedBy(-p.quantity.decimals).multipliedBy(g);x.isNaN()||(i=i.plus(x))}let s=i.toFixed(),{displayValue:l,isLowerBound:d}=Tp(s);return{totalUsd:s,displayValue:l,isLowerBound:d,isLoading:o}},[r,a,o])}var od=H(require("bignumber.js"),1);var jw=/^0x[0-9a-f]{40}$/i;function Lu(e){if(!Array.isArray(e)||e.length===0)return;let t=[];for(let n of e){if(!n||typeof n!="object")return;let{chainId:r,address:o}=n,a=mi(r);if(a===void 0||typeof o!="string")return;let i=o.trim();if(!jw.test(i))return;t.push({chainId:a,address:i.toLowerCase()})}return t}function Ww(e){return new Map(e.map((t,n)=>[`${t.chainId}:${t.address.toLowerCase()}`,n]))}var Gw=new od.default("0.0001");function rd(e){return(kt(e.quantity.numeric)??new od.default(0)).shiftedBy(-e.quantity.decimals)}function Mu(e,t){return`${e}:${t.toLowerCase()}`}function Hw(e,t){return`${t.toLowerCase()}_${e}`}function Du({env:e,tokens:t,pinnedTokens:n,preferredTokens:r,statsMap:o,categoryMap:a,showGameToken:i}){let s=[],l=[],d=[],p=[],h=new Set;for(let f of o.values())h.add(f.chain_id);let u=h.size>0,g=Ww(n??ji(e)),x=new Map;(r??[]).forEach((f,c)=>{let b=mi(f.chainId);b!==void 0&&x.set(`${b}:${f.address.toLowerCase()}`,c)});for(let f of t){let c=`${f.chainId}:${f.address.toLowerCase()}`,b=g.has(c),w=x.get(c);if(b)s.push(f);else if(w!==void 0)d.push(f);else if(rd(f).isGreaterThanOrEqualTo(Gw)){if(!i&&a.get(Hw(f.chainId,f.address))==="game")continue;u&&!h.has(f.chainId)?l.push(f):p.push(f)}}s.sort((f,c)=>{let b=g.get(`${f.chainId}:${f.address.toLowerCase()}`)??99,w=g.get(`${c.chainId}:${c.address.toLowerCase()}`)??99;return b-w}),d.sort((f,c)=>{let b=x.get(`${f.chainId}:${f.address.toLowerCase()}`)??99,w=x.get(`${c.chainId}:${c.address.toLowerCase()}`)??99;return b-w});let y=(f,c)=>{let b=o.get(Mu(f.chainId,f.address)),w=o.get(Mu(c.chainId,c.address)),k=rd(f).multipliedBy(kt(b?.price)??0);return rd(c).multipliedBy(kt(w?.price)??0).minus(k).toNumber()};return l.sort(y),p.sort(y),[...s,...l,...d,...p]}var $i=H(require("react"),1);var Pu=new Set;function _w(e){Pu.has(e)||(Pu.add(e),console.warn(`[dapp-ui] apps.json walletInfo.pinnedTokens (${e}) \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC544 \uBB34\uC2DC\uD569\uB2C8\uB2E4 \u2014 \uAE30\uBCF8 \uACE0\uC815 \uBAA9\uB85D\uC73C\uB85C \uD3F4\uBC31\uD569\uB2C8\uB2E4.`))}function Ou(e){let t=Xt(gi,e,$i.useCallback(r=>{let o=r?.walletInfo?.pinnedTokens;if(o===void 0)return;let a=Lu(o);if(!a){_w(e);return}return a},[e])),n=$i.useMemo(()=>ji(e),[e]);return t??n}var Jg=require("qrcode.react");var $g=require("@nexus-cross/crossx-design-system");var _u=require("@nexus-cross/crossx-design-system");var ts=require("@nexus-cross/crossx-design-system");var Ee=require("react/jsx-runtime"),Vw='<svg width="100%" height="100%" viewBox="0 0 640 640" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_75048_28969)"><rect width="640" height="640" rx="100" fill="white"/><path d="M640.092 -0.18042H0.0917969V639.82H640.092V-0.18042Z" fill="#CE3E35"/><path d="M43.6074 104.484C43.6074 71.3473 70.4703 44.4844 103.607 44.4844H536.393C569.53 44.4844 596.393 71.3473 596.393 104.484V346.514H43.6074V104.484Z" fill="white"/><g filter="url(#filter0_d_75048_28969)"><path d="M639.908 639.822H0.0917969V158.676C0.0917969 136.585 18.0004 118.676 40.0918 118.676H218.544C237.426 118.676 252.868 132.846 264.251 147.912C277.196 165.045 297.355 176.058 319.999 176.058C342.644 176.058 362.803 165.045 375.748 147.912C387.131 132.846 402.573 118.676 421.455 118.676H599.908C622 118.676 639.908 136.585 639.908 158.676V639.822Z" fill="url(#paint0_linear_75048_28969)"/></g><path d="M223.621 639.503H639.909V181.499L223.621 448.166V639.503Z" fill="url(#paint1_linear_75048_28969)"/><path d="M223.645 639.819H0.0917969V212.869L223.645 449.197V639.819Z" fill="url(#paint2_linear_75048_28969)"/><g filter="url(#filter1_d_75048_28969)"><path d="M317.103 250.341L228.024 301.829C212.311 310.864 206.867 331.162 215.899 346.881C224.93 362.6 245.221 368.046 260.933 359.01L336.28 315.444L300.401 353.936V504.934C300.401 523.129 315.247 537.981 333.434 537.981C351.621 537.981 366.468 523.129 366.468 504.934V278.932C366.468 272.62 364.489 266.431 362.014 262.347C352.735 246.752 332.692 241.182 316.979 250.217L317.103 250.341Z" fill="white"/></g></g><defs><filter id="filter0_d_75048_28969" x="-19.9082" y="93.6763" width="679.816" height="561.146" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="-5"/><feGaussianBlur stdDeviation="10"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0.892803 0 0 0 0 0.220099 0 0 0 0 0.293135 0 0 0 0.5 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_75048_28969"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_75048_28969" result="shape"/></filter><filter id="filter1_d_75048_28969" x="190.367" y="224.71" width="211.348" height="348.518" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="7.03953" dy="7.03953"/><feGaussianBlur stdDeviation="14.1039"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_75048_28969"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_75048_28969" result="shape"/></filter><linearGradient id="paint0_linear_75048_28969" x1="-74.0158" y1="54.6376" x2="542.251" y2="802.323" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_75048_28969" x1="159.749" y1="206.729" x2="471.286" y2="474.513" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_75048_28969" x1="399.134" y1="82.7297" x2="104.683" y2="466.123" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_75048_28969"><rect width="640" height="640" rx="100" fill="white"/></clipPath></defs></svg>',Qw=`data:image/svg+xml,${encodeURIComponent(Vw)}`;function es(){return(0,Ee.jsx)("img",{src:Qw,width:40,height:40,alt:"",style:{display:"block"}})}function Bu(){return(0,Ee.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[(0,Ee.jsxs)("g",{clipPath:"url(#clip0_1331_27065)",children:[(0,Ee.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,Ee.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,Ee.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,Ee.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,Ee.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,Ee.jsx)("path",{d:"M22.1857 36.1951V39.831H17.6699V36.1951H22.1857Z",fill:"#C0C4CD"}),(0,Ee.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,Ee.jsx)("defs",{children:(0,Ee.jsx)("clipPath",{id:"clip0_1331_27065",children:(0,Ee.jsx)("rect",{width:"40",height:"40",fill:"white"})})})]})}function zu(){return(0,Ee.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ee.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,Ee.jsx)("path",{d:"M9.04 20L4.52 15.48L0 20L4.52 24.52L9.04 20Z",fill:"#F3BA2F"}),(0,Ee.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,Ee.jsx)("path",{d:"M35.48 24.52L40 20L35.48 15.48L30.96 20L35.48 24.52Z",fill:"#F3BA2F"}),(0,Ee.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 Fu(){return(0,Ee.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"246",viewBox:"0 0 247 246",fill:"none",children:[(0,Ee.jsx)("rect",{width:"247.005",height:"245.105",rx:"36",fill:"#121212"}),(0,Ee.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,Ee.jsx)("path",{d:"M59.8364 99.8915V59.7551H12.0414L30.4787 77.8377V99.8915H59.8364Z",fill:"#2FD7FF"}),(0,Ee.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 Uu(){return(0,Ee.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ee.jsxs)("g",{clipPath:"url(#clip0_1185_7785)",children:[(0,Ee.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,Ee.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,Ee.jsx)("defs",{children:(0,Ee.jsx)("clipPath",{id:"clip0_1185_7785",children:(0,Ee.jsx)("rect",{width:"28",height:"28",fill:"white"})})})]})}function ju(){return(0,Ee.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ee.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,Ee.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,Ee.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,Ee.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 Wu(){return(0,Ee.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Ee.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 Gu(){return(0,Ee.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ee.jsx)("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var Fo={cross_embedded:{id:"cross_embedded",name:ts.WALLET_LABELS.social,description:"Sign in with Google or Apple",icon:es},cross_wallet:{id:"cross_wallet",name:ts.WALLET_LABELS.app,description:"App approval is required",icon:es,featured:!0},cross_extension:{id:"cross_extension",name:ts.WALLET_LABELS.extension,description:"Browser extension approval is required",icon:es,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:Bu,rdns:"io.metamask"},binance:{id:"binance",name:"Binance",description:"Mobile app only \u2014 Add CROSS network first",icon:zu},verse8:{id:"verse8",name:"Verse8 Wallet",description:"Optimized for Forge and Verse8 ecosystem",icon:Fu,badge:"For Forge"},tron:{id:"tron",name:"Tron Wallet",description:"Dedicated for Tron-based transactions and assets",icon:Uu,badge:"For SHOP"}};function ad(e){return Fo[e]}var ns={google:{id:"google",name:"Google",icon:ju},apple:{id:"apple",name:"Apple",icon:Wu}};function Hu(e){return ns[e]}var Vu="dappui.wcm.last-selected",qw=new Set(["google","apple"]);function Qu(e){try{window.localStorage.setItem(Vu,e)}catch{}}function qu(){let e=null;try{e=window.localStorage.getItem(Vu)}catch{return}if(e)return qw.has(e)?_u.WALLET_LABELS.default:Fo[e]?.name}function jt(e,t,n,r){if(!r||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;e.preventDefault();let o;try{o=r(t,n)}catch(d){console.error("[dapp-ui] onOutlink threw:",d);return}let a=d=>{typeof window>"u"||window.open(d,"_blank","noopener,noreferrer")};if((d=>!!d&&(typeof d=="object"||typeof d=="function")&&typeof d.then=="function")(o)){let d=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null,p=h=>{if(h===null){d?.close();return}let u=h??t;if(d)try{d.location.href=u}catch{d.close(),a(u)}else a(u)};o.then(p,h=>{console.error("[dapp-ui] onOutlink rejected:",h),d?.close()});return}let s=o;if(s===null)return;a(s??t)}var mo=H(require("react"),1),xm=require("vaul");var jo=require("react");var An=H(require("bignumber.js"),1),Yw=/^(\d{4}-\d{2}-\d{2})/;function Yu(e){if(!e||e.length===0)return;let t=new Map,n;for(let{key:o,cumulative:a}of e.map(i=>({key:Yw.exec(i.reference_date)?.[1],cumulative:i.cumulative_earned})).filter(i=>!!i.key&&i.cumulative!=null).sort((i,s)=>i.key<s.key?-1:i.key>s.key?1:0))t.set(o,a),n=o;if(n===void 0)return;let r=new Date().toISOString().slice(0,10);return t.get(r)??t.get(n)}function Ku(e){return e.poolType==="Unknown"}function rs(e){return e.length<=12?e:`${e.slice(0,6)}...${e.slice(-4)}`}function os(e){return e.length<=13?e:`${e.slice(0,6)}...${e.slice(-4)}`}function wa(e,t){let n=e.length+t.length;if(n>32)return"xs";if(n>24)return"sm"}function id(e){return e?.toUpperCase()==="WONE"?"ONE":e}var Kw=["Request Arguments:","Details:","Docs:","Version:","Contract Call:"];function ya(e,t){console.error("[wallet-portfolio] withdraw failed:",e);let r=e instanceof Error?e.message:"";for(let a of Kw){let i=r.indexOf(a);i>=0&&(r=r.slice(0,i))}return r.split(`
|
|
8
|
+
`).map(a=>a.trim()).find(a=>a.length>0)||t}var Zw="0xe00e8bf3";function Zu(e,t){let n=typeof e=="bigint"?e:BigInt(e);if(n<0n)throw new Error("poolId must be non-negative");if(t<0n)throw new Error("amount must be non-negative");let r=n.toString(16).padStart(64,"0"),o=t.toString(16).padStart(64,"0");return`${Zw}${r}${o}`}function Uo(e){return!e||e<=0n?"0":new An.default(e.toString()).shiftedBy(-9).toFormat(2,An.default.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function as(e){return!e||e<=0n?"0":new An.default(e.toString()).toFormat(0,An.default.ROUND_DOWN)}function is(e){if(!e||e<=0n)return"0";let t=new An.default(e.toString()).shiftedBy(-18),n=t.isLessThan(1e-4)?7:4;return t.toFormat(n,An.default.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function fr(e,t){let n=new An.default(e).shiftedBy(-t);return!n.isFinite()||n.isZero()?"0":n.isGreaterThanOrEqualTo(1)?n.toFormat(2,An.default.ROUND_DOWN):n.toFormat(4,An.default.ROUND_DOWN)}function sd(e){return fr(e,0)}var xa={rate:1,symbol:"$"};function co(e,t=xa){let n=Number.isFinite(t.rate)&&t.rate>0?t.rate:1;return`${t.symbol||"$"}${e.times(n).toFormat(2,An.default.ROUND_DOWN)}`}function Gr(e,t,n,r=xa){let o=new An.default(n||"0");if(!o.isFinite()||o.isLessThanOrEqualTo(0))return null;let a=new An.default(e||"0").shiftedBy(-t).times(o);return a.isFinite()?co(a,r):null}var va=(0,jo.createContext)(null);function Wt(){let e=(0,jo.useContext)(va);if(!e)throw new Error("WalletPortfolio compound components must be used within <WalletPortfolio>");return e}function Fn(){let{conversionRatio:e,currencySymbol:t}=Wt();return(0,jo.useMemo)(()=>({rate:typeof e=="number"&&e>0?e:xa.rate,symbol:t||xa.symbol}),[e,t])}var Xu=require("vaul");var ld=require("react/jsx-runtime");function Ju({asChild:e,children:t}){let{walletAddress:n}=Wt(),r=t!=null,o=e??!0,a=r?t:(0,ld.jsx)("button",{type:"button",children:dn(n)});return(0,ld.jsx)(Xu.Drawer.Trigger,{asChild:o,children:a})}var Sa=require("vaul");var _t=H(require("react"),1),wm=require("@tanstack/react-query");var ss=require("react"),dd=(0,ss.createContext)(null);function $u(){return(0,ss.useContext)(dd)}var Gt=require("react/jsx-runtime");function ef({size:e=22,className:t}){return(0,Gt.jsx)("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Gt.jsx)("path",{d:"M14 4L7 11L14 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function tf({size:e=22,className:t}){return(0,Gt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Gt.jsx)("path",{d:"M18.333 3.667v5.5h-5.5",stroke:"currentColor",strokeWidth:1.833,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.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 nf({size:e=12,className:t}){return(0,Gt.jsx)("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Gt.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 ls({size:e=16,className:t}){return(0,Gt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Gt.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,Gt.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 ds({size:e=16,className:t}){return(0,Gt.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Gt.jsx)("path",{d:"M13.333 4L6 11.333 2.667 8",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function cs({size:e=48,className:t}){return(0,Gt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Gt.jsx)("circle",{cx:"24",cy:"24",r:"24",fill:"currentColor"}),(0,Gt.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 Mn({size:e=12,className:t}){return(0,Gt.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,Gt.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,Gt.jsx)("path",{d:"M7 1H11V5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M11 1L6 6",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})]})}var rf=require("@tanstack/react-query"),cd=require("react");var Xw="wp:reward-pools";function Wo(e,t=!0){let{data:n,...r}=(0,rf.useQuery)({queryKey:[Xw,e],queryFn:async({signal:i})=>{let s=await Be("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,cd.useMemo)(()=>n?.data.pools.filter(i=>i.pool_type==="CrossPool")??[],[n]),a=(0,cd.useMemo)(()=>n?.data.pools.filter(i=>i.pool_type==="GamePool")??[],[n]);return{crossPools:o,gamePools:a,allPools:n?.data.pools??[],...r}}var of=require("@tanstack/react-query"),af=require("react");var Jw="wp:user-deposits";function ps(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,of.useQuery)({queryKey:[Jw,e,t],queryFn:async({signal:s})=>{let l=await Be("gameReward",e),d=await fetch(`${l}/v1/users/${t}/deposits`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Deposits fetch failed: ${d.status}`);let p=await d.json();if(p.code!==200)throw new Error(`Deposits API error: ${p.code}`);return p},enabled:r,staleTime:0});return{depositMap:(0,af.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 gf=require("@tanstack/react-query"),hf=require("react");var sf={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},lf={dev:"https://stg.onechain.nexus/points",stage:"https://stg.onechain.nexus/points",production:"https://www.onechain.nexus/points"};var df={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"};var pd={dev:"https://dev-stake.ogfcorp.com",stage:"https://stg-stake.ogfcorp.com",production:"https://stake.ogfcorp.com"},cf={dev:`${pd.dev}/portfolio`,stage:`${pd.stage}/portfolio`,production:`${pd.production}/portfolio`};var pf={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},Un={dev:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",stage:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",production:"https://contents.crosstoken.io/frontend/common/app-launcher/icons"},us={dev:"https://stg-swap-api.crossdefi.io",stage:"https://stg-swap-api.crossdefi.io",production:"https://swap-api.crossdefi.io"},uf={dev:"https://stg.crossdefi.io",stage:"https://stg.crossdefi.io",production:"https://www.crossdefi.io"},ff={dev:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",stage:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",production:"0xEFd871aF7D695A0c1709e46b565761F4cd1Ef5ba"},mf={dev:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",stage:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",production:"0x731a104a4461ae45bfef520468b43c262d35e682"};var $w="wp:token-info",e1="0x0000000000000000000000000000000000000001";function mr(e,t=!0){let n=At[e].cross,{data:r,...o}=(0,gf.useQuery)({queryKey:[$w,e],queryFn:async({signal:p})=>{let h=await Be("walletServer",e),u=await fetch(`${h}/v1/public/token/info`,{cache:"no-store",signal:p});if(!u.ok)throw new Error(`Failed to fetch token info: ${u.status}`);let g=await u.json();if(g.code!==200)throw new Error(`Token info API error: ${g.code}`);return g},enabled:t,staleTime:300*1e3}),{byChainAddr:a,byChainSym:i}=(0,hf.useMemo)(()=>{let p=new Map,h=new Map;if(!r?.data)return{byChainAddr:p,byChainSym:h};for(let u of r.data){let g=u.address.toLowerCase();p.set(`${u.chain_id}:${g}`,u),p.set(g,u);let x=u.symbol.replace(/^t/,"").toUpperCase(),y=`${u.chain_id}:${x}`;h.has(y)||h.set(y,u),h.has(x)||h.set(x,u)}return{byChainAddr:p,byChainSym:h}},[r]);return{getTokenImage:(p,h,u)=>{let g=p.toLowerCase(),x=!!u?.chainOnly,y=a.get(`${n}:${g}`);if(y?.image)return y.image;if(!x){let f=a.get(g);if(f?.image)return f.image}if(h){let f=h.replace(/^t/,"").toUpperCase(),c=i.get(`${n}:${f}`);if(c?.image)return c.image;if(!x){let b=i.get(f);if(b?.image)return b.image}}return""},getTokenSymbol:(p,h,u)=>{let g=p.toLowerCase();return(a.get(`${n}:${g}`)??(u?.chainOnly?void 0:a.get(g)))?.symbol||h},getNativeToken:()=>a.get(`${n}:${e1}`),...o}}var ud=H(require("react"),1);var po=require("react/jsx-runtime");function jn({sectionKey:e,title:t,icon:n,iconFit:r="cover",isEmpty:o,loading:a=!1,children:i}){let s=$u();return ud.useEffect(()=>{s?.report(e,{loading:a,empty:o})},[s,e,a,o]),ud.useEffect(()=>()=>s?.unregister(e),[s,e]),o?null:(0,po.jsxs)("div",{className:"wp-svc-card",children:[(0,po.jsxs)("div",{className:"wp-svc-card-head",children:[(0,po.jsx)("img",{className:"wp-svc-card-icon",src:n,alt:"",style:{objectFit:r}}),(0,po.jsx)("span",{className:"wp-svc-card-title",children:t})]}),(0,po.jsx)("div",{className:"wp-svc-items",children:i})]})}var fs=H(require("bignumber.js"),1),Ve=require("react/jsx-runtime"),t1="ONErewards";function n1(e){return new fs.default(e||"0").isGreaterThan(0)}function bf(){let{env:e,walletAddress:t,onOutlink:n}=Wt(),r=Fn(),o=!!t,{allPools:a,isLoading:i}=Wo(e,o),{depositMap:s,isLoading:l}=ps(e,t,o),{getTokenImage:d}=mr(e,o),p=(g,x)=>`${sf[e]}/gametoken/tokens/${g.deposit_token.address}?mode=rewards${x==="withdraw"?"&trade=withdraw":""}`,h=`${Un[e]}/reward.png`,u=a.filter(g=>{let x=s.get(g.pool_address.toLowerCase()),y=x?.deposited_amount??"0",f=x?.claimable_reward??"0";return!(new fs.default(y).isZero()&&new fs.default(f).isZero())});return(0,Ve.jsx)(jn,{sectionKey:"rewards",title:t1,icon:h,isEmpty:u.length===0,loading:i||l,children:u.map(g=>{let x=s.get(g.pool_address.toLowerCase()),y=x?.deposited_amount??"0",f=x?.claimable_reward??"0",c=p(g,"withdraw"),b=p(g,"claim"),w=d(g.deposit_token.address,g.deposit_token.symbol),k=g.reward_tokens[0],C=k?d(k.address,k.symbol):"",N=g.reward_tokens.map(D=>D.symbol),T=N.length>0?`${g.deposit_token.symbol}-${N.join("/")}`:g.deposit_token.symbol,R=k?fr(f,k.decimals):"0",S=k?.symbol??"Reward",E=Gr(y,g.deposit_token.decimals,g.deposit_token.price,r),A=k?Gr(f,k.decimals,k.price,r):null,F=!!x&&n1(f);return(0,Ve.jsxs)("article",{className:"wp-item","data-side":"reward",children:[(0,Ve.jsxs)("div",{className:"wp-item-body",children:[(0,Ve.jsxs)("div",{className:"wp-item-line",children:[(0,Ve.jsxs)("span",{className:"wp-item-label",children:["Pool",(0,Ve.jsx)("span",{className:"wp-item-label-sub",children:" (Deposit - Earn)"})]}),(0,Ve.jsxs)("div",{className:"wp-svc-token",children:[(0,Ve.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[w&&(0,Ve.jsx)("img",{className:"wp-svc-token-icon",src:w,alt:""}),C&&(0,Ve.jsx)("img",{className:"wp-svc-token-icon",src:C,alt:""})]}),(0,Ve.jsx)("span",{children:T})]})]}),(0,Ve.jsxs)("div",{className:"wp-item-line",children:[(0,Ve.jsx)("span",{className:"wp-item-label",children:"Deposited"}),(0,Ve.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[w&&(0,Ve.jsx)("img",{className:"wp-svc-token-icon",src:w,alt:""}),(0,Ve.jsxs)("div",{className:"wp-svc-amount",children:[(0,Ve.jsx)("span",{className:"wp-svc-amount-main",children:fr(y,g.deposit_token.decimals)}),E&&(0,Ve.jsx)("span",{className:"wp-item-usd",children:E})]})]})]}),(0,Ve.jsxs)("div",{className:"wp-item-line",children:[(0,Ve.jsxs)("span",{className:"wp-item-label",children:["Claimable (",S,")"]}),(0,Ve.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[C&&(0,Ve.jsx)("img",{className:"wp-svc-token-icon",src:C,alt:""}),(0,Ve.jsxs)("div",{className:"wp-svc-amount",children:[(0,Ve.jsx)("span",{className:"wp-svc-amount-main",children:R}),A&&(0,Ve.jsx)("span",{className:"wp-item-usd",children:A})]})]})]})]}),(0,Ve.jsxs)("div",{className:"wp-item-tags",children:[(0,Ve.jsxs)("a",{className:"wp-tag wp-tag--muted",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"rewards_withdraw_open",onClick:D=>jt(D,c,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:g,userDeposit:x}},n),children:[(0,Ve.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,Ve.jsx)(Mn,{size:12,className:"wp-tag-icon"})]}),(0,Ve.jsxs)("a",{className:"wp-tag wp-tag--mint","data-disabled":!F||void 0,"aria-disabled":!F||void 0,href:F?b:void 0,target:F?"_blank":void 0,rel:F?"noopener noreferrer":void 0,onClick:D=>{if(!F){D.preventDefault();return}jt(D,b,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:g,userDeposit:x}},n)},children:[(0,Ve.jsx)("span",{className:"wp-tag-label",children:"Claim"}),(0,Ve.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})]})]},g.pool_address)})})}var Tf=H(require("react"),1);var yf=require("@tanstack/react-query"),Ra=require("react");var r1="0x70a08231",o1="0x18160ddd",a1="0x313ce567",i1=8e3;async function s1(e,t,n,r){let o=new AbortController,a=setTimeout(()=>o.abort(),i1);r&&r.addEventListener("abort",()=>o.abort(),{once:!0});let i=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:n}),signal:o.signal}).finally(()=>clearTimeout(a));if(!i.ok)throw new Error(`RPC ${t} HTTP ${i.status}`);let s=await i.json();if(s.error)throw new Error(`RPC ${t}: ${s.error.message}`);if(s.result===void 0)throw new Error(`RPC ${t}: empty result`);return s.result}function l1(e){return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function ka(e){if(!(!e||e==="0x"))try{return BigInt(e)}catch{return}}async function Er(e,t,n,r,o){try{return await s1(e,"eth_call",[o?{from:o,to:t,data:n}:{to:t,data:n},"latest"],r)}catch{return}}async function d1(e,t,n,r){let[o,a,i]=await Promise.all([Er(e,n,r1+l1(t),r),Er(e,n,o1,r),Er(e,n,a1,r)]),s=ka(o);if(s===void 0)return null;let l=ka(i);return{balance:s,totalSupply:ka(a),decimals:l!==void 0?Number(l):void 0}}async function Ca(e,t){let n=At[e].cross,r=await Be("walletServer",e),o=await fetch(`${r}/v1/public/chain/info/${n}`,{cache:"no-store",signal:t});if(!o.ok)return;let a=await o.json();return("data"in a&&a.data!==void 0?Array.isArray(a.data)?a.data[0]:a.data:a)?.rpc||void 0}async function wf(e,t,n,r){if(!t||n.length===0)return{};let o;try{o=await Ca(e,r)}catch{o=void 0}if(!o)return{};let a=await Promise.all(n.map(async s=>[s.toLowerCase(),await d1(o,t,s,r)])),i={};for(let[s,l]of a)l&&(i[s]=l);return i}var c1="wp:withdraw-token-meta",p1="0xc89039c5",u1="0x95d89b41",f1="0x313ce567";function m1(e){if(!(!e||e==="0x"))try{let t=e.replace(/^0x/,""),n=Number(BigInt("0x"+t.slice(64,128)));if(!Number.isFinite(n)||n<=0||n>64)return;let r=t.slice(128,128+n*2),o="";for(let a=0;a<r.length;a+=2)o+=String.fromCharCode(parseInt(r.slice(a,a+2),16));return o||void 0}catch{return}}function g1(e){if(!e||e==="0x")return;let n="0x"+e.replace(/^0x/,"").padStart(64,"0").slice(24,64);return/^0x[a-f0-9]{40}$/.test(n)&&n!=="0x0000000000000000000000000000000000000000"?n:void 0}async function h1(e,t,n){if(t.length===0)return{};let r;try{r=await Ca(e,n)}catch{r=void 0}if(!r)return{};let o=await Promise.all(t.map(async i=>{let s=g1(await Er(r,i,p1,n));if(!s)return[i.toLowerCase(),null];let[l,d]=await Promise.all([Er(r,s,u1,n),Er(r,s,f1,n)]),p=m1(l),h=ka(d);return p?[i.toLowerCase(),{tokenAddress:s,symbol:p,decimals:h!==void 0?Number(h):18}]:[i.toLowerCase(),null]})),a={};for(let[i,s]of o)s&&(a[i]=s);return a}function xf(e,t,n=!0){let o=n&&!!t,{allPools:a,isLoading:i}=Wo(e,o),{deposits:s,isLoading:l}=ps(e,t,o),d=(0,Ra.useMemo)(()=>{let f=new Map;for(let c of a)f.set(c.pool_address.toLowerCase(),c);return f},[a]),p=(0,Ra.useMemo)(()=>s.filter(f=>{try{return BigInt(f.deposited_amount||"0")>0n}catch{return!1}}),[s]),h=(0,Ra.useMemo)(()=>p.map(f=>f.pool_address.toLowerCase()).filter(f=>!d.has(f)).sort(),[p,d]),{data:u,isLoading:g}=(0,yf.useQuery)({queryKey:[c1,e,h],queryFn:({signal:f})=>h1(e,h,f),enabled:o&&h.length>0,staleTime:1440*60*1e3});return{positions:(0,Ra.useMemo)(()=>{let f=[];for(let c of p){let b=c.pool_address.toLowerCase(),w=d.get(b);if(w){f.push({poolId:c.pool_id,poolAddress:c.pool_address,poolType:w.pool_type,tokenSymbol:w.deposit_token.symbol,tokenAddress:w.deposit_token.address,decimals:w.deposit_token.decimals,price:w.deposit_token.price,depositedRaw:c.deposited_amount});continue}let k=u?.[b];k&&f.push({poolId:c.pool_id,poolAddress:c.pool_address,poolType:"Unknown",tokenSymbol:k.symbol,tokenAddress:k.tokenAddress,decimals:k.decimals,depositedRaw:c.deposited_amount})}return f},[p,d,u]),isLoading:i||l||g}}var hn=H(require("react"),1);var ie=require("react/jsx-runtime"),b1=400;function w1(e,t,n){if(t==="loading")return"Estimating...";if(!e||t==="error"||t==="unavailable")return"Wallet estimate";let r=e.maxFeePerGas??e.gasPrice;return!r||r<=0n||e.gasLimit<=0n?"Wallet estimate":`${is(e.gasLimit*r)} ${n??""}`.trim()}function fd(e,t,n){return n==="loading"?"Estimating...":n==="error"||n==="unavailable"?"-":`${e} ${t}`.trim()}function y1({position:e,size:t}){return e.icon?(0,ie.jsx)("img",{src:e.icon,alt:"",width:t,height:t}):(0,ie.jsx)("span",{children:e.tokenSymbol.slice(0,1)})}function vf({open:e,status:t,positions:n,initialPoolAddress:r,walletAddress:o,txHash:a,error:i,copied:s=!1,estimateWithdraw:l,onClose:d,onConfirm:p,onCopyHash:h,trackFunnel:u,nativeSymbol:g}){let[x,y]=hn.useState(null),[f,c]=hn.useState("idle"),b=hn.useRef(0),w=hn.useRef(void 0),k=hn.useRef(null);hn.useEffect(()=>()=>clearTimeout(w.current),[]);let C=hn.useMemo(()=>{let G=r?.toLowerCase();return n.find(M=>M.poolAddress.toLowerCase()===G)??n[0]??null},[n,r]),N=hn.useMemo(()=>{try{return BigInt(C?.depositedRaw??"0")}catch{return 0n}},[C?.depositedRaw]),T=C?.decimals??18;hn.useEffect(()=>{!e||!C||u?.("position_selected")},[e,C,u]);let R=hn.useCallback(()=>{y(null),c(l?"idle":"unavailable"),b.current+=1,k.current=null},[]);if(hn.useEffect(()=>{e&&R()},[e,R]),hn.useEffect(()=>{if(!e||t!=="confirm"){clearTimeout(w.current);return}if(!l||!C){clearTimeout(w.current),c("unavailable");return}if(N<=0n){clearTimeout(w.current),b.current+=1,k.current=null,y(null),c("idle");return}let G=`${C.poolAddress.toLowerCase()}:${N.toString()}`;if(k.current===G)return;k.current=G,clearTimeout(w.current);let M=b.current+1;b.current=M,c("loading"),w.current=setTimeout(()=>{l(C,N).then(j=>{b.current===M&&(y(j??null),c(j?"ready":"unavailable"))}).catch(()=>{b.current===M&&(y(null),c("error"))})},b1)},[e,t,N,l,C]),!e||!C)return null;let S=t==="submitting",E=Uo(x?.maxPriorityFeePerGas),A=Uo(x?.maxFeePerGas??x?.gasPrice),F=as(x?.gasLimit),D=fr(C.depositedRaw,T);return(0,ie.jsx)("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:G=>{G.target===G.currentTarget&&!S&&d()},children:(0,ie.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,ie.jsx)("div",{className:"wp-claim-grabber","aria-hidden":!0,children:(0,ie.jsx)("span",{})}),(0,ie.jsxs)("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&a?(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:(0,ie.jsx)(cs,{})}),(0,ie.jsxs)("div",{className:"wp-claim-copy",children:[(0,ie.jsx)("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),(0,ie.jsx)("p",{className:"wp-claim-desc",children:"Your withdrawal request has been submitted. Balances will update shortly after the transaction settles."})]}),(0,ie.jsx)("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:(0,ie.jsxs)("div",{className:"wp-claim-list-item",children:[(0,ie.jsx)("span",{children:"Tx Hash"}),(0,ie.jsxs)("button",{type:"button",className:"wp-claim-hash",onClick:h,"aria-label":"Copy transaction hash","data-track":"withdraw_hash_copy",children:[(0,ie.jsx)("strong",{children:os(a)}),s?(0,ie.jsx)(ds,{}):(0,ie.jsx)(ls,{})]})]})})]}):(0,ie.jsxs)(ie.Fragment,{children:[t==="error"&&(0,ie.jsxs)("div",{className:"wp-claim-heading",children:[(0,ie.jsx)("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),(0,ie.jsx)("p",{className:"wp-claim-error-message",children:i||"The withdraw request could not be completed."})]}),(0,ie.jsxs)("div",{className:"wp-claim-reward-card","data-fit":wa(C.tokenSymbol,D),"aria-label":"Deposited balance",children:[(0,ie.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,ie.jsx)(y1,{position:C,size:28})}),(0,ie.jsx)("strong",{className:"wp-claim-reward-symbol",children:C.tokenSymbol}),(0,ie.jsx)("strong",{className:"wp-claim-reward-amount",children:D})]}),(0,ie.jsxs)("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:[(0,ie.jsxs)("div",{className:"wp-claim-account-row",children:[(0,ie.jsxs)("div",{className:"wp-claim-account",children:[(0,ie.jsx)("span",{className:"wp-claim-account-avatar","aria-hidden":!0}),(0,ie.jsxs)("strong",{children:[C.tokenSymbol," Pool"]})]}),(0,ie.jsx)("span",{children:rs(o)})]}),(0,ie.jsx)("span",{className:"wp-claim-divider","aria-hidden":!0}),(0,ie.jsxs)("div",{className:"wp-claim-detail-list",children:[(0,ie.jsxs)("div",{className:"wp-claim-detail-row",children:[(0,ie.jsx)("span",{children:"Est. Tx Fee"}),(0,ie.jsx)("strong",{children:w1(x,f,g)})]}),(0,ie.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ie.jsx)("span",{children:"Priority Fee Per Gas"}),(0,ie.jsx)("strong",{children:fd(E,"Gwei",f)})]}),(0,ie.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ie.jsx)("span",{children:"Max Fee Per Gas"}),(0,ie.jsx)("strong",{children:fd(A,"Gwei",f)})]}),(0,ie.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ie.jsx)("span",{children:"Gas Limit"}),(0,ie.jsx)("strong",{children:fd(F,"",f)})]})]})]})]}),(0,ie.jsxs)("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&(0,ie.jsx)("button",{type:"button",className:"wp-claim-secondary","data-track":"withdraw_cancel",onClick:d,children:t==="error"?"Close":"Cancel"}),(0,ie.jsxs)("button",{type:"button",className:"wp-claim-primary","data-track":"withdraw_confirm",onClick:()=>{if(t==="success"){d();return}C&&N>0n&&p(C,N,x)},disabled:S||(t==="confirm"||t==="error")&&N<=0n,children:[t==="success"&&"Done",t==="submitting"&&(0,ie.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}),t==="error"&&"Try Again",t==="confirm"&&"Withdraw Now"]})]})]}),(0,ie.jsx)("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:(0,ie.jsx)("span",{})})]})})}var Ht=H(require("react"),1),Nf=require("@tanstack/react-query");var kf=require("@tanstack/react-query");var x1="wp:reward-factory-info";function Cf(e,t=!0){let{data:n,...r}=(0,kf.useQuery)({queryKey:[x1,e],queryFn:async({signal:o})=>{let a=await Be("gameReward",e),i=await fetch(`${a}/v1/factory/info`,{cache:"no-store",signal:o});if(!i.ok)throw new Error(`Factory info fetch failed: ${i.status}`);let s=await i.json();if(s.code!==200)throw new Error(`Factory info API error: ${s.code}`);return s},enabled:t,staleTime:0});return{factoryInfo:n?.data??null,routerAddress:n?.data.router_address??"",...r}}var md="wp:";function Ar(e){return e.invalidateQueries({predicate:t=>typeof t.queryKey[0]=="string"&&t.queryKey[0].startsWith("wp:")})}function Rf(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function Sf(e){let{env:t,walletAddress:n,sendTransaction:r,estimateGas:o}=Wt(),a=!!n,i=!!r,s=(0,Nf.useQueryClient)(),{routerAddress:l}=Cf(t,a&&i),d=Rf(l),[p,h]=Ht.useState(!1),[u,g]=Ht.useState(void 0),[x,y]=Ht.useState("confirm"),[f,c]=Ht.useState(),[b,w]=Ht.useState(""),[k,C]=Ht.useState(!1),N=Ht.useRef(void 0);Ht.useEffect(()=>()=>clearTimeout(N.current),[]);let T=Ht.useRef(new Set),R=Ht.useCallback((j,le)=>{T.current.has(j)||(T.current.add(j),Je("withdraw",j,{...le,tags:{section:e,...le?.tags}}))},[e]),S=Ht.useCallback((j,le)=>d?{to:d,value:0n,data:Zu(j,le),chainId:At[t].cross}:null,[t,d]),E=Ht.useCallback(()=>{Ar(s)},[s]),A=Ht.useCallback(j=>{g(j),h(!0),y("confirm"),c(void 0),w(""),C(!1),T.current=new Set,R("opened")},[R]),F=Ht.useCallback(()=>{x!=="submitting"&&(h(!1),g(void 0),y("confirm"),c(void 0),w(""),C(!1),x==="success"&&E())},[x,E]),D=Ht.useCallback(async(j,le)=>{if(!o)return null;let oe=S(j.poolId,le),ne=Rf(n);return!oe||!ne?null:o({...oe,from:ne})},[S,o,n]),G=Ht.useCallback(async()=>{if(!(!f||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(f),C(!0),clearTimeout(N.current),N.current=setTimeout(()=>C(!1),1400)}catch{C(!1)}},[f]),M=Ht.useCallback(async(j,le,oe)=>{if(!r){y("error"),w("Withdraw is not available for this wallet.");return}if(!d){y("error"),w("Withdraw contract address is not available.");return}try{y("submitting"),w("");let ne=S(j.poolId,le);if(!ne){y("error"),w("Withdraw contract address is not available.");return}R("submitted");let Q=await r({...ne,gas:oe?.gasLimit&&oe.gasLimit>0n?oe.gasLimit:void 0,maxFeePerGas:oe?.maxFeePerGas&&oe.maxFeePerGas>0n?oe.maxFeePerGas:void 0,maxPriorityFeePerGas:oe?.maxPriorityFeePerGas&&oe.maxPriorityFeePerGas>0n?oe.maxPriorityFeePerGas:void 0});c(Q),y("success"),R("confirmed"),E()}catch(ne){y("error"),w(ya(ne,"Failed to request withdraw.")),R("confirmed",{status:"failure",reason:Nn(ne)})}},[S,E,d,r,R]);return{canWithdrawInline:i,isOpen:p,initialPoolAddress:u,status:x,txHash:f,error:b,copied:k,hasEstimator:!!o,openWithdraw:A,closeWithdraw:F,estimateWithdraw:D,confirmWithdraw:M,copyHash:G,trackFunnelOnce:R}}var ct=require("react/jsx-runtime"),v1="ONEpoints";function If(){let{env:e,walletAddress:t,onOutlink:n}=Wt(),r=Fn(),o=!!t,{getTokenImage:a,getNativeToken:i}=mr(e,o),s=Sf("points"),{positions:l,isLoading:d}=xf(e,t,o),p=Tf.useMemo(()=>l.filter(Ku).map(g=>({...g,icon:a(g.tokenAddress,g.tokenSymbol)})),[l,a]),h=`${Un[e]}/point.png`,u=lf[e];return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(jn,{sectionKey:"points",title:v1,icon:h,isEmpty:p.length===0,loading:d,children:p.map(g=>{let x=g.price?Gr(g.depositedRaw,g.decimals,g.price,r):null;return(0,ct.jsxs)("article",{className:"wp-item","data-side":"reward",children:[(0,ct.jsxs)("div",{className:"wp-item-body",children:[(0,ct.jsxs)("div",{className:"wp-item-line",children:[(0,ct.jsx)("span",{className:"wp-item-label",children:"Token"}),(0,ct.jsxs)("div",{className:"wp-svc-token",children:[g.icon&&(0,ct.jsx)("img",{className:"wp-svc-token-icon",src:g.icon,alt:""}),(0,ct.jsx)("span",{children:g.tokenSymbol})]})]}),(0,ct.jsxs)("div",{className:"wp-item-line",children:[(0,ct.jsx)("span",{className:"wp-item-label",children:"Deposited"}),(0,ct.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[g.icon&&(0,ct.jsx)("img",{className:"wp-svc-token-icon",src:g.icon,alt:""}),(0,ct.jsxs)("div",{className:"wp-svc-amount",children:[(0,ct.jsx)("span",{className:"wp-svc-amount-main",children:fr(g.depositedRaw,g.decimals)}),x&&(0,ct.jsx)("span",{className:"wp-item-usd",children:x})]})]})]})]}),(0,ct.jsx)("div",{className:"wp-item-tags",children:s.canWithdrawInline?(0,ct.jsx)("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"points_withdraw_open",onClick:()=>s.openWithdraw(g.poolAddress),children:(0,ct.jsx)("span",{className:"wp-tag-label",children:"Withdraw"})}):(0,ct.jsxs)("a",{className:"wp-tag wp-tag--muted",href:u,target:"_blank",rel:"noopener noreferrer","data-track":"points_withdraw_open",onClick:y=>jt(y,u,{category:"portfolio",origin:"portfolio-points",payload:{position:g}},n),children:[(0,ct.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,ct.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})})]},g.poolAddress)})}),(0,ct.jsx)(vf,{open:s.isOpen,status:s.status,positions:p,initialPoolAddress:s.initialPoolAddress,walletAddress:t,txHash:s.txHash,error:s.error,copied:s.copied,estimateWithdraw:s.hasEstimator?s.estimateWithdraw:void 0,onClose:s.closeWithdraw,onConfirm:s.confirmWithdraw,onCopyHash:s.copyHash,trackFunnel:s.trackFunnelOnce,nativeSymbol:i()?.symbol})]})}var hd=H(require("react"),1);var Ef=require("@tanstack/react-query");var k1="wp:stake-info";function Af(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,Ef.useQuery)({queryKey:[k1,e,t],queryFn:async({signal:s})=>{let l=await Be("posa",e),d=await fetch(`${l}/stake/${t}`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Stake info fetch failed: ${d.status}`);let p=await d.json();if(p.code!==0&&p.code!==200)throw new Error(`Stake info API error: ${p.code}`);return p},enabled:r,staleTime:0});return{stakeInfo:o?.data,...a}}var Mf=require("@tanstack/react-query");var C1="wp:stake-rewards",R1=31;function Lf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,Mf.useQuery)({queryKey:[C1,e,t],queryFn:async({signal:i})=>{let s=await Be("posa",e),l=await fetch(`${s}/rewards/${t}?limit=${R1}`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Stake rewards fetch failed: ${l.status}`);let d=await l.json();if(d.code!==0&&d.code!==200)throw new Error(`Stake rewards API error: ${d.code}`);return d.data?.data??[]},enabled:r,staleTime:0});return{latestReward:o?.[0]??null,aprAccrued:Yu(o),...a}}var Df=require("@tanstack/react-query"),N1="wp:staking-onchain";function Pf(e,t,n=!0){let r=n&&!!t&&!!e,{data:o,...a}=(0,Df.useQuery)({queryKey:[N1,e],queryFn:async()=>{if(!t)throw new Error("stakingRewardsReader not provided");return t(e)},enabled:r,staleTime:0});return{onchain:o,...a}}var gd=require("react"),zf=H(require("bignumber.js"),1);function Of(e){return e?.trim().toUpperCase()==="ONE"}function Bf(e){return new zf.default(e||"0").isGreaterThan(0)}function ms(e,t,n=!0){let{allPools:r}=Wo(e,n),o=(0,gd.useMemo)(()=>{for(let d of r)for(let p of[d.deposit_token,...d.reward_tokens])if(Of(p?.symbol)&&Bf(p.price))return p.price},[r]),a=n&&o===void 0,{tokens:i}=Tr(e,t,a),{statsMap:s}=Ir(e,a),l=At[e].cross;return(0,gd.useMemo)(()=>{if(o)return o;let d=i.find(p=>p.chainId===l&&Of(p.symbol));if(d){let p=s.get(ur(d.chainId,d.address));if(p&&Bf(p.price))return p.price}return"0"},[o,i,s,l])}var Mr=H(require("bignumber.js"),1),zt=require("react/jsx-runtime");function S1(e){if(!e)return"\u2014";let t=new Mr.default(e);return t.isFinite()?`${t.toFormat(2,Mr.default.ROUND_DOWN)}%`:"\u2014"}function Ff(){let{env:e,walletAddress:t,onOutlink:n,stakingRewardsReader:r}=Wt(),o=Fn(),a=!!t,{stakeInfo:i,isLoading:s}=Af(e,t,a),{latestReward:l,aprAccrued:d,isLoading:p}=Lf(e,t,a),{onchain:h}=Pf(t,r,a),u=ms(e,t,a),{getNativeToken:g}=mr(e,a),x=g()?.symbol,y="ONEstaking",f=`${Un[e]}/cross-staking.png`,c=cf[e],b=i?.total_stake??"0",w=hd.useMemo(()=>h?new Mr.default(h.earnedWei.toString()).shiftedBy(-18).toString(10):l?.cumulative_earned??i?.rewards_earned??"0",[h,l,i]),k=hd.useMemo(()=>h?new Mr.default(h.stakedWei.toString()).shiftedBy(-18):new Mr.default(b),[h,b]),C=d!==void 0?new Mr.default(d):void 0,N=i?.days_since_first_stake,T=C!==void 0&&C.isFinite()&&k.isGreaterThan(0)&&N!==null&&N!==void 0?C.div(k).times(365).div(Math.max(1,N)).times(100):void 0,R=!(new Mr.default(b).isZero()&&new Mr.default(w).isZero()),S=Gr(b,0,u,o),E=Gr(w,0,u,o);return(0,zt.jsx)(jn,{sectionKey:"staking",title:y,icon:f,iconFit:"contain",isEmpty:!R,loading:s||p,children:(0,zt.jsxs)("article",{className:"wp-item","data-side":"stake",children:[(0,zt.jsxs)("div",{className:"wp-item-body",children:[(0,zt.jsxs)("div",{className:"wp-item-line",children:[(0,zt.jsx)("span",{className:"wp-item-label",children:"Staked"}),(0,zt.jsxs)("div",{className:"wp-svc-amount",children:[(0,zt.jsx)("span",{className:"wp-svc-amount-main",children:`${sd(b)} ${x??""}`.trim()}),S&&(0,zt.jsx)("span",{className:"wp-item-usd",children:S})]})]}),(0,zt.jsxs)("div",{className:"wp-item-line",children:[(0,zt.jsx)("span",{className:"wp-item-label",children:"Rewards Earned"}),(0,zt.jsxs)("div",{className:"wp-svc-amount",children:[(0,zt.jsx)("span",{className:"wp-svc-amount-main",children:`${sd(w)} ${x??""}`.trim()}),E&&(0,zt.jsx)("span",{className:"wp-item-usd",children:E})]})]}),(0,zt.jsxs)("div",{className:"wp-item-line",children:[(0,zt.jsx)("span",{className:"wp-item-label",children:"My APR"}),(0,zt.jsx)("span",{children:S1(T?.toString(10))})]})]}),(0,zt.jsx)("div",{className:"wp-item-tags",children:(0,zt.jsxs)("a",{className:"wp-tag wp-tag--mint",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"stake_outlink",onClick:A=>jt(A,c,{category:"portfolio",origin:"portfolio-stake",payload:{stakeInfo:i}},n),children:[(0,zt.jsx)("span",{className:"wp-tag-label",children:"Manage"}),(0,zt.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})})]})})}var bd=H(require("react"),1);var Uf=require("@tanstack/react-query");var T1="wp:game-swap-pools";function jf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,Uf.useQuery)({queryKey:[T1,e,t],queryFn:async({signal:i})=>{let s=await Be("gameSwap",e),l=await fetch(`${s}/addresses/${t}/portfolio`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Game-swap portfolio fetch failed: ${l.status}`);return(await l.json()).pools??[]},enabled:r,staleTime:0});return{pools:o??[],...a}}var Wf=require("@tanstack/react-query");var I1="wp:game-swap-lp-balances";function Gf(e,t,n,r){let o=[...n].map(l=>l.toLowerCase()).sort(),a=!!t&&o.length>0,{data:i,...s}=(0,Wf.useQuery)({queryKey:[I1,e,t,o,!!r],queryFn:async({signal:l})=>{let d=r?await r(o):await wf(e,t,o,l),p={};for(let[h,u]of Object.entries(d))p[h.toLowerCase()]=u;return p},enabled:a,staleTime:0});return{balances:i??{},...s}}var gr=H(require("bignumber.js"),1),Ct=require("react/jsx-runtime"),E1="Gametoken LP",_f=18,A1=new gr.default("0.0001");function Hf(e){return e?.trim().toUpperCase()==="ONE"}function M1(e){return e&&e>0?e:_f}function L1(e){let t=Hf(e.token_a?.symbol)&&!Hf(e.token_b?.symbol),n=t?e.reserve_a:e.reserve_b,r=M1(t?e.token_a?.decimals:e.token_b?.decimals),o=new gr.default(n||"0").shiftedBy(-r);return!o.isFinite()||o.isLessThanOrEqualTo(0)?new gr.default(0):o.times(2)}function D1(e,t,n,r){let o=e.token_a?.symbol?.trim()||"TOKEN",a=e.token_b?.symbol?.trim()||r||"?",i=t?.decimals??_f,s,l;if(t&&t.totalSupply&&t.totalSupply>BigInt(0)){let d=new gr.default(t.balance.toString()),p=new gr.default(t.totalSupply.toString()),h=d.div(p);s=h.times(100);let u=h.times(L1(e));if(u.isGreaterThan(0)){let g=new gr.default(e.quote_usd??e.cross_usd??"0");l=g.isGreaterThan(0)?co(u.times(g),n):`${u.toFormat(4,gr.default.ROUND_DOWN)} ${r??""}`.trim()}}return{pool:e,tokenASymbol:o,tokenBSymbol:a,info:t,lpAmountRaw:t?.balance.toString(),lpDecimals:i,sharePercent:s,valueText:l}}function Vf(){let{env:e,walletAddress:t,onOutlink:n,lpBalanceReader:r}=Wt(),o=Fn(),a=!!t,{pools:i,isLoading:s}=jf(e,t,a),l=bd.useMemo(()=>i.map(c=>c.pair_address).filter(Boolean),[i]),{balances:d,isLoading:p}=Gf(e,t,l,r),{getNativeToken:h}=mr(e,a),u=h()?.symbol,g=`${Un[e]}/game-token.png`,x=Object.keys(d).length>0,y=bd.useMemo(()=>{let c=i.map(b=>D1(b,d[b.pair_address?.toLowerCase()],o,u));return x?c.filter(b=>b.lpAmountRaw?new gr.default(b.lpAmountRaw).shiftedBy(-b.lpDecimals).isGreaterThanOrEqualTo(A1):!1):c},[i,d,x,o,u]),f=c=>{let b=c.token_a?.address??c.pair_address;return`${pf[e]}/gametoken/tokens/${b}?trade=deposit`};return(0,Ct.jsx)(jn,{sectionKey:"gameSwap",title:E1,icon:g,iconFit:"contain",isEmpty:y.length===0,loading:s||p,children:y.map(c=>{let{pool:b}=c,w=f(b),k=`${c.tokenASymbol} / ${c.tokenBSymbol}`,C=b.token_a?.logo_url,N=b.token_b?.logo_url;return(0,Ct.jsxs)("article",{className:"wp-item","data-side":"game-swap",children:[(0,Ct.jsxs)("div",{className:"wp-item-body",children:[(0,Ct.jsxs)("div",{className:"wp-item-line",children:[(0,Ct.jsx)("span",{className:"wp-item-label",children:"Pool"}),(0,Ct.jsxs)("div",{className:"wp-svc-token",children:[(0,Ct.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[C&&(0,Ct.jsx)("img",{className:"wp-svc-token-icon",src:C,alt:""}),N&&(0,Ct.jsx)("img",{className:"wp-svc-token-icon",src:N,alt:""})]}),(0,Ct.jsx)("span",{children:k})]})]}),c.lpAmountRaw!==void 0&&(0,Ct.jsxs)("div",{className:"wp-item-line",children:[(0,Ct.jsx)("span",{className:"wp-item-label",children:"My LP"}),(0,Ct.jsxs)("span",{children:[fr(c.lpAmountRaw,c.lpDecimals)," LP"]})]}),c.sharePercent!==void 0&&(0,Ct.jsxs)("div",{className:"wp-item-line",children:[(0,Ct.jsx)("span",{className:"wp-item-label",children:"Pool Share"}),(0,Ct.jsxs)("span",{children:[c.sharePercent.toFormat(2,gr.default.ROUND_DOWN),"%"]})]}),c.valueText!==void 0&&(0,Ct.jsxs)("div",{className:"wp-item-line",children:[(0,Ct.jsx)("span",{className:"wp-item-label",children:"Value"}),(0,Ct.jsx)("span",{children:c.valueText})]})]}),(0,Ct.jsx)("div",{className:"wp-item-tags",children:(0,Ct.jsxs)("a",{className:"wp-tag wp-tag--mint",href:w,target:"_blank",rel:"noopener noreferrer","data-track":"gameswap_outlink","data-track-id":k,onClick:T=>jt(T,w,{category:"portfolio",origin:"portfolio-game-swap",payload:{pool:b}},n),children:[(0,Ct.jsx)("span",{className:"wp-tag-label",children:"Manage"}),(0,Ct.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})})]},b.pair_address)})})}var Hr=H(require("bignumber.js"),1),Xf=require("react");var Qf=require("@tanstack/react-query");var P1="wp:forge-pools";function qf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,Qf.useQuery)({queryKey:[P1,e,t],queryFn:async()=>{let s=await Be("bondingCurve",e),l=await fetch(`${s}/v1/users/${t}/pools`,{cache:"no-store"});if(!l.ok)throw new Error(`forge pools fetch failed: ${l.status}`);return(await l.json()).data?.items??[]},enabled:r,staleTime:0}),i=o??[];return{pools:i,isEmpty:i.length===0,...a}}var Yf=require("@tanstack/react-query"),Kf=require("react");var O1="wp:forge-token-detail";async function B1(e,t){let n=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store"});return n.ok?(await n.json())?.data?.token??null:null}function Zf(e,t,n=!0){let r=(0,Yf.useQueries)({queries:t.map(i=>({queryKey:[O1,e,i],queryFn:async()=>B1(await Be("bondingCurve",e),i),enabled:n&&!!i,staleTime:3e4}))}),o=(0,Kf.useMemo)(()=>{let i=new Map;for(let s=0;s<r.length;s++){let l=r[s]?.data,d=t[s];l&&d&&i.set(d.toLowerCase(),l)}return i},[r,t]),a=r.some(i=>i.isLoading);return{detailMap:o,isLoading:a}}var St=require("react/jsx-runtime"),z1="ONEforge",Jf=18,F1="https://contents.crosstoken.io/wallet/token/images/FT.png";function U1(e){if(!e||e==="0")return"0";let t=new Hr.default(e).shiftedBy(-Jf);return t.isZero()?"0":t.isGreaterThanOrEqualTo(1)?t.toFormat(2,Hr.default.ROUND_DOWN):t.toFormat(4,Hr.default.ROUND_DOWN)}function j1(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 W1(e,t,n,r){let o=new Hr.default(n||"0");if(!o.isGreaterThan(0))return null;let a=new Hr.default(e.total_supply||"0"),i=new Hr.default(e.lp_balance||"0"),s=new Hr.default(t?.reserve_b||"0").shiftedBy(-Jf);if(!a.isGreaterThan(0)||!i.isGreaterThan(0)||!s.isGreaterThan(0))return null;let l=s.times(2),p=i.div(a).times(l).times(o);return p.isFinite()?co(p,r):null}function $f(){let{env:e,walletAddress:t,onOutlink:n}=Wt(),r=Fn(),o=!!t,{pools:a,isEmpty:i,isLoading:s}=qf(e,t,o),l=(0,Xf.useMemo)(()=>a.map(g=>g.token.address),[a]),{detailMap:d}=Zf(e,l,o&&l.length>0),p=ms(e,t,o),h=g=>`${df[e]}/forge/token/${g.token.address}`,u=`${Un[e]}/forge.png`;return(0,St.jsx)(jn,{sectionKey:"forge",title:z1,icon:u,iconFit:"contain",isEmpty:i,loading:s,children:a.map(g=>{let x=d.get(g.token.address.toLowerCase()),y=x?.image_url||x?.image||g.token.image||F1,f=x?.symbol||g.token.symbol,c=h(g),b=W1(g,x,p,r);return(0,St.jsxs)("a",{className:"wp-item","data-side":"lp",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"forge_outlink","data-track-id":f,onClick:w=>jt(w,c,{category:"portfolio",origin:"portfolio-forge",payload:{pool:g,tokenDetail:x}},n),children:[(0,St.jsxs)("div",{className:"wp-item-body",children:[(0,St.jsxs)("div",{className:"wp-item-line",children:[(0,St.jsx)("span",{className:"wp-item-label",children:"Asset"}),(0,St.jsxs)("div",{className:"wp-svc-token",children:[(0,St.jsx)("img",{className:"wp-svc-token-icon",src:y,alt:""}),(0,St.jsx)("span",{children:f}),x?.name&&(0,St.jsx)("span",{className:"wp-token-subtle",children:x.name})]})]}),(0,St.jsxs)("div",{className:"wp-item-line",children:[(0,St.jsx)("span",{className:"wp-item-label",children:"LP Balance"}),(0,St.jsx)("div",{className:"wp-svc-token wp-svc-token--amount",children:(0,St.jsxs)("div",{className:"wp-svc-amount",children:[(0,St.jsx)("span",{className:"wp-svc-amount-main",children:U1(g.lp_balance)}),b&&(0,St.jsx)("span",{className:"wp-item-usd",children:b})]})})]}),(0,St.jsxs)("div",{className:"wp-item-line",children:[(0,St.jsx)("span",{className:"wp-item-label",children:"Ownership"}),(0,St.jsx)("span",{className:"wp-line-value",children:j1(g.pool_ownership)})]})]}),(0,St.jsx)("div",{className:"wp-item-tags",children:(0,St.jsxs)("span",{className:"wp-tag wp-tag--muted",children:[(0,St.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,St.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})})]},g.pair_address)})})}var vd=require("react"),hm=H(require("bignumber.js"),1);var em=require("@tanstack/react-query");var G1="wp:crossd-positions";function H1(e){let t=e??{};return(t.positions??t.data?.positions??[]).filter(r=>{if(!r?.token_id||!r.liquidity)return!1;try{return BigInt(r.liquidity)>0n}catch{return!1}})}function tm(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,em.useQuery)({queryKey:[G1,e,t],queryFn:async()=>{let s=await fetch(`${us[e]}/api/v1/positions?owner=${t}`,{cache:"no-store"});if(!s.ok)throw new Error(`crossd positions fetch failed: ${s.status}`);return H1(await s.json())},enabled:r,staleTime:0}),i=o??[];return{positions:i,isEmpty:i.length===0,...a}}var nm=require("@tanstack/react-query"),rm=require("react");var _1="wp:crossd-position-details";function V1(e){let t=e??{},n=t.data??t;return n?.token_id||n?.pool?n:null}function om(e,t,n=!0){let r=(0,nm.useQueries)({queries:t.map(a=>({queryKey:[_1,e,a],queryFn:async()=>{let i=await fetch(`${us[e]}/api/v1/positions/${a}`,{cache:"no-store"});if(!i.ok)throw new Error(`crossd position detail failed: ${i.status}`);return V1(await i.json())},enabled:n&&!!a,staleTime:6e4}))});return{detailMap:(0,rm.useMemo)(()=>{let a=new Map;return r.forEach((i,s)=>{let l=i.data,d=t[s];l&&d&&a.set(d,l)}),a},[r,t])}}var Lr=H(require("react"),1);var ce=require("react/jsx-runtime"),Q1=300*1e3,am="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function q1(e,t,n){if(t)return"Estimating...";if(!e)return"Wallet estimate";let r=e.maxFeePerGas??e.gasPrice;return!r||r<=0n||e.gasLimit<=0n?"Wallet estimate":`${is(e.gasLimit*r)} ${n??""}`.trim()}function wd(e,t,n){return n?"Estimating...":`${e} ${t}`.trim()}function im({open:e,status:t,target:n,token0Icon:r,token1Icon:o,token0Symbol:a,token1Symbol:i,nativeSymbol:s,txHash:l,error:d,copied:p=!1,hasEstimator:h,prepareWithdraw:u,confirmWithdraw:g,onClose:x,onCopyHash:y,trackFunnel:f}){let[c,b]=Lr.useState(null),[w,k]=Lr.useState(null),C=Lr.useRef(0);Lr.useEffect(()=>{if(!e||!n)return;let Z=++C.current;b(null),k(null),f?.("dialog_opened"),u().then(pe=>{C.current===Z&&(b(pe),k(pe?Date.now():null))})},[e,n]);let N=t==="submitting",T=t==="estimating"||t==="confirm"&&!c,R=Lr.useCallback(async()=>{let Z=c,pe=!w||Date.now()-w>Q1;if(!Z||pe){let Se=++C.current;if(Z=await u(),C.current!==Se)return;b(Z),k(Z?Date.now():null)}Z&&await g(Z)},[c,w,u,g]);if(!e||!n)return null;let{position:S,detail:E}=n,A=E.pool?.token0,F=E.pool?.token1,D=a||A?.symbol||S.pool?.token0_symbol||"?",G=i||F?.symbol||S.pool?.token1_symbol||"?",M=A?.decimals??18,j=F?.decimals??18,le=r||A?.logo_url||am,oe=o||F?.logo_url||am,ne=`${D}/${G}`,Q=c?zo(c.expectedAmount0.toString(),M):null,ee=c?zo(c.expectedAmount1.toString(),j):null,z=Uo(c?.estimate?.maxPriorityFeePerGas),q=Uo(c?.estimate?.maxFeePerGas??c?.estimate?.gasPrice),ae=as(c?.estimate?.gasLimit);return(0,ce.jsx)("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:Z=>{Z.target===Z.currentTarget&&!N&&x()},children:(0,ce.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,ce.jsx)("div",{className:"wp-claim-grabber","aria-hidden":!0,children:(0,ce.jsx)("span",{})}),(0,ce.jsxs)("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&l?(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:(0,ce.jsx)(cs,{})}),(0,ce.jsxs)("div",{className:"wp-claim-copy",children:[(0,ce.jsx)("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),(0,ce.jsxs)("p",{className:"wp-claim-desc",children:["Your ",ne," position withdrawal has been submitted. Balances will update shortly after the transaction settles."]})]}),(0,ce.jsx)("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:(0,ce.jsxs)("div",{className:"wp-claim-list-item",children:[(0,ce.jsx)("span",{children:"Tx Hash"}),(0,ce.jsxs)("button",{type:"button",className:"wp-claim-hash",onClick:y,"aria-label":"Copy transaction hash","data-track":"crossd_withdraw_hash_copy",children:[(0,ce.jsx)("strong",{children:os(l)}),p?(0,ce.jsx)(ds,{}):(0,ce.jsx)(ls,{})]})]})})]}):(0,ce.jsxs)(ce.Fragment,{children:[t==="error"&&(0,ce.jsxs)("div",{className:"wp-claim-heading",children:[(0,ce.jsx)("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),(0,ce.jsx)("p",{className:"wp-claim-error-message",children:d||"The withdraw request could not be completed."})]}),(0,ce.jsxs)("div",{className:"wp-claim-reward-card","data-fit":wa(D,Q??""),"aria-label":`Expected ${D}`,children:[(0,ce.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,ce.jsx)("img",{src:le,alt:"",width:28,height:28})}),(0,ce.jsx)("strong",{className:"wp-claim-reward-symbol",children:D}),(0,ce.jsx)("strong",{className:"wp-claim-reward-amount",children:Q??"Estimating..."})]}),(0,ce.jsxs)("div",{className:"wp-claim-reward-card","data-fit":wa(G,ee??""),"aria-label":`Expected ${G}`,children:[(0,ce.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,ce.jsx)("img",{src:oe,alt:"",width:28,height:28})}),(0,ce.jsx)("strong",{className:"wp-claim-reward-symbol",children:G}),(0,ce.jsx)("strong",{className:"wp-claim-reward-amount",children:ee??"Estimating..."})]}),h&&(0,ce.jsx)("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:(0,ce.jsxs)("div",{className:"wp-claim-detail-list",children:[(0,ce.jsxs)("div",{className:"wp-claim-detail-row",children:[(0,ce.jsx)("span",{children:"Est. Tx Fee"}),(0,ce.jsx)("strong",{children:q1(c?.estimate,T,s)})]}),(0,ce.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ce.jsx)("span",{children:"Priority Fee Per Gas"}),(0,ce.jsx)("strong",{children:wd(z,"Gwei",T)})]}),(0,ce.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ce.jsx)("span",{children:"Max Fee Per Gas"}),(0,ce.jsx)("strong",{children:wd(q,"Gwei",T)})]}),(0,ce.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ce.jsx)("span",{children:"Gas Limit"}),(0,ce.jsx)("strong",{children:wd(ae,"",T)})]})]})})]}),(0,ce.jsxs)("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&(0,ce.jsx)("button",{type:"button",className:"wp-claim-secondary","data-track":"crossd_withdraw_cancel",onClick:x,children:t==="error"?"Close":"Cancel"}),(0,ce.jsx)("button",{type:"button",className:"wp-claim-primary","data-track":"crossd_withdraw_confirm",onClick:()=>{if(t==="success"){x();return}N||T||(f?.("confirm_clicked"),R())},disabled:N||T,children:t==="success"?"Done":N?(0,ce.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}):T?(0,ce.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Estimating"}):t==="error"?"Retry":"Withdraw"})]})]}),(0,ce.jsx)("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:(0,ce.jsx)("span",{})})]})})}var Lt=H(require("react"),1),fm=require("@tanstack/react-query");var Y1="0x0c49ccbe",K1="0xfc6f7865",Z1="0x49404b7c",X1="0xdf2ab5bb",J1="0xac9650d8",sm=(1n<<128n)-1n,dm=600n,$1=99n,ey=100n;function yd(e){return e*$1/ey}function lm(e,t){return!!e&&!!t&&e.toLowerCase()===t.toLowerCase()}function Sn(e,t){if(e<0n)throw new Error(`${t} must be non-negative`);let n=e.toString(16);if(n.length>64)throw new Error(`${t} exceeds uint256`);return n.padStart(64,"0")}function gs(e,t){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`${t} is not a valid address`);return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function xd(e){return Y1+Sn(e.tokenId,"tokenId")+Sn(e.liquidity,"liquidity")+Sn(e.amount0Min,"amount0Min")+Sn(e.amount1Min,"amount1Min")+Sn(e.deadline,"deadline")}function ty(e){return K1+Sn(e.tokenId,"tokenId")+gs(e.recipient,"recipient")+Sn(e.amount0Max,"amount0Max")+Sn(e.amount1Max,"amount1Max")}function ny(e,t){return Z1+Sn(e,"amountMinimum")+gs(t,"recipient")}function ry(e,t,n){return X1+gs(e,"token")+Sn(t,"amountMinimum")+gs(n,"recipient")}function oy(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 Sn(BigInt(a.length/2),"callLength")+i.toLowerCase()}),n=BigInt(e.length)*32n,r=[];for(let o of t)r.push(Sn(n,"callOffset")),n+=BigInt(o.length/2);return J1+Sn(0x20n,"arrayOffset")+Sn(BigInt(e.length),"arrayLength")+r.join("")+t.join("")}function cm(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 pm(e){let t=lm(e.token0,e.wcrossAddress),n=lm(e.token1,e.wcrossAddress),r=t||n,o=[xd({tokenId:e.tokenId,liquidity:e.liquidity,amount0Min:e.amount0Min,amount1Min:e.amount1Min,deadline:e.deadline}),ty({tokenId:e.tokenId,recipient:r?e.positionManagerAddress:e.owner,amount0Max:sm,amount1Max:sm})];return r&&(o.push(ny(0n,e.owner)),o.push(ry(t?e.token1:e.token0,0n,e.owner))),oy(o)}async function um(e,t,n){let r;try{r=await Ca(e,n)}catch{r=void 0}if(!r)return null;let o=xd({tokenId:t.tokenId,liquidity:t.liquidity,amount0Min:0n,amount1Min:0n,deadline:t.deadline}),a=await Er(r,t.positionManager,o,n,t.owner);return cm(a)}var ay=[1500,3e3,4500,6e3];function iy(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function mm(){let{env:e,walletAddress:t,sendTransaction:n,estimateGas:r}=Wt(),o=!!n,a=(0,fm.useQueryClient)(),[i,s]=Lt.useState(!1),[l,d]=Lt.useState(null),[p,h]=Lt.useState("confirm"),[u,g]=Lt.useState(),[x,y]=Lt.useState(""),[f,c]=Lt.useState(!1),[b,w]=Lt.useState(new Set),k=Lt.useRef(void 0),C=Lt.useRef([]),N=Lt.useRef(0);Lt.useEffect(()=>()=>{clearTimeout(k.current),C.current.forEach(clearTimeout)},[]);let T=Lt.useRef(new Set),R=Lt.useCallback((M,j)=>{T.current.has(M)||(T.current.add(M),Je("withdraw",M,{...j,tags:{section:"crossdPool",...j?.tags}}))},[]),S=Lt.useCallback(()=>{let M=()=>Ar(a);M(),C.current.forEach(clearTimeout),C.current=ay.map(j=>setTimeout(M,j))},[a]),E=Lt.useCallback(M=>{N.current+=1,d(M),s(!0),h("confirm"),g(void 0),y(""),c(!1),T.current=new Set,R("opened")},[R]),A=Lt.useCallback(()=>{p!=="submitting"&&(N.current+=1,s(!1),d(null),h("confirm"),g(void 0),y(""),c(!1))},[p]),F=Lt.useCallback(async()=>{let M=N.current,j=iy(t),le=l?.position.token_id,oe=l?.position.liquidity,ne=l?.detail.pool?.token0?.address,Q=l?.detail.pool?.token1?.address;if(!j||!le||!oe||!ne||!Q)return h("error"),y("Position data is incomplete. Please refresh and retry."),null;try{h("estimating"),y("");let ee=BigInt(le),z=BigInt(oe),q=BigInt(Math.floor(Date.now()/1e3))+dm,ae=ff[e],Z=await um(e,{owner:j,positionManager:ae,tokenId:ee,liquidity:z,deadline:q});if(N.current!==M)return null;if(!Z)return h("error"),y("Failed to estimate withdrawal amounts. Please retry."),null;let pe=pm({tokenId:ee,liquidity:z,amount0Min:yd(Z.amount0),amount1Min:yd(Z.amount1),deadline:q,owner:j,positionManagerAddress:ae,token0:ne,token1:Q,wcrossAddress:mf[e]}),Se={to:ae,value:0n,data:pe,chainId:At[e].cross},Ue=null;if(r){try{Ue=await r({...Se,from:j})}catch{Ue=null}if(N.current!==M)return null}return h("confirm"),{tx:Se,estimate:Ue,expectedAmount0:Z.amount0,expectedAmount1:Z.amount1}}catch(ee){return N.current!==M||(h("error"),y(ya(ee,"Failed to prepare withdraw."))),null}},[e,r,l,t]),D=Lt.useCallback(async M=>{if(!n){h("error"),y("Withdraw is not available for this wallet.");return}try{h("submitting"),y(""),R("submitted");let j=await n({...M.tx,gas:M.estimate?.gasLimit&&M.estimate.gasLimit>0n?M.estimate.gasLimit:void 0,maxFeePerGas:M.estimate?.maxFeePerGas&&M.estimate.maxFeePerGas>0n?M.estimate.maxFeePerGas:void 0,maxPriorityFeePerGas:M.estimate?.maxPriorityFeePerGas&&M.estimate.maxPriorityFeePerGas>0n?M.estimate.maxPriorityFeePerGas:void 0});g(j),h("success");let le=l?.position.token_id;le&&w(oe=>{let ne=new Set(oe);return ne.add(le),ne}),R("confirmed"),S()}catch(j){h("error"),y(ya(j,"Failed to request withdraw.")),R("confirmed",{status:"failure",reason:Nn(j)})}},[S,n,l,R]),G=Lt.useCallback(async()=>{if(!(!u||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(u),c(!0),clearTimeout(k.current),k.current=setTimeout(()=>c(!1),1400)}catch{c(!1)}},[u]);return{canWithdrawInline:o,isOpen:i,target:l,withdrawnTokenIds:b,status:p,txHash:u,error:x,copied:f,hasEstimator:!!r,openWithdraw:E,closeWithdraw:A,prepareWithdraw:F,confirmWithdraw:D,copyHash:G,trackFunnelOnce:R}}var gt=require("react/jsx-runtime"),sy="ONEusd Pool",gm="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function bm(){let{env:e,walletAddress:t,onOutlink:n}=Wt(),r=Fn(),o=!!t,{positions:a,isLoading:i}=tm(e,t,o),s=mm(),l=(0,vd.useMemo)(()=>a.filter(R=>!R.token_id||!s.withdrawnTokenIds.has(R.token_id)),[a,s.withdrawnTokenIds]),d=(0,vd.useMemo)(()=>l.map(R=>R.token_id).filter(R=>!!R),[l]),{detailMap:p}=om(e,d,o&&d.length>0),h=`${uf[e]}/pool`,{getTokenImage:u,getTokenSymbol:g,getNativeToken:x}=mr(e,o),y=u("","ONEUSD",{chainOnly:!0})||`${Un[e]}/crossd.png`,f={chainOnly:!0},c=(R,S)=>{let E=id(g(R?.address??"",R?.symbol??S,f));return E==="ONE"?x()?.symbol??"?":E??"?"},b=(R,S)=>{let E=R?.symbol??S,A=id(E);return A==="ONE"?x()?.image||gm:u(R?.address??"",A,f)||R?.logo_url||gm},w=s.target?.detail.pool,k=b(w?.token0,s.target?.position.pool?.token0_symbol),C=b(w?.token1,s.target?.position.pool?.token1_symbol),N=c(w?.token0,s.target?.position.pool?.token0_symbol),T=c(w?.token1,s.target?.position.pool?.token1_symbol);return(0,gt.jsxs)(gt.Fragment,{children:[(0,gt.jsx)(jn,{sectionKey:"crossdPool",title:sy,icon:y,iconFit:"contain",isEmpty:l.length===0,loading:i,children:l.map(R=>{let S=R.token_id?p.get(R.token_id):void 0,E=`${c(S?.pool?.token0,R.pool?.token0_symbol)}/${c(S?.pool?.token1,R.pool?.token1_symbol)}`,A=R.pool?.fee_tier_percentage,F=b(S?.pool?.token0,R.pool?.token0_symbol),D=b(S?.pool?.token1,R.pool?.token1_symbol),G=co(new hm.default(R.position_value_usd??"0"),r),M=s.canWithdrawInline&&!!S?.pool?.token0?.address&&!!S?.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:F,alt:""}),(0,gt.jsx)("img",{className:"wp-svc-token-icon",src:D,alt:""})]}),(0,gt.jsx)("span",{children:E}),A&&(0,gt.jsx)("span",{className:"wp-token-subtle",children:A})]})]}),(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:G})]})]}),(0,gt.jsx)("div",{className:"wp-item-tags",children:M?(0,gt.jsx)("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"crossd_pool_withdraw_open","data-track-id":E,onClick:()=>{S&&s.openWithdraw({position:R,detail:S})},children:(0,gt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"})}):(0,gt.jsxs)("a",{className:"wp-tag wp-tag--muted",href:h,target:"_blank",rel:"noopener noreferrer","data-track":"crossd_pool_outlink","data-track-id":E,onClick:j=>jt(j,h,{category:"portfolio",origin:"portfolio-crossd-pool",payload:{position:R,detail:S}},n),children:[(0,gt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,gt.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})})]},R.token_id)})}),(0,gt.jsx)(im,{open:s.isOpen,status:s.status,target:s.target,token0Icon:k,token1Icon:C,token0Symbol:N,token1Symbol:T,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 Na=["rewards","points","staking","gameSwap","forge","crossdPool"];he(`.wp-fullscreen[data-theme=dark],.wp-embed[data-theme=dark]{--wp-bg: var(--ds-bg-dim, #191d27);--wp-header-bg: var(--ds-surface-default, #252b39);--wp-card: var(--ds-surface-default, #1e232e);--wp-control: #292f40;--wp-border: var(--ds-border-default, #292f40);--wp-panel-border: var(--ds-border-medium, rgba(255, 255, 255, .18));--wp-panel-shadow: 0px 4px 30px -1px rgba(0, 0, 0, .28);--wp-text: var(--ds-content-highest, #ffffff);--wp-text-60: var(--ds-content-high, rgba(255, 255, 255, .85));--wp-text-40: var(--ds-content-medium, rgba(255, 255, 255, .65));--wp-text-30: var(--ds-content-low, rgba(255, 255, 255, .4));--wp-chrome-text: #ffffff;--wp-tooltip-bg: #151a23;--wp-tooltip-text: #ffffff;--wp-mint: var(--ds-accent-primary-high, #a392ff);--wp-green: var(--ds-system-green-high, #00a0a2);--wp-accent-soft: var(--ds-accent-primary-low, #2e2854);--wp-red: var(--ds-system-red-default, #e70077);--wp-blue: #0488fc;--wp-purple: #7346f3;--wp-orange: #ff9d00;--wp-claim-primary: #ed0a72;--wp-claim-primary-text: #ffffff;--wp-claim-secondary-bg: var(--wp-control);--wp-claim-success: #00d4aa;--wp-claim-success-soft: rgba(0, 212, 170, .18);--wp-claim-error: #ff3aa3;--wp-claim-error-soft: rgba(255, 58, 163, .16)}.wp-fullscreen[data-theme=light],.wp-embed[data-theme=light]{--wp-bg: var(--ds-bg-dim, #f5f7fa);--wp-header-bg: var(--ds-surface-default, #ffffff);--wp-card: var(--ds-surface-default, #ffffff);--wp-control: var(--ds-surface-medium, #f5f7fa);--wp-border: var(--ds-border-default, rgba(0, 0, 0, .07));--wp-panel-border: var(--ds-border-medium, rgba(0, 0, 0, .18));--wp-panel-shadow: 0px 4px 30px -1px rgba(0, 0, 0, .15);--wp-text: var(--ds-content-highest, #000000);--wp-text-60: var(--ds-content-high, rgba(0, 0, 0, .85));--wp-text-40: var(--ds-content-medium, rgba(0, 0, 0, .65));--wp-text-30: var(--ds-content-low, rgba(0, 0, 0, .4));--wp-chrome-text: var(--ds-content-high, rgba(0, 0, 0, .85));--wp-card-shadow: none;--wp-tooltip-bg: #192023;--wp-tooltip-text: #ffffff;--wp-mint: var(--ds-accent-primary-high, #7346f3);--wp-green: var(--ds-system-green-high, #00a0a2);--wp-accent-soft: var(--ds-accent-primary-low, #f5f3ff);--wp-red: var(--ds-system-red-default, #e70077);--wp-blue: #0488fc;--wp-purple: #7346f3;--wp-orange: #ff9d00;--wp-claim-primary: #ed0a72;--wp-claim-primary-text: #ffffff;--wp-claim-secondary-bg: #ffffff;--wp-claim-success: #019d92;--wp-claim-success-soft: rgba(1, 157, 146, .15);--wp-claim-error: #e70077;--wp-claim-error-soft: rgba(231, 0, 119, .12)}.wp-fullscreen{position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;max-height:100dvh!important;z-index:50;background:var(--wp-bg);display:flex;flex-direction:column;overflow:hidden;font-family:inherit;font-feature-settings:"calt" 0,"lnum" 1,"pnum" 1;box-sizing:border-box;-webkit-font-smoothing:antialiased;color:var(--wp-chrome-text)}.wp-embed{width:100%;height:100%;min-height:0;background:var(--wp-bg);display:flex;flex-direction:column;overflow:hidden;position:relative;font-family:inherit;font-feature-settings:"calt" 0,"lnum" 1,"pnum" 1;box-sizing:border-box;-webkit-font-smoothing:antialiased;color:var(--wp-chrome-text)}.wp-overlay{position:fixed;inset:0;z-index:49;background:#0009}.wp-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:73px;padding:24px;position:relative;border-bottom:1px solid var(--wp-border);background:var(--wp-header-bg);color:var(--wp-chrome-text);flex-shrink:0;box-sizing:border-box}.wp-fullscreen .wp-header{height:60px;min-height:60px;padding:11px 20px;border-bottom:none;background:transparent}.wp-fullscreen .wp-header-btn{width:22px;height:22px;color:var(--wp-chrome-text)}.wp-fullscreen .wp-header-btn:hover{color:var(--wp-chrome-text)}.wp-header-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wp-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wp-header-edge{display:flex;align-items:center;width:24px;min-width:24px}.wp-header-edge--right{justify-content:flex-end}.wp-header-edge--right .wp-header-btn{position:absolute;top:24px;right:24px}.wp-header-spacer{display:block;width:24px;height:24px}.wp-header-avatar{width:38px;height:38px;flex-shrink:0;border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:var(--wp-header-avatar-bg)}.wp-header-avatar-img{width:30px;height:30px;object-fit:cover;display:block}.wp-fullscreen[data-theme=dark] .wp-header-avatar,.wp-embed[data-theme=dark] .wp-header-avatar{--wp-header-avatar-bg: hsl(221.3 24.6% 25.5%)}.wp-fullscreen[data-theme=light] .wp-header-avatar,.wp-embed[data-theme=light] .wp-header-avatar{--wp-header-avatar-bg: rgba(18, 18, 18, .1)}.wp-refresh-btn{position:relative}.wp-refresh-badge{position:absolute;top:-6px;right:-8px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--wp-mint);color:var(--ds-accent-primary-on, #ffffff);font-size:10px;font-weight:600;line-height:16px;text-align:center}.wp-spin-once{animation:wp-spin-once .6s ease-in-out}@keyframes wp-spin-once{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.wp-header-title{flex:1;font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;text-align:center;color:var(--ds-content-highest, #000000);margin:0}.wp-header-account{flex:1;display:flex;align-items:center;gap:12px;min-width:0}.wp-header-account-meta{display:flex;flex-direction:column;justify-content:center;min-width:0;gap:2px}.wp-header-wallet-name{min-width:0;font-family:inherit;font-size:15px;font-weight:600;line-height:1.4;letter-spacing:0;color:var(--wp-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-header-address-btn{display:inline-flex;align-items:center;gap:4px;align-self:flex-start;max-width:100%;padding:0;border:0;background:transparent;cursor:pointer;font:inherit}.wp-header-address{min-width:0;font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;color:var(--wp-text-40);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-header-address-copy{display:inline-flex;align-items:center;flex-shrink:0;color:var(--wp-text-40);transition:color .15s ease}.wp-header-address-btn:hover .wp-header-address-copy{color:var(--wp-text-60)}.wp-header-address-copy[data-copied=true]{color:var(--wp-mint)}.wp-top{flex-shrink:0;padding:0 16px 16px;display:flex;flex-direction:column;gap:16px}.wp-identity{display:flex;flex-direction:column;gap:8px}.wp-address{display:inline-flex;align-items:center;gap:8px}.wp-address-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-address-chevron{display:inline-flex;align-items:center;color:var(--wp-text-40)}.wp-total{font-size:28px;font-weight:600;line-height:1.3;color:var(--wp-text);margin:0}.wp-asset{display:flex;flex-direction:column;gap:8px}.wp-asset-head{display:flex;align-items:center;gap:4px}.wp-asset-head-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-asset-head-icon{display:inline-flex;color:var(--wp-text-40)}.wp-bar{display:flex;height:20px;border-radius:4px;overflow:hidden}.wp-bar-seg{display:flex;align-items:center;justify-content:center;min-width:8px}.wp-bar-seg-pct{font-size:10px;font-weight:400;line-height:1.3;color:#fff;white-space:nowrap}.wp-legend{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap}.wp-legend-item{display:flex;align-items:center;gap:4px}.wp-legend-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.wp-legend-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-tabs{flex-shrink:0;padding:8px 16px}.wp-tabs-inner{display:flex;align-items:center;padding:0 2px}.wp-tabs-list{display:flex;gap:20px;flex:1}.wp-tab{display:flex;flex-direction:column;align-items:center;justify-content:space-between;height:44px;padding-top:12px;background:transparent;border:none;cursor:pointer}.wp-tab-text{font-size:14px;font-weight:600;line-height:1.4;color:var(--wp-text-30);white-space:nowrap}.wp-tab[data-active=true] .wp-tab-text{color:var(--wp-mint)}.wp-tab-bar{width:20px;height:4px;border-radius:2px;background:var(--wp-mint);opacity:0}.wp-tab[data-active=true] .wp-tab-bar{opacity:1}.wp-tabs-filter-wrap{position:relative;display:flex;align-items:center;width:44px;height:44px;flex-shrink:0}.wp-tabs-filter-grad{position:absolute;inset:0;background:linear-gradient(to left,var(--wp-bg) 74%,transparent);pointer-events:none}.wp-tabs-filter{position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--wp-text-40)}.wp-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--wp-border) transparent}.wp-body::-webkit-scrollbar{width:4px}.wp-body::-webkit-scrollbar-track{background:transparent}.wp-body::-webkit-scrollbar-thumb{background:var(--wp-border);border-radius:4px}.wp-body-inner{padding:16px 16px 32px;display:flex;flex-direction:column;gap:32px}.wp-fullscreen .wp-body-inner{padding-top:8px;gap:24px}.wp-summary-card{display:flex;flex-direction:column;gap:8px;width:100%;padding:0;border-radius:0;background:transparent;box-shadow:none;box-sizing:border-box}.wp-summary-head{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:4px}.wp-summary-label{font-size:14px;font-weight:400;line-height:1.5;letter-spacing:0;color:var(--wp-text-40);white-space:nowrap}.wp-address{display:inline-flex;align-items:center;gap:8px;min-width:0}.wp-address-avatar{width:16px;height:16px;border-radius:50%;flex-shrink:0;background:radial-gradient(circle at 68% 34%,#ff78d1 0 18%,transparent 19%),radial-gradient(circle at 34% 66%,#00d4aa 0 20%,transparent 21%),linear-gradient(135deg,#7346f3,#0488fc)}.wp-address-label{font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;color:var(--wp-text-40);white-space:nowrap}.wp-address-chevron{display:inline-flex;align-items:center;color:var(--wp-text-40);flex-shrink:0}.wp-summary-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;border-radius:999px;background:#019d921a;color:var(--wp-mint);font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;white-space:nowrap}.wp-summary-estimate{position:relative;display:inline-flex;align-items:center;gap:6px;flex-shrink:0}.wp-estimate-info{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--wp-text-40);cursor:help}.wp-estimate-tooltip{position:absolute;top:calc(100% + 8px);left:0;right:auto;z-index:3;display:flex;flex-direction:column;gap:8px;width:min(280px,calc(100vw - 48px));padding:12px;border-radius:8px;background:var(--wp-tooltip-bg);box-shadow:0 12px 32px #0000003d;color:var(--wp-tooltip-text);font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;text-align:left;white-space:normal;opacity:0;pointer-events:none;transform:translateY(-4px);visibility:hidden;transition:opacity .15s ease,transform .15s ease,visibility .15s ease}.wp-estimate-tooltip-title{display:block;font-size:12px;font-weight:600;line-height:1.3}.wp-estimate-tooltip-group{display:flex;flex-direction:column;gap:4px}.wp-estimate-tooltip-item{display:block;color:#ffffffc7}.wp-estimate-tooltip-item:before{content:"- "}.wp-estimate-info:hover .wp-estimate-tooltip,.wp-estimate-info:focus .wp-estimate-tooltip,.wp-estimate-info:focus-visible .wp-estimate-tooltip{opacity:1;transform:translateY(0);visibility:visible}.wp-total{font-family:var( --wp-total-font-family, Sora, Inter, system-ui, -apple-system, sans-serif );font-size:36px;font-weight:600;line-height:1.25;letter-spacing:0;color:var(--wp-text);margin:0}.wp-svc-card{display:flex;flex-direction:column;gap:12px;width:100%}.wp-svc-card-head{display:flex;align-items:center;gap:6px}.wp-svc-card-icon{width:24px;height:24px;border-radius:4px;flex-shrink:0;object-fit:cover}.wp-svc-card-title{font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wp-svc-items{display:flex;flex-direction:column;gap:8px;width:100%;padding:0;border-radius:0;background:transparent;box-shadow:none;box-sizing:border-box}.wp-item{position:relative;display:flex;flex-direction:column;gap:20px;width:100%;padding:12px;border-radius:12px;background:var(--wp-card);box-shadow:var(--wp-card-shadow, none);box-sizing:border-box;color:inherit;text-decoration:none;cursor:pointer;outline:none;transition:opacity .15s ease}.wp-item+.wp-item{padding-top:12px;border-top:0}.wp-item:hover{opacity:.88}.wp-item-body{display:flex;flex-direction:column;gap:12px;min-width:0}.wp-order-head{display:flex;align-items:center;width:100%}.wp-item-line{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:21px;min-width:0}.wp-item-label{flex-shrink:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-30);white-space:nowrap}.wp-line-value,.wp-order-side{min-width:0;overflow:hidden;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-order-side--buy{color:var(--wp-mint)}.wp-order-side--sell{color:var(--wp-red)}.wp-svc-token{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;min-height:21px}.wp-svc-token>span{font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-svc-token-icon{width:16px;height:16px;border-radius:50%;flex-shrink:0;object-fit:cover}.wp-item[data-side=reward] .wp-svc-token-icon{border-radius:0;object-fit:contain}.wp-svc-token--amount{align-items:flex-start}.wp-svc-token--amount>.wp-svc-token-icon{margin-top:2.5px}.wp-token-stack{display:inline-flex;align-items:center;justify-content:flex-end;width:29px;min-width:29px;overflow:visible}.wp-token-stack .wp-svc-token-icon+.wp-svc-token-icon{margin-left:-3.5px}.wp-token-subtle,.wp-item-usd{color:var(--wp-text-30)!important}.wp-svc-amount{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:1px;min-width:0}.wp-svc-amount-main{font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.wp-svc-amount .wp-item-usd{font-size:12px;font-weight:500;line-height:1.35}.wp-order-token{display:flex;align-items:center;gap:8px;min-width:0}.wp-order-token .wp-svc-token-icon{width:32px;height:32px}.wp-order-token-meta{display:flex;min-width:0;flex-direction:column;justify-content:center}.wp-order-token-symbol{overflow:hidden;color:var(--wp-text-60);font-size:14px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.wp-order-token-pair{overflow:hidden;color:var(--wp-text-30);font-size:12px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.wp-item-tags{display:flex;align-items:stretch;gap:8px;width:100%}.wp-tag{appearance:none;display:inline-flex;flex:1 1 0;align-items:center;justify-content:center;gap:0;min-width:0;min-height:33px;padding:6px 10px;border-radius:6px;border:0;background:var(--wp-control);font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:0;color:var(--wp-text-40);text-align:center;text-decoration:none;white-space:nowrap;box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,color .15s ease,transform .15s ease}a.wp-tag,button.wp-tag{cursor:pointer}.wp-tag:hover{background:var(--wp-control);transform:none}.wp-tag:focus-visible{outline:2px solid var(--wp-mint);outline-offset:2px}.wp-tag[aria-disabled=true],.wp-tag[data-disabled]{cursor:default;opacity:.48;pointer-events:none}.wp-tag-label{display:inline-flex;align-items:center}.wp-tag-icon{display:none}.wp-tag:hover .wp-tag-icon{transform:none}.wp-tag--mint{color:var(--wp-mint);background:var(--wp-accent-soft)}.wp-tag--mint:hover{background:var(--wp-accent-soft)}.wp-tag--muted{color:var(--wp-text-40);background:var(--ds-surface-medium, var(--wp-control))}.wp-body-inner[data-empty]{min-height:100%;box-sizing:border-box;justify-content:center}.wp-portfolio-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:280px;padding:32px 24px;text-align:center}.wp-portfolio-empty-icon{display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin-bottom:6px;border-radius:50%;background:var(--wp-card);box-shadow:var(--wp-card-shadow, none);color:var(--wp-text-30)}.wp-portfolio-empty-title{margin:0;font-size:15px;font-weight:600;line-height:1.3;color:var(--wp-text-60)}.wp-portfolio-empty-desc{margin:0;font-size:13px;font-weight:400;line-height:1.4;color:var(--wp-text-30)}.wp-portfolio-loading{display:flex;align-items:center;justify-content:center;min-height:280px;padding:32px 24px}.wp-portfolio-spinner{width:22px;height:22px;border:2px solid var(--wp-border);border-top-color:var(--wp-mint);border-radius:50%;animation:wp-claim-spin .8s linear infinite}.wp-claim-overlay{position:absolute;inset:0;z-index:8;display:flex;align-items:flex-end;justify-content:center;background:#00000094;box-sizing:border-box}.wp-claim-sheet{display:flex;flex-direction:column;width:100%;max-height:calc(100% - 24px);overflow:hidden;border-radius:24px 24px 0 0;background:var(--wp-bg);color:var(--wp-text);box-shadow:0 -18px 48px #00000042;animation:wp-claim-slide-up .22s ease-out}@keyframes wp-claim-slide-up{0%{transform:translateY(18px);opacity:0}to{transform:translateY(0);opacity:1}}.wi-popover-content .wp-claim-sheet{min-height:min(600px,calc(100% - 24px))}.wi-popover-content .wp-claim-content{flex:1 1 auto}.wi-popover-content .wp-claim-actions{margin-top:auto}.wp-claim-grabber{display:flex;align-items:flex-start;justify-content:center;height:38px;min-height:38px;padding-top:12px;box-sizing:border-box}.wp-claim-grabber span{display:block;width:52px;height:5px;border-radius:999px;background:var(--wp-control)}.wp-claim-content{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;padding:20px;box-sizing:border-box}.wp-claim-icon{display:inline-flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:50%;flex-shrink:0}.wp-claim-icon--success{background:var(--wp-claim-success-soft);color:var(--wp-claim-success)}.wp-claim-icon--pending{background:#9b8cef29;color:var(--wp-claim-primary)}.wp-claim-icon--error{background:var(--wp-claim-error-soft);color:var(--wp-claim-error);font-size:30px;font-weight:600;line-height:1}.wp-claim-icon--token{background:#00d4aa29}.wp-claim-icon--token img{width:48px;height:48px;border-radius:50%;object-fit:cover}.wp-claim-icon--token span{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;background:var(--wp-mint);color:var(--ds-accent-primary-on, #ffffff);font-size:18px;font-weight:600}.wp-claim-spinner{width:36px;height:36px;border-radius:50%;border:3px solid rgba(155,140,239,.28);border-top-color:var(--wp-claim-primary);animation:wp-claim-spin .8s linear infinite}@keyframes wp-claim-spin{to{transform:rotate(360deg)}}.wp-claim-copy{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;text-align:center}.wp-claim-title{margin:0;font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;color:var(--wp-text)}.wp-claim-desc{max-width:335px;margin:0;font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;color:var(--wp-text-40)}.wp-claim-heading{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.wp-claim-error-message{margin:0;color:var(--wp-claim-error);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0}.wp-claim-reward-card{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;min-height:60px;padding:16px 8px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-reward-token{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;flex-shrink:0;overflow:hidden;background:var(--wp-control)}.wp-claim-reward-token img{width:28px;height:28px;object-fit:cover}.wp-claim-reward-token span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--wp-mint);color:var(--ds-accent-primary-on, #ffffff);font-size:13px;font-weight:600;line-height:1}.wp-claim-reward-symbol{flex:1 1 auto;min-width:0;overflow:hidden;color:var(--wp-text);font-size:18px;font-weight:600;line-height:1.3;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.wp-claim-reward-amount{flex-shrink:0;color:var(--wp-text);font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-reward-card[data-fit=sm] .wp-claim-reward-symbol{font-size:14px}.wp-claim-reward-card[data-fit=sm] .wp-claim-reward-amount{font-size:16px}.wp-claim-reward-card[data-fit=xs] .wp-claim-reward-symbol{font-size:12px}.wp-claim-reward-card[data-fit=xs] .wp-claim-reward-amount{font-size:13px}.wp-claim-account-card{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-account-row{display:flex;align-items:center;justify-content:space-between;gap:4px;width:100%;min-height:40px}.wp-claim-account-row>span{flex-shrink:0;color:var(--wp-text-40);font-size:14px;font-weight:400;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-account{display:flex;align-items:center;gap:8px;min-width:0}.wp-claim-account strong{overflow:hidden;color:var(--wp-text);font-size:15px;font-weight:600;line-height:1.6;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.wp-claim-account-avatar{width:32px;height:32px;border-radius:50%;flex-shrink:0;background:radial-gradient(circle at 30% 28%,#d87aff 0 12%,transparent 13%),radial-gradient(circle at 68% 28%,#f0a1ff 0 12%,transparent 13%),radial-gradient(circle at 32% 70%,#b561e7 0 13%,transparent 14%),radial-gradient(circle at 70% 70%,#d4a2ff 0 13%,transparent 14%),radial-gradient(circle at 50% 50%,#8c4fc4 0 18%,transparent 19%),#4a315f;box-shadow:inset 0 0 0 3.37px var(--wp-control)}.wp-claim-divider{display:block;width:100%;height:1px;background:var(--wp-border)}.wp-claim-detail-list{display:flex;flex-direction:column;gap:8px;width:100%}.wp-claim-detail-row{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;min-height:20px}.wp-claim-detail-row>span{min-width:0;color:var(--wp-text-40);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-detail-row--sub>span:before{content:"";display:inline-block;width:3px;height:3px;margin:0 8px 3px;background:currentColor}.wp-claim-detail-row strong{min-width:0;overflow:hidden;color:var(--wp-text);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-list{display:flex;flex-direction:column;gap:8px;width:100%;padding-bottom:8px}.wp-claim-list-item{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px;padding:8px 16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-list-item>span{flex-shrink:0;font-size:14px;font-weight:400;line-height:1.3;color:var(--wp-text-40);white-space:nowrap}.wp-claim-list-item strong{display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;overflow:hidden;color:var(--wp-text);font-size:14px;font-weight:400;line-height:1.3;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-list-item img{width:16px;height:16px;border-radius:50%;flex-shrink:0}.wp-claim-hash{appearance:none;display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;padding:0;border:none;background:transparent;color:var(--wp-text);cursor:pointer;font:inherit}.wp-claim-hash svg{flex-shrink:0;color:var(--wp-text-60)}.wp-claim-gas-card{display:flex;flex-direction:column;gap:4px;width:100%;padding:14px 16px;border-radius:8px;border:1px solid var(--wp-border);background:var(--wp-card);box-sizing:border-box}.wp-claim-gas-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:28px}.wp-claim-gas-row>span{min-width:0;font-size:12px;font-weight:400;line-height:1.3;color:var(--wp-text-40)}.wp-claim-gas-row strong{min-width:0;overflow:hidden;color:var(--wp-text);font-size:12px;font-weight:400;line-height:1.3;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-gas-row--primary{min-height:32px}.wp-claim-gas-row--primary>span,.wp-claim-gas-row--primary strong{font-size:14px;color:var(--wp-text)}.wp-claim-fee-label{position:relative;display:inline-flex;align-items:center;text-decoration:underline dotted;text-underline-offset:3px;cursor:help;overflow:visible!important}.wp-claim-fee-tooltip{position:absolute;left:0;bottom:calc(100% + 8px);z-index:2;width:min(260px,calc(100vw - 64px));padding:10px 12px;border-radius:8px;background:var(--wp-tooltip-bg);color:var(--wp-tooltip-text);box-shadow:0 12px 32px #0000003d;font-size:11px;font-weight:400;line-height:1.4;text-align:left;text-decoration:none;white-space:normal;opacity:0;pointer-events:none;transform:translateY(4px);visibility:hidden;transition:opacity .15s ease,transform .15s ease,visibility .15s ease}.wp-claim-fee-label:hover .wp-claim-fee-tooltip,.wp-claim-fee-label:focus .wp-claim-fee-tooltip,.wp-claim-fee-label:focus-visible .wp-claim-fee-tooltip{opacity:1;transform:translateY(0);visibility:visible}.wp-claim-actions{display:flex;align-items:center;gap:8px;width:100%}.wp-claim-primary,.wp-claim-secondary{appearance:none;display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:0;height:52px;padding:0 24px;border:none;border-radius:40px;font-family:inherit;font-size:15px;font-weight:600;line-height:1.3;letter-spacing:0;white-space:nowrap;cursor:pointer}.wp-claim-primary{background:var(--wp-claim-primary);color:var(--wp-claim-primary-text)}.wp-claim-primary:disabled{cursor:default;opacity:.72}.wp-claim-secondary{background:var(--wp-claim-secondary-bg, var(--wp-control));color:var(--wp-claim-primary)}.wp-claim-actions[data-count="2"] .wp-claim-primary{flex:1 1 0}.wp-claim-actions[data-count="2"] .wp-claim-secondary{flex:0 0 120px}.wp-claim-button-spinner{width:16px;height:16px;border-radius:50%;border:2px solid rgba(32,37,48,.28);border-top-color:var(--wp-claim-primary-text);animation:wp-claim-spin .8s linear infinite}.wp-claim-home-indicator{display:flex;align-items:flex-end;justify-content:center;height:34px;min-height:34px;padding-bottom:8px;box-sizing:border-box}.wp-claim-home-indicator span{display:block;width:134px;height:5px;border-radius:16px;background:var(--wp-text-40)}@media(max-width:359px){.wp-header{gap:12px;padding:0 12px}.wp-total{font-size:24px}.wp-body-inner{padding:0 12px 128px;gap:20px}.wp-claim-content{padding:18px 14px}.wp-item-line{gap:10px}.wp-svc-token>span{max-width:168px}}@media(max-width:360px){.wp-item-label-sub{display:none}}.wp-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.wi-drawer-content .wp-header,.wi-portfolio-body .wp-header{padding:16px}.wi-drawer-content .wp-header-edge--right .wp-header-btn,.wi-portfolio-body .wp-header-edge--right .wp-header-btn{top:16px;right:16px}.wp-withdraw-amount-card{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-withdraw-amount-row{display:flex;align-items:center;gap:8px;width:100%}.wp-withdraw-input{flex:1 1 auto;min-width:0;padding:0;border:none;background:transparent;color:var(--wp-text);font-family:inherit;font-size:24px;font-weight:600;line-height:1.3;letter-spacing:0;text-align:left;outline:none}.wp-withdraw-input::placeholder{color:var(--wp-text-30)}.wp-withdraw-input[aria-invalid=true]{color:var(--wp-claim-error)}.wp-withdraw-input-symbol{flex-shrink:0;color:var(--wp-text-40);font-size:15px;font-weight:600;line-height:1.3}.wp-withdraw-quick-row{display:flex;align-items:center;gap:8px;width:100%}.wp-withdraw-quick{appearance:none;flex:1 1 0;min-width:0;height:32px;padding:0 10px;border:1px solid var(--wp-border);border-radius:999px;background:transparent;color:var(--wp-text-60);font-family:inherit;font-size:13px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer}.wp-withdraw-quick:hover:not(:disabled){border-color:var(--wp-claim-primary);color:var(--wp-claim-primary)}.wp-withdraw-quick:disabled{cursor:default;opacity:.5}.wp-withdraw-content{overflow-y:auto}.wp-withdraw-token-list{display:flex;flex-direction:column;gap:8px;width:100%;max-height:216px;overflow-y:auto}.wp-withdraw-token{appearance:none;display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:10px 12px;border:1px solid var(--wp-border);border-radius:8px;background:var(--wp-card);color:var(--wp-text);font-family:inherit;text-align:left;cursor:pointer;box-sizing:border-box}.wp-withdraw-token[data-selected]{border-color:var(--wp-claim-primary);box-shadow:inset 0 0 0 1px var(--wp-claim-primary)}.wp-withdraw-token:disabled{cursor:default;opacity:.6}.wp-withdraw-token-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;flex-shrink:0;overflow:hidden;background:var(--wp-control)}.wp-withdraw-token-icon img{width:28px;height:28px;object-fit:cover}.wp-withdraw-token-icon span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--wp-mint);color:var(--ds-accent-primary-on, #ffffff);font-size:13px;font-weight:600;line-height:1}.wp-withdraw-token-symbol{flex:1 1 auto;min-width:0;overflow:hidden;font-size:15px;font-weight:600;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}.wp-withdraw-token-amount{flex-shrink:0;color:var(--wp-text-40);font-size:13px;font-weight:500;line-height:1.3;white-space:nowrap}
|
|
9
|
+
`);var Ae=require("react/jsx-runtime"),kd=15;function uo({env:e,theme:t="light",walletAddress:n,walletName:r,onBack:o,showHeader:a=!0,autoRefresh:i=!0,variant:s="embed",className:l,onOutlink:d,lpBalanceReader:p,stakingRewardsReader:h,sendTransaction:u,estimateGas:g,conversionRatio:x,currencySymbol:y,sections:f}){let c=it(e),b=_t.useCallback(fe=>!f||f.includes(fe),[f]),w=!!n,k=(0,wm.useQueryClient)(),[C,N]=_t.useState({}),T=_t.useCallback((fe,Re)=>{N(Ce=>{let tt=Ce[fe];return tt&&tt.loading===Re.loading&&tt.empty===Re.empty?Ce:{...Ce,[fe]:Re}})},[]),R=_t.useCallback(fe=>{N(Re=>{if(!(fe in Re))return Re;let Ce={...Re};return delete Ce[fe],Ce})},[]),S=_t.useMemo(()=>({report:T,unregister:R}),[T,R]),[E,A]=_t.useState(kd),[F,D]=_t.useState(!1),[G,M]=_t.useState(!1),j=_t.useRef(void 0),le=_t.useCallback(()=>{Ar(k)},[k]),oe=_t.useCallback(()=>{le(),D(!0),setTimeout(()=>D(!1),600),A(kd)},[le]);_t.useEffect(()=>{if(!w||!i)return;let fe=setInterval(()=>{A(Re=>Re<=1?(oe(),kd):Re-1)},1e3);return()=>clearInterval(fe)},[w,i,oe]);let ne=_t.useCallback(()=>{o?.()},[o]),Q=w?Sr(c,n,{size:64}):void 0,ee=_t.useCallback(async()=>{if(!(G||!n))try{await navigator.clipboard.writeText(n),M(!0),clearTimeout(j.current),j.current=setTimeout(()=>M(!1),2e3)}catch{}},[n,G]);_t.useEffect(()=>()=>clearTimeout(j.current),[]);let z=_t.useMemo(()=>({env:c,theme:t,open:!0,walletAddress:n,close:ne,onOutlink:d,lpBalanceReader:p,stakingRewardsReader:h,sendTransaction:u,estimateGas:g,conversionRatio:x,currencySymbol:y}),[c,t,n,ne,d,p,h,u,g,x,y]),q=Na.filter(b),ae=q.length>0&&q.every(fe=>{let Re=C[fe];return!!Re&&!Re.loading}),Z=ae&&q.every(fe=>C[fe]?.empty),pe=q.some(fe=>{let Re=C[fe];return!!Re&&!Re.empty}),Se=q.length>0&&!ae&&!pe,Ue=(0,Ae.jsxs)(Ae.Fragment,{children:[a&&(0,Ae.jsxs)("div",{className:"wp-header",children:[(0,Ae.jsxs)("div",{className:"wp-header-account",children:[o&&(0,Ae.jsx)("button",{type:"button",className:"wp-header-btn","aria-label":"Back","data-track":"back",onClick:o,children:(0,Ae.jsx)(ef,{})}),(0,Ae.jsx)("span",{className:"wp-header-avatar","aria-hidden":!0,children:Q&&(0,Ae.jsx)("img",{src:Q,alt:"",className:"wp-header-avatar-img",draggable:!1})}),(r||n)&&(0,Ae.jsxs)("div",{className:"wp-header-account-meta",children:[r&&(0,Ae.jsx)("span",{className:"wp-header-wallet-name",title:r,children:r}),n&&(0,Ae.jsxs)("button",{type:"button",className:"wp-header-address-btn",onClick:ee,"aria-label":"Copy wallet address","data-track":"address_copy",children:[(0,Ae.jsx)("span",{className:"wp-header-address",children:rs(n)}),(0,Ae.jsx)("span",{className:"wp-header-address-copy","data-copied":G,children:G?(0,Ae.jsx)(qn,{size:14}):(0,Ae.jsx)(Cr,{size:14})})]})]})]}),(0,Ae.jsxs)("button",{type:"button",className:"wp-header-btn wp-refresh-btn","aria-label":"Refresh portfolio","data-track":"refresh",onClick:oe,children:[(0,Ae.jsx)(tf,{className:F?"wp-spin-once":void 0}),w&&(0,Ae.jsx)("span",{className:"wp-refresh-badge",children:E})]})]}),(0,Ae.jsx)("div",{className:"wp-body",children:(0,Ae.jsxs)("div",{className:"wp-body-inner","data-empty":Z||void 0,children:[b("rewards")&&(0,Ae.jsx)(bf,{}),b("points")&&(0,Ae.jsx)(If,{}),b("staking")&&(0,Ae.jsx)(Ff,{}),b("gameSwap")&&(0,Ae.jsx)(Vf,{}),b("forge")&&(0,Ae.jsx)($f,{}),b("crossdPool")&&(0,Ae.jsx)(bm,{}),Se&&(0,Ae.jsx)("div",{className:"wp-portfolio-loading",role:"status","aria-label":"Loading portfolio",children:(0,Ae.jsx)("span",{className:"wp-portfolio-spinner","aria-hidden":!0})}),Z&&(0,Ae.jsxs)("div",{className:"wp-portfolio-empty",role:"status",children:[(0,Ae.jsx)("span",{className:"wp-portfolio-empty-icon","aria-hidden":!0,children:(0,Ae.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ae.jsx)("path",{d:"M20 7H5a2 2 0 0 1-2-2 2 2 0 0 1 2-2h13v4M3 5v13a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1"}),(0,Ae.jsx)("circle",{cx:"16.5",cy:"13.5",r:"1",fill:"currentColor",stroke:"none"})]})}),(0,Ae.jsx)("p",{className:"wp-portfolio-empty-title",children:"No assets yet"}),(0,Ae.jsx)("p",{className:"wp-portfolio-empty-desc",children:"Assets you hold across ONE services will appear here."})]})]})})]});return(0,Ae.jsx)(va.Provider,{value:z,children:(0,Ae.jsx)(dd.Provider,{value:S,children:(0,Ae.jsx)(Me,{feature:"wallet_portfolio",children:s==="none"?Ue:(0,Ae.jsx)("div",{className:Ie(s==="fullscreen"?"wp-fullscreen":"wp-embed",l),"data-theme":t,children:Ue})})})})}var fo=require("react/jsx-runtime");function ym({className:e}){let{env:t,theme:n,walletAddress:r,close:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s}=Wt();return(0,fo.jsxs)(Sa.Drawer.Portal,{children:[(0,fo.jsx)(Sa.Drawer.Overlay,{className:"wp-overlay"}),(0,fo.jsxs)(Sa.Drawer.Content,{className:Ie("wp-fullscreen",e),"data-theme":n,children:[(0,fo.jsx)(Sa.Drawer.Title,{className:"wp-sr-only",children:"Portfolio"}),(0,fo.jsx)(uo,{env:t,theme:n,walletAddress:r,onBack:o,variant:"none",onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s})]})]})}var Cd=require("react/jsx-runtime");function ly({env:e,theme:t="light",walletAddress:n,open:r,onOpenChange:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:p,currencySymbol:h,children:u}){let g=it(e),x=r!==void 0,[y,f]=mo.useState(!1),c=x?r:y,b=mo.useCallback(C=>{x||f(C),o?.(C)},[x,o]),w=mo.useCallback(()=>b(!1),[b]),k=mo.useMemo(()=>({env:g,theme:t,open:c,walletAddress:n,close:w,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:p,currencySymbol:h}),[g,t,c,n,w,a,i,s,l,d,p,h]);return(0,Cd.jsx)(va.Provider,{value:k,children:(0,Cd.jsx)(xm.Drawer.Root,{direction:"bottom",open:c,onOpenChange:b,noBodyStyles:!0,children:u})})}var Rd=Object.assign(ly,{Trigger:Ju,Content:ym});var me=H(require("react"),1),Ho=require("react-dom"),Id=H(require("bignumber.js"),1);var hs=H(require("react"),1),vm=120;function km(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function Cm(){let[e,t]=hs.useState(!1);return hs.useEffect(()=>{let n=window.visualViewport,r=()=>n?.height??window.innerHeight,o=r(),a=()=>{let d=r();o=Math.max(o,d),t(o-d>vm)},i=()=>{o=r(),t(!1)},s=d=>{km(d.target)&&o-r()>vm&&t(!0)},l=d=>{km(d.target)&&t(!1)};return a(),n?.addEventListener("resize",a),window.addEventListener("resize",a),window.screen?.orientation?.addEventListener("change",i),document.addEventListener("focusin",s),document.addEventListener("focusout",l),()=>{n?.removeEventListener("resize",a),window.removeEventListener("resize",a),window.screen?.orientation?.removeEventListener("change",i),document.removeEventListener("focusin",s),document.removeEventListener("focusout",l)}},[]),e}var bs=H(require("react"),1);function ws(e,t=160){let[n,r]=bs.useState(e||null);return bs.useEffect(()=>{if(e){r(e);return}let o=window.setTimeout(()=>r(null),t);return()=>window.clearTimeout(o)},[e,t]),[e||n,e?"open":"closed"]}var hr=require("react/jsx-runtime");function Rm({size:e=16,className:t}){return(0,hr.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,hr.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 Nm({size:e=16,className:t}){return(0,hr.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,hr.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 Nd({size:e=20,className:t}){return(0,hr.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,hr.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 Sm({size:e=16,className:t}){return(0,hr.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,hr.jsx)("path",{d:"M3.333 8h9.334M8.667 4l4 4-4 4",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}var te=H(require("react"),1);var Em=H(require("bignumber.js"),1);function Tm(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Im(e){return!e.isFinite()||e.isNaN()||e.lte(0)?"":e.decimalPlaces(6,Em.default.ROUND_DOWN).toFixed()}function dy(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 cy(e){let t=e.fromToken.priceUsd,n=e.toToken.priceUsd,r=e.lastChangedBy==="to"?e.toAmount:e.fromAmount,o=kt(r);return!o||o.lte(0)?{fromAmount:e.fromAmount,toAmount:e.toAmount}:Tm(t)&&Tm(n)?e.lastChangedBy==="to"?{fromAmount:Im(o.multipliedBy(n).dividedBy(t))}:{toAmount:Im(o.multipliedBy(t).dividedBy(n))}:dy(e)?e.lastChangedBy==="to"?{fromAmount:e.toAmount}:{toAmount:e.fromAmount}:{fromAmount:e.lastChangedBy==="to"?"":e.fromAmount,toAmount:e.lastChangedBy==="from"?"":e.toAmount}}function Am({getQuote:e,submitBridge:t}){return{canQuote:!!e,canSubmit:!!t,async getQuote(n){return e?e(n):cy(n)},async submitBridge(n){if(!t)throw new Error("Bridge submit handler is not configured.");return t(n)}}}var Mm=15,py=18,Om="cross_bridge_terms_accepted",uy=3600*24*365;function fy(e){let t=e.replace(/[^\d.]/g,""),n=t.indexOf(".");n!==-1&&(t=t.slice(0,n+1)+t.slice(n+1).replace(/\./g,""));let r=t.indexOf(".");if(r===-1)return t.slice(0,Mm);let o=t.slice(0,r).slice(0,Mm),a=t.slice(r+1).slice(0,py);return`${o}.${a}`}function my(){return typeof document>"u"?!1:document.cookie.split(";").map(e=>e.trim()).some(e=>e===`${Om}=true`)}function gy(){if(typeof document>"u")return;let e=typeof window<"u"&&window.location.protocol==="https:"?"; Secure":"";document.cookie=[`${Om}=true`,"Path=/",`Max-Age=${uy}`,"SameSite=Lax",e].filter(Boolean).join("; ")}function hy(e){let t=Number(e??"0");if(!Number.isFinite(t)||t<.1)return"1";let n=r=>Math.floor(r*100)/100;if(t<3){let r=n(t*3);return String(r<1?1:r)}return"10"}function Lm(e){let t=e.toUpperCase();return t.startsWith("T")&&t.slice(1).startsWith("ONE")?t.slice(1):t}function by(e,t){if(!e||!t||e.chainId!==t.chainId)return!1;let n=new Set([Lm(e.symbol),Lm(t.symbol)]);return n.has("ONE")&&n.has("ONEUSD")}function Xn(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function ys(e){return e[0]}function Sd(e,t,n,r){if(n&&!Xn(n,t))return n;let o=t?r?.(t,e):void 0;if(o?.length)return o[0];if(!t)return e[1]??ys(e);let a=e.findIndex(s=>Xn(s,t)),i=a>=0?e[a+1]:void 0;return i&&!Xn(i,t)?i:e.find(s=>!Xn(s,t))??t}function Dm({fromToken:e,toToken:t,fromAmount:n,toAmount:r,lastChangedBy:o,slippage:a}){return{fromToken:e,toToken:t,fromAmount:n,toAmount:r,lastChangedBy:o,slippage:a}}function xs(e,t=0){if(!e||t>5)return[];if(typeof e=="string")return[e];if(!(e instanceof Error)&&typeof e!="object")return[String(e)];let n=e;return[...[e instanceof Error?e.name:n.name,e instanceof Error?e.message:n.message,n.shortMessage,n.details,n.code].filter(o=>typeof o=="string"||typeof o=="number").map(String),...xs(n.cause,t+1),...xs(n.data,t+1),...xs(n.error,t+1)]}function Td(e){let t=xs(e).join(" ").toLowerCase(),n=t.includes("signature_failed")&&(t.includes("\uD0C0\uC785 \uB370\uC774\uD130 \uC11C\uBA85\uC5D0 \uC2E4\uD328")||t.includes("typed data")||t.includes("signtypeddata"));return t.includes("4001")||t.includes("err_user_rejected")||t.includes("userrejectedrequesterror")||t.includes("user rejected")||t.includes("user denied")||t.includes("user cancelled")||t.includes("user canceled")||t.includes("rejected the request")||t.includes("request rejected")||t.includes("action_rejected")||t.includes("rejected by user")||n}function Pm(e,t){return Td(e)?"Transaction request was rejected.":(e instanceof Error?e.message:typeof e=="string"?e:"").split(`
|
|
10
|
+
`)[0]?.trim()||t}function Bm(e){let{tokens:t,initialFromToken:n,initialToToken:r,getToTokens:o,getApproval:a,approveBridge:i,history:s=[],initialSlippage:l="1",termsUrl:d,getQuote:p,submitBridge:h,onSubmitted:u,onSuccess:g,onFailed:x,onExit:y}=e,f=te.useMemo(()=>Am({getQuote:p,submitBridge:h}),[p,h]),[c,b]=te.useState("form"),[w,k]=te.useState(n??ys(t)),[C,N]=te.useState(()=>Sd(t,n??ys(t),r,o)),[T,R]=te.useState(""),[S,E]=te.useState(""),[A,F]=te.useState("from"),[D,G]=te.useState(l),[M,j]=te.useState(null),le=te.useMemo(()=>by(w,C),[w,C]),oe=te.useMemo(()=>le?"1":D==="auto"?hy(M?.priceImpact):D,[le,D,M?.priceImpact]),[ne,Q]=te.useState(""),[ee,z]=te.useState("idle"),[q,ae]=te.useState(""),[Z,pe]=te.useState(null),[Se,Ue]=te.useState([]),[fe,Re]=te.useState(!1),[Ce,tt]=te.useState(my),[Le,$e]=te.useState(null),[wt,Ge]=te.useState(!1),[Qe,He]=te.useState(null),[Dt,tn]=te.useState(null),[yt,Pt]=te.useState(!1),[Tt,nn]=te.useState(!1),It=te.useRef(0),ut=te.useRef(null),Ot=te.useRef(!1),rt=te.useRef(!1),on=te.useRef(!1),ft=te.useRef(!1),fn=te.useRef(!1),Ze=te.useRef(!1),lt=te.useRef(!1);te.useEffect(()=>{on.current||(on.current=!0,Je("bridge","opened"))},[]);let nt=te.useCallback(()=>{ut.current&&(clearTimeout(ut.current),ut.current=null)},[]),Et=te.useCallback(U=>{nt(),tn(U)},[nt]);te.useEffect(()=>nt,[nt]),te.useEffect(()=>{let U=t.find(Pe=>Xn(Pe,w))??ys(t),Oe=U?o?.(U,t):void 0,$=Oe?.find(Pe=>Xn(Pe,C))??(Oe?void 0:t.find(Pe=>Xn(Pe,C)))??Sd(t,U,void 0,o);k(U),N($)},[o,t,w,C]);let Rt=te.useCallback((U,Oe)=>{let $=fy(U);if(!$){It.current+=1,R(""),E(""),F(Oe),j(null),Q(""),z("idle");return}Oe==="from"?R($):E($),F(Oe),Q(""),!fn.current&&Number($)>0&&(fn.current=!0,Je("bridge","amount_entered"))},[]),Xe=te.useCallback(()=>{It.current+=1,R(""),E(""),F("from"),j(null),Q(""),ae(""),z("idle"),$e(null),Ge(!1),He(null),Pt(!1),Et(null)},[Et]),an=te.useCallback(U=>{Xn(U,w)||(ft.current||(ft.current=!0,Je("bridge","token_selected",{tags:{item_id:`from:${U.symbol}`}})),k(U),N(Sd(t,U,void 0,o)),Xe())},[w,o,Xe,t]),sn=te.useCallback(U=>{Xn(U,C)||Xn(U,w)||(ft.current||(ft.current=!0,Je("bridge","token_selected",{tags:{item_id:`to:${U.symbol}`}})),N(U),Xe())},[w,Xe,C]),Yt=te.useMemo(()=>w?o?.(w,t)??t.filter(U=>!Xn(U,w)):[],[w,o,t]),ln=te.useCallback(()=>{w?.balance&&Rt(w.balance,"from")},[w?.balance,Rt]),V=te.useCallback(()=>{!w||!C||(k(C),N(w),Xe())},[w,Xe,C]),ve=te.useCallback(()=>{It.current+=1,R(""),E(""),F("from"),j(null),Q(""),ae("")},[]);te.useEffect(()=>{if(!w||!C)return;if(!T&&!S){j(null),Q(""),z($=>$==="quoting"?"idle":$);return}let U=++It.current,Oe=Dm({fromToken:w,toToken:C,fromAmount:T,toAmount:S,lastChangedBy:A,slippage:D});z($=>$==="submitting"?$:f.canQuote?"quoting":"idle"),(async()=>{try{let $=await f.getQuote(Oe);if(It.current!==U)return;$.fromAmount!==void 0&&A==="to"&&R($.fromAmount),$.toAmount!==void 0&&A==="from"&&E($.toAmount),j($.summary??null),Q($.error??"")}catch($){if(It.current!==U)return;Q($ instanceof Error?$.message:"Failed to quote bridge.")}finally{It.current===U&&z($=>$==="quoting"?"idle":$)}})()},[T,w,A,f,D,S,C]);let Ne=te.useCallback(()=>!w||!C?null:Dm({fromToken:w,toToken:C,fromAmount:T,toAmount:S,lastChangedBy:A,slippage:oe}),[oe,T,w,A,S,C]),ze=te.useCallback(async(U,Oe)=>{if(!Ot.current){Ot.current=!0,ae(""),Pt(!1),Ge(!1),z("submitting");try{if(!Oe?.skipApprovalCheck&&a){let Pe=await a(U);if(Pe){$e(Pe),He(U),z("idle");return}}$e(null),He(null),Et("processing");let $=await f.submitBridge(U);pe($),z("success"),Ue(Pe=>[{id:$.txHash,timestamp:new Date().toISOString(),txHash:$.txHash,fromToken:$.fromToken,toToken:$.toToken,fromAmount:$.fromAmount,toAmount:$.toAmount,summary:M??void 0,status:"pending"},...Pe.filter(In=>In.txHash!==$.txHash)]),ve(),nn(!0),Et(null),Pt(!0),Je("bridge","confirmed"),Ze.current=!1,lt.current=!1,u?.($),g?.($)}catch($){if(Et(null),Je("bridge","confirmed",{status:"failure",reason:Nn($)}),Ze.current=!1,lt.current=!1,Td($)){z("idle");return}let Pe=Pm($,"Failed to submit bridge.");ae(Pe),z("error"),x?.({message:Pe})}finally{Ot.current=!1}}},[a,x,u,g,f,ve,Et,M]),ot=te.useCallback(async()=>{if(ne)return;let U=Ne();if(U){if(Ze.current||(Ze.current=!0,Je("bridge","submitted")),!Ce){He(U),Re(!0);return}await ze(U)}},[Ne,ne,ze,Ce]),Kt=te.useCallback(async()=>{let U=Qe??Ne();U&&(gy(),tt(!0),Re(!1),await ze(U))},[Ne,Qe,ze]),Bt=te.useCallback(()=>{Re(!1),He(null)},[]),Cn=te.useCallback(async()=>{if(!(rt.current||ee==="submitting"||!Le||!Qe||!i)){rt.current=!0,ae(""),z("submitting");try{await i(Qe,Le),lt.current||(lt.current=!0,Je("bridge","approved")),$e(null),z("idle"),Ge(!0)}catch(U){if(Td(U)){z("idle");return}let Oe=Pm(U,"Failed to approve token.");ae(Oe),z("error"),x?.({message:Oe})}finally{rt.current=!1}}},[Le,i,x,Qe,ze,ee]),Rn=te.useCallback(()=>{ee!=="submitting"&&($e(null),Ge(!1),He(null),z("idle"))},[ee]),O=te.useCallback(async()=>{if(ee==="submitting")return;let U=Qe??Ne();if(!U){Ge(!1),ae("Bridge input is no longer available. Please try again."),z("error");return}Ge(!1),await ze(U,{skipApprovalCheck:!0})},[Ne,Qe,ze,ee]),De=te.useCallback(()=>{Pt(!1)},[]),qe=te.useCallback(U=>{b(U),U==="history"&&nn(!1)},[]),re=te.useCallback(()=>{if(c==="history"){qe("form");return}y?.()},[y,qe,c]),Te=te.useMemo(()=>[...s,...Se.filter(U=>!s.some(Oe=>Oe.txHash===U.txHash))],[s,Se]);return{step:c,setStep:qe,status:ee,error:q,quoteError:ne,fromToken:w,toToken:C,tokens:t,availableToTokens:Yt,fromAmount:T,toAmount:S,lastChangedBy:A,slippage:D,effectiveSlippage:oe,slippageLocked:le,setSlippage:G,summary:M,history:Te,submitted:Z,canSubmit:f.canSubmit,termsOpen:fe,approvalInfo:Le,approvalSuccessOpen:wt,approveBridge:i,pendingSubmitInput:Qe,submitToast:Dt,successDialogOpen:yt,dismissSuccessDialog:De,hasNewHistory:Tt,termsUrl:d,setFromToken:k,setToToken:N,selectFromToken:an,selectToToken:sn,setAmount:Rt,setMax:ln,swapTokens:V,submit:ot,confirmTerms:Kt,cancelTerms:Bt,confirmApproval:Cn,cancelApproval:Rn,continueAfterApproval:O,back:re}}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, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);font-size:11px;font-weight:700}.bf-token-icon[data-has-image=true]{background:transparent}.bf-token-icon img{width:100%;height:100%;border-radius:0;object-fit:cover}.bf-token-fallback{line-height:1}.bf-token-pill-face{display:inline-flex;align-items:center;gap:6px;transform-origin:center bottom;animation:bf-token-roll-up .32s cubic-bezier(.22,1,.36,1)}@keyframes bf-token-roll-up{0%{opacity:0;transform:translateY(90%) rotateX(-80deg)}60%{opacity:1}}.bf-token-pill:active:not(:disabled),.bf-embedded-token-pill:active:not(:disabled){transform:scale(.96)}.bf-token-search:focus-within{border-color:var(--ds-accent-primary-default, #7e54f4)}.bf-token-search input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--bf-text-high);font:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-token-search input::placeholder{color:var(--bf-text-low)}.bf-token-list{display:flex;min-height:0;flex:1;flex-direction:column;gap:0;overflow-y:auto;overflow-x:hidden;padding:0 24px 24px;scrollbar-width:thin;box-sizing:border-box}.bf-token-row{position:relative;display:flex;width:100%;min-height:69px;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid transparent;border-radius:12px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;box-sizing:border-box}.bf-token-row:hover:not([data-selected=true]){background:var(--ds-surface-medium, rgba(18, 18, 18, .05))}.bf-token-row[data-selected=true]{border-color:var(--ds-accent-primary-default, #7e54f4);background:var(--ds-surface-medium, rgba(18, 18, 18, .05))}.bf-token-row-left{display:inline-flex;min-width:0;align-items:center;gap:16px}.bf-token-meta{display:flex;min-width:0;flex-direction:column}.bf-token-symbol{overflow:hidden;color:var(--bf-text-high);font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.bf-token-name{overflow:hidden;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.bf-token-row-right{display:flex;min-width:86px;max-width:42%;flex-shrink:0;flex-direction:column;align-items:flex-end}.bf-token-balance,.bf-token-price{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-token-balance{color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-token-price{color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-token-row[data-selected=true] .bf-token-symbol{color:var(--bf-text-high)}.bf-token-row[data-selected=true] .bf-token-balance{color:var(--bf-text-high);font-size:16px}.bf-token-row[data-selected=true] .bf-token-price{color:var(--bf-text-low);font-size:14px}.bf-token-empty{padding:32px 16px;color:var(--bf-text-low);font-size:14px;font-weight:500;line-height:1.5;text-align:center}.bf-slippage-overlay{position:fixed;inset:0;z-index:100002;display:flex;align-items:center;justify-content:center;padding:24px;background:#00000085;pointer-events:auto;box-sizing:border-box}.bf-slippage-dialog{display:flex;width:min(480px,calc(100vw - 48px));height:auto;min-height:min(316px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);flex-direction:column;overflow:hidden;border:1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));border-radius:24px;background:var(--ds-surface-default, #ffffff);color:var(--ds-content-highest, #000000);box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));box-sizing:border-box}.bf-slippage-head{position:relative;display:flex;min-height:73px;flex-shrink:0;align-items:center;justify-content:flex-start;padding:24px 56px 24px 24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff);box-sizing:border-box}.bf-slippage-head h3{margin:0;color:var(--ds-content-highest, #000000);font-size:20px;font-weight:600;line-height:1.25;letter-spacing:0}.bf-slippage-close{position:absolute;top:24px;right:24px;display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer}.bf-slippage-close:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-slippage-body{display:flex;flex:1;min-height:0;flex-direction:column;gap:24px;padding:24px;box-sizing:border-box}.bf-slippage-desc{margin:0;color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-controls{display:flex;flex-direction:column;gap:12px;width:100%}.bf-slippage-presets{display:flex;gap:8px;width:100%}.bf-slippage-preset{appearance:none;display:inline-flex;flex:1 1 0;min-width:0;min-height:48px;align-items:center;justify-content:center;padding:12px 8px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;box-sizing:border-box}.bf-slippage-preset:hover,.bf-slippage-preset[data-selected=true]{border-color:var(--ds-accent-primary-default, #7e54f4);background:var(--ds-accent-primary-low, #f5f3ff)}.bf-slippage-custom{display:flex;min-height:48px;align-items:center;gap:8px;padding:12px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85));box-sizing:border-box}.bf-slippage-custom:focus-within,.bf-slippage-custom[data-selected=true]{border-color:var(--ds-accent-primary-default, #7e54f4)}.bf-slippage-custom input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--ds-content-high, rgba(0, 0, 0, .85));font:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-custom input::placeholder{color:var(--ds-content-lowest, rgba(0, 0, 0, .25))}.bf-slippage-custom span:not(.bf-sr-only){flex-shrink:0;color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-apply{appearance:none;margin-top:auto;width:100%;min-height:48px;padding:12px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;box-sizing:border-box}.bf-slippage-apply:hover{filter:brightness(.96)}.bf-slippage-apply:disabled{cursor:not-allowed;opacity:.5;filter:none}.bf-slippage-message{margin:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-message[data-variant=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-slippage-message[data-variant=error]{color:var(--ds-system-red-default, #da0b2e)}.bf-action-modal-overlay{--bf-bg: var(--ds-bg-default, #1e232e);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .08));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .12));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .92));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .4));position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;padding:24px;background:#040912b8;pointer-events:auto;box-sizing:border-box;animation:bf-overlay-in .18s ease-out}.bf-action-modal-overlay[data-theme=light]{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .08));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .65));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .4))}.bf-action-modal{display:flex;width:min(480px,calc(100vw - 48px));flex-direction:column;align-items:center;gap:24px;padding:48px 24px 24px;border:1px solid var(--bf-border);border-radius:24px;background:var(--bf-bg);color:#fff;box-shadow:0 24px 80px #00000073;box-sizing:border-box;animation:bf-modal-in .2s cubic-bezier(.16,1,.3,1)}.bf-action-modal-overlay[data-state=closed]{animation:bf-overlay-out .15s ease-in forwards}.bf-action-modal-overlay[data-state=closed] .bf-action-modal{animation:bf-modal-out .15s ease-in forwards}@keyframes bf-overlay-in{0%{opacity:0}}@keyframes bf-overlay-out{to{opacity:0}}@keyframes bf-modal-in{0%{opacity:0;transform:translateY(8px) scale(.96)}}@keyframes bf-modal-out{to{opacity:0;transform:translateY(4px) scale(.98)}}@media(prefers-reduced-motion:reduce){.bf-action-modal-overlay,.bf-action-modal,.bf-action-modal-overlay[data-state=closed],.bf-action-modal-overlay[data-state=closed] .bf-action-modal{animation:none}}.bf-action-modal h3{width:100%;margin:0;color:var(--bf-text-high);font-size:24px;font-weight:700;line-height:1.25;text-align:left;letter-spacing:0}.bf-action-modal-desc{max-width:380px;margin:0;color:var(--bf-text-low);font-size:15px;font-weight:500;line-height:1.45;text-align:center;letter-spacing:0}.bf-terms-modal{--bf-terms-accent: #f3742e;padding:24px;gap:24px}.bf-terms-modal h3{font-size:20px;font-weight:600;line-height:1.6;text-align:center}.bf-terms-modal .bf-action-modal-desc{font-size:14px;line-height:1.45}.bf-terms-check-row{display:grid;width:100%;min-height:56px;grid-template-columns:20px minmax(0,1fr);align-items:center;column-gap:12px;padding:16px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-surface);color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.4;box-sizing:border-box}.bf-terms-check-button{appearance:none;display:inline-flex;min-width:0;width:20px;height:20px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;touch-action:manipulation}.bf-terms-copy{display:flex;width:100%;min-width:0;align-items:baseline;justify-content:space-between;column-gap:12px;row-gap:4px;flex-wrap:wrap}.bf-terms-label{min-width:0;cursor:pointer;touch-action:manipulation}.bf-terms-check-button:focus-visible .bf-terms-checkbox{outline:2px solid var(--ds-accent-primary-default, #7e54f4);outline-offset:2px}.bf-terms-checkbox{position:relative;display:inline-flex;width:20px;height:20px;align-items:center;justify-content:center;border:1px solid rgba(124,143,180,.72);border-radius:4px;background:transparent;box-sizing:border-box}.bf-terms-checkbox[data-checked=true]{border-color:var(--ds-accent-primary-default, #7e54f4);background:var(--ds-accent-primary-default, #7e54f4)}.bf-terms-checkbox[data-checked=true]:after{width:8px;height:4px;border:solid #ffffff;border-width:0 0 2px 2px;content:"";transform:rotate(-45deg) translate(1px,-1px)}.bf-terms-check-row a{position:relative;z-index:1;color:var(--ds-accent-primary-default, #7e54f4);font-size:14px;font-weight:700;text-decoration:none;white-space:nowrap}.bf-terms-check-row a:hover{text-decoration:underline}.bf-terms-privacy{max-width:100%;margin:0;color:var(--bf-text-low);font-size:clamp(8px,2.4vw,12px);white-space:nowrap;font-weight:500;line-height:1.45;text-align:center;letter-spacing:0}.bf-action-primary,.bf-action-secondary{display:inline-flex;width:100%;min-height:56px;align-items:center;justify-content:center;padding:14px 16px;border:0;border-radius:12px;font:inherit;font-size:18px;font-weight:700;line-height:1.4;letter-spacing:0;cursor:pointer}.bf-action-primary{background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff)}.bf-action-primary:disabled{cursor:not-allowed;opacity:.35}.bf-terms-modal .bf-action-primary{min-height:52px;background:var(--bf-terms-accent);color:#fff;font-size:16px;font-weight:600}.bf-terms-modal .bf-action-primary:disabled{background:var(--bf-surface);color:var(--bf-text-low);opacity:1}.bf-action-primary[aria-busy=true]{gap:8px;opacity:1}.bf-action-button-spinner{width:18px;height:18px;border:2px solid rgba(0,0,0,.22);border-top-color:currentColor;border-right-color:currentColor;border-radius:999px;animation:bf-loading-spin .9s linear infinite}.bf-action-secondary{background:var(--bf-surface);color:var(--bf-text-low)}.bf-action-secondary:disabled{cursor:not-allowed;opacity:.5}.bf-approve-address-box{display:flex;width:100%;flex-direction:column;gap:10px;padding:16px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-surface);box-sizing:border-box}.bf-approve-address-box>span{color:var(--bf-text-low);font-size:14px;font-weight:700;line-height:1.4}.bf-approve-address-box>div{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-approve-address-box strong{min-width:0;overflow:hidden;color:var(--bf-text-high);font-size:15px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.bf-copy-button{flex-shrink:0;min-width:48px;min-height:32px;padding:6px 10px;border:1px solid rgba(0,206,178,.65);border-radius:8px;background:transparent;color:var(--ds-accent-primary-default, #7e54f4);font:inherit;font-size:12px;font-weight:700;line-height:1.2;cursor:pointer}.bf-copy-button:disabled{cursor:not-allowed;opacity:.45}.bf-action-buttons{display:grid;width:100%;grid-template-columns:1fr 1fr;gap:12px}.bf-approval-success-modal{gap:28px}.bf-success-mark{position:relative;display:inline-flex;width:96px;height:96px;flex-shrink:0;align-items:center;justify-content:center;border:12px solid rgba(0,206,178,.12);border-radius:999px;background:#00ceb2a8;box-shadow:0 0 0 10px #00ceb20f;box-sizing:border-box}.bf-success-mark:after{width:34px;height:18px;border:solid #ffffff;border-width:0 0 6px 6px;content:"";transform:rotate(-45deg) translate(2px,-3px)}.bf-status-toast{position:absolute;right:16px;bottom:14px;left:16px;z-index:5;display:flex;align-items:center;gap:12px;min-height:52px;padding:12px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-toast-bg);color:var(--bf-toast-color);box-shadow:0 8px 24px #0000003d;box-sizing:border-box}.bf-status-toast-icon{display:inline-flex;width:28px;height:28px;flex-shrink:0;align-items:center;justify-content:center;border-radius:999px}.bf-status-spinner{width:20px;height:20px;border:3px solid rgba(255,255,255,.18);border-top-color:var(--ds-accent-primary-default, #7e54f4);border-right-color:var(--ds-accent-primary-default, #7e54f4);border-radius:999px;animation:bf-loading-spin .9s linear infinite}.bf-status-check{position:relative;width:20px;height:20px;border-radius:999px;background:var(--ds-system-green-default, #00ceb2)}.bf-status-check:after{position:absolute;top:6px;left:5px;width:8px;height:4px;border:solid var(--ds-system-green-on, #000000);border-width:0 0 2px 2px;content:"";transform:rotate(-45deg)}.bf-status-toast-copy{display:flex;min-width:0;flex:1;flex-direction:column}.bf-status-toast-copy strong,.bf-status-toast-copy span{overflow:hidden;text-overflow:ellipsis}.bf-status-toast-copy strong{color:var(--bf-toast-strong);font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-status-toast-copy span{color:var(--bf-toast-color);font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em}.bf-status-toast[data-variant=success] .bf-status-toast-copy span{color:var(--ds-system-green-on-inverted, #00e8c9)}.bf-status-toast[data-variant=error]{border:1px solid rgba(255,43,95,.28);background:var(--bf-toast-bg)}.bf-status-toast[data-variant=error] .bf-status-toast-copy strong{color:var(--bf-toast-strong)}.bf-status-error-mark{display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;border-radius:999px;background:var(--ds-system-red-default, #ff2b5f);color:#fff;font-size:14px;font-weight:700;line-height:1}.bf-status-toast[data-variant=error] .bf-status-toast-copy span{color:var(--bf-toast-color)}.bf-success-overlay{--bf-bg: var(--ds-bg-default, #1e232e);--bf-border: var(--ds-border-default, rgba(255, 255, 255, .12));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .92));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;padding:24px;background:#000000b8;pointer-events:auto;box-sizing:border-box}.bf-success-overlay[data-theme=light]{--bf-bg: #ffffff;--bf-border: rgba(18, 18, 18, .08);--bf-text-high: rgba(18, 18, 18, .85);--bf-text-medium: rgba(18, 18, 18, .65);--bf-text-low: rgba(18, 18, 18, .4)}.bf-success-modal{display:flex;width:min(480px,calc(100vw - 48px));flex-direction:column;overflow:hidden;border:1px solid var(--bf-border);border-radius:24px;background:var(--bf-bg);color:var(--bf-text-high);box-shadow:0 24px 80px #00000073;box-sizing:border-box}.bf-success-head{display:flex;min-height:73px;align-items:center;justify-content:space-between;gap:16px;padding:24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));box-sizing:border-box}.bf-success-head h3{min-width:0;margin:0;overflow:hidden;color:var(--ds-content-highest, #000000);font-size:20px;font-weight:600;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.bf-success-close{display:inline-flex;width:24px;height:24px;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer}.bf-success-close:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-success-body{display:flex;flex-direction:column;align-items:center;gap:24px;padding:40px 24px 24px;box-sizing:border-box}.bf-success-copy{display:flex;width:100%;flex-direction:column;align-items:center;gap:4px;color:var(--bf-text-medium);text-align:center}.bf-success-copy strong{color:var(--bf-text-high);font-size:24px;font-weight:700;line-height:1.25;letter-spacing:0}.bf-success-copy span{color:var(--bf-text-medium);font-size:15px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-success-route{display:flex;align-items:center;justify-content:center;gap:12px}.bf-success-route .bf-token-icon{width:48px!important;height:48px!important;background:transparent;font-size:18px}.bf-success-route-arrow{color:var(--bf-text-low);font-size:24px;font-weight:500;line-height:1}.bf-success-ok{display:inline-flex;width:100%;min-height:48px;align-items:center;justify-content:center;padding:12px;border:0;border-radius:12px;background:#00b4b7e0;color:#fff;font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}@media(max-width:767px){.bf-success-body{padding:40px 24px 24px}.bf-success-copy strong{font-size:22px}.bf-success-copy span{font-size:14px}.bf-success-mark{width:88px;height:88px}.bf-success-route .bf-token-icon{width:44px!important;height:44px!important}}@keyframes bf-loading-spin{to{transform:rotate(360deg)}}.bf-swap-toggle{position:absolute;top:100px;left:50%;z-index:1;display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;padding:0;border:0;border-radius:9999px;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);box-shadow:0 1px 5px #0000001f;cursor:pointer}.bf-swap-card[data-has-from-error=true] .bf-swap-toggle{top:132px}.bf-details{display:flex;flex-direction:column;gap:24px}.bf-collapse{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .22s ease,opacity .14s ease,margin-top .22s ease}.bf-collapse[data-open=true]{grid-template-rows:1fr;opacity:1}.bf-collapse:not([data-open=true]){margin-top:calc(-1 * var(--bf-collapse-gap, 0px))}.bf-collapse-inner{overflow:hidden;min-height:0}@keyframes bf-value-in{0%{opacity:.25;transform:translateY(-2px)}}.bf-info-value,.bf-route-amount-value,.bf-route-meta>span{animation:bf-value-in .24s ease-out}@media(prefers-reduced-motion:reduce){.bf-collapse{transition:none}.bf-info-value,.bf-route-amount-value,.bf-route-meta>span{animation:none}}.bf-exchange-rate{display:flex;width:100%;align-items:center;justify-content:center;gap:4px;padding:0 0 24px;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-detail-section,.bf-history-card{display:flex;flex-direction:column;gap:12px;padding:0;border-radius:12px;background:transparent;box-sizing:border-box}.bf-liquidity{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;background:var(--bf-surface);box-sizing:border-box}.bf-root[data-view=history] .bf-liquidity,.bf-root[data-view=history] .bf-detail-section,.bf-root[data-view=history] .bf-history-card{background:var(--ds-surface-default, #ffffff)}.bf-detail-section h3{margin:0;color:var(--bf-text-high);font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-tx-fee-section{gap:12px}.bf-tx-fee-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.bf-collapse-head{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin:0;padding:0;background:none;border:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.bf-detail-section[data-open=true] .bf-collapse-head{padding-bottom:12px;border-bottom:1px solid var(--bf-border)}.bf-collapse-chevron{flex-shrink:0;color:var(--bf-text-low);transition:transform .2s ease}.bf-detail-section[data-open=true] .bf-collapse-chevron{transform:rotate(180deg)}.bf-collapse-body{display:flex;flex-direction:column;gap:14px}.bf-root[data-view=history] .bf-detail-section[data-open=true] .bf-collapse-head{border-bottom-color:var(--ds-border-default, rgba(0, 0, 0, .07))}.bf-root[data-view=history] .bf-collapse-chevron{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-tx-fee-total{display:inline-flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;color:var(--bf-text-medium);font-size:14px;font-weight:600;line-height:1.4;text-align:right}.bf-tx-fee-total>span[data-delegated=true]{text-decoration:line-through;text-decoration-thickness:2px;text-decoration-color:currentColor}.bf-fee-delegated{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:2px 8px;border-radius:6px;background:#379cff2e;color:#4eb3ff;font-size:10px;font-weight:500;line-height:1.3;white-space:nowrap}.bf-tx-fee-token{width:16px;height:16px;flex-shrink:0;border-radius:999px;object-fit:cover}.bf-info-card{gap:14px}.bf-info-section{display:flex;flex-direction:column;gap:10px}.bf-info-section+.bf-info-section{padding-top:2px}.bf-info-section h4{margin:0;color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.5}.bf-root[data-view=history] .bf-detail-section h3,.bf-root[data-view=history] .bf-info-section h4{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-route-steps{display:flex;flex-direction:column}.bf-route-step{display:grid;min-width:0;grid-template-columns:18px minmax(0,1fr);column-gap:10px}.bf-route-rail{position:relative;display:flex;justify-content:center}.bf-route-line{position:absolute;top:9px;bottom:-4px;width:1px;background:var(--bf-border)}.bf-route-step[data-last=true] .bf-route-line{display:none}.bf-route-dot{z-index:1;width:9px;height:9px;margin-top:5px;border:2px solid var(--bf-text-low);border-radius:999px;background:var(--bf-bg);box-sizing:border-box}.bf-route-dot[data-final=true]{border-color:var(--ds-accent-primary-default, #7e54f4)}.bf-route-body{display:flex;min-width:0;flex-direction:column;gap:2px;padding-bottom:14px}.bf-route-step[data-last=true] .bf-route-body{padding-bottom:0}.bf-route-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-route-title{min-width:0;overflow:hidden;color:var(--bf-text-high);font-size:13px;font-weight:620;letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap}.bf-route-amount{display:inline-flex;flex-shrink:0;align-items:center;gap:4px;color:var(--bf-text-medium);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}.bf-route-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;color:var(--bf-text-low);font-size:12px;line-height:1.45;font-variant-numeric:tabular-nums}.bf-route-step[data-kind=hop] .bf-route-title{color:var(--bf-text-medium);font-weight:600}.bf-route-step[data-kind=hop] .bf-route-amount{color:var(--bf-text-low);font-weight:500}.bf-route-step[data-kind=hop] .bf-route-dot{width:7px;height:7px;margin-top:6px;border-width:1px}.bf-route-meta>span[data-tone=accent]{color:var(--ds-accent-primary-default, #7e54f4);font-weight:600}.bf-route-meta>span[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00);font-weight:600}.bf-route-meta>span[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e);font-weight:600}.bf-route-tag{padding:1px 6px;border-radius:5px;background:var(--ds-accent-primary-low, rgba(0, 206, 178, .12));color:var(--ds-accent-primary-high, #7346f3);font-size:10px;font-weight:700;letter-spacing:.01em}.bf-info-rows{display:flex;flex-direction:column;gap:8px}.bf-info-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-liquidity-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-info-label{display:inline-flex;align-items:center;gap:6px;min-width:0;color:var(--bf-text-low)}.bf-info-value{display:flex;min-width:0;align-items:center;justify-content:flex-end;gap:4px;color:var(--bf-text-medium);text-align:right}.bf-info-route,.bf-info-value-token{display:inline-flex;align-items:center;gap:4px}.bf-info-route .bf-token-icon,.bf-info-value-token .bf-token-icon{flex-shrink:0}.bf-info-route-arrow{display:inline-flex;align-items:center;color:var(--bf-text-medium);font-size:12px;line-height:1}.bf-root[data-view=history] .bf-info-route-arrow{color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.bf-info-value[data-tone=accent]{color:var(--ds-accent-primary-high, #7346f3)}.bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-info-value[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e)}.bf-root[data-view=history] .bf-info-label,.bf-root[data-view=history] .bf-liquidity-head{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-root[data-view=history] .bf-info-value{color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.bf-root[data-view=history] .bf-info-value[data-tone=accent]{color:var(--ds-accent-primary-high, #7346f3)}.bf-root[data-view=history] .bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-root[data-view=history] .bf-info-value[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e)}.bf-liquidity-status{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:600;line-height:1.4;white-space:nowrap}.bf-liquidity-status:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0}.bf-liquidity-status[data-status=normal],.bf-liquidity-status:not([data-status]){background:#00ceb21f;color:var(--ds-accent-primary-default, #7e54f4)}.bf-liquidity-status[data-status=normal]:before,.bf-liquidity-status:not([data-status]):before{background:var(--ds-accent-primary-default, #7e54f4)}.bf-liquidity-status[data-status=low]{background:#e56f001f;color:#e56f00}.bf-liquidity-status[data-status=low]:before{background:#e56f00}.bf-liquidity-status[data-status=rebalancing]{background:#da0b2e1a;color:#da0b2e}.bf-liquidity-status[data-status=rebalancing]:before{background:#da0b2e}.bf-liquidity-track{height:8px;overflow:hidden;border-radius:999px;background:var(--bf-surface-hover)}.bf-liquidity-track span{display:block;height:100%;border-radius:inherit;background:var(--ds-accent-primary-default, #7e54f4)}.bf-error{padding:12px;border-radius:12px;background:#da0b2e1f;color:var(--ds-system-red-default, #da0b2e);font-size:13px;line-height:1.4}.bf-footer{display:flex;flex-shrink:0;flex-direction:column;align-items:center;gap:10px;padding:12px 24px 24px;background:var(--ds-bg-default, var(--bf-bg))}.bf-next{width:100%;min-height:48px;padding:12px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-next:disabled{cursor:default;opacity:.6}.bf-powered{display:inline-flex;align-items:center;gap:3px;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-decoration:none}.bf-powered:focus-visible{border-radius:4px;outline:2px solid var(--ds-accent-primary-default, #7e54f4);outline-offset:2px}.bf-powered-brand{text-decoration:underline;text-underline-offset:2px}.bf-history-tabs{display:flex;align-items:center;gap:4px;width:100%}.bf-history-tab{position:relative;display:inline-flex;min-height:37px;align-items:center;justify-content:center;padding:8px 12px;border:0;background:transparent;color:var(--ds-content-lowest, rgba(0, 0, 0, .25));font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;cursor:pointer}.bf-history-tab[data-active=true]{color:var(--ds-accent-primary-high, #7346f3)}.bf-history-tab[data-active=true]:after{position:absolute;right:8px;bottom:0;left:8px;height:3px;border-radius:999px;background:var(--ds-accent-primary-high, #7346f3);content:""}.bf-history-tab-dot{position:absolute;top:8px;right:4px;width:6px;height:6px;border-radius:999px;background:var(--ds-system-red-default, #da0b2e)}.bf-history-list{display:flex;flex-direction:column;gap:12px}.bf-history-item{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:var(--ds-surface-default, #ffffff);box-sizing:border-box}.bf-history-item-head,.bf-history-meta,.bf-history-route,.bf-history-route-token{display:inline-flex;align-items:center}.bf-history-item-head{justify-content:space-between;gap:12px;width:100%}.bf-history-status{display:inline-flex;min-height:24px;align-items:center;justify-content:center;padding:3px 8px;border-radius:4px;background:var(--ds-system-orange-low, #fcf5e9);color:var(--ds-system-orange-high, #e56f00);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;white-space:nowrap}.bf-history-status[data-status=completed]{background:var(--ds-system-green-low, #e7f9f8);color:var(--ds-system-green-high, #00a0a2)}.bf-history-status[data-status=failed]{background:var(--ds-system-red-low, rgba(218, 11, 46, .12));color:var(--ds-system-red-default, #da0b2e)}.bf-history-time{min-width:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;text-align:right;white-space:nowrap}.bf-history-item-body{display:flex;flex-direction:column;gap:4px}.bf-history-amount{color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-history-meta{justify-content:space-between;gap:12px;min-width:0}.bf-history-usd{min-width:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-history-route{justify-content:flex-end;gap:4px;min-width:0;color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:12px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-history-route-token{gap:4px;min-width:0}.bf-history-route-token span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-history-route-arrow{flex-shrink:0;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-empty{padding:32px 16px;text-align:center;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:14px}.bf-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:767px){.bf-slippage-overlay{align-items:flex-end;padding:0}.bf-slippage-dialog{width:100%;height:auto;min-height:316px;max-height:82dvh;border-right:0;border-bottom:0;border-left:0;border-radius:24px 24px 0 0}}.wi-drawer-content .bf-header{padding:16px}.wi-drawer-content .bf-header .bf-header-btn:last-child{top:16px;right:16px}.wi-drawer-content .bf-body,.wi-drawer-content .bf-history-body{padding:16px}.bf-root[data-variant=embedded]{--bf-bg: #1c1c1d;--bf-surface: #212224;--bf-surface-hover: rgba(255, 255, 255, .08);--bf-border: rgba(255, 255, 255, .1);--bf-text-high: rgba(255, 255, 255, .85);--bf-text-medium: rgba(255, 255, 255, .65);--bf-text-low: rgba(255, 255, 255, .4);--bf-embedded-primary: #f3742e;--bf-embedded-on-primary: #ffffff;background:var(--bf-bg);color:#fff}.gou-shell[data-theme=light] .bf-root[data-variant=embedded]{--bf-bg: #ffffff;--bf-surface: #ffffff;--bf-surface-hover: rgba(0, 0, 0, .03);--bf-border: rgba(0, 0, 0, .06);--bf-text-high: rgba(0, 0, 0, .85);--bf-text-medium: rgba(0, 0, 0, .65);--bf-text-low: rgba(0, 0, 0, .4);color:#000}.bf-root[data-variant=embedded] .bf-header{min-height:64px;justify-content:flex-start;gap:12px;padding:16px 20px 12px;border-bottom-color:var(--bf-border);background:var(--bf-bg)}.bf-root[data-variant=embedded] .bf-header .bf-header-btn:last-child{top:16px;right:20px}.bf-root[data-variant=embedded] .bf-header-btn{color:var(--bf-text-medium)}.bf-root[data-variant=embedded] .bf-header-title{position:static;flex:1;padding-right:36px;transform:none;color:var(--bf-text-high);font-size:18px;font-weight:600;line-height:1.5;text-align:left}.bf-root[data-variant=embedded] .bf-header-spacer{display:none}.bf-root[data-variant=embedded] .bf-embedded-body{padding:20px}.bf-embedded-form{display:flex;width:100%;min-width:0;flex-direction:column;gap:20px;--bf-collapse-gap: 20px}.bf-embedded-fields{position:relative;display:flex;width:100%;flex-direction:column}.bf-embedded-field-group{display:flex;width:100%;flex-direction:column;gap:8px}.bf-embedded-amount-panel{display:flex;width:100%;min-width:0;flex-direction:column;padding:16px;border:1px solid rgba(255,255,255,.025);border-radius:12px;background:#212224;box-sizing:border-box}.gou-shell[data-theme=light] .bf-embedded-amount-panel{border-color:#00000014;background:#fff}.bf-embedded-amount-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.bf-embedded-amount-label{display:inline-flex;min-width:0;align-items:center;gap:8px;white-space:nowrap}.bf-embedded-amount-label strong{color:var(--bf-text-medium);font-size:14px;font-weight:700;line-height:1.5}.bf-embedded-amount-label>span{color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5}.bf-embedded-amount-label em{padding:2px 6px;border-radius:9999px;background:#f3742e1a;color:var(--bf-embedded-primary);font-size:11px;font-style:normal;font-weight:500;line-height:1.25}.bf-embedded-balance{display:inline-flex;min-width:0;max-width:100%;flex-shrink:1;align-items:center;justify-content:flex-end;gap:6px;overflow:hidden;color:var(--bf-text-medium);font-size:12px;font-weight:600;line-height:1.5;text-align:right;white-space:nowrap}.bf-embedded-balance>svg,.bf-embedded-balance>span:not(.bf-embedded-balance-value){flex-shrink:0}.bf-embedded-balance-value{min-width:0;overflow:hidden;text-overflow:ellipsis}.bf-embedded-balance button{flex-shrink:0;padding:2px 8px;border:0;border-radius:9999px;background:#f3742e26;color:var(--bf-embedded-primary);font:inherit;font-size:11px;font-weight:700;line-height:1.4;cursor:pointer}.bf-embedded-balance button:hover{background:#f3742e40}.bf-embedded-amount-main{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-embedded-token-pill{display:inline-flex;height:32px;flex-shrink:0;align-items:center;gap:6px;padding:0 12px 0 6px;border:1px solid rgba(255,255,255,.1);border-radius:9999px;background:#ffffff0d;color:#fff;font:inherit;font-size:14px;font-weight:700;line-height:1.5;cursor:pointer;perspective:220px;overflow:hidden;transition:transform .12s ease,background .15s ease}.gou-shell[data-theme=light] .bf-embedded-token-pill{border-color:#0000000f;background:#00000008;color:#000}.bf-embedded-token-pill:disabled{cursor:default;opacity:1}.bf-embedded-input-wrap{display:flex;min-width:0;flex:1}.bf-embedded-amount-input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:#fff;font:inherit;font-size:24px;font-size:clamp(18px,6cqi,24px);font-weight:700;line-height:32px;text-align:right}.gou-shell[data-theme=light] .bf-embedded-amount-input{color:#000}.bf-embedded-amount-input[data-size=medium]{font-size:20px;font-size:clamp(16px,5cqi,20px);line-height:28px}.bf-embedded-amount-input[data-size=small]{font-size:16px;font-size:clamp(14px,4cqi,16px);line-height:24px}.bf-embedded-amount-input::placeholder{color:var(--bf-text-low);opacity:1}.bf-embedded-field-error{color:#ff3c53;font-size:12px;font-weight:400;line-height:1.5}.bf-embedded-direction{position:relative;z-index:10;display:flex;width:100%;align-items:center;justify-content:center;margin:-12px 0}.bf-embedded-direction>span{display:inline-flex;width:36px;height:36px;align-items:center;justify-content:center;border-radius:9999px;background:var(--bf-embedded-primary);color:var(--bf-embedded-on-primary)}.bf-embedded-summary{display:flex;width:100%;flex-direction:column;gap:12px}.bf-embedded-details{display:flex;width:100%;flex-direction:column;gap:16px;padding:0 16px 16px;box-sizing:border-box}.bf-embedded-details .bf-info-section{gap:12px}.bf-embedded-details .bf-info-section+.bf-info-section{padding-top:0}.bf-embedded-details .bf-info-section h4{color:#fffc;font-size:14px;font-weight:700}.gou-shell[data-theme=light] .bf-embedded-details .bf-info-section h4{color:#000c}.bf-embedded-details .bf-info-rows{gap:12px}.bf-embedded-details .bf-info-row{min-height:20px;font-size:13px;font-weight:600}.bf-embedded-details .bf-info-label{gap:6px;color:var(--bf-text-medium);font-size:13px;font-weight:400}.bf-embedded-details .bf-info-value{color:var(--bf-text-medium);font-size:13px;font-weight:600}.bf-embedded-details .bf-info-value[data-tone=accent]{color:var(--bf-embedded-primary)}.bf-embedded-details .bf-info-route-arrow{color:var(--bf-text-medium)}.bf-embedded-liquidity{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;background:var(--bf-surface)}.bf-embedded-liquidity>div{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--bf-text-medium);font-size:14px}.bf-embedded-liquidity>div>span:last-child{text-transform:capitalize}.bf-embedded-liquidity-track{display:block;height:8px;overflow:hidden;border-radius:9999px;background:var(--bf-surface-hover)}.bf-embedded-liquidity-track>span{display:block;height:100%;border-radius:inherit;background:var(--bf-embedded-primary)}.bf-embedded-liquidity-error{padding:12px 16px;border:1px solid rgba(255,60,83,.3);border-radius:8px;background:#ff3c531a;color:#ff3c53;font-size:14px;line-height:1.5;text-align:center}.bf-embedded-action-footer{width:100%;flex-shrink:0}.bf-embedded-cta{display:flex;width:100%;height:52px;flex-shrink:0;align-items:center;justify-content:center;padding:0 16px;border:0;border-radius:12px;background:var(--bf-embedded-primary);color:var(--bf-embedded-on-primary);font:inherit;font-size:16px;font-weight:600;line-height:1.5;cursor:pointer;transition:opacity .15s ease,background-color .15s ease;box-sizing:border-box}.bf-embedded-cta:hover:not(:disabled){background:#f3742ee6}.bf-embedded-cta:disabled{cursor:not-allowed;opacity:.6}.bf-embedded-spinner{width:20px;height:20px;border:2px solid var(--bf-embedded-on-primary);border-top-color:transparent;border-radius:9999px;animation:bf-loading-spin .9s linear infinite}@media(max-width:767px){.bf-root[data-variant=embedded] .bf-header{min-height:50px;padding:12px 16px 8px;border-bottom:0}.bf-root[data-variant=embedded] .bf-header .bf-header-btn:last-child{display:none}.bf-root[data-variant=embedded] .bf-embedded-body{padding:12px 16px calc(env(safe-area-inset-bottom,0px) + 12px);overscroll-behavior:contain;scroll-padding-bottom:calc(env(safe-area-inset-bottom,0px) + 76px);-webkit-overflow-scrolling:touch}.bf-root[data-variant=embedded] .bf-embedded-action-footer{position:sticky;bottom:0;z-index:20;padding-top:12px;background:var(--bf-bg);isolation:isolate}.bf-root[data-variant=embedded] .bf-embedded-action-footer:after{position:absolute;z-index:-1;top:100%;right:0;left:0;height:calc(env(safe-area-inset-bottom,0px) + 32px);background:var(--bf-bg);box-shadow:0 16px 0 16px var(--bf-bg);content:"";pointer-events:none}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-action-footer{position:static;padding-top:0}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-action-footer:after{display:none}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-body{scroll-padding-bottom:24px}.bf-embedded-amount-head{gap:8px}.bf-embedded-amount-label{gap:6px}.bf-embedded-balance{gap:4px}}
|
|
11
|
+
`);var m=require("react/jsx-runtime"),Gm=me.createContext(void 0);function Ma(){return me.useContext(Gm)}function wy(e){let[t,n]=me.useState(void 0);return me.useEffect(()=>{let r=e.current;if(!r)return;let o=()=>{let i=r.closest("[data-theme]");n(i?.getAttribute("data-theme")??void 0)};o();let a=new MutationObserver(o);return a.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:["data-theme"]}),()=>a.disconnect()},[e]),t}var zm=[{value:"0.1",label:"0.1%"},{value:"0.5",label:"0.5%"},{value:"1",label:"1%"},{value:"5",label:"5%"}],yy=[{value:"all",label:"ALL"},{value:"completed",label:"Completed"},{value:"pending",label:"Pending"}];function xy(e,t){return e==="auto"?t?`Auto ${t}%`:"Auto":e?`${e}%`:"1%"}function Fm(e){let t=e.replace(/[^\d.]/g,""),[n="",...r]=t.split("."),o=r.join("");return r.length===0?n:`${n}.${o.slice(0,2)}`}function Hm(e){return`${e.chainId}:${e.address.toLowerCase()}`}function _m(e){let t=Number(e);return Number.isFinite(t)?t.toLocaleString("en-US",{maximumFractionDigits:t>=1?2:6}):e||"0"}function Um(e,t){let n=Number(e||"0"),r=t?.priceUsd??0;return`\u2248 $${(Number.isFinite(n)?n*r:0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})} USD`}function vy(e,t=6){if(!e)return e;let[n,r=""]=e.split(".");if(!r)return n;let o=r.slice(0,t).replace(/0+$/,"");return o?`${n}.${o}`:n}function Vm(e,t){if(!t)return!1;let n=kt(e),r=kt(t.balance);return!n||!r?!1:n.isGreaterThan(r)}function Ia(e){if(!e.isFinite()||e.isNaN())return"0";let n=e.decimalPlaces(6,Id.default.ROUND_DOWN).toFixed(6).replace(/\.?0+$/,""),[r="0",o]=n.split("."),a=new Id.default(r||"0").toFormat(0);return o?`${a}.${o}`:a}function ky(e){return e.length<=14?e:`${e.slice(0,6)}...${e.slice(-6)}`}function Cy(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let n=r=>r.toString().padStart(2,"0");return[`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}`,`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`].join(" ")}function Ry(e){let t=kt(e);return t?Ia(t):e||"0"}function Ny(e,t){if(t?.priceUsd===void 0)return null;let n=kt(e);if(!n)return null;let r=n.multipliedBy(t.priceUsd);return r.isFinite()?`$${r.toFormat(2)}`:null}function Ns(e){return e.status==="success"?"completed":e.status==="failed"?"failed":"pending"}function Sy(e,t){return t==="all"?!0:Ns(e)===t}function Ty(e){return e==="completed"?"Completed":e==="failed"?"Failed":"Pending"}function Go(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function Qm(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function qm(e,t){if(!(!e||!t))return e.chainId===t.chainId?"swap":Qm(e,t)||e.symbol.toLowerCase()===t.symbol.toLowerCase()?"bridge":"swap-bridge"}function Ym(e){return e==="swap"||e==="deposit-swap"||e==="swap-withdraw"}function vs(e){return!e||e==="0"||Number(e)===0}function Km(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 Zm(e){let t=e.fromToken,n=e.toToken,r=qm(t,n),o=e.fromAmount||"0",a=e.toAmount||"0",i=r!==void 0&&!Ym(r),s=r!==void 0&&r!=="bridge";return{pathType:r,bridgeInfo:i?[{label:"Route",value:t&&n?`${Go(t.chainId)} \u2192 ${Go(n.chainId)}`:"-"},{label:"Validator Fee",value:vs(o)?"0":"Free",tone:vs(o)?"default":"accent"},{label:"Network Fee",value:vs(o)?"0":"Free",tone:vs(o)?"default":"accent"}]:void 0,swapInfo:s?[t&&n?{label:"Route",value:"",routeTokens:[{symbol:t.symbol,iconUrl:t.iconUrl},{symbol:n.symbol,iconUrl:n.iconUrl}]}:{label:"Route",value:"-"},{label:"Price Impact",value:"0%"},{label:"In Amount",value:o,valueToken:t?{symbol:t.symbol,iconUrl:t.iconUrl}:void 0},{label:"Swap Fee",value:"0",valueToken:t?{symbol:t.symbol,iconUrl:t.iconUrl}:void 0},{label:"Out Amount",value:a,valueToken:n?{symbol:n.symbol,iconUrl:n.iconUrl}:void 0}]:void 0,txFee:[{label:"Priority Fee Per Gas",value:"0 Gwei"},{label:"Max Fee Per Gas",value:"0 Gwei"},{label:"Gas Limit",value:"0"}],txFeeInfo:{estTxFee:"0",isDelegateFee:!1}}}function Ea({token:e,size:t=20}){let n=e?.iconUrl;return(0,m.jsx)("span",{className:"bf-token-icon","data-has-image":!!n?"true":"false",style:{width:t,height:t},children:n?(0,m.jsx)("img",{src:n,alt:"",width:t,height:t,draggable:!1}):(0,m.jsx)("span",{className:"bf-token-fallback",children:e?.symbol?.slice(0,1)??"?"})})}function ks(e,t){if(e.length===0)return;let n=e.findIndex(r=>Qm(r,t));return e[(n+1)%e.length]}function jm({label:e,token:t,amount:n,usd:r,onAmountChange:o,onTokenClick:a,locked:i=!1}){return(0,m.jsxs)("section",{className:"bf-amount-panel",children:[(0,m.jsxs)("div",{className:"bf-amount-head",children:[(0,m.jsx)("span",{children:e}),(0,m.jsxs)("span",{className:"bf-balance",children:[_m(t?.balance??"0")," ",t?.symbol??""]})]}),(0,m.jsxs)("div",{className:"bf-amount-main",children:[(0,m.jsxs)("label",{className:"bf-amount-input-wrap",children:[(0,m.jsxs)("span",{className:"bf-sr-only",children:[e," amount"]}),(0,m.jsx)("input",{type:"text",inputMode:"decimal",value:n,onChange:s=>o(s.target.value),placeholder:"0",className:"bf-amount-input","data-size":Xm(n)}),(0,m.jsx)("span",{className:"bf-amount-usd",children:r})]}),(0,m.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,m.jsxs)("span",{className:"bf-token-pill-face",children:[(0,m.jsx)(Ea,{token:t}),(0,m.jsx)("span",{children:t?.symbol??"Select"})]},t?Hm(t):"none"),!i&&(0,m.jsx)(zn,{size:16})]})]})]})}function Iy(e){if(!e)return"";let[t="",n]=e.replace(/,/g,"").split("."),r=t.replace(/\B(?=(\d{3})+(?!\d))/g,",");return n===void 0?r:`${r}.${n}`}function Xm(e){let t=e.replace(/,/g,"").trim().length;return t>26?"small":t>18?"medium":"large"}function Ey(){return(0,m.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[(0,m.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,m.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,m.jsx)("circle",{cx:"10",cy:"8",r:".75",fill:"currentColor"})]})}function Wm({label:e,token:t,amount:n,onAmountChange:r,onTokenClick:o,onMax:a,locked:i}){return(0,m.jsxs)("section",{className:"bf-embedded-amount-panel",children:[(0,m.jsxs)("div",{className:"bf-embedded-amount-head",children:[(0,m.jsxs)("span",{className:"bf-embedded-amount-label",children:[(0,m.jsx)("strong",{children:e}),!(e==="From")&&(0,m.jsx)("em",{children:"estimated"})]}),t&&(0,m.jsxs)("span",{className:"bf-embedded-balance",children:[(0,m.jsx)(Ey,{}),(0,m.jsx)("span",{className:"bf-embedded-balance-value",children:_m(t.balance)}),(0,m.jsx)("span",{children:t.symbol}),a&&(0,m.jsx)("button",{type:"button",onClick:a,"aria-label":"Use maximum available balance",children:"MAX"})]})]}),(0,m.jsxs)("div",{className:"bf-embedded-amount-main",children:[(0,m.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,m.jsxs)("span",{className:"bf-token-pill-face",children:[(0,m.jsx)(Ea,{token:t}),(0,m.jsx)("span",{children:t?.symbol??"Select"})]},t?Hm(t):"none"),!i&&(0,m.jsx)(zn,{size:14})]}),(0,m.jsxs)("label",{className:"bf-embedded-input-wrap",children:[(0,m.jsxs)("span",{className:"bf-sr-only",children:[e," amount"]}),(0,m.jsx)("input",{type:"text",inputMode:"decimal",value:Iy(n),onChange:l=>r(l.target.value),placeholder:"0.00",className:"bf-embedded-amount-input","data-size":Xm(n)})]})]})]})}function Ay({flow:e,onClose:t}){let n=me.useId(),[r,o]=me.useState(null),a=zm.find(y=>y.value===e.slippage),[i,s]=me.useState(e.slippage&&!a?e.slippage:""),l=i.trim()!==""&&i.trim()!==".",d=l?Number(i):NaN,p=Number.isFinite(d)&&d>50,h=Number.isFinite(d)&&d>5&&!p,u=y=>{e.setSlippage(y),t()},g=()=>{!l||p||(e.setSlippage(Fm(i)),t())};if(me.useEffect(()=>{o(document.body)},[]),me.useEffect(()=>{let y=f=>{f.key==="Escape"&&t()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[t]),!r)return null;let x=Ma();return(0,Ho.createPortal)((0,m.jsx)("div",{className:"bf-slippage-overlay","data-theme":x,role:"presentation",onMouseDown:y=>{y.target===y.currentTarget&&t()},children:(0,m.jsxs)("section",{className:"bf-slippage-dialog",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[(0,m.jsxs)("header",{className:"bf-slippage-head",children:[(0,m.jsx)("h3",{id:n,children:"Slippage Settings"}),(0,m.jsx)("button",{type:"button",className:"bf-slippage-close",onClick:t,"aria-label":"Close slippage settings",children:(0,m.jsx)(vn,{size:24})})]}),(0,m.jsxs)("div",{className:"bf-slippage-body",children:[(0,m.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,m.jsxs)("div",{className:"bf-slippage-controls",children:[(0,m.jsx)("div",{className:"bf-slippage-presets",children:zm.map(y=>(0,m.jsx)("button",{type:"button",className:"bf-slippage-preset","data-selected":!l&&e.slippage===y.value?"true":"false",onClick:()=>u(y.value),children:y.label},y.value))}),(0,m.jsxs)("label",{className:"bf-slippage-custom","data-selected":l?"true":"false",children:[(0,m.jsx)("span",{className:"bf-sr-only",children:"Custom slippage percent"}),(0,m.jsx)("input",{value:i,onChange:y=>{s(Fm(y.target.value))},onKeyDown:y=>{y.key==="Enter"&&(y.preventDefault(),g())},inputMode:"decimal",placeholder:"Enter custom slippage",autoComplete:"off",spellCheck:!1}),(0,m.jsx)("span",{"aria-hidden":"true",children:"%"})]})]}),p?(0,m.jsx)("p",{className:"bf-slippage-message","data-variant":"error",children:"Slippage cannot exceed 50%."}):h?(0,m.jsx)("p",{className:"bf-slippage-message","data-variant":"warning",children:"Your transaction may be frontrun due to high slippage."}):null,l&&(0,m.jsx)("button",{type:"button",className:"bf-slippage-apply",onClick:g,disabled:p,children:"Apply"})]})]})}),r)}function Jm({flow:e,env:t}){let n=me.useId(),[r,o]=me.useState(!1),[a,i]=me.useState(null),s=Ma(),l=Xt("apps.json",t,u=>Bn(u?.legal?.termsUrl,t)),d=e.termsUrl??l??Ep;me.useEffect(()=>{i(document.body)},[]),me.useEffect(()=>{let u=g=>{g.key==="Escape"&&e.cancelTerms()};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e]);let[p,h]=ws(e.termsOpen);return!a||!p?null:(0,Ho.createPortal)((0,m.jsx)("div",{className:"bf-action-modal-overlay","data-theme":s,"data-state":h,role:"presentation",onPointerDown:u=>{u.target===u.currentTarget&&e.cancelTerms()},children:(0,m.jsxs)("section",{className:"bf-action-modal bf-terms-modal",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[(0,m.jsx)("h3",{id:n,children:"Agree to Terms of Service"}),(0,m.jsx)("p",{className:"bf-action-modal-desc",children:"Please make sure to review the Terms of Service before using ONEUSD."}),(0,m.jsxs)("div",{className:"bf-terms-check-row","data-checked":r?"true":"false",children:[(0,m.jsx)("button",{type:"button",className:"bf-terms-check-button",role:"checkbox","aria-checked":r,"aria-label":"Agree to Terms of Use","data-track":"terms_check",onClick:()=>o(u=>!u),children:(0,m.jsx)("span",{className:"bf-terms-checkbox","data-checked":r?"true":"false","aria-hidden":"true"})}),(0,m.jsxs)("div",{className:"bf-terms-copy",children:[(0,m.jsx)("span",{className:"bf-terms-label",onClick:()=>o(u=>!u),children:"Agree to Terms of Use"}),d&&(0,m.jsx)("a",{href:d,target:"_blank",rel:"noreferrer",children:"Terms of Service"})]})]}),(0,m.jsx)("p",{className:"bf-terms-privacy",children:"I have read and acknowledged the Privacy Policy to use ONEUSD"}),(0,m.jsx)("button",{type:"button",className:"bf-action-primary",disabled:!r||e.status==="submitting",onClick:e.confirmTerms,"data-track":"terms_confirm",children:"Confirm"})]})}),a)}function My({value:e,disabled:t=!1}){let[n,r]=me.useState(!1);return(0,m.jsx)("button",{type:"button",className:"bf-copy-button","aria-label":"Copy token address",disabled:t,onClick:()=>{t||navigator.clipboard?.writeText(e).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)})},children:n?"OK":"Copy"})}function $m({flow:e,approval:t}){let n=me.useId(),[r,o]=me.useState(null),a=Ma();me.useEffect(()=>{o(document.body)},[]),me.useEffect(()=>{if(!t)return;let p=h=>{e.status!=="submitting"&&h.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[e,t]);let[i,s]=ws(t);if(!r||!i)return null;let l=e.status==="submitting"||!e.approveBridge,d=e.status==="submitting";return(0,Ho.createPortal)((0,m.jsx)("div",{className:"bf-action-modal-overlay","data-theme":a,"data-state":s,role:"presentation",children:(0,m.jsxs)("section",{className:"bf-action-modal bf-approve-modal",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[(0,m.jsxs)("h3",{id:n,children:["Approve ",i.token.symbol]}),(0,m.jsx)(Ea,{token:i.token,size:72}),(0,m.jsxs)("div",{className:"bf-approve-address-box",children:[(0,m.jsx)("span",{children:"Token Address"}),(0,m.jsxs)("div",{children:[(0,m.jsx)("strong",{children:i.tokenAddress}),(0,m.jsx)(My,{value:i.tokenAddress,disabled:d})]})]}),(0,m.jsxs)("div",{className:"bf-action-buttons",children:[(0,m.jsx)("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:e.status==="submitting",children:"Cancel"}),(0,m.jsxs)("button",{type:"button",className:"bf-action-primary",onClick:e.confirmApproval,disabled:l,"aria-busy":d,"data-track":"approve_confirm",children:[d&&(0,m.jsx)("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),(0,m.jsx)("span",{children:d?"Approving...":"Approve"})]})]})]})}),r)}function eg({flow:e}){let t=me.useId(),[n,r]=me.useState(null),o=Ma();me.useEffect(()=>{r(document.body)},[]),me.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]=ws(e.approvalSuccessOpen);if(!n||!a)return null;let s=e.status==="submitting";return(0,Ho.createPortal)((0,m.jsx)("div",{className:"bf-action-modal-overlay","data-theme":o,"data-state":i,role:"presentation",children:(0,m.jsxs)("section",{className:"bf-action-modal bf-approval-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:[(0,m.jsx)("h3",{id:t,children:"Approval Success"}),(0,m.jsx)("span",{className:"bf-success-mark","aria-hidden":"true"}),(0,m.jsxs)("p",{className:"bf-action-modal-desc",children:["Token approval confirmed successfully.",(0,m.jsx)("br",{}),"Please continue to the next step."]}),(0,m.jsxs)("div",{className:"bf-action-buttons",children:[(0,m.jsx)("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:s,children:"Cancel"}),(0,m.jsxs)("button",{type:"button",className:"bf-action-primary",onClick:e.continueAfterApproval,disabled:s,"aria-busy":s,children:[s&&(0,m.jsx)("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),(0,m.jsx)("span",{children:s?"Continuing...":"Continue"})]})]})]})}),n)}function Ly({fromAmount:e,toAmount:t,fromToken:n,toToken:r}){let o=me.useMemo(()=>{let i=kt(e),s=kt(t);return!i||!s||i.lte(0)||s.lte(0)?null:s.dividedBy(i)},[e,t]),a=!!(o&&n&&r&&n.symbol!==r.symbol);return(0,m.jsx)(Ta,{open:a,children:(0,m.jsxs)("div",{className:"bf-exchange-rate",children:[(0,m.jsxs)("span",{children:["1 ",n?.symbol]}),(0,m.jsx)("span",{"aria-hidden":"true",children:"="}),(0,m.jsxs)("span",{children:[o?Ia(o):""," ",r?.symbol]})]})})}function tg({flow:e}){return e.submitToast?(0,m.jsxs)("div",{className:"bf-status-toast","data-variant":"processing",role:"status","aria-live":"polite",children:[(0,m.jsx)("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:(0,m.jsx)("span",{className:"bf-status-spinner"})}),(0,m.jsxs)("span",{className:"bf-status-toast-copy",children:[(0,m.jsx)("strong",{children:"Transaction Processing"}),(0,m.jsx)("span",{children:"Your transaction is being processed on the blockchain"})]})]}):null}function ng({message:e}){let[t,n]=me.useState(!1);return me.useEffect(()=>{if(!e){n(!1);return}n(!0);let r=window.setTimeout(()=>{n(!1)},3500);return()=>window.clearTimeout(r)},[e]),!e||!t?null:(0,m.jsxs)("div",{className:"bf-status-toast","data-variant":"error",role:"alert","aria-live":"assertive",children:[(0,m.jsx)("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:(0,m.jsx)("span",{className:"bf-status-error-mark",children:"!"})}),(0,m.jsxs)("span",{className:"bf-status-toast-copy",children:[(0,m.jsx)("strong",{children:"Error"}),(0,m.jsx)("span",{children:e})]})]})}function Dy(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 rg({flow:e}){let t=me.useId(),[n,r]=me.useState(null),o=e.submitted,a=Ma();return me.useEffect(()=>{r(document.body)},[]),me.useEffect(()=>{if(!e.successDialogOpen)return;let i=s=>{s.key==="Escape"&&e.dismissSuccessDialog()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[e]),!n||!e.successDialogOpen||!o?null:(0,Ho.createPortal)((0,m.jsx)("div",{className:"bf-success-overlay","data-theme":a,role:"presentation",children:(0,m.jsx)("section",{className:"bf-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:(0,m.jsxs)("div",{className:"bf-success-body",children:[(0,m.jsx)("span",{className:"bf-success-mark","aria-hidden":"true"}),(0,m.jsxs)("div",{className:"bf-success-copy",children:[(0,m.jsx)("strong",{id:t,children:Dy(o.pathType)}),(0,m.jsx)("span",{children:"Please check the results in the history."})]}),(0,m.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,m.jsxs)(me.Fragment,{children:[s>0&&(0,m.jsx)("span",{className:"bf-success-route-arrow",children:"\u2192"}),(0,m.jsx)(Aa,{token:i,size:43})]},`${i.symbol}-${s}`))}),(0,m.jsx)("button",{type:"button",className:"bf-success-ok",onClick:e.dismissSuccessDialog,"data-track":"success_ok",children:"OK"})]})})}),n)}function Aa({token:e,size:t=16}){let n=!!e.iconUrl;return(0,m.jsx)("span",{className:"bf-token-icon","data-has-image":n?"true":"false",style:{width:t,height:t},children:e.iconUrl?(0,m.jsx)("img",{src:e.iconUrl,alt:"",width:t,height:t,draggable:!1}):(0,m.jsx)("span",{className:"bf-token-fallback",children:e.symbol?.slice(0,1)??"?"})})}function Py({row:e}){return e.routeTokens&&e.routeTokens.length>0?(0,m.jsx)("span",{className:"bf-info-route",children:e.routeTokens.map((t,n)=>(0,m.jsxs)(me.Fragment,{children:[n>0&&(0,m.jsx)("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),(0,m.jsx)(Aa,{token:t})]},`${t.symbol}-${n}`))}):e.valueToken?(0,m.jsxs)("span",{className:"bf-info-value-token",children:[(0,m.jsx)(Aa,{token:e.valueToken}),(0,m.jsx)("span",{children:e.value})]}):(0,m.jsx)(m.Fragment,{children:e.value})}function og({rows:e}){return!e||e.length===0?null:(0,m.jsx)("div",{className:"bf-info-rows",children:e.map(t=>(0,m.jsxs)("div",{className:"bf-info-row",children:[(0,m.jsx)("span",{className:"bf-info-label",children:t.label}),(0,m.jsx)("span",{className:"bf-info-value","data-tone":t.tone??"default",children:(0,m.jsx)(Py,{row:t})})]},`${t.label}-${t.value}`))})}function Oy(e,t,n){return e.pathType==="bridge"?"Bridge Info":Ym(e.pathType)?"Swap Info":t&&n?"Swap & Bridge Info":t?"Bridge Info":"Swap Info"}function Ta({open:e,className:t,children:n}){let r=me.useRef(null);return e&&(r.current=n),(0,m.jsx)("div",{className:t?`bf-collapse ${t}`:"bf-collapse","data-open":e?"true":"false","aria-hidden":e?void 0:!0,children:(0,m.jsx)("div",{className:"bf-collapse-inner",children:e?n:r.current})})}function By({summary:e,from:t,to:n,feeDelegated:r}){let o=!!e.bridgeInfo?.length,a=!!e.swapInfo?.length,i=!!e.txFee?.length,s=Oy(e,o,a),[l,d]=me.useState(!0),[p,h]=me.useState(!0);return(0,m.jsxs)("div",{className:"bf-details",children:[e.liquidity&&(0,m.jsxs)("section",{className:"bf-liquidity",children:[(0,m.jsxs)("div",{className:"bf-liquidity-head",children:[(0,m.jsx)("span",{children:e.liquidity.label??"Available Liquidity"}),(0,m.jsx)("span",{className:"bf-liquidity-status","data-status":e.liquidity.status,children:e.liquidity.status??"Normal"})]}),(0,m.jsx)("div",{className:"bf-liquidity-track",children:(0,m.jsx)("span",{style:{width:`${e.liquidity.percentage??50}%`}})})]}),(o||a)&&(0,m.jsxs)("section",{className:"bf-detail-section bf-info-card","data-open":l?"true":"false",children:[(0,m.jsxs)("button",{type:"button",className:"bf-collapse-head","aria-expanded":l,onClick:()=>d(u=>!u),"data-track":"details_toggle",children:[(0,m.jsx)("h3",{children:s}),(0,m.jsx)(zn,{size:16,className:"bf-collapse-chevron"})]}),l&&(0,m.jsx)("div",{className:"bf-collapse-body",children:(0,m.jsx)(sg,{summary:e,from:t,to:n,feeDelegated:r})})]}),i&&(0,m.jsxs)("section",{className:"bf-detail-section bf-tx-fee-section","data-open":p?"true":"false",children:[(0,m.jsxs)("button",{type:"button",className:"bf-collapse-head bf-tx-fee-head","aria-expanded":p,onClick:()=>h(u=>!u),"data-track":"details_toggle",children:[(0,m.jsx)("h3",{children:"Est. Tx Fee"}),(0,m.jsxs)("div",{className:"bf-tx-fee-total",children:[e.txFeeInfo?.isDelegateFee&&(0,m.jsx)("span",{className:"bf-fee-delegated",children:"Fee Delegated"}),e.txFeeInfo?.tokenIconUrl&&(0,m.jsx)("img",{className:"bf-tx-fee-token",src:e.txFeeInfo.tokenIconUrl,alt:e.txFeeInfo.tokenSymbol??"",width:16,height:16,draggable:!1}),(0,m.jsx)("span",{"data-delegated":e.txFeeInfo?.isDelegateFee&&Number(e.txFeeInfo?.estTxFee)>0?"true":void 0,children:vy(e.txFeeInfo?.estTxFee??"0")}),(0,m.jsx)(zn,{size:16,className:"bf-collapse-chevron"})]})]}),p&&(0,m.jsx)("div",{className:"bf-collapse-body",children:(0,m.jsx)(og,{rows:e.txFee})})]})]})}function zy(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 Cs(e){let t=kt(e);if(!(!t||t.lte(0)))return Ia(t)}function Fy(e,t,n,r){if(!n||!r)return;let o=kt(e),a=kt(t);if(!o||!a||o.lte(0)||a.lte(0))return;let i=a.dividedBy(o);if(i.gte("0.001"))return`1 ${n.symbol} = ${Ia(i)} ${r.symbol}`;let s=o.dividedBy(a);return`1 ${r.symbol} = ${Ia(s)} ${n.symbol}`}var Uy=1,jy=5;function ag(e){return kt(e)?.toNumber()??null}function ig(e){let t=ag(e);if(t!==null){if(t>=jy)return"danger";if(t>=Uy)return"warning"}}var Wy=/\bin\b.*amount|amount.*\bin\b|^from\b/i,Gy=/\bout\b.*amount|amount.*\bout\b|^to\b|receive/i,Hy=/fee/i,_y=/impact|rate|slippage|minimum|min\.|received/i,Rs=/impact/i,Vy=/^route$/i;function Qy(e,t,n){let r=e.find(p=>Wy.test(p.label)),o=e.find(p=>Gy.test(p.label)),a=new Set;r&&a.add(r),o&&a.add(o);let i=e.find(p=>Vy.test(p.label)||(p.routeTokens?.length??0)>0),s=i?.routeTokens?.length?i.routeTokens:void 0,l=i&&!s?i.value:void 0;i&&a.add(i);let d=[];for(let p of e){if(a.has(p))continue;let h=Hy.test(p.label);if(!h&&!_y.test(p.label))continue;a.add(p);let u=ag(p.value),g=h&&(u===0||/^\s*free\s*$/i.test(String(p.value??"")));g&&t==="swap"||d.push({text:g?`${p.label} Free`:`${p.label} ${p.value}`,tone:g?"accent":Rs.test(p.label)?p.tone==="danger"||p.tone==="warning"?p.tone:ig(p.value):void 0})}return{key:t,label:n,routeText:l,routeTokens:s,inRow:r,outRow:o,meta:d,rest:e.filter(p=>!a.has(p))}}function qy({steps:e}){return(0,m.jsx)("div",{className:"bf-route-steps",children:e.map((t,n)=>(0,m.jsxs)("div",{className:"bf-route-step","data-last":n===e.length-1?"true":"false","data-kind":t.key.startsWith("hop-")?"hop":"endpoint",children:[(0,m.jsxs)("span",{className:"bf-route-rail","aria-hidden":"true",children:[(0,m.jsx)("span",{className:"bf-route-line"}),(0,m.jsx)("span",{className:"bf-route-dot","data-final":n===e.length-1?"true":"false"})]}),(0,m.jsxs)("span",{className:"bf-route-body",children:[(0,m.jsxs)("span",{className:"bf-route-head",children:[(0,m.jsx)("span",{className:"bf-route-title",children:t.title}),(0,m.jsx)("span",{className:"bf-route-amount",children:t.routeTokens?.length?t.routeTokens.map((r,o)=>(0,m.jsxs)(me.Fragment,{children:[o>0&&(0,m.jsx)("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),(0,m.jsx)(Aa,{token:r})]},`${r.symbol}-${o}`)):(0,m.jsxs)(m.Fragment,{children:[t.amountToken&&(0,m.jsx)(Aa,{token:t.amountToken}),(0,m.jsx)("span",{className:"bf-route-amount-value",children:t.amount},t.amount)]})})]}),(t.meta.length>0||t.tags.length>0)&&(0,m.jsxs)("span",{className:"bf-route-meta",children:[t.meta.map(r=>(0,m.jsx)("span",{"data-tone":r.tone??"default",children:r.text},r.text)),t.tags.map(r=>(0,m.jsx)("span",{className:"bf-route-tag",children:r},r))]})]})]},t.key))})}function Yy(e){if(!Rs.test(e.label)||e.tone==="danger"||e.tone==="warning")return e;let t=ig(e.value);return t?{...e,tone:t}:e}function sg({summary:e,rateLine:t,from:n,to:r,feeDelegated:o,includeTxFee:a=!1}){let i=!!e.txFeeInfo?.isDelegateFee||!!o,s=me.useMemo(()=>(e.pathType==="bridge-swap"?[["bridge","Bridge"],["swap","Swap"]]:[["swap","Swap"],["bridge","Bridge"]]).map(([C,N])=>{let T=C==="swap"?e.swapInfo:e.bridgeInfo;return T?.length?Qy(T,C,N):null}).filter(C=>C!==null),[e]);if(s.length===0)return null;let l=s[0],d=s[s.length-1],p=l.inRow?.valueToken??(n?.symbol?{symbol:n.symbol,iconUrl:n.iconUrl}:void 0),h=l.inRow?.value??n?.amount,u=d.outRow?.valueToken??(r?.symbol?{symbol:r.symbol,iconUrl:r.iconUrl}:void 0),g=d.outRow?.value??r?.amount;if(!h)return null;let x=e.txFeeInfo,y=a&&x&&!x.isDelegateFee?[{text:`Gas ${x.estTxFee}${x.tokenSymbol?` ${x.tokenSymbol}`:""}`}]:[],f=s.length>1,c=[{key:"send",title:`Send ${p?.symbol??""}`.trim(),amount:h,amountToken:p,routeTokens:f?void 0:l.routeTokens,meta:[...y.length?[{text:"EST."}]:n?.chain?[{text:`on ${n.chain}`}]:[],...y,...f?[]:[...l.routeText?[{text:l.routeText}]:[],...l.meta.filter(k=>!Rs.test(k.text))]],tags:i&&!f?["Fee delegated"]:[]},...f?s.map(k=>({key:`hop-${k.key}`,title:k.label,amount:k.routeText??"",routeTokens:k.routeTokens,meta:k.meta,tags:i&&k.key==="swap"?["Fee delegated"]:[]})):[],{key:"receive",title:`Receive ${u?.symbol??""}`.trim(),amount:g??"\u2014",amountToken:u,meta:[...r?.chain?[{text:`on ${r.chain}`}]:[],...f?[]:l.meta.filter(k=>Rs.test(k.text))],tags:[]}],b=[...s.flatMap(k=>k.rest),...a?e.txFee??[]:[]].map(Yy),w=!!t;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(qy,{steps:c}),(b.length>0||w)&&(0,m.jsx)("div",{className:"bf-info-section",children:(0,m.jsx)(og,{rows:[...w?[{label:"Rate",value:t}]:[],...b]})})]})}function Ky({summary:e,rateLine:t,from:n,to:r,feeDelegated:o}){let a=me.useMemo(()=>zy(e),[e]);return!a.bridgeInfo?.length&&!a.swapInfo?.length?null:(0,m.jsx)("div",{className:"bf-embedded-details",children:(0,m.jsx)(sg,{summary:a,rateLine:t,from:n,to:r,feeDelegated:o,includeTxFee:!0})})}function Zy({flow:e,env:t,toastError:n}){return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Jm,{flow:e,env:t}),(0,m.jsx)($m,{flow:e,approval:e.approvalInfo??null}),(0,m.jsx)(eg,{flow:e}),(0,m.jsx)(tg,{flow:e}),(0,m.jsx)(ng,{message:e.submitToast?"":n}),(0,m.jsx)(rg,{flow:e})]})}function Xy({flow:e,env:t,isConnected:n,onRequestConnect:r,feeDelegated:o}){let a=Number(e.fromAmount)>0,i=me.useMemo(()=>a?e.summary??Zm(e):null,[a,e]),s=Km(e.quoteError),l=Vm(e.fromAmount,e.fromToken),d=l?"Insufficient balance":s.from,p=/insufficient liquidity|not enough liquidity/i.test(e.quoteError),h=p?void 0:s.to,u=e.quoteError&&!s.from&&!s.to?e.quoteError:"",g=e.error||u,x=e.status==="submitting",y=!a||!e.toAmount||!e.fromToken||!e.toToken||!e.canSubmit||!!e.quoteError||l||x,f=x?"":p&&a?"Insufficient Liquidity":a?"Continue":"Enter Amount";return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("main",{className:"bf-body bf-embedded-body","data-rd-scroll-area":!0,children:(0,m.jsxs)("div",{className:"bf-embedded-form",children:[(0,m.jsxs)("div",{className:"bf-embedded-fields",children:[(0,m.jsxs)("div",{className:"bf-embedded-field-group",children:[(0,m.jsx)(Wm,{label:"From",token:e.fromToken,amount:e.fromAmount,onAmountChange:c=>e.setAmount(c,"from"),onTokenClick:()=>{let c=ks(e.tokens,e.fromToken);c&&e.selectFromToken(c)},onMax:e.setMax,locked:e.tokens.length<=1}),d&&(0,m.jsx)("div",{className:"bf-embedded-field-error",children:d})]}),(0,m.jsx)("div",{className:"bf-embedded-direction","aria-hidden":"true",children:(0,m.jsx)("span",{children:(0,m.jsx)(Nd,{size:16})})}),(0,m.jsxs)("div",{className:"bf-embedded-field-group",children:[(0,m.jsx)(Wm,{label:"To",token:e.toToken,amount:e.toAmount,onAmountChange:c=>e.setAmount(c,"to"),onTokenClick:()=>{let c=ks(e.availableToTokens,e.toToken);c&&e.selectToToken(c)},locked:e.availableToTokens.length<=1}),h&&(0,m.jsx)("div",{className:"bf-embedded-field-error",children:h})]})]}),(0,m.jsx)(Ta,{open:!!i?.liquidity,children:i?.liquidity&&(0,m.jsxs)("section",{className:"bf-embedded-liquidity",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("span",{children:i.liquidity.label??"Available Liquidity"}),(0,m.jsx)("span",{"data-status":i.liquidity.status,children:i.liquidity.status??"normal"})]}),(0,m.jsx)("span",{className:"bf-embedded-liquidity-track",children:(0,m.jsx)("span",{style:{width:`${i.liquidity.percentage??50}%`}})})]})}),(0,m.jsx)(Ta,{open:p&&a,children:(0,m.jsx)("div",{className:"bf-embedded-liquidity-error",role:"alert",children:"Insufficient liquidity in all pools for this pair and amount."})}),(0,m.jsx)(Ta,{open:!!i,children:i&&(0,m.jsx)("div",{className:"bf-embedded-summary",children:(0,m.jsx)(Ky,{summary:i,feeDelegated:o,rateLine:Fy(e.fromAmount,e.toAmount,e.fromToken,e.toToken),from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:Cs(e.fromAmount),chain:e.fromToken?Go(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:Cs(e.toAmount),chain:e.toToken?Go(e.toToken.chainId):void 0}})})}),(0,m.jsx)("div",{className:"bf-embedded-action-footer",children:n?(0,m.jsx)("button",{type:"button",className:"bf-embedded-cta",onClick:e.submit,"data-track":"next",disabled:y,"aria-busy":x,"aria-label":x?"Processing transaction":p?"Insufficient liquidity":"Continue with swap or bridge",children:x?(0,m.jsx)("span",{className:"bf-embedded-spinner","aria-hidden":"true"}):f}):(0,m.jsx)("button",{type:"button",className:"bf-embedded-cta",onClick:r,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})})]})}),(0,m.jsx)(Zy,{flow:e,env:t,toastError:g})]})}function Jy({item:e}){let t=Ns(e),n=Ny(e.fromAmount,e.fromToken);return(0,m.jsxs)("article",{className:"bf-history-item",children:[(0,m.jsxs)("div",{className:"bf-history-item-head",children:[(0,m.jsx)("span",{className:"bf-history-status","data-status":t,children:Ty(t)}),(0,m.jsx)("time",{className:"bf-history-time",dateTime:e.timestamp,children:Cy(e.timestamp)})]}),(0,m.jsxs)("div",{className:"bf-history-item-body",children:[(0,m.jsxs)("strong",{className:"bf-history-amount",children:[Ry(e.fromAmount)," ",e.fromToken.symbol]}),(0,m.jsxs)("div",{className:"bf-history-meta",children:[(0,m.jsx)("span",{className:"bf-history-usd",children:n??ky(e.txHash)}),(0,m.jsxs)("span",{className:"bf-history-route",children:[(0,m.jsxs)("span",{className:"bf-history-route-token",children:[(0,m.jsx)(Ea,{token:e.fromToken,size:16}),(0,m.jsx)("span",{children:e.fromToken.symbol})]}),(0,m.jsx)(Sm,{size:16,className:"bf-history-route-arrow"}),(0,m.jsxs)("span",{className:"bf-history-route-token",children:[(0,m.jsx)(Ea,{token:e.toToken,size:16}),(0,m.jsx)("span",{children:e.toToken.symbol})]})]})]})]})]})}function $y({flow:e}){let[t,n]=me.useState("all"),r=e.history.some(i=>Ns(i)==="pending"),o=e.history.filter(i=>Sy(i,t)),a=t==="all"?"No bridge history yet.":`No ${t} bridge history.`;return(0,m.jsxs)("main",{className:"bf-history-body",children:[(0,m.jsx)("nav",{className:"bf-history-tabs","aria-label":"Bridge history filters",children:yy.map(i=>(0,m.jsxs)("button",{type:"button",className:"bf-history-tab","data-active":t===i.value?"true":"false",onClick:()=>n(i.value),"data-track":"history_filter","data-track-id":i.value,children:[(0,m.jsx)("span",{children:i.label}),i.value==="pending"&&r&&(0,m.jsx)("span",{className:"bf-history-tab-dot","aria-hidden":"true"})]},i.value))}),o.length>0?(0,m.jsx)("div",{className:"bf-history-list",children:o.map(i=>(0,m.jsx)(Jy,{item:i},i.id||i.txHash))}):(0,m.jsx)("div",{className:"bf-empty",children:a})]})}function ex({flow:e,env:t,feeDelegated:n}){let[r,o]=me.useState(!1),[a,i]=me.useState(0),s=!!(e.fromAmount.trim()||e.toAmount.trim()),l=me.useMemo(()=>s?e.summary??Zm(e):null,[s,e]),d=Xt("apps.json",t,b=>Bn(b?.bridgePoweredBy?.url,t)),p=Km(e.quoteError),h=Vm(e.fromAmount,e.fromToken),u=h?"Insufficient balance":p.from,g=e.quoteError&&!p.from&&!p.to?e.quoteError:"",x=e.error||g,y=e.history.some(b=>Ns(b)==="pending"),c=(l?.pathType??qm(e.fromToken,e.toToken))!=="bridge";return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("main",{className:"bf-body",children:[(0,m.jsxs)("div",{className:"bf-toolbar",children:[(0,m.jsxs)("button",{type:"button",className:"bf-chip bf-chip-history",onClick:()=>e.setStep("history"),"data-track":"history_open",children:[(0,m.jsx)(Rm,{}),(0,m.jsx)("span",{children:"History"}),(y||e.hasNewHistory)&&(0,m.jsx)("span",{className:"bf-chip-dot","aria-hidden":"true"})]}),c&&(0,m.jsxs)("button",{type:"button",className:"bf-chip",onClick:()=>o(!0),"data-track":"slippage_open",disabled:e.slippageLocked,"aria-haspopup":"dialog","aria-expanded":r,children:[(0,m.jsx)(Nm,{}),(0,m.jsx)("span",{children:e.slippageLocked?"Auto 1%":xy(e.slippage,e.effectiveSlippage)})]})]}),(0,m.jsxs)("div",{className:"bf-swap-card","data-has-from-error":u?"true":"false",children:[(0,m.jsx)(jm,{label:"From",token:e.fromToken,amount:e.fromAmount,usd:Um(e.fromAmount,e.fromToken),onAmountChange:b=>e.setAmount(b,"from"),onTokenClick:()=>{let b=ks(e.tokens,e.fromToken);b&&e.selectFromToken(b)},locked:e.tokens.length<=1}),u&&(0,m.jsx)("div",{className:"bf-field-error",children:u}),(0,m.jsx)("button",{type:"button",className:"bf-swap-toggle",onClick:()=>{e.swapTokens(),i(b=>b+360)},"data-track":"token_swap",style:{transform:`translateX(-50%) rotate(${a}deg)`,transition:"transform 0.2s ease"},children:(0,m.jsx)(Nd,{size:22})}),(0,m.jsx)(jm,{label:"To",token:e.toToken,amount:e.toAmount,usd:Um(e.toAmount,e.toToken),onAmountChange:b=>e.setAmount(b,"to"),onTokenClick:()=>{let b=ks(e.availableToTokens,e.toToken);b&&e.selectToToken(b)},locked:e.availableToTokens.length<=1}),p.to&&(0,m.jsx)("div",{className:"bf-field-error",children:p.to})]}),(0,m.jsx)(Ly,{fromAmount:e.fromAmount,toAmount:e.toAmount,fromToken:e.fromToken,toToken:e.toToken}),(0,m.jsx)(Ta,{open:!!l,children:l&&(0,m.jsx)(By,{summary:l,feeDelegated:n,from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:Cs(e.fromAmount),chain:e.fromToken?Go(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:Cs(e.toAmount),chain:e.toToken?Go(e.toToken.chainId):void 0}})})]}),(0,m.jsxs)("footer",{className:"bf-footer",children:[(0,m.jsx)("button",{type:"button",className:"bf-next",onClick:e.submit,"data-track":"next",disabled:e.status==="submitting"||!!e.quoteError||h,children:e.status==="submitting"?"Processing...":"Next"}),d&&(0,m.jsxs)("a",{className:"bf-powered",href:d,target:"_blank",rel:"noreferrer",children:["Powered by ",(0,m.jsx)("span",{className:"bf-powered-brand",children:"CROSS DeFi"})]})]}),r&&(0,m.jsx)(Ay,{flow:e,onClose:()=>o(!1)}),(0,m.jsx)(Jm,{flow:e,env:t}),(0,m.jsx)($m,{flow:e,approval:e.approvalInfo??null}),(0,m.jsx)(eg,{flow:e}),(0,m.jsx)(tg,{flow:e}),(0,m.jsx)(ng,{message:e.submitToast?"":x}),(0,m.jsx)(rg,{flow:e})]})}function go({onClose:e,onBackToWallet:t,feeDelegated:n,env:r,variant:o="default",title:a,isConnected:i,onRequestConnect:s,className:l,...d}){let p=me.useMemo(()=>it(r),[r]),h=Cm(),u=Bm({...d,onExit:t}),g=me.useRef(null),x=wy(g),y=u.step==="history"?"History":a??"Swap & Bridge",f=i??!!d.walletAddress,c=o==="embedded"&&u.step==="form"&&!t?null:u.back;return(0,m.jsx)(Me,{feature:"bridge",children:(0,m.jsx)(Gm.Provider,{value:x,children:(0,m.jsxs)("div",{ref:g,className:Ie("bf-root",l),"data-view":u.step,"data-status":u.status,"data-variant":o,"data-soft-keyboard-open":o==="embedded"&&h?"true":"false",children:[(0,m.jsxs)("header",{className:"bf-header",children:[c?(0,m.jsx)("button",{type:"button",className:"bf-header-btn",onClick:c,"aria-label":"Back",children:(0,m.jsx)(En,{size:24})}):(0,m.jsx)("span",{className:"bf-header-spacer","aria-hidden":"true"}),(0,m.jsx)("span",{className:"bf-header-title","data-clickable":c?"true":"false",onClick:c??void 0,children:y}),(0,m.jsx)("button",{type:"button",className:"bf-header-btn",onClick:e,"aria-label":"Close","data-wi-close":!0,children:(0,m.jsx)(vn,{size:24})})]}),u.step==="history"?(0,m.jsx)($y,{flow:u}):o==="embedded"?(0,m.jsx)(Xy,{flow:u,env:p,isConnected:f,onRequestConnect:s,feeDelegated:n}):(0,m.jsx)(ex,{flow:u,env:p,feeDelegated:n})]})})})}var yn=H(require("react"),1),bg=H(require("bignumber.js"),1);var lg=require("@tanstack/react-query");var tx="token-history";function dg(e,t,n,r,o=!0){return(0,lg.useInfiniteQuery)({queryKey:[tx,e,t,n.toLowerCase(),r.toLowerCase()],initialPageParam:void 0,queryFn:async({pageParam:a,signal:i})=>{let s=await Be("walletServer",e),l=new URLSearchParams({chain_id:String(t),token:n,wallet:r}),d=a;d&&(l.set("last_timestamp",String(d.last_timestamp)),l.set("last_log_index",String(d.last_log_index)),l.set("last_tx_index",String(d.last_tx_index)));let p=await fetch(`${s}/v1/public/token/historical?${l}`,{cache:"no-store",signal:i});if(!p.ok)throw new Error(`Failed to fetch token history: ${p.status}`);let h=await p.json();if(h.code!==200)throw new Error(`Token history API error: ${h.code}`);return h.data??[]},getNextPageParam:a=>{if(!a||a.length===0)return;let i=a[a.length-1];return{last_timestamp:i.timestamp,last_log_index:i.log_index,last_tx_index:i.tx_index}},enabled:o&&!!r&&!!n&&t>0,staleTime:1e4})}var Ss=H(require("react"),1);var Ed={chart:!1,balance:!0,overview:!1,social:!1,history:!0},nx=Object.keys(Ed);function cg(e){let[t,n]=Ss.useState({visibility:Ed,isLoaded:!1});return Ss.useEffect(()=>{let r=!0;return kr(gi,e).then(o=>{if(!r)return;let a=o?.tokenDetail?.sections,i={...Ed};if(a)for(let s of nx){let l=a[s];typeof l=="boolean"&&(i[s]=l)}n({visibility:i,isLoaded:!0})}),()=>{r=!1}},[e]),t}var kn=H(require("react"),1);var Ts=require("@tanstack/react-query");var rx="token-price-history";function pg(e,t,n,r,o=!0){return(0,Ts.useQuery)({queryKey:[rx,e,t,n.toLowerCase(),r],queryFn:async({signal:a})=>{let i=await Be("walletServer",e),s=new URLSearchParams({chain_id:String(t),token:n,interval:r}),l=await fetch(`${i}/v1/public/token/price/historical?${s}`,{cache:"no-store",signal:a});if(!l.ok)throw new Error(`Failed to fetch token price history: ${l.status}`);let d=await l.json();if(d.code!==200)throw new Error(`Token price history API error: ${d.code}`);return d.data??[]},enabled:o&&!!n&&t>0,staleTime:3e4,placeholderData:Ts.keepPreviousData})}var pt=require("react/jsx-runtime"),ox="var(--ds-system-green-high, #00a869)",ax="var(--wi-error, #e70077)",ho=150,Is=3,Ad=18,ix=18,sx=[{key:"10m",label:"10m"},{key:"1h",label:"1H"},{key:"1d",label:"1D"},{key:"7d",label:"1W"},{key:"30d",label:"1M"},{key:"1y",label:"1Y"}],lx=new Set(["7d","30d","1y"]);function dx(){let e=kn.useRef(null),[t,n]=kn.useState(0);return kn.useEffect(()=>{let r=e.current;if(!r)return;let o=new ResizeObserver(a=>{n(a[0]?.contentRect.width??0)});return o.observe(r),n(r.clientWidth),()=>o.disconnect()},[]),[e,t]}function cx(e,t){let n=new Date(e*1e3),r=t?{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}:{hour:"numeric",minute:"2-digit"};return new Intl.DateTimeFormat("en-US",r).format(n)}function px(e,t){if(t<=0||e.length===0)return null;let n=e.length===1?[e[0],e[0]]:e,r=n.length,o=n[0],a=n[0],i=0,s=0;for(let b=1;b<r;b++)n[b]>o&&(o=n[b],i=b),n[b]<a&&(a=n[b],s=b);let l=o-a||1,d=Math.max(1,t-Is*2),p=ho-Ad-ix,h=b=>r===1?t/2:Is+b/(r-1)*d,u=b=>Ad+(1-(b-a)/l)*p,g=n.map((b,w)=>({x:h(w),y:u(b)})),x=g.map((b,w)=>`${w===0?"M":"L"}${b.x.toFixed(2)},${b.y.toFixed(2)}`).join(" "),y=g[0],f=g[g.length-1],c=`${x} L${f.x.toFixed(2)},${ho} L${y.x.toFixed(2)},${ho} Z`;return{values:n,points:g,linePath:x,areaPath:c,maxIdx:i,minIdx:s}}function ug({env:e,chainId:t,tokenAddress:n}){let[r,o]=kn.useState("1d"),[a,i]=kn.useState(null),s=kn.useId(),[l,d]=dx(),{data:p,isLoading:h,isError:u}=pg(e,t,n,r,!0),g=kn.useMemo(()=>(p??[]).filter(j=>Number.isFinite(Number(j.price))).slice().sort((j,le)=>j.updated_at-le.updated_at),[p]),x=kn.useMemo(()=>g.map(M=>Number(M.price)),[g]),y=kn.useMemo(()=>px(x,d),[x,d]);kn.useEffect(()=>{i(null)},[r]);let f=g.length>0,c=a!==null&&a<x.length?a:x.length-1,b=f?x[c]:0,w=f?x[0]:0,k=w!==0?(b-w)/w*100:0,C=k>=0,N=C?ox:ax,T=(C?"+":"-")+(Math.floor(Math.abs(k)*100)/100).toFixed(2)+"%",R=a!==null&&g[a]?cx(g[a].updated_at,lx.has(r)):"",S=M=>{if(!y||d<=0)return;let j=M.currentTarget.getBoundingClientRect(),le=M.clientX-j.left;if(y.values.length<=1){i(0);return}let ne=Math.max(1,d-Is*2),Q=Math.min(1,Math.max(0,(le-Is)/ne)),ee=Math.round(Q*(g.length-1));i(Math.min(g.length-1,Math.max(0,ee)))},E=()=>i(null);if(!h&&(u||!f))return null;let A=a!==null&&y&&y.points[a]?y.points[a]:null,F=y?.points[y.maxIdx],D=y?.points[y.minIdx],G=M=>Math.min(Math.max(M,24),Math.max(24,d-24));return(0,pt.jsxs)("section",{className:"wi-td-chart",children:[(0,pt.jsxs)("div",{className:"wi-td-chart-panel",children:[(0,pt.jsx)("span",{className:"wi-td-chart-price",children:f?so(b):"\u2014"}),f&&(0,pt.jsxs)("span",{className:"wi-td-chart-change","data-positive":C,children:[(0,pt.jsx)("span",{children:T}),R&&(0,pt.jsx)("span",{className:"wi-td-chart-when",children:R})]})]}),(0,pt.jsx)("div",{ref:l,className:"wi-td-chart-plot",children:h&&!f?(0,pt.jsx)("div",{className:"wi-skeleton-block wi-td-chart-skeleton"}):y&&d>0&&(0,pt.jsxs)("svg",{className:"wi-td-chart-svg",width:d,height:ho,role:"img","aria-label":"Price chart",children:[(0,pt.jsx)("defs",{children:(0,pt.jsxs)("linearGradient",{id:s,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,pt.jsx)("stop",{offset:"0%",stopColor:N,stopOpacity:.28}),(0,pt.jsx)("stop",{offset:"100%",stopColor:N,stopOpacity:0})]})}),(0,pt.jsx)("path",{d:y.areaPath,fill:`url(#${s})`}),(0,pt.jsx)("path",{d:y.linePath,fill:"none",stroke:N,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),F&&(0,pt.jsx)("text",{className:"wi-td-chart-minmax",x:G(F.x),y:Math.max(11,F.y-7),textAnchor:"middle",children:so(y.values[y.maxIdx])}),D&&y.minIdx!==y.maxIdx&&(0,pt.jsx)("text",{className:"wi-td-chart-minmax",x:G(D.x),y:Math.min(ho-5,D.y+14),textAnchor:"middle",children:so(y.values[y.minIdx])}),A&&(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)("line",{className:"wi-td-chart-cursor",x1:A.x,y1:Ad-6,x2:A.x,y2:ho}),(0,pt.jsx)("circle",{cx:A.x,cy:A.y,r:4,fill:N,stroke:"var(--wi-surface-bg, #121212)",strokeWidth:2})]}),(0,pt.jsx)("rect",{x:0,y:0,width:d,height:ho,fill:"transparent",style:{touchAction:"none"},onPointerMove:S,onPointerDown:S,onPointerLeave:E,onPointerCancel:E})]})}),(0,pt.jsx)("div",{className:"wi-td-chart-tabs",role:"tablist",children:sx.map(M=>(0,pt.jsx)("button",{type:"button",role:"tab","aria-selected":r===M.key,className:"wi-td-chart-tab","data-active":r===M.key||void 0,onClick:()=>o(M.key),"data-track":"token_detail_interval","data-track-id":M.key,children:M.label},M.key))})]})}var ux="0x0000000000000000000000000000000000000000";function Md(e){return e?.toLowerCase().includes("bridge")??!1}function fg(e,t){return Md(e.to_alias)?"bridge-out":Md(e.from_alias)||e.from?.toLowerCase()===ux&&Md(e.tx_to_alias)?"bridge-in":e.to?.toLowerCase()===t.toLowerCase()?"receive":"send"}function mg(e){return e==="receive"||e==="bridge-in"}var B=require("react/jsx-runtime"),fx="https://contents.crosstoken.io/wallet/token/images/FT.png",mx={receive:"Receive",send:"Send","bridge-in":"Bridge In","bridge-out":"Bridge Out"};function gx(e){return e.length>24?"xs":e.length>18?"sm":"md"}function hx(e){if(!e)return"";let t=e<1e12?e*1e3:e,n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"just now";let r=Math.floor(n/60);if(r<60)return`${r}m`;let o=Math.floor(r/60);if(o<24)return`about ${o}h`;let a=Math.floor(o/24);if(a<30)return`${a}d`;let i=Math.floor(a/30);return i<12?`${i}mo`:`${Math.floor(i/12)}y`}function gg(e){let[t,n]=e.split("."),r="";for(let o=0;o<t.length;o++){let a=t.length-o;o>0&&a%3===0&&(r+=","),r+=t[o]}return n?`${r}.${n}`:r}function hg(e,t){let n=BigInt(e||"0");if(t<=2){let i=10n**BigInt(t),s=n/i,l=n%i*10n**BigInt(2-t);return`${s.toString()}.${l.toString().padStart(2,"0")}`}let r=n/10n**BigInt(t-2),o=r/100n,a=r%100n;return`${o.toString()}.${a.toString().padStart(2,"0")}`}function bx(e,t,n){let r=yn.useRef(null),o=yn.useRef(null),[a,i]=yn.useState(t);return yn.useLayoutEffect(()=>{let s=r.current,l=o.current;if(!s||!l)return;let d=()=>{let h=s.clientWidth;if(!h)return;let u=window.getComputedStyle(l),g=document.createElement("span");g.textContent=l.textContent,g.style.cssText=["position:absolute","left:-9999px","top:-9999px","visibility:hidden","white-space:nowrap",`font-family:${u.fontFamily}`,`font-weight:${u.fontWeight}`,`letter-spacing:${u.letterSpacing}`,`font-size:${t}px`].join(";"),document.body.appendChild(g);let x=g.offsetWidth;if(document.body.removeChild(g),x<=h){i(t);return}let y=Math.max(n,Math.floor(t*h/x));i(y)};d();let p=new ResizeObserver(d);return p.observe(s),()=>p.disconnect()},[e,t,n]),{containerRef:r,textRef:o,fontSize:a}}function wx(e){let t=kt(e);return t?t.decimalPlaces(4,bg.default.ROUND_DOWN).toFormat():"-"}function yx(){return(0,B.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[(0,B.jsx)("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.6"}),(0,B.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 xx(){return(0,B.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,B.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 vx(){return(0,B.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,B.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 kx(){return(0,B.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,B.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 wg({env:e,isMobile:t,token:n,walletAddress:r,stat:o,tokenInfo:a,showBalance:i=!0,onBack:s,onClose:l,onSend:d,onOutlink:p}){let h=n.quantity.decimals,[u,g]=yn.useState(!1),{buildTxUrl:x,chainInfo:y}=Di(e,n.chainId,!0),{visibility:f}=cg(e),{data:c,isLoading:b,isError:w,fetchNextPage:k,hasNextPage:C,isFetchingNextPage:N,refetch:T}=dg(e,n.chainId,n.address,r,!0),R=yn.useMemo(()=>c?.pages?c.pages.flat():[],[c]),S=yn.useRef(null);yn.useEffect(()=>{if(!t)return;let q=S.current;if(!q||!C)return;let ae=new IntersectionObserver(Z=>{Z[0]?.isIntersecting&&!N&&k()},{rootMargin:"120px"});return ae.observe(q),()=>ae.disconnect()},[t,C,N,k]);let E=yn.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(n.address).then(()=>{g(!0),setTimeout(()=>g(!1),1500)}).catch(()=>{})},[n.address]),A=gg(hg(n.quantity.numeric,h)),F=o?.price?Ai(n.quantity.numeric,h,o.price):null,D=i?A:"\u2022\u2022\u2022\u2022",{containerRef:G,textRef:M,fontSize:j}=bx(D,30,14),oe=Fr(n.chainId,e).name??y?.name??`Chain ${n.chainId}`,ne=y?.explorer_url,Q=a?.deployed??!0,ee=yn.useMemo(()=>{let q=[];return a?.info_url&&q.push({key:"web",label:"Website",url:a.info_url,icon:(0,B.jsx)(yx,{})}),a?.telegram_url&&q.push({key:"tg",label:"Telegram",url:a.telegram_url,icon:(0,B.jsx)(xx,{})}),a?.x_url&&q.push({key:"x",label:"X",url:a.x_url,icon:(0,B.jsx)(vx,{})}),a?.medium_url&&q.push({key:"medium",label:"Medium",url:a.medium_url,icon:(0,B.jsx)(kx,{})}),q},[a]),z=(q,ae,Z,pe)=>{jt(q,ae,{category:"token-detail",origin:Z,payload:{address:n.address,txHash:pe}},p)};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"wi-sticky-header",children:[(0,B.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,B.jsx)("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:(0,B.jsx)(En,{size:24})}),(0,B.jsxs)("span",{className:"wi-td-header-title",children:[(0,B.jsx)("img",{src:n.icon_url,alt:"","aria-hidden":!0,className:"wi-td-header-icon",width:24,height:24,draggable:!1,onError:q=>{q.currentTarget.src=fx}}),(0,B.jsx)("span",{className:"wi-td-header-name",children:n.symbol})]}),(0,B.jsx)("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close","data-wi-close":!0,children:(0,B.jsx)(vn,{size:24})})]}),(0,B.jsx)("hr",{className:"wi-divider"})]}),(0,B.jsxs)("div",{className:"wi-td-scroll",children:[f.chart&&(0,B.jsx)(ug,{env:e,chainId:n.chainId,tokenAddress:n.address}),f.balance&&(0,B.jsxs)("section",{className:"wi-td-balance-card",children:[(0,B.jsxs)("div",{className:"wi-td-balance-left",ref:G,children:[(0,B.jsx)("span",{className:"wi-td-balance-label",children:"My Balance"}),(0,B.jsx)("span",{className:"wi-td-balance-amount",ref:M,style:{fontSize:j},children:D}),i&&F&&(0,B.jsx)("span",{className:"wi-td-balance-fiat",children:F})]}),(0,B.jsx)("button",{type:"button",className:"wi-td-send-btn",onClick:()=>d(n),"aria-label":`Send ${n.symbol}`,"data-track":"token_detail_send","data-track-id":n.symbol,children:(0,B.jsx)("span",{children:"Send"})})]}),f.overview&&(0,B.jsxs)("section",{className:"wi-td-section",children:[(0,B.jsx)("h3",{className:"wi-td-section-title",children:"Crypto Overview"}),(0,B.jsxs)("div",{className:"wi-td-rows",children:[(0,B.jsxs)("div",{className:"wi-td-row",children:[(0,B.jsx)("span",{className:"wi-td-row-label",children:"Network"}),ne?(0,B.jsxs)("a",{className:"wi-td-row-value wi-td-row-link",href:ne,target:"_blank",rel:"noopener noreferrer",onClick:q=>z(q,ne,"token-network"),children:[(0,B.jsx)("span",{children:oe}),(0,B.jsx)(ua,{className:"wi-td-external-icon"})]}):(0,B.jsx)("span",{className:"wi-td-row-value",children:oe})]}),(0,B.jsxs)("div",{className:"wi-td-row",children:[(0,B.jsx)("span",{className:"wi-td-row-label",children:"Contract Address"}),(0,B.jsxs)("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:E,"aria-label":"Copy contract address",children:[(0,B.jsx)("span",{children:dn(n.address)}),u?(0,B.jsx)(qn,{size:14}):(0,B.jsx)(Cr,{size:14})]})]}),(0,B.jsxs)("div",{className:"wi-td-row",children:[(0,B.jsx)("span",{className:"wi-td-row-label",children:"Decimals"}),(0,B.jsx)("span",{className:"wi-td-row-value",children:h})]}),(0,B.jsxs)("div",{className:"wi-td-row",children:[(0,B.jsx)("span",{className:"wi-td-row-label",children:"Total Supply"}),(0,B.jsx)("span",{className:"wi-td-row-value",children:wx(o?.circulating_supply)})]})]})]}),f.social&&ee.length>0&&(0,B.jsxs)("section",{className:"wi-td-section",children:[(0,B.jsx)("h3",{className:"wi-td-section-title",children:"Social Media"}),(0,B.jsx)("div",{className:"wi-td-social-row",children:ee.map(q=>(0,B.jsx)("a",{className:"wi-td-social-btn",href:q.url,target:"_blank",rel:"noopener noreferrer","aria-label":q.label,onClick:ae=>z(ae,q.url,"token-social"),children:q.icon},q.key))})]}),f.history&&(0,B.jsxs)("section",{className:"wi-td-section",children:[(0,B.jsx)("h3",{className:"wi-td-section-title",children:"Token History"}),b&&(0,B.jsx)("div",{className:"wi-td-history-list",children:Array.from({length:3},(q,ae)=>(0,B.jsxs)("div",{className:"wi-td-history-skeleton",children:[(0,B.jsx)("div",{className:"wi-skeleton-block",style:{width:90,height:14}}),(0,B.jsx)("div",{className:"wi-skeleton-block",style:{width:60,height:14}})]},`td-sk-${ae}`))}),!b&&w&&(0,B.jsxs)("div",{className:"wi-td-history-empty",children:[(0,B.jsx)("span",{children:"Failed to load history."}),(0,B.jsx)("button",{type:"button",className:"wi-td-retry-btn",onClick:()=>T(),children:"Retry"})]}),!b&&!w&&R.length===0&&(0,B.jsx)("div",{className:"wi-td-history-empty",children:(0,B.jsx)("span",{children:"No transactions found."})}),!b&&!w&&R.length>0&&(0,B.jsxs)("div",{className:"wi-td-history-list",children:[R.map((q,ae)=>{let Z=fg(q,r),pe=mg(Z),Se=pe?q.from:q.to,Ue=gg(hg(q.amount,h)),fe=x(q.tx),Re=hx(q.timestamp),Ce=(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"wi-td-history-top",children:[(0,B.jsx)("span",{className:"wi-td-history-type","data-direction":Z,children:mx[Z]}),(0,B.jsx)("span",{className:"wi-td-history-counter",children:dn(Se??"")})]}),(0,B.jsxs)("div",{className:"wi-td-history-bottom",children:[(0,B.jsxs)("span",{className:"wi-td-history-meta",children:[(0,B.jsx)("span",{className:"wi-td-history-status","data-status":q.status,children:q.status==="success"?"Success":"Failed"}),Re&&(0,B.jsx)("span",{className:"wi-td-history-time",children:Re})]}),(0,B.jsxs)("span",{className:"wi-td-history-amount","data-size":gx(`${pe?"+":"-"}${Ue} ${n.symbol}`),children:[pe?"+":"-",Ue," ",n.symbol]})]})]}),tt=`${q.tx}-${q.log_index}-${ae}`;return fe?(0,B.jsx)("a",{className:"wi-td-history-item wi-td-history-item--link",href:fe,target:"_blank",rel:"noopener noreferrer",onClick:Le=>z(Le,fe,"token-tx",q.tx),children:Ce},tt):(0,B.jsx)("div",{className:"wi-td-history-item",children:Ce},tt)}),C&&(t?(0,B.jsx)("div",{ref:S,className:"wi-td-history-sentinel",children:N&&(0,B.jsx)("span",{className:"wi-td-history-loading",children:"Loading\u2026"})}):(0,B.jsx)("button",{type:"button",className:"wi-td-loadmore-btn",onClick:()=>k(),disabled:N,children:N?"Loading\u2026":"Load more"}))]})]})]})]})}var _r=H(require("react"),1);var Ng=require("@tanstack/react-query");var Cx="https://ipfs.io/ipfs/",Rx=/^0x[0-9a-fA-F]{40}$/,yg=/^\d+$/;function Nx(e,t){return typeof e!="string"||!yg.test(e)?t:BigInt(e)}function xg(e,t){let n=e.token?.address,r=e.token_id;if(typeof n!="string"||!Rx.test(n)||typeof r!="string"||!yg.test(r))return null;let o=t==="ERC1155"?Nx(e.quantity,1n):1n;return o<=0n?null:{contract:n.toLowerCase(),tokenId:r,standard:t,tokenUri:e.token_uri||null,quantity:o,collectionName:e.token?.name||Ex(n),collectionSymbol:e.token?.symbol||"",collectionIconUrl:wo(e.token?.icon_url),collectionNamed:!!(e.token?.name||e.token?.symbol)}}function vg(e){let t=new Map,n=new Set;for(let r of e){let o=`${r.contract}:${r.tokenId}`;if(n.has(o))continue;n.add(o);let a=t.get(r.contract);a||(a={contract:r.contract,standard:r.standard,name:r.collectionName,symbol:r.collectionSymbol,iconUrl:r.collectionIconUrl,items:[]},t.set(r.contract,a)),a.items.push(r)}return[...t.values()].filter(Sx)}function Sx(e){return e.items.some(t=>t.collectionNamed)||!!e.iconUrl||e.items.some(t=>!!t.tokenUri)}function wo(e){if(typeof e!="string")return null;let t=e.trim();if(!t)return null;if(/^ipfs:\/\//i.test(t)){let n=t.replace(/^ipfs:\/\//i,"").replace(/^ipfs\//i,"");return n?`${Cx}${n}`:null}if(/^data:image\//i.test(t))return t;try{let n=new URL(t);return n.protocol!=="https:"&&n.protocol!=="http:"||n.username||n.password?null:n.toString()}catch{return null}}function kg(e){let t=/^data:application\/json(;[^,]*)?,(.*)$/is.exec(e.trim());if(!t)return;let n=t[1]??"",r=t[2]??"";try{let o=/;base64/i.test(n)?Tx(r):decodeURIComponent(r);return JSON.parse(o)}catch{return null}}function Tx(e){let t=atob(e),n=Uint8Array.from(t,r=>r.charCodeAt(0));return new TextDecoder().decode(n)}function bo(e){return typeof e=="string"&&e.trim()?e.trim():null}function Ix(e){return typeof e=="string"?e.trim()||null:typeof e=="number"||typeof e=="boolean"?String(e):null}function Ld(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e,n=bo(t.image_data),r=wo(bo(t.image)??bo(t.image_url))??(n&&n.startsWith("<svg")?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(n)}`:null),o=[];if(Array.isArray(t.attributes))for(let a of t.attributes){if(!a||typeof a!="object")continue;let i=a,s=Ix(i.value);s!==null&&o.push({traitType:bo(i.trait_type),value:s})}return{name:bo(t.name),description:bo(t.description),image:r,animationUrl:wo(bo(t.animation_url)),attributes:o}}function Cg(e){if(!e)return!1;let t=e.split(/[?#]/)[0]?.toLowerCase()??"";return/\.(mp4|webm|ogg|ogv|mov)$/.test(t)}function Dd(e,t){return t?.trim()?t.trim():`#${e}`}function Rg(e,t=12){if(e.length<=t)return`#${e}`;let n=Math.ceil((t-1)/2),r=Math.floor((t-1)/2);return`#${e.slice(0,n)}\u2026${e.slice(-r)}`}function Pd(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Ex(e){return`${e.slice(0,6)}\u2026${e.slice(-4)}`}var Ax="nft-holdings",Mx=5,Lx=100,Dx=["ERC721","ERC1155"];async function Px(e,t,n,r){let o=[],a=t.toLowerCase();for(let i=1;i<=Mx;i+=1){let s=new URLSearchParams({page:String(i),page_size:String(Lx),sort_by:"updated",sort_order:"desc"}),l=await fetch(`${e}/v1/accounts/${a}/nfts/${n}?${s}`,{cache:"no-store",signal:r});if(!l.ok)throw new Error(`Failed to fetch ${n} holdings: ${l.status}`);let d=await l.json();for(let p of d.data?.nfts??[]){let h=xg(p,n);h&&o.push(h)}if(!d.data?.next_page)break}return o}function Sg(e,t,n=!0){return(0,Ng.useQuery)({queryKey:[Ax,e,t.toLowerCase()],queryFn:async({signal:r})=>{let o=await Be("crossExplorer",e),a=await Promise.all(Dx.map(i=>Px(o,t,i,r)));return vg(a.flat())},enabled:!!t&&n,staleTime:6e4,retry:1})}var Ig=require("@tanstack/react-query");var Ox="nft-metadata",Bx=3e3,zx=4,Od=0,Tg=[];async function Fx(e){Od>=zx&&await new Promise(t=>Tg.push(t)),Od+=1;try{return await e()}finally{Od-=1,Tg.shift()?.()}}async function Ux(e,t){let n=kg(e);if(n!==void 0)return Ld(n);let r=wo(e);return r?Fx(async()=>{let o=new AbortController,a=()=>o.abort();t?.addEventListener("abort",a);let i=setTimeout(a,Bx);try{let s=await fetch(r,{signal:o.signal,credentials:"omit",referrerPolicy:"no-referrer"});return s.ok?Ld(await s.json()):null}catch{return null}finally{clearTimeout(i),t?.removeEventListener("abort",a)}}):null}function Es(e,t=!0){return(0,Ig.useQuery)({queryKey:[Ox,e],queryFn:({signal:n})=>Ux(e,n),enabled:!!e&&t,staleTime:1/0,gcTime:30*6e4,retry:!1})}var Eg=require("@tanstack/react-query");var jx="nft-instance";function Ag(e,t,n,r=!0){return(0,Eg.useQuery)({queryKey:[jx,e,t,n],queryFn:async({signal:o})=>{let a=await Be("crossExplorer",e),i=await fetch(`${a}/v1/tokens/${t}/instances/${n}`,{cache:"no-store",signal:o});if(!i.ok)throw new Error(`Failed to fetch NFT instance: ${i.status}`);return(await i.json()).data?.instance??null},enabled:!!t&&!!n&&r,staleTime:5*6e4,retry:!1})}var L=require("react/jsx-runtime"),Mg={ERC721:"ERC-721",ERC1155:"ERC-1155"};function Bd({src:e,alt:t,className:n}){let[r,o]=_r.useState(!1);return _r.useEffect(()=>o(!1),[e]),!e||r?(0,L.jsx)("div",{className:Ie("wi-nft-media wi-nft-media--fallback",n),role:"img","aria-label":t,"data-nft-fallback":!0,children:(0,L.jsx)(Sp,{className:"wi-nft-media-fallback-icon"})}):(0,L.jsx)("img",{src:e,alt:t,className:Ie("wi-nft-media",n),loading:"lazy",decoding:"async",draggable:!1,referrerPolicy:"no-referrer",onError:()=>o(!0)})}function Wx({collection:e}){let t=e.items[0],{data:n}=Es(t?.tokenUri??null,!e.iconUrl);return(0,L.jsx)(Bd,{src:e.iconUrl??n?.image??null,alt:e.name,className:"wi-nft-thumb"})}function Lg({env:e,walletAddress:t,active:n,onSelectCollection:r}){let{data:o,isLoading:a,isError:i,refetch:s,isFetching:l}=Sg(e,t,n);return a?(0,L.jsx)("div",{className:"wi-token-list","aria-busy":"true",children:Array.from({length:4},(d,p)=>(0,L.jsx)("div",{className:"wi-skeleton-item","data-nft-skeleton":!0,children:(0,L.jsxs)("div",{className:"wi-skeleton-left",children:[(0,L.jsx)("div",{className:"wi-skeleton-block wi-nft-thumb-skeleton"}),(0,L.jsxs)("div",{className:"wi-skeleton-lines",children:[(0,L.jsx)("div",{className:"wi-skeleton-block",style:{width:96,height:14}}),(0,L.jsx)("div",{className:"wi-skeleton-block",style:{width:56,height:12}})]})]})},p))}):i?(0,L.jsxs)("div",{className:"wi-nft-state",role:"alert",children:[(0,L.jsx)("span",{className:"wi-nft-state-text",children:"Couldn\u2019t load NFTs"}),(0,L.jsx)("button",{type:"button",className:"wi-nft-retry",onClick:()=>{s()},disabled:l,"data-track":"nft_retry",children:l?"Retrying\u2026":"Try again"})]}):!o||o.length===0?(0,L.jsxs)("div",{className:"wi-nft-empty",role:"status",children:[(0,L.jsx)("span",{className:"wi-nft-empty-icon","aria-hidden":!0,children:(0,L.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,L.jsx)("path",{d:"M18 22H4a2 2 0 0 1-2-2V6M22 13l-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18M14 8a2 2 0 1 1-4 0a2 2 0 1 1 4 0ZM8 2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Z"})})}),(0,L.jsx)("p",{className:"wi-nft-empty-title",children:"No NFTs yet"}),(0,L.jsx)("p",{className:"wi-nft-empty-desc",children:"NFTs you own will appear here."})]}):(0,L.jsx)("div",{className:"wi-token-list",children:o.map(d=>(0,L.jsxs)("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>r(d),"aria-label":`View ${d.name} NFTs`,"data-track":"nft_collection","data-track-id":d.contract,children:[(0,L.jsxs)("div",{className:"wi-token-left",children:[(0,L.jsx)(Wx,{collection:d}),(0,L.jsxs)("div",{className:"wi-token-info",children:[(0,L.jsx)("span",{className:"wi-token-name",children:d.name}),(0,L.jsx)("div",{className:"wi-token-price-row",children:(0,L.jsx)("span",{className:"wi-token-price",children:Mg[d.standard]})})]})]}),(0,L.jsx)("div",{className:"wi-token-right",children:(0,L.jsx)("span",{className:"wi-token-balance","data-nft-count":!0,children:d.items.length})})]},d.contract))})}function Dg({title:e,onBack:t,onClose:n}){return(0,L.jsxs)("div",{className:"wi-sticky-header",children:[(0,L.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,L.jsx)("button",{type:"button",className:"wi-header-back",onClick:t,"aria-label":"Back",children:(0,L.jsx)(En,{size:24})}),(0,L.jsx)("span",{className:"wi-td-header-title",children:(0,L.jsx)("span",{className:"wi-td-header-name wi-nft-header-name",children:e})}),(0,L.jsx)("button",{type:"button",className:"wi-header-action",onClick:n,"aria-label":"Close","data-wi-close":!0,children:(0,L.jsx)(vn,{size:24})})]}),(0,L.jsx)("hr",{className:"wi-divider"})]})}function Gx({item:e,onSelect:t}){let{data:n}=Es(e.tokenUri),r=Dd(e.tokenId,n?.name);return(0,L.jsxs)("button",{type:"button",className:"wi-nft-card",onClick:()=>t(e),"aria-label":`View ${r}`,"data-track":"nft_detail","data-track-id":`${e.contract}:${e.tokenId}`,children:[(0,L.jsxs)("span",{className:"wi-nft-card-media",children:[(0,L.jsx)(Bd,{src:n?.image??null,alt:r}),e.standard==="ERC1155"&&e.quantity>1n&&(0,L.jsxs)("span",{className:"wi-nft-card-qty",children:["\xD7",Pd(e.quantity)]})]}),(0,L.jsx)("span",{className:"wi-nft-card-name",children:r}),n?.name&&(0,L.jsx)("span",{className:"wi-nft-card-id",children:Rg(e.tokenId)})]})}function Pg({collection:e,onBack:t,onClose:n,onSelectNft:r}){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Dg,{title:e.name,onBack:t,onClose:n}),(0,L.jsx)("div",{className:"wi-td-scroll","data-vaul-no-drag":!0,children:(0,L.jsx)("div",{className:"wi-nft-grid",children:e.items.map(o=>(0,L.jsx)(Gx,{item:o,onSelect:r},`${o.contract}:${o.tokenId}`))})})]})}function Hx({image:e,animationUrl:t,alt:n}){let[r,o]=_r.useState(!1);return Cg(t)&&!r?(0,L.jsx)("video",{className:"wi-nft-media wi-nft-detail-media",src:t,poster:e??void 0,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,onError:()=>o(!0),"aria-label":n}):(0,L.jsx)(Bd,{src:e,alt:n,className:"wi-nft-detail-media"})}function Og({env:e,item:t,onBack:n,onClose:r,onOutlink:o}){let{data:a,isLoading:i}=Es(t.tokenUri),{data:s}=Ag(e,t.contract,t.tokenId,!i&&!a),l=Dd(t.tokenId,a?.name??s?.name??null),d=a?.description??s?.description??null,p=a?.image??wo(s?.image_url),h=a?.attributes??[],u=At[e].cross,{chainInfo:g}=Di(e,u),y=Fr(u,e).name??g?.name??`Chain ${u}`,f=g?.explorer_url?.replace(/\/+$/,""),c=f?`${f}/token/${t.contract}/instance/${t.tokenId}`:null,[b,w]=_r.useState(!1),k=_r.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(t.contract).then(()=>{w(!0),setTimeout(()=>w(!1),1500)}).catch(()=>{})},[t.contract]),C=(N,T,R)=>jt(N,T,{category:"nft-detail",origin:R,payload:{contract:t.contract,tokenId:t.tokenId}},o);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Dg,{title:l,onBack:n,onClose:r}),(0,L.jsxs)("div",{className:"wi-td-scroll","data-vaul-no-drag":!0,children:[(0,L.jsx)("div",{className:"wi-nft-detail-hero",children:(0,L.jsx)(Hx,{image:p,animationUrl:a?.animationUrl??null,alt:l})}),(0,L.jsxs)("section",{className:"wi-td-section",children:[(0,L.jsxs)("div",{className:"wi-nft-detail-titles",children:[(0,L.jsx)("span",{className:"wi-nft-detail-collection",children:t.collectionName}),(0,L.jsx)("h3",{className:"wi-td-section-title wi-nft-detail-name",children:l})]}),d&&(0,L.jsx)("p",{className:"wi-nft-detail-desc",children:d})]}),(0,L.jsxs)("section",{className:"wi-td-section",children:[(0,L.jsx)("h3",{className:"wi-td-section-title",children:"Details"}),(0,L.jsxs)("div",{className:"wi-td-rows",children:[(0,L.jsxs)("div",{className:"wi-td-row",children:[(0,L.jsx)("span",{className:"wi-td-row-label",children:"Token ID"}),(0,L.jsx)("span",{className:"wi-td-row-value",children:t.tokenId})]}),(0,L.jsxs)("div",{className:"wi-td-row",children:[(0,L.jsx)("span",{className:"wi-td-row-label",children:"Token Standard"}),(0,L.jsx)("span",{className:"wi-td-row-value",children:Mg[t.standard]})]}),t.standard==="ERC1155"&&(0,L.jsxs)("div",{className:"wi-td-row",children:[(0,L.jsx)("span",{className:"wi-td-row-label",children:"Quantity"}),(0,L.jsx)("span",{className:"wi-td-row-value",children:Pd(t.quantity)})]}),(0,L.jsxs)("div",{className:"wi-td-row",children:[(0,L.jsx)("span",{className:"wi-td-row-label",children:"Network"}),f?(0,L.jsxs)("a",{className:"wi-td-row-value wi-td-row-link",href:f,target:"_blank",rel:"noopener noreferrer",onClick:N=>C(N,f,"nft-network"),children:[(0,L.jsx)("span",{children:y}),(0,L.jsx)(ua,{className:"wi-td-external-icon"})]}):(0,L.jsx)("span",{className:"wi-td-row-value",children:y})]}),(0,L.jsxs)("div",{className:"wi-td-row",children:[(0,L.jsx)("span",{className:"wi-td-row-label",children:"Contract Address"}),(0,L.jsxs)("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:k,"aria-label":"Copy contract address",children:[(0,L.jsx)("span",{children:dn(t.contract)}),b?(0,L.jsx)(qn,{size:14}):(0,L.jsx)(Cr,{size:14})]})]})]})]}),h.length>0&&(0,L.jsxs)("section",{className:"wi-td-section",children:[(0,L.jsx)("h3",{className:"wi-td-section-title",children:"Attributes"}),(0,L.jsx)("div",{className:"wi-nft-attrs",children:h.map((N,T)=>(0,L.jsxs)("div",{className:"wi-nft-attr",children:[N.traitType&&(0,L.jsx)("span",{className:"wi-nft-attr-type",children:N.traitType}),(0,L.jsx)("span",{className:"wi-nft-attr-value",children:N.value})]},`${N.traitType??""}-${T}`))})]}),c&&(0,L.jsxs)("a",{className:"wi-nft-explorer-btn",href:c,target:"_blank",rel:"noopener noreferrer",onClick:N=>C(N,c,"nft-explorer"),"data-track":"nft_explorer",children:[(0,L.jsx)("span",{children:"View on Explorer"}),(0,L.jsx)(ua,{className:"wi-td-external-icon"})]})]})]})}var Jn=H(require("react"),1);var Bg={dev:"https://dev.onechain.nexus/pop",stage:"https://stg.onechain.nexus/pop",production:"https://onechain.nexus/pop"};function Fg(e,t){let n=Bg[e]??Bg.production;return t==="send"?n:`${n}/${t}`}var zg={dev:"https://stg.onechain.nexus/gametoken/bridge",stage:"https://stg.onechain.nexus/gametoken/bridge",production:"https://www.onechain.nexus/gametoken/bridge"};function Ug(e){return zg[e]??zg.production}var K=require("react/jsx-runtime");function zd({size:e=20,className:t}){return(0,K.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,K.jsx)("path",{d:"M1.66675 7.91662C1.66677 6.98929 1.94808 6.08377 2.47353 5.31967C2.99898 4.55557 3.74385 3.96883 4.60976 3.63695C5.47567 3.30507 6.42188 3.24366 7.32343 3.46082C8.22497 3.67799 9.03944 4.16352 9.65925 4.85329C9.7029 4.89996 9.75568 4.93718 9.81431 4.96262C9.87294 4.98806 9.93617 5.00119 10.0001 5.00119C10.064 5.00119 10.1272 4.98806 10.1859 4.96262C10.2445 4.93718 10.2973 4.89996 10.3409 4.85329C10.9588 4.15904 11.7734 3.66943 12.6764 3.44962C13.5795 3.22982 14.528 3.29024 15.3958 3.62286C16.2636 3.95547 17.0096 4.5445 17.5343 5.31154C18.0591 6.07858 18.3378 6.98725 18.3334 7.91662C18.3334 9.82495 17.0834 11.25 15.8334 12.5L11.2567 16.9275C11.1015 17.1058 10.91 17.249 10.6951 17.3477C10.4802 17.4464 10.2468 17.4982 10.0103 17.4997C9.77386 17.5012 9.53979 17.4523 9.32365 17.3564C9.10752 17.2605 8.91427 17.1196 8.75675 16.9433L4.16675 12.5C2.91675 11.25 1.66675 9.83329 1.66675 7.91662Z",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),(0,K.jsx)("path",{d:"M8.84839 8.28833H10V13.4938",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})]})}function jg({size:e=24,className:t}){return(0,K.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,K.jsx)("path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"}),(0,K.jsx)("path",{d:"m21.854 2.147-10.94 10.939",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Wg({size:e=24,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsxs)("g",{stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("path",{d:"M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17"}),(0,K.jsx)("path",{d:"m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9"}),(0,K.jsx)("path",{d:"m2 16 6 6"}),(0,K.jsx)("circle",{cx:"16",cy:"9",r:"2.9"}),(0,K.jsx)("circle",{cx:"6",cy:"5",r:"3"})]})})}function Gg({size:e=24,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsxs)("g",{stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("path",{d:"M15 12h-5M15 8h-5"}),(0,K.jsx)("path",{d:"M19 17V5a2 2 0 0 0-2-2H4"}),(0,K.jsx)("path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"})]})})}function La({size:e=12,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsx)("path",{d:"m9 18 6-6-6-6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Hg({size:e=20,className:t}){return(0,K.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,K.jsx)("rect",{width:"20",height:"20",rx:"4.8",fill:"currentColor"}),(0,K.jsx)("path",{d:"M11.53 9.05 15.7 4.4h-.99l-3.62 4.04L8.2 4.4H4.86l4.37 6.1-4.37 4.87h.99l3.82-4.26 3.05 4.26h3.34zm-1.35 1.51-.44-.61-3.52-4.9h1.52l2.84 3.96.44.61 3.7 5.14h-1.52z",fill:"var(--wi-op-x-glyph, #ffffff)"})]})}function _g({size:e=20,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsxs)("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("circle",{cx:"9",cy:"7",r:"3.4"}),(0,K.jsx)("path",{d:"M2.6 20.4a6.4 6.4 0 0 1 10.2-5.15"}),(0,K.jsx)("circle",{cx:"17.5",cy:"17.5",r:"2.1"}),(0,K.jsx)("path",{d:"M19.6 17.5v1.05a1.55 1.55 0 0 0 3.1 0v-1.05a5.2 5.2 0 1 0-2.05 4.14"})]})})}function Vg({size:e=20,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsxs)("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("path",{d:"M12.5 3 5 13.5h5.5L10 21l7.5-10.5H12z"}),(0,K.jsx)("path",{d:"M20 4.5 21.5 3M20.5 8h2M17 2.5V1"})]})})}function Qg({size:e=20,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsxs)("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("rect",{x:"2.5",y:"5.5",width:"19",height:"13",rx:"2.5"}),(0,K.jsx)("path",{d:"M12 9v6"}),(0,K.jsx)("path",{d:"m9.5 12.5 2.5 2.5 2.5-2.5"})]})})}function qg({className:e}){return(0,K.jsxs)("svg",{width:"116",height:"24",viewBox:"0 0 116 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"ONEpop",className:e,children:[(0,K.jsx)("path",{d:"M38.1949 4.06787C33.7184 4.06787 30.085 7.69479 30.085 12.1647C30.085 16.6346 33.7184 20.2616 38.1949 20.2616C42.6713 20.2616 46.3048 16.6346 46.3048 12.1647C46.3048 7.69479 42.6713 4.06787 38.1949 4.06787ZM38.1949 16.6216C35.7312 16.6216 33.7315 14.6284 33.7315 12.1647C33.7315 9.70103 35.7312 7.70786 38.1949 7.70786C40.6586 7.70786 42.6583 9.70103 42.6583 12.1647C42.6583 14.6284 40.6586 16.6216 38.1949 16.6216Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M52.0033 4.81283C51.6438 4.40113 51.1537 4.11359 50.5721 4.11359C49.5657 4.11359 48.7554 4.93046 48.7554 5.93031V18.4513C48.7554 19.4577 49.5722 20.2681 50.5721 20.2681C51.5719 20.2681 52.3888 19.4512 52.3888 18.4513V10.7727L60.5837 19.5492C60.9431 19.9609 61.4332 20.2485 62.0148 20.2485C63.0212 20.2485 63.8316 19.4316 63.8316 18.4317C63.8316 17.9351 63.6094 17.5038 63.3153 17.1639L51.9967 4.81936L52.0033 4.81283Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M61.8643 12.3934C62.9034 12.3934 63.7398 11.5504 63.7398 10.5179V5.96953C63.7398 4.93047 62.8968 4.09399 61.8643 4.09399C60.8318 4.09399 59.9888 4.93701 59.9888 5.96953V10.5179C59.9888 11.5569 60.8318 12.3934 61.8643 12.3934Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M76.9017 7.74704C77.9081 7.74704 78.7249 6.93016 78.7249 5.93031C78.7249 4.93046 77.9081 4.11359 76.9017 4.11359H68.5108C67.5044 4.11359 66.6875 4.93046 66.6875 5.93031V18.4513C66.6875 19.4577 67.5044 20.2681 68.5108 20.2681H76.9017C77.9081 20.2681 78.7249 19.4512 78.7249 18.4513C78.7249 17.4515 77.9081 16.6346 76.9017 16.6346H70.3275V14.0075H76.2286C77.235 14.0075 78.0518 13.1907 78.0518 12.1908C78.0518 11.191 77.235 10.3741 76.2286 10.3741H70.3275V7.74704H76.9017Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M84.5951 23.1908C84.3206 23.1908 84.105 23.1124 83.9481 22.9555C83.7913 22.7987 83.7129 22.5765 83.7129 22.2889V10.7416C83.7129 10.441 83.7913 10.2188 83.9481 10.0751C84.105 9.91823 84.3206 9.83981 84.5951 9.83981C84.8827 9.83981 85.0983 9.91823 85.2421 10.0751C85.3989 10.2188 85.4773 10.441 85.4773 10.7416V12.5257L85.2617 12.1728C85.4708 11.4539 85.8825 10.8789 86.4968 10.4476C87.1111 10.0163 87.8495 9.8006 88.7122 9.8006C89.5617 9.8006 90.3002 10.0032 90.9275 10.4084C91.5549 10.8004 92.045 11.369 92.3979 12.114C92.7508 12.8459 92.9272 13.7216 92.9272 14.741C92.9272 15.7474 92.7508 16.6297 92.3979 17.3877C92.0581 18.1327 91.5679 18.7078 90.9275 19.1129C90.3002 19.505 89.5617 19.7011 88.7122 19.7011C87.8626 19.7011 87.1307 19.4854 86.5164 19.0541C85.9021 18.6228 85.4904 18.0543 85.2813 17.3485H85.4969V22.2889C85.4969 22.5765 85.4185 22.7987 85.2617 22.9555C85.1048 23.1124 84.8827 23.1908 84.5951 23.1908ZM88.3004 18.2895C88.8625 18.2895 89.3526 18.1523 89.7708 17.8778C90.2021 17.6034 90.5354 17.2047 90.7707 16.6819C91.0059 16.1591 91.1236 15.5122 91.1236 14.741C91.1236 13.5909 90.8687 12.7152 90.359 12.114C89.8492 11.5128 89.1631 11.2122 88.3004 11.2122C87.7254 11.2122 87.2222 11.3494 86.7909 11.6239C86.3726 11.8853 86.0459 12.2774 85.8106 12.8002C85.5884 13.323 85.4773 13.9699 85.4773 14.741C85.4773 15.8912 85.7322 16.7734 86.2419 17.3877C86.7517 17.9889 87.4378 18.2895 88.3004 18.2895Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M99.2775 19.7011C98.3365 19.7011 97.5196 19.4985 96.8269 19.0933C96.1342 18.6882 95.5983 18.1131 95.2193 17.3681C94.8403 16.6231 94.6508 15.7474 94.6508 14.741C94.6508 13.983 94.7553 13.3033 94.9644 12.7021C95.1866 12.0878 95.5003 11.565 95.9055 11.1337C96.3106 10.7024 96.7942 10.3757 97.3562 10.1535C97.9313 9.91823 98.5718 9.8006 99.2775 9.8006C100.219 9.8006 101.035 10.0032 101.728 10.4084C102.421 10.8135 102.957 11.3886 103.336 12.1336C103.715 12.8655 103.904 13.7347 103.904 14.741C103.904 15.4991 103.793 16.1853 103.571 16.7996C103.362 17.4139 103.055 17.9366 102.65 18.368C102.244 18.7993 101.754 19.1326 101.179 19.3678C100.617 19.59 99.9833 19.7011 99.2775 19.7011ZM99.2775 18.2895C99.8526 18.2895 100.349 18.1523 100.768 17.8778C101.199 17.6034 101.526 17.2047 101.748 16.6819C101.983 16.1591 102.101 15.5122 102.101 14.741C102.101 13.5909 101.846 12.7152 101.336 12.114C100.826 11.5128 100.14 11.2122 99.2775 11.2122C98.7155 11.2122 98.2189 11.3494 97.7876 11.6239C97.3693 11.8853 97.0426 12.2774 96.8073 12.8002C96.572 13.323 96.4544 13.9699 96.4544 14.741C96.4544 15.8912 96.7093 16.7734 97.219 17.3877C97.7418 17.9889 98.428 18.2895 99.2775 18.2895Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M107.072 23.1908C106.797 23.1908 106.582 23.1124 106.425 22.9555C106.268 22.7987 106.19 22.5765 106.19 22.2889V10.7416C106.19 10.441 106.268 10.2188 106.425 10.0751C106.582 9.91823 106.797 9.83981 107.072 9.83981C107.359 9.83981 107.575 9.91823 107.719 10.0751C107.876 10.2188 107.954 10.441 107.954 10.7416V12.5257L107.738 12.1728C107.948 11.4539 108.359 10.8789 108.974 10.4476C109.588 10.0163 110.326 9.8006 111.189 9.8006C112.038 9.8006 112.777 10.0032 113.404 10.4084C114.032 10.8004 114.522 11.369 114.875 12.114C115.228 12.8459 115.404 13.7216 115.404 14.741C115.404 15.7474 115.228 16.6297 114.875 17.3877C114.535 18.1327 114.045 18.7078 113.404 19.1129C112.777 19.505 112.038 19.7011 111.189 19.7011C110.339 19.7011 109.607 19.4854 108.993 19.0541C108.379 18.6228 107.967 18.0543 107.758 17.3485H107.974V22.2889C107.974 22.5765 107.895 22.7987 107.738 22.9555C107.582 23.1124 107.359 23.1908 107.072 23.1908ZM110.777 18.2895C111.339 18.2895 111.829 18.1523 112.248 17.8778C112.679 17.6034 113.012 17.2047 113.247 16.6819C113.483 16.1591 113.6 15.5122 113.6 14.741C113.6 13.5909 113.345 12.7152 112.836 12.114C112.326 11.5128 111.64 11.2122 110.777 11.2122C110.202 11.2122 109.699 11.3494 109.268 11.6239C108.849 11.8853 108.523 12.2774 108.287 12.8002C108.065 13.323 107.954 13.9699 107.954 14.741C107.954 15.8912 108.209 16.7734 108.719 17.3877C109.228 17.9889 109.915 18.2895 110.777 18.2895Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M14.7326 0.727918C12.9726 1.59329 11.6096 4.00482 11.0833 5.59357C9.88384 4.95085 7.89924 3.76837 5.7791 4.00482C3.25593 4.28622 1.16093 5.72223 0.333058 8.59505C-0.616745 11.891 0.425001 15.7904 3.97287 17.5788C7.25977 19.2357 10.3262 21.1047 11.8468 22.2197C13.3673 23.3348 14.6332 24.4164 15.5435 23.8398C17.1655 23.054 20.2401 19.6295 22.4534 16.1013C24.3507 13.0769 25.9439 7.65453 23.3488 3.26211C21.2608 -0.0620856 17.6891 -0.725834 14.7326 0.727918Z",fill:"url(#wi-op-logo-heart)"}),(0,K.jsx)("mask",{id:"wi-op-logo-mask",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"25",height:"24",children:(0,K.jsx)("path",{d:"M14.7326 0.727918C12.9726 1.59329 11.6096 4.00482 11.0833 5.59357C9.88384 4.95085 7.89924 3.76837 5.7791 4.00482C3.25593 4.28622 1.16093 5.72223 0.333058 8.59505C-0.616745 11.891 0.425001 15.7904 3.97287 17.5788C7.25977 19.2357 10.3262 21.1047 11.8468 22.2197C13.3673 23.3348 14.6332 24.4164 15.5435 23.8398C17.1655 23.054 20.2401 19.6295 22.4534 16.1013C24.3507 13.0769 25.9439 7.65453 23.3488 3.26211C21.2608 -0.0620856 17.6891 -0.725834 14.7326 0.727918Z",fill:"white"})}),(0,K.jsxs)("g",{mask:"url(#wi-op-logo-mask)",children:[(0,K.jsx)("path",{d:"M29.5305 -3.85553H-1.43018V24.7597H29.5305V-3.85553Z",fill:"url(#wi-op-logo-base)"}),(0,K.jsx)("path",{d:"M12.7993 24.7597H29.5372V1.58752L12.7993 13.5165V24.7597Z",fill:"url(#wi-op-logo-shine-r)"}),(0,K.jsx)("path",{d:"M12.8037 24.7598H-1.63916V2.94476L12.8037 13.5166V24.7598Z",fill:"url(#wi-op-logo-shine-l)"})]}),(0,K.jsx)("path",{d:"M13.4339 7.58409L9.79429 9.73601C9.1523 10.1136 8.92988 10.962 9.2989 11.6189C9.66791 12.2759 10.4969 12.5035 11.1389 12.1259L14.2174 10.305L12.7515 11.9138V18.2247C12.7515 18.9852 13.3581 19.6059 14.1012 19.6059C14.8442 19.6059 15.4508 18.9852 15.4508 18.2247V8.77903C15.4508 8.51521 15.37 8.25656 15.2689 8.08586C14.8897 7.43407 14.0708 7.20129 13.4288 7.57891L13.4339 7.58409Z",fill:"white"}),(0,K.jsxs)("defs",{children:[(0,K.jsxs)("linearGradient",{id:"wi-op-logo-heart",x1:"12.3679",y1:"-0.18782",x2:"12.3679",y2:"23.9797",gradientUnits:"userSpaceOnUse",children:[(0,K.jsx)("stop",{stopColor:"#F1603C"}),(0,K.jsx)("stop",{offset:"1",stopColor:"#EE2566"})]}),(0,K.jsxs)("linearGradient",{id:"wi-op-logo-base",x1:"-5.01624",y1:"-7.30565",x2:"28.6827",y2:"29.4172",gradientUnits:"userSpaceOnUse",children:[(0,K.jsx)("stop",{stopColor:"#F3752D"}),(0,K.jsx)("stop",{offset:"1",stopColor:"#EC1272"})]}),(0,K.jsxs)("linearGradient",{id:"wi-op-logo-shine-r",x1:"10.2312",y1:"2.71613",x2:"23.8708",y2:"13.2539",gradientUnits:"userSpaceOnUse",children:[(0,K.jsx)("stop",{stopColor:"white",stopOpacity:"0.5"}),(0,K.jsx)("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]}),(0,K.jsxs)("linearGradient",{id:"wi-op-logo-shine-l",x1:"24.1414",y1:"-2.87687",x2:"12.838",y2:"18.379",gradientUnits:"userSpaceOnUse",children:[(0,K.jsx)("stop",{stopColor:"white",stopOpacity:"0.5"}),(0,K.jsx)("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]})]})]})}var _x="data:image/webp;base64,UklGRiIfAABXRUJQVlA4WAoAAAAQAAAA9QAA1wAAQUxQSDQJAAABsMf/nzG31uyzu9lNurFtp7Zt27btHtuu3YPatnWM1A2q08bJJmmyu/P7XfSm+2Bm/rsnIiaA/JNAndnDLyQiJi4uNios0MfdIEJ699Dkhv2mLP10zdadu3dsXv7e/HFta0T6GIXG6B/fbPznp9Lz7FjViqzrG+Z1TA4wioolpvOru++WISLCf/8XICAiOh6feKtznEVEvNNG//AYEZFSCviSQBERH+8YmeQhGh415p4vRQQKAOhUAEC0HpmYWE0kTAmTzlUiUgCUFRDLDw8N14uCLqjHvnIECig/IOavauIhBua09x4hUkBlAuLvk0J1AuDT/Tggpajk4i9TjNwXNi8bAVDph9q68Z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mb+ylXAVZh/krFLuC7Ut7uDHtGuiDisDTlO+3/bQP0eH3DWK9n5/JZlbBt9YhJZd1r2yYqNlB/tZVI4EKQkr7qOlC60xl+gRhiolHBYUydO9a4i5+oeMpnPLGwTsCDx/HAmkYUs9yyTzdY4LQ9HBwJDDvPJ67WT/8o69iNhN5r6Pm/nz/XL6FN3HdgPOtkquE0weDfwxCeL1qJz+UNs953SM4sAVvJXTJgJtaDdn5jk26W6qWEeffbz7eFhHZSQT/5CcUc6kLTepaSfDjMMO13nc83Bp1gf9kmweID6+5MqNSxgHbv+z//3BrktV/Rl7DfiqPdxlkFinc/i09y+qlDycF6SDyMXIsRWi1IIvY4rojOw7PdSyYIzuQi1ul2IviqZrwjvgitwN/22Ogzpt6VUaERFfLjCSmwNIwt2hcaH3+ZB4sj7qP784wlWjexf/5iN8j6tHK6zzw4Q+QLcMcNksKjPFBaupKpIcBCUxs8o7wxVHzyRhdr/7JP7qiXejoFAtYPP/bcBCgAAAAAAAAAAA==";function Yg({className:e}){return(0,K.jsx)("svg",{width:"82",height:"72",viewBox:"0 0 82 72",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,className:e,children:(0,K.jsx)("image",{href:_x,width:"82",height:"72",preserveAspectRatio:"xMidYMid meet"})})}he(`.wi-op-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;display:flex;flex-direction:column;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .wi-op-scroll{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-op-scroll::-webkit-scrollbar{width:4px}.wi-op-scroll::-webkit-scrollbar-track{background:transparent}.wi-op-scroll::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}[data-theme=light] .wi-op-scroll::-webkit-scrollbar-thumb{background:#0000001f}.wi-op-header-title{position:absolute;left:50%;transform:translate(-50%);display:inline-flex;align-items:center;pointer-events:none}.wi-op-logo{display:block;flex-shrink:0;color:var(--ds-content-highest, #000000)}.wi-op-logo-img{height:24px;width:auto;object-fit:contain}.wi-op-hero{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:24px;flex-shrink:0}.wi-op-hero-copy{display:flex;flex-direction:column;gap:6px;min-width:0}.wi-op-hero-title{display:flex;flex-direction:column;margin:0;font-family:inherit;font-size:18px;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000)}.wi-op-hero-title-row{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap}.wi-op-x-badge{flex-shrink:0;color:var(--ds-content-highest, #000000)}[data-theme=light] .wi-op-x-badge{--wi-op-x-glyph: #ffffff}[data-theme=dark] .wi-op-x-badge{--wi-op-x-glyph: #1e232e}.wi-op-hero-sub{margin:0;font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-hero-art{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:120px;height:72px}.wi-op-hero-img{max-width:100%;max-height:72px;object-fit:contain}.wi-op-panel{display:flex;flex-direction:column;gap:8px;padding:0 24px;flex-shrink:0}.wi-op-balance-card{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa)}.wi-op-balance-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.wi-op-balance-label{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-op-balance-body{display:flex;align-items:center;gap:4px;min-width:0}.wi-op-balance-icon{width:24px;height:24px;border-radius:50%;object-fit:cover;flex-shrink:0}.wi-op-balance-value{font-family:inherit;font-size:28px;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-link-btn{appearance:none;display:inline-flex;align-items:center;gap:4px;padding:0;border:none;background:transparent;font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;flex-shrink:0;transition:color .15s ease}.wi-op-link-btn:hover:not(:disabled){color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-link-btn:disabled{cursor:default;opacity:.5}.wi-op-balance-head>[data-gou-mode=button]{display:contents}.wi-op-action-row{display:flex;align-items:stretch;gap:8px}.wi-op-action-card{appearance:none;display:flex;flex:1 1 0;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 8px;border:none;border-radius:10px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-align:center;cursor:pointer;transition:background-color .15s ease,transform .1s ease}.wi-op-action-card>svg{flex-shrink:0}.wi-op-action-card:hover:not(:disabled){background:#2e3544}[data-theme=light] .wi-op-action-card:hover:not(:disabled){background:#e4e8ef}.wi-op-action-card:active:not(:disabled){transform:scale(.95)}.wi-op-action-card:disabled{cursor:default;opacity:.45}.wi-op-cta-row{display:flex;flex-direction:column;gap:10px;padding:24px;flex-shrink:0}.wi-op-cta-skeleton{border-radius:10px}.wi-op-cta{appearance:none;display:flex;align-items:center;justify-content:center;width:100%;padding:12px 16px;border:none;border-radius:10px;font-family:inherit;font-size:16px;font-weight:600;line-height:1;cursor:pointer;transition:filter .15s ease,transform .1s ease,background-color .15s ease}.wi-op-cta:active:not(:disabled){transform:scale(.985)}.wi-op-cta:disabled{cursor:default;opacity:.5}.wi-op-cta--gradient{background:linear-gradient(193.7deg,#f62e61 16.1%,#f7564a 83.9%);color:#fff}.wi-op-cta--gradient:hover:not(:disabled){filter:brightness(1.05)}.wi-op-cta--purple{background:var(--ds-system-purple-high, #7346f3);color:var(--ds-system-purple-on, #ffffff)}.wi-op-cta--purple:hover:not(:disabled){filter:brightness(1.08)}.wi-op-cta--outline{background:transparent;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-cta--outline:hover:not(:disabled){background:var(--ds-surface-medium, #f5f7fa)}.wi-op-features{display:flex;flex-direction:column;padding:0 24px 8px;flex-shrink:0}.wi-op-feature{display:flex;align-items:center;gap:6px;padding:12px 0}.wi-op-feature+.wi-op-feature{border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-op-feature-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;flex-shrink:0;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-accent-primary-high, #7346f3)}.wi-op-feature-copy{display:flex;flex-direction:column;min-width:0}.wi-op-feature-title{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-feature-desc{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-activity{display:flex;flex-direction:column;gap:8px;padding:0 24px 8px;flex-shrink:0}.wi-op-activity-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.wi-op-activity-heading{display:flex;flex-direction:column;min-width:0}.wi-op-activity-title{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-activity-currency{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-activity-list{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}.wi-op-activity-item{display:flex;align-items:flex-start;gap:6px;padding:12px 0}.wi-op-activity-item+.wi-op-activity-item{border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-op-activity-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;overflow:hidden;flex-shrink:0;background:var(--ds-surface-medium, #f5f7fa)}.wi-op-activity-avatar img{width:100%;height:100%;object-fit:cover}.wi-op-activity-initial{font-family:inherit;font-size:13px;font-weight:600;line-height:1;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-op-activity-copy{display:flex;flex-direction:column;flex:1 1 0;min-width:0}.wi-op-activity-meta{display:flex;align-items:center;gap:6px;min-width:0}.wi-op-activity-peer{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-activity-sep{width:1px;height:14px;flex-shrink:0;background:var(--ds-border-medium, rgba(0, 0, 0, .18))}.wi-op-activity-time{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap;flex-shrink:0}.wi-op-activity-amount{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-badge{display:inline-flex;align-items:center;justify-content:center;padding:3px 6px;border-radius:4px;flex-shrink:0;font-family:inherit;font-size:12px;font-weight:500;line-height:1}.wi-op-badge--claimed{background:var(--ds-system-green-low, #e7f9f8);color:var(--ds-system-green-high, #00a0a2)}.wi-op-badge--waiting{background:var(--ds-accent-primary-low, #f5f3ff);color:var(--ds-accent-primary-high, #7346f3)}.wi-op-badge--refunded{background:var(--ds-system-red-low, #ffeeee);color:var(--ds-system-red-high, #d20609)}.wi-op-badge--ready{background:var(--ds-system-blue-low, #ecf8fc);color:var(--ds-system-blue-high, #008dca)}.wi-op-footer{display:flex;align-items:center;justify-content:center;padding:16px 24px;flex-shrink:0;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-drawer-content .wi-op-hero,.wi-drawer-content .wi-op-cta-row,.wi-drawer-content .wi-op-panel,.wi-drawer-content .wi-op-features,.wi-drawer-content .wi-op-activity,.wi-drawer-content .wi-op-footer{padding-left:16px;padding-right:16px}
|
|
12
|
+
`);var P=require("react/jsx-runtime"),Vx=6,Qx={claimed:"Claimed",waiting:"Waiting",refunded:"Refunded",ready:"Ready"};function Kg(e,t){let n;try{n=BigInt(e||"0")}catch{return"0.00"}let r=n<0n;r&&(n=-n);let o,a;if(t<=2){let i=10n**BigInt(t);o=n/i,a=n%i*10n**BigInt(2-t)}else{let i=n/10n**BigInt(t-2);o=i/100n,a=i%100n}return`${r?"-":""}${qx(o.toString())}.${a.toString().padStart(2,"0")}`}function qx(e){let t="";for(let n=0;n<e.length;n++){let r=e.length-n;n>0&&r%3===0&&(t+=","),t+=e[n]}return t}function Yx(e){if(!e)return"";let t=e<1e12?e*1e3:e,n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"just now";let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let o=Math.floor(r/60);if(o<24)return`${o}h ago`;let a=Math.floor(o/24);if(a<30)return`${a}d ago`;let i=Math.floor(a/30);return i<12?`${i}mo ago`:`${Math.floor(i/12)}y ago`}function Kx(e){let t=e.trim();return t?t.startsWith("@")?t:`@${t}`:""}function Da({env:e="production",balanceDisplay:t,balanceIconUrl:n,isBalanceLoading:r,summary:o,logoSrc:a,heroSrc:i,onBack:s,onClose:l,onSend:d,onClaim:p,onActivity:h,onRepliesSeen:u,onBoard:g,onGetToken:x,getTokenSlot:y}){let f=o?.activity??[],c=f.length>0,b=o?.claimableCount??0,w=o?.repliesWaitingCount??0,k=o?.isLoading??!1,C=o?.xConnected??!1,N=Jn.useCallback(M=>{window.open(Fg(e,M),"_blank","noopener,noreferrer")},[e]),T=Jn.useCallback(()=>d?d():N("send"),[d,N]),R=Jn.useCallback(()=>p?p():N("claim"),[p,N]),S=Jn.useCallback(()=>{if(u?.(),h)return h();N("activity")},[h,u,N]),E=Jn.useCallback(()=>g?g():N("board"),[g,N]),A=Jn.useCallback(()=>{if(x)return x();window.open(Ug(e),"_blank","noopener,noreferrer")},[x,e]),F=Jn.useMemo(()=>!o||b<=0?null:Kg(o.claimableTotalRaw,o.claimableDecimals??18),[o,b]),D=Jn.useMemo(()=>f.slice(0,Vx),[f]),G=Jn.useCallback(M=>{M.currentTarget.style.display="none"},[]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{className:"wi-sticky-header",children:[(0,P.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,P.jsx)("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:(0,P.jsx)(En,{size:24})}),(0,P.jsx)("span",{className:"wi-op-header-title",children:a?(0,P.jsx)("img",{src:a,alt:"ONEpop",className:"wi-op-logo-img",height:24,draggable:!1,onError:G}):(0,P.jsx)(qg,{className:"wi-op-logo"})}),(0,P.jsx)("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close","data-wi-close":!0,children:(0,P.jsx)(vn,{size:24})})]}),(0,P.jsx)("hr",{className:"wi-divider"})]}),(0,P.jsxs)("div",{className:"wi-op-scroll","data-vaul-no-drag":!0,children:[(0,P.jsxs)("section",{className:"wi-op-hero",children:[(0,P.jsxs)("div",{className:"wi-op-hero-copy",children:[(0,P.jsxs)("h2",{className:"wi-op-hero-title",children:[(0,P.jsx)("span",{children:"Send money with"}),(0,P.jsxs)("span",{className:"wi-op-hero-title-row",children:["just an",(0,P.jsx)(Hg,{size:20,className:"wi-op-x-badge"}),"@handle."]})]}),(0,P.jsx)("p",{className:"wi-op-hero-sub",children:"They don't even need a wallet yet."})]}),(0,P.jsx)("div",{className:"wi-op-hero-art","aria-hidden":!0,children:i?(0,P.jsx)("img",{src:i,alt:"",className:"wi-op-hero-img",draggable:!1,onError:G}):(0,P.jsx)(Yg,{})})]}),(0,P.jsxs)("section",{className:"wi-op-panel",children:[(0,P.jsxs)("div",{className:"wi-op-balance-card",children:[(0,P.jsxs)("div",{className:"wi-op-balance-head",children:[(0,P.jsx)("span",{className:"wi-op-balance-label",children:"Available"}),y??(0,P.jsxs)("button",{type:"button",className:"wi-op-link-btn",onClick:A,"data-track":"onepop_get_token",children:[(0,P.jsx)("span",{children:"Get ONEUSD"}),(0,P.jsx)(La,{size:12})]})]}),(0,P.jsx)("div",{className:"wi-op-balance-body",children:r?(0,P.jsx)("div",{className:"wi-skeleton-block",style:{width:140,height:32}}):(0,P.jsxs)(P.Fragment,{children:[n&&(0,P.jsx)("img",{src:n,alt:"","aria-hidden":!0,className:"wi-op-balance-icon",width:24,height:24,draggable:!1,onError:G}),(0,P.jsx)("span",{className:"wi-op-balance-value",children:t??"0.00"})]})})]}),(0,P.jsxs)("div",{className:"wi-op-action-row","aria-label":"ONEpop actions",children:[(0,P.jsxs)("button",{type:"button",className:"wi-op-action-card",onClick:T,"aria-label":"Send POP","data-track":"onepop_send",children:[(0,P.jsx)(jg,{size:24}),(0,P.jsx)("span",{children:"Send POP"})]}),(0,P.jsxs)("button",{type:"button",className:"wi-op-action-card",onClick:R,"aria-label":"Claim POPs","data-track":"onepop_claim",children:[(0,P.jsx)(Wg,{size:24}),(0,P.jsx)("span",{children:"Claim POPs"})]}),C&&(0,P.jsxs)("button",{type:"button",className:"wi-op-action-card",onClick:S,"aria-label":"Activity","data-track":"onepop_activity",children:[(0,P.jsx)(Gg,{size:24}),(0,P.jsx)("span",{children:"Activity"})]})]})]}),(0,P.jsx)("section",{className:"wi-op-cta-row",children:k?(0,P.jsx)("div",{className:"wi-skeleton-block wi-op-cta-skeleton",style:{height:40}}):(0,P.jsxs)(P.Fragment,{children:[!c&&b<=0&&(0,P.jsx)("button",{type:"button",className:"wi-op-cta wi-op-cta--gradient",onClick:T,"data-track":"onepop_send_first",children:"Send your first POP!"}),b>0?(0,P.jsx)("button",{type:"button",className:"wi-op-cta wi-op-cta--purple",onClick:R,"data-track":"onepop_claim_banner",children:`${b} POP${b===1?"":"s"} waiting to claim (total ${F})`}):!c&&(0,P.jsx)("button",{type:"button",className:"wi-op-cta wi-op-cta--purple",onClick:E,"data-track":"onepop_claim_maybe",children:"You might have POPs waiting"}),w>0&&(0,P.jsx)("button",{type:"button",className:"wi-op-cta wi-op-cta--outline",onClick:S,"data-track":"onepop_replies",children:`${w} ${w===1?"reply":"replies"} waiting`})]})}),c?(0,P.jsxs)("section",{className:"wi-op-activity",children:[(0,P.jsxs)("div",{className:"wi-op-activity-head",children:[(0,P.jsxs)("div",{className:"wi-op-activity-heading",children:[(0,P.jsx)("span",{className:"wi-op-activity-title",children:"Recent activity"}),(0,P.jsx)("span",{className:"wi-op-activity-currency",children:"Currency: ONEUSD"})]}),(0,P.jsxs)("button",{type:"button",className:"wi-op-link-btn",onClick:S,"data-track":"onepop_see_all_activity",children:[(0,P.jsx)("span",{children:"See all activity"}),(0,P.jsx)(La,{size:16})]})]}),(0,P.jsx)("ul",{className:"wi-op-activity-list",children:D.map(M=>(0,P.jsx)(Zx,{item:M},M.id))})]}):(0,P.jsxs)("section",{className:"wi-op-features",children:[(0,P.jsx)(Fd,{icon:(0,P.jsx)(_g,{size:20}),title:"No wallet address needed",desc:"just their @handle"}),(0,P.jsx)(Fd,{icon:(0,P.jsx)(Vg,{size:20}),title:"Claim instantly",desc:"social login, zero gas"}),(0,P.jsx)(Fd,{icon:(0,P.jsx)(Qg,{size:20}),title:"Refund anytime",desc:"get it back if unclaimed"})]})]}),(0,P.jsx)("div",{className:"wi-op-footer",children:(0,P.jsx)("span",{children:"Powered by ONEpop"})})]})}function Fd({icon:e,title:t,desc:n}){return(0,P.jsxs)("div",{className:"wi-op-feature",children:[(0,P.jsx)("span",{className:"wi-op-feature-icon","aria-hidden":!0,children:e}),(0,P.jsxs)("span",{className:"wi-op-feature-copy",children:[(0,P.jsx)("span",{className:"wi-op-feature-title",children:t}),(0,P.jsx)("span",{className:"wi-op-feature-desc",children:n})]})]})}function Zx({item:e}){let t=Kx(e.handle),n=e.direction==="sent"?`Sent to ${t}`:`Claimed from ${t}`,r=t.replace("@","").charAt(0).toUpperCase()||"?";return(0,P.jsxs)("li",{className:"wi-op-activity-item",children:[(0,P.jsx)("span",{className:"wi-op-activity-avatar","aria-hidden":!0,children:e.avatarUrl?(0,P.jsx)("img",{src:e.avatarUrl,alt:"",width:30,height:30,draggable:!1,onError:o=>{o.currentTarget.style.display="none"}}):(0,P.jsx)("span",{className:"wi-op-activity-initial",children:r})}),(0,P.jsxs)("span",{className:"wi-op-activity-copy",children:[(0,P.jsxs)("span",{className:"wi-op-activity-meta",children:[(0,P.jsx)("span",{className:"wi-op-activity-peer",children:n}),(0,P.jsx)("span",{className:"wi-op-activity-sep","aria-hidden":!0}),(0,P.jsx)("span",{className:"wi-op-activity-time",children:Yx(e.timestamp)})]}),(0,P.jsx)("span",{className:"wi-op-activity-amount",children:Kg(e.amountRaw,e.decimals)})]}),(0,P.jsx)("span",{className:Ie("wi-op-badge",`wi-op-badge--${e.status}`),"data-status":e.status,children:Qx[e.status]})]})}var Zg=H(require("react"),1);var Pa=require("react/jsx-runtime"),Ud=Zg.forwardRef(function({className:t,children:n,...r},o){return(0,Pa.jsxs)("button",{...r,ref:o,type:"button",className:"wi-op-link-btn","data-track":"onepop_get_token",children:[(0,Pa.jsx)("span",{children:"Get ONEUSD"}),(0,Pa.jsx)(La,{size:12})]})});var v=require("react/jsx-runtime"),Xg=["tokens","nfts"],Xx="On-ramp is not available in your region.";function Jx(e){if(typeof window>"u"||!e?.length)return!1;let{origin:t,pathname:n}=window.location,r=t+n;return e.some(o=>r===o||r.startsWith(`${o}/`))}function $x(e){let t=e.lastIndexOf(".");return t===-1?{main:e,decimal:""}:{main:e.slice(0,t),decimal:e.slice(t)}}function ev(e){let t=e.toLowerCase().replace(/^0x/,""),n=t.length>=8?t.slice(0,8):t.padEnd(8,"0"),r=parseInt(n.slice(0,4),16)%360,o=(r+60+parseInt(n.slice(4,8),16)%120)%360;return`linear-gradient(135deg, hsl(${r} 85% 65%), hsl(${o} 80% 55%))`}function tv(e,t=.5){let n=J.useRef(null),r=J.useRef(null),[o,a]=J.useState(1);return J.useLayoutEffect(()=>{let i=n.current,s=r.current;if(!i||!s)return;let l=()=>{let p=i.clientWidth;if(!p)return;let h=s.cloneNode(!0);h.style.setProperty("--wi-total-scale","1"),h.style.position="absolute",h.style.left="-9999px",h.style.top="-9999px",h.style.visibility="hidden",h.style.maxWidth="none",h.style.width="max-content",i.appendChild(h);let u=h.offsetWidth;i.removeChild(h);let g=u>p?Math.max(t,p/u):1;a(g)};l();let d=new ResizeObserver(l);return d.observe(i),()=>d.disconnect()},[e,t]),{containerRef:n,valueRef:r,scale:o}}function Ms({align:e="end",sideOffset:t=12,className:n,children:r}){let{presentation:o,env:a,theme:i,isMobile:s,open:l,drawerDirection:d,modal:p,showBalance:h,showForgeToken:u,showGameToken:g,showQR:x,showBridge:y,showNft:f,qrLogoSrc:c,walletAddress:b,accountName:w,sendAccounts:k,profileImageUrl:C,connectorName:N,preferredTokens:T,close:R,onSelectWallet:S,onCopyAddress:E,onBuy:A,onDisconnect:F,disconnectLabel:D,termsUrl:G,termsLabel:M,privacyUrl:j,privacyLabel:le,portalStyle:oe,navContent:ne,navPosition:Q,footerContent:ee,view:z,setView:q,selectedSendToken:ae,setSelectedSendToken:Z,selectedDetailToken:pe,setSelectedDetailToken:Se,selectedNftCollection:Ue,setSelectedNftCollection:fe,selectedNft:Re,setSelectedNft:Ce,showPortfolio:tt,showOnePop:Le,onePopSummary:$e,onOnePopOpen:wt,onOnePopSend:Ge,onOnePopClaim:Qe,onOnePopActivity:He,onOnePopRepliesSeen:Dt,onePopLogoSrc:tn,onePopGetTokenSlot:yt,onePopHeroSrc:Pt,portfolioTitle:Tt,portfolioSections:nn,showTotalAssets:It,totalAssetsLabel:ut,sendTransaction:Ot,getTransactionReceipt:rt,estimateGas:on,onOutlink:ft,lpBalanceReader:fn,stakingRewardsReader:Ze,bridgeTokens:lt,bridgeHistory:nt,getBridgeQuote:Et,getBridgeToTokens:Rt,getBridgeApproval:Xe,approveBridge:an,submitBridge:sn,onReceive:Yt,onSend:ln,onBuyDisabledMessage:V,onBridgeDisabledMessage:ve,onSendDisabledMessage:Ne}=Ur(),ze=o==="page",[ot,Kt]=J.useState();J.useEffect(()=>{Kt(qu()??(Lo()?$g.WALLET_LABELS.default:void 0))},[]);let Bt=w??N??ot??"Account",[Cn,Rn]=J.useState(null),O=J.useRef(void 0),De=J.useCallback(I=>{Rn(I),clearTimeout(O.current),O.current=setTimeout(()=>Rn(null),4e3)},[]);J.useEffect(()=>()=>clearTimeout(O.current),[]);let qe=!!V,re=J.useCallback(()=>{if(qe){De(V);return}let I=A?.();I&&typeof I.then=="function"&&I.catch(()=>{De(V??Xx)})},[qe,V,A,De]),Te=!!ve,U=!!Ne,{tokens:Oe,isLoading:$}=Tr(a,b,l&&h),{statsMap:Pe}=Ir(a,h),{aprPercent:In}=Nu(),{categoryMap:Xr,infoMap:rr}=Tu(a,h),or=h&&It,{displayValue:$o,isLowerBound:wl,isLoading:yl}=Au(a,b,l&&or),[Br,Jr]=J.useState(!1),oi=J.useRef(null),[$r,ai]=J.useState(0),{holdings:eo,isLoading:ii}=yu(a,b,l&&h&&u),xl=J.useMemo(()=>eo.map(I=>I.token),[eo]),{imageMap:Y}=xu(a,xl,u&&eo.length>0),xt=Ou(a),mt=J.useMemo(()=>Du({env:a,tokens:Oe,pinnedTokens:xt,preferredTokens:T,statsMap:Pe,categoryMap:Xr,showGameToken:g}),[Oe,a,Pe,g,Xr,xt,T]),Zt=J.useMemo(()=>{if(!u)return[];let I=new Set(Oe.map(ue=>ue.address.toLowerCase()));return[...eo].filter(ue=>!I.has(ue.token.toLowerCase())).sort((ue,at)=>{let Vn=kt(ue.value)??new jd.default(0);return(kt(at.value)??new jd.default(0)).minus(Vn).toNumber()})},[eo,u,Oe]),Ut=J.useRef(!1),[et,xn]=J.useState(null),_e=J.useRef(void 0),_n=et?.chainId??ae?.chainId??mt[0]?.chainId??0,{transactionUrl:zr}=fa(a,_n,et?.txHash,!!(et?.txHash&&_n)),vt=J.useCallback(I=>{Ut.current=!0,q(I)},[q]),[q0,vl]=J.useState("recipient"),ea=J.useCallback(()=>{Z(null),vl("recipient"),vt("wallet")},[Z,vt]),si=J.useCallback((I,ue="recipient")=>{if(U){De(Ne);return}vl(ue),Z(I),vt("send")},[U,Ne,De,Z,vt]),Y0=J.useCallback(I=>{Se(I),vt("token-detail")},[Se,vt]),K0=J.useCallback(()=>{wt?.(),vt("onepop")},[wt,vt]),Z0=J.useCallback(()=>{Se(null),vt("wallet")},[Se,vt]),[li,X0]=J.useState("tokens"),J0=f&&li==="nfts",{tabsRef:$0,indicatorStyle:yc,slide:kl,select:eb}=Wi(li,X0,Xg,[f,z]),tb=J.useCallback(I=>{fe(I),vt("nft-collection")},[fe,vt]),nb=J.useCallback(I=>{Ce(I),vt("nft-detail")},[Ce,vt]),rb=J.useCallback(()=>{Ce(null),vt("nft-collection")},[Ce,vt]),ob=J.useCallback(()=>{fe(null),vt("wallet")},[fe,vt]),ab=J.useCallback(I=>{si(I,"recipient")},[si]),di=Xt("apps.json",a,I=>Bn(I?.gametokenBridge,a)),xc=Xt("apps.json",a,I=>I?.gametokenSites),ib=J.useCallback(()=>{if(Te){De(ve);return}if(di){if(Jx(xc)){window.location.assign(di);return}window.open(di,"_blank","noopener,noreferrer")}},[Te,ve,di,xc,De]),sb=J.useCallback(I=>{clearTimeout(_e.current),Z(null),vt("wallet"),xn({status:"pending",txHash:I.txHash,chainId:I.chainId,description:`${I.amount} ${I.tokenSymbol} to ${dn(I.recipient)}`})},[Z,vt]),lb=J.useCallback(I=>{let ue=ae?.chainId;Z(null),vt("wallet"),!(!I||!ue)&&(xn(at=>({status:"success",txHash:I,chainId:ue,description:at?.txHash===I?at.description:"Tap to see your transaction"})),clearTimeout(_e.current),_e.current=setTimeout(()=>xn(null),5e3))},[ae?.chainId,Z,vt]),db=J.useCallback(I=>{let ue=I.txHash;ue&&(xn({status:"error",txHash:ue,chainId:I.chainId,description:I.message}),clearTimeout(_e.current),_e.current=setTimeout(()=>xn(null),5e3))},[]),ta=J.useMemo(()=>{if(Yt)return Yt;if(x)return()=>vt("qr")},[Yt,x,vt]),ci=J.useMemo(()=>{if(ln)return ln;if(mt.length===0)return;let I=mt[0];return()=>si(I,"token")},[ln,mt,si]),vc=J.useCallback(()=>{if(U){De(Ne);return}ci?.()},[U,Ne,ci,De]);J.useEffect(()=>{l||(Ut.current=!1,vl("recipient"))},[l]);let Cl=J.useRef(null);J.useEffect(()=>{let I=Cl.current;if(!I||!s)return;let ue=at=>{at.pointerType==="touch"&&at.stopPropagation()};return I.addEventListener("pointerdown",ue),()=>I.removeEventListener("pointerdown",ue)},[s]);let[Io,kc]=J.useState(!1),Rl=J.useRef(void 0),[na,ra]=J.useState(!1);J.useEffect(()=>{if(!na)return;let I=()=>ra(!1),ue=Vn=>{Vn.key==="Escape"&&ra(!1)},at=setTimeout(()=>{document.addEventListener("mousedown",I,!0),document.addEventListener("keydown",ue,!0)},0);return()=>{clearTimeout(at),document.removeEventListener("mousedown",I,!0),document.removeEventListener("keydown",ue,!0)}},[na]),J.useEffect(()=>{ra(!1)},[b]),J.useEffect(()=>()=>clearTimeout(Rl.current),[]),J.useEffect(()=>()=>clearTimeout(_e.current),[]),J.useEffect(()=>{let I=oi.current;if(!I||ee===null){ai(0);return}let ue=()=>{ai(I.offsetHeight)};if(ue(),typeof ResizeObserver>"u")return;let at=new ResizeObserver(ue);return at.observe(I),()=>at.disconnect()},[ee]);let Cc=J.useCallback(async()=>{if(!Io)try{await navigator.clipboard.writeText(b),kc(!0),clearTimeout(Rl.current),Rl.current=setTimeout(()=>kc(!1),2e3),E?.(b,!0)}catch{E?.(b,!1)}},[b,E,Io]),pi=J.useCallback(I=>{I.currentTarget.setAttribute("data-loaded","true")},[]),Rc=J.useMemo(()=>({background:ev(b)}),[b]),ui=J.useMemo(()=>C||Sr(a,b,{size:120,bg:i==="dark"?"1A1A2E":"F3F6F8"}),[C,a,b,i]),Nl=J.useMemo(()=>$x($o),[$o]),{containerRef:cb,valueRef:pb,scale:ub}=tv(Br?"\u2022\u2022\u2022\u2022\u2022\u2022":$o),Nc=G||j?(0,v.jsxs)("div",{className:"wi-legal-links",children:[G&&(0,v.jsx)("a",{className:"wi-legal-link",href:G,target:"_blank",rel:"noopener noreferrer","data-track":"terms_link",onClick:I=>jt(I,G,{category:"terms",origin:"terms"},ft),children:M}),G&&j&&(0,v.jsx)("span",{className:"wi-legal-sep","aria-hidden":!0,children:"\xB7"}),j&&(0,v.jsx)("a",{className:"wi-legal-link",href:j,target:"_blank",rel:"noopener noreferrer","data-track":"privacy_link",onClick:I=>jt(I,j,{category:"privacy",origin:"privacy"},ft),children:le})]}):null,Sc=F?(0,v.jsxs)("button",{type:"button",className:"wi-disconnect-btn","data-track":"disconnect",onClick:()=>{F(),R()},children:[(0,v.jsx)(hp,{size:16}),(0,v.jsx)("span",{className:"wi-disconnect-label",children:D})]}):null,fb=h&&!ne,Tc=!or,Ic=(0,v.jsxs)("button",{type:"button",className:Ie("wi-action-card",U&&"wi-action-card--dimmed"),onClick:vc,disabled:!U&&!ci,"aria-disabled":U||void 0,"aria-label":"Send","data-track":"send_open",children:[(0,v.jsx)(xp,{size:20}),(0,v.jsx)("span",{children:"Send"})]}),mb=fb?ze?Tc?(0,v.jsx)("div",{className:"wi-action-row","aria-label":"Wallet actions",children:Ic}):null:(0,v.jsxs)("div",{className:"wi-action-row","aria-label":"Wallet actions",children:[(0,v.jsxs)("button",{type:"button",className:Ie("wi-action-card",qe&&"wi-action-card--dimmed"),onClick:re,disabled:!A&&!qe,"aria-disabled":qe||void 0,"aria-label":"Buy","data-track":"buy",children:[(0,v.jsx)(Cp,{size:20}),(0,v.jsx)("span",{children:"Buy"})]}),y?(0,v.jsxs)("button",{type:"button",className:Ie("wi-action-card",Te&&"wi-action-card--dimmed"),onClick:ib,"aria-disabled":Te||void 0,"aria-label":"Bridge","data-track":"bridge_open",children:[(0,v.jsx)(Rp,{size:20}),(0,v.jsx)("span",{children:"Bridge"})]}):(0,v.jsxs)("button",{type:"button",className:"wi-action-card",onClick:ta,disabled:!ta,"aria-label":"Receive","data-track":"receive",children:[(0,v.jsx)(Ei,{size:20}),(0,v.jsx)("span",{children:"Receive"})]}),Tc&&Ic,Le&&(0,v.jsxs)("button",{type:"button",className:"wi-action-card",onClick:K0,"aria-label":"Open ONEpop","data-track":"onepop_open",children:[(0,v.jsx)(zd,{size:20}),(0,v.jsx)("span",{children:"ONEpop"})]}),tt?(0,v.jsxs)("button",{type:"button",className:"wi-action-card",onClick:()=>vt("portfolio"),"aria-label":"View portfolio","data-track":"portfolio_open",children:[(0,v.jsx)(kp,{size:20}),(0,v.jsx)("span",{children:"Portfolio"})]}):y?(0,v.jsxs)("button",{type:"button",className:"wi-action-card",onClick:ta,disabled:!ta,"aria-label":"Receive","data-track":"receive",children:[(0,v.jsx)(Ei,{size:20}),(0,v.jsx)("span",{children:"Receive"})]}):null]}):null,gb=(0,v.jsxs)("div",{className:Ie("wi-view-inner",Ut.current&&"wi-view-wallet"),children:[or&&(0,v.jsxs)("div",{className:"wi-total-section",children:[(0,v.jsxs)("div",{className:"wi-total-head",children:[(0,v.jsx)("span",{className:"wi-total-label",children:ut}),(0,v.jsx)("span",{role:"button",tabIndex:0,className:"wi-total-eye",onClick:I=>{I.stopPropagation(),Jr(ue=>!ue)},onKeyDown:I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),I.stopPropagation(),Jr(ue=>!ue))},"aria-label":Br?"Show balance":"Hide balance","data-track":"balance_toggle",children:Br?(0,v.jsx)(wp,{}):(0,v.jsx)(bp,{})})]}),(0,v.jsxs)("div",{className:"wi-total-body",children:[(0,v.jsx)("div",{className:"wi-total-value-wrap",ref:cb,children:yl?(0,v.jsx)("div",{className:"wi-skeleton-block wi-total-skeleton",style:{width:160,height:42}}):(0,v.jsx)("div",{className:"wi-total-value","data-hidden":Br||void 0,ref:pb,style:{"--wi-total-scale":ub},children:Br?(0,v.jsx)("span",{className:"wi-total-mask",children:"\u2022\u2022\u2022\u2022\u2022\u2022"}):(0,v.jsxs)(v.Fragment,{children:[wl&&(0,v.jsx)("span",{className:"wi-total-lte",children:"\u2264"}),(0,v.jsx)("span",{className:"wi-total-currency",children:"$"}),(0,v.jsx)("span",{className:"wi-total-amount",children:Nl.main}),Nl.decimal&&(0,v.jsx)("span",{className:"wi-total-decimal",children:Nl.decimal})]})})}),(0,v.jsx)("button",{type:"button",className:Ie("wi-total-send",U&&"wi-total-send--dimmed"),onClick:vc,disabled:!U&&!ci,"aria-disabled":U||void 0,"aria-label":"Send","data-track":"send_open",children:(0,v.jsx)(vp,{size:27})})]})]}),Q==="top"&&(ne?(0,v.jsx)("div",{className:"wi-nav-fixed",children:ne}):mb),f&&(0,v.jsxs)("div",{ref:$0,className:"wi-asset-tabs",role:"tablist","aria-label":"Assets",children:[Xg.map(I=>(0,v.jsx)("button",{type:"button",role:"tab",className:"wi-asset-tab","aria-selected":li===I,"data-active":li===I||void 0,onClick:()=>eb(I),"data-track":"asset_tab","data-track-id":I,children:I==="tokens"?"Tokens":"NFTs"},I)),yc&&(0,v.jsx)("span",{className:"wi-asset-tab-indicator","aria-hidden":!0,"data-animate":kl?!0:void 0,style:yc})]}),J0?(0,v.jsx)("div",{ref:Cl,className:"wi-scrollable-body","data-vaul-no-drag":!0,"data-tab-slide":kl??void 0,children:(0,v.jsx)(Lg,{env:a,walletAddress:b,active:l,onSelectCollection:tb})},"nfts"):h&&(0,v.jsx)("div",{ref:Cl,className:"wi-scrollable-body","data-vaul-no-drag":!0,"data-tab-slide":kl??void 0,children:(0,v.jsxs)("div",{className:"wi-token-list",children:[$&&Array.from({length:5},(I,ue)=>(0,v.jsxs)("div",{className:"wi-skeleton-item",children:[(0,v.jsxs)("div",{className:"wi-skeleton-left",children:[(0,v.jsx)("div",{className:"wi-skeleton-block wi-skeleton-icon"}),(0,v.jsxs)("div",{className:"wi-skeleton-lines",children:[(0,v.jsx)("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),(0,v.jsx)("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),(0,v.jsxs)("div",{className:"wi-skeleton-right",children:[(0,v.jsx)("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),(0,v.jsx)("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},ue)),!$&&mt.length===0&&!u&&(0,v.jsx)("div",{className:"wi-empty",children:"No Tokens Found"}),mt.map(I=>{let ue=Pe.get(ur(I.chainId,I.address)),at=ue?parseFloat(ue.percent_change_24h):null,Vn=at!==null&&at>=0,El=ga(a,I.chainId),Tb=ed(I.address);return(0,v.jsxs)("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>Y0(I),"aria-label":`View ${I.symbol} detail`,"data-track":"token_detail","data-track-id":I.symbol,children:[(0,v.jsxs)("div",{className:"wi-token-left",children:[(0,v.jsxs)("div",{className:"wi-token-icon-wrap",children:[(0,v.jsx)("img",{src:I.icon_url,alt:I.symbol,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:pi,onError:Al=>{Al.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),El&&(0,v.jsx)("img",{src:El,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:Al=>{Al.currentTarget.style.display="none"}})]}),(0,v.jsxs)("div",{className:"wi-token-info",children:[(0,v.jsxs)("span",{className:"wi-token-name-row",children:[(0,v.jsx)("span",{className:"wi-token-name",children:I.symbol}),Tb&&In!==null&&(0,v.jsx)("span",{className:"wi-token-apr",children:Xi(In)})]}),ue&&(0,v.jsxs)("div",{className:"wi-token-price-row",children:[(0,v.jsx)("span",{className:"wi-token-price",children:so(ue.price)}),(0,v.jsx)("span",{className:"wi-token-change","data-positive":Vn,"data-zero":at===0||void 0,children:at!==null&&(at===0?"0%":`${Vn?"+":"-"}${(Vn?Math.floor:Math.ceil)(Math.abs(at)*100)/100}%`)})]})]})]}),(0,v.jsxs)("div",{className:"wi-token-right",children:[(0,v.jsx)("span",{className:"wi-token-balance",children:Rr(I.quantity.numeric,I.quantity.decimals)}),ue&&(0,v.jsx)("span",{className:"wi-token-value",children:Ai(I.quantity.numeric,I.quantity.decimals,ue.price)})]})]},`${I.address}-${I.chainId}`)}),u&&ii&&Array.from({length:3},(I,ue)=>(0,v.jsxs)("div",{className:"wi-skeleton-item",children:[(0,v.jsxs)("div",{className:"wi-skeleton-left",children:[(0,v.jsx)("div",{className:"wi-skeleton-block wi-skeleton-icon"}),(0,v.jsxs)("div",{className:"wi-skeleton-lines",children:[(0,v.jsx)("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),(0,v.jsx)("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),(0,v.jsxs)("div",{className:"wi-skeleton-right",children:[(0,v.jsx)("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),(0,v.jsx)("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},`forge-sk-${ue}`)),u&&!ii&&!$&&mt.length===0&&Zt.length===0&&(0,v.jsx)("div",{className:"wi-empty",children:"No Tokens Found"}),u&&Zt.map(I=>{let ue=Y.get(I.token)||"",at=ga(a,At[a].cross);return(0,v.jsxs)("div",{className:"wi-token-item",children:[(0,v.jsxs)("div",{className:"wi-token-left",children:[(0,v.jsxs)("div",{className:"wi-token-icon-wrap",children:[(0,v.jsx)("img",{src:ue||"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:pi,onError:Vn=>{Vn.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),at&&(0,v.jsx)("img",{src:at,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:Vn=>{Vn.currentTarget.style.display="none"}})]}),(0,v.jsxs)("div",{className:"wi-token-info",children:[(0,v.jsx)("span",{className:"wi-token-name",children:I.token_name}),(0,v.jsx)("div",{className:"wi-token-price-row",children:(0,v.jsxs)("span",{className:"wi-token-price",children:[Rr(I.current_price,18)," CROSS"]})})]})]}),(0,v.jsxs)("div",{className:"wi-token-right",children:[(0,v.jsx)("span",{className:"wi-token-balance",children:Rr(I.balance,18)}),(0,v.jsx)("span",{className:"wi-token-value",children:so(I.current_value_usd)})]})]},`forge-${I.token}`)})]})},"tokens"),Q==="bottom"&&ne&&(0,v.jsx)("div",{className:"wi-nav-fixed",children:ne}),Sc&&(0,v.jsx)("div",{className:"wi-wallet-disconnect-row",children:Sc})]},"wallet"),hb=tt?(0,v.jsx)("div",{className:Ie("wi-view-inner wi-portfolio-body",Ut.current&&"wi-view-portfolio"),children:(0,v.jsx)(uo,{env:a,theme:i,walletAddress:b,showHeader:!1,onOutlink:ft,lpBalanceReader:fn,stakingRewardsReader:Ze,sendTransaction:Ot,estimateGas:on,sections:nn})},"portfolio"):null,bb=ae?(0,v.jsx)("div",{className:Ie("wi-view-inner wi-send-body",Ut.current&&"wi-view-send"),children:(0,v.jsx)(ha,{env:a,theme:i,walletAddress:b,accountName:Bt,accounts:k,initialStep:q0,token:ae,tokens:mt,onTokenChange:Z,sendTransaction:Ot,getTransactionReceipt:rt,estimateGas:on,getTokenPriceUsd:I=>{let ue=Pe.get(ur(I.chainId,I.address));if(!ue?.price)return;let at=parseFloat(ue.price);return Number.isFinite(at)?at:void 0},onClose:R,onBackToWallet:ea,onSubmitted:sb,onSuccess:lb,onFailed:db,onOutlink:ft})},"send"):null,wb=J.useMemo(()=>lt||mt.map(I=>{let ue=Pe.get(ur(I.chainId,I.address)),at=ue?.price?parseFloat(ue.price):void 0;return{name:I.name,symbol:I.symbol,chainId:I.chainId,address:I.address,decimals:I.quantity.decimals,balance:zo(I.quantity.numeric,I.quantity.decimals),iconUrl:I.icon_url,priceUsd:Number.isFinite(at)?at:void 0}}),[lt,Pe,mt]),yb=(0,v.jsx)("div",{className:Ie("wi-view-inner wi-bridge-body",Ut.current&&"wi-view-send"),children:(0,v.jsx)(go,{env:a,walletAddress:b,tokens:wb,history:nt,termsUrl:G,getQuote:Et,getToTokens:Rt,getApproval:Xe,approveBridge:an,submitBridge:sn,onClose:R,onBackToWallet:ea})},"bridge"),xb=pe?(0,v.jsx)("div",{className:Ie("wi-view-inner wi-token-detail-body",Ut.current&&"wi-view-send"),children:(0,v.jsx)(wg,{env:a,isMobile:s,token:pe,walletAddress:b,stat:Pe.get(ur(pe.chainId,pe.address)),tokenInfo:rr.get(Ji(pe.chainId,pe.address)),showBalance:h,onBack:Z0,onClose:R,onSend:ab,onOutlink:ft})},"token-detail"):null,vb=Ue?(0,v.jsx)("div",{className:Ie("wi-view-inner wi-token-detail-body",Ut.current&&"wi-view-send"),children:(0,v.jsx)(Pg,{collection:Ue,onBack:ob,onClose:R,onSelectNft:nb})},"nft-collection"):null,kb=Re?(0,v.jsx)("div",{className:Ie("wi-view-inner wi-token-detail-body",Ut.current&&"wi-view-send"),children:(0,v.jsx)(Og,{env:a,item:Re,onBack:rb,onClose:R,onOutlink:ft})},"nft-detail"):null,Eo=J.useMemo(()=>{let I=At[a].cross;return mt.find(ue=>ue.chainId===I&&ed(ue.address))??mt.find(ue=>ue.chainId===I&&ue.symbol.toUpperCase().includes("ONEUSD"))},[mt,a]),Cb=J.useMemo(()=>{if(Eo)return Rr(Eo.quantity.numeric,Eo.quantity.decimals)},[Eo]),Rb=Le?(0,v.jsx)("div",{className:Ie("wi-view-inner wi-onepop-body",Ut.current&&"wi-view-send"),children:(0,v.jsx)(Da,{env:a,balanceDisplay:Cb,balanceIconUrl:Eo?.icon_url,isBalanceLoading:$&&!Eo,summary:$e,logoSrc:tn,heroSrc:Pt,getTokenSlot:yt,onBack:ea,onClose:R,onSend:Ge,onClaim:Qe,onActivity:He,onRepliesSeen:Dt})},"onepop"):null,Sl=!!S&&w?.trim().toLowerCase()!=="my wallet",Ec=(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("span",{className:"wi-receive-avatar",children:[(0,v.jsx)("span",{className:"wi-avatar-fallback",style:Rc}),ui&&(0,v.jsx)("img",{src:ui,alt:"",className:"wi-avatar-img",width:24,height:24,draggable:!1,onLoad:pi,onError:I=>{I.currentTarget.style.display="none"}})]}),(0,v.jsx)("span",{className:"wi-receive-account-name",children:Bt}),Sl&&(0,v.jsx)("span",{className:"wi-receive-chevron","data-open":na,"aria-hidden":"true",children:(0,v.jsx)(zn,{size:16})})]}),Nb=(0,v.jsxs)("div",{className:Ie("wi-view-inner wi-qr-body",Ut.current&&"wi-view-qr"),children:[(0,v.jsxs)("div",{className:"wi-receive-section",children:[Sl?(0,v.jsx)("button",{type:"button",className:"wi-receive-account wi-receive-account--btn",onClick:()=>{ra(!0),S?.()},"aria-label":"Switch account",children:Ec}):(0,v.jsx)("div",{className:"wi-receive-account",children:Ec}),(0,v.jsxs)("div",{className:"wi-qr-block",children:[(0,v.jsxs)("div",{className:"wi-qr-box",children:[(0,v.jsx)(Jg.QRCodeSVG,{value:b,size:180,level:"H",marginSize:2,...c&&{imageSettings:{src:c,height:33,width:33,excavate:!0}}}),!c&&(0,v.jsx)("div",{className:"wi-qr-logo",children:(0,v.jsx)(yp,{size:33})})]}),(0,v.jsx)("p",{className:"wi-qr-address",children:b})]}),(0,v.jsxs)("button",{type:"button",className:"wi-qr-copy-btn",onClick:Cc,"data-track":"address_copy",children:[(0,v.jsx)("span",{className:"wi-qr-copy-icon",children:Io?(0,v.jsx)(qn,{size:16}):(0,v.jsx)(Cr,{size:16})}),(0,v.jsx)("span",{className:"wi-qr-copy-text",children:Io?"Copied!":"Copy address"})]})]}),Nc&&(0,v.jsx)("div",{className:"wi-receive-footer",children:Nc})]},"qr"),Sb=z==="qr"||z==="portfolio"||z==="send"||z==="bridge",Ac=ee!==null?(0,v.jsx)("div",{className:"wi-builtin-footer",children:ee}):null,Mc=(0,v.jsxs)("div",{className:"wi-account-text",children:[Sl?(0,v.jsxs)("button",{type:"button",className:"wi-account-row wi-account-row--btn",onClick:()=>{ra(!0),S?.()},"aria-label":"Switch account","aria-expanded":na,children:[(0,v.jsx)("span",{className:"wi-account-name",children:Bt}),(0,v.jsx)("span",{className:"wi-account-switch","data-open":na,"aria-hidden":"true",children:(0,v.jsx)(zn,{size:20})})]}):(0,v.jsx)("div",{className:"wi-account-row",children:(0,v.jsx)("span",{className:"wi-account-name",children:Bt})}),(0,v.jsxs)("button",{type:"button",className:"wi-address-row-btn",onClick:Cc,"aria-label":"Copy address","data-track":"address_copy",children:[(0,v.jsx)("span",{className:"wi-account-address",children:dn(b)}),(0,v.jsx)("span",{className:"wi-account-copy","data-copied":Io,children:Io?(0,v.jsx)(qn,{size:12}):(0,v.jsx)(Cr,{size:12})})]})]}),Tl=(0,v.jsxs)(v.Fragment,{children:[r,z==="qr"?(0,v.jsx)("div",{className:"wi-sticky-header",children:(0,v.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,v.jsx)("button",{type:"button",className:"wi-header-back",onClick:ea,"aria-label":"Back",children:(0,v.jsx)(En,{size:24})}),(0,v.jsx)("span",{className:"wi-receive-title",children:"Receive"}),(0,v.jsx)("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close","data-wi-close":!0,children:(0,v.jsx)(vn,{size:24})})]})}):z==="send"||z==="bridge"||z==="token-detail"||z==="onepop"||z==="nft-collection"||z==="nft-detail"?null:Sb?(0,v.jsxs)("div",{className:"wi-sticky-header",children:[(0,v.jsxs)("div",{className:"wi-header wi-header--wallet wi-header--sub-account",children:[(0,v.jsx)("button",{type:"button",className:"wi-header-back",onClick:ea,"aria-label":"Back",children:(0,v.jsx)(En,{size:24})}),(0,v.jsx)("div",{className:"wi-account-block wi-account-block--sub-account",children:Mc}),(0,v.jsx)("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close","data-wi-close":!0,children:(0,v.jsx)(vn,{size:24})})]}),(0,v.jsx)("hr",{className:"wi-divider"})]}):(0,v.jsxs)("div",{className:"wi-sticky-header",children:[(0,v.jsxs)("div",{className:"wi-header wi-header--wallet",children:[(0,v.jsxs)("div",{className:"wi-account-block",children:[(0,v.jsxs)("div",{className:"wi-avatar",children:[(0,v.jsx)("div",{className:"wi-avatar-fallback",style:Rc}),ui&&(0,v.jsx)("img",{src:ui,alt:"",className:"wi-avatar-img",width:28,height:28,draggable:!1,onLoad:pi,onError:I=>{I.currentTarget.style.display="none"}})]}),Mc]}),(0,v.jsxs)("div",{className:"wi-header-actions",children:[x&&(y||ze)&&(0,v.jsx)("button",{type:"button",className:"wi-header-action wi-header-action--qr",onClick:ta,"aria-label":"Show QR code","data-track":"receive",children:(0,v.jsx)(Ei,{size:20})}),(0,v.jsx)("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close","data-wi-close":!0,children:(0,v.jsx)(vn,{size:24})})]})]}),(0,v.jsx)("hr",{className:"wi-divider"})]}),(0,v.jsxs)("div",{className:"wi-view-container",children:[z==="wallet"&&gb,z==="qr"&&Nb,z==="portfolio"&&hb,z==="send"&&bb,z==="bridge"&&yb,z==="token-detail"&&xb,z==="onepop"&&Rb,z==="nft-collection"&&vb,z==="nft-detail"&&kb]}),(z==="wallet"||z==="onepop")&&Cn&&(0,v.jsx)("div",{className:"wi-action-toast",role:"status","aria-live":"polite",children:Cn}),z==="wallet"&&et&&(0,v.jsxs)("a",{className:"wi-send-toast",href:zr??"#",target:"_blank",rel:"noopener noreferrer",onClick:I=>{if(!zr){I.preventDefault();return}jt(I,zr,{category:"send",origin:"send-transaction",payload:{chainId:et.chainId,txHash:et.txHash}},ft)},children:[(0,v.jsx)("span",{className:"wi-send-toast-icon","data-status":et.status,"aria-hidden":!0,children:et.status==="pending"?(0,v.jsx)("span",{className:"wi-send-toast-spinner"}):et.status==="error"?(0,v.jsx)("span",{className:"wi-send-toast-error-dot"}):(0,v.jsx)(Np,{size:20})}),(0,v.jsxs)("span",{className:"wi-send-toast-copy",children:[(0,v.jsx)("span",{className:"wi-send-toast-title",children:et.status==="pending"?"Sending...":et.status==="error"?"Send failed":"Send complete"}),(0,v.jsx)("span",{className:"wi-send-toast-desc",children:et.status==="pending"||et.status==="error"?et.description:"Tap to see your transaction"})]})]}),Ac&&z!=="portfolio"&&z!=="send"&&z!=="token-detail"&&z!=="nft-collection"&&z!=="nft-detail"&&z!=="onepop"&&(0,v.jsx)("div",{className:"wi-sticky-footer",children:(0,v.jsx)("div",{className:"wi-footer",ref:oi,children:Ac})})]}),Il={...oe,...$r>0?{"--wi-footer-height":`${$r}px`}:null},Lc=J.useCallback(I=>{let ue=I.detail.originalEvent.target;ue instanceof Element&&ue.closest("[data-rd-shell]")!==null&&I.preventDefault()},[]);return ze?(0,v.jsx)(Me,{feature:"wallet_info",children:(0,v.jsxs)("div",{className:Ie("wi-drawer-content wi-page-content",n),"data-theme":i,style:Il,"data-no-balance":!h||void 0,"data-has-footer":$r>0||void 0,"data-view":z,children:[(0,v.jsx)("h1",{className:"wi-sr-only",children:"My Wallet"}),Tl]})}):s?(0,v.jsx)(Me,{feature:"wallet_info",children:(0,v.jsxs)(Oa.Drawer.Portal,{children:[p&&(0,v.jsx)(Oa.Drawer.Overlay,{className:"wi-drawer-overlay"}),(0,v.jsxs)(Oa.Drawer.Content,{className:Ie("wi-drawer-content",n),"data-theme":i,"data-vaul-no-drag":d==="left"||d==="right"?!0:void 0,style:Il,"data-direction":d,"data-no-balance":!h||void 0,"data-has-footer":$r>0||void 0,"data-view":z,onInteractOutside:Lc,children:[(0,v.jsx)(Oa.Drawer.Title,{className:"wi-sr-only",children:"My Wallet"}),Tl]})]})}):(0,v.jsxs)(Me,{feature:"wallet_info",children:[p&&l&&(0,v.jsx)("div",{className:"wi-drawer-overlay",onClick:R}),(0,v.jsx)(As.Portal,{children:(0,v.jsx)(As.Content,{align:e,sideOffset:t,className:Ie("wi-popover-content",n),"data-theme":i,style:Il,"data-no-balance":!h||void 0,"data-has-footer":$r>0||void 0,"data-view":z,onInteractOutside:Lc,children:Tl})})]})}var eh=H(require("react"),1);function th({position:e="top",children:t}){let{setNavContent:n,setNavPosition:r}=Ur();return eh.useEffect(()=>(n(t),r(e),()=>n(null)),[t,e,n,r]),null}var nh=H(require("react"),1);function rh({children:e}){let{setFooterContent:t}=Ur();return nh.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-accent-primary-high, #a392ff);--wi-send-solid-from: #ff4d85;--wi-send-solid-to: #ff7f55;--wi-secondary: var(--ds-system-red-default, #e70077);--wi-surface-bg: var(--ds-bg-default, #121212);--wi-surface-default: var(--ds-surface-medium, rgba(255, 255, 255, .05));--wi-surface-subtle: var(--ds-surface-high, rgba(255, 255, 255, .1));--wi-border-default: var(--ds-border-default, rgba(255, 255, 255, .05));--wi-border-subtle: var(--ds-border-medium, rgba(255, 255, 255, .1));--wi-texticon-primary: var(--ds-content-highest, #ffffff);--wi-texticon-secondary: var(--ds-content-medium, rgba(255, 255, 255, .7));--wi-texticon-tertiary: var(--ds-content-low, rgba(255, 255, 255, .5));--wi-on-primary: var(--ds-accent-primary-on, #ffffff);--wi-error: var(--ds-system-red-default, #e70077);--wi-shadow: 0 2px 16px -2px rgba(0, 0, 0, .4)}[data-theme=light].wi-popover-content,[data-theme=light].wi-drawer-content{--wi-primary: var(--ds-accent-primary-high, #7346f3);--wi-send-solid-from: #f62e61;--wi-send-solid-to: #f7564a;--wi-secondary: var(--ds-system-red-default, #e70077);--wi-surface-bg: var(--ds-bg-default, #ffffff);--wi-surface-default: var(--ds-surface-medium, rgba(18, 18, 18, .05));--wi-surface-subtle: var(--ds-surface-high, rgba(18, 18, 18, .1));--wi-border-default: var(--ds-border-default, rgba(18, 18, 18, .05));--wi-border-subtle: var(--ds-border-medium, rgba(18, 18, 18, .1));--wi-texticon-primary: var(--ds-content-highest, #121212);--wi-texticon-secondary: var(--ds-content-medium, rgba(18, 18, 18, .7));--wi-texticon-tertiary: var(--ds-content-low, rgba(18, 18, 18, .5));--wi-on-primary: var(--ds-accent-primary-on, #ffffff);--wi-error: var(--ds-system-red-default, #e70077);--wi-shadow: 0 2px 16px -2px rgba(0, 0, 0, .15)}
|
|
13
|
+
`);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}
|
|
14
|
+
`);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}}
|
|
15
|
+
`);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-drawer-content.wi-page-content{position:relative;inset:auto;z-index:auto;width:100%;max-width:480px;height:100dvh;max-height:none;margin:0 auto;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}.wi-page-content [data-wi-close]{visibility:hidden;pointer-events:none}.wi-page-content .wi-header-actions [data-wi-close]{display:none}.wi-sticky-header{flex-shrink:0;position:relative}.wi-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:24px}.wi-header--wallet{align-items:flex-start;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-header--wallet+.wi-divider{display:none}.wi-header--sub-account{align-items:center}.wi-header--sub-account .wi-header-back{width:32px;height:38px}.wi-header--sub-account .wi-header-action{flex-shrink:0}.wi-account-block{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.wi-account-block--sub-account{align-items:center}.wi-avatar{flex-shrink:0;position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border-radius:50%;background:var(--wi-surface-bg);box-sizing:border-box;overflow:hidden}.wi-avatar-fallback{position:absolute;inset:0;border-radius:50%;z-index:0}.wi-avatar-img{position:relative;z-index:1;width:32px;height:32px;border-radius:50%;object-fit:cover;background:transparent}.wi-account-text{display:flex;flex-direction:column;gap:2px;min-width:0}.wi-account-row{display:flex;align-items:center;gap:8px;min-width:0}.wi-account-row--btn{padding:2px;margin:0;width:fit-content;border:none;background:transparent;cursor:pointer;color:inherit;font:inherit;border-radius:6px;transition:background-color .15s ease,opacity .15s ease}.wi-account-row--btn:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .06))}.wi-account-row--btn:focus-visible{outline:2px solid var(--wi-primary, #7346f3);outline-offset:2px}.wi-account-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wi-account-switch{display:inline-flex;align-items:center;justify-content:center;padding:2px 0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));border-radius:4px;flex-shrink:0;transition:color .15s ease,transform .2s ease}.wi-account-switch[data-open=true]{transform:rotate(180deg)}.wi-account-row--btn:hover .wi-account-switch{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-address-row-btn{display:inline-flex;align-items:center;gap:4px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-medium, rgba(0, 0, 0, .65));font:inherit;text-align:left;min-width:0;transition:color .15s ease}.wi-address-row-btn:hover .wi-account-address,.wi-address-row-btn:hover .wi-account-copy{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-account-address{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wi-account-copy{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;color:var(--wi-texticon-tertiary);flex-shrink:0;transition:color .15s ease}.wi-account-copy[data-copied=true]{color:var(--ds-system-green-high, #00a869)}.wi-header-actions{display:flex;align-items:center;gap:16px;flex-shrink:0;margin-top:-4px}.wi-header-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;border-radius:0;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wi-header-action:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-header-action--qr{width:32px;height:32px;border-radius:8px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));transition:background-color .15s ease,color .15s ease}.wi-header-action--qr:hover{background:var(--ds-surface-high, rgba(0, 0, 0, .08));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-header--receive{align-items:center;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-header--receive .wi-header-action,.wi-header--sub-account .wi-header-action{position:absolute;top:24px;right:24px}.wi-receive-title{position:absolute;left:50%;transform:translate(-50%);font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);text-align:center;pointer-events:none}.wi-header-info{flex:1;display:flex;flex-direction:column;gap:8px;min-width:0}.wi-header-title{font-family:inherit;font-size:16px;font-weight:600;line-height:1.3;color:var(--wi-texticon-primary);margin:0}.wi-header-close{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;border:none;background:var(--wi-surface-default);border-radius:8px;cursor:pointer;color:var(--ds-content-low, #00000066);transition:opacity .15s ease}.wi-header-close:hover{opacity:.7}.wi-total-section{margin:24px 24px 0;padding:0;flex-shrink:0;display:flex;flex-direction:column;gap:8px;border:none;background:transparent;border-radius:12px;color:inherit;font:inherit;text-align:left;width:auto}.wi-action-row{display:flex;align-items:flex-start;gap:8px;width:auto;margin:24px 24px 0}.wi-action-card{appearance:none;display:flex;flex:1 1 0;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 8px;border:none;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-align:center;cursor:pointer;transition:background-color .15s ease,color .15s ease}.wi-action-card:hover:not(:disabled){background:#2e3544!important;color:var(--ds-content-high, rgba(0, 0, 0, .85))}:root[data-ds-theme=light] .wi-action-card:hover:not(:disabled){background:#e4e8ef!important;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-action-card:disabled{cursor:default}.wi-action-card>svg{flex-shrink:0}.wi-action-card:not(:disabled){transition:background-color .15s ease,transform .1s ease}.wi-action-card:active:not(:disabled){transform:scale(.93)}.wi-total-head{display:flex;align-items:center;gap:4px}.wi-total-body{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.wi-total-value-wrap{position:relative;flex:1 1 auto;min-width:0}.wi-total-send{appearance:none;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;flex-shrink:0;border:none;border-radius:9px;background:var(--ds-surface-medium, #f5f7fa);cursor:pointer;transition:background-color .15s ease,transform .38s cubic-bezier(.34,1.8,.64,1)}.wi-total-send:hover:not(:disabled){background:#2e3544;transform:scale(1.06)}:root[data-ds-theme=light] .wi-total-send:hover:not(:disabled){background:#e4e8ef}.wi-total-send:active:not(:disabled){transform:scale(.88);transition:background-color .15s ease,transform .08s ease-out}@media(prefers-reduced-motion:reduce){.wi-total-send,.wi-total-send:active:not(:disabled){transition:background-color .15s ease}.wi-total-send:hover:not(:disabled){transform:none}}.wi-total-send:disabled{cursor:default;opacity:.45}.wi-total-send--dimmed{opacity:.4;cursor:pointer}.wi-total-send--dimmed:hover{opacity:.5}.wi-total-label{font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-total-eye{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease;border-radius:4px}.wi-total-eye:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-total-eye:focus-visible{outline:1px solid var(--wi-texticon-secondary);outline-offset:2px}.wi-total-value{display:flex;align-items:baseline;gap:0;font-family:inherit;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000);font-variant-numeric:tabular-nums;min-height:45px;white-space:nowrap}.wi-total-currency,.wi-total-amount,.wi-total-decimal{font-size:calc(36px * var(--wi-total-scale, 1));color:var(--ds-content-highest, #000000)}.wi-total-lte{margin-right:2px;font-weight:500;font-size:calc(22px * var(--wi-total-scale, 1));color:var(--wi-texticon-secondary)}.wi-total-mask{letter-spacing:2px;font-size:calc(32px * var(--wi-total-scale, 1));color:var(--wi-texticon-secondary)}.wi-total-skeleton{border-radius:6px}.wi-scrollable-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:8px 0 0;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent;overscroll-behavior:contain}.wi-drawer-content .wi-scrollable-body{touch-action:pan-y}[data-theme=light] .wi-scrollable-body{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-scrollable-body::-webkit-scrollbar{width:4px}.wi-scrollable-body::-webkit-scrollbar-track{background:transparent}.wi-scrollable-body::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}.wi-scrollable-body::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .wi-scrollable-body::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .wi-scrollable-body::-webkit-scrollbar-thumb:hover{background:#0003}.wi-nav-fixed{flex-shrink:0;padding:0 24px}.wi-token-list{display:flex;flex-direction:column;gap:0;padding:8px 0}.wi-token-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 24px;border:none;background:transparent;text-align:left;font-family:inherit;width:100%;box-sizing:border-box}.wi-token-item--button{cursor:pointer;background:var(--ds-surface-default, #ffffff);transition:none}.wi-token-item--button:hover{background:#252b39!important}:root[data-ds-theme=light] .wi-token-item--button:hover{background:#eff3f8!important}button.wi-token-item:focus-visible{outline:2px solid var(--wi-primary);outline-offset:2px;border-radius:4px}.wi-token-left{display:flex;align-items:center;gap:16px;min-width:0}.wi-token-icon-wrap{position:relative;width:36px;height:36px;flex-shrink:0}.wi-token-icon{width:36px;height:36px;border-radius:0;object-fit:contain;opacity:0;transition:opacity .2s ease}.wi-token-icon[data-loaded=true]{opacity:1}.wi-token-chain-badge{position:absolute;right:0;bottom:0;width:14px;height:14px;border-radius:50%;background:var(--wi-surface-bg);box-shadow:0 0 0 1.5px var(--wi-surface-bg);object-fit:contain}.wi-token-info{display:flex;flex-direction:column;min-width:0}.wi-token-name-row{display:flex;align-items:center;gap:6px;min-width:0}.wi-token-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-token-apr{flex-shrink:0;font-family:inherit;font-size:12px;font-weight:600;line-height:1;color:var(--ds-system-purple-high, #9b78ff);background:var(--ds-system-purple-low, #2e2854);padding:4px;border-radius:6px;white-space:nowrap}.wi-token-price-row{display:flex;align-items:center;gap:8px}.wi-token-price{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wi-token-change{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;white-space:nowrap}.wi-token-change[data-positive=true]{color:var(--ds-system-green-high, #00a0a2)}.wi-token-change[data-positive=false]{color:var(--ds-system-red-high, #a80927)}.wi-token-change[data-zero]{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-token-right{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0}.wi-token-balance{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);white-space:nowrap}.wi-token-value{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wi-sticky-footer{flex-shrink:0}.wi-footer{padding:16px 24px 24px}.wi-builtin-footer{display:flex;flex-direction:column;gap:8px;align-items:stretch}.wi-wallet-disconnect-row{display:flex;justify-content:flex-end;flex-shrink:0;padding:16px 24px;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-send-toast{position:absolute;left:15px;right:15px;bottom:20px;z-index:2;display:flex;align-items:center;gap:12px;min-height:52px;padding:12px;border-radius:12px;background:var(--ds-surface-inverted, #1e232e);color:var(--ds-content-inverted, #ffffff);box-sizing:border-box;text-decoration:none}.wi-action-toast{position:absolute;left:15px;right:15px;bottom:20px;z-index:3;padding:12px 14px;border-radius:12px;background:var(--ds-surface-inverted, #1e232e);color:var(--ds-content-inverted, #ffffff);font-size:14px;line-height:1.4;text-align:center;box-sizing:border-box;animation:wi-action-toast-in .18s ease-out}.wi-popover-content:has(.wi-wallet-disconnect-row) .wi-action-toast,.wi-drawer-content:has(.wi-wallet-disconnect-row) .wi-action-toast{bottom:72px}@keyframes wi-action-toast-in{0%{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}.wi-action-card--dimmed{opacity:.4;cursor:pointer}.wi-action-card--dimmed:hover{opacity:.5}.wi-popover-content:has(.wi-wallet-disconnect-row) .wi-send-toast,.wi-drawer-content:has(.wi-wallet-disconnect-row) .wi-send-toast{bottom:72px}.wi-page-content .wi-action-toast,.wi-page-content .wi-send-toast{bottom:calc(20px + env(safe-area-inset-bottom,0px))}.wi-send-toast:hover{opacity:.92}.wi-send-toast-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;flex-shrink:0;color:var(--ds-accent-primary-high, #7346f3)}.wi-send-toast-spinner{width:18px;height:18px;border:2px solid color-mix(in srgb,var(--ds-accent-primary-on-inverted, #7e54f4) 22%,transparent);border-top-color:var(--ds-accent-primary-on-inverted, #7e54f4);border-radius:50%;animation:wi-send-toast-spin .8s linear infinite}.wi-send-toast-error-dot{width:18px;height:18px;border-radius:50%;background:var(--ds-system-red-default, #ff3358)}@keyframes wi-send-toast-spin{to{transform:rotate(360deg)}}.wi-send-toast-copy{display:flex;min-width:0;flex-direction:column}.wi-send-toast-title{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-inverted, #ffffff)}.wi-send-toast-desc{font-family:inherit;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-accent-primary-on-inverted, #7e54f4)}.wi-send-toast-icon[data-status=error]+.wi-send-toast-copy .wi-send-toast-desc{color:var(--ds-system-red-default, #ff3358)}.wi-disconnect-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:16px;padding:0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;cursor:pointer;transition:color .15s ease}.wi-disconnect-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-disconnect-label{white-space:nowrap}.wi-legal-links{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:100%;flex-shrink:0;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-receive-avatar .wi-avatar-fallback{position:absolute;inset:0;border-radius:50%;z-index:0}.wi-receive-avatar .wi-avatar-img{width:24px;height:24px}.wi-legal-link{color:var(--ds-content-low, rgba(0, 0, 0, .4));text-decoration:underline;text-underline-offset:2px;transition:color .15s ease}.wi-legal-link:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-legal-sep{color:inherit}.wi-empty{display:flex;align-items:center;justify-content:center;padding:32px 0;font-family:inherit;font-size:16px;color:var(--wi-texticon-secondary)}.wi-skeleton-item{display:flex;align-items:center;justify-content:space-between;padding:4px 0}.wi-skeleton-left{display:flex;align-items:center;gap:12px}.wi-skeleton-block{border-radius:6px;background:var(--wi-border-default);position:relative;overflow:hidden}.wi-skeleton-block:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.06) 50%,transparent 100%);animation:wi-shimmer 1.5s ease-in-out infinite}[data-theme=light] .wi-skeleton-block:after{background:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.04) 50%,transparent 100%)}.wi-skeleton-icon{width:32px;height:32px;border-radius:50%;flex-shrink:0}.wi-skeleton-lines{display:flex;flex-direction:column;gap:6px}.wi-skeleton-right{display:flex;flex-direction:column;align-items:flex-end;gap:6px}.wi-header-back{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wi-header-back:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-view-container{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.wi-popover-content[data-view=qr] .wi-view-container,.wi-drawer-content[data-view=qr] .wi-view-container{flex:1;min-height:0}.wi-view-inner{display:flex;flex-direction:column;flex:1;min-height:0}.wi-view-wallet{animation:wi-slide-in-left .25s ease-out}.wi-view-qr,.wi-view-portfolio{animation:wi-slide-in-right .25s ease-out}.wi-qr-body{flex:1;min-height:0;display:flex;flex-direction:column}.wi-portfolio-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.wi-portfolio-body>.wp-embed{flex:1;min-height:0}.wi-portfolio-body .wp-body-inner{padding:16px 16px 32px;gap:32px}.wi-receive-section{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:24px}.wi-receive-account{display:inline-flex;align-items:center;gap:8px;padding:4px 8px 4px 4px;border:0;background:var(--ds-surface-high, #edf1f2);border-radius:9999px;font-family:inherit;color:inherit}.wi-receive-account--btn{cursor:pointer;transition:none}.wi-receive-account--btn:hover{background:#2e3544}:root[data-ds-theme=light] .wi-receive-account--btn:hover{background:#e4e8ef}.wi-receive-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;overflow:hidden;flex-shrink:0}.wi-receive-account-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-receive-account>svg{color:var(--ds-content-medium, rgba(0, 0, 0, .65));flex-shrink:0}.wi-receive-chevron{display:inline-flex;align-items:center;color:var(--ds-content-medium, rgba(0, 0, 0, .65));flex-shrink:0;transition:transform .2s ease}.wi-receive-chevron[data-open=true]{transform:rotate(180deg)}.wi-qr-block{display:flex;flex-direction:column;align-items:center;gap:16px}.wi-qr-box{position:relative;display:flex;align-items:center;justify-content:center;padding:10px;background:#fff;border-radius:6px;overflow:hidden}.wi-qr-logo{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none}.wi-qr-address{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:16px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-align:center;word-break:break-all;max-width:281px;margin:0}.wi-qr-copy-btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:12px 16px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff);border-radius:12px;cursor:pointer;transition:border-color .15s ease}.wi-qr-copy-btn:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.wi-qr-copy-icon{display:inline-flex;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-qr-copy-text{font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-receive-footer{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:16px 24px;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-drawer-content .wi-header{padding:16px}.wi-drawer-content .wi-header--receive .wi-header-action,.wi-drawer-content .wi-header--sub-account .wi-header-action{top:16px;right:16px}.wi-drawer-content .wi-total-section,.wi-drawer-content .wi-action-row{margin:16px 16px 0}.wi-drawer-content .wi-nav-fixed{padding:0 16px}.wi-drawer-content .wi-token-item{padding:12px 16px}.wi-drawer-content .wi-wallet-disconnect-row{padding:16px}
|
|
16
|
+
`);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, #7346f3);transition:filter .15s ease}.wi-td-send-btn:hover{filter:brightness(1.06)}.wi-td-send-btn:active{filter:brightness(.94)}.wi-td-section{display:flex;flex-direction:column;gap:14px}.wi-td-section-title{margin:0;font-size:18px;font-weight:700;letter-spacing:-.01em;color:var(--wi-texticon-primary, #ffffff)}.wi-td-rows{display:flex;flex-direction:column;gap:12px}.wi-td-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.wi-td-row-label{font-size:15px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-row-value{font-size:15px;font-weight:500;color:var(--wi-texticon-primary, #ffffff);text-align:right;word-break:break-all}.wi-td-row-link,.wi-td-row-copy{display:inline-flex;align-items:center;gap:6px;border:none;background:transparent;padding:0;cursor:pointer;font-family:inherit;text-decoration:none}.wi-td-row-link:hover,.wi-td-row-copy:hover{opacity:.8}.wi-td-external-icon{color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));flex-shrink:0}.wi-td-row-copy svg{color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));flex-shrink:0}.wi-td-social-row{display:flex;flex-wrap:wrap;gap:10px}.wi-td-social-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;color:var(--wi-texticon-primary, #ffffff);background:var(--wi-surface-default, rgba(255, 255, 255, .05));text-decoration:none;transition:background .15s ease}.wi-td-social-btn:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-history-list{display:flex;flex-direction:column;gap:10px}.wi-td-history-item{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:12px;background:var(--wi-surface-default, rgba(255, 255, 255, .05));text-decoration:none}.wi-td-history-item--link{cursor:pointer;transition:background .15s ease}.wi-td-history-item--link:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-history-top,.wi-td-history-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px}.wi-td-history-type{font-size:15px;font-weight:600;color:var(--wi-texticon-primary, #ffffff)}.wi-td-history-type[data-direction=receive],.wi-td-history-type[data-direction=bridge-in]{color:var(--ds-system-green-high, #00a869)}.wi-td-history-counter{font-size:14px;color:var(--wi-primary, #7346f3);font-variant-numeric:tabular-nums}.wi-td-history-meta{display:inline-flex;align-items:center;gap:8px;min-width:0}.wi-td-history-status{font-size:14px;font-weight:500}.wi-td-history-status[data-status=success]{color:var(--ds-system-green-high, #00a869)}.wi-td-history-status[data-status=fail]{color:var(--wi-error, #e70077)}.wi-td-history-time{font-size:14px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-history-amount{font-size:15px;font-weight:600;color:var(--wi-texticon-primary, #ffffff);text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.wi-td-history-amount[data-size=sm]{font-size:13px}.wi-td-history-amount[data-size=xs]{font-size:11px;white-space:normal;word-break:break-all}.wi-td-history-skeleton{display:flex;align-items:center;justify-content:space-between;padding:16px;border-radius:12px;background:var(--wi-surface-default, rgba(255, 255, 255, .05))}.wi-td-history-empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:28px 16px;border-radius:12px;background:var(--wi-surface-default, rgba(255, 255, 255, .05));color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));font-size:14px;text-align:center}.wi-td-retry-btn{padding:8px 18px;border:1px solid var(--wi-border-subtle, rgba(255, 255, 255, .1));border-radius:999px;background:transparent;color:var(--wi-texticon-primary, #ffffff);font-family:inherit;font-size:13px;font-weight:600;cursor:pointer}.wi-td-retry-btn:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-history-sentinel{display:flex;align-items:center;justify-content:center;min-height:32px}.wi-td-history-loading{font-size:13px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-loadmore-btn{align-self:center;margin-top:2px;padding:10px 24px;border:1px solid var(--wi-border-subtle, rgba(255, 255, 255, .1));border-radius:999px;background:transparent;color:var(--wi-texticon-primary, #ffffff);font-family:inherit;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s ease}.wi-td-loadmore-btn:hover:not(:disabled){background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-loadmore-btn:disabled{cursor:default;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}
|
|
17
|
+
`);he(`.wi-asset-tabs{position:relative;display:flex;gap:20px;padding:20px 24px 0;flex-shrink:0}.wi-drawer-content .wi-asset-tabs{padding:20px 16px 0}.wi-scrollable-body[data-tab-slide=from-right]{animation:wi-tab-slide-from-right .24s cubic-bezier(.22,1,.36,1)}.wi-scrollable-body[data-tab-slide=from-left]{animation:wi-tab-slide-from-left .24s cubic-bezier(.22,1,.36,1)}@keyframes wi-tab-slide-from-right{0%{opacity:0;transform:translate(32px)}to{opacity:1;transform:none}}@keyframes wi-tab-slide-from-left{0%{opacity:0;transform:translate(-32px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.wi-scrollable-body[data-tab-slide]{animation:none}.wi-asset-tab-indicator[data-animate]{transition:none}}.wi-asset-tab{position:relative;padding:10px 0 12px;border:none;background:transparent;cursor:pointer;font-family:inherit;font-size:16px;font-weight:600;color:var(--wi-texticon-tertiary);transition:color .15s ease}.wi-asset-tab[data-active]{color:var(--wi-texticon-primary)}.wi-asset-tab-indicator{position:absolute;left:0;bottom:0;height:3px;border-radius:3px;background:var(--wi-texticon-primary);pointer-events:none}.wi-asset-tab-indicator[data-animate]{transition:transform .24s cubic-bezier(.22,1,.36,1),width .24s cubic-bezier(.22,1,.36,1)}.wi-nft-media{display:block;width:100%;height:100%;object-fit:cover;background:var(--wi-surface-subtle)}.wi-nft-media--fallback{display:flex;align-items:center;justify-content:center;overflow:hidden}.wi-nft-media-fallback-icon{width:100%;height:100%;color:var(--wi-texticon-tertiary)}.wi-nft-thumb,.wi-nft-thumb-skeleton{width:40px;height:40px;border-radius:8px;flex-shrink:0;overflow:hidden}.wi-nft-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:48px 24px;text-align:center}.wi-nft-empty-icon{display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin-bottom:6px;border-radius:50%;background:var(--ds-surface-medium, var(--wi-surface-default));color:var(--wi-texticon-tertiary)}.wi-nft-empty-title{margin:0;font-size:15px;font-weight:600;line-height:1.3;color:var(--ds-content-high, var(--wi-texticon-primary))}.wi-nft-empty-desc{margin:0;font-size:13px;line-height:1.4;color:var(--wi-texticon-tertiary)}.wi-nft-state{display:flex;flex-direction:column;align-items:center;gap:12px;padding:32px 24px}.wi-nft-state-text{font-size:16px;color:var(--wi-texticon-secondary)}.wi-nft-retry{padding:10px 20px;border:1px solid var(--wi-border-default);border-radius:999px;background:transparent;cursor:pointer;font-family:inherit;font-size:14px;font-weight:600;color:var(--wi-texticon-primary)}.wi-nft-retry:disabled{opacity:.6;cursor:default}.wi-nft-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px}.wi-nft-card{display:flex;flex-direction:column;gap:6px;min-width:0;padding:0;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit}.wi-nft-card-media{position:relative;display:block;aspect-ratio:1 / 1;border-radius:12px;overflow:hidden;background:var(--wi-surface-subtle)}.wi-nft-card-media .wi-nft-media{object-fit:contain}.wi-nft-card:hover .wi-nft-card-media{filter:brightness(1.06)}.wi-nft-card-qty{position:absolute;right:6px;bottom:6px;padding:2px 6px;border-radius:999px;font-size:12px;font-weight:600;color:var(--wi-texticon-primary);background:var(--wi-surface-default)}.wi-nft-card-name,.wi-nft-card-id{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-nft-card-name{font-size:14px;font-weight:600;color:var(--wi-texticon-primary)}.wi-nft-card-id{font-size:12px;color:var(--wi-texticon-tertiary)}.wi-nft-header-name{display:block;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-nft-detail-hero{aspect-ratio:1 / 1;width:100%;border-radius:16px;overflow:hidden;background:var(--wi-surface-subtle);flex-shrink:0}.wi-nft-detail-media{object-fit:contain}.wi-nft-detail-titles{display:flex;flex-direction:column;gap:4px;min-width:0}.wi-nft-detail-collection{font-size:14px;color:var(--wi-texticon-tertiary)}.wi-nft-detail-name{word-break:break-word}.wi-nft-detail-desc{margin:0;font-size:15px;line-height:1.5;color:var(--wi-texticon-secondary);white-space:pre-line;word-break:break-word}.wi-nft-attrs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.wi-nft-attr{display:flex;flex-direction:column;gap:2px;min-width:0;padding:10px 12px;border-radius:12px;background:var(--wi-surface-subtle)}.wi-nft-attr-type{font-size:12px;color:var(--wi-texticon-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-nft-attr-value{font-size:14px;font-weight:600;color:var(--wi-texticon-primary);word-break:break-word}.wi-nft-explorer-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:14px 20px;border:1px solid var(--wi-border-default);border-radius:999px;font-size:15px;font-weight:600;color:var(--wi-texticon-primary);text-decoration:none;flex-shrink:0}.wi-nft-explorer-btn:hover{opacity:.85}
|
|
18
|
+
`);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}
|
|
19
|
+
`);var Ls=require("react/jsx-runtime");function nv({mobileBreakpoint:e=768,drawerDirection:t,modal:n,open:r,onOpenChange:o,children:a,...i}){let s=Po(`(max-width: ${e}px)`),l=t??(i.showBalance?"right":"bottom"),d=l==="left"||l==="right",p=r!==void 0,[h,u]=Ba.useState(!1),g=p?r:h,x=Ba.useCallback(c=>{p||u(c),o?.(c)},[p,o]),y=Ba.useCallback(()=>x(!1),[x]);Qn(g,y);let f=_i(i,{presentation:"overlay",open:g,isMobile:s,drawerDirection:l,modal:n??!1,close:y});return(0,Ls.jsx)(ca.Provider,{value:f,children:s?(0,Ls.jsx)(ah.Drawer.Root,{direction:l,open:g,onOpenChange:x,handleOnly:d,noBodyStyles:!0,repositionInputs:!1,children:a},"drawer"):(0,Ls.jsx)(oh.Root,{open:g,onOpenChange:x,children:a},"popover")})}var yo=Object.assign(nv,{Trigger:pu,Content:Ms,Nav:th,Footer:rh});var ih=H(require("react"),1);var Wd=require("react/jsx-runtime");function Gd({className:e,children:t,...n}){let r=_i({...n,onDisconnect:void 0,onBuy:void 0,onBuyDisabledMessage:void 0,showBridge:!1,onBridgeDisabledMessage:void 0,showOnePop:!1,showPortfolio:!1,showNft:n.showNft??!0},{presentation:"page",open:!0,isMobile:!0,drawerDirection:"bottom",modal:!1});Qn(r.view!=="wallet",r.close);let{setView:o}=r,a=ih.useCallback(()=>o("nft-collection"),[o]);return Qn(r.view==="nft-detail",a),(0,Wd.jsx)(ca.Provider,{value:r,children:(0,Wd.jsx)(Ms,{className:e,children:t})})}var Ke=H(require("react"),1);var el=H(require("react"),1);var Ds=require("react"),Hd=(0,Ds.createContext)(null);function za(){let e=(0,Ds.useContext)(Hd);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}var Bh=H(require("react"),1);var Ps=require("react"),Os=(0,Ps.createContext)(null);function $n(){let e=(0,Ps.useContext)(Os);if(!e)throw new Error("ResponsiveShell compound components must be used within <ResponsiveShell>");return e}var Vr=require("react");function sh(){let e=null,t=new Set;return{getSnapshot:()=>e,publish(n){if(n!==e){e=n;for(let r of[...t])r()}},subscribe(n){return t.add(n),()=>{t.delete(n)}}}}var _d=(0,Vr.createContext)(null);function rv(){let e=(0,Vr.useContext)(_d);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}function lh(){let e=rv(),[t,n]=(0,Vr.useState)(e.getSnapshot);return(0,Vr.useLayoutEffect)(()=>(n(e.getSnapshot()),e.subscribe(()=>n(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-accent-primary-high, #7346f3);--rd-accent-contrast: var(--ds-accent-primary-on, #ffffff);--rd-success: var(--ds-system-green-default, #1e9e6a);--rd-success-bg: var(--ds-system-green-low, #e6f7f0);--rd-warning: #b8860b;--rd-warning-bg: #fdf3d9;--rd-danger: var(--ds-system-red-default, #d1394a);--rd-danger-bg: var(--ds-system-red-low, #fbe8ea);--rd-radius: 14px;--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06));--rd-on-accent: #ffffff;width:100%;max-width:640px;box-sizing:border-box;margin:0 auto;display:flex;flex-direction:column;gap:1.25rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:var(--rd-bg);color:var(--rd-text);-webkit-font-smoothing:antialiased;color-scheme:light dark}.rd-root[data-theme=dark]{color-scheme:dark;--rd-bg: var(--ds-bg-default, #0f1117);--rd-surface: var(--ds-surface-default, #171923);--rd-surface-alt: var(--ds-surface-medium, #1e212c);--rd-border: var(--ds-border-default, #2a2d3a);--rd-text: var(--ds-content-highest, #eef0f6);--rd-text-muted: var(--ds-content-medium, #9498a8);--rd-accent: var(--ds-accent-primary-high, #a392ff);--rd-accent-contrast: var(--ds-accent-primary-on, #000000);--rd-success: var(--ds-system-green-default, #3fd68f);--rd-success-bg: var(--ds-system-green-low, #123626);--rd-warning: #e0b23c;--rd-warning-bg: #3a2f10;--rd-danger: var(--ds-system-red-default, #ff6b7a);--rd-danger-bg: var(--ds-system-red-low, #3a1418);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35))}.rd-root[data-theme=light]{color-scheme:light;--rd-bg: var(--ds-bg-dim, #f7f8fb);--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-text-muted: var(--ds-content-medium, #676b7a);--rd-accent: var(--ds-accent-primary-high, #7346f3);--rd-accent-contrast: var(--ds-accent-primary-on, #ffffff);--rd-success: var(--ds-system-green-default, #1e9e6a);--rd-success-bg: var(--ds-system-green-low, #e6f7f0);--rd-warning: #b8860b;--rd-warning-bg: #fdf3d9;--rd-danger: var(--ds-system-red-default, #d1394a);--rd-danger-bg: var(--ds-system-red-low, #fbe8ea);--rd-radius: 14px;--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06))}.rd-root *{box-sizing:border-box}.rd-card{background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:var(--rd-radius);box-shadow:var(--rd-shadow);padding:1.25rem;display:flex;flex-direction:column;gap:.9rem}.rd-card-header{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.rd-card-title{font-size:1rem;font-weight:650;margin:0}.rd-card-hint{font-size:.8rem;color:var(--rd-text-muted)}.rd-token-address{display:flex;flex-direction:column;gap:.1rem}.rd-token-address-addr{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.78rem;color:var(--rd-text);overflow-wrap:anywhere;user-select:all}.rd-token-address-meta{font-size:.72rem;color:var(--rd-text-muted)}.rd-field{display:flex;flex-direction:column;gap:.35rem}.rd-field-label{font-size:.69rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-root .rd-field-label-row{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.rd-root .rd-token-explorer-link{font-size:.75rem;font-weight:500;color:var(--rd-accent);text-decoration:none;white-space:nowrap}.rd-root .rd-token-explorer-link:hover{text-decoration:underline}.rd-field-row{display:grid;grid-template-columns:1fr 1fr;gap:.625rem}.rd-root select,.rd-root input[type=text],.rd-root input[type=number]{width:100%;padding:.6rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:16px;font-family:inherit}.rd-root select:focus,.rd-root input:focus{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-dropdown{position:relative;min-width:0}.rd-root .rd-dropdown-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.55rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:.9rem;font-family:inherit;font-weight:600;text-align:left;cursor:pointer}.rd-root .rd-static-target{display:flex;align-items:center;gap:.55rem;padding:.55rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:.9rem;font-weight:600;min-width:0;overflow-wrap:anywhere}.rd-root .rd-dropdown-trigger:disabled{cursor:not-allowed}.rd-dropdown-trigger:focus,.rd-dropdown-trigger:focus-visible{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-dropdown-trigger-content{display:flex;align-items:center;gap:.55rem;min-width:0}.rd-dropdown-trigger-label{display:flex;flex-direction:column;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.2}.rd-dropdown-trigger-sub{font-size:.66rem;font-weight:500;line-height:1.3;color:var(--rd-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-dropdown-chevron{display:inline-flex;flex:none;color:var(--rd-text-muted);line-height:1}.rd-dropdown-popover{z-index:100002;width:var(--radix-popover-trigger-width);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-accent: var(--ds-system-orange-default, #5b5bf6);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06))}.rd-dropdown-popover[data-theme=dark]{color-scheme:dark;--rd-surface: var(--ds-surface-default, #171923);--rd-surface-alt: var(--ds-surface-medium, #1e212c);--rd-border: var(--ds-border-default, #2a2d3a);--rd-text: var(--ds-content-highest, #eef0f6);--rd-accent: var(--ds-system-orange-default, #8181ff);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35))}.rd-dropdown-popover *{box-sizing:border-box}.rd-dropdown-listbox{margin:0;padding:.3rem;list-style:none;max-height:min(15rem,var(--radix-popover-content-available-height, 15rem));overflow-y:auto;overscroll-behavior:contain;background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:10px;box-shadow:var(--rd-shadow);font-family:inherit;color:var(--rd-text)}.rd-dropdown-option{display:flex;align-items:center;gap:.55rem;padding:.5rem .6rem;border-radius:8px;font-size:.9rem;color:var(--rd-text);cursor:pointer}.rd-dropdown-option-active{background:var(--rd-surface-alt)}.rd-dropdown-option-selected{font-weight:650}.rd-dropdown-option-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-dropdown-option-check{flex:none;color:var(--rd-accent);font-size:.8rem}.rd-amount-input{display:flex;align-items:baseline;gap:.5rem;padding:.6rem .75rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt)}.rd-amount-input:focus-within{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-amount-input[data-rd-invalid]{border-color:var(--rd-danger)}.rd-root .rd-amount-input input[type=text]{flex:1 1 auto;width:auto;min-width:0;padding:0;border:0;border-radius:0;background:none;font-size:22px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.2}.rd-root .rd-amount-input input[type=text]:focus{outline:none}.rd-amount-input-suffix{flex:none;font-size:.8rem;font-weight:700;color:var(--rd-text-muted);pointer-events:none}.rd-root .rd-amount-input-max{flex:none;padding:0;font-size:.69rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--rd-accent);background:transparent;border:0;border-radius:0;cursor:pointer;line-height:1}.rd-amount-input-max:hover:not(:disabled){text-decoration:underline}.rd-amount-input-max:disabled{opacity:.5;cursor:not-allowed}.rd-amount-meta{display:flex;align-items:baseline;justify-content:space-between;gap:.75rem;font-size:.75rem;color:var(--rd-text-muted);padding:0 .15rem;font-variant-numeric:tabular-nums}.rd-root button{font-family:inherit;font-size:.95rem;font-weight:650;border-radius:10px;border:1px solid transparent;padding:.7rem 1.1rem;cursor:pointer;transition:opacity .12s ease,transform .12s ease}.rd-root button:active:not(:disabled){transform:translateY(1px)}.rd-root button:disabled{cursor:not-allowed;opacity:.55}.rd-button-primary{background:var(--rd-accent);color:var(--rd-accent-contrast)}.rd-button-secondary{background:var(--rd-surface-alt);color:var(--rd-text);border-color:var(--rd-border)}.rd-button-block{width:100%}.rd-callout{border-radius:10px;padding:.65rem .85rem;font-size:.85rem;line-height:1.4}.rd-callout-warning{background:var(--rd-warning-bg);color:var(--rd-warning)}.rd-callout-danger{background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-callout-success{background:var(--rd-success-bg);color:var(--rd-success)}.rd-callout-muted{background:var(--rd-surface-alt);color:var(--rd-text-muted)}.rd-quote-strip{display:flex;align-items:center;justify-content:space-between;gap:.625rem;padding:.7rem .85rem;border-radius:14px;background:color-mix(in srgb,var(--rd-accent) 10%,var(--rd-surface));border:1px solid color-mix(in srgb,var(--rd-accent) 35%,transparent)}.rd-quote-strip-side{display:flex;flex-direction:column;min-width:0;gap:.1rem;font-size:.9rem;font-weight:700;color:var(--rd-text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.rd-quote-strip-end{text-align:right;align-items:flex-end}.rd-quote-strip-side small{font-size:.69rem;font-weight:600;color:var(--rd-text-muted);letter-spacing:.02em}.rd-quote-strip-arrow{flex:none;color:var(--rd-accent);font-weight:800}.rd-quote-strip-hint{font-size:.72rem;line-height:1.45;color:var(--rd-text-muted);padding:0 .15rem}.rd-deposit-address{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr auto;align-items:start;gap:.7rem;min-height:172px;background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:16px;box-shadow:var(--rd-shadow);padding:.85rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px;color:var(--rd-text-muted)}.rd-deposit-address-label{grid-column:1;grid-row:1;position:relative;display:inline-flex;align-items:center;gap:.35rem;width:fit-content;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.rd-root button.rd-address-term{position:static;width:auto;height:auto;display:inline;padding:0 0 2px;border:0;border-bottom:1px dotted currentColor;border-radius:0;background:transparent;color:var(--rd-text-muted);font:700 .69rem/1 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;letter-spacing:.08em;text-transform:uppercase}.rd-root button.rd-address-term:hover,.rd-root button.rd-address-term:focus-visible{color:var(--rd-accent);outline:none}.rd-address-tooltip{position:absolute;z-index:20;top:calc(100% + 8px);left:0;width:min(250px,calc(100vw - 48px));padding:9px 11px;border:1px solid var(--rd-border);border-radius:10px;background:var(--rd-surface);box-shadow:var(--rd-shadow);color:var(--rd-text);font-size:11.5px;font-weight:500;line-height:1.45;letter-spacing:normal;text-align:left;text-transform:none;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-3px);transition:opacity .12s ease,transform .12s ease,visibility .12s ease}.rd-address-term:hover .rd-address-tooltip,.rd-address-term:focus .rd-address-tooltip,.rd-address-term:focus-visible .rd-address-tooltip{opacity:1;visibility:visible;transform:translateY(0)}.rd-address-full{grid-column:1 / -1;grid-row:2;align-self:center;min-width:0;color:var(--rd-text);font-weight:600;line-height:1.55;overflow-wrap:anywhere;word-break:break-all}.rd-root .rd-address-copy{grid-column:1 / -1;grid-row:3;width:100%;min-height:36px;display:inline-flex;align-items:center;justify-content:center;gap:.4rem;margin:0;padding:.5rem .7rem;border-radius:10px;border:0;background:var(--rd-accent);color:var(--rd-accent-contrast);font-family:inherit;font-size:.75rem;font-weight:800;letter-spacing:.03em;line-height:1}.rd-root .rd-address-copy svg{flex:none}.rd-root .rd-address-copy:hover:not(:disabled){opacity:.92}.rd-root button.rd-mobile-qr-toggle,.rd-root button.rd-mobile-address-toggle{display:none;place-items:center;width:34px;height:34px;padding:0;border:1px solid color-mix(in srgb,var(--rd-accent) 24%,var(--rd-border));border-radius:11px;background:color-mix(in srgb,var(--rd-accent) 10%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 1px 2px color-mix(in srgb,var(--rd-text) 8%,transparent);transition:transform .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}.rd-root button.rd-mobile-qr-toggle{grid-column:2;grid-row:1;justify-self:end;align-self:start}.rd-root button.rd-mobile-address-toggle{position:absolute;z-index:2;top:.85rem;right:.85rem;background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:0 4px 14px color-mix(in srgb,var(--rd-text) 16%,transparent)}.rd-root button.rd-mobile-qr-toggle:hover:not(:disabled),.rd-root button.rd-mobile-address-toggle:hover:not(:disabled){border-color:color-mix(in srgb,var(--rd-accent) 45%,var(--rd-border));color:var(--rd-accent);background:color-mix(in srgb,var(--rd-accent) 15%,var(--rd-surface));box-shadow:0 5px 16px color-mix(in srgb,var(--rd-accent) 18%,transparent);transform:translateY(-1px)}.rd-root button.rd-mobile-qr-toggle:active:not(:disabled),.rd-root button.rd-mobile-address-toggle:active:not(:disabled){transform:scale(.96)}.rd-deposit-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.9rem;container:rd-deposit-head / inline-size}.rd-deposit-head>.rd-deposit-qr-pane{flex:none}.rd-deposit-head>.rd-deposit-address{flex:1 1 12rem;min-width:0}@container rd-deposit-head (max-width: 23.75rem){.rd-deposit-head>.rd-deposit-address{flex-basis:100%;width:100%}.rd-deposit-head>.rd-skeleton-qr{display:none}.rd-deposit-head>.rd-skeleton-address{flex-basis:100%;width:100%}.rd-root button.rd-mobile-qr-toggle,.rd-root button.rd-mobile-address-toggle{display:grid}.rd-deposit-head[data-compact-view=address]>.rd-deposit-qr-pane,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-address{display:none}.rd-deposit-head[data-compact-view=address]>.rd-deposit-address,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane{animation:rd-compact-pane-in .26s cubic-bezier(.22,1,.36,1)}.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane{width:100%}}@keyframes rd-compact-pane-in{0%{opacity:0;transform:translateY(6px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}.rd-deposit-qr{position:relative;display:grid;place-items:center;width:172px;height:172px;background:#fff;border-radius:16px;border:1px solid var(--rd-border);box-shadow:var(--rd-shadow);margin:0 auto}.rd-deposit-qr-pane{position:relative;display:grid;place-items:center;min-height:172px}.rd-deposit-qr-badge{position:absolute;inset:0;margin:auto;width:36px;height:36px;display:grid;place-items:center;background:#fff;border-radius:50%;pointer-events:none}.rd-stepper{display:flex;flex-direction:column;gap:0}.rd-stepper-item{display:flex;gap:.75rem;position:relative;padding-bottom:1.25rem}.rd-stepper-item:last-child{padding-bottom:0}.rd-stepper-rail{display:flex;flex-direction:column;align-items:center}.rd-stepper-dot{width:22px;height:22px;border-radius:50%;border:2px solid var(--rd-border);background:var(--rd-surface);display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:700;flex:none;color:var(--rd-text-muted)}.rd-stepper-item-done .rd-stepper-dot{background:var(--rd-success);border-color:var(--rd-success);color:var(--rd-on-accent)}.rd-stepper-item-active .rd-stepper-dot{border-color:var(--rd-accent);color:var(--rd-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-accent) 20%,transparent)}.rd-stepper-line{flex:1;width:2px;background:var(--rd-border);margin:2px 0}.rd-stepper-item-done .rd-stepper-line{background:var(--rd-success)}.rd-stepper-body{padding-top:1px}.rd-stepper-label{font-weight:600;font-size:.9rem}.rd-stepper-item-pending .rd-stepper-label{color:var(--rd-text-muted)}.rd-stepper-meta{margin-top:.25rem;font-size:.78rem;color:var(--rd-text-muted);display:flex;flex-direction:column;gap:.15rem}.rd-stepper-meta a{color:var(--rd-accent);text-decoration:none}.rd-stepper-meta a:hover{text-decoration:underline}.rd-status-pill{display:inline-flex;align-items:center;gap:.35rem;font-size:.75rem;font-weight:650;padding:.2rem .55rem;border-radius:999px;background:var(--rd-surface-alt);color:var(--rd-text-muted);width:fit-content}.rd-status-pill-success{background:var(--rd-success-bg);color:var(--rd-success)}.rd-status-pill-failure{background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-spinner{display:inline-block;width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:rd-spin .7s linear infinite;vertical-align:-.15em}@keyframes rd-spin{to{transform:rotate(360deg)}}.rd-muted{color:var(--rd-text-muted)}.rd-settings-row{display:flex;justify-content:flex-end}.rd-root .rd-icon-button{position:relative;display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border-radius:50%;border:1px solid var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted)}.rd-root .rd-icon-button:hover:not(:disabled){color:var(--rd-text);background:var(--rd-surface-alt)}.rd-recovery-badge{position:absolute;top:-.3rem;right:-.3rem;display:flex;align-items:center;justify-content:center;min-width:1.05rem;height:1.05rem;padding:0 .25rem;border-radius:999px;background:var(--rd-danger, #d1394a);color:#fff;font-size:.65rem;font-weight:700;line-height:1;border:2px solid var(--rd-surface, #ffffff)}.rd-recover-group{display:flex;flex-direction:column;gap:.75rem}.rd-recover-group+.rd-recover-group{border-top:1px solid var(--rd-border);padding-top:1rem;margin-top:.5rem}.rd-recover-group-label{margin:0;font-size:.8rem;color:var(--rd-text-muted)}.rd-recover-made-of{display:block;padding:.65rem .8rem;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:10px}.rd-recover-made-of-label{cursor:pointer;font-size:.72rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-recover-made-of-body{display:flex;flex-direction:column;gap:.4rem;margin-top:.6rem}.rd-error-details{margin-top:-.4rem;padding:0 .15rem;color:var(--rd-text-muted);font-size:.72rem}.rd-error-details summary{width:max-content;cursor:pointer;list-style:none;font-weight:600}.rd-error-details summary::-webkit-details-marker{display:none}.rd-error-details summary:before{display:inline-block;margin-right:.35rem;content:"\\203a";transition:transform .12s ease}.rd-error-details[open] summary:before{transform:rotate(90deg)}.rd-error-log{position:relative;margin-top:.5rem}.rd-root button.rd-error-copy{position:absolute;z-index:1;top:.45rem;right:.45rem;display:inline-flex;align-items:center;justify-content:center;width:1.65rem;height:1.65rem;padding:0;border:1px solid var(--rd-border);border-radius:6px;background:var(--rd-surface);color:var(--rd-text-muted)}.rd-root button.rd-error-copy:hover:not(:disabled){background:var(--rd-surface-alt);color:var(--rd-text)}.rd-error-details code{display:block;max-height:6rem;overflow:auto;padding:.6rem 2.7rem .6rem .7rem;border:1px solid var(--rd-border);border-radius:8px;background:var(--rd-surface-alt);color:var(--rd-text-muted);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.68rem;line-height:1.45;overflow-wrap:anywhere;scrollbar-color:var(--rd-border) transparent;scrollbar-width:thin;white-space:pre-wrap}.rd-error-details code::-webkit-scrollbar{width:4px;height:4px}.rd-error-details code::-webkit-scrollbar-thumb{border-radius:999px;background:var(--rd-border)}.rd-token-list{display:flex;flex-direction:column;gap:.5rem}.rd-token-row{display:flex;align-items:center;gap:10px;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;padding:12px 14px}.rd-token-row-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;overflow-wrap:anywhere}.rd-token-row-symbol{font-weight:700}.rd-token-row-amount{font-variant-numeric:tabular-nums;font-size:14px;font-weight:700;color:var(--rd-text);white-space:nowrap}.rd-token-row-status{font-size:11.5px;line-height:1.45;color:var(--rd-text-muted)}.rd-token-row-warn{font-size:11.5px;line-height:1.45;color:var(--rd-warning)}.rd-token-row-warn b{font-weight:750;font-variant-numeric:tabular-nums}.rd-token-row-step{font-size:11.5px;line-height:1.45;font-weight:650;color:var(--rd-accent)}.rd-root .rd-token-row-action{flex:none;width:auto;padding:9px 16px;font-size:13px;font-weight:700}.rd-token-row-spinner{flex:none;font-size:18px;color:var(--rd-accent)}.rd-recover-sum{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;padding:16px 14px;container:rd-recover-sum / inline-size}.rd-recover-sum-label{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-recover-sum-value{max-width:100%;overflow:hidden;font-size:22px;font-size:clamp(18px,7cqi,28px);font-weight:800;line-height:1.15;font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap;color:var(--rd-text)}.rd-recover-sum-unit{display:block;margin:.35rem 0 0;font-size:15px;font-weight:700;color:var(--rd-text-muted)}.rd-recover-sum-empty{font-size:17px;font-weight:700;color:var(--rd-text-muted)}.rd-recover-empty{display:flex;min-height:min(20rem,48vh);flex:1 1 auto;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;padding:2.5rem 1.5rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 11%,transparent),transparent 48%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-recover-empty-icon{display:grid;width:4.25rem;height:4.25rem;place-items:center;margin-bottom:.2rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-recover-empty[data-variant=unavailable] .rd-recover-empty-icon{border-color:var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:none}.rd-recover-empty-title,.rd-recover-sum-value.rd-recover-empty-title{max-width:100%;margin:0;overflow:visible;color:var(--rd-text);font-size:1.15rem;font-weight:750;line-height:1.35;white-space:normal}.rd-recover-empty-copy{max-width:23rem;margin:0;color:var(--rd-text-muted);font-size:.82rem;line-height:1.55;text-wrap:balance}.rd-root button.rd-recover-empty-refresh{display:inline-flex;min-height:2.6rem;align-items:center;justify-content:center;gap:.45rem;margin-top:.45rem;padding:.65rem 1rem;color:var(--rd-text);font-size:.82rem}.rd-root button.rd-recover-empty-refresh:hover:not(:disabled){border-color:color-mix(in srgb,var(--rd-accent) 35%,var(--rd-border));background:color-mix(in srgb,var(--rd-accent) 9%,var(--rd-surface));color:var(--rd-accent)}[data-rd-recover-funds].rd-stack{flex:1 1 auto}.rd-recover-foot{margin-top:auto;padding-top:.5rem;text-align:center;font-size:11.5px;line-height:1.45;color:var(--rd-text-muted)}.rd-history-table{display:flex;min-width:0;flex-direction:column;gap:.6rem;font-size:.875rem}.rd-history-empty{display:flex;min-height:min(20rem,48vh);flex:1 1 auto;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;padding:2.5rem 1.5rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 10%,transparent),transparent 48%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-history-empty-icon{display:grid;width:4.25rem;height:4.25rem;place-items:center;margin-bottom:.2rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-history-empty[data-variant=disconnected] .rd-history-empty-icon{border-color:var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:none}.rd-history-empty-title{margin:0;color:var(--rd-text);font-size:1.15rem;font-weight:750;line-height:1.35}.rd-history-empty-copy{max-width:22rem;margin:0;color:var(--rd-text-muted);font-size:.82rem;line-height:1.55;text-wrap:balance}.rd-history-empty-live{display:inline-flex;align-items:center;gap:.4rem;margin-top:.35rem;color:var(--rd-text-muted);font-size:.72rem;font-weight:650}.rd-history-empty-live>span{width:.45rem;height:.45rem;border-radius:50%;background:var(--rd-success);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-success) 15%,transparent)}.rd-history-group{min-width:0;max-width:100%;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;overflow:hidden}.rd-history-row-button{width:100%;min-width:0;display:flex;flex-direction:column;gap:.75rem;padding:1rem;background:none;border:none;border-radius:inherit;color:inherit;font:inherit;text-align:left;cursor:pointer}.rd-history-row-button[aria-expanded=true]{border-radius:12px 12px 0 0}.rd-history-row-button:hover{background:color-mix(in srgb,var(--rd-border) 30%,transparent)}.rd-history-row-button:focus-visible{outline:2px solid var(--rd-accent);outline-offset:-2px}.rd-history-card-top{display:flex;align-items:center;gap:.5rem;min-width:0}.rd-history-card-top>.rd-status-pill{margin-left:auto;flex:none}.rd-history-card-top>.rd-status-pill:not(.rd-status-pill-success):not(.rd-status-pill-failure){background:color-mix(in srgb,var(--rd-accent) 12%,transparent);color:var(--rd-accent)}.rd-history-asset{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-history-card-amounts{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:.75rem;padding:.75rem;border-radius:10px;background:var(--rd-surface)}.rd-history-amount-block{display:flex;max-width:100%;flex-direction:column;gap:.15rem;min-width:0}.rd-history-amount-block:last-child{align-items:flex-end;text-align:right}.rd-history-amount-label{color:var(--rd-text-muted);font-size:.68rem;font-weight:650;line-height:1.2}.rd-history-num{max-width:100%;overflow:hidden;font-variant-numeric:tabular-nums;font-size:.875rem;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.rd-history-num[data-full-value],.rd-history-step-amount[data-full-value]{cursor:help}[data-rd-history-floating-tooltip]{position:fixed;z-index:100100;width:max-content;max-width:calc(100vw - 1.5rem);padding:.45rem .65rem;border:1px solid;border-radius:8px;font-size:.72rem;font-weight:600;line-height:1.35;text-align:left;white-space:normal;overflow-wrap:anywhere;pointer-events:none}.rd-history-card-arrow{display:inline-flex;align-items:center;justify-content:center;color:var(--rd-text-muted);font-size:.85rem}.rd-history-received{color:var(--rd-success)}.rd-history-received-estimate{color:var(--rd-text-muted);font-weight:600}.rd-history-card-foot{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.rd-history-date{color:var(--rd-text-muted);font-size:.78rem;font-variant-numeric:tabular-nums}.rd-history-chevron{display:inline-flex;flex:none;align-items:center;justify-content:center;color:var(--rd-text-muted);text-align:center;transition:transform .16s ease}.rd-history-row-button[aria-expanded=true] .rd-history-chevron{transform:rotate(180deg)}.rd-history-detail{display:flex;min-width:0;flex-direction:column;gap:.375rem;padding:.65rem .9rem .8rem;border-top:1px solid var(--rd-border)}.rd-history-step{display:grid;min-width:0;grid-template-columns:.5rem auto 1fr auto auto;gap:.5rem;align-items:center}.rd-history-step-dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--rd-border)}.rd-history-step-dot-done{background:var(--rd-success)}.rd-history-step-label{font-weight:600}.rd-history-step-chain{color:var(--rd-text-muted)}.rd-history-step-amount{font-variant-numeric:tabular-nums;color:var(--rd-text-muted)}.rd-history-step-tx{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.rd-history-step-shared{margin-left:.4rem;color:var(--rd-text-muted);font-size:.72rem}.rd-skeleton{border-radius:10px;background:linear-gradient(90deg,var(--rd-surface-alt) 25%,color-mix(in srgb,var(--rd-surface-alt) 55%,var(--rd-surface)) 42%,var(--rd-surface-alt) 60%);background-size:220% 100%;animation:rd-skeleton-wave 1.4s ease-in-out infinite}@keyframes rd-skeleton-wave{0%{background-position:130% 0}to{background-position:-90% 0}}@media(prefers-reduced-motion:reduce){.rd-skeleton,.rd-checklist-status,.rd-deposit-head[data-compact-view=address]>.rd-deposit-address,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane,.rd-checklist-status-waiting .rd-checklist-status-dot,.rd-checklist-status-detected .rd-checklist-status-dot{animation:none}}.rd-skeleton-form{display:flex;flex-direction:column;gap:.85rem}.rd-skeleton-qr{flex:none;width:172px;height:172px;border-radius:16px}.rd-skeleton-address{flex:1 1 12rem;min-width:0;height:172px;border-radius:16px}.rd-skeleton-line{height:.9rem;width:40%}.rd-skeleton-field{height:48px}.rd-skeleton-notice{height:96px}.rd-skeleton-cta{height:48px}.rd-wizard{flex:1 1 auto;min-height:0;overflow-y:auto;container:rd-wizard / inline-size;padding:1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom,0px));scroll-padding:1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom,0px));overscroll-behavior:contain;-webkit-overflow-scrolling:touch;max-width:none;gap:.85rem}.rd-deposit-tabs{--rd-tab-count: 3;--rd-active-tab-index: 0;position:sticky;top:-1rem;z-index:2;display:flex;flex:0 0 auto;justify-content:space-around;margin:-1rem -1.25rem 0;padding:1rem 1.25rem 0;border-bottom:1px solid var(--rd-border);background:var(--rd-surface)}.rd-deposit-tabs[data-active-index="1"]{--rd-active-tab-index: 1}.rd-deposit-tabs[data-active-index="2"]{--rd-active-tab-index: 2}.rd-deposit-tabs:after{position:absolute;bottom:-1px;left:1.25rem;width:calc((100% - 2.5rem) / var(--rd-tab-count));height:2px;background:var(--rd-accent);content:"";pointer-events:none;transform:translate(calc(var(--rd-active-tab-index) * 100%));transition:transform .22s cubic-bezier(.22,1,.36,1),width .18s ease}.rd-root .rd-deposit-tab{position:relative;display:inline-flex;flex:1 1 0;min-width:0;min-height:2.75rem;align-items:center;justify-content:center;gap:.4rem;padding:.85rem .35rem;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--rd-text-muted);font:inherit;font-size:.875rem;font-weight:650;line-height:1.2;transition:border-color .16s ease,background-color .16s ease,color .16s ease}.rd-root .rd-deposit-tab[data-active=true]{color:var(--rd-text)}.rd-root .rd-deposit-tab:hover:not(:disabled),.rd-root .rd-deposit-tab:focus-visible{outline:none;background:color-mix(in srgb,var(--rd-accent) 7%,transparent);color:var(--rd-text)}.rd-deposit-tab>.rd-recovery-badge{position:static;flex:none;min-width:1rem;height:1rem;padding:0 .2rem;border-width:0}.rd-deposit-tab-panel{display:flex;min-width:0;flex:1 1 auto;flex-direction:column;gap:.85rem;transform-origin:top center;animation:rd-deposit-tab-in .18s cubic-bezier(.22,1,.36,1)}@keyframes rd-deposit-tab-in{0%{opacity:0;transform:translateY(.35rem)}to{opacity:1;transform:translateY(0)}}.rd-stack{display:flex;min-width:0;flex-direction:column;gap:.75rem}.rd-wizard-header{display:flex;align-items:center;gap:.5rem;margin-bottom:0}.rd-wizard-heading{font-size:1rem;font-weight:700;color:var(--rd-text);margin:0}.rd-wizard-actions{margin-left:auto;display:flex;align-items:center;gap:.25rem}.rd-min-notice-pending{color:var(--rd-text-muted)}.rd-min-notice-pending b{font-weight:750;color:var(--rd-warning);font-variant-numeric:tabular-nums}.rd-locked-card{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1.25rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 12%,transparent),transparent 52%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-locked-glyph{display:grid;width:3rem;height:3rem;place-items:center;margin-bottom:.1rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);line-height:0;box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-locked-title{margin:0;color:var(--rd-text);font-size:1rem;font-weight:750;line-height:1.3}.rd-locked-text{max-width:22rem;margin:0;color:var(--rd-text-muted);font-size:.8rem;line-height:1.45}.rd-locked-card>.rd-card-hint{max-width:22rem;margin:-.2rem 0 0;text-wrap:balance}.rd-root button.rd-locked-action{display:inline-flex;width:min(18rem,100%);min-height:2.6rem;align-items:center;justify-content:center;gap:.5rem;margin-top:.25rem}.rd-delivery-recipient{display:flex;flex-direction:column;gap:.3rem;margin-top:.5rem}.rd-checklist-credit{font-size:clamp(10px,2.7vw,11.5px);white-space:nowrap}.rd-checklist{background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:14px;padding:11px 14px;display:flex;flex-direction:column;gap:7px}.rd-checklist-row{display:flex;align-items:flex-start;gap:.5rem;font-size:12.5px;line-height:1.5;color:var(--rd-text)}.rd-checklist-row[data-rd-checklist-only]{align-items:center;white-space:nowrap;font-size:clamp(10.5px,2.8vw,12.5px)}.rd-checklist-mark{flex:none;width:1.05rem;text-align:center;font-weight:800;color:var(--rd-text-muted)}.rd-checklist-mark-warn{color:var(--rd-warning)}.rd-checklist-accent{color:var(--rd-accent);font-weight:750;font-variant-numeric:tabular-nums}.rd-checklist-status{min-height:54px;display:flex;align-items:center;gap:.65rem;padding:10px 12px;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:12px;background:var(--rd-surface-alt);color:var(--rd-text-muted);font-size:12.5px;line-height:1.45;transform-origin:top center;animation:rd-status-enter .48s cubic-bezier(.22,1,.36,1)}.rd-checklist-status-waiting,.rd-checklist-status-detected{border-color:color-mix(in srgb,var(--rd-warning) 42%,var(--rd-border));box-shadow:0 0 0 1px color-mix(in srgb,var(--rd-warning) 10%,transparent)}@keyframes rd-status-enter{0%{opacity:0;transform:translateY(-10px) scale(.985);box-shadow:0 0 color-mix(in srgb,var(--rd-accent) 28%,transparent)}65%{opacity:1;transform:translateY(1px) scale(1);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-accent) 16%,transparent)}to{opacity:1;transform:translateY(0);box-shadow:0 0 0 0 transparent}}.rd-checklist-status-dot{flex:none;width:9px;height:9px;border-radius:50%;background:var(--rd-warning);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-warning) 14%,transparent)}.rd-checklist-status-waiting .rd-checklist-status-dot,.rd-checklist-status-detected .rd-checklist-status-dot{animation:rd-status-breathe 1.8s ease-in-out infinite}@keyframes rd-status-breathe{0%,to{opacity:.82;transform:scale(.96);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-warning) 10%,transparent)}50%{opacity:1;transform:scale(1);box-shadow:0 0 0 5px color-mix(in srgb,var(--rd-warning) 15%,transparent)}}.rd-checklist-status-funded,.rd-checklist-status-processing{color:var(--rd-text);border-color:color-mix(in srgb,var(--rd-accent) 40%,transparent)}.rd-checklist-status-funded .rd-checklist-status-dot,.rd-checklist-status-processing .rd-checklist-status-dot{background:var(--rd-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-accent) 14%,transparent)}.rd-checklist-status-completed{border-color:color-mix(in srgb,var(--rd-success) 40%,transparent);background:var(--rd-success-bg);color:var(--rd-success)}.rd-checklist-status-completed .rd-checklist-status-dot{background:var(--rd-success);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-success) 14%,transparent)}.rd-checklist-status-failed{border-color:color-mix(in srgb,var(--rd-danger) 40%,transparent);background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-checklist-status-failed .rd-checklist-status-dot{background:var(--rd-danger);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-danger) 14%,transparent)}@container rd-wizard (max-width: 30rem){.rd-recover-sum{padding-inline:.75rem}.rd-recover-sum-value{font-size:clamp(1rem,6cqi,1.5rem)}[data-rd-recover-funds] .rd-callout,.rd-token-row-status,.rd-token-row-warn,.rd-token-row-step,.rd-recover-foot{overflow-wrap:anywhere}.rd-token-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;padding:.875rem}.rd-root .rd-token-row-action{width:100%;min-height:2.75rem;grid-column:1 / -1}.rd-token-row-spinner{grid-column:1 / -1;justify-self:center}}@container rd-wizard (max-width: 24rem){.rd-history-card-top{flex-direction:column;align-items:flex-start}.rd-history-card-top>.rd-status-pill{max-width:100%;margin-left:0;white-space:normal}.rd-history-asset{overflow:visible;text-overflow:clip;white-space:normal}.rd-history-card-amounts{grid-template-columns:minmax(0,1fr);gap:.45rem}.rd-history-amount-block{width:100%}.rd-history-amount-block:last-child{align-items:flex-start;text-align:left}.rd-history-card-arrow{display:inline-flex;justify-self:center;margin:0;transform:rotate(90deg);transform-origin:center}.rd-history-card-foot{align-items:flex-start}.rd-history-date{min-width:0;line-height:1.4;overflow-wrap:anywhere}.rd-history-step{grid-template-columns:.5rem minmax(0,1fr);grid-template-areas:"dot label" ". chain" ". amount" ". tx";column-gap:.5rem;row-gap:.25rem;align-items:start;padding-block:.65rem;line-height:1.35}.rd-history-step+.rd-history-step{border-top:1px solid var(--rd-border)}.rd-history-step-dot{grid-area:dot;margin-top:.35rem}.rd-history-step-label{grid-area:label}.rd-history-step-chain{grid-area:chain}.rd-history-step-amount{grid-area:amount}.rd-history-step-tx{grid-area:tx;min-width:0;max-width:100%}.rd-history-step-tx a{overflow-wrap:anywhere}.rd-history-step-shared{display:block;margin:.15rem 0 0}.rd-history-step>.rd-muted{grid-area:tx}}@container rd-wizard (max-width: 22rem){.rd-root .rd-deposit-tab{gap:.2rem;padding-inline:.15rem;font-size:.8rem}.rd-history-row-button,.rd-history-detail{padding-inline:.75rem}}@media(prefers-reduced-motion:reduce){.rd-deposit-tabs:after,.rd-root .rd-deposit-tab{transition:none}.rd-deposit-tab-panel{animation:none}}
|
|
20
|
+
`);var Vt=require("react/jsx-runtime");function dh({minNotice:e,arrivalStatus:t}){let n=t.amount&&t.symbol?`${t.amount} ${t.symbol} arrived`:t.amount?`${t.amount} arrived`:void 0,r=(()=>{switch(t.phase){case"detected":if(e.remaining!==void 0){let o=`${e.remaining} ${e.symbol}`;return n?`${n} at the processing address. Waiting for ${o} more to reach the minimum.`:`Deposit detected. Waiting for ${o} more to reach the minimum.`}return n?`${n} at the processing address. Checking the minimum.`:"Deposit detected. Checking the minimum.";case"funded":return`${e.min} ${e.symbol} received at the processing address. Preparing delivery.`;case"processing":return"Minimum reached. Bridging and delivering to ONEchain.";case"completed":return"Transfer completed. Funds were delivered to ONEchain.";case"failed":return`Transfer needs attention${t.backendStatus?` (${t.backendStatus})`:""}.`;case"unavailable":return e.remaining===void 0?"Live status is temporarily unavailable. Retrying automatically.":void 0;default:return e.remaining===void 0?"Waiting for your deposit.":void 0}})();return r?(0,Vt.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,Vt.jsx)("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),(0,Vt.jsx)("span",{children:r})]},`live:${t.phase}:${r}`):e.remaining!==void 0?(0,Vt.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,Vt.jsx)("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),(0,Vt.jsxs)("span",{children:["Waiting for"," ",(0,Vt.jsxs)("b",{children:[e.remaining," ",e.symbol]})," ","more to arrive at the processing address."]})]},`pending:${e.remaining}:${e.symbol}`):null}function ch({minNotice:e,onlySend:t,showWalletCreditNote:n=!1}){return(0,Vt.jsxs)("div",{className:"rd-checklist","data-rd-checklist":"",children:[(0,Vt.jsxs)("div",{className:"rd-checklist-row","data-rd-checklist-only":"",children:[(0,Vt.jsx)("span",{className:"rd-checklist-mark rd-checklist-mark-warn","aria-hidden":"true",children:"!"}),(0,Vt.jsxs)("span",{children:[(0,Vt.jsxs)("b",{children:[t.chainName," ",t.symbol," only"]})," \xB7 ",(0,Vt.jsxs)("b",{className:"rd-checklist-accent",children:[e.min," ",e.symbol," minimum"]})]})]}),(0,Vt.jsxs)("div",{className:"rd-checklist-row",children:[(0,Vt.jsx)("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u21BB"}),(0,Vt.jsx)("span",{children:"Reusable \u2014 deposit as many times as you like"})]}),n&&(0,Vt.jsxs)("div",{className:"rd-checklist-row rd-checklist-credit","data-rd-checklist-credit":"",children:[(0,Vt.jsx)("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u2192"}),(0,Vt.jsx)("span",{children:"Credited to your ONEchain wallet"})]})]})}var vo=require("react");var Fa="0x0000000000000000000000000000000000000000",ov=/^0x[0-9a-fA-F]{40}$/;function ht(e){return ov.test(e)}function pn(e,t){let n=e<0n,o=(n?-e:e).toString().padStart(t+1,"0"),a=t===0?o:o.slice(0,-t),i=t===0?"":o.slice(-t).replace(/0+$/,""),s=i?`${a}.${i}`:a;return n?`-${s}`:s}function Bs(e,t){let n=e.match(/^(-?)(\d+)(?:\.(\d+))?$/);if(!n)throw new Error(`parseUnits: invalid decimal string "${e}"`);let[,r,o,a=""]=n;if(a.length>t)throw new Error(`parseUnits: too many decimal places for ${t} decimals`);let i=BigInt(o+a.padEnd(t,"0"));return r==="-"?-i:i}var Qr=require("react");var Vd="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTQwIDU0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc0MDAwXzM4NTkwKSI+CjxtYXNrIGlkPSJtYXNrMF83NDAwMF8zODU5MCIgc3R5bGU9Im1hc2stdHlwZTpsdW1pbmFuY2UiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjAiIHk9IjAiIHdpZHRoPSI1NDAiIGhlaWdodD0iNTQwIj4KPHBhdGggZD0iTTI3MCAwQzU2Ljg1NjMgMCAwIDU2Ljg1NjMgMCAyNzBDMCA0ODMuMTQ0IDU2Ljg1NjMgNTQwIDI3MCA1NDBDNDgzLjE0NCA1NDAgNTQwIDQ4My4xNDQgNTQwIDI3MEM1NDAgNTYuODU2MyA0ODMuMTQ0IDAgMjcwIDBaIiBmaWxsPSJ3aGl0ZSIvPgo8L21hc2s+CjxnIG1hc2s9InVybCgjbWFzazBfNzQwMDBfMzg1OTApIj4KPHBhdGggZD0iTTUzOS43MzEgMC4yNzA1MDhIMFY1NDAuMDAxSDUzOS43MzFWMC4yNzA1MDhaIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfNzQwMDBfMzg1OTApIi8+CjxwYXRoIGQ9Ik0xODguNjIzIDU0MC4wMDFINTM5Ljg2NVYxMDIuOTM2TDE4OC42MjMgMzI3LjkzNlY1NDAuMDAxWiIgZmlsbD0idXJsKCNwYWludDFfbGluZWFyXzc0MDAwXzM4NTkwKSIvPgo8cGF0aCBkPSJNMTg4LjYyMyA1NDAuMDAySDBWMTI4LjUzNUwxODguNjIzIDMyNy45MzZ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jsWbSn7wFeEqIl/SmT6TMRW2CxIkf+gemaYjNC7JZHpg02wDTYKUrQ+rHVZxVJynXu0PJ8LmXPasZDnYANsgU2CFG0DhVdkCsKMm+J2JOZi5szcgxRt/SKnaPeCTiU3eqrS6r2KKHNjjkGK9of1Lu73r/W79OpQ2KXkHHk+o7G7CGNuKxLxXMbM2JkDc2FOQYoUAOx2049/l4Cd3UQs10mS60vhtfzsPBLxbMbE2BgjY2XMQYoU2UIavS+2XseiDaQQ+d4iovOpeB8W5WkM3YazDIQ7K/zsRn4Xv5PfzRgYC2MKUqSIs1tC4dWZZTl4UVtZ9q7HiUehi/h775H//4aI7z0OZ5LeVJvNw/fyM/wsn8Fn8Zl8Nr+D36Wvsp/if7BfCn8ECvocAAAAAElFTkSuQmCC";function ph(e){switch(e.toUpperCase()){case"ONEUSD":return Vd;case"PONEUSD":return av;case"USDT":return iv;case"USDC":return sv;default:return}}var _=require("react/jsx-runtime");function uh(e){let t=e.trim();return t?t.slice(0,2).toUpperCase():"?"}function lv({size:e,bg:t,fg:n="#ffffff",children:r}){return(0,_.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,_.jsx)("circle",{cx:"12",cy:"12",r:"12",fill:t}),(0,_.jsx)("g",{fill:n,stroke:n,children:r})]})}function Qd({size:e,bg:t,fg:n="#ffffff",text:r}){return(0,_.jsx)(lv,{size:e,bg:t,fg:n,children:(0,_.jsx)("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",fontSize:"10",fontWeight:700,fontFamily:"inherit",stroke:"none",fill:n,children:r})})}function _o({size:e,viewBox:t="0 0 24 24",children:n}){return(0,_.jsx)("svg",{width:e,height:e,viewBox:t,"aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:n})}function dv({size:e}){let t=(0,Qr.useId)();return(0,_.jsxs)(_o,{size:e,children:[(0,_.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,_.jsx)("path",{fill:"#000",d:"M24 0H0v24h24z"}),(0,_.jsx)("path",{fill:"#8FFCF3",d:"M12 4v5.912l5 2.237z"}),(0,_.jsx)("path",{fill:"#CABCF8",d:"m12 4-5 8.148 5-2.235z"}),(0,_.jsx)("path",{fill:"#CBA7F5",d:"M12 15.98V20l5-6.92z"}),(0,_.jsx)("path",{fill:"#74A0F3",d:"M12 20v-4.02l-5-2.9z"}),(0,_.jsx)("path",{fill:"#CBA7F5",d:"m12 15.049 5-2.9-5-2.236z"}),(0,_.jsx)("path",{fill:"#74A0F3",d:"m7 12.149 5 2.9V9.913z"}),(0,_.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,_.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,_.jsx)("defs",{children:(0,_.jsx)("clipPath",{id:t,children:(0,_.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function cv({size:e}){let t=(0,Qr.useId)();return(0,_.jsxs)(_o,{size:e,children:[(0,_.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,_.jsx)("path",{fill:"#F0B90B",d:"M24 0H0v24h24z"}),(0,_.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,_.jsx)("defs",{children:(0,_.jsx)("clipPath",{id:t,children:(0,_.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function pv({size:e}){let t=(0,Qr.useId)();return(0,_.jsxs)(_o,{size:e,viewBox:"0 0 111 111",children:[(0,_.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,_.jsx)("path",{fill:"#fff",d:"M0 0h111v111H0z"}),(0,_.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,_.jsx)("defs",{children:(0,_.jsx)("clipPath",{id:t,children:(0,_.jsx)("path",{fill:"#fff",d:"M0 0h111v111H0z"})})})]})}function uv({size:e}){let t=(0,Qr.useId)();return(0,_.jsxs)(_o,{size:e,children:[(0,_.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,_.jsx)("path",{fill:"#213147",d:"M24 0H0v24h24z"}),(0,_.jsxs)("g",{transform:"translate(12 12) scale(1.28) translate(-12 -12)",children:[(0,_.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,_.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,_.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,_.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,_.jsx)("defs",{children:(0,_.jsx)("clipPath",{id:t,children:(0,_.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function fv({size:e}){let t=(0,Qr.useId)(),n=(0,Qr.useId)();return(0,_.jsxs)(_o,{size:e,children:[(0,_.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,_.jsx)("path",{fill:`url(#${n})`,d:"M24 0H0v24h24z"}),(0,_.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,_.jsxs)("defs",{children:[(0,_.jsxs)("linearGradient",{id:n,x1:"3.948",x2:"19.217",y1:"16.617",y2:"7.645",gradientUnits:"userSpaceOnUse",children:[(0,_.jsx)("stop",{stopColor:"#A726C1"}),(0,_.jsx)("stop",{offset:".88",stopColor:"#803BDF"}),(0,_.jsx)("stop",{offset:"1",stopColor:"#7B3FE4"})]}),(0,_.jsx)("clipPath",{id:t,children:(0,_.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function mv({size:e}){let t=(0,Qr.useId)();return(0,_.jsxs)(_o,{size:e,children:[(0,_.jsx)("path",{fill:"#000",d:"M24 0H0v24h24z"}),(0,_.jsx)("g",{transform:"translate(5 5.9) scale(0.1386)",children:(0,_.jsx)("path",{fill:`url(#${t})`,d:"M100.48 69.3817L83.8068 86.8015C83.4444 87.1799 83.0058 87.4816 82.5185 87.6878C82.0312 87.894 81.5055 88.0003 80.9743 88H1.93563C1.55849 88 1.18957 87.8926 0.874202 87.6912C0.558829 87.4897 0.31074 87.2029 0.160416 86.8659C0.0100923 86.529 -0.0359181 86.1566 0.0280382 85.7945C0.0919944 85.4324 0.263131 85.0964 0.520422 84.8278L17.2061 67.408C17.5676 67.0306 18.0047 66.7295 18.4904 66.5234C18.9762 66.3172 19.5002 66.2104 20.0301 66.2095H99.0644C99.4415 66.2095 99.8104 66.3169 100.126 66.5183C100.441 66.7198 100.689 67.0067 100.84 67.3436C100.99 67.6806 101.036 68.0529 100.972 68.415C100.908 68.7771 100.737 69.1131 100.48 69.3817ZM83.8068 34.3032C83.4444 33.9248 83.0058 33.6231 82.5185 33.4169C82.0312 33.2108 81.5055 33.1045 80.9743 33.1048H1.93563C1.55849 33.1048 1.18957 33.2121 0.874202 33.4136C0.558829 33.6151 0.31074 33.9019 0.160416 34.2388C0.0100923 34.5758 -0.0359181 34.9482 0.0280382 35.3103C0.0919944 35.6723 0.263131 36.0083 0.520422 36.277L17.2061 53.6968C17.5676 54.0742 18.0047 54.3752 18.4904 54.5814C18.9762 54.7875 19.5002 54.8944 20.0301 54.8952H99.0644C99.4415 54.8952 99.8104 54.7879 100.126 54.5864C100.441 54.3849 100.689 54.0981 100.84 53.7612C100.99 53.4242 101.036 53.0518 100.972 52.6897C100.908 52.3277 100.737 51.9917 100.48 51.723L83.8068 34.3032ZM1.93563 21.7905H80.9743C81.5055 21.7907 82.0312 21.6845 82.5185 21.4783C83.0058 21.2721 83.4444 20.9704 83.8068 20.592L100.48 3.17219C100.737 2.90357 100.908 2.56758 100.972 2.2055C101.036 1.84342 100.99 1.47103 100.84 1.13408C100.689 0.79713 100.441 0.510296 100.126 0.308823C99.8104 0.107349 99.4415 1.24074e-05 99.0644 0L20.0301 0C19.5002 0.000878397 18.9762 0.107699 18.4904 0.313848C18.0047 0.519998 17.5676 0.821087 17.2061 1.19848L0.524723 18.6183C0.267681 18.8866 0.0966198 19.2223 0.0325185 19.5839C-0.0315829 19.9456 0.0140624 20.3177 0.163856 20.6545C0.31365 20.9913 0.561081 21.2781 0.875804 21.4799C1.19053 21.6817 1.55886 21.7896 1.93563 21.7905Z"})}),(0,_.jsx)("defs",{children:(0,_.jsxs)("linearGradient",{id:t,x1:"8.52558",y1:"90.0973",x2:"88.9933",y2:"-3.01622",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(5 5.9) scale(0.1386)",children:[(0,_.jsx)("stop",{offset:"0.08",stopColor:"#9945FF"}),(0,_.jsx)("stop",{offset:"0.3",stopColor:"#8752F3"}),(0,_.jsx)("stop",{offset:"0.5",stopColor:"#5497D5"}),(0,_.jsx)("stop",{offset:"0.6",stopColor:"#43B4CA"}),(0,_.jsx)("stop",{offset:"0.72",stopColor:"#28E0B9"}),(0,_.jsx)("stop",{offset:"0.97",stopColor:"#19FB9B"})]})})]})}function zs({chainId:e,chainName:t,size:n=20}){switch(e){case 1:return(0,_.jsx)(dv,{size:n});case 56:return(0,_.jsx)(cv,{size:n});case 8453:return(0,_.jsx)(pv,{size:n});case 42161:return(0,_.jsx)(uv,{size:n});case 137:return(0,_.jsx)(fv,{size:n});case 792703809:return(0,_.jsx)(mv,{size:n});case 612055:return(0,_.jsx)(Qd,{size:n,bg:"#0b1f3a",text:"CR"});default:return(0,_.jsx)(Qd,{size:n,bg:"#676b7a",text:uh(t??String(e))})}}function xo({symbol:e,logoUrl:t,size:n=20}){let r=t&&t.trim().length>0?t.trim():ph(e);return r?(0,_.jsx)("img",{src:r,alt:"","aria-hidden":"true",width:n,height:n,style:{display:"block",flex:"none",borderRadius:"50%",objectFit:"cover"}}):(0,_.jsx)(Qd,{size:n,bg:"#676b7a",text:uh(e)})}var fh=require("qrcode.react"),ye=require("react/jsx-runtime");function Fs(){return(0,ye.jsxs)("div",{className:"rd-deposit-head","data-testid":"rd-address-skeleton","aria-hidden":"true",children:[(0,ye.jsx)("span",{className:"rd-skeleton rd-skeleton-qr"}),(0,ye.jsx)("span",{className:"rd-skeleton rd-skeleton-address"})]})}function gv(e){let{depositAddress:t,originChainId:n,originCurrency:r,amountWei:o,isNative:a}=e;if(a)return o!==void 0?`ethereum:${t}@${n}?value=${o.toString()}`:`ethereum:${t}@${n}`;let i=new URLSearchParams({address:t});return o!==void 0&&i.set("uint256",o.toString()),`ethereum:${r}@${n}/transfer?${i.toString()}`}function hv(e){let{depositAddress:t,splMint:n,humanAmount:r}=e,o=new URLSearchParams;return r&&o.set("amount",r),o.set("spl-token",n),`solana:${t}?${o.toString()}`}function mh({depositAddress:e,originChainId:t,originChainName:n,originCurrency:r,amount:o,tokenSymbol:a,tokenDecimals:i,kind:s="evm",depositState:l,onDeposit:d,canDeposit:p,oneClickEnabled:h=!0}){let[u,g]=(0,vo.useState)(!1),[x,y]=(0,vo.useState)("address"),f=(0,vo.useId)();(0,vo.useEffect)(()=>{y("address")},[e]);let c=r.toLowerCase()===Fa,b=s==="svm";async function w(){try{await navigator.clipboard.writeText(e),g(!0),setTimeout(()=>g(!1),1500)}catch{}}let k;if(o)try{let M=BigInt(o);M>0n&&(k=M)}catch{}let C=k!==void 0,N;if(C)try{N=pn(k,i)}catch{N=o}let T=b?hv({depositAddress:e,splMint:r,humanAmount:N??""}):gv({depositAddress:e,originChainId:t,originCurrency:r,amountWei:k,isNative:c}),{isSubmitting:R,isConfirming:S,isConfirmed:E,needsSwitch:A,txHash:F,reverted:D,error:G}=l;return(0,ye.jsxs)("section",{className:"rd-stack",children:[(0,ye.jsxs)("div",{className:"rd-deposit-head","data-compact-view":x,children:[(0,ye.jsxs)("div",{className:"rd-deposit-qr-pane",children:[(0,ye.jsxs)("div",{className:"rd-deposit-qr",children:[(0,ye.jsx)(fh.QRCodeSVG,{value:T,size:144,level:"H"}),(0,ye.jsx)("span",{className:"rd-deposit-qr-badge","aria-hidden":"true",children:(0,ye.jsx)(zs,{chainId:t,chainName:n,size:28})})]}),(0,ye.jsx)("button",{type:"button",className:"rd-mobile-address-toggle","aria-label":"Show address and copy",onClick:()=>y("address"),children:(0,ye.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,ye.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2.25",stroke:"currentColor",strokeWidth:"1.8"}),(0,ye.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,ye.jsxs)("div",{className:"rd-deposit-address",children:[(0,ye.jsx)("span",{className:"rd-deposit-address-label",children:(0,ye.jsxs)("button",{type:"button",className:"rd-address-term","aria-describedby":f,children:["Deposit address",(0,ye.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,ye.jsx)("button",{type:"button",className:"rd-mobile-qr-toggle","aria-label":"Show deposit QR code","aria-pressed":x==="qr",onClick:()=>y("qr"),children:(0,ye.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:(0,ye.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,ye.jsx)("span",{className:"rd-address-full",title:e,children:e}),(0,ye.jsxs)("button",{type:"button",className:"rd-address-copy",onClick:w,"aria-label":`Copy deposit address ${e}`,children:[u?(0,ye.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,ye.jsx)("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,ye.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,ye.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),(0,ye.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,ye.jsx)("span",{"aria-live":"polite",children:u?"Copied":"Copy address"})]})]})]}),!b&&p&&(0,ye.jsxs)(ye.Fragment,{children:[(0,ye.jsx)("button",{type:"button",className:"rd-button-primary rd-button-block",onClick:d,disabled:R||S||E&&!D,children:E&&!D?"Deposit sent":S?"Confirming...":R?A?"Switching network...":"Confirm in wallet...":`One-click deposit ${a}${A?` (switch to ${n})`:""}`}),G&&(0,ye.jsx)("div",{className:"rd-callout rd-callout-danger",children:G}),F&&(0,ye.jsxs)("p",{className:"rd-card-hint",children:["Tx: ",(0,ye.jsx)("span",{style:{fontFamily:"monospace"},children:F})]}),E&&D&&(0,ye.jsx)("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),E&&!D&&(0,ye.jsx)("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."})]}),b&&(0,ye.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"," ",C?(0,ye.jsxs)(ye.Fragment,{children:["exactly"," ",(0,ye.jsxs)("strong",{children:[N," ",a]})]}):(0,ye.jsxs)(ye.Fragment,{children:["any amount of ",(0,ye.jsx)("strong",{children:a})]}),"."]}),(C||!b&&!p&&h)&&(0,ye.jsxs)("p",{className:"rd-card-hint",children:[C&&(0,ye.jsxs)(ye.Fragment,{children:["Send exactly"," ",(0,ye.jsxs)("strong",{children:[N," ",a]})," ","on ",n," to this address."]}),!b&&!p&&h&&!C&&"Enter an amount to deposit in one click."]})]})}var er=require("react"),qr=H(require("@radix-ui/react-popover"),1);var bn=require("react/jsx-runtime");function Ua({value:e,options:t,onChange:n,disabled:r,ariaLabel:o,id:a}){let i=(0,er.useId)(),s=a??i,l=`${s}-listbox`,[d,p]=(0,er.useState)(!1),h=t.findIndex(E=>E.value===e),[u,g]=(0,er.useState)(h>=0?h:0),x=(0,er.useRef)(null),y=(0,er.useRef)([]),f=!!r||t.length===0,c=h>=0?t[h]:void 0;(0,er.useEffect)(()=>{d&&y.current[u]?.scrollIntoView?.({block:"nearest"})},[d,u]);let[b,w]=(0,er.useState)(null);function k(){f||(w(x.current?.closest("[data-theme]")?.getAttribute("data-theme")??null),g(h>=0?h:0),p(!0))}function C(E){p(!1),E&&x.current?.focus()}function N(E){let A=t[E];A&&(n(A.value),C(!0))}function T(){f||(d?C(!1):k())}function R(E){if(!f)switch(E.key){case"ArrowDown":E.preventDefault(),d?g(A=>Math.min(A+1,t.length-1)):k();break;case"ArrowUp":E.preventDefault(),d?g(A=>Math.max(A-1,0)):k();break;case"Enter":case" ":E.preventDefault(),d?N(u):k();break;case"Escape":d&&(E.preventDefault(),C(!0));break;case"Tab":d&&p(!1);break;default:break}}let S=d&&t[u]?`${s}-option-${u}`:void 0;return(0,bn.jsx)(qr.Root,{open:d,onOpenChange:E=>E?k():C(!1),children:(0,bn.jsxs)("div",{className:"rd-dropdown",children:[(0,bn.jsx)(qr.Trigger,{asChild:!0,children:(0,bn.jsxs)("button",{type:"button",id:s,ref:x,className:"rd-dropdown-trigger","aria-haspopup":"listbox","aria-expanded":d,"aria-controls":l,"aria-activedescendant":S,"aria-label":o,disabled:f,onClick:T,onKeyDown:R,children:[(0,bn.jsxs)("span",{className:"rd-dropdown-trigger-content",children:[c?.icon,(0,bn.jsxs)("span",{className:"rd-dropdown-trigger-label",children:[c?.label??"",c?.subLabel&&(0,bn.jsx)("small",{className:"rd-dropdown-trigger-sub",children:c.subLabel})]})]}),(0,bn.jsx)("span",{className:"rd-dropdown-chevron","aria-hidden":"true",children:(0,bn.jsx)(zn,{size:16})})]})}),d&&(0,bn.jsx)(qr.Portal,{children:(0,bn.jsx)(qr.Content,{className:"rd-dropdown-popover","data-theme":b??void 0,side:"bottom",align:"start",sideOffset:5,collisionPadding:12,onOpenAutoFocus:E=>E.preventDefault(),onCloseAutoFocus:E=>E.preventDefault(),children:(0,bn.jsx)("ul",{className:"rd-dropdown-listbox",role:"listbox",id:l,"aria-label":o,tabIndex:-1,"data-vaul-no-drag":!0,children:t.map((E,A)=>{let F=E.value===e,D=A===u;return(0,bn.jsxs)("li",{id:`${s}-option-${A}`,role:"option","aria-selected":F,ref:G=>{y.current[A]=G},className:["rd-dropdown-option",D?"rd-dropdown-option-active":"",F?"rd-dropdown-option-selected":""].filter(Boolean).join(" "),onPointerEnter:()=>g(A),onClick:G=>{G.preventDefault(),N(A)},children:[E.icon,(0,bn.jsx)("span",{className:"rd-dropdown-option-label",children:E.label}),F&&(0,bn.jsx)("span",{className:"rd-dropdown-option-check","aria-hidden":"true",children:"\u2713"})]},E.value)})})})})]})})}var bt=require("react/jsx-runtime");function bv(e,t){if(!e)return"--";try{return pn(BigInt(e),t)}catch{return"--"}}function gh({quote:e,isLoading:t,error:n,humanAmount:r,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&&n&&(0,bt.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a quote: ",n.message]}),!t&&!n&&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:[r," ",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:["~",bv(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&&!n&&!e&&(0,bt.jsx)("p",{className:"rd-muted",children:"Enter an amount to see a quote."})]})}var qd=require("react");var hh={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 bh(e,t){let n=hh[e];if(!(!n||!t))return{url:`${n.base}/token/${t}`,name:n.name}}var wv={1:"Ethereum",56:"BNB Smart Chain",137:"Polygon",8453:"Base",42161:"Arbitrum",612055:"ONEchain",792703809:"Solana"};function Vo(e){return wv[e]??`Chain ${e}`}function Us(e,t){let n=hh[e];if(!(!n||!t))return{url:`${n.base}/tx/${t}`,name:n.name}}var Ft=require("react/jsx-runtime");function yv(e){let t=new Map;for(let n of e.origins)t.has(n.chainId)||t.set(n.chainId,n.chainName);return Array.from(t,([n,r])=>({chainId:n,chainName:r}))}function wh(e,t){return t===void 0?[]:e.origins.filter(n=>n.chainId===t)}function xv(e,t){let n=pn(e,t),r=n.indexOf(".");return r===-1?n:`${n.slice(0,r)}.${n.slice(r+1,r+1+4)}`.replace(/\.?0+$/,"")||n.slice(0,r)}function yh({catalog:e,origin:t,onChangeOrigin:n,amount:r,onChangeAmount:o,showAmountInput:a=!0,balance:i,balanceLoading:s,insufficientBalance:l,onMax:d,disabled:p}){let h=(0,qd.useMemo)(()=>yv(e),[e]),u=(0,qd.useMemo)(()=>wh(e,t?.chainId),[e,t?.chainId]);function g(c){let b=Number(c),w=wh(e,b)[0];w&&n(w)}function x(c){let b=u.find(w=>w.token.address.toLowerCase()===c.toLowerCase());b&&n(b)}let y=i?`${xv(i.value,i.decimals)} ${i.symbol}`:void 0,f=l?`Amount exceeds your balance${y?` (${y})`:""}`:void 0;return(0,Ft.jsxs)("section",{className:"rd-stack","data-rd-source-form":"",children:[(0,Ft.jsxs)("div",{className:"rd-field",children:[(0,Ft.jsxs)("div",{className:"rd-field-label-row",children:[(0,Ft.jsx)("span",{className:"rd-field-label",children:"From"}),t&&(()=>{let c=bh(t.chainId,t.token.address);return c?(0,Ft.jsxs)("a",{className:"rd-token-explorer-link",href:c.url,target:"_blank",rel:"noopener noreferrer",title:`View ${t.token.symbol} on ${c.name}`,children:[c.name," \u2197"]}):null})()]}),(0,Ft.jsxs)("div",{className:"rd-field-row",children:[(0,Ft.jsx)(Ua,{ariaLabel:"Origin chain",value:t?String(t.chainId):"",onChange:g,disabled:p,options:h.map(c=>({value:String(c.chainId),label:c.chainName,subLabel:"Network",icon:(0,Ft.jsx)(zs,{chainId:c.chainId,chainName:c.chainName,size:22})}))}),(0,Ft.jsx)(Ua,{ariaLabel:"Token",value:t?.token.address??"",onChange:x,disabled:p||u.length===0,options:u.map(c=>({value:c.token.address,label:c.token.symbol,subLabel:`${c.token.decimals} decimals`,icon:(0,Ft.jsx)(xo,{symbol:c.token.symbol,logoUrl:c.token.logoUrl,size:22})}))})]})]}),a&&(0,Ft.jsxs)("label",{className:"rd-field",children:[(0,Ft.jsx)("span",{className:"rd-field-label",children:"Amount (optional)"}),(0,Ft.jsxs)("div",{className:"rd-amount-input","data-rd-invalid":f?"":void 0,children:[(0,Ft.jsx)("input",{type:"text",inputMode:"decimal",placeholder:"0.0",value:r,onChange:c=>{let b=c.target.value;if(b===""){o(b);return}b.startsWith(".")&&(b=`0${b}`),/^\d*\.?\d{0,4}$/.test(b)&&(b=b.replace(/^0+(?=\d)/,""),!((b.split(".")[0]??"").length>12)&&o(b))},disabled:p||!t,"data-vaul-no-drag":!0}),t&&(0,Ft.jsx)("span",{className:"rd-amount-input-suffix",children:t.token.symbol}),d&&!p&&(0,Ft.jsx)("button",{type:"button",className:"rd-amount-input-max",onClick:d,disabled:p||!t,children:"Max"})]}),(y||s)&&(0,Ft.jsxs)("span",{className:"rd-amount-meta",children:[(0,Ft.jsx)("span",{}),(0,Ft.jsx)("span",{children:s?"Balance: \u2026":y?`Balance: ${y}`:""})]}),f&&(0,Ft.jsx)("span",{className:"rd-callout rd-callout-danger",children:f})]})]})}var ge=require("react/jsx-runtime");function xh({catalog:e,origin:t,onChangeOrigin:n,amount:r,onChangeAmount:o,showAmountInput:a,minNotice:i,amountHint:s,onMax:l,recipient:d,onChangeRecipient:p,showRecipientInput:h,recipientValid:u,balance:g,balanceLoading:x,insufficientBalance:y,targetOptions:f,selectedTarget:c,onChangeTarget:b,showTargetSelector:w,quote:k,quoteLoading:C,quoteError:N,depositAddress:T,depositAddressLoading:R,depositAddressError:S,arrivalStatus:E,amountSmallestUnits:A,depositState:F,onDeposit:D,canDeposit:G,oneClickEnabled:M,locked:j,onRequestConnect:le}){let oe=f.length>1&&w,{phase:ne,isSubmitting:Q,isConfirming:ee,isConfirmed:z,needsSwitch:q,reverted:ae,error:Z}=F,pe=c?.symbol??e.destination.symbol;return(0,ge.jsxs)(ge.Fragment,{children:[i&&(0,ge.jsx)(dh,{minNotice:i,arrivalStatus:E}),j?(0,ge.jsxs)("section",{className:"rd-locked-card","data-rd-locked":"",children:[(0,ge.jsx)("span",{className:"rd-locked-glyph","aria-hidden":"true",children:(0,ge.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,ge.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,ge.jsx)("path",{d:"M4 9h15",stroke:"currentColor",strokeWidth:"1.7"}),(0,ge.jsx)("path",{d:"M15 11.5h5v4h-5a2 2 0 0 1 0-4Z",fill:"currentColor",opacity:"0.18",stroke:"currentColor",strokeWidth:"1.5"}),(0,ge.jsx)("circle",{cx:"15.7",cy:"13.5",r:"0.8",fill:"currentColor"})]})}),(0,ge.jsx)("h3",{className:"rd-locked-title",children:"Connect your wallet"}),(0,ge.jsx)("p",{className:"rd-locked-text",children:"Connect to get your personal deposit address."}),h&&(0,ge.jsx)("p",{className:"rd-card-hint",children:"Or enter a recipient address to get one without connecting."}),le&&(0,ge.jsxs)("button",{type:"button",className:"rd-button-primary rd-locked-action","data-track":"connect",onClick:le,children:[(0,ge.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,ge.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,ge.jsx)("path",{d:"M15 10.5h5v4h-5a2 2 0 0 1 0-4Z",stroke:"currentColor",strokeWidth:"1.8"})]}),"Connect Wallet"]})]}):T?(0,ge.jsx)(mh,{depositAddress:T,originChainId:t.chainId,originChainName:t.chainName,originCurrency:t.token.address,amount:A,tokenSymbol:t.token.symbol,tokenDecimals:t.token.decimals,depositState:F,onDeposit:D,canDeposit:G,oneClickEnabled:M}):R?(0,ge.jsxs)(ge.Fragment,{children:[(0,ge.jsx)(Fs,{}),M&&A&&(0,ge.jsx)("span",{className:"rd-skeleton rd-skeleton-cta","aria-hidden":"true"}),(0,ge.jsx)("p",{className:"rd-sr-only",role:"status",children:"Preparing your deposit address..."})]}):S?(0,ge.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a deposit address: ",S.message]}):null,(0,ge.jsx)(yh,{catalog:e,origin:t,onChangeOrigin:n,amount:r,onChangeAmount:o,showAmountInput:a,balance:g,balanceLoading:x,insufficientBalance:y,onMax:l}),(0,ge.jsxs)("div",{className:"rd-field","data-rd-delivery":"",children:[(0,ge.jsx)("span",{className:"rd-field-label",children:"Deliver as"}),oe?(0,ge.jsx)(Ua,{ariaLabel:"Delivery token",value:c?.symbol??"",onChange:b,options:f.map(Se=>({value:Se.symbol,label:Se.symbol,subLabel:"on ONEchain",icon:(0,ge.jsx)(xo,{symbol:Se.symbol,size:22})}))}):(0,ge.jsxs)("div",{className:"rd-static-target",children:[(0,ge.jsx)(xo,{symbol:pe,size:22}),(0,ge.jsx)("span",{children:pe})]}),h&&(0,ge.jsxs)("label",{className:"rd-delivery-recipient",children:[(0,ge.jsx)("input",{type:"text",placeholder:"0x...","aria-label":"ONEchain recipient address",value:d,onChange:Se=>p(Se.target.value),"data-vaul-no-drag":!0}),(0,ge.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."}),!u&&(0,ge.jsx)("span",{className:"rd-callout rd-callout-danger",children:"Not a valid address"})]})]}),c?.external&&(0,ge.jsxs)("div",{className:"rd-callout rd-callout-muted",children:["Delivered as ",c.symbol," via an external adapter."]}),s&&(0,ge.jsx)("div",{className:"rd-callout rd-callout-warning","data-rd-amount-hint":"",children:s}),r.trim()&&(0,ge.jsx)(gh,{quote:k,isLoading:C,error:N,humanAmount:r,originSymbol:t.token.symbol,destination:e.destination}),i&&(0,ge.jsx)(ch,{minNotice:i,onlySend:{symbol:t.token.symbol,chainName:t.chainName},showWalletCreditNote:!h&&u}),M&&ne!=="idle"&&!G&&(0,ge.jsxs)("div",{className:"rd-card",children:[Q&&(0,ge.jsxs)("p",{className:"rd-muted",children:[(0,ge.jsx)("span",{className:"rd-spinner"})," ",q?"Switching network...":"Confirm in wallet..."]}),ee&&(0,ge.jsxs)("p",{className:"rd-muted",children:[(0,ge.jsx)("span",{className:"rd-spinner"})," Confirming..."]}),F.txHash&&(0,ge.jsxs)("p",{className:"rd-card-hint",children:["Tx: ",(0,ge.jsx)("span",{style:{fontFamily:"monospace"},children:F.txHash})]}),z&&ae&&(0,ge.jsx)("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),z&&!ae&&(0,ge.jsx)("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."}),Z&&(0,ge.jsx)("div",{className:"rd-callout rd-callout-danger",children:Z})]})]})}var tr=require("react"),kh=require("react-dom");var X=require("react/jsx-runtime");function Wa({requiresIdentity:e=!1}){return(0,X.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,X.jsx)("span",{className:"rd-history-empty-icon","aria-hidden":"true",children:(0,X.jsxs)("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,X.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,X.jsx)("path",{d:"M14 3.8V7h3",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"}),(0,X.jsx)("circle",{cx:"16.5",cy:"16.5",r:"3.7",stroke:"currentColor",strokeWidth:"1.7"}),(0,X.jsx)("path",{d:"M16.5 14.5v2.2l1.4.8",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,X.jsx)("h3",{className:"rd-history-empty-title",children:e?"Connect to view history":"No transfers yet"}),(0,X.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,X.jsxs)("span",{className:"rd-history-empty-live",children:[(0,X.jsx)("span",{"aria-hidden":"true"}),"Updates automatically"]})]})}var ja=56;function Ch(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function vv(e){let t=e.trim().toUpperCase(),r={AWAITING_DEPOSIT:"Waiting for deposit",BSC_FUNDED:"Deposit confirmed",RELAY_PENDING:"Bridging",RELAY_SUBMITTED:"Bridging",BRIDGING:"Bridging",CROSS_PENDING:"Delivering",FINALIZING:"Delivering",EXECUTING:"Delivering",COMPLETED:"Completed",RELAY_REFUNDED:"Refunded",REFUNDED:"Refunded",EXPIRED:"Expired",FAILED:"Failed"}[t];if(r)return r;let o=t.toLowerCase().replace(/_/g," ").trim();return o?`${o[0].toUpperCase()}${o.slice(1)}`:"Processing"}function kv(e){return e==="COMPLETED"?"rd-status-pill rd-status-pill-success":Ch(e)?"rd-status-pill rd-status-pill-failure":"rd-status-pill"}function js(e,t){if(e){if(t===void 0)return e;try{return pn(BigInt(e),t)}catch{return e}}}function Cv(e,t=4){let n=e.indexOf(".");if(n<0)return e;let r=e.slice(0,n+1+t).replace(/0+$/,"").replace(/\.$/,"");return r===""?"0":r}function Rv(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function vh(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function Yd({amount:e,symbol:t,className:n}){let r=e?`${e}${t?` ${t}`:""}`:"",o=(0,tr.useId)(),a=(0,tr.useRef)(null),i=(0,tr.useRef)(null),[s,l]=(0,tr.useState)(!1),[d,p]=(0,tr.useState)({top:-9999,left:-9999,visibility:"hidden"});return(0,tr.useEffect)(()=>{if(!s)return;let h=()=>{let u=a.current,g=i.current;if(!u||!g)return;let x=u.getBoundingClientRect(),y=g.getBoundingClientRect(),f=12,c=8,b=Math.max(f,window.innerWidth-y.width-f),w=Math.min(Math.max(x.left+x.width/2-y.width/2,f),b),k=x.top-y.height-c,C=k>=f?k:x.bottom+c,N=Math.max(f,window.innerHeight-y.height-f),T=Math.min(Math.max(C,f),N),R=window.getComputedStyle(u);p({top:T,left:w,visibility:"visible",backgroundColor:R.getPropertyValue("--rd-text").trim()||"#eef0f6",borderColor:R.getPropertyValue("--rd-border").trim()||"#2a2d3a",boxShadow:R.getPropertyValue("--rd-shadow").trim()||"0 8px 24px rgba(0, 0, 0, 0.35)",color:R.getPropertyValue("--rd-surface").trim()||"#171923"})};return h(),window.addEventListener("resize",h),window.addEventListener("scroll",h,!0),()=>{window.removeEventListener("resize",h),window.removeEventListener("scroll",h,!0)}},[s]),e?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)("span",{ref:a,className:n,"aria-label":r,"aria-describedby":s?o:void 0,"data-full-value":r,onMouseEnter:()=>{p({top:-9999,left:-9999,visibility:"hidden"}),l(!0)},onMouseLeave:()=>l(!1),children:[Cv(e),t?` ${t}`:""]}),s&&typeof document<"u"&&(0,kh.createPortal)((0,X.jsx)("span",{ref:i,id:o,role:"tooltip","data-rd-history-floating-tooltip":"",style:d,children:r}),document.body)]}):(0,X.jsx)("span",{className:n,children:"-"})}function Nv(e){let t=(e.deposits??[]).filter(r=>r.originChainId),n=new Set(t.map(r=>`${r.originChainId}:${(r.originCurrency??"").toLowerCase()}`));if(t.length>0){let r=t[0];return{chainId:r.originChainId,currency:r.originCurrency??"",routes:n.size}}return{chainId:e.originChainId,currency:e.originCurrency,routes:1}}function Sv(e,t){if(!e)return;let n,r;try{n=BigInt(e),r=t.map(s=>BigInt(s.amount))}catch{return}let o=r.reduce((s,l)=>s+l,0n);if(o<=0n)return;let a=r.map(s=>n*s/o),i=a.reduce((s,l)=>s+l,0n);return a[a.length-1]+=n-i,a}function Ws({label:e,chainId:t,txHash:n,amount:r,shared:o,missingLabel:a="Pending"}){let i=n?Us(t,n):void 0;return(0,X.jsxs)("div",{className:"rd-history-step",children:[(0,X.jsx)("span",{className:`rd-history-step-dot${n?" rd-history-step-dot-done":""}`}),(0,X.jsx)("span",{className:"rd-history-step-label",children:e}),(0,X.jsx)("span",{className:"rd-history-step-chain",children:Vo(t)}),r&&(0,X.jsx)(Yd,{amount:r,className:"rd-history-step-amount"}),(0,X.jsxs)("span",{className:"rd-history-step-tx",children:[i?(0,X.jsx)("a",{href:i.url,target:"_blank",rel:"noreferrer",title:n,"aria-label":`${e} transaction on ${Vo(t)}`,children:vh(n)}):n?(0,X.jsx)("span",{title:n,children:vh(n)}):(0,X.jsx)("span",{className:"rd-muted",children:a}),o&&n&&(0,X.jsx)("span",{className:"rd-history-step-shared",title:"Shared by deposits processed together",children:"combined transfer"})]})]})}function Tv(e){let t=e.deposits??[],n=e.amountOut||e.expectedOut||void 0;if(t.length>=2){let i=Sv(n,t);if(i)return t.map((s,l)=>({key:`${e.orderId}:${s.txHash}:${s.blockNumber}`,order:e,chainId:s.originChainId??ja,currency:s.originCurrency??"",routes:1,sentRaw:s.amount,receivedRaw:i[l].toString(),receivedIsEstimate:!0,deposit:s,sharedLegs:!0}))}let{chainId:r,currency:o,routes:a}=Nv(e);return[{key:e.orderId,order:e,chainId:r,currency:o,routes:a,sentRaw:e.amountIn,receivedRaw:n,receivedIsEstimate:!e.amountOut&&!!e.expectedOut,sharedLegs:!1}]}function Gs({orders:e,isLoading:t,error:n,catalog:r,showTitle:o=!0}){let[a,i]=(0,tr.useState)({}),s=l=>i(d=>({...d,[l]:!d[l]}));return(0,X.jsxs)("section",{className:o?"rd-card":"rd-stack","data-rd-orders-list":"",children:[o&&(0,X.jsx)("div",{className:"rd-card-header",children:(0,X.jsx)("h2",{className:"rd-card-title",children:"Transfer history"})}),t&&e.length===0&&(0,X.jsxs)("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[(0,X.jsx)("span",{className:"rd-spinner"})," Loading orders..."]}),n&&(0,X.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load your orders: ",n.message]}),!t&&!n&&e.length===0&&(0,X.jsx)(Wa,{}),e.length>0&&(0,X.jsx)("div",{className:"rd-history-table","data-vaul-no-drag":!0,children:e.flatMap(Tv).map(l=>{let{order:d}=l,p=r?.origins.find(S=>S.chainId===l.chainId&&S.token.address.toLowerCase()===l.currency.toLowerCase()),h=(d.target?r?.targets.find(S=>S.symbol.toLowerCase()===d.target.toLowerCase()):void 0)??r?.targets.find(S=>S.isDefault),u=h?.symbol??r?.destination.symbol??"",g=h?.decimals??r?.destination.decimals,x=r?.origins.find(S=>S.chainId===ja),y=js(l.sentRaw,x?.token.decimals),f=x?.token.symbol??"USDT",c=js(l.receivedRaw,g),b=d.deposits??[],w=!!a[l.key],k=Rv(d.completedAt??d.createdAt),C=vv(d.status),T=d.status==="COMPLETED"||Ch(d.status)?"Details unavailable":"Pending",R=l.receivedIsEstimate?"Estimated on ONEchain":"Received on ONEchain";return(0,X.jsxs)("div",{className:"rd-history-group",children:[(0,X.jsxs)("button",{type:"button",className:"rd-history-row-button",onClick:()=>s(l.key),"aria-expanded":w,"aria-label":`Toggle transfer details: ${C}, ${k}`,children:[(0,X.jsxs)("span",{className:"rd-history-card-top",children:[(0,X.jsx)("span",{className:"rd-history-asset",children:l.routes>1?(0,X.jsxs)(X.Fragment,{children:["Multiple deposits ",(0,X.jsxs)("span",{className:"rd-muted",children:["\xB7 ",l.routes," chains"]})]}):(0,X.jsxs)(X.Fragment,{children:[p?.token.symbol??u," ",(0,X.jsxs)("span",{className:"rd-muted",children:["from ",Vo(l.chainId)]})]})}),(0,X.jsx)("span",{className:kv(d.status),title:d.status,children:C})]}),(0,X.jsxs)("span",{className:"rd-history-card-amounts",children:[(0,X.jsxs)("span",{className:"rd-history-amount-block",children:[(0,X.jsx)("span",{className:"rd-history-amount-label",children:"Processing address"}),(0,X.jsx)(Yd,{amount:y,symbol:f,className:"rd-history-num"})]}),(0,X.jsx)("span",{className:"rd-history-card-arrow","aria-hidden":"true",children:"\u2192"}),(0,X.jsxs)("span",{className:"rd-history-amount-block",children:[(0,X.jsx)("span",{className:"rd-history-amount-label",children:R}),(0,X.jsx)(Yd,{amount:c,symbol:u,className:`rd-history-num rd-history-received${l.receivedIsEstimate?" rd-history-received-estimate":""}`})]})]}),(0,X.jsxs)("span",{className:"rd-history-card-foot",children:[(0,X.jsxs)("span",{className:"rd-history-date",children:[d.completedAt?"Completed":"Started"," \xB7 ",k]}),(0,X.jsx)("span",{className:"rd-history-chevron","aria-hidden":"true",children:(0,X.jsx)(zn,{size:16})})]})]}),w&&(0,X.jsxs)("div",{className:"rd-history-detail",children:[l.deposit?(0,X.jsx)(Ws,{label:"Deposit confirmed",chainId:l.deposit.originChainId??ja,txHash:l.deposit.originTxHash||l.deposit.txHash,amount:js(l.deposit.amount,x?.token.decimals)}):b.length>0?b.map(S=>(0,X.jsx)(Ws,{label:"Deposit confirmed",chainId:S.originChainId??ja,txHash:S.originTxHash||S.txHash,amount:js(S.amount,x?.token.decimals)},`${S.txHash}-${S.blockNumber}`)):(0,X.jsxs)("div",{className:"rd-history-step",children:[(0,X.jsx)("span",{className:"rd-history-step-dot"}),(0,X.jsx)("span",{className:"rd-history-step-label",children:"Deposit confirmed"}),(0,X.jsx)("span",{className:"rd-muted",children:"Details unavailable"})]}),(0,X.jsx)(Ws,{label:"Bridge",chainId:ja,txHash:d.bscBridgeTx,shared:l.sharedLegs,missingLabel:T}),(0,X.jsx)(Ws,{label:"ONEchain delivery",chainId:r?.destination.chainId??612055,txHash:d.deliveryTxHash,shared:l.sharedLegs,missingLabel:T})]})]},l.key)})})]})}var Co=require("react");var Jt=require("react");var Wn=class extends Error{constructor(t,n,r){super(n),this.name="RelayApiError",this.status=t,this.body=r}};function rn(e){let t=e.baseUrl.replace(/\/+$/,"");async function n(r,o){let a={...o?.headers};o?.body!=null&&(a["Content-Type"]="application/json");let i;try{i=await fetch(`${t}${r}`,{...o,headers:a})}catch(l){throw new Wn(0,`network error calling ${r}: ${l.message}`)}let s=await i.text();if(!i.ok){let l=`request to ${r} failed with status ${i.status}`,d;try{d=JSON.parse(s);let p=d;p?.error&&(l=p.error)}catch{d=s||void 0}throw new Wn(i.status,l,d)}try{return JSON.parse(s)}catch{throw new Wn(i.status,`expected a JSON response from ${r} but got ${s?"a non-JSON body":"an empty body"}`,s||void 0)}}return{getConfig(){return n("/v1/config").then(r=>({...r,targets:r.targets??[]}))},getQuote(r){return n("/v1/quote",{method:"POST",body:JSON.stringify(r)})},getDepositAddress(r,o){let a=new URLSearchParams({user:r.user,originChainId:String(r.originChainId),originCurrency:r.originCurrency});return o&&a.set("target",o),n(`/v1/deposit-address?${a.toString()}`)},getOrder(r){return n(`/v1/orders/${encodeURIComponent(r)}`)},listOrders(r){let o=new URLSearchParams({user:r});return n(`/v1/orders?${o.toString()}`).then(a=>a.orders??[])},ordersStreamUrl(r){return`${t}/v1/orders/stream?user=${encodeURIComponent(r)}`},getRecovery(r){let o=new URLSearchParams({user:r.user});return r.target&&o.set("target",r.target),n(`/v1/recovery?${o.toString()}`)}}}var Rh=[{type:"function",name:"deploy",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}],Kd=[{type:"function",name:"execute",stateMutability:"nonpayable",inputs:[],outputs:[]},{type:"function",name:"sweepToUser",stateMutability:"nonpayable",inputs:[{name:"tokenAddr",type:"address"}],outputs:[]}],Zd=[{type:"function",name:"computeAddress",stateMutability:"view",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}];var ko=["0x486BEEc35A9a9915213Ea02AD3709738335F7702","0x3438735303911aBe113AdF14b18eE730cC24893b","0xA3B548Ab23043e6B24A087515fe1306379683533","0x44317d07378390543d99Ee76374E86C1Ef6cF832"];function Hs(e,t){return!e||!t?!1:e.toLowerCase()===t.toLowerCase()}function Iv(e,t){return t.some(n=>Hs(n,e))}function _s(e){if(!e||e.length===0)return ko;let t=new Set,n=[];for(let r of e){if(typeof r!="string"||!ht(r))continue;let o=r.toLowerCase();t.has(o)||(t.add(o),n.push(r))}return n.length>0?n:ko}async function Nh(e,t,{factory:n,forwarder:r,recipient:o,version:a,trusted:i=ko}){if(!n||!r||!o||a===void 0)return{ok:!1,reason:"address verification is missing inputs (factory/forwarder/recipient/version)"};if(!Iv(n,i))return{ok:!1,reason:`factory ${n} is not a recognized deposit-address factory -- refusing to sign against it`};if(!e)return{ok:!1,reason:"no chain connection available to verify the forwarder address"};let s;try{s=await e({chainId:t,address:n,abi:Zd,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 Hs(s,r)?{ok:!0}:{ok:!1,reason:`forwarder address mismatch: the API returned ${r}, but factory ${n} derives ${s} for this account -- refusing to sign`}}async function Sh(e,t,{forwarder:n,recipient:r,version:o,trusted:a=ko}){if(!n||!r||o===void 0)return{ok:!1,reason:"address verification is missing inputs (forwarder/recipient/version)"};if(!e)return{ok:!1,reason:"no BSC chain connection available to verify the deposit forwarder -- add BNB Smart Chain (chain 56) to your wagmi config"};let i=await Promise.all(a.map(async s=>{try{return await e({chainId:t,address:s,abi:Zd,functionName:"computeAddress",args:[r,BigInt(o)]})}catch{return}}));return i.some(s=>Hs(s,n))?{ok:!0}:i.every(s=>s===void 0)?{ok:!1,reason:"could not reach any deposit-address factory on BSC to verify the forwarder"}:{ok:!1,reason:`forwarder address mismatch: ${n} is not the address any known factory derives for this account -- refusing to deposit`}}function Th(e,t){return Hs(e,t)}var Yr=56,Xd={step:"idle"};function Ev(e){return e.tokens?.find(t=>t.recoverable)?.address??e.token}function Ga(e={}){let t=(0,Jt.useRef)(e);t.current=e;let n=e.wallet,r=n?.walletChainId,o=e.recipient,a=o&&ht(o)?o:void 0,[i,s]=(0,Jt.useState)({}),l=(0,Jt.useCallback)((u,g)=>{s(x=>({...x,[u.toLowerCase()]:g}))},[]),d=(0,Jt.useCallback)(u=>u?i[u.toLowerCase()]??Xd:Xd,[i]),p=(0,Jt.useMemo)(()=>Object.values(i).some(u=>u.step==="switching"||u.step==="deploying"||u.step==="recovering"),[i]);return{recover:(0,Jt.useCallback)(async(u,g,x)=>{if(!a||!u?.forwarder)return;let y=u.forwarder;l(y,{step:"switching"});try{if(r!==Yr){if(!n?.switchChain)throw new Error("wallet cannot switch chains");await n.switchChain(Yr)}if(!n?.writeContract||!n?.readContract||!n?.waitForReceipt)throw new Error("wallet is missing contract capabilities required for recovery");let f=await Nh(n.readContract,Yr,{factory:u.factory,forwarder:u.forwarder,recipient:a,version:u.version,trusted:t.current.trustedFactories});if(!f.ok)throw new Error(`address verification failed: ${f.reason}`);let c;if(!u.isDeployed){if(l(y,{step:"deploying"}),c=await n.writeContract({address:u.factory,abi:Rh,functionName:"deploy",args:[a,BigInt(u.version)],chainId:Yr}),l(y,{step:"deploying",deployTxHash:c}),(await n.waitForReceipt({chainId:Yr,hash:c})).status==="reverted")throw new Error(`forwarder deploy reverted on-chain (tx ${c})`);t.current.onChanged?.()}l(y,{step:"recovering",deployTxHash:c});let b=g==="execute"?await n.writeContract({address:u.forwarder,abi:Kd,functionName:"execute",args:[],chainId:Yr}):await n.writeContract({address:u.forwarder,abi:Kd,functionName:"sweepToUser",args:[x??Ev(u)],chainId:Yr});if(l(y,{step:"recovering",deployTxHash:c,actionTxHash:b}),(await n.waitForReceipt({chainId:Yr,hash:b})).status==="reverted")throw new Error(`recovery transaction reverted on-chain (tx ${b})`);l(y,{step:"done",deployTxHash:c,actionTxHash:b}),t.current.onRecoverySuccess?.({action:g,forwarder:u.forwarder,actionTxHash:b,...c?{deployTxHash:c}:{}}),t.current.onChanged?.()}catch(f){let c=f instanceof Error?f:new Error(String(f));s(b=>{let w=y.toLowerCase();return{...b,[w]:{...b[w]??Xd,step:"error",error:c.message}}}),t.current.onError?.(c)}},[a,r,n,l]),stateFor:d,busy:p}}function Ih(e={}){let t=(0,Jt.useRef)(e);t.current=e;let n=(0,Jt.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRecovery: either `client` or `apiBaseUrl` must be provided");return rn({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.recipient,o=r&&ht(r)?r:void 0,[a,i]=(0,Jt.useState)(),[s,l]=(0,Jt.useState)(!1),[d,p]=(0,Jt.useState)(),[h,u]=(0,Jt.useState)(0),g=e.target,x=e.enabled??!0,y=e.refetchInterval;(0,Jt.useEffect)(()=>{if(!o||!x){i(void 0),p(void 0),l(!1);return}let k=!1,C=!1,N=!0;async function T(){if(!(k||C)){C=!0,N&&l(!0);try{let S=await n.getRecovery({user:o,target:g});if(k)return;i(S),p(void 0)}catch(S){if(k)return;let E=S instanceof Error?S:new Error(String(S));p(E),t.current.onError?.(E),E instanceof Wn&&E.status===401&&t.current.onUnauthorized?.()}finally{C=!1,!k&&N&&l(!1),N=!1}}}T();let R=typeof y=="number"&&Number.isFinite(y)&&y>0?setInterval(()=>{T()},y):void 0;return()=>{k=!0,R&&clearInterval(R)}},[n,o,h,g,x,y]);let f=(0,Jt.useCallback)(()=>u(k=>k+1),[]),c=Ga({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:f}),b=(0,Jt.useCallback)(async(k,C)=>{a&&await c.recover(a,k,C)},[c,a]),w=c.stateFor(a?.forwarder);return{info:a,loading:s,error:d,refresh:f,recover:b,recoveryState:w}}var Av="BSC_FUNDED";function Eh(e){if(!e)return 0n;try{let t=BigInt(e);return t>0n?t:0n}catch{return 0n}}function Mv(e,t){return e.target||t}function Qo(e,t=[]){let n=e.find(o=>o.isDefault)?.symbol,r=new Map;for(let o of e){if(!o.info?.forwarder)continue;let a=o.info.forwarder.toLowerCase(),i=r.get(a);if(i){i.targets.push(o.symbol);continue}r.set(a,{forwarder:o.info.forwarder,targets:[o.symbol],info:o.info,deposits:[],depositsTotal:0n})}for(let o of r.values()){let a=new Set(o.targets);for(let i of t){if(i.status!==Av)continue;let s=Mv(i,n);if(!(!s||!a.has(s)))for(let l of i.deposits??[])o.deposits.push({amount:l.amount,originChainId:l.originChainId,originTxHash:l.originTxHash,txHash:l.txHash,blockNumber:l.blockNumber}),o.depositsTotal+=Eh(l.amount)}o.deposits.sort((i,s)=>i.blockNumber-s.blockNumber)}return[...r.values()]}function Ah(e){return e.filter(t=>(t.info.tokens??[]).some(n=>n.recoverable)?!0:Eh(t.info.balance)>0n&&t.info.suggestedAction!=="none")}function Vs(e){return e.reduce((t,n)=>t+(n.info.tokens??[]).filter(r=>r.recoverable).length,0)}var W=require("react/jsx-runtime"),Lv=56;function Dv(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 Pv="This balance may already be processing. Recover only if it remains stuck.",Qs="USDT",Mh="primary";function Ov(e){return`${e} more recoverable under other delivery tokens -- switch the delivery token above to recover ${e===1?"it":"them"}.`}function Bv(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 Dh({message:e}){let[t,n]=(0,Co.useState)("idle");(0,Co.useEffect)(()=>{if(t==="idle")return;let a=window.setTimeout(()=>n("idle"),1500);return()=>window.clearTimeout(a)},[t]);async function r(){if(typeof navigator>"u"||!navigator.clipboard){n("failed");return}try{await navigator.clipboard.writeText(e),n("copied")}catch{n("failed")}}let o=t==="copied"?"Copied technical details":t==="failed"?"Copy failed":"Copy technical details";return(0,W.jsxs)("details",{className:"rd-error-details",children:[(0,W.jsx)("summary",{children:"View technical details"}),(0,W.jsxs)("div",{className:"rd-error-log",children:[(0,W.jsx)("button",{type:"button",className:"rd-error-copy",onClick:()=>{r()},"aria-label":o,"aria-live":"polite",title:o,children:t==="copied"?(0,W.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,W.jsx)("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,W.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),(0,W.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,W.jsx)("code",{children:e})]})]})}function Ha(e){if(!e)return 0n;try{return BigInt(e)}catch{return 0n}}function Dr(e,t){try{return pn(e,t)}catch{return e.toString()}}function Lh(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function zv(e){let t=Ha(e.bridgeMinWei),n=[];for(let a of e.tokens??[]){let i=Ha(a.balance);if(!(i<=0n)){if(a.suggestedAction==="execute"){n.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,action:{kind:"execute"}});continue}if(a.recoverable){n.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,action:{kind:"sweep",tokenAddress:a.address}});continue}n.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,...t>i?{shortfall:t-i,minimum:t}:{}})}}let r=Ha(e.balance),o=n.some(a=>a.action?.kind==="execute");return r>0n&&e.suggestedAction==="execute"&&!o?n.unshift({key:Mh,symbol:Qs,decimals:e.decimals,balance:r,action:{kind:"execute"}}):n.length===0&&r>0n&&e.suggestedAction!=="none"&&n.push({key:Mh,symbol:Qs,decimals:e.decimals,balance:r,action:{kind:"sweep"}}),n}function Fv({deposit:e,decimals:t}){let n=e.originChainId??Lv,r=e.originTxHash||e.txHash,o=r?Us(n,r):void 0;return(0,W.jsxs)("div",{className:"rd-history-step","data-testid":"recovery-deposit-row",children:[(0,W.jsx)("span",{className:"rd-history-step-dot rd-history-step-dot-done"}),(0,W.jsx)("span",{className:"rd-history-step-chain",children:Vo(n)}),(0,W.jsx)("span",{className:"rd-history-step-amount",children:Dr(Ha(e.amount),t)}),(0,W.jsx)("span",{className:"rd-history-step-tx",children:o?(0,W.jsx)("a",{href:o.url,target:"_blank",rel:"noreferrer",title:r,children:Lh(r)}):r?(0,W.jsx)("span",{title:r,children:Lh(r)}):null})]})}function Uv({group:e,showTargetLabel:t,busy:n,state:r,onRecover:o,actingRowKey:a,rowKeyOf:i}){let{info:s}=e,l=zv(s),d=Ha(s.balance),p=l.length===1?`${Dr(l[0].balance,l[0].decimals)}`:`${l.length} assets`,h=e.deposits.length>0&&e.depositsTotal>=d,u=d>e.depositsTotal?d-e.depositsTotal:0n,g=r.step==="switching"||r.step==="deploying"||r.step==="recovering",y=l.find(c=>i(c)===a)?.action?.kind;function f(){if(r.step==="switching")return"Switching to BNB Chain\u2026";if(r.step==="deploying")return"Confirm in wallet\u2026 (1/2 \u2014 preparing your deposit address)";let c=y==="execute"?"continuing ONEchain delivery":"returning funds";return r.deployTxHash?`Confirm in wallet\u2026 (2/2 \u2014 ${c})`:`Confirm in wallet\u2026 (${c})`}return(0,W.jsxs)("div",{className:"rd-recover-group","data-testid":"forwarder-section",children:[t&&(0,W.jsxs)("p",{className:"rd-recover-group-label",children:["Delivery target \xB7 ",(0,W.jsx)("b",{children:e.targets.join(", ")})]}),(0,W.jsxs)("div",{className:"rd-recover-sum",children:[(0,W.jsx)("span",{className:"rd-recover-sum-label",children:"Funds awaiting processing"}),(0,W.jsxs)("span",{className:"rd-recover-sum-value",title:l.length===1?`${p} ${l[0].symbol}`:p,children:[p,l.length===1&&(0,W.jsxs)(W.Fragment,{children:[" ",(0,W.jsx)("span",{className:"rd-recover-sum-unit",children:l[0].symbol})]})]})]}),e.deposits.length>0&&(0,W.jsxs)("details",{className:"rd-recover-made-of",children:[(0,W.jsxs)("summary",{className:"rd-recover-made-of-label",children:["Deposit history \xB7 ",e.deposits.length," ",e.deposits.length===1?"transfer":"transfers"]}),(0,W.jsxs)("div",{className:"rd-recover-made-of-body",children:[e.deposits.map(c=>(0,W.jsx)(Fv,{deposit:c,decimals:s.decimals},`${c.txHash}-${c.blockNumber}`)),!h&&(0,W.jsxs)("p",{className:"rd-token-row-status","data-testid":"deposits-incomplete-note",children:["These transfers explain ",Dr(e.depositsTotal,s.decimals)," of"," ",Dr(d,s.decimals)," ",Qs,". The remaining"," ",Dr(u,s.decimals)," ",Qs," is still included when you act."]})]})]}),(0,W.jsx)("div",{className:"rd-token-list",children:l.map(c=>{let b=i(c),w=g&&a===b;return(0,W.jsxs)("div",{className:"rd-token-row","data-token-symbol":c.symbol,children:[(0,W.jsx)(xo,{symbol:c.symbol,size:26}),(0,W.jsxs)("div",{className:"rd-token-row-info",children:[l.length>1&&(0,W.jsxs)("span",{className:"rd-token-row-amount",children:[Dr(c.balance,c.decimals)," ",(0,W.jsx)("span",{className:"rd-token-row-symbol",children:c.symbol})]}),w?(0,W.jsx)("span",{className:"rd-token-row-step",role:"status","aria-live":"polite",children:f()}):c.shortfall!==void 0&&c.minimum!==void 0?(0,W.jsxs)("span",{className:"rd-token-row-warn",children:["Needs ",(0,W.jsxs)("b",{children:[Dr(c.shortfall,c.decimals)," ",c.symbol]})," more to reach the"," ",Dr(c.minimum,c.decimals)," ",c.symbol," minimum. Add it through"," ",(0,W.jsx)("b",{children:"Deposit to CROSS"})," and both amounts will process together."]}):c.action?(0,W.jsx)("span",{className:"rd-token-row-status",children:c.action.kind==="execute"?"Ready to continue delivery to ONEchain":"Ready to return to your BNB Chain wallet"}):(0,W.jsx)("span",{className:"rd-token-row-status",children:"Waiting for processing"})]}),w?(0,W.jsx)("span",{className:"rd-spinner rd-token-row-spinner"}):c.action&&(0,W.jsx)("button",{type:"button",className:"rd-button-primary rd-token-row-action",onClick:()=>o(c),disabled:n,children:c.action.kind==="execute"?"Continue delivery":"Return to wallet"})]},c.key)})}),!s.isDeployed&&r.step==="idle"&&(0,W.jsxs)("div",{className:"rd-callout rd-callout-warning","data-testid":"two-tx-notice",children:["The first action from this address needs ",(0,W.jsx)("b",{children:"two wallet confirmations"}),": prepare the address, then move the funds. Later actions need one."]}),s.inFlight&&(0,W.jsx)("p",{className:"rd-muted rd-token-row-status",children:s.inFlightReason||Pv}),r.step==="done"&&(0,W.jsx)("div",{className:"rd-callout rd-callout-success",role:"status","aria-live":"polite",children:y==="execute"?"ONEchain delivery restarted.":"Funds returned to your connected BNB Chain wallet."}),r.step==="error"&&r.error&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("div",{className:"rd-callout rd-callout-danger",role:"alert",children:Bv(r.error)}),(0,W.jsx)(Dh,{message:r.error})]})]})}function qs(e){let{info:t,loading:n,error:r,refresh:o}=Ih(Dv(e)),a=n||e.targets!==void 0&&e.targetsLoading===!0,i=Ga({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,Co.useState)(),d=e.targets!==void 0?[...e.targets]:t?[{symbol:e.target??"",isDefault:!0,info:t}]:[],p=Ah(Qo(d,e.orders??[])),h=p.length>0,u=e.targets!==void 0?e.onRecovered:o,g=e.wallet?.walletAddress,x=e.wallet?.getBalance,[y,f]=(0,Co.useState)();return(0,Co.useEffect)(()=>{if(!h||!x||!g){f(void 0);return}let c=!1;return x({chainId:56,address:g}).then(b=>{c||f({value:b.value,decimals:b.decimals})}).catch(()=>{c||f(void 0)}),()=>{c=!0}},[h,x,g]),(0,W.jsxs)("section",{className:e.showTitle??!0?"rd-card":"rd-stack","data-rd-recover-funds":"",children:[(e.showTitle??!0)&&(0,W.jsx)("div",{className:"rd-card-header",children:(0,W.jsx)("h2",{className:"rd-card-title",children:"Recover stuck funds"})}),typeof e.otherTargetsRecoverable=="number"&&e.otherTargetsRecoverable>0&&(0,W.jsx)("div",{className:"rd-callout rd-callout-muted","data-testid":"other-targets-recoverable-note",children:Ov(e.otherTargetsRecoverable)}),a&&(0,W.jsxs)("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[(0,W.jsx)("span",{className:"rd-spinner"})," Checking for recoverable funds\u2026"]}),r&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("div",{className:"rd-callout rd-callout-danger",role:"alert",children:"Couldn't check recoverable funds. Please try again."}),(0,W.jsx)(Dh,{message:r.message})]}),!a&&!r&&!h&&(0,W.jsxs)("div",{className:"rd-recover-empty",role:"status","data-testid":"rd-recover-empty-state",children:[(0,W.jsx)("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:(0,W.jsxs)("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,W.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,W.jsx)("path",{d:"M5 10h14",stroke:"currentColor",strokeWidth:"1.7"}),(0,W.jsx)("path",{d:"m9.2 14 1.7 1.7 3.9-4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,W.jsx)("h3",{className:"rd-recover-sum-value rd-recover-sum-empty rd-recover-empty-title",children:"Nothing to recover"}),(0,W.jsx)("p",{className:"rd-recover-empty-copy",children:"No funds are waiting at your deposit addresses. If funds become stuck, they will appear here."}),u&&(0,W.jsxs)("button",{type:"button",className:"rd-button-secondary rd-recover-empty-refresh",onClick:u,"data-track":"refresh_recovery",children:[(0,W.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,W.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&&!r&&p.map(c=>(0,W.jsx)(Uv,{group:c,showTargetLabel:p.length>1||c.targets.length>1,busy:i.busy,state:i.stateFor(c.forwarder),actingRowKey:s,rowKeyOf:b=>`${c.forwarder.toLowerCase()}:${b.key}`,onRecover:b=>{b.action&&(l(`${c.forwarder.toLowerCase()}:${b.key}`),i.recover(c.info,b.action.kind,b.action.tokenAddress))}},c.forwarder.toLowerCase())),!a&&!r&&h&&(0,W.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:",y&&(0,W.jsxs)(W.Fragment,{children:[" ",(0,W.jsxs)("b",{children:[Dr(y.value,y.decimals)," BNB"]})]}),!y&&" unavailable","."]}),!a&&!r&&h&&(0,W.jsx)("p",{className:"rd-recover-foot",children:"Delivery continues to ONEchain; returned funds go to your connected BNB Chain wallet."})]})}var $t=H(require("react"),1),Tn=H(require("@radix-ui/react-dialog"),1),Ro=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}
|
|
21
|
+
`);var un=require("react/jsx-runtime"),Ph=24;function Oh(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function jv(e,t,n){let r=n?.offsetTop??t.top,o=n?n.offsetTop+n.height:t.bottom,a=Math.max(t.top,r)+Ph,i=Math.min(t.bottom,o)-Ph;return e.top<a?e.top-a:e.bottom>i?e.bottom-i:0}function Wv(){let e=$t.useRef(0),[t,n]=$t.useState({keyboardHeight:0,keyboardOverlap:0,viewportHeight:0});return $t.useEffect(()=>{let r=window.visualViewport;if(!r)return;let o=()=>{let a=Math.max(window.innerHeight,document.documentElement.clientHeight);e.current=Math.max(e.current,a,r.height+r.offsetTop);let i=Math.max(0,e.current-r.height-r.offsetTop),s=Math.max(0,e.current-a),l=Math.max(0,i-s),d=r.height;n(p=>p.keyboardHeight===i&&p.keyboardOverlap===l&&p.viewportHeight===d?p:{keyboardHeight:i,keyboardOverlap:l,viewportHeight:d})};return o(),r.addEventListener("resize",o),r.addEventListener("scroll",o),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o)}},[]),t}function Gv(e){let t=`(max-width: ${e}px)`,[n,r]=$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);r(o.matches);let a=i=>r(i.matches);return o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[t]),n}function br({theme:e="dark",mobileBreakpoint:t=768,drawerDirection:n="bottom",dialogWidth:r,drawerMaxWidth:o,drawerMinWidth:a,style:i,open:s,onOpenChange:l,children:d}){let p=Gv(t),[h,u]=$t.useState(!1),g=s!==void 0,x=g?s:h,y=$t.useCallback(w=>{g||u(w),l?.(w)},[g,l]);Qn(x,$t.useCallback(()=>y(!1),[y]));let f=$t.useMemo(()=>{let w={};return r&&(w["--rd-dialog-width"]=r),o&&(w["--rd-drawer-max-width"]=o),a&&(w["--rd-drawer-min-width"]=a),{...w,...i}},[r,o,a,i]),c=$t.useMemo(()=>({open:x,setOpen:y,isMobile:p,theme:e,drawerDirection:n,portalStyle:f}),[x,y,p,e,n,f]),b=(0,un.jsx)("div",{"data-theme":e,style:f,children:d});return p?(0,un.jsx)(Os.Provider,{value:c,children:(0,un.jsx)(Ro.Drawer.Root,{direction:n,open:x,onOpenChange:y,noBodyStyles:!0,children:b},"drawer")}):(0,un.jsx)(Os.Provider,{value:c,children:(0,un.jsx)(Tn.Root,{open:x,onOpenChange:y,children:b})})}function qo({asChild:e,children:t,dataAttributes:n}){let{isMobile:r}=$n(),o=r?Ro.Drawer.Trigger:Tn.Trigger;return(0,un.jsx)(o,{asChild:e,...n,children:t})}function wr({className:e,ariaTitle:t,children:n}){let{open:r,isMobile:o,theme:a,drawerDirection:i,portalStyle:s}=$n(),{keyboardHeight:l,keyboardOverlap:d,viewportHeight:p}=Wv(),h=Lo(),u=$t.useRef(null),g=$t.useRef(null);$t.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),$t.useEffect(()=>{g.current&&clearTimeout(g.current);let c=document.activeElement;!r&&Oh(c)&&u.current?.contains(c)&&c.blur(),u.current?.querySelectorAll("[data-rd-scroll-area]").forEach(b=>{b.scrollTo?.({top:0,behavior:"auto"})})},[r]);let x=o&&i==="bottom"&&l>0,y=x?{bottom:d,maxHeight:`min(85dvh, calc(${p}px - env(safe-area-inset-top, 0px)))`}:void 0,f=$t.useCallback(c=>{if(!o||i!=="bottom"||!Oh(c.target))return;let b=c.target,w=b.closest("[data-rd-scroll-area]");w&&(g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{let k=jv(b.getBoundingClientRect(),w.getBoundingClientRect(),window.visualViewport);Math.abs(k)>=1&&w.scrollBy?.({top:k,behavior:"auto"}),g.current=null},280))},[i,o]);return o?(0,un.jsxs)(Ro.Drawer.Portal,{children:[(0,un.jsx)(Ro.Drawer.Overlay,{className:"rd-overlay"}),(0,un.jsxs)(Ro.Drawer.Content,{ref:u,className:Ie("rd-drawer-content",e),"data-theme":a,"data-rd-shell":"drawer","data-rd-in-app":h?"true":"false","data-rd-keyboard-adjusted":x?"true":"false",style:{...s,...y},onFocusCapture:f,children:[(0,un.jsx)(Ro.Drawer.Title,{className:"rd-sr-only",children:t}),(0,un.jsx)("div",{className:"rd-drawer-handle"}),n]})]}):(0,un.jsxs)(Tn.Portal,{children:[(0,un.jsx)(Tn.Overlay,{className:"rd-overlay"}),(0,un.jsxs)(Tn.Content,{className:Ie("rd-dialog-content",e),"data-theme":a,"data-rd-shell":"dialog",style:s,children:[(0,un.jsx)(Tn.Title,{className:"rd-sr-only",children:t}),(0,un.jsx)(Tn.Description,{className:"rd-sr-only",children:t}),n]})]})}var xe=require("react/jsx-runtime");function Hv({id:e,activeView:t,recoverableCount:n,onChange:r}){let o=["deposit","history","recover"];return(0,xe.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,xe.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:()=>r(a),onKeyDown:s=>{if(!["ArrowLeft","ArrowRight","Home","End"].includes(s.key))return;s.preventDefault();let l=o.indexOf(a),d=s.key==="Home"?0:s.key==="End"?o.length-1:(l+(s.key==="ArrowRight"?1:-1)+o.length)%o.length,p=o[d];r(p),document.getElementById(`${e}-${p}-tab`)?.focus()},children:[(0,xe.jsx)("span",{children:i}),a==="recover"&&n>0&&(0,xe.jsx)("span",{className:"rd-recovery-badge","data-testid":"recovery-badge",children:n})]},a)})})}function zh({className:e}){let t=za();return(0,xe.jsx)(Me,{feature:"relay",children:(0,xe.jsx)(wr,{ariaTitle:"Deposit",className:["rd-deposit-shell",e??t.className].filter(Boolean).join(" "),children:(0,xe.jsx)(_v,{})})})}function _v(){let e=za(),{theme:t}=$n(),n=lh(),r=Bh.useId();if(!n)return null;let{activeView:o,setActiveView:a,recoveryOpen:i,resolvedApiBaseUrl:s,wallet:l,catalog:d,catalogLoading:p,catalogError:h,origin:u,setOrigin:g,amount:x,setAmount:y,recipient:f,setRecipient:c,recipientValid:b,balance:w,balanceLoading:k,insufficientBalance:C,depositAddress:N,depositAddressLoading:T,depositAddressError:R,arrivalStatus:S,quote:E,quoteLoading:A,quoteError:F,canDeposit:D,deposit:G,depositState:M,targetOptions:j,selectedTarget:le,setSelectedTarget:oe,showAmountInput:ne,minNotice:Q,showRecipientInput:ee,showTargetSelector:z,showOneClick:q,showConnectPrompt:ae,showRecipientHint:Z,canRecover:pe,recoverableCount:Se,recoveryTargetsLoading:Ue,recoveryTargets:fe,recoveryOrders:Re,historyOrdersLoading:Ce,historyOrdersError:tt,refreshRecovery:Le,trustedFactories:$e,amountHint:wt,amountSmallestUnits:Ge,onMax:Qe}=n;return(0,xe.jsxs)("div",{className:"rd-root rd-wizard","data-theme":t,"data-rd-scroll-area":!0,children:[(0,xe.jsx)(Hv,{id:r,activeView:o,recoverableCount:Se,onChange:a}),i&&(0,xe.jsx)("div",{className:"rd-deposit-tab-panel",id:`${r}-recover-panel`,role:"tabpanel","aria-labelledby":`${r}-recover-tab`,children:pe?(0,xe.jsx)(qs,{client:e.client,apiBaseUrl:s,recipient:f,target:le?.symbol,wallet:l,trustedFactories:$e,targets:(d?.targets.length??0)>0?fe:void 0,targetsLoading:Ue,orders:Re,onRecovered:Le,onRecoverySuccess:e.onRecoverySuccess,onError:e.onError,showTitle:!1}):(0,xe.jsxs)("div",{className:"rd-recover-empty",role:"status","data-variant":"unavailable","data-testid":"rd-recovery-unavailable-note",children:[(0,xe.jsx)("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:(0,xe.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,xe.jsx)("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),(0,xe.jsx)("path",{d:"M8 10V7.5a4 4 0 0 1 8 0V10",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),(0,xe.jsx)("circle",{cx:"12",cy:"15",r:"1.2",fill:"currentColor"})]})}),(0,xe.jsx)("h3",{className:"rd-recover-empty-title",children:"Recovery unavailable"}),(0,xe.jsx)("p",{className:"rd-recover-empty-copy",children:"Connect a wallet that supports recovery transactions to continue."})]})}),o==="history"&&(0,xe.jsx)("div",{className:"rd-deposit-tab-panel",id:`${r}-history-panel`,role:"tabpanel","aria-labelledby":`${r}-history-tab`,children:b&&f.trim()?(0,xe.jsx)(Gs,{orders:Re,isLoading:p||Ce,error:h??tt,catalog:d,showTitle:!1}):(0,xe.jsx)(Wa,{requiresIdentity:!0})}),o==="deposit"&&(0,xe.jsxs)("div",{className:"rd-deposit-tab-panel",id:`${r}-deposit-panel`,role:"tabpanel","aria-labelledby":`${r}-deposit-tab`,children:[p&&(0,xe.jsxs)("div",{className:"rd-skeleton-form","data-testid":"rd-source-skeleton","aria-hidden":"true",children:[(0,xe.jsx)(Fs,{}),ae&&e.onRequestConnect&&(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-cta"}),(0,xe.jsxs)("section",{className:"rd-stack",children:[(0,xe.jsxs)("div",{className:"rd-field",children:[(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"18%"}}),(0,xe.jsxs)("div",{className:"rd-field-row",children:[(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),ne&&(0,xe.jsxs)("div",{className:"rd-field",children:[(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"34%"}}),(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),(0,xe.jsxs)("div",{className:"rd-field",children:[(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"24%"}}),(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),(ee||f.trim().length>0)&&(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"58%",marginTop:"0.5rem"}}),(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),ee&&(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"82%"}})]})]}),(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-notice"})]}),p&&(0,xe.jsx)("p",{className:"rd-sr-only",role:"status",children:"Loading deposit options..."}),h&&(0,xe.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Failed to load configuration: ",h.message]}),Z&&(0,xe.jsx)("div",{className:"rd-callout rd-callout-muted",children:ee?"Connect a wallet or provide a recipient address to fetch your deposit address.":"Connect a wallet to fetch your deposit address."}),d&&u&&(0,xe.jsx)(xh,{catalog:d,origin:u,onChangeOrigin:g,amount:x,onChangeAmount:y,showAmountInput:ne,minNotice:Q,amountHint:wt,onMax:Qe,recipient:f,onChangeRecipient:c,showRecipientInput:ee,recipientValid:b,balance:w,balanceLoading:k,insufficientBalance:C,targetOptions:j,selectedTarget:le,onChangeTarget:oe,showTargetSelector:z,quote:E,quoteLoading:A,quoteError:F,depositAddress:N,depositAddressLoading:T,depositAddressError:R,arrivalStatus:S,amountSmallestUnits:Ge,depositState:M,onDeposit:()=>{G()},canDeposit:D&&q,oneClickEnabled:q,locked:ae,onRequestConnect:e.onRequestConnect})]})]})}var Ys=require("react/jsx-runtime");function Fh({asChild:e,children:t}){return(0,Ys.jsx)(Me,{feature:"relay",children:(0,Ys.jsx)(qo,{asChild:e??t!=null,children:t??(0,Ys.jsx)("button",{type:"button","data-track":"open",children:"Deposit"})})})}var We=H(require("react"),1);var ke=require("react");var Ks=require("react");function Uh(e,t){let[n,r]=(0,Ks.useState)(e);return(0,Ks.useEffect)(()=>{let o=setTimeout(()=>r(e),t);return()=>clearTimeout(o)},[e,t]),n}var Vv=500,Wh=56,jh={chainId:Wh,token:"0x55d398326f99059fF775485246999027B3197955"},Gh=3e4,Qv=5e3;function qv(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?Gh:Math.max(Qv,e*1e3)}var Yv=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function Jd(e,t){let n=e.trim();if(!n)return null;try{let r=Bs(n,t);return r>0n?r:null}catch{return null}}function Hh(e={}){let t=(0,ke.useRef)(e);t.current=e;let n=(0,ke.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useDepositAddress: either `client` or `apiBaseUrl` must be provided");return rn({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.wallet,o=r?.walletAddress,a=!!o,i=r?.walletChainId,[s,l]=(0,ke.useState)(),[d,p]=(0,ke.useState)(!0),[h,u]=(0,ke.useState)();(0,ke.useEffect)(()=>{let re=!1;return p(!0),n.getConfig().then(Te=>{re||(l(Te),u(void 0))}).catch(Te=>{re||u(Te instanceof Error?Te:new Error(String(Te)))}).finally(()=>{re||p(!1)}),()=>{re=!0}},[n]);let g=e.chains,x=(0,ke.useMemo)(()=>{if(!s)return[];if(!g||g.length===0)return s.origins;let re=new Set(g);return s.origins.filter(Te=>re.has(Te.chainId))},[s,g]),y=(0,ke.useMemo)(()=>s?{...s,origins:x}:void 0,[s,x]),[f,c]=(0,ke.useState)();(0,ke.useEffect)(()=>{if(f||x.length===0)return;let re=t.current.defaultToken,Te=re?x.find(U=>U.chainId===re.chainId&&U.token.address.toLowerCase()===re.address.toLowerCase()):void 0;c(Te??x[0])},[x,f]);let[b,w]=(0,ke.useState)(),k=(0,ke.useCallback)(()=>{nt(void 0),an(!1),Yt(!1),V(!1),Rt(void 0)},[]),C=(0,ke.useCallback)(re=>{c(re),w(void 0),k()},[k]),N=f?.kind==="svm",[T,R]=(0,ke.useState)(""),S=e.amount!==void 0?e.amount:T,E=(0,ke.useCallback)(re=>{R(re),w(void 0),k()},[k]),A=Uh(S,Vv),F=f?Jd(A,f.token.decimals):null,D=f?Jd(S,f.token.decimals):null,[G,M]=(0,ke.useState)(""),[j,le]=(0,ke.useState)(!1),oe=e.recipient!==void 0?e.recipient:G,ne=(0,ke.useCallback)(re=>{M(re),le(!0),w(void 0),k()},[k]);(0,ke.useEffect)(()=>{e.recipient===void 0&&o&&!j&&M(o)},[o,j,e.recipient]);let Q=oe.length===0||ht(oe),ee=oe.length>0&&ht(oe)?oe:void 0,[z,q]=(0,ke.useState)(),[ae,Z]=(0,ke.useState)(!1),[pe,Se]=(0,ke.useState)(0),Ue=r?.getBalance;(0,ke.useEffect)(()=>{if(!Ue||!o||!f||N){q(void 0),Z(!1);return}let re=!1;Z(!0);let Te=f.token.address.toLowerCase()===Fa?void 0:f.token.address;return Ue({chainId:f.chainId,address:o,token:Te}).then(U=>{re||q({...U,formatted:pn(U.value,U.decimals)})}).catch(()=>{re||q(void 0)}).finally(()=>{re||Z(!1)}),()=>{re=!0}},[Ue,o,f,N,pe]);let fe=z?.value??null,Re=!N&&D!==null&&fe!==null&&D>fe,[Ce,tt]=(0,ke.useState)(),[Le,$e]=(0,ke.useState)(!1),[wt,Ge]=(0,ke.useState)(),Qe=f?.chainId,He=f?.token.address,Dt=e.target;(0,ke.useEffect)(()=>{if(!ee||!Qe||!He){tt(void 0),Ge(void 0),$e(!1);return}let re=!1;return tt(void 0),Ge(void 0),$e(!0),(Dt?n.getDepositAddress({user:ee,originChainId:Qe,originCurrency:He},Dt):n.getDepositAddress({user:ee,originChainId:Qe,originCurrency:He})).then(U=>{re||(tt(U),Ge(void 0),t.current.onDepositAddress?.(U))}).catch(U=>{if(re)return;tt(void 0);let Oe=U instanceof Error?U:new Error(String(U));Ge(Oe),t.current.onError?.(Oe)}).finally(()=>{re||$e(!1)}),()=>{re=!0}},[n,ee,Qe,He,Dt]);let tn=[Qe??"",(He??"").toLowerCase(),(ee??"").toLowerCase(),Dt??"",S.trim()].join("|"),yt=(0,ke.useRef)(tn);(0,ke.useEffect)(()=>{yt.current!==tn&&(yt.current=tn,w(void 0),k())},[tn,k]);let[Pt,Tt]=(0,ke.useState)(),[nn,It]=(0,ke.useState)(!1),[ut,Ot]=(0,ke.useState)(),rt=F?.toString();(0,ke.useEffect)(()=>{if(!Qe||!He||!rt){Tt(void 0),Ot(void 0),It(!1);return}let re=!1,Te,U=!0;async function Oe(){U&&It(!0);let $=Gh;try{let Pe=await n.getQuote({originChainId:Qe,originCurrency:He,amount:rt});if(re)return;Tt(Pe),Ot(void 0),$=qv(Pe.ttl)}catch(Pe){if(re)return;Tt(void 0),Ot(Pe instanceof Error?Pe:new Error(String(Pe)))}finally{re||It(!1),U=!1}re||(Te=setTimeout(Oe,$))}return Oe(),()=>{re=!0,Te&&clearTimeout(Te)}},[n,Qe,He,rt]);let[on,ft]=(0,ke.useState)(!1),[fn,Ze]=(0,ke.useState)(!1),[lt,nt]=(0,ke.useState)(),[Et,Rt]=(0,ke.useState)(),[Xe,an]=(0,ke.useState)(!1),[sn,Yt]=(0,ke.useState)(!1),[ln,V]=(0,ke.useState)(!1),ve=r?.waitForReceipt,Ne=(0,ke.useRef)(void 0);(0,ke.useEffect)(()=>{if(!lt||!f||!ve)return;let re=!1;return an(!0),Yt(!1),V(!1),ve({chainId:f.chainId,hash:lt}).then(Te=>{re||(Yt(!0),V(Te.status==="reverted"),Se(U=>U+1),Te.status!=="reverted"&<!==Ne.current&&(Ne.current=lt,t.current.onDeposited?.(lt)))}).catch(Te=>{re||Rt(Te instanceof Error?Te.message:String(Te))}).finally(()=>{re||an(!1)}),()=>{re=!0}},[lt,ve]);let ze=i!==void 0&&f!==void 0&&i!==f.chainId,ot=on||fn,Kt=b??Et,Bt="idle";Kt?Bt="error":sn?Bt="confirmed":Xe?Bt="confirming":ot&&(Bt=on?"switching":"pending");let Cn={phase:Bt,isSubmitting:ot,isConfirming:Xe,isConfirmed:sn,needsSwitch:ze,txHash:lt,reverted:sn&&ln,error:Kt},Rn=!!(f&&Ce&&Ce.originChainId===f.chainId&&Ce.originCurrency.toLowerCase()===f.token.address.toLowerCase()),O=!!(r?.sendTransaction&&r?.writeContract&&r?.readContract&&r?.waitForReceipt),De=!!(a&&O&&f&&!N&&Ce&&Rn&&D&&D>0n&&!Re&&!ot&&!Xe),qe=(0,ke.useCallback)(async()=>{if(N||!f||!Ce||!r?.sendTransaction||!r?.writeContract)return;w(void 0);let re=Jd(S,f.token.decimals);if(!re||re<=0n){w("enter an amount to use the one-click deposit");return}let Te=f.token.address.toLowerCase()===Fa,U=Ce.depositAddress,Oe=await Sh(r?.readContract,Wh,{forwarder:Ce.forwarder,recipient:ee,version:Ce.version,trusted:t.current.trustedFactories});if(!Oe.ok){w(`address verification failed: ${Oe.reason}`);return}if(f.chainId===jh.chainId&&f.token.address.toLowerCase()===jh.token.toLowerCase()&&!Th(U,Ce.forwarder)){w("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(ze){if(!r?.switchChain)throw new Error("wallet cannot switch chains");ft(!0);try{await r.switchChain(f.chainId)}finally{ft(!1)}}k(),Ze(!0);try{let Pe=Te?await r.sendTransaction({chainId:f.chainId,to:U,value:re}):await r.writeContract({chainId:f.chainId,address:f.token.address,abi:Yv,functionName:"transfer",args:[U,re]});nt(Pe)}finally{Ze(!1)}}catch(Pe){w(Pe.message)}},[N,f,Ce,S,ze,r,ee,k]);return{address:o,isConnected:a,catalog:y,catalogLoading:d,catalogError:h,origin:f,setOrigin:C,recipient:oe,setRecipient:ne,recipientValid:Q,amount:S,setAmount:E,balance:z,balanceLoading:ae,insufficientBalance:Re,isSvmOrigin:N,depositAddress:Ce?.depositAddress,depositAddressResult:Ce,depositAddressLoading:Le,depositAddressError:wt,quote:Pt,quoteLoading:nn,quoteError:ut,canDeposit:De,deposit:qe,depositState:Cn}}var nr=require("react");var Kv=3e4,Zv=300;function Pr(e){let t=(0,nr.useRef)(e);t.current=e;let{client:n,enabled:r=!0,live:o=!0}=e,a=e.refetchInterval??e.fallbackPollMs??Kv,i=e.recipient&&ht(e.recipient)?e.recipient:void 0,[s,l]=(0,nr.useState)([]),[d,p]=(0,nr.useState)(!1),[h,u]=(0,nr.useState)(),[g,x]=(0,nr.useState)(!1),[y,f]=(0,nr.useState)(),[c,b]=(0,nr.useState)(0);return(0,nr.useEffect)(()=>{if(!i){l([]),u(void 0),p(!1),x(!1),f(void 0),b(0);return}if(!r){l([]),u(void 0),p(!1),x(!1),f(void 0),b(0);return}let w=!1,k=!0,C,N=0,T=0;async function R(){let F=++N;T+=1,k&&p(!0);try{let D=await n.listOrders(i);if(w)return;F===N&&(l(D),u(void 0))}catch(D){if(w)return;let G=D instanceof Error?D:new Error(String(D));F===N&&(u(G),t.current.onError?.(G))}finally{T-=1,!w&&F===N&&(p(!1),x(!0),f(i),b(D=>D+1)),k=!1}}function S(){C&&clearTimeout(C),C=setTimeout(()=>{C=void 0,w||R()},Zv)}R();let E;o&&typeof EventSource<"u"&&(E=new EventSource(n.ordersStreamUrl(i)),E.addEventListener("orders-changed",S),E.onopen=()=>{S()});let A=o&&Number.isFinite(a)&&a>0?setInterval(()=>{T===0&&R()},a):void 0;return()=>{w=!0,C&&clearTimeout(C),A&&clearInterval(A),E?.close()}},[n,i,r,o,a]),{orders:s,ordersLoading:d,ordersError:h,ordersInitialized:g,ordersForRecipient:y,ordersRevision:c}}var Zs=require("react");function _h(e,t){if(t){let n=e.find(r=>r.symbol===t);if(n)return n}return e.find(n=>n.isDefault)??e[0]}function Vh({catalogTargets:e,filter:t,defaultTarget:n}){let r=(0,Zs.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,Zs.useState)(()=>_h(r,n)?.symbol),i=(o!==void 0?r.find(l=>l.symbol===o):void 0)??_h(r,n);function s(l){r.some(d=>d.symbol===l)&&a(l)}return{options:r,selected:i,setSelected:s}}var Xv={dev:"https://dev-relay-protocol-api.onechain.nexus",stage:"https://dev-relay-protocol-api.onechain.nexus",production:"https://relay-protocol-api.onechain.nexus"};function Kr(e){return e.apiBaseUrl?e.apiBaseUrl:Xv[it(e.environment)]}var Js=require("react/jsx-runtime"),Qh=1e3;function Jv(e,t,n,r,o){let a=e.requireWalletConnection??e.showRecipientInput===!1,i=n.walletAddress&&ht(n.walletAddress)?n.walletAddress:void 0;return{client:e.client,apiBaseUrl:r,wallet:n,chains:e.chains,recipient:a?i??"":e.recipient,amount:a&&!i?"":e.amount,defaultToken:e.defaultToken,target:t,trustedFactories:o,onDepositAddress:e.onDepositAddress,onDeposited:e.onDeposited,onError:e.onError}}function Xs(e,t){let n=e.trim();if(!n)return 0n;try{let r=Bs(n,t);return r>0n?r:0n}catch{return 0n}}function $v(e,t,n,r){if(t!==void 0&&e.forwarderVersion!==t)return!1;let o=e.target?.trim();return o?!!(n&&o.toLowerCase()===n.toLowerCase()):r}function qh(e,t,n){return`${e}:${t.toLowerCase()}:${n}`}function e2(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Yh({open:e,children:t}){let[n]=We.useState(sh);return(0,Js.jsxs)(_d.Provider,{value:n,children:[e&&(0,Js.jsx)(t2,{store:n}),t]})}function t2({store:e}){let t=za(),{showTargetSelector:n=!0}=t,r=t.requireWalletConnection??t.showRecipientInput===!1,o=!!(t.walletAddress&&ht(t.walletAddress)),[a,i]=We.useState("deposit"),s=a==="recover",l=We.useCallback(Y=>{i(xt=>(typeof Y=="function"?Y(xt==="recover"):Y)?"recover":"deposit")},[]);We.useEffect(()=>{Je("relay","opened")},[]);let[d,p]=We.useState(void 0),h=We.useMemo(()=>Kr({apiBaseUrl:t.apiBaseUrl,environment:t.environment}),[t.apiBaseUrl,t.environment]),u=We.useMemo(()=>({walletAddress:t.walletAddress,walletChainId:t.walletChainId,sendTransaction:t.sendTransaction,writeContract:t.writeContract,readContract:t.readContract,switchChain:t.switchChain,waitForReceipt:t.waitForReceipt,getBalance:t.getBalance}),[t.walletAddress,t.walletChainId,t.sendTransaction,t.writeContract,t.readContract,t.switchChain,t.waitForReceipt,t.getBalance]),g=it(t.environment),x=Xt("apps.json",g,Y=>({min:Bn(Y?.relay?.minDepositAmount,g),max:Bn(Y?.relay?.maxDepositAmount,g),trustedFactories:hi(Y,g)})),y=We.useMemo(()=>t.trustedFactories??_s(x?.trustedFactories),[t.trustedFactories,x?.trustedFactories]),{isConnected:f,catalog:c,catalogLoading:b,catalogError:w,origin:k,setOrigin:C,amount:N,setAmount:T,recipient:R,setRecipient:S,recipientValid:E,balance:A,balanceLoading:F,insufficientBalance:D,depositAddress:G,depositAddressResult:M,depositAddressLoading:j,depositAddressError:le,quote:oe,quoteLoading:ne,quoteError:Q,canDeposit:ee,deposit:z,depositState:q}=Hh(Jv(t,d,u,h,y)),{options:ae,selected:Z,setSelected:pe}=Vh({catalogTargets:c?.targets??[],filter:t.targetTokens,defaultTarget:t.defaultTarget});We.useEffect(()=>{p(Z?.symbol)},[Z?.symbol]);let Se=t.amount===void 0&&!t.hideAmount,Ue=!r&&(t.showRecipientInput??!0)&&t.recipient===void 0,fe=E&&R.trim().length>0&&ht(R),Re=!r&&t.recipient!==void 0&&t.recipient.trim().length>0,Ce=r?!o||!fe:!f&&!Re&&!fe,tt=!!c&&!fe&&!Ce,Le=(t.showRecovery??!1)&&o&&!!(u.writeContract&&u.readContract&&u.waitForReceipt),$e=We.useMemo(()=>t.client?t.client:rn({baseUrl:h}),[t.client,h]),[wt,Ge]=We.useState({}),[Qe,He]=We.useState(!1),[Dt,tn]=We.useState(0),yt=We.useCallback(()=>tn(Y=>Y+1),[]),Pt=q.isConfirmed,Tt=fe&&(!!M||a!=="deposit"),{orders:nn,ordersLoading:It,ordersError:ut,ordersInitialized:Ot,ordersForRecipient:rt}=Pr({client:$e,recipient:Tt?R:void 0,enabled:Tt,refetchInterval:Qh}),on=nn,ft=Z??c?.targets.find(Y=>Y.isDefault),fn=ft?.symbol??c?.destination.symbol,Ze=ft?.isDefault??!0,lt=M?.version,nt=We.useMemo(()=>nn.filter(Y=>$v(Y,lt,fn,Ze)),[nn,lt,fn,Ze]),Et=We.useRef(void 0),[Rt,Xe]=We.useState(),[an,sn]=We.useState(),Yt=`${R.toLowerCase()}:${fn?.toLowerCase()??""}:${lt??""}`;We.useEffect(()=>{let Y=rt?.toLowerCase()===R.toLowerCase();if(!Tt||!Ot||!Y||ut){Tt||(Et.current=void 0,Xe(void 0),sn(void 0));return}let xt=new Set(nt.map(_e=>_e.orderId)),mt=new Set(nt.flatMap(_e=>(_e.deposits??[]).map(_n=>qh(_e.orderId,_n.txHash,_n.blockNumber)))),Zt=Et.current;if(!Zt||Zt.key!==Yt){Et.current={key:Yt,orderIds:xt,depositKeys:mt,statuses:new Map(nt.map(_e=>[_e.orderId,_e.status]))},Xe(void 0),sn(void 0);return}let Ut,et=0n,xn=!1;for(let _e of nt)for(let _n of _e.deposits??[]){let zr=qh(_e.orderId,_n.txHash,_n.blockNumber);if(!Zt.depositKeys.has(zr)){Ut??(Ut=_e);try{et+=BigInt(_n.amount),xn=!0}catch{}}}Ut??(Ut=nt.find(_e=>!Zt.orderIds.has(_e.orderId))),Ut??(Ut=nt.find(_e=>Zt.statuses.get(_e.orderId)!==_e.status));for(let _e of xt)Zt.orderIds.add(_e);for(let _e of mt)Zt.depositKeys.add(_e);for(let _e of nt)Zt.statuses.set(_e.orderId,_e.status);Ut&&(Xe(Ut.orderId),xn&&sn(et))},[Yt,nt,rt,Tt,R,ut,Ot]),We.useEffect(()=>{let Y=c?.targets??[];if(!Le||!fe||Y.length===0){Ge({}),He(!1);return}let xt=!1;return He(!0),Promise.all(Y.map(mt=>$e.getRecovery({user:R,target:mt.symbol}).catch(()=>{}))).then(mt=>{if(xt)return;let Zt={};Y.forEach((Ut,et)=>{let xn=mt[et];xn&&(Zt[Ut.symbol]=xn)}),Ge(Zt),He(!1)}),()=>{xt=!0}},[$e,Le,fe,R,c,Pt,Dt]);let ln=We.useMemo(()=>(c?.targets??[]).map(Y=>({symbol:Y.symbol,isDefault:Y.isDefault,info:wt[Y.symbol]})).filter(Y=>Y.info!==void 0),[c,wt]),V=We.useMemo(()=>Vs(Qo(ln)),[ln]),[ve,Ne]=We.useState(void 0),[ze,ot]=We.useState(),Kt=!!c&&(c?.targets.length??0)>0&&!d;We.useEffect(()=>{if(!fe||!k||!M||Kt){Ne(void 0),ot(void 0);return}let Y=!1,xt=!1,mt=M.forwarder.toLowerCase();Ne(void 0),ot(void 0);async function Zt(){if(!(Y||xt)){xt=!0;try{let et=await $e.getRecovery({user:R,target:d||void 0});if(Y)return;if(et?.forwarder&&et.forwarder.toLowerCase()!==mt){Ne(void 0),ot(void 0);return}if(ot(et),!et||et.suggestedAction!=="sweep"){Ne(void 0);return}let xn;try{xn=BigInt(et.balance)}catch{Ne(void 0);return}let _e=Number(et.decimals);if(xn<=0n||!Number.isInteger(_e)||_e<0){Ne(void 0);return}let _n=et.tokens?.find(zr=>zr.address?.toLowerCase()===et.token?.toLowerCase()&&zr.symbol)?.symbol;Ne({balance:xn,decimals:_e,symbol:_n})}catch{}finally{xt=!1}}}Zt();let Ut=setInterval(()=>{Zt()},Qh);return()=>{Y=!0,clearInterval(Ut)}},[$e,fe,R,d,Kt,k,M,Pt]);let Bt=We.useCallback(()=>{!k||!A||T(pn(A.value,k.token.decimals))},[k,A,T]),Cn=We.useRef(!1),Rn=!!G;We.useEffect(()=>{!Rn||Cn.current||(Cn.current=!0,Je("relay","deposit_address_shown"))},[Rn]);let O=q.txHash;We.useEffect(()=>{O&&Je("relay","deposit_submitted")},[O]);let De=(()=>{let Y=Number(x?.min);return Number.isFinite(Y)&&Y>=0?String(x?.min):"6"})(),qe=(()=>{let Y=Number(x?.max);return Number.isFinite(Y)&&Y>0?String(x?.max):void 0})(),re=(()=>{if(!k)return 0n;let Y=Xs(De,k.token.decimals),xt=BigInt(k.minAmount);return Y>xt?Y:xt})(),Te=k?pn(re,k.token.decimals):De,U=(()=>{if(!k||!ve||re<=0n)return;let Y=k.token.decimals,xt=ve.decimals,mt=Y>=xt?ve.balance*10n**BigInt(Y-xt):ve.balance/10n**BigInt(xt-Y);if(mt>=re)return;let Zt=re-mt;return{pending:pn(ve.balance,xt),pendingSymbol:ve.symbol,remaining:pn(Zt,Y)}})(),Oe=c?.origins.find(Y=>Y.chainId===56&&!!(ze?.token&&Y.token.address.toLowerCase()===ze.token.toLowerCase()))??c?.origins.find(Y=>Y.chainId===56&&Y.token.symbol.toUpperCase()==="USDT"),$=Number.isInteger(ze?.decimals)&&(ze?.decimals??-1)>=0?ze.decimals:Oe?.token.decimals,Pe=ze?.tokens?.find(Y=>Y.address?.toLowerCase()===ze.token?.toLowerCase()&&Y.symbol)?.symbol??Oe?.token.symbol,In=an!==void 0&&$!==void 0?pn(an,$):void 0,Xr=(()=>{if(!k||$===void 0)return;let Y=k.token.decimals;if($>=Y)return re*10n**BigInt($-Y);let xt=10n**BigInt(Y-$);return(re+xt-1n)/xt})(),rr=Rt?nt.find(Y=>Y.orderId===Rt):void 0,or=rr??nt.find(Y=>Y.status==="BSC_FUNDED"||Y.status==="BRIDGE_INITIATED"||Y.status==="BRIDGE_PENDING"),$o=(()=>{if(!or||Xr===void 0)return!1;try{return BigInt(or.amountIn)>=Xr}catch{return!1}})(),wl=(()=>{if(!ze||Xr===void 0)return!1;try{return BigInt(ze.balance)>0n&&BigInt(ze.balance)>=Xr}catch{return!1}})(),yl=(()=>{let Y={amount:In,symbol:Pe,backendStatus:or?.status};return!M||!Tt||!Ot?{phase:"connecting",...Y}:rt?.toLowerCase()!==R.toLowerCase()||ut?{phase:"unavailable",...Y}:rr?.status==="COMPLETED"?{phase:"completed",...Y,backendStatus:rr.status}:rr&&e2(rr.status)?{phase:"failed",...Y,backendStatus:rr.status}:or?.status==="BRIDGE_INITIATED"||or?.status==="BRIDGE_PENDING"?{phase:"processing",...Y}:or?.status==="BSC_FUNDED"&&$o||wl?{phase:"funded",...Y}:rr?{phase:"detected",...Y,backendStatus:rr.status}:{phase:"waiting",...Y}})(),Br=k&&qe?Xs(qe,k.token.decimals):void 0,Jr=k&&N.trim()?Xs(N,k.token.decimals):0n,oi=!!(k&&Jr>0n&&Jr<re),$r=!!(k&&Br!==void 0&&Jr>0n&&Jr>Br),ai=(()=>{if(k){if(oi)return`Amount is below the ${Te} ${k.token.symbol} minimum.`;if($r)return`Amount is above the ${qe} ${k.token.symbol} maximum.`}})(),eo=t.showOneClickDeposit??!1,ii=k&&N.trim()?Xs(N,k.token.decimals).toString():void 0,xl={activeView:a,setActiveView:i,recoveryOpen:s,setRecoveryOpen:l,resolvedApiBaseUrl:h,wallet:u,catalog:c,catalogLoading:b,catalogError:w,origin:k,setOrigin:C,amount:N,setAmount:T,recipient:R,setRecipient:S,recipientValid:E,balance:A,balanceLoading:F,insufficientBalance:D,depositAddress:G,depositAddressLoading:j,depositAddressError:le,arrivalStatus:yl,quote:oe,quoteLoading:ne,quoteError:Q,canDeposit:ee,deposit:z,depositState:q,targetOptions:ae,selectedTarget:Z,setSelectedTarget:pe,showAmountInput:Se,minNotice:k?{min:Te,symbol:k.token.symbol,...U}:void 0,showRecipientInput:Ue,showTargetSelector:n,showOneClick:eo,showConnectPrompt:Ce,showRecipientHint:tt,canRecover:Le,recoverableCount:V,recoveryTargetsLoading:Qe,recoveryTargets:ln,recoveryOrders:on,historyOrdersLoading:It,historyOrdersError:ut,refreshRecovery:yt,trustedFactories:y,amountHint:ai,amountSmallestUnits:ii,onMax:Se&&A&&A.value>0n?Bt:void 0};return We.useLayoutEffect(()=>{e.publish(xl)}),We.useLayoutEffect(()=>()=>e.publish(null),[e]),null}var $s=require("react/jsx-runtime");function n2(e){let{theme:t="dark",mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e,[h,u]=el.useState(!1),g=l!==void 0,x=g?l:h,y=el.useCallback(f=>{g||u(f),d?.(f)},[g,d]);return(0,$s.jsx)(Hd.Provider,{value:e,children:(0,$s.jsx)(Yh,{open:x,children:(0,$s.jsx)(br,{theme:t,mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:x,onOpenChange:y,children:p})})})}var Yo=Object.assign(n2,{Trigger:Fh,Content:zh});var tl=require("react"),$d=(0,tl.createContext)(null);function ec(){let e=(0,tl.useContext)($d);if(!e)throw new Error("RelayHistory compound components must be used within <RelayHistory>");return e}var Ln=H(require("react"),1);var Zr=require("react/jsx-runtime");function Kh({className:e}){let t=ec(),{open:n}=$n();return Ln.useEffect(()=>{n&&Je("relay","history_opened")},[n]),(0,Zr.jsx)(Me,{feature:"relay",children:(0,Zr.jsx)(wr,{ariaTitle:"Transfer history",className:e??t.className,children:(0,Zr.jsx)(r2,{})})})}function r2(){let e=ec(),{theme:t}=$n(),n=Ln.useMemo(()=>{if(e.client)return e.client;let f=Kr({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return rn({baseUrl:f})},[e.client,e.apiBaseUrl,e.environment]),r=e.recipient??e.walletAddress,o=!!(r&&ht(r)),[a,i]=Ln.useState(),[s,l]=Ln.useState(!1),[d,p]=Ln.useState(),h=Ln.useRef(e.onError);h.current=e.onError,Ln.useEffect(()=>{if(!o){i(void 0),l(!1),p(void 0);return}let f=!1;return i(void 0),l(!0),p(void 0),n.getConfig().then(c=>{f||i(c)}).catch(c=>{if(f)return;let b=c instanceof Error?c:new Error(String(c));p(b),h.current?.(b)}).finally(()=>{f||l(!1)}),()=>{f=!0}},[n,o]);let{orders:u,ordersLoading:g,ordersError:x}=Pr({client:n,recipient:o?r:void 0,enabled:!!a,onError:e.onError}),y=Ln.useCallback(f=>{if(!e.onOutlink)return;let b=f.target.closest?.('a[target="_blank"]');b?.href&&e.onOutlink(b.href)},[e.onOutlink]);return(0,Zr.jsx)("div",{className:"rd-root rd-wizard","data-theme":t,children:o?(0,Zr.jsx)("div",{onClick:y,children:(0,Zr.jsx)(Gs,{orders:u,isLoading:s||g,error:d??x,catalog:a,showTitle:!1})}):(0,Zr.jsx)(Wa,{requiresIdentity:!0})})}var nl=require("react/jsx-runtime");function Zh({asChild:e,children:t}){return(0,nl.jsx)(Me,{feature:"relay",children:(0,nl.jsx)(qo,{asChild:e??t!=null,children:t??(0,nl.jsx)("button",{type:"button","data-track":"open",children:"History"})})})}var tc=require("react/jsx-runtime");function o2(e){let{theme:t="dark",mobileBreakpoint:n,drawerDirection:r,dialogWidth:o="min(640px, calc(100vw - 32px))",drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e;return(0,tc.jsx)($d.Provider,{value:e,children:(0,tc.jsx)(br,{theme:t,mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p})})}var nc=Object.assign(o2,{Trigger:Zh,Content:Kh});var Gn=H(require("react"),1);var Dn=H(require("react"),1);var rl=[],a2=3e4;function Xh({client:e,recipient:t}){let[n,r]=Dn.useState({targets:rl}),[o,a]=Dn.useState(0),i=Dn.useRef(void 0),s=Dn.useRef(void 0),l=t&&ht(t)?t.toLowerCase():void 0;Dn.useEffect(()=>{if(!l){r({targets:rl});return}let y=!1,f=i.current;if(!f||f.client!==e||f.recipientKey!==l||f.generation!==o){let c=(async()=>{let b,w=[];try{w=(await e.getConfig()).targets}catch(R){b=R instanceof Error?R:new Error(String(R))}let k=w.length===0?[()=>e.getRecovery({user:l})]:w.map(R=>()=>e.getRecovery({user:l,target:R.symbol})),C=await Promise.all(k.map(async R=>{try{return{info:await R()}}catch(S){return{error:S instanceof Error?S:new Error(String(S))}}})),N=w.length===0?C[0]?.info?[{symbol:"",isDefault:!0,info:C[0].info}]:[]:w.flatMap((R,S)=>C[S]?.info?[{symbol:R.symbol,isDefault:R.isDefault,info:C[S].info}]:[]),T=C.find(R=>R.error)?.error;return{targets:N,badgeFailed:!!(b||T&&N.length===0),error:b??T}})().catch(b=>({targets:rl,badgeFailed:!0,error:b instanceof Error?b:new Error(String(b))}));f={client:e,recipientKey:l,generation:o,promise:c},i.current=f,c.finally(()=>{s.current={client:e,recipientKey:l,at:Date.now()},i.current?.promise===c&&(i.current=void 0)})}return f.promise.then(c=>{y||r({recipientKey:l,targets:c.targets,badgeFailed:c.badgeFailed,error:c.error})}),()=>{y=!0}},[e,l,o]);let d=Dn.useCallback(()=>a(y=>y+1),[]),p=Dn.useCallback(()=>{if(!l)return;let y=i.current;if(y?.client===e&&y.recipientKey===l)return;let f=s.current;f?.client===e&&f.recipientKey===l&&Date.now()-f.at<a2||a(c=>c+1)},[e,l]),h=l&&n.recipientKey===l?n.targets:rl,u=l&&n.recipientKey===l?n.error:void 0,g=!!(l&&n.recipientKey!==l),x=!!(l&&n.recipientKey===l&&n.badgeFailed);return Dn.useMemo(()=>({count:x?0:Vs(Qo(h)),targets:h,loading:g,error:u,refresh:d,refreshIfStale:p}),[h,g,x,u,d,p])}var ol=require("react"),rc=(0,ol.createContext)(null);function oc(){let e=(0,ol.useContext)(rc);if(!e)throw new Error("RelayRecovery compound components must be used within <RelayRecovery>");return e}function ac(){return oc().props}function Jh(){return oc().recovery}function $h(){return oc().recovery.count}var No=H(require("react"),1);var yr=require("react/jsx-runtime");function e0({className:e}){let t=ac(),{open:n}=$n();return No.useEffect(()=>{n&&Je("relay","recovery_opened")},[n]),(0,yr.jsx)(Me,{feature:"relay",children:(0,yr.jsx)(wr,{ariaTitle:"Recover stuck funds",className:e??t.className,children:(0,yr.jsx)(i2,{})})})}function i2(){let e=ac(),{targets:t,loading:n,refresh:r}=Jh(),{theme:o}=$n(),a=No.useMemo(()=>Kr({apiBaseUrl:e.apiBaseUrl,environment:e.environment}),[e.apiBaseUrl,e.environment]),i=No.useMemo(()=>e.client?e.client:rn({baseUrl:a}),[e.client,a]),s=No.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())),p=d?l:void 0,h=it(e.environment),u=Xt("apps.json",h,b=>hi(b,h)),g=No.useMemo(()=>e.trustedFactories??_s(u),[e.trustedFactories,u]),x=!!(e.writeContract&&e.readContract&&e.waitForReceipt),y=!!p&&x,f=p,{orders:c}=Pr({client:i,recipient:y?f:void 0,enabled:y,live:!1});return(0,yr.jsxs)("div",{className:"rd-root rd-wizard","data-theme":o,children:[!l&&(0,yr.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-connect-note",children:"Connect a wallet to check recoverable funds."}),l&&!d&&(0,yr.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-recipient-note",children:"Recovery is only available for the connected wallet."}),d&&!x&&(0,yr.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-unsupported-note",children:"This wallet can't sign recovery transactions."}),y&&(0,yr.jsx)(qs,{client:e.client,apiBaseUrl:a,recipient:p,wallet:s,trustedFactories:g,targets:t,targetsLoading:n,orders:c,onRecovered:r,onRecoverySuccess:e.onRecoverySuccess,showTitle:!1,onError:e.onError})]})}var al=require("react/jsx-runtime");function t0({asChild:e,children:t}){let n=$h();return(0,al.jsx)(Me,{feature:"relay",children:(0,al.jsx)(qo,{asChild:e??t!=null,dataAttributes:{"data-rd-recovery-count":n},children:t??(0,al.jsx)("button",{type:"button","data-track":"open",children:"Recover"})})})}var ic=require("react/jsx-runtime");function s2(e){let{theme:t="dark",mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e,[h,u]=Gn.useState(!1),g=l!==void 0,x=g?l:h,y=Gn.useCallback(N=>{g||u(N),d?.(N)},[g,d]),f=Gn.useMemo(()=>{if(e.client)return e.client;let N=Kr({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return rn({baseUrl:N})},[e.client,e.apiBaseUrl,e.environment]),c=e.walletAddress&&ht(e.walletAddress)?e.walletAddress:void 0,b=c&&(!e.recipient||ht(e.recipient)&&e.recipient.toLowerCase()===c.toLowerCase())?c:void 0,w=Xh({client:f,recipient:b});Gn.useEffect(()=>{x&&w.refreshIfStale()},[x,w.refreshIfStale]);let k=Gn.useRef(void 0);Gn.useEffect(()=>{!x||!w.error||k.current===w.error||(k.current=w.error,e.onError?.(w.error))},[x,w.error,e.onError]);let C=Gn.useMemo(()=>({props:e,recovery:w}),[e,w]);return(0,ic.jsx)(rc.Provider,{value:C,children:(0,ic.jsx)(br,{theme:t,mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:x,onOpenChange:y,children:p})})}var sc=Object.assign(s2,{Trigger:t0,Content:e0});var Pn=require("react");function lc(e={}){let t=(0,Pn.useRef)(e);t.current=e;let n=(0,Pn.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayConfig: either `client` or `apiBaseUrl` must be provided");return rn({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.enabled??!0,o=e.refetchInterval,[a,i]=(0,Pn.useState)(),[s,l]=(0,Pn.useState)(!1),[d,p]=(0,Pn.useState)(),[h,u]=(0,Pn.useState)(0);(0,Pn.useEffect)(()=>{if(!r){i(void 0),l(!1),p(void 0);return}let x=!1,y=!1;i(void 0),l(!0),p(void 0);async function f(){if(!(x||y)){y=!0;try{let b=await n.getConfig();if(x)return;i(b),p(void 0)}catch(b){if(x)return;let w=b instanceof Error?b:new Error(String(b));p(w),t.current.onError?.(w)}finally{y=!1,x||l(!1)}}}f();let c=typeof o=="number"&&Number.isFinite(o)&&o>0?setInterval(()=>{f()},o):void 0;return()=>{x=!0,c&&clearInterval(c)}},[n,r,h,o]);let g=(0,Pn.useCallback)(()=>u(x=>x+1),[]);return{config:a,loading:s,error:d,refresh:g}}var r0=require("@tanstack/react-query"),Hn=require("react");var l2=1,n0=new WeakMap;function d2(e){let t=n0.get(e);if(t!==void 0)return t;let n=l2++;return n0.set(e,n),n}function dc(e={}){let t=(0,Hn.useRef)(e);t.current=e;let n=(0,Hn.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayRecovery: either `client` or `apiBaseUrl` must be provided");return rn({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.recipient,o=r&&ht(r)?r:void 0,a=e.target,i=e.query,s=(0,Hn.useMemo)(()=>d2(n),[n]),l=(0,Hn.useMemo)(()=>["relay","recovery",s,o??null,a??null],[s,o,a]),d=(0,r0.useQuery)({retry:!1,...i,queryKey:l,queryFn:async()=>{if(!o)throw new Error("useRelayRecovery: a valid EVM recipient is required");return n.getRecovery({user:o,target:a})},enabled:o?i?.enabled:!1}),p=(0,Hn.useRef)(0);(0,Hn.useEffect)(()=>{let y=d.error,f=d.errorUpdatedAt;!y||f===p.current||(p.current=f,t.current.onError?.(y),y instanceof Wn&&y.status===401&&t.current.onUnauthorized?.())},[d.error,d.errorUpdatedAt]);let h=(0,Hn.useCallback)(()=>{d.refetch()},[d.refetch]),u=Ga({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:h}),g=d.data,x=(0,Hn.useCallback)(async(y,f)=>{g&&await u.recover(g,y,f)},[u,g]);return{info:g,loading:d.isLoading,error:d.error??void 0,isFetching:d.isFetching,refresh:h,recover:x,recoveryState:u.stateFor(g?.forwarder)}}var st=require("react/jsx-runtime"),c2={bscBridge:"https://bscscan.com/tx/",crossFinalize:"https://scan.crosstoken.io/tx/",crossExecute:"https://scan.crosstoken.io/tx/"},p2={bscBridge:"Bridge tx (BSC)",crossFinalize:"Finalize tx (CROSS)",crossExecute:"Execute tx (CROSS)"};function u2(e){return e==="done"?"\u2713":e==="active"?"\u25CF":""}function o0(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function f2(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 pc({orderId:e,order:t,error:n}){let r=!t&&!n;return(0,st.jsxs)("section",{className:"rd-card",children:[(0,st.jsxs)("div",{className:"rd-card-header",children:[(0,st.jsx)("h2",{className:"rd-card-title",children:"4. Status"}),t&&(0,st.jsx)("span",{className:`rd-status-pill${t.status==="COMPLETED"?" rd-status-pill-success":o0(t.status)?" rd-status-pill-failure":""}`,children:t.status})]}),(0,st.jsxs)("p",{className:"rd-card-hint",children:["Order ",e]}),r&&(0,st.jsxs)("p",{className:"rd-muted",children:[(0,st.jsx)("span",{className:"rd-spinner"})," Loading status..."]}),n&&(0,st.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load order status: ",n.message]}),t&&(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)("ol",{className:"rd-stepper",children:t.steps.map((o,a)=>(0,st.jsxs)("li",{className:f2(o.status),children:[(0,st.jsxs)("div",{className:"rd-stepper-rail",children:[(0,st.jsx)("span",{className:"rd-stepper-dot",children:u2(o.status)}),a<t.steps.length-1&&(0,st.jsx)("span",{className:"rd-stepper-line"})]}),(0,st.jsxs)("div",{className:"rd-stepper-body",children:[(0,st.jsx)("div",{className:"rd-stepper-label",children:o.label}),o.key==="bridge"&&t.txs.bscBridge&&(0,st.jsx)("div",{className:"rd-stepper-meta",children:(0,st.jsx)(cc,{orderTxs:t.txs,txKey:"bscBridge"})}),o.key==="deliver"&&(t.txs.crossFinalize||t.txs.crossExecute)&&(0,st.jsxs)("div",{className:"rd-stepper-meta",children:[t.txs.crossFinalize&&(0,st.jsx)(cc,{orderTxs:t.txs,txKey:"crossFinalize"}),t.txs.crossExecute&&(0,st.jsx)(cc,{orderTxs:t.txs,txKey:"crossExecute"})]})]})]},o.key))}),o0(t.status)&&(0,st.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,st.jsx)("div",{className:"rd-callout rd-callout-success",children:"crossd delivered. This order is complete."})]})]})}function cc({orderTxs:e,txKey:t}){let n=e[t];return n?(0,st.jsxs)("a",{href:`${c2[t]}${n}`,target:"_blank",rel:"noreferrer",children:[p2[t],": ",n.slice(0,10),"..."]}):null}function _a(e){return`${e.chainId}:${e.address.toLowerCase()}`}function il(e,t){return _a(e)===_a(t)}function Va(e,t){if(t)return e.find(n=>il(n,t))}function Ko(e,t,n){return t?{fromTokens:(n==="swap"?[t.swap.from]:t.bridge.from).map(o=>Va(e,o)).filter(o=>!!o),targetToken:Va(e,t.target)}:{fromTokens:[],targetToken:void 0}}function Qa(e,t){return e.some(n=>n.chainId===t.chainId&&n.address.toLowerCase()===t.address.toLowerCase())}function a0(e){let t=/^v?(\d+(?:\.\d+)*)(?:-([0-9A-Za-z.-]+))?$/.exec(e.trim());return t?{parts:t[1].split(".").map(n=>Number(n)),prerelease:t[2]??null}:null}function m2(e,t){let n=a0(e),r=a0(t);if(!n||!r)return null;let o=Math.max(n.parts.length,r.parts.length);for(let a=0;a<o;a+=1){let i=(n.parts[a]??0)-(r.parts[a]??0);if(i!==0)return i<0?-1:1}return n.prerelease===r.prerelease?0:n.prerelease===null?1:r.prerelease===null||n.prerelease<r.prerelease?-1:1}function i0(e,t=no){if(!e)return!0;let n=m2(t,e);return n===null?!0:n>=0}var s0={swap:"swap",bridge:"bridge",transfer:"transferCrypto",stake:"stake"};function Zo(e,t){return t?.[s0[e]]??e!=="transfer"}function Xo(e,t){return i0(t?.[s0[e]])}function qa(e,t,n){return Zo(e,t)&&Xo(e,n)}var l0={dev:"https://stg.oneusd.money/",stage:"https://stg.oneusd.money/",production:"https://www.oneusd.money/"};function d0(e){let t=e.trim().toLowerCase().replace(/\.$/,"");return t==="oneusd.money"||t.endsWith(".oneusd.money")}function c0(e,t){return e?.items?.find(({id:r,type:o})=>r.toLowerCase()==="oneusd"||o.toLowerCase()==="oneusd")?.url[t]}var sl=H(require("react"),1);var g2="contracts.json",h2=/^0x[0-9a-fA-F]{40}$/;function p0(e){return typeof e=="string"&&h2.test(e)?e:void 0}function b2(e,t,n){let r=p0(n);if(r)return r;let o=e?.envToNetwork?.[t]??(t==="production"?"mainnet":"testnet"),a=e?.soneusd?.VAULT;return p0(typeof a=="string"?a:a?.[o])}function u0(e,t){let[n,r]=sl.useState(void 0);sl.useEffect(()=>{let a=!0;return r(void 0),kr(g2,e).then(i=>{a&&r(i)}),()=>{a=!1}},[e]);let o=b2(n,e,t);return{loading:n===void 0&&!o,address:o}}var f0=(1n<<256n)-1n,uc=[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],ll=[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"previewDeposit",stateMutability:"view",inputs:[{name:"assets",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"paused",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bool"}]},{type:"function",name:"deposit",stateMutability:"nonpayable",inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],outputs:[{name:"shares",type:"uint256"}]}];function Ya(e){if(typeof e=="bigint")return e;if(typeof e=="number"&&Number.isSafeInteger(e)||typeof e=="string"&&/^(0x[0-9a-fA-F]+|\d+)$/.test(e))return BigInt(e);throw new Error("Unexpected contract read result")}var dl=H(require("react"),1);function m0(e){let[t,n]=dl.useState(null);return dl.useEffect(()=>{if(!e)return;let r=!0;return td().then(o=>{r&&n(o)}).catch(()=>{}),()=>{r=!1}},[e]),t}function g0(e,t){return t==="bridge"?!0:e==="bridge"||e==="bridge-swap"||e==="swap-bridge"}function w2(e){if(!e)return"";let[t="0",n=""]=e.replace(/,/g,"").split("."),o=(t.replace(/^0+(?=\d)/,"")||"0").replace(/\B(?=(\d{3})+(?!\d))/g,","),a=n.slice(0,6).replace(/0+$/,"");return a?`${o}.${a}`:o}function y2(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function h0(e,t){return g0(e.pathType,t)?"Bridging":"Swapping"}function b0(e,t){let n=w2(e.toAmount);if(g0(e.pathType,t)){let r=`arriving on ${y2(e.toToken.chainId)}`;return n?`${n} ${r}`:r}return n?`${n} Swapped`:"Transaction completed"}var Qt=require("react/jsx-runtime");function w0(e){return(0,Qt.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,Qt.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 y0(e){return(0,Qt.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[(0,Qt.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,Qt.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 x0(e){return(0,Qt.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[(0,Qt.jsx)("rect",{x:"4",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,Qt.jsx)("rect",{x:"14",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,Qt.jsx)("rect",{x:"4",y:"14",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,Qt.jsx)("path",{d:"M14 14h2v2h-2zM18 18h2v2h-2z",fill:"currentColor"})]})}function v0(e){return(0,Qt.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[(0,Qt.jsx)("ellipse",{cx:"12",cy:"6.5",rx:"7",ry:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),(0,Qt.jsx)("path",{d:"M5 6.5v4c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-4",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),(0,Qt.jsx)("path",{d:"M5 10.5v4c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-4",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),(0,Qt.jsx)("path",{d:"M5 14.5v3c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-3",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function cl(e){return(0,Qt.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,Qt.jsx)("path",{d:"m9 6 6 6-6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function pl(e){return(0,Qt.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,Qt.jsx)("path",{d:"m6 6 12 12M18 6 6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}var en=H(require("react"),1);var ul=H(require("react"),1),x2={dev:"https://stg-crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview",stage:"https://stg-crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview",production:"https://crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview"},v2=6e4,k0=new Map,fc=new Map;function k2(e){let t=x2[e],n=k0.get(t);if(n&&n.expiresAt>Date.now())return Promise.resolve(n.value);let r=fc.get(t);if(r)return r;let o=(async()=>{let a=await fetch(t,{cache:"no-store"});if(!a.ok)throw new Error(`Failed to fetch sONEUSD yield: ${a.status}`);let i=await a.json();if(i.code!==200)throw new Error(`sONEUSD yield API error: ${i.code}`);let s=i.data?.yield,l=s?.available&&Number.isFinite(s.apr_bps)&&Number.isFinite(s.apy_bps)?{aprBps:s.apr_bps,apyBps:s.apy_bps}:null;return k0.set(t,{value:l,expiresAt:Date.now()+v2}),l})().finally(()=>{fc.delete(t)});return fc.set(t,o),o}function C0(e){let t=Math.trunc(e/100),n=Math.abs(Math.trunc(e%100));return`${t}.${String(n).padStart(2,"0")}`}function R0(e,t){let[n,r]=ul.useState(void 0);return ul.useEffect(()=>{if(!t)return;let o=!0;return k2(e).then(a=>{o&&r(a)}).catch(()=>{o&&r(null)}),()=>{o=!1}},[t,e]),n}var Ye=require("react/jsx-runtime"),So="sONEUSD",C2=300,fl=6,N0=[25,50,75,100];function S0(e,t){return t>=100?e:e*BigInt(t)/100n}function T0(e){return e instanceof Error?e.message:typeof e=="string"?e:"Transaction failed"}function R2(e,t){let n=e.replace(/[^\d.]/g,""),[r="",...o]=n.split(".");return o.length===0?r:`${r}.${o.join("").slice(0,t)}`}function N2(e,t,n,r){let[o,a]=en.useState(null),[i,s]=en.useState(null),[l,d]=en.useState(0),p=en.useCallback(()=>d(u=>u+1),[]),{readContract:h}=e;return en.useEffect(()=>{if(!r){a(null);return}let u=!1;s(null);let g=r,x={chainId:t.chainId,address:t.address,abi:uc},y={chainId:t.chainId,address:n,abi:ll};return Promise.all([h({...x,functionName:"balanceOf",args:[g]}),h({...x,functionName:"allowance",args:[g,n]}),h({...y,functionName:"balanceOf",args:[g]}),h({...y,functionName:"paused",args:[]})]).then(([f,c,b,w])=>{u||a({balance:Ya(f),allowance:Ya(c),shares:Ya(b),paused:w===!0})}).catch(f=>{u||s(T0(f))}),()=>{u=!0}},[h,t.address,t.chainId,n,r,l]),{position:o,error:i,refetch:p}}function S2(e,t,n,r){let[o,a]=en.useState(null);return en.useEffect(()=>{if(r===null){a(null);return}let i=!1,s=setTimeout(()=>{e({chainId:t.chainId,address:n,abi:ll,functionName:"previewDeposit",args:[r]}).then(l=>{i||a(Ya(l))}).catch(()=>{i||a(null)})},C2);return()=>{i=!0,clearTimeout(s)}},[r,e,t.chainId,n]),o}function I0({env:e,walletAddress:t,walletChainId:n,token:r,vaultAddress:o,ports:a,locked:i,onRequestConnect:s,onBack:l,onClose:d,onSubmitted:p,onFailed:h}){let[u,g]=en.useState(""),[x,y]=en.useState("idle"),[f,c]=en.useState(null),b=en.useRef(!0);en.useEffect(()=>(b.current=!0,()=>{b.current=!1}),[]);let{position:w,error:k,refetch:C}=N2(a,r,o,t),N=R0(e,!0),T=en.useMemo(()=>u.trim()?Nr(u,r.decimals):null,[u,r.decimals]),R=T&&"value"in T?T.value:null,S=R!==null&&w!==null&&R>w.balance,E=T&&"error"in T?T.error:S?`Exceeds your ${r.symbol} balance.`:null,A=S2(a.readContract,r,o,R!==null&&!S?R:null),F=x!=="idle",D=R!==null&&w!==null&&w.allowance<R,G=!F&&!i&&!!t&&w!==null&&!w.paused&&R!==null&&!S,M=en.useCallback(Q=>{if(!w||F)return;let ee=S0(w.balance,Q);g(ee>0n?cr(ee,r.decimals,r.decimals):""),c(null)},[F,w,r.decimals]),j=R!==null&&w!==null&&w.balance>0n?N0.find(Q=>S0(w.balance,Q)===R)??null:null,le=en.useCallback(async()=>{if(!G||!t||R===null||!w)return;let Q=t;c(null);try{if(n!==void 0&&n!==r.chainId){if(!a.switchChain)throw new Error(`Switch your wallet to chain ${r.chainId} first.`);y("switching"),await a.switchChain(r.chainId)}if(w.allowance<R){y("approving");let z=await a.writeContract({chainId:r.chainId,address:r.address,abi:uc,functionName:"approve",args:[o,f0]});if(a.waitForReceipt&&(y("confirming-approval"),(await a.waitForReceipt({chainId:r.chainId,hash:z})).status!=="success"))throw new Error("Approval reverted.");if(!b.current)return;C()}y("staking");let ee=await a.writeContract({chainId:r.chainId,address:o,abi:ll,functionName:"deposit",args:[R,Q]});if(!b.current)return;y("idle"),g(""),p({txHash:ee,chainId:r.chainId,amount:R,amountText:cr(R,r.decimals,fl)})}catch(ee){if(!b.current)return;let z=T0(ee);y("idle"),c(z),h(z)}},[R,G,h,p,a,w,C,r.address,r.chainId,r.decimals,o,t,n]),oe=x==="switching"?"Switching network...":x==="approving"?`Approve ${r.symbol} in your wallet...`:x==="confirming-approval"?"Confirming approval...":x==="staking"?"Confirm in your wallet...":D?`Approve ${r.symbol}`:"Stake",ne=f??E??k;return(0,Ye.jsxs)("div",{className:"gou-chooser-body gou-stake","data-busy":F?"true":"false",children:[(0,Ye.jsx)("button",{type:"button",className:"gou-close",onClick:d,disabled:F,"aria-label":"Close",children:(0,Ye.jsx)(pl,{})}),(0,Ye.jsxs)("header",{className:"gou-intro gou-stake-header",children:[(0,Ye.jsx)("button",{type:"button",className:"gou-stake-back",onClick:l,disabled:F,"aria-label":"Back",children:(0,Ye.jsx)(cl,{})}),(0,Ye.jsxs)("h2",{children:["Stake ",r.symbol]})]}),(0,Ye.jsxs)("form",{className:"gou-stake-form",onSubmit:Q=>{Q.preventDefault(),le()},children:[(0,Ye.jsxs)("div",{className:"gou-stake-row",children:[(0,Ye.jsx)("label",{htmlFor:"gou-stake-amount",children:"Amount"}),(0,Ye.jsxs)("span",{children:["Balance:"," ",(0,Ye.jsxs)("strong",{className:"gou-stake-balance",children:[w?cr(w.balance,r.decimals,fl):t?"\u2026":"0"," ",r.symbol]})]})]}),(0,Ye.jsxs)("div",{className:"gou-stake-input","data-invalid":ne?"true":"false",children:[(0,Ye.jsx)("input",{id:"gou-stake-amount",type:"text",inputMode:"decimal",autoComplete:"off",placeholder:"0",value:u,disabled:F,onChange:Q=>{g(R2(Q.target.value,r.decimals)),c(null)}}),(0,Ye.jsx)("span",{children:r.symbol})]}),(0,Ye.jsx)("div",{className:"gou-stake-quick",role:"group","aria-label":"Quick amount",children:N0.map(Q=>(0,Ye.jsx)("button",{type:"button","aria-pressed":j===Q,disabled:F||!w||w.balance===0n,onClick:()=>M(Q),"data-track":"stake_quick_amount","data-track-id":String(Q),children:Q>=100?"MAX":`${Q}%`},Q))}),ne&&(0,Ye.jsx)("p",{className:"gou-stake-error",role:"alert",children:ne}),(0,Ye.jsxs)("dl",{className:"gou-stake-estimate",children:[N&&(0,Ye.jsxs)("div",{children:[(0,Ye.jsx)("dt",{title:"Annualized without compounding. Trailing 7-day vault yield.",children:"APR"}),(0,Ye.jsxs)("dd",{className:"gou-stake-apr",children:[C0(N.aprBps),"%"]})]}),(0,Ye.jsxs)("div",{children:[(0,Ye.jsx)("dt",{children:"You receive"}),(0,Ye.jsx)("dd",{children:A!==null?`\u2248 ${cr(A,r.decimals,fl)} ${So}`:`0 ${So}`})]}),(0,Ye.jsxs)("div",{children:[(0,Ye.jsxs)("dt",{children:["Your ",So]}),(0,Ye.jsx)("dd",{className:"gou-stake-shares",children:w?`${cr(w.shares,r.decimals,fl)} ${So}`:t?"\u2026":`0 ${So}`})]})]}),w?.paused&&(0,Ye.jsx)("p",{className:"gou-stake-error",role:"alert",children:"Staking is paused right now. Try again later."}),t?(0,Ye.jsx)("button",{type:"submit",className:"gou-stake-submit",disabled:!G,"data-track":"stake_submit",children:oe}):(0,Ye.jsx)("button",{type:"button",className:"gou-stake-submit",onClick:s,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})]})]})}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:28px;padding:32px}.gou-close{position:absolute;top:24px;right:24px;display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;padding:0;border:0;border-radius:9999px;background:transparent;color:var(--gou-muted);cursor:pointer}.gou-close:hover{background:var(--gou-card-hover);color:var(--gou-text)}.gou-close svg{width:20px;height:20px}.gou-intro{display:flex;flex-direction:column;gap:6px;padding:0 32px 0 0;text-align:left}.gou-intro h2{margin:0;color:var(--gou-text);font-size:20px;font-weight:650;line-height:1.6}.gou-intro-link{display:inline-flex;width:fit-content;align-items:center;gap:4px;color:var(--ds-accent-primary-default, #7e54f4);font-size:14px;font-weight:600;line-height:1.5;text-decoration:none}.gou-intro-link-icon{flex-shrink:0}.gou-intro-link>span{text-decoration:underline;text-underline-offset:3px}.gou-intro-link:focus-visible{outline:2px solid #f3742e;outline-offset:3px;border-radius:4px}.gou-actions{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}.gou-action{display:flex;width:100%;min-width:0;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--gou-border);border-radius:12px;background:var(--gou-card);color:var(--gou-text);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s ease,background .15s ease}.gou-action:hover:not(:disabled){border-color:#f3742e;background:var(--gou-card-hover)}.gou-action:disabled{cursor:not-allowed;opacity:.5}.gou-action:focus-visible{outline:2px solid #f3742e;outline-offset:2px}.gou-action-icon{display:inline-flex;width:32px;height:32px;flex-shrink:0;align-items:center;justify-content:center;border:1px solid var(--gou-border);border-radius:9px;color:var(--gou-text);transition:border-color .15s ease,color .15s ease}.gou-action:hover:not(:disabled) .gou-action-icon{border-color:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-default, #7e54f4)}.gou-action-icon svg{width:17px;height:17px}.gou-action-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:2px}.gou-action-title{display:flex;min-width:0;align-items:center;gap:6px;font-size:16px;font-weight:650}.gou-action-description{color:var(--gou-muted);font-size:14px;line-height:1.45}.gou-action-chevron{width:18px;height:18px;flex-shrink:0;color:var(--gou-muted)}.gou-badge{flex-shrink:0;padding:2px 6px;border-radius:5px;background:#f3742e24;color:#f3742e;font-size:10px;font-weight:650}.gou-badge[data-tone=muted]{background:var(--gou-card-hover);color:var(--gou-muted)}.gou-stake-header{flex-direction:row;align-items:center;gap:8px}.gou-stake-estimate .gou-stake-apr{color:var(--ds-accent-primary-default, #7e54f4)}.gou-stake-back{display:inline-flex;width:32px;height:32px;flex-shrink:0;align-items:center;justify-content:center;margin-left:-8px;padding:0;border:0;border-radius:9999px;background:transparent;color:var(--gou-muted);cursor:pointer}.gou-stake-back svg{width:20px;height:20px;transform:rotate(180deg)}.gou-stake-back:hover:not(:disabled){background:var(--gou-card-hover);color:var(--gou-text)}.gou-stake-back:disabled,.gou-stake[data-busy=true] .gou-close{cursor:default;opacity:.4}.gou-stake-form{display:flex;flex-direction:column;gap:12px}.gou-stake-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px;color:var(--gou-muted);font-size:13px}.gou-stake-row label{font-weight:600}.gou-stake-balance{color:var(--gou-text);font-weight:600}.gou-stake-quick{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.gou-stake-quick button{height:32px;padding:0;border:1px solid var(--gou-border);border-radius:8px;background:transparent;color:var(--gou-muted);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:border-color .15s ease,color .15s ease}.gou-stake-quick button:hover:not(:disabled){border-color:var(--ds-accent-primary-default, #7e54f4);color:var(--gou-text)}.gou-stake-quick button[aria-pressed=true]{border-color:var(--ds-accent-primary-default, #7e54f4);background:var(--ds-accent-primary-low, #f5f3ff);color:var(--ds-accent-primary-default, #7e54f4)}.gou-stake-quick button:disabled{cursor:default;opacity:.4}.gou-stake-input{display:flex;align-items:center;gap:8px;padding:0 14px;border:1px solid var(--gou-border);border-radius:12px;background:var(--gou-card);transition:border-color .15s ease}.gou-stake-input:focus-within{border-color:var(--ds-accent-primary-default, #7e54f4)}.gou-stake-input[data-invalid=true]{border-color:var(--ds-status-error-default, #ff3c53)}.gou-stake-input input{min-width:0;flex:1;height:48px;border:0;background:transparent;color:var(--gou-text);font:inherit;font-size:18px;font-weight:650;outline:none}.gou-stake-input input::placeholder{color:var(--ds-content-low)}.gou-stake-input input:disabled{opacity:.6}.gou-stake-input>span{flex-shrink:0;color:var(--gou-muted);font-size:14px;font-weight:600}.gou-stake-error{margin:0;color:var(--ds-status-error-default, #ff3c53);font-size:13px;line-height:1.45}.gou-stake-estimate{display:flex;flex-direction:column;gap:8px;margin:0;padding:12px 14px;border:1px solid var(--gou-border);border-radius:12px;color:var(--gou-muted);font-size:14px}.gou-stake-estimate>div{display:flex;justify-content:space-between;gap:8px}.gou-stake-estimate dd{margin:0;color:var(--gou-text);font-weight:600}.gou-stake-estimate .gou-stake-shares{color:var(--gou-muted);font-weight:500}.gou-stake-submit{width:100%;margin-top:4px;padding:14px 16px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);font:inherit;font-size:16px;font-weight:650;cursor:pointer}.gou-stake-submit:disabled{cursor:not-allowed;opacity:.45}.gou-stake-submit:focus-visible{outline:2px solid #f3742e;outline-offset:2px}.gou-execution{height:auto;max-height:90dvh;overflow:hidden}.gou-execution .bf-root{width:100%;max-height:90dvh}.gou-connect-required,.gou-route-state{display:flex;min-height:360px;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px;text-align:center}.gou-connect-required h3,.gou-route-state h3{margin:0;color:var(--gou-text);font-size:18px}.gou-connect-required p,.gou-route-state p{max-width:320px;margin:0;color:var(--gou-muted);font-size:14px;line-height:1.5}.gou-lock{font-size:28px}.gou-connect-required button{width:100%;max-width:320px;margin-top:10px;padding:12px 16px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);font:inherit;font-size:16px;font-weight:650;cursor:pointer}.gou-spinner{width:28px;height:28px;border:3px solid var(--gou-border);border-top-color:var(--ds-accent-primary-default, #7e54f4);border-radius:9999px;animation:gou-spin .8s linear infinite}@keyframes gou-spin{to{transform:rotate(360deg)}}@keyframes gou-status-dot{0%,60%,to{opacity:.2}30%{opacity:1}}@keyframes gou-result-success{0%{outline:0 solid rgba(30,202,119,0)}30%{outline:3px solid rgba(30,202,119,.75)}to{outline:0 solid rgba(30,202,119,0)}}@keyframes gou-result-failure{0%{outline:0 solid rgba(255,60,83,0)}30%{outline:3px solid rgba(255,60,83,.75)}to{outline:0 solid rgba(255,60,83,0)}}@media(max-width:767px){.gou-fab{right:var(--gou-right-mobile, 1rem)}.gou-fab-icon-frame{width:32px;height:32px}.gou-fab[data-icon-only=true] .gou-fab-icon-frame{width:40px;height:40px}.gou-chooser-body{padding:24px 16px 28px}.gou-close{top:16px;right:16px}.gou-execution{height:auto;max-height:70dvh}.gou-execution .bf-root{max-height:calc(70dvh - 24px)}}@media(prefers-reduced-motion:reduce){.gou-fab,.gou-fab-icon-frame,.gou-fab-label,.gou-tooltip{transition:none}.gou-spinner,.gou-fab-progress-ring{animation-duration:1.6s}.gou-fab[data-tx-phase=success],.gou-fab[data-tx-phase=failure],.gou-fab-dots>span{animation:none}}
|
|
22
|
+
`);var se=require("react/jsx-runtime"),T2=[{id:"swap",label:"Swap",eta:"Instant",Icon:w0},{id:"bridge",label:"Bridge",Icon:y0},{id:"transfer",label:"Transfer Crypto",eta:"QR deposit",Icon:x0},{id:"stake",label:"Stake",eta:"Earn yield",Icon:v0}],I2=4e3;function E0(e){return e instanceof Error?e.message:typeof e=="string"?e:"Unknown error"}function ml(e,t){try{e?.(t)}catch{}}function E2({compactTrigger:e,collapseOnScroll:t,scrollThreshold:n}){let[r,o]=Ke.useState(!1);return Ke.useEffect(()=>{if(t===!1){o(!1);return}let a=n??200,i=a+24,s=Math.max(0,a-24),l=0,d=window.scrollY>a;o(d);let p=()=>{l=0;let u=d?window.scrollY>s:window.scrollY>i;u!==d&&(d=u,o(u))},h=()=>{l||(l=requestAnimationFrame(p))};return window.addEventListener("scroll",h,{passive:!0}),()=>{l&&cancelAnimationFrame(l),window.removeEventListener("scroll",h)}},[t,n]),!!(e||r)}function A0({loading:e}){return(0,se.jsxs)("div",{className:"gou-route-state",role:"status",children:[e&&(0,se.jsx)("span",{className:"gou-spinner","aria-hidden":"true"}),(0,se.jsx)("h3",{children:e?"Preparing route":"Route unavailable"}),(0,se.jsx)("p",{children:e?"Loading token and contract configuration.":"The configured ONEUSD route is not available in this environment."})]})}function mc({walletAddress:e,tokens:t,pairs:n,loading:r=!1,bridge:o,relay:a,stake:i,env:s,targetSymbol:l,relayTargetSymbol:d="ONEUSD",targetIconUrl:p,mode:h="floating",buttonComponent:u,theme:g="dark",mobileBreakpoint:x=768,drawerDirection:y="bottom",dialogWidth:f="560px",drawerMaxWidth:c,drawerMinWidth:b,style:w,className:k,contentClassName:C,hidden:N=!1,compactTrigger:T,collapseOnScroll:R=!0,scrollThreshold:S=200,waitForTransaction:E,transactionResultDurationMs:A=I2,onRequestConnect:F,onEvent:D}){let[G,M]=Ke.useState(!1),[j,le]=Ke.useState(null),[oe,ne]=Ke.useState(!1),[Q,ee]=Ke.useState(null),[z,q]=Ke.useState(!1),ae=Ke.useRef(0),Z=Ke.useRef(!1),pe=Ke.useRef(null),Se=Ke.useRef(!0),Ue=E2({compactTrigger:T,collapseOnScroll:R,scrollThreshold:S}),fe=Ke.useMemo(()=>it(s),[s]),Re=Xt("apps.json",fe,O=>O?.getOneUsd?.modes),Ce=Xt("apps.json",fe,O=>O?.getOneUsd?.minVersions),Le=Xt("app-launcher-v2.json",fe,O=>c0(O,fe))??l0[fe],$e=Ke.useMemo(()=>Ko(t,n,"swap"),[n,t]),wt=Ke.useMemo(()=>Ko(t,n,"bridge"),[n,t]),Ge=$e.targetToken??wt.targetToken,Qe=i?.readContract??a?.readContract,He=i?.writeContract??a?.writeContract,Dt=i?.switchChain??a?.switchChain,tn=i?.waitForReceipt??a?.waitForReceipt,yt=Ke.useMemo(()=>Qe&&He?{readContract:Qe,writeContract:He,switchChain:Dt,waitForReceipt:tn}:null,[Qe,Dt,tn,He]),{address:Pt,loading:Tt}=u0(fe,i?.vaultAddress),nn=!!(yt&&Pt&&Ge),It=Ke.useMemo(()=>T2.filter(({id:O})=>Zo(O,Re)),[Re]),ut=It.length>0,Ot=m0(!N&&ut),rt=l??Ge?.symbol??"ONEUSD",on=p??Ge?.iconUrl??Vd,ft=h==="floating"&&Ue,fn=h==="button"&&u?u:"button";Ke.useEffect(()=>(Se.current=!0,()=>{Se.current=!1,pe.current&&clearTimeout(pe.current)}),[]),Ke.useEffect(()=>{q(!d0(window.location.hostname))},[]),Ke.useEffect(()=>{ut||M(!1)},[ut]);let Ze=Ke.useCallback(O=>D?.(O),[D]),lt=Ke.useCallback(()=>{Q||!ut||(Ze({name:"fab_click",state:ft?"icon_only":"expanded"}),M(!0))},[Ze,ut,Q,ft]),nt=Ke.useCallback(O=>{Q||!qa(O,Re,Ce)||O==="stake"&&!nn||(Ze({name:"action_select",action:O}),M(!1),O==="transfer"&&ne(!0),le(O))},[Ze,Re,Ce,nn,Q]),Et=Ke.useCallback(O=>{Ze({name:"connect_click",action:O}),Promise.resolve(F?.()).catch(De=>{Ze({name:"failure",action:O,message:E0(De)})})},[Ze,F]),Rt=j==="swap"||j==="bridge"?j:null,Xe=Rt==="swap"?$e:wt,an=!!(n&&Xe.targetToken&&Xe.fromTokens.length>0),sn=Ke.useMemo(()=>{if(!Xe.targetToken)return;let O=Xe.targetToken;return De=>{let qe=o.getToTokens?.(De,t);return qe&&!Qa(qe,O)?[]:[O]}},[o.getToTokens,Xe.targetToken,t]),{onSubmitted:Yt,onSuccess:ln,onFailed:V,...ve}=o,{onDeposited:Ne,onError:ze,...ot}=a??{},Kt=Ke.useCallback((O,De,qe,re,Te)=>{!Se.current||ae.current!==O||(ee({id:O,phase:De,action:qe,label:re,txHash:Te}),pe.current&&clearTimeout(pe.current),pe.current=setTimeout(()=>{!Se.current||ae.current!==O||(Z.current=!1,ee(null),pe.current=null)},Math.max(0,A)))},[A]),Bt=Ke.useCallback(O=>{if(Z.current)return!1;Z.current=!0;let{action:De,txHash:qe,pendingLabel:re,successNote:Te,wait:U,onFailed:Oe}=O,$=++ae.current;return ee({id:$,phase:"pending",action:De,label:re,txHash:qe}),M(!1),le(null),Promise.resolve().then(U).then(()=>{!Se.current||ae.current!==$||(Kt($,"success",De,Te,qe),Ze({name:"success",action:De,txHash:qe}))}).catch(Pe=>{if(!Se.current||ae.current!==$)return;let In=E0(Pe);Kt($,"failure",De,"Transaction failed",qe),Oe?.(In),Ze({name:"failure",action:De,message:In})}),!0},[Ze,Kt]),Cn=Ke.useCallback((O,De)=>{Bt({action:De,txHash:O.txHash,pendingLabel:h0(O,De),successNote:b0(O,De),wait:async()=>{await E?.(O)},onFailed:re=>ml(V,{message:re,txHash:O.txHash})})&&ml(Yt,O)},[V,Yt,Bt,E]),Rn=Ke.useCallback(O=>{let De=yt?.waitForReceipt;Bt({action:"stake",txHash:O.txHash,pendingLabel:"Staking",successNote:`${O.amountText} ${Ge?.symbol??"ONEUSD"} staked`,wait:async()=>{if(!De)return;if((await De({chainId:O.chainId,hash:O.txHash})).status!=="success")throw new Error("Transaction reverted.")}})},[yt,Ge?.symbol,Bt]);return(0,se.jsx)(Me,{feature:"get_one_usd",children:(0,se.jsxs)("div",{className:k,"data-theme":g,"data-gou-mode":h,children:[(0,se.jsxs)(br,{theme:g,mobileBreakpoint:x,drawerDirection:y,dialogWidth:f,drawerMaxWidth:c,drawerMinWidth:b,open:G,onOpenChange:M,children:[!N&&ut&&(h==="button"||!Q)&&(0,se.jsxs)(fn,{type:"button",className:"gou-fab",style:w,"data-trigger-mode":h,"data-icon-only":ft?"true":"false",onClick:lt,disabled:!!Q,"aria-label":`Get ${rt}`,"data-track":"fab_click",children:[h==="floating"&&(0,se.jsxs)("span",{className:"gou-tooltip",children:["Choose how to get ",rt]}),(0,se.jsx)("span",{className:"gou-fab-icon-frame",children:(0,se.jsx)("img",{className:"gou-fab-icon",src:on,alt:""})}),(0,se.jsxs)("span",{className:"gou-fab-label gou-fab-trigger-copy",children:[(0,se.jsxs)("span",{children:["Get ",rt]}),Ot!==null&&(0,se.jsx)("span",{className:"gou-fab-apr",children:Xi(Ot)})]})]}),Q&&(0,se.jsxs)("div",{className:"gou-fab gou-fab-status",style:h==="floating"?w:void 0,"data-floating-status":"true","data-icon-only":"false","data-tx-phase":Q.phase,role:"status","aria-live":"polite","aria-label":Q.phase==="pending"?`${Q.label} transaction in progress`:Q.label,children:[(0,se.jsxs)("span",{className:"gou-fab-icon-frame",children:[(0,se.jsx)("img",{className:"gou-fab-icon",src:on,alt:""}),Q.phase==="pending"&&(0,se.jsx)("span",{className:"gou-fab-progress-ring","aria-hidden":"true"})]}),(0,se.jsx)("span",{className:"gou-fab-label",children:Q.phase==="pending"?(0,se.jsxs)(se.Fragment,{children:[Q.label,(0,se.jsxs)("span",{className:"gou-fab-dots","aria-hidden":"true",children:[(0,se.jsx)("span",{children:"."}),(0,se.jsx)("span",{children:"."}),(0,se.jsx)("span",{children:"."})]})]}):Q.label})]}),(0,se.jsx)(wr,{ariaTitle:`Get ${rt}`,className:`gou-shell gou-chooser ${C??""}`,children:(0,se.jsxs)("div",{className:"gou-chooser-body",children:[(0,se.jsx)("button",{type:"button",className:"gou-close",onClick:()=>M(!1),"aria-label":"Close",children:(0,se.jsx)(pl,{})}),(0,se.jsxs)("header",{className:"gou-intro",children:[(0,se.jsxs)("h2",{children:["Get ",rt]}),z&&(0,se.jsxs)("a",{className:"gou-intro-link",href:Le,target:"_blank",rel:"noopener noreferrer","aria-label":"What is ONEUSD? Opens in a new tab","data-track":"oneusd_learn_more",children:[(0,se.jsx)(nf,{size:16,className:"gou-intro-link-icon"}),(0,se.jsx)("span",{children:"What is ONEUSD?"})]})]}),(0,se.jsx)("ul",{className:"gou-actions",children:It.map(({id:O,label:De,eta:qe,Icon:re})=>{let Te=O==="swap"?`Swap the ${$e.fromTokens[0]?.symbol??"ONE"} you already hold`:O==="bridge"?`Bridge USDT to ${rt}`:O==="stake"?`Deposit ${rt} to receive ${So}`:"Deposit from any chain or exchange",U=O==="swap"?n?.swap.feeDelegated:O==="bridge"?n?.bridge.feeDelegated:!1,Oe=Xo(O,Ce),$=O==="stake"&&Tt,Pe=O==="stake"&&Oe&&!$&&!nn,In=Oe&&!Pe&&!$;return(0,se.jsx)("li",{children:(0,se.jsxs)("button",{type:"button",className:"gou-action",onClick:()=>nt(O),disabled:!In,"data-supported":In?"true":"false","data-track":"action_select","data-track-id":O,children:[(0,se.jsx)("span",{className:"gou-action-icon",children:(0,se.jsx)(re,{})}),(0,se.jsxs)("span",{className:"gou-action-copy",children:[(0,se.jsxs)("span",{className:"gou-action-title",children:[(0,se.jsx)("span",{children:De}),U&&In&&(0,se.jsx)("span",{className:"gou-badge",children:"Fee Delegated"}),!Oe&&(0,se.jsx)("span",{className:"gou-badge","data-tone":"muted",children:"Update required"}),Pe&&(0,se.jsx)("span",{className:"gou-badge","data-tone":"muted",children:"Coming soon"})]}),(0,se.jsx)("span",{className:"gou-action-description",children:Oe?Pe?"Staking is not available in this environment yet":qe?`${Te} \xB7 ${qe}`:Te:"Update the app to use this option"})]}),(0,se.jsx)(cl,{className:"gou-action-chevron"})]})},O)})})]})})]}),(0,se.jsx)(br,{theme:g,mobileBreakpoint:x,drawerDirection:y,dialogWidth:f,drawerMaxWidth:c,drawerMinWidth:b,open:!!Rt,onOpenChange:O=>{O||le(null)},children:(0,se.jsx)(wr,{ariaTitle:`${Rt==="bridge"?"Bridge":"Swap"} to ${rt}`,className:`gou-shell gou-execution ${C??""}`,children:an?(0,se.jsx)(go,{...ve,env:s,variant:"embedded",title:Rt==="bridge"?"Bridge":"Swap",feeDelegated:n?.swap.feeDelegated,walletAddress:e??"",isConnected:!!e,onRequestConnect:()=>Et(Rt??"swap"),tokens:Xe.fromTokens,initialFromToken:Xe.fromTokens[0],initialToToken:Xe.targetToken,getToTokens:sn,onClose:()=>le(null),onBackToWallet:()=>{le(null),M(!0)},onSubmitted:O=>{Cn(O,Rt??"swap")},onSuccess:O=>{ml(ln,O)},onFailed:O=>{ml(V,O),Ze({name:"failure",action:Rt??"swap",message:O.message})}},`${Rt}:${Xe.fromTokens.map(O=>`${O.chainId}:${O.address}`).join(",")}`):(0,se.jsx)(A0,{loading:r||!n})})}),(0,se.jsx)(br,{theme:g,mobileBreakpoint:x,drawerDirection:y,dialogWidth:f,drawerMaxWidth:c,drawerMinWidth:b,open:j==="stake",onOpenChange:O=>{O||le(null)},children:(0,se.jsx)(wr,{ariaTitle:`Stake ${rt}`,className:`gou-shell gou-chooser ${C??""}`,children:j==="stake"&&yt&&Pt&&Ge?(0,se.jsx)(I0,{env:fe,walletAddress:e,walletChainId:i?.walletChainId??a?.walletChainId,token:Ge,vaultAddress:Pt,ports:yt,locked:!!Q,onRequestConnect:()=>Et("stake"),onBack:()=>{le(null),M(!0)},onClose:()=>le(null),onSubmitted:Rn,onFailed:O=>Ze({name:"failure",action:"stake",message:O})}):(0,se.jsx)(A0,{loading:r||!n})})}),oe&&(0,se.jsx)(Yo,{...ot,environment:ot.environment??s,theme:ot.theme??g,mobileBreakpoint:ot.mobileBreakpoint??x,drawerDirection:ot.drawerDirection??y,dialogWidth:ot.dialogWidth??f,drawerMaxWidth:ot.drawerMaxWidth??c,drawerMinWidth:ot.drawerMinWidth??b,walletAddress:e,open:j==="transfer",onOpenChange:O=>{O||le(null)},requireWalletConnection:!0,showRecovery:ot.showRecovery??!0,showRecipientInput:!1,hideAmount:!0,targetTokens:[d],defaultTarget:d,onRequestConnect:()=>Et("transfer"),onDeposited:O=>{Ne?.(O),Ze({name:"success",action:"transfer",txHash:O})},onError:O=>{ze?.(O),Ze({name:"failure",action:"transfer",message:O.message})},children:(0,se.jsx)(Yo.Content,{})})]})})}var vr=H(require("react"),1),j0=H(require("@radix-ui/react-dialog"),1),W0=require("vaul");var gl=require("react"),hl=(0,gl.createContext)(null);function Ka(){let e=(0,gl.useContext)(hl);if(!e)throw new Error("WalletConnectModal compound components must be used within <WalletConnectModal>");return e}var To=require("react");function Za(){let[e,t]=(0,To.useState)([]),[n,r]=(0,To.useState)(!0);(0,To.useEffect)(()=>{if(typeof window>"u"){r(!1);return}let a=[],i=l=>{let{info:d}=l.detail;d?.rdns&&!a.some(p=>p.rdns===d.rdns)&&(a.push({rdns:d.rdns,name:d.name,icon:d.icon}),t([...a]))};window.addEventListener("eip6963:announceProvider",i),window.addEventListener("eip6963:crossAnnounceProvider",i),window.dispatchEvent(new Event("eip6963:requestProvider")),window.dispatchEvent(new Event("eip6963:crossRequestProvider"));let s=setTimeout(()=>r(!1),500);return()=>{window.removeEventListener("eip6963:announceProvider",i),window.removeEventListener("eip6963:crossAnnounceProvider",i),clearTimeout(s)}},[]);let o=(0,To.useCallback)(a=>e.some(i=>i.rdns===a),[e]);return{wallets:e,isDetected:o,isLoading:n}}var M0=H(require("@radix-ui/react-dialog"),1),L0=require("vaul");var bl=require("react/jsx-runtime");function D0({asChild:e,children:t}){let{isMobile:n}=Ka(),r=n?L0.Drawer.Trigger:M0.Trigger;return(0,bl.jsx)(Me,{feature:"wallet_connect",children:(0,bl.jsx)(r,{asChild:e??t!=null,children:t??(0,bl.jsx)("button",{type:"button","data-track":"open",children:"Connect Wallet"})})})}var z0=require("react"),F0=require("@nexus-cross/crossx-design-system"),xr=H(require("@radix-ui/react-dialog"),1),Xa=require("vaul");var de=require("react/jsx-runtime");function P0(e,t){Je("connect","wallet_selected",{tags:{item_id:e}}),Qu(e);let n=t?.();n instanceof Promise&&n.then(()=>Je("connect","connected"),r=>Je("connect","connected",{status:"failure",reason:Nn(r)}))}function A2({wallet:e,detected:t,onConnect:n}){let r=()=>{if(e.installUrl&&!t){window.open(e.installUrl,"_blank","noopener,noreferrer");return}n()},o=e.icon,a=e.featured===!0;return(0,de.jsxs)("button",{type:"button",className:Ie("wcm-wallet-item",a&&"wcm-wallet-item--featured"),"data-track":"wallet_item_click","data-track-id":e.id,onClick:r,children:[(0,de.jsxs)("div",{className:"wcm-wallet-item-left",children:[(0,de.jsx)("div",{className:"wcm-wallet-icon",children:(0,de.jsx)(o,{})}),(0,de.jsxs)("div",{className:"wcm-wallet-name-row",children:[(0,de.jsx)("span",{className:"wcm-wallet-name",children:e.name}),e.badge&&(0,de.jsx)("span",{className:"wcm-wallet-badge",children:e.badge})]})]}),e.installUrl&&(t?(0,de.jsx)("span",{className:"wcm-installed-label",children:"Installed"}):(0,de.jsx)("span",{className:"wcm-install-btn",children:"Install"}))]})}function M2({social:e,onSignIn:t}){let n=e.icon,r=`Sign in with ${e.name}`;return(0,de.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":r,children:[(0,de.jsx)("span",{className:"wcm-social-icon",children:(0,de.jsx)(n,{})}),(0,de.jsx)("span",{className:"wcm-social-name",children:r})]})}function O0(){let{wallets:e,activeWalletIds:t,socialProviders:n,activeSocialIds:r,termsUrl:o,privacyUrl:a,isDetected:i,close:s,isMobile:l}=Ka(),d=t.filter(u=>{let g=ad(u).visibility;return!g||g==="always"?!0:g==="desktop-only"?!l:g==="mobile-only"?l:!0}),p=r.length>0,h=d.length>0;return(0,de.jsxs)(de.Fragment,{children:[(0,de.jsxs)("div",{className:"wcm-header",children:[(0,de.jsxs)("div",{className:"wcm-header-text",children:[(0,de.jsx)("h2",{className:"wcm-title",children:F0.WALLET_LABELS.default}),!l&&(0,de.jsx)("p",{className:"wcm-subtitle",children:"Sign in instantly with your social account"})]}),(0,de.jsx)("button",{type:"button",className:"wcm-close-btn","data-track":"close",onClick:s,"aria-label":"Close",children:(0,de.jsx)(Gu,{})})]}),(0,de.jsxs)("div",{className:"wcm-body",children:[p&&(0,de.jsxs)(de.Fragment,{children:[!l&&(0,de.jsxs)("div",{className:"wcm-section-header",children:[(0,de.jsx)("span",{className:"wcm-section-title",children:"Social Account Wallet Connect"}),(0,de.jsx)("span",{className:"wcm-recommended-badge",children:"Recommended"})]}),(0,de.jsx)("div",{className:"wcm-social-grid",children:r.map(u=>{let g=Hu(u);return(0,de.jsx)(M2,{social:g,onSignIn:()=>{P0(u,n[u]),s()}},u)})}),h&&(0,de.jsxs)("div",{className:"wcm-separator",children:[(0,de.jsx)("div",{className:"wcm-separator-line"}),(0,de.jsx)("span",{className:"wcm-separator-text",children:"Other Wallets"}),(0,de.jsx)("div",{className:"wcm-separator-line"})]})]}),h&&(0,de.jsx)("div",{className:"wcm-wallet-list",children:d.map(u=>{let g=ad(u),x=g.rdns?i(g.rdns):!1;return(0,de.jsx)(A2,{wallet:g,detected:x,onConnect:()=>{P0(u,e[u]),s()}},u)})}),(0,de.jsxs)("p",{className:"wcm-terms",children:["By continuing, you agree to NEXUS"," ",(0,de.jsx)(B0,{href:o,track:"terms_link",children:"Terms of Service"})," ","and consent to its"," ",(0,de.jsx)(B0,{href:a,track:"privacy_link",children:"Privacy Policy"}),"."]})]})]})}function B0({href:e,track:t,children:n}){return e?(0,de.jsx)("a",{className:"wcm-terms-link",href:e,target:"_blank",rel:"noopener noreferrer","data-track":t,children:n}):(0,de.jsx)("span",{className:"wcm-terms-link",children:n})}function U0({className:e}){let{isMobile:t,theme:n,portalStyle:r,open:o}=Ka();return(0,z0.useEffect)(()=>{o&&Je("connect","opened")},[o]),t?(0,de.jsx)(Me,{feature:"wallet_connect",children:(0,de.jsxs)(Xa.Drawer.Portal,{children:[(0,de.jsx)(Xa.Drawer.Overlay,{className:"wcm-overlay"}),(0,de.jsxs)(Xa.Drawer.Content,{className:Ie("wcm-drawer-content",e),"data-theme":n,style:r,children:[(0,de.jsx)(Xa.Drawer.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),(0,de.jsx)("div",{className:"wcm-drawer-handle"}),(0,de.jsx)("div",{className:"wcm-drawer-body",children:(0,de.jsx)(O0,{})})]})]})}):(0,de.jsx)(Me,{feature:"wallet_connect",children:(0,de.jsxs)(xr.Portal,{children:[(0,de.jsx)(xr.Overlay,{className:"wcm-overlay"}),(0,de.jsxs)(xr.Content,{className:Ie("wcm-dialog-content",e),"data-theme":n,style:r,children:[(0,de.jsx)(xr.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),(0,de.jsx)(xr.Description,{className:"wcm-sr-only",children:"Sign in with a social provider or pick a wallet to connect."}),(0,de.jsx)("div",{className:"wcm-dialog-body",children:(0,de.jsx)(O0,{})})]})]})})}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-accent-primary-low, #f5f3ff);border-radius:9999px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-accent-primary-high, #7346f3);white-space:nowrap}.wcm-social-grid{display:grid;gap:8px;width:100%}.wcm-dialog-body .wcm-social-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wcm-drawer-body .wcm-social-grid{grid-template-columns:1fr}.wcm-social-item{display:flex;background:var(--ds-surface-medium, #f5f7fa);border:none;border-radius:12px;cursor:pointer;transition:none;font-family:inherit;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wcm-social-item:hover{background:#2e3544!important}:root[data-ds-theme=light] .wcm-social-item:hover{background:#eff3f8!important}.wcm-social-item[data-provider=apple] .wcm-social-icon{color:#000}[data-theme=dark] .wcm-social-item[data-provider=apple] .wcm-social-icon{color:#fff}.wcm-dialog-body .wcm-social-item{flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:16px}.wcm-drawer-body .wcm-social-item{flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;padding:16px}.wcm-social-icon{flex-shrink:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center}.wcm-social-icon>svg{width:32px;height:32px}.wcm-social-name{font-family:Inter,sans-serif;font-weight:600;font-size:14px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wcm-separator{display:flex;align-items:center;gap:12px;width:100%}.wcm-separator-line{flex:1;height:1px;background:var(--ds-border-default, rgba(0, 0, 0, .07))}.wcm-separator-text{font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wcm-wallet-list{display:flex;flex-direction:column;gap:8px}.wcm-wallet-item{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:20px 16px;background:var(--ds-surface-medium, #f5f7fa);border:none;border-radius:12px;cursor:pointer;text-align:left;transition:none;font-family:inherit}.wcm-wallet-item:hover{background:#2e3544!important}:root[data-ds-theme=light] .wcm-wallet-item:hover{background:#eff3f8!important}.wcm-wallet-item-left{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.wcm-wallet-icon{flex-shrink:0;width:28px;height:28px;display:flex;align-items:center;justify-content:center}.wcm-wallet-icon>svg,.wcm-wallet-icon>img{width:28px;height:28px;border-radius:0;object-fit:cover}.wcm-wallet-name-row{display:flex;align-items:center;gap:8px;min-width:0}.wcm-wallet-name{font-family:Inter,sans-serif;font-weight:600;font-size:16px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wcm-wallet-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:var(--ds-system-purple-low, #f5f3ff);border:.5px solid var(--ds-system-purple-default, #7e54f4);border-radius:9999px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-system-purple-high, #7346f3);white-space:nowrap}.wcm-install-btn{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:var(--ds-accent-primary-default, #7e54f4);border-radius:6px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-accent-primary-on, #ffffff);white-space:nowrap}.wcm-installed-label{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wcm-terms{font-family:Inter,sans-serif;font-weight:400;font-size:12px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-align:center;margin:0}.wcm-terms-link{color:var(--ds-content-high, rgba(0, 0, 0, .85));text-decoration:underline;text-underline-position:from-font}.wcm-terms-link:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85));text-decoration:underline}.wcm-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}
|
|
23
|
+
`);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)}}
|
|
24
|
+
`);var Jo=require("react/jsx-runtime"),L2={};function D2({wallets:e,socialProviders:t=L2,termsUrl:n,privacyUrl:r,theme:o="dark",mobileBreakpoint:a=768,drawerDirection:i="bottom",dialogWidth:s,drawerMaxWidth:l,drawerMinWidth:d,style:p,open:h,onOpenChange:u,children:g}){let x=Po(`(max-width: ${a}px)`),[y,f]=vr.useState(!1),c=h!==void 0,b=c?h:y,w=vr.useCallback(A=>{c||f(A),u?.(A)},[c,u]),k=vr.useCallback(()=>w(!1),[w]);Qn(b,k);let{isDetected:C}=Za(),N=vr.useMemo(()=>Object.keys(e),[e]),T=vr.useMemo(()=>Object.keys(t),[t]),R=vr.useMemo(()=>{let A={};return s&&(A["--wcm-dialog-width"]=s),l&&(A["--wcm-drawer-max-width"]=l),d&&(A["--wcm-drawer-min-width"]=d),{...A,...p}},[s,l,d,p]),S=vr.useMemo(()=>({theme:o,isMobile:x,open:b,setOpen:w,close:k,wallets:e,activeWalletIds:N,socialProviders:t,activeSocialIds:T,termsUrl:n??Mi,privacyUrl:r??Li,isDetected:C,portalStyle:R}),[o,x,b,w,k,e,N,t,T,n,r,C,R]),E=(0,Jo.jsx)("div",{"data-theme":o,style:R,children:g});return x?(0,Jo.jsx)(hl.Provider,{value:S,children:(0,Jo.jsx)(W0.Drawer.Root,{direction:i,open:b,onOpenChange:w,noBodyStyles:!0,children:E},"drawer")}):(0,Jo.jsx)(hl.Provider,{value:S,children:(0,Jo.jsx)(j0.Root,{open:b,onOpenChange:w,children:E})})}var gc=Object.assign(D2,{Trigger:D0,Content:U0});var H0=require("@nexus-cross/crossx-design-system"),_0=H(require("react"),1);he(`.cb-button{--cb-bg: var(--ds-accent-primary-default, #7e54f4);--cb-bg-hover: var(--ds-accent-primary-high, #7346f3);--cb-color: var(--ds-accent-primary-on, #ffffff);--cb-border: none;--cb-radius: 8px;--cb-height: 36px;--cb-padding: 8px 16px;--cb-font-family: Inter, system-ui, -apple-system, sans-serif;--cb-font-size: 14px;--cb-font-weight: 500;--cb-line-height: 1.5;--cb-letter-spacing: -.01em;--cb-gap: 8px;--cb-transition: opacity .15s;--cb-loading-opacity: .7;--cb-press-scale: .95;--cb-icon-size: 18px;--cb-spinner-size: 18px;--cb-spinner-thumb: currentColor;--cb-spinner-track: color-mix(in srgb, currentColor 20%, transparent)}.cb-pill{--cb-pill-bg: var(--ds-surface-default, #ffffff);--cb-pill-bg-hover: var(--cb-pill-bg);--cb-pill-color: var(--ds-content-high, rgba(0, 0, 0, .85));--cb-pill-border: 1px solid var(--ds-border-default, rgba(0, 0, 0, .07));--cb-pill-border-hover: 1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));--cb-pill-radius: 8px;--cb-pill-height: 36px;--cb-pill-padding: 1px 13px;--cb-pill-press-scale: .95;--cb-pill-font-family: Inter, system-ui, -apple-system, sans-serif;--cb-pill-font-size: 14px;--cb-pill-font-weight: 500;--cb-pill-line-height: 1.5;--cb-pill-gap: 8px;--cb-pill-icon-size: 18px;--cb-pill-icon-placeholder-bg: var(--ds-surface-medium, #f5f7fa);--cb-pill-address-font: Inter, system-ui, -apple-system, sans-serif;--cb-pill-address-font-size: 14px;--cb-pill-address-letter-spacing: -.01em}
|
|
25
|
+
`);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)}}
|
|
26
|
+
`);var P2='<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>',O2='<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>',B2='<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>',z2='<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>',F2='<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 Ja(e){return`data:image/svg+xml,${encodeURIComponent(e)}`}var $a=Ja(P2),ei=Ja(O2),ti=Ja(B2),ni=Ja(z2),ri=Ja(F2);var qt=require("react/jsx-runtime");function hc({isConnecting:e,address:t,provider:n,providerName:r,accountName:o,sendAccounts:a,onConnect:i,onDisconnect:s,onCopy:l,onSelectWallet:d,onBuy:p,onBuyDisabledMessage:h,label:u="Connect Wallet",connectingLabel:g="Connecting...",disconnectLabel:x,className:y,theme:f="dark",env:c,showBalance:b=!0,showPortfolio:w,drawerDirection:k,modal:C,connectorId:N,style:T,walletInfoStyle:R,sendTransaction:S,getTransactionReceipt:E,estimateGas:A,onReceive:F,onBridge:D,onSend:G,bridgeTokens:M,bridgeHistory:j,getBridgeQuote:le,getBridgeToTokens:oe,getBridgeApproval:ne,approveBridge:Q,submitBridge:ee}){let z=y?`cb-button ${y}`:"cb-button",q=y?`cb-pill ${y}`:"cb-pill";if(_0.useEffect(()=>{ro(t)},[t]),e)return(0,qt.jsxs)("button",{type:"button",disabled:!0,className:z,style:T,"aria-busy":"true",children:[(0,qt.jsx)("span",{className:"cb-spinner","aria-hidden":"true"}),(0,qt.jsx)("span",{className:"cb-button-label",children:g})]});if(t){let ae=r??W2(n),Z=n?j2[n]:void 0;return(0,qt.jsx)(Me,{feature:"connect_button",children:(0,qt.jsxs)(yo,{env:c,theme:f,drawerDirection:k,modal:C,showBalance:b,showPortfolio:w,walletAddress:t,accountName:o,sendAccounts:a,connectorName:r??(n?V0[n]:void 0),connectorId:N,onSelectWallet:d,onCopyAddress:l?(pe,Se)=>{Se&&l()}:void 0,onDisconnect:s,disconnectLabel:x,style:R,sendTransaction:S,getTransactionReceipt:E,estimateGas:A,onReceive:F,onBridge:D,onBuy:p,onBuyDisabledMessage:h,onSend:G,bridgeTokens:M,bridgeHistory:j,getBridgeQuote:le,getBridgeToTokens:oe,getBridgeApproval:ne,approveBridge:Q,submitBridge:ee,children:[(0,qt.jsx)(yo.Trigger,{asChild:!0,children:(0,qt.jsxs)("button",{type:"button",className:q,"data-track":"wallet_pill_open",style:T,"aria-label":`Connected with ${ae}: ${G0(t)}`,children:[Z?(0,qt.jsx)("img",{src:Z,alt:"",width:18,height:18,className:"cb-pill-icon","data-provider":n}):(0,qt.jsx)("span",{className:"cb-pill-icon-placeholder","aria-hidden":"true"}),(0,qt.jsx)("span",{className:"cb-pill-address",children:G0(t)})]})}),(0,qt.jsx)(yo.Content,{align:"end",sideOffset:8})]})})}return(0,qt.jsx)(Me,{feature:"connect_button",children:(0,qt.jsxs)("button",{type:"button",onClick:i,className:z,"data-track":"connect_click",style:T,"aria-label":typeof u=="string"?u:"Connect Wallet",children:[(0,qt.jsx)(U2,{}),(0,qt.jsx)("span",{className:"cb-button-label",children:u})]})})}function U2(){return(0,qt.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,qt.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,qt.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,qt.jsx)("path",{d:"M12.75 11.25H12.7575",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}var j2={google:ni,apple:ri,cross:$a,metamask:ei,binance:ti},V0={google:"Google",apple:"Apple",cross:H0.WALLET_LABELS.default,metamask:"MetaMask",binance:"Binance Wallet"};function W2(e){return e?V0[e]:"Wallet"}function G0(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}var Q0=H(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)}
|
|
27
|
+
`);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)}}
|
|
28
|
+
`);var Or=require("react/jsx-runtime"),bc="https://www.onechain.nexus/skills";function wc({label:e="Skills",href:t,onClick:n,className:r,style:o,theme:a,disabled:i=!1,isLoading:s=!1,loadingLabel:l="Loading...",openInNewTab:d=!1,type:p="button"}){let[h,u]=Q0.useState(!1),g=it(),x=Xt("apps.json",g,C=>Bn(C?.skills,g)),y=t??x,f=async C=>{if(y&&!n){d?window.open(y,"_blank","noopener,noreferrer"):window.location.href=y;return}if(n)try{u(!0),await n()}finally{u(!1)}},c=i||s||h,b=s||h,w=b?l:e,k=r?`sb-button ${r}`:"sb-button";return(0,Or.jsx)(Me,{feature:"skills",children:(0,Or.jsxs)("button",{type:p,onClick:f,disabled:c,className:k,"data-theme":a,"data-track":"click",style:o,"aria-busy":b,children:[b?(0,Or.jsx)("span",{className:"sb-spinner","aria-hidden":"true"}):(0,Or.jsx)(G2,{}),(0,Or.jsx)("span",{className:"sb-label",children:w})]})})}function G2(){return(0,Or.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,Or.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"})})}yi({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,OnePopBody,OnePopGetTokenTrigger,PORTFOLIO_SECTIONS,RelayApiError,RelayDeposit,RelayHistory,RelayRecovery,SOCIAL_REGISTRY,SendFlow,SkillsButton,StatusTracker,TOKEN_STATS_QUERY_KEY,USER_BALANCE_QUERY_KEY,WALLET_PORTFOLIO_QUERY_PREFIX,WALLET_REGISTRY,WalletConnectModal,WalletInfo,WalletInfoPage,WalletPortfolio,WalletPortfolioBody,announceAppLauncherUsage,captureDappUiException,createRelayClient,findGetOneUsdToken,getChainDisplay,getDappUiSentryScope,getOneUsdTokenKey,initDappUiSentry,invalidateWalletPortfolioQueries,isGetOneUsdActionEnabled,isGetOneUsdActionSupported,isGetOneUsdActionVisible,isGetOneUsdTargetAvailable,matchesGetOneUsdToken,normalizeFailureReason,resolveEnvironment,resolveGetOneUsdRoute,selectChainMeta,setDappUiAnalyticsUser,trackDappUiEvent,trackDappUiFunnel,useChainDisplay,useChainsConfig,useGlobalMenu,useRelayConfig,useRelayOrders,useRelayRecovery,useTokenBalance,useTokenStats,useWalletDetect});
|
|
28
29
|
//# sourceMappingURL=index.cjs.map
|