@nexus-cross/dapp-ui 1.4.0 → 1.4.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +27 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -3
- package/dist/index.d.ts +24 -3
- package/dist/index.js +27 -27
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
function _d(e){try{return import.meta.env?.[e]}catch{return}}function Gd(e){if(!(typeof process>"u"))return process.env?.[e]}function nt(e){if(e)return Hd(e);let t=_d("VITE_CROSSX_ENVIRONMENT")??_d("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??Gd("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??Gd("CROSSX_ENVIRONMENT");return Hd(t)}function Hd(e){switch(e?.toLowerCase()){case"dev":case"development":return"dev";case"stage":case"staging":case"stg":return"stage";default:return"production"}}import*as un from"react";var bh={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"},wh=3e3;function Pr(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 Zs=new Map;function io(e,t){let r=`${bh[t]}/${e}`,n=Zs.get(r);return n||(n=(async()=>{let o=new AbortController,a=setTimeout(()=>o.abort(),wh);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&&Zs.delete(r),o)),Zs.set(r,n)),n}function yh(e){return typeof e=="string"&&e.startsWith("https://")}async function Me(e,t){let r=await io("endpoints.json",t),n=Pr(r?.apis?.[e],t);if(!yh(n))throw new Error(`[remote-config] endpoints.json missing or invalid api base: ${e} (${t})`);return n}function ri(e,t){let r=Pr(e?.relay?.forwarderFactories,t),n=[r?.standingForwarderFactory,r?.depositorForwarderFactory].filter(o=>typeof o=="string");return n.length>0?n:void 0}var ni="chains.json";async function xh(e,t){return(await io(ni,t))?.chains?.[String(e)]??{}}function ia(e,t){let[r,n]=un.useState({});return un.useEffect(()=>{if(e==null){n({});return}let o=!0;return io(ni,t).then(a=>{o&&n(a?.chains?.[String(e)]??{})}),()=>{o=!1}},[e,t]),r}function vh(e){let[t,r]=un.useState({});return un.useEffect(()=>{let n=!0;return io(ni,e).then(o=>{n&&r(o?.chains??{})}),()=>{n=!1}},[e]),t}function rr(e,t,r){let[n,o]=un.useState(void 0),a=un.useRef(r);return a.current=r,un.useEffect(()=>{let i=!0;return io(e,t).then(s=>{if(!i)return;let l=a.current(s);l!==void 0&&o(l)}),()=>{i=!1}},[e,t]),n}var so="1.4.0";var oi="__nexusCrossAppLauncherRuntime";function kh(){if(typeof window>"u")return null;let e=window;return e[oi]??(e[oi]={mode:"dapp-ui"}),e[oi]}function Rh(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${so}, \uC0AC\uC6A9 \uBAA8\uB4DC: connect-kit)`)}else console.info(`[CROSSx App Launcher] dapp-ui v${so} \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 Xs(e){let t=kh();t&&(e?.mode==="connect-kit-react"?t.mode="connect-kit-react":t.mode||(t.mode="dapp-ui"),e?.connectKitVersion&&(t.connectKitVersion=e.connectKitVersion),Rh(t))}import{BrowserClient as Sh,Scope as Ch,defaultStackParser as Nh,linkedErrorsIntegration as Th,makeFetchTransport as Ih}from"@sentry/react";var Eh="https://5c82aeb32da33b5a0a14b7c5393992ca@o4511668907081728.ingest.de.sentry.io/4511705324126289",Mh=`dapp-ui@${so}`,Eo=null,Qd=.1;function Vd(){return Qd}function Ah(e){switch(e){case"dev":return"dev";case"stage":return"stg";default:return"prod"}}function sa(e){if(Eo)return Eo;if(typeof window>"u")return null;let t=Ah(nt(e?.environment));typeof e?.analyticsSampleRate=="number"&&(Qd=Math.min(1,Math.max(0,e.analyticsSampleRate)));let r=new Sh({dsn:e?.dsn??Eh,transport:Ih,stackParser:Nh,integrations:[Th()],environment:t,release:Mh,enabled:e?.enabled??t==="prod"}),n=new Ch;return n.setClient(r),n.setTags({package:"dapp-ui",framework:"react",source:"dapp-ui"}),r.init(),Eo=n,Eo}function ai(){return Eo}function ii(e,t){let r=Eo??sa();if(r)return r.captureException(e,t?{captureContext:{extra:t}}:void 0)}import{Component as Lh}from"react";var si=class extends Lh{constructor(){super(...arguments);this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(r,n){ii(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 ve(...e){return e.filter(Boolean).join(" ")}var Dh=/CROSSx|ONE\s?wallet|ONE\s?pocket/i;function Mo(){return typeof window>"u"?!1:Dh.test(window.navigator.userAgent)}var qd="__nexus_dapp_ui_uid",Js=null;function Ph(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Array.from({length:32},()=>Math.floor(Math.random()*16).toString(16)).join("")}function $s(){if(Js)return Js;let e=null;try{e=window.localStorage.getItem(qd)}catch{}if(!e||!e.startsWith("anon_")){e=`anon_${Ph()}`;try{window.localStorage.setItem(qd,e)}catch{}}return Js=e,e}async function Yd(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 Oh(){let e=window.navigator.userAgent;return/ipad|tablet|(android(?!.*mobile))/i.test(e)?"tablet":/mobile|iphone|ipod|android/i.test(e)?"mobile":"desktop"}function Xd(){return{host:window.location.hostname,device_type:Oh(),is_cross_inapp:String(Mo())}}var Kd=!1;function el(){if(typeof window>"u")return null;let e=ai()??sa();return e?(Kd||(Kd=!0,e.setUser({id:$s()})),e):null}function Jd(){return Math.random()>=Vd()}var Zd=0;function Ao(e){let t=el();if(!t)return;let r=++Zd;if(!e){t.setUser({id:$s()});return}Yd(e).then(n=>{n&&r===Zd&&t.setUser({id:n})})}function li(e,t,r){let n=el();!n||Jd()||n.captureMessage(`ui: ${e}_${t}`,"info",{captureContext:{tags:{...Xd(),feature:e,action:t,...r}}})}function qe(e,t,r){let n=el();if(!n||Jd())return;let o=r?.status??"success";n.captureMessage(`funnel: ${e}_${t}`,"info",{captureContext:{tags:{...Xd(),flow:e,funnel_step:`${e}_${t}`,funnel_status:o,...o==="failure"?{failure_reason:r?.reason??"unknown"}:{},...r?.tags}}})}function Nr(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"}import{useCallback as Bh}from"react";import{jsx as zh}from"react/jsx-runtime";function ye({feature:e,children:t}){let r=Bh(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");li(e,s,l?{item_id:l}:void 0)},[e]);return zh("div",{style:{display:"contents"},onClick:r,children:t})}import*as Po from"react";import*as ec from"@radix-ui/react-popover";import{Drawer as Vh}from"vaul";import{createContext as Fh,useContext as Uh}from"react";var tl=Fh(null);function di(){let e=Uh(tl);if(!e)throw new Error("AppLauncher compound components must be used within <AppLauncher>");return e}import*as pi from"react";var jh="__dappUiOverlay",lo=[],Lo=0,nl=0,ci=!1,rl=!1;function $d(){if(nl>0){nl-=1;return}Lo=Math.max(0,Lo-1),lo.pop()?.close(),ol()}function Wh(){ci||(window.addEventListener("popstate",$d),ci=!0)}function ol(){lo.length>0||!ci||(window.removeEventListener("popstate",$d),ci=!1)}function _h(){rl||(rl=!0,queueMicrotask(()=>{rl=!1;let e=Lo-lo.length;if(e<=0){ol();return}Lo-=e,nl+=1,window.history.go(-e),ol()}))}function On(e,t){let r=pi.useRef(t);r.current=t,pi.useEffect(()=>{if(!(!e||typeof window>"u"))return Gh(()=>r.current())},[e])}function Gh(e){let t={close:e};return lo.push(t),Lo<lo.length&&(window.history.pushState({[jh]:!0},""),Lo+=1),Wh(),()=>{let r=lo.lastIndexOf(t);r!==-1&&(lo.splice(r,1),_h())}}import{useState as Hh,useEffect as Qh}from"react";function Do(e){let[t,r]=Hh(!1);return Qh(()=>{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 ce(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))}ce(`[data-theme=dark]{--al-bg: var(--ds-surface-default, #1e232e);--al-bg-hover: var(--ds-surface-medium, #252b39);--al-text: var(--ds-content-highest, #ffffff);--al-text-secondary: var(--ds-content-medium, #ffffffa6);--al-border: var(--ds-border-default, #ffffff12);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .7));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #3a261f;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #422a1f);--al-badge-text: var(--ds-accent-primary-default, #f0640d);--al-drawer-overlay: var(--ds-overlay-dim, #000000b3)}[data-theme=light]{--al-bg: var(--ds-surface-default, #ffffff);--al-bg-hover: var(--ds-surface-medium, #f5f7fa);--al-text: var(--ds-content-highest, #000000);--al-text-secondary: var(--ds-content-medium, #000000a6);--al-border: var(--ds-border-default, #00000012);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .15));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #fff1eb;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #fff5ee);--al-badge-text: var(--ds-accent-primary-default, #ff8438);--al-drawer-overlay: var(--ds-overlay-dim, #00000080)}
|
|
2
|
-
`);
|
|
3
|
-
`);
|
|
4
|
-
`);
|
|
5
|
-
`);ce("");import{jsx as al}from"react/jsx-runtime";function tc({env:e,theme:t="dark",mobileBreakpoint:r=768,domain:n,children:o}){let a=Do(`(max-width: ${r}px)`),[i,s]=Po.useState(!1),l=Po.useCallback(()=>s(!1),[]),d=nt(e);On(i,l);let c=Po.useMemo(()=>({env:d,theme:t,isMobile:a,open:i,domain:n,close:l}),[d,t,a,i,n,l]);return al(tl.Provider,{value:c,children:a?al(Vh.Root,{direction:"right",open:i,onOpenChange:s,noBodyStyles:!0,children:o},"drawer"):al(ec.Root,{open:i,onOpenChange:s,children:o},"popover")})}import*as ac from"@radix-ui/react-popover";import{Drawer as Yh}from"vaul";import{jsx as Tr,jsxs as qh}from"react/jsx-runtime";function rc({size:e=18}){return qh("svg",{className:"al-trigger-icon",width:e,height:e,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Tr("rect",{width:"4",height:"4",rx:"2",fill:"currentColor"}),Tr("rect",{x:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),Tr("rect",{x:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),Tr("rect",{y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),Tr("rect",{x:"7",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),Tr("rect",{x:"14",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),Tr("rect",{y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),Tr("rect",{x:"7",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),Tr("rect",{x:"14",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"})]})}function nc(){return Tr("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Tr("path",{d:"M12 19L5 12M5 12L12 5M5 12H19",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function oc(){return Tr("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Tr("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}import{jsx as Oo}from"react/jsx-runtime";function ic({asChild:e,children:t,className:r,style:n}){let{isMobile:o,theme:a}=di(),i=t!=null,s=e??!0,l=r?`al-trigger-btn ${r}`:"al-trigger-btn",d=i?t:Oo("button",{type:"button",className:l,"data-theme":a,"data-track":"open",style:n,children:Oo(rc,{size:18})});return o?Oo(ye,{feature:"app_launcher",children:Oo(Yh.Trigger,{asChild:s,children:d})}):Oo(ye,{feature:"app_launcher",children:Oo(ac.Trigger,{asChild:s,children:d})})}import*as fn from"react";import*as fi from"@radix-ui/react-popover";import{Drawer as Bo}from"vaul";import{useQuery as Xh}from"@tanstack/react-query";var sc={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 Kh="https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",Zh="https://contents.crosstoken.io/frontend/common/app-launcher/icons";function en(e,t){return`${e==="production"?Zh:Kh}/${t}.png`}function lc(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:en(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:en(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:en(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:en(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:en(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:en(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:en(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:en(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:en(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:en(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:en(t,"wave"),order:11e4,type:"wave",badge:null,isNew:!1,serviceStatus:"available"}]}}function ui(e){let t=nt(e);return Xh({queryKey:["global-menu",t],queryFn:async()=>{try{let r=await fetch(sc[t],{cache:"no-store"});if(!r.ok)throw new Error(`Failed to fetch global menu: ${r.status}`);return r.json()}catch{return lc(t)}},staleTime:300*1e3,gcTime:600*1e3,retry:!1,refetchOnMount:!0})}function il(e){return e.serviceStatus==="ending"||e.serviceStatus==="comingSoon"?e.serviceStatus:"available"}function cc(e,t){return typeof e=="string"?e:e[t]??e.production??e.stage??e.dev}function pc(e){return[...e].sort((t,r)=>{let n=dc(t)-dc(r);return n!==0?n:t.order-r.order})}function dc(e){let t=il(e);return t==="comingSoon"?0:t==="ending"?2:1}import{jsx as Ot,jsxs as zo}from"react/jsx-runtime";function Jh(e){return e.id==="cross-staking"||e.type==="cross-staking"}function fc({align:e="end",sideOffset:t=8,className:r}){let{env:n,theme:o,isMobile:a,domain:i,close:s}=di(),{data:l}=ui(n),d=fn.useMemo(()=>pc(l?.items??[]),[l?.items]),c=24,h=fn.useRef(null),u=fn.useRef(!1),m=fn.useCallback(x=>{h.current={x:x.clientX,y:x.clientY},u.current=!1},[]),y=fn.useCallback(x=>{let k=h.current;h.current=null,k&&(u.current=Math.abs(x.clientX-k.x)>c||Math.abs(x.clientY-k.y)>c)},[]),b=fn.useCallback(()=>{h.current=null,u.current=!0},[]),f=typeof window<"u"?window.location.pathname:"",p=fn.useCallback((x,k)=>{let R=u.current;if(u.current=!1,R&&x.detail!==0)return;let E=k.url[n]??k.url.production,S=uc(E,i);if(!S)try{let C=new URL(E);if(C.pathname===window.location.pathname&&C.search===window.location.search&&C.hash===window.location.hash){s();return}}catch{}if(S){let C=window.open(E,"_blank");if(C){C.opener=null,s();return}}window.location.href=E},[n,i,s]),w=x=>{let k=x.url[n]??x.url.production,R=uc(k,i),E=il(x),S=E==="ending",C=cc(x.iconUrl,n),I=!1;if(!R)try{let M=new URL(k).pathname;I=f===M||f.startsWith(M+"/")}catch{I=!1}return Ot("button",{type:"button",className:"al-grid-item","data-track":"menu_item_click","data-track-id":x.id,"data-active":I||void 0,"data-service-status":E,onPointerDown:m,onPointerUp:y,onPointerCancel:b,onClick:M=>p(M,x),children:zo("div",{className:"al-grid-item-left",children:[zo("div",{className:"al-grid-item-icon",children:[Ot("img",{src:C,alt:x.label,width:24,height:24,loading:"lazy"}),x.isNew&&Ot("span",{className:"al-status-ribbon al-status-ribbon-new",children:"N"})]}),zo("span",{className:"al-grid-item-text",children:[Ot("span",{className:"al-grid-item-label",children:x.label}),S&&Ot("span",{className:"al-grid-item-status-text",children:"(End Soon)"}),x.badge&&!Jh(x)&&Ot("span",{className:"al-badge al-badge-list",children:x.badge})]})]})},x.id)},g=Ot("div",{className:"al-menu","data-theme":o,children:Ot("div",{className:"al-grid",children:d.map(w)})});return a?Ot(ye,{feature:"app_launcher",children:zo(Bo.Portal,{children:[Ot(Bo.Overlay,{className:"al-drawer-overlay"}),zo(Bo.Content,{className:ve("al-drawer-content",r),"data-theme":o,children:[zo("div",{className:"al-drawer-header",children:[Ot(Bo.Close,{className:"al-drawer-close","data-track":"close",children:Ot(nc,{})}),Ot(Bo.Title,{className:"al-drawer-title",children:"CROSS Services"}),Ot(Bo.Close,{className:"al-drawer-close","data-track":"close",children:Ot(oc,{})})]}),Ot("div",{className:"al-drawer-body",children:g})]})]})}):Ot(ye,{feature:"app_launcher",children:Ot(fi.Portal,{children:Ot(fi.Content,{align:e,sideOffset:t,className:ve("al-popover-content",r),"data-theme":o,children:g})})})}function uc(e,t){try{let r=new URL(e).hostname;return typeof window>"u"?!0:r!==(t??window.location.hostname)}catch{return!1}}import*as Jt from"react";import*as tm from"@radix-ui/react-popover";import{Drawer as Ox}from"vaul";import{createContext as $h,useContext as eb}from"react";var sl=$h(null);function Bn(){let e=eb(sl);if(!e)throw new Error("WalletInfo compound components must be used within <WalletInfo>");return e}import{WALLET_LABELS as tb}from"@nexus-cross/crossx-design-system";var ll=(n=>(n.CROSSx="crossx",n.MetaMask="io.metamask",n.Binance="com.binance.wallet",n))(ll||{}),mi={crossx:{name:tb.default,iconUrl:"https://contents.crosstoken.io/wallet/token/images/tCROSS.svg"},"io.metamask":{name:"MetaMask",iconUrl:"https://upload.wikimedia.org/wikipedia/commons/3/36/MetaMask_Fox.svg"},"com.binance.wallet":{name:"Binance Wallet",iconUrl:"https://public.bnbstatic.com/static/images/common/favicon.ico"}};import*as ip from"react";import{jsx as Ae,jsxs as co}from"react/jsx-runtime";function mc({size:e=16,className:t}){return co("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Ae("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"}),Ae("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 po({size:e=16,className:t}){return Ae("svg",{width:e,height:e,viewBox:"4 4 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ae("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 Rn({size:e=16,className:t}){return Ae("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ae("path",{d:"M11.6667 3.5L5.25 9.91667L2.33334 7",stroke:"currentColor",strokeWidth:1.16667,strokeLinecap:"round",strokeLinejoin:"round"})})}function Ir({size:e=24,className:t}){return Ae("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ae("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function gc({size:e=20,className:t}){return co("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Ae("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"}),Ae("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 gi({size:e=20,className:t}){return Ae("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,children:Ae("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 tn({size:e=20,className:t}){return Ae("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ae("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor",strokeWidth:1.67,strokeLinecap:"round",strokeLinejoin:"round"})})}function Or({size:e=20,className:t}){return Ae("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ae("path",{d:"M5 8L10 13L15 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function hc({size:e=16,className:t}){return co("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Ae("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"}),Ae("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 bc({size:e=16,className:t}){return co("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Ae("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"}),Ae("path",{d:"M1.667 1.667l16.666 16.666",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}var rb='<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>',nb=`data:image/svg+xml,${encodeURIComponent(rb)}`;function wc({size:e=42,className:t}){return Ae("img",{src:nb,width:e,height:e,alt:"",className:t,style:{display:"block"}})}function yc({size:e=20,className:t}){return Ae("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ae("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 xc({size:e=24,className:t}){return co("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Ae("defs",{children:co("linearGradient",{id:"wi-send-solid-grad",x1:"3",y1:"21",x2:"21",y2:"3",gradientUnits:"userSpaceOnUse",children:[Ae("stop",{stopColor:"var(--wi-send-solid-from, #f62e61)"}),Ae("stop",{offset:"1",stopColor:"var(--wi-send-solid-to, #f7564a)"})]})}),Ae("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 vc({size:e=20,className:t}){return Ae("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ae("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 kc({size:e=20,className:t}){return Ae("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ae("path",{d:"M6.6665 9.99984H13.3332M9.99984 6.6665V13.3332M18.3332 9.99984C18.3332 14.6022 14.6022 18.3332 9.99984 18.3332C5.39746 18.3332 1.6665 14.6022 1.6665 9.99984C1.6665 5.39746 5.39746 1.6665 9.99984 1.6665C14.6022 1.6665 18.3332 5.39746 18.3332 9.99984Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function Rc({size:e=20,className:t}){return Ae("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ae("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 Sc({size:e=20,className:t}){return co("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Ae("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor"}),Ae("path",{d:"M6 10.2L8.6 12.8L14 7.2",stroke:"var(--ds-accent-primary-on, #ffffff)",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})]})}import*as de from"react";import uo from"bignumber.js";function ob(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 Sn(e,t){if(!e||e==="0")return"0.00";let r=new uo(e).shiftedBy(-t),n=r.isGreaterThanOrEqualTo(1)?2:4;return r.toFormat(n,uo.ROUND_DOWN)}function nr(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}function fo(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 hi(e,t,r){let o=new uo(e).shiftedBy(-t).multipliedBy(new uo(r));return o.isZero()||o.isNaN()?"$0.00":`$${(o.integerValue(uo.ROUND_DOWN).isGreaterThanOrEqualTo(1)?o.decimalPlaces(2,uo.ROUND_DOWN):o.decimalPlaces(4,uo.ROUND_DOWN)).toFormat()}`}function Cc(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=ob(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}}import{useMemo as Tc}from"react";import{useQuery as ab}from"@tanstack/react-query";var gt={dev:{cross:612044,bsc:97},stage:{cross:612044,bsc:97},production:{cross:612055,bsc:56}},bi="https://terms.onechain.nexus/docs/terms-july-23-2026",wi="https://terms.onechain.nexus/docs/pp-july-23-2026",Nc="https://contents.crossdefi.io/Terms/terms/tos-26-07-09-oneusd.html";var ib="send:chain-info";function sb(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 dl(e,...t){let r=e.replace(/\/+$/,""),n=t.map(o=>o.replace(/^\/+|\/+$/g,"")).filter(Boolean);return[r,...n].join("/")}function Ic(e,t,r,n){if(n)return t===gt[e].cross?Ec(t,n):r?.explorer_url?dl(r.explorer_url,r.explorer_postfix?.transaction??"tx",n):lb(e,t,n)}function Ec(e,t){return dl("https://explorer.onechain.nexus",String(e),"tx",t)}function lb(e,t,r){let n=gt[e];if(t===n.cross)return Ec(t,r);if(t===n.bsc)return dl(e==="production"?"https://bscscan.com":"https://testnet.bscscan.com","tx",r)}function la(e,t,r,n=!0){let o=ab({queryKey:[ib,e,t],queryFn:async({signal:s})=>{let l=await Me("walletServer",e),d=await fetch(`${l}/v1/public/chain/info/${t}`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Failed to fetch chain info: ${d.status}`);let c=await d.json();if("code"in c&&c.code!==void 0&&c.code!==200)throw new Error(`Chain info API error: ${c.code}`);return sb(c)},enabled:n,staleTime:3e5}),a=o.data;return{transactionUrl:Tc(()=>Ic(e,t,a,r),[t,a,e,r]),chainInfo:a,...o}}function Mc(e,t,r=!0){let{chainInfo:n}=la(e,t,void 0,r);return{buildTxUrl:Tc(()=>a=>Ic(e,t,n,a),[e,t,n]),chainInfo:n}}var Ac="0x0000000000000000000000000000000000000001";var db="0xa9059cbb",cb=/^0x[a-fA-F0-9]{40}$/,pb="nexus-cross:dapp-ui:send:recent:",Lc=10;function ub(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return e.slice(0,t)}function da(e){return e.toLowerCase()}function mn(e){return cb.test(e)}function zn(e){return da(e.address)===Ac}function cl(e){return`${pb}${e.toLowerCase()}`}function Fo(e){if(typeof window>"u")return[];try{let t=window.localStorage.getItem(cl(e));if(!t)return[];let r=JSON.parse(t);return Array.isArray(r)?r.filter(n=>n!==null&&typeof n=="object"&&mn(n.address)&&typeof n.updatedAt=="number").slice(0,Lc):[]}catch{return[]}}function pl(e,t){if(typeof window>"u")return[];let r=da(t),n=[{address:r,updatedAt:Date.now()},...Fo(e).filter(o=>o.address!==r)].slice(0,Lc);try{window.localStorage.setItem(cl(e),JSON.stringify(n))}catch{return Fo(e)}return n}function ul(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(cl(e))}catch{}}function mo(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 Uo(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=ub(a.toString().padStart(t,"0"));return`${o.toString()}.${i}`}function fl(e,t){let r=e.replace(/^0x/,"").toLowerCase().padStart(64,"0"),n=t.toString(16).padStart(64,"0");return`${db}${r}${n}`}function yi(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 ml(e,t){return yi(e,t,6)}function Dc(e){return yi(e,9,2)}function Pc(e){return e.toLocaleString("en-US")}function xi(e){return e===56||e===97}function vi(e){return e.gasPrice??e.maxFeePerGas}function Oc(e,t=!1){return t?vi(e)!==void 0?"legacy":null:e.maxFeePerGas!==void 0?"dynamic":e.gasPrice!==void 0?"legacy":null}function ki(e,t=!1){if(t){let r=vi(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 Ri(e){return!Number.isFinite(e)||e<=0?"$0.00":`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function Bc(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(Bc(r.cause,t+1)),n.join(`
|
|
6
|
-
`).toLowerCase()}function fb(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 gl(e,t={},r="Failed to send transaction."){let n=Bc(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.":fb(e)||r}var mb=2000000000n,gb=1000000000n;async function Si(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 Ci(e){return BigInt(e)}function hb(e){return`0x${e.toString(16)}`}function bb(e){let t={to:e.to};return e.from&&(t.from=e.from),e.value!==void 0&&e.value>0n&&(t.value=hb(e.value)),e.data&&(t.data=e.data),t}function wb(e){return e===56||e===97}async function zc(e){try{let t=await Si(e,"eth_gasPrice",[]);return{gasPrice:Ci(t)}}catch{return{gasPrice:mb}}}async function yb(e,t){let r=gb;try{let n=await Si(e,"eth_maxPriorityFeePerGas",[]);r=Ci(n)}catch{}return{maxFeePerGas:t+r,maxPriorityFeePerGas:r}}async function xb(e,t){if(t)return zc(e);let r;try{r=(await Si(e,"eth_getBlockByNumber",["latest",!1]))?.baseFeePerGas}catch{}return r?yb(e,Ci(r)):zc(e)}async function Fc(e,t){let r=wb(t.chainId),n=bb(t),[o,a]=await Promise.all([Si(e,"eth_estimateGas",[n]),xb(e,r)]);return{gasLimit:Ci(o),gasPrice:a.gasPrice,maxFeePerGas:a.maxFeePerGas,maxPriorityFeePerGas:a.maxPriorityFeePerGas}}function Uc(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 Fc(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 vb=1500,kb=120;function jc(e){return!!(e.token||e.recipient||e.amount)}function hl({recipient:e,amount:t,token:r,balanceRaw:n}){let o={},a=e.trim(),i=mo(t,r.quantity.decimals),s;return a?mn(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)&&!mn(r.address)&&(o.token="Token contract address is invalid."),{errors:o,rawAmount:o.amount?void 0:s,recipient:a&&mn(a)?a:void 0}}function bl({token:e,walletAddress:t,recipient:r,rawAmount:n}){let o=t;return zn(e)?{to:r,value:n,chainId:e.chainId,from:o}:{to:da(e.address),data:fl(r,n),value:0n,chainId:e.chainId,from:o}}function Rb(e){let{status:t}=e;return t==="reverted"||t==="0x0"||t===0||t===0n||t===!1}var Sb=e=>new Promise(t=>setTimeout(t,e));async function Wc({repository:e,args:t,chainId:r,onSubmitted:n,pollIntervalMs:o=vb,pollMaxAttempts:a=kb}){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 Rb(d)?"reverted":"success";await Sb(o)}return"timeout"}var _c=["token","recipient","amount","review"];function Gc(e){let{env:t,walletAddress:r,accountName:n,accounts:o=[],initialStep:a="recipient",token:i,tokens:s=[],onTokenChange:l,sendTransaction:d,getTransactionReceipt:c,estimateGas:h,getTokenPriceUsd:u,onSubmitted:m,onSuccess:y,onFailed:b,onExit:f,onOutlink:p}=e,w=de.useMemo(()=>Uc({sendTransaction:d,getTransactionReceipt:c,estimateGas:h}),[d,c,h]),[g,x]=de.useState(i);de.useEffect(()=>{x(i)},[i.address,i.chainId]);let[k,R]=de.useState(a),[E,S]=de.useState(""),[C,I]=de.useState(""),[M,B]=de.useState({}),[L,z]=de.useState("idle"),[A,F]=de.useState(""),[ne,K]=de.useState(""),[_,G]=de.useState(null),[oe,Z]=de.useState(!1),[U,X]=de.useState(""),H=de.useRef(0),[pe,be]=de.useState(null),[te,ue]=de.useState(""),[je,Se]=de.useState(()=>Fo(r)),lt=de.useRef(new Set),ge=de.useCallback((O,ae)=>{lt.current.has(O)||(lt.current.add(O),qe("send",O,ae))},[]);de.useEffect(()=>{ge("opened"),a!=="token"&&ge("token_selected",{tags:{item_id:i.symbol}})},[ge,a,i.symbol]);let Ie=de.useMemo(()=>nt(t),[t]),{transactionUrl:ot,chainInfo:Qe}=la(Ie,g.chainId,A||void 0,!0),We=ia(g.chainId,Ie),Oe=We.nativeSymbol??Qe?.currency_symbol??"",tt=We.name??Qe?.name??`Chain ID ${g.chainId}`,Nt=de.useRef({nativeSymbol:Oe||void 0,networkName:tt,tokenSymbol:g.symbol});Nt.current={nativeSymbol:Oe||void 0,networkName:tt,tokenSymbol:g.symbol};let ut=de.useMemo(()=>BigInt(g.quantity.numeric||"0"),[g.quantity.numeric]),xt=de.useMemo(()=>Sn(g.quantity.numeric,g.quantity.decimals),[g.quantity.numeric,g.quantity.decimals]),he=u?.(g),Vt=de.useMemo(()=>{if(he===void 0)return;let O=parseFloat(C.replace(/,/g,""));return Number.isFinite(O)?O*he:0},[C,he]);de.useEffect(()=>{I(""),B({})},[g.address,g.chainId]),de.useEffect(()=>{H.current+=1,G(null),X(""),Z(!1)},[g.address,g.chainId,E,C]),de.useEffect(()=>{Se(Fo(r))},[r]);let bt=de.useCallback(O=>{S(O),B(ae=>({...ae,recipient:void 0}))},[]),wt=de.useCallback(O=>{I(O),B(ae=>({...ae,amount:void 0}))},[]),rt=de.useCallback(()=>{I(xt.replace(/,/g,"")),B(O=>({...O,amount:void 0}))},[xt]),$e=de.useCallback(O=>{x(O),l?.(O),ge("token_selected",{tags:{item_id:O.symbol}}),R("recipient")},[l,ge]),er=de.useCallback(()=>R("token"),[]),At=de.useCallback(()=>{R(O=>{if(O==="result")return"review";if(O===a)return f?.(),O;let ae=_c.indexOf(O);return ae<=0?(f?.(),O):_c[ae-1]})},[a,f]),Ut=de.useCallback(()=>{let{errors:O}=hl({recipient:E,amount:"1",token:g,balanceRaw:ut});if(O.recipient){B(ae=>({...ae,recipient:O.recipient}));return}B(ae=>({...ae,recipient:void 0})),ge("recipient_entered"),R("amount")},[E,g,ut,ge]),Lt=de.useCallback(O=>{S(O),B(ae=>({...ae,recipient:void 0})),ge("recipient_entered"),R("amount")},[ge]),Ve=de.useCallback(()=>{let O=hl({recipient:E,amount:C,token:g,balanceRaw:ut});B(O.errors),!(jc(O.errors)||O.rawAmount===void 0||!O.recipient)&&(be(O.rawAmount),ue(O.recipient),G(null),X(""),z("idle"),ge("amount_entered"),R("review"))},[E,C,g,ut,ge]);de.useEffect(()=>{if(k!=="review"||!te||pe===null||_!==null||oe||U||!w.canEstimateGas(Qe?.rpc))return;let O=++H.current;Z(!0),X(""),(async()=>{try{let ae=bl({token:g,walletAddress:r,recipient:te,rawAmount:pe}),le=await w.estimateGas(ae,Qe?.rpc);if(H.current!==O)return;G(le)}catch(ae){if(H.current!==O)return;X(gl(ae,Nt.current,"Failed to estimate gas."))}finally{H.current===O&&Z(!1)}})()},[k,te,pe,_,oe,U,w,Qe?.rpc,g,r]);let De=de.useMemo(()=>{if(!zn(g)||!_||pe===null)return!1;let O=ki(_,xi(g.chainId));return O===null?!1:pe+O>ut},[g,_,pe,ut]),ft=de.useCallback(async()=>{if(!(!te||pe===null)&&!De){K(""),F(""),z("submitting"),ge("submitted");try{let O="",ae=await Wc({repository:w,args:bl({token:g,walletAddress:r,recipient:te,rawAmount:pe}),chainId:g.chainId,onSubmitted:le=>{O=le,F(le),z("confirming"),Se(pl(r,te)),m?.({txHash:le,chainId:g.chainId,amount:C,tokenSymbol:g.symbol,recipient:te})}});if(ae==="success")z("success"),ge("confirmed"),O&&y?y?.(O):R("result");else if(ae==="reverted"){let le="Transaction reverted on-chain.";z("error"),K(le),ge("confirmed",{status:"failure",reason:Nr(new Error(le))}),O&&b?b({txHash:O,chainId:g.chainId,message:le}):R("result")}else{let le="Transaction receipt was not found. Please check again later.";z("error"),K(le),ge("confirmed",{status:"failure",reason:"timeout"}),O&&b?b({txHash:O,chainId:g.chainId,message:le}):R("result")}}catch(O){z("error"),ge("confirmed",{status:"failure",reason:Nr(O)}),K(gl(O,{nativeSymbol:Oe||void 0,networkName:tt,tokenSymbol:g.symbol})),R("result")}}},[w,te,pe,De,g,C,r,m,y,b,Oe,tt,ge]),[Tt,Ce]=de.useState(!1),It=de.useRef(void 0);de.useEffect(()=>()=>clearTimeout(It.current),[]);let qt=de.useCallback(async()=>{if(A)try{await navigator.clipboard.writeText(A),Ce(!0),clearTimeout(It.current),It.current=setTimeout(()=>Ce(!1),2e3)}catch{}},[A]),P=de.useCallback(()=>{if(!ot||!A)return;let O=me=>{typeof window<"u"&&window.open(me,"_blank","noopener,noreferrer")};if(!p){O(ot);return}let ae=p(ot,{category:"send",origin:"send-transaction",payload:{chainId:g.chainId,txHash:A}});if(ae&&typeof ae.then=="function"){let me=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null;ae.then(mt=>{if(mt===null){me?.close();return}let Dt=mt??ot;if(me)try{me.location.href=Dt}catch{me.close(),O(Dt)}else O(Dt)});return}let le=ae;le!==null&&O(le??ot)},[p,g.chainId,ot,A]),Be=de.useCallback(()=>{K(""),F(""),z("idle"),G(null),X(""),lt.current.delete("submitted"),lt.current.delete("confirmed"),R("review")},[]);return{step:k,status:L,token:g,tokens:s.length>0?s:[g],recipient:E,amount:C,amountUsd:Vt,fieldErrors:M,error:ne,txHash:A,gasEstimate:_,gasLoading:oe,gasError:U,insufficientGas:De,reviewRawAmount:pe,reviewRecipient:te,recentAddresses:je,accounts:o,accountName:n,walletAddress:r,resolvedEnv:Ie,transactionUrl:ot,networkName:tt,nativeSymbol:Oe,nativeDecimals:Qe?.currency_decimals??g.quantity.decimals,balanceRaw:ut,balanceText:xt,priceUsd:he,canSelectToken:(s.length>0?s:[g]).length>1,canSend:w.canSend,getTokenPriceUsd:u,setRecipient:bt,setAmount:wt,setMax:rt,selectToken:$e,goToTokenSelect:er,selectRecipient:Lt,submitRecipient:Ut,submitAmount:Ve,confirmSend:ft,retry:Be,back:At,hashCopied:Tt,copyHash:qt,openTransaction:P}}import*as rn from"react";import{jsx as ca,jsxs as wl}from"react/jsx-runtime";function Hc({flow:e}){let{amount:t,setAmount:r,amountUsd:n,balanceText:o,balanceRaw:a,token:i,setMax:s}=e,l=rn.useRef(null),d=rn.useCallback(()=>{requestAnimationFrame(()=>{let b=l.current;if(!b)return;let f=b.value.length;b.setSelectionRange(f,f)})},[]);rn.useEffect(()=>{l.current?.focus(),d()},[d]),rn.useEffect(()=>{t===""&&(u(!1),d())},[t,d]);let c=rn.useMemo(()=>{let b=mo(t,i.quantity.decimals);return"value"in b&&b.value>a},[t,i.quantity.decimals,a]),[h,u]=rn.useState(!1),m=!h&&t===""?"0.00":t,y=t.trim()===""||t.trim()==="0";return ca("div",{className:"sf-body sf-amount",children:wl("div",{className:"sf-amount-center",children:[ca("span",{className:"sf-amount-usd",children:n!==void 0?Ri(n):"\xA0"}),ca("div",{className:"sf-amount-input-wrap","data-over":c||void 0,"data-empty":y||void 0,onClick:()=>l.current?.focus(),children:ca("input",{ref:l,className:"sf-amount-input",value:m,onChange:b=>{let f=b.target.value;if(h)r(f);else if(t===""){if(f.length<4)return;u(!0);let p=f.startsWith("0.00")?f.slice(4):f;r(p)}else u(!0),r(f)},placeholder:"0.00",inputMode:"decimal",autoComplete:"off","aria-label":`Amount in ${i.symbol}`,size:1})}),wl("div",{className:"sf-amount-balance",children:[ca("span",{children:"Balance:"}),wl("button",{type:"button",className:"sf-amount-max",onClick:s,"data-track":"amount_max",children:[o," ",i.symbol]})]})]})})}import*as nn from"react";var Nb=new Set(["0xff42c13d927a6b9265236619161accb227b6d452","0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb"].map(e=>e.toLowerCase()));function yl(e){return Nb.has(e.toLowerCase())}var Qc={cross:"https://contents.crosstoken.io/wallet/token/images/CROSS.svg",bsc:"https://contents.crosstoken.io/wallet/token/images/BSC.svg"};function pa(e,t){let r=gt[e];if(t===r.cross)return Qc.cross;if(t===r.bsc)return Qc.bsc}var Tb={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=Tb[e],s=o?`&bg=${o}`:"";return`${i}/portrait/evm/${t}.${a}?size=${n}${s}`}import{jsx as Br,jsxs as Ni}from"react/jsx-runtime";function Vc({size:e=20,className:t}){return Ni("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[Br("circle",{cx:"9",cy:"9",r:"6",stroke:"currentColor",strokeWidth:"1.7"}),Br("path",{d:"m17 17-3.2-3.2",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function qc({size:e=20,className:t}){return Br("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":"true",children:Br("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 Yc({size:e=20,className:t}){return Ni("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[Br("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor",opacity:"0.12"}),Br("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function Kc({size:e=16,className:t}){return Br("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",className:t,"aria-hidden":"true",children:Br("path",{d:"M8 3v10m0 0 4-4m-4 4-4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function Zc({size:e=56,className:t}){return Ni("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[Br("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-green-default, #00b4b7)"}),Br("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 Xc({size:e=56,className:t}){return Ni("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[Br("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-red-default, #da0b2e)"}),Br("path",{d:"M20 20 36 36m0-16L20 36",stroke:"#ffffff",strokeWidth:"4",strokeLinecap:"round"})]})}import{jsx as Bt,jsxs as gn}from"react/jsx-runtime";function Jc(e,t){return e.name||`Account ${(e.index??t)+1}`}function $c(e){return e.trim().slice(0,1).toUpperCase()||"A"}function ep(e){return e.toLowerCase()}function tp({flow:e}){let{recipient:t,setRecipient:r,fieldErrors:n,recentAddresses:o,accounts:a,walletAddress:i,resolvedEnv:s,selectRecipient:l}=e,d=nn.useMemo(()=>a.filter(g=>g.address.toLowerCase()!==i.toLowerCase()),[a,i]),c=d.length>0,h=nn.useMemo(()=>new Map(d.map((g,x)=>[ep(g.address),{account:g,index:x}])),[d]),[u,m]=nn.useState("recent"),y=nn.useRef(null);nn.useEffect(()=>{y.current?.focus()},[]);let b="1A1A2E",f=nn.useCallback(async()=>{try{let g=await navigator.clipboard.readText();g&&r(g.trim())}catch{}},[r]),p=t.trim().length>0,w=mn(t.trim());return gn("div",{className:"sf-recipient",children:[gn("div",{className:"sf-recipient-top",children:[gn("div",{className:"sf-address-field","data-filled":p||void 0,"data-invalid":n.recipient||void 0,children:[Bt("textarea",{ref:y,className:"sf-address-input",value:t,onChange:g=>r(g.target.value),placeholder:"Enter the recipient's address",autoComplete:"off",spellCheck:!1,"aria-label":"Recipient address",rows:p?2:1}),p?Bt("button",{type:"button",className:"sf-address-action",onClick:()=>r(""),"aria-label":"Clear","data-track":"recipient_clear",children:Bt(Yc,{size:20})}):Bt("button",{type:"button",className:"sf-address-action",onClick:f,"aria-label":"Paste from clipboard","data-track":"recipient_paste",children:Bt(qc,{size:20})})]}),n.recipient&&Bt("p",{className:"sf-field-error",role:"alert",children:n.recipient}),gn("div",{className:"sf-tabs",role:"tablist",children:[Bt("button",{type:"button",role:"tab",className:"sf-tab","data-active":u==="recent"||void 0,"aria-selected":u==="recent",onClick:()=>m("recent"),"data-track":"recipient_tab","data-track-id":"recent",children:"Recent"}),c&&Bt("button",{type:"button",role:"tab",className:"sf-tab","data-active":u==="account"||void 0,"aria-selected":u==="account",onClick:()=>m("account"),"data-track":"recipient_tab","data-track-id":"account",children:"My Account"})]})]}),Bt("div",{className:"sf-address-list",children:u==="account"&&c?d.map((g,x)=>{let k=Jc(g,x),R=Cn(s,g.address,{size:56,bg:b});return gn("button",{type:"button",className:"sf-address-row",onClick:()=>l(g.address),"data-track":"recipient_item",children:[gn("span",{className:"sf-address-avatar",children:[R&&Bt("img",{src:R,alt:"",width:40,height:40,draggable:!1,onError:E=>{E.currentTarget.style.display="none"}}),Bt("span",{className:"sf-address-avatar-fallback",children:$c(k)})]}),gn("span",{className:"sf-address-meta",children:[Bt("span",{className:"sf-address-name",children:k}),Bt("span",{className:"sf-address-value",children:nr(g.address)})]})]},g.address)}):o.length>0?o.map(g=>{let x=h.get(ep(g.address)),k=x?Jc(x.account,x.index):nr(g.address),R=Cn(s,g.address,{size:56,bg:b});return gn("button",{type:"button",className:"sf-address-row",onClick:()=>l(g.address),"data-track":"recipient_item",children:[gn("span",{className:"sf-address-avatar",children:[R&&Bt("img",{src:R,alt:"",width:40,height:40,draggable:!1,onError:E=>{E.currentTarget.style.display="none"}}),Bt("span",{className:"sf-address-avatar-fallback",children:$c(k)})]}),gn("span",{className:"sf-address-meta",children:[Bt("span",{className:"sf-address-name",children:k}),Bt("span",{className:"sf-address-value",children:nr(g.address)})]})]},g.address)}):Bt("div",{className:"sf-empty",children:"No send history"})}),p&&!w&&!n.recipient&&Bt("p",{className:"sf-field-error",role:"alert",children:"Enter a valid EVM recipient address."})]})}import{jsx as cr,jsxs as jo}from"react/jsx-runtime";function np({flow:e}){let{status:t,txHash:r,error:n,copyHash:o,hashCopied:a,openTransaction:i}=e,s=t==="error",l=t==="success";return s?jo("div",{className:"sf-body sf-result sf-result--error",children:[cr("span",{className:"sf-result-icon",children:cr(Xc,{size:56})}),jo("div",{className:"sf-result-copy",children:[cr("h3",{className:"sf-result-title",children:"Transaction Failed"}),cr("p",{className:"sf-result-desc",children:n||"Something went wrong. Please try again."})]}),r&&cr(rp,{txHash:r,hashCopied:a,onCopy:o,onOpen:i})]}):jo("div",{className:"sf-body sf-result",children:[cr("span",{className:"sf-result-icon","data-pending":!l||void 0,children:l?cr(Zc,{size:56}):cr("span",{className:"sf-result-spinner"})}),jo("div",{className:"sf-result-copy",children:[cr("h3",{className:"sf-result-title",children:l?"Transaction Complete":"Transaction in Progress"}),cr("p",{className:"sf-result-desc",children:l?"Your transfer was sent successfully.":"Transfer in progress. Waiting for confirmation."})]}),r&&cr(rp,{txHash:r,hashCopied:a,onCopy:o,onOpen:i})]})}function rp({txHash:e,hashCopied:t,onCopy:r,onOpen:n}){return jo("div",{className:"sf-result-hash-card",children:[cr("span",{className:"sf-result-hash-label",children:"Transaction Hash"}),jo("div",{className:"sf-result-hash-row",children:[cr("button",{type:"button",className:"sf-result-hash-link",onClick:n,"aria-label":"Open transaction in explorer","data-track":"tx_link_open",children:nr(e)}),cr("button",{type:"button",className:"sf-result-copy-btn",onClick:r,"aria-label":"Copy transaction hash","data-track":"tx_hash_copy",children:t?cr(Rn,{size:16}):"Copy"})]})]})}import{jsx as kt,jsxs as pr}from"react/jsx-runtime";var Ti="\u2014";function op({flow:e}){let{token:t,reviewRawAmount:r,reviewRecipient:n,accountName:o,accounts:a,walletAddress:i,networkName:s,nativeSymbol:l,nativeDecimals:d,gasEstimate:c,gasLoading:h,gasError:u,insufficientGas:m,error:y,resolvedEnv:b}=e,f=zn(t),p=r!==null?yi(r,t.quantity.decimals):"",w=o?.trim()||`Account ${(a[0]?.index??0)+1}`,g=Cn(b,i,{size:56,bg:"1A1A2E"}),x=l||(f?t.symbol:""),k=xi(t.chainId),R=c?Oc(c,k):null,E=c?ki(c,k):null,S=L=>L!==null&&x?`${ml(L,d)} ${x}`:Ti,C=L=>L!==void 0?`${Dc(L)} Gwei`:Ti,I=(()=>{if(!f||!c||E===null||r===null)return Ti;let L=r+E;return`${ml(L,d)} ${x||t.symbol}`})(),M=L=>h?"\u2026":L,B=[{label:"Est. Tx Fee",value:M(S(E))},...R==="dynamic"?[{label:"Max Priority Fee",value:M(C(c?.maxPriorityFeePerGas))},{label:"Max Gas Fee",value:M(C(c?.maxFeePerGas))}]:R==="legacy"?[{label:"Gas Price",value:M(C(c?vi(c):void 0))}]:[],{label:"Gas Limit",value:M(c?Pc(c.gasLimit):Ti)}];return pr("div",{className:"sf-body sf-review",children:[pr("div",{className:"sf-review-amount",children:[kt("img",{className:"sf-review-amount-icon",src:t.icon_url,alt:"",width:40,height:40,draggable:!1,onError:L=>{L.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),pr("span",{className:"sf-review-amount-value",children:[p,kt("span",{className:"sf-review-amount-symbol",children:t.symbol})]})]}),pr("div",{className:"sf-review-parties",children:[pr("div",{className:"sf-review-card sf-review-party",children:[kt("span",{className:"sf-review-party-label",children:"From"}),pr("div",{className:"sf-review-party-head",children:[kt("span",{className:"sf-review-party-avatar",children:g&&kt("img",{src:g,alt:"",width:28,height:28,draggable:!1,onError:L=>{L.currentTarget.style.display="none"}})}),kt("span",{className:"sf-review-party-name",children:w})]}),kt("span",{className:"sf-review-party-addr",children:i})]}),kt("span",{className:"sf-review-arrow","aria-hidden":!0,children:kt(Kc,{size:16})}),pr("div",{className:"sf-review-card sf-review-party",children:[kt("span",{className:"sf-review-party-label",children:"To"}),kt("span",{className:"sf-review-party-addr",children:n})]})]}),pr("section",{className:"sf-review-card",children:[kt("h3",{className:"sf-review-section-title",children:"Summary"}),pr("div",{className:"sf-review-row",children:[kt("span",{className:"sf-review-row-label",children:"Network"}),kt("span",{className:"sf-review-row-value",children:s})]}),B.map(L=>pr("div",{className:"sf-review-row",children:[kt("span",{className:"sf-review-row-label",children:L.label}),kt("span",{className:"sf-review-row-value",children:L.value})]},L.label))]}),pr("section",{className:"sf-review-card",children:[kt("h3",{className:"sf-review-section-title",children:"Total"}),pr("div",{className:"sf-review-row",children:[kt("span",{className:"sf-review-row-label",children:"Total Amount"}),pr("span",{className:"sf-review-row-value",children:[p," ",t.symbol]})]}),f&&pr("div",{className:"sf-review-row",children:[kt("span",{className:"sf-review-row-label",children:"Max. Total Amount"}),kt("span",{className:"sf-review-row-value",children:M(I)})]})]}),m&&!u&&!y&&pr("div",{className:"sf-message sf-message--error",role:"alert",children:["Not enough ",x||t.symbol," to cover the amount plus the network fee. Reduce the amount and try again."]}),(u||y)&&kt("div",{className:"sf-message sf-message--error",role:"alert",children:u||y})]})}import*as Ii from"react";import{jsx as Fn,jsxs as go}from"react/jsx-runtime";function ap({flow:e}){let[t,r]=Ii.useState(""),n=t.trim().toLowerCase(),o=Ii.useMemo(()=>n?e.tokens.filter(a=>a.symbol.toLowerCase().includes(n)||a.name.toLowerCase().includes(n)):e.tokens,[e.tokens,n]);return go("div",{className:"sf-body sf-token-select",children:[go("div",{className:"sf-search",children:[Fn(Vc,{size:20}),Fn("input",{className:"sf-search-input",value:t,onChange:a=>r(a.target.value),placeholder:"Search Tokens",autoComplete:"off",spellCheck:!1,"aria-label":"Search tokens"})]}),go("div",{className:"sf-token-list",children:[o.map(a=>{let i=`${a.chainId}:${a.address.toLowerCase()}`,s=pa(e.resolvedEnv,a.chainId),l=e.getTokenPriceUsd?.(a);return go("button",{type:"button",className:"sf-token-row",onClick:()=>e.selectToken(a),"data-track":"token_item","data-track-id":a.symbol,children:[go("span",{className:"sf-token-left",children:[go("span",{className:"sf-token-icon-wrap",children:[Fn("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&&Fn("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"}})]}),Fn("span",{className:"sf-token-name",children:a.symbol})]}),go("span",{className:"sf-token-right",children:[Fn("span",{className:"sf-token-balance",children:Sn(a.quantity.numeric,a.quantity.decimals)}),l!==void 0&&Fn("span",{className:"sf-token-price",children:Ri(l)})]})]},i)}),o.length===0&&Fn("div",{className:"sf-empty",children:"No tokens found"})]})]})}ce(`.sf-root{display:flex;flex-direction:column;flex:1;min-height:0;font-family:inherit}.sf-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:24px;flex-shrink:0;position:relative;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.sf-header .sf-header-btn:last-child{position:absolute;top:24px;right:24px}.sf-header-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;filter:none;transition:color .15s ease}.sf-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85));filter:none}.sf-header-title{position:absolute;left:50%;transform:translate(-50%);text-align:center;font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);pointer-events:none}.sf-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent;overscroll-behavior:contain}[data-theme=light] .sf-body{scrollbar-color:rgba(0,0,0,.12) transparent}.sf-body::-webkit-scrollbar{width:4px;height:4px}.sf-body::-webkit-scrollbar-track,.sf-body::-webkit-scrollbar-corner{background:transparent}.sf-body::-webkit-scrollbar-thumb{border-radius:4px;background:#ffffff26}.sf-body::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .sf-body::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .sf-body::-webkit-scrollbar-thumb:hover{background:#0003}.sf-empty{padding:32px 0;text-align:center;font-family:inherit;font-size:14px;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-field-error{margin:8px 24px 0;font-family:inherit;font-size:12px;line-height:1.5;color:var(--ds-system-red-default, #da0b2e)}.sf-message--error{margin:16px 0 0;padding:12px 16px;background:var(--ds-system-red-low, #ffeeee);color:var(--ds-system-red-high, #d20609);font-family:inherit;font-size:13px;line-height:1.5;border-radius:12px;width:100%;box-sizing:border-box}.sf-footer{display:flex;flex-shrink:0;padding:16px 24px 24px}.sf-footer:empty{display:none}.sf-footer-row{display:flex;gap:8px;width:100%}.sf-footer-row .sf-btn,.sf-footer-row .sf-btn--secondary{flex:1 1 0;min-width:0}.sf-footer>.sf-btn{width:100%}.sf-btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:1;height:48px;padding:0 24px;border:none;border-radius:12px;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;transition:background-color .15s ease,transform .1s ease}.sf-btn--primary{background:var(--ds-accent-gradient, linear-gradient(196deg, #ff2589 16%, #ff823d 84%));color:#fff}.sf-btn--primary:hover:not(:disabled):not([data-disabled]){filter:brightness(1.05)}.sf-btn--primary:active:not(:disabled):not([data-disabled]){transform:scale(.97)}.sf-btn--primary[data-disabled],.sf-btn--primary:disabled{background:var(--ds-accent-gradient, linear-gradient(196deg, #ff2589 16%, #ff823d 84%));color:#fff;cursor:default;opacity:.5}.sf-btn--secondary{flex:0 0 120px;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-token-select{padding:0;display:flex;flex-direction:column}.sf-token-select .sf-search{margin:16px 24px}.sf-token-select .sf-token-list{width:100%;margin-top:0}.sf-search{display:flex;align-items:center;gap:8px;padding:12px 16px;border-radius:12px;border:1.5px solid transparent;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-low, rgba(0, 0, 0, .4));box-sizing:border-box;transition:border-color .15s ease}.sf-search:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.sf-search:focus-within{border-color:var(--ds-accent-primary-high, #f0640d)}.sf-search-input{flex:1;min-width:0;border:none;background:transparent;outline:none;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-search-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-token-list{display:flex;flex-direction:column;margin-top:8px}.sf-token-row{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 24px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;border-radius:0;box-sizing:border-box;transition:background-color .15s ease}.sf-token-row:hover{background:var(--ds-surface-medium, rgba(0, 0, 0, .04))}.sf-token-left{display:flex;align-items:center;gap:16px;min-width:0}.sf-token-icon-wrap{position:relative;width:40px;height:40px;flex-shrink:0}.sf-token-icon{width:40px;height:40px;border-radius:0;object-fit:contain}.sf-token-chain-badge{position:absolute;right:-2px;bottom:-2px;width:16px;height:16px;border-radius:50%;object-fit:cover}.sf-token-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.sf-token-right{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0}.sf-token-balance{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);white-space:nowrap}.sf-token-price{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.sf-recipient{display:flex;flex-direction:column;flex:1;min-height:0}.sf-recipient-top{display:flex;flex-direction:column;flex-shrink:0;padding:16px 24px 0}.sf-address-field{display:flex;align-items:center;gap:8px;padding:12px;border-radius:12px;border:1.5px solid transparent;background:var(--ds-surface-medium, #f5f7fa);transition:border-color .15s ease;box-sizing:border-box}.sf-address-field:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.sf-address-field:focus-within{border-color:var(--ds-accent-primary-high, #f0640d)}.sf-address-field[data-filled]{border-color:var(--ds-accent-primary-high, #f0640d)}.sf-address-field[data-invalid]{border-color:var(--ds-system-red-default, #da0b2e)}.sf-address-input{flex:1;min-width:0;border:none;background:transparent;outline:none;resize:none;overflow:hidden;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));word-break:break-word;overflow-wrap:anywhere}.sf-address-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-address-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:none;background:transparent;border-radius:6px;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease}.sf-address-action:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-address-field[data-filled] .sf-address-action{border-radius:9999px}.sf-tabs{display:flex;gap:0;margin:16px 0 0}.sf-tab{position:relative;padding:8px 12px;border:none;background:transparent;cursor:pointer;font-family:inherit;font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-tab[data-active]{color:var(--ds-accent-primary-high, #f0640d)}.sf-tab[data-active]:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;border-radius:9999px;background:var(--ds-accent-primary-high, #f0640d)}.sf-address-list{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;margin-top:8px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .sf-address-list{scrollbar-color:rgba(0,0,0,.12) transparent}.sf-address-list::-webkit-scrollbar{width:4px}.sf-address-list::-webkit-scrollbar-track{background:transparent}.sf-address-list::-webkit-scrollbar-thumb{border-radius:4px;background:#ffffff26}[data-theme=light] .sf-address-list::-webkit-scrollbar-thumb{background:#0000001f}.sf-address-row{display:flex;align-items:center;gap:16px;width:100%;padding:12px 24px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;border-radius:0;box-sizing:border-box;transition:background-color .15s ease}.sf-address-row:hover{background:var(--ds-surface-medium, rgba(0, 0, 0, .04))}.sf-address-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:50%;overflow:hidden;background:var(--ds-surface-high, #edf1f2);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-size:14px;font-weight:600}.sf-address-avatar img{position:absolute;inset:0;z-index:1;width:100%;height:100%;object-fit:cover}.sf-address-avatar-fallback{position:relative;z-index:0}.sf-address-meta{display:flex;flex-direction:column;min-width:0}.sf-address-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sf-address-value{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-drawer-content .sf-header{padding:16px}.wi-drawer-content .sf-header .sf-header-btn:last-child{top:16px;right:16px}.wi-drawer-content .sf-token-select{padding:0}.wi-drawer-content .sf-token-select .sf-search{margin:16px}.wi-drawer-content .sf-token-row{padding:12px 16px}.wi-drawer-content .sf-recipient-top{padding:16px 16px 0}.wi-drawer-content .sf-address-row{padding:12px 16px}.wi-drawer-content .sf-footer{padding:12px 16px 24px}.wi-drawer-content .sf-field-error,.wi-drawer-content .sf-message--error{margin:16px 0 0;width:auto}.sf-amount{display:flex;flex-direction:column}.sf-amount-center{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;padding:64px 24px 48px;text-align:center}.sf-amount-usd{font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));min-height:21px}.sf-amount-input-wrap{display:flex;justify-content:center;max-width:100%}.sf-amount-input{width:auto;max-width:100%;border:none;background:transparent;outline:none;text-align:center;font-family:inherit;font-size:40px;font-weight:700;line-height:1.25;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);field-sizing:content}.sf-amount-input-wrap[data-empty] .sf-amount-input,.sf-amount-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-amount-input-wrap[data-over] .sf-amount-input{color:var(--ds-system-red-default, #da0b2e)}.sf-amount-balance{display:inline-flex;align-items:center;gap:4px;font-family:inherit;font-size:14px;font-weight:400;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-amount-max{border:none;background:transparent;padding:0;cursor:pointer;font:inherit;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-decoration:underline;text-underline-offset:2px;transition:color .15s ease}.sf-amount-max:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-drawer-content .sf-amount-center{padding:64px 16px 48px}.sf-review{display:flex;flex-direction:column;gap:16px;padding:24px}.sf-review-amount{display:flex;align-items:center;gap:12px;padding:0;background:transparent}.sf-review-amount-icon{width:40px;height:40px;border-radius:0;object-fit:contain;flex-shrink:0}.sf-review-amount-value{display:inline-flex;flex-direction:column;align-items:flex-start;gap:0;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);word-break:break-all}.sf-review-amount-symbol{font-size:12px;font-weight:400;line-height:1.5;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-parties{position:relative;display:flex;flex-direction:column;gap:0}.sf-review-arrow{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-4px auto;border-radius:50%;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-card{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa)}.sf-review-party-label{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-party-head{display:flex;align-items:center;gap:8px}.sf-review-party-avatar{display:inline-flex;width:24px;height:24px;border-radius:50%;overflow:hidden;background:var(--ds-surface-high, #edf1f2);flex-shrink:0}.sf-review-party-avatar img{width:100%;height:100%;object-fit:cover}.sf-review-party-name{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-review-party-addr{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));word-break:break-all}.sf-review-section-title{margin:0 0 4px;font-family:inherit;font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-highest, #000000)}.sf-review-row{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.sf-review-row-label{font-family:inherit;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-row-value{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));text-align:left;word-break:break-all}.wi-drawer-content .sf-review{padding:16px}.sf-result{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;padding:48px 24px;text-align:center}.sf-result-icon{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px}.sf-result-spinner{width:56px;height:56px;border-radius:50%;border:4px solid var(--ds-border-medium, rgba(0, 0, 0, .18));border-top-color:var(--ds-accent-primary-high, #f0640d);animation:sf-spin .8s linear infinite}@keyframes sf-spin{to{transform:rotate(360deg)}}.sf-result-copy{display:flex;flex-direction:column;gap:8px}.sf-result-title{margin:0;font-family:inherit;font-size:18px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-highest, #000000)}.sf-result-desc{margin:0;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-result-hash-card{display:flex;flex-direction:column;gap:8px;width:100%;padding:16px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);text-align:left}.sf-result-hash-label{font-family:inherit;font-size:12px;font-weight:500;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-result-hash-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.sf-result-hash-link{border:none;background:transparent;padding:0;cursor:pointer;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;color:var(--ds-accent-primary-high, #f0640d)}.sf-result-copy-btn{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:28px;padding:0 10px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));border-radius:8px;background:var(--ds-surface-default, #ffffff);cursor:pointer;font-family:inherit;font-size:12px;font-weight:500;color:var(--ds-content-high, rgba(0, 0, 0, .85))}
|
|
7
|
-
`);import{jsx as _t,jsxs as Ei}from"react/jsx-runtime";var Ib={token:"Send",recipient:"Send",amount:"Send",review:"Sign Transaction",result:""};function Mi({onClose:e,onBackToWallet:t,onConfirmSuccess:r,onSuccess:n,className:o,...a}){let i=ip.useCallback(p=>{n?.(p),r?.(p)},[r,n]),l=Gc({...a,onSuccess:n||r?i:void 0,onExit:t}),{step:d,status:c}=l,h=mn(l.recipient.trim()),u=mo(l.amount,l.token.quantity.decimals),m="value"in u&&u.value<=l.balanceRaw,y=c==="submitting"||c==="confirming",b=d!=="result",f=Ib[d]??"";return _t(ye,{feature:"send",children:Ei("div",{className:ve("sf-root",o),"data-step":d,children:[Ei("header",{className:"sf-header",children:[b?_t("button",{type:"button",className:"sf-header-btn",onClick:l.back,"aria-label":"Back","data-track":"back",children:_t(tn,{size:24})}):_t("span",{className:"sf-header-btn","aria-hidden":!0}),_t("span",{className:"sf-header-title",children:f}),_t("button",{type:"button",className:"sf-header-btn",onClick:e,"aria-label":"Close","data-track":"close",children:_t(Ir,{size:24})})]}),d==="token"&&_t(ap,{flow:l}),d==="recipient"&&_t(tp,{flow:l}),d==="amount"&&_t(Hc,{flow:l}),d==="review"&&_t(op,{flow:l}),d==="result"&&_t(np,{flow:l}),Ei("footer",{className:"sf-footer","data-step":d,children:[d==="recipient"&&_t("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"&&_t("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.submitAmount,"data-disabled":!m||void 0,"aria-disabled":!m,"data-track":"amount_next",children:"Next"}),d==="review"&&Ei("div",{className:"sf-footer-row",children:[_t("button",{type:"button",className:"sf-btn sf-btn--secondary",onClick:l.back,disabled:y,"data-track":"review_cancel",children:"Cancel"}),_t("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.confirmSend,disabled:y||!l.canSend||l.insufficientGas,"data-track":"review_send",children:y?"Sending...":"Send"})]}),d==="result"&&c==="success"&&_t("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:()=>r?.(l.txHash||void 0),"data-track":"result_ok",children:"All done"}),d==="result"&&c==="error"&&_t("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.retry,"data-track":"result_retry",children:"Try Again"})]})]})})}import*as sp from"@radix-ui/react-popover";import{Drawer as Eb}from"vaul";import{jsx as Ai,jsxs as Mb}from"react/jsx-runtime";function lp({asChild:e,className:t,children:r}){let{isMobile:n,theme:o,walletAddress:a}=Bn(),i=r!=null,s=e??!0,l=i?r:Mb("button",{type:"button",className:ve("wi-trigger-btn",t),"data-theme":o,"data-mobile":n||void 0,children:[Ai(mc,{size:n?14:16}),Ai("span",{className:"wi-trigger-address",children:nr(a)})]});return n?Ai(Eb.Trigger,{asChild:s,children:l}):Ai(sp.Trigger,{asChild:s,children:l})}import*as q from"react";import*as cs from"@radix-ui/react-popover";import{Drawer as ds}from"vaul";import Ia from"bignumber.js";import xl from"bignumber.js";var Ab=/^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i;function at(e){if(e==null)return null;if(e instanceof xl)return e.isFinite()?e:null;if(typeof e=="number")return Number.isFinite(e)?new xl(e):null;let t=String(e).replace(/[,%\s]/g,"");if(!Ab.test(t))return null;let r=new xl(t);return r.isFinite()?r:null}import{useQueries as Lb}from"@tanstack/react-query";import{useMemo as Db}from"react";var vl="user-balance";async function Pb(e,t,r,n){let o=new URLSearchParams({networkId:`eip155:${t}`,account:r}),a=await fetch(`${e}/v1/public/token/balance?${o}`,{cache:"no-store",signal:n});if(!a.ok)throw new Error(`Failed to fetch token balance: ${a.status}`);let i=await a.json();if(i.code!==200)throw new Error(`Token balance API error: ${i.code}`);return i.data}function Un(e,t,r=!0){let n=gt[e],o=[n.cross,n.bsc],a=Lb({queries:o.map(d=>({queryKey:[vl,e,t,d],queryFn:async({signal:c})=>Pb(await Me("walletServer",e),d,t,c),enabled:!!t&&r,staleTime:0,refetchInterval:r?5e3:!1}))}),i=a.some(d=>d.isLoading),s=a.some(d=>d.isError);return{tokens:Db(()=>{let d=[];for(let c of a)c.data&&d.push(...c.data);return d},[a]),isLoading:i,isError:s}}import{useQuery as Ob,useQueries as Bb}from"@tanstack/react-query";import{useMemo as zb}from"react";var Fb="forge-holdings",Ub="forge-token-image";async function jb(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 Wb(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 dp(e,t,r=!0){let{data:n,...o}=Ob({queryKey:[Fb,e,t],queryFn:async({signal:a})=>jb(await Me("bondingCurve",e),t,a),enabled:!!t&&r,staleTime:0,refetchInterval:r?5e3:!1});return{holdings:n??[],...o}}function cp(e,t,r=!0){let n=Bb({queries:t.map(a=>({queryKey:[Ub,e,a],queryFn:async({signal:i})=>Wb(await Me("bondingCurve",e),a,i),enabled:r,staleTime:1/0}))});return{imageMap:zb(()=>{let a=new Map;for(let i of n)i.data&&a.set(i.data.address,i.data.image_url);return a},[n])}}import{useQuery as _b}from"@tanstack/react-query";import{useMemo as Gb}from"react";var kl="token-stats";function zr(e,t){return`${e}:${t.toLowerCase()}`}function jn(e,t=!0){let{data:r,...n}=_b({queryKey:[kl,e],queryFn:async({signal:a})=>{let i=await Me("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:Gb(()=>{let a=new Map;if(!r?.data)return a;for(let i of r.data){let s=zr(i.chain_id,i.address);a.set(s,i)}return a},[r]),...n}}import{useQuery as Hb}from"@tanstack/react-query";var Qb="crossd-apr",pp=6e4,Vb="https://crossd-dashboard-api.crossdefi.io/api/v1/overview",Li,ua;function Rl(){return Li&&Li.expiresAt>Date.now()?Promise.resolve(Li.value):ua||(ua=(async()=>{let e=await fetch(Vb,{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 Li={value:n,expiresAt:Date.now()+pp},n})().finally(()=>{ua=void 0}),ua)}function Di(e){let t=Math.abs(e),r=(e>=0?Math.floor:Math.ceil)(t*100)/100;return`APR ${e>=0?"+":"-"}${r}%`}function up(){let{data:e,...t}=Hb({queryKey:[Qb],queryFn:Rl,staleTime:pp});return{aprPercent:e??null,...t}}import{useQuery as qb}from"@tanstack/react-query";import{useMemo as fp}from"react";var Yb="token-info";function fa(e,t){return`${t.toLowerCase()}_${e}`}function mp(e,t=!0){let{data:r,...n}=qb({queryKey:[Yb,e],queryFn:async({signal:i})=>{let s=await Me("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=fp(()=>{let i=new Map;if(!r?.data)return i;for(let s of r.data){let l=fa(s.chain_id,s.address);i.set(l,s.category)}return i},[r]),a=fp(()=>{let i=new Map;if(!r?.data)return i;for(let s of r.data)i.set(fa(s.chain_id,s.address),s);return i},[r]);return{categoryMap:o,infoMap:a,...n}}import{useMemo as Kb}from"react";import Zb from"bignumber.js";function gp(e,t,r){let{tokens:n,isLoading:o}=Un(e,t,r),{statsMap:a}=jn(e,r);return Kb(()=>{let i=new Zb(0);for(let c of n){let h=a.get(zr(c.chainId,c.address));if(!h)continue;let u=at(c.quantity.numeric),m=at(h.price);if(!u||!m)continue;let y=u.shiftedBy(-c.quantity.decimals).multipliedBy(m);y.isNaN()||(i=i.plus(y))}let s=i.toFixed(),{displayValue:l,isLowerBound:d}=Cc(s);return{totalUsd:s,displayValue:l,isLowerBound:d,isLoading:o}},[n,a,o])}import{QRCodeSVG as Tx}from"qrcode.react";import{WALLET_LABELS as Ix}from"@nexus-cross/crossx-design-system";import{WALLET_LABELS as $b}from"@nexus-cross/crossx-design-system";import{WALLET_LABELS as Sl}from"@nexus-cross/crossx-design-system";import{jsx as ze,jsxs as ho}from"react/jsx-runtime";var Xb='<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>',Jb=`data:image/svg+xml,${encodeURIComponent(Xb)}`;function Pi(){return ze("img",{src:Jb,width:40,height:40,alt:"",style:{display:"block"}})}function hp(){return ho("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[ho("g",{clipPath:"url(#clip0_1331_27065)",children:[ze("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"}),ze("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"}),ze("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"}),ze("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"}),ze("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"}),ze("path",{d:"M22.1857 36.1951V39.831H17.6699V36.1951H22.1857Z",fill:"#C0C4CD"}),ze("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"})]}),ze("defs",{children:ze("clipPath",{id:"clip0_1331_27065",children:ze("rect",{width:"40",height:"40",fill:"white"})})})]})}function bp(){return ho("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ze("path",{d:"M12.23 16.81L20 9.04L27.77 16.81L32.29 12.29L20 0L7.71 12.29L12.23 16.81Z",fill:"#F3BA2F"}),ze("path",{d:"M9.04 20L4.52 15.48L0 20L4.52 24.52L9.04 20Z",fill:"#F3BA2F"}),ze("path",{d:"M12.23 23.19L20 30.96L27.77 23.19L32.29 27.71L20 40L7.71 27.71L12.23 23.19Z",fill:"#F3BA2F"}),ze("path",{d:"M35.48 24.52L40 20L35.48 15.48L30.96 20L35.48 24.52Z",fill:"#F3BA2F"}),ze("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 wp(){return ho("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"246",viewBox:"0 0 247 246",fill:"none",children:[ze("rect",{width:"247.005",height:"245.105",rx:"36",fill:"#121212"}),ze("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"}),ze("path",{d:"M59.8364 99.8915V59.7551H12.0414L30.4787 77.8377V99.8915H59.8364Z",fill:"#2FD7FF"}),ze("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 yp(){return ho("svg",{width:"40",height:"40",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ho("g",{clipPath:"url(#clip0_1185_7785)",children:[ze("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"}),ze("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"})]}),ze("defs",{children:ze("clipPath",{id:"clip0_1185_7785",children:ze("rect",{width:"28",height:"28",fill:"white"})})})]})}function xp(){return ho("svg",{width:"40",height:"40",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[ze("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"}),ze("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"}),ze("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"}),ze("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 vp(){return ze("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:ze("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 kp(){return ze("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ze("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var ma={cross_embedded:{id:"cross_embedded",name:Sl.social,description:"Sign in with Google or Apple",icon:Pi},cross_wallet:{id:"cross_wallet",name:Sl.app,description:"App approval is required",icon:Pi,featured:!0},cross_extension:{id:"cross_extension",name:Sl.extension,description:"Browser extension approval is required",icon:Pi,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:hp,rdns:"io.metamask"},binance:{id:"binance",name:"Binance",description:"Mobile app only \u2014 Add CROSS network first",icon:bp},verse8:{id:"verse8",name:"Verse8 Wallet",description:"Optimized for Forge and Verse8 ecosystem",icon:wp,badge:"For Forge"},tron:{id:"tron",name:"Tron Wallet",description:"Dedicated for Tron-based transactions and assets",icon:yp,badge:"For SHOP"}};function Cl(e){return ma[e]}var Nl={google:{id:"google",name:"Google",icon:xp},apple:{id:"apple",name:"Apple",icon:vp}};function Rp(e){return Nl[e]}var Sp="dappui.wcm.last-selected",e0=new Set(["google","apple"]);function Cp(e){try{window.localStorage.setItem(Sp,e)}catch{}}function Np(){let e=null;try{e=window.localStorage.getItem(Sp)}catch{return}if(e)return e0.has(e)?$b.default:ma[e]?.name}function zt(e,t,r,n){if(!n||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;e.preventDefault();let o;try{o=n(t,r)}catch(d){console.error("[dapp-ui] onOutlink threw:",d);return}let a=d=>{typeof window>"u"||window.open(d,"_blank","noopener,noreferrer")};if((d=>!!d&&(typeof d=="object"||typeof d=="function")&&typeof d.then=="function")(o)){let d=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null,c=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(c,h=>{console.error("[dapp-ui] onOutlink rejected:",h),d?.close()});return}let s=o;if(s===null)return;a(s??t)}import*as yo from"react";import{Drawer as Xw}from"vaul";import{createContext as o0,useContext as a0,useMemo as i0}from"react";import Fr from"bignumber.js";var t0=/^(\d{4}-\d{2}-\d{2})/;function Tp(e){if(!e||e.length===0)return;let t=new Map,r;for(let{key:o,cumulative:a}of e.map(i=>({key:t0.exec(i.reference_date)?.[1],cumulative:i.cumulative_earned})).filter(i=>!!i.key&&i.cumulative!=null).sort((i,s)=>i.key<s.key?-1:i.key>s.key?1:0))t.set(o,a),r=o;if(r===void 0)return;let n=new Date().toISOString().slice(0,10);return t.get(n)??t.get(r)}function Ip(e){return e.poolType==="Unknown"}function Oi(e){return e.length<=12?e:`${e.slice(0,6)}...${e.slice(-4)}`}function Bi(e){return e.length<=13?e:`${e.slice(0,6)}...${e.slice(-4)}`}function ga(e,t){let r=e.length+t.length;if(r>32)return"xs";if(r>24)return"sm"}function Tl(e){return e?.toUpperCase()==="WONE"?"ONE":e}var r0=["Request Arguments:","Details:","Docs:","Version:","Contract Call:"];function ha(e,t){console.error("[wallet-portfolio] withdraw failed:",e);let n=e instanceof Error?e.message:"";for(let a of r0){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 n0="0xe00e8bf3";function Ep(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`${n0}${n}${o}`}function Wo(e){return!e||e<=0n?"0":new Fr(e.toString()).shiftedBy(-9).toFormat(2,Fr.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function zi(e){return!e||e<=0n?"0":new Fr(e.toString()).toFormat(0,Fr.ROUND_DOWN)}function Fi(e){if(!e||e<=0n)return"0";let t=new Fr(e.toString()).shiftedBy(-18),r=t.isLessThan(1e-4)?7:4;return t.toFormat(r,Fr.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function hn(e,t){let r=new Fr(e).shiftedBy(-t);return!r.isFinite()||r.isZero()?"0":r.isGreaterThanOrEqualTo(1)?r.toFormat(2,Fr.ROUND_DOWN):r.toFormat(4,Fr.ROUND_DOWN)}function Il(e){return hn(e,0)}var ba={rate:1,symbol:"$"};function bo(e,t=ba){let r=Number.isFinite(t.rate)&&t.rate>0?t.rate:1;return`${t.symbol||"$"}${e.times(r).toFormat(2,Fr.ROUND_DOWN)}`}function Wn(e,t,r,n=ba){let o=new Fr(r||"0");if(!o.isFinite()||o.isLessThanOrEqualTo(0))return null;let a=new Fr(e||"0").shiftedBy(-t).times(o);return a.isFinite()?bo(a,n):null}var wa=o0(null);function Rt(){let e=a0(wa);if(!e)throw new Error("WalletPortfolio compound components must be used within <WalletPortfolio>");return e}function Ur(){let{conversionRatio:e,currencySymbol:t}=Rt();return i0(()=>({rate:typeof e=="number"&&e>0?e:ba.rate,symbol:t||ba.symbol}),[e,t])}import{Drawer as s0}from"vaul";import{jsx as Mp}from"react/jsx-runtime";function Ap({asChild:e,children:t}){let{walletAddress:r}=Rt(),n=t!=null,o=e??!0,a=n?t:Mp("button",{type:"button",children:nr(r)});return Mp(s0.Trigger,{asChild:o,children:a})}import{Drawer as Ki}from"vaul";import*as Ct from"react";import{useQueryClient as Yw}from"@tanstack/react-query";import{createContext as l0,useContext as d0}from"react";var El=l0(null);function Lp(){return d0(El)}import{jsx as ur,jsxs as _i}from"react/jsx-runtime";function Dp({size:e=22,className:t}){return ur("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ur("path",{d:"M14 4L7 11L14 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Pp({size:e=22,className:t}){return _i("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ur("path",{d:"M18.333 3.667v5.5h-5.5",stroke:"currentColor",strokeWidth:1.833,strokeLinecap:"round",strokeLinejoin:"round"}),ur("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 Op({size:e=12,className:t}){return ur("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ur("path",{d:"M6 11A5 5 0 106 1a5 5 0 000 10zM6 8V6M6 4h.005",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})})}function Ui({size:e=16,className:t}){return _i("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ur("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"}),ur("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 ji({size:e=16,className:t}){return ur("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ur("path",{d:"M13.333 4L6 11.333 2.667 8",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function Wi({size:e=48,className:t}){return _i("svg",{width:e,height:e,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ur("circle",{cx:"24",cy:"24",r:"24",fill:"currentColor"}),ur("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 Er({size:e=12,className:t}){return _i("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:[ur("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"}),ur("path",{d:"M7 1H11V5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),ur("path",{d:"M11 1L6 6",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})]})}import{useQuery as c0}from"@tanstack/react-query";import{useMemo as Bp}from"react";var p0="wp:reward-pools";function _o(e,t=!0){let{data:r,...n}=c0({queryKey:[p0,e],queryFn:async({signal:i})=>{let s=await Me("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=Bp(()=>r?.data.pools.filter(i=>i.pool_type==="CrossPool")??[],[r]),a=Bp(()=>r?.data.pools.filter(i=>i.pool_type==="GamePool")??[],[r]);return{crossPools:o,gamePools:a,allPools:r?.data.pools??[],...n}}import{useQuery as u0}from"@tanstack/react-query";import{useMemo as f0}from"react";var m0="wp:user-deposits";function Gi(e,t,r=!0){let n=r&&!!t,{data:o,...a}=u0({queryKey:[m0,e,t],queryFn:async({signal:s})=>{let l=await Me("gameReward",e),d=await fetch(`${l}/v1/users/${t}/deposits`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Deposits fetch failed: ${d.status}`);let c=await d.json();if(c.code!==200)throw new Error(`Deposits API error: ${c.code}`);return c},enabled:n,staleTime:0});return{depositMap:f0(()=>{let s=new Map;if(!o?.data.user_deposits)return s;for(let l of o.data.user_deposits)s.set(l.pool_address.toLowerCase(),l);return s},[o]),deposits:o?.data.user_deposits??[],...a}}import{useQuery as g0}from"@tanstack/react-query";import{useMemo as h0}from"react";var zp={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},Fp={dev:"https://stg.onechain.nexus/points",stage:"https://stg.onechain.nexus/points",production:"https://www.onechain.nexus/points"};var Up={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"};var Ml={dev:"https://dev-stake.ogfcorp.com",stage:"https://stg-stake.ogfcorp.com",production:"https://stake.ogfcorp.com"},jp={dev:`${Ml.dev}/portfolio`,stage:`${Ml.stage}/portfolio`,production:`${Ml.production}/portfolio`};var Wp={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},jr={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"},Hi={dev:"https://stg-swap-api.crossdefi.io",stage:"https://stg-swap-api.crossdefi.io",production:"https://swap-api.crossdefi.io"},_p={dev:"https://stg.crossdefi.io",stage:"https://stg.crossdefi.io",production:"https://www.crossdefi.io"},Gp={dev:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",stage:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",production:"0xEFd871aF7D695A0c1709e46b565761F4cd1Ef5ba"},Hp={dev:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",stage:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",production:"0x731a104a4461ae45bfef520468b43c262d35e682"};var b0="wp:token-info",w0="0x0000000000000000000000000000000000000001";function bn(e,t=!0){let r=gt[e].cross,{data:n,...o}=g0({queryKey:[b0,e],queryFn:async({signal:c})=>{let h=await Me("walletServer",e),u=await fetch(`${h}/v1/public/token/info`,{cache:"no-store",signal:c});if(!u.ok)throw new Error(`Failed to fetch token info: ${u.status}`);let m=await u.json();if(m.code!==200)throw new Error(`Token info API error: ${m.code}`);return m},enabled:t,staleTime:300*1e3}),{byChainAddr:a,byChainSym:i}=h0(()=>{let c=new Map,h=new Map;if(!n?.data)return{byChainAddr:c,byChainSym:h};for(let u of n.data){let m=u.address.toLowerCase();c.set(`${u.chain_id}:${m}`,u),c.set(m,u);let y=u.symbol.replace(/^t/,"").toUpperCase(),b=`${u.chain_id}:${y}`;h.has(b)||h.set(b,u),h.has(y)||h.set(y,u)}return{byChainAddr:c,byChainSym:h}},[n]);return{getTokenImage:(c,h,u)=>{let m=c.toLowerCase(),y=!!u?.chainOnly,b=a.get(`${r}:${m}`);if(b?.image)return b.image;if(!y){let f=a.get(m);if(f?.image)return f.image}if(h){let f=h.replace(/^t/,"").toUpperCase(),p=i.get(`${r}:${f}`);if(p?.image)return p.image;if(!y){let w=i.get(f);if(w?.image)return w.image}}return""},getTokenSymbol:(c,h,u)=>{let m=c.toLowerCase();return(a.get(`${r}:${m}`)??(u?.chainOnly?void 0:a.get(m)))?.symbol||h},getNativeToken:()=>a.get(`${r}:${w0}`),...o}}import*as Ll from"react";import{jsx as Al,jsxs as Qp}from"react/jsx-runtime";function Wr({sectionKey:e,title:t,icon:r,iconFit:n="cover",isEmpty:o,loading:a=!1,children:i}){let s=Lp();return Ll.useEffect(()=>{s?.report(e,{loading:a,empty:o})},[s,e,a,o]),Ll.useEffect(()=>()=>s?.unregister(e),[s,e]),o?null:Qp("div",{className:"wp-svc-card",children:[Qp("div",{className:"wp-svc-card-head",children:[Al("img",{className:"wp-svc-card-icon",src:r,alt:"",style:{objectFit:n}}),Al("span",{className:"wp-svc-card-title",children:t})]}),Al("div",{className:"wp-svc-items",children:i})]})}import Dl from"bignumber.js";import{jsx as or,jsxs as fr}from"react/jsx-runtime";var y0="ONErewards";function x0(e){return new Dl(e||"0").isGreaterThan(0)}function Vp(){let{env:e,walletAddress:t,onOutlink:r}=Rt(),n=Ur(),o=!!t,{allPools:a,isLoading:i}=_o(e,o),{depositMap:s,isLoading:l}=Gi(e,t,o),{getTokenImage:d}=bn(e,o),c=(m,y)=>`${zp[e]}/gametoken/tokens/${m.deposit_token.address}?mode=rewards${y==="withdraw"?"&trade=withdraw":""}`,h=`${jr[e]}/reward.png`,u=a.filter(m=>{let y=s.get(m.pool_address.toLowerCase()),b=y?.deposited_amount??"0",f=y?.claimable_reward??"0";return!(new Dl(b).isZero()&&new Dl(f).isZero())});return or(Wr,{sectionKey:"rewards",title:y0,icon:h,isEmpty:u.length===0,loading:i||l,children:u.map(m=>{let y=s.get(m.pool_address.toLowerCase()),b=y?.deposited_amount??"0",f=y?.claimable_reward??"0",p=c(m,"withdraw"),w=c(m,"claim"),g=d(m.deposit_token.address,m.deposit_token.symbol),x=m.reward_tokens[0],k=x?d(x.address,x.symbol):"",R=m.reward_tokens.map(L=>L.symbol),E=R.length>0?`${m.deposit_token.symbol}-${R.join("/")}`:m.deposit_token.symbol,S=x?hn(f,x.decimals):"0",C=x?.symbol??"Reward",I=Wn(b,m.deposit_token.decimals,m.deposit_token.price,n),M=x?Wn(f,x.decimals,x.price,n):null,B=!!y&&x0(f);return fr("article",{className:"wp-item","data-side":"reward",children:[fr("div",{className:"wp-item-body",children:[fr("div",{className:"wp-item-line",children:[or("span",{className:"wp-item-label",children:"Pool (Deposit - Earn)"}),fr("div",{className:"wp-svc-token",children:[fr("span",{className:"wp-token-stack","aria-hidden":!0,children:[g&&or("img",{className:"wp-svc-token-icon",src:g,alt:""}),k&&or("img",{className:"wp-svc-token-icon",src:k,alt:""})]}),or("span",{children:E})]})]}),fr("div",{className:"wp-item-line",children:[or("span",{className:"wp-item-label",children:"Deposited"}),fr("div",{className:"wp-svc-token wp-svc-token--amount",children:[g&&or("img",{className:"wp-svc-token-icon",src:g,alt:""}),fr("div",{className:"wp-svc-amount",children:[or("span",{className:"wp-svc-amount-main",children:hn(b,m.deposit_token.decimals)}),I&&or("span",{className:"wp-item-usd",children:I})]})]})]}),fr("div",{className:"wp-item-line",children:[fr("span",{className:"wp-item-label",children:["Claimable (",C,")"]}),fr("div",{className:"wp-svc-token wp-svc-token--amount",children:[k&&or("img",{className:"wp-svc-token-icon",src:k,alt:""}),fr("div",{className:"wp-svc-amount",children:[or("span",{className:"wp-svc-amount-main",children:S}),M&&or("span",{className:"wp-item-usd",children:M})]})]})]})]}),fr("div",{className:"wp-item-tags",children:[fr("a",{className:"wp-tag wp-tag--muted",href:p,target:"_blank",rel:"noopener noreferrer","data-track":"rewards_withdraw_open",onClick:L=>zt(L,p,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:m,userDeposit:y}},r),children:[or("span",{className:"wp-tag-label",children:"Withdraw"}),or(Er,{size:12,className:"wp-tag-icon"})]}),fr("a",{className:"wp-tag wp-tag--mint","data-disabled":!B||void 0,"aria-disabled":!B||void 0,href:B?w:void 0,target:B?"_blank":void 0,rel:B?"noopener noreferrer":void 0,onClick:L=>{if(!B){L.preventDefault();return}zt(L,w,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:m,userDeposit:y}},r)},children:[or("span",{className:"wp-tag-label",children:"Claim"}),or(Er,{size:12,className:"wp-tag-icon"})]})]})]},m.pool_address)})})}import*as eu from"react";import{useQuery as I0}from"@tanstack/react-query";import{useMemo as Qi}from"react";var v0="0x70a08231",k0="0x18160ddd",R0="0x313ce567",S0=8e3;async function C0(e,t,r,n){let o=new AbortController,a=setTimeout(()=>o.abort(),S0);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 N0(e){return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function ya(e){if(!(!e||e==="0x"))try{return BigInt(e)}catch{return}}async function Nn(e,t,r,n,o){try{return await C0(e,"eth_call",[o?{from:o,to:t,data:r}:{to:t,data:r},"latest"],n)}catch{return}}async function T0(e,t,r,n){let[o,a,i]=await Promise.all([Nn(e,r,v0+N0(t),n),Nn(e,r,k0,n),Nn(e,r,R0,n)]),s=ya(o);if(s===void 0)return null;let l=ya(i);return{balance:s,totalSupply:ya(a),decimals:l!==void 0?Number(l):void 0}}async function xa(e,t){let r=gt[e].cross,n=await Me("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 qp(e,t,r,n){if(!t||r.length===0)return{};let o;try{o=await xa(e,n)}catch{o=void 0}if(!o)return{};let a=await Promise.all(r.map(async s=>[s.toLowerCase(),await T0(o,t,s,n)])),i={};for(let[s,l]of a)l&&(i[s]=l);return i}var E0="wp:withdraw-token-meta",M0="0xc89039c5",A0="0x95d89b41",L0="0x313ce567";function D0(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 P0(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 O0(e,t,r){if(t.length===0)return{};let n;try{n=await xa(e,r)}catch{n=void 0}if(!n)return{};let o=await Promise.all(t.map(async i=>{let s=P0(await Nn(n,i,M0,r));if(!s)return[i.toLowerCase(),null];let[l,d]=await Promise.all([Nn(n,s,A0,r),Nn(n,s,L0,r)]),c=D0(l),h=ya(d);return c?[i.toLowerCase(),{tokenAddress:s,symbol:c,decimals:h!==void 0?Number(h):18}]:[i.toLowerCase(),null]})),a={};for(let[i,s]of o)s&&(a[i]=s);return a}function Yp(e,t,r=!0){let o=r&&!!t,{allPools:a,isLoading:i}=_o(e,o),{deposits:s,isLoading:l}=Gi(e,t,o),d=Qi(()=>{let f=new Map;for(let p of a)f.set(p.pool_address.toLowerCase(),p);return f},[a]),c=Qi(()=>s.filter(f=>{try{return BigInt(f.deposited_amount||"0")>0n}catch{return!1}}),[s]),h=Qi(()=>c.map(f=>f.pool_address.toLowerCase()).filter(f=>!d.has(f)).sort(),[c,d]),{data:u,isLoading:m}=I0({queryKey:[E0,e,h],queryFn:({signal:f})=>O0(e,h,f),enabled:o&&h.length>0,staleTime:1440*60*1e3});return{positions:Qi(()=>{let f=[];for(let p of c){let w=p.pool_address.toLowerCase(),g=d.get(w);if(g){f.push({poolId:p.pool_id,poolAddress:p.pool_address,poolType:g.pool_type,tokenSymbol:g.deposit_token.symbol,tokenAddress:g.deposit_token.address,decimals:g.deposit_token.decimals,price:g.deposit_token.price,depositedRaw:p.deposited_amount});continue}let x=u?.[w];x&&f.push({poolId:p.pool_id,poolAddress:p.pool_address,poolType:"Unknown",tokenSymbol:x.symbol,tokenAddress:x.tokenAddress,decimals:x.decimals,depositedRaw:p.deposited_amount})}return f},[c,d,u]),isLoading:i||l||m}}import*as Kt from"react";import{Fragment as Kp,jsx as Le,jsxs as Et}from"react/jsx-runtime";var B0=400;function z0(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":`${Fi(e.gasLimit*n)} ${r??""}`.trim()}function Pl(e,t,r){return r==="loading"?"Estimating...":r==="error"||r==="unavailable"?"-":`${e} ${t}`.trim()}function F0({position:e,size:t}){return e.icon?Le("img",{src:e.icon,alt:"",width:t,height:t}):Le("span",{children:e.tokenSymbol.slice(0,1)})}function Zp({open:e,status:t,positions:r,initialPoolAddress:n,walletAddress:o,txHash:a,error:i,copied:s=!1,estimateWithdraw:l,onClose:d,onConfirm:c,onCopyHash:h,trackFunnel:u,nativeSymbol:m}){let[y,b]=Kt.useState(null),[f,p]=Kt.useState("idle"),w=Kt.useRef(0),g=Kt.useRef(void 0),x=Kt.useRef(null);Kt.useEffect(()=>()=>clearTimeout(g.current),[]);let k=Kt.useMemo(()=>{let z=n?.toLowerCase();return r.find(A=>A.poolAddress.toLowerCase()===z)??r[0]??null},[r,n]),R=Kt.useMemo(()=>{try{return BigInt(k?.depositedRaw??"0")}catch{return 0n}},[k?.depositedRaw]),E=k?.decimals??18;Kt.useEffect(()=>{!e||!k||u?.("position_selected")},[e,k,u]);let S=Kt.useCallback(()=>{b(null),p(l?"idle":"unavailable"),w.current+=1,x.current=null},[]);if(Kt.useEffect(()=>{e&&S()},[e,S]),Kt.useEffect(()=>{if(!e||t!=="confirm"){clearTimeout(g.current);return}if(!l||!k){clearTimeout(g.current),p("unavailable");return}if(R<=0n){clearTimeout(g.current),w.current+=1,x.current=null,b(null),p("idle");return}let z=`${k.poolAddress.toLowerCase()}:${R.toString()}`;if(x.current===z)return;x.current=z,clearTimeout(g.current);let A=w.current+1;w.current=A,p("loading"),g.current=setTimeout(()=>{l(k,R).then(F=>{w.current===A&&(b(F??null),p(F?"ready":"unavailable"))}).catch(()=>{w.current===A&&(b(null),p("error"))})},B0)},[e,t,R,l,k]),!e||!k)return null;let C=t==="submitting",I=Wo(y?.maxPriorityFeePerGas),M=Wo(y?.maxFeePerGas??y?.gasPrice),B=zi(y?.gasLimit),L=hn(k.depositedRaw,E);return Le("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:z=>{z.target===z.currentTarget&&!C&&d()},children:Et("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:[Le("div",{className:"wp-claim-grabber","aria-hidden":!0,children:Le("span",{})}),Et("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&a?Et(Kp,{children:[Le("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:Le(Wi,{})}),Et("div",{className:"wp-claim-copy",children:[Le("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),Le("p",{className:"wp-claim-desc",children:"Your withdrawal request has been submitted. Balances will update shortly after the transaction settles."})]}),Le("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:Et("div",{className:"wp-claim-list-item",children:[Le("span",{children:"Tx Hash"}),Et("button",{type:"button",className:"wp-claim-hash",onClick:h,"aria-label":"Copy transaction hash","data-track":"withdraw_hash_copy",children:[Le("strong",{children:Bi(a)}),s?Le(ji,{}):Le(Ui,{})]})]})})]}):Et(Kp,{children:[t==="error"&&Et("div",{className:"wp-claim-heading",children:[Le("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),Le("p",{className:"wp-claim-error-message",children:i||"The withdraw request could not be completed."})]}),Et("div",{className:"wp-claim-reward-card","data-fit":ga(k.tokenSymbol,L),"aria-label":"Deposited balance",children:[Le("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:Le(F0,{position:k,size:28})}),Le("strong",{className:"wp-claim-reward-symbol",children:k.tokenSymbol}),Le("strong",{className:"wp-claim-reward-amount",children:L})]}),Et("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:[Et("div",{className:"wp-claim-account-row",children:[Et("div",{className:"wp-claim-account",children:[Le("span",{className:"wp-claim-account-avatar","aria-hidden":!0}),Et("strong",{children:[k.tokenSymbol," Pool"]})]}),Le("span",{children:Oi(o)})]}),Le("span",{className:"wp-claim-divider","aria-hidden":!0}),Et("div",{className:"wp-claim-detail-list",children:[Et("div",{className:"wp-claim-detail-row",children:[Le("span",{children:"Est. Tx Fee"}),Le("strong",{children:z0(y,f,m)})]}),Et("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Le("span",{children:"Priority Fee Per Gas"}),Le("strong",{children:Pl(I,"Gwei",f)})]}),Et("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Le("span",{children:"Max Fee Per Gas"}),Le("strong",{children:Pl(M,"Gwei",f)})]}),Et("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Le("span",{children:"Gas Limit"}),Le("strong",{children:Pl(B,"",f)})]})]})]})]}),Et("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&Le("button",{type:"button",className:"wp-claim-secondary","data-track":"withdraw_cancel",onClick:d,children:t==="error"?"Close":"Cancel"}),Et("button",{type:"button",className:"wp-claim-primary","data-track":"withdraw_confirm",onClick:()=>{if(t==="success"){d();return}k&&R>0n&&c(k,R,y)},disabled:C||(t==="confirm"||t==="error")&&R<=0n,children:[t==="success"&&"Done",t==="submitting"&&Le("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}),t==="error"&&"Try Again",t==="confirm"&&"Withdraw Now"]})]})]}),Le("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:Le("span",{})})]})})}import*as St from"react";import{useQueryClient as W0}from"@tanstack/react-query";import{useQuery as U0}from"@tanstack/react-query";var j0="wp:reward-factory-info";function Xp(e,t=!0){let{data:r,...n}=U0({queryKey:[j0,e],queryFn:async({signal:o})=>{let a=await Me("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 _0="wp:";function Jp(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function $p(e){let{env:t,walletAddress:r,sendTransaction:n,estimateGas:o}=Rt(),a=!!r,i=!!n,s=W0(),{routerAddress:l}=Xp(t,a&&i),d=Jp(l),[c,h]=St.useState(!1),[u,m]=St.useState(void 0),[y,b]=St.useState("confirm"),[f,p]=St.useState(),[w,g]=St.useState(""),[x,k]=St.useState(!1),R=St.useRef(void 0);St.useEffect(()=>()=>clearTimeout(R.current),[]);let E=St.useRef(new Set),S=St.useCallback((F,ne)=>{E.current.has(F)||(E.current.add(F),qe("withdraw",F,{...ne,tags:{section:e,...ne?.tags}}))},[e]),C=St.useCallback((F,ne)=>d?{to:d,value:0n,data:Ep(F,ne),chainId:gt[t].cross}:null,[t,d]),I=St.useCallback(()=>{s.invalidateQueries({predicate:F=>typeof F.queryKey[0]=="string"&&F.queryKey[0].startsWith(_0)})},[s]),M=St.useCallback(F=>{m(F),h(!0),b("confirm"),p(void 0),g(""),k(!1),E.current=new Set,S("opened")},[S]),B=St.useCallback(()=>{y!=="submitting"&&(h(!1),m(void 0),b("confirm"),p(void 0),g(""),k(!1),y==="success"&&I())},[y,I]),L=St.useCallback(async(F,ne)=>{if(!o)return null;let K=C(F.poolId,ne),_=Jp(r);return!K||!_?null:o({...K,from:_})},[C,o,r]),z=St.useCallback(async()=>{if(!(!f||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(f),k(!0),clearTimeout(R.current),R.current=setTimeout(()=>k(!1),1400)}catch{k(!1)}},[f]),A=St.useCallback(async(F,ne,K)=>{if(!n){b("error"),g("Withdraw is not available for this wallet.");return}if(!d){b("error"),g("Withdraw contract address is not available.");return}try{b("submitting"),g("");let _=C(F.poolId,ne);if(!_){b("error"),g("Withdraw contract address is not available.");return}S("submitted");let G=await n({..._,gas:K?.gasLimit&&K.gasLimit>0n?K.gasLimit:void 0,maxFeePerGas:K?.maxFeePerGas&&K.maxFeePerGas>0n?K.maxFeePerGas:void 0,maxPriorityFeePerGas:K?.maxPriorityFeePerGas&&K.maxPriorityFeePerGas>0n?K.maxPriorityFeePerGas:void 0});p(G),b("success"),S("confirmed"),I()}catch(_){b("error"),g(ha(_,"Failed to request withdraw.")),S("confirmed",{status:"failure",reason:Nr(_)})}},[C,I,d,n,S]);return{canWithdrawInline:i,isOpen:c,initialPoolAddress:u,status:y,txHash:f,error:w,copied:x,hasEstimator:!!o,openWithdraw:M,closeWithdraw:B,estimateWithdraw:L,confirmWithdraw:A,copyHash:z,trackFunnelOnce:S}}import{Fragment as H0,jsx as yr,jsxs as Tn}from"react/jsx-runtime";var G0="ONEpoints";function tu(){let{env:e,walletAddress:t,onOutlink:r}=Rt(),n=Ur(),o=!!t,{getTokenImage:a,getNativeToken:i}=bn(e,o),s=$p("points"),{positions:l,isLoading:d}=Yp(e,t,o),c=eu.useMemo(()=>l.filter(Ip).map(m=>({...m,icon:a(m.tokenAddress,m.tokenSymbol)})),[l,a]),h=`${jr[e]}/point.png`,u=Fp[e];return Tn(H0,{children:[yr(Wr,{sectionKey:"points",title:G0,icon:h,isEmpty:c.length===0,loading:d,children:c.map(m=>{let y=m.price?Wn(m.depositedRaw,m.decimals,m.price,n):null;return Tn("article",{className:"wp-item","data-side":"reward",children:[Tn("div",{className:"wp-item-body",children:[Tn("div",{className:"wp-item-line",children:[yr("span",{className:"wp-item-label",children:"Token"}),Tn("div",{className:"wp-svc-token",children:[m.icon&&yr("img",{className:"wp-svc-token-icon",src:m.icon,alt:""}),yr("span",{children:m.tokenSymbol})]})]}),Tn("div",{className:"wp-item-line",children:[yr("span",{className:"wp-item-label",children:"Deposited"}),Tn("div",{className:"wp-svc-token wp-svc-token--amount",children:[m.icon&&yr("img",{className:"wp-svc-token-icon",src:m.icon,alt:""}),Tn("div",{className:"wp-svc-amount",children:[yr("span",{className:"wp-svc-amount-main",children:hn(m.depositedRaw,m.decimals)}),y&&yr("span",{className:"wp-item-usd",children:y})]})]})]})]}),yr("div",{className:"wp-item-tags",children:s.canWithdrawInline?yr("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"points_withdraw_open",onClick:()=>s.openWithdraw(m.poolAddress),children:yr("span",{className:"wp-tag-label",children:"Withdraw"})}):Tn("a",{className:"wp-tag wp-tag--muted",href:u,target:"_blank",rel:"noopener noreferrer","data-track":"points_withdraw_open",onClick:b=>zt(b,u,{category:"portfolio",origin:"portfolio-points",payload:{position:m}},r),children:[yr("span",{className:"wp-tag-label",children:"Withdraw"}),yr(Er,{size:12,className:"wp-tag-icon"})]})})]},m.poolAddress)})}),yr(Zp,{open:s.isOpen,status:s.status,positions:c,initialPoolAddress:s.initialPoolAddress,walletAddress:t,txHash:s.txHash,error:s.error,copied:s.copied,estimateWithdraw:s.hasEstimator?s.estimateWithdraw:void 0,onClose:s.closeWithdraw,onConfirm:s.confirmWithdraw,onCopyHash:s.copyHash,trackFunnel:s.trackFunnelOnce,nativeSymbol:i()?.symbol})]})}import*as Ol from"react";import{useQuery as Q0}from"@tanstack/react-query";var V0="wp:stake-info";function ru(e,t,r=!0){let n=r&&!!t,{data:o,...a}=Q0({queryKey:[V0,e,t],queryFn:async({signal:s})=>{let l=await Me("posa",e),d=await fetch(`${l}/stake/${t}`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Stake info fetch failed: ${d.status}`);let c=await d.json();if(c.code!==0&&c.code!==200)throw new Error(`Stake info API error: ${c.code}`);return c},enabled:n,staleTime:0});return{stakeInfo:o?.data,...a}}import{useQuery as q0}from"@tanstack/react-query";var Y0="wp:stake-rewards",K0=31;function nu(e,t,r=!0){let n=r&&!!t,{data:o,...a}=q0({queryKey:[Y0,e,t],queryFn:async({signal:i})=>{let s=await Me("posa",e),l=await fetch(`${s}/rewards/${t}?limit=${K0}`,{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:Tp(o),...a}}import{useQuery as Z0}from"@tanstack/react-query";var X0="wp:staking-onchain";function ou(e,t,r=!0){let n=r&&!!t&&!!e,{data:o,...a}=Z0({queryKey:[X0,e],queryFn:async()=>{if(!t)throw new Error("stakingRewardsReader not provided");return t(e)},enabled:n,staleTime:0});return{onchain:o,...a}}import{useMemo as au}from"react";import J0 from"bignumber.js";function iu(e){return e?.trim().toUpperCase()==="ONE"}function su(e){return new J0(e||"0").isGreaterThan(0)}function Vi(e,t,r=!0){let{allPools:n}=_o(e,r),o=au(()=>{for(let d of n)for(let c of[d.deposit_token,...d.reward_tokens])if(iu(c?.symbol)&&su(c.price))return c.price},[n]),a=r&&o===void 0,{tokens:i}=Un(e,t,a),{statsMap:s}=jn(e,a),l=gt[e].cross;return au(()=>{if(o)return o;let d=i.find(c=>c.chainId===l&&iu(c.symbol));if(d){let c=s.get(zr(d.chainId,d.address));if(c&&su(c.price))return c.price}return"0"},[o,i,s,l])}import Gn from"bignumber.js";import{jsx as _r,jsxs as _n}from"react/jsx-runtime";function $0(e){if(!e)return"\u2014";let t=new Gn(e);return t.isFinite()?`${t.toFormat(2,Gn.ROUND_DOWN)}%`:"\u2014"}function lu(){let{env:e,walletAddress:t,onOutlink:r,stakingRewardsReader:n}=Rt(),o=Ur(),a=!!t,{stakeInfo:i,isLoading:s}=ru(e,t,a),{latestReward:l,aprAccrued:d,isLoading:c}=nu(e,t,a),{onchain:h}=ou(t,n,a),u=Vi(e,t,a),{getNativeToken:m}=bn(e,a),y=m()?.symbol,b="ONEstaking",f=`${jr[e]}/cross-staking.png`,p=jp[e],w=i?.total_stake??"0",g=Ol.useMemo(()=>h?new Gn(h.earnedWei.toString()).shiftedBy(-18).toString(10):l?.cumulative_earned??i?.rewards_earned??"0",[h,l,i]),x=Ol.useMemo(()=>h?new Gn(h.stakedWei.toString()).shiftedBy(-18):new Gn(w),[h,w]),k=d!==void 0?new Gn(d):void 0,R=i?.days_since_first_stake,E=k!==void 0&&k.isFinite()&&x.isGreaterThan(0)&&R!==null&&R!==void 0?k.div(x).times(365).div(Math.max(1,R)).times(100):void 0,S=!(new Gn(w).isZero()&&new Gn(g).isZero()),C=Wn(w,0,u,o),I=Wn(g,0,u,o);return _r(Wr,{sectionKey:"staking",title:b,icon:f,iconFit:"contain",isEmpty:!S,loading:s||c,children:_n("article",{className:"wp-item","data-side":"stake",children:[_n("div",{className:"wp-item-body",children:[_n("div",{className:"wp-item-line",children:[_r("span",{className:"wp-item-label",children:"Staked"}),_n("div",{className:"wp-svc-amount",children:[_r("span",{className:"wp-svc-amount-main",children:`${Il(w)} ${y??""}`.trim()}),C&&_r("span",{className:"wp-item-usd",children:C})]})]}),_n("div",{className:"wp-item-line",children:[_r("span",{className:"wp-item-label",children:"Rewards Earned"}),_n("div",{className:"wp-svc-amount",children:[_r("span",{className:"wp-svc-amount-main",children:`${Il(g)} ${y??""}`.trim()}),I&&_r("span",{className:"wp-item-usd",children:I})]})]}),_n("div",{className:"wp-item-line",children:[_r("span",{className:"wp-item-label",children:"My APR"}),_r("span",{children:$0(E?.toString(10))})]})]}),_r("div",{className:"wp-item-tags",children:_n("a",{className:"wp-tag wp-tag--mint",href:p,target:"_blank",rel:"noopener noreferrer","data-track":"stake_outlink",onClick:M=>zt(M,p,{category:"portfolio",origin:"portfolio-stake",payload:{stakeInfo:i}},r),children:[_r("span",{className:"wp-tag-label",children:"Manage"}),_r(Er,{size:12,className:"wp-tag-icon"})]})})]})})}import*as Bl from"react";import{useQuery as ew}from"@tanstack/react-query";var tw="wp:game-swap-pools";function du(e,t,r=!0){let n=r&&!!t,{data:o,...a}=ew({queryKey:[tw,e,t],queryFn:async({signal:i})=>{let s=await Me("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}}import{useQuery as rw}from"@tanstack/react-query";var nw="wp:game-swap-lp-balances";function cu(e,t,r,n){let o=[...r].map(l=>l.toLowerCase()).sort(),a=!!t&&o.length>0,{data:i,...s}=rw({queryKey:[nw,e,t,o,!!n],queryFn:async({signal:l})=>{let d=n?await n(o):await qp(e,t,o,l),c={};for(let[h,u]of Object.entries(d))c[h.toLowerCase()]=u;return c},enabled:a,staleTime:0});return{balances:i??{},...s}}import In from"bignumber.js";import{jsx as Gr,jsxs as on}from"react/jsx-runtime";var ow="Gametoken LP",uu=18,aw=new In("0.0001");function pu(e){return e?.trim().toUpperCase()==="ONE"}function iw(e){return e&&e>0?e:uu}function sw(e){let t=pu(e.token_a?.symbol)&&!pu(e.token_b?.symbol),r=t?e.reserve_a:e.reserve_b,n=iw(t?e.token_a?.decimals:e.token_b?.decimals),o=new In(r||"0").shiftedBy(-n);return!o.isFinite()||o.isLessThanOrEqualTo(0)?new In(0):o.times(2)}function lw(e,t,r,n){let o=e.token_a?.symbol?.trim()||"TOKEN",a=e.token_b?.symbol?.trim()||n||"?",i=t?.decimals??uu,s,l;if(t&&t.totalSupply&&t.totalSupply>BigInt(0)){let d=new In(t.balance.toString()),c=new In(t.totalSupply.toString()),h=d.div(c);s=h.times(100);let u=h.times(sw(e));if(u.isGreaterThan(0)){let m=new In(e.quote_usd??e.cross_usd??"0");l=m.isGreaterThan(0)?bo(u.times(m),r):`${u.toFormat(4,In.ROUND_DOWN)} ${n??""}`.trim()}}return{pool:e,tokenASymbol:o,tokenBSymbol:a,info:t,lpAmountRaw:t?.balance.toString(),lpDecimals:i,sharePercent:s,valueText:l}}function fu(){let{env:e,walletAddress:t,onOutlink:r,lpBalanceReader:n}=Rt(),o=Ur(),a=!!t,{pools:i,isLoading:s}=du(e,t,a),l=Bl.useMemo(()=>i.map(p=>p.pair_address).filter(Boolean),[i]),{balances:d,isLoading:c}=cu(e,t,l,n),{getNativeToken:h}=bn(e,a),u=h()?.symbol,m=`${jr[e]}/game-token.png`,y=Object.keys(d).length>0,b=Bl.useMemo(()=>{let p=i.map(w=>lw(w,d[w.pair_address?.toLowerCase()],o,u));return y?p.filter(w=>w.lpAmountRaw?new In(w.lpAmountRaw).shiftedBy(-w.lpDecimals).isGreaterThanOrEqualTo(aw):!1):p},[i,d,y,o,u]),f=p=>{let w=p.token_a?.address??p.pair_address;return`${Wp[e]}/gametoken/tokens/${w}?trade=deposit`};return Gr(Wr,{sectionKey:"gameSwap",title:ow,icon:m,iconFit:"contain",isEmpty:b.length===0,loading:s||c,children:b.map(p=>{let{pool:w}=p,g=f(w),x=`${p.tokenASymbol} / ${p.tokenBSymbol}`,k=w.token_a?.logo_url,R=w.token_b?.logo_url;return on("article",{className:"wp-item","data-side":"game-swap",children:[on("div",{className:"wp-item-body",children:[on("div",{className:"wp-item-line",children:[Gr("span",{className:"wp-item-label",children:"Pool"}),on("div",{className:"wp-svc-token",children:[on("span",{className:"wp-token-stack","aria-hidden":!0,children:[k&&Gr("img",{className:"wp-svc-token-icon",src:k,alt:""}),R&&Gr("img",{className:"wp-svc-token-icon",src:R,alt:""})]}),Gr("span",{children:x})]})]}),p.lpAmountRaw!==void 0&&on("div",{className:"wp-item-line",children:[Gr("span",{className:"wp-item-label",children:"My LP"}),on("span",{children:[hn(p.lpAmountRaw,p.lpDecimals)," LP"]})]}),p.sharePercent!==void 0&&on("div",{className:"wp-item-line",children:[Gr("span",{className:"wp-item-label",children:"Pool Share"}),on("span",{children:[p.sharePercent.toFormat(2,In.ROUND_DOWN),"%"]})]}),p.valueText!==void 0&&on("div",{className:"wp-item-line",children:[Gr("span",{className:"wp-item-label",children:"Value"}),Gr("span",{children:p.valueText})]})]}),Gr("div",{className:"wp-item-tags",children:on("a",{className:"wp-tag wp-tag--mint",href:g,target:"_blank",rel:"noopener noreferrer","data-track":"gameswap_outlink","data-track-id":x,onClick:E=>zt(E,g,{category:"portfolio",origin:"portfolio-game-swap",payload:{pool:w}},r),children:[Gr("span",{className:"wp-tag-label",children:"Manage"}),Gr(Er,{size:12,className:"wp-tag-icon"})]})})]},w.pair_address)})})}import wo from"bignumber.js";import{useMemo as gw}from"react";import{useQuery as dw}from"@tanstack/react-query";var cw="wp:forge-pools";function mu(e,t,r=!0){let n=r&&!!t,{data:o,...a}=dw({queryKey:[cw,e,t],queryFn:async()=>{let s=await Me("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}}import{useQueries as pw}from"@tanstack/react-query";import{useMemo as uw}from"react";var fw="wp:forge-token-detail";async function mw(e,t){let r=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store"});return r.ok?(await r.json())?.data?.token??null:null}function gu(e,t,r=!0){let n=pw({queries:t.map(i=>({queryKey:[fw,e,i],queryFn:async()=>mw(await Me("bondingCurve",e),i),enabled:r&&!!i,staleTime:3e4}))}),o=uw(()=>{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}}import{jsx as xr,jsxs as Hn}from"react/jsx-runtime";var hw="ONEforge",hu=18,bw="https://contents.crosstoken.io/wallet/token/images/FT.png";function ww(e){if(!e||e==="0")return"0";let t=new wo(e).shiftedBy(-hu);return t.isZero()?"0":t.isGreaterThanOrEqualTo(1)?t.toFormat(2,wo.ROUND_DOWN):t.toFormat(4,wo.ROUND_DOWN)}function yw(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 xw(e,t,r,n){let o=new wo(r||"0");if(!o.isGreaterThan(0))return null;let a=new wo(e.total_supply||"0"),i=new wo(e.lp_balance||"0"),s=new wo(t?.reserve_b||"0").shiftedBy(-hu);if(!a.isGreaterThan(0)||!i.isGreaterThan(0)||!s.isGreaterThan(0))return null;let l=s.times(2),c=i.div(a).times(l).times(o);return c.isFinite()?bo(c,n):null}function bu(){let{env:e,walletAddress:t,onOutlink:r}=Rt(),n=Ur(),o=!!t,{pools:a,isEmpty:i,isLoading:s}=mu(e,t,o),l=gw(()=>a.map(m=>m.token.address),[a]),{detailMap:d}=gu(e,l,o&&l.length>0),c=Vi(e,t,o),h=m=>`${Up[e]}/forge/token/${m.token.address}`,u=`${jr[e]}/forge.png`;return xr(Wr,{sectionKey:"forge",title:hw,icon:u,iconFit:"contain",isEmpty:i,loading:s,children:a.map(m=>{let y=d.get(m.token.address.toLowerCase()),b=y?.image_url||y?.image||m.token.image||bw,f=y?.symbol||m.token.symbol,p=h(m),w=xw(m,y,c,n);return Hn("a",{className:"wp-item","data-side":"lp",href:p,target:"_blank",rel:"noopener noreferrer","data-track":"forge_outlink","data-track-id":f,onClick:g=>zt(g,p,{category:"portfolio",origin:"portfolio-forge",payload:{pool:m,tokenDetail:y}},r),children:[Hn("div",{className:"wp-item-body",children:[Hn("div",{className:"wp-item-line",children:[xr("span",{className:"wp-item-label",children:"Asset"}),Hn("div",{className:"wp-svc-token",children:[xr("img",{className:"wp-svc-token-icon",src:b,alt:""}),xr("span",{children:f}),y?.name&&xr("span",{className:"wp-token-subtle",children:y.name})]})]}),Hn("div",{className:"wp-item-line",children:[xr("span",{className:"wp-item-label",children:"LP Balance"}),xr("div",{className:"wp-svc-token wp-svc-token--amount",children:Hn("div",{className:"wp-svc-amount",children:[xr("span",{className:"wp-svc-amount-main",children:ww(m.lp_balance)}),w&&xr("span",{className:"wp-item-usd",children:w})]})})]}),Hn("div",{className:"wp-item-line",children:[xr("span",{className:"wp-item-label",children:"Ownership"}),xr("span",{className:"wp-line-value",children:yw(m.pool_ownership)})]})]}),xr("div",{className:"wp-item-tags",children:Hn("span",{className:"wp-tag wp-tag--muted",children:[xr("span",{className:"wp-tag-label",children:"Withdraw"}),xr(Er,{size:12,className:"wp-tag-icon"})]})})]},m.pair_address)})})}import{useMemo as Mu}from"react";import Qw from"bignumber.js";import{useQuery as vw}from"@tanstack/react-query";var kw="wp:crossd-positions";function Rw(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 wu(e,t,r=!0){let n=r&&!!t,{data:o,...a}=vw({queryKey:[kw,e,t],queryFn:async()=>{let s=await fetch(`${Hi[e]}/api/v1/positions?owner=${t}`,{cache:"no-store"});if(!s.ok)throw new Error(`crossd positions fetch failed: ${s.status}`);return Rw(await s.json())},enabled:n,staleTime:0}),i=o??[];return{positions:i,isEmpty:i.length===0,...a}}import{useQueries as Sw}from"@tanstack/react-query";import{useMemo as Cw}from"react";var Nw="wp:crossd-position-details";function Tw(e){let t=e??{},r=t.data??t;return r?.token_id||r?.pool?r:null}function yu(e,t,r=!0){let n=Sw({queries:t.map(a=>({queryKey:[Nw,e,a],queryFn:async()=>{let i=await fetch(`${Hi[e]}/api/v1/positions/${a}`,{cache:"no-store"});if(!i.ok)throw new Error(`crossd position detail failed: ${i.status}`);return Tw(await i.json())},enabled:r&&!!a,staleTime:6e4}))});return{detailMap:Cw(()=>{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])}}import*as En from"react";import{Fragment as vu,jsx as Ee,jsxs as Zt}from"react/jsx-runtime";var Iw=300*1e3,xu="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function Ew(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":`${Fi(e.gasLimit*n)} ${r??""}`.trim()}function zl(e,t,r){return r?"Estimating...":`${e} ${t}`.trim()}function ku({open:e,status:t,target:r,token0Icon:n,token1Icon:o,token0Symbol:a,token1Symbol:i,nativeSymbol:s,txHash:l,error:d,copied:c=!1,hasEstimator:h,prepareWithdraw:u,confirmWithdraw:m,onClose:y,onCopyHash:b,trackFunnel:f}){let[p,w]=En.useState(null),[g,x]=En.useState(null),k=En.useRef(0);En.useEffect(()=>{if(!e||!r)return;let H=++k.current;w(null),x(null),f?.("dialog_opened"),u().then(pe=>{k.current===H&&(w(pe),x(pe?Date.now():null))})},[e,r]);let R=t==="submitting",E=t==="estimating"||t==="confirm"&&!p,S=En.useCallback(async()=>{let H=p,pe=!g||Date.now()-g>Iw;if(!H||pe){let be=++k.current;if(H=await u(),k.current!==be)return;w(H),x(H?Date.now():null)}H&&await m(H)},[p,g,u,m]);if(!e||!r)return null;let{position:C,detail:I}=r,M=I.pool?.token0,B=I.pool?.token1,L=a||M?.symbol||C.pool?.token0_symbol||"?",z=i||B?.symbol||C.pool?.token1_symbol||"?",A=M?.decimals??18,F=B?.decimals??18,ne=n||M?.logo_url||xu,K=o||B?.logo_url||xu,_=`${L}/${z}`,G=p?Uo(p.expectedAmount0.toString(),A):null,oe=p?Uo(p.expectedAmount1.toString(),F):null,Z=Wo(p?.estimate?.maxPriorityFeePerGas),U=Wo(p?.estimate?.maxFeePerGas??p?.estimate?.gasPrice),X=zi(p?.estimate?.gasLimit);return Ee("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:H=>{H.target===H.currentTarget&&!R&&y()},children:Zt("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:[Ee("div",{className:"wp-claim-grabber","aria-hidden":!0,children:Ee("span",{})}),Zt("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&l?Zt(vu,{children:[Ee("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:Ee(Wi,{})}),Zt("div",{className:"wp-claim-copy",children:[Ee("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),Zt("p",{className:"wp-claim-desc",children:["Your ",_," position withdrawal has been submitted. Balances will update shortly after the transaction settles."]})]}),Ee("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:Zt("div",{className:"wp-claim-list-item",children:[Ee("span",{children:"Tx Hash"}),Zt("button",{type:"button",className:"wp-claim-hash",onClick:b,"aria-label":"Copy transaction hash","data-track":"crossd_withdraw_hash_copy",children:[Ee("strong",{children:Bi(l)}),c?Ee(ji,{}):Ee(Ui,{})]})]})})]}):Zt(vu,{children:[t==="error"&&Zt("div",{className:"wp-claim-heading",children:[Ee("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),Ee("p",{className:"wp-claim-error-message",children:d||"The withdraw request could not be completed."})]}),Zt("div",{className:"wp-claim-reward-card","data-fit":ga(L,G??""),"aria-label":`Expected ${L}`,children:[Ee("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:Ee("img",{src:ne,alt:"",width:28,height:28})}),Ee("strong",{className:"wp-claim-reward-symbol",children:L}),Ee("strong",{className:"wp-claim-reward-amount",children:G??"Estimating..."})]}),Zt("div",{className:"wp-claim-reward-card","data-fit":ga(z,oe??""),"aria-label":`Expected ${z}`,children:[Ee("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:Ee("img",{src:K,alt:"",width:28,height:28})}),Ee("strong",{className:"wp-claim-reward-symbol",children:z}),Ee("strong",{className:"wp-claim-reward-amount",children:oe??"Estimating..."})]}),h&&Ee("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:Zt("div",{className:"wp-claim-detail-list",children:[Zt("div",{className:"wp-claim-detail-row",children:[Ee("span",{children:"Est. Tx Fee"}),Ee("strong",{children:Ew(p?.estimate,E,s)})]}),Zt("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Ee("span",{children:"Priority Fee Per Gas"}),Ee("strong",{children:zl(Z,"Gwei",E)})]}),Zt("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Ee("span",{children:"Max Fee Per Gas"}),Ee("strong",{children:zl(U,"Gwei",E)})]}),Zt("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Ee("span",{children:"Gas Limit"}),Ee("strong",{children:zl(X,"",E)})]})]})})]}),Zt("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&Ee("button",{type:"button",className:"wp-claim-secondary","data-track":"crossd_withdraw_cancel",onClick:y,children:t==="error"?"Close":"Cancel"}),Ee("button",{type:"button",className:"wp-claim-primary","data-track":"crossd_withdraw_confirm",onClick:()=>{if(t==="success"){y();return}R||E||(f?.("confirm_clicked"),S())},disabled:R||E,children:t==="success"?"Done":R?Ee("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}):E?Ee("span",{className:"wp-claim-button-spinner","aria-label":"Estimating"}):t==="error"?"Retry":"Withdraw"})]})]}),Ee("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:Ee("span",{})})]})})}import*as ht from"react";import{useQueryClient as Ww}from"@tanstack/react-query";var Mw="0x0c49ccbe",Aw="0xfc6f7865",Lw="0x49404b7c",Dw="0xdf2ab5bb",Pw="0xac9650d8",Ru=(1n<<128n)-1n,Cu=600n,Ow=99n,Bw=100n;function Fl(e){return e*Ow/Bw}function Su(e,t){return!!e&&!!t&&e.toLowerCase()===t.toLowerCase()}function vr(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 qi(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 Ul(e){return Mw+vr(e.tokenId,"tokenId")+vr(e.liquidity,"liquidity")+vr(e.amount0Min,"amount0Min")+vr(e.amount1Min,"amount1Min")+vr(e.deadline,"deadline")}function zw(e){return Aw+vr(e.tokenId,"tokenId")+qi(e.recipient,"recipient")+vr(e.amount0Max,"amount0Max")+vr(e.amount1Max,"amount1Max")}function Fw(e,t){return Lw+vr(e,"amountMinimum")+qi(t,"recipient")}function Uw(e,t,r){return Dw+qi(e,"token")+vr(t,"amountMinimum")+qi(r,"recipient")}function jw(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 vr(BigInt(a.length/2),"callLength")+i.toLowerCase()}),r=BigInt(e.length)*32n,n=[];for(let o of t)n.push(vr(r,"callOffset")),r+=BigInt(o.length/2);return Pw+vr(0x20n,"arrayOffset")+vr(BigInt(e.length),"arrayLength")+n.join("")+t.join("")}function Nu(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 Tu(e){let t=Su(e.token0,e.wcrossAddress),r=Su(e.token1,e.wcrossAddress),n=t||r,o=[Ul({tokenId:e.tokenId,liquidity:e.liquidity,amount0Min:e.amount0Min,amount1Min:e.amount1Min,deadline:e.deadline}),zw({tokenId:e.tokenId,recipient:n?e.positionManagerAddress:e.owner,amount0Max:Ru,amount1Max:Ru})];return n&&(o.push(Fw(0n,e.owner)),o.push(Uw(t?e.token1:e.token0,0n,e.owner))),jw(o)}async function Iu(e,t,r){let n;try{n=await xa(e,r)}catch{n=void 0}if(!n)return null;let o=Ul({tokenId:t.tokenId,liquidity:t.liquidity,amount0Min:0n,amount1Min:0n,deadline:t.deadline}),a=await Nn(n,t.positionManager,o,r,t.owner);return Nu(a)}var _w="wp:",Gw=[1500,3e3,4500,6e3];function Hw(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function Eu(){let{env:e,walletAddress:t,sendTransaction:r,estimateGas:n}=Rt(),o=!!r,a=Ww(),[i,s]=ht.useState(!1),[l,d]=ht.useState(null),[c,h]=ht.useState("confirm"),[u,m]=ht.useState(),[y,b]=ht.useState(""),[f,p]=ht.useState(!1),[w,g]=ht.useState(new Set),x=ht.useRef(void 0),k=ht.useRef([]),R=ht.useRef(0);ht.useEffect(()=>()=>{clearTimeout(x.current),k.current.forEach(clearTimeout)},[]);let E=ht.useRef(new Set),S=ht.useCallback((A,F)=>{E.current.has(A)||(E.current.add(A),qe("withdraw",A,{...F,tags:{section:"crossdPool",...F?.tags}}))},[]),C=ht.useCallback(()=>{let A=()=>a.invalidateQueries({predicate:F=>typeof F.queryKey[0]=="string"&&F.queryKey[0].startsWith(_w)});A(),k.current.forEach(clearTimeout),k.current=Gw.map(F=>setTimeout(A,F))},[a]),I=ht.useCallback(A=>{R.current+=1,d(A),s(!0),h("confirm"),m(void 0),b(""),p(!1),E.current=new Set,S("opened")},[S]),M=ht.useCallback(()=>{c!=="submitting"&&(R.current+=1,s(!1),d(null),h("confirm"),m(void 0),b(""),p(!1))},[c]),B=ht.useCallback(async()=>{let A=R.current,F=Hw(t),ne=l?.position.token_id,K=l?.position.liquidity,_=l?.detail.pool?.token0?.address,G=l?.detail.pool?.token1?.address;if(!F||!ne||!K||!_||!G)return h("error"),b("Position data is incomplete. Please refresh and retry."),null;try{h("estimating"),b("");let oe=BigInt(ne),Z=BigInt(K),U=BigInt(Math.floor(Date.now()/1e3))+Cu,X=Gp[e],H=await Iu(e,{owner:F,positionManager:X,tokenId:oe,liquidity:Z,deadline:U});if(R.current!==A)return null;if(!H)return h("error"),b("Failed to estimate withdrawal amounts. Please retry."),null;let pe=Tu({tokenId:oe,liquidity:Z,amount0Min:Fl(H.amount0),amount1Min:Fl(H.amount1),deadline:U,owner:F,positionManagerAddress:X,token0:_,token1:G,wcrossAddress:Hp[e]}),be={to:X,value:0n,data:pe,chainId:gt[e].cross},te=null;if(n){try{te=await n({...be,from:F})}catch{te=null}if(R.current!==A)return null}return h("confirm"),{tx:be,estimate:te,expectedAmount0:H.amount0,expectedAmount1:H.amount1}}catch(oe){return R.current!==A||(h("error"),b(ha(oe,"Failed to prepare withdraw."))),null}},[e,n,l,t]),L=ht.useCallback(async A=>{if(!r){h("error"),b("Withdraw is not available for this wallet.");return}try{h("submitting"),b(""),S("submitted");let F=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});m(F),h("success");let ne=l?.position.token_id;ne&&g(K=>{let _=new Set(K);return _.add(ne),_}),S("confirmed"),C()}catch(F){h("error"),b(ha(F,"Failed to request withdraw.")),S("confirmed",{status:"failure",reason:Nr(F)})}},[C,r,l,S]),z=ht.useCallback(async()=>{if(!(!u||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(u),p(!0),clearTimeout(x.current),x.current=setTimeout(()=>p(!1),1400)}catch{p(!1)}},[u]);return{canWithdrawInline:o,isOpen:i,target:l,withdrawnTokenIds:w,status:c,txHash:u,error:y,copied:f,hasEstimator:!!n,openWithdraw:I,closeWithdraw:M,prepareWithdraw:B,confirmWithdraw:L,copyHash:z,trackFunnelOnce:S}}import{Fragment as qw,jsx as kr,jsxs as Qn}from"react/jsx-runtime";var Vw="ONEusd Pool",Au="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function Lu(){let{env:e,walletAddress:t,onOutlink:r}=Rt(),n=Ur(),o=!!t,{positions:a,isLoading:i}=wu(e,t,o),s=Eu(),l=Mu(()=>a.filter(S=>!S.token_id||!s.withdrawnTokenIds.has(S.token_id)),[a,s.withdrawnTokenIds]),d=Mu(()=>l.map(S=>S.token_id).filter(S=>!!S),[l]),{detailMap:c}=yu(e,d,o&&d.length>0),h=`${_p[e]}/pool`,{getTokenImage:u,getTokenSymbol:m,getNativeToken:y}=bn(e,o),b=u("","ONEUSD",{chainOnly:!0})||`${jr[e]}/crossd.png`,f={chainOnly:!0},p=(S,C)=>{let I=Tl(m(S?.address??"",S?.symbol??C,f));return I==="ONE"?y()?.symbol??"?":I??"?"},w=(S,C)=>{let I=S?.symbol??C,M=Tl(I);return M==="ONE"?y()?.image||Au:u(S?.address??"",M,f)||S?.logo_url||Au},g=s.target?.detail.pool,x=w(g?.token0,s.target?.position.pool?.token0_symbol),k=w(g?.token1,s.target?.position.pool?.token1_symbol),R=p(g?.token0,s.target?.position.pool?.token0_symbol),E=p(g?.token1,s.target?.position.pool?.token1_symbol);return Qn(qw,{children:[kr(Wr,{sectionKey:"crossdPool",title:Vw,icon:b,iconFit:"contain",isEmpty:l.length===0,loading:i,children:l.map(S=>{let C=S.token_id?c.get(S.token_id):void 0,I=`${p(C?.pool?.token0,S.pool?.token0_symbol)}/${p(C?.pool?.token1,S.pool?.token1_symbol)}`,M=S.pool?.fee_tier_percentage,B=w(C?.pool?.token0,S.pool?.token0_symbol),L=w(C?.pool?.token1,S.pool?.token1_symbol),z=bo(new Qw(S.position_value_usd??"0"),n),A=s.canWithdrawInline&&!!C?.pool?.token0?.address&&!!C?.pool?.token1?.address;return Qn("article",{className:"wp-item","data-side":"crossd",children:[Qn("div",{className:"wp-item-body",children:[Qn("div",{className:"wp-item-line",children:[kr("span",{className:"wp-item-label",children:"Pool"}),Qn("div",{className:"wp-svc-token",children:[Qn("span",{className:"wp-token-stack","aria-hidden":!0,children:[kr("img",{className:"wp-svc-token-icon",src:B,alt:""}),kr("img",{className:"wp-svc-token-icon",src:L,alt:""})]}),kr("span",{children:I}),M&&kr("span",{className:"wp-token-subtle",children:M})]})]}),Qn("div",{className:"wp-item-line",children:[kr("span",{className:"wp-item-label",children:"Position Value"}),kr("span",{className:"wp-line-value",children:z})]})]}),kr("div",{className:"wp-item-tags",children:A?kr("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"crossd_pool_withdraw_open","data-track-id":I,onClick:()=>{C&&s.openWithdraw({position:S,detail:C})},children:kr("span",{className:"wp-tag-label",children:"Withdraw"})}):Qn("a",{className:"wp-tag wp-tag--muted",href:h,target:"_blank",rel:"noopener noreferrer","data-track":"crossd_pool_outlink","data-track-id":I,onClick:F=>zt(F,h,{category:"portfolio",origin:"portfolio-crossd-pool",payload:{position:S,detail:C}},r),children:[kr("span",{className:"wp-tag-label",children:"Withdraw"}),kr(Er,{size:12,className:"wp-tag-icon"})]})})]},S.token_id)})}),kr(ku,{open:s.isOpen,status:s.status,target:s.target,token0Icon:x,token1Icon:k,token0Symbol:R,token1Symbol:E,nativeSymbol:y()?.symbol,txHash:s.txHash,error:s.error,copied:s.copied,hasEstimator:s.hasEstimator,prepareWithdraw:s.prepareWithdraw,confirmWithdraw:s.confirmWithdraw,onClose:s.closeWithdraw,onCopyHash:s.copyHash,trackFunnel:s.trackFunnelOnce})]})}var Yi=["rewards","points","staking","gameSwap","forge","crossdPool"];ce(`.wp-fullscreen[data-theme=dark],.wp-embed[data-theme=dark]{--wp-bg: var(--ds-bg-default, #202530);--wp-header-bg: var(--ds-surface-default, #252b39);--wp-card: var(--ds-surface-medium, #252b39);--wp-control: #292f40;--wp-border: var(--ds-border-default, #292f40);--wp-panel-border: var(--ds-border-medium, rgba(255, 255, 255, .18));--wp-panel-shadow: 0px 4px 30px -1px rgba(0, 0, 0, .28);--wp-text: var(--ds-content-highest, #ffffff);--wp-text-60: var(--ds-content-high, rgba(255, 255, 255, .85));--wp-text-40: var(--ds-content-medium, rgba(255, 255, 255, .65));--wp-text-30: var(--ds-content-low, rgba(255, 255, 255, .4));--wp-chrome-text: #ffffff;--wp-tooltip-bg: #151a23;--wp-tooltip-text: #ffffff;--wp-mint: var(--ds-accent-primary-high, #f0640d);--wp-green: var(--ds-system-green-high, #00a0a2);--wp-accent-soft: var(--ds-accent-primary-lowest, #362519);--wp-red: var(--ds-system-red-default, #e70077);--wp-blue: #0488fc;--wp-purple: #7346f3;--wp-orange: #ff9d00;--wp-claim-primary: #ed0a72;--wp-claim-primary-text: #ffffff;--wp-claim-secondary-bg: var(--wp-control);--wp-claim-success: #00d4aa;--wp-claim-success-soft: rgba(0, 212, 170, .18);--wp-claim-error: #ff3aa3;--wp-claim-error-soft: rgba(255, 58, 163, .16)}.wp-fullscreen[data-theme=light],.wp-embed[data-theme=light]{--wp-bg: var(--ds-bg-dim, #f5f7fa);--wp-header-bg: var(--ds-surface-default, #ffffff);--wp-card: var(--ds-surface-default, #ffffff);--wp-control: var(--ds-surface-medium, #f5f7fa);--wp-border: var(--ds-border-default, rgba(0, 0, 0, .07));--wp-panel-border: var(--ds-border-medium, rgba(0, 0, 0, .18));--wp-panel-shadow: 0px 4px 30px -1px rgba(0, 0, 0, .15);--wp-text: var(--ds-content-highest, #000000);--wp-text-60: var(--ds-content-high, rgba(0, 0, 0, .85));--wp-text-40: var(--ds-content-medium, rgba(0, 0, 0, .65));--wp-text-30: var(--ds-content-low, rgba(0, 0, 0, .4));--wp-chrome-text: var(--ds-content-high, rgba(0, 0, 0, .85));--wp-card-shadow: none;--wp-tooltip-bg: #192023;--wp-tooltip-text: #ffffff;--wp-mint: var(--ds-accent-primary-high, #f0640d);--wp-green: var(--ds-system-green-high, #00a0a2);--wp-accent-soft: var(--ds-accent-primary-low, #fff5ee);--wp-red: var(--ds-system-red-default, #e70077);--wp-blue: #0488fc;--wp-purple: #7346f3;--wp-orange: #ff9d00;--wp-claim-primary: #ed0a72;--wp-claim-primary-text: #ffffff;--wp-claim-secondary-bg: #ffffff;--wp-claim-success: #019d92;--wp-claim-success-soft: rgba(1, 157, 146, .15);--wp-claim-error: #e70077;--wp-claim-error-soft: rgba(231, 0, 119, .12)}.wp-fullscreen{position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;max-height:100dvh!important;z-index:50;background:var(--wp-bg);display:flex;flex-direction:column;overflow:hidden;font-family:inherit;font-feature-settings:"calt" 0,"lnum" 1,"pnum" 1;box-sizing:border-box;-webkit-font-smoothing:antialiased;color:var(--wp-chrome-text)}.wp-embed{width:100%;height:100%;min-height:0;background:var(--wp-bg);display:flex;flex-direction:column;overflow:hidden;position:relative;font-family:inherit;font-feature-settings:"calt" 0,"lnum" 1,"pnum" 1;box-sizing:border-box;-webkit-font-smoothing:antialiased;color:var(--wp-chrome-text)}.wp-overlay{position:fixed;inset:0;z-index:49;background:#0009}.wp-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:73px;padding:24px;position:relative;border-bottom:1px solid var(--wp-border);background:var(--wp-header-bg);color:var(--wp-chrome-text);flex-shrink:0;box-sizing:border-box}.wp-fullscreen .wp-header{height:60px;min-height:60px;padding:11px 20px;border-bottom:none;background:transparent}.wp-fullscreen .wp-header-btn{width:22px;height:22px;color:var(--wp-chrome-text)}.wp-fullscreen .wp-header-btn:hover{color:var(--wp-chrome-text)}.wp-header-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wp-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wp-header-edge{display:flex;align-items:center;width:24px;min-width:24px}.wp-header-edge--right{justify-content:flex-end}.wp-header-edge--right .wp-header-btn{position:absolute;top:24px;right:24px}.wp-header-spacer{display:block;width:24px;height:24px}.wp-header-avatar{width:38px;height:38px;flex-shrink:0;border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:var(--wp-header-avatar-bg)}.wp-header-avatar-img{width:30px;height:30px;object-fit:cover;display:block}.wp-fullscreen[data-theme=dark] .wp-header-avatar,.wp-embed[data-theme=dark] .wp-header-avatar{--wp-header-avatar-bg: hsl(221.3 24.6% 25.5%)}.wp-fullscreen[data-theme=light] .wp-header-avatar,.wp-embed[data-theme=light] .wp-header-avatar{--wp-header-avatar-bg: rgba(18, 18, 18, .1)}.wp-refresh-btn{position:relative}.wp-refresh-badge{position:absolute;top:-6px;right:-8px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--wp-mint);color:#fff;font-size:10px;font-weight:600;line-height:16px;text-align:center}.wp-spin-once{animation:wp-spin-once .6s ease-in-out}@keyframes wp-spin-once{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.wp-header-title{flex:1;font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;text-align:center;color:var(--ds-content-highest, #000000);margin:0}.wp-header-account{flex:1;display:flex;align-items:center;gap:12px;min-width:0}.wp-header-account-meta{display:flex;flex-direction:column;justify-content:center;min-width:0;gap:2px}.wp-header-wallet-name{min-width:0;font-family:inherit;font-size:15px;font-weight:600;line-height:1.4;letter-spacing:0;color:var(--wp-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-header-address-btn{display:inline-flex;align-items:center;gap:4px;align-self:flex-start;max-width:100%;padding:0;border:0;background:transparent;cursor:pointer;font:inherit}.wp-header-address{min-width:0;font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;color:var(--wp-text-40);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-header-address-copy{display:inline-flex;align-items:center;flex-shrink:0;color:var(--wp-text-40);transition:color .15s ease}.wp-header-address-btn:hover .wp-header-address-copy{color:var(--wp-text-60)}.wp-header-address-copy[data-copied=true]{color:var(--wp-mint)}.wp-top{flex-shrink:0;padding:0 16px 16px;display:flex;flex-direction:column;gap:16px}.wp-identity{display:flex;flex-direction:column;gap:8px}.wp-address{display:inline-flex;align-items:center;gap:8px}.wp-address-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-address-chevron{display:inline-flex;align-items:center;color:var(--wp-text-40)}.wp-total{font-size:28px;font-weight:600;line-height:1.3;color:var(--wp-text);margin:0}.wp-asset{display:flex;flex-direction:column;gap:8px}.wp-asset-head{display:flex;align-items:center;gap:4px}.wp-asset-head-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-asset-head-icon{display:inline-flex;color:var(--wp-text-40)}.wp-bar{display:flex;height:20px;border-radius:4px;overflow:hidden}.wp-bar-seg{display:flex;align-items:center;justify-content:center;min-width:8px}.wp-bar-seg-pct{font-size:10px;font-weight:400;line-height:1.3;color:#fff;white-space:nowrap}.wp-legend{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap}.wp-legend-item{display:flex;align-items:center;gap:4px}.wp-legend-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.wp-legend-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-tabs{flex-shrink:0;padding:8px 16px}.wp-tabs-inner{display:flex;align-items:center;padding:0 2px}.wp-tabs-list{display:flex;gap:20px;flex:1}.wp-tab{display:flex;flex-direction:column;align-items:center;justify-content:space-between;height:44px;padding-top:12px;background:transparent;border:none;cursor:pointer}.wp-tab-text{font-size:14px;font-weight:600;line-height:1.4;color:var(--wp-text-30);white-space:nowrap}.wp-tab[data-active=true] .wp-tab-text{color:var(--wp-mint)}.wp-tab-bar{width:20px;height:4px;border-radius:2px;background:var(--wp-mint);opacity:0}.wp-tab[data-active=true] .wp-tab-bar{opacity:1}.wp-tabs-filter-wrap{position:relative;display:flex;align-items:center;width:44px;height:44px;flex-shrink:0}.wp-tabs-filter-grad{position:absolute;inset:0;background:linear-gradient(to left,var(--wp-bg) 74%,transparent);pointer-events:none}.wp-tabs-filter{position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--wp-text-40)}.wp-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--wp-border) transparent}.wp-body::-webkit-scrollbar{width:4px}.wp-body::-webkit-scrollbar-track{background:transparent}.wp-body::-webkit-scrollbar-thumb{background:var(--wp-border);border-radius:4px}.wp-body-inner{padding:16px 16px 32px;display:flex;flex-direction:column;gap:32px}.wp-fullscreen .wp-body-inner{padding-top:8px;gap:24px}.wp-summary-card{display:flex;flex-direction:column;gap:8px;width:100%;padding:0;border-radius:0;background:transparent;box-shadow:none;box-sizing:border-box}.wp-summary-head{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:4px}.wp-summary-label{font-size:14px;font-weight:400;line-height:1.5;letter-spacing:0;color:var(--wp-text-40);white-space:nowrap}.wp-address{display:inline-flex;align-items:center;gap:8px;min-width:0}.wp-address-avatar{width:16px;height:16px;border-radius:50%;flex-shrink:0;background:radial-gradient(circle at 68% 34%,#ff78d1 0 18%,transparent 19%),radial-gradient(circle at 34% 66%,#00d4aa 0 20%,transparent 21%),linear-gradient(135deg,#7346f3,#0488fc)}.wp-address-label{font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;color:var(--wp-text-40);white-space:nowrap}.wp-address-chevron{display:inline-flex;align-items:center;color:var(--wp-text-40);flex-shrink:0}.wp-summary-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;border-radius:999px;background:#019d921a;color:var(--wp-mint);font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;white-space:nowrap}.wp-summary-estimate{position:relative;display:inline-flex;align-items:center;gap:6px;flex-shrink:0}.wp-estimate-info{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--wp-text-40);cursor:help}.wp-estimate-tooltip{position:absolute;top:calc(100% + 8px);left:0;right:auto;z-index:3;display:flex;flex-direction:column;gap:8px;width:min(280px,calc(100vw - 48px));padding:12px;border-radius:8px;background:var(--wp-tooltip-bg);box-shadow:0 12px 32px #0000003d;color:var(--wp-tooltip-text);font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;text-align:left;white-space:normal;opacity:0;pointer-events:none;transform:translateY(-4px);visibility:hidden;transition:opacity .15s ease,transform .15s ease,visibility .15s ease}.wp-estimate-tooltip-title{display:block;font-size:12px;font-weight:600;line-height:1.3}.wp-estimate-tooltip-group{display:flex;flex-direction:column;gap:4px}.wp-estimate-tooltip-item{display:block;color:#ffffffc7}.wp-estimate-tooltip-item:before{content:"- "}.wp-estimate-info:hover .wp-estimate-tooltip,.wp-estimate-info:focus .wp-estimate-tooltip,.wp-estimate-info:focus-visible .wp-estimate-tooltip{opacity:1;transform:translateY(0);visibility:visible}.wp-total{font-family:var( --wp-total-font-family, Sora, Inter, system-ui, -apple-system, sans-serif );font-size:36px;font-weight:600;line-height:1.25;letter-spacing:0;color:var(--wp-text);margin:0}.wp-svc-card{display:flex;flex-direction:column;gap:12px;width:100%}.wp-svc-card-head{display:flex;align-items:center;gap:6px}.wp-svc-card-icon{width:24px;height:24px;border-radius:4px;flex-shrink:0;object-fit:cover}.wp-svc-card-title{font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wp-svc-items{display:flex;flex-direction:column;gap:8px;width:100%;padding:0;border-radius:0;background:transparent;box-shadow:none;box-sizing:border-box}.wp-item{position:relative;display:flex;flex-direction:column;gap:20px;width:100%;padding:12px;border-radius:12px;background:var(--wp-card);box-shadow:var(--wp-card-shadow, none);box-sizing:border-box;color:inherit;text-decoration:none;cursor:pointer;outline:none;transition:opacity .15s ease}.wp-item+.wp-item{padding-top:12px;border-top:0}.wp-item:hover{opacity:.88}.wp-item-body{display:flex;flex-direction:column;gap:12px;min-width:0}.wp-order-head{display:flex;align-items:center;width:100%}.wp-item-line{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:21px;min-width:0}.wp-item-label{flex-shrink:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-30);white-space:nowrap}.wp-line-value,.wp-order-side{min-width:0;overflow:hidden;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-order-side--buy{color:var(--wp-mint)}.wp-order-side--sell{color:var(--wp-red)}.wp-svc-token{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;min-height:21px}.wp-svc-token>span{font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-svc-token-icon{width:16px;height:16px;border-radius:50%;flex-shrink:0;object-fit:cover}.wp-item[data-side=reward] .wp-svc-token-icon{border-radius:0;object-fit:contain}.wp-svc-token--amount{align-items:flex-start}.wp-svc-token--amount>.wp-svc-token-icon{margin-top:2.5px}.wp-token-stack{display:inline-flex;align-items:center;justify-content:flex-end;width:29px;min-width:29px;overflow:visible}.wp-token-stack .wp-svc-token-icon+.wp-svc-token-icon{margin-left:-3.5px}.wp-token-subtle,.wp-item-usd{color:var(--wp-text-30)!important}.wp-svc-amount{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:1px;min-width:0}.wp-svc-amount-main{font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.wp-svc-amount .wp-item-usd{font-size:12px;font-weight:500;line-height:1.35}.wp-order-token{display:flex;align-items:center;gap:8px;min-width:0}.wp-order-token .wp-svc-token-icon{width:32px;height:32px}.wp-order-token-meta{display:flex;min-width:0;flex-direction:column;justify-content:center}.wp-order-token-symbol{overflow:hidden;color:var(--wp-text-60);font-size:14px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.wp-order-token-pair{overflow:hidden;color:var(--wp-text-30);font-size:12px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.wp-item-tags{display:flex;align-items:stretch;gap:8px;width:100%}.wp-tag{appearance:none;display:inline-flex;flex:1 1 0;align-items:center;justify-content:center;gap:0;min-width:0;min-height:33px;padding:6px 10px;border-radius:6px;border:0;background:var(--wp-control);font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:0;color:var(--wp-text-40);text-align:center;text-decoration:none;white-space:nowrap;box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,color .15s ease,transform .15s ease}a.wp-tag,button.wp-tag{cursor:pointer}.wp-tag:hover{background:var(--wp-control);transform:none}.wp-tag:focus-visible{outline:2px solid var(--wp-mint);outline-offset:2px}.wp-tag[aria-disabled=true],.wp-tag[data-disabled]{cursor:default;opacity:.48;pointer-events:none}.wp-tag-label{display:inline-flex;align-items:center}.wp-tag-icon{display:none}.wp-tag:hover .wp-tag-icon{transform:none}.wp-tag--mint{color:var(--wp-mint);background:var(--wp-accent-soft)}.wp-tag--mint:hover{background:var(--wp-accent-soft)}.wp-tag--muted{color:var(--wp-text-40)}.wp-body-inner[data-empty]{min-height:100%;box-sizing:border-box;justify-content:center}.wp-portfolio-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:280px;padding:32px 24px;text-align:center}.wp-portfolio-empty-icon{display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin-bottom:6px;border-radius:50%;background:var(--wp-card);box-shadow:var(--wp-card-shadow, none);color:var(--wp-text-30)}.wp-portfolio-empty-title{margin:0;font-size:15px;font-weight:600;line-height:1.3;color:var(--wp-text-60)}.wp-portfolio-empty-desc{margin:0;font-size:13px;font-weight:400;line-height:1.4;color:var(--wp-text-30)}.wp-portfolio-loading{display:flex;align-items:center;justify-content:center;min-height:280px;padding:32px 24px}.wp-portfolio-spinner{width:22px;height:22px;border:2px solid var(--wp-border);border-top-color:var(--wp-mint);border-radius:50%;animation:wp-claim-spin .8s linear infinite}.wp-claim-overlay{position:absolute;inset:0;z-index:8;display:flex;align-items:flex-end;justify-content:center;background:#00000094;box-sizing:border-box}.wp-claim-sheet{display:flex;flex-direction:column;width:100%;max-height:calc(100% - 24px);overflow:hidden;border-radius:24px 24px 0 0;background:var(--wp-bg);color:var(--wp-text);box-shadow:0 -18px 48px #00000042;animation:wp-claim-slide-up .22s ease-out}@keyframes wp-claim-slide-up{0%{transform:translateY(18px);opacity:0}to{transform:translateY(0);opacity:1}}.wi-popover-content .wp-claim-sheet{min-height:min(600px,calc(100% - 24px))}.wi-popover-content .wp-claim-content{flex:1 1 auto}.wi-popover-content .wp-claim-actions{margin-top:auto}.wp-claim-grabber{display:flex;align-items:flex-start;justify-content:center;height:38px;min-height:38px;padding-top:12px;box-sizing:border-box}.wp-claim-grabber span{display:block;width:52px;height:5px;border-radius:999px;background:var(--wp-control)}.wp-claim-content{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;padding:20px;box-sizing:border-box}.wp-claim-icon{display:inline-flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:50%;flex-shrink:0}.wp-claim-icon--success{background:var(--wp-claim-success-soft);color:var(--wp-claim-success)}.wp-claim-icon--pending{background:#9b8cef29;color:var(--wp-claim-primary)}.wp-claim-icon--error{background:var(--wp-claim-error-soft);color:var(--wp-claim-error);font-size:30px;font-weight:600;line-height:1}.wp-claim-icon--token{background:#00d4aa29}.wp-claim-icon--token img{width:48px;height:48px;border-radius:50%;object-fit:cover}.wp-claim-icon--token span{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;background:var(--wp-mint);color:#101820;font-size:18px;font-weight:600}.wp-claim-spinner{width:36px;height:36px;border-radius:50%;border:3px solid rgba(155,140,239,.28);border-top-color:var(--wp-claim-primary);animation:wp-claim-spin .8s linear infinite}@keyframes wp-claim-spin{to{transform:rotate(360deg)}}.wp-claim-copy{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;text-align:center}.wp-claim-title{margin:0;font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;color:var(--wp-text)}.wp-claim-desc{max-width:335px;margin:0;font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;color:var(--wp-text-40)}.wp-claim-heading{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.wp-claim-error-message{margin:0;color:var(--wp-claim-error);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0}.wp-claim-reward-card{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;min-height:60px;padding:16px 8px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-reward-token{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;flex-shrink:0;overflow:hidden;background:var(--wp-control)}.wp-claim-reward-token img{width:28px;height:28px;object-fit:cover}.wp-claim-reward-token span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--wp-mint);color:#101820;font-size:13px;font-weight:600;line-height:1}.wp-claim-reward-symbol{flex:1 1 auto;min-width:0;overflow:hidden;color:var(--wp-text);font-size:18px;font-weight:600;line-height:1.3;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.wp-claim-reward-amount{flex-shrink:0;color:var(--wp-text);font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-reward-card[data-fit=sm] .wp-claim-reward-symbol{font-size:14px}.wp-claim-reward-card[data-fit=sm] .wp-claim-reward-amount{font-size:16px}.wp-claim-reward-card[data-fit=xs] .wp-claim-reward-symbol{font-size:12px}.wp-claim-reward-card[data-fit=xs] .wp-claim-reward-amount{font-size:13px}.wp-claim-account-card{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-account-row{display:flex;align-items:center;justify-content:space-between;gap:4px;width:100%;min-height:40px}.wp-claim-account-row>span{flex-shrink:0;color:var(--wp-text-40);font-size:14px;font-weight:400;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-account{display:flex;align-items:center;gap:8px;min-width:0}.wp-claim-account strong{overflow:hidden;color:var(--wp-text);font-size:15px;font-weight:600;line-height:1.6;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.wp-claim-account-avatar{width:32px;height:32px;border-radius:50%;flex-shrink:0;background:radial-gradient(circle at 30% 28%,#d87aff 0 12%,transparent 13%),radial-gradient(circle at 68% 28%,#f0a1ff 0 12%,transparent 13%),radial-gradient(circle at 32% 70%,#b561e7 0 13%,transparent 14%),radial-gradient(circle at 70% 70%,#d4a2ff 0 13%,transparent 14%),radial-gradient(circle at 50% 50%,#8c4fc4 0 18%,transparent 19%),#4a315f;box-shadow:inset 0 0 0 3.37px var(--wp-control)}.wp-claim-divider{display:block;width:100%;height:1px;background:var(--wp-border)}.wp-claim-detail-list{display:flex;flex-direction:column;gap:8px;width:100%}.wp-claim-detail-row{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;min-height:20px}.wp-claim-detail-row>span{min-width:0;color:var(--wp-text-40);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-detail-row--sub>span:before{content:"";display:inline-block;width:3px;height:3px;margin:0 8px 3px;background:currentColor}.wp-claim-detail-row strong{min-width:0;overflow:hidden;color:var(--wp-text);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-list{display:flex;flex-direction:column;gap:8px;width:100%;padding-bottom:8px}.wp-claim-list-item{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px;padding:8px 16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-list-item>span{flex-shrink:0;font-size:14px;font-weight:400;line-height:1.3;color:var(--wp-text-40);white-space:nowrap}.wp-claim-list-item strong{display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;overflow:hidden;color:var(--wp-text);font-size:14px;font-weight:400;line-height:1.3;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-list-item img{width:16px;height:16px;border-radius:50%;flex-shrink:0}.wp-claim-hash{appearance:none;display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;padding:0;border:none;background:transparent;color:var(--wp-text);cursor:pointer;font:inherit}.wp-claim-hash svg{flex-shrink:0;color:var(--wp-text-60)}.wp-claim-gas-card{display:flex;flex-direction:column;gap:4px;width:100%;padding:14px 16px;border-radius:8px;border:1px solid var(--wp-border);background:var(--wp-card);box-sizing:border-box}.wp-claim-gas-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:28px}.wp-claim-gas-row>span{min-width:0;font-size:12px;font-weight:400;line-height:1.3;color:var(--wp-text-40)}.wp-claim-gas-row strong{min-width:0;overflow:hidden;color:var(--wp-text);font-size:12px;font-weight:400;line-height:1.3;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-gas-row--primary{min-height:32px}.wp-claim-gas-row--primary>span,.wp-claim-gas-row--primary strong{font-size:14px;color:var(--wp-text)}.wp-claim-fee-label{position:relative;display:inline-flex;align-items:center;text-decoration:underline dotted;text-underline-offset:3px;cursor:help;overflow:visible!important}.wp-claim-fee-tooltip{position:absolute;left:0;bottom:calc(100% + 8px);z-index:2;width:min(260px,calc(100vw - 64px));padding:10px 12px;border-radius:8px;background:var(--wp-tooltip-bg);color:var(--wp-tooltip-text);box-shadow:0 12px 32px #0000003d;font-size:11px;font-weight:400;line-height:1.4;text-align:left;text-decoration:none;white-space:normal;opacity:0;pointer-events:none;transform:translateY(4px);visibility:hidden;transition:opacity .15s ease,transform .15s ease,visibility .15s ease}.wp-claim-fee-label:hover .wp-claim-fee-tooltip,.wp-claim-fee-label:focus .wp-claim-fee-tooltip,.wp-claim-fee-label:focus-visible .wp-claim-fee-tooltip{opacity:1;transform:translateY(0);visibility:visible}.wp-claim-actions{display:flex;align-items:center;gap:8px;width:100%}.wp-claim-primary,.wp-claim-secondary{appearance:none;display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:0;height:52px;padding:0 24px;border:none;border-radius:40px;font-family:inherit;font-size:15px;font-weight:600;line-height:1.3;letter-spacing:0;white-space:nowrap;cursor:pointer}.wp-claim-primary{background:var(--wp-claim-primary);color:var(--wp-claim-primary-text)}.wp-claim-primary:disabled{cursor:default;opacity:.72}.wp-claim-secondary{background:var(--wp-claim-secondary-bg, var(--wp-control));color:var(--wp-claim-primary)}.wp-claim-actions[data-count="2"] .wp-claim-primary{flex:1 1 0}.wp-claim-actions[data-count="2"] .wp-claim-secondary{flex:0 0 120px}.wp-claim-button-spinner{width:16px;height:16px;border-radius:50%;border:2px solid rgba(32,37,48,.28);border-top-color:var(--wp-claim-primary-text);animation:wp-claim-spin .8s linear infinite}.wp-claim-home-indicator{display:flex;align-items:flex-end;justify-content:center;height:34px;min-height:34px;padding-bottom:8px;box-sizing:border-box}.wp-claim-home-indicator span{display:block;width:134px;height:5px;border-radius:16px;background:var(--wp-text-40)}@media(max-width:359px){.wp-header{gap:12px;padding:0 12px}.wp-total{font-size:24px}.wp-body-inner{padding:0 12px 128px;gap:20px}.wp-svc-items,.wp-claim-content{padding:18px 14px}.wp-item-line{gap:10px}.wp-svc-token>span{max-width:168px}}.wp-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.wi-drawer-content .wp-header,.wi-portfolio-body .wp-header{padding:16px}.wi-drawer-content .wp-header-edge--right .wp-header-btn,.wi-portfolio-body .wp-header-edge--right .wp-header-btn{top:16px;right:16px}.wp-withdraw-amount-card{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-withdraw-amount-row{display:flex;align-items:center;gap:8px;width:100%}.wp-withdraw-input{flex:1 1 auto;min-width:0;padding:0;border:none;background:transparent;color:var(--wp-text);font-family:inherit;font-size:24px;font-weight:600;line-height:1.3;letter-spacing:0;text-align:left;outline:none}.wp-withdraw-input::placeholder{color:var(--wp-text-30)}.wp-withdraw-input[aria-invalid=true]{color:var(--wp-claim-error)}.wp-withdraw-input-symbol{flex-shrink:0;color:var(--wp-text-40);font-size:15px;font-weight:600;line-height:1.3}.wp-withdraw-quick-row{display:flex;align-items:center;gap:8px;width:100%}.wp-withdraw-quick{appearance:none;flex:1 1 0;min-width:0;height:32px;padding:0 10px;border:1px solid var(--wp-border);border-radius:999px;background:transparent;color:var(--wp-text-60);font-family:inherit;font-size:13px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer}.wp-withdraw-quick:hover:not(:disabled){border-color:var(--wp-claim-primary);color:var(--wp-claim-primary)}.wp-withdraw-quick:disabled{cursor:default;opacity:.5}.wp-withdraw-content{overflow-y:auto}.wp-withdraw-token-list{display:flex;flex-direction:column;gap:8px;width:100%;max-height:216px;overflow-y:auto}.wp-withdraw-token{appearance:none;display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:10px 12px;border:1px solid var(--wp-border);border-radius:8px;background:var(--wp-card);color:var(--wp-text);font-family:inherit;text-align:left;cursor:pointer;box-sizing:border-box}.wp-withdraw-token[data-selected]{border-color:var(--wp-claim-primary);box-shadow:inset 0 0 0 1px var(--wp-claim-primary)}.wp-withdraw-token:disabled{cursor:default;opacity:.6}.wp-withdraw-token-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;flex-shrink:0;overflow:hidden;background:var(--wp-control)}.wp-withdraw-token-icon img{width:28px;height:28px;object-fit:cover}.wp-withdraw-token-icon span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--wp-mint);color:#101820;font-size:13px;font-weight:600;line-height:1}.wp-withdraw-token-symbol{flex:1 1 auto;min-width:0;overflow:hidden;font-size:15px;font-weight:600;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}.wp-withdraw-token-amount{flex-shrink:0;color:var(--wp-text-40);font-size:13px;font-weight:500;line-height:1.3;white-space:nowrap}
|
|
9
|
-
`);import{Fragment as Zw,jsx as Ye,jsxs as Mn}from"react/jsx-runtime";var jl=15,Kw="wp:";function Go({env:e,theme:t="light",walletAddress:r,walletName:n,onBack:o,showHeader:a=!0,variant:i="embed",className:s,onOutlink:l,lpBalanceReader:d,stakingRewardsReader:c,sendTransaction:h,estimateGas:u,conversionRatio:m,currencySymbol:y,sections:b}){let f=nt(e),p=Ct.useCallback(te=>!b||b.includes(te),[b]),w=!!r,g=Yw(),[x,k]=Ct.useState({}),R=Ct.useCallback((te,ue)=>{k(je=>{let Se=je[te];return Se&&Se.loading===ue.loading&&Se.empty===ue.empty?je:{...je,[te]:ue}})},[]),E=Ct.useCallback(te=>{k(ue=>{if(!(te in ue))return ue;let je={...ue};return delete je[te],je})},[]),S=Ct.useMemo(()=>({report:R,unregister:E}),[R,E]),[C,I]=Ct.useState(jl),[M,B]=Ct.useState(!1),[L,z]=Ct.useState(!1),A=Ct.useRef(void 0),F=Ct.useCallback(()=>{g.invalidateQueries({predicate:te=>typeof te.queryKey[0]=="string"&&te.queryKey[0].startsWith(Kw)})},[g]),ne=Ct.useCallback(()=>{F(),B(!0),setTimeout(()=>B(!1),600),I(jl)},[F]);Ct.useEffect(()=>{if(!w)return;let te=setInterval(()=>{I(ue=>ue<=1?(ne(),jl):ue-1)},1e3);return()=>clearInterval(te)},[w,ne]);let K=Ct.useCallback(()=>{o?.()},[o]),_=w?Cn(f,r,{size:64}):void 0,G=Ct.useCallback(async()=>{if(!(L||!r))try{await navigator.clipboard.writeText(r),z(!0),clearTimeout(A.current),A.current=setTimeout(()=>z(!1),2e3)}catch{}},[r,L]);Ct.useEffect(()=>()=>clearTimeout(A.current),[]);let oe=Ct.useMemo(()=>({env:f,theme:t,open:!0,walletAddress:r,close:K,onOutlink:l,lpBalanceReader:d,stakingRewardsReader:c,sendTransaction:h,estimateGas:u,conversionRatio:m,currencySymbol:y}),[f,t,r,K,l,d,c,h,u,m,y]),Z=Yi.filter(p),U=Z.length>0&&Z.every(te=>{let ue=x[te];return!!ue&&!ue.loading}),X=U&&Z.every(te=>x[te]?.empty),H=Z.some(te=>{let ue=x[te];return!!ue&&!ue.empty}),pe=Z.length>0&&!U&&!H,be=Mn(Zw,{children:[a&&Mn("div",{className:"wp-header",children:[Mn("div",{className:"wp-header-account",children:[o&&Ye("button",{type:"button",className:"wp-header-btn","aria-label":"Back","data-track":"back",onClick:o,children:Ye(Dp,{})}),Ye("span",{className:"wp-header-avatar","aria-hidden":!0,children:_&&Ye("img",{src:_,alt:"",className:"wp-header-avatar-img",draggable:!1})}),(n||r)&&Mn("div",{className:"wp-header-account-meta",children:[n&&Ye("span",{className:"wp-header-wallet-name",title:n,children:n}),r&&Mn("button",{type:"button",className:"wp-header-address-btn",onClick:G,"aria-label":"Copy wallet address","data-track":"address_copy",children:[Ye("span",{className:"wp-header-address",children:Oi(r)}),Ye("span",{className:"wp-header-address-copy","data-copied":L,children:L?Ye(Rn,{size:14}):Ye(po,{size:14})})]})]})]}),Mn("button",{type:"button",className:"wp-header-btn wp-refresh-btn","aria-label":"Refresh portfolio","data-track":"refresh",onClick:ne,children:[Ye(Pp,{className:M?"wp-spin-once":void 0}),w&&Ye("span",{className:"wp-refresh-badge",children:C})]})]}),Ye("div",{className:"wp-body",children:Mn("div",{className:"wp-body-inner","data-empty":X||void 0,children:[p("rewards")&&Ye(Vp,{}),p("points")&&Ye(tu,{}),p("staking")&&Ye(lu,{}),p("gameSwap")&&Ye(fu,{}),p("forge")&&Ye(bu,{}),p("crossdPool")&&Ye(Lu,{}),pe&&Ye("div",{className:"wp-portfolio-loading",role:"status","aria-label":"Loading portfolio",children:Ye("span",{className:"wp-portfolio-spinner","aria-hidden":!0})}),X&&Mn("div",{className:"wp-portfolio-empty",role:"status",children:[Ye("span",{className:"wp-portfolio-empty-icon","aria-hidden":!0,children:Mn("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[Ye("path",{d:"M20 7H5a2 2 0 0 1-2-2 2 2 0 0 1 2-2h13v4"}),Ye("path",{d:"M3 5v13a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1"}),Ye("circle",{cx:"16.5",cy:"13.5",r:"1",fill:"currentColor",stroke:"none"})]})}),Ye("p",{className:"wp-portfolio-empty-title",children:"No assets yet"}),Ye("p",{className:"wp-portfolio-empty-desc",children:"Assets you hold across ONE services will appear here."})]})]})})]});return Ye(wa.Provider,{value:oe,children:Ye(El.Provider,{value:S,children:Ye(ye,{feature:"wallet_portfolio",children:i==="none"?be:Ye("div",{className:ve(i==="fullscreen"?"wp-fullscreen":"wp-embed",s),"data-theme":t,children:be})})})})}import{jsx as Wl,jsxs as Du}from"react/jsx-runtime";function Pu({className:e}){let{env:t,theme:r,walletAddress:n,close:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s}=Rt();return Du(Ki.Portal,{children:[Wl(Ki.Overlay,{className:"wp-overlay"}),Du(Ki.Content,{className:ve("wp-fullscreen",e),"data-theme":r,children:[Wl(Ki.Title,{className:"wp-sr-only",children:"Portfolio"}),Wl(Go,{env:t,theme:r,walletAddress:n,onBack:o,variant:"none",onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s})]})]})}import{jsx as Ou}from"react/jsx-runtime";function Jw({env:e,theme:t="light",walletAddress:r,open:n,onOpenChange:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:c,currencySymbol:h,children:u}){let m=nt(e),y=n!==void 0,[b,f]=yo.useState(!1),p=y?n:b,w=yo.useCallback(k=>{y||f(k),o?.(k)},[y,o]),g=yo.useCallback(()=>w(!1),[w]),x=yo.useMemo(()=>({env:m,theme:t,open:p,walletAddress:r,close:g,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:c,currencySymbol:h}),[m,t,p,r,g,a,i,s,l,d,c,h]);return Ou(wa.Provider,{value:x,children:Ou(Xw.Root,{direction:"bottom",open:p,onOpenChange:w,noBodyStyles:!0,children:u})})}var Bu=Object.assign(Jw,{Trigger:Ap,Content:Pu});import*as se from"react";import{createPortal as Ca}from"react-dom";import Ju from"bignumber.js";import*as Zi from"react";var zu=120;function Fu(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function Uu(){let[e,t]=Zi.useState(!1);return Zi.useEffect(()=>{let r=window.visualViewport,n=()=>r?.height??window.innerHeight,o=n(),a=()=>{let d=n();o=Math.max(o,d),t(o-d>zu)},i=()=>{o=n(),t(!1)},s=d=>{Fu(d.target)&&o-n()>zu&&t(!0)},l=d=>{Fu(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}import*as Xi from"react";function Ji(e,t=160){let[r,n]=Xi.useState(e||null);return Xi.useEffect(()=>{if(e){n(e);return}let o=window.setTimeout(()=>n(null),t);return()=>window.clearTimeout(o)},[e,t]),[e||r,e?"open":"closed"]}import{jsx as Vn,jsxs as wC}from"react/jsx-runtime";function ju({size:e=16,className:t}){return Vn("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Vn("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 Wu({size:e=16,className:t}){return Vn("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Vn("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 _l({size:e=20,className:t}){return Vn("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Vn("path",{d:"M10 4.167v11.666M4.167 10 10 15.833 15.833 10",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function _u({size:e=16,className:t}){return Vn("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:Vn("path",{d:"M3.333 8h9.334M8.667 4l4 4-4 4",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}import*as Q from"react";import $w from"bignumber.js";function Gu(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Hu(e){return!e.isFinite()||e.isNaN()||e.lte(0)?"":e.decimalPlaces(6,$w.ROUND_DOWN).toFixed()}function ey(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 ty(e){let t=e.fromToken.priceUsd,r=e.toToken.priceUsd,n=e.lastChangedBy==="to"?e.toAmount:e.fromAmount,o=at(n);return!o||o.lte(0)?{fromAmount:e.fromAmount,toAmount:e.toAmount}:Gu(t)&&Gu(r)?e.lastChangedBy==="to"?{fromAmount:Hu(o.multipliedBy(r).dividedBy(t))}:{toAmount:Hu(o.multipliedBy(t).dividedBy(r))}:ey(e)?e.lastChangedBy==="to"?{fromAmount:e.toAmount}:{toAmount:e.fromAmount}:{fromAmount:e.lastChangedBy==="to"?"":e.fromAmount,toAmount:e.lastChangedBy==="from"?"":e.toAmount}}function Qu({getQuote:e,submitBridge:t}){return{canQuote:!!e,canSubmit:!!t,async getQuote(r){return e?e(r):ty(r)},async submitBridge(r){if(!t)throw new Error("Bridge submit handler is not configured.");return t(r)}}}var Vu=15,ry=18,Zu="cross_bridge_terms_accepted",ny=3600*24*365;function oy(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,Vu);let o=t.slice(0,n).slice(0,Vu),a=t.slice(n+1).slice(0,ry);return`${o}.${a}`}function ay(){return typeof document>"u"?!1:document.cookie.split(";").map(e=>e.trim()).some(e=>e===`${Zu}=true`)}function iy(){if(typeof document>"u")return;let e=typeof window<"u"&&window.location.protocol==="https:"?"; Secure":"";document.cookie=[`${Zu}=true`,"Path=/",`Max-Age=${ny}`,"SameSite=Lax",e].filter(Boolean).join("; ")}function sy(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 qu(e){let t=e.toUpperCase();return t.startsWith("T")&&t.slice(1).startsWith("ONE")?t.slice(1):t}function ly(e,t){if(!e||!t||e.chainId!==t.chainId)return!1;let r=new Set([qu(e.symbol),qu(t.symbol)]);return r.has("ONE")&&r.has("ONEUSD")}function an(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function $i(e){return e[0]}function Gl(e,t,r,n){if(r&&!an(r,t))return r;let o=t?n?.(t,e):void 0;if(o?.length)return o[0];if(!t)return e[1]??$i(e);let a=e.findIndex(s=>an(s,t)),i=a>=0?e[a+1]:void 0;return i&&!an(i,t)?i:e.find(s=>!an(s,t))??t}function Yu({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 es(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),...es(r.cause,t+1),...es(r.data,t+1),...es(r.error,t+1)]}function Hl(e){let t=es(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 Ku(e,t){return Hl(e)?"Transaction request was rejected.":(e instanceof Error?e.message:typeof e=="string"?e:"").split(`
|
|
10
|
-
`)[0]?.trim()||t}function Xu(e){let{tokens:t,initialFromToken:r,initialToToken:n,getToTokens:o,getApproval:a,approveBridge:i,history:s=[],initialSlippage:l="1",termsUrl:d,getQuote:c,submitBridge:h,onSubmitted:u,onSuccess:m,onFailed:y,onExit:b}=e,f=Q.useMemo(()=>Qu({getQuote:c,submitBridge:h}),[c,h]),[p,w]=Q.useState("form"),[g,x]=Q.useState(r??$i(t)),[k,R]=Q.useState(()=>Gl(t,r??$i(t),n,o)),[E,S]=Q.useState(""),[C,I]=Q.useState(""),[M,B]=Q.useState("from"),[L,z]=Q.useState(l),[A,F]=Q.useState(null),ne=Q.useMemo(()=>ly(g,k),[g,k]),K=Q.useMemo(()=>ne?"1":L==="auto"?sy(A?.priceImpact):L,[ne,L,A?.priceImpact]),[_,G]=Q.useState(""),[oe,Z]=Q.useState("idle"),[U,X]=Q.useState(""),[H,pe]=Q.useState(null),[be,te]=Q.useState([]),[ue,je]=Q.useState(!1),[Se,lt]=Q.useState(ay),[ge,Ie]=Q.useState(null),[ot,Qe]=Q.useState(!1),[We,Oe]=Q.useState(null),[tt,Nt]=Q.useState(null),[ut,xt]=Q.useState(!1),[he,Vt]=Q.useState(!1),bt=Q.useRef(0),wt=Q.useRef(null),rt=Q.useRef(!1),$e=Q.useRef(!1),er=Q.useRef(!1),At=Q.useRef(!1),Ut=Q.useRef(!1),Lt=Q.useRef(!1),Ve=Q.useRef(!1);Q.useEffect(()=>{er.current||(er.current=!0,qe("bridge","opened"))},[]);let De=Q.useCallback(()=>{wt.current&&(clearTimeout(wt.current),wt.current=null)},[]),ft=Q.useCallback(j=>{De(),Nt(j)},[De]);Q.useEffect(()=>De,[De]),Q.useEffect(()=>{let j=t.find(Ge=>an(Ge,g))??$i(t),_e=j?o?.(j,t):void 0,ie=_e?.find(Ge=>an(Ge,k))??(_e?void 0:t.find(Ge=>an(Ge,k)))??Gl(t,j,void 0,o);x(j),R(ie)},[o,t,g,k]);let Tt=Q.useCallback((j,_e)=>{let ie=oy(j);if(!ie){bt.current+=1,S(""),I(""),B(_e),F(null),G(""),Z("idle");return}_e==="from"?S(ie):I(ie),B(_e),G(""),!Ut.current&&Number(ie)>0&&(Ut.current=!0,qe("bridge","amount_entered"))},[]),Ce=Q.useCallback(()=>{bt.current+=1,S(""),I(""),B("from"),F(null),G(""),X(""),Z("idle"),Ie(null),Qe(!1),Oe(null),xt(!1),ft(null)},[ft]),It=Q.useCallback(j=>{an(j,g)||(At.current||(At.current=!0,qe("bridge","token_selected",{tags:{item_id:`from:${j.symbol}`}})),x(j),R(Gl(t,j,void 0,o)),Ce())},[g,o,Ce,t]),qt=Q.useCallback(j=>{an(j,k)||an(j,g)||(At.current||(At.current=!0,qe("bridge","token_selected",{tags:{item_id:`to:${j.symbol}`}})),R(j),Ce())},[g,Ce,k]),P=Q.useMemo(()=>g?o?.(g,t)??t.filter(j=>!an(j,g)):[],[g,o,t]),Be=Q.useCallback(()=>{g?.balance&&Tt(g.balance,"from")},[g?.balance,Tt]),O=Q.useCallback(()=>{!g||!k||(x(k),R(g),Ce())},[g,Ce,k]),ae=Q.useCallback(()=>{bt.current+=1,S(""),I(""),B("from"),F(null),G(""),X("")},[]);Q.useEffect(()=>{if(!g||!k)return;if(!E&&!C){F(null),G(""),Z(ie=>ie==="quoting"?"idle":ie);return}let j=++bt.current,_e=Yu({fromToken:g,toToken:k,fromAmount:E,toAmount:C,lastChangedBy:M,slippage:L});Z(ie=>ie==="submitting"?ie:f.canQuote?"quoting":"idle"),(async()=>{try{let ie=await f.getQuote(_e);if(bt.current!==j)return;ie.fromAmount!==void 0&&M==="to"&&S(ie.fromAmount),ie.toAmount!==void 0&&M==="from"&&I(ie.toAmount),F(ie.summary??null),G(ie.error??"")}catch(ie){if(bt.current!==j)return;G(ie instanceof Error?ie.message:"Failed to quote bridge.")}finally{bt.current===j&&Z(ie=>ie==="quoting"?"idle":ie)}})()},[E,g,M,f,L,C,k]);let le=Q.useCallback(()=>!g||!k?null:Yu({fromToken:g,toToken:k,fromAmount:E,toAmount:C,lastChangedBy:M,slippage:K}),[K,E,g,M,C,k]),me=Q.useCallback(async(j,_e)=>{if(!rt.current){rt.current=!0,X(""),xt(!1),Qe(!1),Z("submitting");try{if(!_e?.skipApprovalCheck&&a){let Ge=await a(j);if(Ge){Ie(Ge),Oe(j),Z("idle");return}}Ie(null),Oe(null),ft("processing");let ie=await f.submitBridge(j);pe(ie),Z("success"),te(Ge=>[{id:ie.txHash,timestamp:new Date().toISOString(),txHash:ie.txHash,fromToken:ie.fromToken,toToken:ie.toToken,fromAmount:ie.fromAmount,toAmount:ie.toAmount,summary:A??void 0,status:"pending"},...Ge.filter(Co=>Co.txHash!==ie.txHash)]),ae(),Vt(!0),ft(null),xt(!0),qe("bridge","confirmed"),Lt.current=!1,Ve.current=!1,u?.(ie),m?.(ie)}catch(ie){if(ft(null),qe("bridge","confirmed",{status:"failure",reason:Nr(ie)}),Lt.current=!1,Ve.current=!1,Hl(ie)){Z("idle");return}let Ge=Ku(ie,"Failed to submit bridge.");X(Ge),Z("error"),y?.({message:Ge})}finally{rt.current=!1}}},[a,y,u,m,f,ae,ft,A]),mt=Q.useCallback(async()=>{if(_)return;let j=le();if(j){if(Lt.current||(Lt.current=!0,qe("bridge","submitted")),!Se){Oe(j),je(!0);return}await me(j)}},[le,_,me,Se]),Dt=Q.useCallback(async()=>{let j=We??le();j&&(iy(),lt(!0),je(!1),await me(j))},[le,We,me]),yt=Q.useCallback(()=>{je(!1),Oe(null)},[]),hr=Q.useCallback(async()=>{if(!($e.current||oe==="submitting"||!ge||!We||!i)){$e.current=!0,X(""),Z("submitting");try{await i(We,ge),Ve.current||(Ve.current=!0,qe("bridge","approved")),Ie(null),Z("idle"),Qe(!0)}catch(j){if(Hl(j)){Z("idle");return}let _e=Ku(j,"Failed to approve token.");X(_e),Z("error"),y?.({message:_e})}finally{$e.current=!1}}},[ge,i,y,We,me,oe]),br=Q.useCallback(()=>{oe!=="submitting"&&(Ie(null),Qe(!1),Oe(null),Z("idle"))},[oe]),jt=Q.useCallback(async()=>{if(oe==="submitting")return;let j=We??le();if(!j){Qe(!1),X("Bridge input is no longer available. Please try again."),Z("error");return}Qe(!1),await me(j,{skipApprovalCheck:!0})},[le,We,me,oe]),Dr=Q.useCallback(()=>{xt(!1)},[]),sr=Q.useCallback(j=>{w(j),j==="history"&&Vt(!1)},[]),re=Q.useCallback(()=>{if(p==="history"){sr("form");return}b?.()},[b,sr,p]),Ne=Q.useMemo(()=>[...s,...be.filter(j=>!s.some(_e=>_e.txHash===j.txHash))],[s,be]);return{step:p,setStep:sr,status:oe,error:U,quoteError:_,fromToken:g,toToken:k,tokens:t,availableToTokens:P,fromAmount:E,toAmount:C,lastChangedBy:M,slippage:L,effectiveSlippage:K,slippageLocked:ne,setSlippage:z,summary:A,history:Ne,submitted:H,canSubmit:f.canSubmit,termsOpen:ue,approvalInfo:ge,approvalSuccessOpen:ot,approveBridge:i,pendingSubmitInput:We,submitToast:tt,successDialogOpen:ut,dismissSuccessDialog:Dr,hasNewHistory:he,termsUrl:d,setFromToken:x,setToToken:R,selectFromToken:It,selectToToken:qt,setAmount:Tt,setMax:Be,swapTokens:O,submit:mt,confirmTerms:Dt,cancelTerms:yt,confirmApproval:hr,cancelApproval:br,continueAfterApproval:jt,back:re}}ce(`.bf-root{--bf-bg: var(--ds-bg-default, #1e232e);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .08));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .07));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .4));--bf-toast-bg: var(--bf-bg);--bf-toast-strong: var(--bf-text-high);--bf-toast-color: var(--bf-text-medium);position:relative;display:flex;flex:1;min-height:0;flex-direction:column;container:bf-flow / inline-size;overflow:hidden;background:var(--bf-bg);color:var(--ds-content-highest, #ffffff);font-family:inherit}[data-theme=dark].wi-popover-content .bf-root,[data-theme=dark].wi-drawer-content .bf-root{--bf-bg: var(--ds-bg-default, #121212);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .1));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .05));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .7));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .5))}[data-theme=light].wi-popover-content .bf-root,[data-theme=light].wi-drawer-content .bf-root{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .05));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .7));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .5))}[data-theme=dark].gou-shell .bf-root,.gou-shell[data-theme=dark] .bf-root{--bf-bg: var(--ds-bg-default, #121212);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .1));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .05));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .7));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .5))}[data-theme=light].gou-shell .bf-root,.gou-shell[data-theme=light] .bf-root{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .05));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .7));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .5))}.bf-root[data-view=history]{background:var(--ds-bg-dim, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-header{position:relative;display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:24px;border-bottom:1px solid var(--bf-border);background:var(--ds-bg-default, var(--bf-bg));box-sizing:border-box}.bf-root[data-view=history] .bf-header{padding:24px;border-bottom-color:var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff)}.bf-header-btn{display:inline-flex;width:24px;height:24px;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease}.bf-header-spacer{width:24px;height:24px;flex-shrink:0}.bf-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-header .bf-header-btn:last-child{position:absolute;top:24px;right:24px}.bf-header-title{position:absolute;left:50%;transform:translate(-50%);font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--bf-text-high);white-space:nowrap}.bf-header-title[data-clickable=true]{cursor:pointer}.bf-root[data-view=history] .bf-header-title{color:var(--ds-content-highest, #000000)}.bf-body,.bf-history-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;box-sizing:border-box}.bf-body{padding:24px}.bf-history-body{display:flex;flex-direction:column;gap:12px;padding:24px;background:var(--ds-bg-dim, #f5f7fa)}.bf-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.bf-chip{display:inline-flex;align-items:center;gap:4px;min-height:33px;padding:6px 8px;border:0;border-radius:12px;background:var(--bf-surface);color:var(--bf-text-medium);font:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-chip:hover:not(:disabled){color:var(--bf-text-high);background:var(--bf-surface-hover)}.bf-chip:disabled{cursor:default}.bf-chip-history{position:relative}.bf-chip-dot{position:absolute;top:4px;right:4px;width:6px;height:6px;border-radius:999px;background:var(--ds-system-red-default, #da0b2e)}.bf-swap-card{position:relative;display:flex;flex-direction:column;gap:12px;margin-bottom:12px}.bf-field-error{margin-top:-4px;color:var(--ds-system-red-default, #ff2b5f);font-size:13px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-amount-panel{display:flex;min-height:110px;flex-direction:column;gap:8px;padding:16px;border:1px solid transparent;border-radius:12px;background:var(--bf-surface);box-sizing:border-box;transition:border-color .2s ease}.bf-amount-panel:hover{border-color:var(--bf-border)}.bf-amount-head{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--bf-text-high);font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-balance{display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;color:var(--bf-text-low);font-size:12px;white-space:nowrap}.bf-amount-main{display:flex;align-items:center;justify-content:space-between;gap:12px}.bf-amount-input-wrap{display:flex;min-width:0;flex:1;flex-direction:column;gap:4px}.bf-amount-input{width:100%;min-width:0;padding:0;border:0;background:transparent;color:var(--bf-text-high);font:inherit;font-size:18px;font-size:clamp(15px,4.5cqi,18px);font-weight:600;line-height:1.5;letter-spacing:-.01em;outline:none}.bf-amount-input[data-size=medium]{font-size:16px;font-size:clamp(14px,4cqi,16px)}.bf-amount-input[data-size=small]{font-size:14px;font-size:clamp(12px,3.5cqi,14px)}.bf-amount-input::placeholder{color:var(--ds-content-lowest, rgba(0, 0, 0, .25))}.bf-amount-usd{overflow:hidden;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;white-space:nowrap;text-overflow:ellipsis}.bf-token-pill{display:inline-flex;flex-shrink:0;align-items:center;gap:6px;min-height:33px;padding:6px 8px 6px 6px;border:1px solid var(--bf-border);border-radius:9999px;background:var(--bf-bg);color:var(--bf-text-high);font:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;perspective:220px;overflow:hidden;transition:transform .12s ease,background .15s ease}.bf-token-pill:hover:not(:disabled):not([data-locked=true]){background:var(--bf-surface-hover)}.bf-token-pill:disabled{cursor:default;opacity:.6}.bf-token-pill[data-locked=true]{cursor:default}.bf-token-icon{position:relative;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;overflow:hidden;border-radius:0;background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000);font-size:11px;font-weight:700}.bf-token-icon[data-has-image=true]{background:transparent}.bf-token-icon img{width:100%;height:100%;border-radius:0;object-fit:cover}.bf-token-fallback{line-height:1}.bf-token-pill-face{display:inline-flex;align-items:center;gap:6px;transform-origin:center bottom;animation:bf-token-roll-up .32s cubic-bezier(.22,1,.36,1)}@keyframes bf-token-roll-up{0%{opacity:0;transform:translateY(90%) rotateX(-80deg)}60%{opacity:1}}.bf-token-pill:active:not(:disabled),.bf-embedded-token-pill:active:not(:disabled){transform:scale(.96)}.bf-token-search:focus-within{border-color:var(--ds-accent-primary-default, #f0640d)}.bf-token-search input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--bf-text-high);font:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-token-search input::placeholder{color:var(--bf-text-low)}.bf-token-list{display:flex;min-height:0;flex:1;flex-direction:column;gap:0;overflow-y:auto;overflow-x:hidden;padding:0 24px 24px;scrollbar-width:thin;box-sizing:border-box}.bf-token-row{position:relative;display:flex;width:100%;min-height:69px;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid transparent;border-radius:12px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;box-sizing:border-box}.bf-token-row:hover:not([data-selected=true]){background:var(--ds-surface-medium, rgba(18, 18, 18, .05))}.bf-token-row[data-selected=true]{border-color:var(--ds-accent-primary-default, #ff8438);background:var(--ds-surface-medium, rgba(18, 18, 18, .05))}.bf-token-row-left{display:inline-flex;min-width:0;align-items:center;gap:16px}.bf-token-meta{display:flex;min-width:0;flex-direction:column}.bf-token-symbol{overflow:hidden;color:var(--bf-text-high);font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.bf-token-name{overflow:hidden;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.bf-token-row-right{display:flex;min-width:86px;max-width:42%;flex-shrink:0;flex-direction:column;align-items:flex-end}.bf-token-balance,.bf-token-price{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-token-balance{color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-token-price{color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-token-row[data-selected=true] .bf-token-symbol{color:var(--bf-text-high)}.bf-token-row[data-selected=true] .bf-token-balance{color:var(--bf-text-high);font-size:16px}.bf-token-row[data-selected=true] .bf-token-price{color:var(--bf-text-low);font-size:14px}.bf-token-empty{padding:32px 16px;color:var(--bf-text-low);font-size:14px;font-weight:500;line-height:1.5;text-align:center}.bf-slippage-overlay{position:fixed;inset:0;z-index:100002;display:flex;align-items:center;justify-content:center;padding:24px;background:#00000085;pointer-events:auto;box-sizing:border-box}.bf-slippage-dialog{display:flex;width:min(480px,calc(100vw - 48px));height:auto;min-height:min(316px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);flex-direction:column;overflow:hidden;border:1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));border-radius:24px;background:var(--ds-surface-default, #ffffff);color:var(--ds-content-highest, #000000);box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));box-sizing:border-box}.bf-slippage-head{position:relative;display:flex;min-height:73px;flex-shrink:0;align-items:center;justify-content:flex-start;padding:24px 56px 24px 24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff);box-sizing:border-box}.bf-slippage-head h3{margin:0;color:var(--ds-content-highest, #000000);font-size:20px;font-weight:600;line-height:1.25;letter-spacing:0}.bf-slippage-close{position:absolute;top:24px;right:24px;display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer}.bf-slippage-close:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-slippage-body{display:flex;flex:1;min-height:0;flex-direction:column;gap:24px;padding:24px;box-sizing:border-box}.bf-slippage-desc{margin:0;color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-controls{display:flex;flex-direction:column;gap:12px;width:100%}.bf-slippage-presets{display:flex;gap:8px;width:100%}.bf-slippage-preset{appearance:none;display:inline-flex;flex:1 1 0;min-width:0;min-height:48px;align-items:center;justify-content:center;padding:12px 8px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;box-sizing:border-box}.bf-slippage-preset:hover,.bf-slippage-preset[data-selected=true]{border-color:var(--ds-accent-primary-default, #ff8438);background:var(--ds-accent-primary-low, #fff5ee)}.bf-slippage-custom{display:flex;min-height:48px;align-items:center;gap:8px;padding:12px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85));box-sizing:border-box}.bf-slippage-custom:focus-within,.bf-slippage-custom[data-selected=true]{border-color:var(--ds-accent-primary-default, #ff8438)}.bf-slippage-custom input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--ds-content-high, rgba(0, 0, 0, .85));font:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-custom input::placeholder{color:var(--ds-content-lowest, rgba(0, 0, 0, .25))}.bf-slippage-custom span:not(.bf-sr-only){flex-shrink:0;color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-apply{appearance:none;margin-top:auto;width:100%;min-height:48px;padding:12px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #ff8438);color:var(--ds-accent-primary-on-primary, #ffffff);font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;box-sizing:border-box}.bf-slippage-apply:hover{filter:brightness(.96)}.bf-slippage-apply:disabled{cursor:not-allowed;opacity:.5;filter:none}.bf-slippage-message{margin:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-message[data-variant=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-slippage-message[data-variant=error]{color:var(--ds-system-red-default, #da0b2e)}.bf-action-modal-overlay{--bf-bg: var(--ds-bg-default, #1e232e);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .08));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .12));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .92));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .4));position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;padding:24px;background:#040912b8;pointer-events:auto;box-sizing:border-box;animation:bf-overlay-in .18s ease-out}.bf-action-modal-overlay[data-theme=light]{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .08));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .65));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .4))}.bf-action-modal{display:flex;width:min(480px,calc(100vw - 48px));flex-direction:column;align-items:center;gap:24px;padding:48px 24px 24px;border:1px solid var(--bf-border);border-radius:24px;background:var(--bf-bg);color:#fff;box-shadow:0 24px 80px #00000073;box-sizing:border-box;animation:bf-modal-in .2s cubic-bezier(.16,1,.3,1)}.bf-action-modal-overlay[data-state=closed]{animation:bf-overlay-out .15s ease-in forwards}.bf-action-modal-overlay[data-state=closed] .bf-action-modal{animation:bf-modal-out .15s ease-in forwards}@keyframes bf-overlay-in{0%{opacity:0}}@keyframes bf-overlay-out{to{opacity:0}}@keyframes bf-modal-in{0%{opacity:0;transform:translateY(8px) scale(.96)}}@keyframes bf-modal-out{to{opacity:0;transform:translateY(4px) scale(.98)}}@media(prefers-reduced-motion:reduce){.bf-action-modal-overlay,.bf-action-modal,.bf-action-modal-overlay[data-state=closed],.bf-action-modal-overlay[data-state=closed] .bf-action-modal{animation:none}}.bf-action-modal h3{width:100%;margin:0;color:var(--bf-text-high);font-size:24px;font-weight:700;line-height:1.25;text-align:left;letter-spacing:0}.bf-action-modal-desc{max-width:380px;margin:0;color:var(--bf-text-low);font-size:15px;font-weight:500;line-height:1.45;text-align:center;letter-spacing:0}.bf-terms-modal{--bf-terms-accent: #f3742e;padding:24px;gap:24px}.bf-terms-modal h3{font-size:20px;font-weight:600;line-height:1.6;text-align:center}.bf-terms-modal .bf-action-modal-desc{font-size:14px;line-height:1.45}.bf-terms-check-row{display:grid;width:100%;min-height:56px;grid-template-columns:20px minmax(0,1fr);align-items:center;column-gap:12px;padding:16px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-surface);color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.4;box-sizing:border-box}.bf-terms-check-button{appearance:none;display:inline-flex;min-width:0;width:20px;height:20px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;touch-action:manipulation}.bf-terms-copy{display:flex;width:100%;min-width:0;align-items:baseline;justify-content:space-between;column-gap:12px;row-gap:4px;flex-wrap:wrap}.bf-terms-label{min-width:0;cursor:pointer;touch-action:manipulation}.bf-terms-check-button:focus-visible .bf-terms-checkbox{outline:2px solid var(--ds-accent-primary-default, #f0640d);outline-offset:2px}.bf-terms-checkbox{position:relative;display:inline-flex;width:20px;height:20px;align-items:center;justify-content:center;border:1px solid rgba(124,143,180,.72);border-radius:4px;background:transparent;box-sizing:border-box}.bf-terms-checkbox[data-checked=true]{border-color:var(--ds-accent-primary-default, #f0640d);background:var(--ds-accent-primary-default, #f0640d)}.bf-terms-checkbox[data-checked=true]:after{width:8px;height:4px;border:solid #ffffff;border-width:0 0 2px 2px;content:"";transform:rotate(-45deg) translate(1px,-1px)}.bf-terms-check-row a{position:relative;z-index:1;color:var(--ds-accent-primary-default, #f0640d);font-size:14px;font-weight:700;text-decoration:none;white-space:nowrap}.bf-terms-check-row a:hover{text-decoration:underline}.bf-terms-privacy{max-width:100%;margin:0;color:var(--bf-text-low);font-size:clamp(8px,2.4vw,12px);white-space:nowrap;font-weight:500;line-height:1.45;text-align:center;letter-spacing:0}.bf-action-primary,.bf-action-secondary{display:inline-flex;width:100%;min-height:56px;align-items:center;justify-content:center;padding:14px 16px;border:0;border-radius:12px;font:inherit;font-size:18px;font-weight:700;line-height:1.4;letter-spacing:0;cursor:pointer}.bf-action-primary{background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000)}.bf-action-primary:disabled{cursor:not-allowed;opacity:.35}.bf-terms-modal .bf-action-primary{min-height:52px;background:var(--bf-terms-accent);color:#fff;font-size:16px;font-weight:600}.bf-terms-modal .bf-action-primary:disabled{background:var(--bf-surface);color:var(--bf-text-low);opacity:1}.bf-action-primary[aria-busy=true]{gap:8px;opacity:1}.bf-action-button-spinner{width:18px;height:18px;border:2px solid rgba(0,0,0,.22);border-top-color:currentColor;border-right-color:currentColor;border-radius:999px;animation:bf-loading-spin .9s linear infinite}.bf-action-secondary{background:var(--bf-surface);color:var(--bf-text-low)}.bf-action-secondary:disabled{cursor:not-allowed;opacity:.5}.bf-approve-address-box{display:flex;width:100%;flex-direction:column;gap:10px;padding:16px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-surface);box-sizing:border-box}.bf-approve-address-box>span{color:var(--bf-text-low);font-size:14px;font-weight:700;line-height:1.4}.bf-approve-address-box>div{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-approve-address-box strong{min-width:0;overflow:hidden;color:var(--bf-text-high);font-size:15px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.bf-copy-button{flex-shrink:0;min-width:48px;min-height:32px;padding:6px 10px;border:1px solid rgba(0,206,178,.65);border-radius:8px;background:transparent;color:var(--ds-accent-primary-default, #f0640d);font:inherit;font-size:12px;font-weight:700;line-height:1.2;cursor:pointer}.bf-copy-button:disabled{cursor:not-allowed;opacity:.45}.bf-action-buttons{display:grid;width:100%;grid-template-columns:1fr 1fr;gap:12px}.bf-approval-success-modal{gap:28px}.bf-success-mark{position:relative;display:inline-flex;width:96px;height:96px;flex-shrink:0;align-items:center;justify-content:center;border:12px solid rgba(0,206,178,.12);border-radius:999px;background:#00ceb2a8;box-shadow:0 0 0 10px #00ceb20f;box-sizing:border-box}.bf-success-mark:after{width:34px;height:18px;border:solid #ffffff;border-width:0 0 6px 6px;content:"";transform:rotate(-45deg) translate(2px,-3px)}.bf-status-toast{position:absolute;right:16px;bottom:14px;left:16px;z-index:5;display:flex;align-items:center;gap:12px;min-height:52px;padding:12px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-toast-bg);color:var(--bf-toast-color);box-shadow:0 8px 24px #0000003d;box-sizing:border-box}.bf-status-toast-icon{display:inline-flex;width:28px;height:28px;flex-shrink:0;align-items:center;justify-content:center;border-radius:999px}.bf-status-spinner{width:20px;height:20px;border:3px solid rgba(255,255,255,.18);border-top-color:var(--ds-accent-primary-default, #f0640d);border-right-color:var(--ds-accent-primary-default, #f0640d);border-radius:999px;animation:bf-loading-spin .9s linear infinite}.bf-status-check{position:relative;width:20px;height:20px;border-radius:999px;background:var(--ds-system-green-default, #00ceb2)}.bf-status-check:after{position:absolute;top:6px;left:5px;width:8px;height:4px;border:solid var(--ds-system-green-on, #000000);border-width:0 0 2px 2px;content:"";transform:rotate(-45deg)}.bf-status-toast-copy{display:flex;min-width:0;flex:1;flex-direction:column}.bf-status-toast-copy strong,.bf-status-toast-copy span{overflow:hidden;text-overflow:ellipsis}.bf-status-toast-copy strong{color:var(--bf-toast-strong);font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-status-toast-copy span{color:var(--bf-toast-color);font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em}.bf-status-toast[data-variant=success] .bf-status-toast-copy span{color:var(--ds-system-green-on-inverted, #00e8c9)}.bf-status-toast[data-variant=error]{border:1px solid rgba(255,43,95,.28);background:var(--bf-toast-bg)}.bf-status-toast[data-variant=error] .bf-status-toast-copy strong{color:var(--bf-toast-strong)}.bf-status-error-mark{display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;border-radius:999px;background:var(--ds-system-red-default, #ff2b5f);color:#fff;font-size:14px;font-weight:700;line-height:1}.bf-status-toast[data-variant=error] .bf-status-toast-copy span{color:var(--bf-toast-color)}.bf-success-overlay{--bf-bg: var(--ds-bg-default, #1e232e);--bf-border: var(--ds-border-default, rgba(255, 255, 255, .12));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .92));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;padding:24px;background:#000000b8;pointer-events:auto;box-sizing:border-box}.bf-success-overlay[data-theme=light]{--bf-bg: #ffffff;--bf-border: rgba(18, 18, 18, .08);--bf-text-high: rgba(18, 18, 18, .85);--bf-text-medium: rgba(18, 18, 18, .65);--bf-text-low: rgba(18, 18, 18, .4)}.bf-success-modal{display:flex;width:min(480px,calc(100vw - 48px));flex-direction:column;overflow:hidden;border:1px solid var(--bf-border);border-radius:24px;background:var(--bf-bg);color:var(--bf-text-high);box-shadow:0 24px 80px #00000073;box-sizing:border-box}.bf-success-head{display:flex;min-height:73px;align-items:center;justify-content:space-between;gap:16px;padding:24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));box-sizing:border-box}.bf-success-head h3{min-width:0;margin:0;overflow:hidden;color:var(--ds-content-highest, #000000);font-size:20px;font-weight:600;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.bf-success-close{display:inline-flex;width:24px;height:24px;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer}.bf-success-close:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-success-body{display:flex;flex-direction:column;align-items:center;gap:24px;padding:40px 24px 24px;box-sizing:border-box}.bf-success-copy{display:flex;width:100%;flex-direction:column;align-items:center;gap:4px;color:var(--bf-text-medium);text-align:center}.bf-success-copy strong{color:var(--bf-text-high);font-size:24px;font-weight:700;line-height:1.25;letter-spacing:0}.bf-success-copy span{color:var(--bf-text-medium);font-size:15px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-success-route{display:flex;align-items:center;justify-content:center;gap:12px}.bf-success-route .bf-token-icon{width:48px!important;height:48px!important;background:transparent;font-size:18px}.bf-success-route-arrow{color:var(--bf-text-low);font-size:24px;font-weight:500;line-height:1}.bf-success-ok{display:inline-flex;width:100%;min-height:48px;align-items:center;justify-content:center;padding:12px;border:0;border-radius:12px;background:#00b4b7e0;color:#fff;font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}@media(max-width:767px){.bf-success-body{padding:40px 24px 24px}.bf-success-copy strong{font-size:22px}.bf-success-copy span{font-size:14px}.bf-success-mark{width:88px;height:88px}.bf-success-route .bf-token-icon{width:44px!important;height:44px!important}}@keyframes bf-loading-spin{to{transform:rotate(360deg)}}.bf-swap-toggle{position:absolute;top:100px;left:50%;z-index:1;display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;padding:0;border:0;border-radius:9999px;background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000);box-shadow:0 1px 5px #0000001f;cursor:pointer}.bf-swap-card[data-has-from-error=true] .bf-swap-toggle{top:132px}.bf-details{display:flex;flex-direction:column;gap:24px}.bf-collapse{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .22s ease,opacity .14s ease,margin-top .22s ease}.bf-collapse[data-open=true]{grid-template-rows:1fr;opacity:1}.bf-collapse:not([data-open=true]){margin-top:calc(-1 * var(--bf-collapse-gap, 0px))}.bf-collapse-inner{overflow:hidden;min-height:0}@keyframes bf-value-in{0%{opacity:.25;transform:translateY(-2px)}}.bf-info-value,.bf-route-amount-value,.bf-route-meta>span{animation:bf-value-in .24s ease-out}@media(prefers-reduced-motion:reduce){.bf-collapse{transition:none}.bf-info-value,.bf-route-amount-value,.bf-route-meta>span{animation:none}}.bf-exchange-rate{display:flex;width:100%;align-items:center;justify-content:center;gap:4px;padding:0 0 24px;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-detail-section,.bf-history-card{display:flex;flex-direction:column;gap:12px;padding:0;border-radius:12px;background:transparent;box-sizing:border-box}.bf-liquidity{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;background:var(--bf-surface);box-sizing:border-box}.bf-root[data-view=history] .bf-liquidity,.bf-root[data-view=history] .bf-detail-section,.bf-root[data-view=history] .bf-history-card{background:var(--ds-surface-default, #ffffff)}.bf-detail-section h3{margin:0;color:var(--bf-text-high);font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-tx-fee-section{gap:12px}.bf-tx-fee-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.bf-collapse-head{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin:0;padding:0;background:none;border:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.bf-detail-section[data-open=true] .bf-collapse-head{padding-bottom:12px;border-bottom:1px solid var(--bf-border)}.bf-collapse-chevron{flex-shrink:0;color:var(--bf-text-low);transition:transform .2s ease}.bf-detail-section[data-open=true] .bf-collapse-chevron{transform:rotate(180deg)}.bf-collapse-body{display:flex;flex-direction:column;gap:14px}.bf-root[data-view=history] .bf-detail-section[data-open=true] .bf-collapse-head{border-bottom-color:var(--ds-border-default, rgba(0, 0, 0, .07))}.bf-root[data-view=history] .bf-collapse-chevron{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-tx-fee-total{display:inline-flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;color:var(--bf-text-medium);font-size:14px;font-weight:600;line-height:1.4;text-align:right}.bf-tx-fee-total>span[data-delegated=true]{text-decoration:line-through;text-decoration-thickness:2px;text-decoration-color:currentColor}.bf-fee-delegated{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:2px 8px;border-radius:6px;background:#379cff2e;color:#4eb3ff;font-size:10px;font-weight:500;line-height:1.3;white-space:nowrap}.bf-tx-fee-token{width:16px;height:16px;flex-shrink:0;border-radius:999px;object-fit:cover}.bf-info-card{gap:14px}.bf-info-section{display:flex;flex-direction:column;gap:10px}.bf-info-section+.bf-info-section{padding-top:2px}.bf-info-section h4{margin:0;color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.5}.bf-root[data-view=history] .bf-detail-section h3,.bf-root[data-view=history] .bf-info-section h4{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-route-steps{display:flex;flex-direction:column}.bf-route-step{display:grid;min-width:0;grid-template-columns:18px minmax(0,1fr);column-gap:10px}.bf-route-rail{position:relative;display:flex;justify-content:center}.bf-route-line{position:absolute;top:9px;bottom:-4px;width:1px;background:var(--bf-border)}.bf-route-step[data-last=true] .bf-route-line{display:none}.bf-route-dot{z-index:1;width:9px;height:9px;margin-top:5px;border:2px solid var(--bf-text-low);border-radius:999px;background:var(--bf-bg);box-sizing:border-box}.bf-route-dot[data-final=true]{border-color:var(--ds-accent-primary-default, #00ceb2)}.bf-route-body{display:flex;min-width:0;flex-direction:column;gap:2px;padding-bottom:14px}.bf-route-step[data-last=true] .bf-route-body{padding-bottom:0}.bf-route-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-route-title{min-width:0;overflow:hidden;color:var(--bf-text-high);font-size:13px;font-weight:620;letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap}.bf-route-amount{display:inline-flex;flex-shrink:0;align-items:center;gap:4px;color:var(--bf-text-medium);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}.bf-route-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;color:var(--bf-text-low);font-size:12px;line-height:1.45;font-variant-numeric:tabular-nums}.bf-route-step[data-kind=hop] .bf-route-title{color:var(--bf-text-medium);font-weight:600}.bf-route-step[data-kind=hop] .bf-route-amount{color:var(--bf-text-low);font-weight:500}.bf-route-step[data-kind=hop] .bf-route-dot{width:7px;height:7px;margin-top:6px;border-width:1px}.bf-route-meta>span[data-tone=accent]{color:var(--ds-accent-primary-default, #00ceb2);font-weight:600}.bf-route-meta>span[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00);font-weight:600}.bf-route-meta>span[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e);font-weight:600}.bf-route-tag{padding:1px 6px;border-radius:5px;background:var(--ds-accent-primary-low, rgba(0, 206, 178, .12));color:var(--ds-accent-primary-high, #00a0a2);font-size:10px;font-weight:700;letter-spacing:.01em}.bf-info-rows{display:flex;flex-direction:column;gap:8px}.bf-info-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-liquidity-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-info-label{display:inline-flex;align-items:center;gap:6px;min-width:0;color:var(--bf-text-low)}.bf-info-value{display:flex;min-width:0;align-items:center;justify-content:flex-end;gap:4px;color:var(--bf-text-medium);text-align:right}.bf-info-route,.bf-info-value-token{display:inline-flex;align-items:center;gap:4px}.bf-info-route .bf-token-icon,.bf-info-value-token .bf-token-icon{flex-shrink:0}.bf-info-route-arrow{display:inline-flex;align-items:center;color:var(--bf-text-medium);font-size:12px;line-height:1}.bf-root[data-view=history] .bf-info-route-arrow{color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.bf-info-value[data-tone=accent]{color:var(--ds-accent-primary-high, #f0640d)}.bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-info-value[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e)}.bf-root[data-view=history] .bf-info-label,.bf-root[data-view=history] .bf-liquidity-head{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-root[data-view=history] .bf-info-value{color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.bf-root[data-view=history] .bf-info-value[data-tone=accent]{color:var(--ds-accent-primary-high, #f0640d)}.bf-root[data-view=history] .bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-root[data-view=history] .bf-info-value[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e)}.bf-liquidity-status{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:600;line-height:1.4;white-space:nowrap}.bf-liquidity-status:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0}.bf-liquidity-status[data-status=normal],.bf-liquidity-status:not([data-status]){background:#00ceb21f;color:var(--ds-accent-primary-default, #f0640d)}.bf-liquidity-status[data-status=normal]:before,.bf-liquidity-status:not([data-status]):before{background:var(--ds-accent-primary-default, #f0640d)}.bf-liquidity-status[data-status=low]{background:#e56f001f;color:#e56f00}.bf-liquidity-status[data-status=low]:before{background:#e56f00}.bf-liquidity-status[data-status=rebalancing]{background:#da0b2e1a;color:#da0b2e}.bf-liquidity-status[data-status=rebalancing]:before{background:#da0b2e}.bf-liquidity-track{height:8px;overflow:hidden;border-radius:999px;background:var(--bf-surface-hover)}.bf-liquidity-track span{display:block;height:100%;border-radius:inherit;background:var(--ds-accent-primary-default, #f0640d)}.bf-error{padding:12px;border-radius:12px;background:#da0b2e1f;color:var(--ds-system-red-default, #da0b2e);font-size:13px;line-height:1.4}.bf-footer{display:flex;flex-shrink:0;flex-direction:column;align-items:center;gap:10px;padding:12px 24px 24px;background:var(--ds-bg-default, var(--bf-bg))}.bf-next{width:100%;min-height:48px;padding:12px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000);font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-next:disabled{cursor:default;opacity:.6}.bf-powered{display:inline-flex;align-items:center;gap:3px;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-decoration:none}.bf-powered:focus-visible{border-radius:4px;outline:2px solid var(--ds-accent-primary-default, #f0640d);outline-offset:2px}.bf-powered-brand{text-decoration:underline;text-underline-offset:2px}.bf-history-tabs{display:flex;align-items:center;gap:4px;width:100%}.bf-history-tab{position:relative;display:inline-flex;min-height:37px;align-items:center;justify-content:center;padding:8px 12px;border:0;background:transparent;color:var(--ds-content-lowest, rgba(0, 0, 0, .25));font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;cursor:pointer}.bf-history-tab[data-active=true]{color:var(--ds-accent-primary-high, #f0640d)}.bf-history-tab[data-active=true]:after{position:absolute;right:8px;bottom:0;left:8px;height:3px;border-radius:999px;background:var(--ds-accent-primary-high, #f0640d);content:""}.bf-history-tab-dot{position:absolute;top:8px;right:4px;width:6px;height:6px;border-radius:999px;background:var(--ds-system-red-default, #da0b2e)}.bf-history-list{display:flex;flex-direction:column;gap:12px}.bf-history-item{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:var(--ds-surface-default, #ffffff);box-sizing:border-box}.bf-history-item-head,.bf-history-meta,.bf-history-route,.bf-history-route-token{display:inline-flex;align-items:center}.bf-history-item-head{justify-content:space-between;gap:12px;width:100%}.bf-history-status{display:inline-flex;min-height:24px;align-items:center;justify-content:center;padding:3px 8px;border-radius:4px;background:var(--ds-system-orange-low, #fcf5e9);color:var(--ds-system-orange-high, #e56f00);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;white-space:nowrap}.bf-history-status[data-status=completed]{background:var(--ds-system-green-low, #e7f9f8);color:var(--ds-system-green-high, #00a0a2)}.bf-history-status[data-status=failed]{background:var(--ds-system-red-low, rgba(218, 11, 46, .12));color:var(--ds-system-red-default, #da0b2e)}.bf-history-time{min-width:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;text-align:right;white-space:nowrap}.bf-history-item-body{display:flex;flex-direction:column;gap:4px}.bf-history-amount{color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-history-meta{justify-content:space-between;gap:12px;min-width:0}.bf-history-usd{min-width:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-history-route{justify-content:flex-end;gap:4px;min-width:0;color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:12px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-history-route-token{gap:4px;min-width:0}.bf-history-route-token span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-history-route-arrow{flex-shrink:0;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-empty{padding:32px 16px;text-align:center;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:14px}.bf-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:767px){.bf-slippage-overlay{align-items:flex-end;padding:0}.bf-slippage-dialog{width:100%;height:auto;min-height:316px;max-height:82dvh;border-right:0;border-bottom:0;border-left:0;border-radius:24px 24px 0 0}}.wi-drawer-content .bf-header{padding:16px}.wi-drawer-content .bf-header .bf-header-btn:last-child{top:16px;right:16px}.wi-drawer-content .bf-body,.wi-drawer-content .bf-history-body{padding:16px}.bf-root[data-variant=embedded]{--bf-bg: #1c1c1d;--bf-surface: #212224;--bf-surface-hover: rgba(255, 255, 255, .08);--bf-border: rgba(255, 255, 255, .1);--bf-text-high: rgba(255, 255, 255, .85);--bf-text-medium: rgba(255, 255, 255, .65);--bf-text-low: rgba(255, 255, 255, .4);--bf-embedded-primary: #f3742e;--bf-embedded-on-primary: #ffffff;background:var(--bf-bg);color:#fff}.gou-shell[data-theme=light] .bf-root[data-variant=embedded]{--bf-bg: #ffffff;--bf-surface: #ffffff;--bf-surface-hover: rgba(0, 0, 0, .03);--bf-border: rgba(0, 0, 0, .06);--bf-text-high: rgba(0, 0, 0, .85);--bf-text-medium: rgba(0, 0, 0, .65);--bf-text-low: rgba(0, 0, 0, .4);color:#000}.bf-root[data-variant=embedded] .bf-header{min-height:64px;justify-content:flex-start;gap:12px;padding:16px 20px 12px;border-bottom-color:var(--bf-border);background:var(--bf-bg)}.bf-root[data-variant=embedded] .bf-header .bf-header-btn:last-child{top:16px;right:20px}.bf-root[data-variant=embedded] .bf-header-btn{color:var(--bf-text-medium)}.bf-root[data-variant=embedded] .bf-header-title{position:static;flex:1;padding-right:36px;transform:none;color:var(--bf-text-high);font-size:18px;font-weight:600;line-height:1.5;text-align:left}.bf-root[data-variant=embedded] .bf-header-spacer{display:none}.bf-root[data-variant=embedded] .bf-embedded-body{padding:20px}.bf-embedded-form{display:flex;width:100%;min-width:0;flex-direction:column;gap:20px;--bf-collapse-gap: 20px}.bf-embedded-fields{position:relative;display:flex;width:100%;flex-direction:column}.bf-embedded-field-group{display:flex;width:100%;flex-direction:column;gap:8px}.bf-embedded-amount-panel{display:flex;width:100%;min-width:0;flex-direction:column;padding:16px;border:1px solid rgba(255,255,255,.025);border-radius:12px;background:#212224;box-sizing:border-box}.gou-shell[data-theme=light] .bf-embedded-amount-panel{border-color:#00000014;background:#fff}.bf-embedded-amount-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.bf-embedded-amount-label{display:inline-flex;min-width:0;align-items:center;gap:8px;white-space:nowrap}.bf-embedded-amount-label strong{color:var(--bf-text-medium);font-size:14px;font-weight:700;line-height:1.5}.bf-embedded-amount-label>span{color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5}.bf-embedded-amount-label em{padding:2px 6px;border-radius:9999px;background:#f3742e1a;color:var(--bf-embedded-primary);font-size:11px;font-style:normal;font-weight:500;line-height:1.25}.bf-embedded-balance{display:inline-flex;min-width:0;max-width:100%;flex-shrink:1;align-items:center;justify-content:flex-end;gap:6px;overflow:hidden;color:var(--bf-text-medium);font-size:12px;font-weight:600;line-height:1.5;text-align:right;white-space:nowrap}.bf-embedded-balance>svg,.bf-embedded-balance>span:not(.bf-embedded-balance-value){flex-shrink:0}.bf-embedded-balance-value{min-width:0;overflow:hidden;text-overflow:ellipsis}.bf-embedded-balance button{flex-shrink:0;padding:2px 8px;border:0;border-radius:9999px;background:#f3742e26;color:var(--bf-embedded-primary);font:inherit;font-size:11px;font-weight:700;line-height:1.4;cursor:pointer}.bf-embedded-balance button:hover{background:#f3742e40}.bf-embedded-amount-main{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-embedded-token-pill{display:inline-flex;height:32px;flex-shrink:0;align-items:center;gap:6px;padding:0 12px 0 6px;border:1px solid rgba(255,255,255,.1);border-radius:9999px;background:#ffffff0d;color:#fff;font:inherit;font-size:14px;font-weight:700;line-height:1.5;cursor:pointer;perspective:220px;overflow:hidden;transition:transform .12s ease,background .15s ease}.gou-shell[data-theme=light] .bf-embedded-token-pill{border-color:#0000000f;background:#00000008;color:#000}.bf-embedded-token-pill:disabled{cursor:default;opacity:1}.bf-embedded-input-wrap{display:flex;min-width:0;flex:1}.bf-embedded-amount-input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:#fff;font:inherit;font-size:24px;font-size:clamp(18px,6cqi,24px);font-weight:700;line-height:32px;text-align:right}.gou-shell[data-theme=light] .bf-embedded-amount-input{color:#000}.bf-embedded-amount-input[data-size=medium]{font-size:20px;font-size:clamp(16px,5cqi,20px);line-height:28px}.bf-embedded-amount-input[data-size=small]{font-size:16px;font-size:clamp(14px,4cqi,16px);line-height:24px}.bf-embedded-amount-input::placeholder{color:var(--bf-text-low);opacity:1}.bf-embedded-field-error{color:#ff3c53;font-size:12px;font-weight:400;line-height:1.5}.bf-embedded-direction{position:relative;z-index:10;display:flex;width:100%;align-items:center;justify-content:center;margin:-12px 0}.bf-embedded-direction>span{display:inline-flex;width:36px;height:36px;align-items:center;justify-content:center;border-radius:9999px;background:var(--bf-embedded-primary);color:var(--bf-embedded-on-primary)}.bf-embedded-summary{display:flex;width:100%;flex-direction:column;gap:12px}.bf-embedded-details{display:flex;width:100%;flex-direction:column;gap:16px;padding:0 16px 16px;box-sizing:border-box}.bf-embedded-details .bf-info-section{gap:12px}.bf-embedded-details .bf-info-section+.bf-info-section{padding-top:0}.bf-embedded-details .bf-info-section h4{color:#fffc;font-size:14px;font-weight:700}.gou-shell[data-theme=light] .bf-embedded-details .bf-info-section h4{color:#000c}.bf-embedded-details .bf-info-rows{gap:12px}.bf-embedded-details .bf-info-row{min-height:20px;font-size:13px;font-weight:600}.bf-embedded-details .bf-info-label{gap:6px;color:var(--bf-text-medium);font-size:13px;font-weight:400}.bf-embedded-details .bf-info-value{color:var(--bf-text-medium);font-size:13px;font-weight:600}.bf-embedded-details .bf-info-value[data-tone=accent]{color:var(--bf-embedded-primary)}.bf-embedded-details .bf-info-route-arrow{color:var(--bf-text-medium)}.bf-embedded-liquidity{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;background:var(--bf-surface)}.bf-embedded-liquidity>div{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--bf-text-medium);font-size:14px}.bf-embedded-liquidity>div>span:last-child{text-transform:capitalize}.bf-embedded-liquidity-track{display:block;height:8px;overflow:hidden;border-radius:9999px;background:var(--bf-surface-hover)}.bf-embedded-liquidity-track>span{display:block;height:100%;border-radius:inherit;background:var(--bf-embedded-primary)}.bf-embedded-liquidity-error{padding:12px 16px;border:1px solid rgba(255,60,83,.3);border-radius:8px;background:#ff3c531a;color:#ff3c53;font-size:14px;line-height:1.5;text-align:center}.bf-embedded-action-footer{width:100%;flex-shrink:0}.bf-embedded-cta{display:flex;width:100%;height:52px;flex-shrink:0;align-items:center;justify-content:center;padding:0 16px;border:0;border-radius:12px;background:var(--bf-embedded-primary);color:var(--bf-embedded-on-primary);font:inherit;font-size:16px;font-weight:600;line-height:1.5;cursor:pointer;transition:opacity .15s ease,background-color .15s ease;box-sizing:border-box}.bf-embedded-cta:hover:not(:disabled){background:#f3742ee6}.bf-embedded-cta:disabled{cursor:not-allowed;opacity:.6}.bf-embedded-spinner{width:20px;height:20px;border:2px solid var(--bf-embedded-on-primary);border-top-color:transparent;border-radius:9999px;animation:bf-loading-spin .9s linear infinite}@media(max-width:767px){.bf-root[data-variant=embedded] .bf-header{min-height:50px;padding:12px 16px 8px;border-bottom:0}.bf-root[data-variant=embedded] .bf-header .bf-header-btn:last-child{display:none}.bf-root[data-variant=embedded] .bf-embedded-body{padding:12px 16px calc(env(safe-area-inset-bottom,0px) + 12px);overscroll-behavior:contain;scroll-padding-bottom:calc(env(safe-area-inset-bottom,0px) + 76px);-webkit-overflow-scrolling:touch}.bf-root[data-variant=embedded] .bf-embedded-action-footer{position:sticky;bottom:0;z-index:20;padding-top:12px;background:var(--bf-bg);isolation:isolate}.bf-root[data-variant=embedded] .bf-embedded-action-footer:after{position:absolute;z-index:-1;top:100%;right:0;left:0;height:calc(env(safe-area-inset-bottom,0px) + 32px);background:var(--bf-bg);box-shadow:0 16px 0 16px var(--bf-bg);content:"";pointer-events:none}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-action-footer{position:static;padding-top:0}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-action-footer:after{display:none}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-body{scroll-padding-bottom:24px}.bf-embedded-amount-head{gap:8px}.bf-embedded-amount-label{gap:6px}.bf-embedded-balance{gap:4px}}
|
|
11
|
-
`);import{Fragment as Vo,jsx as v,jsxs as D}from"react/jsx-runtime";var of=se.createContext(void 0);function Na(){return se.useContext(of)}function dy(e){let[t,r]=se.useState(void 0);return se.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 $u=[{value:"0.1",label:"0.1%"},{value:"0.5",label:"0.5%"},{value:"1",label:"1%"},{value:"5",label:"5%"}],cy=[{value:"all",label:"ALL"},{value:"completed",label:"Completed"},{value:"pending",label:"Pending"}];function py(e,t){return e==="auto"?t?`Auto ${t}%`:"Auto":e?`${e}%`:"1%"}function ef(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 af(e){return`${e.chainId}:${e.address.toLowerCase()}`}function sf(e){let t=Number(e);return Number.isFinite(t)?t.toLocaleString("en-US",{maximumFractionDigits:t>=1?2:6}):e||"0"}function tf(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 uy(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 lf(e,t){if(!t)return!1;let r=at(e),n=at(t.balance);return!r||!n?!1:r.isGreaterThan(n)}function ka(e){if(!e.isFinite()||e.isNaN())return"0";let r=e.decimalPlaces(6,Ju.ROUND_DOWN).toFixed(6).replace(/\.?0+$/,""),[n="0",o]=r.split("."),a=new Ju(n||"0").toFormat(0);return o?`${a}.${o}`:a}function fy(e){return e.length<=14?e:`${e.slice(0,6)}...${e.slice(-6)}`}function my(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 gy(e){let t=at(e);return t?ka(t):e||"0"}function hy(e,t){if(t?.priceUsd===void 0)return null;let r=at(e);if(!r)return null;let n=r.multipliedBy(t.priceUsd);return n.isFinite()?`$${n.toFormat(2)}`:null}function as(e){return e.status==="success"?"completed":e.status==="failed"?"failed":"pending"}function by(e,t){return t==="all"?!0:as(e)===t}function wy(e){return e==="completed"?"Completed":e==="failed"?"Failed":"Pending"}function Ho(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function df(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function cf(e,t){if(!(!e||!t))return e.chainId===t.chainId?"swap":df(e,t)||e.symbol.toLowerCase()===t.symbol.toLowerCase()?"bridge":"swap-bridge"}function pf(e){return e==="swap"||e==="deposit-swap"||e==="swap-withdraw"}function ts(e){return!e||e==="0"||Number(e)===0}function uf(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 ff(e){let t=e.fromToken,r=e.toToken,n=cf(t,r),o=e.fromAmount||"0",a=e.toAmount||"0",i=n!==void 0&&!pf(n),s=n!==void 0&&n!=="bridge";return{pathType:n,bridgeInfo:i?[{label:"Route",value:t&&r?`${Ho(t.chainId)} \u2192 ${Ho(r.chainId)}`:"-"},{label:"Validator Fee",value:ts(o)?"0":"Free",tone:ts(o)?"default":"accent"},{label:"Network Fee",value:ts(o)?"0":"Free",tone:ts(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 Ra({token:e,size:t=20}){let r=e?.iconUrl;return v("span",{className:"bf-token-icon","data-has-image":!!r?"true":"false",style:{width:t,height:t},children:r?v("img",{src:r,alt:"",width:t,height:t,draggable:!1}):v("span",{className:"bf-token-fallback",children:e?.symbol?.slice(0,1)??"?"})})}function rs(e,t){if(e.length===0)return;let r=e.findIndex(n=>df(n,t));return e[(r+1)%e.length]}function rf({label:e,token:t,amount:r,usd:n,onAmountChange:o,onTokenClick:a,locked:i=!1}){return D("section",{className:"bf-amount-panel",children:[D("div",{className:"bf-amount-head",children:[v("span",{children:e}),D("span",{className:"bf-balance",children:[sf(t?.balance??"0")," ",t?.symbol??""]})]}),D("div",{className:"bf-amount-main",children:[D("label",{className:"bf-amount-input-wrap",children:[D("span",{className:"bf-sr-only",children:[e," amount"]}),v("input",{type:"text",inputMode:"decimal",value:r,onChange:s=>o(s.target.value),placeholder:"0",className:"bf-amount-input","data-size":mf(r)}),v("span",{className:"bf-amount-usd",children:n})]}),D("button",{type:"button",className:"bf-token-pill",onClick:i?void 0:a,disabled:!i&&!a,"data-locked":i?"true":void 0,"data-track":i?void 0:"token_switch","data-track-id":e.toLowerCase(),"aria-label":`Switch ${e.toLowerCase()} token`,children:[D("span",{className:"bf-token-pill-face",children:[v(Ra,{token:t}),v("span",{children:t?.symbol??"Select"})]},t?af(t):"none"),!i&&v(Or,{size:16})]})]})]})}function yy(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 mf(e){let t=e.replace(/,/g,"").trim().length;return t>26?"small":t>18?"medium":"large"}function xy(){return D("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[v("path",{d:"M2.333 4.667A1.667 1.667 0 0 1 4 3h7.333A1.667 1.667 0 0 1 13 4.667v6.666A1.667 1.667 0 0 1 11.333 13H4a1.667 1.667 0 0 1-1.667-1.667V4.667Z",stroke:"currentColor",strokeWidth:"1.25"}),v("path",{d:"M2.667 5.333h9.666c.737 0 1.334.597 1.334 1.334v2.666c0 .737-.597 1.334-1.334 1.334H9.667A2.667 2.667 0 0 1 7 8a2.667 2.667 0 0 1 2.667-2.667Z",stroke:"currentColor",strokeWidth:"1.25"}),v("circle",{cx:"10",cy:"8",r:".75",fill:"currentColor"})]})}function nf({label:e,token:t,amount:r,onAmountChange:n,onTokenClick:o,onMax:a,locked:i}){return D("section",{className:"bf-embedded-amount-panel",children:[D("div",{className:"bf-embedded-amount-head",children:[D("span",{className:"bf-embedded-amount-label",children:[v("strong",{children:e}),!(e==="From")&&v("em",{children:"estimated"})]}),t&&D("span",{className:"bf-embedded-balance",children:[v(xy,{}),v("span",{className:"bf-embedded-balance-value",children:sf(t.balance)}),v("span",{children:t.symbol}),a&&v("button",{type:"button",onClick:a,"aria-label":"Use maximum available balance",children:"MAX"})]})]}),D("div",{className:"bf-embedded-amount-main",children:[D("button",{type:"button",className:"bf-embedded-token-pill",onClick:i?void 0:o,disabled:i,"data-locked":i?"true":void 0,"aria-label":`Switch ${e.toLowerCase()} token`,children:[D("span",{className:"bf-token-pill-face",children:[v(Ra,{token:t}),v("span",{children:t?.symbol??"Select"})]},t?af(t):"none"),!i&&v(Or,{size:14})]}),D("label",{className:"bf-embedded-input-wrap",children:[D("span",{className:"bf-sr-only",children:[e," amount"]}),v("input",{type:"text",inputMode:"decimal",value:yy(r),onChange:l=>n(l.target.value),placeholder:"0.00",className:"bf-embedded-amount-input","data-size":mf(r)})]})]})]})}function vy({flow:e,onClose:t}){let r=se.useId(),[n,o]=se.useState(null),a=$u.find(b=>b.value===e.slippage),[i,s]=se.useState(e.slippage&&!a?e.slippage:""),l=i.trim()!==""&&i.trim()!==".",d=l?Number(i):NaN,c=Number.isFinite(d)&&d>50,h=Number.isFinite(d)&&d>5&&!c,u=b=>{e.setSlippage(b),t()},m=()=>{!l||c||(e.setSlippage(ef(i)),t())};if(se.useEffect(()=>{o(document.body)},[]),se.useEffect(()=>{let b=f=>{f.key==="Escape"&&t()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[t]),!n)return null;let y=Na();return Ca(v("div",{className:"bf-slippage-overlay","data-theme":y,role:"presentation",onMouseDown:b=>{b.target===b.currentTarget&&t()},children:D("section",{className:"bf-slippage-dialog",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[D("header",{className:"bf-slippage-head",children:[v("h3",{id:r,children:"Slippage Settings"}),v("button",{type:"button",className:"bf-slippage-close",onClick:t,"aria-label":"Close slippage settings",children:v(Ir,{size:24})})]}),D("div",{className:"bf-slippage-body",children:[v("p",{className:"bf-slippage-desc",children:"The maximum price difference you are willing to accept before the transaction is reverted. Higher slippage increases the chance of execution but may result in a worse price."}),D("div",{className:"bf-slippage-controls",children:[v("div",{className:"bf-slippage-presets",children:$u.map(b=>v("button",{type:"button",className:"bf-slippage-preset","data-selected":!l&&e.slippage===b.value?"true":"false",onClick:()=>u(b.value),children:b.label},b.value))}),D("label",{className:"bf-slippage-custom","data-selected":l?"true":"false",children:[v("span",{className:"bf-sr-only",children:"Custom slippage percent"}),v("input",{value:i,onChange:b=>{s(ef(b.target.value))},onKeyDown:b=>{b.key==="Enter"&&(b.preventDefault(),m())},inputMode:"decimal",placeholder:"Enter custom slippage",autoComplete:"off",spellCheck:!1}),v("span",{"aria-hidden":"true",children:"%"})]})]}),c?v("p",{className:"bf-slippage-message","data-variant":"error",children:"Slippage cannot exceed 50%."}):h?v("p",{className:"bf-slippage-message","data-variant":"warning",children:"Your transaction may be frontrun due to high slippage."}):null,l&&v("button",{type:"button",className:"bf-slippage-apply",onClick:m,disabled:c,children:"Apply"})]})]})}),n)}function gf({flow:e,env:t}){let r=se.useId(),[n,o]=se.useState(!1),[a,i]=se.useState(null),s=Na(),l=rr("apps.json",t,u=>Pr(u?.legal?.termsUrl,t)),d=e.termsUrl??l??Nc;se.useEffect(()=>{i(document.body)},[]),se.useEffect(()=>{let u=m=>{m.key==="Escape"&&e.cancelTerms()};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e]);let[c,h]=Ji(e.termsOpen);return!a||!c?null:Ca(v("div",{className:"bf-action-modal-overlay","data-theme":s,"data-state":h,role:"presentation",onPointerDown:u=>{u.target===u.currentTarget&&e.cancelTerms()},children:D("section",{className:"bf-action-modal bf-terms-modal",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[v("h3",{id:r,children:"Agree to Terms of Service"}),v("p",{className:"bf-action-modal-desc",children:"Please make sure to review the Terms of Service before using ONEUSD."}),D("div",{className:"bf-terms-check-row","data-checked":n?"true":"false",children:[v("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(u=>!u),children:v("span",{className:"bf-terms-checkbox","data-checked":n?"true":"false","aria-hidden":"true"})}),D("div",{className:"bf-terms-copy",children:[v("span",{className:"bf-terms-label",onClick:()=>o(u=>!u),children:"Agree to Terms of Use"}),d&&v("a",{href:d,target:"_blank",rel:"noreferrer",children:"Terms of Service"})]})]}),v("p",{className:"bf-terms-privacy",children:"I have read and acknowledged the Privacy Policy to use ONEUSD"}),v("button",{type:"button",className:"bf-action-primary",disabled:!n||e.status==="submitting",onClick:e.confirmTerms,"data-track":"terms_confirm",children:"Confirm"})]})}),a)}function ky({value:e,disabled:t=!1}){let[r,n]=se.useState(!1);return v("button",{type:"button",className:"bf-copy-button","aria-label":"Copy token address",disabled:t,onClick:()=>{t||navigator.clipboard?.writeText(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1200)})},children:r?"OK":"Copy"})}function hf({flow:e,approval:t}){let r=se.useId(),[n,o]=se.useState(null),a=Na();se.useEffect(()=>{o(document.body)},[]),se.useEffect(()=>{if(!t)return;let c=h=>{e.status!=="submitting"&&h.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[e,t]);let[i,s]=Ji(t);if(!n||!i)return null;let l=e.status==="submitting"||!e.approveBridge,d=e.status==="submitting";return Ca(v("div",{className:"bf-action-modal-overlay","data-theme":a,"data-state":s,role:"presentation",children:D("section",{className:"bf-action-modal bf-approve-modal",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[D("h3",{id:r,children:["Approve ",i.token.symbol]}),v(Ra,{token:i.token,size:72}),D("div",{className:"bf-approve-address-box",children:[v("span",{children:"Token Address"}),D("div",{children:[v("strong",{children:i.tokenAddress}),v(ky,{value:i.tokenAddress,disabled:d})]})]}),D("div",{className:"bf-action-buttons",children:[v("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:e.status==="submitting",children:"Cancel"}),D("button",{type:"button",className:"bf-action-primary",onClick:e.confirmApproval,disabled:l,"aria-busy":d,"data-track":"approve_confirm",children:[d&&v("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),v("span",{children:d?"Approving...":"Approve"})]})]})]})}),n)}function bf({flow:e}){let t=se.useId(),[r,n]=se.useState(null),o=Na();se.useEffect(()=>{n(document.body)},[]),se.useEffect(()=>{if(!e.approvalSuccessOpen)return;let l=d=>{d.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[e]);let[a,i]=Ji(e.approvalSuccessOpen);if(!r||!a)return null;let s=e.status==="submitting";return Ca(v("div",{className:"bf-action-modal-overlay","data-theme":o,"data-state":i,role:"presentation",children:D("section",{className:"bf-action-modal bf-approval-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:[v("h3",{id:t,children:"Approval Success"}),v("span",{className:"bf-success-mark","aria-hidden":"true"}),D("p",{className:"bf-action-modal-desc",children:["Token approval confirmed successfully.",v("br",{}),"Please continue to the next step."]}),D("div",{className:"bf-action-buttons",children:[v("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:s,children:"Cancel"}),D("button",{type:"button",className:"bf-action-primary",onClick:e.continueAfterApproval,disabled:s,"aria-busy":s,children:[s&&v("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),v("span",{children:s?"Continuing...":"Continue"})]})]})]})}),r)}function Ry({fromAmount:e,toAmount:t,fromToken:r,toToken:n}){let o=se.useMemo(()=>{let i=at(e),s=at(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 v(va,{open:a,children:D("div",{className:"bf-exchange-rate",children:[D("span",{children:["1 ",r?.symbol]}),v("span",{"aria-hidden":"true",children:"="}),D("span",{children:[o?ka(o):""," ",n?.symbol]})]})})}function wf({flow:e}){return e.submitToast?D("div",{className:"bf-status-toast","data-variant":"processing",role:"status","aria-live":"polite",children:[v("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:v("span",{className:"bf-status-spinner"})}),D("span",{className:"bf-status-toast-copy",children:[v("strong",{children:"Transaction Processing"}),v("span",{children:"Your transaction is being processed on the blockchain"})]})]}):null}function yf({message:e}){let[t,r]=se.useState(!1);return se.useEffect(()=>{if(!e){r(!1);return}r(!0);let n=window.setTimeout(()=>{r(!1)},3500);return()=>window.clearTimeout(n)},[e]),!e||!t?null:D("div",{className:"bf-status-toast","data-variant":"error",role:"alert","aria-live":"assertive",children:[v("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:v("span",{className:"bf-status-error-mark",children:"!"})}),D("span",{className:"bf-status-toast-copy",children:[v("strong",{children:"Error"}),v("span",{children:e})]})]})}function Sy(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 xf({flow:e}){let t=se.useId(),[r,n]=se.useState(null),o=e.submitted,a=Na();return se.useEffect(()=>{n(document.body)},[]),se.useEffect(()=>{if(!e.successDialogOpen)return;let i=s=>{s.key==="Escape"&&e.dismissSuccessDialog()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[e]),!r||!e.successDialogOpen||!o?null:Ca(v("div",{className:"bf-success-overlay","data-theme":a,role:"presentation",children:v("section",{className:"bf-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:D("div",{className:"bf-success-body",children:[v("span",{className:"bf-success-mark","aria-hidden":"true"}),D("div",{className:"bf-success-copy",children:[v("strong",{id:t,children:Sy(o.pathType)}),v("span",{children:"Please check the results in the history."})]}),v("div",{className:"bf-success-route","aria-hidden":"true",children:(o.routeTokens&&o.routeTokens.length>0?o.routeTokens:[{symbol:o.fromToken.symbol,iconUrl:o.fromToken.iconUrl},{symbol:o.toToken.symbol,iconUrl:o.toToken.iconUrl}]).map((i,s)=>D(se.Fragment,{children:[s>0&&v("span",{className:"bf-success-route-arrow",children:"\u2192"}),v(Sa,{token:i,size:43})]},`${i.symbol}-${s}`))}),v("button",{type:"button",className:"bf-success-ok",onClick:e.dismissSuccessDialog,"data-track":"success_ok",children:"OK"})]})})}),r)}function Sa({token:e,size:t=16}){let r=!!e.iconUrl;return v("span",{className:"bf-token-icon","data-has-image":r?"true":"false",style:{width:t,height:t},children:e.iconUrl?v("img",{src:e.iconUrl,alt:"",width:t,height:t,draggable:!1}):v("span",{className:"bf-token-fallback",children:e.symbol?.slice(0,1)??"?"})})}function Cy({row:e}){return e.routeTokens&&e.routeTokens.length>0?v("span",{className:"bf-info-route",children:e.routeTokens.map((t,r)=>D(se.Fragment,{children:[r>0&&v("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),v(Sa,{token:t})]},`${t.symbol}-${r}`))}):e.valueToken?D("span",{className:"bf-info-value-token",children:[v(Sa,{token:e.valueToken}),v("span",{children:e.value})]}):v(Vo,{children:e.value})}function vf({rows:e}){return!e||e.length===0?null:v("div",{className:"bf-info-rows",children:e.map(t=>D("div",{className:"bf-info-row",children:[v("span",{className:"bf-info-label",children:t.label}),v("span",{className:"bf-info-value","data-tone":t.tone??"default",children:v(Cy,{row:t})})]},`${t.label}-${t.value}`))})}function Ny(e,t,r){return e.pathType==="bridge"?"Bridge Info":pf(e.pathType)?"Swap Info":t&&r?"Swap & Bridge Info":t?"Bridge Info":"Swap Info"}function va({open:e,className:t,children:r}){let n=se.useRef(null);return e&&(n.current=r),v("div",{className:t?`bf-collapse ${t}`:"bf-collapse","data-open":e?"true":"false","aria-hidden":e?void 0:!0,children:v("div",{className:"bf-collapse-inner",children:e?r:n.current})})}function Ty({summary:e,from:t,to:r,feeDelegated:n}){let o=!!e.bridgeInfo?.length,a=!!e.swapInfo?.length,i=!!e.txFee?.length,s=Ny(e,o,a),[l,d]=se.useState(!0),[c,h]=se.useState(!0);return D("div",{className:"bf-details",children:[e.liquidity&&D("section",{className:"bf-liquidity",children:[D("div",{className:"bf-liquidity-head",children:[v("span",{children:e.liquidity.label??"Available Liquidity"}),v("span",{className:"bf-liquidity-status","data-status":e.liquidity.status,children:e.liquidity.status??"Normal"})]}),v("div",{className:"bf-liquidity-track",children:v("span",{style:{width:`${e.liquidity.percentage??50}%`}})})]}),(o||a)&&D("section",{className:"bf-detail-section bf-info-card","data-open":l?"true":"false",children:[D("button",{type:"button",className:"bf-collapse-head","aria-expanded":l,onClick:()=>d(u=>!u),"data-track":"details_toggle",children:[v("h3",{children:s}),v(Or,{size:16,className:"bf-collapse-chevron"})]}),l&&v("div",{className:"bf-collapse-body",children:v(Sf,{summary:e,from:t,to:r,feeDelegated:n})})]}),i&&D("section",{className:"bf-detail-section bf-tx-fee-section","data-open":c?"true":"false",children:[D("button",{type:"button",className:"bf-collapse-head bf-tx-fee-head","aria-expanded":c,onClick:()=>h(u=>!u),"data-track":"details_toggle",children:[v("h3",{children:"Est. Tx Fee"}),D("div",{className:"bf-tx-fee-total",children:[e.txFeeInfo?.isDelegateFee&&v("span",{className:"bf-fee-delegated",children:"Fee Delegated"}),e.txFeeInfo?.tokenIconUrl&&v("img",{className:"bf-tx-fee-token",src:e.txFeeInfo.tokenIconUrl,alt:e.txFeeInfo.tokenSymbol??"",width:16,height:16,draggable:!1}),v("span",{"data-delegated":e.txFeeInfo?.isDelegateFee&&Number(e.txFeeInfo?.estTxFee)>0?"true":void 0,children:uy(e.txFeeInfo?.estTxFee??"0")}),v(Or,{size:16,className:"bf-collapse-chevron"})]})]}),c&&v("div",{className:"bf-collapse-body",children:v(vf,{rows:e.txFee})})]})]})}function Iy(e){return{...e,bridgeInfo:e.bridgeInfo?.map(t=>({...t,value:t.label==="Route"?t.value.replace(/\bCROSS\b/g,"ONEchain"):t.value})),swapInfo:e.swapInfo?.map(t=>({...t,label:t.label.startsWith("Swap Fee")?"Est. Swap Fee":t.label}))}}function ns(e){let t=at(e);if(!(!t||t.lte(0)))return ka(t)}function Ey(e,t,r,n){if(!r||!n)return;let o=at(e),a=at(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} = ${ka(i)} ${n.symbol}`;let s=o.dividedBy(a);return`1 ${n.symbol} = ${ka(s)} ${r.symbol}`}var My=1,Ay=5;function kf(e){return at(e)?.toNumber()??null}function Rf(e){let t=kf(e);if(t!==null){if(t>=Ay)return"danger";if(t>=My)return"warning"}}var Ly=/\bin\b.*amount|amount.*\bin\b|^from\b/i,Dy=/\bout\b.*amount|amount.*\bout\b|^to\b|receive/i,Py=/fee/i,Oy=/impact|rate|slippage|minimum|min\.|received/i,os=/impact/i,By=/^route$/i;function zy(e,t,r){let n=e.find(c=>Ly.test(c.label)),o=e.find(c=>Dy.test(c.label)),a=new Set;n&&a.add(n),o&&a.add(o);let i=e.find(c=>By.test(c.label)||(c.routeTokens?.length??0)>0),s=i?.routeTokens?.length?i.routeTokens:void 0,l=i&&!s?i.value:void 0;i&&a.add(i);let d=[];for(let c of e){if(a.has(c))continue;let h=Py.test(c.label);if(!h&&!Oy.test(c.label))continue;a.add(c);let u=kf(c.value),m=h&&(u===0||/^\s*free\s*$/i.test(String(c.value??"")));m&&t==="swap"||d.push({text:m?`${c.label} Free`:`${c.label} ${c.value}`,tone:m?"accent":os.test(c.label)?c.tone==="danger"||c.tone==="warning"?c.tone:Rf(c.value):void 0})}return{key:t,label:r,routeText:l,routeTokens:s,inRow:n,outRow:o,meta:d,rest:e.filter(c=>!a.has(c))}}function Fy({steps:e}){return v("div",{className:"bf-route-steps",children:e.map((t,r)=>D("div",{className:"bf-route-step","data-last":r===e.length-1?"true":"false","data-kind":t.key.startsWith("hop-")?"hop":"endpoint",children:[D("span",{className:"bf-route-rail","aria-hidden":"true",children:[v("span",{className:"bf-route-line"}),v("span",{className:"bf-route-dot","data-final":r===e.length-1?"true":"false"})]}),D("span",{className:"bf-route-body",children:[D("span",{className:"bf-route-head",children:[v("span",{className:"bf-route-title",children:t.title}),v("span",{className:"bf-route-amount",children:t.routeTokens?.length?t.routeTokens.map((n,o)=>D(se.Fragment,{children:[o>0&&v("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),v(Sa,{token:n})]},`${n.symbol}-${o}`)):D(Vo,{children:[t.amountToken&&v(Sa,{token:t.amountToken}),v("span",{className:"bf-route-amount-value",children:t.amount},t.amount)]})})]}),(t.meta.length>0||t.tags.length>0)&&D("span",{className:"bf-route-meta",children:[t.meta.map(n=>v("span",{"data-tone":n.tone??"default",children:n.text},n.text)),t.tags.map(n=>v("span",{className:"bf-route-tag",children:n},n))]})]})]},t.key))})}function Uy(e){if(!os.test(e.label)||e.tone==="danger"||e.tone==="warning")return e;let t=Rf(e.value);return t?{...e,tone:t}:e}function Sf({summary:e,rateLine:t,from:r,to:n,feeDelegated:o,includeTxFee:a=!1}){let i=!!e.txFeeInfo?.isDelegateFee||!!o,s=se.useMemo(()=>(e.pathType==="bridge-swap"?[["bridge","Bridge"],["swap","Swap"]]:[["swap","Swap"],["bridge","Bridge"]]).map(([k,R])=>{let E=k==="swap"?e.swapInfo:e.bridgeInfo;return E?.length?zy(E,k,R):null}).filter(k=>k!==null),[e]);if(s.length===0)return null;let l=s[0],d=s[s.length-1],c=l.inRow?.valueToken??(r?.symbol?{symbol:r.symbol,iconUrl:r.iconUrl}:void 0),h=l.inRow?.value??r?.amount,u=d.outRow?.valueToken??(n?.symbol?{symbol:n.symbol,iconUrl:n.iconUrl}:void 0),m=d.outRow?.value??n?.amount;if(!h)return null;let y=e.txFeeInfo,b=a&&y&&!y.isDelegateFee?[{text:`Gas ${y.estTxFee}${y.tokenSymbol?` ${y.tokenSymbol}`:""}`}]:[],f=s.length>1,p=[{key:"send",title:`Send ${c?.symbol??""}`.trim(),amount:h,amountToken:c,routeTokens:f?void 0:l.routeTokens,meta:[...b.length?[{text:"EST."}]:r?.chain?[{text:`on ${r.chain}`}]:[],...b,...f?[]:[...l.routeText?[{text:l.routeText}]:[],...l.meta.filter(x=>!os.test(x.text))]],tags:i&&!f?["Fee delegated"]:[]},...f?s.map(x=>({key:`hop-${x.key}`,title:x.label,amount:x.routeText??"",routeTokens:x.routeTokens,meta:x.meta,tags:i&&x.key==="swap"?["Fee delegated"]:[]})):[],{key:"receive",title:`Receive ${u?.symbol??""}`.trim(),amount:m??"\u2014",amountToken:u,meta:[...n?.chain?[{text:`on ${n.chain}`}]:[],...f?[]:l.meta.filter(x=>os.test(x.text))],tags:[]}],w=[...s.flatMap(x=>x.rest),...a?e.txFee??[]:[]].map(Uy),g=!!t;return D(Vo,{children:[v(Fy,{steps:p}),(w.length>0||g)&&v("div",{className:"bf-info-section",children:v(vf,{rows:[...g?[{label:"Rate",value:t}]:[],...w]})})]})}function jy({summary:e,rateLine:t,from:r,to:n,feeDelegated:o}){let a=se.useMemo(()=>Iy(e),[e]);return!a.bridgeInfo?.length&&!a.swapInfo?.length?null:v("div",{className:"bf-embedded-details",children:v(Sf,{summary:a,rateLine:t,from:r,to:n,feeDelegated:o,includeTxFee:!0})})}function Wy({flow:e,env:t,toastError:r}){return D(Vo,{children:[v(gf,{flow:e,env:t}),v(hf,{flow:e,approval:e.approvalInfo??null}),v(bf,{flow:e}),v(wf,{flow:e}),v(yf,{message:e.submitToast?"":r}),v(xf,{flow:e})]})}function _y({flow:e,env:t,isConnected:r,onRequestConnect:n,feeDelegated:o}){let a=Number(e.fromAmount)>0,i=se.useMemo(()=>a?e.summary??ff(e):null,[a,e]),s=uf(e.quoteError),l=lf(e.fromAmount,e.fromToken),d=l?"Insufficient balance":s.from,c=/insufficient liquidity|not enough liquidity/i.test(e.quoteError),h=c?void 0:s.to,u=e.quoteError&&!s.from&&!s.to?e.quoteError:"",m=e.error||u,y=e.status==="submitting",b=!a||!e.toAmount||!e.fromToken||!e.toToken||!e.canSubmit||!!e.quoteError||l||y,f=y?"":c&&a?"Insufficient Liquidity":a?"Continue":"Enter Amount";return D(Vo,{children:[v("main",{className:"bf-body bf-embedded-body","data-rd-scroll-area":!0,children:D("div",{className:"bf-embedded-form",children:[D("div",{className:"bf-embedded-fields",children:[D("div",{className:"bf-embedded-field-group",children:[v(nf,{label:"From",token:e.fromToken,amount:e.fromAmount,onAmountChange:p=>e.setAmount(p,"from"),onTokenClick:()=>{let p=rs(e.tokens,e.fromToken);p&&e.selectFromToken(p)},onMax:e.setMax,locked:e.tokens.length<=1}),d&&v("div",{className:"bf-embedded-field-error",children:d})]}),v("div",{className:"bf-embedded-direction","aria-hidden":"true",children:v("span",{children:v(_l,{size:16})})}),D("div",{className:"bf-embedded-field-group",children:[v(nf,{label:"To",token:e.toToken,amount:e.toAmount,onAmountChange:p=>e.setAmount(p,"to"),onTokenClick:()=>{let p=rs(e.availableToTokens,e.toToken);p&&e.selectToToken(p)},locked:e.availableToTokens.length<=1}),h&&v("div",{className:"bf-embedded-field-error",children:h})]})]}),v(va,{open:!!i?.liquidity,children:i?.liquidity&&D("section",{className:"bf-embedded-liquidity",children:[D("div",{children:[v("span",{children:i.liquidity.label??"Available Liquidity"}),v("span",{"data-status":i.liquidity.status,children:i.liquidity.status??"normal"})]}),v("span",{className:"bf-embedded-liquidity-track",children:v("span",{style:{width:`${i.liquidity.percentage??50}%`}})})]})}),v(va,{open:c&&a,children:v("div",{className:"bf-embedded-liquidity-error",role:"alert",children:"Insufficient liquidity in all pools for this pair and amount."})}),v(va,{open:!!i,children:i&&v("div",{className:"bf-embedded-summary",children:v(jy,{summary:i,feeDelegated:o,rateLine:Ey(e.fromAmount,e.toAmount,e.fromToken,e.toToken),from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:ns(e.fromAmount),chain:e.fromToken?Ho(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:ns(e.toAmount),chain:e.toToken?Ho(e.toToken.chainId):void 0}})})}),v("div",{className:"bf-embedded-action-footer",children:r?v("button",{type:"button",className:"bf-embedded-cta",onClick:e.submit,"data-track":"next",disabled:b,"aria-busy":y,"aria-label":y?"Processing transaction":c?"Insufficient liquidity":"Continue with swap or bridge",children:y?v("span",{className:"bf-embedded-spinner","aria-hidden":"true"}):f}):v("button",{type:"button",className:"bf-embedded-cta",onClick:n,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})})]})}),v(Wy,{flow:e,env:t,toastError:m})]})}function Gy({item:e}){let t=as(e),r=hy(e.fromAmount,e.fromToken);return D("article",{className:"bf-history-item",children:[D("div",{className:"bf-history-item-head",children:[v("span",{className:"bf-history-status","data-status":t,children:wy(t)}),v("time",{className:"bf-history-time",dateTime:e.timestamp,children:my(e.timestamp)})]}),D("div",{className:"bf-history-item-body",children:[D("strong",{className:"bf-history-amount",children:[gy(e.fromAmount)," ",e.fromToken.symbol]}),D("div",{className:"bf-history-meta",children:[v("span",{className:"bf-history-usd",children:r??fy(e.txHash)}),D("span",{className:"bf-history-route",children:[D("span",{className:"bf-history-route-token",children:[v(Ra,{token:e.fromToken,size:16}),v("span",{children:e.fromToken.symbol})]}),v(_u,{size:16,className:"bf-history-route-arrow"}),D("span",{className:"bf-history-route-token",children:[v(Ra,{token:e.toToken,size:16}),v("span",{children:e.toToken.symbol})]})]})]})]})]})}function Hy({flow:e}){let[t,r]=se.useState("all"),n=e.history.some(i=>as(i)==="pending"),o=e.history.filter(i=>by(i,t)),a=t==="all"?"No bridge history yet.":`No ${t} bridge history.`;return D("main",{className:"bf-history-body",children:[v("nav",{className:"bf-history-tabs","aria-label":"Bridge history filters",children:cy.map(i=>D("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:[v("span",{children:i.label}),i.value==="pending"&&n&&v("span",{className:"bf-history-tab-dot","aria-hidden":"true"})]},i.value))}),o.length>0?v("div",{className:"bf-history-list",children:o.map(i=>v(Gy,{item:i},i.id||i.txHash))}):v("div",{className:"bf-empty",children:a})]})}function Qy({flow:e,env:t,feeDelegated:r}){let[n,o]=se.useState(!1),[a,i]=se.useState(0),s=!!(e.fromAmount.trim()||e.toAmount.trim()),l=se.useMemo(()=>s?e.summary??ff(e):null,[s,e]),d=rr("apps.json",t,w=>Pr(w?.bridgePoweredBy?.url,t)),c=uf(e.quoteError),h=lf(e.fromAmount,e.fromToken),u=h?"Insufficient balance":c.from,m=e.quoteError&&!c.from&&!c.to?e.quoteError:"",y=e.error||m,b=e.history.some(w=>as(w)==="pending"),p=(l?.pathType??cf(e.fromToken,e.toToken))!=="bridge";return D(Vo,{children:[D("main",{className:"bf-body",children:[D("div",{className:"bf-toolbar",children:[D("button",{type:"button",className:"bf-chip bf-chip-history",onClick:()=>e.setStep("history"),"data-track":"history_open",children:[v(ju,{}),v("span",{children:"History"}),(b||e.hasNewHistory)&&v("span",{className:"bf-chip-dot","aria-hidden":"true"})]}),p&&D("button",{type:"button",className:"bf-chip",onClick:()=>o(!0),"data-track":"slippage_open",disabled:e.slippageLocked,"aria-haspopup":"dialog","aria-expanded":n,children:[v(Wu,{}),v("span",{children:e.slippageLocked?"Auto 1%":py(e.slippage,e.effectiveSlippage)})]})]}),D("div",{className:"bf-swap-card","data-has-from-error":u?"true":"false",children:[v(rf,{label:"From",token:e.fromToken,amount:e.fromAmount,usd:tf(e.fromAmount,e.fromToken),onAmountChange:w=>e.setAmount(w,"from"),onTokenClick:()=>{let w=rs(e.tokens,e.fromToken);w&&e.selectFromToken(w)},locked:e.tokens.length<=1}),u&&v("div",{className:"bf-field-error",children:u}),v("button",{type:"button",className:"bf-swap-toggle",onClick:()=>{e.swapTokens(),i(w=>w+360)},"data-track":"token_swap",style:{transform:`translateX(-50%) rotate(${a}deg)`,transition:"transform 0.2s ease"},children:v(_l,{size:22})}),v(rf,{label:"To",token:e.toToken,amount:e.toAmount,usd:tf(e.toAmount,e.toToken),onAmountChange:w=>e.setAmount(w,"to"),onTokenClick:()=>{let w=rs(e.availableToTokens,e.toToken);w&&e.selectToToken(w)},locked:e.availableToTokens.length<=1}),c.to&&v("div",{className:"bf-field-error",children:c.to})]}),v(Ry,{fromAmount:e.fromAmount,toAmount:e.toAmount,fromToken:e.fromToken,toToken:e.toToken}),v(va,{open:!!l,children:l&&v(Ty,{summary:l,feeDelegated:r,from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:ns(e.fromAmount),chain:e.fromToken?Ho(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:ns(e.toAmount),chain:e.toToken?Ho(e.toToken.chainId):void 0}})})]}),D("footer",{className:"bf-footer",children:[v("button",{type:"button",className:"bf-next",onClick:e.submit,"data-track":"next",disabled:e.status==="submitting"||!!e.quoteError||h,children:e.status==="submitting"?"Processing...":"Next"}),d&&D("a",{className:"bf-powered",href:d,target:"_blank",rel:"noreferrer",children:["Powered by ",v("span",{className:"bf-powered-brand",children:"CROSS DeFi"})]})]}),n&&v(vy,{flow:e,onClose:()=>o(!1)}),v(gf,{flow:e,env:t}),v(hf,{flow:e,approval:e.approvalInfo??null}),v(bf,{flow:e}),v(wf,{flow:e}),v(yf,{message:e.submitToast?"":y}),v(xf,{flow:e})]})}function Qo({onClose:e,onBackToWallet:t,feeDelegated:r,env:n,variant:o="default",title:a,isConnected:i,onRequestConnect:s,className:l,...d}){let c=se.useMemo(()=>nt(n),[n]),h=Uu(),u=Xu({...d,onExit:t}),m=se.useRef(null),y=dy(m),b=u.step==="history"?"History":a??"Swap & Bridge",f=i??!!d.walletAddress,p=o==="embedded"&&u.step==="form"&&!t?null:u.back;return v(ye,{feature:"bridge",children:v(of.Provider,{value:y,children:D("div",{ref:m,className:ve("bf-root",l),"data-view":u.step,"data-status":u.status,"data-variant":o,"data-soft-keyboard-open":o==="embedded"&&h?"true":"false",children:[D("header",{className:"bf-header",children:[p?v("button",{type:"button",className:"bf-header-btn",onClick:p,"aria-label":"Back",children:v(tn,{size:24})}):v("span",{className:"bf-header-spacer","aria-hidden":"true"}),v("span",{className:"bf-header-title","data-clickable":p?"true":"false",onClick:p??void 0,children:b}),v("button",{type:"button",className:"bf-header-btn",onClick:e,"aria-label":"Close",children:v(Ir,{size:24})})]}),u.step==="history"?v(Hy,{flow:u}):o==="embedded"?v(_y,{flow:u,env:c,isConnected:f,onRequestConnect:s,feeDelegated:r}):v(Qy,{flow:u,env:c,feeDelegated:r})]})})})}import*as ar from"react";import lx from"bignumber.js";import{useInfiniteQuery as Vy}from"@tanstack/react-query";var qy="token-history";function Cf(e,t,r,n,o=!0){return Vy({queryKey:[qy,e,t,r.toLowerCase(),n.toLowerCase()],initialPageParam:void 0,queryFn:async({pageParam:a,signal:i})=>{let s=await Me("walletServer",e),l=new URLSearchParams({chain_id:String(t),token:r,wallet:n}),d=a;d&&(l.set("last_timestamp",String(d.last_timestamp)),l.set("last_log_index",String(d.last_log_index)),l.set("last_tx_index",String(d.last_tx_index)));let c=await fetch(`${s}/v1/public/token/historical?${l}`,{cache:"no-store",signal:i});if(!c.ok)throw new Error(`Failed to fetch token history: ${c.status}`);let h=await c.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&&!!n&&!!r&&t>0,staleTime:1e4})}import*as is from"react";var Ql={chart:!1,balance:!0,overview:!1,social:!1,history:!0},Yy=Object.keys(Ql),Ky="apps.json";function Nf(e){let[t,r]=is.useState({visibility:Ql,isLoaded:!1});return is.useEffect(()=>{let n=!0;return io(Ky,e).then(o=>{if(!n)return;let a=o?.tokenDetail?.sections,i={...Ql};if(a)for(let s of Yy){let l=a[s];typeof l=="boolean"&&(i[s]=l)}r({visibility:i,isLoaded:!0})}),()=>{n=!1}},[e]),t}import*as mr from"react";import{useQuery as Zy,keepPreviousData as Xy}from"@tanstack/react-query";var Jy="token-price-history";function Tf(e,t,r,n,o=!0){return Zy({queryKey:[Jy,e,t,r.toLowerCase(),n],queryFn:async({signal:a})=>{let i=await Me("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:Xy})}import{Fragment as sx,jsx as Xt,jsxs as qo}from"react/jsx-runtime";var $y="var(--ds-system-green-high, #00a869)",ex="var(--wi-error, #e70077)",xo=150,ss=3,Vl=18,tx=18,rx=[{key:"10m",label:"10m"},{key:"1h",label:"1H"},{key:"1d",label:"1D"},{key:"7d",label:"1W"},{key:"30d",label:"1M"},{key:"1y",label:"1Y"}],nx=new Set(["7d","30d","1y"]);function ox(){let e=mr.useRef(null),[t,r]=mr.useState(0);return mr.useEffect(()=>{let n=e.current;if(!n)return;let o=new ResizeObserver(a=>{r(a[0]?.contentRect.width??0)});return o.observe(n),r(n.clientWidth),()=>o.disconnect()},[]),[e,t]}function ax(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 ix(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-ss*2),c=xo-Vl-tx,h=w=>n===1?t/2:ss+w/(n-1)*d,u=w=>Vl+(1-(w-a)/l)*c,m=r.map((w,g)=>({x:h(g),y:u(w)})),y=m.map((w,g)=>`${g===0?"M":"L"}${w.x.toFixed(2)},${w.y.toFixed(2)}`).join(" "),b=m[0],f=m[m.length-1],p=`${y} L${f.x.toFixed(2)},${xo} L${b.x.toFixed(2)},${xo} Z`;return{values:r,points:m,linePath:y,areaPath:p,maxIdx:i,minIdx:s}}function If({env:e,chainId:t,tokenAddress:r}){let[n,o]=mr.useState("1d"),[a,i]=mr.useState(null),s=mr.useId(),[l,d]=ox(),{data:c,isLoading:h,isError:u}=Tf(e,t,r,n,!0),m=mr.useMemo(()=>(c??[]).filter(F=>Number.isFinite(Number(F.price))).slice().sort((F,ne)=>F.updated_at-ne.updated_at),[c]),y=mr.useMemo(()=>m.map(A=>Number(A.price)),[m]),b=mr.useMemo(()=>ix(y,d),[y,d]);mr.useEffect(()=>{i(null)},[n]);let f=m.length>0,p=a!==null&&a<y.length?a:y.length-1,w=f?y[p]:0,g=f?y[0]:0,x=g!==0?(w-g)/g*100:0,k=x>=0,R=k?$y:ex,E=(k?"+":"-")+(Math.floor(Math.abs(x)*100)/100).toFixed(2)+"%",S=a!==null&&m[a]?ax(m[a].updated_at,nx.has(n)):"",C=A=>{if(!b||d<=0)return;let F=A.currentTarget.getBoundingClientRect(),ne=A.clientX-F.left;if(b.values.length<=1){i(0);return}let _=Math.max(1,d-ss*2),G=Math.min(1,Math.max(0,(ne-ss)/_)),oe=Math.round(G*(m.length-1));i(Math.min(m.length-1,Math.max(0,oe)))},I=()=>i(null);if(!h&&(u||!f))return null;let M=a!==null&&b&&b.points[a]?b.points[a]:null,B=b?.points[b.maxIdx],L=b?.points[b.minIdx],z=A=>Math.min(Math.max(A,24),Math.max(24,d-24));return qo("section",{className:"wi-td-chart",children:[qo("div",{className:"wi-td-chart-panel",children:[Xt("span",{className:"wi-td-chart-price",children:f?fo(w):"\u2014"}),f&&qo("span",{className:"wi-td-chart-change","data-positive":k,children:[Xt("span",{children:E}),S&&Xt("span",{className:"wi-td-chart-when",children:S})]})]}),Xt("div",{ref:l,className:"wi-td-chart-plot",children:h&&!f?Xt("div",{className:"wi-skeleton-block wi-td-chart-skeleton"}):b&&d>0&&qo("svg",{className:"wi-td-chart-svg",width:d,height:xo,role:"img","aria-label":"Price chart",children:[Xt("defs",{children:qo("linearGradient",{id:s,x1:"0",y1:"0",x2:"0",y2:"1",children:[Xt("stop",{offset:"0%",stopColor:R,stopOpacity:.28}),Xt("stop",{offset:"100%",stopColor:R,stopOpacity:0})]})}),Xt("path",{d:b.areaPath,fill:`url(#${s})`}),Xt("path",{d:b.linePath,fill:"none",stroke:R,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),B&&Xt("text",{className:"wi-td-chart-minmax",x:z(B.x),y:Math.max(11,B.y-7),textAnchor:"middle",children:fo(b.values[b.maxIdx])}),L&&b.minIdx!==b.maxIdx&&Xt("text",{className:"wi-td-chart-minmax",x:z(L.x),y:Math.min(xo-5,L.y+14),textAnchor:"middle",children:fo(b.values[b.minIdx])}),M&&qo(sx,{children:[Xt("line",{className:"wi-td-chart-cursor",x1:M.x,y1:Vl-6,x2:M.x,y2:xo}),Xt("circle",{cx:M.x,cy:M.y,r:4,fill:R,stroke:"var(--wi-surface-bg, #121212)",strokeWidth:2})]}),Xt("rect",{x:0,y:0,width:d,height:xo,fill:"transparent",style:{touchAction:"none"},onPointerMove:C,onPointerDown:C,onPointerLeave:I,onPointerCancel:I})]})}),Xt("div",{className:"wi-td-chart-tabs",role:"tablist",children:rx.map(A=>Xt("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))})]})}import{Fragment as Af,jsx as Y,jsxs as it}from"react/jsx-runtime";var dx="https://contents.crosstoken.io/wallet/token/images/FT.png",cx={receive:"Receive",send:"Send","bridge-in":"Bridge In","bridge-out":"Bridge Out"};function px(e){return e.length>24?"xs":e.length>18?"sm":"md"}function ux(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 Ef(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 Mf(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 fx(e,t,r){let n=ar.useRef(null),o=ar.useRef(null),[a,i]=ar.useState(t);return ar.useLayoutEffect(()=>{let s=n.current,l=o.current;if(!s||!l)return;let d=()=>{let h=s.clientWidth;if(!h)return;let u=window.getComputedStyle(l),m=document.createElement("span");m.textContent=l.textContent,m.style.cssText=["position:absolute","left:-9999px","top:-9999px","visibility:hidden","white-space:nowrap",`font-family:${u.fontFamily}`,`font-weight:${u.fontWeight}`,`letter-spacing:${u.letterSpacing}`,`font-size:${t}px`].join(";"),document.body.appendChild(m);let y=m.offsetWidth;if(document.body.removeChild(m),y<=h){i(t);return}let b=Math.max(r,Math.floor(t*h/y));i(b)};d();let c=new ResizeObserver(d);return c.observe(s),()=>c.disconnect()},[e,t,r]),{containerRef:n,textRef:o,fontSize:a}}function mx(e){let t=at(e);return t?t.decimalPlaces(4,lx.ROUND_DOWN).toFormat():"-"}function gx(){return it("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[Y("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.6"}),Y("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 hx(){return Y("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:Y("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 bx(){return Y("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:Y("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 wx(){return Y("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:Y("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 Lf({env:e,isMobile:t,token:r,walletAddress:n,stat:o,tokenInfo:a,showBalance:i=!0,onBack:s,onClose:l,onSend:d,onOutlink:c}){let h=r.quantity.decimals,[u,m]=ar.useState(!1),{buildTxUrl:y,chainInfo:b}=Mc(e,r.chainId,!0),{visibility:f}=Nf(e),{data:p,isLoading:w,isError:g,fetchNextPage:x,hasNextPage:k,isFetchingNextPage:R,refetch:E}=Cf(e,r.chainId,r.address,n,!0),S=ar.useMemo(()=>p?.pages?p.pages.flat():[],[p]),C=ar.useRef(null);ar.useEffect(()=>{if(!t)return;let U=C.current;if(!U||!k)return;let X=new IntersectionObserver(H=>{H[0]?.isIntersecting&&!R&&x()},{rootMargin:"120px"});return X.observe(U),()=>X.disconnect()},[t,k,R,x]);let I=ar.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(r.address).then(()=>{m(!0),setTimeout(()=>m(!1),1500)}).catch(()=>{})},[r.address]),M=Ef(Mf(r.quantity.numeric,h)),B=o?.price?hi(r.quantity.numeric,h,o.price):null,L=i?M:"\u2022\u2022\u2022\u2022",{containerRef:z,textRef:A,fontSize:F}=fx(L,30,14),K=ia(r.chainId,e).name??b?.name??`Chain ${r.chainId}`,_=b?.explorer_url,G=a?.deployed??!0,oe=ar.useMemo(()=>{let U=[];return a?.info_url&&U.push({key:"web",label:"Website",url:a.info_url,icon:Y(gx,{})}),a?.telegram_url&&U.push({key:"tg",label:"Telegram",url:a.telegram_url,icon:Y(hx,{})}),a?.x_url&&U.push({key:"x",label:"X",url:a.x_url,icon:Y(bx,{})}),a?.medium_url&&U.push({key:"medium",label:"Medium",url:a.medium_url,icon:Y(wx,{})}),U},[a]),Z=(U,X,H,pe)=>{zt(U,X,{category:"token-detail",origin:H,payload:{address:r.address,txHash:pe}},c)};return it(Af,{children:[it("div",{className:"wi-sticky-header",children:[it("div",{className:"wi-header wi-header--receive",children:[Y("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:Y(tn,{size:24})}),it("span",{className:"wi-td-header-title",children:[Y("img",{src:r.icon_url,alt:"","aria-hidden":!0,className:"wi-td-header-icon",width:24,height:24,draggable:!1,onError:U=>{U.currentTarget.src=dx}}),Y("span",{className:"wi-td-header-name",children:r.symbol})]}),Y("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close",children:Y(Ir,{size:24})})]}),Y("hr",{className:"wi-divider"})]}),it("div",{className:"wi-td-scroll",children:[f.chart&&Y(If,{env:e,chainId:r.chainId,tokenAddress:r.address}),f.balance&&it("section",{className:"wi-td-balance-card",children:[it("div",{className:"wi-td-balance-left",ref:z,children:[Y("span",{className:"wi-td-balance-label",children:"My Balance"}),Y("span",{className:"wi-td-balance-amount",ref:A,style:{fontSize:F},children:L}),i&&B&&Y("span",{className:"wi-td-balance-fiat",children:B})]}),Y("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:Y("span",{children:"Send"})})]}),f.overview&&it("section",{className:"wi-td-section",children:[Y("h3",{className:"wi-td-section-title",children:"Crypto Overview"}),it("div",{className:"wi-td-rows",children:[it("div",{className:"wi-td-row",children:[Y("span",{className:"wi-td-row-label",children:"Network"}),_?it("a",{className:"wi-td-row-value wi-td-row-link",href:_,target:"_blank",rel:"noopener noreferrer",onClick:U=>Z(U,_,"token-network"),children:[Y("span",{children:K}),Y(yx,{})]}):Y("span",{className:"wi-td-row-value",children:K})]}),it("div",{className:"wi-td-row",children:[Y("span",{className:"wi-td-row-label",children:"Contract Address"}),it("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:I,"aria-label":"Copy contract address",children:[Y("span",{children:nr(r.address)}),u?Y(Rn,{size:14}):Y(po,{size:14})]})]}),it("div",{className:"wi-td-row",children:[Y("span",{className:"wi-td-row-label",children:"Decimals"}),Y("span",{className:"wi-td-row-value",children:h})]}),it("div",{className:"wi-td-row",children:[Y("span",{className:"wi-td-row-label",children:"Total Supply"}),Y("span",{className:"wi-td-row-value",children:mx(o?.circulating_supply)})]})]})]}),f.social&&oe.length>0&&it("section",{className:"wi-td-section",children:[Y("h3",{className:"wi-td-section-title",children:"Social Media"}),Y("div",{className:"wi-td-social-row",children:oe.map(U=>Y("a",{className:"wi-td-social-btn",href:U.url,target:"_blank",rel:"noopener noreferrer","aria-label":U.label,onClick:X=>Z(X,U.url,"token-social"),children:U.icon},U.key))})]}),f.history&&it("section",{className:"wi-td-section",children:[Y("h3",{className:"wi-td-section-title",children:"Token History"}),w&&Y("div",{className:"wi-td-history-list",children:Array.from({length:3},(U,X)=>it("div",{className:"wi-td-history-skeleton",children:[Y("div",{className:"wi-skeleton-block",style:{width:90,height:14}}),Y("div",{className:"wi-skeleton-block",style:{width:60,height:14}})]},`td-sk-${X}`))}),!w&&g&&it("div",{className:"wi-td-history-empty",children:[Y("span",{children:"Failed to load history."}),Y("button",{type:"button",className:"wi-td-retry-btn",onClick:()=>E(),children:"Retry"})]}),!w&&!g&&S.length===0&&Y("div",{className:"wi-td-history-empty",children:Y("span",{children:"No transactions found."})}),!w&&!g&&S.length>0&&it("div",{className:"wi-td-history-list",children:[S.map((U,X)=>{let H=U.to_alias?.toLowerCase().includes("bridge")??!1,pe=U.from_alias?.toLowerCase().includes("bridge")??!1,be=H?"bridge-out":pe?"bridge-in":U.to?.toLowerCase()===n.toLowerCase()?"receive":"send",te=be==="receive"||be==="bridge-in",ue=te?U.from:U.to,je=Ef(Mf(U.amount,h)),Se=y(U.tx),lt=ux(U.timestamp),ge=it(Af,{children:[it("div",{className:"wi-td-history-top",children:[Y("span",{className:"wi-td-history-type","data-direction":be,children:cx[be]}),Y("span",{className:"wi-td-history-counter",children:nr(ue??"")})]}),it("div",{className:"wi-td-history-bottom",children:[it("span",{className:"wi-td-history-meta",children:[Y("span",{className:"wi-td-history-status","data-status":U.status,children:U.status==="success"?"Success":"Failed"}),lt&&Y("span",{className:"wi-td-history-time",children:lt})]}),it("span",{className:"wi-td-history-amount","data-size":px(`${te?"+":"-"}${je} ${r.symbol}`),children:[te?"+":"-",je," ",r.symbol]})]})]}),Ie=`${U.tx}-${U.log_index}-${X}`;return Se?Y("a",{className:"wi-td-history-item wi-td-history-item--link",href:Se,target:"_blank",rel:"noopener noreferrer",onClick:ot=>Z(ot,Se,"token-tx",U.tx),children:ge},Ie):Y("div",{className:"wi-td-history-item",children:ge},Ie)}),k&&(t?Y("div",{ref:C,className:"wi-td-history-sentinel",children:R&&Y("span",{className:"wi-td-history-loading",children:"Loading\u2026"})}):Y("button",{type:"button",className:"wi-td-loadmore-btn",onClick:()=>x(),disabled:R,children:R?"Loading\u2026":"Load more"}))]})]})]})]})}function yx(){return Y("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",className:ve("wi-td-external-icon"),"aria-hidden":!0,children:Y("path",{d:"M14 4h6v6M20 4l-9 9M18 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}import*as sn from"react";var Df={dev:"https://dev.onechain.nexus/pop",stage:"https://stg.onechain.nexus/pop",production:"https://onechain.nexus/pop"};function Of(e,t){let r=Df[e]??Df.production;return t==="send"?r:`${r}/${t}`}var Pf={dev:"https://stg.onechain.nexus/gametoken/bridge",stage:"https://stg.onechain.nexus/gametoken/bridge",production:"https://www.onechain.nexus/gametoken/bridge"};function Bf(e){return Pf[e]??Pf.production}import{jsx as ke,jsxs as wn}from"react/jsx-runtime";function ql({size:e=20,className:t}){return ke("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ke("path",{d:"M19.5 12.572 12 20l-7.5-7.428A5 5 0 1 1 12 6.006a5 5 0 1 1 7.5 6.566Z",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})})}function zf({size:e=24,className:t}){return wn("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ke("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"}),ke("path",{d:"m21.854 2.147-10.94 10.939",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ff({size:e=24,className:t}){return ke("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:wn("g",{stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[ke("path",{d:"M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17"}),ke("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"}),ke("path",{d:"m2 16 6 6"}),ke("circle",{cx:"16",cy:"9",r:"2.9"}),ke("circle",{cx:"6",cy:"5",r:"3"})]})})}function Uf({size:e=24,className:t}){return ke("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:wn("g",{stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[ke("path",{d:"M15 12h-5M15 8h-5"}),ke("path",{d:"M19 17V5a2 2 0 0 0-2-2H4"}),ke("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 Ta({size:e=12,className:t}){return ke("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ke("path",{d:"m9 18 6-6-6-6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function jf({size:e=20,className:t}){return wn("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ke("rect",{width:"20",height:"20",rx:"4.8",fill:"currentColor"}),ke("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 Wf({size:e=20,className:t}){return ke("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:wn("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[ke("circle",{cx:"9",cy:"7",r:"3.4"}),ke("path",{d:"M2.6 20.4a6.4 6.4 0 0 1 10.2-5.15"}),ke("circle",{cx:"17.5",cy:"17.5",r:"2.1"}),ke("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 _f({size:e=20,className:t}){return ke("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:wn("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[ke("path",{d:"M12.5 3 5 13.5h5.5L10 21l7.5-10.5H12z"}),ke("path",{d:"M20 4.5 21.5 3M20.5 8h2M17 2.5V1"})]})})}function Gf({size:e=20,className:t}){return ke("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:wn("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[ke("rect",{x:"2.5",y:"5.5",width:"19",height:"13",rx:"2.5"}),ke("path",{d:"M12 9v6"}),ke("path",{d:"m9.5 12.5 2.5 2.5 2.5-2.5"})]})})}function Hf({className:e}){return wn("span",{className:e,children:[wn("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,className:"wi-op-logo-mark",children:[ke("path",{d:"M19.5 12.07 12 19.6l-7.5-7.53A5.06 5.06 0 0 1 12 5.44a5.06 5.06 0 0 1 7.5 6.63Z",fill:"var(--wi-op-brand, #f62e61)"}),ke("path",{d:"M11.05 9.1h1.9v6.2h-1.55V10.5l-1.2.36-.3-1.18z",fill:"#ffffff"})]}),ke("span",{className:"wi-op-logo-one",children:"ONE"}),ke("span",{className:"wi-op-logo-pop",children:"pop"})]})}function Qf({className:e}){return wn("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:[ke("path",{d:"M53.6 8.5c5.6-6 15.2-5.7 20.5.7 5 6.1 4.2 15.1-1.6 20.6L52.9 48.2 33.3 29.9c-5.9-5.5-6.7-14.5-1.7-20.6 5.3-6.4 14.9-6.7 20.5-.7l.8.8z",fill:"var(--wi-op-brand, #f62e61)"}),ke("path",{d:"M2.5 52.5c4.5-3.6 9.5-4.2 14.7-2.3l9.9 3.6h13.6a4.4 4.4 0 0 1 0 8.9H29",stroke:"var(--wi-op-hero-line, #121212)",strokeWidth:2.6,strokeLinecap:"round",strokeLinejoin:"round"}),ke("path",{d:"M26.2 62.7h20.3c2.6 0 5.1-.9 7-2.6l10.4-9.1a4.6 4.6 0 0 0-6.2-6.8l-9.1 7.7",stroke:"var(--wi-op-hero-line, #121212)",strokeWidth:2.6,strokeLinecap:"round",strokeLinejoin:"round"}),ke("path",{d:"M1 51.4 12.6 63",stroke:"var(--wi-op-hero-line, #121212)",strokeWidth:2.6,strokeLinecap:"round"})]})}ce(`.wi-op-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;display:flex;flex-direction:column;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .wi-op-scroll{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-op-scroll::-webkit-scrollbar{width:4px}.wi-op-scroll::-webkit-scrollbar-track{background:transparent}.wi-op-scroll::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}[data-theme=light] .wi-op-scroll::-webkit-scrollbar-thumb{background:#0000001f}.wi-op-header-title{position:absolute;left:50%;transform:translate(-50%);display:inline-flex;align-items:center;pointer-events:none}.wi-op-logo{display:inline-flex;align-items:center;gap:4px;font-size:20px;line-height:1.2;letter-spacing:-.02em}.wi-op-logo-mark{flex-shrink:0}.wi-op-logo-one{font-weight:800;color:var(--ds-content-highest, #000000)}.wi-op-logo-pop{font-weight:500;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.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-art svg{--wi-op-brand: var(--ds-system-red-default, #da0b2e)}[data-theme=light] .wi-op-hero-art svg{--wi-op-hero-line: #121212}[data-theme=dark] .wi-op-hero-art svg{--wi-op-hero-line: #ffffff}.wi-op-hero-img{max-width:100%;max-height:72px;object-fit:contain}.wi-op-panel{display:flex;flex-direction:column;gap:8px;padding:0 24px;flex-shrink:0}.wi-op-balance-card{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa)}.wi-op-balance-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.wi-op-balance-label{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-op-balance-body{display:flex;align-items:center;gap:4px;min-width:0}.wi-op-balance-icon{width:24px;height:24px;border-radius:50%;object-fit:cover;flex-shrink:0}.wi-op-balance-value{font-family:inherit;font-size:28px;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-link-btn{appearance:none;display:inline-flex;align-items:center;gap:4px;padding:0;border:none;background:transparent;font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;flex-shrink:0;transition:color .15s ease}.wi-op-link-btn:hover:not(:disabled){color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-link-btn:disabled{cursor:default;opacity:.5}.wi-op-balance-head>[data-gou-mode=button]{display:contents}.wi-op-action-row{display:flex;align-items:stretch;gap:8px}.wi-op-action-card{appearance:none;display:flex;flex:1 1 0;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 8px;border:none;border-radius:10px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-align:center;cursor:pointer;transition:background-color .15s ease,transform .1s ease}.wi-op-action-card>svg{flex-shrink:0}.wi-op-action-card:hover:not(:disabled){background:#2e3544}[data-theme=light] .wi-op-action-card:hover:not(:disabled){background:#e4e8ef}.wi-op-action-card:active:not(:disabled){transform:scale(.95)}.wi-op-action-card:disabled{cursor:default;opacity:.45}.wi-op-cta-row{display:flex;flex-direction:column;gap:10px;padding:24px;flex-shrink:0}.wi-op-cta-skeleton{border-radius:10px}.wi-op-cta{appearance:none;display:flex;align-items:center;justify-content:center;width:100%;padding:12px 16px;border:none;border-radius:10px;font-family:inherit;font-size:16px;font-weight:600;line-height:1;cursor:pointer;transition:filter .15s ease,transform .1s ease,background-color .15s ease}.wi-op-cta:active:not(:disabled){transform:scale(.985)}.wi-op-cta:disabled{cursor:default;opacity:.5}.wi-op-cta--gradient{background:linear-gradient(193.7deg,#f62e61 16.1%,#f7564a 83.9%);color:#fff}.wi-op-cta--gradient:hover:not(:disabled){filter:brightness(1.05)}.wi-op-cta--purple{background:var(--ds-system-purple-high, #7346f3);color:var(--ds-system-purple-on, #ffffff)}.wi-op-cta--purple:hover:not(:disabled){filter:brightness(1.08)}.wi-op-cta--outline{background:transparent;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-cta--outline:hover:not(:disabled){background:var(--ds-surface-medium, #f5f7fa)}.wi-op-features{display:flex;flex-direction:column;padding:0 24px 8px;flex-shrink:0}.wi-op-feature{display:flex;align-items:center;gap:6px;padding:12px 0}.wi-op-feature+.wi-op-feature{border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-op-feature-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;flex-shrink:0;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-accent-primary-high, #f0640d)}.wi-op-feature-copy{display:flex;flex-direction:column;min-width:0}.wi-op-feature-title{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-feature-desc{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-activity{display:flex;flex-direction:column;gap:8px;padding:0 24px 8px;flex-shrink:0}.wi-op-activity-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.wi-op-activity-heading{display:flex;flex-direction:column;min-width:0}.wi-op-activity-title{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-activity-currency{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-activity-list{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}.wi-op-activity-item{display:flex;align-items:flex-start;gap:6px;padding:12px 0}.wi-op-activity-item+.wi-op-activity-item{border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-op-activity-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;overflow:hidden;flex-shrink:0;background:var(--ds-surface-medium, #f5f7fa)}.wi-op-activity-avatar img{width:100%;height:100%;object-fit:cover}.wi-op-activity-initial{font-family:inherit;font-size:13px;font-weight:600;line-height:1;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-op-activity-copy{display:flex;flex-direction:column;flex:1 1 0;min-width:0}.wi-op-activity-meta{display:flex;align-items:center;gap:6px;min-width:0}.wi-op-activity-peer{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-activity-sep{width:1px;height:14px;flex-shrink:0;background:var(--ds-border-medium, rgba(0, 0, 0, .18))}.wi-op-activity-time{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap;flex-shrink:0}.wi-op-activity-amount{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-badge{display:inline-flex;align-items:center;justify-content:center;padding:3px 6px;border-radius:4px;flex-shrink:0;font-family:inherit;font-size:12px;font-weight:500;line-height:1}.wi-op-badge--claimed{background:var(--ds-system-green-low, #e7f9f8);color:var(--ds-system-green-high, #00a0a2)}.wi-op-badge--waiting{background:var(--ds-accent-primary-low, #fff5ee);color:var(--ds-accent-primary-high, #f0640d)}.wi-op-badge--refunded{background:var(--ds-system-red-low, #ffeeee);color:var(--ds-system-red-high, #d20609)}.wi-op-badge--ready{background:var(--ds-system-blue-low, #ecf8fc);color:var(--ds-system-blue-high, #008dca)}.wi-op-footer{display:flex;align-items:center;justify-content:center;padding:16px 24px;flex-shrink:0;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-drawer-content .wi-op-hero,.wi-drawer-content .wi-op-cta-row,.wi-drawer-content .wi-op-panel,.wi-drawer-content .wi-op-features,.wi-drawer-content .wi-op-activity,.wi-drawer-content .wi-op-footer{padding-left:16px;padding-right:16px}
|
|
12
|
-
`);import{Fragment as Kl,jsx as $,jsxs as et}from"react/jsx-runtime";var xx=6,vx={claimed:"Claimed",waiting:"Waiting",refunded:"Refunded",ready:"Ready"};function Vf(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?"-":""}${kx(o.toString())}.${a.toString().padStart(2,"0")}`}function kx(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 Rx(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 Sx(e){let t=e.trim();return t?t.startsWith("@")?t:`@${t}`:""}function ls({env:e="production",balanceDisplay:t,balanceIconUrl:r,isBalanceLoading:n,summary:o,logoSrc:a,heroSrc:i,onBack:s,onClose:l,onSend:d,onClaim:c,onActivity:h,onBoard:u,onGetToken:m,getTokenSlot:y}){let b=o?.activity??[],f=b.length>0,p=o?.claimableCount??0,w=o?.repliesWaitingCount??0,g=o?.isLoading??!1,x=o?.xConnected??!1,k=sn.useCallback(z=>{window.open(Of(e,z),"_blank","noopener,noreferrer")},[e]),R=sn.useCallback(()=>d?d():k("send"),[d,k]),E=sn.useCallback(()=>c?c():k("claim"),[c,k]),S=sn.useCallback(()=>h?h():k("activity"),[h,k]),C=sn.useCallback(()=>u?u():k("board"),[u,k]),I=sn.useCallback(()=>{if(m)return m();window.open(Bf(e),"_blank","noopener,noreferrer")},[m,e]),M=sn.useMemo(()=>!o||p<=0?null:Vf(o.claimableTotalRaw,o.claimableDecimals??18),[o,p]),B=sn.useMemo(()=>b.slice(0,xx),[b]),L=sn.useCallback(z=>{z.currentTarget.style.display="none"},[]);return et(Kl,{children:[et("div",{className:"wi-sticky-header",children:[et("div",{className:"wi-header wi-header--receive",children:[$("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:$(tn,{size:24})}),$("span",{className:"wi-op-header-title",children:a?$("img",{src:a,alt:"ONEpop",className:"wi-op-logo-img",height:24,draggable:!1,onError:L}):$(Hf,{className:"wi-op-logo"})}),$("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close",children:$(Ir,{size:24})})]}),$("hr",{className:"wi-divider"})]}),et("div",{className:"wi-op-scroll","data-vaul-no-drag":!0,children:[et("section",{className:"wi-op-hero",children:[et("div",{className:"wi-op-hero-copy",children:[et("h2",{className:"wi-op-hero-title",children:[$("span",{children:"Send money with"}),et("span",{className:"wi-op-hero-title-row",children:["just an",$(jf,{size:20,className:"wi-op-x-badge"}),"@handle."]})]}),$("p",{className:"wi-op-hero-sub",children:"They don't even need a wallet yet."})]}),$("div",{className:"wi-op-hero-art","aria-hidden":!0,children:i?$("img",{src:i,alt:"",className:"wi-op-hero-img",draggable:!1,onError:L}):$(Qf,{})})]}),et("section",{className:"wi-op-panel",children:[et("div",{className:"wi-op-balance-card",children:[et("div",{className:"wi-op-balance-head",children:[$("span",{className:"wi-op-balance-label",children:"Available"}),y??et("button",{type:"button",className:"wi-op-link-btn",onClick:I,"data-track":"onepop_get_token",children:[$("span",{children:"Get ONEUSD"}),$(Ta,{size:12})]})]}),$("div",{className:"wi-op-balance-body",children:n?$("div",{className:"wi-skeleton-block",style:{width:140,height:32}}):et(Kl,{children:[r&&$("img",{src:r,alt:"","aria-hidden":!0,className:"wi-op-balance-icon",width:24,height:24,draggable:!1,onError:L}),$("span",{className:"wi-op-balance-value",children:t??"0.00"})]})})]}),et("div",{className:"wi-op-action-row","aria-label":"ONEpop actions",children:[et("button",{type:"button",className:"wi-op-action-card",onClick:R,"aria-label":"Send POP","data-track":"onepop_send",children:[$(zf,{size:24}),$("span",{children:"Send POP"})]}),et("button",{type:"button",className:"wi-op-action-card",onClick:E,"aria-label":"Claim POPs","data-track":"onepop_claim",children:[$(Ff,{size:24}),$("span",{children:"Claim POPs"})]}),x&&et("button",{type:"button",className:"wi-op-action-card",onClick:S,"aria-label":"Activity","data-track":"onepop_activity",children:[$(Uf,{size:24}),$("span",{children:"Activity"})]})]})]}),$("section",{className:"wi-op-cta-row",children:g?$("div",{className:"wi-skeleton-block wi-op-cta-skeleton",style:{height:40}}):et(Kl,{children:[!f&&p<=0&&$("button",{type:"button",className:"wi-op-cta wi-op-cta--gradient",onClick:R,"data-track":"onepop_send_first",children:"Send your first POP!"}),p>0?$("button",{type:"button",className:"wi-op-cta wi-op-cta--purple",onClick:E,"data-track":"onepop_claim_banner",children:`${p} POP${p===1?"":"s"} waiting to claim (total ${M})`}):!f&&$("button",{type:"button",className:"wi-op-cta wi-op-cta--purple",onClick:C,"data-track":"onepop_claim_maybe",children:"You might have POPs waiting"}),w>0&&$("button",{type:"button",className:"wi-op-cta wi-op-cta--outline",onClick:S,"data-track":"onepop_replies",children:`${w} ${w===1?"reply":"replies"} waiting`})]})}),f?et("section",{className:"wi-op-activity",children:[et("div",{className:"wi-op-activity-head",children:[et("div",{className:"wi-op-activity-heading",children:[$("span",{className:"wi-op-activity-title",children:"Recent activity"}),$("span",{className:"wi-op-activity-currency",children:"Currency: ONEUSD"})]}),et("button",{type:"button",className:"wi-op-link-btn",onClick:S,"data-track":"onepop_see_all_activity",children:[$("span",{children:"See all activity"}),$(Ta,{size:16})]})]}),$("ul",{className:"wi-op-activity-list",children:B.map(z=>$(Cx,{item:z},z.id))})]}):et("section",{className:"wi-op-features",children:[$(Yl,{icon:$(Wf,{size:20}),title:"No wallet address needed",desc:"just their @handle"}),$(Yl,{icon:$(_f,{size:20}),title:"Claim instantly",desc:"social login, zero gas"}),$(Yl,{icon:$(Gf,{size:20}),title:"Refund anytime",desc:"get it back if unclaimed"})]})]}),$("div",{className:"wi-op-footer",children:$("span",{children:"Powered by ONEpop"})})]})}function Yl({icon:e,title:t,desc:r}){return et("div",{className:"wi-op-feature",children:[$("span",{className:"wi-op-feature-icon","aria-hidden":!0,children:e}),et("span",{className:"wi-op-feature-copy",children:[$("span",{className:"wi-op-feature-title",children:t}),$("span",{className:"wi-op-feature-desc",children:r})]})]})}function Cx({item:e}){let t=Sx(e.handle),r=e.direction==="sent"?`Sent to ${t}`:`Claimed from ${t}`,n=t.replace("@","").charAt(0).toUpperCase()||"?";return et("li",{className:"wi-op-activity-item",children:[$("span",{className:"wi-op-activity-avatar","aria-hidden":!0,children:e.avatarUrl?$("img",{src:e.avatarUrl,alt:"",width:30,height:30,draggable:!1,onError:o=>{o.currentTarget.style.display="none"}}):$("span",{className:"wi-op-activity-initial",children:n})}),et("span",{className:"wi-op-activity-copy",children:[et("span",{className:"wi-op-activity-meta",children:[$("span",{className:"wi-op-activity-peer",children:r}),$("span",{className:"wi-op-activity-sep","aria-hidden":!0}),$("span",{className:"wi-op-activity-time",children:Rx(e.timestamp)})]}),$("span",{className:"wi-op-activity-amount",children:Vf(e.amountRaw,e.decimals)})]}),$("span",{className:ve("wi-op-badge",`wi-op-badge--${e.status}`),"data-status":e.status,children:vx[e.status]})]})}import*as Yf from"react";import{jsx as qf,jsxs as Nx}from"react/jsx-runtime";var Kf=Yf.forwardRef(function({className:t,children:r,...n},o){return Nx("button",{...n,ref:o,type:"button",className:"wi-op-link-btn","data-track":"onepop_get_token",children:[qf("span",{children:"Get ONEUSD"}),qf(Ta,{size:12})]})});import{Fragment as Xl,jsx as N,jsxs as V}from"react/jsx-runtime";var Ex="On-ramp is not available in your region.";function Zl(e,t,r){let n=gt[e],o=r.toUpperCase();if(t===n.cross&&o.includes("ONEUSD"))return 0;if(t===n.cross&&o==="ONE")return 1;if(t===n.bsc&&o==="ONE")return 2}function Mx(e){return parseInt(e.split(":")[1],10)}function Ax(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 Lx(e){let t=e.lastIndexOf(".");return t===-1?{main:e,decimal:""}:{main:e.slice(0,t),decimal:e.slice(t)}}function Dx(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 Px(e,t=.5){let r=q.useRef(null),n=q.useRef(null),[o,a]=q.useState(1);return q.useLayoutEffect(()=>{let i=r.current,s=n.current;if(!i||!s)return;let l=()=>{let c=i.clientWidth;if(!c)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 m=u>c?Math.max(t,c/u):1;a(m)};l();let d=new ResizeObserver(l);return d.observe(i),()=>d.disconnect()},[e,t]),{containerRef:r,valueRef:n,scale:o}}function Zf({align:e="end",sideOffset:t=12,className:r,children:n}){let{env:o,theme:a,isMobile:i,open:s,drawerDirection:l,modal:d,showBalance:c,showForgeToken:h,showGameToken:u,showQR:m,showBridge:y,qrLogoSrc:b,walletAddress:f,accountName:p,sendAccounts:w,profileImageUrl:g,connectorName:x,preferredTokens:k,close:R,onSelectWallet:E,onCopyAddress:S,onBuy:C,onDisconnect:I,disconnectLabel:M,termsUrl:B,termsLabel:L,privacyUrl:z,privacyLabel:A,portalStyle:F,navContent:ne,navPosition:K,footerContent:_,view:G,setView:oe,selectedSendToken:Z,setSelectedSendToken:U,selectedDetailToken:X,setSelectedDetailToken:H,showPortfolio:pe,showOnePop:be,onePopSummary:te,onOnePopOpen:ue,onOnePopSend:je,onOnePopClaim:Se,onOnePopActivity:lt,onePopLogoSrc:ge,onePopGetTokenSlot:Ie,onePopHeroSrc:ot,portfolioTitle:Qe,portfolioSections:We,showTotalAssets:Oe,totalAssetsLabel:tt,sendTransaction:Nt,getTransactionReceipt:ut,estimateGas:xt,onOutlink:he,lpBalanceReader:Vt,stakingRewardsReader:bt,bridgeTokens:wt,bridgeHistory:rt,getBridgeQuote:$e,getBridgeToTokens:er,getBridgeApproval:At,approveBridge:Ut,submitBridge:Lt,onReceive:Ve,onSend:De,onBuyDisabledMessage:ft,onBridgeDisabledMessage:Tt,onSendDisabledMessage:Ce}=Bn(),[It,qt]=q.useState();q.useEffect(()=>{qt(Np()??(Mo()?Ix.default:void 0))},[]);let P=p??x??It??"Account",[Be,O]=q.useState(null),ae=q.useRef(void 0),le=q.useCallback(T=>{O(T),clearTimeout(ae.current),ae.current=setTimeout(()=>O(null),4e3)},[]);q.useEffect(()=>()=>clearTimeout(ae.current),[]);let me=!!ft,mt=q.useCallback(()=>{if(me){le(ft);return}let T=C?.();T&&typeof T.then=="function"&&T.catch(()=>{le(ft??Ex)})},[me,ft,C,le]),Dt=!!Tt,yt=!!Ce,{tokens:hr,isLoading:br}=Un(o,f,s&&c),{statsMap:jt}=jn(o,c),{aprPercent:Dr}=up(),{categoryMap:sr,infoMap:re}=mp(o,c),Ne=c&&Oe,{displayValue:j,isLowerBound:_e,isLoading:ie}=gp(o,f,s&&Ne),[Ge,Co]=q.useState(!1),ro=q.useRef(null),[Cr,kn]=q.useState(0),{holdings:no,isLoading:Ya}=dp(o,f,s&&c&&h),Qs=q.useMemo(()=>no.map(T=>T.token),[no]),{imageMap:Ka}=cp(o,Qs,h&&no.length>0),Wt=q.useMemo(()=>{let T=[],J=[],He=[],dr=new Map((k??[]).map((Xe,tr)=>[`${Mx(Xe.chainId)}:${Xe.address.toLowerCase()}`,tr]));for(let Xe of hr){let tr=Zl(o,Xe.chainId,Xe.symbol)!==void 0,$r=`${Xe.chainId}:${Xe.address.toLowerCase()}`,ao=dr.get($r),Ks=(at(Xe.quantity.numeric)??new Ia(0)).shiftedBy(-Xe.quantity.decimals);if(tr)T.push(Xe);else if(ao!==void 0)J.push(Xe);else if(Ks.isGreaterThan(0)){if(!u&&sr.get(fa(Xe.chainId,Xe.address))==="game")continue;He.push(Xe)}}return T.sort((Xe,tr)=>{let $r=Zl(o,Xe.chainId,Xe.symbol)??99,ao=Zl(o,tr.chainId,tr.symbol)??99;return $r-ao}),J.sort((Xe,tr)=>{let $r=dr.get(`${Xe.chainId}:${Xe.address.toLowerCase()}`)??99,ao=dr.get(`${tr.chainId}:${tr.address.toLowerCase()}`)??99;return $r-ao}),He.sort((Xe,tr)=>{let $r=jt.get(zr(Xe.chainId,Xe.address)),ao=jt.get(zr(tr.chainId,tr.address)),Ks=(at(Xe.quantity.numeric)??new Ia(0)).shiftedBy(-Xe.quantity.decimals).multipliedBy(at($r?.price)??0);return(at(tr.quantity.numeric)??new Ia(0)).shiftedBy(-tr.quantity.decimals).multipliedBy(at(ao?.price)??0).minus(Ks).toNumber()}),[...T,...J,...He]},[hr,o,jt,u,sr,k]),Za=q.useMemo(()=>{if(!h)return[];let T=new Set(hr.map(J=>J.address.toLowerCase()));return[...no].filter(J=>!T.has(J.token.toLowerCase())).sort((J,He)=>{let dr=at(J.value)??new Ia(0);return(at(He.value)??new Ia(0)).minus(dr).toNumber()})},[no,h,hr]),Xr=q.useRef(!1),[Yt,oo]=q.useState(null),Pn=q.useRef(void 0),Xa=Yt?.chainId??Z?.chainId??Wt[0]?.chainId??0,{transactionUrl:W}=la(o,Xa,Yt?.txHash,!!(Yt?.txHash&&Xa)),we=q.useCallback(T=>{Xr.current=!0,oe(T)},[oe]),[wr,vt]=q.useState("recipient"),lr=q.useCallback(()=>{U(null),vt("recipient"),we("wallet")},[U,we]),Pt=q.useCallback((T,J="recipient")=>{if(yt){le(Ce);return}vt(J),U(T),we("send")},[yt,Ce,le,U,we]),Jr=q.useCallback(T=>{H(T),we("token-detail")},[H,we]),Ze=q.useCallback(()=>{ue?.(),we("onepop")},[ue,we]),pn=q.useCallback(()=>{H(null),we("wallet")},[H,we]),No=q.useCallback(T=>{Pt(T,"recipient")},[Pt]),Ja=rr("apps.json",o,T=>Pr(T?.gametokenBridge,o)),Id=rr("apps.json",o,T=>T?.gametokenSites),Kg=q.useCallback(()=>{if(Dt){le(Tt);return}if(Ja){if(Ax(Id)){window.location.assign(Ja);return}window.open(Ja,"_blank","noopener,noreferrer")}},[Dt,Tt,Ja,Id,le]),Zg=q.useCallback(T=>{clearTimeout(Pn.current),U(null),we("wallet"),oo({status:"pending",txHash:T.txHash,chainId:T.chainId,description:`${T.amount} ${T.tokenSymbol} to ${nr(T.recipient)}`})},[U,we]),Xg=q.useCallback(T=>{let J=Z?.chainId;U(null),we("wallet"),!(!T||!J)&&(oo(He=>({status:"success",txHash:T,chainId:J,description:He?.txHash===T?He.description:"Tap to see your transaction"})),clearTimeout(Pn.current),Pn.current=setTimeout(()=>oo(null),5e3))},[Z?.chainId,U,we]),Jg=q.useCallback(T=>{let J=T.txHash;J&&(oo({status:"error",txHash:J,chainId:T.chainId,description:T.message}),clearTimeout(Pn.current),Pn.current=setTimeout(()=>oo(null),5e3))},[]),na=q.useMemo(()=>{if(Ve)return Ve;if(m)return()=>we("qr")},[Ve,m,we]),$a=q.useMemo(()=>{if(De)return De;if(Wt.length===0)return;let T=Wt[0];return()=>Pt(T,"token")},[De,Wt,Pt]),Ed=q.useCallback(()=>{if(yt){le(Ce);return}$a?.()},[yt,Ce,$a,le]);q.useEffect(()=>{s||(Xr.current=!1,vt("recipient"))},[s]);let Md=q.useRef(null);q.useEffect(()=>{let T=Md.current;if(!T||!i)return;let J=He=>{He.pointerType==="touch"&&He.stopPropagation()};return T.addEventListener("pointerdown",J),()=>T.removeEventListener("pointerdown",J)},[i]);let[To,Ad]=q.useState(!1),Vs=q.useRef(void 0),[oa,aa]=q.useState(!1);q.useEffect(()=>{if(!oa)return;let T=()=>aa(!1),J=dr=>{dr.key==="Escape"&&aa(!1)},He=setTimeout(()=>{document.addEventListener("mousedown",T,!0),document.addEventListener("keydown",J,!0)},0);return()=>{clearTimeout(He),document.removeEventListener("mousedown",T,!0),document.removeEventListener("keydown",J,!0)}},[oa]),q.useEffect(()=>{aa(!1)},[f]),q.useEffect(()=>()=>clearTimeout(Vs.current),[]),q.useEffect(()=>()=>clearTimeout(Pn.current),[]),q.useEffect(()=>{let T=ro.current;if(!T||_===null){kn(0);return}let J=()=>{kn(T.offsetHeight)};if(J(),typeof ResizeObserver>"u")return;let He=new ResizeObserver(J);return He.observe(T),()=>He.disconnect()},[_]);let Ld=q.useCallback(async()=>{if(!To)try{await navigator.clipboard.writeText(f),Ad(!0),clearTimeout(Vs.current),Vs.current=setTimeout(()=>Ad(!1),2e3),S?.(f,!0)}catch{S?.(f,!1)}},[f,S,To]),ei=q.useCallback(T=>{T.currentTarget.setAttribute("data-loaded","true")},[]),Dd=q.useMemo(()=>({background:Dx(f)}),[f]),ti=q.useMemo(()=>g||Cn(o,f,{size:120,bg:a==="dark"?"1A1A2E":"F3F6F8"}),[g,o,f,a]),qs=q.useMemo(()=>Lx(j),[j]),{containerRef:$g,valueRef:eh,scale:th}=Px(Ge?"\u2022\u2022\u2022\u2022\u2022\u2022":j),Pd=B||z?V("div",{className:"wi-legal-links",children:[B&&N("a",{className:"wi-legal-link",href:B,target:"_blank",rel:"noopener noreferrer","data-track":"terms_link",onClick:T=>zt(T,B,{category:"terms",origin:"terms"},he),children:L}),B&&z&&N("span",{className:"wi-legal-sep","aria-hidden":!0,children:"\xB7"}),z&&N("a",{className:"wi-legal-link",href:z,target:"_blank",rel:"noopener noreferrer","data-track":"privacy_link",onClick:T=>zt(T,z,{category:"privacy",origin:"privacy"},he),children:A})]}):null,Od=I?V("button",{type:"button",className:"wi-disconnect-btn","data-track":"disconnect",onClick:()=>{I(),R()},children:[N(gc,{size:16}),N("span",{className:"wi-disconnect-label",children:M})]}):null,rh=c&&!ne,nh=!Ne,oh=V("button",{type:"button",className:ve("wi-action-card",yt&&"wi-action-card--dimmed"),onClick:Ed,disabled:!yt&&!$a,"aria-disabled":yt||void 0,"aria-label":"Send","data-track":"send_open",children:[N(yc,{size:20}),N("span",{children:"Send"})]}),ah=rh?V("div",{className:"wi-action-row","aria-label":"Wallet actions",children:[V("button",{type:"button",className:ve("wi-action-card",me&&"wi-action-card--dimmed"),onClick:mt,disabled:!C&&!me,"aria-disabled":me||void 0,"aria-label":"Buy","data-track":"buy",children:[N(kc,{size:20}),N("span",{children:"Buy"})]}),y?V("button",{type:"button",className:ve("wi-action-card",Dt&&"wi-action-card--dimmed"),onClick:Kg,"aria-disabled":Dt||void 0,"aria-label":"Bridge","data-track":"bridge_open",children:[N(Rc,{size:20}),N("span",{children:"Bridge"})]}):V("button",{type:"button",className:"wi-action-card",onClick:na,disabled:!na,"aria-label":"Receive","data-track":"receive",children:[N(gi,{size:20}),N("span",{children:"Receive"})]}),nh&&oh,be&&V("button",{type:"button",className:"wi-action-card",onClick:Ze,"aria-label":"Open ONEpop","data-track":"onepop_open",children:[N(ql,{size:20}),N("span",{children:"ONEpop"})]}),pe?V("button",{type:"button",className:"wi-action-card",onClick:()=>we("portfolio"),"aria-label":"View portfolio","data-track":"portfolio_open",children:[N(vc,{size:20}),N("span",{children:"Portfolio"})]}):y?V("button",{type:"button",className:"wi-action-card",onClick:na,disabled:!na,"aria-label":"Receive","data-track":"receive",children:[N(gi,{size:20}),N("span",{children:"Receive"})]}):null]}):null,ih=V("div",{className:ve("wi-view-inner",Xr.current&&"wi-view-wallet"),children:[Ne&&V("div",{className:"wi-total-section",children:[V("div",{className:"wi-total-head",children:[N("span",{className:"wi-total-label",children:tt}),N("span",{role:"button",tabIndex:0,className:"wi-total-eye",onClick:T=>{T.stopPropagation(),Co(J=>!J)},onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),T.stopPropagation(),Co(J=>!J))},"aria-label":Ge?"Show balance":"Hide balance","data-track":"balance_toggle",children:Ge?N(bc,{}):N(hc,{})})]}),V("div",{className:"wi-total-body",children:[N("div",{className:"wi-total-value-wrap",ref:$g,children:ie?N("div",{className:"wi-skeleton-block wi-total-skeleton",style:{width:160,height:42}}):N("div",{className:"wi-total-value","data-hidden":Ge||void 0,ref:eh,style:{"--wi-total-scale":th},children:Ge?N("span",{className:"wi-total-mask",children:"\u2022\u2022\u2022\u2022\u2022\u2022"}):V(Xl,{children:[_e&&N("span",{className:"wi-total-lte",children:"\u2264"}),N("span",{className:"wi-total-currency",children:"$"}),N("span",{className:"wi-total-amount",children:qs.main}),qs.decimal&&N("span",{className:"wi-total-decimal",children:qs.decimal})]})})}),N("button",{type:"button",className:ve("wi-total-send",yt&&"wi-total-send--dimmed"),onClick:Ed,disabled:!yt&&!$a,"aria-disabled":yt||void 0,"aria-label":"Send","data-track":"send_open",children:N(xc,{size:27})})]})]}),K==="top"&&(ne?N("div",{className:"wi-nav-fixed",children:ne}):ah),c&&N("div",{ref:Md,className:"wi-scrollable-body","data-vaul-no-drag":!0,children:V("div",{className:"wi-token-list",children:[br&&Array.from({length:5},(T,J)=>V("div",{className:"wi-skeleton-item",children:[V("div",{className:"wi-skeleton-left",children:[N("div",{className:"wi-skeleton-block wi-skeleton-icon"}),V("div",{className:"wi-skeleton-lines",children:[N("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),V("div",{className:"wi-skeleton-right",children:[N("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},J)),!br&&Wt.length===0&&!h&&N("div",{className:"wi-empty",children:"No Tokens Found"}),Wt.map(T=>{let J=jt.get(zr(T.chainId,T.address)),He=J?parseFloat(J.percent_change_24h):null,dr=He!==null&&He>=0,Xe=pa(o,T.chainId),tr=yl(T.address);return V("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>Jr(T),"aria-label":`View ${T.symbol} detail`,"data-track":"token_detail","data-track-id":T.symbol,children:[V("div",{className:"wi-token-left",children:[V("div",{className:"wi-token-icon-wrap",children:[N("img",{src:T.icon_url,alt:T.symbol,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:ei,onError:$r=>{$r.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),Xe&&N("img",{src:Xe,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:$r=>{$r.currentTarget.style.display="none"}})]}),V("div",{className:"wi-token-info",children:[V("span",{className:"wi-token-name-row",children:[N("span",{className:"wi-token-name",children:T.symbol}),tr&&Dr!==null&&N("span",{className:"wi-token-apr",children:Di(Dr)})]}),J&&V("div",{className:"wi-token-price-row",children:[N("span",{className:"wi-token-price",children:fo(J.price)}),N("span",{className:"wi-token-change","data-positive":dr,"data-zero":He===0||void 0,children:He!==null&&(He===0?"0%":`${dr?"+":"-"}${(dr?Math.floor:Math.ceil)(Math.abs(He)*100)/100}%`)})]})]})]}),V("div",{className:"wi-token-right",children:[N("span",{className:"wi-token-balance",children:Sn(T.quantity.numeric,T.quantity.decimals)}),J&&N("span",{className:"wi-token-value",children:hi(T.quantity.numeric,T.quantity.decimals,J.price)})]})]},`${T.address}-${T.chainId}`)}),h&&Ya&&Array.from({length:3},(T,J)=>V("div",{className:"wi-skeleton-item",children:[V("div",{className:"wi-skeleton-left",children:[N("div",{className:"wi-skeleton-block wi-skeleton-icon"}),V("div",{className:"wi-skeleton-lines",children:[N("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),V("div",{className:"wi-skeleton-right",children:[N("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},`forge-sk-${J}`)),h&&!Ya&&!br&&Wt.length===0&&Za.length===0&&N("div",{className:"wi-empty",children:"No Tokens Found"}),h&&Za.map(T=>{let J=Ka.get(T.token)||"",He=pa(o,gt[o].cross);return V("div",{className:"wi-token-item",children:[V("div",{className:"wi-token-left",children:[V("div",{className:"wi-token-icon-wrap",children:[N("img",{src:J||"https://contents.crosstoken.io/wallet/token/images/FT.png",alt:T.token_name,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:ei,onError:dr=>{dr.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),He&&N("img",{src:He,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:dr=>{dr.currentTarget.style.display="none"}})]}),V("div",{className:"wi-token-info",children:[N("span",{className:"wi-token-name",children:T.token_name}),N("div",{className:"wi-token-price-row",children:V("span",{className:"wi-token-price",children:[Sn(T.current_price,18)," CROSS"]})})]})]}),V("div",{className:"wi-token-right",children:[N("span",{className:"wi-token-balance",children:Sn(T.balance,18)}),N("span",{className:"wi-token-value",children:fo(T.current_value_usd)})]})]},`forge-${T.token}`)})]})}),K==="bottom"&&ne&&N("div",{className:"wi-nav-fixed",children:ne}),Od&&N("div",{className:"wi-wallet-disconnect-row",children:Od})]},"wallet"),sh=pe?N("div",{className:ve("wi-view-inner wi-portfolio-body",Xr.current&&"wi-view-portfolio"),children:N(Go,{env:o,theme:a,walletAddress:f,showHeader:!1,onOutlink:he,lpBalanceReader:Vt,stakingRewardsReader:bt,sendTransaction:Nt,estimateGas:xt,sections:We})},"portfolio"):null,lh=Z?N("div",{className:ve("wi-view-inner wi-send-body",Xr.current&&"wi-view-send"),children:N(Mi,{env:o,theme:a,walletAddress:f,accountName:P,accounts:w,initialStep:wr,token:Z,tokens:Wt,onTokenChange:U,sendTransaction:Nt,getTransactionReceipt:ut,estimateGas:xt,getTokenPriceUsd:T=>{let J=jt.get(zr(T.chainId,T.address));if(!J?.price)return;let He=parseFloat(J.price);return Number.isFinite(He)?He:void 0},onClose:R,onBackToWallet:lr,onSubmitted:Zg,onSuccess:Xg,onFailed:Jg,onOutlink:he})},"send"):null,dh=q.useMemo(()=>wt||Wt.map(T=>{let J=jt.get(zr(T.chainId,T.address)),He=J?.price?parseFloat(J.price):void 0;return{name:T.name,symbol:T.symbol,chainId:T.chainId,address:T.address,decimals:T.quantity.decimals,balance:Uo(T.quantity.numeric,T.quantity.decimals),iconUrl:T.icon_url,priceUsd:Number.isFinite(He)?He:void 0}}),[wt,jt,Wt]),ch=N("div",{className:ve("wi-view-inner wi-bridge-body",Xr.current&&"wi-view-send"),children:N(Qo,{env:o,walletAddress:f,tokens:dh,history:rt,termsUrl:B,getQuote:$e,getToTokens:er,getApproval:At,approveBridge:Ut,submitBridge:Lt,onClose:R,onBackToWallet:lr})},"bridge"),ph=X?N("div",{className:ve("wi-view-inner wi-token-detail-body",Xr.current&&"wi-view-send"),children:N(Lf,{env:o,isMobile:i,token:X,walletAddress:f,stat:jt.get(zr(X.chainId,X.address)),tokenInfo:re.get(fa(X.chainId,X.address)),showBalance:c,onBack:pn,onClose:R,onSend:No,onOutlink:he})},"token-detail"):null,Io=q.useMemo(()=>{let T=gt[o].cross;return Wt.find(J=>J.chainId===T&&yl(J.address))??Wt.find(J=>J.chainId===T&&J.symbol.toUpperCase().includes("ONEUSD"))},[Wt,o]),uh=q.useMemo(()=>{if(Io)return Sn(Io.quantity.numeric,Io.quantity.decimals)},[Io]),fh=be?N("div",{className:ve("wi-view-inner wi-onepop-body",Xr.current&&"wi-view-send"),children:N(ls,{env:o,balanceDisplay:uh,balanceIconUrl:Io?.icon_url,isBalanceLoading:br&&!Io,summary:te,logoSrc:ge,heroSrc:ot,getTokenSlot:Ie,onBack:lr,onClose:R,onSend:je,onClaim:Se,onActivity:lt})},"onepop"):null,Ys=!!E&&p?.trim().toLowerCase()!=="my wallet",Bd=V(Xl,{children:[V("span",{className:"wi-receive-avatar",children:[N("span",{className:"wi-avatar-fallback",style:Dd}),ti&&N("img",{src:ti,alt:"",className:"wi-avatar-img",width:24,height:24,draggable:!1,onLoad:ei,onError:T=>{T.currentTarget.style.display="none"}})]}),N("span",{className:"wi-receive-account-name",children:P}),Ys&&N("span",{className:"wi-receive-chevron","data-open":oa,"aria-hidden":"true",children:N(Or,{size:16})})]}),mh=V("div",{className:ve("wi-view-inner wi-qr-body",Xr.current&&"wi-view-qr"),children:[V("div",{className:"wi-receive-section",children:[Ys?N("button",{type:"button",className:"wi-receive-account wi-receive-account--btn",onClick:()=>{aa(!0),E?.()},"aria-label":"Switch account",children:Bd}):N("div",{className:"wi-receive-account",children:Bd}),V("div",{className:"wi-qr-block",children:[V("div",{className:"wi-qr-box",children:[N(Tx,{value:f,size:180,level:"H",marginSize:2,...b&&{imageSettings:{src:b,height:33,width:33,excavate:!0}}}),!b&&N("div",{className:"wi-qr-logo",children:N(wc,{size:33})})]}),N("p",{className:"wi-qr-address",children:f})]}),V("button",{type:"button",className:"wi-qr-copy-btn",onClick:Ld,"data-track":"address_copy",children:[N("span",{className:"wi-qr-copy-icon",children:To?N(Rn,{size:16}):N(po,{size:16})}),N("span",{className:"wi-qr-copy-text",children:To?"Copied!":"Copy address"})]})]}),Pd&&N("div",{className:"wi-receive-footer",children:Pd})]},"qr"),gh=G==="qr"||G==="portfolio"||G==="send"||G==="bridge",zd=_!==null?N("div",{className:"wi-builtin-footer",children:_}):null,Fd=V("div",{className:"wi-account-text",children:[Ys?V("button",{type:"button",className:"wi-account-row wi-account-row--btn",onClick:()=>{aa(!0),E?.()},"aria-label":"Switch account","aria-expanded":oa,children:[N("span",{className:"wi-account-name",children:P}),N("span",{className:"wi-account-switch","data-open":oa,"aria-hidden":"true",children:N(Or,{size:20})})]}):N("div",{className:"wi-account-row",children:N("span",{className:"wi-account-name",children:P})}),V("button",{type:"button",className:"wi-address-row-btn",onClick:Ld,"aria-label":"Copy address","data-track":"address_copy",children:[N("span",{className:"wi-account-address",children:nr(f)}),N("span",{className:"wi-account-copy","data-copied":To,children:To?N(Rn,{size:12}):N(po,{size:12})})]})]}),Ud=V(Xl,{children:[n,G==="qr"?N("div",{className:"wi-sticky-header",children:V("div",{className:"wi-header wi-header--receive",children:[N("button",{type:"button",className:"wi-header-back",onClick:lr,"aria-label":"Back",children:N(tn,{size:24})}),N("span",{className:"wi-receive-title",children:"Receive"}),N("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close",children:N(Ir,{size:24})})]})}):G==="send"||G==="bridge"||G==="token-detail"||G==="onepop"?null:gh?V("div",{className:"wi-sticky-header",children:[V("div",{className:"wi-header wi-header--wallet wi-header--sub-account",children:[N("button",{type:"button",className:"wi-header-back",onClick:lr,"aria-label":"Back",children:N(tn,{size:24})}),N("div",{className:"wi-account-block wi-account-block--sub-account",children:Fd}),N("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close",children:N(Ir,{size:24})})]}),N("hr",{className:"wi-divider"})]}):V("div",{className:"wi-sticky-header",children:[V("div",{className:"wi-header wi-header--wallet",children:[V("div",{className:"wi-account-block",children:[V("div",{className:"wi-avatar",children:[N("div",{className:"wi-avatar-fallback",style:Dd}),ti&&N("img",{src:ti,alt:"",className:"wi-avatar-img",width:28,height:28,draggable:!1,onLoad:ei,onError:T=>{T.currentTarget.style.display="none"}})]}),Fd]}),V("div",{className:"wi-header-actions",children:[m&&y&&N("button",{type:"button",className:"wi-header-action wi-header-action--qr",onClick:na,"aria-label":"Show QR code","data-track":"receive",children:N(gi,{size:20})}),N("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close",children:N(Ir,{size:24})})]})]}),N("hr",{className:"wi-divider"})]}),V("div",{className:"wi-view-container",children:[G==="wallet"&&ih,G==="qr"&&mh,G==="portfolio"&&sh,G==="send"&&lh,G==="bridge"&&ch,G==="token-detail"&&ph,G==="onepop"&&fh]}),(G==="wallet"||G==="onepop")&&Be&&N("div",{className:"wi-action-toast",role:"status","aria-live":"polite",children:Be}),G==="wallet"&&Yt&&V("a",{className:"wi-send-toast",href:W??"#",target:"_blank",rel:"noopener noreferrer",onClick:T=>{if(!W){T.preventDefault();return}zt(T,W,{category:"send",origin:"send-transaction",payload:{chainId:Yt.chainId,txHash:Yt.txHash}},he)},children:[N("span",{className:"wi-send-toast-icon","data-status":Yt.status,"aria-hidden":!0,children:Yt.status==="pending"?N("span",{className:"wi-send-toast-spinner"}):Yt.status==="error"?N("span",{className:"wi-send-toast-error-dot"}):N(Sc,{size:20})}),V("span",{className:"wi-send-toast-copy",children:[N("span",{className:"wi-send-toast-title",children:Yt.status==="pending"?"Sending...":Yt.status==="error"?"Send failed":"Send complete"}),N("span",{className:"wi-send-toast-desc",children:Yt.status==="pending"||Yt.status==="error"?Yt.description:"Tap to see your transaction"})]})]}),zd&&G!=="portfolio"&&G!=="send"&&G!=="token-detail"&&G!=="onepop"&&N("div",{className:"wi-sticky-footer",children:N("div",{className:"wi-footer",ref:ro,children:zd})})]}),jd={...F,...Cr>0?{"--wi-footer-height":`${Cr}px`}:null},Wd=q.useCallback(T=>{let J=T.detail.originalEvent.target;J instanceof Element&&J.closest("[data-rd-shell]")!==null&&T.preventDefault()},[]);return i?N(ye,{feature:"wallet_info",children:V(ds.Portal,{children:[d&&N(ds.Overlay,{className:"wi-drawer-overlay"}),V(ds.Content,{className:ve("wi-drawer-content",r),"data-theme":a,"data-vaul-no-drag":l==="left"||l==="right"?!0:void 0,style:jd,"data-direction":l,"data-no-balance":!c||void 0,"data-has-footer":Cr>0||void 0,"data-view":G,onInteractOutside:Wd,children:[N(ds.Title,{className:"wi-sr-only",children:"My Wallet"}),Ud]})]})}):V(ye,{feature:"wallet_info",children:[d&&s&&N("div",{className:"wi-drawer-overlay",onClick:R}),N(cs.Portal,{children:N(cs.Content,{align:e,sideOffset:t,className:ve("wi-popover-content",r),"data-theme":a,style:jd,"data-no-balance":!c||void 0,"data-has-footer":Cr>0||void 0,"data-view":G,onInteractOutside:Wd,children:Ud})})]})}import*as Xf from"react";function Jf({position:e="top",children:t}){let{setNavContent:r,setNavPosition:n}=Bn();return Xf.useEffect(()=>(r(t),n(e),()=>r(null)),[t,e,r,n]),null}import*as $f from"react";function em({children:e}){let{setFooterContent:t}=Bn();return $f.useEffect(()=>(t(e),()=>t(null)),[e,t]),null}ce(`[data-theme=dark].wi-popover-content,[data-theme=dark].wi-drawer-content{--wi-primary: var(--ds-accent-primary-high, #f0640d);--wi-secondary: var(--ds-system-red-default, #e70077);--wi-surface-bg: var(--ds-bg-default, #121212);--wi-surface-default: var(--ds-surface-medium, rgba(255, 255, 255, .05));--wi-surface-subtle: var(--ds-surface-high, rgba(255, 255, 255, .1));--wi-border-default: var(--ds-border-default, rgba(255, 255, 255, .05));--wi-border-subtle: var(--ds-border-medium, rgba(255, 255, 255, .1));--wi-texticon-primary: var(--ds-content-highest, #ffffff);--wi-texticon-secondary: var(--ds-content-medium, rgba(255, 255, 255, .7));--wi-texticon-tertiary: var(--ds-content-low, rgba(255, 255, 255, .5));--wi-on-primary: var(--ds-accent-primary-on, #ffffff);--wi-error: var(--ds-system-red-default, #e70077);--wi-shadow: 0 2px 16px -2px rgba(0, 0, 0, .4)}[data-theme=light].wi-popover-content,[data-theme=light].wi-drawer-content{--wi-primary: var(--ds-accent-primary-high, #f0640d);--wi-secondary: var(--ds-system-red-default, #e70077);--wi-surface-bg: var(--ds-bg-default, #ffffff);--wi-surface-default: var(--ds-surface-medium, rgba(18, 18, 18, .05));--wi-surface-subtle: var(--ds-surface-high, rgba(18, 18, 18, .1));--wi-border-default: var(--ds-border-default, rgba(18, 18, 18, .05));--wi-border-subtle: var(--ds-border-medium, rgba(18, 18, 18, .1));--wi-texticon-primary: var(--ds-content-highest, #121212);--wi-texticon-secondary: var(--ds-content-medium, rgba(18, 18, 18, .7));--wi-texticon-tertiary: var(--ds-content-low, rgba(18, 18, 18, .5));--wi-on-primary: var(--ds-accent-primary-on, #ffffff);--wi-error: var(--ds-system-red-default, #e70077);--wi-shadow: 0 2px 16px -2px rgba(0, 0, 0, .15)}
|
|
13
|
-
`);
|
|
14
|
-
`);
|
|
15
|
-
`);ce(`.wi-popover-content{-webkit-font-smoothing:antialiased;z-index:100001;width:393px;border-radius:24px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--wi-surface-bg);box-shadow:var(--ds-shadow-modal, var(--wi-shadow));animation:wi-fade-in .15s ease-out;height:min(680px,calc(100dvh - 32px));overflow:hidden;display:flex;flex-direction:column}.wi-popover-content[data-no-balance]{height:auto}.wi-popover-content[data-has-footer]:not([data-no-balance]){height:min(calc(680px + var(--wi-footer-height, 0px)),calc(100dvh - 32px))}.wi-drawer-overlay{position:fixed;inset:0;z-index:100000;background:#0009}.wi-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;top:0;right:0;bottom:0;z-index:100001;width:100vw;max-height:100vh;background:var(--wi-surface-bg);overflow:hidden;display:flex;flex-direction:column;box-sizing:border-box}.wi-drawer-content[data-no-balance]{bottom:auto;max-height:none}.wi-drawer-content[data-no-balance][data-direction=bottom]{bottom:0;top:auto;border-radius:24px 24px 0 0}.wi-drawer-content[data-direction=left]{right:auto;left:0}.wi-drawer-content[data-direction=bottom]{top:0;left:0;right:0;width:100%;max-height:100dvh;margin:0 auto}.wi-drawer-content[data-direction=bottom][data-view=qr]{max-height:100dvh}.wi-popover-content[data-view=qr]{max-height:calc(100dvh - 32px)}.wi-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
|
-
`);import{jsx as Jl}from"react/jsx-runtime";function Bx({env:e,theme:t="dark",mobileBreakpoint:r=768,drawerDirection:n,modal:o,showBalance:a=!1,showForgeToken:i=!1,showGameToken:s=!0,showQR:l=!0,showBridge:d=!0,qrLogoSrc:c,walletAddress:h,accountName:u,sendAccounts:m,profileImageUrl:y,connectorId:b,connectorName:f,connectorIconUrl:p,preferredTokens:w=[],onSelectWallet:g,onCopyAddress:x,onBuy:k,onBuyDisabledMessage:R,onBridgeDisabledMessage:E,onSendDisabledMessage:S,onDisconnect:C,disconnectLabel:I="Disconnect",termsUrl:M=bi,termsLabel:B="Terms of Service",privacyUrl:L=wi,privacyLabel:z="Privacy Policy",open:A,onOpenChange:F,showPortfolio:ne=!1,showOnePop:K=!1,onePopSummary:_,onOnePopOpen:G,onOnePopSend:oe,onOnePopClaim:Z,onOnePopActivity:U,onePopGetTokenSlot:X,onePopLogoSrc:H,onePopHeroSrc:pe,portfolioTitle:be="My Portfolio",portfolioSections:te,showTotalAssets:ue=!0,totalAssetsLabel:je="Total Assets USD",sendTransaction:Se,getTransactionReceipt:lt,estimateGas:ge,onOutlink:Ie,lpBalanceReader:ot,stakingRewardsReader:Qe,bridgeTokens:We,bridgeHistory:Oe,getBridgeQuote:tt,getBridgeToTokens:Nt,getBridgeApproval:ut,approveBridge:xt,submitBridge:he,onReceive:Vt,onBridge:bt,onSend:wt,style:rt,children:$e}){let er=nt(e),At=b?mi[b]:void 0,Ut=f??At?.name,Lt=p??At?.iconUrl,Ve=Do(`(max-width: ${r}px)`),De=n??(a?"right":"bottom"),ft=De==="left"||De==="right",Tt=o??!1,Ce=A!==void 0,[It,qt]=Jt.useState(!1),P=Ce?A:It,Be=Jt.useCallback(_e=>{Ce||qt(_e),F?.(_e)},[Ce,F]),O=Jt.useCallback(()=>Be(!1),[Be]);On(P,O);let[ae,le]=Jt.useState(null),[me,mt]=Jt.useState("top"),[Dt,yt]=Jt.useState(null),[hr,br]=Jt.useState("wallet"),[jt,Dr]=Jt.useState(null),[sr,re]=Jt.useState(null);Jt.useEffect(()=>{P||(br("wallet"),Dr(null),re(null))},[P]),Jt.useEffect(()=>{Ao(h)},[h]);let Ne=Jt.useCallback(()=>{ul(h),C?.()},[C,h]),j=Jt.useMemo(()=>({env:er,theme:t,isMobile:Ve,open:P,drawerDirection:De,modal:Tt,showBalance:a,showForgeToken:i,showGameToken:s,showQR:l,showBridge:d,qrLogoSrc:c,walletAddress:h,accountName:u,sendAccounts:m,profileImageUrl:y,connectorName:Ut,connectorIconUrl:Lt,preferredTokens:w,close:O,onSelectWallet:g,onCopyAddress:x,onBuy:k,onBuyDisabledMessage:R,onBridgeDisabledMessage:E,onSendDisabledMessage:S,onDisconnect:C?Ne:void 0,disconnectLabel:I,termsUrl:M,termsLabel:B,privacyUrl:L,privacyLabel:z,portalStyle:rt,navContent:ae,navPosition:me,setNavContent:le,setNavPosition:mt,footerContent:Dt,setFooterContent:yt,view:hr,setView:br,selectedSendToken:jt,setSelectedSendToken:Dr,selectedDetailToken:sr,setSelectedDetailToken:re,showPortfolio:ne,showOnePop:K,onePopSummary:_,onOnePopOpen:G,onOnePopSend:oe,onOnePopClaim:Z,onOnePopActivity:U,onePopGetTokenSlot:X,onePopLogoSrc:H,onePopHeroSrc:pe,portfolioTitle:be,portfolioSections:te,showTotalAssets:ue,totalAssetsLabel:je,sendTransaction:Se,getTransactionReceipt:lt,estimateGas:ge,onOutlink:Ie,lpBalanceReader:ot,stakingRewardsReader:Qe,bridgeTokens:We,bridgeHistory:Oe,getBridgeQuote:tt,getBridgeToTokens:Nt,getBridgeApproval:ut,approveBridge:xt,submitBridge:he,onReceive:Vt,onBridge:bt,onSend:wt}),[er,t,Ve,P,De,Tt,a,i,s,l,d,c,h,u,m,y,Ut,Lt,w,O,g,x,k,R,E,S,C,Ne,I,M,B,L,z,rt,ae,me,Dt,hr,jt,sr,ne,K,_,G,oe,Z,U,X,H,pe,be,te,ue,je,Se,lt,ge,Ie,ot,Qe,We,Oe,tt,Nt,ut,xt,he,Vt,bt,wt]);return Jl(sl.Provider,{value:j,children:Ve?Jl(Ox.Root,{direction:De,open:P,onOpenChange:Be,handleOnly:ft,noBodyStyles:!0,repositionInputs:!1,children:$e},"drawer"):Jl(tm.Root,{open:P,onOpenChange:Be,children:$e},"popover")})}var Yo=Object.assign(Bx,{Trigger:lp,Content:Zf,Nav:Jf,Footer:em});import*as Ke from"react";import*as Is from"react";import{createContext as zx,useContext as Fx}from"react";var $l=zx(null);function Ea(){let e=Fx($l);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}import*as zm from"react";import{createContext as Ux,useContext as jx}from"react";var ps=Ux(null);function ln(){let e=jx(ps);if(!e)throw new Error("ResponsiveShell compound components must be used within <ResponsiveShell>");return e}import{createContext as Wx,useContext as _x,useLayoutEffect as Gx,useState as Hx}from"react";function rm(){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 ed=Wx(null);function Qx(){let e=_x(ed);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}function nm(){let e=Qx(),[t,r]=Hx(e.getSnapshot);return Gx(()=>(r(e.getSnapshot()),e.subscribe(()=>r(e.getSnapshot()))),[e]),t}ce(`.rd-root{--rd-bg: var(--ds-bg-dim, #f7f8fb);--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-text-muted: var(--ds-content-medium, #676b7a);--rd-accent: var(--ds-accent-primary-high, #5b5bf6);--rd-accent-contrast: var(--ds-accent-primary-on, #ffffff);--rd-success: var(--ds-system-green-default, #1e9e6a);--rd-success-bg: var(--ds-system-green-low, #e6f7f0);--rd-warning: #b8860b;--rd-warning-bg: #fdf3d9;--rd-danger: var(--ds-system-red-default, #d1394a);--rd-danger-bg: var(--ds-system-red-low, #fbe8ea);--rd-radius: 14px;--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06));--rd-on-accent: #ffffff;width:100%;max-width:640px;box-sizing:border-box;margin:0 auto;display:flex;flex-direction:column;gap:1.25rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:var(--rd-bg);color:var(--rd-text);-webkit-font-smoothing:antialiased;color-scheme:light dark}.rd-root[data-theme=dark]{color-scheme:dark;--rd-bg: var(--ds-bg-default, #0f1117);--rd-surface: var(--ds-surface-default, #171923);--rd-surface-alt: var(--ds-surface-medium, #1e212c);--rd-border: var(--ds-border-default, #2a2d3a);--rd-text: var(--ds-content-highest, #eef0f6);--rd-text-muted: var(--ds-content-medium, #9498a8);--rd-accent: var(--ds-accent-primary-high, #8181ff);--rd-accent-contrast: var(--ds-accent-primary-on, #0f1117);--rd-success: var(--ds-system-green-default, #3fd68f);--rd-success-bg: var(--ds-system-green-low, #123626);--rd-warning: #e0b23c;--rd-warning-bg: #3a2f10;--rd-danger: var(--ds-system-red-default, #ff6b7a);--rd-danger-bg: var(--ds-system-red-low, #3a1418);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35))}.rd-root[data-theme=light]{color-scheme:light;--rd-bg: var(--ds-bg-dim, #f7f8fb);--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-text-muted: var(--ds-content-medium, #676b7a);--rd-accent: var(--ds-accent-primary-high, #5b5bf6);--rd-accent-contrast: var(--ds-accent-primary-on, #ffffff);--rd-success: var(--ds-system-green-default, #1e9e6a);--rd-success-bg: var(--ds-system-green-low, #e6f7f0);--rd-warning: #b8860b;--rd-warning-bg: #fdf3d9;--rd-danger: var(--ds-system-red-default, #d1394a);--rd-danger-bg: var(--ds-system-red-low, #fbe8ea);--rd-radius: 14px;--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06))}.rd-root *{box-sizing:border-box}.rd-card{background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:var(--rd-radius);box-shadow:var(--rd-shadow);padding:1.25rem;display:flex;flex-direction:column;gap:.9rem}.rd-card-header{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.rd-card-title{font-size:1rem;font-weight:650;margin:0}.rd-card-hint{font-size:.8rem;color:var(--rd-text-muted)}.rd-token-address{display:flex;flex-direction:column;gap:.1rem}.rd-token-address-addr{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.78rem;color:var(--rd-text);overflow-wrap:anywhere;user-select:all}.rd-token-address-meta{font-size:.72rem;color:var(--rd-text-muted)}.rd-field{display:flex;flex-direction:column;gap:.35rem}.rd-field-label{font-size:.69rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-root .rd-field-label-row{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.rd-root .rd-token-explorer-link{font-size:.75rem;font-weight:500;color:var(--rd-accent);text-decoration:none;white-space:nowrap}.rd-root .rd-token-explorer-link:hover{text-decoration:underline}.rd-field-row{display:grid;grid-template-columns:1fr 1fr;gap:.625rem}.rd-root select,.rd-root input[type=text],.rd-root input[type=number]{width:100%;padding:.6rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:16px;font-family:inherit}.rd-root select:focus,.rd-root input:focus{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-dropdown{position:relative;min-width:0}.rd-root .rd-dropdown-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.55rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:.9rem;font-family:inherit;font-weight:600;text-align:left;cursor:pointer}.rd-root .rd-static-target{display:flex;align-items:center;gap:.55rem;padding:.55rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:.9rem;font-weight:600;min-width:0;overflow-wrap:anywhere}.rd-root .rd-dropdown-trigger:disabled{cursor:not-allowed}.rd-dropdown-trigger:focus,.rd-dropdown-trigger:focus-visible{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-dropdown-trigger-content{display:flex;align-items:center;gap:.55rem;min-width:0}.rd-dropdown-trigger-label{display:flex;flex-direction:column;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.2}.rd-dropdown-trigger-sub{font-size:.66rem;font-weight:500;line-height:1.3;color:var(--rd-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-dropdown-chevron{display:inline-flex;flex:none;color:var(--rd-text-muted);line-height:1}.rd-dropdown-popover{z-index:100002;width:var(--radix-popover-trigger-width);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-accent: var(--ds-system-orange-default, #5b5bf6);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06))}.rd-dropdown-popover[data-theme=dark]{color-scheme:dark;--rd-surface: var(--ds-surface-default, #171923);--rd-surface-alt: var(--ds-surface-medium, #1e212c);--rd-border: var(--ds-border-default, #2a2d3a);--rd-text: var(--ds-content-highest, #eef0f6);--rd-accent: var(--ds-system-orange-default, #8181ff);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35))}.rd-dropdown-popover *{box-sizing:border-box}.rd-dropdown-listbox{margin:0;padding:.3rem;list-style:none;max-height:min(15rem,var(--radix-popover-content-available-height, 15rem));overflow-y:auto;overscroll-behavior:contain;background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:10px;box-shadow:var(--rd-shadow);font-family:inherit;color:var(--rd-text)}.rd-dropdown-option{display:flex;align-items:center;gap:.55rem;padding:.5rem .6rem;border-radius:8px;font-size:.9rem;color:var(--rd-text);cursor:pointer}.rd-dropdown-option-active{background:var(--rd-surface-alt)}.rd-dropdown-option-selected{font-weight:650}.rd-dropdown-option-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-dropdown-option-check{flex:none;color:var(--rd-accent);font-size:.8rem}.rd-amount-input{display:flex;align-items:baseline;gap:.5rem;padding:.6rem .75rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt)}.rd-amount-input:focus-within{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-amount-input[data-rd-invalid]{border-color:var(--rd-danger)}.rd-root .rd-amount-input input[type=text]{flex:1 1 auto;width:auto;min-width:0;padding:0;border:0;border-radius:0;background:none;font-size:22px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.2}.rd-root .rd-amount-input input[type=text]:focus{outline:none}.rd-amount-input-suffix{flex:none;font-size:.8rem;font-weight:700;color:var(--rd-text-muted);pointer-events:none}.rd-root .rd-amount-input-max{flex:none;padding:0;font-size:.69rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--rd-accent);background:transparent;border:0;border-radius:0;cursor:pointer;line-height:1}.rd-amount-input-max:hover:not(:disabled){text-decoration:underline}.rd-amount-input-max:disabled{opacity:.5;cursor:not-allowed}.rd-amount-meta{display:flex;align-items:baseline;justify-content:space-between;gap:.75rem;font-size:.75rem;color:var(--rd-text-muted);padding:0 .15rem;font-variant-numeric:tabular-nums}.rd-root button{font-family:inherit;font-size:.95rem;font-weight:650;border-radius:10px;border:1px solid transparent;padding:.7rem 1.1rem;cursor:pointer;transition:opacity .12s ease,transform .12s ease}.rd-root button:active:not(:disabled){transform:translateY(1px)}.rd-root button:disabled{cursor:not-allowed;opacity:.55}.rd-button-primary{background:var(--rd-accent);color:var(--rd-accent-contrast)}.rd-button-secondary{background:var(--rd-surface-alt);color:var(--rd-text);border-color:var(--rd-border)}.rd-button-block{width:100%}.rd-callout{border-radius:10px;padding:.65rem .85rem;font-size:.85rem;line-height:1.4}.rd-callout-warning{background:var(--rd-warning-bg);color:var(--rd-warning)}.rd-callout-danger{background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-callout-success{background:var(--rd-success-bg);color:var(--rd-success)}.rd-callout-muted{background:var(--rd-surface-alt);color:var(--rd-text-muted)}.rd-quote-strip{display:flex;align-items:center;justify-content:space-between;gap:.625rem;padding:.7rem .85rem;border-radius:14px;background:color-mix(in srgb,var(--rd-accent) 10%,var(--rd-surface));border:1px solid color-mix(in srgb,var(--rd-accent) 35%,transparent)}.rd-quote-strip-side{display:flex;flex-direction:column;min-width:0;gap:.1rem;font-size:.9rem;font-weight:700;color:var(--rd-text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.rd-quote-strip-end{text-align:right;align-items:flex-end}.rd-quote-strip-side small{font-size:.69rem;font-weight:600;color:var(--rd-text-muted);letter-spacing:.02em}.rd-quote-strip-arrow{flex:none;color:var(--rd-accent);font-weight:800}.rd-quote-strip-hint{font-size:.72rem;line-height:1.45;color:var(--rd-text-muted);padding:0 .15rem}.rd-deposit-address{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr auto;align-items:start;gap:.7rem;min-height:172px;background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:16px;box-shadow:var(--rd-shadow);padding:.85rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px;color:var(--rd-text-muted)}.rd-deposit-address-label{grid-column:1;grid-row:1;position:relative;display:inline-flex;align-items:center;gap:.35rem;width:fit-content;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.rd-root button.rd-address-term{position:static;width:auto;height:auto;display:inline;padding:0 0 2px;border:0;border-bottom:1px dotted currentColor;border-radius:0;background:transparent;color:var(--rd-text-muted);font:700 .69rem/1 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;letter-spacing:.08em;text-transform:uppercase}.rd-root button.rd-address-term:hover,.rd-root button.rd-address-term:focus-visible{color:var(--rd-accent);outline:none}.rd-address-tooltip{position:absolute;z-index:20;top:calc(100% + 8px);left:0;width:min(250px,calc(100vw - 48px));padding:9px 11px;border:1px solid var(--rd-border);border-radius:10px;background:var(--rd-surface);box-shadow:var(--rd-shadow);color:var(--rd-text);font-size:11.5px;font-weight:500;line-height:1.45;letter-spacing:normal;text-align:left;text-transform:none;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-3px);transition:opacity .12s ease,transform .12s ease,visibility .12s ease}.rd-address-term:hover .rd-address-tooltip,.rd-address-term:focus .rd-address-tooltip,.rd-address-term:focus-visible .rd-address-tooltip{opacity:1;visibility:visible;transform:translateY(0)}.rd-address-full{grid-column:1 / -1;grid-row:2;align-self:center;min-width:0;color:var(--rd-text);font-weight:600;line-height:1.55;overflow-wrap:anywhere;word-break:break-all}.rd-root .rd-address-copy{grid-column:1 / -1;grid-row:3;width:100%;min-height:36px;display:inline-flex;align-items:center;justify-content:center;gap:.4rem;margin:0;padding:.5rem .7rem;border-radius:10px;border:0;background:var(--rd-accent);color:var(--rd-accent-contrast);font-family:inherit;font-size:.75rem;font-weight:800;letter-spacing:.03em;line-height:1}.rd-root .rd-address-copy svg{flex:none}.rd-root .rd-address-copy:hover:not(:disabled){opacity:.92}.rd-root button.rd-mobile-qr-toggle,.rd-root button.rd-mobile-address-toggle{display:none;place-items:center;width:34px;height:34px;padding:0;border:1px solid color-mix(in srgb,var(--rd-accent) 24%,var(--rd-border));border-radius:11px;background:color-mix(in srgb,var(--rd-accent) 10%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 1px 2px color-mix(in srgb,var(--rd-text) 8%,transparent);transition:transform .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}.rd-root button.rd-mobile-qr-toggle{grid-column:2;grid-row:1;justify-self:end;align-self:start}.rd-root button.rd-mobile-address-toggle{position:absolute;z-index:2;top:.85rem;right:.85rem;background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:0 4px 14px color-mix(in srgb,var(--rd-text) 16%,transparent)}.rd-root button.rd-mobile-qr-toggle:hover:not(:disabled),.rd-root button.rd-mobile-address-toggle:hover:not(:disabled){border-color:color-mix(in srgb,var(--rd-accent) 45%,var(--rd-border));color:var(--rd-accent);background:color-mix(in srgb,var(--rd-accent) 15%,var(--rd-surface));box-shadow:0 5px 16px color-mix(in srgb,var(--rd-accent) 18%,transparent);transform:translateY(-1px)}.rd-root button.rd-mobile-qr-toggle:active:not(:disabled),.rd-root button.rd-mobile-address-toggle:active:not(:disabled){transform:scale(.96)}.rd-deposit-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.9rem;container:rd-deposit-head / inline-size}.rd-deposit-head>.rd-deposit-qr-pane{flex:none}.rd-deposit-head>.rd-deposit-address{flex:1 1 12rem;min-width:0}@container rd-deposit-head (max-width: 23.75rem){.rd-deposit-head>.rd-deposit-address{flex-basis:100%;width:100%}.rd-deposit-head>.rd-skeleton-qr{display:none}.rd-deposit-head>.rd-skeleton-address{flex-basis:100%;width:100%}.rd-root button.rd-mobile-qr-toggle,.rd-root button.rd-mobile-address-toggle{display:grid}.rd-deposit-head[data-compact-view=address]>.rd-deposit-qr-pane,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-address{display:none}.rd-deposit-head[data-compact-view=address]>.rd-deposit-address,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane{animation:rd-compact-pane-in .26s cubic-bezier(.22,1,.36,1)}.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane{width:100%}}@keyframes rd-compact-pane-in{0%{opacity:0;transform:translateY(6px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}.rd-deposit-qr{position:relative;display:grid;place-items:center;width:172px;height:172px;background:#fff;border-radius:16px;border:1px solid var(--rd-border);box-shadow:var(--rd-shadow);margin:0 auto}.rd-deposit-qr-pane{position:relative;display:grid;place-items:center;min-height:172px}.rd-deposit-qr-badge{position:absolute;inset:0;margin:auto;width:36px;height:36px;display:grid;place-items:center;background:#fff;border-radius:50%;pointer-events:none}.rd-stepper{display:flex;flex-direction:column;gap:0}.rd-stepper-item{display:flex;gap:.75rem;position:relative;padding-bottom:1.25rem}.rd-stepper-item:last-child{padding-bottom:0}.rd-stepper-rail{display:flex;flex-direction:column;align-items:center}.rd-stepper-dot{width:22px;height:22px;border-radius:50%;border:2px solid var(--rd-border);background:var(--rd-surface);display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:700;flex:none;color:var(--rd-text-muted)}.rd-stepper-item-done .rd-stepper-dot{background:var(--rd-success);border-color:var(--rd-success);color:var(--rd-on-accent)}.rd-stepper-item-active .rd-stepper-dot{border-color:var(--rd-accent);color:var(--rd-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-accent) 20%,transparent)}.rd-stepper-line{flex:1;width:2px;background:var(--rd-border);margin:2px 0}.rd-stepper-item-done .rd-stepper-line{background:var(--rd-success)}.rd-stepper-body{padding-top:1px}.rd-stepper-label{font-weight:600;font-size:.9rem}.rd-stepper-item-pending .rd-stepper-label{color:var(--rd-text-muted)}.rd-stepper-meta{margin-top:.25rem;font-size:.78rem;color:var(--rd-text-muted);display:flex;flex-direction:column;gap:.15rem}.rd-stepper-meta a{color:var(--rd-accent);text-decoration:none}.rd-stepper-meta a:hover{text-decoration:underline}.rd-status-pill{display:inline-flex;align-items:center;gap:.35rem;font-size:.75rem;font-weight:650;padding:.2rem .55rem;border-radius:999px;background:var(--rd-surface-alt);color:var(--rd-text-muted);width:fit-content}.rd-status-pill-success{background:var(--rd-success-bg);color:var(--rd-success)}.rd-status-pill-failure{background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-spinner{display:inline-block;width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:rd-spin .7s linear infinite;vertical-align:-.15em}@keyframes rd-spin{to{transform:rotate(360deg)}}.rd-muted{color:var(--rd-text-muted)}.rd-settings-row{display:flex;justify-content:flex-end}.rd-root .rd-icon-button{position:relative;display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border-radius:50%;border:1px solid var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted)}.rd-root .rd-icon-button:hover:not(:disabled){color:var(--rd-text);background:var(--rd-surface-alt)}.rd-recovery-badge{position:absolute;top:-.3rem;right:-.3rem;display:flex;align-items:center;justify-content:center;min-width:1.05rem;height:1.05rem;padding:0 .25rem;border-radius:999px;background:var(--rd-danger, #d1394a);color:#fff;font-size:.65rem;font-weight:700;line-height:1;border:2px solid var(--rd-surface, #ffffff)}.rd-recover-group{display:flex;flex-direction:column;gap:.75rem}.rd-recover-group+.rd-recover-group{border-top:1px solid var(--rd-border);padding-top:1rem;margin-top:.5rem}.rd-recover-group-label{margin:0;font-size:.8rem;color:var(--rd-text-muted)}.rd-recover-made-of{display:block;padding:.65rem .8rem;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:10px}.rd-recover-made-of-label{cursor:pointer;font-size:.72rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-recover-made-of-body{display:flex;flex-direction:column;gap:.4rem;margin-top:.6rem}.rd-error-details{margin-top:-.4rem;padding:0 .15rem;color:var(--rd-text-muted);font-size:.72rem}.rd-error-details summary{width:max-content;cursor:pointer;list-style:none;font-weight:600}.rd-error-details summary::-webkit-details-marker{display:none}.rd-error-details summary:before{display:inline-block;margin-right:.35rem;content:"\\203a";transition:transform .12s ease}.rd-error-details[open] summary:before{transform:rotate(90deg)}.rd-error-log{position:relative;margin-top:.5rem}.rd-root button.rd-error-copy{position:absolute;z-index:1;top:.45rem;right:.45rem;display:inline-flex;align-items:center;justify-content:center;width:1.65rem;height:1.65rem;padding:0;border:1px solid var(--rd-border);border-radius:6px;background:var(--rd-surface);color:var(--rd-text-muted)}.rd-root button.rd-error-copy:hover:not(:disabled){background:var(--rd-surface-alt);color:var(--rd-text)}.rd-error-details code{display:block;max-height:6rem;overflow:auto;padding:.6rem 2.7rem .6rem .7rem;border:1px solid var(--rd-border);border-radius:8px;background:var(--rd-surface-alt);color:var(--rd-text-muted);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.68rem;line-height:1.45;overflow-wrap:anywhere;scrollbar-color:var(--rd-border) transparent;scrollbar-width:thin;white-space:pre-wrap}.rd-error-details code::-webkit-scrollbar{width:4px;height:4px}.rd-error-details code::-webkit-scrollbar-thumb{border-radius:999px;background:var(--rd-border)}.rd-token-list{display:flex;flex-direction:column;gap:.5rem}.rd-token-row{display:flex;align-items:center;gap:10px;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;padding:12px 14px}.rd-token-row-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;overflow-wrap:anywhere}.rd-token-row-symbol{font-weight:700}.rd-token-row-amount{font-variant-numeric:tabular-nums;font-size:14px;font-weight:700;color:var(--rd-text);white-space:nowrap}.rd-token-row-status{font-size:11.5px;line-height:1.45;color:var(--rd-text-muted)}.rd-token-row-warn{font-size:11.5px;line-height:1.45;color:var(--rd-warning)}.rd-token-row-warn b{font-weight:750;font-variant-numeric:tabular-nums}.rd-token-row-step{font-size:11.5px;line-height:1.45;font-weight:650;color:var(--rd-accent)}.rd-root .rd-token-row-action{flex:none;width:auto;padding:9px 16px;font-size:13px;font-weight:700}.rd-token-row-spinner{flex:none;font-size:18px;color:var(--rd-accent)}.rd-recover-sum{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;padding:16px 14px;container:rd-recover-sum / inline-size}.rd-recover-sum-label{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-recover-sum-value{max-width:100%;overflow:hidden;font-size:22px;font-size:clamp(18px,7cqi,28px);font-weight:800;line-height:1.15;font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap;color:var(--rd-text)}.rd-recover-sum-unit{display:block;margin:.35rem 0 0;font-size:15px;font-weight:700;color:var(--rd-text-muted)}.rd-recover-sum-empty{font-size:17px;font-weight:700;color:var(--rd-text-muted)}.rd-recover-empty{display:flex;min-height:min(20rem,48vh);flex:1 1 auto;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;padding:2.5rem 1.5rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 11%,transparent),transparent 48%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-recover-empty-icon{display:grid;width:4.25rem;height:4.25rem;place-items:center;margin-bottom:.2rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-recover-empty[data-variant=unavailable] .rd-recover-empty-icon{border-color:var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:none}.rd-recover-empty-title,.rd-recover-sum-value.rd-recover-empty-title{max-width:100%;margin:0;overflow:visible;color:var(--rd-text);font-size:1.15rem;font-weight:750;line-height:1.35;white-space:normal}.rd-recover-empty-copy{max-width:23rem;margin:0;color:var(--rd-text-muted);font-size:.82rem;line-height:1.55;text-wrap:balance}.rd-root button.rd-recover-empty-refresh{display:inline-flex;min-height:2.6rem;align-items:center;justify-content:center;gap:.45rem;margin-top:.45rem;padding:.65rem 1rem;color:var(--rd-text);font-size:.82rem}.rd-root button.rd-recover-empty-refresh:hover:not(:disabled){border-color:color-mix(in srgb,var(--rd-accent) 35%,var(--rd-border));background:color-mix(in srgb,var(--rd-accent) 9%,var(--rd-surface));color:var(--rd-accent)}[data-rd-recover-funds].rd-stack{flex:1 1 auto}.rd-recover-foot{margin-top:auto;padding-top:.5rem;text-align:center;font-size:11.5px;line-height:1.45;color:var(--rd-text-muted)}.rd-history-table{display:flex;min-width:0;flex-direction:column;gap:.6rem;font-size:.875rem}.rd-history-empty{display:flex;min-height:min(20rem,48vh);flex:1 1 auto;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;padding:2.5rem 1.5rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 10%,transparent),transparent 48%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-history-empty-icon{display:grid;width:4.25rem;height:4.25rem;place-items:center;margin-bottom:.2rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-history-empty[data-variant=disconnected] .rd-history-empty-icon{border-color:var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:none}.rd-history-empty-title{margin:0;color:var(--rd-text);font-size:1.15rem;font-weight:750;line-height:1.35}.rd-history-empty-copy{max-width:22rem;margin:0;color:var(--rd-text-muted);font-size:.82rem;line-height:1.55;text-wrap:balance}.rd-history-empty-live{display:inline-flex;align-items:center;gap:.4rem;margin-top:.35rem;color:var(--rd-text-muted);font-size:.72rem;font-weight:650}.rd-history-empty-live>span{width:.45rem;height:.45rem;border-radius:50%;background:var(--rd-success);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-success) 15%,transparent)}.rd-history-group{min-width:0;max-width:100%;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;overflow:hidden}.rd-history-row-button{width:100%;min-width:0;display:flex;flex-direction:column;gap:.75rem;padding:1rem;background:none;border:none;border-radius:inherit;color:inherit;font:inherit;text-align:left;cursor:pointer}.rd-history-row-button[aria-expanded=true]{border-radius:12px 12px 0 0}.rd-history-row-button:hover{background:color-mix(in srgb,var(--rd-border) 30%,transparent)}.rd-history-row-button:focus-visible{outline:2px solid var(--rd-accent);outline-offset:-2px}.rd-history-card-top{display:flex;align-items:center;gap:.5rem;min-width:0}.rd-history-card-top>.rd-status-pill{margin-left:auto;flex:none}.rd-history-card-top>.rd-status-pill:not(.rd-status-pill-success):not(.rd-status-pill-failure){background:color-mix(in srgb,var(--rd-accent) 12%,transparent);color:var(--rd-accent)}.rd-history-asset{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-history-card-amounts{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:.75rem;padding:.75rem;border-radius:10px;background:var(--rd-surface)}.rd-history-amount-block{display:flex;max-width:100%;flex-direction:column;gap:.15rem;min-width:0}.rd-history-amount-block:last-child{align-items:flex-end;text-align:right}.rd-history-amount-label{color:var(--rd-text-muted);font-size:.68rem;font-weight:650;line-height:1.2}.rd-history-num{max-width:100%;overflow:hidden;font-variant-numeric:tabular-nums;font-size:.875rem;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.rd-history-num[data-full-value],.rd-history-step-amount[data-full-value]{cursor:help}[data-rd-history-floating-tooltip]{position:fixed;z-index:100100;width:max-content;max-width:calc(100vw - 1.5rem);padding:.45rem .65rem;border:1px solid;border-radius:8px;font-size:.72rem;font-weight:600;line-height:1.35;text-align:left;white-space:normal;overflow-wrap:anywhere;pointer-events:none}.rd-history-card-arrow{display:inline-flex;align-items:center;justify-content:center;color:var(--rd-text-muted);font-size:.85rem}.rd-history-received{color:var(--rd-success)}.rd-history-received-estimate{color:var(--rd-text-muted);font-weight:600}.rd-history-card-foot{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.rd-history-date{color:var(--rd-text-muted);font-size:.78rem;font-variant-numeric:tabular-nums}.rd-history-chevron{display:inline-flex;flex:none;align-items:center;justify-content:center;color:var(--rd-text-muted);text-align:center;transition:transform .16s ease}.rd-history-row-button[aria-expanded=true] .rd-history-chevron{transform:rotate(180deg)}.rd-history-detail{display:flex;min-width:0;flex-direction:column;gap:.375rem;padding:.65rem .9rem .8rem;border-top:1px solid var(--rd-border)}.rd-history-step{display:grid;min-width:0;grid-template-columns:.5rem auto 1fr auto auto;gap:.5rem;align-items:center}.rd-history-step-dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--rd-border)}.rd-history-step-dot-done{background:var(--rd-success)}.rd-history-step-label{font-weight:600}.rd-history-step-chain{color:var(--rd-text-muted)}.rd-history-step-amount{font-variant-numeric:tabular-nums;color:var(--rd-text-muted)}.rd-history-step-tx{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.rd-history-step-shared{margin-left:.4rem;color:var(--rd-text-muted);font-size:.72rem}.rd-skeleton{border-radius:10px;background:linear-gradient(90deg,var(--rd-surface-alt) 25%,color-mix(in srgb,var(--rd-surface-alt) 55%,var(--rd-surface)) 42%,var(--rd-surface-alt) 60%);background-size:220% 100%;animation:rd-skeleton-wave 1.4s ease-in-out infinite}@keyframes rd-skeleton-wave{0%{background-position:130% 0}to{background-position:-90% 0}}@media(prefers-reduced-motion:reduce){.rd-skeleton,.rd-checklist-status,.rd-deposit-head[data-compact-view=address]>.rd-deposit-address,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane,.rd-checklist-status-waiting .rd-checklist-status-dot,.rd-checklist-status-detected .rd-checklist-status-dot{animation:none}}.rd-skeleton-form{display:flex;flex-direction:column;gap:.85rem}.rd-skeleton-qr{flex:none;width:172px;height:172px;border-radius:16px}.rd-skeleton-address{flex:1 1 12rem;min-width:0;height:172px;border-radius:16px}.rd-skeleton-line{height:.9rem;width:40%}.rd-skeleton-field{height:48px}.rd-skeleton-notice{height:96px}.rd-skeleton-cta{height:48px}.rd-wizard{flex:1 1 auto;min-height:0;overflow-y:auto;container:rd-wizard / inline-size;padding:1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom,0px));scroll-padding:1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom,0px));overscroll-behavior:contain;-webkit-overflow-scrolling:touch;max-width:none;gap:.85rem}.rd-deposit-tabs{--rd-tab-count: 3;--rd-active-tab-index: 0;position:sticky;top:-1rem;z-index:2;display:flex;flex:0 0 auto;justify-content:space-around;margin:-1rem -1.25rem 0;padding:1rem 1.25rem 0;border-bottom:1px solid var(--rd-border);background:var(--rd-surface)}.rd-deposit-tabs[data-active-index="1"]{--rd-active-tab-index: 1}.rd-deposit-tabs[data-active-index="2"]{--rd-active-tab-index: 2}.rd-deposit-tabs:after{position:absolute;bottom:-1px;left:1.25rem;width:calc((100% - 2.5rem) / var(--rd-tab-count));height:2px;background:var(--rd-accent);content:"";pointer-events:none;transform:translate(calc(var(--rd-active-tab-index) * 100%));transition:transform .22s cubic-bezier(.22,1,.36,1),width .18s ease}.rd-root .rd-deposit-tab{position:relative;display:inline-flex;flex:1 1 0;min-width:0;min-height:2.75rem;align-items:center;justify-content:center;gap:.4rem;padding:.85rem .35rem;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--rd-text-muted);font:inherit;font-size:.875rem;font-weight:650;line-height:1.2;transition:border-color .16s ease,background-color .16s ease,color .16s ease}.rd-root .rd-deposit-tab[data-active=true]{color:var(--rd-text)}.rd-root .rd-deposit-tab:hover:not(:disabled),.rd-root .rd-deposit-tab:focus-visible{outline:none;background:color-mix(in srgb,var(--rd-accent) 7%,transparent);color:var(--rd-text)}.rd-deposit-tab>.rd-recovery-badge{position:static;flex:none;min-width:1rem;height:1rem;padding:0 .2rem;border-width:0}.rd-deposit-tab-panel{display:flex;min-width:0;flex:1 1 auto;flex-direction:column;gap:.85rem;transform-origin:top center;animation:rd-deposit-tab-in .18s cubic-bezier(.22,1,.36,1)}@keyframes rd-deposit-tab-in{0%{opacity:0;transform:translateY(.35rem)}to{opacity:1;transform:translateY(0)}}.rd-stack{display:flex;min-width:0;flex-direction:column;gap:.75rem}.rd-wizard-header{display:flex;align-items:center;gap:.5rem;margin-bottom:0}.rd-wizard-heading{font-size:1rem;font-weight:700;color:var(--rd-text);margin:0}.rd-wizard-actions{margin-left:auto;display:flex;align-items:center;gap:.25rem}.rd-min-notice-pending{color:var(--rd-text-muted)}.rd-min-notice-pending b{font-weight:750;color:var(--rd-warning);font-variant-numeric:tabular-nums}.rd-locked-card{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1.25rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 12%,transparent),transparent 52%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-locked-glyph{display:grid;width:3rem;height:3rem;place-items:center;margin-bottom:.1rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);line-height:0;box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-locked-title{margin:0;color:var(--rd-text);font-size:1rem;font-weight:750;line-height:1.3}.rd-locked-text{max-width:22rem;margin:0;color:var(--rd-text-muted);font-size:.8rem;line-height:1.45}.rd-locked-card>.rd-card-hint{max-width:22rem;margin:-.2rem 0 0;text-wrap:balance}.rd-root button.rd-locked-action{display:inline-flex;width:min(18rem,100%);min-height:2.6rem;align-items:center;justify-content:center;gap:.5rem;margin-top:.25rem}.rd-delivery-recipient{display:flex;flex-direction:column;gap:.3rem;margin-top:.5rem}.rd-checklist-credit{font-size:clamp(10px,2.7vw,11.5px);white-space:nowrap}.rd-checklist{background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:14px;padding:11px 14px;display:flex;flex-direction:column;gap:7px}.rd-checklist-row{display:flex;align-items:flex-start;gap:.5rem;font-size:12.5px;line-height:1.5;color:var(--rd-text)}.rd-checklist-row[data-rd-checklist-only]{align-items:center;white-space:nowrap;font-size:clamp(10.5px,2.8vw,12.5px)}.rd-checklist-mark{flex:none;width:1.05rem;text-align:center;font-weight:800;color:var(--rd-text-muted)}.rd-checklist-mark-warn{color:var(--rd-warning)}.rd-checklist-accent{color:var(--rd-accent);font-weight:750;font-variant-numeric:tabular-nums}.rd-checklist-status{min-height:54px;display:flex;align-items:center;gap:.65rem;padding:10px 12px;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:12px;background:var(--rd-surface-alt);color:var(--rd-text-muted);font-size:12.5px;line-height:1.45;transform-origin:top center;animation:rd-status-enter .48s cubic-bezier(.22,1,.36,1)}.rd-checklist-status-waiting,.rd-checklist-status-detected{border-color:color-mix(in srgb,var(--rd-warning) 42%,var(--rd-border));box-shadow:0 0 0 1px color-mix(in srgb,var(--rd-warning) 10%,transparent)}@keyframes rd-status-enter{0%{opacity:0;transform:translateY(-10px) scale(.985);box-shadow:0 0 color-mix(in srgb,var(--rd-accent) 28%,transparent)}65%{opacity:1;transform:translateY(1px) scale(1);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-accent) 16%,transparent)}to{opacity:1;transform:translateY(0);box-shadow:0 0 0 0 transparent}}.rd-checklist-status-dot{flex:none;width:9px;height:9px;border-radius:50%;background:var(--rd-warning);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-warning) 14%,transparent)}.rd-checklist-status-waiting .rd-checklist-status-dot,.rd-checklist-status-detected .rd-checklist-status-dot{animation:rd-status-breathe 1.8s ease-in-out infinite}@keyframes rd-status-breathe{0%,to{opacity:.82;transform:scale(.96);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-warning) 10%,transparent)}50%{opacity:1;transform:scale(1);box-shadow:0 0 0 5px color-mix(in srgb,var(--rd-warning) 15%,transparent)}}.rd-checklist-status-funded,.rd-checklist-status-processing{color:var(--rd-text);border-color:color-mix(in srgb,var(--rd-accent) 40%,transparent)}.rd-checklist-status-funded .rd-checklist-status-dot,.rd-checklist-status-processing .rd-checklist-status-dot{background:var(--rd-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-accent) 14%,transparent)}.rd-checklist-status-completed{border-color:color-mix(in srgb,var(--rd-success) 40%,transparent);background:var(--rd-success-bg);color:var(--rd-success)}.rd-checklist-status-completed .rd-checklist-status-dot{background:var(--rd-success);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-success) 14%,transparent)}.rd-checklist-status-failed{border-color:color-mix(in srgb,var(--rd-danger) 40%,transparent);background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-checklist-status-failed .rd-checklist-status-dot{background:var(--rd-danger);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-danger) 14%,transparent)}@container rd-wizard (max-width: 30rem){.rd-recover-sum{padding-inline:.75rem}.rd-recover-sum-value{font-size:clamp(1rem,6cqi,1.5rem)}[data-rd-recover-funds] .rd-callout,.rd-token-row-status,.rd-token-row-warn,.rd-token-row-step,.rd-recover-foot{overflow-wrap:anywhere}.rd-token-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;padding:.875rem}.rd-root .rd-token-row-action{width:100%;min-height:2.75rem;grid-column:1 / -1}.rd-token-row-spinner{grid-column:1 / -1;justify-self:center}}@container rd-wizard (max-width: 24rem){.rd-history-card-top{flex-direction:column;align-items:flex-start}.rd-history-card-top>.rd-status-pill{max-width:100%;margin-left:0;white-space:normal}.rd-history-asset{overflow:visible;text-overflow:clip;white-space:normal}.rd-history-card-amounts{grid-template-columns:minmax(0,1fr);gap:.45rem}.rd-history-amount-block{width:100%}.rd-history-amount-block:last-child{align-items:flex-start;text-align:left}.rd-history-card-arrow{display:inline-flex;justify-self:center;margin:0;transform:rotate(90deg);transform-origin:center}.rd-history-card-foot{align-items:flex-start}.rd-history-date{min-width:0;line-height:1.4;overflow-wrap:anywhere}.rd-history-step{grid-template-columns:.5rem minmax(0,1fr);grid-template-areas:"dot label" ". chain" ". amount" ". tx";column-gap:.5rem;row-gap:.25rem;align-items:start;padding-block:.65rem;line-height:1.35}.rd-history-step+.rd-history-step{border-top:1px solid var(--rd-border)}.rd-history-step-dot{grid-area:dot;margin-top:.35rem}.rd-history-step-label{grid-area:label}.rd-history-step-chain{grid-area:chain}.rd-history-step-amount{grid-area:amount}.rd-history-step-tx{grid-area:tx;min-width:0;max-width:100%}.rd-history-step-tx a{overflow-wrap:anywhere}.rd-history-step-shared{display:block;margin:.15rem 0 0}.rd-history-step>.rd-muted{grid-area:tx}}@container rd-wizard (max-width: 22rem){.rd-root .rd-deposit-tab{gap:.2rem;padding-inline:.15rem;font-size:.8rem}.rd-history-row-button,.rd-history-detail{padding-inline:.75rem}}@media(prefers-reduced-motion:reduce){.rd-deposit-tabs:after,.rd-root .rd-deposit-tab{transition:none}.rd-deposit-tab-panel{animation:none}}
|
|
19
|
-
`);import{jsx as qn,jsxs as dn}from"react/jsx-runtime";function om({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?dn("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:[qn("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),qn("span",{children:n})]},`live:${t.phase}:${n}`):e.remaining!==void 0?dn("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:[qn("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),dn("span",{children:["Waiting for"," ",dn("b",{children:[e.remaining," ",e.symbol]})," ","more to arrive at the processing address."]})]},`pending:${e.remaining}:${e.symbol}`):null}function am({minNotice:e,onlySend:t,showWalletCreditNote:r=!1}){return dn("div",{className:"rd-checklist","data-rd-checklist":"",children:[dn("div",{className:"rd-checklist-row","data-rd-checklist-only":"",children:[qn("span",{className:"rd-checklist-mark rd-checklist-mark-warn","aria-hidden":"true",children:"!"}),dn("span",{children:[dn("b",{children:[t.chainName," ",t.symbol," only"]})," \xB7 ",dn("b",{className:"rd-checklist-accent",children:[e.min," ",e.symbol," minimum"]})]})]}),dn("div",{className:"rd-checklist-row",children:[qn("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u21BB"}),qn("span",{children:"Reusable \u2014 deposit as many times as you like"})]}),r&&dn("div",{className:"rd-checklist-row rd-checklist-credit","data-rd-checklist-credit":"",children:[qn("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u2192"}),qn("span",{children:"Credited to your ONEchain wallet"})]})]})}import{useEffect as nv,useId as ov,useState as lm}from"react";var Ma="0x0000000000000000000000000000000000000000",Vx=/^0x[0-9a-fA-F]{40}$/;function st(e){return Vx.test(e)}function Gt(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 us(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}import{useId as Yn}from"react";var td="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTQwIDU0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc0MDAwXzM4NTkwKSI+CjxtYXNrIGlkPSJtYXNrMF83NDAwMF8zODU5MCIgc3R5bGU9Im1hc2stdHlwZTpsdW1pbmFuY2UiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjAiIHk9IjAiIHdpZHRoPSI1NDAiIGhlaWdodD0iNTQwIj4KPHBhdGggZD0iTTI3MCAwQzU2Ljg1NjMgMCAwIDU2Ljg1NjMgMCAyNzBDMCA0ODMuMTQ0IDU2Ljg1NjMgNTQwIDI3MCA1NDBDNDgzLjE0NCA1NDAgNTQwIDQ4My4xNDQgNTQwIDI3MEM1NDAgNTYuODU2MyA0ODMuMTQ0IDAgMjcwIDBaIiBmaWxsPSJ3aGl0ZSIvPgo8L21hc2s+CjxnIG1hc2s9InVybCgjbWFzazBfNzQwMDBfMzg1OTApIj4KPHBhdGggZD0iTTUzOS43MzEgMC4yNzA1MDhIMFY1NDAuMDAxSDUzOS43MzFWMC4yNzA1MDhaIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfNzQwMDBfMzg1OTApIi8+CjxwYXRoIGQ9Ik0xODguNjIzIDU0MC4wMDFINTM5Ljg2NVYxMDIuOTM2TDE4OC42MjMgMzI3LjkzNlY1NDAuMDAxWiIgZmlsbD0idXJsKCNwYWlud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YHNsHKQyj/TplrhWf6ARbMtMHG2Nrf9F1qV+7UFaQF2zITB9si42DFP6xfufizWRF+TAeMtMHW2LTIEU+rNwl+wsh70QjMn2wHTYMUuQfCjsWbSn7wFeEqIl/SmT6TMRW2CxIkf+gemaYjNC7JZHpg02wDTYKUrQ+rHVZxVJynXu0PJ8LmXPasZDnYANsgU2CFG0DhVdkCsKMm+J2JOZi5szcgxRt/SKnaPeCTiU3eqrS6r2KKHNjjkGK9of1Lu73r/W79OpQ2KXkHHk+o7G7CGNuKxLxXMbM2JkDc2FOQYoUAOx2049/l4Cd3UQs10mS60vhtfzsPBLxbMbE2BgjY2XMQYoU2UIavS+2XseiDaQQ+d4iovOpeB8W5WkM3YazDIQ7K/zsRn4Xv5PfzRgYC2MKUqSIs1tC4dWZZTl4UVtZ9q7HiUehi/h775H//4aI7z0OZ5LeVJvNw/fyM/wsn8Fn8Zl8Nr+D36Wvsp/if7BfCn8ECvocAAAAAElFTkSuQmCC";function im(e){switch(e.toUpperCase()){case"ONEUSD":return td;case"PONEUSD":return qx;case"USDT":return Yx;case"USDC":return Kx;default:return}}import{jsx as ee,jsxs as $t}from"react/jsx-runtime";function sm(e){let t=e.trim();return t?t.slice(0,2).toUpperCase():"?"}function Zx({size:e,bg:t,fg:r="#ffffff",children:n}){return $t("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:[ee("circle",{cx:"12",cy:"12",r:"12",fill:t}),ee("g",{fill:r,stroke:r,children:n})]})}function rd({size:e,bg:t,fg:r="#ffffff",text:n}){return ee(Zx,{size:e,bg:t,fg:r,children:ee("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",fontSize:"10",fontWeight:700,fontFamily:"inherit",stroke:"none",fill:r,children:n})})}function Ko({size:e,viewBox:t="0 0 24 24",children:r}){return ee("svg",{width:e,height:e,viewBox:t,"aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:r})}function Xx({size:e}){let t=Yn();return $t(Ko,{size:e,children:[$t("g",{clipPath:`url(#${t})`,children:[ee("path",{fill:"#000",d:"M24 0H0v24h24z"}),ee("path",{fill:"#8FFCF3",d:"M12 4v5.912l5 2.237z"}),ee("path",{fill:"#CABCF8",d:"m12 4-5 8.148 5-2.235z"}),ee("path",{fill:"#CBA7F5",d:"M12 15.98V20l5-6.92z"}),ee("path",{fill:"#74A0F3",d:"M12 20v-4.02l-5-2.9z"}),ee("path",{fill:"#CBA7F5",d:"m12 15.049 5-2.9-5-2.236z"}),ee("path",{fill:"#74A0F3",d:"m7 12.149 5 2.9V9.913z"}),ee("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"}),ee("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"})]}),ee("defs",{children:ee("clipPath",{id:t,children:ee("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function Jx({size:e}){let t=Yn();return $t(Ko,{size:e,children:[$t("g",{clipPath:`url(#${t})`,children:[ee("path",{fill:"#F0B90B",d:"M24 0H0v24h24z"}),ee("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"})]}),ee("defs",{children:ee("clipPath",{id:t,children:ee("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function $x({size:e}){let t=Yn();return $t(Ko,{size:e,viewBox:"0 0 111 111",children:[$t("g",{clipPath:`url(#${t})`,children:[ee("path",{fill:"#fff",d:"M0 0h111v111H0z"}),ee("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"})]}),ee("defs",{children:ee("clipPath",{id:t,children:ee("path",{fill:"#fff",d:"M0 0h111v111H0z"})})})]})}function ev({size:e}){let t=Yn();return $t(Ko,{size:e,children:[$t("g",{clipPath:`url(#${t})`,children:[ee("path",{fill:"#213147",d:"M24 0H0v24h24z"}),ee("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"}),ee("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"}),ee("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"}),ee("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"})]}),ee("defs",{children:ee("clipPath",{id:t,children:ee("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function tv({size:e}){let t=Yn(),r=Yn();return $t(Ko,{size:e,children:[$t("g",{clipPath:`url(#${t})`,children:[ee("path",{fill:`url(#${r})`,d:"M24 0H0v24h24z"}),ee("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"})]}),$t("defs",{children:[$t("linearGradient",{id:r,x1:"3.948",x2:"19.217",y1:"16.617",y2:"7.645",gradientUnits:"userSpaceOnUse",children:[ee("stop",{stopColor:"#A726C1"}),ee("stop",{offset:".88",stopColor:"#803BDF"}),ee("stop",{offset:"1",stopColor:"#7B3FE4"})]}),ee("clipPath",{id:t,children:ee("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function rv({size:e}){let t=Yn(),r=Yn();return $t(Ko,{size:e,children:[$t("g",{clipPath:`url(#${t})`,children:[ee("path",{fill:`url(#${r})`,d:"M24 0H0v24h24z"}),ee("path",{fill:"#fff",d:"M17.7 8.358a.55.55 0 0 1-.365.145H4.515c-.455 0-.684-.52-.37-.825l2.106-2.03a.54.54 0 0 1 .364-.15h12.87c.46 0 .685.524.365.83zm0 10.005c-.1.09-.23.14-.365.14H4.515c-.455 0-.684-.516-.37-.82l2.106-2.036a.53.53 0 0 1 .364-.145h12.87c.46 0 .685.52.365.825zm0-7.72a.55.55 0 0 0-.365-.14H4.515c-.455 0-.684.515-.37.82l2.106 2.035c.1.091.23.143.364.144h12.87c.46 0 .685-.52.365-.824z"})]}),$t("defs",{children:[$t("linearGradient",{id:r,x1:"4.001",x2:"20.408",y1:"50.258",y2:"50.108",gradientUnits:"userSpaceOnUse",children:[ee("stop",{stopColor:"#599DB0"}),ee("stop",{offset:"1",stopColor:"#47F8C3"})]}),ee("clipPath",{id:t,children:ee("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function fs({chainId:e,chainName:t,size:r=20}){switch(e){case 1:return ee(Xx,{size:r});case 56:return ee(Jx,{size:r});case 8453:return ee($x,{size:r});case 42161:return ee(ev,{size:r});case 137:return ee(tv,{size:r});case 792703809:return ee(rv,{size:r});case 612055:return ee(rd,{size:r,bg:"#0b1f3a",text:"CR"});default:return ee(rd,{size:r,bg:"#676b7a",text:sm(t??String(e))})}}function vo({symbol:e,logoUrl:t,size:r=20}){let n=t&&t.trim().length>0?t.trim():im(e);return n?ee("img",{src:n,alt:"","aria-hidden":"true",width:r,height:r,style:{display:"block",flex:"none",borderRadius:"50%",objectFit:"cover"}}):ee(rd,{size:r,bg:"#676b7a",text:sm(e)})}import{QRCodeSVG as av}from"qrcode.react";import{Fragment as ms,jsx as dt,jsxs as Ft}from"react/jsx-runtime";function gs(){return Ft("div",{className:"rd-deposit-head","data-testid":"rd-address-skeleton","aria-hidden":"true",children:[dt("span",{className:"rd-skeleton rd-skeleton-qr"}),dt("span",{className:"rd-skeleton rd-skeleton-address"})]})}function iv(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 sv(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 dm({depositAddress:e,originChainId:t,originChainName:r,originCurrency:n,amount:o,tokenSymbol:a,tokenDecimals:i,kind:s="evm",depositState:l,onDeposit:d,canDeposit:c,oneClickEnabled:h=!0}){let[u,m]=lm(!1),[y,b]=lm("address"),f=ov();nv(()=>{b("address")},[e]);let p=n.toLowerCase()===Ma,w=s==="svm";async function g(){try{await navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),1500)}catch{}}let x;if(o)try{let A=BigInt(o);A>0n&&(x=A)}catch{}let k=x!==void 0,R;if(k)try{R=Gt(x,i)}catch{R=o}let E=w?sv({depositAddress:e,splMint:n,humanAmount:R??""}):iv({depositAddress:e,originChainId:t,originCurrency:n,amountWei:x,isNative:p}),{isSubmitting:S,isConfirming:C,isConfirmed:I,needsSwitch:M,txHash:B,reverted:L,error:z}=l;return Ft("section",{className:"rd-stack",children:[Ft("div",{className:"rd-deposit-head","data-compact-view":y,children:[Ft("div",{className:"rd-deposit-qr-pane",children:[Ft("div",{className:"rd-deposit-qr",children:[dt(av,{value:E,size:144,level:"H"}),dt("span",{className:"rd-deposit-qr-badge","aria-hidden":"true",children:dt(fs,{chainId:t,chainName:r,size:28})})]}),dt("button",{type:"button",className:"rd-mobile-address-toggle","aria-label":"Show address and copy",onClick:()=>b("address"),children:Ft("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[dt("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2.25",stroke:"currentColor",strokeWidth:"1.8"}),dt("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"})]})})]}),Ft("div",{className:"rd-deposit-address",children:[dt("span",{className:"rd-deposit-address-label",children:Ft("button",{type:"button",className:"rd-address-term","aria-describedby":f,children:["Deposit address",dt("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."})]})}),dt("button",{type:"button",className:"rd-mobile-qr-toggle","aria-label":"Show deposit QR code","aria-pressed":y==="qr",onClick:()=>b("qr"),children:dt("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:dt("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"})})}),dt("span",{className:"rd-address-full",title:e,children:e}),Ft("button",{type:"button",className:"rd-address-copy",onClick:g,"aria-label":`Copy deposit address ${e}`,children:[u?dt("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:dt("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):Ft("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[dt("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),dt("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"})]}),dt("span",{"aria-live":"polite",children:u?"Copied":"Copy address"})]})]})]}),!w&&c&&Ft(ms,{children:[dt("button",{type:"button",className:"rd-button-primary rd-button-block",onClick:d,disabled:S||C||I&&!L,children:I&&!L?"Deposit sent":C?"Confirming...":S?M?"Switching network...":"Confirm in wallet...":`One-click deposit ${a}${M?` (switch to ${r})`:""}`}),z&&dt("div",{className:"rd-callout rd-callout-danger",children:z}),B&&Ft("p",{className:"rd-card-hint",children:["Tx: ",dt("span",{style:{fontFamily:"monospace"},children:B})]}),I&&L&&dt("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),I&&!L&&dt("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."})]}),w&&Ft("div",{className:"rd-callout rd-callout-muted",children:["Pay from a Solana wallet (e.g. Phantom). Scan the QR or copy the address above and send"," ",k?Ft(ms,{children:["exactly"," ",Ft("strong",{children:[R," ",a]})]}):Ft(ms,{children:["any amount of ",dt("strong",{children:a})]}),"."]}),(k||!w&&!c&&h)&&Ft("p",{className:"rd-card-hint",children:[k&&Ft(ms,{children:["Send exactly"," ",Ft("strong",{children:[R," ",a]})," ","on ",r," to this address."]}),!w&&!c&&h&&!k&&"Enter an amount to deposit in one click."]})]})}import{useEffect as lv,useId as dv,useRef as cm,useState as nd}from"react";import*as Kn from"@radix-ui/react-popover";import{jsx as yn,jsxs as Aa}from"react/jsx-runtime";function La({value:e,options:t,onChange:r,disabled:n,ariaLabel:o,id:a}){let i=dv(),s=a??i,l=`${s}-listbox`,[d,c]=nd(!1),h=t.findIndex(I=>I.value===e),[u,m]=nd(h>=0?h:0),y=cm(null),b=cm([]),f=!!n||t.length===0,p=h>=0?t[h]:void 0;lv(()=>{d&&b.current[u]?.scrollIntoView?.({block:"nearest"})},[d,u]);let[w,g]=nd(null);function x(){f||(g(y.current?.closest("[data-theme]")?.getAttribute("data-theme")??null),m(h>=0?h:0),c(!0))}function k(I){c(!1),I&&y.current?.focus()}function R(I){let M=t[I];M&&(r(M.value),k(!0))}function E(){f||(d?k(!1):x())}function S(I){if(!f)switch(I.key){case"ArrowDown":I.preventDefault(),d?m(M=>Math.min(M+1,t.length-1)):x();break;case"ArrowUp":I.preventDefault(),d?m(M=>Math.max(M-1,0)):x();break;case"Enter":case" ":I.preventDefault(),d?R(u):x();break;case"Escape":d&&(I.preventDefault(),k(!0));break;case"Tab":d&&c(!1);break;default:break}}let C=d&&t[u]?`${s}-option-${u}`:void 0;return yn(Kn.Root,{open:d,onOpenChange:I=>I?x():k(!1),children:Aa("div",{className:"rd-dropdown",children:[yn(Kn.Trigger,{asChild:!0,children:Aa("button",{type:"button",id:s,ref:y,className:"rd-dropdown-trigger","aria-haspopup":"listbox","aria-expanded":d,"aria-controls":l,"aria-activedescendant":C,"aria-label":o,disabled:f,onClick:E,onKeyDown:S,children:[Aa("span",{className:"rd-dropdown-trigger-content",children:[p?.icon,Aa("span",{className:"rd-dropdown-trigger-label",children:[p?.label??"",p?.subLabel&&yn("small",{className:"rd-dropdown-trigger-sub",children:p.subLabel})]})]}),yn("span",{className:"rd-dropdown-chevron","aria-hidden":"true",children:yn(Or,{size:16})})]})}),d&&yn(Kn.Portal,{children:yn(Kn.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:yn("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 B=I.value===e,L=M===u;return Aa("li",{id:`${s}-option-${M}`,role:"option","aria-selected":B,ref:z=>{b.current[M]=z},className:["rd-dropdown-option",L?"rd-dropdown-option-active":"",B?"rd-dropdown-option-selected":""].filter(Boolean).join(" "),onPointerEnter:()=>m(M),onClick:z=>{z.preventDefault(),R(M)},children:[I.icon,yn("span",{className:"rd-dropdown-option-label",children:I.label}),B&&yn("span",{className:"rd-dropdown-option-check","aria-hidden":"true",children:"\u2713"})]},I.value)})})})})]})})}import{Fragment as od,jsx as Zn,jsxs as Hr}from"react/jsx-runtime";function cv(e,t){if(!e)return"--";try{return Gt(BigInt(e),t)}catch{return"--"}}function pm({quote:e,isLoading:t,error:r,humanAmount:n,originSymbol:o,destination:a}){return Hr("div",{className:"rd-stack","data-rd-quote-preview":"",children:[t&&Hr("div",{className:"rd-quote-strip","data-testid":"rd-quote-skeleton",children:[Zn("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"}),Zn("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),Zn("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"})]}),!t&&r&&Hr("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a quote: ",r.message]}),!t&&!r&&e&&o&&Hr(od,{children:[Hr("div",{className:"rd-quote-strip",children:[Hr("span",{className:"rd-quote-strip-side",children:[Hr("b",{children:[n," ",o]}),Zn("small",{children:"You send"})]}),Zn("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),Hr("span",{className:"rd-quote-strip-side rd-quote-strip-end",children:[Hr("b",{children:["~",cv(e.expectedCrossd,a.decimals)," ",a.symbol]}),Zn("small",{children:"You receive"})]})]}),e.belowMin&&Zn("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)&&Hr("p",{className:"rd-quote-strip-hint",children:[e.feeUsd&&Hr(od,{children:["Bridge fee: $",e.feeUsd,", already deducted from the amount above. You also pay your own network fee to send the deposit."," "]}),e.assumesParity&&Hr(od,{children:["Assumes 1:1 parity between bridged USDT and ",a.symbol,"; the final amount may differ slightly."]})]})]}),!t&&!r&&!e&&Zn("p",{className:"rd-muted",children:"Enter an amount to see a quote."})]})}import{useMemo as mm}from"react";var um={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 fm(e,t){let r=um[e];if(!(!r||!t))return{url:`${r.base}/token/${t}`,name:r.name}}var pv={1:"Ethereum",56:"BNB Smart Chain",137:"Polygon",8453:"Base",42161:"Arbitrum",612055:"ONEchain",792703809:"Solana"};function Zo(e){return pv[e]??`Chain ${e}`}function hs(e,t){let r=um[e];if(!(!r||!t))return{url:`${r.base}/tx/${t}`,name:r.name}}import{jsx as Qr,jsxs as Xn}from"react/jsx-runtime";function uv(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 gm(e,t){return t===void 0?[]:e.origins.filter(r=>r.chainId===t)}function fv(e,t){let r=Gt(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 hm({catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:a=!0,balance:i,balanceLoading:s,insufficientBalance:l,onMax:d,disabled:c}){let h=mm(()=>uv(e),[e]),u=mm(()=>gm(e,t?.chainId),[e,t?.chainId]);function m(p){let w=Number(p),g=gm(e,w)[0];g&&r(g)}function y(p){let w=u.find(g=>g.token.address.toLowerCase()===p.toLowerCase());w&&r(w)}let b=i?`${fv(i.value,i.decimals)} ${i.symbol}`:void 0,f=l?`Amount exceeds your balance${b?` (${b})`:""}`:void 0;return Xn("section",{className:"rd-stack","data-rd-source-form":"",children:[Xn("div",{className:"rd-field",children:[Xn("div",{className:"rd-field-label-row",children:[Qr("span",{className:"rd-field-label",children:"From"}),t&&(()=>{let p=fm(t.chainId,t.token.address);return p?Xn("a",{className:"rd-token-explorer-link",href:p.url,target:"_blank",rel:"noopener noreferrer",title:`View ${t.token.symbol} on ${p.name}`,children:[p.name," \u2197"]}):null})()]}),Xn("div",{className:"rd-field-row",children:[Qr(La,{ariaLabel:"Origin chain",value:t?String(t.chainId):"",onChange:m,disabled:c,options:h.map(p=>({value:String(p.chainId),label:p.chainName,subLabel:"Network",icon:Qr(fs,{chainId:p.chainId,chainName:p.chainName,size:22})}))}),Qr(La,{ariaLabel:"Token",value:t?.token.address??"",onChange:y,disabled:c||u.length===0,options:u.map(p=>({value:p.token.address,label:p.token.symbol,subLabel:`${p.token.decimals} decimals`,icon:Qr(vo,{symbol:p.token.symbol,logoUrl:p.token.logoUrl,size:22})}))})]})]}),a&&Xn("label",{className:"rd-field",children:[Qr("span",{className:"rd-field-label",children:"Amount (optional)"}),Xn("div",{className:"rd-amount-input","data-rd-invalid":f?"":void 0,children:[Qr("input",{type:"text",inputMode:"decimal",placeholder:"0.0",value:n,onChange:p=>{let w=p.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:c||!t,"data-vaul-no-drag":!0}),t&&Qr("span",{className:"rd-amount-input-suffix",children:t.token.symbol}),d&&!c&&Qr("button",{type:"button",className:"rd-amount-input-max",onClick:d,disabled:c||!t,children:"Max"})]}),(b||s)&&Xn("span",{className:"rd-amount-meta",children:[Qr("span",{}),Qr("span",{children:s?"Balance: \u2026":b?`Balance: ${b}`:""})]}),f&&Qr("span",{className:"rd-callout rd-callout-danger",children:f})]})]})}import{Fragment as bm,jsx as Fe,jsxs as gr}from"react/jsx-runtime";function wm({catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:a,minNotice:i,amountHint:s,onMax:l,recipient:d,onChangeRecipient:c,showRecipientInput:h,recipientValid:u,balance:m,balanceLoading:y,insufficientBalance:b,targetOptions:f,selectedTarget:p,onChangeTarget:w,showTargetSelector:g,quote:x,quoteLoading:k,quoteError:R,depositAddress:E,depositAddressLoading:S,depositAddressError:C,arrivalStatus:I,amountSmallestUnits:M,depositState:B,onDeposit:L,canDeposit:z,oneClickEnabled:A,locked:F,onRequestConnect:ne}){let K=f.length>1&&g,{phase:_,isSubmitting:G,isConfirming:oe,isConfirmed:Z,needsSwitch:U,reverted:X,error:H}=B,pe=p?.symbol??e.destination.symbol;return gr(bm,{children:[i&&Fe(om,{minNotice:i,arrivalStatus:I}),F?gr("section",{className:"rd-locked-card","data-rd-locked":"",children:[Fe("span",{className:"rd-locked-glyph","aria-hidden":"true",children:gr("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[Fe("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"}),Fe("path",{d:"M4 9h15",stroke:"currentColor",strokeWidth:"1.7"}),Fe("path",{d:"M15 11.5h5v4h-5a2 2 0 0 1 0-4Z",fill:"currentColor",opacity:"0.18",stroke:"currentColor",strokeWidth:"1.5"}),Fe("circle",{cx:"15.7",cy:"13.5",r:"0.8",fill:"currentColor"})]})}),Fe("h3",{className:"rd-locked-title",children:"Connect your wallet"}),Fe("p",{className:"rd-locked-text",children:"Connect to get your personal deposit address."}),h&&Fe("p",{className:"rd-card-hint",children:"Or enter a recipient address to get one without connecting."}),ne&&gr("button",{type:"button",className:"rd-button-primary rd-locked-action","data-track":"connect",onClick:ne,children:[gr("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[Fe("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"}),Fe("path",{d:"M15 10.5h5v4h-5a2 2 0 0 1 0-4Z",stroke:"currentColor",strokeWidth:"1.8"})]}),"Connect Wallet"]})]}):E?Fe(dm,{depositAddress:E,originChainId:t.chainId,originChainName:t.chainName,originCurrency:t.token.address,amount:M,tokenSymbol:t.token.symbol,tokenDecimals:t.token.decimals,depositState:B,onDeposit:L,canDeposit:z,oneClickEnabled:A}):S?gr(bm,{children:[Fe(gs,{}),A&&M&&Fe("span",{className:"rd-skeleton rd-skeleton-cta","aria-hidden":"true"}),Fe("p",{className:"rd-sr-only",role:"status",children:"Preparing your deposit address..."})]}):C?gr("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a deposit address: ",C.message]}):null,Fe(hm,{catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:a,balance:m,balanceLoading:y,insufficientBalance:b,onMax:l}),gr("div",{className:"rd-field","data-rd-delivery":"",children:[Fe("span",{className:"rd-field-label",children:"Deliver as"}),K?Fe(La,{ariaLabel:"Delivery token",value:p?.symbol??"",onChange:w,options:f.map(be=>({value:be.symbol,label:be.symbol,subLabel:"on ONEchain",icon:Fe(vo,{symbol:be.symbol,size:22})}))}):gr("div",{className:"rd-static-target",children:[Fe(vo,{symbol:pe,size:22}),Fe("span",{children:pe})]}),h&&gr("label",{className:"rd-delivery-recipient",children:[Fe("input",{type:"text",placeholder:"0x...","aria-label":"ONEchain recipient address",value:d,onChange:be=>c(be.target.value),"data-vaul-no-drag":!0}),Fe("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&&Fe("span",{className:"rd-callout rd-callout-danger",children:"Not a valid address"})]})]}),p?.external&&gr("div",{className:"rd-callout rd-callout-muted",children:["Delivered as ",p.symbol," via an external adapter."]}),s&&Fe("div",{className:"rd-callout rd-callout-warning","data-rd-amount-hint":"",children:s}),n.trim()&&Fe(pm,{quote:x,isLoading:k,error:R,humanAmount:n,originSymbol:t.token.symbol,destination:e.destination}),i&&Fe(am,{minNotice:i,onlySend:{symbol:t.token.symbol,chainName:t.chainName},showWalletCreditNote:!h&&u}),A&&_!=="idle"&&!z&&gr("div",{className:"rd-card",children:[G&&gr("p",{className:"rd-muted",children:[Fe("span",{className:"rd-spinner"})," ",U?"Switching network...":"Confirm in wallet..."]}),oe&&gr("p",{className:"rd-muted",children:[Fe("span",{className:"rd-spinner"})," Confirming..."]}),B.txHash&&gr("p",{className:"rd-card-hint",children:["Tx: ",Fe("span",{style:{fontFamily:"monospace"},children:B.txHash})]}),Z&&X&&Fe("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),Z&&!X&&Fe("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."}),H&&Fe("div",{className:"rd-callout rd-callout-danger",children:H})]})]})}import{useEffect as mv,useId as gv,useRef as ym,useState as ad}from"react";import{createPortal as hv}from"react-dom";import{Fragment as sd,jsx as xe,jsxs as ct}from"react/jsx-runtime";function Pa({requiresIdentity:e=!1}){return ct("div",{className:"rd-history-empty",role:"status","data-variant":e?"disconnected":"empty","data-testid":e?"rd-history-empty-state":"rd-history-no-transfers",children:[xe("span",{className:"rd-history-empty-icon","aria-hidden":"true",children:ct("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[xe("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"}),xe("path",{d:"M14 3.8V7h3",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"}),xe("circle",{cx:"16.5",cy:"16.5",r:"3.7",stroke:"currentColor",strokeWidth:"1.7"}),xe("path",{d:"M16.5 14.5v2.2l1.4.8",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})]})}),xe("h3",{className:"rd-history-empty-title",children:e?"Connect to view history":"No transfers yet"}),xe("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&&ct("span",{className:"rd-history-empty-live",children:[xe("span",{"aria-hidden":"true"}),"Updates automatically"]})]})}var Da=56;function vm(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function bv(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 wv(e){return e==="COMPLETED"?"rd-status-pill rd-status-pill-success":vm(e)?"rd-status-pill rd-status-pill-failure":"rd-status-pill"}function bs(e,t){if(e){if(t===void 0)return e;try{return Gt(BigInt(e),t)}catch{return e}}}function yv(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 xv(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function xm(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function id({amount:e,symbol:t,className:r}){let n=e?`${e}${t?` ${t}`:""}`:"",o=gv(),a=ym(null),i=ym(null),[s,l]=ad(!1),[d,c]=ad({top:-9999,left:-9999,visibility:"hidden"});return mv(()=>{if(!s)return;let h=()=>{let u=a.current,m=i.current;if(!u||!m)return;let y=u.getBoundingClientRect(),b=m.getBoundingClientRect(),f=12,p=8,w=Math.max(f,window.innerWidth-b.width-f),g=Math.min(Math.max(y.left+y.width/2-b.width/2,f),w),x=y.top-b.height-p,k=x>=f?x:y.bottom+p,R=Math.max(f,window.innerHeight-b.height-f),E=Math.min(Math.max(k,f),R),S=window.getComputedStyle(u);c({top:E,left:g,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 h(),window.addEventListener("resize",h),window.addEventListener("scroll",h,!0),()=>{window.removeEventListener("resize",h),window.removeEventListener("scroll",h,!0)}},[s]),e?ct(sd,{children:[ct("span",{ref:a,className:r,"aria-label":n,"aria-describedby":s?o:void 0,"data-full-value":n,onMouseEnter:()=>{c({top:-9999,left:-9999,visibility:"hidden"}),l(!0)},onMouseLeave:()=>l(!1),children:[yv(e),t?` ${t}`:""]}),s&&typeof document<"u"&&hv(xe("span",{ref:i,id:o,role:"tooltip","data-rd-history-floating-tooltip":"",style:d,children:n}),document.body)]}):xe("span",{className:r,children:"-"})}function vv(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 kv(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 ws({label:e,chainId:t,txHash:r,amount:n,shared:o,missingLabel:a="Pending"}){let i=r?hs(t,r):void 0;return ct("div",{className:"rd-history-step",children:[xe("span",{className:`rd-history-step-dot${r?" rd-history-step-dot-done":""}`}),xe("span",{className:"rd-history-step-label",children:e}),xe("span",{className:"rd-history-step-chain",children:Zo(t)}),n&&xe(id,{amount:n,className:"rd-history-step-amount"}),ct("span",{className:"rd-history-step-tx",children:[i?xe("a",{href:i.url,target:"_blank",rel:"noreferrer",title:r,"aria-label":`${e} transaction on ${Zo(t)}`,children:xm(r)}):r?xe("span",{title:r,children:xm(r)}):xe("span",{className:"rd-muted",children:a}),o&&r&&xe("span",{className:"rd-history-step-shared",title:"Shared by deposits processed together",children:"combined transfer"})]})]})}function Rv(e){let t=e.deposits??[],r=e.amountOut||e.expectedOut||void 0;if(t.length>=2){let i=kv(r,t);if(i)return t.map((s,l)=>({key:`${e.orderId}:${s.txHash}:${s.blockNumber}`,order:e,chainId:s.originChainId??Da,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}=vv(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 ys({orders:e,isLoading:t,error:r,catalog:n,showTitle:o=!0}){let[a,i]=ad({}),s=l=>i(d=>({...d,[l]:!d[l]}));return ct("section",{className:o?"rd-card":"rd-stack","data-rd-orders-list":"",children:[o&&xe("div",{className:"rd-card-header",children:xe("h2",{className:"rd-card-title",children:"Transfer history"})}),t&&e.length===0&&ct("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[xe("span",{className:"rd-spinner"})," Loading orders..."]}),r&&ct("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load your orders: ",r.message]}),!t&&!r&&e.length===0&&xe(Pa,{}),e.length>0&&xe("div",{className:"rd-history-table","data-vaul-no-drag":!0,children:e.flatMap(Rv).map(l=>{let{order:d}=l,c=n?.origins.find(C=>C.chainId===l.chainId&&C.token.address.toLowerCase()===l.currency.toLowerCase()),h=(d.target?n?.targets.find(C=>C.symbol.toLowerCase()===d.target.toLowerCase()):void 0)??n?.targets.find(C=>C.isDefault),u=h?.symbol??n?.destination.symbol??"",m=h?.decimals??n?.destination.decimals,y=n?.origins.find(C=>C.chainId===Da),b=bs(l.sentRaw,y?.token.decimals),f=y?.token.symbol??"USDT",p=bs(l.receivedRaw,m),w=d.deposits??[],g=!!a[l.key],x=xv(d.completedAt??d.createdAt),k=bv(d.status),E=d.status==="COMPLETED"||vm(d.status)?"Details unavailable":"Pending",S=l.receivedIsEstimate?"Estimated on ONEchain":"Received on ONEchain";return ct("div",{className:"rd-history-group",children:[ct("button",{type:"button",className:"rd-history-row-button",onClick:()=>s(l.key),"aria-expanded":g,"aria-label":`Toggle transfer details: ${k}, ${x}`,children:[ct("span",{className:"rd-history-card-top",children:[xe("span",{className:"rd-history-asset",children:l.routes>1?ct(sd,{children:["Multiple deposits ",ct("span",{className:"rd-muted",children:["\xB7 ",l.routes," chains"]})]}):ct(sd,{children:[c?.token.symbol??u," ",ct("span",{className:"rd-muted",children:["from ",Zo(l.chainId)]})]})}),xe("span",{className:wv(d.status),title:d.status,children:k})]}),ct("span",{className:"rd-history-card-amounts",children:[ct("span",{className:"rd-history-amount-block",children:[xe("span",{className:"rd-history-amount-label",children:"Processing address"}),xe(id,{amount:b,symbol:f,className:"rd-history-num"})]}),xe("span",{className:"rd-history-card-arrow","aria-hidden":"true",children:"\u2192"}),ct("span",{className:"rd-history-amount-block",children:[xe("span",{className:"rd-history-amount-label",children:S}),xe(id,{amount:p,symbol:u,className:`rd-history-num rd-history-received${l.receivedIsEstimate?" rd-history-received-estimate":""}`})]})]}),ct("span",{className:"rd-history-card-foot",children:[ct("span",{className:"rd-history-date",children:[d.completedAt?"Completed":"Started"," \xB7 ",x]}),xe("span",{className:"rd-history-chevron","aria-hidden":"true",children:xe(Or,{size:16})})]})]}),g&&ct("div",{className:"rd-history-detail",children:[l.deposit?xe(ws,{label:"Deposit confirmed",chainId:l.deposit.originChainId??Da,txHash:l.deposit.originTxHash||l.deposit.txHash,amount:bs(l.deposit.amount,y?.token.decimals)}):w.length>0?w.map(C=>xe(ws,{label:"Deposit confirmed",chainId:C.originChainId??Da,txHash:C.originTxHash||C.txHash,amount:bs(C.amount,y?.token.decimals)},`${C.txHash}-${C.blockNumber}`)):ct("div",{className:"rd-history-step",children:[xe("span",{className:"rd-history-step-dot"}),xe("span",{className:"rd-history-step-label",children:"Deposit confirmed"}),xe("span",{className:"rd-muted",children:"Details unavailable"})]}),xe(ws,{label:"Bridge",chainId:Da,txHash:d.bscBridgeTx,shared:l.sharedLegs,missingLabel:E}),xe(ws,{label:"ONEchain delivery",chainId:n?.destination.chainId??612055,txHash:d.deliveryTxHash,shared:l.sharedLegs,missingLabel:E})]})]},l.key)})})]})}import{useEffect as Dm,useState as pd}from"react";import{useCallback as Ba,useEffect as Cv,useMemo as Nm,useRef as Tm,useState as Oa}from"react";var cn=class extends Error{constructor(t,r,n){super(r),this.name="RelayApiError",this.status=t,this.body=n}};function Ht(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 cn(0,`network error calling ${n}: ${l.message}`)}let s=await i.text();if(!i.ok){let l=`request to ${n} failed with status ${i.status}`,d;try{d=JSON.parse(s);let c=d;c?.error&&(l=c.error)}catch{d=s||void 0}throw new cn(i.status,l,d)}try{return JSON.parse(s)}catch{throw new cn(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 km=[{type:"function",name:"deploy",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}],ld=[{type:"function",name:"execute",stateMutability:"nonpayable",inputs:[],outputs:[]},{type:"function",name:"sweepToUser",stateMutability:"nonpayable",inputs:[{name:"tokenAddr",type:"address"}],outputs:[]}],dd=[{type:"function",name:"computeAddress",stateMutability:"view",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}];var Xo=["0x486BEEc35A9a9915213Ea02AD3709738335F7702","0x3438735303911aBe113AdF14b18eE730cC24893b","0xA3B548Ab23043e6B24A087515fe1306379683533","0x44317d07378390543d99Ee76374E86C1Ef6cF832"];function xs(e,t){return!e||!t?!1:e.toLowerCase()===t.toLowerCase()}function Sv(e,t){return t.some(r=>xs(r,e))}function vs(e){if(!e||e.length===0)return Xo;let t=new Set,r=[];for(let n of e){if(typeof n!="string"||!st(n))continue;let o=n.toLowerCase();t.has(o)||(t.add(o),r.push(n))}return r.length>0?r:Xo}async function Rm(e,t,{factory:r,forwarder:n,recipient:o,version:a,trusted:i=Xo}){if(!r||!n||!o||a===void 0)return{ok:!1,reason:"address verification is missing inputs (factory/forwarder/recipient/version)"};if(!Sv(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:dd,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 xs(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 Sm(e,t,{forwarder:r,recipient:n,version:o,trusted:a=Xo}){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:dd,functionName:"computeAddress",args:[n,BigInt(o)]})}catch{return}}));return i.some(s=>xs(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 Cm(e,t){return xs(e,t)}var Jn=56,cd={step:"idle"};function Nv(e){return e.tokens?.find(t=>t.recoverable)?.address??e.token}function za(e={}){let t=Tm(e);t.current=e;let r=e.wallet,n=r?.walletChainId,o=e.recipient,a=o&&st(o)?o:void 0,[i,s]=Oa({}),l=Ba((u,m)=>{s(y=>({...y,[u.toLowerCase()]:m}))},[]),d=Ba(u=>u?i[u.toLowerCase()]??cd:cd,[i]),c=Nm(()=>Object.values(i).some(u=>u.step==="switching"||u.step==="deploying"||u.step==="recovering"),[i]);return{recover:Ba(async(u,m,y)=>{if(!a||!u?.forwarder)return;let b=u.forwarder;l(b,{step:"switching"});try{if(n!==Jn){if(!r?.switchChain)throw new Error("wallet cannot switch chains");await r.switchChain(Jn)}if(!r?.writeContract||!r?.readContract||!r?.waitForReceipt)throw new Error("wallet is missing contract capabilities required for recovery");let f=await Rm(r.readContract,Jn,{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 p;if(!u.isDeployed){if(l(b,{step:"deploying"}),p=await r.writeContract({address:u.factory,abi:km,functionName:"deploy",args:[a,BigInt(u.version)],chainId:Jn}),l(b,{step:"deploying",deployTxHash:p}),(await r.waitForReceipt({chainId:Jn,hash:p})).status==="reverted")throw new Error(`forwarder deploy reverted on-chain (tx ${p})`);t.current.onChanged?.()}l(b,{step:"recovering",deployTxHash:p});let w=m==="execute"?await r.writeContract({address:u.forwarder,abi:ld,functionName:"execute",args:[],chainId:Jn}):await r.writeContract({address:u.forwarder,abi:ld,functionName:"sweepToUser",args:[y??Nv(u)],chainId:Jn});if(l(b,{step:"recovering",deployTxHash:p,actionTxHash:w}),(await r.waitForReceipt({chainId:Jn,hash:w})).status==="reverted")throw new Error(`recovery transaction reverted on-chain (tx ${w})`);l(b,{step:"done",deployTxHash:p,actionTxHash:w}),t.current.onRecoverySuccess?.({action:m,forwarder:u.forwarder,actionTxHash:w,...p?{deployTxHash:p}:{}}),t.current.onChanged?.()}catch(f){let p=f instanceof Error?f:new Error(String(f));s(w=>{let g=b.toLowerCase();return{...w,[g]:{...w[g]??cd,step:"error",error:p.message}}}),t.current.onError?.(p)}},[a,n,r,l]),stateFor:d,busy:c}}function Im(e={}){let t=Tm(e);t.current=e;let r=Nm(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRecovery: either `client` or `apiBaseUrl` must be provided");return Ht({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.recipient,o=n&&st(n)?n:void 0,[a,i]=Oa(),[s,l]=Oa(!1),[d,c]=Oa(),[h,u]=Oa(0),m=e.target,y=e.enabled??!0,b=e.refetchInterval;Cv(()=>{if(!o||!y){i(void 0),c(void 0),l(!1);return}let x=!1,k=!1,R=!0;async function E(){if(!(x||k)){k=!0,R&&l(!0);try{let C=await r.getRecovery({user:o,target:m});if(x)return;i(C),c(void 0)}catch(C){if(x)return;let I=C instanceof Error?C:new Error(String(C));c(I),t.current.onError?.(I),I instanceof cn&&I.status===401&&t.current.onUnauthorized?.()}finally{k=!1,!x&&R&&l(!1),R=!1}}}E();let S=typeof b=="number"&&Number.isFinite(b)&&b>0?setInterval(()=>{E()},b):void 0;return()=>{x=!0,S&&clearInterval(S)}},[r,o,h,m,y,b]);let f=Ba(()=>u(x=>x+1),[]),p=za({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:f}),w=Ba(async(x,k)=>{a&&await p.recover(a,x,k)},[p,a]),g=p.stateFor(a?.forwarder);return{info:a,loading:s,error:d,refresh:f,recover:w,recoveryState:g}}var Tv="BSC_FUNDED";function Em(e){if(!e)return 0n;try{let t=BigInt(e);return t>0n?t:0n}catch{return 0n}}function Iv(e,t){return e.target||t}function Jo(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!==Tv)continue;let s=Iv(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+=Em(l.amount)}o.deposits.sort((i,s)=>i.blockNumber-s.blockNumber)}return[...n.values()]}function Mm(e){return e.filter(t=>(t.info.tokens??[]).some(r=>r.recoverable)?!0:Em(t.info.balance)>0n&&t.info.suggestedAction!=="none")}function ks(e){return e.reduce((t,r)=>t+(r.info.tokens??[]).filter(n=>n.recoverable).length,0)}import{Fragment as Ss,jsx as fe,jsxs as Je}from"react/jsx-runtime";var Ev=56;function Mv(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 Av="This balance may already be processing. Recover only if it remains stuck.",Rs="USDT",Am="primary";function Lv(e){return`${e} more recoverable under other delivery tokens -- switch the delivery token above to recover ${e===1?"it":"them"}.`}function Dv(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 Pm({message:e}){let[t,r]=pd("idle");Dm(()=>{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 Je("details",{className:"rd-error-details",children:[fe("summary",{children:"View technical details"}),Je("div",{className:"rd-error-log",children:[fe("button",{type:"button",className:"rd-error-copy",onClick:()=>{n()},"aria-label":o,"aria-live":"polite",title:o,children:t==="copied"?fe("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:fe("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):Je("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[fe("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),fe("path",{d:"M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}),fe("code",{children:e})]})]})}function Fa(e){if(!e)return 0n;try{return BigInt(e)}catch{return 0n}}function An(e,t){try{return Gt(e,t)}catch{return e.toString()}}function Lm(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function Pv(e){let t=Fa(e.bridgeMinWei),r=[];for(let a of e.tokens??[]){let i=Fa(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=Fa(e.balance),o=r.some(a=>a.action?.kind==="execute");return n>0n&&e.suggestedAction==="execute"&&!o?r.unshift({key:Am,symbol:Rs,decimals:e.decimals,balance:n,action:{kind:"execute"}}):r.length===0&&n>0n&&e.suggestedAction!=="none"&&r.push({key:Am,symbol:Rs,decimals:e.decimals,balance:n,action:{kind:"sweep"}}),r}function Ov({deposit:e,decimals:t}){let r=e.originChainId??Ev,n=e.originTxHash||e.txHash,o=n?hs(r,n):void 0;return Je("div",{className:"rd-history-step","data-testid":"recovery-deposit-row",children:[fe("span",{className:"rd-history-step-dot rd-history-step-dot-done"}),fe("span",{className:"rd-history-step-chain",children:Zo(r)}),fe("span",{className:"rd-history-step-amount",children:An(Fa(e.amount),t)}),fe("span",{className:"rd-history-step-tx",children:o?fe("a",{href:o.url,target:"_blank",rel:"noreferrer",title:n,children:Lm(n)}):n?fe("span",{title:n,children:Lm(n)}):null})]})}function Bv({group:e,showTargetLabel:t,busy:r,state:n,onRecover:o,actingRowKey:a,rowKeyOf:i}){let{info:s}=e,l=Pv(s),d=Fa(s.balance),c=l.length===1?`${An(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,m=n.step==="switching"||n.step==="deploying"||n.step==="recovering",b=l.find(p=>i(p)===a)?.action?.kind;function f(){if(n.step==="switching")return"Switching to BNB Chain\u2026";if(n.step==="deploying")return"Confirm in wallet\u2026 (1/2 \u2014 preparing your deposit address)";let p=b==="execute"?"continuing ONEchain delivery":"returning funds";return n.deployTxHash?`Confirm in wallet\u2026 (2/2 \u2014 ${p})`:`Confirm in wallet\u2026 (${p})`}return Je("div",{className:"rd-recover-group","data-testid":"forwarder-section",children:[t&&Je("p",{className:"rd-recover-group-label",children:["Delivery target \xB7 ",fe("b",{children:e.targets.join(", ")})]}),Je("div",{className:"rd-recover-sum",children:[fe("span",{className:"rd-recover-sum-label",children:"Funds awaiting processing"}),Je("span",{className:"rd-recover-sum-value",title:l.length===1?`${c} ${l[0].symbol}`:c,children:[c,l.length===1&&Je(Ss,{children:[" ",fe("span",{className:"rd-recover-sum-unit",children:l[0].symbol})]})]})]}),e.deposits.length>0&&Je("details",{className:"rd-recover-made-of",children:[Je("summary",{className:"rd-recover-made-of-label",children:["Deposit history \xB7 ",e.deposits.length," ",e.deposits.length===1?"transfer":"transfers"]}),Je("div",{className:"rd-recover-made-of-body",children:[e.deposits.map(p=>fe(Ov,{deposit:p,decimals:s.decimals},`${p.txHash}-${p.blockNumber}`)),!h&&Je("p",{className:"rd-token-row-status","data-testid":"deposits-incomplete-note",children:["These transfers explain ",An(e.depositsTotal,s.decimals)," of"," ",An(d,s.decimals)," ",Rs,". The remaining"," ",An(u,s.decimals)," ",Rs," is still included when you act."]})]})]}),fe("div",{className:"rd-token-list",children:l.map(p=>{let w=i(p),g=m&&a===w;return Je("div",{className:"rd-token-row","data-token-symbol":p.symbol,children:[fe(vo,{symbol:p.symbol,size:26}),Je("div",{className:"rd-token-row-info",children:[l.length>1&&Je("span",{className:"rd-token-row-amount",children:[An(p.balance,p.decimals)," ",fe("span",{className:"rd-token-row-symbol",children:p.symbol})]}),g?fe("span",{className:"rd-token-row-step",role:"status","aria-live":"polite",children:f()}):p.shortfall!==void 0&&p.minimum!==void 0?Je("span",{className:"rd-token-row-warn",children:["Needs ",Je("b",{children:[An(p.shortfall,p.decimals)," ",p.symbol]})," more to reach the"," ",An(p.minimum,p.decimals)," ",p.symbol," minimum. Add it through"," ",fe("b",{children:"Deposit to CROSS"})," and both amounts will process together."]}):p.action?fe("span",{className:"rd-token-row-status",children:p.action.kind==="execute"?"Ready to continue delivery to ONEchain":"Ready to return to your BNB Chain wallet"}):fe("span",{className:"rd-token-row-status",children:"Waiting for processing"})]}),g?fe("span",{className:"rd-spinner rd-token-row-spinner"}):p.action&&fe("button",{type:"button",className:"rd-button-primary rd-token-row-action",onClick:()=>o(p),disabled:r,children:p.action.kind==="execute"?"Continue delivery":"Return to wallet"})]},p.key)})}),!s.isDeployed&&n.step==="idle"&&Je("div",{className:"rd-callout rd-callout-warning","data-testid":"two-tx-notice",children:["The first action from this address needs ",fe("b",{children:"two wallet confirmations"}),": prepare the address, then move the funds. Later actions need one."]}),s.inFlight&&fe("p",{className:"rd-muted rd-token-row-status",children:s.inFlightReason||Av}),n.step==="done"&&fe("div",{className:"rd-callout rd-callout-success",role:"status","aria-live":"polite",children:b==="execute"?"ONEchain delivery restarted.":"Funds returned to your connected BNB Chain wallet."}),n.step==="error"&&n.error&&Je(Ss,{children:[fe("div",{className:"rd-callout rd-callout-danger",role:"alert",children:Dv(n.error)}),fe(Pm,{message:n.error})]})]})}function Cs(e){let{info:t,loading:r,error:n,refresh:o}=Im(Mv(e)),a=r||e.targets!==void 0&&e.targetsLoading===!0,i=za({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:e.targets!==void 0?e.onRecovered:o}),[s,l]=pd(),d=e.targets!==void 0?[...e.targets]:t?[{symbol:e.target??"",isDefault:!0,info:t}]:[],c=Mm(Jo(d,e.orders??[])),h=c.length>0,u=e.targets!==void 0?e.onRecovered:o,m=e.wallet?.walletAddress,y=e.wallet?.getBalance,[b,f]=pd();return Dm(()=>{if(!h||!y||!m){f(void 0);return}let p=!1;return y({chainId:56,address:m}).then(w=>{p||f({value:w.value,decimals:w.decimals})}).catch(()=>{p||f(void 0)}),()=>{p=!0}},[h,y,m]),Je("section",{className:e.showTitle??!0?"rd-card":"rd-stack","data-rd-recover-funds":"",children:[(e.showTitle??!0)&&fe("div",{className:"rd-card-header",children:fe("h2",{className:"rd-card-title",children:"Recover stuck funds"})}),typeof e.otherTargetsRecoverable=="number"&&e.otherTargetsRecoverable>0&&fe("div",{className:"rd-callout rd-callout-muted","data-testid":"other-targets-recoverable-note",children:Lv(e.otherTargetsRecoverable)}),a&&Je("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[fe("span",{className:"rd-spinner"})," Checking for recoverable funds\u2026"]}),n&&Je(Ss,{children:[fe("div",{className:"rd-callout rd-callout-danger",role:"alert",children:"Couldn't check recoverable funds. Please try again."}),fe(Pm,{message:n.message})]}),!a&&!n&&!h&&Je("div",{className:"rd-recover-empty",role:"status","data-testid":"rd-recover-empty-state",children:[fe("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:Je("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[fe("path",{d:"M5 11.5V8.8A2.8 2.8 0 0 1 7.8 6h8.4A2.8 2.8 0 0 1 19 8.8v6.4a2.8 2.8 0 0 1-2.8 2.8H7.8A2.8 2.8 0 0 1 5 15.2v-3.7Z",stroke:"currentColor",strokeWidth:"1.7"}),fe("path",{d:"M5 10h14",stroke:"currentColor",strokeWidth:"1.7"}),fe("path",{d:"m9.2 14 1.7 1.7 3.9-4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}),fe("h3",{className:"rd-recover-sum-value rd-recover-sum-empty rd-recover-empty-title",children:"Nothing to recover"}),fe("p",{className:"rd-recover-empty-copy",children:"No funds are waiting at your deposit addresses. If funds become stuck, they will appear here."}),u&&Je("button",{type:"button",className:"rd-button-secondary rd-recover-empty-refresh",onClick:u,"data-track":"refresh_recovery",children:[fe("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:fe("path",{d:"M20 7v5h-5M4 17v-5h5M6.1 9A7 7 0 0 1 18.6 7M5.4 17A7 7 0 0 0 17.9 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),"Check again"]})]}),!a&&!n&&c.map(p=>fe(Bv,{group:p,showTargetLabel:c.length>1||p.targets.length>1,busy:i.busy,state:i.stateFor(p.forwarder),actingRowKey:s,rowKeyOf:w=>`${p.forwarder.toLowerCase()}:${w.key}`,onRecover:w=>{w.action&&(l(`${p.forwarder.toLowerCase()}:${w.key}`),i.recover(p.info,w.action.kind,w.action.tokenAddress))}},p.forwarder.toLowerCase())),!a&&!n&&h&&Je("div",{className:"rd-callout rd-callout-muted","data-testid":"rd-recover-gas-note",children:["You submit this transaction from your connected wallet and pay the BNB Chain network fee in BNB. Available balance:",b&&Je(Ss,{children:[" ",Je("b",{children:[An(b.value,b.decimals)," BNB"]})]}),!b&&" unavailable","."]}),!a&&!n&&h&&fe("p",{className:"rd-recover-foot",children:"Delivery continues to ONEchain; returned funds go to your connected BNB Chain wallet."})]})}import*as Mt from"react";import*as Rr from"@radix-ui/react-dialog";import{Drawer as $o}from"vaul";ce(`html body[data-scroll-locked]{overflow-y:auto!important;margin-right:0!important}.rd-overlay{position:fixed;inset:0;z-index:100000;background:var(--ds-overlay-dim, rgba(0, 0, 0, .5));-webkit-backdrop-filter:var(--ds-bg-blur-7, blur(3.5px));backdrop-filter:var(--ds-bg-blur-7, blur(3.5px))}.rd-dialog-content{-webkit-font-smoothing:antialiased;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:100001;width:var(--rd-dialog-width, 480px);max-height:90vh;overflow:hidden;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-radius:24px;box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));outline:none;font-family:inherit}.rd-dialog-content.rd-deposit-shell{height:min(40rem,90vh)}.rd-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;bottom:0;left:0;right:0;z-index:100001;width:100%;max-width:var(--rd-drawer-max-width, none);min-width:var(--rd-drawer-min-width, 0);max-height:min(85dvh,calc(100svh - env(safe-area-inset-top,0px)));margin:0 auto;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-top-left-radius:16px;border-top-right-radius:16px;outline:none;font-family:inherit;box-sizing:border-box;overscroll-behavior:contain}.rd-drawer-content.rd-deposit-shell[data-vaul-drawer-direction=bottom],.rd-drawer-content.rd-deposit-shell[data-vaul-drawer-direction=top]{height:min(40rem,85dvh,calc(100svh - env(safe-area-inset-top,0px)))}.rd-drawer-content[data-vaul-drawer-direction=right]{inset:0 0 0 auto;max-height:100vh;width:var(--rd-drawer-max-width, 400px);max-width:100vw;border-radius:16px 0 0 16px}.rd-drawer-content[data-vaul-drawer-direction=left]{inset:0 auto 0 0;max-height:100vh;width:var(--rd-drawer-max-width, 400px);max-width:100vw;border-radius:0 16px 16px 0}.rd-drawer-content[data-vaul-drawer-direction=top]{inset:0 0 auto;border-radius:0 0 16px 16px}.rd-drawer-handle{width:60px;height:4px;border-radius:999px;background:var(--ds-border-medium, rgba(0, 0, 0, .18));margin:12px auto 8px;flex-shrink:0}.rd-drawer-content[data-vaul-drawer-direction=left] .rd-drawer-handle,.rd-drawer-content[data-vaul-drawer-direction=right] .rd-drawer-handle{display:none}.rd-overlay{animation:rd-overlay-show .18s ease-out}.rd-overlay[data-state=closed]{animation:rd-overlay-hide .15s ease-in}.rd-dialog-content{animation:rd-dialog-show .2s ease-out}.rd-dialog-content[data-state=closed]{animation:rd-dialog-hide .15s ease-in}@keyframes rd-overlay-show{0%{opacity:0}}@keyframes rd-overlay-hide{to{opacity:0}}@keyframes rd-dialog-show{0%{opacity:0;transform:translate(-50%,-48%) scale(.96)}}@keyframes rd-dialog-hide{to{opacity:0;transform:translate(-50%,-48%) scale(.96)}}@media(prefers-reduced-motion:reduce){.rd-overlay,.rd-overlay[data-state=closed],.rd-dialog-content,.rd-dialog-content[data-state=closed]{animation:none}}.rd-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}
|
|
20
|
-
`);import{jsx as Vr,jsxs as Ns}from"react/jsx-runtime";var Om=24;function Bm(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function zv(e,t,r){let n=r?.offsetTop??t.top,o=r?r.offsetTop+r.height:t.bottom,a=Math.max(t.top,n)+Om,i=Math.min(t.bottom,o)-Om;return e.top<a?e.top-a:e.bottom>i?e.bottom-i:0}function Fv(){let e=Mt.useRef(0),[t,r]=Mt.useState({keyboardHeight:0,keyboardOverlap:0,viewportHeight:0});return Mt.useEffect(()=>{let n=window.visualViewport;if(!n)return;let o=()=>{let a=Math.max(window.innerHeight,document.documentElement.clientHeight);e.current=Math.max(e.current,a,n.height+n.offsetTop);let i=Math.max(0,e.current-n.height-n.offsetTop),s=Math.max(0,e.current-a),l=Math.max(0,i-s),d=n.height;r(c=>c.keyboardHeight===i&&c.keyboardOverlap===l&&c.viewportHeight===d?c:{keyboardHeight:i,keyboardOverlap:l,viewportHeight:d})};return o(),n.addEventListener("resize",o),n.addEventListener("scroll",o),()=>{n.removeEventListener("resize",o),n.removeEventListener("scroll",o)}},[]),t}function Uv(e){let t=`(max-width: ${e}px)`,[r,n]=Mt.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(t).matches);return Mt.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 Ln({theme:e="dark",mobileBreakpoint:t=768,drawerDirection:r="bottom",dialogWidth:n,drawerMaxWidth:o,drawerMinWidth:a,style:i,open:s,onOpenChange:l,children:d}){let c=Uv(t),[h,u]=Mt.useState(!1),m=s!==void 0,y=m?s:h,b=Mt.useCallback(g=>{m||u(g),l?.(g)},[m,l]);On(y,Mt.useCallback(()=>b(!1),[b]));let f=Mt.useMemo(()=>{let g={};return n&&(g["--rd-dialog-width"]=n),o&&(g["--rd-drawer-max-width"]=o),a&&(g["--rd-drawer-min-width"]=a),{...g,...i}},[n,o,a,i]),p=Mt.useMemo(()=>({open:y,setOpen:b,isMobile:c,theme:e,drawerDirection:r,portalStyle:f}),[y,b,c,e,r,f]),w=Vr("div",{"data-theme":e,style:f,children:d});return c?Vr(ps.Provider,{value:p,children:Vr($o.Root,{direction:r,open:y,onOpenChange:b,noBodyStyles:!0,children:w},"drawer")}):Vr(ps.Provider,{value:p,children:Vr(Rr.Root,{open:y,onOpenChange:b,children:w})})}function ea({asChild:e,children:t,dataAttributes:r}){let{isMobile:n}=ln(),o=n?$o.Trigger:Rr.Trigger;return Vr(o,{asChild:e,...r,children:t})}function Dn({className:e,ariaTitle:t,children:r}){let{open:n,isMobile:o,theme:a,drawerDirection:i,portalStyle:s}=ln(),{keyboardHeight:l,keyboardOverlap:d,viewportHeight:c}=Fv(),h=Mo(),u=Mt.useRef(null),m=Mt.useRef(null);Mt.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]),Mt.useEffect(()=>{m.current&&clearTimeout(m.current);let p=document.activeElement;!n&&Bm(p)&&u.current?.contains(p)&&p.blur(),u.current?.querySelectorAll("[data-rd-scroll-area]").forEach(w=>{w.scrollTo?.({top:0,behavior:"auto"})})},[n]);let y=o&&i==="bottom"&&l>0,b=y?{bottom:d,maxHeight:`min(85dvh, calc(${c}px - env(safe-area-inset-top, 0px)))`}:void 0,f=Mt.useCallback(p=>{if(!o||i!=="bottom"||!Bm(p.target))return;let w=p.target,g=w.closest("[data-rd-scroll-area]");g&&(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{let x=zv(w.getBoundingClientRect(),g.getBoundingClientRect(),window.visualViewport);Math.abs(x)>=1&&g.scrollBy?.({top:x,behavior:"auto"}),m.current=null},280))},[i,o]);return o?Ns($o.Portal,{children:[Vr($o.Overlay,{className:"rd-overlay"}),Ns($o.Content,{ref:u,className:ve("rd-drawer-content",e),"data-theme":a,"data-rd-shell":"drawer","data-rd-in-app":h?"true":"false","data-rd-keyboard-adjusted":y?"true":"false",style:{...s,...b},onFocusCapture:f,children:[Vr($o.Title,{className:"rd-sr-only",children:t}),Vr("div",{className:"rd-drawer-handle"}),r]})]}):Ns(Rr.Portal,{children:[Vr(Rr.Overlay,{className:"rd-overlay"}),Ns(Rr.Content,{className:ve("rd-dialog-content",e),"data-theme":a,"data-rd-shell":"dialog",style:s,children:[Vr(Rr.Title,{className:"rd-sr-only",children:t}),Vr(Rr.Description,{className:"rd-sr-only",children:t}),r]})]})}import{Fragment as _v,jsx as Pe,jsxs as Mr}from"react/jsx-runtime";function jv({id:e,activeView:t,recoverableCount:r,onChange:n}){let o=["deposit","history","recover"];return Pe("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 Mr("button",{type:"button",id:`${e}-${a}-tab`,className:"rd-deposit-tab",role:"tab","aria-selected":t===a,"aria-controls":`${e}-${a}-panel`,tabIndex:t===a?0:-1,"data-active":t===a?"true":"false","data-track":`${a}_tab`,onClick:()=>n(a),onKeyDown:s=>{if(!["ArrowLeft","ArrowRight","Home","End"].includes(s.key))return;s.preventDefault();let l=o.indexOf(a),d=s.key==="Home"?0:s.key==="End"?o.length-1:(l+(s.key==="ArrowRight"?1:-1)+o.length)%o.length,c=o[d];n(c),document.getElementById(`${e}-${c}-tab`)?.focus()},children:[Pe("span",{children:i}),a==="recover"&&r>0&&Pe("span",{className:"rd-recovery-badge","data-testid":"recovery-badge",children:r})]},a)})})}function Fm({className:e}){let t=Ea();return Pe(ye,{feature:"relay",children:Pe(Dn,{ariaTitle:"Deposit",className:["rd-deposit-shell",e??t.className].filter(Boolean).join(" "),children:Pe(Wv,{})})})}function Wv(){let e=Ea(),{theme:t}=ln(),r=nm(),n=zm.useId();if(!r)return null;let{activeView:o,setActiveView:a,recoveryOpen:i,resolvedApiBaseUrl:s,wallet:l,catalog:d,catalogLoading:c,catalogError:h,origin:u,setOrigin:m,amount:y,setAmount:b,recipient:f,setRecipient:p,recipientValid:w,balance:g,balanceLoading:x,insufficientBalance:k,depositAddress:R,depositAddressLoading:E,depositAddressError:S,arrivalStatus:C,quote:I,quoteLoading:M,quoteError:B,canDeposit:L,deposit:z,depositState:A,targetOptions:F,selectedTarget:ne,setSelectedTarget:K,showAmountInput:_,minNotice:G,showRecipientInput:oe,showTargetSelector:Z,showOneClick:U,showConnectPrompt:X,showRecipientHint:H,canRecover:pe,recoverableCount:be,recoveryTargetsLoading:te,recoveryTargets:ue,recoveryOrders:je,historyOrdersLoading:Se,historyOrdersError:lt,refreshRecovery:ge,trustedFactories:Ie,amountHint:ot,amountSmallestUnits:Qe,onMax:We}=r;return Mr("div",{className:"rd-root rd-wizard","data-theme":t,"data-rd-scroll-area":!0,children:[Pe(jv,{id:n,activeView:o,recoverableCount:be,onChange:a}),i&&Pe("div",{className:"rd-deposit-tab-panel",id:`${n}-recover-panel`,role:"tabpanel","aria-labelledby":`${n}-recover-tab`,children:pe?Pe(Cs,{client:e.client,apiBaseUrl:s,recipient:f,target:ne?.symbol,wallet:l,trustedFactories:Ie,targets:(d?.targets.length??0)>0?ue:void 0,targetsLoading:te,orders:je,onRecovered:ge,onRecoverySuccess:e.onRecoverySuccess,onError:e.onError,showTitle:!1}):Mr("div",{className:"rd-recover-empty",role:"status","data-variant":"unavailable","data-testid":"rd-recovery-unavailable-note",children:[Pe("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:Mr("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[Pe("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),Pe("path",{d:"M8 10V7.5a4 4 0 0 1 8 0V10",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),Pe("circle",{cx:"12",cy:"15",r:"1.2",fill:"currentColor"})]})}),Pe("h3",{className:"rd-recover-empty-title",children:"Recovery unavailable"}),Pe("p",{className:"rd-recover-empty-copy",children:"Connect a wallet that supports recovery transactions to continue."})]})}),o==="history"&&Pe("div",{className:"rd-deposit-tab-panel",id:`${n}-history-panel`,role:"tabpanel","aria-labelledby":`${n}-history-tab`,children:w&&f.trim()?Pe(ys,{orders:je,isLoading:c||Se,error:h??lt,catalog:d,showTitle:!1}):Pe(Pa,{requiresIdentity:!0})}),o==="deposit"&&Mr("div",{className:"rd-deposit-tab-panel",id:`${n}-deposit-panel`,role:"tabpanel","aria-labelledby":`${n}-deposit-tab`,children:[c&&Mr("div",{className:"rd-skeleton-form","data-testid":"rd-source-skeleton","aria-hidden":"true",children:[Pe(gs,{}),X&&e.onRequestConnect&&Pe("span",{className:"rd-skeleton rd-skeleton-cta"}),Mr("section",{className:"rd-stack",children:[Mr("div",{className:"rd-field",children:[Pe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"18%"}}),Mr("div",{className:"rd-field-row",children:[Pe("span",{className:"rd-skeleton rd-skeleton-field"}),Pe("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),_&&Mr("div",{className:"rd-field",children:[Pe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"34%"}}),Pe("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),Mr("div",{className:"rd-field",children:[Pe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"24%"}}),Pe("span",{className:"rd-skeleton rd-skeleton-field"}),(oe||f.trim().length>0)&&Mr(_v,{children:[Pe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"58%",marginTop:"0.5rem"}}),Pe("span",{className:"rd-skeleton rd-skeleton-field"}),oe&&Pe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"82%"}})]})]}),Pe("span",{className:"rd-skeleton rd-skeleton-notice"})]}),c&&Pe("p",{className:"rd-sr-only",role:"status",children:"Loading deposit options..."}),h&&Mr("div",{className:"rd-callout rd-callout-danger",children:["Failed to load configuration: ",h.message]}),H&&Pe("div",{className:"rd-callout rd-callout-muted",children:oe?"Connect a wallet or provide a recipient address to fetch your deposit address.":"Connect a wallet to fetch your deposit address."}),d&&u&&Pe(wm,{catalog:d,origin:u,onChangeOrigin:m,amount:y,onChangeAmount:b,showAmountInput:_,minNotice:G,amountHint:ot,onMax:We,recipient:f,onChangeRecipient:p,showRecipientInput:oe,recipientValid:w,balance:g,balanceLoading:x,insufficientBalance:k,targetOptions:F,selectedTarget:ne,onChangeTarget:K,showTargetSelector:Z,quote:I,quoteLoading:M,quoteError:B,depositAddress:R,depositAddressLoading:E,depositAddressError:S,arrivalStatus:C,amountSmallestUnits:Qe,depositState:A,onDeposit:()=>{z()},canDeposit:L&&U,oneClickEnabled:U,locked:X,onRequestConnect:e.onRequestConnect})]})]})}import{jsx as ud}from"react/jsx-runtime";function Um({asChild:e,children:t}){return ud(ye,{feature:"relay",children:ud(ea,{asChild:e??t!=null,children:t??ud("button",{type:"button","data-track":"open",children:"Deposit"})})})}import*as Te from"react";import{useCallback as Ua,useEffect as $n,useMemo as fd,useRef as md,useState as pt}from"react";import{useEffect as Gv,useState as Hv}from"react";function jm(e,t){let[r,n]=Hv(e);return Gv(()=>{let o=setTimeout(()=>n(e),t);return()=>clearTimeout(o)},[e,t]),r}var Qv=500,_m=56,Wm={chainId:_m,token:"0x55d398326f99059fF775485246999027B3197955"},Gm=3e4,Vv=5e3;function qv(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?Gm:Math.max(Vv,e*1e3)}var Yv=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function gd(e,t){let r=e.trim();if(!r)return null;try{let n=us(r,t);return n>0n?n:null}catch{return null}}function Hm(e={}){let t=md(e);t.current=e;let r=fd(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useDepositAddress: either `client` or `apiBaseUrl` must be provided");return Ht({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.wallet,o=n?.walletAddress,a=!!o,i=n?.walletChainId,[s,l]=pt(),[d,c]=pt(!0),[h,u]=pt();$n(()=>{let re=!1;return c(!0),r.getConfig().then(Ne=>{re||(l(Ne),u(void 0))}).catch(Ne=>{re||u(Ne instanceof Error?Ne:new Error(String(Ne)))}).finally(()=>{re||c(!1)}),()=>{re=!0}},[r]);let m=e.chains,y=fd(()=>{if(!s)return[];if(!m||m.length===0)return s.origins;let re=new Set(m);return s.origins.filter(Ne=>re.has(Ne.chainId))},[s,m]),b=fd(()=>s?{...s,origins:y}:void 0,[s,y]),[f,p]=pt();$n(()=>{if(f||y.length===0)return;let re=t.current.defaultToken,Ne=re?y.find(j=>j.chainId===re.chainId&&j.token.address.toLowerCase()===re.address.toLowerCase()):void 0;p(Ne??y[0])},[y,f]);let[w,g]=pt(),x=Ua(()=>{De(void 0),It(!1),P(!1),O(!1),Tt(void 0)},[]),k=Ua(re=>{p(re),g(void 0),x()},[x]),R=f?.kind==="svm",[E,S]=pt(""),C=e.amount!==void 0?e.amount:E,I=Ua(re=>{S(re),g(void 0),x()},[x]),M=jm(C,Qv),B=f?gd(M,f.token.decimals):null,L=f?gd(C,f.token.decimals):null,[z,A]=pt(""),[F,ne]=pt(!1),K=e.recipient!==void 0?e.recipient:z,_=Ua(re=>{A(re),ne(!0),g(void 0),x()},[x]);$n(()=>{e.recipient===void 0&&o&&!F&&A(o)},[o,F,e.recipient]);let G=K.length===0||st(K),oe=K.length>0&&st(K)?K:void 0,[Z,U]=pt(),[X,H]=pt(!1),[pe,be]=pt(0),te=n?.getBalance;$n(()=>{if(!te||!o||!f||R){U(void 0),H(!1);return}let re=!1;H(!0);let Ne=f.token.address.toLowerCase()===Ma?void 0:f.token.address;return te({chainId:f.chainId,address:o,token:Ne}).then(j=>{re||U({...j,formatted:Gt(j.value,j.decimals)})}).catch(()=>{re||U(void 0)}).finally(()=>{re||H(!1)}),()=>{re=!0}},[te,o,f,R,pe]);let ue=Z?.value??null,je=!R&&L!==null&&ue!==null&&L>ue,[Se,lt]=pt(),[ge,Ie]=pt(!1),[ot,Qe]=pt(),We=f?.chainId,Oe=f?.token.address,tt=e.target;$n(()=>{if(!oe||!We||!Oe){lt(void 0),Qe(void 0),Ie(!1);return}let re=!1;return lt(void 0),Qe(void 0),Ie(!0),(tt?r.getDepositAddress({user:oe,originChainId:We,originCurrency:Oe},tt):r.getDepositAddress({user:oe,originChainId:We,originCurrency:Oe})).then(j=>{re||(lt(j),Qe(void 0),t.current.onDepositAddress?.(j))}).catch(j=>{if(re)return;lt(void 0);let _e=j instanceof Error?j:new Error(String(j));Qe(_e),t.current.onError?.(_e)}).finally(()=>{re||Ie(!1)}),()=>{re=!0}},[r,oe,We,Oe,tt]);let Nt=[We??"",(Oe??"").toLowerCase(),(oe??"").toLowerCase(),tt??"",C.trim()].join("|"),ut=md(Nt);$n(()=>{ut.current!==Nt&&(ut.current=Nt,g(void 0),x())},[Nt,x]);let[xt,he]=pt(),[Vt,bt]=pt(!1),[wt,rt]=pt(),$e=B?.toString();$n(()=>{if(!We||!Oe||!$e){he(void 0),rt(void 0),bt(!1);return}let re=!1,Ne,j=!0;async function _e(){j&&bt(!0);let ie=Gm;try{let Ge=await r.getQuote({originChainId:We,originCurrency:Oe,amount:$e});if(re)return;he(Ge),rt(void 0),ie=qv(Ge.ttl)}catch(Ge){if(re)return;he(void 0),rt(Ge instanceof Error?Ge:new Error(String(Ge)))}finally{re||bt(!1),j=!1}re||(Ne=setTimeout(_e,ie))}return _e(),()=>{re=!0,Ne&&clearTimeout(Ne)}},[r,We,Oe,$e]);let[er,At]=pt(!1),[Ut,Lt]=pt(!1),[Ve,De]=pt(),[ft,Tt]=pt(),[Ce,It]=pt(!1),[qt,P]=pt(!1),[Be,O]=pt(!1),ae=n?.waitForReceipt,le=md(void 0);$n(()=>{if(!Ve||!f||!ae)return;let re=!1;return It(!0),P(!1),O(!1),ae({chainId:f.chainId,hash:Ve}).then(Ne=>{re||(P(!0),O(Ne.status==="reverted"),be(j=>j+1),Ne.status!=="reverted"&&Ve!==le.current&&(le.current=Ve,t.current.onDeposited?.(Ve)))}).catch(Ne=>{re||Tt(Ne instanceof Error?Ne.message:String(Ne))}).finally(()=>{re||It(!1)}),()=>{re=!0}},[Ve,ae]);let me=i!==void 0&&f!==void 0&&i!==f.chainId,mt=er||Ut,Dt=w??ft,yt="idle";Dt?yt="error":qt?yt="confirmed":Ce?yt="confirming":mt&&(yt=er?"switching":"pending");let hr={phase:yt,isSubmitting:mt,isConfirming:Ce,isConfirmed:qt,needsSwitch:me,txHash:Ve,reverted:qt&&Be,error:Dt},br=!!(f&&Se&&Se.originChainId===f.chainId&&Se.originCurrency.toLowerCase()===f.token.address.toLowerCase()),jt=!!(n?.sendTransaction&&n?.writeContract&&n?.readContract&&n?.waitForReceipt),Dr=!!(a&&jt&&f&&!R&&Se&&br&&L&&L>0n&&!je&&!mt&&!Ce),sr=Ua(async()=>{if(R||!f||!Se||!n?.sendTransaction||!n?.writeContract)return;g(void 0);let re=gd(C,f.token.decimals);if(!re||re<=0n){g("enter an amount to use the one-click deposit");return}let Ne=f.token.address.toLowerCase()===Ma,j=Se.depositAddress,_e=await Sm(n?.readContract,_m,{forwarder:Se.forwarder,recipient:oe,version:Se.version,trusted:t.current.trustedFactories});if(!_e.ok){g(`address verification failed: ${_e.reason}`);return}if(f.chainId===Wm.chainId&&f.token.address.toLowerCase()===Wm.token.toLowerCase()&&!Cm(j,Se.forwarder)){g("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(me){if(!n?.switchChain)throw new Error("wallet cannot switch chains");At(!0);try{await n.switchChain(f.chainId)}finally{At(!1)}}x(),Lt(!0);try{let Ge=Ne?await n.sendTransaction({chainId:f.chainId,to:j,value:re}):await n.writeContract({chainId:f.chainId,address:f.token.address,abi:Yv,functionName:"transfer",args:[j,re]});De(Ge)}finally{Lt(!1)}}catch(Ge){g(Ge.message)}},[R,f,Se,C,me,n,oe,x]);return{address:o,isConnected:a,catalog:b,catalogLoading:d,catalogError:h,origin:f,setOrigin:k,recipient:K,setRecipient:_,recipientValid:G,amount:C,setAmount:I,balance:Z,balanceLoading:X,insufficientBalance:je,isSvmOrigin:R,depositAddress:Se?.depositAddress,depositAddressResult:Se,depositAddressLoading:ge,depositAddressError:ot,quote:xt,quoteLoading:Vt,quoteError:wt,canDeposit:Dr,deposit:sr,depositState:hr}}import{useEffect as Kv,useRef as Zv,useState as ta}from"react";var Xv=3e4,Jv=300;function eo(e){let t=Zv(e);t.current=e;let{client:r,enabled:n=!0,live:o=!0}=e,a=e.refetchInterval??e.fallbackPollMs??Xv,i=e.recipient&&st(e.recipient)?e.recipient:void 0,[s,l]=ta([]),[d,c]=ta(!1),[h,u]=ta(),[m,y]=ta(!1),[b,f]=ta(),[p,w]=ta(0);return Kv(()=>{if(!i){l([]),u(void 0),c(!1),y(!1),f(void 0),w(0);return}if(!n){l([]),u(void 0),c(!1),y(!1),f(void 0),w(0);return}let g=!1,x=!0,k,R=0,E=0;async function S(){let B=++R;E+=1,x&&c(!0);try{let L=await r.listOrders(i);if(g)return;B===R&&(l(L),u(void 0))}catch(L){if(g)return;let z=L instanceof Error?L:new Error(String(L));B===R&&(u(z),t.current.onError?.(z))}finally{E-=1,!g&&B===R&&(c(!1),y(!0),f(i),w(L=>L+1)),x=!1}}function C(){k&&clearTimeout(k),k=setTimeout(()=>{k=void 0,g||S()},Jv)}S();let I;o&&typeof EventSource<"u"&&(I=new EventSource(r.ordersStreamUrl(i)),I.addEventListener("orders-changed",C),I.onopen=()=>{C()});let M=o&&Number.isFinite(a)&&a>0?setInterval(()=>{E===0&&S()},a):void 0;return()=>{g=!0,k&&clearTimeout(k),M&&clearInterval(M),I?.close()}},[r,i,n,o,a]),{orders:s,ordersLoading:d,ordersError:h,ordersInitialized:m,ordersForRecipient:b,ordersRevision:p}}import{useMemo as $v,useState as e1}from"react";function Qm(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 Vm({catalogTargets:e,filter:t,defaultTarget:r}){let n=$v(()=>{if(!t||t.length===0)return e;let l=new Set(t);return e.filter(d=>l.has(d.symbol))},[e,t]),[o,a]=e1(()=>Qm(n,r)?.symbol),i=(o!==void 0?n.find(l=>l.symbol===o):void 0)??Qm(n,r);function s(l){n.some(d=>d.symbol===l)&&a(l)}return{options:n,selected:i,setSelected:s}}var t1={dev:"https://dev-relay-protocol-api.onechain.nexus",stage:"https://dev-relay-protocol-api.onechain.nexus",production:"https://relay-protocol-api.onechain.nexus"};function to(e){return e.apiBaseUrl?e.apiBaseUrl:t1[nt(e.environment)]}import{jsx as i1,jsxs as s1}from"react/jsx-runtime";var qm=1e3;function r1(e,t,r,n,o){let a=e.requireWalletConnection??e.showRecipientInput===!1,i=r.walletAddress&&st(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 Ts(e,t){let r=e.trim();if(!r)return 0n;try{let n=us(r,t);return n>0n?n:0n}catch{return 0n}}function n1(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 Ym(e,t,r){return`${e}:${t.toLowerCase()}:${r}`}function o1(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Km({open:e,children:t}){let[r]=Te.useState(rm);return s1(ed.Provider,{value:r,children:[e&&i1(a1,{store:r}),t]})}function a1({store:e}){let t=Ea(),{showTargetSelector:r=!0}=t,n=t.requireWalletConnection??t.showRecipientInput===!1,o=!!(t.walletAddress&&st(t.walletAddress)),[a,i]=Te.useState("deposit"),s=a==="recover",l=Te.useCallback(W=>{i(we=>(typeof W=="function"?W(we==="recover"):W)?"recover":"deposit")},[]);Te.useEffect(()=>{qe("relay","opened")},[]);let[d,c]=Te.useState(void 0),h=Te.useMemo(()=>to({apiBaseUrl:t.apiBaseUrl,environment:t.environment}),[t.apiBaseUrl,t.environment]),u=Te.useMemo(()=>({walletAddress:t.walletAddress,walletChainId:t.walletChainId,sendTransaction:t.sendTransaction,writeContract:t.writeContract,readContract:t.readContract,switchChain:t.switchChain,waitForReceipt:t.waitForReceipt,getBalance:t.getBalance}),[t.walletAddress,t.walletChainId,t.sendTransaction,t.writeContract,t.readContract,t.switchChain,t.waitForReceipt,t.getBalance]),m=nt(t.environment),y=rr("apps.json",m,W=>({min:Pr(W?.relay?.minDepositAmount,m),max:Pr(W?.relay?.maxDepositAmount,m),trustedFactories:ri(W,m)})),b=Te.useMemo(()=>t.trustedFactories??vs(y?.trustedFactories),[t.trustedFactories,y?.trustedFactories]),{isConnected:f,catalog:p,catalogLoading:w,catalogError:g,origin:x,setOrigin:k,amount:R,setAmount:E,recipient:S,setRecipient:C,recipientValid:I,balance:M,balanceLoading:B,insufficientBalance:L,depositAddress:z,depositAddressResult:A,depositAddressLoading:F,depositAddressError:ne,quote:K,quoteLoading:_,quoteError:G,canDeposit:oe,deposit:Z,depositState:U}=Hm(r1(t,d,u,h,b)),{options:X,selected:H,setSelected:pe}=Vm({catalogTargets:p?.targets??[],filter:t.targetTokens,defaultTarget:t.defaultTarget});Te.useEffect(()=>{c(H?.symbol)},[H?.symbol]);let be=t.amount===void 0&&!t.hideAmount,te=!n&&(t.showRecipientInput??!0)&&t.recipient===void 0,ue=I&&S.trim().length>0&&st(S),je=!n&&t.recipient!==void 0&&t.recipient.trim().length>0,Se=n?!o||!ue:!f&&!je&&!ue,lt=!!p&&!ue&&!Se,ge=(t.showRecovery??!1)&&o&&!!(u.writeContract&&u.readContract&&u.waitForReceipt),Ie=Te.useMemo(()=>t.client?t.client:Ht({baseUrl:h}),[t.client,h]),[ot,Qe]=Te.useState({}),[We,Oe]=Te.useState(!1),[tt,Nt]=Te.useState(0),ut=Te.useCallback(()=>Nt(W=>W+1),[]),xt=U.isConfirmed,he=ue&&(!!A||a!=="deposit"),{orders:Vt,ordersLoading:bt,ordersError:wt,ordersInitialized:rt,ordersForRecipient:$e}=eo({client:Ie,recipient:he?S:void 0,enabled:he,refetchInterval:qm}),er=Vt,At=H??p?.targets.find(W=>W.isDefault),Ut=At?.symbol??p?.destination.symbol,Lt=At?.isDefault??!0,Ve=A?.version,De=Te.useMemo(()=>Vt.filter(W=>n1(W,Ve,Ut,Lt)),[Vt,Ve,Ut,Lt]),ft=Te.useRef(void 0),[Tt,Ce]=Te.useState(),[It,qt]=Te.useState(),P=`${S.toLowerCase()}:${Ut?.toLowerCase()??""}:${Ve??""}`;Te.useEffect(()=>{let W=$e?.toLowerCase()===S.toLowerCase();if(!he||!rt||!W||wt){he||(ft.current=void 0,Ce(void 0),qt(void 0));return}let we=new Set(De.map(Ze=>Ze.orderId)),wr=new Set(De.flatMap(Ze=>(Ze.deposits??[]).map(pn=>Ym(Ze.orderId,pn.txHash,pn.blockNumber)))),vt=ft.current;if(!vt||vt.key!==P){ft.current={key:P,orderIds:we,depositKeys:wr,statuses:new Map(De.map(Ze=>[Ze.orderId,Ze.status]))},Ce(void 0),qt(void 0);return}let lr,Pt=0n,Jr=!1;for(let Ze of De)for(let pn of Ze.deposits??[]){let No=Ym(Ze.orderId,pn.txHash,pn.blockNumber);if(!vt.depositKeys.has(No)){lr??(lr=Ze);try{Pt+=BigInt(pn.amount),Jr=!0}catch{}}}lr??(lr=De.find(Ze=>!vt.orderIds.has(Ze.orderId))),lr??(lr=De.find(Ze=>vt.statuses.get(Ze.orderId)!==Ze.status));for(let Ze of we)vt.orderIds.add(Ze);for(let Ze of wr)vt.depositKeys.add(Ze);for(let Ze of De)vt.statuses.set(Ze.orderId,Ze.status);lr&&(Ce(lr.orderId),Jr&&qt(Pt))},[P,De,$e,he,S,wt,rt]),Te.useEffect(()=>{let W=p?.targets??[];if(!ge||!ue||W.length===0){Qe({}),Oe(!1);return}let we=!1;return Oe(!0),Promise.all(W.map(wr=>Ie.getRecovery({user:S,target:wr.symbol}).catch(()=>{}))).then(wr=>{if(we)return;let vt={};W.forEach((lr,Pt)=>{let Jr=wr[Pt];Jr&&(vt[lr.symbol]=Jr)}),Qe(vt),Oe(!1)}),()=>{we=!0}},[Ie,ge,ue,S,p,xt,tt]);let Be=Te.useMemo(()=>(p?.targets??[]).map(W=>({symbol:W.symbol,isDefault:W.isDefault,info:ot[W.symbol]})).filter(W=>W.info!==void 0),[p,ot]),O=Te.useMemo(()=>ks(Jo(Be)),[Be]),[ae,le]=Te.useState(void 0),[me,mt]=Te.useState(),Dt=!!p&&(p?.targets.length??0)>0&&!d;Te.useEffect(()=>{if(!ue||!x||!A||Dt){le(void 0),mt(void 0);return}let W=!1,we=!1,wr=A.forwarder.toLowerCase();le(void 0),mt(void 0);async function vt(){if(!(W||we)){we=!0;try{let Pt=await Ie.getRecovery({user:S,target:d||void 0});if(W)return;if(Pt?.forwarder&&Pt.forwarder.toLowerCase()!==wr){le(void 0),mt(void 0);return}if(mt(Pt),!Pt||Pt.suggestedAction!=="sweep"){le(void 0);return}let Jr;try{Jr=BigInt(Pt.balance)}catch{le(void 0);return}let Ze=Number(Pt.decimals);if(Jr<=0n||!Number.isInteger(Ze)||Ze<0){le(void 0);return}let pn=Pt.tokens?.find(No=>No.address?.toLowerCase()===Pt.token?.toLowerCase()&&No.symbol)?.symbol;le({balance:Jr,decimals:Ze,symbol:pn})}catch{}finally{we=!1}}}vt();let lr=setInterval(()=>{vt()},qm);return()=>{W=!0,clearInterval(lr)}},[Ie,ue,S,d,Dt,x,A,xt]);let yt=Te.useCallback(()=>{!x||!M||E(Gt(M.value,x.token.decimals))},[x,M,E]),hr=Te.useRef(!1),br=!!z;Te.useEffect(()=>{!br||hr.current||(hr.current=!0,qe("relay","deposit_address_shown"))},[br]);let jt=U.txHash;Te.useEffect(()=>{jt&&qe("relay","deposit_submitted")},[jt]);let Dr=(()=>{let W=Number(y?.min);return Number.isFinite(W)&&W>=0?String(y?.min):"6"})(),sr=(()=>{let W=Number(y?.max);return Number.isFinite(W)&&W>0?String(y?.max):void 0})(),re=(()=>{if(!x)return 0n;let W=Ts(Dr,x.token.decimals),we=BigInt(x.minAmount);return W>we?W:we})(),Ne=x?Gt(re,x.token.decimals):Dr,j=(()=>{if(!x||!ae||re<=0n)return;let W=x.token.decimals,we=ae.decimals,wr=W>=we?ae.balance*10n**BigInt(W-we):ae.balance/10n**BigInt(we-W);if(wr>=re)return;let vt=re-wr;return{pending:Gt(ae.balance,we),pendingSymbol:ae.symbol,remaining:Gt(vt,W)}})(),_e=p?.origins.find(W=>W.chainId===56&&!!(me?.token&&W.token.address.toLowerCase()===me.token.toLowerCase()))??p?.origins.find(W=>W.chainId===56&&W.token.symbol.toUpperCase()==="USDT"),ie=Number.isInteger(me?.decimals)&&(me?.decimals??-1)>=0?me.decimals:_e?.token.decimals,Ge=me?.tokens?.find(W=>W.address?.toLowerCase()===me.token?.toLowerCase()&&W.symbol)?.symbol??_e?.token.symbol,Co=It!==void 0&&ie!==void 0?Gt(It,ie):void 0,ro=(()=>{if(!x||ie===void 0)return;let W=x.token.decimals;if(ie>=W)return re*10n**BigInt(ie-W);let we=10n**BigInt(W-ie);return(re+we-1n)/we})(),Cr=Tt?De.find(W=>W.orderId===Tt):void 0,kn=Cr??De.find(W=>W.status==="BSC_FUNDED"||W.status==="BRIDGE_INITIATED"||W.status==="BRIDGE_PENDING"),no=(()=>{if(!kn||ro===void 0)return!1;try{return BigInt(kn.amountIn)>=ro}catch{return!1}})(),Ya=(()=>{if(!me||ro===void 0)return!1;try{return BigInt(me.balance)>0n&&BigInt(me.balance)>=ro}catch{return!1}})(),Qs=(()=>{let W={amount:Co,symbol:Ge,backendStatus:kn?.status};return!A||!he||!rt?{phase:"connecting",...W}:$e?.toLowerCase()!==S.toLowerCase()||wt?{phase:"unavailable",...W}:Cr?.status==="COMPLETED"?{phase:"completed",...W,backendStatus:Cr.status}:Cr&&o1(Cr.status)?{phase:"failed",...W,backendStatus:Cr.status}:kn?.status==="BRIDGE_INITIATED"||kn?.status==="BRIDGE_PENDING"?{phase:"processing",...W}:kn?.status==="BSC_FUNDED"&&no||Ya?{phase:"funded",...W}:Cr?{phase:"detected",...W,backendStatus:Cr.status}:{phase:"waiting",...W}})(),Ka=x&&sr?Ts(sr,x.token.decimals):void 0,Wt=x&&R.trim()?Ts(R,x.token.decimals):0n,Za=!!(x&&Wt>0n&&Wt<re),Xr=!!(x&&Ka!==void 0&&Wt>0n&&Wt>Ka),Yt=(()=>{if(x){if(Za)return`Amount is below the ${Ne} ${x.token.symbol} minimum.`;if(Xr)return`Amount is above the ${sr} ${x.token.symbol} maximum.`}})(),oo=t.showOneClickDeposit??!1,Pn=x&&R.trim()?Ts(R,x.token.decimals).toString():void 0,Xa={activeView:a,setActiveView:i,recoveryOpen:s,setRecoveryOpen:l,resolvedApiBaseUrl:h,wallet:u,catalog:p,catalogLoading:w,catalogError:g,origin:x,setOrigin:k,amount:R,setAmount:E,recipient:S,setRecipient:C,recipientValid:I,balance:M,balanceLoading:B,insufficientBalance:L,depositAddress:z,depositAddressLoading:F,depositAddressError:ne,arrivalStatus:Qs,quote:K,quoteLoading:_,quoteError:G,canDeposit:oe,deposit:Z,depositState:U,targetOptions:X,selectedTarget:H,setSelectedTarget:pe,showAmountInput:be,minNotice:x?{min:Ne,symbol:x.token.symbol,...j}:void 0,showRecipientInput:te,showTargetSelector:r,showOneClick:oo,showConnectPrompt:Se,showRecipientHint:lt,canRecover:ge,recoverableCount:O,recoveryTargetsLoading:We,recoveryTargets:Be,recoveryOrders:er,historyOrdersLoading:bt,historyOrdersError:wt,refreshRecovery:ut,trustedFactories:b,amountHint:Yt,amountSmallestUnits:Pn,onMax:be&&M&&M.value>0n?yt:void 0};return Te.useLayoutEffect(()=>{e.publish(Xa)}),Te.useLayoutEffect(()=>()=>e.publish(null),[e]),null}import{jsx as hd}from"react/jsx-runtime";function l1(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:c}=e,[h,u]=Is.useState(!1),m=l!==void 0,y=m?l:h,b=Is.useCallback(f=>{m||u(f),d?.(f)},[m,d]);return hd($l.Provider,{value:e,children:hd(Km,{open:y,children:hd(Ln,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:y,onOpenChange:b,children:c})})})}var ja=Object.assign(l1,{Trigger:Um,Content:Fm});import{createContext as d1,useContext as c1}from"react";var bd=d1(null);function wd(){let e=c1(bd);if(!e)throw new Error("RelayHistory compound components must be used within <RelayHistory>");return e}import*as Ar from"react";import{jsx as ko}from"react/jsx-runtime";function Zm({className:e}){let t=wd(),{open:r}=ln();return Ar.useEffect(()=>{r&&qe("relay","history_opened")},[r]),ko(ye,{feature:"relay",children:ko(Dn,{ariaTitle:"Transfer history",className:e??t.className,children:ko(p1,{})})})}function p1(){let e=wd(),{theme:t}=ln(),r=Ar.useMemo(()=>{if(e.client)return e.client;let f=to({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return Ht({baseUrl:f})},[e.client,e.apiBaseUrl,e.environment]),n=e.recipient??e.walletAddress,o=!!(n&&st(n)),[a,i]=Ar.useState(),[s,l]=Ar.useState(!1),[d,c]=Ar.useState(),h=Ar.useRef(e.onError);h.current=e.onError,Ar.useEffect(()=>{if(!o){i(void 0),l(!1),c(void 0);return}let f=!1;return i(void 0),l(!0),c(void 0),r.getConfig().then(p=>{f||i(p)}).catch(p=>{if(f)return;let w=p instanceof Error?p:new Error(String(p));c(w),h.current?.(w)}).finally(()=>{f||l(!1)}),()=>{f=!0}},[r,o]);let{orders:u,ordersLoading:m,ordersError:y}=eo({client:r,recipient:o?n:void 0,enabled:!!a,onError:e.onError}),b=Ar.useCallback(f=>{if(!e.onOutlink)return;let w=f.target.closest?.('a[target="_blank"]');w?.href&&e.onOutlink(w.href)},[e.onOutlink]);return ko("div",{className:"rd-root rd-wizard","data-theme":t,children:o?ko("div",{onClick:b,children:ko(ys,{orders:u,isLoading:s||m,error:d??y,catalog:a,showTitle:!1})}):ko(Pa,{requiresIdentity:!0})})}import{jsx as yd}from"react/jsx-runtime";function Xm({asChild:e,children:t}){return yd(ye,{feature:"relay",children:yd(ea,{asChild:e??t!=null,children:t??yd("button",{type:"button","data-track":"open",children:"History"})})})}import{jsx as Jm}from"react/jsx-runtime";function u1(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o="min(640px, calc(100vw - 32px))",drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:c}=e;return Jm(bd.Provider,{value:e,children:Jm(Ln,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:c})})}var $m=Object.assign(u1,{Trigger:Xm,Content:Zm});import*as qr from"react";import*as Lr from"react";var Es=[],f1=3e4;function eg({client:e,recipient:t}){let[r,n]=Lr.useState({targets:Es}),[o,a]=Lr.useState(0),i=Lr.useRef(void 0),s=Lr.useRef(void 0),l=t&&st(t)?t.toLowerCase():void 0;Lr.useEffect(()=>{if(!l){n({targets:Es});return}let b=!1,f=i.current;if(!f||f.client!==e||f.recipientKey!==l||f.generation!==o){let p=(async()=>{let w,g=[];try{g=(await e.getConfig()).targets}catch(S){w=S instanceof Error?S:new Error(String(S))}let x=g.length===0?[()=>e.getRecovery({user:l})]:g.map(S=>()=>e.getRecovery({user:l,target:S.symbol})),k=await Promise.all(x.map(async S=>{try{return{info:await S()}}catch(C){return{error:C instanceof Error?C:new Error(String(C))}}})),R=g.length===0?k[0]?.info?[{symbol:"",isDefault:!0,info:k[0].info}]:[]:g.flatMap((S,C)=>k[C]?.info?[{symbol:S.symbol,isDefault:S.isDefault,info:k[C].info}]:[]),E=k.find(S=>S.error)?.error;return{targets:R,badgeFailed:!!(w||E&&R.length===0),error:w??E}})().catch(w=>({targets:Es,badgeFailed:!0,error:w instanceof Error?w:new Error(String(w))}));f={client:e,recipientKey:l,generation:o,promise:p},i.current=f,p.finally(()=>{s.current={client:e,recipientKey:l,at:Date.now()},i.current?.promise===p&&(i.current=void 0)})}return f.promise.then(p=>{b||n({recipientKey:l,targets:p.targets,badgeFailed:p.badgeFailed,error:p.error})}),()=>{b=!0}},[e,l,o]);let d=Lr.useCallback(()=>a(b=>b+1),[]),c=Lr.useCallback(()=>{if(!l)return;let b=i.current;if(b?.client===e&&b.recipientKey===l)return;let f=s.current;f?.client===e&&f.recipientKey===l&&Date.now()-f.at<f1||a(p=>p+1)},[e,l]),h=l&&r.recipientKey===l?r.targets:Es,u=l&&r.recipientKey===l?r.error:void 0,m=!!(l&&r.recipientKey!==l),y=!!(l&&r.recipientKey===l&&r.badgeFailed);return Lr.useMemo(()=>({count:y?0:ks(Jo(h)),targets:h,loading:m,error:u,refresh:d,refreshIfStale:c}),[h,m,y,u,d,c])}import{createContext as m1,useContext as g1}from"react";var xd=m1(null);function vd(){let e=g1(xd);if(!e)throw new Error("RelayRecovery compound components must be used within <RelayRecovery>");return e}function kd(){return vd().props}function tg(){return vd().recovery}function rg(){return vd().recovery.count}import*as Ro from"react";import{jsx as So,jsxs as b1}from"react/jsx-runtime";function ng({className:e}){let t=kd(),{open:r}=ln();return Ro.useEffect(()=>{r&&qe("relay","recovery_opened")},[r]),So(ye,{feature:"relay",children:So(Dn,{ariaTitle:"Recover stuck funds",className:e??t.className,children:So(h1,{})})})}function h1(){let e=kd(),{targets:t,loading:r,refresh:n}=tg(),{theme:o}=ln(),a=Ro.useMemo(()=>to({apiBaseUrl:e.apiBaseUrl,environment:e.environment}),[e.apiBaseUrl,e.environment]),i=Ro.useMemo(()=>e.client?e.client:Ht({baseUrl:a}),[e.client,a]),s=Ro.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&&st(e.walletAddress)?e.walletAddress:void 0,d=!!(l&&(!e.recipient||st(e.recipient)&&e.recipient.toLowerCase()===l.toLowerCase())),c=d?l:void 0,h=nt(e.environment),u=rr("apps.json",h,w=>ri(w,h)),m=Ro.useMemo(()=>e.trustedFactories??vs(u),[e.trustedFactories,u]),y=!!(e.writeContract&&e.readContract&&e.waitForReceipt),b=!!c&&y,f=c,{orders:p}=eo({client:i,recipient:b?f:void 0,enabled:b,live:!1});return b1("div",{className:"rd-root rd-wizard","data-theme":o,children:[!l&&So("p",{className:"rd-muted","data-testid":"rd-recovery-connect-note",children:"Connect a wallet to check recoverable funds."}),l&&!d&&So("p",{className:"rd-muted","data-testid":"rd-recovery-recipient-note",children:"Recovery is only available for the connected wallet."}),d&&!y&&So("p",{className:"rd-muted","data-testid":"rd-recovery-unsupported-note",children:"This wallet can't sign recovery transactions."}),b&&So(Cs,{client:e.client,apiBaseUrl:a,recipient:c,wallet:s,trustedFactories:m,targets:t,targetsLoading:r,orders:p,onRecovered:n,onRecoverySuccess:e.onRecoverySuccess,showTitle:!1,onError:e.onError})]})}import{jsx as Rd}from"react/jsx-runtime";function og({asChild:e,children:t}){let r=rg();return Rd(ye,{feature:"relay",children:Rd(ea,{asChild:e??t!=null,dataAttributes:{"data-rd-recovery-count":r},children:t??Rd("button",{type:"button","data-track":"open",children:"Recover"})})})}import{jsx as ag}from"react/jsx-runtime";function w1(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:c}=e,[h,u]=qr.useState(!1),m=l!==void 0,y=m?l:h,b=qr.useCallback(R=>{m||u(R),d?.(R)},[m,d]),f=qr.useMemo(()=>{if(e.client)return e.client;let R=to({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return Ht({baseUrl:R})},[e.client,e.apiBaseUrl,e.environment]),p=e.walletAddress&&st(e.walletAddress)?e.walletAddress:void 0,w=p&&(!e.recipient||st(e.recipient)&&e.recipient.toLowerCase()===p.toLowerCase())?p:void 0,g=eg({client:f,recipient:w});qr.useEffect(()=>{y&&g.refreshIfStale()},[y,g.refreshIfStale]);let x=qr.useRef(void 0);qr.useEffect(()=>{!y||!g.error||x.current===g.error||(x.current=g.error,e.onError?.(g.error))},[y,g.error,e.onError]);let k=qr.useMemo(()=>({props:e,recovery:g}),[e,g]);return ag(xd.Provider,{value:k,children:ag(Ln,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:y,onOpenChange:b,children:c})})}var ig=Object.assign(w1,{Trigger:og,Content:ng});import{useCallback as y1,useEffect as x1,useMemo as v1,useRef as k1,useState as Ms}from"react";function sg(e={}){let t=k1(e);t.current=e;let r=v1(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayConfig: either `client` or `apiBaseUrl` must be provided");return Ht({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.enabled??!0,o=e.refetchInterval,[a,i]=Ms(),[s,l]=Ms(!1),[d,c]=Ms(),[h,u]=Ms(0);x1(()=>{if(!n){i(void 0),l(!1),c(void 0);return}let y=!1,b=!1;i(void 0),l(!0),c(void 0);async function f(){if(!(y||b)){b=!0;try{let w=await r.getConfig();if(y)return;i(w),c(void 0)}catch(w){if(y)return;let g=w instanceof Error?w:new Error(String(w));c(g),t.current.onError?.(g)}finally{b=!1,y||l(!1)}}}f();let p=typeof o=="number"&&Number.isFinite(o)&&o>0?setInterval(()=>{f()},o):void 0;return()=>{y=!0,p&&clearInterval(p)}},[r,n,h,o]);let m=y1(()=>u(y=>y+1),[]);return{config:a,loading:s,error:d,refresh:m}}import{useQuery as R1}from"@tanstack/react-query";import{useCallback as lg,useEffect as S1,useMemo as Sd,useRef as dg}from"react";var C1=1,cg=new WeakMap;function N1(e){let t=cg.get(e);if(t!==void 0)return t;let r=C1++;return cg.set(e,r),r}function pg(e={}){let t=dg(e);t.current=e;let r=Sd(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayRecovery: either `client` or `apiBaseUrl` must be provided");return Ht({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.recipient,o=n&&st(n)?n:void 0,a=e.target,i=e.query,s=Sd(()=>N1(r),[r]),l=Sd(()=>["relay","recovery",s,o??null,a??null],[s,o,a]),d=R1({retry:!1,...i,queryKey:l,queryFn:async()=>{if(!o)throw new Error("useRelayRecovery: a valid EVM recipient is required");return r.getRecovery({user:o,target:a})},enabled:o?i?.enabled:!1}),c=dg(0);S1(()=>{let b=d.error,f=d.errorUpdatedAt;!b||f===c.current||(c.current=f,t.current.onError?.(b),b instanceof cn&&b.status===401&&t.current.onUnauthorized?.())},[d.error,d.errorUpdatedAt]);let h=lg(()=>{d.refetch()},[d.refetch]),u=za({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:h}),m=d.data,y=lg(async(b,f)=>{m&&await u.recover(m,b,f)},[u,m]);return{info:m,loading:d.isLoading,error:d.error??void 0,isFetching:d.isFetching,refresh:h,recover:y,recoveryState:u.stateFor(m?.forwarder)}}import{Fragment as A1,jsx as Yr,jsxs as Kr}from"react/jsx-runtime";var T1={bscBridge:"https://bscscan.com/tx/",crossFinalize:"https://scan.crosstoken.io/tx/",crossExecute:"https://scan.crosstoken.io/tx/"},I1={bscBridge:"Bridge tx (BSC)",crossFinalize:"Finalize tx (CROSS)",crossExecute:"Execute tx (CROSS)"};function E1(e){return e==="done"?"\u2713":e==="active"?"\u25CF":""}function ug(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function M1(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 fg({orderId:e,order:t,error:r}){let n=!t&&!r;return Kr("section",{className:"rd-card",children:[Kr("div",{className:"rd-card-header",children:[Yr("h2",{className:"rd-card-title",children:"4. Status"}),t&&Yr("span",{className:`rd-status-pill${t.status==="COMPLETED"?" rd-status-pill-success":ug(t.status)?" rd-status-pill-failure":""}`,children:t.status})]}),Kr("p",{className:"rd-card-hint",children:["Order ",e]}),n&&Kr("p",{className:"rd-muted",children:[Yr("span",{className:"rd-spinner"})," Loading status..."]}),r&&Kr("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load order status: ",r.message]}),t&&Kr(A1,{children:[Yr("ol",{className:"rd-stepper",children:t.steps.map((o,a)=>Kr("li",{className:M1(o.status),children:[Kr("div",{className:"rd-stepper-rail",children:[Yr("span",{className:"rd-stepper-dot",children:E1(o.status)}),a<t.steps.length-1&&Yr("span",{className:"rd-stepper-line"})]}),Kr("div",{className:"rd-stepper-body",children:[Yr("div",{className:"rd-stepper-label",children:o.label}),o.key==="bridge"&&t.txs.bscBridge&&Yr("div",{className:"rd-stepper-meta",children:Yr(Cd,{orderTxs:t.txs,txKey:"bscBridge"})}),o.key==="deliver"&&(t.txs.crossFinalize||t.txs.crossExecute)&&Kr("div",{className:"rd-stepper-meta",children:[t.txs.crossFinalize&&Yr(Cd,{orderTxs:t.txs,txKey:"crossFinalize"}),t.txs.crossExecute&&Yr(Cd,{orderTxs:t.txs,txKey:"crossExecute"})]})]})]},o.key))}),ug(t.status)&&Kr("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"&&Yr("div",{className:"rd-callout rd-callout-success",children:"crossd delivered. This order is complete."})]})]})}function Cd({orderTxs:e,txKey:t}){let r=e[t];return r?Kr("a",{href:`${T1[t]}${r}`,target:"_blank",rel:"noreferrer",children:[I1[t],": ",r.slice(0,10),"..."]}):null}function As(e){return`${e.chainId}:${e.address.toLowerCase()}`}function Nd(e,t){return As(e)===As(t)}function Ls(e,t){if(t)return e.find(r=>Nd(r,t))}function Wa(e,t,r){return t?{fromTokens:(r==="swap"?[t.swap.from]:t.bridge.from).map(o=>Ls(e,o)).filter(o=>!!o),targetToken:Ls(e,t.target)}:{fromTokens:[],targetToken:void 0}}function Ds(e,t){return e.some(r=>r.chainId===t.chainId&&r.address.toLowerCase()===t.address.toLowerCase())}function mg(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 L1(e,t){let r=mg(e),n=mg(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 gg(e,t=so){if(!e)return!0;let r=L1(t,e);return r===null?!0:r>=0}var hg={swap:"swap",bridge:"bridge",transfer:"transferCrypto"};function _a(e,t){return t?.[hg[e]]??e!=="transfer"}function Ga(e,t){return gg(t?.[hg[e]])}function Ps(e,t,r){return _a(e,t)&&Ga(e,r)}var bg={dev:"https://stg.oneusd.money/",stage:"https://stg.oneusd.money/",production:"https://www.oneusd.money/"};function wg(e){let t=e.trim().toLowerCase().replace(/\.$/,"");return t==="oneusd.money"||t.endsWith(".oneusd.money")}function yg(e,t){return e?.items?.find(({id:n,type:o})=>n.toLowerCase()==="oneusd"||o.toLowerCase()==="oneusd")?.url[t]}import*as Os from"react";function xg(e){let[t,r]=Os.useState(null);return Os.useEffect(()=>{if(!e)return;let n=!0;return Rl().then(o=>{n&&r(o)}).catch(()=>{}),()=>{n=!1}},[e]),t}function vg(e,t){return t==="bridge"?!0:e==="bridge"||e==="bridge-swap"||e==="swap-bridge"}function D1(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 P1(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function kg(e,t){return vg(e.pathType,t)?"Bridging":"Swapping"}function Rg(e,t){let r=D1(e.toAmount);if(vg(e.pathType,t)){let n=`arriving on ${P1(e.toToken.chainId)}`;return r?`${r} ${n}`:n}return r?`${r} Swapped`:"Transaction completed"}import{jsx as Zr,jsxs as Eg}from"react/jsx-runtime";function Sg(e){return Zr("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:Zr("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 Cg(e){return Eg("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[Zr("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"}),Zr("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 Ng(e){return Eg("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[Zr("rect",{x:"4",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),Zr("rect",{x:"14",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),Zr("rect",{x:"4",y:"14",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),Zr("path",{d:"M14 14h2v2h-2zM18 18h2v2h-2z",fill:"currentColor"})]})}function Tg(e){return Zr("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:Zr("path",{d:"m9 6 6 6-6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ig(e){return Zr("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:Zr("path",{d:"m6 6 12 12M18 6 6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}ce(`.gou-fab{--gou-collapse-duration: .24s;--gou-collapse-ease: cubic-bezier(.32, .72, 0, 1);position:fixed;right:var(--gou-right, 2rem);bottom:calc(env(safe-area-inset-bottom,0px) + var(--gou-bottom, 2rem));z-index:var(--gou-z-index, 40);display:inline-flex;width:max-content;align-items:center;gap:8px;padding:4px 20px 4px 4px;border:0;border-radius:9999px;background:#fff;color:#121212;box-shadow:0 4px 20px #00000073;font:inherit;cursor:pointer;transition:gap var(--gou-collapse-duration) var(--gou-collapse-ease),padding var(--gou-collapse-duration) var(--gou-collapse-ease),transform .15s ease,background .15s ease;-webkit-tap-highlight-color:transparent}[data-theme=light] .gou-fab{background:#121212;color:#fff;box-shadow:0 4px 20px #00000040}.gou-fab:active:not(:disabled){transform:scale(.96)}.gou-fab:focus-visible{outline:3px solid #f3742e;outline-offset:3px}.gou-fab[data-icon-only=true]{gap:0;padding:0}.gou-fab:disabled{cursor:default}.gou-fab[data-trigger-mode=button]{position:relative;right:auto;bottom:auto;z-index:auto;vertical-align:middle}[data-gou-mode=button]{display:inline-block}.gou-fab-status{pointer-events:none;cursor:default}.gou-fab-icon-frame{position:relative;display:inline-flex;width:38px;height:38px;flex-shrink:0;border-radius:9999px;transition:width var(--gou-collapse-duration) var(--gou-collapse-ease),height var(--gou-collapse-duration) var(--gou-collapse-ease)}.gou-fab-icon{display:block;width:100%;height:100%;border-radius:inherit;object-fit:contain}.gou-fab[data-icon-only=true] .gou-fab-icon-frame{width:52px;height:52px}.gou-fab-progress-ring{position:absolute;inset:-2px;border:2px solid rgba(243,116,46,.25);border-top-color:#f3742e;border-radius:9999px;animation:gou-spin .9s linear infinite}.gou-fab-label{overflow:hidden;max-width:180px;opacity:1;font-size:14px;font-weight:600;line-height:1.5;white-space:nowrap;transition:max-width var(--gou-collapse-duration) var(--gou-collapse-ease),opacity calc(var(--gou-collapse-duration) * .6) var(--gou-collapse-ease)}.gou-fab[data-icon-only=true] .gou-fab-label{max-width:0;opacity:0}.gou-fab[data-tx-phase] .gou-fab-label{max-width:260px}.gou-fab-trigger-copy{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;line-height:1.25}.gou-fab-apr{color:var(--ds-system-orange-high, #ff7a3d);font-size:11px;font-weight:600;line-height:1.25}.gou-fab[data-tx-phase=success]{animation:gou-result-success 1.2s ease-out}.gou-fab[data-tx-phase=failure]{animation:gou-result-failure 1.2s ease-out}.gou-fab-dots>span{animation:gou-status-dot 1.4s ease-in-out infinite}.gou-fab-dots>span:nth-child(2){animation-delay:.2s}.gou-fab-dots>span:nth-child(3){animation-delay:.4s}.gou-tooltip{position:absolute;right:0;bottom:calc(100% + 8px);pointer-events:none;padding:6px 10px;border-radius:8px;background:#121212;color:#fff;box-shadow:0 8px 24px #0000002e;font-size:12px;font-weight:500;opacity:0;white-space:nowrap;transition:opacity .2s ease}[data-theme=dark] .gou-tooltip{background:#f5f5f5;color:#121212}.gou-fab:hover .gou-tooltip{opacity:1}.gou-shell{--ds-bg-default: #1c1c1d;--ds-bg-dim: #181819;--ds-surface-default: #1c1c1d;--ds-surface-medium: #212224;--ds-surface-high: rgba(255, 255, 255, .08);--ds-border-default: rgba(255, 255, 255, .1);--ds-content-highest: #ffffff;--ds-content-high: rgba(255, 255, 255, .85);--ds-content-medium: rgba(255, 255, 255, .65);--ds-content-low: rgba(255, 255, 255, .4);--ds-accent-primary-default: #f3742e;--ds-accent-primary-high: #f3742e;--ds-accent-primary-low: rgba(243, 116, 46, .1);--ds-accent-primary-on: #ffffff;--gou-bg: #1c1c1d;--gou-card: #212224;--gou-card-hover: rgba(255, 255, 255, .08);--gou-border: rgba(255, 255, 255, .1);--gou-text: #ffffff;--gou-muted: rgba(255, 255, 255, .65);background:var(--gou-bg);color:var(--gou-text)}.gou-shell[data-theme=light]{--ds-bg-default: #ffffff;--ds-bg-dim: #fafbfd;--ds-surface-default: #ffffff;--ds-surface-medium: rgba(0, 0, 0, .01);--ds-surface-high: rgba(0, 0, 0, .03);--ds-border-default: rgba(0, 0, 0, .06);--ds-content-highest: #000000;--ds-content-high: rgba(0, 0, 0, .85);--ds-content-medium: rgba(0, 0, 0, .65);--ds-content-low: rgba(0, 0, 0, .4);--gou-bg: #ffffff;--gou-card: #ffffff;--gou-card-hover: rgba(0, 0, 0, .03);--gou-border: rgba(0, 0, 0, .06);--gou-text: #000000;--gou-muted: rgba(0, 0, 0, .65)}.gou-chooser{overflow:hidden}.gou-chooser-body{position:relative;display:flex;flex-direction:column;gap:24px;padding:24px}.gou-close{position:absolute;top:16px;right:16px;display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;padding:0;border:0;border-radius:9999px;background:transparent;color:var(--gou-muted);cursor:pointer}.gou-close:hover{background:var(--gou-card-hover);color:var(--gou-text)}.gou-close svg{width:20px;height:20px}.gou-intro{display:flex;flex-direction:column;gap:6px;padding:0 32px 0 0;text-align:left}.gou-intro h2{margin:0;color:var(--gou-text);font-size:20px;font-weight:650;line-height:1.6}.gou-intro-link{display:inline-flex;width:fit-content;align-items:center;gap:4px;color:var(--ds-accent-primary-default, #f3742e);font-size:14px;font-weight:600;line-height:1.5;text-decoration:none}.gou-intro-link-icon{flex-shrink:0}.gou-intro-link>span{text-decoration:underline;text-underline-offset:3px}.gou-intro-link:focus-visible{outline:2px solid #f3742e;outline-offset:3px;border-radius:4px}.gou-actions{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}.gou-action{display:flex;width:100%;min-width:0;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--gou-border);border-radius:12px;background:var(--gou-card);color:var(--gou-text);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s ease,background .15s ease}.gou-action:hover:not(:disabled){border-color:#f3742e;background:var(--gou-card-hover)}.gou-action:disabled{cursor:not-allowed;opacity:.5}.gou-action:focus-visible{outline:2px solid #f3742e;outline-offset:2px}.gou-action-icon{display:inline-flex;width:32px;height:32px;flex-shrink:0;align-items:center;justify-content:center;border:1px solid var(--gou-border);border-radius:9px;color:var(--gou-text);transition:border-color .15s ease,color .15s ease}.gou-action:hover:not(:disabled) .gou-action-icon{border-color:var(--ds-accent-primary-default, #f3742e);color:var(--ds-accent-primary-default, #f3742e)}.gou-action-icon svg{width:17px;height:17px}.gou-action-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:2px}.gou-action-title{display:flex;min-width:0;align-items:center;gap:6px;font-size:16px;font-weight:650}.gou-action-description{color:var(--gou-muted);font-size:14px;line-height:1.45}.gou-action-chevron{width:18px;height:18px;flex-shrink:0;color:var(--gou-muted)}.gou-badge{flex-shrink:0;padding:2px 6px;border-radius:5px;background:#f3742e24;color:#f3742e;font-size:10px;font-weight:650}.gou-badge[data-tone=muted]{background:var(--gou-card-hover);color:var(--gou-muted)}.gou-execution{height:auto;max-height:90dvh;overflow:hidden}.gou-execution .bf-root{width:100%;max-height:90dvh}.gou-connect-required,.gou-route-state{display:flex;min-height:360px;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px;text-align:center}.gou-connect-required h3,.gou-route-state h3{margin:0;color:var(--gou-text);font-size:18px}.gou-connect-required p,.gou-route-state p{max-width:320px;margin:0;color:var(--gou-muted);font-size:14px;line-height:1.5}.gou-lock{font-size:28px}.gou-connect-required button{width:100%;max-width:320px;margin-top:10px;padding:12px 16px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #00ceb2);color:var(--ds-accent-primary-on, #001b18);font:inherit;font-size:16px;font-weight:650;cursor:pointer}.gou-spinner{width:28px;height:28px;border:3px solid var(--gou-border);border-top-color:var(--ds-accent-primary-default, #00ceb2);border-radius:9999px;animation:gou-spin .8s linear infinite}@keyframes gou-spin{to{transform:rotate(360deg)}}@keyframes gou-status-dot{0%,60%,to{opacity:.2}30%{opacity:1}}@keyframes gou-result-success{0%{outline:0 solid rgba(30,202,119,0)}30%{outline:3px solid rgba(30,202,119,.75)}to{outline:0 solid rgba(30,202,119,0)}}@keyframes gou-result-failure{0%{outline:0 solid rgba(255,60,83,0)}30%{outline:3px solid rgba(255,60,83,.75)}to{outline:0 solid rgba(255,60,83,0)}}@media(max-width:767px){.gou-fab{right:var(--gou-right-mobile, 1rem)}.gou-fab-icon-frame{width:32px;height:32px}.gou-fab[data-icon-only=true] .gou-fab-icon-frame{width:40px;height:40px}.gou-chooser-body{padding:24px 16px 28px}.gou-execution{height:auto;max-height:70dvh}.gou-execution .bf-root{max-height:calc(70dvh - 24px)}}@media(prefers-reduced-motion:reduce){.gou-fab,.gou-fab-icon-frame,.gou-fab-label,.gou-tooltip{transition:none}.gou-spinner,.gou-fab-progress-ring{animation-duration:1.6s}.gou-fab[data-tx-phase=success],.gou-fab[data-tx-phase=failure],.gou-fab-dots>span{animation:none}}
|
|
21
|
-
`);import{Fragment as U1,jsx as Ue,jsxs as Qt}from"react/jsx-runtime";var O1=[{id:"swap",label:"Swap",eta:"Instant",Icon:Sg},{id:"bridge",label:"Bridge",Icon:Cg},{id:"transfer",label:"Transfer Crypto",eta:"QR deposit",Icon:Ng}],B1=4e3;function Mg(e){return e instanceof Error?e.message:typeof e=="string"?e:"Unknown error"}function Bs(e,t){try{e?.(t)}catch{}}function z1({compactTrigger:e,collapseOnScroll:t,scrollThreshold:r}){let[n,o]=Ke.useState(!1);return Ke.useEffect(()=>{if(t===!1){o(!1);return}let a=r??200,i=a+24,s=Math.max(0,a-24),l=0,d=window.scrollY>a;o(d);let c=()=>{l=0;let u=d?window.scrollY>s:window.scrollY>i;u!==d&&(d=u,o(u))},h=()=>{l||(l=requestAnimationFrame(c))};return window.addEventListener("scroll",h,{passive:!0}),()=>{l&&cancelAnimationFrame(l),window.removeEventListener("scroll",h)}},[t,r]),!!(e||n)}function F1({loading:e}){return Qt("div",{className:"gou-route-state",role:"status",children:[e&&Ue("span",{className:"gou-spinner","aria-hidden":"true"}),Ue("h3",{children:e?"Preparing route":"Route unavailable"}),Ue("p",{children:e?"Loading token and contract configuration.":"The configured ONEUSD route is not available in this environment."})]})}function Ag({walletAddress:e,tokens:t,pairs:r,loading:n=!1,bridge:o,relay:a,env:i,targetSymbol:s,relayTargetSymbol:l="ONEUSD",targetIconUrl:d,mode:c="floating",buttonComponent:h,theme:u="dark",mobileBreakpoint:m=768,drawerDirection:y="bottom",dialogWidth:b="480px",drawerMaxWidth:f,drawerMinWidth:p,style:w,className:g,contentClassName:x,hidden:k=!1,compactTrigger:R,collapseOnScroll:E=!0,scrollThreshold:S=200,waitForTransaction:C,transactionResultDurationMs:I=B1,onRequestConnect:M,onEvent:B}){let[L,z]=Ke.useState(!1),[A,F]=Ke.useState(null),[ne,K]=Ke.useState(!1),[_,G]=Ke.useState(null),[oe,Z]=Ke.useState(!1),U=Ke.useRef(0),X=Ke.useRef(!1),H=Ke.useRef(null),pe=Ke.useRef(!0),be=z1({compactTrigger:R,collapseOnScroll:E,scrollThreshold:S}),te=Ke.useMemo(()=>nt(i),[i]),ue=rr("apps.json",te,P=>P?.getOneUsd?.modes),je=rr("apps.json",te,P=>P?.getOneUsd?.minVersions),lt=rr("app-launcher-v2.json",te,P=>yg(P,te))??bg[te],ge=Ke.useMemo(()=>O1.filter(({id:P})=>_a(P,ue)),[ue]),Ie=ge.length>0,ot=xg(!k&&Ie),Qe=Ke.useMemo(()=>Wa(t,r,"swap"),[r,t]),We=Ke.useMemo(()=>Wa(t,r,"bridge"),[r,t]),Oe=Qe.targetToken??We.targetToken,tt=s??Oe?.symbol??"ONEUSD",Nt=d??Oe?.iconUrl??td,ut=c==="floating"&&be,xt=c==="button"&&h?h:"button";Ke.useEffect(()=>(pe.current=!0,()=>{pe.current=!1,H.current&&clearTimeout(H.current)}),[]),Ke.useEffect(()=>{Z(!wg(window.location.hostname))},[]),Ke.useEffect(()=>{Ie||z(!1)},[Ie]);let he=Ke.useCallback(P=>B?.(P),[B]),Vt=Ke.useCallback(()=>{_||!Ie||(he({name:"fab_click",state:ut?"icon_only":"expanded"}),z(!0))},[he,Ie,_,ut]),bt=Ke.useCallback(P=>{_||!Ps(P,ue,je)||(he({name:"action_select",action:P}),z(!1),P==="transfer"&&K(!0),F(P))},[he,ue,je,_]),wt=Ke.useCallback(P=>{he({name:"connect_click",action:P}),Promise.resolve(M?.()).catch(Be=>{he({name:"failure",action:P,message:Mg(Be)})})},[he,M]),rt=A==="swap"||A==="bridge"?A:null,$e=rt==="swap"?Qe:We,er=!!(r&&$e.targetToken&&$e.fromTokens.length>0),At=Ke.useMemo(()=>{if(!$e.targetToken)return;let P=$e.targetToken;return Be=>{let O=o.getToTokens?.(Be,t);return O&&!Ds(O,P)?[]:[P]}},[o.getToTokens,$e.targetToken,t]),{onSubmitted:Ut,onSuccess:Lt,onFailed:Ve,...De}=o,{onDeposited:ft,onError:Tt,...Ce}=a??{},It=Ke.useCallback((P,Be,O,ae,le)=>{!pe.current||U.current!==P||(G({id:P,phase:Be,action:O,label:ae,txHash:le}),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{!pe.current||U.current!==P||(X.current=!1,G(null),H.current=null)},Math.max(0,I)))},[I]),qt=Ke.useCallback((P,Be)=>{if(X.current)return;X.current=!0;let O=++U.current,ae=kg(P,Be);G({id:O,phase:"pending",action:Be,label:ae,txHash:P.txHash}),z(!1),F(null),Bs(Ut,P),Promise.resolve().then(()=>C?.(P)).then(()=>{!pe.current||U.current!==O||(It(O,"success",Be,Rg(P,Be),P.txHash),he({name:"success",action:Be,txHash:P.txHash}))}).catch(le=>{if(!pe.current||U.current!==O)return;let me=Mg(le);It(O,"failure",Be,"Transaction failed",P.txHash),Bs(Ve,{message:me,txHash:P.txHash}),he({name:"failure",action:Be,message:me})})},[he,Ve,Ut,It,C]);return Ue(ye,{feature:"get_one_usd",children:Qt("div",{className:g,"data-theme":u,"data-gou-mode":c,children:[Qt(Ln,{theme:u,mobileBreakpoint:m,drawerDirection:y,dialogWidth:b,drawerMaxWidth:f,drawerMinWidth:p,open:L,onOpenChange:z,children:[!k&&Ie&&(c==="button"||!_)&&Qt(xt,{type:"button",className:"gou-fab",style:w,"data-trigger-mode":c,"data-icon-only":ut?"true":"false",onClick:Vt,disabled:!!_,"aria-label":`Get ${tt}`,"data-track":"fab_click",children:[c==="floating"&&Qt("span",{className:"gou-tooltip",children:["Choose how to get ",tt]}),Ue("span",{className:"gou-fab-icon-frame",children:Ue("img",{className:"gou-fab-icon",src:Nt,alt:""})}),Qt("span",{className:"gou-fab-label gou-fab-trigger-copy",children:[Qt("span",{children:["Get ",tt]}),ot!==null&&Ue("span",{className:"gou-fab-apr",children:Di(ot)})]})]}),_&&Qt("div",{className:"gou-fab gou-fab-status",style:c==="floating"?w:void 0,"data-floating-status":"true","data-icon-only":"false","data-tx-phase":_.phase,role:"status","aria-live":"polite","aria-label":_.phase==="pending"?`${_.label} transaction in progress`:_.label,children:[Qt("span",{className:"gou-fab-icon-frame",children:[Ue("img",{className:"gou-fab-icon",src:Nt,alt:""}),_.phase==="pending"&&Ue("span",{className:"gou-fab-progress-ring","aria-hidden":"true"})]}),Ue("span",{className:"gou-fab-label",children:_.phase==="pending"?Qt(U1,{children:[_.label,Qt("span",{className:"gou-fab-dots","aria-hidden":"true",children:[Ue("span",{children:"."}),Ue("span",{children:"."}),Ue("span",{children:"."})]})]}):_.label})]}),Ue(Dn,{ariaTitle:`Get ${tt}`,className:`gou-shell gou-chooser ${x??""}`,children:Qt("div",{className:"gou-chooser-body",children:[Ue("button",{type:"button",className:"gou-close",onClick:()=>z(!1),"aria-label":"Close",children:Ue(Ig,{})}),Qt("header",{className:"gou-intro",children:[Qt("h2",{children:["Get ",tt]}),oe&&Qt("a",{className:"gou-intro-link",href:lt,target:"_blank",rel:"noopener noreferrer","aria-label":"What is ONEUSD? Opens in a new tab","data-track":"oneusd_learn_more",children:[Ue(Op,{size:16,className:"gou-intro-link-icon"}),Ue("span",{children:"What is ONEUSD?"})]})]}),Ue("ul",{className:"gou-actions",children:ge.map(({id:P,label:Be,eta:O,Icon:ae})=>{let le=P==="swap"?`Swap the ${Qe.fromTokens[0]?.symbol??"ONE"} you already hold`:P==="bridge"?`Bridge USDT to ${tt}`:"Deposit from any chain or exchange",me=P==="swap"?r?.swap.feeDelegated:P==="bridge"?r?.bridge.feeDelegated:!1,mt=Ga(P,je);return Ue("li",{children:Qt("button",{type:"button",className:"gou-action",onClick:()=>bt(P),disabled:!mt,"data-supported":mt?"true":"false","data-track":"action_select","data-track-id":P,children:[Ue("span",{className:"gou-action-icon",children:Ue(ae,{})}),Qt("span",{className:"gou-action-copy",children:[Qt("span",{className:"gou-action-title",children:[Ue("span",{children:Be}),me&&mt&&Ue("span",{className:"gou-badge",children:"Fee Delegated"}),!mt&&Ue("span",{className:"gou-badge","data-tone":"muted",children:"Update required"})]}),Ue("span",{className:"gou-action-description",children:mt?O?`${le} \xB7 ${O}`:le:"Update the app to use this option"})]}),Ue(Tg,{className:"gou-action-chevron"})]})},P)})})]})})]}),Ue(Ln,{theme:u,mobileBreakpoint:m,drawerDirection:y,dialogWidth:b,drawerMaxWidth:f,drawerMinWidth:p,open:!!rt,onOpenChange:P=>{P||F(null)},children:Ue(Dn,{ariaTitle:`${rt==="bridge"?"Bridge":"Swap"} to ${tt}`,className:`gou-shell gou-execution ${x??""}`,children:er?Ue(Qo,{...De,env:i,variant:"embedded",title:rt==="bridge"?"Bridge":"Swap",feeDelegated:r?.swap.feeDelegated,walletAddress:e??"",isConnected:!!e,onRequestConnect:()=>wt(rt??"swap"),tokens:$e.fromTokens,initialFromToken:$e.fromTokens[0],initialToToken:$e.targetToken,getToTokens:At,onClose:()=>F(null),onBackToWallet:()=>{F(null),z(!0)},onSubmitted:P=>{qt(P,rt??"swap")},onSuccess:P=>{Bs(Lt,P)},onFailed:P=>{Bs(Ve,P),he({name:"failure",action:rt??"swap",message:P.message})}},`${rt}:${$e.fromTokens.map(P=>`${P.chainId}:${P.address}`).join(",")}`):Ue(F1,{loading:n||!r})})}),ne&&Ue(ja,{...Ce,environment:Ce.environment??i,theme:Ce.theme??u,mobileBreakpoint:Ce.mobileBreakpoint??m,drawerDirection:Ce.drawerDirection??y,dialogWidth:Ce.dialogWidth??b,drawerMaxWidth:Ce.drawerMaxWidth??f,drawerMinWidth:Ce.drawerMinWidth??p,walletAddress:e,open:A==="transfer",onOpenChange:P=>{P||F(null)},requireWalletConnection:!0,showRecovery:Ce.showRecovery??!0,showRecipientInput:!1,hideAmount:!0,targetTokens:[l],defaultTarget:l,onRequestConnect:()=>wt("transfer"),onDeposited:P=>{ft?.(P),he({name:"success",action:"transfer",txHash:P})},onError:P=>{Tt?.(P),he({name:"failure",action:"transfer",message:P.message})},children:Ue(ja.Content,{})})]})})}import*as vn from"react";import*as jg from"@radix-ui/react-dialog";import{Drawer as K1}from"vaul";import{createContext as j1,useContext as W1}from"react";var zs=j1(null);function Ha(){let e=W1(zs);if(!e)throw new Error("WalletConnectModal compound components must be used within <WalletConnectModal>");return e}import{useState as Lg,useEffect as _1,useCallback as G1}from"react";function Fs(){let[e,t]=Lg([]),[r,n]=Lg(!0);_1(()=>{if(typeof window>"u"){n(!1);return}let a=[],i=l=>{let{info:d}=l.detail;d?.rdns&&!a.some(c=>c.rdns===d.rdns)&&(a.push({rdns:d.rdns,name:d.name,icon:d.icon}),t([...a]))};window.addEventListener("eip6963:announceProvider",i),window.addEventListener("eip6963:crossAnnounceProvider",i),window.dispatchEvent(new Event("eip6963:requestProvider")),window.dispatchEvent(new Event("eip6963:crossRequestProvider"));let s=setTimeout(()=>n(!1),500);return()=>{window.removeEventListener("eip6963:announceProvider",i),window.removeEventListener("eip6963:crossAnnounceProvider",i),clearTimeout(s)}},[]);let o=G1(a=>e.some(i=>i.rdns===a),[e]);return{wallets:e,isDetected:o,isLoading:r}}import*as Dg from"@radix-ui/react-dialog";import{Drawer as H1}from"vaul";import{jsx as Td}from"react/jsx-runtime";function Pg({asChild:e,children:t}){let{isMobile:r}=Ha(),n=r?H1.Trigger:Dg.Trigger;return Td(ye,{feature:"wallet_connect",children:Td(n,{asChild:e??t!=null,children:t??Td("button",{type:"button","data-track":"open",children:"Connect Wallet"})})})}import{useEffect as Q1}from"react";import{WALLET_LABELS as V1}from"@nexus-cross/crossx-design-system";import*as xn from"@radix-ui/react-dialog";import{Drawer as Us}from"vaul";import{Fragment as Fg,jsx as Re,jsxs as ir}from"react/jsx-runtime";function Og(e,t){qe("connect","wallet_selected",{tags:{item_id:e}}),Cp(e);let r=t?.();r instanceof Promise&&r.then(()=>qe("connect","connected"),n=>qe("connect","connected",{status:"failure",reason:Nr(n)}))}function q1({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 ir("button",{type:"button",className:ve("wcm-wallet-item",a&&"wcm-wallet-item--featured"),"data-track":"wallet_item_click","data-track-id":e.id,onClick:n,children:[ir("div",{className:"wcm-wallet-item-left",children:[Re("div",{className:"wcm-wallet-icon",children:Re(o,{})}),ir("div",{className:"wcm-wallet-name-row",children:[Re("span",{className:"wcm-wallet-name",children:e.name}),e.badge&&Re("span",{className:"wcm-wallet-badge",children:e.badge})]})]}),e.installUrl&&(t?Re("span",{className:"wcm-installed-label",children:"Installed"}):Re("span",{className:"wcm-install-btn",children:"Install"}))]})}function Y1({social:e,onSignIn:t}){let r=e.icon,n=`Sign in with ${e.name}`;return ir("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:[Re("span",{className:"wcm-social-icon",children:Re(r,{})}),Re("span",{className:"wcm-social-name",children:n})]})}function Bg(){let{wallets:e,activeWalletIds:t,socialProviders:r,activeSocialIds:n,termsUrl:o,privacyUrl:a,isDetected:i,close:s,isMobile:l}=Ha(),d=t.filter(u=>{let m=Cl(u).visibility;return!m||m==="always"?!0:m==="desktop-only"?!l:m==="mobile-only"?l:!0}),c=n.length>0,h=d.length>0;return ir(Fg,{children:[ir("div",{className:"wcm-header",children:[ir("div",{className:"wcm-header-text",children:[Re("h2",{className:"wcm-title",children:V1.default}),!l&&Re("p",{className:"wcm-subtitle",children:"Sign in instantly with your social account"})]}),Re("button",{type:"button",className:"wcm-close-btn","data-track":"close",onClick:s,"aria-label":"Close",children:Re(kp,{})})]}),ir("div",{className:"wcm-body",children:[c&&ir(Fg,{children:[!l&&ir("div",{className:"wcm-section-header",children:[Re("span",{className:"wcm-section-title",children:"Social Account Wallet Connect"}),Re("span",{className:"wcm-recommended-badge",children:"Recommended"})]}),Re("div",{className:"wcm-social-grid",children:n.map(u=>{let m=Rp(u);return Re(Y1,{social:m,onSignIn:()=>{Og(u,r[u]),s()}},u)})}),h&&ir("div",{className:"wcm-separator",children:[Re("div",{className:"wcm-separator-line"}),Re("span",{className:"wcm-separator-text",children:"Other Wallets"}),Re("div",{className:"wcm-separator-line"})]})]}),h&&Re("div",{className:"wcm-wallet-list",children:d.map(u=>{let m=Cl(u),y=m.rdns?i(m.rdns):!1;return Re(q1,{wallet:m,detected:y,onConnect:()=>{Og(u,e[u]),s()}},u)})}),ir("p",{className:"wcm-terms",children:["By continuing, you agree to NEXUS"," ",Re(zg,{href:o,track:"terms_link",children:"Terms of Service"})," ","and consent to its"," ",Re(zg,{href:a,track:"privacy_link",children:"Privacy Policy"}),"."]})]})]})}function zg({href:e,track:t,children:r}){return e?Re("a",{className:"wcm-terms-link",href:e,target:"_blank",rel:"noopener noreferrer","data-track":t,children:r}):Re("span",{className:"wcm-terms-link",children:r})}function Ug({className:e}){let{isMobile:t,theme:r,portalStyle:n,open:o}=Ha();return Q1(()=>{o&&qe("connect","opened")},[o]),t?Re(ye,{feature:"wallet_connect",children:ir(Us.Portal,{children:[Re(Us.Overlay,{className:"wcm-overlay"}),ir(Us.Content,{className:ve("wcm-drawer-content",e),"data-theme":r,style:n,children:[Re(Us.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),Re("div",{className:"wcm-drawer-handle"}),Re("div",{className:"wcm-drawer-body",children:Re(Bg,{})})]})]})}):Re(ye,{feature:"wallet_connect",children:ir(xn.Portal,{children:[Re(xn.Overlay,{className:"wcm-overlay"}),ir(xn.Content,{className:ve("wcm-dialog-content",e),"data-theme":r,style:n,children:[Re(xn.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),Re(xn.Description,{className:"wcm-sr-only",children:"Sign in with a social provider or pick a wallet to connect."}),Re("div",{className:"wcm-dialog-body",children:Re(Bg,{})})]})]})})}ce(`.wcm-overlay{position:fixed;inset:0;z-index:100000;background:var(--ds-overlay-dim, rgba(0, 0, 0, .5));-webkit-backdrop-filter:var(--ds-bg-blur-7, blur(3.5px));backdrop-filter:var(--ds-bg-blur-7, blur(3.5px))}.wcm-dialog-content{-webkit-font-smoothing:antialiased;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:100001;width:var(--wcm-dialog-width, 480px);max-height:90vh;overflow:hidden;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-radius:24px;box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));outline:none;animation:wcm-dialog-show .2s ease-out;font-family:inherit}.wcm-dialog-content[data-state=closed]{animation:wcm-dialog-hide .15s ease-in}.wcm-dialog-body,.wcm-drawer-body{scrollbar-width:thin;scrollbar-color:var(--ds-border-medium, rgba(0, 0, 0, .18)) transparent}.wcm-dialog-body::-webkit-scrollbar,.wcm-drawer-body::-webkit-scrollbar{width:4px}.wcm-dialog-body::-webkit-scrollbar-track,.wcm-drawer-body::-webkit-scrollbar-track{background:transparent}.wcm-dialog-body::-webkit-scrollbar-thumb,.wcm-drawer-body::-webkit-scrollbar-thumb{background:var(--ds-border-medium, rgba(0, 0, 0, .18));border-radius:4px}.wcm-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;bottom:0;left:0;right:0;z-index:100001;width:100%;max-width:var(--wcm-drawer-max-width, none);min-width:var(--wcm-drawer-min-width, 0);max-height:85dvh;margin:0 auto;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-top-left-radius:16px;border-top-right-radius:16px;outline:none;font-family:inherit;box-sizing:border-box}.wcm-drawer-content[data-vaul-drawer-direction=right]{inset:0 0 0 auto;max-height:100vh;width:var(--wcm-drawer-max-width, 400px);max-width:100vw;border-radius:16px 0 0 16px}.wcm-drawer-content[data-vaul-drawer-direction=left]{inset:0 auto 0 0;max-height:100vh;width:var(--wcm-drawer-max-width, 400px);max-width:100vw;border-radius:0 16px 16px 0}.wcm-drawer-content[data-vaul-drawer-direction=top]{inset:0 0 auto;border-radius:0 0 16px 16px}.wcm-drawer-handle{width:60px;height:4px;border-radius:999px;background:var(--ds-border-medium, rgba(0, 0, 0, .18));margin:12px auto 8px;flex-shrink:0}.wcm-drawer-content[data-vaul-drawer-direction=left] .wcm-drawer-handle,.wcm-drawer-content[data-vaul-drawer-direction=right] .wcm-drawer-handle{display:none}.wcm-dialog-body,.wcm-drawer-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.wcm-drawer-body{overscroll-behavior:contain}.wcm-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wcm-header-text{display:flex;flex-direction:column;gap:4px;min-width:0}.wcm-title{font-family:Inter,sans-serif;font-weight:600;font-size:20px;line-height:1.25;letter-spacing:0;color:var(--ds-content-highest, #000000);margin:0}.wcm-subtitle{font-family:Inter,sans-serif;font-weight:400;font-size:14px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));margin:0}.wcm-close-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;border:none;background:transparent;color:var(--ds-content-low, #00000066);cursor:pointer;padding:0;transition:opacity .15s ease}.wcm-close-btn:hover{opacity:.6}.wcm-close-btn>svg{width:24px;height:24px}.wcm-divider{display:none}.wcm-body{display:flex;flex-direction:column;gap:16px;padding:24px}.wcm-section-header{display:flex;align-items:center;gap:8px;width:100%}.wcm-section-title{font-family:Inter,sans-serif;font-weight:600;font-size:16px;line-height:1;letter-spacing:0;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wcm-recommended-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:var(--ds-accent-primary-low, #fff5ee);border-radius:9999px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-accent-primary-high, #f0640d);white-space:nowrap}.wcm-social-grid{display:grid;gap:8px;width:100%}.wcm-dialog-body .wcm-social-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wcm-drawer-body .wcm-social-grid{grid-template-columns:1fr}.wcm-social-item{display:flex;background:var(--ds-surface-medium, #f5f7fa);border:none;border-radius:12px;cursor:pointer;transition:none;font-family:inherit;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wcm-social-item:hover{background:#2e3544!important}:root[data-ds-theme=light] .wcm-social-item:hover{background:#eff3f8!important}.wcm-social-item[data-provider=apple] .wcm-social-icon{color:#000}[data-theme=dark] .wcm-social-item[data-provider=apple] .wcm-social-icon{color:#fff}.wcm-dialog-body .wcm-social-item{flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:16px}.wcm-drawer-body .wcm-social-item{flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;padding:16px}.wcm-social-icon{flex-shrink:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center}.wcm-social-icon>svg{width:32px;height:32px}.wcm-social-name{font-family:Inter,sans-serif;font-weight:600;font-size:14px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wcm-separator{display:flex;align-items:center;gap:12px;width:100%}.wcm-separator-line{flex:1;height:1px;background:var(--ds-border-default, rgba(0, 0, 0, .07))}.wcm-separator-text{font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wcm-wallet-list{display:flex;flex-direction:column;gap:8px}.wcm-wallet-item{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:20px 16px;background:var(--ds-surface-medium, #f5f7fa);border:none;border-radius:12px;cursor:pointer;text-align:left;transition:none;font-family:inherit}.wcm-wallet-item:hover{background:#2e3544!important}:root[data-ds-theme=light] .wcm-wallet-item:hover{background:#eff3f8!important}.wcm-wallet-item-left{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.wcm-wallet-icon{flex-shrink:0;width:28px;height:28px;display:flex;align-items:center;justify-content:center}.wcm-wallet-icon>svg,.wcm-wallet-icon>img{width:28px;height:28px;border-radius:0;object-fit:cover}.wcm-wallet-name-row{display:flex;align-items:center;gap:8px;min-width:0}.wcm-wallet-name{font-family:Inter,sans-serif;font-weight:600;font-size:16px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wcm-wallet-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:var(--ds-system-purple-low, #f5f3ff);border:.5px solid var(--ds-system-purple-default, #7e54f4);border-radius:9999px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-system-purple-high, #7346f3);white-space:nowrap}.wcm-install-btn{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:#ff8438;border-radius:6px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:#fff;white-space:nowrap}.wcm-installed-label{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wcm-terms{font-family:Inter,sans-serif;font-weight:400;font-size:12px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-align:center;margin:0}.wcm-terms-link{color:var(--ds-content-high, rgba(0, 0, 0, .85));text-decoration:underline;text-underline-position:from-font}.wcm-terms-link:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85));text-decoration:underline}.wcm-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}
|
|
22
|
-
`);
|
|
23
|
-
`);import{jsx as
|
|
24
|
-
`);
|
|
25
|
-
`);var J1='<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>',$1='<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>',e2='<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>',t2='<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>',r2='<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 Va(e){return`data:image/svg+xml,${encodeURIComponent(e)}`}var js=Va(J1),Ws=Va($1),_s=Va(e2),Gs=Va(t2),Hs=Va(r2);import{jsx as Sr,jsxs as qa}from"react/jsx-runtime";function Hg({isConnecting:e,address:t,provider:r,providerName:n,accountName:o,sendAccounts:a,onConnect:i,onDisconnect:s,onCopy:l,onSelectWallet:d,onBuy:c,onBuyDisabledMessage:h,label:u="Connect Wallet",connectingLabel:m="Connecting...",disconnectLabel:y,className:b,theme:f="dark",env:p,showBalance:w=!0,showPortfolio:g,drawerDirection:x,modal:k,connectorId:R,style:E,walletInfoStyle:S,sendTransaction:C,getTransactionReceipt:I,estimateGas:M,onReceive:B,onBridge:L,onSend:z,bridgeTokens:A,bridgeHistory:F,getBridgeQuote:ne,getBridgeToTokens:K,getBridgeApproval:_,approveBridge:G,submitBridge:oe}){let Z=b?`cb-button ${b}`:"cb-button",U=b?`cb-pill ${b}`:"cb-pill";if(Gg.useEffect(()=>{Ao(t)},[t]),e)return qa("button",{type:"button",disabled:!0,className:Z,style:E,"aria-busy":"true",children:[Sr("span",{className:"cb-spinner","aria-hidden":"true"}),Sr("span",{className:"cb-button-label",children:m})]});if(t){let X=n??i2(r),H=r?a2[r]:void 0;return Sr(ye,{feature:"connect_button",children:qa(Yo,{env:p,theme:f,drawerDirection:x,modal:k,showBalance:w,showPortfolio:g,walletAddress:t,accountName:o,sendAccounts:a,connectorName:n??(r?Qg[r]:void 0),connectorId:R,onSelectWallet:d,onCopyAddress:l?(pe,be)=>{be&&l()}:void 0,onDisconnect:s,disconnectLabel:y,style:S,sendTransaction:C,getTransactionReceipt:I,estimateGas:M,onReceive:B,onBridge:L,onBuy:c,onBuyDisabledMessage:h,onSend:z,bridgeTokens:A,bridgeHistory:F,getBridgeQuote:ne,getBridgeToTokens:K,getBridgeApproval:_,approveBridge:G,submitBridge:oe,children:[Sr(Yo.Trigger,{asChild:!0,children:qa("button",{type:"button",className:U,"data-track":"wallet_pill_open",style:E,"aria-label":`Connected with ${X}: ${_g(t)}`,children:[H?Sr("img",{src:H,alt:"",width:18,height:18,className:"cb-pill-icon","data-provider":r}):Sr("span",{className:"cb-pill-icon-placeholder","aria-hidden":"true"}),Sr("span",{className:"cb-pill-address",children:_g(t)})]})}),Sr(Yo.Content,{align:"end",sideOffset:8})]})})}return Sr(ye,{feature:"connect_button",children:qa("button",{type:"button",onClick:i,className:Z,"data-track":"connect_click",style:E,"aria-label":typeof u=="string"?u:"Connect Wallet",children:[Sr(o2,{}),Sr("span",{className:"cb-button-label",children:u})]})})}function o2(){return qa("svg",{className:"cb-button-icon",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[Sr("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"}),Sr("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"}),Sr("path",{d:"M12.75 11.25H12.7575",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}var a2={google:Gs,apple:Hs,cross:js,metamask:Ws,binance:_s},Qg={google:"Google",apple:"Apple",cross:n2.default,metamask:"MetaMask",binance:"Binance Wallet"};function i2(e){return e?Qg[e]:"Wallet"}function _g(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}import*as Vg from"react";ce(`.sb-button{--sb-bg: var(--ds-surface-default, #ffffff);--sb-border: var(--ds-border-default, rgba(0, 0, 0, .07));--sb-border-hover: var(--ds-border-default, rgba(0, 0, 0, .07));--sb-color: var(--ds-content-medium, rgba(0, 0, 0, .65));--sb-color-hover: var(--ds-content-high, rgba(0, 0, 0, .85));--sb-radius: 8px;--sb-height: 36px;--sb-padding: 1px 11px;--sb-gap: 4px;--sb-font-size: 14px;--sb-font-weight: 500;--sb-line-height: 21px;--sb-letter-spacing: 0;--sb-blur: 0px;--sb-border-width: 1px;--sb-icon-size: 18px;--sb-icon-hover-rotation: 180deg;--sb-spinner-size: 18px;--sb-spinner-thumb: currentColor;--sb-spinner-track: color-mix(in srgb, currentColor 20%, transparent);--sb-disabled-opacity: .6;--sb-press-scale: .95;--sb-hover-duration: .2s;--sb-icon-duration: .3s;--sb-easing: ease}.sb-button[data-theme=dark]{--sb-bg: var(--ds-surface-default, #1e232e);--sb-border: var(--ds-border-default, #ffffff12);--sb-border-hover: var(--ds-border-medium, #ffffff2e);--sb-color: var(--ds-content-medium, #ffffffa6);--sb-color-hover: var(--ds-content-high, #ffffffd9)}.sb-button[data-theme=light]{--sb-bg: var(--ds-surface-default, #ffffff);--sb-border: var(--ds-border-default, #00000012);--sb-border-hover: var(--ds-border-medium, #0000002e);--sb-color: var(--ds-content-medium, #000000a6);--sb-color-hover: var(--ds-content-high, #000000d9)}
|
|
26
|
-
`);
|
|
27
|
-
`);import{jsx as
|
|
1
|
+
function Gd(e){try{return import.meta.env?.[e]}catch{return}}function Hd(e){if(!(typeof process>"u"))return process.env?.[e]}function ot(e){if(e)return Qd(e);let t=Gd("VITE_CROSSX_ENVIRONMENT")??Gd("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??Hd("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??Hd("CROSSX_ENVIRONMENT");return Qd(t)}function Qd(e){switch(e?.toLowerCase()){case"dev":case"development":return"dev";case"stage":case"staging":case"stg":return"stage";default:return"production"}}import*as un from"react";var yh={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"},xh=3e3;function Pr(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 Xs=new Map;function so(e,t){let r=`${yh[t]}/${e}`,n=Xs.get(r);return n||(n=(async()=>{let o=new AbortController,a=setTimeout(()=>o.abort(),xh);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&&Xs.delete(r),o)),Xs.set(r,n)),n}function vh(e){return typeof e=="string"&&e.startsWith("https://")}async function Ae(e,t){let r=await so("endpoints.json",t),n=Pr(r?.apis?.[e],t);if(!vh(n))throw new Error(`[remote-config] endpoints.json missing or invalid api base: ${e} (${t})`);return n}function ni(e,t){let r=Pr(e?.relay?.forwarderFactories,t),n=[r?.standingForwarderFactory,r?.depositorForwarderFactory].filter(o=>typeof o=="string");return n.length>0?n:void 0}var oi="chains.json";async function kh(e,t){return(await so(oi,t))?.chains?.[String(e)]??{}}function sa(e,t){let[r,n]=un.useState({});return un.useEffect(()=>{if(e==null){n({});return}let o=!0;return so(oi,t).then(a=>{o&&n(a?.chains?.[String(e)]??{})}),()=>{o=!1}},[e,t]),r}function Rh(e){let[t,r]=un.useState({});return un.useEffect(()=>{let n=!0;return so(oi,e).then(o=>{n&&r(o?.chains??{})}),()=>{n=!1}},[e]),t}function rr(e,t,r){let[n,o]=un.useState(void 0),a=un.useRef(r);return a.current=r,un.useEffect(()=>{let i=!0;return so(e,t).then(s=>{if(!i)return;let l=a.current(s);l!==void 0&&o(l)}),()=>{i=!1}},[e,t]),n}var lo="1.4.1-beta.2";var ai="__nexusCrossAppLauncherRuntime";function Sh(){if(typeof window>"u")return null;let e=window;return e[ai]??(e[ai]={mode:"dapp-ui"}),e[ai]}function Ch(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${lo}, \uC0AC\uC6A9 \uBAA8\uB4DC: connect-kit)`)}else console.info(`[CROSSx App Launcher] dapp-ui v${lo} \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 Js(e){let t=Sh();t&&(e?.mode==="connect-kit-react"?t.mode="connect-kit-react":t.mode||(t.mode="dapp-ui"),e?.connectKitVersion&&(t.connectKitVersion=e.connectKitVersion),Ch(t))}import{BrowserClient as Nh,Scope as Th,defaultStackParser as Ih,linkedErrorsIntegration as Eh,makeFetchTransport as Mh}from"@sentry/react";var Ah="https://5c82aeb32da33b5a0a14b7c5393992ca@o4511668907081728.ingest.de.sentry.io/4511705324126289",Lh=`dapp-ui@${lo}`,Mo=null,Vd=.1;function qd(){return Vd}function Dh(e){switch(e){case"dev":return"dev";case"stage":return"stg";default:return"prod"}}function la(e){if(Mo)return Mo;if(typeof window>"u")return null;let t=Dh(ot(e?.environment));typeof e?.analyticsSampleRate=="number"&&(Vd=Math.min(1,Math.max(0,e.analyticsSampleRate)));let r=new Nh({dsn:e?.dsn??Ah,transport:Mh,stackParser:Ih,integrations:[Eh()],environment:t,release:Lh,enabled:e?.enabled??t==="prod"}),n=new Th;return n.setClient(r),n.setTags({package:"dapp-ui",framework:"react",source:"dapp-ui"}),r.init(),Mo=n,Mo}function ii(){return Mo}function si(e,t){let r=Mo??la();if(r)return r.captureException(e,t?{captureContext:{extra:t}}:void 0)}import{Component as Ph}from"react";var li=class extends Ph{constructor(){super(...arguments);this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(r,n){si(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 Re(...e){return e.filter(Boolean).join(" ")}var Oh=/CROSSx|ONE\s?wallet|ONE\s?pocket/i;function Ao(){return typeof window>"u"?!1:Oh.test(window.navigator.userAgent)}var Yd="__nexus_dapp_ui_uid",$s=null;function Bh(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Array.from({length:32},()=>Math.floor(Math.random()*16).toString(16)).join("")}function el(){if($s)return $s;let e=null;try{e=window.localStorage.getItem(Yd)}catch{}if(!e||!e.startsWith("anon_")){e=`anon_${Bh()}`;try{window.localStorage.setItem(Yd,e)}catch{}}return $s=e,e}async function Kd(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 zh(){let e=window.navigator.userAgent;return/ipad|tablet|(android(?!.*mobile))/i.test(e)?"tablet":/mobile|iphone|ipod|android/i.test(e)?"mobile":"desktop"}function Jd(){return{host:window.location.hostname,device_type:zh(),is_cross_inapp:String(Ao())}}var Zd=!1;function tl(){if(typeof window>"u")return null;let e=ii()??la();return e?(Zd||(Zd=!0,e.setUser({id:el()})),e):null}function $d(){return Math.random()>=qd()}var Xd=0;function Lo(e){let t=tl();if(!t)return;let r=++Xd;if(!e){t.setUser({id:el()});return}Kd(e).then(n=>{n&&r===Xd&&t.setUser({id:n})})}function di(e,t,r){let n=tl();!n||$d()||n.captureMessage(`ui: ${e}_${t}`,"info",{captureContext:{tags:{...Jd(),feature:e,action:t,...r}}})}function qe(e,t,r){let n=tl();if(!n||$d())return;let o=r?.status??"success";n.captureMessage(`funnel: ${e}_${t}`,"info",{captureContext:{tags:{...Jd(),flow:e,funnel_step:`${e}_${t}`,funnel_status:o,...o==="failure"?{failure_reason:r?.reason??"unknown"}:{},...r?.tags}}})}function Nr(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"}import{useCallback as Fh}from"react";import{jsx as Uh}from"react/jsx-runtime";function xe({feature:e,children:t}){let r=Fh(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");di(e,s,l?{item_id:l}:void 0)},[e]);return Uh("div",{style:{display:"contents"},onClick:r,children:t})}import*as Oo from"react";import*as tc from"@radix-ui/react-popover";import{Drawer as Yh}from"vaul";import{createContext as jh,useContext as Wh}from"react";var rl=jh(null);function ci(){let e=Wh(rl);if(!e)throw new Error("AppLauncher compound components must be used within <AppLauncher>");return e}import*as ui from"react";var _h="__dappUiOverlay",co=[],Do=0,ol=0,pi=!1,nl=!1;function ec(){if(ol>0){ol-=1;return}Do=Math.max(0,Do-1),co.pop()?.close(),al()}function Gh(){pi||(window.addEventListener("popstate",ec),pi=!0)}function al(){co.length>0||!pi||(window.removeEventListener("popstate",ec),pi=!1)}function Hh(){nl||(nl=!0,queueMicrotask(()=>{nl=!1;let e=Do-co.length;if(e<=0){al();return}Do-=e,ol+=1,window.history.go(-e),al()}))}function On(e,t){let r=ui.useRef(t);r.current=t,ui.useEffect(()=>{if(!(!e||typeof window>"u"))return Qh(()=>r.current())},[e])}function Qh(e){let t={close:e};return co.push(t),Do<co.length&&(window.history.pushState({[_h]:!0},""),Do+=1),Gh(),()=>{let r=co.lastIndexOf(t);r!==-1&&(co.splice(r,1),Hh())}}import{useState as Vh,useEffect as qh}from"react";function Po(e){let[t,r]=Vh(!1);return qh(()=>{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 de(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))}de(`[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
|
+
`);de(`.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
|
+
`);de(`@keyframes al-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
|
|
4
|
+
`);de(`.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
|
+
`);de("");import{jsx as il}from"react/jsx-runtime";function rc({env:e,theme:t="dark",mobileBreakpoint:r=768,domain:n,children:o}){let a=Po(`(max-width: ${r}px)`),[i,s]=Oo.useState(!1),l=Oo.useCallback(()=>s(!1),[]),d=ot(e);On(i,l);let c=Oo.useMemo(()=>({env:d,theme:t,isMobile:a,open:i,domain:n,close:l}),[d,t,a,i,n,l]);return il(rl.Provider,{value:c,children:a?il(Yh.Root,{direction:"right",open:i,onOpenChange:s,noBodyStyles:!0,children:o},"drawer"):il(tc.Root,{open:i,onOpenChange:s,children:o},"popover")})}import*as ic from"@radix-ui/react-popover";import{Drawer as Zh}from"vaul";import{jsx as Tr,jsxs as Kh}from"react/jsx-runtime";function nc({size:e=18}){return Kh("svg",{className:"al-trigger-icon",width:e,height:e,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Tr("rect",{width:"4",height:"4",rx:"2",fill:"currentColor"}),Tr("rect",{x:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),Tr("rect",{x:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),Tr("rect",{y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),Tr("rect",{x:"7",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),Tr("rect",{x:"14",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),Tr("rect",{y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),Tr("rect",{x:"7",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),Tr("rect",{x:"14",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"})]})}function oc(){return Tr("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Tr("path",{d:"M12 19L5 12M5 12L12 5M5 12H19",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function ac(){return Tr("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Tr("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}import{jsx as Bo}from"react/jsx-runtime";function sc({asChild:e,children:t,className:r,style:n}){let{isMobile:o,theme:a}=ci(),i=t!=null,s=e??!0,l=r?`al-trigger-btn ${r}`:"al-trigger-btn",d=i?t:Bo("button",{type:"button",className:l,"data-theme":a,"data-track":"open",style:n,children:Bo(nc,{size:18})});return o?Bo(xe,{feature:"app_launcher",children:Bo(Zh.Trigger,{asChild:s,children:d})}):Bo(xe,{feature:"app_launcher",children:Bo(ic.Trigger,{asChild:s,children:d})})}import*as fn from"react";import*as mi from"@radix-ui/react-popover";import{Drawer as zo}from"vaul";import{useQuery as $h}from"@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 Xh="https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",Jh="https://contents.crosstoken.io/frontend/common/app-launcher/icons";function en(e,t){return`${e==="production"?Jh:Xh}/${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:en(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:en(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:en(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:en(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:en(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:en(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:en(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:en(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:en(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:en(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:en(t,"wave"),order:11e4,type:"wave",badge:null,isNew:!1,serviceStatus:"available"}]}}function fi(e){let t=ot(e);return $h({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 sl(e){return e.serviceStatus==="ending"||e.serviceStatus==="comingSoon"?e.serviceStatus:"available"}function pc(e,t){return typeof e=="string"?e:e[t]??e.production??e.stage??e.dev}function uc(e){return[...e].sort((t,r)=>{let n=cc(t)-cc(r);return n!==0?n:t.order-r.order})}function cc(e){let t=sl(e);return t==="comingSoon"?0:t==="ending"?2:1}import{jsx as Ot,jsxs as Fo}from"react/jsx-runtime";function eb(e){return e.id==="cross-staking"||e.type==="cross-staking"}function mc({align:e="end",sideOffset:t=8,className:r}){let{env:n,theme:o,isMobile:a,domain:i,close:s}=ci(),{data:l}=fi(n),d=fn.useMemo(()=>uc(l?.items??[]),[l?.items]),c=24,h=fn.useRef(null),u=fn.useRef(!1),m=fn.useCallback(x=>{h.current={x:x.clientX,y:x.clientY},u.current=!1},[]),y=fn.useCallback(x=>{let k=h.current;h.current=null,k&&(u.current=Math.abs(x.clientX-k.x)>c||Math.abs(x.clientY-k.y)>c)},[]),b=fn.useCallback(()=>{h.current=null,u.current=!0},[]),f=typeof window<"u"?window.location.pathname:"",p=fn.useCallback((x,k)=>{let R=u.current;if(u.current=!1,R&&x.detail!==0)return;let I=k.url[n]??k.url.production,S=fc(I,i);if(!S)try{let C=new URL(I);if(C.pathname===window.location.pathname&&C.search===window.location.search&&C.hash===window.location.hash){s();return}}catch{}if(S){let C=window.open(I,"_blank");if(C){C.opener=null,s();return}}window.location.href=I},[n,i,s]),w=x=>{let k=x.url[n]??x.url.production,R=fc(k,i),I=sl(x),S=I==="ending",C=pc(x.iconUrl,n),E=!1;if(!R)try{let M=new URL(k).pathname;E=f===M||f.startsWith(M+"/")}catch{E=!1}return Ot("button",{type:"button",className:"al-grid-item","data-track":"menu_item_click","data-track-id":x.id,"data-active":E||void 0,"data-service-status":I,onPointerDown:m,onPointerUp:y,onPointerCancel:b,onClick:M=>p(M,x),children:Fo("div",{className:"al-grid-item-left",children:[Fo("div",{className:"al-grid-item-icon",children:[Ot("img",{src:C,alt:x.label,width:24,height:24,loading:"lazy"}),x.isNew&&Ot("span",{className:"al-status-ribbon al-status-ribbon-new",children:"N"})]}),Fo("span",{className:"al-grid-item-text",children:[Ot("span",{className:"al-grid-item-label",children:x.label}),S&&Ot("span",{className:"al-grid-item-status-text",children:"(End Soon)"}),x.badge&&!eb(x)&&Ot("span",{className:"al-badge al-badge-list",children:x.badge})]})]})},x.id)},g=Ot("div",{className:"al-menu","data-theme":o,children:Ot("div",{className:"al-grid",children:d.map(w)})});return a?Ot(xe,{feature:"app_launcher",children:Fo(zo.Portal,{children:[Ot(zo.Overlay,{className:"al-drawer-overlay"}),Fo(zo.Content,{className:Re("al-drawer-content",r),"data-theme":o,children:[Fo("div",{className:"al-drawer-header",children:[Ot(zo.Close,{className:"al-drawer-close","data-track":"close",children:Ot(oc,{})}),Ot(zo.Title,{className:"al-drawer-title",children:"CROSS Services"}),Ot(zo.Close,{className:"al-drawer-close","data-track":"close",children:Ot(ac,{})})]}),Ot("div",{className:"al-drawer-body",children:g})]})]})}):Ot(xe,{feature:"app_launcher",children:Ot(mi.Portal,{children:Ot(mi.Content,{align:e,sideOffset:t,className:Re("al-popover-content",r),"data-theme":o,children:g})})})}function fc(e,t){try{let r=new URL(e).hostname;return typeof window>"u"?!0:r!==(t??window.location.hostname)}catch{return!1}}import*as Jt from"react";import*as nm from"@radix-ui/react-popover";import{Drawer as Px}from"vaul";import{createContext as tb,useContext as rb}from"react";var ll=tb(null);function Bn(){let e=rb(ll);if(!e)throw new Error("WalletInfo compound components must be used within <WalletInfo>");return e}import{WALLET_LABELS as nb}from"@nexus-cross/crossx-design-system";var dl=(n=>(n.CROSSx="crossx",n.MetaMask="io.metamask",n.Binance="com.binance.wallet",n))(dl||{}),gi={crossx:{name:nb.default,iconUrl:"https://contents.crosstoken.io/wallet/token/images/tCROSS.svg"},"io.metamask":{name:"MetaMask",iconUrl:"https://upload.wikimedia.org/wikipedia/commons/3/36/MetaMask_Fox.svg"},"com.binance.wallet":{name:"Binance Wallet",iconUrl:"https://public.bnbstatic.com/static/images/common/favicon.ico"}};import*as sp from"react";import{jsx as Le,jsxs as po}from"react/jsx-runtime";function gc({size:e=16,className:t}){return po("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Le("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"}),Le("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 uo({size:e=16,className:t}){return Le("svg",{width:e,height:e,viewBox:"4 4 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Le("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 Rn({size:e=16,className:t}){return Le("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Le("path",{d:"M11.6667 3.5L5.25 9.91667L2.33334 7",stroke:"currentColor",strokeWidth:1.16667,strokeLinecap:"round",strokeLinejoin:"round"})})}function Ir({size:e=24,className:t}){return Le("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Le("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function hc({size:e=20,className:t}){return po("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Le("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"}),Le("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 hi({size:e=20,className:t}){return Le("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,children:Le("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 tn({size:e=20,className:t}){return Le("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Le("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor",strokeWidth:1.67,strokeLinecap:"round",strokeLinejoin:"round"})})}function Or({size:e=20,className:t}){return Le("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Le("path",{d:"M5 8L10 13L15 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function bc({size:e=16,className:t}){return po("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Le("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"}),Le("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 wc({size:e=16,className:t}){return po("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Le("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"}),Le("path",{d:"M1.667 1.667l16.666 16.666",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}var ob='<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>',ab=`data:image/svg+xml,${encodeURIComponent(ob)}`;function yc({size:e=42,className:t}){return Le("img",{src:ab,width:e,height:e,alt:"",className:t,style:{display:"block"}})}function xc({size:e=20,className:t}){return Le("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Le("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 po("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Le("defs",{children:po("linearGradient",{id:"wi-send-solid-grad",x1:"3",y1:"21",x2:"21",y2:"3",gradientUnits:"userSpaceOnUse",children:[Le("stop",{stopColor:"var(--wi-send-solid-from, #f62e61)"}),Le("stop",{offset:"1",stopColor:"var(--wi-send-solid-to, #f7564a)"})]})}),Le("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 kc({size:e=20,className:t}){return Le("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Le("path",{d:"M10.8333 14.1667V7.5M15 14.1667V4.16667M2.5 2.5V15.8333C2.5 16.2754 2.67559 16.6993 2.98816 17.0118C3.30072 17.3244 3.72464 17.5 4.16667 17.5H17.5M6.66667 14.1667V11.6667",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function Rc({size:e=20,className:t}){return Le("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Le("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 Sc({size:e=20,className:t}){return Le("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Le("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 Cc({size:e=20,className:t}){return po("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Le("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor"}),Le("path",{d:"M6 10.2L8.6 12.8L14 7.2",stroke:"var(--ds-accent-primary-on, #ffffff)",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})]})}import*as le from"react";import fo from"bignumber.js";function ib(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 Sn(e,t){if(!e||e==="0")return"0.00";let r=new fo(e).shiftedBy(-t),n=r.isGreaterThanOrEqualTo(1)?2:4;return r.toFormat(n,fo.ROUND_DOWN)}function nr(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}function mo(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 bi(e,t,r){let o=new fo(e).shiftedBy(-t).multipliedBy(new fo(r));return o.isZero()||o.isNaN()?"$0.00":`$${(o.integerValue(fo.ROUND_DOWN).isGreaterThanOrEqualTo(1)?o.decimalPlaces(2,fo.ROUND_DOWN):o.decimalPlaces(4,fo.ROUND_DOWN)).toFormat()}`}function Nc(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=ib(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}}import{useMemo as Ic}from"react";import{useQuery as sb}from"@tanstack/react-query";var gt={dev:{cross:612044,bsc:97},stage:{cross:612044,bsc:97},production:{cross:612055,bsc:56}},wi="https://terms.onechain.nexus/docs/terms-july-23-2026",yi="https://terms.onechain.nexus/docs/pp-july-23-2026",Tc="https://contents.crossdefi.io/Terms/terms/tos-26-07-09-oneusd.html";var lb="send:chain-info";function db(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 Ec(e,t,r,n){if(n)return t===gt[e].cross?Mc(t,n):r?.explorer_url?cl(r.explorer_url,r.explorer_postfix?.transaction??"tx",n):cb(e,t,n)}function Mc(e,t){return cl("https://explorer.onechain.nexus",String(e),"tx",t)}function cb(e,t,r){let n=gt[e];if(t===n.cross)return Mc(t,r);if(t===n.bsc)return cl(e==="production"?"https://bscscan.com":"https://testnet.bscscan.com","tx",r)}function da(e,t,r,n=!0){let o=sb({queryKey:[lb,e,t],queryFn:async({signal:s})=>{let l=await Ae("walletServer",e),d=await fetch(`${l}/v1/public/chain/info/${t}`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Failed to fetch chain info: ${d.status}`);let c=await d.json();if("code"in c&&c.code!==void 0&&c.code!==200)throw new Error(`Chain info API error: ${c.code}`);return db(c)},enabled:n,staleTime:3e5}),a=o.data;return{transactionUrl:Ic(()=>Ec(e,t,a,r),[t,a,e,r]),chainInfo:a,...o}}function Ac(e,t,r=!0){let{chainInfo:n}=da(e,t,void 0,r);return{buildTxUrl:Ic(()=>a=>Ec(e,t,n,a),[e,t,n]),chainInfo:n}}var Lc="0x0000000000000000000000000000000000000001";var pb="0xa9059cbb",ub=/^0x[a-fA-F0-9]{40}$/,fb="nexus-cross:dapp-ui:send:recent:",Dc=10;function mb(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return e.slice(0,t)}function ca(e){return e.toLowerCase()}function mn(e){return ub.test(e)}function zn(e){return ca(e.address)===Lc}function pl(e){return`${fb}${e.toLowerCase()}`}function Uo(e){if(typeof window>"u")return[];try{let t=window.localStorage.getItem(pl(e));if(!t)return[];let r=JSON.parse(t);return Array.isArray(r)?r.filter(n=>n!==null&&typeof n=="object"&&mn(n.address)&&typeof n.updatedAt=="number").slice(0,Dc):[]}catch{return[]}}function ul(e,t){if(typeof window>"u")return[];let r=ca(t),n=[{address:r,updatedAt:Date.now()},...Uo(e).filter(o=>o.address!==r)].slice(0,Dc);try{window.localStorage.setItem(pl(e),JSON.stringify(n))}catch{return Uo(e)}return n}function fl(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(pl(e))}catch{}}function go(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 jo(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=mb(a.toString().padStart(t,"0"));return`${o.toString()}.${i}`}function ml(e,t){let r=e.replace(/^0x/,"").toLowerCase().padStart(64,"0"),n=t.toString(16).padStart(64,"0");return`${pb}${r}${n}`}function xi(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 gl(e,t){return xi(e,t,6)}function Pc(e){return xi(e,9,2)}function Oc(e){return e.toLocaleString("en-US")}function vi(e){return e===56||e===97}function ki(e){return e.gasPrice??e.maxFeePerGas}function Bc(e,t=!1){return t?ki(e)!==void 0?"legacy":null:e.maxFeePerGas!==void 0?"dynamic":e.gasPrice!==void 0?"legacy":null}function Ri(e,t=!1){if(t){let r=ki(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 Si(e){return!Number.isFinite(e)||e<=0?"$0.00":`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function zc(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(zc(r.cause,t+1)),n.join(`
|
|
6
|
+
`).toLowerCase()}function gb(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 hl(e,t={},r="Failed to send transaction."){let n=zc(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.":gb(e)||r}var hb=2000000000n,bb=1000000000n;async function Ci(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 Ni(e){return BigInt(e)}function wb(e){return`0x${e.toString(16)}`}function yb(e){let t={to:e.to};return e.from&&(t.from=e.from),e.value!==void 0&&e.value>0n&&(t.value=wb(e.value)),e.data&&(t.data=e.data),t}function xb(e){return e===56||e===97}async function Fc(e){try{let t=await Ci(e,"eth_gasPrice",[]);return{gasPrice:Ni(t)}}catch{return{gasPrice:hb}}}async function vb(e,t){let r=bb;try{let n=await Ci(e,"eth_maxPriorityFeePerGas",[]);r=Ni(n)}catch{}return{maxFeePerGas:t+r,maxPriorityFeePerGas:r}}async function kb(e,t){if(t)return Fc(e);let r;try{r=(await Ci(e,"eth_getBlockByNumber",["latest",!1]))?.baseFeePerGas}catch{}return r?vb(e,Ni(r)):Fc(e)}async function Uc(e,t){let r=xb(t.chainId),n=yb(t),[o,a]=await Promise.all([Ci(e,"eth_estimateGas",[n]),kb(e,r)]);return{gasLimit:Ni(o),gasPrice:a.gasPrice,maxFeePerGas:a.maxFeePerGas,maxPriorityFeePerGas:a.maxPriorityFeePerGas}}function jc(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 Uc(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 Rb=1500,Sb=120;function Wc(e){return!!(e.token||e.recipient||e.amount)}function bl({recipient:e,amount:t,token:r,balanceRaw:n}){let o={},a=e.trim(),i=go(t,r.quantity.decimals),s;return a?mn(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)&&!mn(r.address)&&(o.token="Token contract address is invalid."),{errors:o,rawAmount:o.amount?void 0:s,recipient:a&&mn(a)?a:void 0}}function wl({token:e,walletAddress:t,recipient:r,rawAmount:n}){let o=t;return zn(e)?{to:r,value:n,chainId:e.chainId,from:o}:{to:ca(e.address),data:ml(r,n),value:0n,chainId:e.chainId,from:o}}function Cb(e){let{status:t}=e;return t==="reverted"||t==="0x0"||t===0||t===0n||t===!1}var Nb=e=>new Promise(t=>setTimeout(t,e));async function _c({repository:e,args:t,chainId:r,onSubmitted:n,pollIntervalMs:o=Rb,pollMaxAttempts:a=Sb}){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 Cb(d)?"reverted":"success";await Nb(o)}return"timeout"}var Gc=["token","recipient","amount","review"];function Hc(e){let{env:t,walletAddress:r,accountName:n,accounts:o=[],initialStep:a="recipient",token:i,tokens:s=[],onTokenChange:l,sendTransaction:d,getTransactionReceipt:c,estimateGas:h,getTokenPriceUsd:u,onSubmitted:m,onSuccess:y,onFailed:b,onExit:f,onOutlink:p}=e,w=le.useMemo(()=>jc({sendTransaction:d,getTransactionReceipt:c,estimateGas:h}),[d,c,h]),[g,x]=le.useState(i);le.useEffect(()=>{x(i)},[i.address,i.chainId]);let[k,R]=le.useState(a),[I,S]=le.useState(""),[C,E]=le.useState(""),[M,F]=le.useState({}),[L,z]=le.useState("idle"),[A,U]=le.useState(""),[re,Y]=le.useState(""),[_,G]=le.useState(null),[ne,te]=le.useState(!1),[O,Z]=le.useState(""),H=le.useRef(0),[ce,ve]=le.useState(null),[ge,ue]=le.useState(""),[me,we]=le.useState(()=>Uo(r)),Ze=le.useRef(new Set),he=le.useCallback((B,oe)=>{Ze.current.has(B)||(Ze.current.add(B),qe("send",B,oe))},[]);le.useEffect(()=>{he("opened"),a!=="token"&&he("token_selected",{tags:{item_id:i.symbol}})},[he,a,i.symbol]);let Ee=le.useMemo(()=>ot(t),[t]),{transactionUrl:at,chainInfo:Qe}=da(Ee,g.chainId,A||void 0,!0),We=sa(g.chainId,Ee),Be=We.nativeSymbol??Qe?.currency_symbol??"",rt=We.name??Qe?.name??`Chain ID ${g.chainId}`,Nt=le.useRef({nativeSymbol:Be||void 0,networkName:rt,tokenSymbol:g.symbol});Nt.current={nativeSymbol:Be||void 0,networkName:rt,tokenSymbol:g.symbol};let ut=le.useMemo(()=>BigInt(g.quantity.numeric||"0"),[g.quantity.numeric]),xt=le.useMemo(()=>Sn(g.quantity.numeric,g.quantity.decimals),[g.quantity.numeric,g.quantity.decimals]),be=u?.(g),Vt=le.useMemo(()=>{if(be===void 0)return;let B=parseFloat(C.replace(/,/g,""));return Number.isFinite(B)?B*be:0},[C,be]);le.useEffect(()=>{E(""),F({})},[g.address,g.chainId]),le.useEffect(()=>{H.current+=1,G(null),Z(""),te(!1)},[g.address,g.chainId,I,C]),le.useEffect(()=>{we(Uo(r))},[r]);let bt=le.useCallback(B=>{S(B),F(oe=>({...oe,recipient:void 0}))},[]),wt=le.useCallback(B=>{E(B),F(oe=>({...oe,amount:void 0}))},[]),nt=le.useCallback(()=>{E(xt.replace(/,/g,"")),F(B=>({...B,amount:void 0}))},[xt]),et=le.useCallback(B=>{x(B),l?.(B),he("token_selected",{tags:{item_id:B.symbol}}),R("recipient")},[l,he]),er=le.useCallback(()=>R("token"),[]),At=le.useCallback(()=>{R(B=>{if(B==="result")return"review";if(B===a)return f?.(),B;let oe=Gc.indexOf(B);return oe<=0?(f?.(),B):Gc[oe-1]})},[a,f]),Ut=le.useCallback(()=>{let{errors:B}=bl({recipient:I,amount:"1",token:g,balanceRaw:ut});if(B.recipient){F(oe=>({...oe,recipient:B.recipient}));return}F(oe=>({...oe,recipient:void 0})),he("recipient_entered"),R("amount")},[I,g,ut,he]),Lt=le.useCallback(B=>{S(B),F(oe=>({...oe,recipient:void 0})),he("recipient_entered"),R("amount")},[he]),Ve=le.useCallback(()=>{let B=bl({recipient:I,amount:C,token:g,balanceRaw:ut});F(B.errors),!(Wc(B.errors)||B.rawAmount===void 0||!B.recipient)&&(ve(B.rawAmount),ue(B.recipient),G(null),Z(""),z("idle"),he("amount_entered"),R("review"))},[I,C,g,ut,he]);le.useEffect(()=>{if(k!=="review"||!ge||ce===null||_!==null||ne||O||!w.canEstimateGas(Qe?.rpc))return;let B=++H.current;te(!0),Z(""),(async()=>{try{let oe=wl({token:g,walletAddress:r,recipient:ge,rawAmount:ce}),se=await w.estimateGas(oe,Qe?.rpc);if(H.current!==B)return;G(se)}catch(oe){if(H.current!==B)return;Z(hl(oe,Nt.current,"Failed to estimate gas."))}finally{H.current===B&&te(!1)}})()},[k,ge,ce,_,ne,O,w,Qe?.rpc,g,r]);let Pe=le.useMemo(()=>{if(!zn(g)||!_||ce===null)return!1;let B=Ri(_,vi(g.chainId));return B===null?!1:ce+B>ut},[g,_,ce,ut]),ft=le.useCallback(async()=>{if(!(!ge||ce===null)&&!Pe){Y(""),U(""),z("submitting"),he("submitted");try{let B="",oe=await _c({repository:w,args:wl({token:g,walletAddress:r,recipient:ge,rawAmount:ce}),chainId:g.chainId,onSubmitted:se=>{B=se,U(se),z("confirming"),we(ul(r,ge)),m?.({txHash:se,chainId:g.chainId,amount:C,tokenSymbol:g.symbol,recipient:ge})}});if(oe==="success")z("success"),he("confirmed"),B&&y?y?.(B):R("result");else if(oe==="reverted"){let se="Transaction reverted on-chain.";z("error"),Y(se),he("confirmed",{status:"failure",reason:Nr(new Error(se))}),B&&b?b({txHash:B,chainId:g.chainId,message:se}):R("result")}else{let se="Transaction receipt was not found. Please check again later.";z("error"),Y(se),he("confirmed",{status:"failure",reason:"timeout"}),B&&b?b({txHash:B,chainId:g.chainId,message:se}):R("result")}}catch(B){z("error"),he("confirmed",{status:"failure",reason:Nr(B)}),Y(hl(B,{nativeSymbol:Be||void 0,networkName:rt,tokenSymbol:g.symbol})),R("result")}}},[w,ge,ce,Pe,g,C,r,m,y,b,Be,rt,he]),[Tt,Ne]=le.useState(!1),It=le.useRef(void 0);le.useEffect(()=>()=>clearTimeout(It.current),[]);let qt=le.useCallback(async()=>{if(A)try{await navigator.clipboard.writeText(A),Ne(!0),clearTimeout(It.current),It.current=setTimeout(()=>Ne(!1),2e3)}catch{}},[A]),P=le.useCallback(()=>{if(!at||!A)return;let B=fe=>{typeof window<"u"&&window.open(fe,"_blank","noopener,noreferrer")};if(!p){B(at);return}let oe=p(at,{category:"send",origin:"send-transaction",payload:{chainId:g.chainId,txHash:A}});if(oe&&typeof oe.then=="function"){let fe=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null;oe.then(mt=>{if(mt===null){fe?.close();return}let Dt=mt??at;if(fe)try{fe.location.href=Dt}catch{fe.close(),B(Dt)}else B(Dt)});return}let se=oe;se!==null&&B(se??at)},[p,g.chainId,at,A]),ze=le.useCallback(()=>{Y(""),U(""),z("idle"),G(null),Z(""),Ze.current.delete("submitted"),Ze.current.delete("confirmed"),R("review")},[]);return{step:k,status:L,token:g,tokens:s.length>0?s:[g],recipient:I,amount:C,amountUsd:Vt,fieldErrors:M,error:re,txHash:A,gasEstimate:_,gasLoading:ne,gasError:O,insufficientGas:Pe,reviewRawAmount:ce,reviewRecipient:ge,recentAddresses:me,accounts:o,accountName:n,walletAddress:r,resolvedEnv:Ee,transactionUrl:at,networkName:rt,nativeSymbol:Be,nativeDecimals:Qe?.currency_decimals??g.quantity.decimals,balanceRaw:ut,balanceText:xt,priceUsd:be,canSelectToken:(s.length>0?s:[g]).length>1,canSend:w.canSend,getTokenPriceUsd:u,setRecipient:bt,setAmount:wt,setMax:nt,selectToken:et,goToTokenSelect:er,selectRecipient:Lt,submitRecipient:Ut,submitAmount:Ve,confirmSend:ft,retry:ze,back:At,hashCopied:Tt,copyHash:qt,openTransaction:P}}import*as rn from"react";import{jsx as pa,jsxs as yl}from"react/jsx-runtime";function Qc({flow:e}){let{amount:t,setAmount:r,amountUsd:n,balanceText:o,balanceRaw:a,token:i,setMax:s}=e,l=rn.useRef(null),d=rn.useCallback(()=>{requestAnimationFrame(()=>{let b=l.current;if(!b)return;let f=b.value.length;b.setSelectionRange(f,f)})},[]);rn.useEffect(()=>{l.current?.focus(),d()},[d]),rn.useEffect(()=>{t===""&&(u(!1),d())},[t,d]);let c=rn.useMemo(()=>{let b=go(t,i.quantity.decimals);return"value"in b&&b.value>a},[t,i.quantity.decimals,a]),[h,u]=rn.useState(!1),m=!h&&t===""?"0.00":t,y=t.trim()===""||t.trim()==="0";return pa("div",{className:"sf-body sf-amount",children:yl("div",{className:"sf-amount-center",children:[pa("span",{className:"sf-amount-usd",children:n!==void 0?Si(n):"\xA0"}),pa("div",{className:"sf-amount-input-wrap","data-over":c||void 0,"data-empty":y||void 0,onClick:()=>l.current?.focus(),children:pa("input",{ref:l,className:"sf-amount-input",value:m,onChange:b=>{let f=b.target.value;if(h)r(f);else if(t===""){if(f.length<4)return;u(!0);let p=f.startsWith("0.00")?f.slice(4):f;r(p)}else u(!0),r(f)},placeholder:"0.00",inputMode:"decimal",autoComplete:"off","aria-label":`Amount in ${i.symbol}`,size:1})}),yl("div",{className:"sf-amount-balance",children:[pa("span",{children:"Balance:"}),yl("button",{type:"button",className:"sf-amount-max",onClick:s,"data-track":"amount_max",children:[o," ",i.symbol]})]})]})})}import*as nn from"react";var Ib=new Set(["0xff42c13d927a6b9265236619161accb227b6d452","0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb"].map(e=>e.toLowerCase()));function xl(e){return Ib.has(e.toLowerCase())}var Vc={cross:"https://contents.crosstoken.io/wallet/token/images/CROSS.svg",bsc:"https://contents.crosstoken.io/wallet/token/images/BSC.svg"};function ua(e,t){let r=gt[e];if(t===r.cross)return Vc.cross;if(t===r.bsc)return Vc.bsc}var Eb={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=Eb[e],s=o?`&bg=${o}`:"";return`${i}/portrait/evm/${t}.${a}?size=${n}${s}`}import{jsx as Br,jsxs as Ti}from"react/jsx-runtime";function qc({size:e=20,className:t}){return Ti("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[Br("circle",{cx:"9",cy:"9",r:"6",stroke:"currentColor",strokeWidth:"1.7"}),Br("path",{d:"m17 17-3.2-3.2",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function Yc({size:e=20,className:t}){return Br("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":"true",children:Br("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 Kc({size:e=20,className:t}){return Ti("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[Br("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor",opacity:"0.12"}),Br("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function Zc({size:e=16,className:t}){return Br("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",className:t,"aria-hidden":"true",children:Br("path",{d:"M8 3v10m0 0 4-4m-4 4-4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function Xc({size:e=56,className:t}){return Ti("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[Br("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-green-default, #00b4b7)"}),Br("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 Jc({size:e=56,className:t}){return Ti("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[Br("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-red-default, #da0b2e)"}),Br("path",{d:"M20 20 36 36m0-16L20 36",stroke:"#ffffff",strokeWidth:"4",strokeLinecap:"round"})]})}import{jsx as Bt,jsxs as gn}from"react/jsx-runtime";function $c(e,t){return e.name||`Account ${(e.index??t)+1}`}function ep(e){return e.trim().slice(0,1).toUpperCase()||"A"}function tp(e){return e.toLowerCase()}function rp({flow:e}){let{recipient:t,setRecipient:r,fieldErrors:n,recentAddresses:o,accounts:a,walletAddress:i,resolvedEnv:s,selectRecipient:l}=e,d=nn.useMemo(()=>a.filter(g=>g.address.toLowerCase()!==i.toLowerCase()),[a,i]),c=d.length>0,h=nn.useMemo(()=>new Map(d.map((g,x)=>[tp(g.address),{account:g,index:x}])),[d]),[u,m]=nn.useState("recent"),y=nn.useRef(null);nn.useEffect(()=>{y.current?.focus()},[]);let b="1A1A2E",f=nn.useCallback(async()=>{try{let g=await navigator.clipboard.readText();g&&r(g.trim())}catch{}},[r]),p=t.trim().length>0,w=mn(t.trim());return gn("div",{className:"sf-recipient",children:[gn("div",{className:"sf-recipient-top",children:[gn("div",{className:"sf-address-field","data-filled":p||void 0,"data-invalid":n.recipient||void 0,children:[Bt("textarea",{ref:y,className:"sf-address-input",value:t,onChange:g=>r(g.target.value),placeholder:"Enter the recipient's address",autoComplete:"off",spellCheck:!1,"aria-label":"Recipient address",rows:p?2:1}),p?Bt("button",{type:"button",className:"sf-address-action",onClick:()=>r(""),"aria-label":"Clear","data-track":"recipient_clear",children:Bt(Kc,{size:20})}):Bt("button",{type:"button",className:"sf-address-action",onClick:f,"aria-label":"Paste from clipboard","data-track":"recipient_paste",children:Bt(Yc,{size:20})})]}),n.recipient&&Bt("p",{className:"sf-field-error",role:"alert",children:n.recipient}),gn("div",{className:"sf-tabs",role:"tablist",children:[Bt("button",{type:"button",role:"tab",className:"sf-tab","data-active":u==="recent"||void 0,"aria-selected":u==="recent",onClick:()=>m("recent"),"data-track":"recipient_tab","data-track-id":"recent",children:"Recent"}),c&&Bt("button",{type:"button",role:"tab",className:"sf-tab","data-active":u==="account"||void 0,"aria-selected":u==="account",onClick:()=>m("account"),"data-track":"recipient_tab","data-track-id":"account",children:"My Account"})]})]}),Bt("div",{className:"sf-address-list",children:u==="account"&&c?d.map((g,x)=>{let k=$c(g,x),R=Cn(s,g.address,{size:56,bg:b});return gn("button",{type:"button",className:"sf-address-row",onClick:()=>l(g.address),"data-track":"recipient_item",children:[gn("span",{className:"sf-address-avatar",children:[R&&Bt("img",{src:R,alt:"",width:40,height:40,draggable:!1,onError:I=>{I.currentTarget.style.display="none"}}),Bt("span",{className:"sf-address-avatar-fallback",children:ep(k)})]}),gn("span",{className:"sf-address-meta",children:[Bt("span",{className:"sf-address-name",children:k}),Bt("span",{className:"sf-address-value",children:nr(g.address)})]})]},g.address)}):o.length>0?o.map(g=>{let x=h.get(tp(g.address)),k=x?$c(x.account,x.index):nr(g.address),R=Cn(s,g.address,{size:56,bg:b});return gn("button",{type:"button",className:"sf-address-row",onClick:()=>l(g.address),"data-track":"recipient_item",children:[gn("span",{className:"sf-address-avatar",children:[R&&Bt("img",{src:R,alt:"",width:40,height:40,draggable:!1,onError:I=>{I.currentTarget.style.display="none"}}),Bt("span",{className:"sf-address-avatar-fallback",children:ep(k)})]}),gn("span",{className:"sf-address-meta",children:[Bt("span",{className:"sf-address-name",children:k}),Bt("span",{className:"sf-address-value",children:nr(g.address)})]})]},g.address)}):Bt("div",{className:"sf-empty",children:"No send history"})}),p&&!w&&!n.recipient&&Bt("p",{className:"sf-field-error",role:"alert",children:"Enter a valid EVM recipient address."})]})}import{jsx as cr,jsxs as Wo}from"react/jsx-runtime";function op({flow:e}){let{status:t,txHash:r,error:n,copyHash:o,hashCopied:a,openTransaction:i}=e,s=t==="error",l=t==="success";return s?Wo("div",{className:"sf-body sf-result sf-result--error",children:[cr("span",{className:"sf-result-icon",children:cr(Jc,{size:56})}),Wo("div",{className:"sf-result-copy",children:[cr("h3",{className:"sf-result-title",children:"Transaction Failed"}),cr("p",{className:"sf-result-desc",children:n||"Something went wrong. Please try again."})]}),r&&cr(np,{txHash:r,hashCopied:a,onCopy:o,onOpen:i})]}):Wo("div",{className:"sf-body sf-result",children:[cr("span",{className:"sf-result-icon","data-pending":!l||void 0,children:l?cr(Xc,{size:56}):cr("span",{className:"sf-result-spinner"})}),Wo("div",{className:"sf-result-copy",children:[cr("h3",{className:"sf-result-title",children:l?"Transaction Complete":"Transaction in Progress"}),cr("p",{className:"sf-result-desc",children:l?"Your transfer was sent successfully.":"Transfer in progress. Waiting for confirmation."})]}),r&&cr(np,{txHash:r,hashCopied:a,onCopy:o,onOpen:i})]})}function np({txHash:e,hashCopied:t,onCopy:r,onOpen:n}){return Wo("div",{className:"sf-result-hash-card",children:[cr("span",{className:"sf-result-hash-label",children:"Transaction Hash"}),Wo("div",{className:"sf-result-hash-row",children:[cr("button",{type:"button",className:"sf-result-hash-link",onClick:n,"aria-label":"Open transaction in explorer","data-track":"tx_link_open",children:nr(e)}),cr("button",{type:"button",className:"sf-result-copy-btn",onClick:r,"aria-label":"Copy transaction hash","data-track":"tx_hash_copy",children:t?cr(Rn,{size:16}):"Copy"})]})]})}import{jsx as kt,jsxs as pr}from"react/jsx-runtime";var Ii="\u2014";function ap({flow:e}){let{token:t,reviewRawAmount:r,reviewRecipient:n,accountName:o,accounts:a,walletAddress:i,networkName:s,nativeSymbol:l,nativeDecimals:d,gasEstimate:c,gasLoading:h,gasError:u,insufficientGas:m,error:y,resolvedEnv:b}=e,f=zn(t),p=r!==null?xi(r,t.quantity.decimals):"",w=o?.trim()||`Account ${(a[0]?.index??0)+1}`,g=Cn(b,i,{size:56,bg:"1A1A2E"}),x=l||(f?t.symbol:""),k=vi(t.chainId),R=c?Bc(c,k):null,I=c?Ri(c,k):null,S=L=>L!==null&&x?`${gl(L,d)} ${x}`:Ii,C=L=>L!==void 0?`${Pc(L)} Gwei`:Ii,E=(()=>{if(!f||!c||I===null||r===null)return Ii;let L=r+I;return`${gl(L,d)} ${x||t.symbol}`})(),M=L=>h?"\u2026":L,F=[{label:"Est. Tx Fee",value:M(S(I))},...R==="dynamic"?[{label:"Max Priority Fee",value:M(C(c?.maxPriorityFeePerGas))},{label:"Max Gas Fee",value:M(C(c?.maxFeePerGas))}]:R==="legacy"?[{label:"Gas Price",value:M(C(c?ki(c):void 0))}]:[],{label:"Gas Limit",value:M(c?Oc(c.gasLimit):Ii)}];return pr("div",{className:"sf-body sf-review",children:[pr("div",{className:"sf-review-amount",children:[kt("img",{className:"sf-review-amount-icon",src:t.icon_url,alt:"",width:40,height:40,draggable:!1,onError:L=>{L.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),pr("span",{className:"sf-review-amount-value",children:[p,kt("span",{className:"sf-review-amount-symbol",children:t.symbol})]})]}),pr("div",{className:"sf-review-parties",children:[pr("div",{className:"sf-review-card sf-review-party",children:[kt("span",{className:"sf-review-party-label",children:"From"}),pr("div",{className:"sf-review-party-head",children:[kt("span",{className:"sf-review-party-avatar",children:g&&kt("img",{src:g,alt:"",width:28,height:28,draggable:!1,onError:L=>{L.currentTarget.style.display="none"}})}),kt("span",{className:"sf-review-party-name",children:w})]}),kt("span",{className:"sf-review-party-addr",children:i})]}),kt("span",{className:"sf-review-arrow","aria-hidden":!0,children:kt(Zc,{size:16})}),pr("div",{className:"sf-review-card sf-review-party",children:[kt("span",{className:"sf-review-party-label",children:"To"}),kt("span",{className:"sf-review-party-addr",children:n})]})]}),pr("section",{className:"sf-review-card",children:[kt("h3",{className:"sf-review-section-title",children:"Summary"}),pr("div",{className:"sf-review-row",children:[kt("span",{className:"sf-review-row-label",children:"Network"}),kt("span",{className:"sf-review-row-value",children:s})]}),F.map(L=>pr("div",{className:"sf-review-row",children:[kt("span",{className:"sf-review-row-label",children:L.label}),kt("span",{className:"sf-review-row-value",children:L.value})]},L.label))]}),pr("section",{className:"sf-review-card",children:[kt("h3",{className:"sf-review-section-title",children:"Total"}),pr("div",{className:"sf-review-row",children:[kt("span",{className:"sf-review-row-label",children:"Total Amount"}),pr("span",{className:"sf-review-row-value",children:[p," ",t.symbol]})]}),f&&pr("div",{className:"sf-review-row",children:[kt("span",{className:"sf-review-row-label",children:"Max. Total Amount"}),kt("span",{className:"sf-review-row-value",children:M(E)})]})]}),m&&!u&&!y&&pr("div",{className:"sf-message sf-message--error",role:"alert",children:["Not enough ",x||t.symbol," to cover the amount plus the network fee. Reduce the amount and try again."]}),(u||y)&&kt("div",{className:"sf-message sf-message--error",role:"alert",children:u||y})]})}import*as Ei from"react";import{jsx as Fn,jsxs as ho}from"react/jsx-runtime";function ip({flow:e}){let[t,r]=Ei.useState(""),n=t.trim().toLowerCase(),o=Ei.useMemo(()=>n?e.tokens.filter(a=>a.symbol.toLowerCase().includes(n)||a.name.toLowerCase().includes(n)):e.tokens,[e.tokens,n]);return ho("div",{className:"sf-body sf-token-select",children:[ho("div",{className:"sf-search",children:[Fn(qc,{size:20}),Fn("input",{className:"sf-search-input",value:t,onChange:a=>r(a.target.value),placeholder:"Search Tokens",autoComplete:"off",spellCheck:!1,"aria-label":"Search tokens"})]}),ho("div",{className:"sf-token-list",children:[o.map(a=>{let i=`${a.chainId}:${a.address.toLowerCase()}`,s=ua(e.resolvedEnv,a.chainId),l=e.getTokenPriceUsd?.(a);return ho("button",{type:"button",className:"sf-token-row",onClick:()=>e.selectToken(a),"data-track":"token_item","data-track-id":a.symbol,children:[ho("span",{className:"sf-token-left",children:[ho("span",{className:"sf-token-icon-wrap",children:[Fn("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&&Fn("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"}})]}),Fn("span",{className:"sf-token-name",children:a.symbol})]}),ho("span",{className:"sf-token-right",children:[Fn("span",{className:"sf-token-balance",children:Sn(a.quantity.numeric,a.quantity.decimals)}),l!==void 0&&Fn("span",{className:"sf-token-price",children:Si(l)})]})]},i)}),o.length===0&&Fn("div",{className:"sf-empty",children:"No tokens found"})]})]})}de(`.sf-root{display:flex;flex-direction:column;flex:1;min-height:0;font-family:inherit}.sf-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:24px;flex-shrink:0;position:relative;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.sf-header .sf-header-btn:last-child{position:absolute;top:24px;right:24px}.sf-header-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;filter:none;transition:color .15s ease}.sf-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85));filter:none}.sf-header-title{position:absolute;left:50%;transform:translate(-50%);text-align:center;font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);pointer-events:none}.sf-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent;overscroll-behavior:contain}[data-theme=light] .sf-body{scrollbar-color:rgba(0,0,0,.12) transparent}.sf-body::-webkit-scrollbar{width:4px;height:4px}.sf-body::-webkit-scrollbar-track,.sf-body::-webkit-scrollbar-corner{background:transparent}.sf-body::-webkit-scrollbar-thumb{border-radius:4px;background:#ffffff26}.sf-body::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .sf-body::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .sf-body::-webkit-scrollbar-thumb:hover{background:#0003}.sf-empty{padding:32px 0;text-align:center;font-family:inherit;font-size:14px;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-field-error{margin:8px 24px 0;font-family:inherit;font-size:12px;line-height:1.5;color:var(--ds-system-red-default, #da0b2e)}.sf-message--error{margin:16px 0 0;padding:12px 16px;background:var(--ds-system-red-low, #ffeeee);color:var(--ds-system-red-high, #d20609);font-family:inherit;font-size:13px;line-height:1.5;border-radius:12px;width:100%;box-sizing:border-box}.sf-footer{display:flex;flex-shrink:0;padding:16px 24px 24px}.sf-footer:empty{display:none}.sf-footer-row{display:flex;gap:8px;width:100%}.sf-footer-row .sf-btn,.sf-footer-row .sf-btn--secondary{flex:1 1 0;min-width:0}.sf-footer>.sf-btn{width:100%}.sf-btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:1;height:48px;padding:0 24px;border:none;border-radius:12px;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;transition:background-color .15s ease,transform .1s ease}.sf-btn--primary{background:var(--ds-accent-gradient, linear-gradient(196deg, #ff2589 16%, #ff823d 84%));color:#fff}.sf-btn--primary:hover:not(:disabled):not([data-disabled]){filter:brightness(1.05)}.sf-btn--primary:active:not(:disabled):not([data-disabled]){transform:scale(.97)}.sf-btn--primary[data-disabled],.sf-btn--primary:disabled{background:var(--ds-accent-gradient, linear-gradient(196deg, #ff2589 16%, #ff823d 84%));color:#fff;cursor:default;opacity:.5}.sf-btn--secondary{flex:0 0 120px;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-token-select{padding:0;display:flex;flex-direction:column}.sf-token-select .sf-search{margin:16px 24px}.sf-token-select .sf-token-list{width:100%;margin-top:0}.sf-search{display:flex;align-items:center;gap:8px;padding:12px 16px;border-radius:12px;border:1.5px solid transparent;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-low, rgba(0, 0, 0, .4));box-sizing:border-box;transition:border-color .15s ease}.sf-search:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.sf-search:focus-within{border-color:var(--ds-accent-primary-high, #f0640d)}.sf-search-input{flex:1;min-width:0;border:none;background:transparent;outline:none;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-search-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-token-list{display:flex;flex-direction:column;margin-top:8px}.sf-token-row{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 24px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;border-radius:0;box-sizing:border-box;transition:background-color .15s ease}.sf-token-row:hover{background:var(--ds-surface-medium, rgba(0, 0, 0, .04))}.sf-token-left{display:flex;align-items:center;gap:16px;min-width:0}.sf-token-icon-wrap{position:relative;width:40px;height:40px;flex-shrink:0}.sf-token-icon{width:40px;height:40px;border-radius:0;object-fit:contain}.sf-token-chain-badge{position:absolute;right:-2px;bottom:-2px;width:16px;height:16px;border-radius:50%;object-fit:cover}.sf-token-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.sf-token-right{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0}.sf-token-balance{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);white-space:nowrap}.sf-token-price{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.sf-recipient{display:flex;flex-direction:column;flex:1;min-height:0}.sf-recipient-top{display:flex;flex-direction:column;flex-shrink:0;padding:16px 24px 0}.sf-address-field{display:flex;align-items:center;gap:8px;padding:12px;border-radius:12px;border:1.5px solid transparent;background:var(--ds-surface-medium, #f5f7fa);transition:border-color .15s ease;box-sizing:border-box}.sf-address-field:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.sf-address-field:focus-within{border-color:var(--ds-accent-primary-high, #f0640d)}.sf-address-field[data-filled]{border-color:var(--ds-accent-primary-high, #f0640d)}.sf-address-field[data-invalid]{border-color:var(--ds-system-red-default, #da0b2e)}.sf-address-input{flex:1;min-width:0;border:none;background:transparent;outline:none;resize:none;overflow:hidden;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));word-break:break-word;overflow-wrap:anywhere}.sf-address-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-address-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:none;background:transparent;border-radius:6px;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease}.sf-address-action:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-address-field[data-filled] .sf-address-action{border-radius:9999px}.sf-tabs{display:flex;gap:0;margin:16px 0 0}.sf-tab{position:relative;padding:8px 12px;border:none;background:transparent;cursor:pointer;font-family:inherit;font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-tab[data-active]{color:var(--ds-accent-primary-high, #f0640d)}.sf-tab[data-active]:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;border-radius:9999px;background:var(--ds-accent-primary-high, #f0640d)}.sf-address-list{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;margin-top:8px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .sf-address-list{scrollbar-color:rgba(0,0,0,.12) transparent}.sf-address-list::-webkit-scrollbar{width:4px}.sf-address-list::-webkit-scrollbar-track{background:transparent}.sf-address-list::-webkit-scrollbar-thumb{border-radius:4px;background:#ffffff26}[data-theme=light] .sf-address-list::-webkit-scrollbar-thumb{background:#0000001f}.sf-address-row{display:flex;align-items:center;gap:16px;width:100%;padding:12px 24px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;border-radius:0;box-sizing:border-box;transition:background-color .15s ease}.sf-address-row:hover{background:var(--ds-surface-medium, rgba(0, 0, 0, .04))}.sf-address-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:50%;overflow:hidden;background:var(--ds-surface-high, #edf1f2);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-size:14px;font-weight:600}.sf-address-avatar img{position:absolute;inset:0;z-index:1;width:100%;height:100%;object-fit:cover}.sf-address-avatar-fallback{position:relative;z-index:0}.sf-address-meta{display:flex;flex-direction:column;min-width:0}.sf-address-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sf-address-value{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-drawer-content .sf-header{padding:16px}.wi-drawer-content .sf-header .sf-header-btn:last-child{top:16px;right:16px}.wi-drawer-content .sf-token-select{padding:0}.wi-drawer-content .sf-token-select .sf-search{margin:16px}.wi-drawer-content .sf-token-row{padding:12px 16px}.wi-drawer-content .sf-recipient-top{padding:16px 16px 0}.wi-drawer-content .sf-address-row{padding:12px 16px}.wi-drawer-content .sf-footer{padding:12px 16px 24px}.wi-drawer-content .sf-field-error,.wi-drawer-content .sf-message--error{margin:16px 0 0;width:auto}.sf-amount{display:flex;flex-direction:column}.sf-amount-center{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;padding:64px 24px 48px;text-align:center}.sf-amount-usd{font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));min-height:21px}.sf-amount-input-wrap{display:flex;justify-content:center;max-width:100%}.sf-amount-input{width:auto;max-width:100%;border:none;background:transparent;outline:none;text-align:center;font-family:inherit;font-size:40px;font-weight:700;line-height:1.25;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);field-sizing:content}.sf-amount-input-wrap[data-empty] .sf-amount-input,.sf-amount-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-amount-input-wrap[data-over] .sf-amount-input{color:var(--ds-system-red-default, #da0b2e)}.sf-amount-balance{display:inline-flex;align-items:center;gap:4px;font-family:inherit;font-size:14px;font-weight:400;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-amount-max{border:none;background:transparent;padding:0;cursor:pointer;font:inherit;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-decoration:underline;text-underline-offset:2px;transition:color .15s ease}.sf-amount-max:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-drawer-content .sf-amount-center{padding:64px 16px 48px}.sf-review{display:flex;flex-direction:column;gap:16px;padding:24px}.sf-review-amount{display:flex;align-items:center;gap:12px;padding:0;background:transparent}.sf-review-amount-icon{width:40px;height:40px;border-radius:0;object-fit:contain;flex-shrink:0}.sf-review-amount-value{display:inline-flex;flex-direction:column;align-items:flex-start;gap:0;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);word-break:break-all}.sf-review-amount-symbol{font-size:12px;font-weight:400;line-height:1.5;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-parties{position:relative;display:flex;flex-direction:column;gap:0}.sf-review-arrow{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-4px auto;border-radius:50%;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-card{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa)}.sf-review-party-label{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-party-head{display:flex;align-items:center;gap:8px}.sf-review-party-avatar{display:inline-flex;width:24px;height:24px;border-radius:50%;overflow:hidden;background:var(--ds-surface-high, #edf1f2);flex-shrink:0}.sf-review-party-avatar img{width:100%;height:100%;object-fit:cover}.sf-review-party-name{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-review-party-addr{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));word-break:break-all}.sf-review-section-title{margin:0 0 4px;font-family:inherit;font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-highest, #000000)}.sf-review-row{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.sf-review-row-label{font-family:inherit;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-row-value{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));text-align:left;word-break:break-all}.wi-drawer-content .sf-review{padding:16px}.sf-result{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;padding:48px 24px;text-align:center}.sf-result-icon{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px}.sf-result-spinner{width:56px;height:56px;border-radius:50%;border:4px solid var(--ds-border-medium, rgba(0, 0, 0, .18));border-top-color:var(--ds-accent-primary-high, #f0640d);animation:sf-spin .8s linear infinite}@keyframes sf-spin{to{transform:rotate(360deg)}}.sf-result-copy{display:flex;flex-direction:column;gap:8px}.sf-result-title{margin:0;font-family:inherit;font-size:18px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-highest, #000000)}.sf-result-desc{margin:0;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-result-hash-card{display:flex;flex-direction:column;gap:8px;width:100%;padding:16px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);text-align:left}.sf-result-hash-label{font-family:inherit;font-size:12px;font-weight:500;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-result-hash-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.sf-result-hash-link{border:none;background:transparent;padding:0;cursor:pointer;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;color:var(--ds-accent-primary-high, #f0640d)}.sf-result-copy-btn{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:28px;padding:0 10px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));border-radius:8px;background:var(--ds-surface-default, #ffffff);cursor:pointer;font-family:inherit;font-size:12px;font-weight:500;color:var(--ds-content-high, rgba(0, 0, 0, .85))}
|
|
7
|
+
`);import{jsx as _t,jsxs as Mi}from"react/jsx-runtime";var Mb={token:"Send",recipient:"Send",amount:"Send",review:"Sign Transaction",result:""};function Ai({onClose:e,onBackToWallet:t,onConfirmSuccess:r,onSuccess:n,className:o,...a}){let i=sp.useCallback(p=>{n?.(p),r?.(p)},[r,n]),l=Hc({...a,onSuccess:n||r?i:void 0,onExit:t}),{step:d,status:c}=l,h=mn(l.recipient.trim()),u=go(l.amount,l.token.quantity.decimals),m="value"in u&&u.value<=l.balanceRaw,y=c==="submitting"||c==="confirming",b=d!=="result",f=Mb[d]??"";return _t(xe,{feature:"send",children:Mi("div",{className:Re("sf-root",o),"data-step":d,children:[Mi("header",{className:"sf-header",children:[b?_t("button",{type:"button",className:"sf-header-btn",onClick:l.back,"aria-label":"Back","data-track":"back",children:_t(tn,{size:24})}):_t("span",{className:"sf-header-btn","aria-hidden":!0}),_t("span",{className:"sf-header-title",children:f}),_t("button",{type:"button",className:"sf-header-btn",onClick:e,"aria-label":"Close","data-track":"close",children:_t(Ir,{size:24})})]}),d==="token"&&_t(ip,{flow:l}),d==="recipient"&&_t(rp,{flow:l}),d==="amount"&&_t(Qc,{flow:l}),d==="review"&&_t(ap,{flow:l}),d==="result"&&_t(op,{flow:l}),Mi("footer",{className:"sf-footer","data-step":d,children:[d==="recipient"&&_t("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"&&_t("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.submitAmount,"data-disabled":!m||void 0,"aria-disabled":!m,"data-track":"amount_next",children:"Next"}),d==="review"&&Mi("div",{className:"sf-footer-row",children:[_t("button",{type:"button",className:"sf-btn sf-btn--secondary",onClick:l.back,disabled:y,"data-track":"review_cancel",children:"Cancel"}),_t("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.confirmSend,disabled:y||!l.canSend||l.insufficientGas,"data-track":"review_send",children:y?"Sending...":"Send"})]}),d==="result"&&c==="success"&&_t("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:()=>r?.(l.txHash||void 0),"data-track":"result_ok",children:"All done"}),d==="result"&&c==="error"&&_t("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.retry,"data-track":"result_retry",children:"Try Again"})]})]})})}import*as lp from"@radix-ui/react-popover";import{Drawer as Ab}from"vaul";import{jsx as Li,jsxs as Lb}from"react/jsx-runtime";function dp({asChild:e,className:t,children:r}){let{isMobile:n,theme:o,walletAddress:a}=Bn(),i=r!=null,s=e??!0,l=i?r:Lb("button",{type:"button",className:Re("wi-trigger-btn",t),"data-theme":o,"data-mobile":n||void 0,children:[Li(gc,{size:n?14:16}),Li("span",{className:"wi-trigger-address",children:nr(a)})]});return n?Li(Ab.Trigger,{asChild:s,children:l}):Li(lp.Trigger,{asChild:s,children:l})}import*as q from"react";import*as ps from"@radix-ui/react-popover";import{Drawer as cs}from"vaul";import Ea from"bignumber.js";import vl from"bignumber.js";var Db=/^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i;function it(e){if(e==null)return null;if(e instanceof vl)return e.isFinite()?e:null;if(typeof e=="number")return Number.isFinite(e)?new vl(e):null;let t=String(e).replace(/[,%\s]/g,"");if(!Db.test(t))return null;let r=new vl(t);return r.isFinite()?r:null}import{useQueries as Pb}from"@tanstack/react-query";import{useMemo as Ob}from"react";var kl="user-balance";async function Bb(e,t,r,n){let o=new URLSearchParams({networkId:`eip155:${t}`,account:r}),a=await fetch(`${e}/v1/public/token/balance?${o}`,{cache:"no-store",signal:n});if(!a.ok)throw new Error(`Failed to fetch token balance: ${a.status}`);let i=await a.json();if(i.code!==200)throw new Error(`Token balance API error: ${i.code}`);return i.data}function Un(e,t,r=!0){let n=gt[e],o=[n.cross,n.bsc],a=Pb({queries:o.map(d=>({queryKey:[kl,e,t,d],queryFn:async({signal:c})=>Bb(await Ae("walletServer",e),d,t,c),enabled:!!t&&r,staleTime:0,refetchInterval:r?5e3:!1}))}),i=a.some(d=>d.isLoading),s=a.some(d=>d.isError);return{tokens:Ob(()=>{let d=[];for(let c of a)c.data&&d.push(...c.data);return d},[a]),isLoading:i,isError:s}}import{useQuery as zb,useQueries as Fb}from"@tanstack/react-query";import{useMemo as Ub}from"react";var jb="forge-holdings",Wb="forge-token-image";async function _b(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 Gb(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 cp(e,t,r=!0){let{data:n,...o}=zb({queryKey:[jb,e,t],queryFn:async({signal:a})=>_b(await Ae("bondingCurve",e),t,a),enabled:!!t&&r,staleTime:0,refetchInterval:r?5e3:!1});return{holdings:n??[],...o}}function pp(e,t,r=!0){let n=Fb({queries:t.map(a=>({queryKey:[Wb,e,a],queryFn:async({signal:i})=>Gb(await Ae("bondingCurve",e),a,i),enabled:r,staleTime:1/0}))});return{imageMap:Ub(()=>{let a=new Map;for(let i of n)i.data&&a.set(i.data.address,i.data.image_url);return a},[n])}}import{useQuery as Hb}from"@tanstack/react-query";import{useMemo as Qb}from"react";var Rl="token-stats";function zr(e,t){return`${e}:${t.toLowerCase()}`}function jn(e,t=!0){let{data:r,...n}=Hb({queryKey:[Rl,e],queryFn:async({signal:a})=>{let i=await Ae("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:Qb(()=>{let a=new Map;if(!r?.data)return a;for(let i of r.data){let s=zr(i.chain_id,i.address);a.set(s,i)}return a},[r]),...n}}import{useQuery as Vb}from"@tanstack/react-query";var qb="crossd-apr",up=6e4,Yb="https://crossd-dashboard-api.crossdefi.io/api/v1/overview",Di,fa;function Sl(){return Di&&Di.expiresAt>Date.now()?Promise.resolve(Di.value):fa||(fa=(async()=>{let e=await fetch(Yb,{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 Di={value:n,expiresAt:Date.now()+up},n})().finally(()=>{fa=void 0}),fa)}function Pi(e){let t=Math.abs(e),r=(e>=0?Math.floor:Math.ceil)(t*100)/100;return`APR ${e>=0?"+":"-"}${r}%`}function fp(){let{data:e,...t}=Vb({queryKey:[qb],queryFn:Sl,staleTime:up});return{aprPercent:e??null,...t}}import{useQuery as Kb}from"@tanstack/react-query";import{useMemo as mp}from"react";var Zb="token-info";function ma(e,t){return`${t.toLowerCase()}_${e}`}function gp(e,t=!0){let{data:r,...n}=Kb({queryKey:[Zb,e],queryFn:async({signal:i})=>{let s=await Ae("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=mp(()=>{let i=new Map;if(!r?.data)return i;for(let s of r.data){let l=ma(s.chain_id,s.address);i.set(l,s.category)}return i},[r]),a=mp(()=>{let i=new Map;if(!r?.data)return i;for(let s of r.data)i.set(ma(s.chain_id,s.address),s);return i},[r]);return{categoryMap:o,infoMap:a,...n}}import{useMemo as Xb}from"react";import Jb from"bignumber.js";function hp(e,t,r){let{tokens:n,isLoading:o}=Un(e,t,r),{statsMap:a}=jn(e,r);return Xb(()=>{let i=new Jb(0);for(let c of n){let h=a.get(zr(c.chainId,c.address));if(!h)continue;let u=it(c.quantity.numeric),m=it(h.price);if(!u||!m)continue;let y=u.shiftedBy(-c.quantity.decimals).multipliedBy(m);y.isNaN()||(i=i.plus(y))}let s=i.toFixed(),{displayValue:l,isLowerBound:d}=Nc(s);return{totalUsd:s,displayValue:l,isLowerBound:d,isLoading:o}},[n,a,o])}import{QRCodeSVG as Nx}from"qrcode.react";import{WALLET_LABELS as Tx}from"@nexus-cross/crossx-design-system";import{WALLET_LABELS as t0}from"@nexus-cross/crossx-design-system";import{WALLET_LABELS as Cl}from"@nexus-cross/crossx-design-system";import{jsx as Fe,jsxs as bo}from"react/jsx-runtime";var $b='<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>',e0=`data:image/svg+xml,${encodeURIComponent($b)}`;function Oi(){return Fe("img",{src:e0,width:40,height:40,alt:"",style:{display:"block"}})}function bp(){return bo("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[bo("g",{clipPath:"url(#clip0_1331_27065)",children:[Fe("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"}),Fe("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"}),Fe("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"}),Fe("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"}),Fe("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"}),Fe("path",{d:"M22.1857 36.1951V39.831H17.6699V36.1951H22.1857Z",fill:"#C0C4CD"}),Fe("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"})]}),Fe("defs",{children:Fe("clipPath",{id:"clip0_1331_27065",children:Fe("rect",{width:"40",height:"40",fill:"white"})})})]})}function wp(){return bo("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Fe("path",{d:"M12.23 16.81L20 9.04L27.77 16.81L32.29 12.29L20 0L7.71 12.29L12.23 16.81Z",fill:"#F3BA2F"}),Fe("path",{d:"M9.04 20L4.52 15.48L0 20L4.52 24.52L9.04 20Z",fill:"#F3BA2F"}),Fe("path",{d:"M12.23 23.19L20 30.96L27.77 23.19L32.29 27.71L20 40L7.71 27.71L12.23 23.19Z",fill:"#F3BA2F"}),Fe("path",{d:"M35.48 24.52L40 20L35.48 15.48L30.96 20L35.48 24.52Z",fill:"#F3BA2F"}),Fe("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 yp(){return bo("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"246",viewBox:"0 0 247 246",fill:"none",children:[Fe("rect",{width:"247.005",height:"245.105",rx:"36",fill:"#121212"}),Fe("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"}),Fe("path",{d:"M59.8364 99.8915V59.7551H12.0414L30.4787 77.8377V99.8915H59.8364Z",fill:"#2FD7FF"}),Fe("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 xp(){return bo("svg",{width:"40",height:"40",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[bo("g",{clipPath:"url(#clip0_1185_7785)",children:[Fe("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"}),Fe("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"})]}),Fe("defs",{children:Fe("clipPath",{id:"clip0_1185_7785",children:Fe("rect",{width:"28",height:"28",fill:"white"})})})]})}function vp(){return bo("svg",{width:"40",height:"40",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[Fe("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"}),Fe("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"}),Fe("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"}),Fe("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 kp(){return Fe("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:Fe("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 Rp(){return Fe("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Fe("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var ga={cross_embedded:{id:"cross_embedded",name:Cl.social,description:"Sign in with Google or Apple",icon:Oi},cross_wallet:{id:"cross_wallet",name:Cl.app,description:"App approval is required",icon:Oi,featured:!0},cross_extension:{id:"cross_extension",name:Cl.extension,description:"Browser extension approval is required",icon:Oi,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:bp,rdns:"io.metamask"},binance:{id:"binance",name:"Binance",description:"Mobile app only \u2014 Add CROSS network first",icon:wp},verse8:{id:"verse8",name:"Verse8 Wallet",description:"Optimized for Forge and Verse8 ecosystem",icon:yp,badge:"For Forge"},tron:{id:"tron",name:"Tron Wallet",description:"Dedicated for Tron-based transactions and assets",icon:xp,badge:"For SHOP"}};function Nl(e){return ga[e]}var Tl={google:{id:"google",name:"Google",icon:vp},apple:{id:"apple",name:"Apple",icon:kp}};function Sp(e){return Tl[e]}var Cp="dappui.wcm.last-selected",r0=new Set(["google","apple"]);function Np(e){try{window.localStorage.setItem(Cp,e)}catch{}}function Tp(){let e=null;try{e=window.localStorage.getItem(Cp)}catch{return}if(e)return r0.has(e)?t0.default:ga[e]?.name}function zt(e,t,r,n){if(!n||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;e.preventDefault();let o;try{o=n(t,r)}catch(d){console.error("[dapp-ui] onOutlink threw:",d);return}let a=d=>{typeof window>"u"||window.open(d,"_blank","noopener,noreferrer")};if((d=>!!d&&(typeof d=="object"||typeof d=="function")&&typeof d.then=="function")(o)){let d=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null,c=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(c,h=>{console.error("[dapp-ui] onOutlink rejected:",h),d?.close()});return}let s=o;if(s===null)return;a(s??t)}import*as xo from"react";import{Drawer as Zw}from"vaul";import{createContext as i0,useContext as s0,useMemo as l0}from"react";import Fr from"bignumber.js";var n0=/^(\d{4}-\d{2}-\d{2})/;function Ip(e){if(!e||e.length===0)return;let t=new Map,r;for(let{key:o,cumulative:a}of e.map(i=>({key:n0.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 Ep(e){return e.poolType==="Unknown"}function Bi(e){return e.length<=12?e:`${e.slice(0,6)}...${e.slice(-4)}`}function zi(e){return e.length<=13?e:`${e.slice(0,6)}...${e.slice(-4)}`}function ha(e,t){let r=e.length+t.length;if(r>32)return"xs";if(r>24)return"sm"}function Il(e){return e?.toUpperCase()==="WONE"?"ONE":e}var o0=["Request Arguments:","Details:","Docs:","Version:","Contract Call:"];function ba(e,t){console.error("[wallet-portfolio] withdraw failed:",e);let n=e instanceof Error?e.message:"";for(let a of o0){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 a0="0xe00e8bf3";function Mp(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`${a0}${n}${o}`}function _o(e){return!e||e<=0n?"0":new Fr(e.toString()).shiftedBy(-9).toFormat(2,Fr.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function Fi(e){return!e||e<=0n?"0":new Fr(e.toString()).toFormat(0,Fr.ROUND_DOWN)}function Ui(e){if(!e||e<=0n)return"0";let t=new Fr(e.toString()).shiftedBy(-18),r=t.isLessThan(1e-4)?7:4;return t.toFormat(r,Fr.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function hn(e,t){let r=new Fr(e).shiftedBy(-t);return!r.isFinite()||r.isZero()?"0":r.isGreaterThanOrEqualTo(1)?r.toFormat(2,Fr.ROUND_DOWN):r.toFormat(4,Fr.ROUND_DOWN)}function El(e){return hn(e,0)}var wa={rate:1,symbol:"$"};function wo(e,t=wa){let r=Number.isFinite(t.rate)&&t.rate>0?t.rate:1;return`${t.symbol||"$"}${e.times(r).toFormat(2,Fr.ROUND_DOWN)}`}function Wn(e,t,r,n=wa){let o=new Fr(r||"0");if(!o.isFinite()||o.isLessThanOrEqualTo(0))return null;let a=new Fr(e||"0").shiftedBy(-t).times(o);return a.isFinite()?wo(a,n):null}var ya=i0(null);function Rt(){let e=s0(ya);if(!e)throw new Error("WalletPortfolio compound components must be used within <WalletPortfolio>");return e}function Ur(){let{conversionRatio:e,currencySymbol:t}=Rt();return l0(()=>({rate:typeof e=="number"&&e>0?e:wa.rate,symbol:t||wa.symbol}),[e,t])}import{Drawer as d0}from"vaul";import{jsx as Ap}from"react/jsx-runtime";function Lp({asChild:e,children:t}){let{walletAddress:r}=Rt(),n=t!=null,o=e??!0,a=n?t:Ap("button",{type:"button",children:nr(r)});return Ap(d0.Trigger,{asChild:o,children:a})}import{Drawer as Zi}from"vaul";import*as Ct from"react";import{useQueryClient as Yw}from"@tanstack/react-query";import{createContext as c0,useContext as p0}from"react";var Ml=c0(null);function Dp(){return p0(Ml)}import{jsx as ur,jsxs as Gi}from"react/jsx-runtime";function Pp({size:e=22,className:t}){return ur("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ur("path",{d:"M14 4L7 11L14 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Op({size:e=22,className:t}){return Gi("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ur("path",{d:"M18.333 3.667v5.5h-5.5",stroke:"currentColor",strokeWidth:1.833,strokeLinecap:"round",strokeLinejoin:"round"}),ur("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 Bp({size:e=12,className:t}){return ur("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ur("path",{d:"M6 11A5 5 0 106 1a5 5 0 000 10zM6 8V6M6 4h.005",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})})}function ji({size:e=16,className:t}){return Gi("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ur("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"}),ur("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 Wi({size:e=16,className:t}){return ur("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ur("path",{d:"M13.333 4L6 11.333 2.667 8",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function _i({size:e=48,className:t}){return Gi("svg",{width:e,height:e,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ur("circle",{cx:"24",cy:"24",r:"24",fill:"currentColor"}),ur("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 Er({size:e=12,className:t}){return Gi("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:[ur("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"}),ur("path",{d:"M7 1H11V5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),ur("path",{d:"M11 1L6 6",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})]})}import{useQuery as u0}from"@tanstack/react-query";import{useMemo as zp}from"react";var f0="wp:reward-pools";function Go(e,t=!0){let{data:r,...n}=u0({queryKey:[f0,e],queryFn:async({signal:i})=>{let s=await Ae("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=zp(()=>r?.data.pools.filter(i=>i.pool_type==="CrossPool")??[],[r]),a=zp(()=>r?.data.pools.filter(i=>i.pool_type==="GamePool")??[],[r]);return{crossPools:o,gamePools:a,allPools:r?.data.pools??[],...n}}import{useQuery as m0}from"@tanstack/react-query";import{useMemo as g0}from"react";var h0="wp:user-deposits";function Hi(e,t,r=!0){let n=r&&!!t,{data:o,...a}=m0({queryKey:[h0,e,t],queryFn:async({signal:s})=>{let l=await Ae("gameReward",e),d=await fetch(`${l}/v1/users/${t}/deposits`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Deposits fetch failed: ${d.status}`);let c=await d.json();if(c.code!==200)throw new Error(`Deposits API error: ${c.code}`);return c},enabled:n,staleTime:0});return{depositMap:g0(()=>{let s=new Map;if(!o?.data.user_deposits)return s;for(let l of o.data.user_deposits)s.set(l.pool_address.toLowerCase(),l);return s},[o]),deposits:o?.data.user_deposits??[],...a}}import{useQuery as b0}from"@tanstack/react-query";import{useMemo as w0}from"react";var Fp={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},Up={dev:"https://stg.onechain.nexus/points",stage:"https://stg.onechain.nexus/points",production:"https://www.onechain.nexus/points"};var jp={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"};var Al={dev:"https://dev-stake.ogfcorp.com",stage:"https://stg-stake.ogfcorp.com",production:"https://stake.ogfcorp.com"},Wp={dev:`${Al.dev}/portfolio`,stage:`${Al.stage}/portfolio`,production:`${Al.production}/portfolio`};var _p={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},jr={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"},Qi={dev:"https://stg-swap-api.crossdefi.io",stage:"https://stg-swap-api.crossdefi.io",production:"https://swap-api.crossdefi.io"},Gp={dev:"https://stg.crossdefi.io",stage:"https://stg.crossdefi.io",production:"https://www.crossdefi.io"},Hp={dev:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",stage:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",production:"0xEFd871aF7D695A0c1709e46b565761F4cd1Ef5ba"},Qp={dev:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",stage:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",production:"0x731a104a4461ae45bfef520468b43c262d35e682"};var y0="wp:token-info",x0="0x0000000000000000000000000000000000000001";function bn(e,t=!0){let r=gt[e].cross,{data:n,...o}=b0({queryKey:[y0,e],queryFn:async({signal:c})=>{let h=await Ae("walletServer",e),u=await fetch(`${h}/v1/public/token/info`,{cache:"no-store",signal:c});if(!u.ok)throw new Error(`Failed to fetch token info: ${u.status}`);let m=await u.json();if(m.code!==200)throw new Error(`Token info API error: ${m.code}`);return m},enabled:t,staleTime:300*1e3}),{byChainAddr:a,byChainSym:i}=w0(()=>{let c=new Map,h=new Map;if(!n?.data)return{byChainAddr:c,byChainSym:h};for(let u of n.data){let m=u.address.toLowerCase();c.set(`${u.chain_id}:${m}`,u),c.set(m,u);let y=u.symbol.replace(/^t/,"").toUpperCase(),b=`${u.chain_id}:${y}`;h.has(b)||h.set(b,u),h.has(y)||h.set(y,u)}return{byChainAddr:c,byChainSym:h}},[n]);return{getTokenImage:(c,h,u)=>{let m=c.toLowerCase(),y=!!u?.chainOnly,b=a.get(`${r}:${m}`);if(b?.image)return b.image;if(!y){let f=a.get(m);if(f?.image)return f.image}if(h){let f=h.replace(/^t/,"").toUpperCase(),p=i.get(`${r}:${f}`);if(p?.image)return p.image;if(!y){let w=i.get(f);if(w?.image)return w.image}}return""},getTokenSymbol:(c,h,u)=>{let m=c.toLowerCase();return(a.get(`${r}:${m}`)??(u?.chainOnly?void 0:a.get(m)))?.symbol||h},getNativeToken:()=>a.get(`${r}:${x0}`),...o}}import*as Dl from"react";import{jsx as Ll,jsxs as Vp}from"react/jsx-runtime";function Wr({sectionKey:e,title:t,icon:r,iconFit:n="cover",isEmpty:o,loading:a=!1,children:i}){let s=Dp();return Dl.useEffect(()=>{s?.report(e,{loading:a,empty:o})},[s,e,a,o]),Dl.useEffect(()=>()=>s?.unregister(e),[s,e]),o?null:Vp("div",{className:"wp-svc-card",children:[Vp("div",{className:"wp-svc-card-head",children:[Ll("img",{className:"wp-svc-card-icon",src:r,alt:"",style:{objectFit:n}}),Ll("span",{className:"wp-svc-card-title",children:t})]}),Ll("div",{className:"wp-svc-items",children:i})]})}import Pl from"bignumber.js";import{jsx as or,jsxs as fr}from"react/jsx-runtime";var v0="ONErewards";function k0(e){return new Pl(e||"0").isGreaterThan(0)}function qp(){let{env:e,walletAddress:t,onOutlink:r}=Rt(),n=Ur(),o=!!t,{allPools:a,isLoading:i}=Go(e,o),{depositMap:s,isLoading:l}=Hi(e,t,o),{getTokenImage:d}=bn(e,o),c=(m,y)=>`${Fp[e]}/gametoken/tokens/${m.deposit_token.address}?mode=rewards${y==="withdraw"?"&trade=withdraw":""}`,h=`${jr[e]}/reward.png`,u=a.filter(m=>{let y=s.get(m.pool_address.toLowerCase()),b=y?.deposited_amount??"0",f=y?.claimable_reward??"0";return!(new Pl(b).isZero()&&new Pl(f).isZero())});return or(Wr,{sectionKey:"rewards",title:v0,icon:h,isEmpty:u.length===0,loading:i||l,children:u.map(m=>{let y=s.get(m.pool_address.toLowerCase()),b=y?.deposited_amount??"0",f=y?.claimable_reward??"0",p=c(m,"withdraw"),w=c(m,"claim"),g=d(m.deposit_token.address,m.deposit_token.symbol),x=m.reward_tokens[0],k=x?d(x.address,x.symbol):"",R=m.reward_tokens.map(L=>L.symbol),I=R.length>0?`${m.deposit_token.symbol}-${R.join("/")}`:m.deposit_token.symbol,S=x?hn(f,x.decimals):"0",C=x?.symbol??"Reward",E=Wn(b,m.deposit_token.decimals,m.deposit_token.price,n),M=x?Wn(f,x.decimals,x.price,n):null,F=!!y&&k0(f);return fr("article",{className:"wp-item","data-side":"reward",children:[fr("div",{className:"wp-item-body",children:[fr("div",{className:"wp-item-line",children:[or("span",{className:"wp-item-label",children:"Pool (Deposit - Earn)"}),fr("div",{className:"wp-svc-token",children:[fr("span",{className:"wp-token-stack","aria-hidden":!0,children:[g&&or("img",{className:"wp-svc-token-icon",src:g,alt:""}),k&&or("img",{className:"wp-svc-token-icon",src:k,alt:""})]}),or("span",{children:I})]})]}),fr("div",{className:"wp-item-line",children:[or("span",{className:"wp-item-label",children:"Deposited"}),fr("div",{className:"wp-svc-token wp-svc-token--amount",children:[g&&or("img",{className:"wp-svc-token-icon",src:g,alt:""}),fr("div",{className:"wp-svc-amount",children:[or("span",{className:"wp-svc-amount-main",children:hn(b,m.deposit_token.decimals)}),E&&or("span",{className:"wp-item-usd",children:E})]})]})]}),fr("div",{className:"wp-item-line",children:[fr("span",{className:"wp-item-label",children:["Claimable (",C,")"]}),fr("div",{className:"wp-svc-token wp-svc-token--amount",children:[k&&or("img",{className:"wp-svc-token-icon",src:k,alt:""}),fr("div",{className:"wp-svc-amount",children:[or("span",{className:"wp-svc-amount-main",children:S}),M&&or("span",{className:"wp-item-usd",children:M})]})]})]})]}),fr("div",{className:"wp-item-tags",children:[fr("a",{className:"wp-tag wp-tag--muted",href:p,target:"_blank",rel:"noopener noreferrer","data-track":"rewards_withdraw_open",onClick:L=>zt(L,p,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:m,userDeposit:y}},r),children:[or("span",{className:"wp-tag-label",children:"Withdraw"}),or(Er,{size:12,className:"wp-tag-icon"})]}),fr("a",{className:"wp-tag wp-tag--mint","data-disabled":!F||void 0,"aria-disabled":!F||void 0,href:F?w:void 0,target:F?"_blank":void 0,rel:F?"noopener noreferrer":void 0,onClick:L=>{if(!F){L.preventDefault();return}zt(L,w,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:m,userDeposit:y}},r)},children:[or("span",{className:"wp-tag-label",children:"Claim"}),or(Er,{size:12,className:"wp-tag-icon"})]})]})]},m.pool_address)})})}import*as ru from"react";import{useQuery as M0}from"@tanstack/react-query";import{useMemo as Vi}from"react";var R0="0x70a08231",S0="0x18160ddd",C0="0x313ce567",N0=8e3;async function T0(e,t,r,n){let o=new AbortController,a=setTimeout(()=>o.abort(),N0);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 I0(e){return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function xa(e){if(!(!e||e==="0x"))try{return BigInt(e)}catch{return}}async function Nn(e,t,r,n,o){try{return await T0(e,"eth_call",[o?{from:o,to:t,data:r}:{to:t,data:r},"latest"],n)}catch{return}}async function E0(e,t,r,n){let[o,a,i]=await Promise.all([Nn(e,r,R0+I0(t),n),Nn(e,r,S0,n),Nn(e,r,C0,n)]),s=xa(o);if(s===void 0)return null;let l=xa(i);return{balance:s,totalSupply:xa(a),decimals:l!==void 0?Number(l):void 0}}async function va(e,t){let r=gt[e].cross,n=await Ae("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 Yp(e,t,r,n){if(!t||r.length===0)return{};let o;try{o=await va(e,n)}catch{o=void 0}if(!o)return{};let a=await Promise.all(r.map(async s=>[s.toLowerCase(),await E0(o,t,s,n)])),i={};for(let[s,l]of a)l&&(i[s]=l);return i}var A0="wp:withdraw-token-meta",L0="0xc89039c5",D0="0x95d89b41",P0="0x313ce567";function O0(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 B0(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 z0(e,t,r){if(t.length===0)return{};let n;try{n=await va(e,r)}catch{n=void 0}if(!n)return{};let o=await Promise.all(t.map(async i=>{let s=B0(await Nn(n,i,L0,r));if(!s)return[i.toLowerCase(),null];let[l,d]=await Promise.all([Nn(n,s,D0,r),Nn(n,s,P0,r)]),c=O0(l),h=xa(d);return c?[i.toLowerCase(),{tokenAddress:s,symbol:c,decimals:h!==void 0?Number(h):18}]:[i.toLowerCase(),null]})),a={};for(let[i,s]of o)s&&(a[i]=s);return a}function Kp(e,t,r=!0){let o=r&&!!t,{allPools:a,isLoading:i}=Go(e,o),{deposits:s,isLoading:l}=Hi(e,t,o),d=Vi(()=>{let f=new Map;for(let p of a)f.set(p.pool_address.toLowerCase(),p);return f},[a]),c=Vi(()=>s.filter(f=>{try{return BigInt(f.deposited_amount||"0")>0n}catch{return!1}}),[s]),h=Vi(()=>c.map(f=>f.pool_address.toLowerCase()).filter(f=>!d.has(f)).sort(),[c,d]),{data:u,isLoading:m}=M0({queryKey:[A0,e,h],queryFn:({signal:f})=>z0(e,h,f),enabled:o&&h.length>0,staleTime:1440*60*1e3});return{positions:Vi(()=>{let f=[];for(let p of c){let w=p.pool_address.toLowerCase(),g=d.get(w);if(g){f.push({poolId:p.pool_id,poolAddress:p.pool_address,poolType:g.pool_type,tokenSymbol:g.deposit_token.symbol,tokenAddress:g.deposit_token.address,decimals:g.deposit_token.decimals,price:g.deposit_token.price,depositedRaw:p.deposited_amount});continue}let x=u?.[w];x&&f.push({poolId:p.pool_id,poolAddress:p.pool_address,poolType:"Unknown",tokenSymbol:x.symbol,tokenAddress:x.tokenAddress,decimals:x.decimals,depositedRaw:p.deposited_amount})}return f},[c,d,u]),isLoading:i||l||m}}import*as Kt from"react";import{Fragment as Zp,jsx as De,jsxs as Et}from"react/jsx-runtime";var F0=400;function U0(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":`${Ui(e.gasLimit*n)} ${r??""}`.trim()}function Ol(e,t,r){return r==="loading"?"Estimating...":r==="error"||r==="unavailable"?"-":`${e} ${t}`.trim()}function j0({position:e,size:t}){return e.icon?De("img",{src:e.icon,alt:"",width:t,height:t}):De("span",{children:e.tokenSymbol.slice(0,1)})}function Xp({open:e,status:t,positions:r,initialPoolAddress:n,walletAddress:o,txHash:a,error:i,copied:s=!1,estimateWithdraw:l,onClose:d,onConfirm:c,onCopyHash:h,trackFunnel:u,nativeSymbol:m}){let[y,b]=Kt.useState(null),[f,p]=Kt.useState("idle"),w=Kt.useRef(0),g=Kt.useRef(void 0),x=Kt.useRef(null);Kt.useEffect(()=>()=>clearTimeout(g.current),[]);let k=Kt.useMemo(()=>{let z=n?.toLowerCase();return r.find(A=>A.poolAddress.toLowerCase()===z)??r[0]??null},[r,n]),R=Kt.useMemo(()=>{try{return BigInt(k?.depositedRaw??"0")}catch{return 0n}},[k?.depositedRaw]),I=k?.decimals??18;Kt.useEffect(()=>{!e||!k||u?.("position_selected")},[e,k,u]);let S=Kt.useCallback(()=>{b(null),p(l?"idle":"unavailable"),w.current+=1,x.current=null},[]);if(Kt.useEffect(()=>{e&&S()},[e,S]),Kt.useEffect(()=>{if(!e||t!=="confirm"){clearTimeout(g.current);return}if(!l||!k){clearTimeout(g.current),p("unavailable");return}if(R<=0n){clearTimeout(g.current),w.current+=1,x.current=null,b(null),p("idle");return}let z=`${k.poolAddress.toLowerCase()}:${R.toString()}`;if(x.current===z)return;x.current=z,clearTimeout(g.current);let A=w.current+1;w.current=A,p("loading"),g.current=setTimeout(()=>{l(k,R).then(U=>{w.current===A&&(b(U??null),p(U?"ready":"unavailable"))}).catch(()=>{w.current===A&&(b(null),p("error"))})},F0)},[e,t,R,l,k]),!e||!k)return null;let C=t==="submitting",E=_o(y?.maxPriorityFeePerGas),M=_o(y?.maxFeePerGas??y?.gasPrice),F=Fi(y?.gasLimit),L=hn(k.depositedRaw,I);return De("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:z=>{z.target===z.currentTarget&&!C&&d()},children:Et("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:[De("div",{className:"wp-claim-grabber","aria-hidden":!0,children:De("span",{})}),Et("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&a?Et(Zp,{children:[De("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:De(_i,{})}),Et("div",{className:"wp-claim-copy",children:[De("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),De("p",{className:"wp-claim-desc",children:"Your withdrawal request has been submitted. Balances will update shortly after the transaction settles."})]}),De("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:Et("div",{className:"wp-claim-list-item",children:[De("span",{children:"Tx Hash"}),Et("button",{type:"button",className:"wp-claim-hash",onClick:h,"aria-label":"Copy transaction hash","data-track":"withdraw_hash_copy",children:[De("strong",{children:zi(a)}),s?De(Wi,{}):De(ji,{})]})]})})]}):Et(Zp,{children:[t==="error"&&Et("div",{className:"wp-claim-heading",children:[De("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),De("p",{className:"wp-claim-error-message",children:i||"The withdraw request could not be completed."})]}),Et("div",{className:"wp-claim-reward-card","data-fit":ha(k.tokenSymbol,L),"aria-label":"Deposited balance",children:[De("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:De(j0,{position:k,size:28})}),De("strong",{className:"wp-claim-reward-symbol",children:k.tokenSymbol}),De("strong",{className:"wp-claim-reward-amount",children:L})]}),Et("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:[Et("div",{className:"wp-claim-account-row",children:[Et("div",{className:"wp-claim-account",children:[De("span",{className:"wp-claim-account-avatar","aria-hidden":!0}),Et("strong",{children:[k.tokenSymbol," Pool"]})]}),De("span",{children:Bi(o)})]}),De("span",{className:"wp-claim-divider","aria-hidden":!0}),Et("div",{className:"wp-claim-detail-list",children:[Et("div",{className:"wp-claim-detail-row",children:[De("span",{children:"Est. Tx Fee"}),De("strong",{children:U0(y,f,m)})]}),Et("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[De("span",{children:"Priority Fee Per Gas"}),De("strong",{children:Ol(E,"Gwei",f)})]}),Et("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[De("span",{children:"Max Fee Per Gas"}),De("strong",{children:Ol(M,"Gwei",f)})]}),Et("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[De("span",{children:"Gas Limit"}),De("strong",{children:Ol(F,"",f)})]})]})]})]}),Et("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&De("button",{type:"button",className:"wp-claim-secondary","data-track":"withdraw_cancel",onClick:d,children:t==="error"?"Close":"Cancel"}),Et("button",{type:"button",className:"wp-claim-primary","data-track":"withdraw_confirm",onClick:()=>{if(t==="success"){d();return}k&&R>0n&&c(k,R,y)},disabled:C||(t==="confirm"||t==="error")&&R<=0n,children:[t==="success"&&"Done",t==="submitting"&&De("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}),t==="error"&&"Try Again",t==="confirm"&&"Withdraw Now"]})]})]}),De("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:De("span",{})})]})})}import*as St from"react";import{useQueryClient as G0}from"@tanstack/react-query";import{useQuery as W0}from"@tanstack/react-query";var _0="wp:reward-factory-info";function Jp(e,t=!0){let{data:r,...n}=W0({queryKey:[_0,e],queryFn:async({signal:o})=>{let a=await Ae("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 $p="wp:";function _n(e){return e.invalidateQueries({predicate:t=>typeof t.queryKey[0]=="string"&&t.queryKey[0].startsWith("wp:")})}function eu(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function tu(e){let{env:t,walletAddress:r,sendTransaction:n,estimateGas:o}=Rt(),a=!!r,i=!!n,s=G0(),{routerAddress:l}=Jp(t,a&&i),d=eu(l),[c,h]=St.useState(!1),[u,m]=St.useState(void 0),[y,b]=St.useState("confirm"),[f,p]=St.useState(),[w,g]=St.useState(""),[x,k]=St.useState(!1),R=St.useRef(void 0);St.useEffect(()=>()=>clearTimeout(R.current),[]);let I=St.useRef(new Set),S=St.useCallback((U,re)=>{I.current.has(U)||(I.current.add(U),qe("withdraw",U,{...re,tags:{section:e,...re?.tags}}))},[e]),C=St.useCallback((U,re)=>d?{to:d,value:0n,data:Mp(U,re),chainId:gt[t].cross}:null,[t,d]),E=St.useCallback(()=>{_n(s)},[s]),M=St.useCallback(U=>{m(U),h(!0),b("confirm"),p(void 0),g(""),k(!1),I.current=new Set,S("opened")},[S]),F=St.useCallback(()=>{y!=="submitting"&&(h(!1),m(void 0),b("confirm"),p(void 0),g(""),k(!1),y==="success"&&E())},[y,E]),L=St.useCallback(async(U,re)=>{if(!o)return null;let Y=C(U.poolId,re),_=eu(r);return!Y||!_?null:o({...Y,from:_})},[C,o,r]),z=St.useCallback(async()=>{if(!(!f||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(f),k(!0),clearTimeout(R.current),R.current=setTimeout(()=>k(!1),1400)}catch{k(!1)}},[f]),A=St.useCallback(async(U,re,Y)=>{if(!n){b("error"),g("Withdraw is not available for this wallet.");return}if(!d){b("error"),g("Withdraw contract address is not available.");return}try{b("submitting"),g("");let _=C(U.poolId,re);if(!_){b("error"),g("Withdraw contract address is not available.");return}S("submitted");let G=await n({..._,gas:Y?.gasLimit&&Y.gasLimit>0n?Y.gasLimit:void 0,maxFeePerGas:Y?.maxFeePerGas&&Y.maxFeePerGas>0n?Y.maxFeePerGas:void 0,maxPriorityFeePerGas:Y?.maxPriorityFeePerGas&&Y.maxPriorityFeePerGas>0n?Y.maxPriorityFeePerGas:void 0});p(G),b("success"),S("confirmed"),E()}catch(_){b("error"),g(ba(_,"Failed to request withdraw.")),S("confirmed",{status:"failure",reason:Nr(_)})}},[C,E,d,n,S]);return{canWithdrawInline:i,isOpen:c,initialPoolAddress:u,status:y,txHash:f,error:w,copied:x,hasEstimator:!!o,openWithdraw:M,closeWithdraw:F,estimateWithdraw:L,confirmWithdraw:A,copyHash:z,trackFunnelOnce:S}}import{Fragment as Q0,jsx as yr,jsxs as Tn}from"react/jsx-runtime";var H0="ONEpoints";function nu(){let{env:e,walletAddress:t,onOutlink:r}=Rt(),n=Ur(),o=!!t,{getTokenImage:a,getNativeToken:i}=bn(e,o),s=tu("points"),{positions:l,isLoading:d}=Kp(e,t,o),c=ru.useMemo(()=>l.filter(Ep).map(m=>({...m,icon:a(m.tokenAddress,m.tokenSymbol)})),[l,a]),h=`${jr[e]}/point.png`,u=Up[e];return Tn(Q0,{children:[yr(Wr,{sectionKey:"points",title:H0,icon:h,isEmpty:c.length===0,loading:d,children:c.map(m=>{let y=m.price?Wn(m.depositedRaw,m.decimals,m.price,n):null;return Tn("article",{className:"wp-item","data-side":"reward",children:[Tn("div",{className:"wp-item-body",children:[Tn("div",{className:"wp-item-line",children:[yr("span",{className:"wp-item-label",children:"Token"}),Tn("div",{className:"wp-svc-token",children:[m.icon&&yr("img",{className:"wp-svc-token-icon",src:m.icon,alt:""}),yr("span",{children:m.tokenSymbol})]})]}),Tn("div",{className:"wp-item-line",children:[yr("span",{className:"wp-item-label",children:"Deposited"}),Tn("div",{className:"wp-svc-token wp-svc-token--amount",children:[m.icon&&yr("img",{className:"wp-svc-token-icon",src:m.icon,alt:""}),Tn("div",{className:"wp-svc-amount",children:[yr("span",{className:"wp-svc-amount-main",children:hn(m.depositedRaw,m.decimals)}),y&&yr("span",{className:"wp-item-usd",children:y})]})]})]})]}),yr("div",{className:"wp-item-tags",children:s.canWithdrawInline?yr("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"points_withdraw_open",onClick:()=>s.openWithdraw(m.poolAddress),children:yr("span",{className:"wp-tag-label",children:"Withdraw"})}):Tn("a",{className:"wp-tag wp-tag--muted",href:u,target:"_blank",rel:"noopener noreferrer","data-track":"points_withdraw_open",onClick:b=>zt(b,u,{category:"portfolio",origin:"portfolio-points",payload:{position:m}},r),children:[yr("span",{className:"wp-tag-label",children:"Withdraw"}),yr(Er,{size:12,className:"wp-tag-icon"})]})})]},m.poolAddress)})}),yr(Xp,{open:s.isOpen,status:s.status,positions:c,initialPoolAddress:s.initialPoolAddress,walletAddress:t,txHash:s.txHash,error:s.error,copied:s.copied,estimateWithdraw:s.hasEstimator?s.estimateWithdraw:void 0,onClose:s.closeWithdraw,onConfirm:s.confirmWithdraw,onCopyHash:s.copyHash,trackFunnel:s.trackFunnelOnce,nativeSymbol:i()?.symbol})]})}import*as Bl from"react";import{useQuery as V0}from"@tanstack/react-query";var q0="wp:stake-info";function ou(e,t,r=!0){let n=r&&!!t,{data:o,...a}=V0({queryKey:[q0,e,t],queryFn:async({signal:s})=>{let l=await Ae("posa",e),d=await fetch(`${l}/stake/${t}`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Stake info fetch failed: ${d.status}`);let c=await d.json();if(c.code!==0&&c.code!==200)throw new Error(`Stake info API error: ${c.code}`);return c},enabled:n,staleTime:0});return{stakeInfo:o?.data,...a}}import{useQuery as Y0}from"@tanstack/react-query";var K0="wp:stake-rewards",Z0=31;function au(e,t,r=!0){let n=r&&!!t,{data:o,...a}=Y0({queryKey:[K0,e,t],queryFn:async({signal:i})=>{let s=await Ae("posa",e),l=await fetch(`${s}/rewards/${t}?limit=${Z0}`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Stake rewards fetch failed: ${l.status}`);let d=await l.json();if(d.code!==0&&d.code!==200)throw new Error(`Stake rewards API error: ${d.code}`);return d.data?.data??[]},enabled:n,staleTime:0});return{latestReward:o?.[0]??null,aprAccrued:Ip(o),...a}}import{useQuery as X0}from"@tanstack/react-query";var J0="wp:staking-onchain";function iu(e,t,r=!0){let n=r&&!!t&&!!e,{data:o,...a}=X0({queryKey:[J0,e],queryFn:async()=>{if(!t)throw new Error("stakingRewardsReader not provided");return t(e)},enabled:n,staleTime:0});return{onchain:o,...a}}import{useMemo as su}from"react";import $0 from"bignumber.js";function lu(e){return e?.trim().toUpperCase()==="ONE"}function du(e){return new $0(e||"0").isGreaterThan(0)}function qi(e,t,r=!0){let{allPools:n}=Go(e,r),o=su(()=>{for(let d of n)for(let c of[d.deposit_token,...d.reward_tokens])if(lu(c?.symbol)&&du(c.price))return c.price},[n]),a=r&&o===void 0,{tokens:i}=Un(e,t,a),{statsMap:s}=jn(e,a),l=gt[e].cross;return su(()=>{if(o)return o;let d=i.find(c=>c.chainId===l&&lu(c.symbol));if(d){let c=s.get(zr(d.chainId,d.address));if(c&&du(c.price))return c.price}return"0"},[o,i,s,l])}import Hn from"bignumber.js";import{jsx as _r,jsxs as Gn}from"react/jsx-runtime";function ew(e){if(!e)return"\u2014";let t=new Hn(e);return t.isFinite()?`${t.toFormat(2,Hn.ROUND_DOWN)}%`:"\u2014"}function cu(){let{env:e,walletAddress:t,onOutlink:r,stakingRewardsReader:n}=Rt(),o=Ur(),a=!!t,{stakeInfo:i,isLoading:s}=ou(e,t,a),{latestReward:l,aprAccrued:d,isLoading:c}=au(e,t,a),{onchain:h}=iu(t,n,a),u=qi(e,t,a),{getNativeToken:m}=bn(e,a),y=m()?.symbol,b="ONEstaking",f=`${jr[e]}/cross-staking.png`,p=Wp[e],w=i?.total_stake??"0",g=Bl.useMemo(()=>h?new Hn(h.earnedWei.toString()).shiftedBy(-18).toString(10):l?.cumulative_earned??i?.rewards_earned??"0",[h,l,i]),x=Bl.useMemo(()=>h?new Hn(h.stakedWei.toString()).shiftedBy(-18):new Hn(w),[h,w]),k=d!==void 0?new Hn(d):void 0,R=i?.days_since_first_stake,I=k!==void 0&&k.isFinite()&&x.isGreaterThan(0)&&R!==null&&R!==void 0?k.div(x).times(365).div(Math.max(1,R)).times(100):void 0,S=!(new Hn(w).isZero()&&new Hn(g).isZero()),C=Wn(w,0,u,o),E=Wn(g,0,u,o);return _r(Wr,{sectionKey:"staking",title:b,icon:f,iconFit:"contain",isEmpty:!S,loading:s||c,children:Gn("article",{className:"wp-item","data-side":"stake",children:[Gn("div",{className:"wp-item-body",children:[Gn("div",{className:"wp-item-line",children:[_r("span",{className:"wp-item-label",children:"Staked"}),Gn("div",{className:"wp-svc-amount",children:[_r("span",{className:"wp-svc-amount-main",children:`${El(w)} ${y??""}`.trim()}),C&&_r("span",{className:"wp-item-usd",children:C})]})]}),Gn("div",{className:"wp-item-line",children:[_r("span",{className:"wp-item-label",children:"Rewards Earned"}),Gn("div",{className:"wp-svc-amount",children:[_r("span",{className:"wp-svc-amount-main",children:`${El(g)} ${y??""}`.trim()}),E&&_r("span",{className:"wp-item-usd",children:E})]})]}),Gn("div",{className:"wp-item-line",children:[_r("span",{className:"wp-item-label",children:"My APR"}),_r("span",{children:ew(I?.toString(10))})]})]}),_r("div",{className:"wp-item-tags",children:Gn("a",{className:"wp-tag wp-tag--mint",href:p,target:"_blank",rel:"noopener noreferrer","data-track":"stake_outlink",onClick:M=>zt(M,p,{category:"portfolio",origin:"portfolio-stake",payload:{stakeInfo:i}},r),children:[_r("span",{className:"wp-tag-label",children:"Manage"}),_r(Er,{size:12,className:"wp-tag-icon"})]})})]})})}import*as zl from"react";import{useQuery as tw}from"@tanstack/react-query";var rw="wp:game-swap-pools";function pu(e,t,r=!0){let n=r&&!!t,{data:o,...a}=tw({queryKey:[rw,e,t],queryFn:async({signal:i})=>{let s=await Ae("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}}import{useQuery as nw}from"@tanstack/react-query";var ow="wp:game-swap-lp-balances";function uu(e,t,r,n){let o=[...r].map(l=>l.toLowerCase()).sort(),a=!!t&&o.length>0,{data:i,...s}=nw({queryKey:[ow,e,t,o,!!n],queryFn:async({signal:l})=>{let d=n?await n(o):await Yp(e,t,o,l),c={};for(let[h,u]of Object.entries(d))c[h.toLowerCase()]=u;return c},enabled:a,staleTime:0});return{balances:i??{},...s}}import In from"bignumber.js";import{jsx as Gr,jsxs as on}from"react/jsx-runtime";var aw="Gametoken LP",mu=18,iw=new In("0.0001");function fu(e){return e?.trim().toUpperCase()==="ONE"}function sw(e){return e&&e>0?e:mu}function lw(e){let t=fu(e.token_a?.symbol)&&!fu(e.token_b?.symbol),r=t?e.reserve_a:e.reserve_b,n=sw(t?e.token_a?.decimals:e.token_b?.decimals),o=new In(r||"0").shiftedBy(-n);return!o.isFinite()||o.isLessThanOrEqualTo(0)?new In(0):o.times(2)}function dw(e,t,r,n){let o=e.token_a?.symbol?.trim()||"TOKEN",a=e.token_b?.symbol?.trim()||n||"?",i=t?.decimals??mu,s,l;if(t&&t.totalSupply&&t.totalSupply>BigInt(0)){let d=new In(t.balance.toString()),c=new In(t.totalSupply.toString()),h=d.div(c);s=h.times(100);let u=h.times(lw(e));if(u.isGreaterThan(0)){let m=new In(e.quote_usd??e.cross_usd??"0");l=m.isGreaterThan(0)?wo(u.times(m),r):`${u.toFormat(4,In.ROUND_DOWN)} ${n??""}`.trim()}}return{pool:e,tokenASymbol:o,tokenBSymbol:a,info:t,lpAmountRaw:t?.balance.toString(),lpDecimals:i,sharePercent:s,valueText:l}}function gu(){let{env:e,walletAddress:t,onOutlink:r,lpBalanceReader:n}=Rt(),o=Ur(),a=!!t,{pools:i,isLoading:s}=pu(e,t,a),l=zl.useMemo(()=>i.map(p=>p.pair_address).filter(Boolean),[i]),{balances:d,isLoading:c}=uu(e,t,l,n),{getNativeToken:h}=bn(e,a),u=h()?.symbol,m=`${jr[e]}/game-token.png`,y=Object.keys(d).length>0,b=zl.useMemo(()=>{let p=i.map(w=>dw(w,d[w.pair_address?.toLowerCase()],o,u));return y?p.filter(w=>w.lpAmountRaw?new In(w.lpAmountRaw).shiftedBy(-w.lpDecimals).isGreaterThanOrEqualTo(iw):!1):p},[i,d,y,o,u]),f=p=>{let w=p.token_a?.address??p.pair_address;return`${_p[e]}/gametoken/tokens/${w}?trade=deposit`};return Gr(Wr,{sectionKey:"gameSwap",title:aw,icon:m,iconFit:"contain",isEmpty:b.length===0,loading:s||c,children:b.map(p=>{let{pool:w}=p,g=f(w),x=`${p.tokenASymbol} / ${p.tokenBSymbol}`,k=w.token_a?.logo_url,R=w.token_b?.logo_url;return on("article",{className:"wp-item","data-side":"game-swap",children:[on("div",{className:"wp-item-body",children:[on("div",{className:"wp-item-line",children:[Gr("span",{className:"wp-item-label",children:"Pool"}),on("div",{className:"wp-svc-token",children:[on("span",{className:"wp-token-stack","aria-hidden":!0,children:[k&&Gr("img",{className:"wp-svc-token-icon",src:k,alt:""}),R&&Gr("img",{className:"wp-svc-token-icon",src:R,alt:""})]}),Gr("span",{children:x})]})]}),p.lpAmountRaw!==void 0&&on("div",{className:"wp-item-line",children:[Gr("span",{className:"wp-item-label",children:"My LP"}),on("span",{children:[hn(p.lpAmountRaw,p.lpDecimals)," LP"]})]}),p.sharePercent!==void 0&&on("div",{className:"wp-item-line",children:[Gr("span",{className:"wp-item-label",children:"Pool Share"}),on("span",{children:[p.sharePercent.toFormat(2,In.ROUND_DOWN),"%"]})]}),p.valueText!==void 0&&on("div",{className:"wp-item-line",children:[Gr("span",{className:"wp-item-label",children:"Value"}),Gr("span",{children:p.valueText})]})]}),Gr("div",{className:"wp-item-tags",children:on("a",{className:"wp-tag wp-tag--mint",href:g,target:"_blank",rel:"noopener noreferrer","data-track":"gameswap_outlink","data-track-id":x,onClick:I=>zt(I,g,{category:"portfolio",origin:"portfolio-game-swap",payload:{pool:w}},r),children:[Gr("span",{className:"wp-tag-label",children:"Manage"}),Gr(Er,{size:12,className:"wp-tag-icon"})]})})]},w.pair_address)})})}import yo from"bignumber.js";import{useMemo as hw}from"react";import{useQuery as cw}from"@tanstack/react-query";var pw="wp:forge-pools";function hu(e,t,r=!0){let n=r&&!!t,{data:o,...a}=cw({queryKey:[pw,e,t],queryFn:async()=>{let s=await Ae("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}}import{useQueries as uw}from"@tanstack/react-query";import{useMemo as fw}from"react";var mw="wp:forge-token-detail";async function gw(e,t){let r=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store"});return r.ok?(await r.json())?.data?.token??null:null}function bu(e,t,r=!0){let n=uw({queries:t.map(i=>({queryKey:[mw,e,i],queryFn:async()=>gw(await Ae("bondingCurve",e),i),enabled:r&&!!i,staleTime:3e4}))}),o=fw(()=>{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}}import{jsx as xr,jsxs as Qn}from"react/jsx-runtime";var bw="ONEforge",wu=18,ww="https://contents.crosstoken.io/wallet/token/images/FT.png";function yw(e){if(!e||e==="0")return"0";let t=new yo(e).shiftedBy(-wu);return t.isZero()?"0":t.isGreaterThanOrEqualTo(1)?t.toFormat(2,yo.ROUND_DOWN):t.toFormat(4,yo.ROUND_DOWN)}function xw(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 vw(e,t,r,n){let o=new yo(r||"0");if(!o.isGreaterThan(0))return null;let a=new yo(e.total_supply||"0"),i=new yo(e.lp_balance||"0"),s=new yo(t?.reserve_b||"0").shiftedBy(-wu);if(!a.isGreaterThan(0)||!i.isGreaterThan(0)||!s.isGreaterThan(0))return null;let l=s.times(2),c=i.div(a).times(l).times(o);return c.isFinite()?wo(c,n):null}function yu(){let{env:e,walletAddress:t,onOutlink:r}=Rt(),n=Ur(),o=!!t,{pools:a,isEmpty:i,isLoading:s}=hu(e,t,o),l=hw(()=>a.map(m=>m.token.address),[a]),{detailMap:d}=bu(e,l,o&&l.length>0),c=qi(e,t,o),h=m=>`${jp[e]}/forge/token/${m.token.address}`,u=`${jr[e]}/forge.png`;return xr(Wr,{sectionKey:"forge",title:bw,icon:u,iconFit:"contain",isEmpty:i,loading:s,children:a.map(m=>{let y=d.get(m.token.address.toLowerCase()),b=y?.image_url||y?.image||m.token.image||ww,f=y?.symbol||m.token.symbol,p=h(m),w=vw(m,y,c,n);return Qn("a",{className:"wp-item","data-side":"lp",href:p,target:"_blank",rel:"noopener noreferrer","data-track":"forge_outlink","data-track-id":f,onClick:g=>zt(g,p,{category:"portfolio",origin:"portfolio-forge",payload:{pool:m,tokenDetail:y}},r),children:[Qn("div",{className:"wp-item-body",children:[Qn("div",{className:"wp-item-line",children:[xr("span",{className:"wp-item-label",children:"Asset"}),Qn("div",{className:"wp-svc-token",children:[xr("img",{className:"wp-svc-token-icon",src:b,alt:""}),xr("span",{children:f}),y?.name&&xr("span",{className:"wp-token-subtle",children:y.name})]})]}),Qn("div",{className:"wp-item-line",children:[xr("span",{className:"wp-item-label",children:"LP Balance"}),xr("div",{className:"wp-svc-token wp-svc-token--amount",children:Qn("div",{className:"wp-svc-amount",children:[xr("span",{className:"wp-svc-amount-main",children:yw(m.lp_balance)}),w&&xr("span",{className:"wp-item-usd",children:w})]})})]}),Qn("div",{className:"wp-item-line",children:[xr("span",{className:"wp-item-label",children:"Ownership"}),xr("span",{className:"wp-line-value",children:xw(m.pool_ownership)})]})]}),xr("div",{className:"wp-item-tags",children:Qn("span",{className:"wp-tag wp-tag--muted",children:[xr("span",{className:"wp-tag-label",children:"Withdraw"}),xr(Er,{size:12,className:"wp-tag-icon"})]})})]},m.pair_address)})})}import{useMemo as Lu}from"react";import Qw from"bignumber.js";import{useQuery as kw}from"@tanstack/react-query";var Rw="wp:crossd-positions";function Sw(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 xu(e,t,r=!0){let n=r&&!!t,{data:o,...a}=kw({queryKey:[Rw,e,t],queryFn:async()=>{let s=await fetch(`${Qi[e]}/api/v1/positions?owner=${t}`,{cache:"no-store"});if(!s.ok)throw new Error(`crossd positions fetch failed: ${s.status}`);return Sw(await s.json())},enabled:n,staleTime:0}),i=o??[];return{positions:i,isEmpty:i.length===0,...a}}import{useQueries as Cw}from"@tanstack/react-query";import{useMemo as Nw}from"react";var Tw="wp:crossd-position-details";function Iw(e){let t=e??{},r=t.data??t;return r?.token_id||r?.pool?r:null}function vu(e,t,r=!0){let n=Cw({queries:t.map(a=>({queryKey:[Tw,e,a],queryFn:async()=>{let i=await fetch(`${Qi[e]}/api/v1/positions/${a}`,{cache:"no-store"});if(!i.ok)throw new Error(`crossd position detail failed: ${i.status}`);return Iw(await i.json())},enabled:r&&!!a,staleTime:6e4}))});return{detailMap:Nw(()=>{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])}}import*as En from"react";import{Fragment as Ru,jsx as Me,jsxs as Zt}from"react/jsx-runtime";var Ew=300*1e3,ku="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function Mw(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":`${Ui(e.gasLimit*n)} ${r??""}`.trim()}function Fl(e,t,r){return r?"Estimating...":`${e} ${t}`.trim()}function Su({open:e,status:t,target:r,token0Icon:n,token1Icon:o,token0Symbol:a,token1Symbol:i,nativeSymbol:s,txHash:l,error:d,copied:c=!1,hasEstimator:h,prepareWithdraw:u,confirmWithdraw:m,onClose:y,onCopyHash:b,trackFunnel:f}){let[p,w]=En.useState(null),[g,x]=En.useState(null),k=En.useRef(0);En.useEffect(()=>{if(!e||!r)return;let H=++k.current;w(null),x(null),f?.("dialog_opened"),u().then(ce=>{k.current===H&&(w(ce),x(ce?Date.now():null))})},[e,r]);let R=t==="submitting",I=t==="estimating"||t==="confirm"&&!p,S=En.useCallback(async()=>{let H=p,ce=!g||Date.now()-g>Ew;if(!H||ce){let ve=++k.current;if(H=await u(),k.current!==ve)return;w(H),x(H?Date.now():null)}H&&await m(H)},[p,g,u,m]);if(!e||!r)return null;let{position:C,detail:E}=r,M=E.pool?.token0,F=E.pool?.token1,L=a||M?.symbol||C.pool?.token0_symbol||"?",z=i||F?.symbol||C.pool?.token1_symbol||"?",A=M?.decimals??18,U=F?.decimals??18,re=n||M?.logo_url||ku,Y=o||F?.logo_url||ku,_=`${L}/${z}`,G=p?jo(p.expectedAmount0.toString(),A):null,ne=p?jo(p.expectedAmount1.toString(),U):null,te=_o(p?.estimate?.maxPriorityFeePerGas),O=_o(p?.estimate?.maxFeePerGas??p?.estimate?.gasPrice),Z=Fi(p?.estimate?.gasLimit);return Me("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:H=>{H.target===H.currentTarget&&!R&&y()},children:Zt("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:[Me("div",{className:"wp-claim-grabber","aria-hidden":!0,children:Me("span",{})}),Zt("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&l?Zt(Ru,{children:[Me("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:Me(_i,{})}),Zt("div",{className:"wp-claim-copy",children:[Me("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),Zt("p",{className:"wp-claim-desc",children:["Your ",_," position withdrawal has been submitted. Balances will update shortly after the transaction settles."]})]}),Me("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:Zt("div",{className:"wp-claim-list-item",children:[Me("span",{children:"Tx Hash"}),Zt("button",{type:"button",className:"wp-claim-hash",onClick:b,"aria-label":"Copy transaction hash","data-track":"crossd_withdraw_hash_copy",children:[Me("strong",{children:zi(l)}),c?Me(Wi,{}):Me(ji,{})]})]})})]}):Zt(Ru,{children:[t==="error"&&Zt("div",{className:"wp-claim-heading",children:[Me("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),Me("p",{className:"wp-claim-error-message",children:d||"The withdraw request could not be completed."})]}),Zt("div",{className:"wp-claim-reward-card","data-fit":ha(L,G??""),"aria-label":`Expected ${L}`,children:[Me("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:Me("img",{src:re,alt:"",width:28,height:28})}),Me("strong",{className:"wp-claim-reward-symbol",children:L}),Me("strong",{className:"wp-claim-reward-amount",children:G??"Estimating..."})]}),Zt("div",{className:"wp-claim-reward-card","data-fit":ha(z,ne??""),"aria-label":`Expected ${z}`,children:[Me("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:Me("img",{src:Y,alt:"",width:28,height:28})}),Me("strong",{className:"wp-claim-reward-symbol",children:z}),Me("strong",{className:"wp-claim-reward-amount",children:ne??"Estimating..."})]}),h&&Me("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:Zt("div",{className:"wp-claim-detail-list",children:[Zt("div",{className:"wp-claim-detail-row",children:[Me("span",{children:"Est. Tx Fee"}),Me("strong",{children:Mw(p?.estimate,I,s)})]}),Zt("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Me("span",{children:"Priority Fee Per Gas"}),Me("strong",{children:Fl(te,"Gwei",I)})]}),Zt("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Me("span",{children:"Max Fee Per Gas"}),Me("strong",{children:Fl(O,"Gwei",I)})]}),Zt("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Me("span",{children:"Gas Limit"}),Me("strong",{children:Fl(Z,"",I)})]})]})})]}),Zt("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&Me("button",{type:"button",className:"wp-claim-secondary","data-track":"crossd_withdraw_cancel",onClick:y,children:t==="error"?"Close":"Cancel"}),Me("button",{type:"button",className:"wp-claim-primary","data-track":"crossd_withdraw_confirm",onClick:()=>{if(t==="success"){y();return}R||I||(f?.("confirm_clicked"),S())},disabled:R||I,children:t==="success"?"Done":R?Me("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}):I?Me("span",{className:"wp-claim-button-spinner","aria-label":"Estimating"}):t==="error"?"Retry":"Withdraw"})]})]}),Me("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:Me("span",{})})]})})}import*as ht from"react";import{useQueryClient as _w}from"@tanstack/react-query";var Aw="0x0c49ccbe",Lw="0xfc6f7865",Dw="0x49404b7c",Pw="0xdf2ab5bb",Ow="0xac9650d8",Cu=(1n<<128n)-1n,Tu=600n,Bw=99n,zw=100n;function Ul(e){return e*Bw/zw}function Nu(e,t){return!!e&&!!t&&e.toLowerCase()===t.toLowerCase()}function vr(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 Yi(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 jl(e){return Aw+vr(e.tokenId,"tokenId")+vr(e.liquidity,"liquidity")+vr(e.amount0Min,"amount0Min")+vr(e.amount1Min,"amount1Min")+vr(e.deadline,"deadline")}function Fw(e){return Lw+vr(e.tokenId,"tokenId")+Yi(e.recipient,"recipient")+vr(e.amount0Max,"amount0Max")+vr(e.amount1Max,"amount1Max")}function Uw(e,t){return Dw+vr(e,"amountMinimum")+Yi(t,"recipient")}function jw(e,t,r){return Pw+Yi(e,"token")+vr(t,"amountMinimum")+Yi(r,"recipient")}function Ww(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 vr(BigInt(a.length/2),"callLength")+i.toLowerCase()}),r=BigInt(e.length)*32n,n=[];for(let o of t)n.push(vr(r,"callOffset")),r+=BigInt(o.length/2);return Ow+vr(0x20n,"arrayOffset")+vr(BigInt(e.length),"arrayLength")+n.join("")+t.join("")}function Iu(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 Eu(e){let t=Nu(e.token0,e.wcrossAddress),r=Nu(e.token1,e.wcrossAddress),n=t||r,o=[jl({tokenId:e.tokenId,liquidity:e.liquidity,amount0Min:e.amount0Min,amount1Min:e.amount1Min,deadline:e.deadline}),Fw({tokenId:e.tokenId,recipient:n?e.positionManagerAddress:e.owner,amount0Max:Cu,amount1Max:Cu})];return n&&(o.push(Uw(0n,e.owner)),o.push(jw(t?e.token1:e.token0,0n,e.owner))),Ww(o)}async function Mu(e,t,r){let n;try{n=await va(e,r)}catch{n=void 0}if(!n)return null;let o=jl({tokenId:t.tokenId,liquidity:t.liquidity,amount0Min:0n,amount1Min:0n,deadline:t.deadline}),a=await Nn(n,t.positionManager,o,r,t.owner);return Iu(a)}var Gw=[1500,3e3,4500,6e3];function Hw(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function Au(){let{env:e,walletAddress:t,sendTransaction:r,estimateGas:n}=Rt(),o=!!r,a=_w(),[i,s]=ht.useState(!1),[l,d]=ht.useState(null),[c,h]=ht.useState("confirm"),[u,m]=ht.useState(),[y,b]=ht.useState(""),[f,p]=ht.useState(!1),[w,g]=ht.useState(new Set),x=ht.useRef(void 0),k=ht.useRef([]),R=ht.useRef(0);ht.useEffect(()=>()=>{clearTimeout(x.current),k.current.forEach(clearTimeout)},[]);let I=ht.useRef(new Set),S=ht.useCallback((A,U)=>{I.current.has(A)||(I.current.add(A),qe("withdraw",A,{...U,tags:{section:"crossdPool",...U?.tags}}))},[]),C=ht.useCallback(()=>{let A=()=>_n(a);A(),k.current.forEach(clearTimeout),k.current=Gw.map(U=>setTimeout(A,U))},[a]),E=ht.useCallback(A=>{R.current+=1,d(A),s(!0),h("confirm"),m(void 0),b(""),p(!1),I.current=new Set,S("opened")},[S]),M=ht.useCallback(()=>{c!=="submitting"&&(R.current+=1,s(!1),d(null),h("confirm"),m(void 0),b(""),p(!1))},[c]),F=ht.useCallback(async()=>{let A=R.current,U=Hw(t),re=l?.position.token_id,Y=l?.position.liquidity,_=l?.detail.pool?.token0?.address,G=l?.detail.pool?.token1?.address;if(!U||!re||!Y||!_||!G)return h("error"),b("Position data is incomplete. Please refresh and retry."),null;try{h("estimating"),b("");let ne=BigInt(re),te=BigInt(Y),O=BigInt(Math.floor(Date.now()/1e3))+Tu,Z=Hp[e],H=await Mu(e,{owner:U,positionManager:Z,tokenId:ne,liquidity:te,deadline:O});if(R.current!==A)return null;if(!H)return h("error"),b("Failed to estimate withdrawal amounts. Please retry."),null;let ce=Eu({tokenId:ne,liquidity:te,amount0Min:Ul(H.amount0),amount1Min:Ul(H.amount1),deadline:O,owner:U,positionManagerAddress:Z,token0:_,token1:G,wcrossAddress:Qp[e]}),ve={to:Z,value:0n,data:ce,chainId:gt[e].cross},ge=null;if(n){try{ge=await n({...ve,from:U})}catch{ge=null}if(R.current!==A)return null}return h("confirm"),{tx:ve,estimate:ge,expectedAmount0:H.amount0,expectedAmount1:H.amount1}}catch(ne){return R.current!==A||(h("error"),b(ba(ne,"Failed to prepare withdraw."))),null}},[e,n,l,t]),L=ht.useCallback(async A=>{if(!r){h("error"),b("Withdraw is not available for this wallet.");return}try{h("submitting"),b(""),S("submitted");let U=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});m(U),h("success");let re=l?.position.token_id;re&&g(Y=>{let _=new Set(Y);return _.add(re),_}),S("confirmed"),C()}catch(U){h("error"),b(ba(U,"Failed to request withdraw.")),S("confirmed",{status:"failure",reason:Nr(U)})}},[C,r,l,S]),z=ht.useCallback(async()=>{if(!(!u||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(u),p(!0),clearTimeout(x.current),x.current=setTimeout(()=>p(!1),1400)}catch{p(!1)}},[u]);return{canWithdrawInline:o,isOpen:i,target:l,withdrawnTokenIds:w,status:c,txHash:u,error:y,copied:f,hasEstimator:!!n,openWithdraw:E,closeWithdraw:M,prepareWithdraw:F,confirmWithdraw:L,copyHash:z,trackFunnelOnce:S}}import{Fragment as qw,jsx as kr,jsxs as Vn}from"react/jsx-runtime";var Vw="ONEusd Pool",Du="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function Pu(){let{env:e,walletAddress:t,onOutlink:r}=Rt(),n=Ur(),o=!!t,{positions:a,isLoading:i}=xu(e,t,o),s=Au(),l=Lu(()=>a.filter(S=>!S.token_id||!s.withdrawnTokenIds.has(S.token_id)),[a,s.withdrawnTokenIds]),d=Lu(()=>l.map(S=>S.token_id).filter(S=>!!S),[l]),{detailMap:c}=vu(e,d,o&&d.length>0),h=`${Gp[e]}/pool`,{getTokenImage:u,getTokenSymbol:m,getNativeToken:y}=bn(e,o),b=u("","ONEUSD",{chainOnly:!0})||`${jr[e]}/crossd.png`,f={chainOnly:!0},p=(S,C)=>{let E=Il(m(S?.address??"",S?.symbol??C,f));return E==="ONE"?y()?.symbol??"?":E??"?"},w=(S,C)=>{let E=S?.symbol??C,M=Il(E);return M==="ONE"?y()?.image||Du:u(S?.address??"",M,f)||S?.logo_url||Du},g=s.target?.detail.pool,x=w(g?.token0,s.target?.position.pool?.token0_symbol),k=w(g?.token1,s.target?.position.pool?.token1_symbol),R=p(g?.token0,s.target?.position.pool?.token0_symbol),I=p(g?.token1,s.target?.position.pool?.token1_symbol);return Vn(qw,{children:[kr(Wr,{sectionKey:"crossdPool",title:Vw,icon:b,iconFit:"contain",isEmpty:l.length===0,loading:i,children:l.map(S=>{let C=S.token_id?c.get(S.token_id):void 0,E=`${p(C?.pool?.token0,S.pool?.token0_symbol)}/${p(C?.pool?.token1,S.pool?.token1_symbol)}`,M=S.pool?.fee_tier_percentage,F=w(C?.pool?.token0,S.pool?.token0_symbol),L=w(C?.pool?.token1,S.pool?.token1_symbol),z=wo(new Qw(S.position_value_usd??"0"),n),A=s.canWithdrawInline&&!!C?.pool?.token0?.address&&!!C?.pool?.token1?.address;return Vn("article",{className:"wp-item","data-side":"crossd",children:[Vn("div",{className:"wp-item-body",children:[Vn("div",{className:"wp-item-line",children:[kr("span",{className:"wp-item-label",children:"Pool"}),Vn("div",{className:"wp-svc-token",children:[Vn("span",{className:"wp-token-stack","aria-hidden":!0,children:[kr("img",{className:"wp-svc-token-icon",src:F,alt:""}),kr("img",{className:"wp-svc-token-icon",src:L,alt:""})]}),kr("span",{children:E}),M&&kr("span",{className:"wp-token-subtle",children:M})]})]}),Vn("div",{className:"wp-item-line",children:[kr("span",{className:"wp-item-label",children:"Position Value"}),kr("span",{className:"wp-line-value",children:z})]})]}),kr("div",{className:"wp-item-tags",children:A?kr("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"crossd_pool_withdraw_open","data-track-id":E,onClick:()=>{C&&s.openWithdraw({position:S,detail:C})},children:kr("span",{className:"wp-tag-label",children:"Withdraw"})}):Vn("a",{className:"wp-tag wp-tag--muted",href:h,target:"_blank",rel:"noopener noreferrer","data-track":"crossd_pool_outlink","data-track-id":E,onClick:U=>zt(U,h,{category:"portfolio",origin:"portfolio-crossd-pool",payload:{position:S,detail:C}},r),children:[kr("span",{className:"wp-tag-label",children:"Withdraw"}),kr(Er,{size:12,className:"wp-tag-icon"})]})})]},S.token_id)})}),kr(Su,{open:s.isOpen,status:s.status,target:s.target,token0Icon:x,token1Icon:k,token0Symbol:R,token1Symbol:I,nativeSymbol:y()?.symbol,txHash:s.txHash,error:s.error,copied:s.copied,hasEstimator:s.hasEstimator,prepareWithdraw:s.prepareWithdraw,confirmWithdraw:s.confirmWithdraw,onClose:s.closeWithdraw,onCopyHash:s.copyHash,trackFunnel:s.trackFunnelOnce})]})}var Ki=["rewards","points","staking","gameSwap","forge","crossdPool"];de(`.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-svc-items,.wp-claim-content{padding:18px 14px}.wp-item-line{gap:10px}.wp-svc-token>span{max-width:168px}}.wp-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.wi-drawer-content .wp-header,.wi-portfolio-body .wp-header{padding:16px}.wi-drawer-content .wp-header-edge--right .wp-header-btn,.wi-portfolio-body .wp-header-edge--right .wp-header-btn{top:16px;right:16px}.wp-withdraw-amount-card{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-withdraw-amount-row{display:flex;align-items:center;gap:8px;width:100%}.wp-withdraw-input{flex:1 1 auto;min-width:0;padding:0;border:none;background:transparent;color:var(--wp-text);font-family:inherit;font-size:24px;font-weight:600;line-height:1.3;letter-spacing:0;text-align:left;outline:none}.wp-withdraw-input::placeholder{color:var(--wp-text-30)}.wp-withdraw-input[aria-invalid=true]{color:var(--wp-claim-error)}.wp-withdraw-input-symbol{flex-shrink:0;color:var(--wp-text-40);font-size:15px;font-weight:600;line-height:1.3}.wp-withdraw-quick-row{display:flex;align-items:center;gap:8px;width:100%}.wp-withdraw-quick{appearance:none;flex:1 1 0;min-width:0;height:32px;padding:0 10px;border:1px solid var(--wp-border);border-radius:999px;background:transparent;color:var(--wp-text-60);font-family:inherit;font-size:13px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer}.wp-withdraw-quick:hover:not(:disabled){border-color:var(--wp-claim-primary);color:var(--wp-claim-primary)}.wp-withdraw-quick:disabled{cursor:default;opacity:.5}.wp-withdraw-content{overflow-y:auto}.wp-withdraw-token-list{display:flex;flex-direction:column;gap:8px;width:100%;max-height:216px;overflow-y:auto}.wp-withdraw-token{appearance:none;display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:10px 12px;border:1px solid var(--wp-border);border-radius:8px;background:var(--wp-card);color:var(--wp-text);font-family:inherit;text-align:left;cursor:pointer;box-sizing:border-box}.wp-withdraw-token[data-selected]{border-color:var(--wp-claim-primary);box-shadow:inset 0 0 0 1px var(--wp-claim-primary)}.wp-withdraw-token:disabled{cursor:default;opacity:.6}.wp-withdraw-token-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;flex-shrink:0;overflow:hidden;background:var(--wp-control)}.wp-withdraw-token-icon img{width:28px;height:28px;object-fit:cover}.wp-withdraw-token-icon span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--wp-mint);color:#101820;font-size:13px;font-weight:600;line-height:1}.wp-withdraw-token-symbol{flex:1 1 auto;min-width:0;overflow:hidden;font-size:15px;font-weight:600;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}.wp-withdraw-token-amount{flex-shrink:0;color:var(--wp-text-40);font-size:13px;font-weight:500;line-height:1.3;white-space:nowrap}
|
|
9
|
+
`);import{Fragment as Kw,jsx as Ye,jsxs as Mn}from"react/jsx-runtime";var Wl=15;function Ho({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:c,stakingRewardsReader:h,sendTransaction:u,estimateGas:m,conversionRatio:y,currencySymbol:b,sections:f}){let p=ot(e),w=Ct.useCallback(ue=>!f||f.includes(ue),[f]),g=!!r,x=Yw(),[k,R]=Ct.useState({}),I=Ct.useCallback((ue,me)=>{R(we=>{let Ze=we[ue];return Ze&&Ze.loading===me.loading&&Ze.empty===me.empty?we:{...we,[ue]:me}})},[]),S=Ct.useCallback(ue=>{R(me=>{if(!(ue in me))return me;let we={...me};return delete we[ue],we})},[]),C=Ct.useMemo(()=>({report:I,unregister:S}),[I,S]),[E,M]=Ct.useState(Wl),[F,L]=Ct.useState(!1),[z,A]=Ct.useState(!1),U=Ct.useRef(void 0),re=Ct.useCallback(()=>{_n(x)},[x]),Y=Ct.useCallback(()=>{re(),L(!0),setTimeout(()=>L(!1),600),M(Wl)},[re]);Ct.useEffect(()=>{if(!g||!i)return;let ue=setInterval(()=>{M(me=>me<=1?(Y(),Wl):me-1)},1e3);return()=>clearInterval(ue)},[g,i,Y]);let _=Ct.useCallback(()=>{o?.()},[o]),G=g?Cn(p,r,{size:64}):void 0,ne=Ct.useCallback(async()=>{if(!(z||!r))try{await navigator.clipboard.writeText(r),A(!0),clearTimeout(U.current),U.current=setTimeout(()=>A(!1),2e3)}catch{}},[r,z]);Ct.useEffect(()=>()=>clearTimeout(U.current),[]);let te=Ct.useMemo(()=>({env:p,theme:t,open:!0,walletAddress:r,close:_,onOutlink:d,lpBalanceReader:c,stakingRewardsReader:h,sendTransaction:u,estimateGas:m,conversionRatio:y,currencySymbol:b}),[p,t,r,_,d,c,h,u,m,y,b]),O=Ki.filter(w),Z=O.length>0&&O.every(ue=>{let me=k[ue];return!!me&&!me.loading}),H=Z&&O.every(ue=>k[ue]?.empty),ce=O.some(ue=>{let me=k[ue];return!!me&&!me.empty}),ve=O.length>0&&!Z&&!ce,ge=Mn(Kw,{children:[a&&Mn("div",{className:"wp-header",children:[Mn("div",{className:"wp-header-account",children:[o&&Ye("button",{type:"button",className:"wp-header-btn","aria-label":"Back","data-track":"back",onClick:o,children:Ye(Pp,{})}),Ye("span",{className:"wp-header-avatar","aria-hidden":!0,children:G&&Ye("img",{src:G,alt:"",className:"wp-header-avatar-img",draggable:!1})}),(n||r)&&Mn("div",{className:"wp-header-account-meta",children:[n&&Ye("span",{className:"wp-header-wallet-name",title:n,children:n}),r&&Mn("button",{type:"button",className:"wp-header-address-btn",onClick:ne,"aria-label":"Copy wallet address","data-track":"address_copy",children:[Ye("span",{className:"wp-header-address",children:Bi(r)}),Ye("span",{className:"wp-header-address-copy","data-copied":z,children:z?Ye(Rn,{size:14}):Ye(uo,{size:14})})]})]})]}),Mn("button",{type:"button",className:"wp-header-btn wp-refresh-btn","aria-label":"Refresh portfolio","data-track":"refresh",onClick:Y,children:[Ye(Op,{className:F?"wp-spin-once":void 0}),g&&Ye("span",{className:"wp-refresh-badge",children:E})]})]}),Ye("div",{className:"wp-body",children:Mn("div",{className:"wp-body-inner","data-empty":H||void 0,children:[w("rewards")&&Ye(qp,{}),w("points")&&Ye(nu,{}),w("staking")&&Ye(cu,{}),w("gameSwap")&&Ye(gu,{}),w("forge")&&Ye(yu,{}),w("crossdPool")&&Ye(Pu,{}),ve&&Ye("div",{className:"wp-portfolio-loading",role:"status","aria-label":"Loading portfolio",children:Ye("span",{className:"wp-portfolio-spinner","aria-hidden":!0})}),H&&Mn("div",{className:"wp-portfolio-empty",role:"status",children:[Ye("span",{className:"wp-portfolio-empty-icon","aria-hidden":!0,children:Mn("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[Ye("path",{d:"M20 7H5a2 2 0 0 1-2-2 2 2 0 0 1 2-2h13v4"}),Ye("path",{d:"M3 5v13a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1"}),Ye("circle",{cx:"16.5",cy:"13.5",r:"1",fill:"currentColor",stroke:"none"})]})}),Ye("p",{className:"wp-portfolio-empty-title",children:"No assets yet"}),Ye("p",{className:"wp-portfolio-empty-desc",children:"Assets you hold across ONE services will appear here."})]})]})})]});return Ye(ya.Provider,{value:te,children:Ye(Ml.Provider,{value:C,children:Ye(xe,{feature:"wallet_portfolio",children:s==="none"?ge:Ye("div",{className:Re(s==="fullscreen"?"wp-fullscreen":"wp-embed",l),"data-theme":t,children:ge})})})})}import{jsx as _l,jsxs as Ou}from"react/jsx-runtime";function Bu({className:e}){let{env:t,theme:r,walletAddress:n,close:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s}=Rt();return Ou(Zi.Portal,{children:[_l(Zi.Overlay,{className:"wp-overlay"}),Ou(Zi.Content,{className:Re("wp-fullscreen",e),"data-theme":r,children:[_l(Zi.Title,{className:"wp-sr-only",children:"Portfolio"}),_l(Ho,{env:t,theme:r,walletAddress:n,onBack:o,variant:"none",onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s})]})]})}import{jsx as zu}from"react/jsx-runtime";function Xw({env:e,theme:t="light",walletAddress:r,open:n,onOpenChange:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:c,currencySymbol:h,children:u}){let m=ot(e),y=n!==void 0,[b,f]=xo.useState(!1),p=y?n:b,w=xo.useCallback(k=>{y||f(k),o?.(k)},[y,o]),g=xo.useCallback(()=>w(!1),[w]),x=xo.useMemo(()=>({env:m,theme:t,open:p,walletAddress:r,close:g,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:c,currencySymbol:h}),[m,t,p,r,g,a,i,s,l,d,c,h]);return zu(ya.Provider,{value:x,children:zu(Zw.Root,{direction:"bottom",open:p,onOpenChange:w,noBodyStyles:!0,children:u})})}var Fu=Object.assign(Xw,{Trigger:Lp,Content:Bu});import*as ie from"react";import{createPortal as Na}from"react-dom";import ef from"bignumber.js";import*as Xi from"react";var Uu=120;function ju(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function Wu(){let[e,t]=Xi.useState(!1);return Xi.useEffect(()=>{let r=window.visualViewport,n=()=>r?.height??window.innerHeight,o=n(),a=()=>{let d=n();o=Math.max(o,d),t(o-d>Uu)},i=()=>{o=n(),t(!1)},s=d=>{ju(d.target)&&o-n()>Uu&&t(!0)},l=d=>{ju(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}import*as Ji from"react";function $i(e,t=160){let[r,n]=Ji.useState(e||null);return Ji.useEffect(()=>{if(e){n(e);return}let o=window.setTimeout(()=>n(null),t);return()=>window.clearTimeout(o)},[e,t]),[e||r,e?"open":"closed"]}import{jsx as qn,jsxs as kC}from"react/jsx-runtime";function _u({size:e=16,className:t}){return qn("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:qn("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 Gu({size:e=16,className:t}){return qn("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:qn("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 Gl({size:e=20,className:t}){return qn("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:qn("path",{d:"M10 4.167v11.666M4.167 10 10 15.833 15.833 10",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function Hu({size:e=16,className:t}){return qn("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:qn("path",{d:"M3.333 8h9.334M8.667 4l4 4-4 4",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}import*as Q from"react";import Jw from"bignumber.js";function Qu(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Vu(e){return!e.isFinite()||e.isNaN()||e.lte(0)?"":e.decimalPlaces(6,Jw.ROUND_DOWN).toFixed()}function $w(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 ey(e){let t=e.fromToken.priceUsd,r=e.toToken.priceUsd,n=e.lastChangedBy==="to"?e.toAmount:e.fromAmount,o=it(n);return!o||o.lte(0)?{fromAmount:e.fromAmount,toAmount:e.toAmount}:Qu(t)&&Qu(r)?e.lastChangedBy==="to"?{fromAmount:Vu(o.multipliedBy(r).dividedBy(t))}:{toAmount:Vu(o.multipliedBy(t).dividedBy(r))}:$w(e)?e.lastChangedBy==="to"?{fromAmount:e.toAmount}:{toAmount:e.fromAmount}:{fromAmount:e.lastChangedBy==="to"?"":e.fromAmount,toAmount:e.lastChangedBy==="from"?"":e.toAmount}}function qu({getQuote:e,submitBridge:t}){return{canQuote:!!e,canSubmit:!!t,async getQuote(r){return e?e(r):ey(r)},async submitBridge(r){if(!t)throw new Error("Bridge submit handler is not configured.");return t(r)}}}var Yu=15,ty=18,Ju="cross_bridge_terms_accepted",ry=3600*24*365;function ny(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,Yu);let o=t.slice(0,n).slice(0,Yu),a=t.slice(n+1).slice(0,ty);return`${o}.${a}`}function oy(){return typeof document>"u"?!1:document.cookie.split(";").map(e=>e.trim()).some(e=>e===`${Ju}=true`)}function ay(){if(typeof document>"u")return;let e=typeof window<"u"&&window.location.protocol==="https:"?"; Secure":"";document.cookie=[`${Ju}=true`,"Path=/",`Max-Age=${ry}`,"SameSite=Lax",e].filter(Boolean).join("; ")}function iy(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 Ku(e){let t=e.toUpperCase();return t.startsWith("T")&&t.slice(1).startsWith("ONE")?t.slice(1):t}function sy(e,t){if(!e||!t||e.chainId!==t.chainId)return!1;let r=new Set([Ku(e.symbol),Ku(t.symbol)]);return r.has("ONE")&&r.has("ONEUSD")}function an(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function es(e){return e[0]}function Hl(e,t,r,n){if(r&&!an(r,t))return r;let o=t?n?.(t,e):void 0;if(o?.length)return o[0];if(!t)return e[1]??es(e);let a=e.findIndex(s=>an(s,t)),i=a>=0?e[a+1]:void 0;return i&&!an(i,t)?i:e.find(s=>!an(s,t))??t}function Zu({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 ts(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),...ts(r.cause,t+1),...ts(r.data,t+1),...ts(r.error,t+1)]}function Ql(e){let t=ts(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 Xu(e,t){return Ql(e)?"Transaction request was rejected.":(e instanceof Error?e.message:typeof e=="string"?e:"").split(`
|
|
10
|
+
`)[0]?.trim()||t}function $u(e){let{tokens:t,initialFromToken:r,initialToToken:n,getToTokens:o,getApproval:a,approveBridge:i,history:s=[],initialSlippage:l="1",termsUrl:d,getQuote:c,submitBridge:h,onSubmitted:u,onSuccess:m,onFailed:y,onExit:b}=e,f=Q.useMemo(()=>qu({getQuote:c,submitBridge:h}),[c,h]),[p,w]=Q.useState("form"),[g,x]=Q.useState(r??es(t)),[k,R]=Q.useState(()=>Hl(t,r??es(t),n,o)),[I,S]=Q.useState(""),[C,E]=Q.useState(""),[M,F]=Q.useState("from"),[L,z]=Q.useState(l),[A,U]=Q.useState(null),re=Q.useMemo(()=>sy(g,k),[g,k]),Y=Q.useMemo(()=>re?"1":L==="auto"?iy(A?.priceImpact):L,[re,L,A?.priceImpact]),[_,G]=Q.useState(""),[ne,te]=Q.useState("idle"),[O,Z]=Q.useState(""),[H,ce]=Q.useState(null),[ve,ge]=Q.useState([]),[ue,me]=Q.useState(!1),[we,Ze]=Q.useState(oy),[he,Ee]=Q.useState(null),[at,Qe]=Q.useState(!1),[We,Be]=Q.useState(null),[rt,Nt]=Q.useState(null),[ut,xt]=Q.useState(!1),[be,Vt]=Q.useState(!1),bt=Q.useRef(0),wt=Q.useRef(null),nt=Q.useRef(!1),et=Q.useRef(!1),er=Q.useRef(!1),At=Q.useRef(!1),Ut=Q.useRef(!1),Lt=Q.useRef(!1),Ve=Q.useRef(!1);Q.useEffect(()=>{er.current||(er.current=!0,qe("bridge","opened"))},[]);let Pe=Q.useCallback(()=>{wt.current&&(clearTimeout(wt.current),wt.current=null)},[]),ft=Q.useCallback(j=>{Pe(),Nt(j)},[Pe]);Q.useEffect(()=>Pe,[Pe]),Q.useEffect(()=>{let j=t.find(Ge=>an(Ge,g))??es(t),_e=j?o?.(j,t):void 0,ae=_e?.find(Ge=>an(Ge,k))??(_e?void 0:t.find(Ge=>an(Ge,k)))??Hl(t,j,void 0,o);x(j),R(ae)},[o,t,g,k]);let Tt=Q.useCallback((j,_e)=>{let ae=ny(j);if(!ae){bt.current+=1,S(""),E(""),F(_e),U(null),G(""),te("idle");return}_e==="from"?S(ae):E(ae),F(_e),G(""),!Ut.current&&Number(ae)>0&&(Ut.current=!0,qe("bridge","amount_entered"))},[]),Ne=Q.useCallback(()=>{bt.current+=1,S(""),E(""),F("from"),U(null),G(""),Z(""),te("idle"),Ee(null),Qe(!1),Be(null),xt(!1),ft(null)},[ft]),It=Q.useCallback(j=>{an(j,g)||(At.current||(At.current=!0,qe("bridge","token_selected",{tags:{item_id:`from:${j.symbol}`}})),x(j),R(Hl(t,j,void 0,o)),Ne())},[g,o,Ne,t]),qt=Q.useCallback(j=>{an(j,k)||an(j,g)||(At.current||(At.current=!0,qe("bridge","token_selected",{tags:{item_id:`to:${j.symbol}`}})),R(j),Ne())},[g,Ne,k]),P=Q.useMemo(()=>g?o?.(g,t)??t.filter(j=>!an(j,g)):[],[g,o,t]),ze=Q.useCallback(()=>{g?.balance&&Tt(g.balance,"from")},[g?.balance,Tt]),B=Q.useCallback(()=>{!g||!k||(x(k),R(g),Ne())},[g,Ne,k]),oe=Q.useCallback(()=>{bt.current+=1,S(""),E(""),F("from"),U(null),G(""),Z("")},[]);Q.useEffect(()=>{if(!g||!k)return;if(!I&&!C){U(null),G(""),te(ae=>ae==="quoting"?"idle":ae);return}let j=++bt.current,_e=Zu({fromToken:g,toToken:k,fromAmount:I,toAmount:C,lastChangedBy:M,slippage:L});te(ae=>ae==="submitting"?ae:f.canQuote?"quoting":"idle"),(async()=>{try{let ae=await f.getQuote(_e);if(bt.current!==j)return;ae.fromAmount!==void 0&&M==="to"&&S(ae.fromAmount),ae.toAmount!==void 0&&M==="from"&&E(ae.toAmount),U(ae.summary??null),G(ae.error??"")}catch(ae){if(bt.current!==j)return;G(ae instanceof Error?ae.message:"Failed to quote bridge.")}finally{bt.current===j&&te(ae=>ae==="quoting"?"idle":ae)}})()},[I,g,M,f,L,C,k]);let se=Q.useCallback(()=>!g||!k?null:Zu({fromToken:g,toToken:k,fromAmount:I,toAmount:C,lastChangedBy:M,slippage:Y}),[Y,I,g,M,C,k]),fe=Q.useCallback(async(j,_e)=>{if(!nt.current){nt.current=!0,Z(""),xt(!1),Qe(!1),te("submitting");try{if(!_e?.skipApprovalCheck&&a){let Ge=await a(j);if(Ge){Ee(Ge),Be(j),te("idle");return}}Ee(null),Be(null),ft("processing");let ae=await f.submitBridge(j);ce(ae),te("success"),ge(Ge=>[{id:ae.txHash,timestamp:new Date().toISOString(),txHash:ae.txHash,fromToken:ae.fromToken,toToken:ae.toToken,fromAmount:ae.fromAmount,toAmount:ae.toAmount,summary:A??void 0,status:"pending"},...Ge.filter(No=>No.txHash!==ae.txHash)]),oe(),Vt(!0),ft(null),xt(!0),qe("bridge","confirmed"),Lt.current=!1,Ve.current=!1,u?.(ae),m?.(ae)}catch(ae){if(ft(null),qe("bridge","confirmed",{status:"failure",reason:Nr(ae)}),Lt.current=!1,Ve.current=!1,Ql(ae)){te("idle");return}let Ge=Xu(ae,"Failed to submit bridge.");Z(Ge),te("error"),y?.({message:Ge})}finally{nt.current=!1}}},[a,y,u,m,f,oe,ft,A]),mt=Q.useCallback(async()=>{if(_)return;let j=se();if(j){if(Lt.current||(Lt.current=!0,qe("bridge","submitted")),!we){Be(j),me(!0);return}await fe(j)}},[se,_,fe,we]),Dt=Q.useCallback(async()=>{let j=We??se();j&&(ay(),Ze(!0),me(!1),await fe(j))},[se,We,fe]),yt=Q.useCallback(()=>{me(!1),Be(null)},[]),hr=Q.useCallback(async()=>{if(!(et.current||ne==="submitting"||!he||!We||!i)){et.current=!0,Z(""),te("submitting");try{await i(We,he),Ve.current||(Ve.current=!0,qe("bridge","approved")),Ee(null),te("idle"),Qe(!0)}catch(j){if(Ql(j)){te("idle");return}let _e=Xu(j,"Failed to approve token.");Z(_e),te("error"),y?.({message:_e})}finally{et.current=!1}}},[he,i,y,We,fe,ne]),br=Q.useCallback(()=>{ne!=="submitting"&&(Ee(null),Qe(!1),Be(null),te("idle"))},[ne]),jt=Q.useCallback(async()=>{if(ne==="submitting")return;let j=We??se();if(!j){Qe(!1),Z("Bridge input is no longer available. Please try again."),te("error");return}Qe(!1),await fe(j,{skipApprovalCheck:!0})},[se,We,fe,ne]),Dr=Q.useCallback(()=>{xt(!1)},[]),sr=Q.useCallback(j=>{w(j),j==="history"&&Vt(!1)},[]),ee=Q.useCallback(()=>{if(p==="history"){sr("form");return}b?.()},[b,sr,p]),Te=Q.useMemo(()=>[...s,...ve.filter(j=>!s.some(_e=>_e.txHash===j.txHash))],[s,ve]);return{step:p,setStep:sr,status:ne,error:O,quoteError:_,fromToken:g,toToken:k,tokens:t,availableToTokens:P,fromAmount:I,toAmount:C,lastChangedBy:M,slippage:L,effectiveSlippage:Y,slippageLocked:re,setSlippage:z,summary:A,history:Te,submitted:H,canSubmit:f.canSubmit,termsOpen:ue,approvalInfo:he,approvalSuccessOpen:at,approveBridge:i,pendingSubmitInput:We,submitToast:rt,successDialogOpen:ut,dismissSuccessDialog:Dr,hasNewHistory:be,termsUrl:d,setFromToken:x,setToToken:R,selectFromToken:It,selectToToken:qt,setAmount:Tt,setMax:ze,swapTokens:B,submit:mt,confirmTerms:Dt,cancelTerms:yt,confirmApproval:hr,cancelApproval:br,continueAfterApproval:jt,back:ee}}de(`.bf-root{--bf-bg: var(--ds-bg-default, #1e232e);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .08));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .07));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .4));--bf-toast-bg: var(--bf-bg);--bf-toast-strong: var(--bf-text-high);--bf-toast-color: var(--bf-text-medium);position:relative;display:flex;flex:1;min-height:0;flex-direction:column;container:bf-flow / inline-size;overflow:hidden;background:var(--bf-bg);color:var(--ds-content-highest, #ffffff);font-family:inherit}[data-theme=dark].wi-popover-content .bf-root,[data-theme=dark].wi-drawer-content .bf-root{--bf-bg: var(--ds-bg-default, #121212);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .1));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .05));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .7));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .5))}[data-theme=light].wi-popover-content .bf-root,[data-theme=light].wi-drawer-content .bf-root{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .05));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .7));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .5))}[data-theme=dark].gou-shell .bf-root,.gou-shell[data-theme=dark] .bf-root{--bf-bg: var(--ds-bg-default, #121212);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .1));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .05));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .7));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .5))}[data-theme=light].gou-shell .bf-root,.gou-shell[data-theme=light] .bf-root{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .05));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .7));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .5))}.bf-root[data-view=history]{background:var(--ds-bg-dim, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-header{position:relative;display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:24px;border-bottom:1px solid var(--bf-border);background:var(--ds-bg-default, var(--bf-bg));box-sizing:border-box}.bf-root[data-view=history] .bf-header{padding:24px;border-bottom-color:var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff)}.bf-header-btn{display:inline-flex;width:24px;height:24px;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease}.bf-header-spacer{width:24px;height:24px;flex-shrink:0}.bf-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-header .bf-header-btn:last-child{position:absolute;top:24px;right:24px}.bf-header-title{position:absolute;left:50%;transform:translate(-50%);font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--bf-text-high);white-space:nowrap}.bf-header-title[data-clickable=true]{cursor:pointer}.bf-root[data-view=history] .bf-header-title{color:var(--ds-content-highest, #000000)}.bf-body,.bf-history-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;box-sizing:border-box}.bf-body{padding:24px}.bf-history-body{display:flex;flex-direction:column;gap:12px;padding:24px;background:var(--ds-bg-dim, #f5f7fa)}.bf-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.bf-chip{display:inline-flex;align-items:center;gap:4px;min-height:33px;padding:6px 8px;border:0;border-radius:12px;background:var(--bf-surface);color:var(--bf-text-medium);font:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-chip:hover:not(:disabled){color:var(--bf-text-high);background:var(--bf-surface-hover)}.bf-chip:disabled{cursor:default}.bf-chip-history{position:relative}.bf-chip-dot{position:absolute;top:4px;right:4px;width:6px;height:6px;border-radius:999px;background:var(--ds-system-red-default, #da0b2e)}.bf-swap-card{position:relative;display:flex;flex-direction:column;gap:12px;margin-bottom:12px}.bf-field-error{margin-top:-4px;color:var(--ds-system-red-default, #ff2b5f);font-size:13px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-amount-panel{display:flex;min-height:110px;flex-direction:column;gap:8px;padding:16px;border:1px solid transparent;border-radius:12px;background:var(--bf-surface);box-sizing:border-box;transition:border-color .2s ease}.bf-amount-panel:hover{border-color:var(--bf-border)}.bf-amount-head{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--bf-text-high);font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-balance{display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;color:var(--bf-text-low);font-size:12px;white-space:nowrap}.bf-amount-main{display:flex;align-items:center;justify-content:space-between;gap:12px}.bf-amount-input-wrap{display:flex;min-width:0;flex:1;flex-direction:column;gap:4px}.bf-amount-input{width:100%;min-width:0;padding:0;border:0;background:transparent;color:var(--bf-text-high);font:inherit;font-size:18px;font-size:clamp(15px,4.5cqi,18px);font-weight:600;line-height:1.5;letter-spacing:-.01em;outline:none}.bf-amount-input[data-size=medium]{font-size:16px;font-size:clamp(14px,4cqi,16px)}.bf-amount-input[data-size=small]{font-size:14px;font-size:clamp(12px,3.5cqi,14px)}.bf-amount-input::placeholder{color:var(--ds-content-lowest, rgba(0, 0, 0, .25))}.bf-amount-usd{overflow:hidden;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;white-space:nowrap;text-overflow:ellipsis}.bf-token-pill{display:inline-flex;flex-shrink:0;align-items:center;gap:6px;min-height:33px;padding:6px 8px 6px 6px;border:1px solid var(--bf-border);border-radius:9999px;background:var(--bf-bg);color:var(--bf-text-high);font:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;perspective:220px;overflow:hidden;transition:transform .12s ease,background .15s ease}.bf-token-pill:hover:not(:disabled):not([data-locked=true]){background:var(--bf-surface-hover)}.bf-token-pill:disabled{cursor:default;opacity:.6}.bf-token-pill[data-locked=true]{cursor:default}.bf-token-icon{position:relative;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;overflow:hidden;border-radius:0;background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000);font-size:11px;font-weight:700}.bf-token-icon[data-has-image=true]{background:transparent}.bf-token-icon img{width:100%;height:100%;border-radius:0;object-fit:cover}.bf-token-fallback{line-height:1}.bf-token-pill-face{display:inline-flex;align-items:center;gap:6px;transform-origin:center bottom;animation:bf-token-roll-up .32s cubic-bezier(.22,1,.36,1)}@keyframes bf-token-roll-up{0%{opacity:0;transform:translateY(90%) rotateX(-80deg)}60%{opacity:1}}.bf-token-pill:active:not(:disabled),.bf-embedded-token-pill:active:not(:disabled){transform:scale(.96)}.bf-token-search:focus-within{border-color:var(--ds-accent-primary-default, #f0640d)}.bf-token-search input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--bf-text-high);font:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-token-search input::placeholder{color:var(--bf-text-low)}.bf-token-list{display:flex;min-height:0;flex:1;flex-direction:column;gap:0;overflow-y:auto;overflow-x:hidden;padding:0 24px 24px;scrollbar-width:thin;box-sizing:border-box}.bf-token-row{position:relative;display:flex;width:100%;min-height:69px;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid transparent;border-radius:12px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;box-sizing:border-box}.bf-token-row:hover:not([data-selected=true]){background:var(--ds-surface-medium, rgba(18, 18, 18, .05))}.bf-token-row[data-selected=true]{border-color:var(--ds-accent-primary-default, #ff8438);background:var(--ds-surface-medium, rgba(18, 18, 18, .05))}.bf-token-row-left{display:inline-flex;min-width:0;align-items:center;gap:16px}.bf-token-meta{display:flex;min-width:0;flex-direction:column}.bf-token-symbol{overflow:hidden;color:var(--bf-text-high);font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.bf-token-name{overflow:hidden;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.bf-token-row-right{display:flex;min-width:86px;max-width:42%;flex-shrink:0;flex-direction:column;align-items:flex-end}.bf-token-balance,.bf-token-price{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-token-balance{color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-token-price{color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-token-row[data-selected=true] .bf-token-symbol{color:var(--bf-text-high)}.bf-token-row[data-selected=true] .bf-token-balance{color:var(--bf-text-high);font-size:16px}.bf-token-row[data-selected=true] .bf-token-price{color:var(--bf-text-low);font-size:14px}.bf-token-empty{padding:32px 16px;color:var(--bf-text-low);font-size:14px;font-weight:500;line-height:1.5;text-align:center}.bf-slippage-overlay{position:fixed;inset:0;z-index:100002;display:flex;align-items:center;justify-content:center;padding:24px;background:#00000085;pointer-events:auto;box-sizing:border-box}.bf-slippage-dialog{display:flex;width:min(480px,calc(100vw - 48px));height:auto;min-height:min(316px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);flex-direction:column;overflow:hidden;border:1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));border-radius:24px;background:var(--ds-surface-default, #ffffff);color:var(--ds-content-highest, #000000);box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));box-sizing:border-box}.bf-slippage-head{position:relative;display:flex;min-height:73px;flex-shrink:0;align-items:center;justify-content:flex-start;padding:24px 56px 24px 24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff);box-sizing:border-box}.bf-slippage-head h3{margin:0;color:var(--ds-content-highest, #000000);font-size:20px;font-weight:600;line-height:1.25;letter-spacing:0}.bf-slippage-close{position:absolute;top:24px;right:24px;display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer}.bf-slippage-close:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-slippage-body{display:flex;flex:1;min-height:0;flex-direction:column;gap:24px;padding:24px;box-sizing:border-box}.bf-slippage-desc{margin:0;color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-controls{display:flex;flex-direction:column;gap:12px;width:100%}.bf-slippage-presets{display:flex;gap:8px;width:100%}.bf-slippage-preset{appearance:none;display:inline-flex;flex:1 1 0;min-width:0;min-height:48px;align-items:center;justify-content:center;padding:12px 8px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;box-sizing:border-box}.bf-slippage-preset:hover,.bf-slippage-preset[data-selected=true]{border-color:var(--ds-accent-primary-default, #ff8438);background:var(--ds-accent-primary-low, #fff5ee)}.bf-slippage-custom{display:flex;min-height:48px;align-items:center;gap:8px;padding:12px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85));box-sizing:border-box}.bf-slippage-custom:focus-within,.bf-slippage-custom[data-selected=true]{border-color:var(--ds-accent-primary-default, #ff8438)}.bf-slippage-custom input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--ds-content-high, rgba(0, 0, 0, .85));font:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-custom input::placeholder{color:var(--ds-content-lowest, rgba(0, 0, 0, .25))}.bf-slippage-custom span:not(.bf-sr-only){flex-shrink:0;color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-apply{appearance:none;margin-top:auto;width:100%;min-height:48px;padding:12px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #ff8438);color:var(--ds-accent-primary-on-primary, #ffffff);font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;box-sizing:border-box}.bf-slippage-apply:hover{filter:brightness(.96)}.bf-slippage-apply:disabled{cursor:not-allowed;opacity:.5;filter:none}.bf-slippage-message{margin:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-message[data-variant=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-slippage-message[data-variant=error]{color:var(--ds-system-red-default, #da0b2e)}.bf-action-modal-overlay{--bf-bg: var(--ds-bg-default, #1e232e);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .08));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .12));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .92));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .4));position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;padding:24px;background:#040912b8;pointer-events:auto;box-sizing:border-box;animation:bf-overlay-in .18s ease-out}.bf-action-modal-overlay[data-theme=light]{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .08));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .65));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .4))}.bf-action-modal{display:flex;width:min(480px,calc(100vw - 48px));flex-direction:column;align-items:center;gap:24px;padding:48px 24px 24px;border:1px solid var(--bf-border);border-radius:24px;background:var(--bf-bg);color:#fff;box-shadow:0 24px 80px #00000073;box-sizing:border-box;animation:bf-modal-in .2s cubic-bezier(.16,1,.3,1)}.bf-action-modal-overlay[data-state=closed]{animation:bf-overlay-out .15s ease-in forwards}.bf-action-modal-overlay[data-state=closed] .bf-action-modal{animation:bf-modal-out .15s ease-in forwards}@keyframes bf-overlay-in{0%{opacity:0}}@keyframes bf-overlay-out{to{opacity:0}}@keyframes bf-modal-in{0%{opacity:0;transform:translateY(8px) scale(.96)}}@keyframes bf-modal-out{to{opacity:0;transform:translateY(4px) scale(.98)}}@media(prefers-reduced-motion:reduce){.bf-action-modal-overlay,.bf-action-modal,.bf-action-modal-overlay[data-state=closed],.bf-action-modal-overlay[data-state=closed] .bf-action-modal{animation:none}}.bf-action-modal h3{width:100%;margin:0;color:var(--bf-text-high);font-size:24px;font-weight:700;line-height:1.25;text-align:left;letter-spacing:0}.bf-action-modal-desc{max-width:380px;margin:0;color:var(--bf-text-low);font-size:15px;font-weight:500;line-height:1.45;text-align:center;letter-spacing:0}.bf-terms-modal{--bf-terms-accent: #f3742e;padding:24px;gap:24px}.bf-terms-modal h3{font-size:20px;font-weight:600;line-height:1.6;text-align:center}.bf-terms-modal .bf-action-modal-desc{font-size:14px;line-height:1.45}.bf-terms-check-row{display:grid;width:100%;min-height:56px;grid-template-columns:20px minmax(0,1fr);align-items:center;column-gap:12px;padding:16px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-surface);color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.4;box-sizing:border-box}.bf-terms-check-button{appearance:none;display:inline-flex;min-width:0;width:20px;height:20px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;touch-action:manipulation}.bf-terms-copy{display:flex;width:100%;min-width:0;align-items:baseline;justify-content:space-between;column-gap:12px;row-gap:4px;flex-wrap:wrap}.bf-terms-label{min-width:0;cursor:pointer;touch-action:manipulation}.bf-terms-check-button:focus-visible .bf-terms-checkbox{outline:2px solid var(--ds-accent-primary-default, #f0640d);outline-offset:2px}.bf-terms-checkbox{position:relative;display:inline-flex;width:20px;height:20px;align-items:center;justify-content:center;border:1px solid rgba(124,143,180,.72);border-radius:4px;background:transparent;box-sizing:border-box}.bf-terms-checkbox[data-checked=true]{border-color:var(--ds-accent-primary-default, #f0640d);background:var(--ds-accent-primary-default, #f0640d)}.bf-terms-checkbox[data-checked=true]:after{width:8px;height:4px;border:solid #ffffff;border-width:0 0 2px 2px;content:"";transform:rotate(-45deg) translate(1px,-1px)}.bf-terms-check-row a{position:relative;z-index:1;color:var(--ds-accent-primary-default, #f0640d);font-size:14px;font-weight:700;text-decoration:none;white-space:nowrap}.bf-terms-check-row a:hover{text-decoration:underline}.bf-terms-privacy{max-width:100%;margin:0;color:var(--bf-text-low);font-size:clamp(8px,2.4vw,12px);white-space:nowrap;font-weight:500;line-height:1.45;text-align:center;letter-spacing:0}.bf-action-primary,.bf-action-secondary{display:inline-flex;width:100%;min-height:56px;align-items:center;justify-content:center;padding:14px 16px;border:0;border-radius:12px;font:inherit;font-size:18px;font-weight:700;line-height:1.4;letter-spacing:0;cursor:pointer}.bf-action-primary{background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000)}.bf-action-primary:disabled{cursor:not-allowed;opacity:.35}.bf-terms-modal .bf-action-primary{min-height:52px;background:var(--bf-terms-accent);color:#fff;font-size:16px;font-weight:600}.bf-terms-modal .bf-action-primary:disabled{background:var(--bf-surface);color:var(--bf-text-low);opacity:1}.bf-action-primary[aria-busy=true]{gap:8px;opacity:1}.bf-action-button-spinner{width:18px;height:18px;border:2px solid rgba(0,0,0,.22);border-top-color:currentColor;border-right-color:currentColor;border-radius:999px;animation:bf-loading-spin .9s linear infinite}.bf-action-secondary{background:var(--bf-surface);color:var(--bf-text-low)}.bf-action-secondary:disabled{cursor:not-allowed;opacity:.5}.bf-approve-address-box{display:flex;width:100%;flex-direction:column;gap:10px;padding:16px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-surface);box-sizing:border-box}.bf-approve-address-box>span{color:var(--bf-text-low);font-size:14px;font-weight:700;line-height:1.4}.bf-approve-address-box>div{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-approve-address-box strong{min-width:0;overflow:hidden;color:var(--bf-text-high);font-size:15px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.bf-copy-button{flex-shrink:0;min-width:48px;min-height:32px;padding:6px 10px;border:1px solid rgba(0,206,178,.65);border-radius:8px;background:transparent;color:var(--ds-accent-primary-default, #f0640d);font:inherit;font-size:12px;font-weight:700;line-height:1.2;cursor:pointer}.bf-copy-button:disabled{cursor:not-allowed;opacity:.45}.bf-action-buttons{display:grid;width:100%;grid-template-columns:1fr 1fr;gap:12px}.bf-approval-success-modal{gap:28px}.bf-success-mark{position:relative;display:inline-flex;width:96px;height:96px;flex-shrink:0;align-items:center;justify-content:center;border:12px solid rgba(0,206,178,.12);border-radius:999px;background:#00ceb2a8;box-shadow:0 0 0 10px #00ceb20f;box-sizing:border-box}.bf-success-mark:after{width:34px;height:18px;border:solid #ffffff;border-width:0 0 6px 6px;content:"";transform:rotate(-45deg) translate(2px,-3px)}.bf-status-toast{position:absolute;right:16px;bottom:14px;left:16px;z-index:5;display:flex;align-items:center;gap:12px;min-height:52px;padding:12px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-toast-bg);color:var(--bf-toast-color);box-shadow:0 8px 24px #0000003d;box-sizing:border-box}.bf-status-toast-icon{display:inline-flex;width:28px;height:28px;flex-shrink:0;align-items:center;justify-content:center;border-radius:999px}.bf-status-spinner{width:20px;height:20px;border:3px solid rgba(255,255,255,.18);border-top-color:var(--ds-accent-primary-default, #f0640d);border-right-color:var(--ds-accent-primary-default, #f0640d);border-radius:999px;animation:bf-loading-spin .9s linear infinite}.bf-status-check{position:relative;width:20px;height:20px;border-radius:999px;background:var(--ds-system-green-default, #00ceb2)}.bf-status-check:after{position:absolute;top:6px;left:5px;width:8px;height:4px;border:solid var(--ds-system-green-on, #000000);border-width:0 0 2px 2px;content:"";transform:rotate(-45deg)}.bf-status-toast-copy{display:flex;min-width:0;flex:1;flex-direction:column}.bf-status-toast-copy strong,.bf-status-toast-copy span{overflow:hidden;text-overflow:ellipsis}.bf-status-toast-copy strong{color:var(--bf-toast-strong);font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-status-toast-copy span{color:var(--bf-toast-color);font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em}.bf-status-toast[data-variant=success] .bf-status-toast-copy span{color:var(--ds-system-green-on-inverted, #00e8c9)}.bf-status-toast[data-variant=error]{border:1px solid rgba(255,43,95,.28);background:var(--bf-toast-bg)}.bf-status-toast[data-variant=error] .bf-status-toast-copy strong{color:var(--bf-toast-strong)}.bf-status-error-mark{display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;border-radius:999px;background:var(--ds-system-red-default, #ff2b5f);color:#fff;font-size:14px;font-weight:700;line-height:1}.bf-status-toast[data-variant=error] .bf-status-toast-copy span{color:var(--bf-toast-color)}.bf-success-overlay{--bf-bg: var(--ds-bg-default, #1e232e);--bf-border: var(--ds-border-default, rgba(255, 255, 255, .12));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .92));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;padding:24px;background:#000000b8;pointer-events:auto;box-sizing:border-box}.bf-success-overlay[data-theme=light]{--bf-bg: #ffffff;--bf-border: rgba(18, 18, 18, .08);--bf-text-high: rgba(18, 18, 18, .85);--bf-text-medium: rgba(18, 18, 18, .65);--bf-text-low: rgba(18, 18, 18, .4)}.bf-success-modal{display:flex;width:min(480px,calc(100vw - 48px));flex-direction:column;overflow:hidden;border:1px solid var(--bf-border);border-radius:24px;background:var(--bf-bg);color:var(--bf-text-high);box-shadow:0 24px 80px #00000073;box-sizing:border-box}.bf-success-head{display:flex;min-height:73px;align-items:center;justify-content:space-between;gap:16px;padding:24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));box-sizing:border-box}.bf-success-head h3{min-width:0;margin:0;overflow:hidden;color:var(--ds-content-highest, #000000);font-size:20px;font-weight:600;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.bf-success-close{display:inline-flex;width:24px;height:24px;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer}.bf-success-close:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-success-body{display:flex;flex-direction:column;align-items:center;gap:24px;padding:40px 24px 24px;box-sizing:border-box}.bf-success-copy{display:flex;width:100%;flex-direction:column;align-items:center;gap:4px;color:var(--bf-text-medium);text-align:center}.bf-success-copy strong{color:var(--bf-text-high);font-size:24px;font-weight:700;line-height:1.25;letter-spacing:0}.bf-success-copy span{color:var(--bf-text-medium);font-size:15px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-success-route{display:flex;align-items:center;justify-content:center;gap:12px}.bf-success-route .bf-token-icon{width:48px!important;height:48px!important;background:transparent;font-size:18px}.bf-success-route-arrow{color:var(--bf-text-low);font-size:24px;font-weight:500;line-height:1}.bf-success-ok{display:inline-flex;width:100%;min-height:48px;align-items:center;justify-content:center;padding:12px;border:0;border-radius:12px;background:#00b4b7e0;color:#fff;font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}@media(max-width:767px){.bf-success-body{padding:40px 24px 24px}.bf-success-copy strong{font-size:22px}.bf-success-copy span{font-size:14px}.bf-success-mark{width:88px;height:88px}.bf-success-route .bf-token-icon{width:44px!important;height:44px!important}}@keyframes bf-loading-spin{to{transform:rotate(360deg)}}.bf-swap-toggle{position:absolute;top:100px;left:50%;z-index:1;display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;padding:0;border:0;border-radius:9999px;background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000);box-shadow:0 1px 5px #0000001f;cursor:pointer}.bf-swap-card[data-has-from-error=true] .bf-swap-toggle{top:132px}.bf-details{display:flex;flex-direction:column;gap:24px}.bf-collapse{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .22s ease,opacity .14s ease,margin-top .22s ease}.bf-collapse[data-open=true]{grid-template-rows:1fr;opacity:1}.bf-collapse:not([data-open=true]){margin-top:calc(-1 * var(--bf-collapse-gap, 0px))}.bf-collapse-inner{overflow:hidden;min-height:0}@keyframes bf-value-in{0%{opacity:.25;transform:translateY(-2px)}}.bf-info-value,.bf-route-amount-value,.bf-route-meta>span{animation:bf-value-in .24s ease-out}@media(prefers-reduced-motion:reduce){.bf-collapse{transition:none}.bf-info-value,.bf-route-amount-value,.bf-route-meta>span{animation:none}}.bf-exchange-rate{display:flex;width:100%;align-items:center;justify-content:center;gap:4px;padding:0 0 24px;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-detail-section,.bf-history-card{display:flex;flex-direction:column;gap:12px;padding:0;border-radius:12px;background:transparent;box-sizing:border-box}.bf-liquidity{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;background:var(--bf-surface);box-sizing:border-box}.bf-root[data-view=history] .bf-liquidity,.bf-root[data-view=history] .bf-detail-section,.bf-root[data-view=history] .bf-history-card{background:var(--ds-surface-default, #ffffff)}.bf-detail-section h3{margin:0;color:var(--bf-text-high);font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-tx-fee-section{gap:12px}.bf-tx-fee-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.bf-collapse-head{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin:0;padding:0;background:none;border:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.bf-detail-section[data-open=true] .bf-collapse-head{padding-bottom:12px;border-bottom:1px solid var(--bf-border)}.bf-collapse-chevron{flex-shrink:0;color:var(--bf-text-low);transition:transform .2s ease}.bf-detail-section[data-open=true] .bf-collapse-chevron{transform:rotate(180deg)}.bf-collapse-body{display:flex;flex-direction:column;gap:14px}.bf-root[data-view=history] .bf-detail-section[data-open=true] .bf-collapse-head{border-bottom-color:var(--ds-border-default, rgba(0, 0, 0, .07))}.bf-root[data-view=history] .bf-collapse-chevron{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-tx-fee-total{display:inline-flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;color:var(--bf-text-medium);font-size:14px;font-weight:600;line-height:1.4;text-align:right}.bf-tx-fee-total>span[data-delegated=true]{text-decoration:line-through;text-decoration-thickness:2px;text-decoration-color:currentColor}.bf-fee-delegated{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:2px 8px;border-radius:6px;background:#379cff2e;color:#4eb3ff;font-size:10px;font-weight:500;line-height:1.3;white-space:nowrap}.bf-tx-fee-token{width:16px;height:16px;flex-shrink:0;border-radius:999px;object-fit:cover}.bf-info-card{gap:14px}.bf-info-section{display:flex;flex-direction:column;gap:10px}.bf-info-section+.bf-info-section{padding-top:2px}.bf-info-section h4{margin:0;color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.5}.bf-root[data-view=history] .bf-detail-section h3,.bf-root[data-view=history] .bf-info-section h4{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-route-steps{display:flex;flex-direction:column}.bf-route-step{display:grid;min-width:0;grid-template-columns:18px minmax(0,1fr);column-gap:10px}.bf-route-rail{position:relative;display:flex;justify-content:center}.bf-route-line{position:absolute;top:9px;bottom:-4px;width:1px;background:var(--bf-border)}.bf-route-step[data-last=true] .bf-route-line{display:none}.bf-route-dot{z-index:1;width:9px;height:9px;margin-top:5px;border:2px solid var(--bf-text-low);border-radius:999px;background:var(--bf-bg);box-sizing:border-box}.bf-route-dot[data-final=true]{border-color:var(--ds-accent-primary-default, #00ceb2)}.bf-route-body{display:flex;min-width:0;flex-direction:column;gap:2px;padding-bottom:14px}.bf-route-step[data-last=true] .bf-route-body{padding-bottom:0}.bf-route-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-route-title{min-width:0;overflow:hidden;color:var(--bf-text-high);font-size:13px;font-weight:620;letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap}.bf-route-amount{display:inline-flex;flex-shrink:0;align-items:center;gap:4px;color:var(--bf-text-medium);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}.bf-route-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;color:var(--bf-text-low);font-size:12px;line-height:1.45;font-variant-numeric:tabular-nums}.bf-route-step[data-kind=hop] .bf-route-title{color:var(--bf-text-medium);font-weight:600}.bf-route-step[data-kind=hop] .bf-route-amount{color:var(--bf-text-low);font-weight:500}.bf-route-step[data-kind=hop] .bf-route-dot{width:7px;height:7px;margin-top:6px;border-width:1px}.bf-route-meta>span[data-tone=accent]{color:var(--ds-accent-primary-default, #00ceb2);font-weight:600}.bf-route-meta>span[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00);font-weight:600}.bf-route-meta>span[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e);font-weight:600}.bf-route-tag{padding:1px 6px;border-radius:5px;background:var(--ds-accent-primary-low, rgba(0, 206, 178, .12));color:var(--ds-accent-primary-high, #00a0a2);font-size:10px;font-weight:700;letter-spacing:.01em}.bf-info-rows{display:flex;flex-direction:column;gap:8px}.bf-info-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-liquidity-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-info-label{display:inline-flex;align-items:center;gap:6px;min-width:0;color:var(--bf-text-low)}.bf-info-value{display:flex;min-width:0;align-items:center;justify-content:flex-end;gap:4px;color:var(--bf-text-medium);text-align:right}.bf-info-route,.bf-info-value-token{display:inline-flex;align-items:center;gap:4px}.bf-info-route .bf-token-icon,.bf-info-value-token .bf-token-icon{flex-shrink:0}.bf-info-route-arrow{display:inline-flex;align-items:center;color:var(--bf-text-medium);font-size:12px;line-height:1}.bf-root[data-view=history] .bf-info-route-arrow{color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.bf-info-value[data-tone=accent]{color:var(--ds-accent-primary-high, #f0640d)}.bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-info-value[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e)}.bf-root[data-view=history] .bf-info-label,.bf-root[data-view=history] .bf-liquidity-head{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-root[data-view=history] .bf-info-value{color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.bf-root[data-view=history] .bf-info-value[data-tone=accent]{color:var(--ds-accent-primary-high, #f0640d)}.bf-root[data-view=history] .bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-root[data-view=history] .bf-info-value[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e)}.bf-liquidity-status{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:600;line-height:1.4;white-space:nowrap}.bf-liquidity-status:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0}.bf-liquidity-status[data-status=normal],.bf-liquidity-status:not([data-status]){background:#00ceb21f;color:var(--ds-accent-primary-default, #f0640d)}.bf-liquidity-status[data-status=normal]:before,.bf-liquidity-status:not([data-status]):before{background:var(--ds-accent-primary-default, #f0640d)}.bf-liquidity-status[data-status=low]{background:#e56f001f;color:#e56f00}.bf-liquidity-status[data-status=low]:before{background:#e56f00}.bf-liquidity-status[data-status=rebalancing]{background:#da0b2e1a;color:#da0b2e}.bf-liquidity-status[data-status=rebalancing]:before{background:#da0b2e}.bf-liquidity-track{height:8px;overflow:hidden;border-radius:999px;background:var(--bf-surface-hover)}.bf-liquidity-track span{display:block;height:100%;border-radius:inherit;background:var(--ds-accent-primary-default, #f0640d)}.bf-error{padding:12px;border-radius:12px;background:#da0b2e1f;color:var(--ds-system-red-default, #da0b2e);font-size:13px;line-height:1.4}.bf-footer{display:flex;flex-shrink:0;flex-direction:column;align-items:center;gap:10px;padding:12px 24px 24px;background:var(--ds-bg-default, var(--bf-bg))}.bf-next{width:100%;min-height:48px;padding:12px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000);font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-next:disabled{cursor:default;opacity:.6}.bf-powered{display:inline-flex;align-items:center;gap:3px;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-decoration:none}.bf-powered:focus-visible{border-radius:4px;outline:2px solid var(--ds-accent-primary-default, #f0640d);outline-offset:2px}.bf-powered-brand{text-decoration:underline;text-underline-offset:2px}.bf-history-tabs{display:flex;align-items:center;gap:4px;width:100%}.bf-history-tab{position:relative;display:inline-flex;min-height:37px;align-items:center;justify-content:center;padding:8px 12px;border:0;background:transparent;color:var(--ds-content-lowest, rgba(0, 0, 0, .25));font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;cursor:pointer}.bf-history-tab[data-active=true]{color:var(--ds-accent-primary-high, #f0640d)}.bf-history-tab[data-active=true]:after{position:absolute;right:8px;bottom:0;left:8px;height:3px;border-radius:999px;background:var(--ds-accent-primary-high, #f0640d);content:""}.bf-history-tab-dot{position:absolute;top:8px;right:4px;width:6px;height:6px;border-radius:999px;background:var(--ds-system-red-default, #da0b2e)}.bf-history-list{display:flex;flex-direction:column;gap:12px}.bf-history-item{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:var(--ds-surface-default, #ffffff);box-sizing:border-box}.bf-history-item-head,.bf-history-meta,.bf-history-route,.bf-history-route-token{display:inline-flex;align-items:center}.bf-history-item-head{justify-content:space-between;gap:12px;width:100%}.bf-history-status{display:inline-flex;min-height:24px;align-items:center;justify-content:center;padding:3px 8px;border-radius:4px;background:var(--ds-system-orange-low, #fcf5e9);color:var(--ds-system-orange-high, #e56f00);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;white-space:nowrap}.bf-history-status[data-status=completed]{background:var(--ds-system-green-low, #e7f9f8);color:var(--ds-system-green-high, #00a0a2)}.bf-history-status[data-status=failed]{background:var(--ds-system-red-low, rgba(218, 11, 46, .12));color:var(--ds-system-red-default, #da0b2e)}.bf-history-time{min-width:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;text-align:right;white-space:nowrap}.bf-history-item-body{display:flex;flex-direction:column;gap:4px}.bf-history-amount{color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-history-meta{justify-content:space-between;gap:12px;min-width:0}.bf-history-usd{min-width:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-history-route{justify-content:flex-end;gap:4px;min-width:0;color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:12px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-history-route-token{gap:4px;min-width:0}.bf-history-route-token span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-history-route-arrow{flex-shrink:0;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-empty{padding:32px 16px;text-align:center;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:14px}.bf-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:767px){.bf-slippage-overlay{align-items:flex-end;padding:0}.bf-slippage-dialog{width:100%;height:auto;min-height:316px;max-height:82dvh;border-right:0;border-bottom:0;border-left:0;border-radius:24px 24px 0 0}}.wi-drawer-content .bf-header{padding:16px}.wi-drawer-content .bf-header .bf-header-btn:last-child{top:16px;right:16px}.wi-drawer-content .bf-body,.wi-drawer-content .bf-history-body{padding:16px}.bf-root[data-variant=embedded]{--bf-bg: #1c1c1d;--bf-surface: #212224;--bf-surface-hover: rgba(255, 255, 255, .08);--bf-border: rgba(255, 255, 255, .1);--bf-text-high: rgba(255, 255, 255, .85);--bf-text-medium: rgba(255, 255, 255, .65);--bf-text-low: rgba(255, 255, 255, .4);--bf-embedded-primary: #f3742e;--bf-embedded-on-primary: #ffffff;background:var(--bf-bg);color:#fff}.gou-shell[data-theme=light] .bf-root[data-variant=embedded]{--bf-bg: #ffffff;--bf-surface: #ffffff;--bf-surface-hover: rgba(0, 0, 0, .03);--bf-border: rgba(0, 0, 0, .06);--bf-text-high: rgba(0, 0, 0, .85);--bf-text-medium: rgba(0, 0, 0, .65);--bf-text-low: rgba(0, 0, 0, .4);color:#000}.bf-root[data-variant=embedded] .bf-header{min-height:64px;justify-content:flex-start;gap:12px;padding:16px 20px 12px;border-bottom-color:var(--bf-border);background:var(--bf-bg)}.bf-root[data-variant=embedded] .bf-header .bf-header-btn:last-child{top:16px;right:20px}.bf-root[data-variant=embedded] .bf-header-btn{color:var(--bf-text-medium)}.bf-root[data-variant=embedded] .bf-header-title{position:static;flex:1;padding-right:36px;transform:none;color:var(--bf-text-high);font-size:18px;font-weight:600;line-height:1.5;text-align:left}.bf-root[data-variant=embedded] .bf-header-spacer{display:none}.bf-root[data-variant=embedded] .bf-embedded-body{padding:20px}.bf-embedded-form{display:flex;width:100%;min-width:0;flex-direction:column;gap:20px;--bf-collapse-gap: 20px}.bf-embedded-fields{position:relative;display:flex;width:100%;flex-direction:column}.bf-embedded-field-group{display:flex;width:100%;flex-direction:column;gap:8px}.bf-embedded-amount-panel{display:flex;width:100%;min-width:0;flex-direction:column;padding:16px;border:1px solid rgba(255,255,255,.025);border-radius:12px;background:#212224;box-sizing:border-box}.gou-shell[data-theme=light] .bf-embedded-amount-panel{border-color:#00000014;background:#fff}.bf-embedded-amount-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.bf-embedded-amount-label{display:inline-flex;min-width:0;align-items:center;gap:8px;white-space:nowrap}.bf-embedded-amount-label strong{color:var(--bf-text-medium);font-size:14px;font-weight:700;line-height:1.5}.bf-embedded-amount-label>span{color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5}.bf-embedded-amount-label em{padding:2px 6px;border-radius:9999px;background:#f3742e1a;color:var(--bf-embedded-primary);font-size:11px;font-style:normal;font-weight:500;line-height:1.25}.bf-embedded-balance{display:inline-flex;min-width:0;max-width:100%;flex-shrink:1;align-items:center;justify-content:flex-end;gap:6px;overflow:hidden;color:var(--bf-text-medium);font-size:12px;font-weight:600;line-height:1.5;text-align:right;white-space:nowrap}.bf-embedded-balance>svg,.bf-embedded-balance>span:not(.bf-embedded-balance-value){flex-shrink:0}.bf-embedded-balance-value{min-width:0;overflow:hidden;text-overflow:ellipsis}.bf-embedded-balance button{flex-shrink:0;padding:2px 8px;border:0;border-radius:9999px;background:#f3742e26;color:var(--bf-embedded-primary);font:inherit;font-size:11px;font-weight:700;line-height:1.4;cursor:pointer}.bf-embedded-balance button:hover{background:#f3742e40}.bf-embedded-amount-main{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-embedded-token-pill{display:inline-flex;height:32px;flex-shrink:0;align-items:center;gap:6px;padding:0 12px 0 6px;border:1px solid rgba(255,255,255,.1);border-radius:9999px;background:#ffffff0d;color:#fff;font:inherit;font-size:14px;font-weight:700;line-height:1.5;cursor:pointer;perspective:220px;overflow:hidden;transition:transform .12s ease,background .15s ease}.gou-shell[data-theme=light] .bf-embedded-token-pill{border-color:#0000000f;background:#00000008;color:#000}.bf-embedded-token-pill:disabled{cursor:default;opacity:1}.bf-embedded-input-wrap{display:flex;min-width:0;flex:1}.bf-embedded-amount-input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:#fff;font:inherit;font-size:24px;font-size:clamp(18px,6cqi,24px);font-weight:700;line-height:32px;text-align:right}.gou-shell[data-theme=light] .bf-embedded-amount-input{color:#000}.bf-embedded-amount-input[data-size=medium]{font-size:20px;font-size:clamp(16px,5cqi,20px);line-height:28px}.bf-embedded-amount-input[data-size=small]{font-size:16px;font-size:clamp(14px,4cqi,16px);line-height:24px}.bf-embedded-amount-input::placeholder{color:var(--bf-text-low);opacity:1}.bf-embedded-field-error{color:#ff3c53;font-size:12px;font-weight:400;line-height:1.5}.bf-embedded-direction{position:relative;z-index:10;display:flex;width:100%;align-items:center;justify-content:center;margin:-12px 0}.bf-embedded-direction>span{display:inline-flex;width:36px;height:36px;align-items:center;justify-content:center;border-radius:9999px;background:var(--bf-embedded-primary);color:var(--bf-embedded-on-primary)}.bf-embedded-summary{display:flex;width:100%;flex-direction:column;gap:12px}.bf-embedded-details{display:flex;width:100%;flex-direction:column;gap:16px;padding:0 16px 16px;box-sizing:border-box}.bf-embedded-details .bf-info-section{gap:12px}.bf-embedded-details .bf-info-section+.bf-info-section{padding-top:0}.bf-embedded-details .bf-info-section h4{color:#fffc;font-size:14px;font-weight:700}.gou-shell[data-theme=light] .bf-embedded-details .bf-info-section h4{color:#000c}.bf-embedded-details .bf-info-rows{gap:12px}.bf-embedded-details .bf-info-row{min-height:20px;font-size:13px;font-weight:600}.bf-embedded-details .bf-info-label{gap:6px;color:var(--bf-text-medium);font-size:13px;font-weight:400}.bf-embedded-details .bf-info-value{color:var(--bf-text-medium);font-size:13px;font-weight:600}.bf-embedded-details .bf-info-value[data-tone=accent]{color:var(--bf-embedded-primary)}.bf-embedded-details .bf-info-route-arrow{color:var(--bf-text-medium)}.bf-embedded-liquidity{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;background:var(--bf-surface)}.bf-embedded-liquidity>div{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--bf-text-medium);font-size:14px}.bf-embedded-liquidity>div>span:last-child{text-transform:capitalize}.bf-embedded-liquidity-track{display:block;height:8px;overflow:hidden;border-radius:9999px;background:var(--bf-surface-hover)}.bf-embedded-liquidity-track>span{display:block;height:100%;border-radius:inherit;background:var(--bf-embedded-primary)}.bf-embedded-liquidity-error{padding:12px 16px;border:1px solid rgba(255,60,83,.3);border-radius:8px;background:#ff3c531a;color:#ff3c53;font-size:14px;line-height:1.5;text-align:center}.bf-embedded-action-footer{width:100%;flex-shrink:0}.bf-embedded-cta{display:flex;width:100%;height:52px;flex-shrink:0;align-items:center;justify-content:center;padding:0 16px;border:0;border-radius:12px;background:var(--bf-embedded-primary);color:var(--bf-embedded-on-primary);font:inherit;font-size:16px;font-weight:600;line-height:1.5;cursor:pointer;transition:opacity .15s ease,background-color .15s ease;box-sizing:border-box}.bf-embedded-cta:hover:not(:disabled){background:#f3742ee6}.bf-embedded-cta:disabled{cursor:not-allowed;opacity:.6}.bf-embedded-spinner{width:20px;height:20px;border:2px solid var(--bf-embedded-on-primary);border-top-color:transparent;border-radius:9999px;animation:bf-loading-spin .9s linear infinite}@media(max-width:767px){.bf-root[data-variant=embedded] .bf-header{min-height:50px;padding:12px 16px 8px;border-bottom:0}.bf-root[data-variant=embedded] .bf-header .bf-header-btn:last-child{display:none}.bf-root[data-variant=embedded] .bf-embedded-body{padding:12px 16px calc(env(safe-area-inset-bottom,0px) + 12px);overscroll-behavior:contain;scroll-padding-bottom:calc(env(safe-area-inset-bottom,0px) + 76px);-webkit-overflow-scrolling:touch}.bf-root[data-variant=embedded] .bf-embedded-action-footer{position:sticky;bottom:0;z-index:20;padding-top:12px;background:var(--bf-bg);isolation:isolate}.bf-root[data-variant=embedded] .bf-embedded-action-footer:after{position:absolute;z-index:-1;top:100%;right:0;left:0;height:calc(env(safe-area-inset-bottom,0px) + 32px);background:var(--bf-bg);box-shadow:0 16px 0 16px var(--bf-bg);content:"";pointer-events:none}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-action-footer{position:static;padding-top:0}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-action-footer:after{display:none}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-body{scroll-padding-bottom:24px}.bf-embedded-amount-head{gap:8px}.bf-embedded-amount-label{gap:6px}.bf-embedded-balance{gap:4px}}
|
|
11
|
+
`);import{Fragment as qo,jsx as v,jsxs as D}from"react/jsx-runtime";var sf=ie.createContext(void 0);function Ta(){return ie.useContext(sf)}function ly(e){let[t,r]=ie.useState(void 0);return ie.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 tf=[{value:"0.1",label:"0.1%"},{value:"0.5",label:"0.5%"},{value:"1",label:"1%"},{value:"5",label:"5%"}],dy=[{value:"all",label:"ALL"},{value:"completed",label:"Completed"},{value:"pending",label:"Pending"}];function cy(e,t){return e==="auto"?t?`Auto ${t}%`:"Auto":e?`${e}%`:"1%"}function rf(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 lf(e){return`${e.chainId}:${e.address.toLowerCase()}`}function df(e){let t=Number(e);return Number.isFinite(t)?t.toLocaleString("en-US",{maximumFractionDigits:t>=1?2:6}):e||"0"}function nf(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 py(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 cf(e,t){if(!t)return!1;let r=it(e),n=it(t.balance);return!r||!n?!1:r.isGreaterThan(n)}function Ra(e){if(!e.isFinite()||e.isNaN())return"0";let r=e.decimalPlaces(6,ef.ROUND_DOWN).toFixed(6).replace(/\.?0+$/,""),[n="0",o]=r.split("."),a=new ef(n||"0").toFormat(0);return o?`${a}.${o}`:a}function uy(e){return e.length<=14?e:`${e.slice(0,6)}...${e.slice(-6)}`}function fy(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 my(e){let t=it(e);return t?Ra(t):e||"0"}function gy(e,t){if(t?.priceUsd===void 0)return null;let r=it(e);if(!r)return null;let n=r.multipliedBy(t.priceUsd);return n.isFinite()?`$${n.toFormat(2)}`:null}function is(e){return e.status==="success"?"completed":e.status==="failed"?"failed":"pending"}function hy(e,t){return t==="all"?!0:is(e)===t}function by(e){return e==="completed"?"Completed":e==="failed"?"Failed":"Pending"}function Qo(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function pf(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function uf(e,t){if(!(!e||!t))return e.chainId===t.chainId?"swap":pf(e,t)||e.symbol.toLowerCase()===t.symbol.toLowerCase()?"bridge":"swap-bridge"}function ff(e){return e==="swap"||e==="deposit-swap"||e==="swap-withdraw"}function rs(e){return!e||e==="0"||Number(e)===0}function mf(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 gf(e){let t=e.fromToken,r=e.toToken,n=uf(t,r),o=e.fromAmount||"0",a=e.toAmount||"0",i=n!==void 0&&!ff(n),s=n!==void 0&&n!=="bridge";return{pathType:n,bridgeInfo:i?[{label:"Route",value:t&&r?`${Qo(t.chainId)} \u2192 ${Qo(r.chainId)}`:"-"},{label:"Validator Fee",value:rs(o)?"0":"Free",tone:rs(o)?"default":"accent"},{label:"Network Fee",value:rs(o)?"0":"Free",tone:rs(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 Sa({token:e,size:t=20}){let r=e?.iconUrl;return v("span",{className:"bf-token-icon","data-has-image":!!r?"true":"false",style:{width:t,height:t},children:r?v("img",{src:r,alt:"",width:t,height:t,draggable:!1}):v("span",{className:"bf-token-fallback",children:e?.symbol?.slice(0,1)??"?"})})}function ns(e,t){if(e.length===0)return;let r=e.findIndex(n=>pf(n,t));return e[(r+1)%e.length]}function of({label:e,token:t,amount:r,usd:n,onAmountChange:o,onTokenClick:a,locked:i=!1}){return D("section",{className:"bf-amount-panel",children:[D("div",{className:"bf-amount-head",children:[v("span",{children:e}),D("span",{className:"bf-balance",children:[df(t?.balance??"0")," ",t?.symbol??""]})]}),D("div",{className:"bf-amount-main",children:[D("label",{className:"bf-amount-input-wrap",children:[D("span",{className:"bf-sr-only",children:[e," amount"]}),v("input",{type:"text",inputMode:"decimal",value:r,onChange:s=>o(s.target.value),placeholder:"0",className:"bf-amount-input","data-size":hf(r)}),v("span",{className:"bf-amount-usd",children:n})]}),D("button",{type:"button",className:"bf-token-pill",onClick:i?void 0:a,disabled:!i&&!a,"data-locked":i?"true":void 0,"data-track":i?void 0:"token_switch","data-track-id":e.toLowerCase(),"aria-label":`Switch ${e.toLowerCase()} token`,children:[D("span",{className:"bf-token-pill-face",children:[v(Sa,{token:t}),v("span",{children:t?.symbol??"Select"})]},t?lf(t):"none"),!i&&v(Or,{size:16})]})]})]})}function wy(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 hf(e){let t=e.replace(/,/g,"").trim().length;return t>26?"small":t>18?"medium":"large"}function yy(){return D("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[v("path",{d:"M2.333 4.667A1.667 1.667 0 0 1 4 3h7.333A1.667 1.667 0 0 1 13 4.667v6.666A1.667 1.667 0 0 1 11.333 13H4a1.667 1.667 0 0 1-1.667-1.667V4.667Z",stroke:"currentColor",strokeWidth:"1.25"}),v("path",{d:"M2.667 5.333h9.666c.737 0 1.334.597 1.334 1.334v2.666c0 .737-.597 1.334-1.334 1.334H9.667A2.667 2.667 0 0 1 7 8a2.667 2.667 0 0 1 2.667-2.667Z",stroke:"currentColor",strokeWidth:"1.25"}),v("circle",{cx:"10",cy:"8",r:".75",fill:"currentColor"})]})}function af({label:e,token:t,amount:r,onAmountChange:n,onTokenClick:o,onMax:a,locked:i}){return D("section",{className:"bf-embedded-amount-panel",children:[D("div",{className:"bf-embedded-amount-head",children:[D("span",{className:"bf-embedded-amount-label",children:[v("strong",{children:e}),!(e==="From")&&v("em",{children:"estimated"})]}),t&&D("span",{className:"bf-embedded-balance",children:[v(yy,{}),v("span",{className:"bf-embedded-balance-value",children:df(t.balance)}),v("span",{children:t.symbol}),a&&v("button",{type:"button",onClick:a,"aria-label":"Use maximum available balance",children:"MAX"})]})]}),D("div",{className:"bf-embedded-amount-main",children:[D("button",{type:"button",className:"bf-embedded-token-pill",onClick:i?void 0:o,disabled:i,"data-locked":i?"true":void 0,"aria-label":`Switch ${e.toLowerCase()} token`,children:[D("span",{className:"bf-token-pill-face",children:[v(Sa,{token:t}),v("span",{children:t?.symbol??"Select"})]},t?lf(t):"none"),!i&&v(Or,{size:14})]}),D("label",{className:"bf-embedded-input-wrap",children:[D("span",{className:"bf-sr-only",children:[e," amount"]}),v("input",{type:"text",inputMode:"decimal",value:wy(r),onChange:l=>n(l.target.value),placeholder:"0.00",className:"bf-embedded-amount-input","data-size":hf(r)})]})]})]})}function xy({flow:e,onClose:t}){let r=ie.useId(),[n,o]=ie.useState(null),a=tf.find(b=>b.value===e.slippage),[i,s]=ie.useState(e.slippage&&!a?e.slippage:""),l=i.trim()!==""&&i.trim()!==".",d=l?Number(i):NaN,c=Number.isFinite(d)&&d>50,h=Number.isFinite(d)&&d>5&&!c,u=b=>{e.setSlippage(b),t()},m=()=>{!l||c||(e.setSlippage(rf(i)),t())};if(ie.useEffect(()=>{o(document.body)},[]),ie.useEffect(()=>{let b=f=>{f.key==="Escape"&&t()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[t]),!n)return null;let y=Ta();return Na(v("div",{className:"bf-slippage-overlay","data-theme":y,role:"presentation",onMouseDown:b=>{b.target===b.currentTarget&&t()},children:D("section",{className:"bf-slippage-dialog",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[D("header",{className:"bf-slippage-head",children:[v("h3",{id:r,children:"Slippage Settings"}),v("button",{type:"button",className:"bf-slippage-close",onClick:t,"aria-label":"Close slippage settings",children:v(Ir,{size:24})})]}),D("div",{className:"bf-slippage-body",children:[v("p",{className:"bf-slippage-desc",children:"The maximum price difference you are willing to accept before the transaction is reverted. Higher slippage increases the chance of execution but may result in a worse price."}),D("div",{className:"bf-slippage-controls",children:[v("div",{className:"bf-slippage-presets",children:tf.map(b=>v("button",{type:"button",className:"bf-slippage-preset","data-selected":!l&&e.slippage===b.value?"true":"false",onClick:()=>u(b.value),children:b.label},b.value))}),D("label",{className:"bf-slippage-custom","data-selected":l?"true":"false",children:[v("span",{className:"bf-sr-only",children:"Custom slippage percent"}),v("input",{value:i,onChange:b=>{s(rf(b.target.value))},onKeyDown:b=>{b.key==="Enter"&&(b.preventDefault(),m())},inputMode:"decimal",placeholder:"Enter custom slippage",autoComplete:"off",spellCheck:!1}),v("span",{"aria-hidden":"true",children:"%"})]})]}),c?v("p",{className:"bf-slippage-message","data-variant":"error",children:"Slippage cannot exceed 50%."}):h?v("p",{className:"bf-slippage-message","data-variant":"warning",children:"Your transaction may be frontrun due to high slippage."}):null,l&&v("button",{type:"button",className:"bf-slippage-apply",onClick:m,disabled:c,children:"Apply"})]})]})}),n)}function bf({flow:e,env:t}){let r=ie.useId(),[n,o]=ie.useState(!1),[a,i]=ie.useState(null),s=Ta(),l=rr("apps.json",t,u=>Pr(u?.legal?.termsUrl,t)),d=e.termsUrl??l??Tc;ie.useEffect(()=>{i(document.body)},[]),ie.useEffect(()=>{let u=m=>{m.key==="Escape"&&e.cancelTerms()};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e]);let[c,h]=$i(e.termsOpen);return!a||!c?null:Na(v("div",{className:"bf-action-modal-overlay","data-theme":s,"data-state":h,role:"presentation",onPointerDown:u=>{u.target===u.currentTarget&&e.cancelTerms()},children:D("section",{className:"bf-action-modal bf-terms-modal",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[v("h3",{id:r,children:"Agree to Terms of Service"}),v("p",{className:"bf-action-modal-desc",children:"Please make sure to review the Terms of Service before using ONEUSD."}),D("div",{className:"bf-terms-check-row","data-checked":n?"true":"false",children:[v("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(u=>!u),children:v("span",{className:"bf-terms-checkbox","data-checked":n?"true":"false","aria-hidden":"true"})}),D("div",{className:"bf-terms-copy",children:[v("span",{className:"bf-terms-label",onClick:()=>o(u=>!u),children:"Agree to Terms of Use"}),d&&v("a",{href:d,target:"_blank",rel:"noreferrer",children:"Terms of Service"})]})]}),v("p",{className:"bf-terms-privacy",children:"I have read and acknowledged the Privacy Policy to use ONEUSD"}),v("button",{type:"button",className:"bf-action-primary",disabled:!n||e.status==="submitting",onClick:e.confirmTerms,"data-track":"terms_confirm",children:"Confirm"})]})}),a)}function vy({value:e,disabled:t=!1}){let[r,n]=ie.useState(!1);return v("button",{type:"button",className:"bf-copy-button","aria-label":"Copy token address",disabled:t,onClick:()=>{t||navigator.clipboard?.writeText(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1200)})},children:r?"OK":"Copy"})}function wf({flow:e,approval:t}){let r=ie.useId(),[n,o]=ie.useState(null),a=Ta();ie.useEffect(()=>{o(document.body)},[]),ie.useEffect(()=>{if(!t)return;let c=h=>{e.status!=="submitting"&&h.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[e,t]);let[i,s]=$i(t);if(!n||!i)return null;let l=e.status==="submitting"||!e.approveBridge,d=e.status==="submitting";return Na(v("div",{className:"bf-action-modal-overlay","data-theme":a,"data-state":s,role:"presentation",children:D("section",{className:"bf-action-modal bf-approve-modal",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[D("h3",{id:r,children:["Approve ",i.token.symbol]}),v(Sa,{token:i.token,size:72}),D("div",{className:"bf-approve-address-box",children:[v("span",{children:"Token Address"}),D("div",{children:[v("strong",{children:i.tokenAddress}),v(vy,{value:i.tokenAddress,disabled:d})]})]}),D("div",{className:"bf-action-buttons",children:[v("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:e.status==="submitting",children:"Cancel"}),D("button",{type:"button",className:"bf-action-primary",onClick:e.confirmApproval,disabled:l,"aria-busy":d,"data-track":"approve_confirm",children:[d&&v("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),v("span",{children:d?"Approving...":"Approve"})]})]})]})}),n)}function yf({flow:e}){let t=ie.useId(),[r,n]=ie.useState(null),o=Ta();ie.useEffect(()=>{n(document.body)},[]),ie.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]=$i(e.approvalSuccessOpen);if(!r||!a)return null;let s=e.status==="submitting";return Na(v("div",{className:"bf-action-modal-overlay","data-theme":o,"data-state":i,role:"presentation",children:D("section",{className:"bf-action-modal bf-approval-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:[v("h3",{id:t,children:"Approval Success"}),v("span",{className:"bf-success-mark","aria-hidden":"true"}),D("p",{className:"bf-action-modal-desc",children:["Token approval confirmed successfully.",v("br",{}),"Please continue to the next step."]}),D("div",{className:"bf-action-buttons",children:[v("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:s,children:"Cancel"}),D("button",{type:"button",className:"bf-action-primary",onClick:e.continueAfterApproval,disabled:s,"aria-busy":s,children:[s&&v("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),v("span",{children:s?"Continuing...":"Continue"})]})]})]})}),r)}function ky({fromAmount:e,toAmount:t,fromToken:r,toToken:n}){let o=ie.useMemo(()=>{let i=it(e),s=it(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 v(ka,{open:a,children:D("div",{className:"bf-exchange-rate",children:[D("span",{children:["1 ",r?.symbol]}),v("span",{"aria-hidden":"true",children:"="}),D("span",{children:[o?Ra(o):""," ",n?.symbol]})]})})}function xf({flow:e}){return e.submitToast?D("div",{className:"bf-status-toast","data-variant":"processing",role:"status","aria-live":"polite",children:[v("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:v("span",{className:"bf-status-spinner"})}),D("span",{className:"bf-status-toast-copy",children:[v("strong",{children:"Transaction Processing"}),v("span",{children:"Your transaction is being processed on the blockchain"})]})]}):null}function vf({message:e}){let[t,r]=ie.useState(!1);return ie.useEffect(()=>{if(!e){r(!1);return}r(!0);let n=window.setTimeout(()=>{r(!1)},3500);return()=>window.clearTimeout(n)},[e]),!e||!t?null:D("div",{className:"bf-status-toast","data-variant":"error",role:"alert","aria-live":"assertive",children:[v("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:v("span",{className:"bf-status-error-mark",children:"!"})}),D("span",{className:"bf-status-toast-copy",children:[v("strong",{children:"Error"}),v("span",{children:e})]})]})}function Ry(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 kf({flow:e}){let t=ie.useId(),[r,n]=ie.useState(null),o=e.submitted,a=Ta();return ie.useEffect(()=>{n(document.body)},[]),ie.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:Na(v("div",{className:"bf-success-overlay","data-theme":a,role:"presentation",children:v("section",{className:"bf-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:D("div",{className:"bf-success-body",children:[v("span",{className:"bf-success-mark","aria-hidden":"true"}),D("div",{className:"bf-success-copy",children:[v("strong",{id:t,children:Ry(o.pathType)}),v("span",{children:"Please check the results in the history."})]}),v("div",{className:"bf-success-route","aria-hidden":"true",children:(o.routeTokens&&o.routeTokens.length>0?o.routeTokens:[{symbol:o.fromToken.symbol,iconUrl:o.fromToken.iconUrl},{symbol:o.toToken.symbol,iconUrl:o.toToken.iconUrl}]).map((i,s)=>D(ie.Fragment,{children:[s>0&&v("span",{className:"bf-success-route-arrow",children:"\u2192"}),v(Ca,{token:i,size:43})]},`${i.symbol}-${s}`))}),v("button",{type:"button",className:"bf-success-ok",onClick:e.dismissSuccessDialog,"data-track":"success_ok",children:"OK"})]})})}),r)}function Ca({token:e,size:t=16}){let r=!!e.iconUrl;return v("span",{className:"bf-token-icon","data-has-image":r?"true":"false",style:{width:t,height:t},children:e.iconUrl?v("img",{src:e.iconUrl,alt:"",width:t,height:t,draggable:!1}):v("span",{className:"bf-token-fallback",children:e.symbol?.slice(0,1)??"?"})})}function Sy({row:e}){return e.routeTokens&&e.routeTokens.length>0?v("span",{className:"bf-info-route",children:e.routeTokens.map((t,r)=>D(ie.Fragment,{children:[r>0&&v("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),v(Ca,{token:t})]},`${t.symbol}-${r}`))}):e.valueToken?D("span",{className:"bf-info-value-token",children:[v(Ca,{token:e.valueToken}),v("span",{children:e.value})]}):v(qo,{children:e.value})}function Rf({rows:e}){return!e||e.length===0?null:v("div",{className:"bf-info-rows",children:e.map(t=>D("div",{className:"bf-info-row",children:[v("span",{className:"bf-info-label",children:t.label}),v("span",{className:"bf-info-value","data-tone":t.tone??"default",children:v(Sy,{row:t})})]},`${t.label}-${t.value}`))})}function Cy(e,t,r){return e.pathType==="bridge"?"Bridge Info":ff(e.pathType)?"Swap Info":t&&r?"Swap & Bridge Info":t?"Bridge Info":"Swap Info"}function ka({open:e,className:t,children:r}){let n=ie.useRef(null);return e&&(n.current=r),v("div",{className:t?`bf-collapse ${t}`:"bf-collapse","data-open":e?"true":"false","aria-hidden":e?void 0:!0,children:v("div",{className:"bf-collapse-inner",children:e?r:n.current})})}function Ny({summary:e,from:t,to:r,feeDelegated:n}){let o=!!e.bridgeInfo?.length,a=!!e.swapInfo?.length,i=!!e.txFee?.length,s=Cy(e,o,a),[l,d]=ie.useState(!0),[c,h]=ie.useState(!0);return D("div",{className:"bf-details",children:[e.liquidity&&D("section",{className:"bf-liquidity",children:[D("div",{className:"bf-liquidity-head",children:[v("span",{children:e.liquidity.label??"Available Liquidity"}),v("span",{className:"bf-liquidity-status","data-status":e.liquidity.status,children:e.liquidity.status??"Normal"})]}),v("div",{className:"bf-liquidity-track",children:v("span",{style:{width:`${e.liquidity.percentage??50}%`}})})]}),(o||a)&&D("section",{className:"bf-detail-section bf-info-card","data-open":l?"true":"false",children:[D("button",{type:"button",className:"bf-collapse-head","aria-expanded":l,onClick:()=>d(u=>!u),"data-track":"details_toggle",children:[v("h3",{children:s}),v(Or,{size:16,className:"bf-collapse-chevron"})]}),l&&v("div",{className:"bf-collapse-body",children:v(Nf,{summary:e,from:t,to:r,feeDelegated:n})})]}),i&&D("section",{className:"bf-detail-section bf-tx-fee-section","data-open":c?"true":"false",children:[D("button",{type:"button",className:"bf-collapse-head bf-tx-fee-head","aria-expanded":c,onClick:()=>h(u=>!u),"data-track":"details_toggle",children:[v("h3",{children:"Est. Tx Fee"}),D("div",{className:"bf-tx-fee-total",children:[e.txFeeInfo?.isDelegateFee&&v("span",{className:"bf-fee-delegated",children:"Fee Delegated"}),e.txFeeInfo?.tokenIconUrl&&v("img",{className:"bf-tx-fee-token",src:e.txFeeInfo.tokenIconUrl,alt:e.txFeeInfo.tokenSymbol??"",width:16,height:16,draggable:!1}),v("span",{"data-delegated":e.txFeeInfo?.isDelegateFee&&Number(e.txFeeInfo?.estTxFee)>0?"true":void 0,children:py(e.txFeeInfo?.estTxFee??"0")}),v(Or,{size:16,className:"bf-collapse-chevron"})]})]}),c&&v("div",{className:"bf-collapse-body",children:v(Rf,{rows:e.txFee})})]})]})}function Ty(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 os(e){let t=it(e);if(!(!t||t.lte(0)))return Ra(t)}function Iy(e,t,r,n){if(!r||!n)return;let o=it(e),a=it(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} = ${Ra(i)} ${n.symbol}`;let s=o.dividedBy(a);return`1 ${n.symbol} = ${Ra(s)} ${r.symbol}`}var Ey=1,My=5;function Sf(e){return it(e)?.toNumber()??null}function Cf(e){let t=Sf(e);if(t!==null){if(t>=My)return"danger";if(t>=Ey)return"warning"}}var Ay=/\bin\b.*amount|amount.*\bin\b|^from\b/i,Ly=/\bout\b.*amount|amount.*\bout\b|^to\b|receive/i,Dy=/fee/i,Py=/impact|rate|slippage|minimum|min\.|received/i,as=/impact/i,Oy=/^route$/i;function By(e,t,r){let n=e.find(c=>Ay.test(c.label)),o=e.find(c=>Ly.test(c.label)),a=new Set;n&&a.add(n),o&&a.add(o);let i=e.find(c=>Oy.test(c.label)||(c.routeTokens?.length??0)>0),s=i?.routeTokens?.length?i.routeTokens:void 0,l=i&&!s?i.value:void 0;i&&a.add(i);let d=[];for(let c of e){if(a.has(c))continue;let h=Dy.test(c.label);if(!h&&!Py.test(c.label))continue;a.add(c);let u=Sf(c.value),m=h&&(u===0||/^\s*free\s*$/i.test(String(c.value??"")));m&&t==="swap"||d.push({text:m?`${c.label} Free`:`${c.label} ${c.value}`,tone:m?"accent":as.test(c.label)?c.tone==="danger"||c.tone==="warning"?c.tone:Cf(c.value):void 0})}return{key:t,label:r,routeText:l,routeTokens:s,inRow:n,outRow:o,meta:d,rest:e.filter(c=>!a.has(c))}}function zy({steps:e}){return v("div",{className:"bf-route-steps",children:e.map((t,r)=>D("div",{className:"bf-route-step","data-last":r===e.length-1?"true":"false","data-kind":t.key.startsWith("hop-")?"hop":"endpoint",children:[D("span",{className:"bf-route-rail","aria-hidden":"true",children:[v("span",{className:"bf-route-line"}),v("span",{className:"bf-route-dot","data-final":r===e.length-1?"true":"false"})]}),D("span",{className:"bf-route-body",children:[D("span",{className:"bf-route-head",children:[v("span",{className:"bf-route-title",children:t.title}),v("span",{className:"bf-route-amount",children:t.routeTokens?.length?t.routeTokens.map((n,o)=>D(ie.Fragment,{children:[o>0&&v("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),v(Ca,{token:n})]},`${n.symbol}-${o}`)):D(qo,{children:[t.amountToken&&v(Ca,{token:t.amountToken}),v("span",{className:"bf-route-amount-value",children:t.amount},t.amount)]})})]}),(t.meta.length>0||t.tags.length>0)&&D("span",{className:"bf-route-meta",children:[t.meta.map(n=>v("span",{"data-tone":n.tone??"default",children:n.text},n.text)),t.tags.map(n=>v("span",{className:"bf-route-tag",children:n},n))]})]})]},t.key))})}function Fy(e){if(!as.test(e.label)||e.tone==="danger"||e.tone==="warning")return e;let t=Cf(e.value);return t?{...e,tone:t}:e}function Nf({summary:e,rateLine:t,from:r,to:n,feeDelegated:o,includeTxFee:a=!1}){let i=!!e.txFeeInfo?.isDelegateFee||!!o,s=ie.useMemo(()=>(e.pathType==="bridge-swap"?[["bridge","Bridge"],["swap","Swap"]]:[["swap","Swap"],["bridge","Bridge"]]).map(([k,R])=>{let I=k==="swap"?e.swapInfo:e.bridgeInfo;return I?.length?By(I,k,R):null}).filter(k=>k!==null),[e]);if(s.length===0)return null;let l=s[0],d=s[s.length-1],c=l.inRow?.valueToken??(r?.symbol?{symbol:r.symbol,iconUrl:r.iconUrl}:void 0),h=l.inRow?.value??r?.amount,u=d.outRow?.valueToken??(n?.symbol?{symbol:n.symbol,iconUrl:n.iconUrl}:void 0),m=d.outRow?.value??n?.amount;if(!h)return null;let y=e.txFeeInfo,b=a&&y&&!y.isDelegateFee?[{text:`Gas ${y.estTxFee}${y.tokenSymbol?` ${y.tokenSymbol}`:""}`}]:[],f=s.length>1,p=[{key:"send",title:`Send ${c?.symbol??""}`.trim(),amount:h,amountToken:c,routeTokens:f?void 0:l.routeTokens,meta:[...b.length?[{text:"EST."}]:r?.chain?[{text:`on ${r.chain}`}]:[],...b,...f?[]:[...l.routeText?[{text:l.routeText}]:[],...l.meta.filter(x=>!as.test(x.text))]],tags:i&&!f?["Fee delegated"]:[]},...f?s.map(x=>({key:`hop-${x.key}`,title:x.label,amount:x.routeText??"",routeTokens:x.routeTokens,meta:x.meta,tags:i&&x.key==="swap"?["Fee delegated"]:[]})):[],{key:"receive",title:`Receive ${u?.symbol??""}`.trim(),amount:m??"\u2014",amountToken:u,meta:[...n?.chain?[{text:`on ${n.chain}`}]:[],...f?[]:l.meta.filter(x=>as.test(x.text))],tags:[]}],w=[...s.flatMap(x=>x.rest),...a?e.txFee??[]:[]].map(Fy),g=!!t;return D(qo,{children:[v(zy,{steps:p}),(w.length>0||g)&&v("div",{className:"bf-info-section",children:v(Rf,{rows:[...g?[{label:"Rate",value:t}]:[],...w]})})]})}function Uy({summary:e,rateLine:t,from:r,to:n,feeDelegated:o}){let a=ie.useMemo(()=>Ty(e),[e]);return!a.bridgeInfo?.length&&!a.swapInfo?.length?null:v("div",{className:"bf-embedded-details",children:v(Nf,{summary:a,rateLine:t,from:r,to:n,feeDelegated:o,includeTxFee:!0})})}function jy({flow:e,env:t,toastError:r}){return D(qo,{children:[v(bf,{flow:e,env:t}),v(wf,{flow:e,approval:e.approvalInfo??null}),v(yf,{flow:e}),v(xf,{flow:e}),v(vf,{message:e.submitToast?"":r}),v(kf,{flow:e})]})}function Wy({flow:e,env:t,isConnected:r,onRequestConnect:n,feeDelegated:o}){let a=Number(e.fromAmount)>0,i=ie.useMemo(()=>a?e.summary??gf(e):null,[a,e]),s=mf(e.quoteError),l=cf(e.fromAmount,e.fromToken),d=l?"Insufficient balance":s.from,c=/insufficient liquidity|not enough liquidity/i.test(e.quoteError),h=c?void 0:s.to,u=e.quoteError&&!s.from&&!s.to?e.quoteError:"",m=e.error||u,y=e.status==="submitting",b=!a||!e.toAmount||!e.fromToken||!e.toToken||!e.canSubmit||!!e.quoteError||l||y,f=y?"":c&&a?"Insufficient Liquidity":a?"Continue":"Enter Amount";return D(qo,{children:[v("main",{className:"bf-body bf-embedded-body","data-rd-scroll-area":!0,children:D("div",{className:"bf-embedded-form",children:[D("div",{className:"bf-embedded-fields",children:[D("div",{className:"bf-embedded-field-group",children:[v(af,{label:"From",token:e.fromToken,amount:e.fromAmount,onAmountChange:p=>e.setAmount(p,"from"),onTokenClick:()=>{let p=ns(e.tokens,e.fromToken);p&&e.selectFromToken(p)},onMax:e.setMax,locked:e.tokens.length<=1}),d&&v("div",{className:"bf-embedded-field-error",children:d})]}),v("div",{className:"bf-embedded-direction","aria-hidden":"true",children:v("span",{children:v(Gl,{size:16})})}),D("div",{className:"bf-embedded-field-group",children:[v(af,{label:"To",token:e.toToken,amount:e.toAmount,onAmountChange:p=>e.setAmount(p,"to"),onTokenClick:()=>{let p=ns(e.availableToTokens,e.toToken);p&&e.selectToToken(p)},locked:e.availableToTokens.length<=1}),h&&v("div",{className:"bf-embedded-field-error",children:h})]})]}),v(ka,{open:!!i?.liquidity,children:i?.liquidity&&D("section",{className:"bf-embedded-liquidity",children:[D("div",{children:[v("span",{children:i.liquidity.label??"Available Liquidity"}),v("span",{"data-status":i.liquidity.status,children:i.liquidity.status??"normal"})]}),v("span",{className:"bf-embedded-liquidity-track",children:v("span",{style:{width:`${i.liquidity.percentage??50}%`}})})]})}),v(ka,{open:c&&a,children:v("div",{className:"bf-embedded-liquidity-error",role:"alert",children:"Insufficient liquidity in all pools for this pair and amount."})}),v(ka,{open:!!i,children:i&&v("div",{className:"bf-embedded-summary",children:v(Uy,{summary:i,feeDelegated:o,rateLine:Iy(e.fromAmount,e.toAmount,e.fromToken,e.toToken),from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:os(e.fromAmount),chain:e.fromToken?Qo(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:os(e.toAmount),chain:e.toToken?Qo(e.toToken.chainId):void 0}})})}),v("div",{className:"bf-embedded-action-footer",children:r?v("button",{type:"button",className:"bf-embedded-cta",onClick:e.submit,"data-track":"next",disabled:b,"aria-busy":y,"aria-label":y?"Processing transaction":c?"Insufficient liquidity":"Continue with swap or bridge",children:y?v("span",{className:"bf-embedded-spinner","aria-hidden":"true"}):f}):v("button",{type:"button",className:"bf-embedded-cta",onClick:n,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})})]})}),v(jy,{flow:e,env:t,toastError:m})]})}function _y({item:e}){let t=is(e),r=gy(e.fromAmount,e.fromToken);return D("article",{className:"bf-history-item",children:[D("div",{className:"bf-history-item-head",children:[v("span",{className:"bf-history-status","data-status":t,children:by(t)}),v("time",{className:"bf-history-time",dateTime:e.timestamp,children:fy(e.timestamp)})]}),D("div",{className:"bf-history-item-body",children:[D("strong",{className:"bf-history-amount",children:[my(e.fromAmount)," ",e.fromToken.symbol]}),D("div",{className:"bf-history-meta",children:[v("span",{className:"bf-history-usd",children:r??uy(e.txHash)}),D("span",{className:"bf-history-route",children:[D("span",{className:"bf-history-route-token",children:[v(Sa,{token:e.fromToken,size:16}),v("span",{children:e.fromToken.symbol})]}),v(Hu,{size:16,className:"bf-history-route-arrow"}),D("span",{className:"bf-history-route-token",children:[v(Sa,{token:e.toToken,size:16}),v("span",{children:e.toToken.symbol})]})]})]})]})]})}function Gy({flow:e}){let[t,r]=ie.useState("all"),n=e.history.some(i=>is(i)==="pending"),o=e.history.filter(i=>hy(i,t)),a=t==="all"?"No bridge history yet.":`No ${t} bridge history.`;return D("main",{className:"bf-history-body",children:[v("nav",{className:"bf-history-tabs","aria-label":"Bridge history filters",children:dy.map(i=>D("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:[v("span",{children:i.label}),i.value==="pending"&&n&&v("span",{className:"bf-history-tab-dot","aria-hidden":"true"})]},i.value))}),o.length>0?v("div",{className:"bf-history-list",children:o.map(i=>v(_y,{item:i},i.id||i.txHash))}):v("div",{className:"bf-empty",children:a})]})}function Hy({flow:e,env:t,feeDelegated:r}){let[n,o]=ie.useState(!1),[a,i]=ie.useState(0),s=!!(e.fromAmount.trim()||e.toAmount.trim()),l=ie.useMemo(()=>s?e.summary??gf(e):null,[s,e]),d=rr("apps.json",t,w=>Pr(w?.bridgePoweredBy?.url,t)),c=mf(e.quoteError),h=cf(e.fromAmount,e.fromToken),u=h?"Insufficient balance":c.from,m=e.quoteError&&!c.from&&!c.to?e.quoteError:"",y=e.error||m,b=e.history.some(w=>is(w)==="pending"),p=(l?.pathType??uf(e.fromToken,e.toToken))!=="bridge";return D(qo,{children:[D("main",{className:"bf-body",children:[D("div",{className:"bf-toolbar",children:[D("button",{type:"button",className:"bf-chip bf-chip-history",onClick:()=>e.setStep("history"),"data-track":"history_open",children:[v(_u,{}),v("span",{children:"History"}),(b||e.hasNewHistory)&&v("span",{className:"bf-chip-dot","aria-hidden":"true"})]}),p&&D("button",{type:"button",className:"bf-chip",onClick:()=>o(!0),"data-track":"slippage_open",disabled:e.slippageLocked,"aria-haspopup":"dialog","aria-expanded":n,children:[v(Gu,{}),v("span",{children:e.slippageLocked?"Auto 1%":cy(e.slippage,e.effectiveSlippage)})]})]}),D("div",{className:"bf-swap-card","data-has-from-error":u?"true":"false",children:[v(of,{label:"From",token:e.fromToken,amount:e.fromAmount,usd:nf(e.fromAmount,e.fromToken),onAmountChange:w=>e.setAmount(w,"from"),onTokenClick:()=>{let w=ns(e.tokens,e.fromToken);w&&e.selectFromToken(w)},locked:e.tokens.length<=1}),u&&v("div",{className:"bf-field-error",children:u}),v("button",{type:"button",className:"bf-swap-toggle",onClick:()=>{e.swapTokens(),i(w=>w+360)},"data-track":"token_swap",style:{transform:`translateX(-50%) rotate(${a}deg)`,transition:"transform 0.2s ease"},children:v(Gl,{size:22})}),v(of,{label:"To",token:e.toToken,amount:e.toAmount,usd:nf(e.toAmount,e.toToken),onAmountChange:w=>e.setAmount(w,"to"),onTokenClick:()=>{let w=ns(e.availableToTokens,e.toToken);w&&e.selectToToken(w)},locked:e.availableToTokens.length<=1}),c.to&&v("div",{className:"bf-field-error",children:c.to})]}),v(ky,{fromAmount:e.fromAmount,toAmount:e.toAmount,fromToken:e.fromToken,toToken:e.toToken}),v(ka,{open:!!l,children:l&&v(Ny,{summary:l,feeDelegated:r,from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:os(e.fromAmount),chain:e.fromToken?Qo(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:os(e.toAmount),chain:e.toToken?Qo(e.toToken.chainId):void 0}})})]}),D("footer",{className:"bf-footer",children:[v("button",{type:"button",className:"bf-next",onClick:e.submit,"data-track":"next",disabled:e.status==="submitting"||!!e.quoteError||h,children:e.status==="submitting"?"Processing...":"Next"}),d&&D("a",{className:"bf-powered",href:d,target:"_blank",rel:"noreferrer",children:["Powered by ",v("span",{className:"bf-powered-brand",children:"CROSS DeFi"})]})]}),n&&v(xy,{flow:e,onClose:()=>o(!1)}),v(bf,{flow:e,env:t}),v(wf,{flow:e,approval:e.approvalInfo??null}),v(yf,{flow:e}),v(xf,{flow:e}),v(vf,{message:e.submitToast?"":y}),v(kf,{flow:e})]})}function Vo({onClose:e,onBackToWallet:t,feeDelegated:r,env:n,variant:o="default",title:a,isConnected:i,onRequestConnect:s,className:l,...d}){let c=ie.useMemo(()=>ot(n),[n]),h=Wu(),u=$u({...d,onExit:t}),m=ie.useRef(null),y=ly(m),b=u.step==="history"?"History":a??"Swap & Bridge",f=i??!!d.walletAddress,p=o==="embedded"&&u.step==="form"&&!t?null:u.back;return v(xe,{feature:"bridge",children:v(sf.Provider,{value:y,children:D("div",{ref:m,className:Re("bf-root",l),"data-view":u.step,"data-status":u.status,"data-variant":o,"data-soft-keyboard-open":o==="embedded"&&h?"true":"false",children:[D("header",{className:"bf-header",children:[p?v("button",{type:"button",className:"bf-header-btn",onClick:p,"aria-label":"Back",children:v(tn,{size:24})}):v("span",{className:"bf-header-spacer","aria-hidden":"true"}),v("span",{className:"bf-header-title","data-clickable":p?"true":"false",onClick:p??void 0,children:b}),v("button",{type:"button",className:"bf-header-btn",onClick:e,"aria-label":"Close",children:v(Ir,{size:24})})]}),u.step==="history"?v(Gy,{flow:u}):o==="embedded"?v(Wy,{flow:u,env:c,isConnected:f,onRequestConnect:s,feeDelegated:r}):v(Hy,{flow:u,env:c,feeDelegated:r})]})})})}import*as ar from"react";import sx from"bignumber.js";import{useInfiniteQuery as Qy}from"@tanstack/react-query";var Vy="token-history";function Tf(e,t,r,n,o=!0){return Qy({queryKey:[Vy,e,t,r.toLowerCase(),n.toLowerCase()],initialPageParam:void 0,queryFn:async({pageParam:a,signal:i})=>{let s=await Ae("walletServer",e),l=new URLSearchParams({chain_id:String(t),token:r,wallet:n}),d=a;d&&(l.set("last_timestamp",String(d.last_timestamp)),l.set("last_log_index",String(d.last_log_index)),l.set("last_tx_index",String(d.last_tx_index)));let c=await fetch(`${s}/v1/public/token/historical?${l}`,{cache:"no-store",signal:i});if(!c.ok)throw new Error(`Failed to fetch token history: ${c.status}`);let h=await c.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&&!!n&&!!r&&t>0,staleTime:1e4})}import*as ss from"react";var Vl={chart:!1,balance:!0,overview:!1,social:!1,history:!0},qy=Object.keys(Vl),Yy="apps.json";function If(e){let[t,r]=ss.useState({visibility:Vl,isLoaded:!1});return ss.useEffect(()=>{let n=!0;return so(Yy,e).then(o=>{if(!n)return;let a=o?.tokenDetail?.sections,i={...Vl};if(a)for(let s of qy){let l=a[s];typeof l=="boolean"&&(i[s]=l)}r({visibility:i,isLoaded:!0})}),()=>{n=!1}},[e]),t}import*as mr from"react";import{useQuery as Ky,keepPreviousData as Zy}from"@tanstack/react-query";var Xy="token-price-history";function Ef(e,t,r,n,o=!0){return Ky({queryKey:[Xy,e,t,r.toLowerCase(),n],queryFn:async({signal:a})=>{let i=await Ae("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:Zy})}import{Fragment as ix,jsx as Xt,jsxs as Yo}from"react/jsx-runtime";var Jy="var(--ds-system-green-high, #00a869)",$y="var(--wi-error, #e70077)",vo=150,ls=3,ql=18,ex=18,tx=[{key:"10m",label:"10m"},{key:"1h",label:"1H"},{key:"1d",label:"1D"},{key:"7d",label:"1W"},{key:"30d",label:"1M"},{key:"1y",label:"1Y"}],rx=new Set(["7d","30d","1y"]);function nx(){let e=mr.useRef(null),[t,r]=mr.useState(0);return mr.useEffect(()=>{let n=e.current;if(!n)return;let o=new ResizeObserver(a=>{r(a[0]?.contentRect.width??0)});return o.observe(n),r(n.clientWidth),()=>o.disconnect()},[]),[e,t]}function ox(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 ax(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-ls*2),c=vo-ql-ex,h=w=>n===1?t/2:ls+w/(n-1)*d,u=w=>ql+(1-(w-a)/l)*c,m=r.map((w,g)=>({x:h(g),y:u(w)})),y=m.map((w,g)=>`${g===0?"M":"L"}${w.x.toFixed(2)},${w.y.toFixed(2)}`).join(" "),b=m[0],f=m[m.length-1],p=`${y} L${f.x.toFixed(2)},${vo} L${b.x.toFixed(2)},${vo} Z`;return{values:r,points:m,linePath:y,areaPath:p,maxIdx:i,minIdx:s}}function Mf({env:e,chainId:t,tokenAddress:r}){let[n,o]=mr.useState("1d"),[a,i]=mr.useState(null),s=mr.useId(),[l,d]=nx(),{data:c,isLoading:h,isError:u}=Ef(e,t,r,n,!0),m=mr.useMemo(()=>(c??[]).filter(U=>Number.isFinite(Number(U.price))).slice().sort((U,re)=>U.updated_at-re.updated_at),[c]),y=mr.useMemo(()=>m.map(A=>Number(A.price)),[m]),b=mr.useMemo(()=>ax(y,d),[y,d]);mr.useEffect(()=>{i(null)},[n]);let f=m.length>0,p=a!==null&&a<y.length?a:y.length-1,w=f?y[p]:0,g=f?y[0]:0,x=g!==0?(w-g)/g*100:0,k=x>=0,R=k?Jy:$y,I=(k?"+":"-")+(Math.floor(Math.abs(x)*100)/100).toFixed(2)+"%",S=a!==null&&m[a]?ox(m[a].updated_at,rx.has(n)):"",C=A=>{if(!b||d<=0)return;let U=A.currentTarget.getBoundingClientRect(),re=A.clientX-U.left;if(b.values.length<=1){i(0);return}let _=Math.max(1,d-ls*2),G=Math.min(1,Math.max(0,(re-ls)/_)),ne=Math.round(G*(m.length-1));i(Math.min(m.length-1,Math.max(0,ne)))},E=()=>i(null);if(!h&&(u||!f))return null;let M=a!==null&&b&&b.points[a]?b.points[a]:null,F=b?.points[b.maxIdx],L=b?.points[b.minIdx],z=A=>Math.min(Math.max(A,24),Math.max(24,d-24));return Yo("section",{className:"wi-td-chart",children:[Yo("div",{className:"wi-td-chart-panel",children:[Xt("span",{className:"wi-td-chart-price",children:f?mo(w):"\u2014"}),f&&Yo("span",{className:"wi-td-chart-change","data-positive":k,children:[Xt("span",{children:I}),S&&Xt("span",{className:"wi-td-chart-when",children:S})]})]}),Xt("div",{ref:l,className:"wi-td-chart-plot",children:h&&!f?Xt("div",{className:"wi-skeleton-block wi-td-chart-skeleton"}):b&&d>0&&Yo("svg",{className:"wi-td-chart-svg",width:d,height:vo,role:"img","aria-label":"Price chart",children:[Xt("defs",{children:Yo("linearGradient",{id:s,x1:"0",y1:"0",x2:"0",y2:"1",children:[Xt("stop",{offset:"0%",stopColor:R,stopOpacity:.28}),Xt("stop",{offset:"100%",stopColor:R,stopOpacity:0})]})}),Xt("path",{d:b.areaPath,fill:`url(#${s})`}),Xt("path",{d:b.linePath,fill:"none",stroke:R,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),F&&Xt("text",{className:"wi-td-chart-minmax",x:z(F.x),y:Math.max(11,F.y-7),textAnchor:"middle",children:mo(b.values[b.maxIdx])}),L&&b.minIdx!==b.maxIdx&&Xt("text",{className:"wi-td-chart-minmax",x:z(L.x),y:Math.min(vo-5,L.y+14),textAnchor:"middle",children:mo(b.values[b.minIdx])}),M&&Yo(ix,{children:[Xt("line",{className:"wi-td-chart-cursor",x1:M.x,y1:ql-6,x2:M.x,y2:vo}),Xt("circle",{cx:M.x,cy:M.y,r:4,fill:R,stroke:"var(--wi-surface-bg, #121212)",strokeWidth:2})]}),Xt("rect",{x:0,y:0,width:d,height:vo,fill:"transparent",style:{touchAction:"none"},onPointerMove:C,onPointerDown:C,onPointerLeave:E,onPointerCancel:E})]})}),Xt("div",{className:"wi-td-chart-tabs",role:"tablist",children:tx.map(A=>Xt("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))})]})}import{Fragment as Df,jsx as K,jsxs as st}from"react/jsx-runtime";var lx="https://contents.crosstoken.io/wallet/token/images/FT.png",dx={receive:"Receive",send:"Send","bridge-in":"Bridge In","bridge-out":"Bridge Out"};function cx(e){return e.length>24?"xs":e.length>18?"sm":"md"}function px(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 Af(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 Lf(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 ux(e,t,r){let n=ar.useRef(null),o=ar.useRef(null),[a,i]=ar.useState(t);return ar.useLayoutEffect(()=>{let s=n.current,l=o.current;if(!s||!l)return;let d=()=>{let h=s.clientWidth;if(!h)return;let u=window.getComputedStyle(l),m=document.createElement("span");m.textContent=l.textContent,m.style.cssText=["position:absolute","left:-9999px","top:-9999px","visibility:hidden","white-space:nowrap",`font-family:${u.fontFamily}`,`font-weight:${u.fontWeight}`,`letter-spacing:${u.letterSpacing}`,`font-size:${t}px`].join(";"),document.body.appendChild(m);let y=m.offsetWidth;if(document.body.removeChild(m),y<=h){i(t);return}let b=Math.max(r,Math.floor(t*h/y));i(b)};d();let c=new ResizeObserver(d);return c.observe(s),()=>c.disconnect()},[e,t,r]),{containerRef:n,textRef:o,fontSize:a}}function fx(e){let t=it(e);return t?t.decimalPlaces(4,sx.ROUND_DOWN).toFormat():"-"}function mx(){return st("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[K("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.6"}),K("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 gx(){return K("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:K("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 hx(){return K("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:K("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 bx(){return K("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:K("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 Pf({env:e,isMobile:t,token:r,walletAddress:n,stat:o,tokenInfo:a,showBalance:i=!0,onBack:s,onClose:l,onSend:d,onOutlink:c}){let h=r.quantity.decimals,[u,m]=ar.useState(!1),{buildTxUrl:y,chainInfo:b}=Ac(e,r.chainId,!0),{visibility:f}=If(e),{data:p,isLoading:w,isError:g,fetchNextPage:x,hasNextPage:k,isFetchingNextPage:R,refetch:I}=Tf(e,r.chainId,r.address,n,!0),S=ar.useMemo(()=>p?.pages?p.pages.flat():[],[p]),C=ar.useRef(null);ar.useEffect(()=>{if(!t)return;let O=C.current;if(!O||!k)return;let Z=new IntersectionObserver(H=>{H[0]?.isIntersecting&&!R&&x()},{rootMargin:"120px"});return Z.observe(O),()=>Z.disconnect()},[t,k,R,x]);let E=ar.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(r.address).then(()=>{m(!0),setTimeout(()=>m(!1),1500)}).catch(()=>{})},[r.address]),M=Af(Lf(r.quantity.numeric,h)),F=o?.price?bi(r.quantity.numeric,h,o.price):null,L=i?M:"\u2022\u2022\u2022\u2022",{containerRef:z,textRef:A,fontSize:U}=ux(L,30,14),Y=sa(r.chainId,e).name??b?.name??`Chain ${r.chainId}`,_=b?.explorer_url,G=a?.deployed??!0,ne=ar.useMemo(()=>{let O=[];return a?.info_url&&O.push({key:"web",label:"Website",url:a.info_url,icon:K(mx,{})}),a?.telegram_url&&O.push({key:"tg",label:"Telegram",url:a.telegram_url,icon:K(gx,{})}),a?.x_url&&O.push({key:"x",label:"X",url:a.x_url,icon:K(hx,{})}),a?.medium_url&&O.push({key:"medium",label:"Medium",url:a.medium_url,icon:K(bx,{})}),O},[a]),te=(O,Z,H,ce)=>{zt(O,Z,{category:"token-detail",origin:H,payload:{address:r.address,txHash:ce}},c)};return st(Df,{children:[st("div",{className:"wi-sticky-header",children:[st("div",{className:"wi-header wi-header--receive",children:[K("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:K(tn,{size:24})}),st("span",{className:"wi-td-header-title",children:[K("img",{src:r.icon_url,alt:"","aria-hidden":!0,className:"wi-td-header-icon",width:24,height:24,draggable:!1,onError:O=>{O.currentTarget.src=lx}}),K("span",{className:"wi-td-header-name",children:r.symbol})]}),K("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close",children:K(Ir,{size:24})})]}),K("hr",{className:"wi-divider"})]}),st("div",{className:"wi-td-scroll",children:[f.chart&&K(Mf,{env:e,chainId:r.chainId,tokenAddress:r.address}),f.balance&&st("section",{className:"wi-td-balance-card",children:[st("div",{className:"wi-td-balance-left",ref:z,children:[K("span",{className:"wi-td-balance-label",children:"My Balance"}),K("span",{className:"wi-td-balance-amount",ref:A,style:{fontSize:U},children:L}),i&&F&&K("span",{className:"wi-td-balance-fiat",children:F})]}),K("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:K("span",{children:"Send"})})]}),f.overview&&st("section",{className:"wi-td-section",children:[K("h3",{className:"wi-td-section-title",children:"Crypto Overview"}),st("div",{className:"wi-td-rows",children:[st("div",{className:"wi-td-row",children:[K("span",{className:"wi-td-row-label",children:"Network"}),_?st("a",{className:"wi-td-row-value wi-td-row-link",href:_,target:"_blank",rel:"noopener noreferrer",onClick:O=>te(O,_,"token-network"),children:[K("span",{children:Y}),K(wx,{})]}):K("span",{className:"wi-td-row-value",children:Y})]}),st("div",{className:"wi-td-row",children:[K("span",{className:"wi-td-row-label",children:"Contract Address"}),st("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:E,"aria-label":"Copy contract address",children:[K("span",{children:nr(r.address)}),u?K(Rn,{size:14}):K(uo,{size:14})]})]}),st("div",{className:"wi-td-row",children:[K("span",{className:"wi-td-row-label",children:"Decimals"}),K("span",{className:"wi-td-row-value",children:h})]}),st("div",{className:"wi-td-row",children:[K("span",{className:"wi-td-row-label",children:"Total Supply"}),K("span",{className:"wi-td-row-value",children:fx(o?.circulating_supply)})]})]})]}),f.social&&ne.length>0&&st("section",{className:"wi-td-section",children:[K("h3",{className:"wi-td-section-title",children:"Social Media"}),K("div",{className:"wi-td-social-row",children:ne.map(O=>K("a",{className:"wi-td-social-btn",href:O.url,target:"_blank",rel:"noopener noreferrer","aria-label":O.label,onClick:Z=>te(Z,O.url,"token-social"),children:O.icon},O.key))})]}),f.history&&st("section",{className:"wi-td-section",children:[K("h3",{className:"wi-td-section-title",children:"Token History"}),w&&K("div",{className:"wi-td-history-list",children:Array.from({length:3},(O,Z)=>st("div",{className:"wi-td-history-skeleton",children:[K("div",{className:"wi-skeleton-block",style:{width:90,height:14}}),K("div",{className:"wi-skeleton-block",style:{width:60,height:14}})]},`td-sk-${Z}`))}),!w&&g&&st("div",{className:"wi-td-history-empty",children:[K("span",{children:"Failed to load history."}),K("button",{type:"button",className:"wi-td-retry-btn",onClick:()=>I(),children:"Retry"})]}),!w&&!g&&S.length===0&&K("div",{className:"wi-td-history-empty",children:K("span",{children:"No transactions found."})}),!w&&!g&&S.length>0&&st("div",{className:"wi-td-history-list",children:[S.map((O,Z)=>{let H=O.to_alias?.toLowerCase().includes("bridge")??!1,ce=O.from_alias?.toLowerCase().includes("bridge")??!1,ve=H?"bridge-out":ce?"bridge-in":O.to?.toLowerCase()===n.toLowerCase()?"receive":"send",ge=ve==="receive"||ve==="bridge-in",ue=ge?O.from:O.to,me=Af(Lf(O.amount,h)),we=y(O.tx),Ze=px(O.timestamp),he=st(Df,{children:[st("div",{className:"wi-td-history-top",children:[K("span",{className:"wi-td-history-type","data-direction":ve,children:dx[ve]}),K("span",{className:"wi-td-history-counter",children:nr(ue??"")})]}),st("div",{className:"wi-td-history-bottom",children:[st("span",{className:"wi-td-history-meta",children:[K("span",{className:"wi-td-history-status","data-status":O.status,children:O.status==="success"?"Success":"Failed"}),Ze&&K("span",{className:"wi-td-history-time",children:Ze})]}),st("span",{className:"wi-td-history-amount","data-size":cx(`${ge?"+":"-"}${me} ${r.symbol}`),children:[ge?"+":"-",me," ",r.symbol]})]})]}),Ee=`${O.tx}-${O.log_index}-${Z}`;return we?K("a",{className:"wi-td-history-item wi-td-history-item--link",href:we,target:"_blank",rel:"noopener noreferrer",onClick:at=>te(at,we,"token-tx",O.tx),children:he},Ee):K("div",{className:"wi-td-history-item",children:he},Ee)}),k&&(t?K("div",{ref:C,className:"wi-td-history-sentinel",children:R&&K("span",{className:"wi-td-history-loading",children:"Loading\u2026"})}):K("button",{type:"button",className:"wi-td-loadmore-btn",onClick:()=>x(),disabled:R,children:R?"Loading\u2026":"Load more"}))]})]})]})]})}function wx(){return K("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",className:Re("wi-td-external-icon"),"aria-hidden":!0,children:K("path",{d:"M14 4h6v6M20 4l-9 9M18 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}import*as sn from"react";var Of={dev:"https://dev.onechain.nexus/pop",stage:"https://stg.onechain.nexus/pop",production:"https://onechain.nexus/pop"};function zf(e,t){let r=Of[e]??Of.production;return t==="send"?r:`${r}/${t}`}var Bf={dev:"https://stg.onechain.nexus/gametoken/bridge",stage:"https://stg.onechain.nexus/gametoken/bridge",production:"https://www.onechain.nexus/gametoken/bridge"};function Ff(e){return Bf[e]??Bf.production}import{jsx as Se,jsxs as wn}from"react/jsx-runtime";function Yl({size:e=20,className:t}){return Se("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Se("path",{d:"M19.5 12.572 12 20l-7.5-7.428A5 5 0 1 1 12 6.006a5 5 0 1 1 7.5 6.566Z",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})})}function Uf({size:e=24,className:t}){return wn("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Se("path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"}),Se("path",{d:"m21.854 2.147-10.94 10.939",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})]})}function jf({size:e=24,className:t}){return Se("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:wn("g",{stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[Se("path",{d:"M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17"}),Se("path",{d:"m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9"}),Se("path",{d:"m2 16 6 6"}),Se("circle",{cx:"16",cy:"9",r:"2.9"}),Se("circle",{cx:"6",cy:"5",r:"3"})]})})}function Wf({size:e=24,className:t}){return Se("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:wn("g",{stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[Se("path",{d:"M15 12h-5M15 8h-5"}),Se("path",{d:"M19 17V5a2 2 0 0 0-2-2H4"}),Se("path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"})]})})}function Ia({size:e=12,className:t}){return Se("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Se("path",{d:"m9 18 6-6-6-6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function _f({size:e=20,className:t}){return wn("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Se("rect",{width:"20",height:"20",rx:"4.8",fill:"currentColor"}),Se("path",{d:"M11.53 9.05 15.7 4.4h-.99l-3.62 4.04L8.2 4.4H4.86l4.37 6.1-4.37 4.87h.99l3.82-4.26 3.05 4.26h3.34zm-1.35 1.51-.44-.61-3.52-4.9h1.52l2.84 3.96.44.61 3.7 5.14h-1.52z",fill:"var(--wi-op-x-glyph, #ffffff)"})]})}function Gf({size:e=20,className:t}){return Se("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:wn("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[Se("circle",{cx:"9",cy:"7",r:"3.4"}),Se("path",{d:"M2.6 20.4a6.4 6.4 0 0 1 10.2-5.15"}),Se("circle",{cx:"17.5",cy:"17.5",r:"2.1"}),Se("path",{d:"M19.6 17.5v1.05a1.55 1.55 0 0 0 3.1 0v-1.05a5.2 5.2 0 1 0-2.05 4.14"})]})})}function Hf({size:e=20,className:t}){return Se("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:wn("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[Se("path",{d:"M12.5 3 5 13.5h5.5L10 21l7.5-10.5H12z"}),Se("path",{d:"M20 4.5 21.5 3M20.5 8h2M17 2.5V1"})]})})}function Qf({size:e=20,className:t}){return Se("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:wn("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[Se("rect",{x:"2.5",y:"5.5",width:"19",height:"13",rx:"2.5"}),Se("path",{d:"M12 9v6"}),Se("path",{d:"m9.5 12.5 2.5 2.5 2.5-2.5"})]})})}function Vf({className:e}){return wn("span",{className:e,children:[wn("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,className:"wi-op-logo-mark",children:[Se("path",{d:"M19.5 12.07 12 19.6l-7.5-7.53A5.06 5.06 0 0 1 12 5.44a5.06 5.06 0 0 1 7.5 6.63Z",fill:"var(--wi-op-brand, #f62e61)"}),Se("path",{d:"M11.05 9.1h1.9v6.2h-1.55V10.5l-1.2.36-.3-1.18z",fill:"#ffffff"})]}),Se("span",{className:"wi-op-logo-one",children:"ONE"}),Se("span",{className:"wi-op-logo-pop",children:"pop"})]})}function qf({className:e}){return wn("svg",{width:"82",height:"72",viewBox:"0 0 82 72",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,className:e,children:[Se("path",{d:"M53.6 8.5c5.6-6 15.2-5.7 20.5.7 5 6.1 4.2 15.1-1.6 20.6L52.9 48.2 33.3 29.9c-5.9-5.5-6.7-14.5-1.7-20.6 5.3-6.4 14.9-6.7 20.5-.7l.8.8z",fill:"var(--wi-op-brand, #f62e61)"}),Se("path",{d:"M2.5 52.5c4.5-3.6 9.5-4.2 14.7-2.3l9.9 3.6h13.6a4.4 4.4 0 0 1 0 8.9H29",stroke:"var(--wi-op-hero-line, #121212)",strokeWidth:2.6,strokeLinecap:"round",strokeLinejoin:"round"}),Se("path",{d:"M26.2 62.7h20.3c2.6 0 5.1-.9 7-2.6l10.4-9.1a4.6 4.6 0 0 0-6.2-6.8l-9.1 7.7",stroke:"var(--wi-op-hero-line, #121212)",strokeWidth:2.6,strokeLinecap:"round",strokeLinejoin:"round"}),Se("path",{d:"M1 51.4 12.6 63",stroke:"var(--wi-op-hero-line, #121212)",strokeWidth:2.6,strokeLinecap:"round"})]})}de(`.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:inline-flex;align-items:center;gap:4px;font-size:20px;line-height:1.2;letter-spacing:-.02em}.wi-op-logo-mark{flex-shrink:0}.wi-op-logo-one{font-weight:800;color:var(--ds-content-highest, #000000)}.wi-op-logo-pop{font-weight:500;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.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-art svg{--wi-op-brand: var(--ds-system-red-default, #da0b2e)}[data-theme=light] .wi-op-hero-art svg{--wi-op-hero-line: #121212}[data-theme=dark] .wi-op-hero-art svg{--wi-op-hero-line: #ffffff}.wi-op-hero-img{max-width:100%;max-height:72px;object-fit:contain}.wi-op-panel{display:flex;flex-direction:column;gap:8px;padding:0 24px;flex-shrink:0}.wi-op-balance-card{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa)}.wi-op-balance-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.wi-op-balance-label{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-op-balance-body{display:flex;align-items:center;gap:4px;min-width:0}.wi-op-balance-icon{width:24px;height:24px;border-radius:50%;object-fit:cover;flex-shrink:0}.wi-op-balance-value{font-family:inherit;font-size:28px;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-link-btn{appearance:none;display:inline-flex;align-items:center;gap:4px;padding:0;border:none;background:transparent;font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;flex-shrink:0;transition:color .15s ease}.wi-op-link-btn:hover:not(:disabled){color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-link-btn:disabled{cursor:default;opacity:.5}.wi-op-balance-head>[data-gou-mode=button]{display:contents}.wi-op-action-row{display:flex;align-items:stretch;gap:8px}.wi-op-action-card{appearance:none;display:flex;flex:1 1 0;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 8px;border:none;border-radius:10px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-align:center;cursor:pointer;transition:background-color .15s ease,transform .1s ease}.wi-op-action-card>svg{flex-shrink:0}.wi-op-action-card:hover:not(:disabled){background:#2e3544}[data-theme=light] .wi-op-action-card:hover:not(:disabled){background:#e4e8ef}.wi-op-action-card:active:not(:disabled){transform:scale(.95)}.wi-op-action-card:disabled{cursor:default;opacity:.45}.wi-op-cta-row{display:flex;flex-direction:column;gap:10px;padding:24px;flex-shrink:0}.wi-op-cta-skeleton{border-radius:10px}.wi-op-cta{appearance:none;display:flex;align-items:center;justify-content:center;width:100%;padding:12px 16px;border:none;border-radius:10px;font-family:inherit;font-size:16px;font-weight:600;line-height:1;cursor:pointer;transition:filter .15s ease,transform .1s ease,background-color .15s ease}.wi-op-cta:active:not(:disabled){transform:scale(.985)}.wi-op-cta:disabled{cursor:default;opacity:.5}.wi-op-cta--gradient{background:linear-gradient(193.7deg,#f62e61 16.1%,#f7564a 83.9%);color:#fff}.wi-op-cta--gradient:hover:not(:disabled){filter:brightness(1.05)}.wi-op-cta--purple{background:var(--ds-system-purple-high, #7346f3);color:var(--ds-system-purple-on, #ffffff)}.wi-op-cta--purple:hover:not(:disabled){filter:brightness(1.08)}.wi-op-cta--outline{background:transparent;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-cta--outline:hover:not(:disabled){background:var(--ds-surface-medium, #f5f7fa)}.wi-op-features{display:flex;flex-direction:column;padding:0 24px 8px;flex-shrink:0}.wi-op-feature{display:flex;align-items:center;gap:6px;padding:12px 0}.wi-op-feature+.wi-op-feature{border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-op-feature-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;flex-shrink:0;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-accent-primary-high, #f0640d)}.wi-op-feature-copy{display:flex;flex-direction:column;min-width:0}.wi-op-feature-title{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-feature-desc{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-activity{display:flex;flex-direction:column;gap:8px;padding:0 24px 8px;flex-shrink:0}.wi-op-activity-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.wi-op-activity-heading{display:flex;flex-direction:column;min-width:0}.wi-op-activity-title{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-activity-currency{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-activity-list{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}.wi-op-activity-item{display:flex;align-items:flex-start;gap:6px;padding:12px 0}.wi-op-activity-item+.wi-op-activity-item{border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-op-activity-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;overflow:hidden;flex-shrink:0;background:var(--ds-surface-medium, #f5f7fa)}.wi-op-activity-avatar img{width:100%;height:100%;object-fit:cover}.wi-op-activity-initial{font-family:inherit;font-size:13px;font-weight:600;line-height:1;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-op-activity-copy{display:flex;flex-direction:column;flex:1 1 0;min-width:0}.wi-op-activity-meta{display:flex;align-items:center;gap:6px;min-width:0}.wi-op-activity-peer{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-activity-sep{width:1px;height:14px;flex-shrink:0;background:var(--ds-border-medium, rgba(0, 0, 0, .18))}.wi-op-activity-time{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap;flex-shrink:0}.wi-op-activity-amount{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-badge{display:inline-flex;align-items:center;justify-content:center;padding:3px 6px;border-radius:4px;flex-shrink:0;font-family:inherit;font-size:12px;font-weight:500;line-height:1}.wi-op-badge--claimed{background:var(--ds-system-green-low, #e7f9f8);color:var(--ds-system-green-high, #00a0a2)}.wi-op-badge--waiting{background:var(--ds-accent-primary-low, #fff5ee);color:var(--ds-accent-primary-high, #f0640d)}.wi-op-badge--refunded{background:var(--ds-system-red-low, #ffeeee);color:var(--ds-system-red-high, #d20609)}.wi-op-badge--ready{background:var(--ds-system-blue-low, #ecf8fc);color:var(--ds-system-blue-high, #008dca)}.wi-op-footer{display:flex;align-items:center;justify-content:center;padding:16px 24px;flex-shrink:0;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-drawer-content .wi-op-hero,.wi-drawer-content .wi-op-cta-row,.wi-drawer-content .wi-op-panel,.wi-drawer-content .wi-op-features,.wi-drawer-content .wi-op-activity,.wi-drawer-content .wi-op-footer{padding-left:16px;padding-right:16px}
|
|
12
|
+
`);import{Fragment as Zl,jsx as J,jsxs as tt}from"react/jsx-runtime";var yx=6,xx={claimed:"Claimed",waiting:"Waiting",refunded:"Refunded",ready:"Ready"};function Yf(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?"-":""}${vx(o.toString())}.${a.toString().padStart(2,"0")}`}function vx(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 kx(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 Rx(e){let t=e.trim();return t?t.startsWith("@")?t:`@${t}`:""}function ds({env:e="production",balanceDisplay:t,balanceIconUrl:r,isBalanceLoading:n,summary:o,logoSrc:a,heroSrc:i,onBack:s,onClose:l,onSend:d,onClaim:c,onActivity:h,onBoard:u,onGetToken:m,getTokenSlot:y}){let b=o?.activity??[],f=b.length>0,p=o?.claimableCount??0,w=o?.repliesWaitingCount??0,g=o?.isLoading??!1,x=o?.xConnected??!1,k=sn.useCallback(z=>{window.open(zf(e,z),"_blank","noopener,noreferrer")},[e]),R=sn.useCallback(()=>d?d():k("send"),[d,k]),I=sn.useCallback(()=>c?c():k("claim"),[c,k]),S=sn.useCallback(()=>h?h():k("activity"),[h,k]),C=sn.useCallback(()=>u?u():k("board"),[u,k]),E=sn.useCallback(()=>{if(m)return m();window.open(Ff(e),"_blank","noopener,noreferrer")},[m,e]),M=sn.useMemo(()=>!o||p<=0?null:Yf(o.claimableTotalRaw,o.claimableDecimals??18),[o,p]),F=sn.useMemo(()=>b.slice(0,yx),[b]),L=sn.useCallback(z=>{z.currentTarget.style.display="none"},[]);return tt(Zl,{children:[tt("div",{className:"wi-sticky-header",children:[tt("div",{className:"wi-header wi-header--receive",children:[J("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:J(tn,{size:24})}),J("span",{className:"wi-op-header-title",children:a?J("img",{src:a,alt:"ONEpop",className:"wi-op-logo-img",height:24,draggable:!1,onError:L}):J(Vf,{className:"wi-op-logo"})}),J("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close",children:J(Ir,{size:24})})]}),J("hr",{className:"wi-divider"})]}),tt("div",{className:"wi-op-scroll","data-vaul-no-drag":!0,children:[tt("section",{className:"wi-op-hero",children:[tt("div",{className:"wi-op-hero-copy",children:[tt("h2",{className:"wi-op-hero-title",children:[J("span",{children:"Send money with"}),tt("span",{className:"wi-op-hero-title-row",children:["just an",J(_f,{size:20,className:"wi-op-x-badge"}),"@handle."]})]}),J("p",{className:"wi-op-hero-sub",children:"They don't even need a wallet yet."})]}),J("div",{className:"wi-op-hero-art","aria-hidden":!0,children:i?J("img",{src:i,alt:"",className:"wi-op-hero-img",draggable:!1,onError:L}):J(qf,{})})]}),tt("section",{className:"wi-op-panel",children:[tt("div",{className:"wi-op-balance-card",children:[tt("div",{className:"wi-op-balance-head",children:[J("span",{className:"wi-op-balance-label",children:"Available"}),y??tt("button",{type:"button",className:"wi-op-link-btn",onClick:E,"data-track":"onepop_get_token",children:[J("span",{children:"Get ONEUSD"}),J(Ia,{size:12})]})]}),J("div",{className:"wi-op-balance-body",children:n?J("div",{className:"wi-skeleton-block",style:{width:140,height:32}}):tt(Zl,{children:[r&&J("img",{src:r,alt:"","aria-hidden":!0,className:"wi-op-balance-icon",width:24,height:24,draggable:!1,onError:L}),J("span",{className:"wi-op-balance-value",children:t??"0.00"})]})})]}),tt("div",{className:"wi-op-action-row","aria-label":"ONEpop actions",children:[tt("button",{type:"button",className:"wi-op-action-card",onClick:R,"aria-label":"Send POP","data-track":"onepop_send",children:[J(Uf,{size:24}),J("span",{children:"Send POP"})]}),tt("button",{type:"button",className:"wi-op-action-card",onClick:I,"aria-label":"Claim POPs","data-track":"onepop_claim",children:[J(jf,{size:24}),J("span",{children:"Claim POPs"})]}),x&&tt("button",{type:"button",className:"wi-op-action-card",onClick:S,"aria-label":"Activity","data-track":"onepop_activity",children:[J(Wf,{size:24}),J("span",{children:"Activity"})]})]})]}),J("section",{className:"wi-op-cta-row",children:g?J("div",{className:"wi-skeleton-block wi-op-cta-skeleton",style:{height:40}}):tt(Zl,{children:[!f&&p<=0&&J("button",{type:"button",className:"wi-op-cta wi-op-cta--gradient",onClick:R,"data-track":"onepop_send_first",children:"Send your first POP!"}),p>0?J("button",{type:"button",className:"wi-op-cta wi-op-cta--purple",onClick:I,"data-track":"onepop_claim_banner",children:`${p} POP${p===1?"":"s"} waiting to claim (total ${M})`}):!f&&J("button",{type:"button",className:"wi-op-cta wi-op-cta--purple",onClick:C,"data-track":"onepop_claim_maybe",children:"You might have POPs waiting"}),w>0&&J("button",{type:"button",className:"wi-op-cta wi-op-cta--outline",onClick:S,"data-track":"onepop_replies",children:`${w} ${w===1?"reply":"replies"} waiting`})]})}),f?tt("section",{className:"wi-op-activity",children:[tt("div",{className:"wi-op-activity-head",children:[tt("div",{className:"wi-op-activity-heading",children:[J("span",{className:"wi-op-activity-title",children:"Recent activity"}),J("span",{className:"wi-op-activity-currency",children:"Currency: ONEUSD"})]}),tt("button",{type:"button",className:"wi-op-link-btn",onClick:S,"data-track":"onepop_see_all_activity",children:[J("span",{children:"See all activity"}),J(Ia,{size:16})]})]}),J("ul",{className:"wi-op-activity-list",children:F.map(z=>J(Sx,{item:z},z.id))})]}):tt("section",{className:"wi-op-features",children:[J(Kl,{icon:J(Gf,{size:20}),title:"No wallet address needed",desc:"just their @handle"}),J(Kl,{icon:J(Hf,{size:20}),title:"Claim instantly",desc:"social login, zero gas"}),J(Kl,{icon:J(Qf,{size:20}),title:"Refund anytime",desc:"get it back if unclaimed"})]})]}),J("div",{className:"wi-op-footer",children:J("span",{children:"Powered by ONEpop"})})]})}function Kl({icon:e,title:t,desc:r}){return tt("div",{className:"wi-op-feature",children:[J("span",{className:"wi-op-feature-icon","aria-hidden":!0,children:e}),tt("span",{className:"wi-op-feature-copy",children:[J("span",{className:"wi-op-feature-title",children:t}),J("span",{className:"wi-op-feature-desc",children:r})]})]})}function Sx({item:e}){let t=Rx(e.handle),r=e.direction==="sent"?`Sent to ${t}`:`Claimed from ${t}`,n=t.replace("@","").charAt(0).toUpperCase()||"?";return tt("li",{className:"wi-op-activity-item",children:[J("span",{className:"wi-op-activity-avatar","aria-hidden":!0,children:e.avatarUrl?J("img",{src:e.avatarUrl,alt:"",width:30,height:30,draggable:!1,onError:o=>{o.currentTarget.style.display="none"}}):J("span",{className:"wi-op-activity-initial",children:n})}),tt("span",{className:"wi-op-activity-copy",children:[tt("span",{className:"wi-op-activity-meta",children:[J("span",{className:"wi-op-activity-peer",children:r}),J("span",{className:"wi-op-activity-sep","aria-hidden":!0}),J("span",{className:"wi-op-activity-time",children:kx(e.timestamp)})]}),J("span",{className:"wi-op-activity-amount",children:Yf(e.amountRaw,e.decimals)})]}),J("span",{className:Re("wi-op-badge",`wi-op-badge--${e.status}`),"data-status":e.status,children:xx[e.status]})]})}import*as Zf from"react";import{jsx as Kf,jsxs as Cx}from"react/jsx-runtime";var Xf=Zf.forwardRef(function({className:t,children:r,...n},o){return Cx("button",{...n,ref:o,type:"button",className:"wi-op-link-btn","data-track":"onepop_get_token",children:[Kf("span",{children:"Get ONEUSD"}),Kf(Ia,{size:12})]})});import{Fragment as Jl,jsx as N,jsxs as V}from"react/jsx-runtime";var Ix="On-ramp is not available in your region.";function Xl(e,t,r){let n=gt[e],o=r.toUpperCase();if(t===n.cross&&o.includes("ONEUSD"))return 0;if(t===n.cross&&o==="ONE")return 1;if(t===n.bsc&&o==="ONE")return 2}function Ex(e){return parseInt(e.split(":")[1],10)}function Mx(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 Ax(e){let t=e.lastIndexOf(".");return t===-1?{main:e,decimal:""}:{main:e.slice(0,t),decimal:e.slice(t)}}function Lx(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 Dx(e,t=.5){let r=q.useRef(null),n=q.useRef(null),[o,a]=q.useState(1);return q.useLayoutEffect(()=>{let i=r.current,s=n.current;if(!i||!s)return;let l=()=>{let c=i.clientWidth;if(!c)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 m=u>c?Math.max(t,c/u):1;a(m)};l();let d=new ResizeObserver(l);return d.observe(i),()=>d.disconnect()},[e,t]),{containerRef:r,valueRef:n,scale:o}}function Jf({align:e="end",sideOffset:t=12,className:r,children:n}){let{env:o,theme:a,isMobile:i,open:s,drawerDirection:l,modal:d,showBalance:c,showForgeToken:h,showGameToken:u,showQR:m,showBridge:y,qrLogoSrc:b,walletAddress:f,accountName:p,sendAccounts:w,profileImageUrl:g,connectorName:x,preferredTokens:k,close:R,onSelectWallet:I,onCopyAddress:S,onBuy:C,onDisconnect:E,disconnectLabel:M,termsUrl:F,termsLabel:L,privacyUrl:z,privacyLabel:A,portalStyle:U,navContent:re,navPosition:Y,footerContent:_,view:G,setView:ne,selectedSendToken:te,setSelectedSendToken:O,selectedDetailToken:Z,setSelectedDetailToken:H,showPortfolio:ce,showOnePop:ve,onePopSummary:ge,onOnePopOpen:ue,onOnePopSend:me,onOnePopClaim:we,onOnePopActivity:Ze,onePopLogoSrc:he,onePopGetTokenSlot:Ee,onePopHeroSrc:at,portfolioTitle:Qe,portfolioSections:We,showTotalAssets:Be,totalAssetsLabel:rt,sendTransaction:Nt,getTransactionReceipt:ut,estimateGas:xt,onOutlink:be,lpBalanceReader:Vt,stakingRewardsReader:bt,bridgeTokens:wt,bridgeHistory:nt,getBridgeQuote:et,getBridgeToTokens:er,getBridgeApproval:At,approveBridge:Ut,submitBridge:Lt,onReceive:Ve,onSend:Pe,onBuyDisabledMessage:ft,onBridgeDisabledMessage:Tt,onSendDisabledMessage:Ne}=Bn(),[It,qt]=q.useState();q.useEffect(()=>{qt(Tp()??(Ao()?Tx.default:void 0))},[]);let P=p??x??It??"Account",[ze,B]=q.useState(null),oe=q.useRef(void 0),se=q.useCallback(T=>{B(T),clearTimeout(oe.current),oe.current=setTimeout(()=>B(null),4e3)},[]);q.useEffect(()=>()=>clearTimeout(oe.current),[]);let fe=!!ft,mt=q.useCallback(()=>{if(fe){se(ft);return}let T=C?.();T&&typeof T.then=="function"&&T.catch(()=>{se(ft??Ix)})},[fe,ft,C,se]),Dt=!!Tt,yt=!!Ne,{tokens:hr,isLoading:br}=Un(o,f,s&&c),{statsMap:jt}=jn(o,c),{aprPercent:Dr}=fp(),{categoryMap:sr,infoMap:ee}=gp(o,c),Te=c&&Be,{displayValue:j,isLowerBound:_e,isLoading:ae}=hp(o,f,s&&Te),[Ge,No]=q.useState(!1),no=q.useRef(null),[Cr,kn]=q.useState(0),{holdings:oo,isLoading:Ka}=cp(o,f,s&&c&&h),Vs=q.useMemo(()=>oo.map(T=>T.token),[oo]),{imageMap:Za}=pp(o,Vs,h&&oo.length>0),Wt=q.useMemo(()=>{let T=[],X=[],He=[],dr=new Map((k??[]).map((Je,tr)=>[`${Ex(Je.chainId)}:${Je.address.toLowerCase()}`,tr]));for(let Je of hr){let tr=Xl(o,Je.chainId,Je.symbol)!==void 0,$r=`${Je.chainId}:${Je.address.toLowerCase()}`,io=dr.get($r),Zs=(it(Je.quantity.numeric)??new Ea(0)).shiftedBy(-Je.quantity.decimals);if(tr)T.push(Je);else if(io!==void 0)X.push(Je);else if(Zs.isGreaterThan(0)){if(!u&&sr.get(ma(Je.chainId,Je.address))==="game")continue;He.push(Je)}}return T.sort((Je,tr)=>{let $r=Xl(o,Je.chainId,Je.symbol)??99,io=Xl(o,tr.chainId,tr.symbol)??99;return $r-io}),X.sort((Je,tr)=>{let $r=dr.get(`${Je.chainId}:${Je.address.toLowerCase()}`)??99,io=dr.get(`${tr.chainId}:${tr.address.toLowerCase()}`)??99;return $r-io}),He.sort((Je,tr)=>{let $r=jt.get(zr(Je.chainId,Je.address)),io=jt.get(zr(tr.chainId,tr.address)),Zs=(it(Je.quantity.numeric)??new Ea(0)).shiftedBy(-Je.quantity.decimals).multipliedBy(it($r?.price)??0);return(it(tr.quantity.numeric)??new Ea(0)).shiftedBy(-tr.quantity.decimals).multipliedBy(it(io?.price)??0).minus(Zs).toNumber()}),[...T,...X,...He]},[hr,o,jt,u,sr,k]),Xa=q.useMemo(()=>{if(!h)return[];let T=new Set(hr.map(X=>X.address.toLowerCase()));return[...oo].filter(X=>!T.has(X.token.toLowerCase())).sort((X,He)=>{let dr=it(X.value)??new Ea(0);return(it(He.value)??new Ea(0)).minus(dr).toNumber()})},[oo,h,hr]),Xr=q.useRef(!1),[Yt,ao]=q.useState(null),Pn=q.useRef(void 0),Ja=Yt?.chainId??te?.chainId??Wt[0]?.chainId??0,{transactionUrl:W}=da(o,Ja,Yt?.txHash,!!(Yt?.txHash&&Ja)),ye=q.useCallback(T=>{Xr.current=!0,ne(T)},[ne]),[wr,vt]=q.useState("recipient"),lr=q.useCallback(()=>{O(null),vt("recipient"),ye("wallet")},[O,ye]),Pt=q.useCallback((T,X="recipient")=>{if(yt){se(Ne);return}vt(X),O(T),ye("send")},[yt,Ne,se,O,ye]),Jr=q.useCallback(T=>{H(T),ye("token-detail")},[H,ye]),Xe=q.useCallback(()=>{ue?.(),ye("onepop")},[ue,ye]),pn=q.useCallback(()=>{H(null),ye("wallet")},[H,ye]),To=q.useCallback(T=>{Pt(T,"recipient")},[Pt]),$a=rr("apps.json",o,T=>Pr(T?.gametokenBridge,o)),Ed=rr("apps.json",o,T=>T?.gametokenSites),Xg=q.useCallback(()=>{if(Dt){se(Tt);return}if($a){if(Mx(Ed)){window.location.assign($a);return}window.open($a,"_blank","noopener,noreferrer")}},[Dt,Tt,$a,Ed,se]),Jg=q.useCallback(T=>{clearTimeout(Pn.current),O(null),ye("wallet"),ao({status:"pending",txHash:T.txHash,chainId:T.chainId,description:`${T.amount} ${T.tokenSymbol} to ${nr(T.recipient)}`})},[O,ye]),$g=q.useCallback(T=>{let X=te?.chainId;O(null),ye("wallet"),!(!T||!X)&&(ao(He=>({status:"success",txHash:T,chainId:X,description:He?.txHash===T?He.description:"Tap to see your transaction"})),clearTimeout(Pn.current),Pn.current=setTimeout(()=>ao(null),5e3))},[te?.chainId,O,ye]),eh=q.useCallback(T=>{let X=T.txHash;X&&(ao({status:"error",txHash:X,chainId:T.chainId,description:T.message}),clearTimeout(Pn.current),Pn.current=setTimeout(()=>ao(null),5e3))},[]),oa=q.useMemo(()=>{if(Ve)return Ve;if(m)return()=>ye("qr")},[Ve,m,ye]),ei=q.useMemo(()=>{if(Pe)return Pe;if(Wt.length===0)return;let T=Wt[0];return()=>Pt(T,"token")},[Pe,Wt,Pt]),Md=q.useCallback(()=>{if(yt){se(Ne);return}ei?.()},[yt,Ne,ei,se]);q.useEffect(()=>{s||(Xr.current=!1,vt("recipient"))},[s]);let Ad=q.useRef(null);q.useEffect(()=>{let T=Ad.current;if(!T||!i)return;let X=He=>{He.pointerType==="touch"&&He.stopPropagation()};return T.addEventListener("pointerdown",X),()=>T.removeEventListener("pointerdown",X)},[i]);let[Io,Ld]=q.useState(!1),qs=q.useRef(void 0),[aa,ia]=q.useState(!1);q.useEffect(()=>{if(!aa)return;let T=()=>ia(!1),X=dr=>{dr.key==="Escape"&&ia(!1)},He=setTimeout(()=>{document.addEventListener("mousedown",T,!0),document.addEventListener("keydown",X,!0)},0);return()=>{clearTimeout(He),document.removeEventListener("mousedown",T,!0),document.removeEventListener("keydown",X,!0)}},[aa]),q.useEffect(()=>{ia(!1)},[f]),q.useEffect(()=>()=>clearTimeout(qs.current),[]),q.useEffect(()=>()=>clearTimeout(Pn.current),[]),q.useEffect(()=>{let T=no.current;if(!T||_===null){kn(0);return}let X=()=>{kn(T.offsetHeight)};if(X(),typeof ResizeObserver>"u")return;let He=new ResizeObserver(X);return He.observe(T),()=>He.disconnect()},[_]);let Dd=q.useCallback(async()=>{if(!Io)try{await navigator.clipboard.writeText(f),Ld(!0),clearTimeout(qs.current),qs.current=setTimeout(()=>Ld(!1),2e3),S?.(f,!0)}catch{S?.(f,!1)}},[f,S,Io]),ti=q.useCallback(T=>{T.currentTarget.setAttribute("data-loaded","true")},[]),Pd=q.useMemo(()=>({background:Lx(f)}),[f]),ri=q.useMemo(()=>g||Cn(o,f,{size:120,bg:a==="dark"?"1A1A2E":"F3F6F8"}),[g,o,f,a]),Ys=q.useMemo(()=>Ax(j),[j]),{containerRef:th,valueRef:rh,scale:nh}=Dx(Ge?"\u2022\u2022\u2022\u2022\u2022\u2022":j),Od=F||z?V("div",{className:"wi-legal-links",children:[F&&N("a",{className:"wi-legal-link",href:F,target:"_blank",rel:"noopener noreferrer","data-track":"terms_link",onClick:T=>zt(T,F,{category:"terms",origin:"terms"},be),children:L}),F&&z&&N("span",{className:"wi-legal-sep","aria-hidden":!0,children:"\xB7"}),z&&N("a",{className:"wi-legal-link",href:z,target:"_blank",rel:"noopener noreferrer","data-track":"privacy_link",onClick:T=>zt(T,z,{category:"privacy",origin:"privacy"},be),children:A})]}):null,Bd=E?V("button",{type:"button",className:"wi-disconnect-btn","data-track":"disconnect",onClick:()=>{E(),R()},children:[N(hc,{size:16}),N("span",{className:"wi-disconnect-label",children:M})]}):null,oh=c&&!re,ah=!Te,ih=V("button",{type:"button",className:Re("wi-action-card",yt&&"wi-action-card--dimmed"),onClick:Md,disabled:!yt&&!ei,"aria-disabled":yt||void 0,"aria-label":"Send","data-track":"send_open",children:[N(xc,{size:20}),N("span",{children:"Send"})]}),sh=oh?V("div",{className:"wi-action-row","aria-label":"Wallet actions",children:[V("button",{type:"button",className:Re("wi-action-card",fe&&"wi-action-card--dimmed"),onClick:mt,disabled:!C&&!fe,"aria-disabled":fe||void 0,"aria-label":"Buy","data-track":"buy",children:[N(Rc,{size:20}),N("span",{children:"Buy"})]}),y?V("button",{type:"button",className:Re("wi-action-card",Dt&&"wi-action-card--dimmed"),onClick:Xg,"aria-disabled":Dt||void 0,"aria-label":"Bridge","data-track":"bridge_open",children:[N(Sc,{size:20}),N("span",{children:"Bridge"})]}):V("button",{type:"button",className:"wi-action-card",onClick:oa,disabled:!oa,"aria-label":"Receive","data-track":"receive",children:[N(hi,{size:20}),N("span",{children:"Receive"})]}),ah&&ih,ve&&V("button",{type:"button",className:"wi-action-card",onClick:Xe,"aria-label":"Open ONEpop","data-track":"onepop_open",children:[N(Yl,{size:20}),N("span",{children:"ONEpop"})]}),ce?V("button",{type:"button",className:"wi-action-card",onClick:()=>ye("portfolio"),"aria-label":"View portfolio","data-track":"portfolio_open",children:[N(kc,{size:20}),N("span",{children:"Portfolio"})]}):y?V("button",{type:"button",className:"wi-action-card",onClick:oa,disabled:!oa,"aria-label":"Receive","data-track":"receive",children:[N(hi,{size:20}),N("span",{children:"Receive"})]}):null]}):null,lh=V("div",{className:Re("wi-view-inner",Xr.current&&"wi-view-wallet"),children:[Te&&V("div",{className:"wi-total-section",children:[V("div",{className:"wi-total-head",children:[N("span",{className:"wi-total-label",children:rt}),N("span",{role:"button",tabIndex:0,className:"wi-total-eye",onClick:T=>{T.stopPropagation(),No(X=>!X)},onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),T.stopPropagation(),No(X=>!X))},"aria-label":Ge?"Show balance":"Hide balance","data-track":"balance_toggle",children:Ge?N(wc,{}):N(bc,{})})]}),V("div",{className:"wi-total-body",children:[N("div",{className:"wi-total-value-wrap",ref:th,children:ae?N("div",{className:"wi-skeleton-block wi-total-skeleton",style:{width:160,height:42}}):N("div",{className:"wi-total-value","data-hidden":Ge||void 0,ref:rh,style:{"--wi-total-scale":nh},children:Ge?N("span",{className:"wi-total-mask",children:"\u2022\u2022\u2022\u2022\u2022\u2022"}):V(Jl,{children:[_e&&N("span",{className:"wi-total-lte",children:"\u2264"}),N("span",{className:"wi-total-currency",children:"$"}),N("span",{className:"wi-total-amount",children:Ys.main}),Ys.decimal&&N("span",{className:"wi-total-decimal",children:Ys.decimal})]})})}),N("button",{type:"button",className:Re("wi-total-send",yt&&"wi-total-send--dimmed"),onClick:Md,disabled:!yt&&!ei,"aria-disabled":yt||void 0,"aria-label":"Send","data-track":"send_open",children:N(vc,{size:27})})]})]}),Y==="top"&&(re?N("div",{className:"wi-nav-fixed",children:re}):sh),c&&N("div",{ref:Ad,className:"wi-scrollable-body","data-vaul-no-drag":!0,children:V("div",{className:"wi-token-list",children:[br&&Array.from({length:5},(T,X)=>V("div",{className:"wi-skeleton-item",children:[V("div",{className:"wi-skeleton-left",children:[N("div",{className:"wi-skeleton-block wi-skeleton-icon"}),V("div",{className:"wi-skeleton-lines",children:[N("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),V("div",{className:"wi-skeleton-right",children:[N("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},X)),!br&&Wt.length===0&&!h&&N("div",{className:"wi-empty",children:"No Tokens Found"}),Wt.map(T=>{let X=jt.get(zr(T.chainId,T.address)),He=X?parseFloat(X.percent_change_24h):null,dr=He!==null&&He>=0,Je=ua(o,T.chainId),tr=xl(T.address);return V("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>Jr(T),"aria-label":`View ${T.symbol} detail`,"data-track":"token_detail","data-track-id":T.symbol,children:[V("div",{className:"wi-token-left",children:[V("div",{className:"wi-token-icon-wrap",children:[N("img",{src:T.icon_url,alt:T.symbol,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:ti,onError:$r=>{$r.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),Je&&N("img",{src:Je,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:$r=>{$r.currentTarget.style.display="none"}})]}),V("div",{className:"wi-token-info",children:[V("span",{className:"wi-token-name-row",children:[N("span",{className:"wi-token-name",children:T.symbol}),tr&&Dr!==null&&N("span",{className:"wi-token-apr",children:Pi(Dr)})]}),X&&V("div",{className:"wi-token-price-row",children:[N("span",{className:"wi-token-price",children:mo(X.price)}),N("span",{className:"wi-token-change","data-positive":dr,"data-zero":He===0||void 0,children:He!==null&&(He===0?"0%":`${dr?"+":"-"}${(dr?Math.floor:Math.ceil)(Math.abs(He)*100)/100}%`)})]})]})]}),V("div",{className:"wi-token-right",children:[N("span",{className:"wi-token-balance",children:Sn(T.quantity.numeric,T.quantity.decimals)}),X&&N("span",{className:"wi-token-value",children:bi(T.quantity.numeric,T.quantity.decimals,X.price)})]})]},`${T.address}-${T.chainId}`)}),h&&Ka&&Array.from({length:3},(T,X)=>V("div",{className:"wi-skeleton-item",children:[V("div",{className:"wi-skeleton-left",children:[N("div",{className:"wi-skeleton-block wi-skeleton-icon"}),V("div",{className:"wi-skeleton-lines",children:[N("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),V("div",{className:"wi-skeleton-right",children:[N("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},`forge-sk-${X}`)),h&&!Ka&&!br&&Wt.length===0&&Xa.length===0&&N("div",{className:"wi-empty",children:"No Tokens Found"}),h&&Xa.map(T=>{let X=Za.get(T.token)||"",He=ua(o,gt[o].cross);return V("div",{className:"wi-token-item",children:[V("div",{className:"wi-token-left",children:[V("div",{className:"wi-token-icon-wrap",children:[N("img",{src:X||"https://contents.crosstoken.io/wallet/token/images/FT.png",alt:T.token_name,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:ti,onError:dr=>{dr.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),He&&N("img",{src:He,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:dr=>{dr.currentTarget.style.display="none"}})]}),V("div",{className:"wi-token-info",children:[N("span",{className:"wi-token-name",children:T.token_name}),N("div",{className:"wi-token-price-row",children:V("span",{className:"wi-token-price",children:[Sn(T.current_price,18)," CROSS"]})})]})]}),V("div",{className:"wi-token-right",children:[N("span",{className:"wi-token-balance",children:Sn(T.balance,18)}),N("span",{className:"wi-token-value",children:mo(T.current_value_usd)})]})]},`forge-${T.token}`)})]})}),Y==="bottom"&&re&&N("div",{className:"wi-nav-fixed",children:re}),Bd&&N("div",{className:"wi-wallet-disconnect-row",children:Bd})]},"wallet"),dh=ce?N("div",{className:Re("wi-view-inner wi-portfolio-body",Xr.current&&"wi-view-portfolio"),children:N(Ho,{env:o,theme:a,walletAddress:f,showHeader:!1,onOutlink:be,lpBalanceReader:Vt,stakingRewardsReader:bt,sendTransaction:Nt,estimateGas:xt,sections:We})},"portfolio"):null,ch=te?N("div",{className:Re("wi-view-inner wi-send-body",Xr.current&&"wi-view-send"),children:N(Ai,{env:o,theme:a,walletAddress:f,accountName:P,accounts:w,initialStep:wr,token:te,tokens:Wt,onTokenChange:O,sendTransaction:Nt,getTransactionReceipt:ut,estimateGas:xt,getTokenPriceUsd:T=>{let X=jt.get(zr(T.chainId,T.address));if(!X?.price)return;let He=parseFloat(X.price);return Number.isFinite(He)?He:void 0},onClose:R,onBackToWallet:lr,onSubmitted:Jg,onSuccess:$g,onFailed:eh,onOutlink:be})},"send"):null,ph=q.useMemo(()=>wt||Wt.map(T=>{let X=jt.get(zr(T.chainId,T.address)),He=X?.price?parseFloat(X.price):void 0;return{name:T.name,symbol:T.symbol,chainId:T.chainId,address:T.address,decimals:T.quantity.decimals,balance:jo(T.quantity.numeric,T.quantity.decimals),iconUrl:T.icon_url,priceUsd:Number.isFinite(He)?He:void 0}}),[wt,jt,Wt]),uh=N("div",{className:Re("wi-view-inner wi-bridge-body",Xr.current&&"wi-view-send"),children:N(Vo,{env:o,walletAddress:f,tokens:ph,history:nt,termsUrl:F,getQuote:et,getToTokens:er,getApproval:At,approveBridge:Ut,submitBridge:Lt,onClose:R,onBackToWallet:lr})},"bridge"),fh=Z?N("div",{className:Re("wi-view-inner wi-token-detail-body",Xr.current&&"wi-view-send"),children:N(Pf,{env:o,isMobile:i,token:Z,walletAddress:f,stat:jt.get(zr(Z.chainId,Z.address)),tokenInfo:ee.get(ma(Z.chainId,Z.address)),showBalance:c,onBack:pn,onClose:R,onSend:To,onOutlink:be})},"token-detail"):null,Eo=q.useMemo(()=>{let T=gt[o].cross;return Wt.find(X=>X.chainId===T&&xl(X.address))??Wt.find(X=>X.chainId===T&&X.symbol.toUpperCase().includes("ONEUSD"))},[Wt,o]),mh=q.useMemo(()=>{if(Eo)return Sn(Eo.quantity.numeric,Eo.quantity.decimals)},[Eo]),gh=ve?N("div",{className:Re("wi-view-inner wi-onepop-body",Xr.current&&"wi-view-send"),children:N(ds,{env:o,balanceDisplay:mh,balanceIconUrl:Eo?.icon_url,isBalanceLoading:br&&!Eo,summary:ge,logoSrc:he,heroSrc:at,getTokenSlot:Ee,onBack:lr,onClose:R,onSend:me,onClaim:we,onActivity:Ze})},"onepop"):null,Ks=!!I&&p?.trim().toLowerCase()!=="my wallet",zd=V(Jl,{children:[V("span",{className:"wi-receive-avatar",children:[N("span",{className:"wi-avatar-fallback",style:Pd}),ri&&N("img",{src:ri,alt:"",className:"wi-avatar-img",width:24,height:24,draggable:!1,onLoad:ti,onError:T=>{T.currentTarget.style.display="none"}})]}),N("span",{className:"wi-receive-account-name",children:P}),Ks&&N("span",{className:"wi-receive-chevron","data-open":aa,"aria-hidden":"true",children:N(Or,{size:16})})]}),hh=V("div",{className:Re("wi-view-inner wi-qr-body",Xr.current&&"wi-view-qr"),children:[V("div",{className:"wi-receive-section",children:[Ks?N("button",{type:"button",className:"wi-receive-account wi-receive-account--btn",onClick:()=>{ia(!0),I?.()},"aria-label":"Switch account",children:zd}):N("div",{className:"wi-receive-account",children:zd}),V("div",{className:"wi-qr-block",children:[V("div",{className:"wi-qr-box",children:[N(Nx,{value:f,size:180,level:"H",marginSize:2,...b&&{imageSettings:{src:b,height:33,width:33,excavate:!0}}}),!b&&N("div",{className:"wi-qr-logo",children:N(yc,{size:33})})]}),N("p",{className:"wi-qr-address",children:f})]}),V("button",{type:"button",className:"wi-qr-copy-btn",onClick:Dd,"data-track":"address_copy",children:[N("span",{className:"wi-qr-copy-icon",children:Io?N(Rn,{size:16}):N(uo,{size:16})}),N("span",{className:"wi-qr-copy-text",children:Io?"Copied!":"Copy address"})]})]}),Od&&N("div",{className:"wi-receive-footer",children:Od})]},"qr"),bh=G==="qr"||G==="portfolio"||G==="send"||G==="bridge",Fd=_!==null?N("div",{className:"wi-builtin-footer",children:_}):null,Ud=V("div",{className:"wi-account-text",children:[Ks?V("button",{type:"button",className:"wi-account-row wi-account-row--btn",onClick:()=>{ia(!0),I?.()},"aria-label":"Switch account","aria-expanded":aa,children:[N("span",{className:"wi-account-name",children:P}),N("span",{className:"wi-account-switch","data-open":aa,"aria-hidden":"true",children:N(Or,{size:20})})]}):N("div",{className:"wi-account-row",children:N("span",{className:"wi-account-name",children:P})}),V("button",{type:"button",className:"wi-address-row-btn",onClick:Dd,"aria-label":"Copy address","data-track":"address_copy",children:[N("span",{className:"wi-account-address",children:nr(f)}),N("span",{className:"wi-account-copy","data-copied":Io,children:Io?N(Rn,{size:12}):N(uo,{size:12})})]})]}),jd=V(Jl,{children:[n,G==="qr"?N("div",{className:"wi-sticky-header",children:V("div",{className:"wi-header wi-header--receive",children:[N("button",{type:"button",className:"wi-header-back",onClick:lr,"aria-label":"Back",children:N(tn,{size:24})}),N("span",{className:"wi-receive-title",children:"Receive"}),N("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close",children:N(Ir,{size:24})})]})}):G==="send"||G==="bridge"||G==="token-detail"||G==="onepop"?null:bh?V("div",{className:"wi-sticky-header",children:[V("div",{className:"wi-header wi-header--wallet wi-header--sub-account",children:[N("button",{type:"button",className:"wi-header-back",onClick:lr,"aria-label":"Back",children:N(tn,{size:24})}),N("div",{className:"wi-account-block wi-account-block--sub-account",children:Ud}),N("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close",children:N(Ir,{size:24})})]}),N("hr",{className:"wi-divider"})]}):V("div",{className:"wi-sticky-header",children:[V("div",{className:"wi-header wi-header--wallet",children:[V("div",{className:"wi-account-block",children:[V("div",{className:"wi-avatar",children:[N("div",{className:"wi-avatar-fallback",style:Pd}),ri&&N("img",{src:ri,alt:"",className:"wi-avatar-img",width:28,height:28,draggable:!1,onLoad:ti,onError:T=>{T.currentTarget.style.display="none"}})]}),Ud]}),V("div",{className:"wi-header-actions",children:[m&&y&&N("button",{type:"button",className:"wi-header-action wi-header-action--qr",onClick:oa,"aria-label":"Show QR code","data-track":"receive",children:N(hi,{size:20})}),N("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close",children:N(Ir,{size:24})})]})]}),N("hr",{className:"wi-divider"})]}),V("div",{className:"wi-view-container",children:[G==="wallet"&&lh,G==="qr"&&hh,G==="portfolio"&&dh,G==="send"&&ch,G==="bridge"&&uh,G==="token-detail"&&fh,G==="onepop"&&gh]}),(G==="wallet"||G==="onepop")&&ze&&N("div",{className:"wi-action-toast",role:"status","aria-live":"polite",children:ze}),G==="wallet"&&Yt&&V("a",{className:"wi-send-toast",href:W??"#",target:"_blank",rel:"noopener noreferrer",onClick:T=>{if(!W){T.preventDefault();return}zt(T,W,{category:"send",origin:"send-transaction",payload:{chainId:Yt.chainId,txHash:Yt.txHash}},be)},children:[N("span",{className:"wi-send-toast-icon","data-status":Yt.status,"aria-hidden":!0,children:Yt.status==="pending"?N("span",{className:"wi-send-toast-spinner"}):Yt.status==="error"?N("span",{className:"wi-send-toast-error-dot"}):N(Cc,{size:20})}),V("span",{className:"wi-send-toast-copy",children:[N("span",{className:"wi-send-toast-title",children:Yt.status==="pending"?"Sending...":Yt.status==="error"?"Send failed":"Send complete"}),N("span",{className:"wi-send-toast-desc",children:Yt.status==="pending"||Yt.status==="error"?Yt.description:"Tap to see your transaction"})]})]}),Fd&&G!=="portfolio"&&G!=="send"&&G!=="token-detail"&&G!=="onepop"&&N("div",{className:"wi-sticky-footer",children:N("div",{className:"wi-footer",ref:no,children:Fd})})]}),Wd={...U,...Cr>0?{"--wi-footer-height":`${Cr}px`}:null},_d=q.useCallback(T=>{let X=T.detail.originalEvent.target;X instanceof Element&&X.closest("[data-rd-shell]")!==null&&T.preventDefault()},[]);return i?N(xe,{feature:"wallet_info",children:V(cs.Portal,{children:[d&&N(cs.Overlay,{className:"wi-drawer-overlay"}),V(cs.Content,{className:Re("wi-drawer-content",r),"data-theme":a,"data-vaul-no-drag":l==="left"||l==="right"?!0:void 0,style:Wd,"data-direction":l,"data-no-balance":!c||void 0,"data-has-footer":Cr>0||void 0,"data-view":G,onInteractOutside:_d,children:[N(cs.Title,{className:"wi-sr-only",children:"My Wallet"}),jd]})]})}):V(xe,{feature:"wallet_info",children:[d&&s&&N("div",{className:"wi-drawer-overlay",onClick:R}),N(ps.Portal,{children:N(ps.Content,{align:e,sideOffset:t,className:Re("wi-popover-content",r),"data-theme":a,style:Wd,"data-no-balance":!c||void 0,"data-has-footer":Cr>0||void 0,"data-view":G,onInteractOutside:_d,children:jd})})]})}import*as $f from"react";function em({position:e="top",children:t}){let{setNavContent:r,setNavPosition:n}=Bn();return $f.useEffect(()=>(r(t),n(e),()=>r(null)),[t,e,r,n]),null}import*as tm from"react";function rm({children:e}){let{setFooterContent:t}=Bn();return tm.useEffect(()=>(t(e),()=>t(null)),[e,t]),null}de(`[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
|
+
`);de(`.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
|
+
`);de(`@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
|
+
`);de(`.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
|
+
`);de(`.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, #f0640d);transition:filter .15s ease}.wi-td-send-btn:hover{filter:brightness(1.06)}.wi-td-send-btn:active{filter:brightness(.94)}.wi-td-section{display:flex;flex-direction:column;gap:14px}.wi-td-section-title{margin:0;font-size:18px;font-weight:700;letter-spacing:-.01em;color:var(--wi-texticon-primary, #ffffff)}.wi-td-rows{display:flex;flex-direction:column;gap:12px}.wi-td-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.wi-td-row-label{font-size:15px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-row-value{font-size:15px;font-weight:500;color:var(--wi-texticon-primary, #ffffff);text-align:right;word-break:break-all}.wi-td-row-link,.wi-td-row-copy{display:inline-flex;align-items:center;gap:6px;border:none;background:transparent;padding:0;cursor:pointer;font-family:inherit;text-decoration:none}.wi-td-row-link:hover,.wi-td-row-copy:hover{opacity:.8}.wi-td-external-icon{color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));flex-shrink:0}.wi-td-row-copy svg{color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));flex-shrink:0}.wi-td-social-row{display:flex;flex-wrap:wrap;gap:10px}.wi-td-social-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;color:var(--wi-texticon-primary, #ffffff);background:var(--wi-surface-default, rgba(255, 255, 255, .05));text-decoration:none;transition:background .15s ease}.wi-td-social-btn:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-history-list{display:flex;flex-direction:column;gap:10px}.wi-td-history-item{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:12px;background:var(--wi-surface-default, rgba(255, 255, 255, .05));text-decoration:none}.wi-td-history-item--link{cursor:pointer;transition:background .15s ease}.wi-td-history-item--link:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-history-top,.wi-td-history-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px}.wi-td-history-type{font-size:15px;font-weight:600;color:var(--wi-texticon-primary, #ffffff)}.wi-td-history-type[data-direction=receive],.wi-td-history-type[data-direction=bridge-in]{color:var(--ds-system-green-high, #00a869)}.wi-td-history-counter{font-size:14px;color:var(--wi-primary, #f0640d);font-variant-numeric:tabular-nums}.wi-td-history-meta{display:inline-flex;align-items:center;gap:8px;min-width:0}.wi-td-history-status{font-size:14px;font-weight:500}.wi-td-history-status[data-status=success]{color:var(--ds-system-green-high, #00a869)}.wi-td-history-status[data-status=fail]{color:var(--wi-error, #e70077)}.wi-td-history-time{font-size:14px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-history-amount{font-size:15px;font-weight:600;color:var(--wi-texticon-primary, #ffffff);text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.wi-td-history-amount[data-size=sm]{font-size:13px}.wi-td-history-amount[data-size=xs]{font-size:11px;white-space:normal;word-break:break-all}.wi-td-history-skeleton{display:flex;align-items:center;justify-content:space-between;padding:16px;border-radius:12px;background:var(--wi-surface-default, rgba(255, 255, 255, .05))}.wi-td-history-empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:28px 16px;border-radius:12px;background:var(--wi-surface-default, rgba(255, 255, 255, .05));color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));font-size:14px;text-align:center}.wi-td-retry-btn{padding:8px 18px;border:1px solid var(--wi-border-subtle, rgba(255, 255, 255, .1));border-radius:999px;background:transparent;color:var(--wi-texticon-primary, #ffffff);font-family:inherit;font-size:13px;font-weight:600;cursor:pointer}.wi-td-retry-btn:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-history-sentinel{display:flex;align-items:center;justify-content:center;min-height:32px}.wi-td-history-loading{font-size:13px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-loadmore-btn{align-self:center;margin-top:2px;padding:10px 24px;border:1px solid var(--wi-border-subtle, rgba(255, 255, 255, .1));border-radius:999px;background:transparent;color:var(--wi-texticon-primary, #ffffff);font-family:inherit;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s ease}.wi-td-loadmore-btn:hover:not(:disabled){background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-loadmore-btn:disabled{cursor:default;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}
|
|
17
|
+
`);de(`.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}
|
|
18
|
+
`);import{jsx as $l}from"react/jsx-runtime";function Ox({env:e,theme:t="dark",mobileBreakpoint:r=768,drawerDirection:n,modal:o,showBalance:a=!1,showForgeToken:i=!1,showGameToken:s=!0,showQR:l=!0,showBridge:d=!0,qrLogoSrc:c,walletAddress:h,accountName:u,sendAccounts:m,profileImageUrl:y,connectorId:b,connectorName:f,connectorIconUrl:p,preferredTokens:w=[],onSelectWallet:g,onCopyAddress:x,onBuy:k,onBuyDisabledMessage:R,onBridgeDisabledMessage:I,onSendDisabledMessage:S,onDisconnect:C,disconnectLabel:E="Disconnect",termsUrl:M=wi,termsLabel:F="Terms of Service",privacyUrl:L=yi,privacyLabel:z="Privacy Policy",open:A,onOpenChange:U,showPortfolio:re=!1,showOnePop:Y=!1,onePopSummary:_,onOnePopOpen:G,onOnePopSend:ne,onOnePopClaim:te,onOnePopActivity:O,onePopGetTokenSlot:Z,onePopLogoSrc:H,onePopHeroSrc:ce,portfolioTitle:ve="My Portfolio",portfolioSections:ge,showTotalAssets:ue=!0,totalAssetsLabel:me="Total Assets USD",sendTransaction:we,getTransactionReceipt:Ze,estimateGas:he,onOutlink:Ee,lpBalanceReader:at,stakingRewardsReader:Qe,bridgeTokens:We,bridgeHistory:Be,getBridgeQuote:rt,getBridgeToTokens:Nt,getBridgeApproval:ut,approveBridge:xt,submitBridge:be,onReceive:Vt,onBridge:bt,onSend:wt,style:nt,children:et}){let er=ot(e),At=b?gi[b]:void 0,Ut=f??At?.name,Lt=p??At?.iconUrl,Ve=Po(`(max-width: ${r}px)`),Pe=n??(a?"right":"bottom"),ft=Pe==="left"||Pe==="right",Tt=o??!1,Ne=A!==void 0,[It,qt]=Jt.useState(!1),P=Ne?A:It,ze=Jt.useCallback(_e=>{Ne||qt(_e),U?.(_e)},[Ne,U]),B=Jt.useCallback(()=>ze(!1),[ze]);On(P,B);let[oe,se]=Jt.useState(null),[fe,mt]=Jt.useState("top"),[Dt,yt]=Jt.useState(null),[hr,br]=Jt.useState("wallet"),[jt,Dr]=Jt.useState(null),[sr,ee]=Jt.useState(null);Jt.useEffect(()=>{P||(br("wallet"),Dr(null),ee(null))},[P]),Jt.useEffect(()=>{Lo(h)},[h]);let Te=Jt.useCallback(()=>{fl(h),C?.()},[C,h]),j=Jt.useMemo(()=>({env:er,theme:t,isMobile:Ve,open:P,drawerDirection:Pe,modal:Tt,showBalance:a,showForgeToken:i,showGameToken:s,showQR:l,showBridge:d,qrLogoSrc:c,walletAddress:h,accountName:u,sendAccounts:m,profileImageUrl:y,connectorName:Ut,connectorIconUrl:Lt,preferredTokens:w,close:B,onSelectWallet:g,onCopyAddress:x,onBuy:k,onBuyDisabledMessage:R,onBridgeDisabledMessage:I,onSendDisabledMessage:S,onDisconnect:C?Te:void 0,disconnectLabel:E,termsUrl:M,termsLabel:F,privacyUrl:L,privacyLabel:z,portalStyle:nt,navContent:oe,navPosition:fe,setNavContent:se,setNavPosition:mt,footerContent:Dt,setFooterContent:yt,view:hr,setView:br,selectedSendToken:jt,setSelectedSendToken:Dr,selectedDetailToken:sr,setSelectedDetailToken:ee,showPortfolio:re,showOnePop:Y,onePopSummary:_,onOnePopOpen:G,onOnePopSend:ne,onOnePopClaim:te,onOnePopActivity:O,onePopGetTokenSlot:Z,onePopLogoSrc:H,onePopHeroSrc:ce,portfolioTitle:ve,portfolioSections:ge,showTotalAssets:ue,totalAssetsLabel:me,sendTransaction:we,getTransactionReceipt:Ze,estimateGas:he,onOutlink:Ee,lpBalanceReader:at,stakingRewardsReader:Qe,bridgeTokens:We,bridgeHistory:Be,getBridgeQuote:rt,getBridgeToTokens:Nt,getBridgeApproval:ut,approveBridge:xt,submitBridge:be,onReceive:Vt,onBridge:bt,onSend:wt}),[er,t,Ve,P,Pe,Tt,a,i,s,l,d,c,h,u,m,y,Ut,Lt,w,B,g,x,k,R,I,S,C,Te,E,M,F,L,z,nt,oe,fe,Dt,hr,jt,sr,re,Y,_,G,ne,te,O,Z,H,ce,ve,ge,ue,me,we,Ze,he,Ee,at,Qe,We,Be,rt,Nt,ut,xt,be,Vt,bt,wt]);return $l(ll.Provider,{value:j,children:Ve?$l(Px.Root,{direction:Pe,open:P,onOpenChange:ze,handleOnly:ft,noBodyStyles:!0,repositionInputs:!1,children:et},"drawer"):$l(nm.Root,{open:P,onOpenChange:ze,children:et},"popover")})}var Ko=Object.assign(Ox,{Trigger:dp,Content:Jf,Nav:em,Footer:rm});import*as Ke from"react";import*as Es from"react";import{createContext as Bx,useContext as zx}from"react";var ed=Bx(null);function Ma(){let e=zx(ed);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}import*as Um from"react";import{createContext as Fx,useContext as Ux}from"react";var us=Fx(null);function ln(){let e=Ux(us);if(!e)throw new Error("ResponsiveShell compound components must be used within <ResponsiveShell>");return e}import{createContext as jx,useContext as Wx,useLayoutEffect as _x,useState as Gx}from"react";function om(){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 td=jx(null);function Hx(){let e=Wx(td);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}function am(){let e=Hx(),[t,r]=Gx(e.getSnapshot);return _x(()=>(r(e.getSnapshot()),e.subscribe(()=>r(e.getSnapshot()))),[e]),t}de(`.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
|
+
`);import{jsx as Yn,jsxs as dn}from"react/jsx-runtime";function im({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?dn("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:[Yn("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),Yn("span",{children:n})]},`live:${t.phase}:${n}`):e.remaining!==void 0?dn("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:[Yn("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),dn("span",{children:["Waiting for"," ",dn("b",{children:[e.remaining," ",e.symbol]})," ","more to arrive at the processing address."]})]},`pending:${e.remaining}:${e.symbol}`):null}function sm({minNotice:e,onlySend:t,showWalletCreditNote:r=!1}){return dn("div",{className:"rd-checklist","data-rd-checklist":"",children:[dn("div",{className:"rd-checklist-row","data-rd-checklist-only":"",children:[Yn("span",{className:"rd-checklist-mark rd-checklist-mark-warn","aria-hidden":"true",children:"!"}),dn("span",{children:[dn("b",{children:[t.chainName," ",t.symbol," only"]})," \xB7 ",dn("b",{className:"rd-checklist-accent",children:[e.min," ",e.symbol," minimum"]})]})]}),dn("div",{className:"rd-checklist-row",children:[Yn("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u21BB"}),Yn("span",{children:"Reusable \u2014 deposit as many times as you like"})]}),r&&dn("div",{className:"rd-checklist-row rd-checklist-credit","data-rd-checklist-credit":"",children:[Yn("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u2192"}),Yn("span",{children:"Credited to your ONEchain wallet"})]})]})}import{useEffect as rv,useId as nv,useState as cm}from"react";var Aa="0x0000000000000000000000000000000000000000",Qx=/^0x[0-9a-fA-F]{40}$/;function lt(e){return Qx.test(e)}function Gt(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 fs(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}import{useId as Kn}from"react";var rd="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTQwIDU0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc0MDAwXzM4NTkwKSI+CjxtYXNrIGlkPSJtYXNrMF83NDAwMF8zODU5MCIgc3R5bGU9Im1hc2stdHlwZTpsdW1pbmFuY2UiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjAiIHk9IjAiIHdpZHRoPSI1NDAiIGhlaWdodD0iNTQwIj4KPHBhdGggZD0iTTI3MCAwQzU2Ljg1NjMgMCAwIDU2Ljg1NjMgMCAyNzBDMCA0ODMuMTQ0IDU2Ljg1NjMgNTQwIDI3MCA1NDBDNDgzLjE0NCA1NDAgNTQwIDQ4My4xNDQgNTQwIDI3MEM1NDAgNTYuODU2MyA0ODMuMTQ0IDAgMjcwIDBaIiBmaWxsPSJ3aGl0ZSIvPgo8L21hc2s+CjxnIG1hc2s9InVybCgjbWFzazBfNzQwMDBfMzg1OTApIj4KPHBhdGggZD0iTTUzOS43MzEgMC4yNzA1MDhIMFY1NDAuMDAxSDUzOS43MzFWMC4yNzA1MDhaIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfNzQwMDBfMzg1OTApIi8+CjxwYXRoIGQ9Ik0xODguNjIzIDU0MC4wMDFINTM5Ljg2NVYxMDIuOTM2TDE4OC42MjMgMz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uSGDa8qW09Sft5Nlsz0gQO4CFLEeb1ecgg11vySmT7YHNsHKQyj/TplrhWf6ARbMtMHG2Nrf9F1qV+7UFaQF2zITB9si42DFP6xfufizWRF+TAeMtMHW2LTIEU+rNwl+wsh70QjMn2wHTYMUuQfCjsWbSn7wFeEqIl/SmT6TMRW2CxIkf+gemaYjNC7JZHpg02wDTYKUrQ+rHVZxVJynXu0PJ8LmXPasZDnYANsgU2CFG0DhVdkCsKMm+J2JOZi5szcgxRt/SKnaPeCTiU3eqrS6r2KKHNjjkGK9of1Lu73r/W79OpQ2KXkHHk+o7G7CGNuKxLxXMbM2JkDc2FOQYoUAOx2049/l4Cd3UQs10mS60vhtfzsPBLxbMbE2BgjY2XMQYoU2UIavS+2XseiDaQQ+d4iovOpeB8W5WkM3YazDIQ7K/zsRn4Xv5PfzRgYC2MKUqSIs1tC4dWZZTl4UVtZ9q7HiUehi/h775H//4aI7z0OZ5LeVJvNw/fyM/wsn8Fn8Zl8Nr+D36Wvsp/if7BfCn8ECvocAAAAAElFTkSuQmCC";function lm(e){switch(e.toUpperCase()){case"ONEUSD":return rd;case"PONEUSD":return Vx;case"USDT":return qx;case"USDC":return Yx;default:return}}import{jsx as $,jsxs as $t}from"react/jsx-runtime";function dm(e){let t=e.trim();return t?t.slice(0,2).toUpperCase():"?"}function Kx({size:e,bg:t,fg:r="#ffffff",children:n}){return $t("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:[$("circle",{cx:"12",cy:"12",r:"12",fill:t}),$("g",{fill:r,stroke:r,children:n})]})}function nd({size:e,bg:t,fg:r="#ffffff",text:n}){return $(Kx,{size:e,bg:t,fg:r,children:$("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",fontSize:"10",fontWeight:700,fontFamily:"inherit",stroke:"none",fill:r,children:n})})}function Zo({size:e,viewBox:t="0 0 24 24",children:r}){return $("svg",{width:e,height:e,viewBox:t,"aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:r})}function Zx({size:e}){let t=Kn();return $t(Zo,{size:e,children:[$t("g",{clipPath:`url(#${t})`,children:[$("path",{fill:"#000",d:"M24 0H0v24h24z"}),$("path",{fill:"#8FFCF3",d:"M12 4v5.912l5 2.237z"}),$("path",{fill:"#CABCF8",d:"m12 4-5 8.148 5-2.235z"}),$("path",{fill:"#CBA7F5",d:"M12 15.98V20l5-6.92z"}),$("path",{fill:"#74A0F3",d:"M12 20v-4.02l-5-2.9z"}),$("path",{fill:"#CBA7F5",d:"m12 15.049 5-2.9-5-2.236z"}),$("path",{fill:"#74A0F3",d:"m7 12.149 5 2.9V9.913z"}),$("path",{fill:"#202699",fillRule:"evenodd",clipRule:"evenodd",d:"m12 15.048-5-2.9L12 4l5 8.148zm-4.67-3.136 4.588-7.475v5.435zm-.068.204 4.656-2.068v4.768zm4.816-2.068v4.768l4.653-2.7zm0-.176 4.588 2.04-4.588-7.475z"}),$("path",{fill:"#202699",fillRule:"evenodd",clipRule:"evenodd",d:"m12 15.917-5-2.84L12 20l5-6.924zm-4.44-2.341 4.36 2.48v3.56zm4.519 2.48v3.56l4.36-6.04z"})]}),$("defs",{children:$("clipPath",{id:t,children:$("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function Xx({size:e}){let t=Kn();return $t(Zo,{size:e,children:[$t("g",{clipPath:`url(#${t})`,children:[$("path",{fill:"#F0B90B",d:"M24 0H0v24h24z"}),$("path",{fill:"#fff",d:"M7.635 6.449 12 4l4.364 2.449-1.6.907L12 5.809 9.24 7.356zm8.73 3.093-1.6-.906L12 10.182 9.24 8.636l-1.605.906v1.81l2.756 1.546v3.089l1.609.906 1.604-.906v-3.09l2.76-1.546zm0 4.903V12.63l-1.6.907v1.809zm1.141.64-2.76 1.542v1.813l4.365-2.453v-4.898l-1.605.902zm-1.604-7.09 1.6.907v1.81l1.609-.903V7.996l-1.605-.907L15.902 8zm-5.511 9.29v1.808L12 20l1.604-.907V17.29l-1.604.9-1.605-.907zM7.635 14.44l1.6.907v-1.81l-1.6-.906v1.813zm2.756-6.444L12 8.902l1.604-.906L12 7.089 10.395 8zm-3.898.906 1.605-.906-1.6-.907L4.888 8v1.813l1.605.903zm0 3.09-1.604-.903v4.898l4.364 2.453v-1.818L6.498 15.08v-3.093z"})]}),$("defs",{children:$("clipPath",{id:t,children:$("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function Jx({size:e}){let t=Kn();return $t(Zo,{size:e,viewBox:"0 0 111 111",children:[$t("g",{clipPath:`url(#${t})`,children:[$("path",{fill:"#fff",d:"M0 0h111v111H0z"}),$("path",{fill:"#0052FF",d:"M54.921 110.034C85.359 110.034 110.034 85.402 110.034 55.017C110.034 24.6319 85.359 0 54.921 0C26.0432 0 2.35281 22.1714 0 50.3923H72.8467V59.6416H0C2.35281 87.8625 26.0432 110.034 54.921 110.034Z"})]}),$("defs",{children:$("clipPath",{id:t,children:$("path",{fill:"#fff",d:"M0 0h111v111H0z"})})})]})}function $x({size:e}){let t=Kn();return $t(Zo,{size:e,children:[$t("g",{clipPath:`url(#${t})`,children:[$("path",{fill:"#213147",d:"M24 0H0v24h24z"}),$("path",{fill:"#fff",d:"m13.203 13.216-.787 2.124a.27.27 0 0 0 0 .183l1.354 3.655 1.565-.89-1.879-5.072c-.042-.117-.21-.117-.253 0m1.577-3.573a.135.135 0 0 0-.253 0l-.787 2.124a.27.27 0 0 0 0 .183l2.217 5.985 1.565-.89z"}),$("path",{fill:"#fff",d:"M11.999 4.991a.24.24 0 0 1 .111.03l5.969 3.393a.22.22 0 0 1 .112.19v6.787a.22.22 0 0 1-.112.19l-5.969 3.395a.2.2 0 0 1-.111.029.24.24 0 0 1-.113-.03l-5.968-3.39a.22.22 0 0 1-.112-.19v-6.79a.22.22 0 0 1 .112-.19l5.969-3.393a.23.23 0 0 1 .111-.03m0-.991c-.213 0-.426.054-.616.163L5.416 7.556a1.21 1.21 0 0 0-.616 1.05v6.787c0 .433.234.834.616 1.05l5.968 3.394a1.25 1.25 0 0 0 1.232 0l5.968-3.394a1.21 1.21 0 0 0 .616-1.05V8.606a1.21 1.21 0 0 0-.616-1.05l-5.97-3.393A1.24 1.24 0 0 0 11.998 4"}),$("path",{fill:"#fff",d:"m8.052 17.943.55-1.482 1.105.905-1.034.93zm3.445-9.823H9.984a.27.27 0 0 0-.254.175l-3.243 8.757 1.565.89L11.623 8.3a.132.132 0 0 0-.127-.179"}),$("path",{fill:"#fff",d:"M14.144 8.12h-1.513a.27.27 0 0 0-.253.175l-3.704 10 1.565.89 4.032-10.886a.133.133 0 0 0-.127-.179"})]}),$("defs",{children:$("clipPath",{id:t,children:$("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function ev({size:e}){let t=Kn(),r=Kn();return $t(Zo,{size:e,children:[$t("g",{clipPath:`url(#${t})`,children:[$("path",{fill:`url(#${r})`,d:"M24 0H0v24h24z"}),$("path",{fill:"#fff",d:"m15.88 14.86 3.794-2.165a.64.64 0 0 0 .326-.558v-4.33a.64.64 0 0 0-.326-.556L15.88 5.086a.66.66 0 0 0-.65 0L11.432 7.25a.64.64 0 0 0-.325.557v7.737l-2.662 1.517-2.661-1.517v-3.036l2.661-1.517 1.755 1.001V9.958l-1.43-.816a.66.66 0 0 0-.65 0l-3.796 2.165a.64.64 0 0 0-.325.557v4.33c0 .229.124.442.325.557l3.796 2.165c.2.114.45.114.65 0l3.796-2.165a.64.64 0 0 0 .325-.557V8.455l.048-.026 2.613-1.49 2.661 1.516v3.036l-2.661 1.517-1.753-.999v2.037l1.427.814a.66.66 0 0 0 .651 0z"})]}),$t("defs",{children:[$t("linearGradient",{id:r,x1:"3.948",x2:"19.217",y1:"16.617",y2:"7.645",gradientUnits:"userSpaceOnUse",children:[$("stop",{stopColor:"#A726C1"}),$("stop",{offset:".88",stopColor:"#803BDF"}),$("stop",{offset:"1",stopColor:"#7B3FE4"})]}),$("clipPath",{id:t,children:$("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function tv({size:e}){let t=Kn(),r=Kn();return $t(Zo,{size:e,children:[$t("g",{clipPath:`url(#${t})`,children:[$("path",{fill:`url(#${r})`,d:"M24 0H0v24h24z"}),$("path",{fill:"#fff",d:"M17.7 8.358a.55.55 0 0 1-.365.145H4.515c-.455 0-.684-.52-.37-.825l2.106-2.03a.54.54 0 0 1 .364-.15h12.87c.46 0 .685.524.365.83zm0 10.005c-.1.09-.23.14-.365.14H4.515c-.455 0-.684-.516-.37-.82l2.106-2.036a.53.53 0 0 1 .364-.145h12.87c.46 0 .685.52.365.825zm0-7.72a.55.55 0 0 0-.365-.14H4.515c-.455 0-.684.515-.37.82l2.106 2.035c.1.091.23.143.364.144h12.87c.46 0 .685-.52.365-.824z"})]}),$t("defs",{children:[$t("linearGradient",{id:r,x1:"4.001",x2:"20.408",y1:"50.258",y2:"50.108",gradientUnits:"userSpaceOnUse",children:[$("stop",{stopColor:"#599DB0"}),$("stop",{offset:"1",stopColor:"#47F8C3"})]}),$("clipPath",{id:t,children:$("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function ms({chainId:e,chainName:t,size:r=20}){switch(e){case 1:return $(Zx,{size:r});case 56:return $(Xx,{size:r});case 8453:return $(Jx,{size:r});case 42161:return $($x,{size:r});case 137:return $(ev,{size:r});case 792703809:return $(tv,{size:r});case 612055:return $(nd,{size:r,bg:"#0b1f3a",text:"CR"});default:return $(nd,{size:r,bg:"#676b7a",text:dm(t??String(e))})}}function ko({symbol:e,logoUrl:t,size:r=20}){let n=t&&t.trim().length>0?t.trim():lm(e);return n?$("img",{src:n,alt:"","aria-hidden":"true",width:r,height:r,style:{display:"block",flex:"none",borderRadius:"50%",objectFit:"cover"}}):$(nd,{size:r,bg:"#676b7a",text:dm(e)})}import{QRCodeSVG as ov}from"qrcode.react";import{Fragment as gs,jsx as dt,jsxs as Ft}from"react/jsx-runtime";function hs(){return Ft("div",{className:"rd-deposit-head","data-testid":"rd-address-skeleton","aria-hidden":"true",children:[dt("span",{className:"rd-skeleton rd-skeleton-qr"}),dt("span",{className:"rd-skeleton rd-skeleton-address"})]})}function av(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 iv(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 pm({depositAddress:e,originChainId:t,originChainName:r,originCurrency:n,amount:o,tokenSymbol:a,tokenDecimals:i,kind:s="evm",depositState:l,onDeposit:d,canDeposit:c,oneClickEnabled:h=!0}){let[u,m]=cm(!1),[y,b]=cm("address"),f=nv();rv(()=>{b("address")},[e]);let p=n.toLowerCase()===Aa,w=s==="svm";async function g(){try{await navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),1500)}catch{}}let x;if(o)try{let A=BigInt(o);A>0n&&(x=A)}catch{}let k=x!==void 0,R;if(k)try{R=Gt(x,i)}catch{R=o}let I=w?iv({depositAddress:e,splMint:n,humanAmount:R??""}):av({depositAddress:e,originChainId:t,originCurrency:n,amountWei:x,isNative:p}),{isSubmitting:S,isConfirming:C,isConfirmed:E,needsSwitch:M,txHash:F,reverted:L,error:z}=l;return Ft("section",{className:"rd-stack",children:[Ft("div",{className:"rd-deposit-head","data-compact-view":y,children:[Ft("div",{className:"rd-deposit-qr-pane",children:[Ft("div",{className:"rd-deposit-qr",children:[dt(ov,{value:I,size:144,level:"H"}),dt("span",{className:"rd-deposit-qr-badge","aria-hidden":"true",children:dt(ms,{chainId:t,chainName:r,size:28})})]}),dt("button",{type:"button",className:"rd-mobile-address-toggle","aria-label":"Show address and copy",onClick:()=>b("address"),children:Ft("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[dt("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2.25",stroke:"currentColor",strokeWidth:"1.8"}),dt("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"})]})})]}),Ft("div",{className:"rd-deposit-address",children:[dt("span",{className:"rd-deposit-address-label",children:Ft("button",{type:"button",className:"rd-address-term","aria-describedby":f,children:["Deposit address",dt("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."})]})}),dt("button",{type:"button",className:"rd-mobile-qr-toggle","aria-label":"Show deposit QR code","aria-pressed":y==="qr",onClick:()=>b("qr"),children:dt("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:dt("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"})})}),dt("span",{className:"rd-address-full",title:e,children:e}),Ft("button",{type:"button",className:"rd-address-copy",onClick:g,"aria-label":`Copy deposit address ${e}`,children:[u?dt("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:dt("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):Ft("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[dt("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),dt("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"})]}),dt("span",{"aria-live":"polite",children:u?"Copied":"Copy address"})]})]})]}),!w&&c&&Ft(gs,{children:[dt("button",{type:"button",className:"rd-button-primary rd-button-block",onClick:d,disabled:S||C||E&&!L,children:E&&!L?"Deposit sent":C?"Confirming...":S?M?"Switching network...":"Confirm in wallet...":`One-click deposit ${a}${M?` (switch to ${r})`:""}`}),z&&dt("div",{className:"rd-callout rd-callout-danger",children:z}),F&&Ft("p",{className:"rd-card-hint",children:["Tx: ",dt("span",{style:{fontFamily:"monospace"},children:F})]}),E&&L&&dt("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),E&&!L&&dt("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."})]}),w&&Ft("div",{className:"rd-callout rd-callout-muted",children:["Pay from a Solana wallet (e.g. Phantom). Scan the QR or copy the address above and send"," ",k?Ft(gs,{children:["exactly"," ",Ft("strong",{children:[R," ",a]})]}):Ft(gs,{children:["any amount of ",dt("strong",{children:a})]}),"."]}),(k||!w&&!c&&h)&&Ft("p",{className:"rd-card-hint",children:[k&&Ft(gs,{children:["Send exactly"," ",Ft("strong",{children:[R," ",a]})," ","on ",r," to this address."]}),!w&&!c&&h&&!k&&"Enter an amount to deposit in one click."]})]})}import{useEffect as sv,useId as lv,useRef as um,useState as od}from"react";import*as Zn from"@radix-ui/react-popover";import{jsx as yn,jsxs as La}from"react/jsx-runtime";function Da({value:e,options:t,onChange:r,disabled:n,ariaLabel:o,id:a}){let i=lv(),s=a??i,l=`${s}-listbox`,[d,c]=od(!1),h=t.findIndex(E=>E.value===e),[u,m]=od(h>=0?h:0),y=um(null),b=um([]),f=!!n||t.length===0,p=h>=0?t[h]:void 0;sv(()=>{d&&b.current[u]?.scrollIntoView?.({block:"nearest"})},[d,u]);let[w,g]=od(null);function x(){f||(g(y.current?.closest("[data-theme]")?.getAttribute("data-theme")??null),m(h>=0?h:0),c(!0))}function k(E){c(!1),E&&y.current?.focus()}function R(E){let M=t[E];M&&(r(M.value),k(!0))}function I(){f||(d?k(!1):x())}function S(E){if(!f)switch(E.key){case"ArrowDown":E.preventDefault(),d?m(M=>Math.min(M+1,t.length-1)):x();break;case"ArrowUp":E.preventDefault(),d?m(M=>Math.max(M-1,0)):x();break;case"Enter":case" ":E.preventDefault(),d?R(u):x();break;case"Escape":d&&(E.preventDefault(),k(!0));break;case"Tab":d&&c(!1);break;default:break}}let C=d&&t[u]?`${s}-option-${u}`:void 0;return yn(Zn.Root,{open:d,onOpenChange:E=>E?x():k(!1),children:La("div",{className:"rd-dropdown",children:[yn(Zn.Trigger,{asChild:!0,children:La("button",{type:"button",id:s,ref:y,className:"rd-dropdown-trigger","aria-haspopup":"listbox","aria-expanded":d,"aria-controls":l,"aria-activedescendant":C,"aria-label":o,disabled:f,onClick:I,onKeyDown:S,children:[La("span",{className:"rd-dropdown-trigger-content",children:[p?.icon,La("span",{className:"rd-dropdown-trigger-label",children:[p?.label??"",p?.subLabel&&yn("small",{className:"rd-dropdown-trigger-sub",children:p.subLabel})]})]}),yn("span",{className:"rd-dropdown-chevron","aria-hidden":"true",children:yn(Or,{size:16})})]})}),d&&yn(Zn.Portal,{children:yn(Zn.Content,{className:"rd-dropdown-popover","data-theme":w??void 0,side:"bottom",align:"start",sideOffset:5,collisionPadding:12,onOpenAutoFocus:E=>E.preventDefault(),onCloseAutoFocus:E=>E.preventDefault(),children:yn("ul",{className:"rd-dropdown-listbox",role:"listbox",id:l,"aria-label":o,tabIndex:-1,"data-vaul-no-drag":!0,children:t.map((E,M)=>{let F=E.value===e,L=M===u;return La("li",{id:`${s}-option-${M}`,role:"option","aria-selected":F,ref:z=>{b.current[M]=z},className:["rd-dropdown-option",L?"rd-dropdown-option-active":"",F?"rd-dropdown-option-selected":""].filter(Boolean).join(" "),onPointerEnter:()=>m(M),onClick:z=>{z.preventDefault(),R(M)},children:[E.icon,yn("span",{className:"rd-dropdown-option-label",children:E.label}),F&&yn("span",{className:"rd-dropdown-option-check","aria-hidden":"true",children:"\u2713"})]},E.value)})})})})]})})}import{Fragment as ad,jsx as Xn,jsxs as Hr}from"react/jsx-runtime";function dv(e,t){if(!e)return"--";try{return Gt(BigInt(e),t)}catch{return"--"}}function fm({quote:e,isLoading:t,error:r,humanAmount:n,originSymbol:o,destination:a}){return Hr("div",{className:"rd-stack","data-rd-quote-preview":"",children:[t&&Hr("div",{className:"rd-quote-strip","data-testid":"rd-quote-skeleton",children:[Xn("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"}),Xn("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),Xn("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"})]}),!t&&r&&Hr("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a quote: ",r.message]}),!t&&!r&&e&&o&&Hr(ad,{children:[Hr("div",{className:"rd-quote-strip",children:[Hr("span",{className:"rd-quote-strip-side",children:[Hr("b",{children:[n," ",o]}),Xn("small",{children:"You send"})]}),Xn("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),Hr("span",{className:"rd-quote-strip-side rd-quote-strip-end",children:[Hr("b",{children:["~",dv(e.expectedCrossd,a.decimals)," ",a.symbol]}),Xn("small",{children:"You receive"})]})]}),e.belowMin&&Xn("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)&&Hr("p",{className:"rd-quote-strip-hint",children:[e.feeUsd&&Hr(ad,{children:["Bridge fee: $",e.feeUsd,", already deducted from the amount above. You also pay your own network fee to send the deposit."," "]}),e.assumesParity&&Hr(ad,{children:["Assumes 1:1 parity between bridged USDT and ",a.symbol,"; the final amount may differ slightly."]})]})]}),!t&&!r&&!e&&Xn("p",{className:"rd-muted",children:"Enter an amount to see a quote."})]})}import{useMemo as hm}from"react";var mm={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 gm(e,t){let r=mm[e];if(!(!r||!t))return{url:`${r.base}/token/${t}`,name:r.name}}var cv={1:"Ethereum",56:"BNB Smart Chain",137:"Polygon",8453:"Base",42161:"Arbitrum",612055:"ONEchain",792703809:"Solana"};function Xo(e){return cv[e]??`Chain ${e}`}function bs(e,t){let r=mm[e];if(!(!r||!t))return{url:`${r.base}/tx/${t}`,name:r.name}}import{jsx as Qr,jsxs as Jn}from"react/jsx-runtime";function pv(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 bm(e,t){return t===void 0?[]:e.origins.filter(r=>r.chainId===t)}function uv(e,t){let r=Gt(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 wm({catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:a=!0,balance:i,balanceLoading:s,insufficientBalance:l,onMax:d,disabled:c}){let h=hm(()=>pv(e),[e]),u=hm(()=>bm(e,t?.chainId),[e,t?.chainId]);function m(p){let w=Number(p),g=bm(e,w)[0];g&&r(g)}function y(p){let w=u.find(g=>g.token.address.toLowerCase()===p.toLowerCase());w&&r(w)}let b=i?`${uv(i.value,i.decimals)} ${i.symbol}`:void 0,f=l?`Amount exceeds your balance${b?` (${b})`:""}`:void 0;return Jn("section",{className:"rd-stack","data-rd-source-form":"",children:[Jn("div",{className:"rd-field",children:[Jn("div",{className:"rd-field-label-row",children:[Qr("span",{className:"rd-field-label",children:"From"}),t&&(()=>{let p=gm(t.chainId,t.token.address);return p?Jn("a",{className:"rd-token-explorer-link",href:p.url,target:"_blank",rel:"noopener noreferrer",title:`View ${t.token.symbol} on ${p.name}`,children:[p.name," \u2197"]}):null})()]}),Jn("div",{className:"rd-field-row",children:[Qr(Da,{ariaLabel:"Origin chain",value:t?String(t.chainId):"",onChange:m,disabled:c,options:h.map(p=>({value:String(p.chainId),label:p.chainName,subLabel:"Network",icon:Qr(ms,{chainId:p.chainId,chainName:p.chainName,size:22})}))}),Qr(Da,{ariaLabel:"Token",value:t?.token.address??"",onChange:y,disabled:c||u.length===0,options:u.map(p=>({value:p.token.address,label:p.token.symbol,subLabel:`${p.token.decimals} decimals`,icon:Qr(ko,{symbol:p.token.symbol,logoUrl:p.token.logoUrl,size:22})}))})]})]}),a&&Jn("label",{className:"rd-field",children:[Qr("span",{className:"rd-field-label",children:"Amount (optional)"}),Jn("div",{className:"rd-amount-input","data-rd-invalid":f?"":void 0,children:[Qr("input",{type:"text",inputMode:"decimal",placeholder:"0.0",value:n,onChange:p=>{let w=p.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:c||!t,"data-vaul-no-drag":!0}),t&&Qr("span",{className:"rd-amount-input-suffix",children:t.token.symbol}),d&&!c&&Qr("button",{type:"button",className:"rd-amount-input-max",onClick:d,disabled:c||!t,children:"Max"})]}),(b||s)&&Jn("span",{className:"rd-amount-meta",children:[Qr("span",{}),Qr("span",{children:s?"Balance: \u2026":b?`Balance: ${b}`:""})]}),f&&Qr("span",{className:"rd-callout rd-callout-danger",children:f})]})]})}import{Fragment as ym,jsx as Ue,jsxs as gr}from"react/jsx-runtime";function xm({catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:a,minNotice:i,amountHint:s,onMax:l,recipient:d,onChangeRecipient:c,showRecipientInput:h,recipientValid:u,balance:m,balanceLoading:y,insufficientBalance:b,targetOptions:f,selectedTarget:p,onChangeTarget:w,showTargetSelector:g,quote:x,quoteLoading:k,quoteError:R,depositAddress:I,depositAddressLoading:S,depositAddressError:C,arrivalStatus:E,amountSmallestUnits:M,depositState:F,onDeposit:L,canDeposit:z,oneClickEnabled:A,locked:U,onRequestConnect:re}){let Y=f.length>1&&g,{phase:_,isSubmitting:G,isConfirming:ne,isConfirmed:te,needsSwitch:O,reverted:Z,error:H}=F,ce=p?.symbol??e.destination.symbol;return gr(ym,{children:[i&&Ue(im,{minNotice:i,arrivalStatus:E}),U?gr("section",{className:"rd-locked-card","data-rd-locked":"",children:[Ue("span",{className:"rd-locked-glyph","aria-hidden":"true",children:gr("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[Ue("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"}),Ue("path",{d:"M4 9h15",stroke:"currentColor",strokeWidth:"1.7"}),Ue("path",{d:"M15 11.5h5v4h-5a2 2 0 0 1 0-4Z",fill:"currentColor",opacity:"0.18",stroke:"currentColor",strokeWidth:"1.5"}),Ue("circle",{cx:"15.7",cy:"13.5",r:"0.8",fill:"currentColor"})]})}),Ue("h3",{className:"rd-locked-title",children:"Connect your wallet"}),Ue("p",{className:"rd-locked-text",children:"Connect to get your personal deposit address."}),h&&Ue("p",{className:"rd-card-hint",children:"Or enter a recipient address to get one without connecting."}),re&&gr("button",{type:"button",className:"rd-button-primary rd-locked-action","data-track":"connect",onClick:re,children:[gr("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[Ue("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"}),Ue("path",{d:"M15 10.5h5v4h-5a2 2 0 0 1 0-4Z",stroke:"currentColor",strokeWidth:"1.8"})]}),"Connect Wallet"]})]}):I?Ue(pm,{depositAddress:I,originChainId:t.chainId,originChainName:t.chainName,originCurrency:t.token.address,amount:M,tokenSymbol:t.token.symbol,tokenDecimals:t.token.decimals,depositState:F,onDeposit:L,canDeposit:z,oneClickEnabled:A}):S?gr(ym,{children:[Ue(hs,{}),A&&M&&Ue("span",{className:"rd-skeleton rd-skeleton-cta","aria-hidden":"true"}),Ue("p",{className:"rd-sr-only",role:"status",children:"Preparing your deposit address..."})]}):C?gr("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a deposit address: ",C.message]}):null,Ue(wm,{catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:a,balance:m,balanceLoading:y,insufficientBalance:b,onMax:l}),gr("div",{className:"rd-field","data-rd-delivery":"",children:[Ue("span",{className:"rd-field-label",children:"Deliver as"}),Y?Ue(Da,{ariaLabel:"Delivery token",value:p?.symbol??"",onChange:w,options:f.map(ve=>({value:ve.symbol,label:ve.symbol,subLabel:"on ONEchain",icon:Ue(ko,{symbol:ve.symbol,size:22})}))}):gr("div",{className:"rd-static-target",children:[Ue(ko,{symbol:ce,size:22}),Ue("span",{children:ce})]}),h&&gr("label",{className:"rd-delivery-recipient",children:[Ue("input",{type:"text",placeholder:"0x...","aria-label":"ONEchain recipient address",value:d,onChange:ve=>c(ve.target.value),"data-vaul-no-drag":!0}),Ue("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&&Ue("span",{className:"rd-callout rd-callout-danger",children:"Not a valid address"})]})]}),p?.external&&gr("div",{className:"rd-callout rd-callout-muted",children:["Delivered as ",p.symbol," via an external adapter."]}),s&&Ue("div",{className:"rd-callout rd-callout-warning","data-rd-amount-hint":"",children:s}),n.trim()&&Ue(fm,{quote:x,isLoading:k,error:R,humanAmount:n,originSymbol:t.token.symbol,destination:e.destination}),i&&Ue(sm,{minNotice:i,onlySend:{symbol:t.token.symbol,chainName:t.chainName},showWalletCreditNote:!h&&u}),A&&_!=="idle"&&!z&&gr("div",{className:"rd-card",children:[G&&gr("p",{className:"rd-muted",children:[Ue("span",{className:"rd-spinner"})," ",O?"Switching network...":"Confirm in wallet..."]}),ne&&gr("p",{className:"rd-muted",children:[Ue("span",{className:"rd-spinner"})," Confirming..."]}),F.txHash&&gr("p",{className:"rd-card-hint",children:["Tx: ",Ue("span",{style:{fontFamily:"monospace"},children:F.txHash})]}),te&&Z&&Ue("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),te&&!Z&&Ue("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."}),H&&Ue("div",{className:"rd-callout rd-callout-danger",children:H})]})]})}import{useEffect as fv,useId as mv,useRef as vm,useState as id}from"react";import{createPortal as gv}from"react-dom";import{Fragment as ld,jsx as ke,jsxs as ct}from"react/jsx-runtime";function Oa({requiresIdentity:e=!1}){return ct("div",{className:"rd-history-empty",role:"status","data-variant":e?"disconnected":"empty","data-testid":e?"rd-history-empty-state":"rd-history-no-transfers",children:[ke("span",{className:"rd-history-empty-icon","aria-hidden":"true",children:ct("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[ke("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"}),ke("path",{d:"M14 3.8V7h3",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"}),ke("circle",{cx:"16.5",cy:"16.5",r:"3.7",stroke:"currentColor",strokeWidth:"1.7"}),ke("path",{d:"M16.5 14.5v2.2l1.4.8",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ke("h3",{className:"rd-history-empty-title",children:e?"Connect to view history":"No transfers yet"}),ke("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&&ct("span",{className:"rd-history-empty-live",children:[ke("span",{"aria-hidden":"true"}),"Updates automatically"]})]})}var Pa=56;function Rm(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function hv(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 bv(e){return e==="COMPLETED"?"rd-status-pill rd-status-pill-success":Rm(e)?"rd-status-pill rd-status-pill-failure":"rd-status-pill"}function ws(e,t){if(e){if(t===void 0)return e;try{return Gt(BigInt(e),t)}catch{return e}}}function wv(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 yv(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function km(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function sd({amount:e,symbol:t,className:r}){let n=e?`${e}${t?` ${t}`:""}`:"",o=mv(),a=vm(null),i=vm(null),[s,l]=id(!1),[d,c]=id({top:-9999,left:-9999,visibility:"hidden"});return fv(()=>{if(!s)return;let h=()=>{let u=a.current,m=i.current;if(!u||!m)return;let y=u.getBoundingClientRect(),b=m.getBoundingClientRect(),f=12,p=8,w=Math.max(f,window.innerWidth-b.width-f),g=Math.min(Math.max(y.left+y.width/2-b.width/2,f),w),x=y.top-b.height-p,k=x>=f?x:y.bottom+p,R=Math.max(f,window.innerHeight-b.height-f),I=Math.min(Math.max(k,f),R),S=window.getComputedStyle(u);c({top:I,left:g,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 h(),window.addEventListener("resize",h),window.addEventListener("scroll",h,!0),()=>{window.removeEventListener("resize",h),window.removeEventListener("scroll",h,!0)}},[s]),e?ct(ld,{children:[ct("span",{ref:a,className:r,"aria-label":n,"aria-describedby":s?o:void 0,"data-full-value":n,onMouseEnter:()=>{c({top:-9999,left:-9999,visibility:"hidden"}),l(!0)},onMouseLeave:()=>l(!1),children:[wv(e),t?` ${t}`:""]}),s&&typeof document<"u"&&gv(ke("span",{ref:i,id:o,role:"tooltip","data-rd-history-floating-tooltip":"",style:d,children:n}),document.body)]}):ke("span",{className:r,children:"-"})}function xv(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 vv(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 ys({label:e,chainId:t,txHash:r,amount:n,shared:o,missingLabel:a="Pending"}){let i=r?bs(t,r):void 0;return ct("div",{className:"rd-history-step",children:[ke("span",{className:`rd-history-step-dot${r?" rd-history-step-dot-done":""}`}),ke("span",{className:"rd-history-step-label",children:e}),ke("span",{className:"rd-history-step-chain",children:Xo(t)}),n&&ke(sd,{amount:n,className:"rd-history-step-amount"}),ct("span",{className:"rd-history-step-tx",children:[i?ke("a",{href:i.url,target:"_blank",rel:"noreferrer",title:r,"aria-label":`${e} transaction on ${Xo(t)}`,children:km(r)}):r?ke("span",{title:r,children:km(r)}):ke("span",{className:"rd-muted",children:a}),o&&r&&ke("span",{className:"rd-history-step-shared",title:"Shared by deposits processed together",children:"combined transfer"})]})]})}function kv(e){let t=e.deposits??[],r=e.amountOut||e.expectedOut||void 0;if(t.length>=2){let i=vv(r,t);if(i)return t.map((s,l)=>({key:`${e.orderId}:${s.txHash}:${s.blockNumber}`,order:e,chainId:s.originChainId??Pa,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}=xv(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 xs({orders:e,isLoading:t,error:r,catalog:n,showTitle:o=!0}){let[a,i]=id({}),s=l=>i(d=>({...d,[l]:!d[l]}));return ct("section",{className:o?"rd-card":"rd-stack","data-rd-orders-list":"",children:[o&&ke("div",{className:"rd-card-header",children:ke("h2",{className:"rd-card-title",children:"Transfer history"})}),t&&e.length===0&&ct("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[ke("span",{className:"rd-spinner"})," Loading orders..."]}),r&&ct("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load your orders: ",r.message]}),!t&&!r&&e.length===0&&ke(Oa,{}),e.length>0&&ke("div",{className:"rd-history-table","data-vaul-no-drag":!0,children:e.flatMap(kv).map(l=>{let{order:d}=l,c=n?.origins.find(C=>C.chainId===l.chainId&&C.token.address.toLowerCase()===l.currency.toLowerCase()),h=(d.target?n?.targets.find(C=>C.symbol.toLowerCase()===d.target.toLowerCase()):void 0)??n?.targets.find(C=>C.isDefault),u=h?.symbol??n?.destination.symbol??"",m=h?.decimals??n?.destination.decimals,y=n?.origins.find(C=>C.chainId===Pa),b=ws(l.sentRaw,y?.token.decimals),f=y?.token.symbol??"USDT",p=ws(l.receivedRaw,m),w=d.deposits??[],g=!!a[l.key],x=yv(d.completedAt??d.createdAt),k=hv(d.status),I=d.status==="COMPLETED"||Rm(d.status)?"Details unavailable":"Pending",S=l.receivedIsEstimate?"Estimated on ONEchain":"Received on ONEchain";return ct("div",{className:"rd-history-group",children:[ct("button",{type:"button",className:"rd-history-row-button",onClick:()=>s(l.key),"aria-expanded":g,"aria-label":`Toggle transfer details: ${k}, ${x}`,children:[ct("span",{className:"rd-history-card-top",children:[ke("span",{className:"rd-history-asset",children:l.routes>1?ct(ld,{children:["Multiple deposits ",ct("span",{className:"rd-muted",children:["\xB7 ",l.routes," chains"]})]}):ct(ld,{children:[c?.token.symbol??u," ",ct("span",{className:"rd-muted",children:["from ",Xo(l.chainId)]})]})}),ke("span",{className:bv(d.status),title:d.status,children:k})]}),ct("span",{className:"rd-history-card-amounts",children:[ct("span",{className:"rd-history-amount-block",children:[ke("span",{className:"rd-history-amount-label",children:"Processing address"}),ke(sd,{amount:b,symbol:f,className:"rd-history-num"})]}),ke("span",{className:"rd-history-card-arrow","aria-hidden":"true",children:"\u2192"}),ct("span",{className:"rd-history-amount-block",children:[ke("span",{className:"rd-history-amount-label",children:S}),ke(sd,{amount:p,symbol:u,className:`rd-history-num rd-history-received${l.receivedIsEstimate?" rd-history-received-estimate":""}`})]})]}),ct("span",{className:"rd-history-card-foot",children:[ct("span",{className:"rd-history-date",children:[d.completedAt?"Completed":"Started"," \xB7 ",x]}),ke("span",{className:"rd-history-chevron","aria-hidden":"true",children:ke(Or,{size:16})})]})]}),g&&ct("div",{className:"rd-history-detail",children:[l.deposit?ke(ys,{label:"Deposit confirmed",chainId:l.deposit.originChainId??Pa,txHash:l.deposit.originTxHash||l.deposit.txHash,amount:ws(l.deposit.amount,y?.token.decimals)}):w.length>0?w.map(C=>ke(ys,{label:"Deposit confirmed",chainId:C.originChainId??Pa,txHash:C.originTxHash||C.txHash,amount:ws(C.amount,y?.token.decimals)},`${C.txHash}-${C.blockNumber}`)):ct("div",{className:"rd-history-step",children:[ke("span",{className:"rd-history-step-dot"}),ke("span",{className:"rd-history-step-label",children:"Deposit confirmed"}),ke("span",{className:"rd-muted",children:"Details unavailable"})]}),ke(ys,{label:"Bridge",chainId:Pa,txHash:d.bscBridgeTx,shared:l.sharedLegs,missingLabel:I}),ke(ys,{label:"ONEchain delivery",chainId:n?.destination.chainId??612055,txHash:d.deliveryTxHash,shared:l.sharedLegs,missingLabel:I})]})]},l.key)})})]})}import{useEffect as Om,useState as ud}from"react";import{useCallback as za,useEffect as Sv,useMemo as Im,useRef as Em,useState as Ba}from"react";var cn=class extends Error{constructor(t,r,n){super(r),this.name="RelayApiError",this.status=t,this.body=n}};function Ht(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 cn(0,`network error calling ${n}: ${l.message}`)}let s=await i.text();if(!i.ok){let l=`request to ${n} failed with status ${i.status}`,d;try{d=JSON.parse(s);let c=d;c?.error&&(l=c.error)}catch{d=s||void 0}throw new cn(i.status,l,d)}try{return JSON.parse(s)}catch{throw new cn(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 Sm=[{type:"function",name:"deploy",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}],dd=[{type:"function",name:"execute",stateMutability:"nonpayable",inputs:[],outputs:[]},{type:"function",name:"sweepToUser",stateMutability:"nonpayable",inputs:[{name:"tokenAddr",type:"address"}],outputs:[]}],cd=[{type:"function",name:"computeAddress",stateMutability:"view",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}];var Jo=["0x486BEEc35A9a9915213Ea02AD3709738335F7702","0x3438735303911aBe113AdF14b18eE730cC24893b","0xA3B548Ab23043e6B24A087515fe1306379683533","0x44317d07378390543d99Ee76374E86C1Ef6cF832"];function vs(e,t){return!e||!t?!1:e.toLowerCase()===t.toLowerCase()}function Rv(e,t){return t.some(r=>vs(r,e))}function ks(e){if(!e||e.length===0)return Jo;let t=new Set,r=[];for(let n of e){if(typeof n!="string"||!lt(n))continue;let o=n.toLowerCase();t.has(o)||(t.add(o),r.push(n))}return r.length>0?r:Jo}async function Cm(e,t,{factory:r,forwarder:n,recipient:o,version:a,trusted:i=Jo}){if(!r||!n||!o||a===void 0)return{ok:!1,reason:"address verification is missing inputs (factory/forwarder/recipient/version)"};if(!Rv(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:cd,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 vs(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 Nm(e,t,{forwarder:r,recipient:n,version:o,trusted:a=Jo}){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:cd,functionName:"computeAddress",args:[n,BigInt(o)]})}catch{return}}));return i.some(s=>vs(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 Tm(e,t){return vs(e,t)}var $n=56,pd={step:"idle"};function Cv(e){return e.tokens?.find(t=>t.recoverable)?.address??e.token}function Fa(e={}){let t=Em(e);t.current=e;let r=e.wallet,n=r?.walletChainId,o=e.recipient,a=o&<(o)?o:void 0,[i,s]=Ba({}),l=za((u,m)=>{s(y=>({...y,[u.toLowerCase()]:m}))},[]),d=za(u=>u?i[u.toLowerCase()]??pd:pd,[i]),c=Im(()=>Object.values(i).some(u=>u.step==="switching"||u.step==="deploying"||u.step==="recovering"),[i]);return{recover:za(async(u,m,y)=>{if(!a||!u?.forwarder)return;let b=u.forwarder;l(b,{step:"switching"});try{if(n!==$n){if(!r?.switchChain)throw new Error("wallet cannot switch chains");await r.switchChain($n)}if(!r?.writeContract||!r?.readContract||!r?.waitForReceipt)throw new Error("wallet is missing contract capabilities required for recovery");let f=await Cm(r.readContract,$n,{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 p;if(!u.isDeployed){if(l(b,{step:"deploying"}),p=await r.writeContract({address:u.factory,abi:Sm,functionName:"deploy",args:[a,BigInt(u.version)],chainId:$n}),l(b,{step:"deploying",deployTxHash:p}),(await r.waitForReceipt({chainId:$n,hash:p})).status==="reverted")throw new Error(`forwarder deploy reverted on-chain (tx ${p})`);t.current.onChanged?.()}l(b,{step:"recovering",deployTxHash:p});let w=m==="execute"?await r.writeContract({address:u.forwarder,abi:dd,functionName:"execute",args:[],chainId:$n}):await r.writeContract({address:u.forwarder,abi:dd,functionName:"sweepToUser",args:[y??Cv(u)],chainId:$n});if(l(b,{step:"recovering",deployTxHash:p,actionTxHash:w}),(await r.waitForReceipt({chainId:$n,hash:w})).status==="reverted")throw new Error(`recovery transaction reverted on-chain (tx ${w})`);l(b,{step:"done",deployTxHash:p,actionTxHash:w}),t.current.onRecoverySuccess?.({action:m,forwarder:u.forwarder,actionTxHash:w,...p?{deployTxHash:p}:{}}),t.current.onChanged?.()}catch(f){let p=f instanceof Error?f:new Error(String(f));s(w=>{let g=b.toLowerCase();return{...w,[g]:{...w[g]??pd,step:"error",error:p.message}}}),t.current.onError?.(p)}},[a,n,r,l]),stateFor:d,busy:c}}function Mm(e={}){let t=Em(e);t.current=e;let r=Im(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRecovery: either `client` or `apiBaseUrl` must be provided");return Ht({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.recipient,o=n&<(n)?n:void 0,[a,i]=Ba(),[s,l]=Ba(!1),[d,c]=Ba(),[h,u]=Ba(0),m=e.target,y=e.enabled??!0,b=e.refetchInterval;Sv(()=>{if(!o||!y){i(void 0),c(void 0),l(!1);return}let x=!1,k=!1,R=!0;async function I(){if(!(x||k)){k=!0,R&&l(!0);try{let C=await r.getRecovery({user:o,target:m});if(x)return;i(C),c(void 0)}catch(C){if(x)return;let E=C instanceof Error?C:new Error(String(C));c(E),t.current.onError?.(E),E instanceof cn&&E.status===401&&t.current.onUnauthorized?.()}finally{k=!1,!x&&R&&l(!1),R=!1}}}I();let S=typeof b=="number"&&Number.isFinite(b)&&b>0?setInterval(()=>{I()},b):void 0;return()=>{x=!0,S&&clearInterval(S)}},[r,o,h,m,y,b]);let f=za(()=>u(x=>x+1),[]),p=Fa({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:f}),w=za(async(x,k)=>{a&&await p.recover(a,x,k)},[p,a]),g=p.stateFor(a?.forwarder);return{info:a,loading:s,error:d,refresh:f,recover:w,recoveryState:g}}var Nv="BSC_FUNDED";function Am(e){if(!e)return 0n;try{let t=BigInt(e);return t>0n?t:0n}catch{return 0n}}function Tv(e,t){return e.target||t}function $o(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!==Nv)continue;let s=Tv(i,r);if(!(!s||!a.has(s)))for(let l of i.deposits??[])o.deposits.push({amount:l.amount,originChainId:l.originChainId,originTxHash:l.originTxHash,txHash:l.txHash,blockNumber:l.blockNumber}),o.depositsTotal+=Am(l.amount)}o.deposits.sort((i,s)=>i.blockNumber-s.blockNumber)}return[...n.values()]}function Lm(e){return e.filter(t=>(t.info.tokens??[]).some(r=>r.recoverable)?!0:Am(t.info.balance)>0n&&t.info.suggestedAction!=="none")}function Rs(e){return e.reduce((t,r)=>t+(r.info.tokens??[]).filter(n=>n.recoverable).length,0)}import{Fragment as Cs,jsx as pe,jsxs as $e}from"react/jsx-runtime";var Iv=56;function Ev(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 Mv="This balance may already be processing. Recover only if it remains stuck.",Ss="USDT",Dm="primary";function Av(e){return`${e} more recoverable under other delivery tokens -- switch the delivery token above to recover ${e===1?"it":"them"}.`}function Lv(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 Bm({message:e}){let[t,r]=ud("idle");Om(()=>{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 $e("details",{className:"rd-error-details",children:[pe("summary",{children:"View technical details"}),$e("div",{className:"rd-error-log",children:[pe("button",{type:"button",className:"rd-error-copy",onClick:()=>{n()},"aria-label":o,"aria-live":"polite",title:o,children:t==="copied"?pe("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:pe("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):$e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[pe("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),pe("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"})]})}),pe("code",{children:e})]})]})}function Ua(e){if(!e)return 0n;try{return BigInt(e)}catch{return 0n}}function An(e,t){try{return Gt(e,t)}catch{return e.toString()}}function Pm(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function Dv(e){let t=Ua(e.bridgeMinWei),r=[];for(let a of e.tokens??[]){let i=Ua(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=Ua(e.balance),o=r.some(a=>a.action?.kind==="execute");return n>0n&&e.suggestedAction==="execute"&&!o?r.unshift({key:Dm,symbol:Ss,decimals:e.decimals,balance:n,action:{kind:"execute"}}):r.length===0&&n>0n&&e.suggestedAction!=="none"&&r.push({key:Dm,symbol:Ss,decimals:e.decimals,balance:n,action:{kind:"sweep"}}),r}function Pv({deposit:e,decimals:t}){let r=e.originChainId??Iv,n=e.originTxHash||e.txHash,o=n?bs(r,n):void 0;return $e("div",{className:"rd-history-step","data-testid":"recovery-deposit-row",children:[pe("span",{className:"rd-history-step-dot rd-history-step-dot-done"}),pe("span",{className:"rd-history-step-chain",children:Xo(r)}),pe("span",{className:"rd-history-step-amount",children:An(Ua(e.amount),t)}),pe("span",{className:"rd-history-step-tx",children:o?pe("a",{href:o.url,target:"_blank",rel:"noreferrer",title:n,children:Pm(n)}):n?pe("span",{title:n,children:Pm(n)}):null})]})}function Ov({group:e,showTargetLabel:t,busy:r,state:n,onRecover:o,actingRowKey:a,rowKeyOf:i}){let{info:s}=e,l=Dv(s),d=Ua(s.balance),c=l.length===1?`${An(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,m=n.step==="switching"||n.step==="deploying"||n.step==="recovering",b=l.find(p=>i(p)===a)?.action?.kind;function f(){if(n.step==="switching")return"Switching to BNB Chain\u2026";if(n.step==="deploying")return"Confirm in wallet\u2026 (1/2 \u2014 preparing your deposit address)";let p=b==="execute"?"continuing ONEchain delivery":"returning funds";return n.deployTxHash?`Confirm in wallet\u2026 (2/2 \u2014 ${p})`:`Confirm in wallet\u2026 (${p})`}return $e("div",{className:"rd-recover-group","data-testid":"forwarder-section",children:[t&&$e("p",{className:"rd-recover-group-label",children:["Delivery target \xB7 ",pe("b",{children:e.targets.join(", ")})]}),$e("div",{className:"rd-recover-sum",children:[pe("span",{className:"rd-recover-sum-label",children:"Funds awaiting processing"}),$e("span",{className:"rd-recover-sum-value",title:l.length===1?`${c} ${l[0].symbol}`:c,children:[c,l.length===1&&$e(Cs,{children:[" ",pe("span",{className:"rd-recover-sum-unit",children:l[0].symbol})]})]})]}),e.deposits.length>0&&$e("details",{className:"rd-recover-made-of",children:[$e("summary",{className:"rd-recover-made-of-label",children:["Deposit history \xB7 ",e.deposits.length," ",e.deposits.length===1?"transfer":"transfers"]}),$e("div",{className:"rd-recover-made-of-body",children:[e.deposits.map(p=>pe(Pv,{deposit:p,decimals:s.decimals},`${p.txHash}-${p.blockNumber}`)),!h&&$e("p",{className:"rd-token-row-status","data-testid":"deposits-incomplete-note",children:["These transfers explain ",An(e.depositsTotal,s.decimals)," of"," ",An(d,s.decimals)," ",Ss,". The remaining"," ",An(u,s.decimals)," ",Ss," is still included when you act."]})]})]}),pe("div",{className:"rd-token-list",children:l.map(p=>{let w=i(p),g=m&&a===w;return $e("div",{className:"rd-token-row","data-token-symbol":p.symbol,children:[pe(ko,{symbol:p.symbol,size:26}),$e("div",{className:"rd-token-row-info",children:[l.length>1&&$e("span",{className:"rd-token-row-amount",children:[An(p.balance,p.decimals)," ",pe("span",{className:"rd-token-row-symbol",children:p.symbol})]}),g?pe("span",{className:"rd-token-row-step",role:"status","aria-live":"polite",children:f()}):p.shortfall!==void 0&&p.minimum!==void 0?$e("span",{className:"rd-token-row-warn",children:["Needs ",$e("b",{children:[An(p.shortfall,p.decimals)," ",p.symbol]})," more to reach the"," ",An(p.minimum,p.decimals)," ",p.symbol," minimum. Add it through"," ",pe("b",{children:"Deposit to CROSS"})," and both amounts will process together."]}):p.action?pe("span",{className:"rd-token-row-status",children:p.action.kind==="execute"?"Ready to continue delivery to ONEchain":"Ready to return to your BNB Chain wallet"}):pe("span",{className:"rd-token-row-status",children:"Waiting for processing"})]}),g?pe("span",{className:"rd-spinner rd-token-row-spinner"}):p.action&&pe("button",{type:"button",className:"rd-button-primary rd-token-row-action",onClick:()=>o(p),disabled:r,children:p.action.kind==="execute"?"Continue delivery":"Return to wallet"})]},p.key)})}),!s.isDeployed&&n.step==="idle"&&$e("div",{className:"rd-callout rd-callout-warning","data-testid":"two-tx-notice",children:["The first action from this address needs ",pe("b",{children:"two wallet confirmations"}),": prepare the address, then move the funds. Later actions need one."]}),s.inFlight&&pe("p",{className:"rd-muted rd-token-row-status",children:s.inFlightReason||Mv}),n.step==="done"&&pe("div",{className:"rd-callout rd-callout-success",role:"status","aria-live":"polite",children:b==="execute"?"ONEchain delivery restarted.":"Funds returned to your connected BNB Chain wallet."}),n.step==="error"&&n.error&&$e(Cs,{children:[pe("div",{className:"rd-callout rd-callout-danger",role:"alert",children:Lv(n.error)}),pe(Bm,{message:n.error})]})]})}function Ns(e){let{info:t,loading:r,error:n,refresh:o}=Mm(Ev(e)),a=r||e.targets!==void 0&&e.targetsLoading===!0,i=Fa({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]=ud(),d=e.targets!==void 0?[...e.targets]:t?[{symbol:e.target??"",isDefault:!0,info:t}]:[],c=Lm($o(d,e.orders??[])),h=c.length>0,u=e.targets!==void 0?e.onRecovered:o,m=e.wallet?.walletAddress,y=e.wallet?.getBalance,[b,f]=ud();return Om(()=>{if(!h||!y||!m){f(void 0);return}let p=!1;return y({chainId:56,address:m}).then(w=>{p||f({value:w.value,decimals:w.decimals})}).catch(()=>{p||f(void 0)}),()=>{p=!0}},[h,y,m]),$e("section",{className:e.showTitle??!0?"rd-card":"rd-stack","data-rd-recover-funds":"",children:[(e.showTitle??!0)&&pe("div",{className:"rd-card-header",children:pe("h2",{className:"rd-card-title",children:"Recover stuck funds"})}),typeof e.otherTargetsRecoverable=="number"&&e.otherTargetsRecoverable>0&&pe("div",{className:"rd-callout rd-callout-muted","data-testid":"other-targets-recoverable-note",children:Av(e.otherTargetsRecoverable)}),a&&$e("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[pe("span",{className:"rd-spinner"})," Checking for recoverable funds\u2026"]}),n&&$e(Cs,{children:[pe("div",{className:"rd-callout rd-callout-danger",role:"alert",children:"Couldn't check recoverable funds. Please try again."}),pe(Bm,{message:n.message})]}),!a&&!n&&!h&&$e("div",{className:"rd-recover-empty",role:"status","data-testid":"rd-recover-empty-state",children:[pe("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:$e("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[pe("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"}),pe("path",{d:"M5 10h14",stroke:"currentColor",strokeWidth:"1.7"}),pe("path",{d:"m9.2 14 1.7 1.7 3.9-4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}),pe("h3",{className:"rd-recover-sum-value rd-recover-sum-empty rd-recover-empty-title",children:"Nothing to recover"}),pe("p",{className:"rd-recover-empty-copy",children:"No funds are waiting at your deposit addresses. If funds become stuck, they will appear here."}),u&&$e("button",{type:"button",className:"rd-button-secondary rd-recover-empty-refresh",onClick:u,"data-track":"refresh_recovery",children:[pe("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:pe("path",{d:"M20 7v5h-5M4 17v-5h5M6.1 9A7 7 0 0 1 18.6 7M5.4 17A7 7 0 0 0 17.9 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),"Check again"]})]}),!a&&!n&&c.map(p=>pe(Ov,{group:p,showTargetLabel:c.length>1||p.targets.length>1,busy:i.busy,state:i.stateFor(p.forwarder),actingRowKey:s,rowKeyOf:w=>`${p.forwarder.toLowerCase()}:${w.key}`,onRecover:w=>{w.action&&(l(`${p.forwarder.toLowerCase()}:${w.key}`),i.recover(p.info,w.action.kind,w.action.tokenAddress))}},p.forwarder.toLowerCase())),!a&&!n&&h&&$e("div",{className:"rd-callout rd-callout-muted","data-testid":"rd-recover-gas-note",children:["You submit this transaction from your connected wallet and pay the BNB Chain network fee in BNB. Available balance:",b&&$e(Cs,{children:[" ",$e("b",{children:[An(b.value,b.decimals)," BNB"]})]}),!b&&" unavailable","."]}),!a&&!n&&h&&pe("p",{className:"rd-recover-foot",children:"Delivery continues to ONEchain; returned funds go to your connected BNB Chain wallet."})]})}import*as Mt from"react";import*as Rr from"@radix-ui/react-dialog";import{Drawer as ea}from"vaul";de(`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
|
+
`);import{jsx as Vr,jsxs as Ts}from"react/jsx-runtime";var zm=24;function Fm(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function Bv(e,t,r){let n=r?.offsetTop??t.top,o=r?r.offsetTop+r.height:t.bottom,a=Math.max(t.top,n)+zm,i=Math.min(t.bottom,o)-zm;return e.top<a?e.top-a:e.bottom>i?e.bottom-i:0}function zv(){let e=Mt.useRef(0),[t,r]=Mt.useState({keyboardHeight:0,keyboardOverlap:0,viewportHeight:0});return Mt.useEffect(()=>{let n=window.visualViewport;if(!n)return;let o=()=>{let a=Math.max(window.innerHeight,document.documentElement.clientHeight);e.current=Math.max(e.current,a,n.height+n.offsetTop);let i=Math.max(0,e.current-n.height-n.offsetTop),s=Math.max(0,e.current-a),l=Math.max(0,i-s),d=n.height;r(c=>c.keyboardHeight===i&&c.keyboardOverlap===l&&c.viewportHeight===d?c:{keyboardHeight:i,keyboardOverlap:l,viewportHeight:d})};return o(),n.addEventListener("resize",o),n.addEventListener("scroll",o),()=>{n.removeEventListener("resize",o),n.removeEventListener("scroll",o)}},[]),t}function Fv(e){let t=`(max-width: ${e}px)`,[r,n]=Mt.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(t).matches);return Mt.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 Ln({theme:e="dark",mobileBreakpoint:t=768,drawerDirection:r="bottom",dialogWidth:n,drawerMaxWidth:o,drawerMinWidth:a,style:i,open:s,onOpenChange:l,children:d}){let c=Fv(t),[h,u]=Mt.useState(!1),m=s!==void 0,y=m?s:h,b=Mt.useCallback(g=>{m||u(g),l?.(g)},[m,l]);On(y,Mt.useCallback(()=>b(!1),[b]));let f=Mt.useMemo(()=>{let g={};return n&&(g["--rd-dialog-width"]=n),o&&(g["--rd-drawer-max-width"]=o),a&&(g["--rd-drawer-min-width"]=a),{...g,...i}},[n,o,a,i]),p=Mt.useMemo(()=>({open:y,setOpen:b,isMobile:c,theme:e,drawerDirection:r,portalStyle:f}),[y,b,c,e,r,f]),w=Vr("div",{"data-theme":e,style:f,children:d});return c?Vr(us.Provider,{value:p,children:Vr(ea.Root,{direction:r,open:y,onOpenChange:b,noBodyStyles:!0,children:w},"drawer")}):Vr(us.Provider,{value:p,children:Vr(Rr.Root,{open:y,onOpenChange:b,children:w})})}function ta({asChild:e,children:t,dataAttributes:r}){let{isMobile:n}=ln(),o=n?ea.Trigger:Rr.Trigger;return Vr(o,{asChild:e,...r,children:t})}function Dn({className:e,ariaTitle:t,children:r}){let{open:n,isMobile:o,theme:a,drawerDirection:i,portalStyle:s}=ln(),{keyboardHeight:l,keyboardOverlap:d,viewportHeight:c}=zv(),h=Ao(),u=Mt.useRef(null),m=Mt.useRef(null);Mt.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]),Mt.useEffect(()=>{m.current&&clearTimeout(m.current);let p=document.activeElement;!n&&Fm(p)&&u.current?.contains(p)&&p.blur(),u.current?.querySelectorAll("[data-rd-scroll-area]").forEach(w=>{w.scrollTo?.({top:0,behavior:"auto"})})},[n]);let y=o&&i==="bottom"&&l>0,b=y?{bottom:d,maxHeight:`min(85dvh, calc(${c}px - env(safe-area-inset-top, 0px)))`}:void 0,f=Mt.useCallback(p=>{if(!o||i!=="bottom"||!Fm(p.target))return;let w=p.target,g=w.closest("[data-rd-scroll-area]");g&&(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{let x=Bv(w.getBoundingClientRect(),g.getBoundingClientRect(),window.visualViewport);Math.abs(x)>=1&&g.scrollBy?.({top:x,behavior:"auto"}),m.current=null},280))},[i,o]);return o?Ts(ea.Portal,{children:[Vr(ea.Overlay,{className:"rd-overlay"}),Ts(ea.Content,{ref:u,className:Re("rd-drawer-content",e),"data-theme":a,"data-rd-shell":"drawer","data-rd-in-app":h?"true":"false","data-rd-keyboard-adjusted":y?"true":"false",style:{...s,...b},onFocusCapture:f,children:[Vr(ea.Title,{className:"rd-sr-only",children:t}),Vr("div",{className:"rd-drawer-handle"}),r]})]}):Ts(Rr.Portal,{children:[Vr(Rr.Overlay,{className:"rd-overlay"}),Ts(Rr.Content,{className:Re("rd-dialog-content",e),"data-theme":a,"data-rd-shell":"dialog",style:s,children:[Vr(Rr.Title,{className:"rd-sr-only",children:t}),Vr(Rr.Description,{className:"rd-sr-only",children:t}),r]})]})}import{Fragment as Wv,jsx as Oe,jsxs as Mr}from"react/jsx-runtime";function Uv({id:e,activeView:t,recoverableCount:r,onChange:n}){let o=["deposit","history","recover"];return Oe("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 Mr("button",{type:"button",id:`${e}-${a}-tab`,className:"rd-deposit-tab",role:"tab","aria-selected":t===a,"aria-controls":`${e}-${a}-panel`,tabIndex:t===a?0:-1,"data-active":t===a?"true":"false","data-track":`${a}_tab`,onClick:()=>n(a),onKeyDown:s=>{if(!["ArrowLeft","ArrowRight","Home","End"].includes(s.key))return;s.preventDefault();let l=o.indexOf(a),d=s.key==="Home"?0:s.key==="End"?o.length-1:(l+(s.key==="ArrowRight"?1:-1)+o.length)%o.length,c=o[d];n(c),document.getElementById(`${e}-${c}-tab`)?.focus()},children:[Oe("span",{children:i}),a==="recover"&&r>0&&Oe("span",{className:"rd-recovery-badge","data-testid":"recovery-badge",children:r})]},a)})})}function jm({className:e}){let t=Ma();return Oe(xe,{feature:"relay",children:Oe(Dn,{ariaTitle:"Deposit",className:["rd-deposit-shell",e??t.className].filter(Boolean).join(" "),children:Oe(jv,{})})})}function jv(){let e=Ma(),{theme:t}=ln(),r=am(),n=Um.useId();if(!r)return null;let{activeView:o,setActiveView:a,recoveryOpen:i,resolvedApiBaseUrl:s,wallet:l,catalog:d,catalogLoading:c,catalogError:h,origin:u,setOrigin:m,amount:y,setAmount:b,recipient:f,setRecipient:p,recipientValid:w,balance:g,balanceLoading:x,insufficientBalance:k,depositAddress:R,depositAddressLoading:I,depositAddressError:S,arrivalStatus:C,quote:E,quoteLoading:M,quoteError:F,canDeposit:L,deposit:z,depositState:A,targetOptions:U,selectedTarget:re,setSelectedTarget:Y,showAmountInput:_,minNotice:G,showRecipientInput:ne,showTargetSelector:te,showOneClick:O,showConnectPrompt:Z,showRecipientHint:H,canRecover:ce,recoverableCount:ve,recoveryTargetsLoading:ge,recoveryTargets:ue,recoveryOrders:me,historyOrdersLoading:we,historyOrdersError:Ze,refreshRecovery:he,trustedFactories:Ee,amountHint:at,amountSmallestUnits:Qe,onMax:We}=r;return Mr("div",{className:"rd-root rd-wizard","data-theme":t,"data-rd-scroll-area":!0,children:[Oe(Uv,{id:n,activeView:o,recoverableCount:ve,onChange:a}),i&&Oe("div",{className:"rd-deposit-tab-panel",id:`${n}-recover-panel`,role:"tabpanel","aria-labelledby":`${n}-recover-tab`,children:ce?Oe(Ns,{client:e.client,apiBaseUrl:s,recipient:f,target:re?.symbol,wallet:l,trustedFactories:Ee,targets:(d?.targets.length??0)>0?ue:void 0,targetsLoading:ge,orders:me,onRecovered:he,onRecoverySuccess:e.onRecoverySuccess,onError:e.onError,showTitle:!1}):Mr("div",{className:"rd-recover-empty",role:"status","data-variant":"unavailable","data-testid":"rd-recovery-unavailable-note",children:[Oe("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:Mr("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[Oe("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),Oe("path",{d:"M8 10V7.5a4 4 0 0 1 8 0V10",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),Oe("circle",{cx:"12",cy:"15",r:"1.2",fill:"currentColor"})]})}),Oe("h3",{className:"rd-recover-empty-title",children:"Recovery unavailable"}),Oe("p",{className:"rd-recover-empty-copy",children:"Connect a wallet that supports recovery transactions to continue."})]})}),o==="history"&&Oe("div",{className:"rd-deposit-tab-panel",id:`${n}-history-panel`,role:"tabpanel","aria-labelledby":`${n}-history-tab`,children:w&&f.trim()?Oe(xs,{orders:me,isLoading:c||we,error:h??Ze,catalog:d,showTitle:!1}):Oe(Oa,{requiresIdentity:!0})}),o==="deposit"&&Mr("div",{className:"rd-deposit-tab-panel",id:`${n}-deposit-panel`,role:"tabpanel","aria-labelledby":`${n}-deposit-tab`,children:[c&&Mr("div",{className:"rd-skeleton-form","data-testid":"rd-source-skeleton","aria-hidden":"true",children:[Oe(hs,{}),Z&&e.onRequestConnect&&Oe("span",{className:"rd-skeleton rd-skeleton-cta"}),Mr("section",{className:"rd-stack",children:[Mr("div",{className:"rd-field",children:[Oe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"18%"}}),Mr("div",{className:"rd-field-row",children:[Oe("span",{className:"rd-skeleton rd-skeleton-field"}),Oe("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),_&&Mr("div",{className:"rd-field",children:[Oe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"34%"}}),Oe("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),Mr("div",{className:"rd-field",children:[Oe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"24%"}}),Oe("span",{className:"rd-skeleton rd-skeleton-field"}),(ne||f.trim().length>0)&&Mr(Wv,{children:[Oe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"58%",marginTop:"0.5rem"}}),Oe("span",{className:"rd-skeleton rd-skeleton-field"}),ne&&Oe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"82%"}})]})]}),Oe("span",{className:"rd-skeleton rd-skeleton-notice"})]}),c&&Oe("p",{className:"rd-sr-only",role:"status",children:"Loading deposit options..."}),h&&Mr("div",{className:"rd-callout rd-callout-danger",children:["Failed to load configuration: ",h.message]}),H&&Oe("div",{className:"rd-callout rd-callout-muted",children:ne?"Connect a wallet or provide a recipient address to fetch your deposit address.":"Connect a wallet to fetch your deposit address."}),d&&u&&Oe(xm,{catalog:d,origin:u,onChangeOrigin:m,amount:y,onChangeAmount:b,showAmountInput:_,minNotice:G,amountHint:at,onMax:We,recipient:f,onChangeRecipient:p,showRecipientInput:ne,recipientValid:w,balance:g,balanceLoading:x,insufficientBalance:k,targetOptions:U,selectedTarget:re,onChangeTarget:Y,showTargetSelector:te,quote:E,quoteLoading:M,quoteError:F,depositAddress:R,depositAddressLoading:I,depositAddressError:S,arrivalStatus:C,amountSmallestUnits:Qe,depositState:A,onDeposit:()=>{z()},canDeposit:L&&O,oneClickEnabled:O,locked:Z,onRequestConnect:e.onRequestConnect})]})]})}import{jsx as fd}from"react/jsx-runtime";function Wm({asChild:e,children:t}){return fd(xe,{feature:"relay",children:fd(ta,{asChild:e??t!=null,children:t??fd("button",{type:"button","data-track":"open",children:"Deposit"})})})}import*as Ie from"react";import{useCallback as ja,useEffect as eo,useMemo as md,useRef as gd,useState as pt}from"react";import{useEffect as _v,useState as Gv}from"react";function _m(e,t){let[r,n]=Gv(e);return _v(()=>{let o=setTimeout(()=>n(e),t);return()=>clearTimeout(o)},[e,t]),r}var Hv=500,Hm=56,Gm={chainId:Hm,token:"0x55d398326f99059fF775485246999027B3197955"},Qm=3e4,Qv=5e3;function Vv(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?Qm:Math.max(Qv,e*1e3)}var qv=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function hd(e,t){let r=e.trim();if(!r)return null;try{let n=fs(r,t);return n>0n?n:null}catch{return null}}function Vm(e={}){let t=gd(e);t.current=e;let r=md(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useDepositAddress: either `client` or `apiBaseUrl` must be provided");return Ht({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.wallet,o=n?.walletAddress,a=!!o,i=n?.walletChainId,[s,l]=pt(),[d,c]=pt(!0),[h,u]=pt();eo(()=>{let ee=!1;return c(!0),r.getConfig().then(Te=>{ee||(l(Te),u(void 0))}).catch(Te=>{ee||u(Te instanceof Error?Te:new Error(String(Te)))}).finally(()=>{ee||c(!1)}),()=>{ee=!0}},[r]);let m=e.chains,y=md(()=>{if(!s)return[];if(!m||m.length===0)return s.origins;let ee=new Set(m);return s.origins.filter(Te=>ee.has(Te.chainId))},[s,m]),b=md(()=>s?{...s,origins:y}:void 0,[s,y]),[f,p]=pt();eo(()=>{if(f||y.length===0)return;let ee=t.current.defaultToken,Te=ee?y.find(j=>j.chainId===ee.chainId&&j.token.address.toLowerCase()===ee.address.toLowerCase()):void 0;p(Te??y[0])},[y,f]);let[w,g]=pt(),x=ja(()=>{Pe(void 0),It(!1),P(!1),B(!1),Tt(void 0)},[]),k=ja(ee=>{p(ee),g(void 0),x()},[x]),R=f?.kind==="svm",[I,S]=pt(""),C=e.amount!==void 0?e.amount:I,E=ja(ee=>{S(ee),g(void 0),x()},[x]),M=_m(C,Hv),F=f?hd(M,f.token.decimals):null,L=f?hd(C,f.token.decimals):null,[z,A]=pt(""),[U,re]=pt(!1),Y=e.recipient!==void 0?e.recipient:z,_=ja(ee=>{A(ee),re(!0),g(void 0),x()},[x]);eo(()=>{e.recipient===void 0&&o&&!U&&A(o)},[o,U,e.recipient]);let G=Y.length===0||lt(Y),ne=Y.length>0&<(Y)?Y:void 0,[te,O]=pt(),[Z,H]=pt(!1),[ce,ve]=pt(0),ge=n?.getBalance;eo(()=>{if(!ge||!o||!f||R){O(void 0),H(!1);return}let ee=!1;H(!0);let Te=f.token.address.toLowerCase()===Aa?void 0:f.token.address;return ge({chainId:f.chainId,address:o,token:Te}).then(j=>{ee||O({...j,formatted:Gt(j.value,j.decimals)})}).catch(()=>{ee||O(void 0)}).finally(()=>{ee||H(!1)}),()=>{ee=!0}},[ge,o,f,R,ce]);let ue=te?.value??null,me=!R&&L!==null&&ue!==null&&L>ue,[we,Ze]=pt(),[he,Ee]=pt(!1),[at,Qe]=pt(),We=f?.chainId,Be=f?.token.address,rt=e.target;eo(()=>{if(!ne||!We||!Be){Ze(void 0),Qe(void 0),Ee(!1);return}let ee=!1;return Ze(void 0),Qe(void 0),Ee(!0),(rt?r.getDepositAddress({user:ne,originChainId:We,originCurrency:Be},rt):r.getDepositAddress({user:ne,originChainId:We,originCurrency:Be})).then(j=>{ee||(Ze(j),Qe(void 0),t.current.onDepositAddress?.(j))}).catch(j=>{if(ee)return;Ze(void 0);let _e=j instanceof Error?j:new Error(String(j));Qe(_e),t.current.onError?.(_e)}).finally(()=>{ee||Ee(!1)}),()=>{ee=!0}},[r,ne,We,Be,rt]);let Nt=[We??"",(Be??"").toLowerCase(),(ne??"").toLowerCase(),rt??"",C.trim()].join("|"),ut=gd(Nt);eo(()=>{ut.current!==Nt&&(ut.current=Nt,g(void 0),x())},[Nt,x]);let[xt,be]=pt(),[Vt,bt]=pt(!1),[wt,nt]=pt(),et=F?.toString();eo(()=>{if(!We||!Be||!et){be(void 0),nt(void 0),bt(!1);return}let ee=!1,Te,j=!0;async function _e(){j&&bt(!0);let ae=Qm;try{let Ge=await r.getQuote({originChainId:We,originCurrency:Be,amount:et});if(ee)return;be(Ge),nt(void 0),ae=Vv(Ge.ttl)}catch(Ge){if(ee)return;be(void 0),nt(Ge instanceof Error?Ge:new Error(String(Ge)))}finally{ee||bt(!1),j=!1}ee||(Te=setTimeout(_e,ae))}return _e(),()=>{ee=!0,Te&&clearTimeout(Te)}},[r,We,Be,et]);let[er,At]=pt(!1),[Ut,Lt]=pt(!1),[Ve,Pe]=pt(),[ft,Tt]=pt(),[Ne,It]=pt(!1),[qt,P]=pt(!1),[ze,B]=pt(!1),oe=n?.waitForReceipt,se=gd(void 0);eo(()=>{if(!Ve||!f||!oe)return;let ee=!1;return It(!0),P(!1),B(!1),oe({chainId:f.chainId,hash:Ve}).then(Te=>{ee||(P(!0),B(Te.status==="reverted"),ve(j=>j+1),Te.status!=="reverted"&&Ve!==se.current&&(se.current=Ve,t.current.onDeposited?.(Ve)))}).catch(Te=>{ee||Tt(Te instanceof Error?Te.message:String(Te))}).finally(()=>{ee||It(!1)}),()=>{ee=!0}},[Ve,oe]);let fe=i!==void 0&&f!==void 0&&i!==f.chainId,mt=er||Ut,Dt=w??ft,yt="idle";Dt?yt="error":qt?yt="confirmed":Ne?yt="confirming":mt&&(yt=er?"switching":"pending");let hr={phase:yt,isSubmitting:mt,isConfirming:Ne,isConfirmed:qt,needsSwitch:fe,txHash:Ve,reverted:qt&&ze,error:Dt},br=!!(f&&we&&we.originChainId===f.chainId&&we.originCurrency.toLowerCase()===f.token.address.toLowerCase()),jt=!!(n?.sendTransaction&&n?.writeContract&&n?.readContract&&n?.waitForReceipt),Dr=!!(a&&jt&&f&&!R&&we&&br&&L&&L>0n&&!me&&!mt&&!Ne),sr=ja(async()=>{if(R||!f||!we||!n?.sendTransaction||!n?.writeContract)return;g(void 0);let ee=hd(C,f.token.decimals);if(!ee||ee<=0n){g("enter an amount to use the one-click deposit");return}let Te=f.token.address.toLowerCase()===Aa,j=we.depositAddress,_e=await Nm(n?.readContract,Hm,{forwarder:we.forwarder,recipient:ne,version:we.version,trusted:t.current.trustedFactories});if(!_e.ok){g(`address verification failed: ${_e.reason}`);return}if(f.chainId===Gm.chainId&&f.token.address.toLowerCase()===Gm.token.toLowerCase()&&!Tm(j,we.forwarder)){g("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(fe){if(!n?.switchChain)throw new Error("wallet cannot switch chains");At(!0);try{await n.switchChain(f.chainId)}finally{At(!1)}}x(),Lt(!0);try{let Ge=Te?await n.sendTransaction({chainId:f.chainId,to:j,value:ee}):await n.writeContract({chainId:f.chainId,address:f.token.address,abi:qv,functionName:"transfer",args:[j,ee]});Pe(Ge)}finally{Lt(!1)}}catch(Ge){g(Ge.message)}},[R,f,we,C,fe,n,ne,x]);return{address:o,isConnected:a,catalog:b,catalogLoading:d,catalogError:h,origin:f,setOrigin:k,recipient:Y,setRecipient:_,recipientValid:G,amount:C,setAmount:E,balance:te,balanceLoading:Z,insufficientBalance:me,isSvmOrigin:R,depositAddress:we?.depositAddress,depositAddressResult:we,depositAddressLoading:he,depositAddressError:at,quote:xt,quoteLoading:Vt,quoteError:wt,canDeposit:Dr,deposit:sr,depositState:hr}}import{useEffect as Yv,useRef as Kv,useState as ra}from"react";var Zv=3e4,Xv=300;function to(e){let t=Kv(e);t.current=e;let{client:r,enabled:n=!0,live:o=!0}=e,a=e.refetchInterval??e.fallbackPollMs??Zv,i=e.recipient&<(e.recipient)?e.recipient:void 0,[s,l]=ra([]),[d,c]=ra(!1),[h,u]=ra(),[m,y]=ra(!1),[b,f]=ra(),[p,w]=ra(0);return Yv(()=>{if(!i){l([]),u(void 0),c(!1),y(!1),f(void 0),w(0);return}if(!n){l([]),u(void 0),c(!1),y(!1),f(void 0),w(0);return}let g=!1,x=!0,k,R=0,I=0;async function S(){let F=++R;I+=1,x&&c(!0);try{let L=await r.listOrders(i);if(g)return;F===R&&(l(L),u(void 0))}catch(L){if(g)return;let z=L instanceof Error?L:new Error(String(L));F===R&&(u(z),t.current.onError?.(z))}finally{I-=1,!g&&F===R&&(c(!1),y(!0),f(i),w(L=>L+1)),x=!1}}function C(){k&&clearTimeout(k),k=setTimeout(()=>{k=void 0,g||S()},Xv)}S();let E;o&&typeof EventSource<"u"&&(E=new EventSource(r.ordersStreamUrl(i)),E.addEventListener("orders-changed",C),E.onopen=()=>{C()});let M=o&&Number.isFinite(a)&&a>0?setInterval(()=>{I===0&&S()},a):void 0;return()=>{g=!0,k&&clearTimeout(k),M&&clearInterval(M),E?.close()}},[r,i,n,o,a]),{orders:s,ordersLoading:d,ordersError:h,ordersInitialized:m,ordersForRecipient:b,ordersRevision:p}}import{useMemo as Jv,useState as $v}from"react";function qm(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 Ym({catalogTargets:e,filter:t,defaultTarget:r}){let n=Jv(()=>{if(!t||t.length===0)return e;let l=new Set(t);return e.filter(d=>l.has(d.symbol))},[e,t]),[o,a]=$v(()=>qm(n,r)?.symbol),i=(o!==void 0?n.find(l=>l.symbol===o):void 0)??qm(n,r);function s(l){n.some(d=>d.symbol===l)&&a(l)}return{options:n,selected:i,setSelected:s}}var e1={dev:"https://dev-relay-protocol-api.onechain.nexus",stage:"https://dev-relay-protocol-api.onechain.nexus",production:"https://relay-protocol-api.onechain.nexus"};function ro(e){return e.apiBaseUrl?e.apiBaseUrl:e1[ot(e.environment)]}import{jsx as a1,jsxs as i1}from"react/jsx-runtime";var Km=1e3;function t1(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 Is(e,t){let r=e.trim();if(!r)return 0n;try{let n=fs(r,t);return n>0n?n:0n}catch{return 0n}}function r1(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 Zm(e,t,r){return`${e}:${t.toLowerCase()}:${r}`}function n1(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Xm({open:e,children:t}){let[r]=Ie.useState(om);return i1(td.Provider,{value:r,children:[e&&a1(o1,{store:r}),t]})}function o1({store:e}){let t=Ma(),{showTargetSelector:r=!0}=t,n=t.requireWalletConnection??t.showRecipientInput===!1,o=!!(t.walletAddress&<(t.walletAddress)),[a,i]=Ie.useState("deposit"),s=a==="recover",l=Ie.useCallback(W=>{i(ye=>(typeof W=="function"?W(ye==="recover"):W)?"recover":"deposit")},[]);Ie.useEffect(()=>{qe("relay","opened")},[]);let[d,c]=Ie.useState(void 0),h=Ie.useMemo(()=>ro({apiBaseUrl:t.apiBaseUrl,environment:t.environment}),[t.apiBaseUrl,t.environment]),u=Ie.useMemo(()=>({walletAddress:t.walletAddress,walletChainId:t.walletChainId,sendTransaction:t.sendTransaction,writeContract:t.writeContract,readContract:t.readContract,switchChain:t.switchChain,waitForReceipt:t.waitForReceipt,getBalance:t.getBalance}),[t.walletAddress,t.walletChainId,t.sendTransaction,t.writeContract,t.readContract,t.switchChain,t.waitForReceipt,t.getBalance]),m=ot(t.environment),y=rr("apps.json",m,W=>({min:Pr(W?.relay?.minDepositAmount,m),max:Pr(W?.relay?.maxDepositAmount,m),trustedFactories:ni(W,m)})),b=Ie.useMemo(()=>t.trustedFactories??ks(y?.trustedFactories),[t.trustedFactories,y?.trustedFactories]),{isConnected:f,catalog:p,catalogLoading:w,catalogError:g,origin:x,setOrigin:k,amount:R,setAmount:I,recipient:S,setRecipient:C,recipientValid:E,balance:M,balanceLoading:F,insufficientBalance:L,depositAddress:z,depositAddressResult:A,depositAddressLoading:U,depositAddressError:re,quote:Y,quoteLoading:_,quoteError:G,canDeposit:ne,deposit:te,depositState:O}=Vm(t1(t,d,u,h,b)),{options:Z,selected:H,setSelected:ce}=Ym({catalogTargets:p?.targets??[],filter:t.targetTokens,defaultTarget:t.defaultTarget});Ie.useEffect(()=>{c(H?.symbol)},[H?.symbol]);let ve=t.amount===void 0&&!t.hideAmount,ge=!n&&(t.showRecipientInput??!0)&&t.recipient===void 0,ue=E&&S.trim().length>0&<(S),me=!n&&t.recipient!==void 0&&t.recipient.trim().length>0,we=n?!o||!ue:!f&&!me&&!ue,Ze=!!p&&!ue&&!we,he=(t.showRecovery??!1)&&o&&!!(u.writeContract&&u.readContract&&u.waitForReceipt),Ee=Ie.useMemo(()=>t.client?t.client:Ht({baseUrl:h}),[t.client,h]),[at,Qe]=Ie.useState({}),[We,Be]=Ie.useState(!1),[rt,Nt]=Ie.useState(0),ut=Ie.useCallback(()=>Nt(W=>W+1),[]),xt=O.isConfirmed,be=ue&&(!!A||a!=="deposit"),{orders:Vt,ordersLoading:bt,ordersError:wt,ordersInitialized:nt,ordersForRecipient:et}=to({client:Ee,recipient:be?S:void 0,enabled:be,refetchInterval:Km}),er=Vt,At=H??p?.targets.find(W=>W.isDefault),Ut=At?.symbol??p?.destination.symbol,Lt=At?.isDefault??!0,Ve=A?.version,Pe=Ie.useMemo(()=>Vt.filter(W=>r1(W,Ve,Ut,Lt)),[Vt,Ve,Ut,Lt]),ft=Ie.useRef(void 0),[Tt,Ne]=Ie.useState(),[It,qt]=Ie.useState(),P=`${S.toLowerCase()}:${Ut?.toLowerCase()??""}:${Ve??""}`;Ie.useEffect(()=>{let W=et?.toLowerCase()===S.toLowerCase();if(!be||!nt||!W||wt){be||(ft.current=void 0,Ne(void 0),qt(void 0));return}let ye=new Set(Pe.map(Xe=>Xe.orderId)),wr=new Set(Pe.flatMap(Xe=>(Xe.deposits??[]).map(pn=>Zm(Xe.orderId,pn.txHash,pn.blockNumber)))),vt=ft.current;if(!vt||vt.key!==P){ft.current={key:P,orderIds:ye,depositKeys:wr,statuses:new Map(Pe.map(Xe=>[Xe.orderId,Xe.status]))},Ne(void 0),qt(void 0);return}let lr,Pt=0n,Jr=!1;for(let Xe of Pe)for(let pn of Xe.deposits??[]){let To=Zm(Xe.orderId,pn.txHash,pn.blockNumber);if(!vt.depositKeys.has(To)){lr??(lr=Xe);try{Pt+=BigInt(pn.amount),Jr=!0}catch{}}}lr??(lr=Pe.find(Xe=>!vt.orderIds.has(Xe.orderId))),lr??(lr=Pe.find(Xe=>vt.statuses.get(Xe.orderId)!==Xe.status));for(let Xe of ye)vt.orderIds.add(Xe);for(let Xe of wr)vt.depositKeys.add(Xe);for(let Xe of Pe)vt.statuses.set(Xe.orderId,Xe.status);lr&&(Ne(lr.orderId),Jr&&qt(Pt))},[P,Pe,et,be,S,wt,nt]),Ie.useEffect(()=>{let W=p?.targets??[];if(!he||!ue||W.length===0){Qe({}),Be(!1);return}let ye=!1;return Be(!0),Promise.all(W.map(wr=>Ee.getRecovery({user:S,target:wr.symbol}).catch(()=>{}))).then(wr=>{if(ye)return;let vt={};W.forEach((lr,Pt)=>{let Jr=wr[Pt];Jr&&(vt[lr.symbol]=Jr)}),Qe(vt),Be(!1)}),()=>{ye=!0}},[Ee,he,ue,S,p,xt,rt]);let ze=Ie.useMemo(()=>(p?.targets??[]).map(W=>({symbol:W.symbol,isDefault:W.isDefault,info:at[W.symbol]})).filter(W=>W.info!==void 0),[p,at]),B=Ie.useMemo(()=>Rs($o(ze)),[ze]),[oe,se]=Ie.useState(void 0),[fe,mt]=Ie.useState(),Dt=!!p&&(p?.targets.length??0)>0&&!d;Ie.useEffect(()=>{if(!ue||!x||!A||Dt){se(void 0),mt(void 0);return}let W=!1,ye=!1,wr=A.forwarder.toLowerCase();se(void 0),mt(void 0);async function vt(){if(!(W||ye)){ye=!0;try{let Pt=await Ee.getRecovery({user:S,target:d||void 0});if(W)return;if(Pt?.forwarder&&Pt.forwarder.toLowerCase()!==wr){se(void 0),mt(void 0);return}if(mt(Pt),!Pt||Pt.suggestedAction!=="sweep"){se(void 0);return}let Jr;try{Jr=BigInt(Pt.balance)}catch{se(void 0);return}let Xe=Number(Pt.decimals);if(Jr<=0n||!Number.isInteger(Xe)||Xe<0){se(void 0);return}let pn=Pt.tokens?.find(To=>To.address?.toLowerCase()===Pt.token?.toLowerCase()&&To.symbol)?.symbol;se({balance:Jr,decimals:Xe,symbol:pn})}catch{}finally{ye=!1}}}vt();let lr=setInterval(()=>{vt()},Km);return()=>{W=!0,clearInterval(lr)}},[Ee,ue,S,d,Dt,x,A,xt]);let yt=Ie.useCallback(()=>{!x||!M||I(Gt(M.value,x.token.decimals))},[x,M,I]),hr=Ie.useRef(!1),br=!!z;Ie.useEffect(()=>{!br||hr.current||(hr.current=!0,qe("relay","deposit_address_shown"))},[br]);let jt=O.txHash;Ie.useEffect(()=>{jt&&qe("relay","deposit_submitted")},[jt]);let Dr=(()=>{let W=Number(y?.min);return Number.isFinite(W)&&W>=0?String(y?.min):"6"})(),sr=(()=>{let W=Number(y?.max);return Number.isFinite(W)&&W>0?String(y?.max):void 0})(),ee=(()=>{if(!x)return 0n;let W=Is(Dr,x.token.decimals),ye=BigInt(x.minAmount);return W>ye?W:ye})(),Te=x?Gt(ee,x.token.decimals):Dr,j=(()=>{if(!x||!oe||ee<=0n)return;let W=x.token.decimals,ye=oe.decimals,wr=W>=ye?oe.balance*10n**BigInt(W-ye):oe.balance/10n**BigInt(ye-W);if(wr>=ee)return;let vt=ee-wr;return{pending:Gt(oe.balance,ye),pendingSymbol:oe.symbol,remaining:Gt(vt,W)}})(),_e=p?.origins.find(W=>W.chainId===56&&!!(fe?.token&&W.token.address.toLowerCase()===fe.token.toLowerCase()))??p?.origins.find(W=>W.chainId===56&&W.token.symbol.toUpperCase()==="USDT"),ae=Number.isInteger(fe?.decimals)&&(fe?.decimals??-1)>=0?fe.decimals:_e?.token.decimals,Ge=fe?.tokens?.find(W=>W.address?.toLowerCase()===fe.token?.toLowerCase()&&W.symbol)?.symbol??_e?.token.symbol,No=It!==void 0&&ae!==void 0?Gt(It,ae):void 0,no=(()=>{if(!x||ae===void 0)return;let W=x.token.decimals;if(ae>=W)return ee*10n**BigInt(ae-W);let ye=10n**BigInt(W-ae);return(ee+ye-1n)/ye})(),Cr=Tt?Pe.find(W=>W.orderId===Tt):void 0,kn=Cr??Pe.find(W=>W.status==="BSC_FUNDED"||W.status==="BRIDGE_INITIATED"||W.status==="BRIDGE_PENDING"),oo=(()=>{if(!kn||no===void 0)return!1;try{return BigInt(kn.amountIn)>=no}catch{return!1}})(),Ka=(()=>{if(!fe||no===void 0)return!1;try{return BigInt(fe.balance)>0n&&BigInt(fe.balance)>=no}catch{return!1}})(),Vs=(()=>{let W={amount:No,symbol:Ge,backendStatus:kn?.status};return!A||!be||!nt?{phase:"connecting",...W}:et?.toLowerCase()!==S.toLowerCase()||wt?{phase:"unavailable",...W}:Cr?.status==="COMPLETED"?{phase:"completed",...W,backendStatus:Cr.status}:Cr&&n1(Cr.status)?{phase:"failed",...W,backendStatus:Cr.status}:kn?.status==="BRIDGE_INITIATED"||kn?.status==="BRIDGE_PENDING"?{phase:"processing",...W}:kn?.status==="BSC_FUNDED"&&oo||Ka?{phase:"funded",...W}:Cr?{phase:"detected",...W,backendStatus:Cr.status}:{phase:"waiting",...W}})(),Za=x&&sr?Is(sr,x.token.decimals):void 0,Wt=x&&R.trim()?Is(R,x.token.decimals):0n,Xa=!!(x&&Wt>0n&&Wt<ee),Xr=!!(x&&Za!==void 0&&Wt>0n&&Wt>Za),Yt=(()=>{if(x){if(Xa)return`Amount is below the ${Te} ${x.token.symbol} minimum.`;if(Xr)return`Amount is above the ${sr} ${x.token.symbol} maximum.`}})(),ao=t.showOneClickDeposit??!1,Pn=x&&R.trim()?Is(R,x.token.decimals).toString():void 0,Ja={activeView:a,setActiveView:i,recoveryOpen:s,setRecoveryOpen:l,resolvedApiBaseUrl:h,wallet:u,catalog:p,catalogLoading:w,catalogError:g,origin:x,setOrigin:k,amount:R,setAmount:I,recipient:S,setRecipient:C,recipientValid:E,balance:M,balanceLoading:F,insufficientBalance:L,depositAddress:z,depositAddressLoading:U,depositAddressError:re,arrivalStatus:Vs,quote:Y,quoteLoading:_,quoteError:G,canDeposit:ne,deposit:te,depositState:O,targetOptions:Z,selectedTarget:H,setSelectedTarget:ce,showAmountInput:ve,minNotice:x?{min:Te,symbol:x.token.symbol,...j}:void 0,showRecipientInput:ge,showTargetSelector:r,showOneClick:ao,showConnectPrompt:we,showRecipientHint:Ze,canRecover:he,recoverableCount:B,recoveryTargetsLoading:We,recoveryTargets:ze,recoveryOrders:er,historyOrdersLoading:bt,historyOrdersError:wt,refreshRecovery:ut,trustedFactories:b,amountHint:Yt,amountSmallestUnits:Pn,onMax:ve&&M&&M.value>0n?yt:void 0};return Ie.useLayoutEffect(()=>{e.publish(Ja)}),Ie.useLayoutEffect(()=>()=>e.publish(null),[e]),null}import{jsx as bd}from"react/jsx-runtime";function s1(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:c}=e,[h,u]=Es.useState(!1),m=l!==void 0,y=m?l:h,b=Es.useCallback(f=>{m||u(f),d?.(f)},[m,d]);return bd(ed.Provider,{value:e,children:bd(Xm,{open:y,children:bd(Ln,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:y,onOpenChange:b,children:c})})})}var Wa=Object.assign(s1,{Trigger:Wm,Content:jm});import{createContext as l1,useContext as d1}from"react";var wd=l1(null);function yd(){let e=d1(wd);if(!e)throw new Error("RelayHistory compound components must be used within <RelayHistory>");return e}import*as Ar from"react";import{jsx as Ro}from"react/jsx-runtime";function Jm({className:e}){let t=yd(),{open:r}=ln();return Ar.useEffect(()=>{r&&qe("relay","history_opened")},[r]),Ro(xe,{feature:"relay",children:Ro(Dn,{ariaTitle:"Transfer history",className:e??t.className,children:Ro(c1,{})})})}function c1(){let e=yd(),{theme:t}=ln(),r=Ar.useMemo(()=>{if(e.client)return e.client;let f=ro({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return Ht({baseUrl:f})},[e.client,e.apiBaseUrl,e.environment]),n=e.recipient??e.walletAddress,o=!!(n&<(n)),[a,i]=Ar.useState(),[s,l]=Ar.useState(!1),[d,c]=Ar.useState(),h=Ar.useRef(e.onError);h.current=e.onError,Ar.useEffect(()=>{if(!o){i(void 0),l(!1),c(void 0);return}let f=!1;return i(void 0),l(!0),c(void 0),r.getConfig().then(p=>{f||i(p)}).catch(p=>{if(f)return;let w=p instanceof Error?p:new Error(String(p));c(w),h.current?.(w)}).finally(()=>{f||l(!1)}),()=>{f=!0}},[r,o]);let{orders:u,ordersLoading:m,ordersError:y}=to({client:r,recipient:o?n:void 0,enabled:!!a,onError:e.onError}),b=Ar.useCallback(f=>{if(!e.onOutlink)return;let w=f.target.closest?.('a[target="_blank"]');w?.href&&e.onOutlink(w.href)},[e.onOutlink]);return Ro("div",{className:"rd-root rd-wizard","data-theme":t,children:o?Ro("div",{onClick:b,children:Ro(xs,{orders:u,isLoading:s||m,error:d??y,catalog:a,showTitle:!1})}):Ro(Oa,{requiresIdentity:!0})})}import{jsx as xd}from"react/jsx-runtime";function $m({asChild:e,children:t}){return xd(xe,{feature:"relay",children:xd(ta,{asChild:e??t!=null,children:t??xd("button",{type:"button","data-track":"open",children:"History"})})})}import{jsx as eg}from"react/jsx-runtime";function p1(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o="min(640px, calc(100vw - 32px))",drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:c}=e;return eg(wd.Provider,{value:e,children:eg(Ln,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:c})})}var tg=Object.assign(p1,{Trigger:$m,Content:Jm});import*as qr from"react";import*as Lr from"react";var Ms=[],u1=3e4;function rg({client:e,recipient:t}){let[r,n]=Lr.useState({targets:Ms}),[o,a]=Lr.useState(0),i=Lr.useRef(void 0),s=Lr.useRef(void 0),l=t&<(t)?t.toLowerCase():void 0;Lr.useEffect(()=>{if(!l){n({targets:Ms});return}let b=!1,f=i.current;if(!f||f.client!==e||f.recipientKey!==l||f.generation!==o){let p=(async()=>{let w,g=[];try{g=(await e.getConfig()).targets}catch(S){w=S instanceof Error?S:new Error(String(S))}let x=g.length===0?[()=>e.getRecovery({user:l})]:g.map(S=>()=>e.getRecovery({user:l,target:S.symbol})),k=await Promise.all(x.map(async S=>{try{return{info:await S()}}catch(C){return{error:C instanceof Error?C:new Error(String(C))}}})),R=g.length===0?k[0]?.info?[{symbol:"",isDefault:!0,info:k[0].info}]:[]:g.flatMap((S,C)=>k[C]?.info?[{symbol:S.symbol,isDefault:S.isDefault,info:k[C].info}]:[]),I=k.find(S=>S.error)?.error;return{targets:R,badgeFailed:!!(w||I&&R.length===0),error:w??I}})().catch(w=>({targets:Ms,badgeFailed:!0,error:w instanceof Error?w:new Error(String(w))}));f={client:e,recipientKey:l,generation:o,promise:p},i.current=f,p.finally(()=>{s.current={client:e,recipientKey:l,at:Date.now()},i.current?.promise===p&&(i.current=void 0)})}return f.promise.then(p=>{b||n({recipientKey:l,targets:p.targets,badgeFailed:p.badgeFailed,error:p.error})}),()=>{b=!0}},[e,l,o]);let d=Lr.useCallback(()=>a(b=>b+1),[]),c=Lr.useCallback(()=>{if(!l)return;let b=i.current;if(b?.client===e&&b.recipientKey===l)return;let f=s.current;f?.client===e&&f.recipientKey===l&&Date.now()-f.at<u1||a(p=>p+1)},[e,l]),h=l&&r.recipientKey===l?r.targets:Ms,u=l&&r.recipientKey===l?r.error:void 0,m=!!(l&&r.recipientKey!==l),y=!!(l&&r.recipientKey===l&&r.badgeFailed);return Lr.useMemo(()=>({count:y?0:Rs($o(h)),targets:h,loading:m,error:u,refresh:d,refreshIfStale:c}),[h,m,y,u,d,c])}import{createContext as f1,useContext as m1}from"react";var vd=f1(null);function kd(){let e=m1(vd);if(!e)throw new Error("RelayRecovery compound components must be used within <RelayRecovery>");return e}function Rd(){return kd().props}function ng(){return kd().recovery}function og(){return kd().recovery.count}import*as So from"react";import{jsx as Co,jsxs as h1}from"react/jsx-runtime";function ag({className:e}){let t=Rd(),{open:r}=ln();return So.useEffect(()=>{r&&qe("relay","recovery_opened")},[r]),Co(xe,{feature:"relay",children:Co(Dn,{ariaTitle:"Recover stuck funds",className:e??t.className,children:Co(g1,{})})})}function g1(){let e=Rd(),{targets:t,loading:r,refresh:n}=ng(),{theme:o}=ln(),a=So.useMemo(()=>ro({apiBaseUrl:e.apiBaseUrl,environment:e.environment}),[e.apiBaseUrl,e.environment]),i=So.useMemo(()=>e.client?e.client:Ht({baseUrl:a}),[e.client,a]),s=So.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||lt(e.recipient)&&e.recipient.toLowerCase()===l.toLowerCase())),c=d?l:void 0,h=ot(e.environment),u=rr("apps.json",h,w=>ni(w,h)),m=So.useMemo(()=>e.trustedFactories??ks(u),[e.trustedFactories,u]),y=!!(e.writeContract&&e.readContract&&e.waitForReceipt),b=!!c&&y,f=c,{orders:p}=to({client:i,recipient:b?f:void 0,enabled:b,live:!1});return h1("div",{className:"rd-root rd-wizard","data-theme":o,children:[!l&&Co("p",{className:"rd-muted","data-testid":"rd-recovery-connect-note",children:"Connect a wallet to check recoverable funds."}),l&&!d&&Co("p",{className:"rd-muted","data-testid":"rd-recovery-recipient-note",children:"Recovery is only available for the connected wallet."}),d&&!y&&Co("p",{className:"rd-muted","data-testid":"rd-recovery-unsupported-note",children:"This wallet can't sign recovery transactions."}),b&&Co(Ns,{client:e.client,apiBaseUrl:a,recipient:c,wallet:s,trustedFactories:m,targets:t,targetsLoading:r,orders:p,onRecovered:n,onRecoverySuccess:e.onRecoverySuccess,showTitle:!1,onError:e.onError})]})}import{jsx as Sd}from"react/jsx-runtime";function ig({asChild:e,children:t}){let r=og();return Sd(xe,{feature:"relay",children:Sd(ta,{asChild:e??t!=null,dataAttributes:{"data-rd-recovery-count":r},children:t??Sd("button",{type:"button","data-track":"open",children:"Recover"})})})}import{jsx as sg}from"react/jsx-runtime";function b1(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:c}=e,[h,u]=qr.useState(!1),m=l!==void 0,y=m?l:h,b=qr.useCallback(R=>{m||u(R),d?.(R)},[m,d]),f=qr.useMemo(()=>{if(e.client)return e.client;let R=ro({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return Ht({baseUrl:R})},[e.client,e.apiBaseUrl,e.environment]),p=e.walletAddress&<(e.walletAddress)?e.walletAddress:void 0,w=p&&(!e.recipient||lt(e.recipient)&&e.recipient.toLowerCase()===p.toLowerCase())?p:void 0,g=rg({client:f,recipient:w});qr.useEffect(()=>{y&&g.refreshIfStale()},[y,g.refreshIfStale]);let x=qr.useRef(void 0);qr.useEffect(()=>{!y||!g.error||x.current===g.error||(x.current=g.error,e.onError?.(g.error))},[y,g.error,e.onError]);let k=qr.useMemo(()=>({props:e,recovery:g}),[e,g]);return sg(vd.Provider,{value:k,children:sg(Ln,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:y,onOpenChange:b,children:c})})}var lg=Object.assign(b1,{Trigger:ig,Content:ag});import{useCallback as w1,useEffect as y1,useMemo as x1,useRef as v1,useState as As}from"react";function dg(e={}){let t=v1(e);t.current=e;let r=x1(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayConfig: either `client` or `apiBaseUrl` must be provided");return Ht({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.enabled??!0,o=e.refetchInterval,[a,i]=As(),[s,l]=As(!1),[d,c]=As(),[h,u]=As(0);y1(()=>{if(!n){i(void 0),l(!1),c(void 0);return}let y=!1,b=!1;i(void 0),l(!0),c(void 0);async function f(){if(!(y||b)){b=!0;try{let w=await r.getConfig();if(y)return;i(w),c(void 0)}catch(w){if(y)return;let g=w instanceof Error?w:new Error(String(w));c(g),t.current.onError?.(g)}finally{b=!1,y||l(!1)}}}f();let p=typeof o=="number"&&Number.isFinite(o)&&o>0?setInterval(()=>{f()},o):void 0;return()=>{y=!0,p&&clearInterval(p)}},[r,n,h,o]);let m=w1(()=>u(y=>y+1),[]);return{config:a,loading:s,error:d,refresh:m}}import{useQuery as k1}from"@tanstack/react-query";import{useCallback as cg,useEffect as R1,useMemo as Cd,useRef as pg}from"react";var S1=1,ug=new WeakMap;function C1(e){let t=ug.get(e);if(t!==void 0)return t;let r=S1++;return ug.set(e,r),r}function fg(e={}){let t=pg(e);t.current=e;let r=Cd(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayRecovery: either `client` or `apiBaseUrl` must be provided");return Ht({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.recipient,o=n&<(n)?n:void 0,a=e.target,i=e.query,s=Cd(()=>C1(r),[r]),l=Cd(()=>["relay","recovery",s,o??null,a??null],[s,o,a]),d=k1({retry:!1,...i,queryKey:l,queryFn:async()=>{if(!o)throw new Error("useRelayRecovery: a valid EVM recipient is required");return r.getRecovery({user:o,target:a})},enabled:o?i?.enabled:!1}),c=pg(0);R1(()=>{let b=d.error,f=d.errorUpdatedAt;!b||f===c.current||(c.current=f,t.current.onError?.(b),b instanceof cn&&b.status===401&&t.current.onUnauthorized?.())},[d.error,d.errorUpdatedAt]);let h=cg(()=>{d.refetch()},[d.refetch]),u=Fa({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:h}),m=d.data,y=cg(async(b,f)=>{m&&await u.recover(m,b,f)},[u,m]);return{info:m,loading:d.isLoading,error:d.error??void 0,isFetching:d.isFetching,refresh:h,recover:y,recoveryState:u.stateFor(m?.forwarder)}}import{Fragment as M1,jsx as Yr,jsxs as Kr}from"react/jsx-runtime";var N1={bscBridge:"https://bscscan.com/tx/",crossFinalize:"https://scan.crosstoken.io/tx/",crossExecute:"https://scan.crosstoken.io/tx/"},T1={bscBridge:"Bridge tx (BSC)",crossFinalize:"Finalize tx (CROSS)",crossExecute:"Execute tx (CROSS)"};function I1(e){return e==="done"?"\u2713":e==="active"?"\u25CF":""}function mg(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function E1(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 gg({orderId:e,order:t,error:r}){let n=!t&&!r;return Kr("section",{className:"rd-card",children:[Kr("div",{className:"rd-card-header",children:[Yr("h2",{className:"rd-card-title",children:"4. Status"}),t&&Yr("span",{className:`rd-status-pill${t.status==="COMPLETED"?" rd-status-pill-success":mg(t.status)?" rd-status-pill-failure":""}`,children:t.status})]}),Kr("p",{className:"rd-card-hint",children:["Order ",e]}),n&&Kr("p",{className:"rd-muted",children:[Yr("span",{className:"rd-spinner"})," Loading status..."]}),r&&Kr("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load order status: ",r.message]}),t&&Kr(M1,{children:[Yr("ol",{className:"rd-stepper",children:t.steps.map((o,a)=>Kr("li",{className:E1(o.status),children:[Kr("div",{className:"rd-stepper-rail",children:[Yr("span",{className:"rd-stepper-dot",children:I1(o.status)}),a<t.steps.length-1&&Yr("span",{className:"rd-stepper-line"})]}),Kr("div",{className:"rd-stepper-body",children:[Yr("div",{className:"rd-stepper-label",children:o.label}),o.key==="bridge"&&t.txs.bscBridge&&Yr("div",{className:"rd-stepper-meta",children:Yr(Nd,{orderTxs:t.txs,txKey:"bscBridge"})}),o.key==="deliver"&&(t.txs.crossFinalize||t.txs.crossExecute)&&Kr("div",{className:"rd-stepper-meta",children:[t.txs.crossFinalize&&Yr(Nd,{orderTxs:t.txs,txKey:"crossFinalize"}),t.txs.crossExecute&&Yr(Nd,{orderTxs:t.txs,txKey:"crossExecute"})]})]})]},o.key))}),mg(t.status)&&Kr("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"&&Yr("div",{className:"rd-callout rd-callout-success",children:"crossd delivered. This order is complete."})]})]})}function Nd({orderTxs:e,txKey:t}){let r=e[t];return r?Kr("a",{href:`${N1[t]}${r}`,target:"_blank",rel:"noreferrer",children:[T1[t],": ",r.slice(0,10),"..."]}):null}function Ls(e){return`${e.chainId}:${e.address.toLowerCase()}`}function Td(e,t){return Ls(e)===Ls(t)}function Ds(e,t){if(t)return e.find(r=>Td(r,t))}function _a(e,t,r){return t?{fromTokens:(r==="swap"?[t.swap.from]:t.bridge.from).map(o=>Ds(e,o)).filter(o=>!!o),targetToken:Ds(e,t.target)}:{fromTokens:[],targetToken:void 0}}function Ps(e,t){return e.some(r=>r.chainId===t.chainId&&r.address.toLowerCase()===t.address.toLowerCase())}function hg(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 A1(e,t){let r=hg(e),n=hg(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 bg(e,t=lo){if(!e)return!0;let r=A1(t,e);return r===null?!0:r>=0}var wg={swap:"swap",bridge:"bridge",transfer:"transferCrypto"};function Ga(e,t){return t?.[wg[e]]??e!=="transfer"}function Ha(e,t){return bg(t?.[wg[e]])}function Os(e,t,r){return Ga(e,t)&&Ha(e,r)}var yg={dev:"https://stg.oneusd.money/",stage:"https://stg.oneusd.money/",production:"https://www.oneusd.money/"};function xg(e){let t=e.trim().toLowerCase().replace(/\.$/,"");return t==="oneusd.money"||t.endsWith(".oneusd.money")}function vg(e,t){return e?.items?.find(({id:n,type:o})=>n.toLowerCase()==="oneusd"||o.toLowerCase()==="oneusd")?.url[t]}import*as Bs from"react";function kg(e){let[t,r]=Bs.useState(null);return Bs.useEffect(()=>{if(!e)return;let n=!0;return Sl().then(o=>{n&&r(o)}).catch(()=>{}),()=>{n=!1}},[e]),t}function Rg(e,t){return t==="bridge"?!0:e==="bridge"||e==="bridge-swap"||e==="swap-bridge"}function L1(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 D1(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function Sg(e,t){return Rg(e.pathType,t)?"Bridging":"Swapping"}function Cg(e,t){let r=L1(e.toAmount);if(Rg(e.pathType,t)){let n=`arriving on ${D1(e.toToken.chainId)}`;return r?`${r} ${n}`:n}return r?`${r} Swapped`:"Transaction completed"}import{jsx as Zr,jsxs as Ag}from"react/jsx-runtime";function Ng(e){return Zr("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:Zr("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 Tg(e){return Ag("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[Zr("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"}),Zr("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 Ig(e){return Ag("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[Zr("rect",{x:"4",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),Zr("rect",{x:"14",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),Zr("rect",{x:"4",y:"14",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),Zr("path",{d:"M14 14h2v2h-2zM18 18h2v2h-2z",fill:"currentColor"})]})}function Eg(e){return Zr("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:Zr("path",{d:"m9 6 6 6-6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Mg(e){return Zr("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:Zr("path",{d:"m6 6 12 12M18 6 6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}de(`.gou-fab{--gou-collapse-duration: .24s;--gou-collapse-ease: cubic-bezier(.32, .72, 0, 1);position:fixed;right:var(--gou-right, 2rem);bottom:calc(env(safe-area-inset-bottom,0px) + var(--gou-bottom, 2rem));z-index:var(--gou-z-index, 40);display:inline-flex;width:max-content;align-items:center;gap:8px;padding:4px 20px 4px 4px;border:0;border-radius:9999px;background:#fff;color:#121212;box-shadow:0 4px 20px #00000073;font:inherit;cursor:pointer;transition:gap var(--gou-collapse-duration) var(--gou-collapse-ease),padding var(--gou-collapse-duration) var(--gou-collapse-ease),transform .15s ease,background .15s ease;-webkit-tap-highlight-color:transparent}[data-theme=light] .gou-fab{background:#121212;color:#fff;box-shadow:0 4px 20px #00000040}.gou-fab:active:not(:disabled){transform:scale(.96)}.gou-fab:focus-visible{outline:3px solid #f3742e;outline-offset:3px}.gou-fab[data-icon-only=true]{gap:0;padding:0}.gou-fab:disabled{cursor:default}.gou-fab[data-trigger-mode=button]{position:relative;right:auto;bottom:auto;z-index:auto;vertical-align:middle}[data-gou-mode=button]{display:inline-block}.gou-fab-status{pointer-events:none;cursor:default}.gou-fab-icon-frame{position:relative;display:inline-flex;width:38px;height:38px;flex-shrink:0;border-radius:9999px;transition:width var(--gou-collapse-duration) var(--gou-collapse-ease),height var(--gou-collapse-duration) var(--gou-collapse-ease)}.gou-fab-icon{display:block;width:100%;height:100%;border-radius:inherit;object-fit:contain}.gou-fab[data-icon-only=true] .gou-fab-icon-frame{width:52px;height:52px}.gou-fab-progress-ring{position:absolute;inset:-2px;border:2px solid rgba(243,116,46,.25);border-top-color:#f3742e;border-radius:9999px;animation:gou-spin .9s linear infinite}.gou-fab-label{overflow:hidden;max-width:180px;opacity:1;font-size:14px;font-weight:600;line-height:1.5;white-space:nowrap;transition:max-width var(--gou-collapse-duration) var(--gou-collapse-ease),opacity calc(var(--gou-collapse-duration) * .6) var(--gou-collapse-ease)}.gou-fab[data-icon-only=true] .gou-fab-label{max-width:0;opacity:0}.gou-fab[data-tx-phase] .gou-fab-label{max-width:260px}.gou-fab-trigger-copy{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;line-height:1.25}.gou-fab-apr{color:var(--ds-system-orange-high, #ff7a3d);font-size:11px;font-weight:600;line-height:1.25}.gou-fab[data-tx-phase=success]{animation:gou-result-success 1.2s ease-out}.gou-fab[data-tx-phase=failure]{animation:gou-result-failure 1.2s ease-out}.gou-fab-dots>span{animation:gou-status-dot 1.4s ease-in-out infinite}.gou-fab-dots>span:nth-child(2){animation-delay:.2s}.gou-fab-dots>span:nth-child(3){animation-delay:.4s}.gou-tooltip{position:absolute;right:0;bottom:calc(100% + 8px);pointer-events:none;padding:6px 10px;border-radius:8px;background:#121212;color:#fff;box-shadow:0 8px 24px #0000002e;font-size:12px;font-weight:500;opacity:0;white-space:nowrap;transition:opacity .2s ease}[data-theme=dark] .gou-tooltip{background:#f5f5f5;color:#121212}.gou-fab:hover .gou-tooltip{opacity:1}.gou-shell{--ds-bg-default: #1c1c1d;--ds-bg-dim: #181819;--ds-surface-default: #1c1c1d;--ds-surface-medium: #212224;--ds-surface-high: rgba(255, 255, 255, .08);--ds-border-default: rgba(255, 255, 255, .1);--ds-content-highest: #ffffff;--ds-content-high: rgba(255, 255, 255, .85);--ds-content-medium: rgba(255, 255, 255, .65);--ds-content-low: rgba(255, 255, 255, .4);--ds-accent-primary-default: #f3742e;--ds-accent-primary-high: #f3742e;--ds-accent-primary-low: rgba(243, 116, 46, .1);--ds-accent-primary-on: #ffffff;--gou-bg: #1c1c1d;--gou-card: #212224;--gou-card-hover: rgba(255, 255, 255, .08);--gou-border: rgba(255, 255, 255, .1);--gou-text: #ffffff;--gou-muted: rgba(255, 255, 255, .65);background:var(--gou-bg);color:var(--gou-text)}.gou-shell[data-theme=light]{--ds-bg-default: #ffffff;--ds-bg-dim: #fafbfd;--ds-surface-default: #ffffff;--ds-surface-medium: rgba(0, 0, 0, .01);--ds-surface-high: rgba(0, 0, 0, .03);--ds-border-default: rgba(0, 0, 0, .06);--ds-content-highest: #000000;--ds-content-high: rgba(0, 0, 0, .85);--ds-content-medium: rgba(0, 0, 0, .65);--ds-content-low: rgba(0, 0, 0, .4);--gou-bg: #ffffff;--gou-card: #ffffff;--gou-card-hover: rgba(0, 0, 0, .03);--gou-border: rgba(0, 0, 0, .06);--gou-text: #000000;--gou-muted: rgba(0, 0, 0, .65)}.gou-chooser{overflow:hidden}.gou-chooser-body{position:relative;display:flex;flex-direction:column;gap:24px;padding:24px}.gou-close{position:absolute;top:16px;right:16px;display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;padding:0;border:0;border-radius:9999px;background:transparent;color:var(--gou-muted);cursor:pointer}.gou-close:hover{background:var(--gou-card-hover);color:var(--gou-text)}.gou-close svg{width:20px;height:20px}.gou-intro{display:flex;flex-direction:column;gap:6px;padding:0 32px 0 0;text-align:left}.gou-intro h2{margin:0;color:var(--gou-text);font-size:20px;font-weight:650;line-height:1.6}.gou-intro-link{display:inline-flex;width:fit-content;align-items:center;gap:4px;color:var(--ds-accent-primary-default, #f3742e);font-size:14px;font-weight:600;line-height:1.5;text-decoration:none}.gou-intro-link-icon{flex-shrink:0}.gou-intro-link>span{text-decoration:underline;text-underline-offset:3px}.gou-intro-link:focus-visible{outline:2px solid #f3742e;outline-offset:3px;border-radius:4px}.gou-actions{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}.gou-action{display:flex;width:100%;min-width:0;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--gou-border);border-radius:12px;background:var(--gou-card);color:var(--gou-text);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s ease,background .15s ease}.gou-action:hover:not(:disabled){border-color:#f3742e;background:var(--gou-card-hover)}.gou-action:disabled{cursor:not-allowed;opacity:.5}.gou-action:focus-visible{outline:2px solid #f3742e;outline-offset:2px}.gou-action-icon{display:inline-flex;width:32px;height:32px;flex-shrink:0;align-items:center;justify-content:center;border:1px solid var(--gou-border);border-radius:9px;color:var(--gou-text);transition:border-color .15s ease,color .15s ease}.gou-action:hover:not(:disabled) .gou-action-icon{border-color:var(--ds-accent-primary-default, #f3742e);color:var(--ds-accent-primary-default, #f3742e)}.gou-action-icon svg{width:17px;height:17px}.gou-action-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:2px}.gou-action-title{display:flex;min-width:0;align-items:center;gap:6px;font-size:16px;font-weight:650}.gou-action-description{color:var(--gou-muted);font-size:14px;line-height:1.45}.gou-action-chevron{width:18px;height:18px;flex-shrink:0;color:var(--gou-muted)}.gou-badge{flex-shrink:0;padding:2px 6px;border-radius:5px;background:#f3742e24;color:#f3742e;font-size:10px;font-weight:650}.gou-badge[data-tone=muted]{background:var(--gou-card-hover);color:var(--gou-muted)}.gou-execution{height:auto;max-height:90dvh;overflow:hidden}.gou-execution .bf-root{width:100%;max-height:90dvh}.gou-connect-required,.gou-route-state{display:flex;min-height:360px;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px;text-align:center}.gou-connect-required h3,.gou-route-state h3{margin:0;color:var(--gou-text);font-size:18px}.gou-connect-required p,.gou-route-state p{max-width:320px;margin:0;color:var(--gou-muted);font-size:14px;line-height:1.5}.gou-lock{font-size:28px}.gou-connect-required button{width:100%;max-width:320px;margin-top:10px;padding:12px 16px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #00ceb2);color:var(--ds-accent-primary-on, #001b18);font:inherit;font-size:16px;font-weight:650;cursor:pointer}.gou-spinner{width:28px;height:28px;border:3px solid var(--gou-border);border-top-color:var(--ds-accent-primary-default, #00ceb2);border-radius:9999px;animation:gou-spin .8s linear infinite}@keyframes gou-spin{to{transform:rotate(360deg)}}@keyframes gou-status-dot{0%,60%,to{opacity:.2}30%{opacity:1}}@keyframes gou-result-success{0%{outline:0 solid rgba(30,202,119,0)}30%{outline:3px solid rgba(30,202,119,.75)}to{outline:0 solid rgba(30,202,119,0)}}@keyframes gou-result-failure{0%{outline:0 solid rgba(255,60,83,0)}30%{outline:3px solid rgba(255,60,83,.75)}to{outline:0 solid rgba(255,60,83,0)}}@media(max-width:767px){.gou-fab{right:var(--gou-right-mobile, 1rem)}.gou-fab-icon-frame{width:32px;height:32px}.gou-fab[data-icon-only=true] .gou-fab-icon-frame{width:40px;height:40px}.gou-chooser-body{padding:24px 16px 28px}.gou-execution{height:auto;max-height:70dvh}.gou-execution .bf-root{max-height:calc(70dvh - 24px)}}@media(prefers-reduced-motion:reduce){.gou-fab,.gou-fab-icon-frame,.gou-fab-label,.gou-tooltip{transition:none}.gou-spinner,.gou-fab-progress-ring{animation-duration:1.6s}.gou-fab[data-tx-phase=success],.gou-fab[data-tx-phase=failure],.gou-fab-dots>span{animation:none}}
|
|
21
|
+
`);import{Fragment as F1,jsx as je,jsxs as Qt}from"react/jsx-runtime";var P1=[{id:"swap",label:"Swap",eta:"Instant",Icon:Ng},{id:"bridge",label:"Bridge",Icon:Tg},{id:"transfer",label:"Transfer Crypto",eta:"QR deposit",Icon:Ig}],O1=4e3;function Lg(e){return e instanceof Error?e.message:typeof e=="string"?e:"Unknown error"}function zs(e,t){try{e?.(t)}catch{}}function B1({compactTrigger:e,collapseOnScroll:t,scrollThreshold:r}){let[n,o]=Ke.useState(!1);return Ke.useEffect(()=>{if(t===!1){o(!1);return}let a=r??200,i=a+24,s=Math.max(0,a-24),l=0,d=window.scrollY>a;o(d);let c=()=>{l=0;let u=d?window.scrollY>s:window.scrollY>i;u!==d&&(d=u,o(u))},h=()=>{l||(l=requestAnimationFrame(c))};return window.addEventListener("scroll",h,{passive:!0}),()=>{l&&cancelAnimationFrame(l),window.removeEventListener("scroll",h)}},[t,r]),!!(e||n)}function z1({loading:e}){return Qt("div",{className:"gou-route-state",role:"status",children:[e&&je("span",{className:"gou-spinner","aria-hidden":"true"}),je("h3",{children:e?"Preparing route":"Route unavailable"}),je("p",{children:e?"Loading token and contract configuration.":"The configured ONEUSD route is not available in this environment."})]})}function Dg({walletAddress:e,tokens:t,pairs:r,loading:n=!1,bridge:o,relay:a,env:i,targetSymbol:s,relayTargetSymbol:l="ONEUSD",targetIconUrl:d,mode:c="floating",buttonComponent:h,theme:u="dark",mobileBreakpoint:m=768,drawerDirection:y="bottom",dialogWidth:b="480px",drawerMaxWidth:f,drawerMinWidth:p,style:w,className:g,contentClassName:x,hidden:k=!1,compactTrigger:R,collapseOnScroll:I=!0,scrollThreshold:S=200,waitForTransaction:C,transactionResultDurationMs:E=O1,onRequestConnect:M,onEvent:F}){let[L,z]=Ke.useState(!1),[A,U]=Ke.useState(null),[re,Y]=Ke.useState(!1),[_,G]=Ke.useState(null),[ne,te]=Ke.useState(!1),O=Ke.useRef(0),Z=Ke.useRef(!1),H=Ke.useRef(null),ce=Ke.useRef(!0),ve=B1({compactTrigger:R,collapseOnScroll:I,scrollThreshold:S}),ge=Ke.useMemo(()=>ot(i),[i]),ue=rr("apps.json",ge,P=>P?.getOneUsd?.modes),me=rr("apps.json",ge,P=>P?.getOneUsd?.minVersions),Ze=rr("app-launcher-v2.json",ge,P=>vg(P,ge))??yg[ge],he=Ke.useMemo(()=>P1.filter(({id:P})=>Ga(P,ue)),[ue]),Ee=he.length>0,at=kg(!k&&Ee),Qe=Ke.useMemo(()=>_a(t,r,"swap"),[r,t]),We=Ke.useMemo(()=>_a(t,r,"bridge"),[r,t]),Be=Qe.targetToken??We.targetToken,rt=s??Be?.symbol??"ONEUSD",Nt=d??Be?.iconUrl??rd,ut=c==="floating"&&ve,xt=c==="button"&&h?h:"button";Ke.useEffect(()=>(ce.current=!0,()=>{ce.current=!1,H.current&&clearTimeout(H.current)}),[]),Ke.useEffect(()=>{te(!xg(window.location.hostname))},[]),Ke.useEffect(()=>{Ee||z(!1)},[Ee]);let be=Ke.useCallback(P=>F?.(P),[F]),Vt=Ke.useCallback(()=>{_||!Ee||(be({name:"fab_click",state:ut?"icon_only":"expanded"}),z(!0))},[be,Ee,_,ut]),bt=Ke.useCallback(P=>{_||!Os(P,ue,me)||(be({name:"action_select",action:P}),z(!1),P==="transfer"&&Y(!0),U(P))},[be,ue,me,_]),wt=Ke.useCallback(P=>{be({name:"connect_click",action:P}),Promise.resolve(M?.()).catch(ze=>{be({name:"failure",action:P,message:Lg(ze)})})},[be,M]),nt=A==="swap"||A==="bridge"?A:null,et=nt==="swap"?Qe:We,er=!!(r&&et.targetToken&&et.fromTokens.length>0),At=Ke.useMemo(()=>{if(!et.targetToken)return;let P=et.targetToken;return ze=>{let B=o.getToTokens?.(ze,t);return B&&!Ps(B,P)?[]:[P]}},[o.getToTokens,et.targetToken,t]),{onSubmitted:Ut,onSuccess:Lt,onFailed:Ve,...Pe}=o,{onDeposited:ft,onError:Tt,...Ne}=a??{},It=Ke.useCallback((P,ze,B,oe,se)=>{!ce.current||O.current!==P||(G({id:P,phase:ze,action:B,label:oe,txHash:se}),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{!ce.current||O.current!==P||(Z.current=!1,G(null),H.current=null)},Math.max(0,E)))},[E]),qt=Ke.useCallback((P,ze)=>{if(Z.current)return;Z.current=!0;let B=++O.current,oe=Sg(P,ze);G({id:B,phase:"pending",action:ze,label:oe,txHash:P.txHash}),z(!1),U(null),zs(Ut,P),Promise.resolve().then(()=>C?.(P)).then(()=>{!ce.current||O.current!==B||(It(B,"success",ze,Cg(P,ze),P.txHash),be({name:"success",action:ze,txHash:P.txHash}))}).catch(se=>{if(!ce.current||O.current!==B)return;let fe=Lg(se);It(B,"failure",ze,"Transaction failed",P.txHash),zs(Ve,{message:fe,txHash:P.txHash}),be({name:"failure",action:ze,message:fe})})},[be,Ve,Ut,It,C]);return je(xe,{feature:"get_one_usd",children:Qt("div",{className:g,"data-theme":u,"data-gou-mode":c,children:[Qt(Ln,{theme:u,mobileBreakpoint:m,drawerDirection:y,dialogWidth:b,drawerMaxWidth:f,drawerMinWidth:p,open:L,onOpenChange:z,children:[!k&&Ee&&(c==="button"||!_)&&Qt(xt,{type:"button",className:"gou-fab",style:w,"data-trigger-mode":c,"data-icon-only":ut?"true":"false",onClick:Vt,disabled:!!_,"aria-label":`Get ${rt}`,"data-track":"fab_click",children:[c==="floating"&&Qt("span",{className:"gou-tooltip",children:["Choose how to get ",rt]}),je("span",{className:"gou-fab-icon-frame",children:je("img",{className:"gou-fab-icon",src:Nt,alt:""})}),Qt("span",{className:"gou-fab-label gou-fab-trigger-copy",children:[Qt("span",{children:["Get ",rt]}),at!==null&&je("span",{className:"gou-fab-apr",children:Pi(at)})]})]}),_&&Qt("div",{className:"gou-fab gou-fab-status",style:c==="floating"?w:void 0,"data-floating-status":"true","data-icon-only":"false","data-tx-phase":_.phase,role:"status","aria-live":"polite","aria-label":_.phase==="pending"?`${_.label} transaction in progress`:_.label,children:[Qt("span",{className:"gou-fab-icon-frame",children:[je("img",{className:"gou-fab-icon",src:Nt,alt:""}),_.phase==="pending"&&je("span",{className:"gou-fab-progress-ring","aria-hidden":"true"})]}),je("span",{className:"gou-fab-label",children:_.phase==="pending"?Qt(F1,{children:[_.label,Qt("span",{className:"gou-fab-dots","aria-hidden":"true",children:[je("span",{children:"."}),je("span",{children:"."}),je("span",{children:"."})]})]}):_.label})]}),je(Dn,{ariaTitle:`Get ${rt}`,className:`gou-shell gou-chooser ${x??""}`,children:Qt("div",{className:"gou-chooser-body",children:[je("button",{type:"button",className:"gou-close",onClick:()=>z(!1),"aria-label":"Close",children:je(Mg,{})}),Qt("header",{className:"gou-intro",children:[Qt("h2",{children:["Get ",rt]}),ne&&Qt("a",{className:"gou-intro-link",href:Ze,target:"_blank",rel:"noopener noreferrer","aria-label":"What is ONEUSD? Opens in a new tab","data-track":"oneusd_learn_more",children:[je(Bp,{size:16,className:"gou-intro-link-icon"}),je("span",{children:"What is ONEUSD?"})]})]}),je("ul",{className:"gou-actions",children:he.map(({id:P,label:ze,eta:B,Icon:oe})=>{let se=P==="swap"?`Swap the ${Qe.fromTokens[0]?.symbol??"ONE"} you already hold`:P==="bridge"?`Bridge USDT to ${rt}`:"Deposit from any chain or exchange",fe=P==="swap"?r?.swap.feeDelegated:P==="bridge"?r?.bridge.feeDelegated:!1,mt=Ha(P,me);return je("li",{children:Qt("button",{type:"button",className:"gou-action",onClick:()=>bt(P),disabled:!mt,"data-supported":mt?"true":"false","data-track":"action_select","data-track-id":P,children:[je("span",{className:"gou-action-icon",children:je(oe,{})}),Qt("span",{className:"gou-action-copy",children:[Qt("span",{className:"gou-action-title",children:[je("span",{children:ze}),fe&&mt&&je("span",{className:"gou-badge",children:"Fee Delegated"}),!mt&&je("span",{className:"gou-badge","data-tone":"muted",children:"Update required"})]}),je("span",{className:"gou-action-description",children:mt?B?`${se} \xB7 ${B}`:se:"Update the app to use this option"})]}),je(Eg,{className:"gou-action-chevron"})]})},P)})})]})})]}),je(Ln,{theme:u,mobileBreakpoint:m,drawerDirection:y,dialogWidth:b,drawerMaxWidth:f,drawerMinWidth:p,open:!!nt,onOpenChange:P=>{P||U(null)},children:je(Dn,{ariaTitle:`${nt==="bridge"?"Bridge":"Swap"} to ${rt}`,className:`gou-shell gou-execution ${x??""}`,children:er?je(Vo,{...Pe,env:i,variant:"embedded",title:nt==="bridge"?"Bridge":"Swap",feeDelegated:r?.swap.feeDelegated,walletAddress:e??"",isConnected:!!e,onRequestConnect:()=>wt(nt??"swap"),tokens:et.fromTokens,initialFromToken:et.fromTokens[0],initialToToken:et.targetToken,getToTokens:At,onClose:()=>U(null),onBackToWallet:()=>{U(null),z(!0)},onSubmitted:P=>{qt(P,nt??"swap")},onSuccess:P=>{zs(Lt,P)},onFailed:P=>{zs(Ve,P),be({name:"failure",action:nt??"swap",message:P.message})}},`${nt}:${et.fromTokens.map(P=>`${P.chainId}:${P.address}`).join(",")}`):je(z1,{loading:n||!r})})}),re&&je(Wa,{...Ne,environment:Ne.environment??i,theme:Ne.theme??u,mobileBreakpoint:Ne.mobileBreakpoint??m,drawerDirection:Ne.drawerDirection??y,dialogWidth:Ne.dialogWidth??b,drawerMaxWidth:Ne.drawerMaxWidth??f,drawerMinWidth:Ne.drawerMinWidth??p,walletAddress:e,open:A==="transfer",onOpenChange:P=>{P||U(null)},requireWalletConnection:!0,showRecovery:Ne.showRecovery??!0,showRecipientInput:!1,hideAmount:!0,targetTokens:[l],defaultTarget:l,onRequestConnect:()=>wt("transfer"),onDeposited:P=>{ft?.(P),be({name:"success",action:"transfer",txHash:P})},onError:P=>{Tt?.(P),be({name:"failure",action:"transfer",message:P.message})},children:je(Wa.Content,{})})]})})}import*as vn from"react";import*as _g from"@radix-ui/react-dialog";import{Drawer as Y1}from"vaul";import{createContext as U1,useContext as j1}from"react";var Fs=U1(null);function Qa(){let e=j1(Fs);if(!e)throw new Error("WalletConnectModal compound components must be used within <WalletConnectModal>");return e}import{useState as Pg,useEffect as W1,useCallback as _1}from"react";function Us(){let[e,t]=Pg([]),[r,n]=Pg(!0);W1(()=>{if(typeof window>"u"){n(!1);return}let a=[],i=l=>{let{info:d}=l.detail;d?.rdns&&!a.some(c=>c.rdns===d.rdns)&&(a.push({rdns:d.rdns,name:d.name,icon:d.icon}),t([...a]))};window.addEventListener("eip6963:announceProvider",i),window.addEventListener("eip6963:crossAnnounceProvider",i),window.dispatchEvent(new Event("eip6963:requestProvider")),window.dispatchEvent(new Event("eip6963:crossRequestProvider"));let s=setTimeout(()=>n(!1),500);return()=>{window.removeEventListener("eip6963:announceProvider",i),window.removeEventListener("eip6963:crossAnnounceProvider",i),clearTimeout(s)}},[]);let o=_1(a=>e.some(i=>i.rdns===a),[e]);return{wallets:e,isDetected:o,isLoading:r}}import*as Og from"@radix-ui/react-dialog";import{Drawer as G1}from"vaul";import{jsx as Id}from"react/jsx-runtime";function Bg({asChild:e,children:t}){let{isMobile:r}=Qa(),n=r?G1.Trigger:Og.Trigger;return Id(xe,{feature:"wallet_connect",children:Id(n,{asChild:e??t!=null,children:t??Id("button",{type:"button","data-track":"open",children:"Connect Wallet"})})})}import{useEffect as H1}from"react";import{WALLET_LABELS as Q1}from"@nexus-cross/crossx-design-system";import*as xn from"@radix-ui/react-dialog";import{Drawer as js}from"vaul";import{Fragment as jg,jsx as Ce,jsxs as ir}from"react/jsx-runtime";function zg(e,t){qe("connect","wallet_selected",{tags:{item_id:e}}),Np(e);let r=t?.();r instanceof Promise&&r.then(()=>qe("connect","connected"),n=>qe("connect","connected",{status:"failure",reason:Nr(n)}))}function V1({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 ir("button",{type:"button",className:Re("wcm-wallet-item",a&&"wcm-wallet-item--featured"),"data-track":"wallet_item_click","data-track-id":e.id,onClick:n,children:[ir("div",{className:"wcm-wallet-item-left",children:[Ce("div",{className:"wcm-wallet-icon",children:Ce(o,{})}),ir("div",{className:"wcm-wallet-name-row",children:[Ce("span",{className:"wcm-wallet-name",children:e.name}),e.badge&&Ce("span",{className:"wcm-wallet-badge",children:e.badge})]})]}),e.installUrl&&(t?Ce("span",{className:"wcm-installed-label",children:"Installed"}):Ce("span",{className:"wcm-install-btn",children:"Install"}))]})}function q1({social:e,onSignIn:t}){let r=e.icon,n=`Sign in with ${e.name}`;return ir("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:[Ce("span",{className:"wcm-social-icon",children:Ce(r,{})}),Ce("span",{className:"wcm-social-name",children:n})]})}function Fg(){let{wallets:e,activeWalletIds:t,socialProviders:r,activeSocialIds:n,termsUrl:o,privacyUrl:a,isDetected:i,close:s,isMobile:l}=Qa(),d=t.filter(u=>{let m=Nl(u).visibility;return!m||m==="always"?!0:m==="desktop-only"?!l:m==="mobile-only"?l:!0}),c=n.length>0,h=d.length>0;return ir(jg,{children:[ir("div",{className:"wcm-header",children:[ir("div",{className:"wcm-header-text",children:[Ce("h2",{className:"wcm-title",children:Q1.default}),!l&&Ce("p",{className:"wcm-subtitle",children:"Sign in instantly with your social account"})]}),Ce("button",{type:"button",className:"wcm-close-btn","data-track":"close",onClick:s,"aria-label":"Close",children:Ce(Rp,{})})]}),ir("div",{className:"wcm-body",children:[c&&ir(jg,{children:[!l&&ir("div",{className:"wcm-section-header",children:[Ce("span",{className:"wcm-section-title",children:"Social Account Wallet Connect"}),Ce("span",{className:"wcm-recommended-badge",children:"Recommended"})]}),Ce("div",{className:"wcm-social-grid",children:n.map(u=>{let m=Sp(u);return Ce(q1,{social:m,onSignIn:()=>{zg(u,r[u]),s()}},u)})}),h&&ir("div",{className:"wcm-separator",children:[Ce("div",{className:"wcm-separator-line"}),Ce("span",{className:"wcm-separator-text",children:"Other Wallets"}),Ce("div",{className:"wcm-separator-line"})]})]}),h&&Ce("div",{className:"wcm-wallet-list",children:d.map(u=>{let m=Nl(u),y=m.rdns?i(m.rdns):!1;return Ce(V1,{wallet:m,detected:y,onConnect:()=>{zg(u,e[u]),s()}},u)})}),ir("p",{className:"wcm-terms",children:["By continuing, you agree to NEXUS"," ",Ce(Ug,{href:o,track:"terms_link",children:"Terms of Service"})," ","and consent to its"," ",Ce(Ug,{href:a,track:"privacy_link",children:"Privacy Policy"}),"."]})]})]})}function Ug({href:e,track:t,children:r}){return e?Ce("a",{className:"wcm-terms-link",href:e,target:"_blank",rel:"noopener noreferrer","data-track":t,children:r}):Ce("span",{className:"wcm-terms-link",children:r})}function Wg({className:e}){let{isMobile:t,theme:r,portalStyle:n,open:o}=Qa();return H1(()=>{o&&qe("connect","opened")},[o]),t?Ce(xe,{feature:"wallet_connect",children:ir(js.Portal,{children:[Ce(js.Overlay,{className:"wcm-overlay"}),ir(js.Content,{className:Re("wcm-drawer-content",e),"data-theme":r,style:n,children:[Ce(js.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),Ce("div",{className:"wcm-drawer-handle"}),Ce("div",{className:"wcm-drawer-body",children:Ce(Fg,{})})]})]})}):Ce(xe,{feature:"wallet_connect",children:ir(xn.Portal,{children:[Ce(xn.Overlay,{className:"wcm-overlay"}),ir(xn.Content,{className:Re("wcm-dialog-content",e),"data-theme":r,style:n,children:[Ce(xn.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),Ce(xn.Description,{className:"wcm-sr-only",children:"Sign in with a social provider or pick a wallet to connect."}),Ce("div",{className:"wcm-dialog-body",children:Ce(Fg,{})})]})]})})}de(`.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
|
+
`);de(`@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
|
+
`);import{jsx as Va}from"react/jsx-runtime";var K1={};function Z1({wallets:e,socialProviders:t=K1,termsUrl:r,privacyUrl:n,theme:o="dark",mobileBreakpoint:a=768,drawerDirection:i="bottom",dialogWidth:s,drawerMaxWidth:l,drawerMinWidth:d,style:c,open:h,onOpenChange:u,children:m}){let y=Po(`(max-width: ${a}px)`),[b,f]=vn.useState(!1),p=h!==void 0,w=p?h:b,g=vn.useCallback(M=>{p||f(M),u?.(M)},[p,u]),x=vn.useCallback(()=>g(!1),[g]);On(w,x);let{isDetected:k}=Us(),R=vn.useMemo(()=>Object.keys(e),[e]),I=vn.useMemo(()=>Object.keys(t),[t]),S=vn.useMemo(()=>{let M={};return s&&(M["--wcm-dialog-width"]=s),l&&(M["--wcm-drawer-max-width"]=l),d&&(M["--wcm-drawer-min-width"]=d),{...M,...c}},[s,l,d,c]),C=vn.useMemo(()=>({theme:o,isMobile:y,open:w,setOpen:g,close:x,wallets:e,activeWalletIds:R,socialProviders:t,activeSocialIds:I,termsUrl:r??wi,privacyUrl:n??yi,isDetected:k,portalStyle:S}),[o,y,w,g,x,e,R,t,I,r,n,k,S]),E=Va("div",{"data-theme":o,style:S,children:m});return y?Va(Fs.Provider,{value:C,children:Va(Y1.Root,{direction:i,open:w,onOpenChange:g,noBodyStyles:!0,children:E},"drawer")}):Va(Fs.Provider,{value:C,children:Va(_g.Root,{open:w,onOpenChange:g,children:E})})}var Gg=Object.assign(Z1,{Trigger:Bg,Content:Wg});import{WALLET_LABELS as r2}from"@nexus-cross/crossx-design-system";import*as Qg from"react";de(`.cb-button{--cb-bg: var(--ds-accent-gradient, linear-gradient(196deg, #ff2589 16%, #ff823d 84%));--cb-bg-hover: var(--cb-bg);--cb-color: #ffffff;--cb-border: none;--cb-radius: 8px;--cb-height: 36px;--cb-padding: 8px 16px;--cb-font-family: Inter, system-ui, -apple-system, sans-serif;--cb-font-size: 14px;--cb-font-weight: 500;--cb-line-height: 1.5;--cb-letter-spacing: -.01em;--cb-gap: 8px;--cb-transition: opacity .15s;--cb-loading-opacity: .7;--cb-press-scale: .95;--cb-icon-size: 18px;--cb-spinner-size: 18px;--cb-spinner-thumb: currentColor;--cb-spinner-track: color-mix(in srgb, currentColor 20%, transparent)}.cb-pill{--cb-pill-bg: var(--ds-surface-default, #ffffff);--cb-pill-bg-hover: var(--cb-pill-bg);--cb-pill-color: var(--ds-content-high, rgba(0, 0, 0, .85));--cb-pill-border: 1px solid var(--ds-border-default, rgba(0, 0, 0, .07));--cb-pill-border-hover: 1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));--cb-pill-radius: 8px;--cb-pill-height: 36px;--cb-pill-padding: 1px 13px;--cb-pill-press-scale: .95;--cb-pill-font-family: Inter, system-ui, -apple-system, sans-serif;--cb-pill-font-size: 14px;--cb-pill-font-weight: 500;--cb-pill-line-height: 1.5;--cb-pill-gap: 8px;--cb-pill-icon-size: 18px;--cb-pill-icon-placeholder-bg: var(--ds-surface-medium, #f5f7fa);--cb-pill-address-font: Inter, system-ui, -apple-system, sans-serif;--cb-pill-address-font-size: 14px;--cb-pill-address-letter-spacing: -.01em}
|
|
24
|
+
`);de(`.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)}}
|
|
25
|
+
`);var X1='<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>',J1='<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>',$1='<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>',e2='<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>',t2='<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 qa(e){return`data:image/svg+xml,${encodeURIComponent(e)}`}var Ws=qa(X1),_s=qa(J1),Gs=qa($1),Hs=qa(e2),Qs=qa(t2);import{jsx as Sr,jsxs as Ya}from"react/jsx-runtime";function Vg({isConnecting:e,address:t,provider:r,providerName:n,accountName:o,sendAccounts:a,onConnect:i,onDisconnect:s,onCopy:l,onSelectWallet:d,onBuy:c,onBuyDisabledMessage:h,label:u="Connect Wallet",connectingLabel:m="Connecting...",disconnectLabel:y,className:b,theme:f="dark",env:p,showBalance:w=!0,showPortfolio:g,drawerDirection:x,modal:k,connectorId:R,style:I,walletInfoStyle:S,sendTransaction:C,getTransactionReceipt:E,estimateGas:M,onReceive:F,onBridge:L,onSend:z,bridgeTokens:A,bridgeHistory:U,getBridgeQuote:re,getBridgeToTokens:Y,getBridgeApproval:_,approveBridge:G,submitBridge:ne}){let te=b?`cb-button ${b}`:"cb-button",O=b?`cb-pill ${b}`:"cb-pill";if(Qg.useEffect(()=>{Lo(t)},[t]),e)return Ya("button",{type:"button",disabled:!0,className:te,style:I,"aria-busy":"true",children:[Sr("span",{className:"cb-spinner","aria-hidden":"true"}),Sr("span",{className:"cb-button-label",children:m})]});if(t){let Z=n??a2(r),H=r?o2[r]:void 0;return Sr(xe,{feature:"connect_button",children:Ya(Ko,{env:p,theme:f,drawerDirection:x,modal:k,showBalance:w,showPortfolio:g,walletAddress:t,accountName:o,sendAccounts:a,connectorName:n??(r?qg[r]:void 0),connectorId:R,onSelectWallet:d,onCopyAddress:l?(ce,ve)=>{ve&&l()}:void 0,onDisconnect:s,disconnectLabel:y,style:S,sendTransaction:C,getTransactionReceipt:E,estimateGas:M,onReceive:F,onBridge:L,onBuy:c,onBuyDisabledMessage:h,onSend:z,bridgeTokens:A,bridgeHistory:U,getBridgeQuote:re,getBridgeToTokens:Y,getBridgeApproval:_,approveBridge:G,submitBridge:ne,children:[Sr(Ko.Trigger,{asChild:!0,children:Ya("button",{type:"button",className:O,"data-track":"wallet_pill_open",style:I,"aria-label":`Connected with ${Z}: ${Hg(t)}`,children:[H?Sr("img",{src:H,alt:"",width:18,height:18,className:"cb-pill-icon","data-provider":r}):Sr("span",{className:"cb-pill-icon-placeholder","aria-hidden":"true"}),Sr("span",{className:"cb-pill-address",children:Hg(t)})]})}),Sr(Ko.Content,{align:"end",sideOffset:8})]})})}return Sr(xe,{feature:"connect_button",children:Ya("button",{type:"button",onClick:i,className:te,"data-track":"connect_click",style:I,"aria-label":typeof u=="string"?u:"Connect Wallet",children:[Sr(n2,{}),Sr("span",{className:"cb-button-label",children:u})]})})}function n2(){return Ya("svg",{className:"cb-button-icon",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[Sr("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"}),Sr("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"}),Sr("path",{d:"M12.75 11.25H12.7575",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}var o2={google:Hs,apple:Qs,cross:Ws,metamask:_s,binance:Gs},qg={google:"Google",apple:"Apple",cross:r2.default,metamask:"MetaMask",binance:"Binance Wallet"};function a2(e){return e?qg[e]:"Wallet"}function Hg(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}import*as Yg from"react";de(`.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
|
+
`);de(`.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
|
+
`);import{jsx as na,jsxs as s2}from"react/jsx-runtime";var Kg="https://www.onechain.nexus/skills";function Zg({label:e="Skills",href:t,onClick:r,className:n,style:o,theme:a,disabled:i=!1,isLoading:s=!1,loadingLabel:l="Loading...",openInNewTab:d=!1,type:c="button"}){let[h,u]=Yg.useState(!1),m=ot(),y=rr("apps.json",m,k=>Pr(k?.skills,m)),b=t??y,f=async k=>{if(b&&!r){d?window.open(b,"_blank","noopener,noreferrer"):window.location.href=b;return}if(r)try{u(!0),await r()}finally{u(!1)}},p=i||s||h,w=s||h,g=w?l:e,x=n?`sb-button ${n}`:"sb-button";return na(xe,{feature:"skills",children:s2("button",{type:c,onClick:f,disabled:p,className:x,"data-theme":a,"data-track":"click",style:o,"aria-busy":w,children:[w?na("span",{className:"sb-spinner","aria-hidden":"true"}):na(i2,{}),na("span",{className:"sb-label",children:g})]})})}function i2(){return na("svg",{className:"sb-button-icon",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:na("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"})})}Js({mode:"dapp-ui"});export{Qs as APPLE_ICON,rc as AppLauncher,mc as AppLauncherContent,sc as AppLauncherTrigger,Gs as BINANCE_ICON,Vo as BridgeFlow,oi as CHAINS_CONFIG_FILE,gi as CONNECTOR_REGISTRY,Ws as CROSSX_ICON,Vg as ConnectButton,dl as ConnectorId,Kg as DEFAULT_SKILLS_HREF,Jo as DEFAULT_TRUSTED_FACTORIES,li as DappUiErrorBoundary,Hs as GOOGLE_ICON,Dg as GetOneUsd,_s as METAMASK_ICON,ds as OnePopBody,Xf as OnePopGetTokenTrigger,Ki as PORTFOLIO_SECTIONS,cn as RelayApiError,Wa as RelayDeposit,tg as RelayHistory,lg as RelayRecovery,Tl as SOCIAL_REGISTRY,Ai as SendFlow,Zg as SkillsButton,gg as StatusTracker,Rl as TOKEN_STATS_QUERY_KEY,kl as USER_BALANCE_QUERY_KEY,$p as WALLET_PORTFOLIO_QUERY_PREFIX,ga as WALLET_REGISTRY,Gg as WalletConnectModal,Ko as WalletInfo,Fu as WalletPortfolio,Ho as WalletPortfolioBody,Js as announceAppLauncherUsage,si as captureDappUiException,Ht as createRelayClient,Ds as findGetOneUsdToken,kh as getChainDisplay,ii as getDappUiSentryScope,Ls as getOneUsdTokenKey,la as initDappUiSentry,_n as invalidateWalletPortfolioQueries,Os as isGetOneUsdActionEnabled,Ha as isGetOneUsdActionSupported,Ga as isGetOneUsdActionVisible,Ps as isGetOneUsdTargetAvailable,Td as matchesGetOneUsdToken,Nr as normalizeFailureReason,ot as resolveEnvironment,_a as resolveGetOneUsdRoute,Lo as setDappUiAnalyticsUser,di as trackDappUiEvent,qe as trackDappUiFunnel,sa as useChainDisplay,Rh as useChainsConfig,fi as useGlobalMenu,dg as useRelayConfig,to as useRelayOrders,fg as useRelayRecovery,Un as useTokenBalance,jn as useTokenStats,Us as useWalletDetect};
|
|
28
28
|
//# sourceMappingURL=index.js.map
|