@xswap-link/sdk 0.9.9 → 0.9.10

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.js CHANGED
@@ -9,7 +9,7 @@
9
9
  font-display: swap;
10
10
  font-style: normal;
11
11
  }`,S5=[T5],m1=S5.join(`
12
- `);var w1=require("react/jsx-runtime"),_n=null,Ai=null,ks=null,Ms=null,Xc=!1,g1=()=>{Pt||(I5(),k5(),Promise.all([_5(),M5()]).then(t=>{for(let e of t)E5(e);Xc=!0}))},y1=async()=>{if(!Xc){for(b1(!0);!Xc;)await new Promise(t=>setTimeout(t,10));b1(!1)}},E5=async t=>{let e=document.createElement("style");e.appendChild(document.createTextNode(Es)),t.appendChild(e)},k5=()=>{let t="xpay-fonts";if(document.querySelector(`style[data-name="${t}"]`))return;let e=document.createElement("style");e.dataset.name=t,e.appendChild(document.createTextNode(m1)),document.head.appendChild(e)},_5=async()=>{let t=document.createElement("div");return Ai=t.attachShadow({mode:"open",delegatesFocus:!0}),t.setAttribute("id","xpay-root"),document.body.appendChild(t),_n=(0,_s.createRoot)(Ai),Ai},M5=async()=>{let t=document.createElement("div"),e=t.attachShadow({mode:"open"});return t.setAttribute("id","xpay-tx-status"),document.body.appendChild(t),Ms=(0,_s.createRoot)(e),e},I5=()=>{let t=document.createElement("div");t.setAttribute("id","xpay-init-indicator"),document.body.appendChild(t),ks=(0,_s.createRoot)(t)},b1=t=>{Pt||!ks||(t?ks.render((0,w1.jsx)(Vf,{})):ks.render(null))};var v1="https://xswap.link/api",Is=t=>{v1=t};async function Ti(t,e){let r=await fetch(`${v1}${t}`,{method:"GET",headers:{"Content-Type":"application/json","Cache-Control":"no-cache",...e?.headers},...e});if(!r.ok)throw new Error(`API request failed with status ${r.status}: ${r.statusText}`);return r.json()}async function Jc(t,e){return Ti("/route",{method:"POST",body:JSON.stringify(t),signal:e})}async function Si(t){return Ti(`/chains?data=${JSON.stringify({ecosystem:t})}`)}async function Ps(t){return await Ti(`/history?${new URLSearchParams({data:JSON.stringify(t)})}`)}async function C1(t){return await Ti(`/tokenPrices?${new URLSearchParams({data:JSON.stringify(t)})}`)}async function A1(t){return Ti(`/tokenBalances?${new URLSearchParams({data:JSON.stringify(t)})}`)}async function Qc(t){return await Ti(`/getTxStatus?${new URLSearchParams({data:JSON.stringify(t)})}`)}async function T1(){return Ti("/bridgeTokens")}var P5=require("react/jsx-runtime");var S1=require("react"),E1=require("react/jsx-runtime"),Ir=(0,S1.forwardRef)(({variant:t,disabled:e,children:r,type:n,value:i,fullWidth:a,onClick:o,className:f="",size:d="medium",secondary:p=!1},h)=>(0,E1.jsx)("button",{ref:h,type:n||void 0,value:i||void 0,className:`btn ${!t&&e?"btn-disabled":""} ${f} btn-${d} btn-${t}${e?"-disabled":p?"-secondary":""} ${a?"btn--full-width":""}`,disabled:e,onClick:o,children:r}));Ir.displayName="Button";var Ei=require("react/jsx-runtime"),k1=({text:t,type:e,className:r,isSnackbar:n,Action:i,Animation:a})=>(0,Ei.jsxs)("div",{className:`my-5 mx-0 bg-t_bg_tertiary bg-opacity-10 rounded-2xl max-w-[500px] min-h-[43px] flex items-center text-xs font-medium text-t_text_primary border border-solid ${e==="error"?"border-t_error_dark":e==="warning"?"border-t_warning_dark":e==="info"?"border-t_main_accent_dark":e==="success"?"border-t_success_dark":""} ${n&&"m-0"}`,children:[(0,Ei.jsx)("p",{className:"p-[15px]",children:t}),a&&(0,Ei.jsx)(a,{}),i&&(0,Ei.jsx)("div",{className:`pl-4 fill-t_text_primary text-t_text_primary ${r}`,children:(0,Ei.jsx)(i,{})})]});var _1=require("notistack"),M1=require("react"),Zc=require("react/jsx-runtime"),Yn=(0,M1.forwardRef)(({message:t},e)=>{let{text:r,variant:n,className:i,action:a,animation:o}=t;return(0,Zc.jsx)(_1.SnackbarContent,{ref:e,children:(0,Zc.jsx)(k1,{text:r,type:n,className:i,isSnackbar:!0,Action:a,Animation:o})})});Yn.displayName="SnackMessage";var I1=require("react"),fo=()=>(0,I1.useMemo)(()=>({query:async(t,e,r=[])=>t?.provider?await t[e](...r):null,execute:async(t,e,r=[],n={})=>{try{if(t?.provider){let i=await t.estimateGas[e](...r,n);return n.gasLimit||(n.gasLimit=Math.floor(i.toNumber()*Gc)),await t[e](...r,n)}return null}catch(i){let a;try{a=t?.interface.parseError(i?.error?.data?.data)}catch{throw i?.error?.data?.message?new Error(i?.error?.data?.message):i}throw new Error(a?.name)}},executeCalldata:async(t,e)=>{try{let r=await t.estimateGas({...e});return await t.sendTransaction({...e,gasLimit:Math.floor(r.toNumber()*Gc)})}catch(r){throw r?.error?.data?.message?new Error(r?.error?.data?.message):r}}}),[]),Yc=fo;var N5=require("react");var Ns=require("react"),P1=({delayMs:t,instantExecution:e})=>{let r=(0,Ns.useRef)(null);return{debounce:(0,Ns.useCallback)(i=>{r.current&&(clearTimeout(r.current),r.current=null),e&&e(),r.current=setTimeout(i,t)},[t,e])}};var R5=require("react"),rv=new fe.utils.Interface(l1);var ma=require("react"),D5=require("wagmi");var F1=Et(require("bignumber.js"));var Y=require("react"),L1=require("wagmi");var N1=({supportedChains:t})=>{let e=t.find(r=>r.chainId===ua)||t[0];if(!e)throw new Error("getDefaultSourceChain > couldn't find default source chain");return e},R1=({supportedChains:t})=>{let e=t.find(r=>r.chainId===As)||t[0];if(!e)throw new Error("getDefaultDestinationChain > couldn't find default destination chain");return e},Rs=(t,e,r,n)=>{if(!t.tokens.some(f=>f.supported))return;let a=t.tokens.find(f=>f.address.toLowerCase()===e.toLowerCase()&&f.supported);if(a)return a;let o=t.tokens.find(f=>r?f.supported&&f.tokenId!==n:f.supported);if(o)return o},B5=({chain:t,bridgeTokensDictionary:e})=>{if(!t)return;let r=t.tokens.find(i=>i.tokenId==="XSWAP");if(r)return r;let n=Object.keys(e[t.chainId]||{})[0];return t.tokens.find(i=>i.address.toLowerCase()===n?.toLowerCase())},jc=t=>t.swapSupported,$c=({sourceChain:t,targetChain:e})=>{if(!t)throw new Error("isSwapTargetChainValid > sourceChain should be defined.");return e.swapSupported&&t.supportedDstForSwap?.includes(e.chainId)},ef=t=>!t||t.bridgeSupported,B1=({sourceChain:t,targetChain:e,sourceToken:r})=>{let n=!0,i=!0,a=!1;return t&&e&&(n=!!t.supportedDstForBridge?.includes(e.chainId)),r&&e&&(i=!!e.tokens.find(o=>o.tokenId===r.tokenId)),t&&e&&(a=t.chainId===e.chainId),i&&!a&&n},F5=({source:t,target:e,supportedChains:r})=>{let n=t.chain||N1({supportedChains:r}),i=e.chain||R1({supportedChains:r}),a=t.token||Rs(n,Uc),o=e.token||Rs(i,Hc,n.chainId===i.chainId,a?.tokenId);if(!n||!i||!a||!o)return{source:{chain:void 0,token:void 0},target:{chain:void 0,token:void 0}};if(!jc(n)&&(n=N1({supportedChains:r}),a=void 0,!jc(n)&&(console.error("[WRONG CONFIG] default swap source chain is invalid."),n=r.find(f=>jc(f)),!n)))throw new Error("mapToValidSwap > None of the chains supports swap. Couldn't set source chain.");if(!$c({sourceChain:n,targetChain:i})&&(i=R1({supportedChains:r}),o=void 0,!$c({sourceChain:n,targetChain:i})&&(console.error("[WRONG CONFIG] default swap target chain is invalid."),i=r.find(f=>$c({sourceChain:n,targetChain:f})),!i)))throw new Error("mapToValidSwap > None of the chains supports swap. Couldn't set target chain.");return a=n.tokens.find(f=>f.tokenId===a?.tokenId&&f.supported),o=i.tokens.find(f=>f.tokenId===o?.tokenId&&f.supported),a||(a=Rs(n,Uc)),(!o||a===o)&&(o=Rs(i,Hc,n.chainId===i.chainId,a?.tokenId)),{source:{chain:n,token:a},target:{chain:i,token:o}}},L5=({source:t,target:e,supportedChains:r,bridgeTokensDictionary:n})=>{let i=t.chain,a=e.chain,o=t.token,f=e.token;if(!ef(i)&&(i=void 0,o=void 0,!ef(i)&&(console.error("[WRONG CONFIG] default bridge source chain is invalid."),i=r.find(d=>ef(d)),!i)))throw new Error("mapToValidSwap > None of the chains supports bridge. Couldn't set source chain.");if(B1({sourceChain:i,targetChain:a,sourceToken:o})||(f=void 0,B1({sourceChain:i,targetChain:a,sourceToken:o})||(a=void 0)),o&&i&&(o=i.tokens.find(d=>d.tokenId===o?.tokenId&&d.supported),o&&(Object.keys(n[i.chainId]?.[o.address.toLowerCase()]||{}).length>0||(o=void 0))),f&&a&&(f=a.tokens.find(d=>d.tokenId===f?.tokenId&&d.supported)),!o){let d=B5({chain:i,bridgeTokensDictionary:n});d&&i&&a&&!!n[i.chainId]?.[d.address.toLowerCase()]?.[a.chainId]?o=d:o=void 0}if(o?.tokenId!==f?.tokenId&&(f=void 0),!f)if(o&&i&&a){let d=n[i.chainId]?.[o.address.toLowerCase()]?.[a.chainId];f=a.tokens.find(h=>h.address.toLowerCase()===d?.toLowerCase())}else f=void 0;return!f&&o&&(a=void 0),{source:{chain:i,token:o},target:{chain:a,token:f}}},Bs=({type:t,...e})=>t==="SWAP"?F5(e):L5(e);var U1=require("react/jsx-runtime"),Nt=()=>{throw new Error("Not implemented")},ct={bridgeUI:!1,integrationConfig:{},wagmiConfig:{},supportedChains:[],tab:"Swap",overlay:!1,error:"",feeToken:void 0,srcChain:void 0,srcChainTokensOptions:[],srcChainOtherTokensOptions:[],tokenPrices:{},dstChain:void 0,dstChainTokensOptions:[],dstChainOtherTokensOptions:[],srcToken:void 0,dstTokenLocked:!1,dstChainLocked:!1,srcTokenLocked:!1,srcChainLocked:!1,dstToken:void 0,srcValue:"",srcValueWei:"",srcValueUsd:null,dstValue:"",dstValueWei:"",dstValueUsd:null,dstValueMin:"",expressDelivery:!0,infiniteApproval:!0,slippage:"1.5",route:void 0,isAsyncDataLoaded:!1,srcTokenBalanceWei:"",srcTokenBalanceInfo:"-",isFetchingBalance:!1,isFetchingBalances:!1,isFetchingRoute:!1,isExpressDeliveryActive:!0,setTab:Nt,setError:Nt,setSrcChain:Nt,setDstChain:Nt,setSrcToken:Nt,setDstToken:Nt,setSrcValue:Nt,setExpressDelivery:Nt,setInfiniteApproval:Nt,setSlippage:Nt,setRoute:Nt,setSrcTokenBalanceWei:Nt,quoteRoute:Nt,refreshBalance:Nt,findTokenDataByAddressAndChain:Nt,bridgeTokensDictionary:null,onConnectWallet:Nt,hasOnConnectWalletCallback:!1,srcChainOptions:[],dstChainOptions:[]},D1=(0,Y.createContext)(ct),O1=({children:t,integrationConfig:e,supportedChains:r,wagmiConfig:n,overlay:i})=>{let{address:a,chainId:o}=(0,L1.useAccount)(),[f,d]=(0,Y.useState)(!1),[p,h]=(0,Y.useState)(ct.tab),[v,E]=(0,Y.useState)(ct.error),[S,A]=(0,Y.useState)(ct.expressDelivery),[_,I]=(0,Y.useState)(ct.slippage),[N,L]=(0,Y.useState)(ct.infiniteApproval),[M,V]=(0,Y.useState)(ct.srcChain),[F,B]=(0,Y.useState)(ct.dstChain),[J,Q]=(0,Y.useState)(ct.feeToken),[G,ae]=(0,Y.useState)(ct.srcToken),[W,ne]=(0,Y.useState)(ct.dstToken),[T,s]=(0,Y.useState)(ct.tokenPrices),[l,g]=(0,Y.useState)({}),[w,C]=(0,Y.useState)([]),[b,y]=(0,Y.useState)(ct.srcValue),[m,c]=(0,Y.useState)(ct.srcTokenBalanceWei),[x,R]=(0,Y.useState)(ct.srcChainTokensOptions),[u,k]=(0,Y.useState)(ct.dstChainTokensOptions),[P,O]=(0,Y.useState)(ct.srcChainOtherTokensOptions),[z,$]=(0,Y.useState)(ct.dstChainOtherTokensOptions),[j,Z]=(0,Y.useState)([]),[Ye,ee]=(0,Y.useState)([]),[le,Br]=(0,Y.useState)(ct.isFetchingBalance),[He,Le]=(0,Y.useState)(ct.isFetchingBalances),[cn,De]=(0,Y.useState)(ct.isFetchingRoute),[Ce,nr]=(0,Y.useState)(ct.route),Se=(0,Y.useRef)(null),Oe=(0,Y.useRef)(crypto.randomUUID()),fn=(0,Y.useMemo)(()=>!!e?.srcTokenLocked,[e?.srcTokenLocked]),Ve=(0,Y.useMemo)(()=>!!e?.dstTokenLocked,[e?.dstTokenLocked]),Ge=(0,Y.useMemo)(()=>!!e?.dstChainLocked,[e?.dstChainLocked]),dn=(0,Y.useMemo)(()=>!!e?.srcChainLocked,[e?.srcChainLocked]),se=(0,Y.useMemo)(()=>!!e.bridge,[e.bridge]),ze=(0,Y.useMemo)(()=>!!(e.onConnectWallet||window.xPayOnConnectWallet),[e.onConnectWallet]),ir=(0,Y.useMemo)(()=>{let K=Pt?{}:JSON.parse(localStorage.getItem("custom-tokens")||"{}"),ce={};return r.forEach(oe=>{ce[oe.chainId]={},oe.tokens.forEach(te=>{ce[oe.chainId][te.address]=te})}),qc(ce,K)},[r]),Me=(0,Y.useMemo)(()=>{let K={};return Object.entries(ir).forEach(([ce,oe])=>{K[ce]=Object.entries(oe).filter(([,te])=>te.supported).sort(([,te],[,be])=>be.priority-te.priority).map(([,te])=>({chainId:ce,...te}))}),K},[ir]),ue=(0,Y.useMemo)(()=>{if(!w||w.length===0)return null;let K={},ce=(oe,te,be,pe)=>{K[oe]||(K[oe]={}),K[oe][te]||(K[oe][te]={}),K[oe][te][be]=pe};for(let oe of w){let te=Object.entries(oe);if(te.length!==2)continue;let[be,pe]=te[0],[Ae,yt]=te[1];ce(be,pe,Ae,yt),ce(Ae,yt,be,pe)}return Object.keys(K).length>0?K:null},[w]),ln=(0,Y.useMemo)(()=>G&&M&&T&&T[M.chainId]&&T[M.chainId]?.[G.address]?(Number(b)*Number(T[M.chainId]?.[G.address])).toFixed(2):null,[T,G,b,M]),Ee=(0,Y.useMemo)(()=>Ss({amount:b,decimals:G?.decimals||18}),[G?.decimals,b]),ke=(0,Y.useMemo)(()=>mt({amount:Ce?.estAmountOut||"0",decimals:W?.decimals||18,precisionFractionalPlaces:Math.min(8,W?.decimals||18)}),[Ce]),un=(0,Y.useMemo)(()=>Ss({amount:ke,decimals:W?.decimals||18}),[W?.decimals,ke]),qe=(0,Y.useMemo)(()=>W&&F&&T&&T[F?.chainId]&&T[F?.chainId]?.[W.address]?(Number(ke)*Number(T[F?.chainId]?.[W.address])).toFixed(2):null,[T,W,ke,F]),We=(0,Y.useMemo)(()=>mt({amount:Ce?.minAmountOut||"0",decimals:W?.decimals||18,precisionFractionalPlaces:Math.min(4,W?.decimals||18)}),[Ce]),Fr=(0,Y.useMemo)(()=>S&&!!Ce&&X.from(Ce.xSwapFees?.expressDeliveryFee||"0").gt("0"),[S,Ce]),Ke=(0,Y.useMemo)(()=>r.length>0&&w.length>0,[r,w]),Xe=(0,Y.useMemo)(()=>{if(!G||!m||!a)return"";if(er(m).eq(0))return"0";let K=mt({amount:m,decimals:G.decimals,precisionFractionalPlaces:G.decimals});return new F1.default(K).lt("0.00001")?"<0.00001":mt({amount:m,decimals:G.decimals,precisionFractionalPlaces:5})},[G,m]),Qt=(0,Y.useCallback)(K=>{if(!K)return[];if(!se)return Me[K]||[];if(!Me[K]||!ue)return[];let ce=Object.keys(ue[K]||{});return Me[K].filter(oe=>ce.includes(oe.address))},[ue,se,Me]),Pe=(0,Y.useCallback)(async()=>{if(!M||!F||!G||!W||!Ee||er(Ee).eq(0)||se&&!ue){nr(void 0);return}let{source:K,target:ce}=Bs({source:{chain:M,token:G},target:{chain:F,token:W},type:se?"BRIDGE":"SWAP",supportedChains:r,bridgeTokensDictionary:ue||{}});if(!(K.chain?.chainId!==M?.chainId||ce.chain?.chainId!==F?.chainId||K.token?.address!==G?.address||ce.token?.address!==W?.address))try{E(""),De(!0),Se.current&&Se.current.abort(Vc),Se.current=new AbortController;let oe=await Jc({integratorId:e.integratorId,fromChain:M.chainId,toChain:F.chainId,fromAddress:a||Ot[M.chainId]?.FeeCollector||"",toAddress:a||Ot[F.chainId]?.FeeCollector||"",fromToken:G.address,toToken:W.address,fromAmount:Ee,slippage:Number(_),customContractCalls:e.customContractCalls,paymentToken:wr.AddressZero,expressDelivery:S,infiniteApproval:N},Se.current.signal);nr(oe),Se.current=null}catch(oe){oe!==Vc&&(console.error(oe),E("Could not find route!"),nr(void 0))}finally{De(!1)}},[a,se,F,W,Jc,Fr,_,M,G,Ee]),Ne=(0,Y.useCallback)(async()=>{if(!a||!M?.publicRpcUrls[0]||!G||!G?.address)return;let K=crypto.randomUUID();Oe.current=K,Br(!0);let ce=await zc(a,G.address,M?.publicRpcUrls[0]);K===Oe.current&&(c(Ss({amount:ce,decimals:G.decimals})),Br(!1))},[a,M,G]),pn=(0,Y.useCallback)((K,ce)=>ir[ce]?.[K],[ir]),Je=(0,Y.useCallback)(()=>{e.onConnectWallet?e.onConnectWallet():window.xPayOnConnectWallet&&window.xPayOnConnectWallet()},[e]);return(0,Y.useEffect)(()=>{if(r.length>0){let K=r.map(ce=>ce.chainId);C1({chainId:K}).then(ce=>{s(ce)})}},[r]),(0,Y.useEffect)(()=>{(async()=>{let K=await T1();C(K)})()},[]),(0,Y.useEffect)(()=>{Pe()},[Pe]),(0,Y.useEffect)(()=>{Ne()},[Ne]),(0,Y.useEffect)(()=>{a&&r.length>0&&(Le(!0),A1({walletAddress:a}).then(K=>{g(K),Le(!1)}))},[a,r.length]),(0,Y.useEffect)(()=>{Q(M?.tokens.find(({address:K})=>K.toLowerCase()===wr.AddressZero.toLowerCase()))},[M]),(0,Y.useEffect)(()=>{(async()=>{let K=F?.chainId===M?.chainId,ce=Qt(M?.chainId).filter(({symbol:de})=>K?de!==W?.symbol:!0);R(ce);let oe=Qt(F?.chainId).filter(({symbol:de})=>K?de!==G?.symbol:!0);k(oe);let te=[],be=r.filter(({chainId:de,web3Environment:xe,swapSupported:pt,bridgeSupported:Re})=>de!==M?.chainId&&xe==="mainnet"&&(se&&Re||!se&&pt));for(let{chainId:de}of be)te.push(...Qt(de).filter(({symbol:xe})=>de===F?.chainId?xe!==W?.symbol:!0));O(te);let pe=[],Ae=r.filter(({chainId:de,web3Environment:xe,swapSupported:pt,bridgeSupported:Re})=>de!==F?.chainId&&xe==="mainnet"&&(se&&Re&&M?.supportedDstForBridge?.includes(de)||!se&&pt&&M?.supportedDstForSwap?.includes(de)));for(let{chainId:de}of Ae)pe.push(...Qt(de).filter(({symbol:xe})=>de===M?.chainId?xe!==G?.symbol:!0));$(pe);let yt=de=>de.map(xe=>({...xe,balance:X.from(l[xe.chainId]?.[xe.address]||0)}));R(yt(ce)),k(yt(oe)),O(yt(te)),$(yt(pe))})()},[se,M,F,Qt,r,G?.symbol,W?.symbol,l]),(0,Y.useEffect)(()=>{let K=r.filter(({web3Environment:te,swapSupported:be,bridgeSupported:pe})=>te==="mainnet"&&(se&&pe||!se&&be)),ce=[];if(se&&F&&W&&ue){let te=K.filter(({chainId:be})=>{let pe=ue[be]||{};return Object.values(pe).some(Ae=>Ae[F.chainId])});ce=K.filter(be=>!te.some(pe=>pe.chainId===be.chainId)).map(be=>be.chainId)}let oe=new Set;if(M&&K.filter(te=>se?!M.supportedDstForBridge?.includes(te.chainId):!M.supportedDstForSwap?.includes(te.chainId)).forEach(te=>oe.add(te.chainId)),se&&M&&ue&&!G){let te=ue[M.chainId];te?K.filter(be=>!Object.values(te).some(pe=>pe[be.chainId])).forEach(be=>oe.add(be.chainId)):K.forEach(be=>oe.add(be.chainId))}if(se&&M&&ue&&G){let te=ue[M.chainId]?.[G.address];K.filter(be=>!te?.[be.chainId]).forEach(be=>oe.add(be.chainId))}Z(Kc(K,ce)),ee(Kc(K,[...oe]))},[r,se,M,G,F,W,ue]),(0,Y.useEffect)(()=>{if(!o||!f||e?.srcChainId)return;let K=r.find(({chainId:ce})=>ce===`${o}`);K&&V(K)},[o,f,r,e?.srcChainId]),(0,Y.useEffect)(()=>{f&&(ae(void 0),ne(void 0),V(void 0),B(void 0))},[se]),(0,Y.useEffect)(()=>{if(f||!r||r.length===0||!ue)return;let K=M||e?.srcChainId||(o?`${o}`:void 0)||(se?void 0:ua),ce=r.find(({chainId:pt})=>pt===K),oe=F||e?.dstChainId||(se?void 0:As),te=r.find(({chainId:pt})=>pt===oe),be,pe,Ae=Wc(e.srcTokenAddr,e?.srcChainId,r),yt=Wc(e.dstTokenAddr,e?.dstChainId,r);ce&&(pe=ce.tokens.find(({address:pt})=>pt.toLowerCase()===Ae?.toLowerCase())),te&&(be=te.tokens.find(({address:pt})=>pt.toLowerCase()===yt));let{source:de,target:xe}=Bs({source:{chain:ce,token:pe},target:{chain:te,token:be},type:se?"BRIDGE":"SWAP",supportedChains:r,bridgeTokensDictionary:ue});V(de.chain),B(xe.chain),ae(de.token),ne(xe.token),d(!0)},[e?.srcChainId,e?.srcTokenAddr,e?.dstChainId,e?.dstTokenAddr,r,se,o,f,ue]),(0,Y.useEffect)(()=>{if(!ue||r.length===0||!f)return;let{source:K,target:ce}=Bs({source:{chain:M,token:G},target:{chain:F,token:W},type:se?"BRIDGE":"SWAP",supportedChains:r,bridgeTokensDictionary:ue});K.chain?.chainId!==M?.chainId&&V(K.chain),ce.chain?.chainId!==F?.chainId&&B(ce.chain),(K.token?.address!==G?.address||K.token?.name!==G?.name)&&ae(K.token),(ce.token?.address!==W?.address||ce.token?.name!==W?.name)&&ne(ce.token)},[M,G,F,W,se,r,ue,f]),(0,Y.useEffect)(()=>{f&&(e.onDstChainChange?e.onDstChainChange(F?.chainId):window.xPayOnDstChainChange&&window.xPayOnDstChainChange(F?.chainId))},[e.onDstChainChange,F]),(0,Y.useEffect)(()=>{if(!f)return;let K=W?{address:W.address.toLowerCase(),symbol:W.tokenId}:void 0;e.onDstTokenChange?e.onDstTokenChange(K):window.xPayOnDstTokenChange&&window.xPayOnDstTokenChange(K)},[e.onDstTokenChange,W]),(0,Y.useEffect)(()=>{f&&(e.onSrcChainChange?e.onSrcChainChange(M?.chainId):window.xPayOnSrcChainChange&&window.xPayOnSrcChainChange(M?.chainId))},[e.onSrcChainChange,M]),(0,Y.useEffect)(()=>{if(!f)return;let K=G?{address:G.address.toLowerCase(),symbol:G.tokenId}:void 0;e.onSrcTokenChange?e.onSrcTokenChange(K):window.xPayOnSrcTokenChange&&window.xPayOnSrcTokenChange(K)},[e.onSrcTokenChange,G]),(0,U1.jsx)(D1.Provider,{value:{bridgeUI:se,integrationConfig:e,wagmiConfig:n,supportedChains:r,tab:p,setTab:h,overlay:i,error:v,setError:E,feeToken:J,srcChain:M,setSrcChain:V,srcChainTokensOptions:x,srcChainOtherTokensOptions:P,srcChainOptions:j,dstChainOptions:Ye,tokenPrices:T,dstChain:F,setDstChain:B,dstChainTokensOptions:u,dstChainOtherTokensOptions:z,srcToken:G,setSrcToken:ae,dstToken:W,setDstToken:ne,srcValue:b,setSrcValue:y,srcValueWei:Ee,srcValueUsd:ln,dstValue:ke,dstValueWei:un,dstValueUsd:qe,dstValueMin:We,expressDelivery:S,setExpressDelivery:A,infiniteApproval:N,setInfiniteApproval:L,slippage:_,setSlippage:I,route:Ce,setRoute:nr,isAsyncDataLoaded:Ke,srcTokenBalanceWei:m,setSrcTokenBalanceWei:c,srcTokenBalanceInfo:Xe,isFetchingRoute:cn,isFetchingBalance:le,isFetchingBalances:He,isExpressDeliveryActive:Fr,quoteRoute:Pe,refreshBalance:Ne,findTokenDataByAddressAndChain:pn,srcTokenLocked:fn,srcChainLocked:dn,dstTokenLocked:Ve,dstChainLocked:Ge,bridgeTokensDictionary:ue,onConnectWallet:Je,hasOnConnectWalletCallback:ze},children:t})},re=()=>(0,Y.useContext)(D1);var O5=require("react/jsx-runtime"),jn={rank:0,setRank:()=>{throw new Error("GlobalDataState > setRank is not implemented")},xPower:"0",updateXPower:()=>{throw new Error("GlobalDataState > updateXPower is not implemented")},xSwapBalance:"0",updateXSwapBalance:()=>{throw new Error("GlobalDataState > updateXSwapBalance is not implemented")},unfinishedQuestsCount:0,setUnfinishedQuestsCount:()=>{throw new Error("GlobalDataState > setUnfinishedQuestsCount is not implemented")}},Kv=(0,ma.createContext)({rank:jn.rank,setRank:jn.setRank,xPower:jn.xPower,updateXPower:jn.updateXPower,xSwapBalance:jn.xSwapBalance,updateXSwapBalance:jn.updateXSwapBalance,unfinishedQuestsCount:jn.unfinishedQuestsCount,setUnfinishedQuestsCount:jn.setUnfinishedQuestsCount});var tf=require("react/jsx-runtime"),ki=()=>(0,tf.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,tf.jsx)("path",{d:"M5 6.81252L0 1.81252L0.895833 0.916687L5 5.04169L9.10417 0.93752L10 1.83335L5 6.81252Z"})});var rf=require("react/jsx-runtime"),Fs=()=>(0,rf.jsx)("svg",{width:"15",height:"17",viewBox:"0 0 15 17",xmlns:"http://www.w3.org/2000/svg",children:(0,rf.jsx)("path",{d:"M9 0.459351L9 10.8957L12.8625 7.15026L15 9.18662L7.5 16.4593L-2.79009e-07 9.18662L2.1375 7.15026L6 10.8957L6 0.459351L9 0.459351Z"})});var nf=require("react/jsx-runtime"),H1=()=>(0,nf.jsx)("svg",{width:"10",height:"16",viewBox:"0 0 10 16",xmlns:"http://www.w3.org/2000/svg",children:(0,nf.jsx)("path",{d:"M0.5 8L8.13251 15.5L9.5 14.1562L3.20318 8L9.4682 1.84375L8.10071 0.5L0.5 8Z"})});var U5=require("react/jsx-runtime");var af=require("react/jsx-runtime"),V1=()=>(0,af.jsx)("svg",{width:"14",height:"18",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,af.jsx)("path",{d:"M3.66665 9.83335V3.85419L1.52081 6.00002L0.333313 4.83335L4.49998 0.666687L8.66665 4.83335L7.47915 6.00002L5.33331 3.85419V9.83335H3.66665ZM9.49998 17.3334L5.33331 13.1667L6.52081 12L8.66665 14.1459V8.16669H10.3333V14.1459L12.4791 12L13.6666 13.1667L9.49998 17.3334Z",fill:"white"})});var H5=require("react/jsx-runtime");var V5=require("react/jsx-runtime");var G1=require("react/jsx-runtime");var tr=require("react/jsx-runtime"),z1=()=>(0,tr.jsxs)("svg",{width:"97",height:"31",viewBox:"0 0 97 31",xmlns:"http://www.w3.org/2000/svg",children:[(0,tr.jsx)("path",{d:"M33.5297 15.3088C33.5018 14.6173 33.6103 13.9272 33.8488 13.2781C34.0874 12.629 34.4512 12.0339 34.9195 11.5271C35.3877 11.0203 35.951 10.6119 36.5769 10.3253C37.2028 10.0387 37.8789 9.87969 38.5661 9.85742H38.7797C41.4359 9.85742 43.0036 11.4299 43.4671 13.2698L41.8161 13.8254C41.6678 13.1398 41.2795 12.5307 40.7221 12.1092C40.1647 11.6878 39.4753 11.482 38.7797 11.5295C37.0609 11.5295 35.337 12.7928 35.337 15.3402C35.337 17.8877 37.0193 19.1038 38.8005 19.1038C39.4996 19.123 40.1848 18.9057 40.7466 18.4866C41.3085 18.0675 41.7144 17.4709 41.8994 16.7922L43.5192 17.3164C43.2396 18.3517 42.6177 19.2602 41.7561 19.892C40.8945 20.5238 39.8446 20.8411 38.7797 20.7916C37.4116 20.8169 36.0895 20.2944 35.1041 19.339C34.1187 18.3836 33.5505 17.0735 33.5245 15.6967C33.5193 15.5709 33.5245 15.4398 33.5297 15.3088Z"}),(0,tr.jsx)("path",{d:"M46.7328 20.5504H45.0245V9.82593H46.7328V14.0193C46.9808 13.7233 47.2927 13.4881 47.6447 13.3319C47.9968 13.1756 48.3796 13.1024 48.764 13.1177C50.5297 13.1177 51.3682 14.3914 51.3682 15.9797V20.5504H49.7224V16.2837C49.7717 15.92 49.677 15.5513 49.4588 15.2572C49.2406 14.963 48.9162 14.7669 48.5557 14.7112C48.4535 14.7006 48.3506 14.7006 48.2484 14.7112C47.8534 14.7112 47.4745 14.8691 47.1951 15.1503C46.9158 15.4314 46.7588 15.8127 46.7588 16.2103C46.7562 16.254 46.7562 16.2977 46.7588 16.3414L46.7328 20.5504Z"}),(0,tr.jsx)("path",{d:"M55.201 16.42L57.0344 16.1317C57.451 16.0792 57.5552 15.8643 57.5552 15.6075C57.5552 14.9995 57.1489 14.512 56.201 14.512C55.843 14.4828 55.4881 14.5969 55.2131 14.8295C54.9382 15.0621 54.7654 15.3943 54.7323 15.7543V15.8329L53.1698 15.4817C53.3 14.2342 54.425 13.1229 56.1854 13.1229C58.3937 13.1229 59.2323 14.3809 59.2323 15.8486V19.4287C59.2305 19.8166 59.2601 20.204 59.3208 20.5871H57.7583C57.702 20.283 57.6793 19.9737 57.6906 19.6646C57.4534 20.0319 57.1247 20.3302 56.7372 20.5298C56.3498 20.7294 55.9171 20.8233 55.4823 20.802C54.8885 20.8514 54.2994 20.6616 53.8444 20.2745C53.3894 19.8873 53.1056 19.3343 53.0552 18.7368C53.0552 18.7001 53.0552 18.6634 53.0552 18.632C53.0292 17.3058 53.9719 16.5929 55.201 16.42ZM57.5656 17.5784V17.2481L55.6958 17.5312C55.442 17.5393 55.2011 17.6458 55.0235 17.8285C54.8459 18.0111 54.7453 18.2558 54.7427 18.5114C54.7447 18.638 54.7718 18.763 54.8223 18.879C54.8728 18.995 54.9457 19.0998 55.0369 19.1871C55.128 19.2744 55.2355 19.3426 55.3531 19.3877C55.4707 19.4328 55.5961 19.4538 55.7219 19.4497H55.8C56.0132 19.4721 56.2287 19.4519 56.4341 19.3902C56.6395 19.3284 56.8307 19.2264 56.9967 19.09C57.1628 18.9536 57.3004 18.7855 57.4016 18.5953C57.5028 18.4051 57.5656 18.1967 57.5864 17.982C57.5939 17.8469 57.5851 17.7114 57.5604 17.5784H57.5656Z"}),(0,tr.jsx)("path",{d:"M62.1391 9.67906C62.2859 9.67699 62.4316 9.70412 62.568 9.7589C62.7043 9.81369 62.8286 9.89505 62.9336 9.99831C63.0386 10.1016 63.1223 10.2247 63.1799 10.3606C63.2375 10.4965 63.2679 10.6425 63.2693 10.7903C63.2692 11.0115 63.2042 11.2277 63.0824 11.4118C62.9606 11.5959 62.7875 11.7397 62.5847 11.8251C62.382 11.9104 62.1587 11.9335 61.9429 11.8915C61.7271 11.8495 61.5285 11.7442 61.3721 11.5889C61.2156 11.4336 61.1082 11.2352 61.0635 11.0186C61.0187 10.8021 61.0386 10.577 61.1205 10.3718C61.2025 10.1666 61.3429 9.99035 61.5241 9.86522C61.7054 9.74009 61.9193 9.67168 62.1391 9.66858V9.67906ZM61.3057 20.5818V13.3378H63.014V20.5503L61.3057 20.5818Z"}),(0,tr.jsx)("path",{d:"M66.905 20.5505H65.2018V13.3379H66.8633V14.2971C67.0799 13.9288 67.391 13.6259 67.764 13.4202C68.1369 13.2145 68.558 13.1137 68.9831 13.1282C70.7331 13.1282 71.5872 14.4019 71.5872 15.9902V20.5505H69.8841V16.2837C69.8841 15.3979 69.4831 14.6797 68.4102 14.6797C68.2118 14.6811 68.0157 14.7218 67.8329 14.7995C67.6502 14.8771 67.4845 14.9902 67.3452 15.1324C67.2059 15.2745 67.0958 15.4429 67.0211 15.6278C66.9465 15.8128 66.9088 16.0107 66.9102 16.2103C66.9102 16.268 66.9102 16.3256 66.9102 16.3833L66.905 20.5505Z"}),(0,tr.jsx)("path",{d:"M73.6491 20.5504V9.82593H75.3574V20.5504H73.6491Z"}),(0,tr.jsx)("path",{d:"M78.4048 9.67909C78.6246 9.67805 78.8398 9.74278 79.0231 9.86506C79.2063 9.98735 79.3493 10.1617 79.4339 10.3659C79.5185 10.5701 79.5409 10.795 79.4983 11.0121C79.4556 11.2292 79.3499 11.4286 79.1944 11.585C79.039 11.7415 78.8408 11.8479 78.6251 11.8908C78.4094 11.9338 78.186 11.9112 77.983 11.8261C77.7801 11.7409 77.6069 11.597 77.4854 11.4126C77.3639 11.2282 77.2996 11.0116 77.3006 10.7903C77.3033 10.4965 77.4205 10.2154 77.627 10.0076C77.8335 9.79978 78.1128 9.68182 78.4048 9.67909ZM77.5662 20.5818V13.3378H79.2589V20.5504L77.5662 20.5818Z"}),(0,tr.jsx)("path",{d:"M83.1752 20.5506H81.4669V13.338H83.1284V14.2972C83.3454 13.9293 83.6566 13.6267 84.0295 13.4211C84.4023 13.2155 84.8232 13.1144 85.2482 13.1283C86.9981 13.1283 87.8523 14.4021 87.8523 15.9903V20.5506H86.144V16.2839C86.1933 15.9201 86.0986 15.5515 85.8804 15.2573C85.6622 14.9632 85.3378 14.7671 84.9773 14.7113C84.8734 14.7008 84.7687 14.7008 84.6648 14.7113C84.267 14.7155 83.8868 14.8775 83.6069 15.1621C83.327 15.4467 83.17 15.831 83.17 16.2314C83.1647 16.2925 83.1647 16.3539 83.17 16.4149L83.1752 20.5506Z"}),(0,tr.jsx)("path",{d:"M93.6805 16.383L96.6857 20.5764H94.6024L92.5191 17.6044L91.6389 18.5374V20.5502H89.9462V9.82568H91.6389V16.252L94.3888 13.3376H96.6545L93.6805 16.383Z"}),(0,tr.jsx)("path",{d:"M13.3059 6.922L20.6913 11.1887V19.7642L13.3268 24.0571L5.9466 19.8009V11.2307L13.3059 6.922ZM13.3059 0.631958L10.5976 2.20447L3.22266 6.51314L0.514343 8.08565V22.9564L3.22266 24.5289L10.608 28.7956L13.3163 30.3681L16.0247 28.7956L23.384 24.4974L26.0923 22.9249V8.03324L23.384 6.46073L16.0038 2.20447L13.2955 0.631958H13.3059Z"})]});var of=require("react/jsx-runtime"),Ls=()=>(0,of.jsx)("svg",{width:"17",height:"14",viewBox:"0 0 17 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,of.jsx)("path",{d:"M5.7 13.0125L0 7.31255L1.425 5.88755L5.7 10.1625L14.875 0.987549L16.3 2.41255L5.7 13.0125Z",fill:"#2E7D32"})});var G5=require("react/jsx-runtime");var z5=require("react/jsx-runtime");var q1=require("react/jsx-runtime");var sf=require("react/jsx-runtime"),lt=({className:t})=>(0,sf.jsx)("svg",{height:"18",width:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10.312 8.319",className:t||"",children:(0,sf.jsx)("path",{d:"M6.073 4.078 10.151 0H9.093A1.87 1.87 0 0 0 7.77.548L5.157 3.162 2.543.548A1.87 1.87 0 0 0 1.22 0H.161L4.24 4.078 0 8.318h1.058a1.87 1.87 0 0 0 1.322-.547l2.777-2.777 2.776 2.777a1.869 1.869 0 0 0 1.322.548h1.058Z"})});var q5=require("react/jsx-runtime");var cf=require("react/jsx-runtime"),W1=({className:t})=>(0,cf.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24",className:t||"",children:(0,cf.jsx)("path",{d:"M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"})});var ff=require("react/jsx-runtime"),K1=()=>(0,ff.jsx)("svg",{width:"6",height:"7",viewBox:"0 0 6 7",xmlns:"http://www.w3.org/2000/svg",children:(0,ff.jsx)("circle",{cx:"3",cy:"3.91418",r:"3",fill:"#4CAF50"})});var W5=require("react/jsx-runtime");var X1=require("react/jsx-runtime");var Mn=require("react/jsx-runtime"),J1=()=>(0,Mn.jsxs)("svg",{width:"81",height:"80",viewBox:"0 0 81 80",xmlns:"http://www.w3.org/2000/svg",children:[(0,Mn.jsx)("g",{id:"error_FILL0_wght400_GRAD0_opsz24 1",children:(0,Mn.jsx)("path",{id:"Vector",d:"M40.5001 56.6667C41.4445 56.6667 42.2362 56.3473 42.8751 55.7084C43.514 55.0695 43.8334 54.2779 43.8334 53.3334C43.8334 52.389 43.514 51.5973 42.8751 50.9584C42.2362 50.3195 41.4445 50.0001 40.5001 50.0001C39.5556 50.0001 38.764 50.3195 38.1251 50.9584C37.4862 51.5973 37.1667 52.389 37.1667 53.3334C37.1667 54.2779 37.4862 55.0695 38.1251 55.7084C38.764 56.3473 39.5556 56.6667 40.5001 56.6667ZM37.1667 43.3334H43.8334V23.3334H37.1667V43.3334ZM40.5001 73.3334C35.889 73.3334 31.5556 72.4584 27.5001 70.7084C23.4445 68.9584 19.9167 66.5834 16.9167 63.5834C13.9167 60.5834 11.5417 57.0556 9.79175 53.0001C8.04175 48.9445 7.16675 44.6112 7.16675 40.0001C7.16675 35.389 8.04175 31.0556 9.79175 27.0001C11.5417 22.9445 13.9167 19.4167 16.9167 16.4167C19.9167 13.4167 23.4445 11.0417 27.5001 9.29175C31.5556 7.54175 35.889 6.66675 40.5001 6.66675C45.1112 6.66675 49.4445 7.54175 53.5001 9.29175C57.5556 11.0417 61.0834 13.4167 64.0834 16.4167C67.0834 19.4167 69.4584 22.9445 71.2084 27.0001C72.9584 31.0556 73.8334 35.389 73.8334 40.0001C73.8334 44.6112 72.9584 48.9445 71.2084 53.0001C69.4584 57.0556 67.0834 60.5834 64.0834 63.5834C61.0834 66.5834 57.5556 68.9584 53.5001 70.7084C49.4445 72.4584 45.1112 73.3334 40.5001 73.3334ZM40.5001 66.6667C47.9445 66.6667 54.2501 64.0834 59.4167 58.9167C64.5834 53.7501 67.1667 47.4445 67.1667 40.0001C67.1667 32.5556 64.5834 26.2501 59.4167 21.0834C54.2501 15.9167 47.9445 13.3334 40.5001 13.3334C33.0556 13.3334 26.7501 15.9167 21.5834 21.0834C16.4167 26.2501 13.8334 32.5556 13.8334 40.0001C13.8334 47.4445 16.4167 53.7501 21.5834 58.9167C26.7501 64.0834 33.0556 66.6667 40.5001 66.6667Z",fill:"url(#paint0_linear_230_166)"})}),(0,Mn.jsx)("defs",{children:(0,Mn.jsxs)("linearGradient",{id:"paint0_linear_230_166",x1:"7.16675",y1:"6.66675",x2:"77.4571",y2:"10.7358",gradientUnits:"userSpaceOnUse",children:[(0,Mn.jsx)("stop",{stopColor:"#F44336"}),(0,Mn.jsx)("stop",{offset:"1",stopColor:"#C62828"})]})})]});var Q1=require("react"),df=require("react/jsx-runtime"),_i=(0,Q1.forwardRef)(({className:t},e)=>(0,df.jsx)("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",className:t||"",children:(0,df.jsx)("path",{d:"M478-240q21 0 35.5-14.5T528-290q0-21-14.5-35.5T478-340q-21 0-35.5 14.5T428-290q0 21 14.5 35.5T478-240Zm-36-154h74q0-33 7.5-52t42.5-52q26-26 41-49.5t15-56.5q0-56-41-86t-97-30q-57 0-92.5 30T342-618l66 26q5-18 22.5-39t53.5-21q32 0 48 17.5t16 38.5q0 20-12 37.5T506-526q-44 39-54 59t-10 73Zm38 314q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})}));_i.displayName="HelpIcon";var Ds=require("react/jsx-runtime"),Z1=()=>(0,Ds.jsx)("div",{className:"relative bg-gradient-to-r from-t_main_accent_light to-t_main_accent_dark rounded-full",children:(0,Ds.jsx)("svg",{width:"29",height:"28",viewBox:"0 0 29 28",xmlns:"http://www.w3.org/2000/svg",children:(0,Ds.jsx)("path",{d:"M14.3979 21.5C12.5771 21.5 10.9905 20.8646 9.63805 19.5938C8.28562 18.3229 7.51045 16.7361 7.31253 14.8333H8.93545C9.12017 16.2778 9.73041 17.4722 10.7662 18.4167C11.8019 19.3611 13.0125 19.8333 14.3979 19.8333C15.9417 19.8333 17.2512 19.2674 18.3266 18.1354C19.4019 17.0035 19.9396 15.625 19.9396 14C19.9396 12.375 19.4019 10.9965 18.3266 9.86458C17.2512 8.73264 15.9417 8.16667 14.3979 8.16667C13.4875 8.16667 12.6365 8.38889 11.8448 8.83333C11.0532 9.27778 10.3868 9.88889 9.84587 10.6667H12.0229V12.3333H7.27295V7.33333H8.85628V9.29167C9.5292 8.40278 10.3506 7.71528 11.3203 7.22917C12.2901 6.74306 13.316 6.5 14.3979 6.5C15.3875 6.5 16.3144 6.69792 17.1787 7.09375C18.0429 7.48958 18.795 8.02431 19.4349 8.69792C20.0749 9.37153 20.5828 10.1632 20.9589 11.0729C21.3349 11.9826 21.5229 12.9583 21.5229 14C21.5229 15.0417 21.3349 16.0174 20.9589 16.9271C20.5828 17.8368 20.0749 18.6285 19.4349 19.3021C18.795 19.9757 18.0429 20.5104 17.1787 20.9062C16.3144 21.3021 15.3875 21.5 14.3979 21.5ZM16.6146 17.5L13.6063 14.3333V9.83333H15.1896V13.6667L17.7229 16.3333L16.6146 17.5Z"})})});var K5=require("react/jsx-runtime");var X5=require("react/jsx-runtime");var J5=require("react/jsx-runtime");var lf=require("react/jsx-runtime"),Y1=()=>(0,lf.jsx)("svg",{width:"19",height:"19",viewBox:"0 0 19 19",xmlns:"http://www.w3.org/2000/svg",children:(0,lf.jsx)("path",{d:"M2.5 18.5C1.95 18.5 1.47917 18.3042 1.0875 17.9125C0.695833 17.5208 0.5 17.05 0.5 16.5V2.5C0.5 1.95 0.695833 1.47917 1.0875 1.0875C1.47917 0.695833 1.95 0.5 2.5 0.5H9.5V2.5H2.5V16.5H16.5V9.5H18.5V16.5C18.5 17.05 18.3042 17.5208 17.9125 17.9125C17.5208 18.3042 17.05 18.5 16.5 18.5H2.5ZM7.2 13.2L5.8 11.8L15.1 2.5H11.5V0.5H18.5V7.5H16.5V3.9L7.2 13.2Z"})});var j1=require("react/jsx-runtime");var $1=require("react/jsx-runtime");var uf=require("react/jsx-runtime"),Os=()=>(0,uf.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",viewBox:"0 -960 960 960",children:(0,uf.jsx)("path",{d:"M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"})});var Us=require("react/jsx-runtime"),ep=()=>(0,Us.jsx)("div",{className:"relative bg-gradient-to-r from-t_main_accent_light to-t_main_accent_dark rounded-full",children:(0,Us.jsx)("svg",{width:"29",height:"28",viewBox:"0 0 29 28",xmlns:"http://www.w3.org/2000/svg",children:(0,Us.jsx)("path",{d:"M12.0373 22.5L11.6791 19.78C11.4851 19.7092 11.3022 19.6242 11.1306 19.525C10.959 19.4258 10.791 19.3196 10.6269 19.2063L7.96269 20.2688L5.5 16.2312L7.80597 14.5738C7.79104 14.4746 7.78358 14.379 7.78358 14.2869V13.7131C7.78358 13.621 7.79104 13.5254 7.80597 13.4262L5.5 11.7688L7.96269 7.73125L10.6269 8.79375C10.791 8.68042 10.9627 8.57417 11.1418 8.475C11.3209 8.37583 11.5 8.29083 11.6791 8.22L12.0373 5.5H16.9627L17.3209 8.22C17.5149 8.29083 17.6978 8.37583 17.8694 8.475C18.041 8.57417 18.209 8.68042 18.3731 8.79375L21.0373 7.73125L23.5 11.7688L21.194 13.4262C21.209 13.5254 21.2164 13.621 21.2164 13.7131V14.2869C21.2164 14.379 21.2015 14.4746 21.1716 14.5738L23.4776 16.2312L21.0149 20.2688L18.3731 19.2063C18.209 19.3196 18.0373 19.4258 17.8582 19.525C17.6791 19.6242 17.5 19.7092 17.3209 19.78L16.9627 22.5H12.0373ZM14.5448 16.975C15.4104 16.975 16.1493 16.6846 16.7612 16.1038C17.3731 15.5229 17.6791 14.8217 17.6791 14C17.6791 13.1783 17.3731 12.4771 16.7612 11.8963C16.1493 11.3154 15.4104 11.025 14.5448 11.025C13.6642 11.025 12.9216 11.3154 12.3172 11.8963C11.7127 12.4771 11.4104 13.1783 11.4104 14C11.4104 14.8217 11.7127 15.5229 12.3172 16.1038C12.9216 16.6846 13.6642 16.975 14.5448 16.975ZM14.5448 15.275C14.1716 15.275 13.8545 15.151 13.5933 14.9031C13.3321 14.6552 13.2015 14.3542 13.2015 14C13.2015 13.6458 13.3321 13.3448 13.5933 13.0969C13.8545 12.849 14.1716 12.725 14.5448 12.725C14.9179 12.725 15.2351 12.849 15.4963 13.0969C15.7575 13.3448 15.8881 13.6458 15.8881 14C15.8881 14.3542 15.7575 14.6552 15.4963 14.9031C15.2351 15.151 14.9179 15.275 14.5448 15.275ZM13.6045 20.8H15.3731L15.6866 18.5475C16.1493 18.4342 16.5784 18.2677 16.9739 18.0481C17.3694 17.8285 17.7313 17.5629 18.0597 17.2513L20.2761 18.1225L21.1493 16.6775L19.2239 15.2963C19.2985 15.0979 19.3507 14.889 19.3806 14.6694C19.4104 14.4498 19.4254 14.2267 19.4254 14C19.4254 13.7733 19.4104 13.5502 19.3806 13.3306C19.3507 13.111 19.2985 12.9021 19.2239 12.7038L21.1493 11.3225L20.2761 9.8775L18.0597 10.77C17.7313 10.4442 17.3694 10.1715 16.9739 9.95188C16.5784 9.73229 16.1493 9.56583 15.6866 9.4525L15.3955 7.2H13.6269L13.3134 9.4525C12.8507 9.56583 12.4216 9.73229 12.0261 9.95188C11.6306 10.1715 11.2687 10.4371 10.9403 10.7488L8.72388 9.8775L7.85075 11.3225L9.77612 12.6825C9.70149 12.895 9.64925 13.1075 9.6194 13.32C9.58955 13.5325 9.57463 13.7592 9.57463 14C9.57463 14.2267 9.58955 14.4462 9.6194 14.6588C9.64925 14.8713 9.70149 15.0837 9.77612 15.2963L7.85075 16.6775L8.72388 18.1225L10.9403 17.23C11.2687 17.5558 11.6306 17.8285 12.0261 18.0481C12.4216 18.2677 12.8507 18.4342 13.3134 18.5475L13.6045 20.8Z"})})});var Q5=require("react/jsx-runtime");var pf=require("react/jsx-runtime"),hf=()=>(0,pf.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,pf.jsx)("path",{d:"M4 21V16.75L17.175 3.6C17.375 3.4 17.6 3.25 17.85 3.15C18.1 3.05 18.35 3 18.6 3C18.8667 3 19.1208 3.05 19.3625 3.15C19.6042 3.25 19.8167 3.4 20 3.6L21.4 5C21.6 5.18333 21.75 5.39583 21.85 5.6375C21.95 5.87917 22 6.13333 22 6.4C22 6.65 21.95 6.9 21.85 7.15C21.75 7.4 21.6 7.625 21.4 7.825L8.25 21H4ZM6 19H7.4L17.225 9.2L16.525 8.475L15.8 7.775L6 17.6V19ZM16.525 8.475L15.8 7.775L17.225 9.2L16.525 8.475ZM14 21C15.2333 21 16.375 20.6917 17.425 20.075C18.475 19.4583 19 18.6 19 17.5C19 16.9 18.8417 16.3833 18.525 15.95C18.2083 15.5167 17.7833 15.1417 17.25 14.825L15.775 16.3C16.1583 16.4667 16.4583 16.65 16.675 16.85C16.8917 17.05 17 17.2667 17 17.5C17 17.8833 16.6958 18.2292 16.0875 18.5375C15.4792 18.8458 14.7833 19 14 19C13.7167 19 13.4792 19.0958 13.2875 19.2875C13.0958 19.4792 13 19.7167 13 20C13 20.2833 13.0958 20.5208 13.2875 20.7125C13.4792 20.9042 13.7167 21 14 21ZM4.575 13.35L6.075 11.85C5.74167 11.7167 5.47917 11.5792 5.2875 11.4375C5.09583 11.2958 5 11.15 5 11C5 10.8 5.15 10.6 5.45 10.4C5.75 10.2 6.38333 9.89167 7.35 9.475C8.81667 8.84167 9.79167 8.26667 10.275 7.75C10.7583 7.23333 11 6.65 11 6C11 5.08333 10.6333 4.35417 9.9 3.8125C9.16667 3.27083 8.2 3 7 3C6.25 3 5.57917 3.13333 4.9875 3.4C4.39583 3.66667 3.94167 3.99167 3.625 4.375C3.44167 4.59167 3.36667 4.83333 3.4 5.1C3.43333 5.36667 3.55833 5.58333 3.775 5.75C3.99167 5.93333 4.23333 6.00833 4.5 5.975C4.76667 5.94167 4.99167 5.83333 5.175 5.65C5.40833 5.41667 5.66667 5.25 5.95 5.15C6.23333 5.05 6.58333 5 7 5C7.68333 5 8.1875 5.1 8.5125 5.3C8.8375 5.5 9 5.73333 9 6C9 6.23333 8.85417 6.44583 8.5625 6.6375C8.27083 6.82917 7.6 7.16667 6.55 7.65C5.21667 8.23333 4.29167 8.7625 3.775 9.2375C3.25833 9.7125 3 10.3 3 11C3 11.5333 3.14167 11.9875 3.425 12.3625C3.70833 12.7375 4.09167 13.0667 4.575 13.35Z"})});var tp=require("react/jsx-runtime");var In=require("react/jsx-runtime"),rp=()=>(0,In.jsxs)("svg",{width:"81",height:"80",viewBox:"0 0 81 80",xmlns:"http://www.w3.org/2000/svg",children:[(0,In.jsx)("g",{id:"check_circle_FILL0_wght400_GRAD0_opsz24 (1) 1",children:(0,In.jsx)("path",{id:"Vector",d:"M35.8334 55.3332L59.3334 31.8332L54.6667 27.1665L35.8334 45.9998L26.3334 36.4998L21.6667 41.1665L35.8334 55.3332ZM40.5001 73.3332C35.889 73.3332 31.5556 72.4582 27.5001 70.7082C23.4445 68.9582 19.9167 66.5832 16.9167 63.5832C13.9167 60.5832 11.5417 57.0554 9.79175 52.9998C8.04175 48.9443 7.16675 44.6109 7.16675 39.9998C7.16675 35.3887 8.04175 31.0554 9.79175 26.9998C11.5417 22.9443 13.9167 19.4165 16.9167 16.4165C19.9167 13.4165 23.4445 11.0415 27.5001 9.2915C31.5556 7.5415 35.889 6.6665 40.5001 6.6665C45.1112 6.6665 49.4445 7.5415 53.5001 9.2915C57.5556 11.0415 61.0834 13.4165 64.0834 16.4165C67.0834 19.4165 69.4584 22.9443 71.2084 26.9998C72.9584 31.0554 73.8334 35.3887 73.8334 39.9998C73.8334 44.6109 72.9584 48.9443 71.2084 52.9998C69.4584 57.0554 67.0834 60.5832 64.0834 63.5832C61.0834 66.5832 57.5556 68.9582 53.5001 70.7082C49.4445 72.4582 45.1112 73.3332 40.5001 73.3332ZM40.5001 66.6665C47.9445 66.6665 54.2501 64.0832 59.4167 58.9165C64.5834 53.7498 67.1667 47.4443 67.1667 39.9998C67.1667 32.5554 64.5834 26.2498 59.4167 21.0832C54.2501 15.9165 47.9445 13.3332 40.5001 13.3332C33.0556 13.3332 26.7501 15.9165 21.5834 21.0832C16.4167 26.2498 13.8334 32.5554 13.8334 39.9998C13.8334 47.4443 16.4167 53.7498 21.5834 58.9165C26.7501 64.0832 33.0556 66.6665 40.5001 66.6665Z",fill:"url(#paint0_linear_230_393)"})}),(0,In.jsx)("defs",{children:(0,In.jsxs)("linearGradient",{id:"paint0_linear_230_393",x1:"7.16675",y1:"6.6665",x2:"77.4571",y2:"10.7355",gradientUnits:"userSpaceOnUse",children:[(0,In.jsx)("stop",{stopColor:"#4CAF50"}),(0,In.jsx)("stop",{offset:"1",stopColor:"#2E7D32"})]})})]});var xf=require("react/jsx-runtime"),mf=()=>(0,xf.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,xf.jsx)("path",{d:"M7 16H12.5C12.7833 16 13.0458 15.9292 13.2875 15.7875C13.5292 15.6458 13.7 15.45 13.8 15.2L15.9 10.3C15.9333 10.2167 15.9583 10.1333 15.975 10.05C15.9917 9.96667 16 9.88333 16 9.8V9C16 8.71667 15.9042 8.47917 15.7125 8.2875C15.5208 8.09583 15.2833 8 15 8H10.4L11 4.6C11.0333 4.43333 11.025 4.275 10.975 4.125C10.925 3.975 10.8417 3.84167 10.725 3.725L10 3L5.4 8C5.26667 8.13333 5.16667 8.28333 5.1 8.45C5.03333 8.61667 5 8.8 5 9V14C5 14.55 5.19583 15.0208 5.5875 15.4125C5.97917 15.8042 6.45 16 7 16ZM10 20C8.61667 20 7.31667 19.7375 6.1 19.2125C4.88333 18.6875 3.825 17.975 2.925 17.075C2.025 16.175 1.3125 15.1167 0.7875 13.9C0.2625 12.6833 0 11.3833 0 10C0 8.61667 0.2625 7.31667 0.7875 6.1C1.3125 4.88333 2.025 3.825 2.925 2.925C3.825 2.025 4.88333 1.3125 6.1 0.7875C7.31667 0.2625 8.61667 0 10 0C11.3833 0 12.6833 0.2625 13.9 0.7875C15.1167 1.3125 16.175 2.025 17.075 2.925C17.975 3.825 18.6875 4.88333 19.2125 6.1C19.7375 7.31667 20 8.61667 20 10C20 11.3833 19.7375 12.6833 19.2125 13.9C18.6875 15.1167 17.975 16.175 17.075 17.075C16.175 17.975 15.1167 18.6875 13.9 19.2125C12.6833 19.7375 11.3833 20 10 20ZM10 18C12.2333 18 14.125 17.225 15.675 15.675C17.225 14.125 18 12.2333 18 10C18 7.76667 17.225 5.875 15.675 4.325C14.125 2.775 12.2333 2 10 2C7.76667 2 5.875 2.775 4.325 4.325C2.775 5.875 2 7.76667 2 10C2 12.2333 2.775 14.125 4.325 15.675C5.875 17.225 7.76667 18 10 18Z"})});var bf=require("react/jsx-runtime"),np=()=>(0,bf.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",viewBox:"0 -960 960 960",width:"16",children:(0,bf.jsx)("path",{d:"M360-840v-80h240v80H360Zm80 440h80v-240h-80v240Zm40 320q-74 0-139.5-28.5T226-186q-49-49-77.5-114.5T120-440q0-74 28.5-139.5T226-694q49-49 114.5-77.5T480-800q62 0 119 20t107 58l56-56 56 56-56 56q38 50 58 107t20 119q0 74-28.5 139.5T734-186q-49 49-114.5 77.5T480-80Zm0-80q116 0 198-82t82-198q0-116-82-198t-198-82q-116 0-198 82t-82 198q0 116 82 198t198 82Zm0-280Z"})});var gf=require("react/jsx-runtime"),ip=()=>(0,gf.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:(0,gf.jsx)("path",{d:"M11.5 15C9.825 15 8.40625 14.4188 7.24375 13.2563C6.08125 12.0938 5.5 10.675 5.5 9C5.5 7.325 6.08125 5.90625 7.24375 4.74375C8.40625 3.58125 9.825 3 11.5 3C13.175 3 14.5938 3.58125 15.7563 4.74375C16.9188 5.90625 17.5 7.325 17.5 9C17.5 10.675 16.9188 12.0938 15.7563 13.2563C14.5938 14.4188 13.175 15 11.5 15ZM5.5 14.8125C4.175 14.4625 3.09375 13.75 2.25625 12.675C1.41875 11.6 1 10.375 1 9C1 7.625 1.41875 6.4 2.25625 5.325C3.09375 4.25 4.175 3.5375 5.5 3.1875V4.7625C4.6 5.075 3.875 5.61875 3.325 6.39375C2.775 7.16875 2.5 8.0375 2.5 9C2.5 9.9625 2.775 10.8313 3.325 11.6063C3.875 12.3813 4.6 12.925 5.5 13.2375V14.8125ZM11.5 13.5C12.75 13.5 13.8125 13.0625 14.6875 12.1875C15.5625 11.3125 16 10.25 16 9C16 7.75 15.5625 6.6875 14.6875 5.8125C13.8125 4.9375 12.75 4.5 11.5 4.5C10.25 4.5 9.1875 4.9375 8.3125 5.8125C7.4375 6.6875 7 7.75 7 9C7 10.25 7.4375 11.3125 8.3125 12.1875C9.1875 13.0625 10.25 13.5 11.5 13.5Z",fillOpacity:"0.6"})});var yf=require("react/jsx-runtime"),ap=()=>(0,yf.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:(0,yf.jsx)("path",{d:"M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C12.5083 12.1667 13.2333 11.2 13.65 10H15.75C15.2833 11.7667 14.3333 13.2083 12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z"})});var $n=require("react/jsx-runtime"),op=({className:t})=>(0,$n.jsxs)("svg",{fill:"none",height:"400",viewBox:"0 0 400 400",width:"400",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",className:t||"",children:[(0,$n.jsx)("clipPath",{id:"a",children:(0,$n.jsx)("path",{d:"m0 0h400v400h-400z"})}),(0,$n.jsxs)("g",{clipPath:"url(#a)",children:[(0,$n.jsx)("circle",{cx:"200",cy:"200",fill:"#3396ff",r:"199.5",stroke:"#66b1ff"}),(0,$n.jsx)("path",{d:"m122.519 148.965c42.791-41.729 112.171-41.729 154.962 0l5.15 5.022c2.14 2.086 2.14 5.469 0 7.555l-17.617 17.18c-1.07 1.043-2.804 1.043-3.874 0l-7.087-6.911c-29.853-29.111-78.253-29.111-108.106 0l-7.59 7.401c-1.07 1.043-2.804 1.043-3.874 0l-17.617-17.18c-2.14-2.086-2.14-5.469 0-7.555zm191.397 35.529 15.679 15.29c2.14 2.086 2.14 5.469 0 7.555l-70.7 68.944c-2.139 2.087-5.608 2.087-7.748 0l-50.178-48.931c-.535-.522-1.402-.522-1.937 0l-50.178 48.931c-2.139 2.087-5.608 2.087-7.748 0l-70.7015-68.945c-2.1396-2.086-2.1396-5.469 0-7.555l15.6795-15.29c2.1396-2.086 5.6085-2.086 7.7481 0l50.1789 48.932c.535.522 1.402.522 1.937 0l50.177-48.932c2.139-2.087 5.608-2.087 7.748 0l50.179 48.932c.535.522 1.402.522 1.937 0l50.179-48.931c2.139-2.087 5.608-2.087 7.748 0z",fill:"#fff"})]})]});var Z5=require("react/jsx-runtime");var sp=require("react/jsx-runtime");var cp=require("react/jsx-runtime");var wf=require("react/jsx-runtime"),fp=()=>(0,wf.jsx)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 50 50",enableBackground:"new 0 0 50 50",children:(0,wf.jsx)("image",{id:"image0",x:"0",y:"0",href:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABGdBTUEAALGPC/xhBQAAACBjSFJN
12
+ `);var w1=require("react/jsx-runtime"),_n=null,Ai=null,ks=null,Ms=null,Xc=!1,g1=()=>{Pt||(I5(),k5(),Promise.all([_5(),M5()]).then(t=>{for(let e of t)E5(e);Xc=!0}))},y1=async()=>{if(!Xc){for(b1(!0);!Xc;)await new Promise(t=>setTimeout(t,10));b1(!1)}},E5=async t=>{let e=document.createElement("style");e.appendChild(document.createTextNode(Es)),t.appendChild(e)},k5=()=>{let t="xpay-fonts";if(document.querySelector(`style[data-name="${t}"]`))return;let e=document.createElement("style");e.dataset.name=t,e.appendChild(document.createTextNode(m1)),document.head.appendChild(e)},_5=async()=>{let t=document.createElement("div");return Ai=t.attachShadow({mode:"open",delegatesFocus:!0}),t.setAttribute("id","xpay-root"),document.body.appendChild(t),_n=(0,_s.createRoot)(Ai),Ai},M5=async()=>{let t=document.createElement("div"),e=t.attachShadow({mode:"open"});return t.setAttribute("id","xpay-tx-status"),document.body.appendChild(t),Ms=(0,_s.createRoot)(e),e},I5=()=>{let t=document.createElement("div");t.setAttribute("id","xpay-init-indicator"),document.body.appendChild(t),ks=(0,_s.createRoot)(t)},b1=t=>{Pt||!ks||(t?ks.render((0,w1.jsx)(Vf,{})):ks.render(null))};var v1="https://xswap.link/api",Is=t=>{v1=t};async function Ti(t,e){let r=await fetch(`${v1}${t}`,{method:"GET",headers:{"Content-Type":"application/json","Cache-Control":"no-cache",...e?.headers},...e});if(!r.ok)throw new Error(`API request failed with status ${r.status}: ${r.statusText}`);return r.json()}async function Jc(t,e){return Ti("/route",{method:"POST",body:JSON.stringify(t),signal:e})}async function Si(t){return Ti(`/chains?data=${JSON.stringify({ecosystem:t})}`)}async function Ps(t){return await Ti(`/history?${new URLSearchParams({data:JSON.stringify(t)})}`)}async function C1(t){return await Ti(`/tokenPrices?${new URLSearchParams({data:JSON.stringify(t)})}`)}async function A1(t){return Ti(`/tokenBalances?${new URLSearchParams({data:JSON.stringify(t)})}`)}async function Qc(t){return await Ti(`/getTxStatus?${new URLSearchParams({data:JSON.stringify(t)})}`)}async function T1(){return Ti("/bridgeTokens")}var P5=require("react/jsx-runtime");var S1=require("react"),E1=require("react/jsx-runtime"),Ir=(0,S1.forwardRef)(({variant:t,disabled:e,children:r,type:n,value:i,fullWidth:a,onClick:o,className:f="",size:d="medium",secondary:p=!1},h)=>(0,E1.jsx)("button",{ref:h,type:n||void 0,value:i||void 0,className:`btn ${!t&&e?"btn-disabled":""} ${f} btn-${d} btn-${t}${e?"-disabled":p?"-secondary":""} ${a?"btn--full-width":""}`,disabled:e,onClick:o,children:r}));Ir.displayName="Button";var Ei=require("react/jsx-runtime"),k1=({text:t,type:e,className:r,isSnackbar:n,Action:i,Animation:a})=>(0,Ei.jsxs)("div",{className:`my-5 mx-0 bg-t_bg_tertiary bg-opacity-10 rounded-2xl max-w-[500px] min-h-[43px] flex items-center text-xs font-medium text-t_text_primary border border-solid ${e==="error"?"border-t_error_dark":e==="warning"?"border-t_warning_dark":e==="info"?"border-t_main_accent_dark":e==="success"?"border-t_success_dark":""} ${n&&"m-0"}`,children:[(0,Ei.jsx)("p",{className:"p-[15px]",children:t}),a&&(0,Ei.jsx)(a,{}),i&&(0,Ei.jsx)("div",{className:`pl-4 fill-t_text_primary text-t_text_primary ${r}`,children:(0,Ei.jsx)(i,{})})]});var _1=require("notistack"),M1=require("react"),Zc=require("react/jsx-runtime"),Yn=(0,M1.forwardRef)(({message:t},e)=>{let{text:r,variant:n,className:i,action:a,animation:o}=t;return(0,Zc.jsx)(_1.SnackbarContent,{ref:e,children:(0,Zc.jsx)(k1,{text:r,type:n,className:i,isSnackbar:!0,Action:a,Animation:o})})});Yn.displayName="SnackMessage";var I1=require("react"),fo=()=>(0,I1.useMemo)(()=>({query:async(t,e,r=[])=>t?.provider?await t[e](...r):null,execute:async(t,e,r=[],n={})=>{try{if(t?.provider){let i=await t.estimateGas[e](...r,n);return n.gasLimit||(n.gasLimit=Math.floor(i.toNumber()*Gc)),await t[e](...r,n)}return null}catch(i){let a;try{a=t?.interface.parseError(i?.error?.data?.data)}catch{throw i?.error?.data?.message?new Error(i?.error?.data?.message):i}throw new Error(a?.name)}},executeCalldata:async(t,e)=>{try{let r=await t.estimateGas({...e});return await t.sendTransaction({...e,gasLimit:Math.floor(r.toNumber()*Gc)})}catch(r){throw r?.error?.data?.message?new Error(r?.error?.data?.message):r}}}),[]),Yc=fo;var N5=require("react");var Ns=require("react"),P1=({delayMs:t,instantExecution:e})=>{let r=(0,Ns.useRef)(null);return{debounce:(0,Ns.useCallback)(i=>{r.current&&(clearTimeout(r.current),r.current=null),e&&e(),r.current=setTimeout(i,t)},[t,e])}};var R5=require("react"),rv=new fe.utils.Interface(l1);var ma=require("react"),D5=require("wagmi");var F1=Et(require("bignumber.js"));var Y=require("react"),L1=require("wagmi");var N1=({supportedChains:t})=>{let e=t.find(r=>r.chainId===ua)||t[0];if(!e)throw new Error("getDefaultSourceChain > couldn't find default source chain");return e},R1=({supportedChains:t})=>{let e=t.find(r=>r.chainId===As)||t[0];if(!e)throw new Error("getDefaultDestinationChain > couldn't find default destination chain");return e},Rs=(t,e,r,n)=>{if(!t.tokens.some(f=>f.supported))return;let a=t.tokens.find(f=>f.address.toLowerCase()===e.toLowerCase()&&f.supported);if(a)return a;let o=t.tokens.find(f=>r?f.supported&&f.tokenId!==n:f.supported);if(o)return o},B5=({chain:t,bridgeTokensDictionary:e})=>{if(!t)return;let r=t.tokens.find(i=>i.tokenId==="XSWAP");if(r)return r;let n=Object.keys(e[t.chainId]||{})[0];return t.tokens.find(i=>i.address.toLowerCase()===n?.toLowerCase())},jc=t=>t.swapSupported,$c=({sourceChain:t,targetChain:e})=>{if(!t)throw new Error("isSwapTargetChainValid > sourceChain should be defined.");return e.swapSupported&&t.supportedDstForSwap?.includes(e.chainId)},ef=t=>!t||t.bridgeSupported,B1=({sourceChain:t,targetChain:e,sourceToken:r})=>{let n=!0,i=!0,a=!1;return t&&e&&(n=!!t.supportedDstForBridge?.includes(e.chainId)),r&&e&&(i=!!e.tokens.find(o=>o.tokenId===r.tokenId)),t&&e&&(a=t.chainId===e.chainId),i&&!a&&n},F5=({source:t,target:e,supportedChains:r})=>{let n=t.chain||N1({supportedChains:r}),i=e.chain||R1({supportedChains:r}),a=t.token||Rs(n,Uc),o=e.token||Rs(i,Hc,n.chainId===i.chainId,a?.tokenId);if(!n||!i||!a||!o)return{source:{chain:void 0,token:void 0},target:{chain:void 0,token:void 0}};if(!jc(n)&&(n=N1({supportedChains:r}),a=void 0,!jc(n)&&(console.error("[WRONG CONFIG] default swap source chain is invalid."),n=r.find(f=>jc(f)),!n)))throw new Error("mapToValidSwap > None of the chains supports swap. Couldn't set source chain.");if(!$c({sourceChain:n,targetChain:i})&&(i=R1({supportedChains:r}),o=void 0,!$c({sourceChain:n,targetChain:i})&&(console.error("[WRONG CONFIG] default swap target chain is invalid."),i=r.find(f=>$c({sourceChain:n,targetChain:f})),!i)))throw new Error("mapToValidSwap > None of the chains supports swap. Couldn't set target chain.");return a=n.tokens.find(f=>f.tokenId===a?.tokenId&&f.supported),o=i.tokens.find(f=>f.tokenId===o?.tokenId&&f.supported),a||(a=Rs(n,Uc)),(!o||a===o)&&(o=Rs(i,Hc,n.chainId===i.chainId,a?.tokenId)),{source:{chain:n,token:a},target:{chain:i,token:o}}},L5=({source:t,target:e,supportedChains:r,bridgeTokensDictionary:n})=>{let i=t.chain,a=e.chain,o=t.token,f=e.token;if(!ef(i)&&(i=void 0,o=void 0,!ef(i)&&(console.error("[WRONG CONFIG] default bridge source chain is invalid."),i=r.find(d=>ef(d)),!i)))throw new Error("mapToValidSwap > None of the chains supports bridge. Couldn't set source chain.");if(B1({sourceChain:i,targetChain:a,sourceToken:o})||(f=void 0,B1({sourceChain:i,targetChain:a,sourceToken:o})||(a=void 0)),o&&i&&(o=i.tokens.find(d=>d.tokenId===o?.tokenId&&d.supported),o&&(Object.keys(n[i.chainId]?.[o.address.toLowerCase()]||{}).length>0||(o=void 0))),f&&a&&(f=a.tokens.find(d=>d.tokenId===f?.tokenId&&d.supported)),!o){let d=B5({chain:i,bridgeTokensDictionary:n});d&&i&&a&&!!n[i.chainId]?.[d.address.toLowerCase()]?.[a.chainId]?o=d:o=void 0}if(o?.tokenId!==f?.tokenId&&(f=void 0),!f)if(o&&i&&a){let d=n[i.chainId]?.[o.address.toLowerCase()]?.[a.chainId];f=a.tokens.find(h=>h.address.toLowerCase()===d?.toLowerCase())}else f=void 0;return!f&&o&&(a=void 0),{source:{chain:i,token:o},target:{chain:a,token:f}}},Bs=({type:t,...e})=>t==="SWAP"?F5(e):L5(e);var U1=require("react/jsx-runtime"),Nt=()=>{throw new Error("Not implemented")},ct={bridgeUI:!1,integrationConfig:{},wagmiConfig:{},supportedChains:[],tab:"Swap",overlay:!1,error:"",feeToken:void 0,srcChain:void 0,srcChainTokensOptions:[],srcChainOtherTokensOptions:[],tokenPrices:{},dstChain:void 0,dstChainTokensOptions:[],dstChainOtherTokensOptions:[],srcToken:void 0,dstTokenLocked:!1,dstChainLocked:!1,srcTokenLocked:!1,srcChainLocked:!1,dstToken:void 0,srcValue:"",srcValueWei:"",srcValueUsd:null,dstValue:"",dstValueWei:"",dstValueUsd:null,dstValueMin:"",expressDelivery:!0,infiniteApproval:!0,slippage:"1.5",route:void 0,isAsyncDataLoaded:!1,srcTokenBalanceWei:"",srcTokenBalanceInfo:"-",isFetchingBalance:!1,isFetchingBalances:!1,isFetchingRoute:!1,isExpressDeliveryActive:!0,setTab:Nt,setError:Nt,setSrcChain:Nt,setDstChain:Nt,setSrcToken:Nt,setDstToken:Nt,setSrcValue:Nt,setExpressDelivery:Nt,setInfiniteApproval:Nt,setSlippage:Nt,setRoute:Nt,setSrcTokenBalanceWei:Nt,quoteRoute:Nt,refreshBalance:Nt,findTokenDataByAddressAndChain:Nt,bridgeTokensDictionary:null,onConnectWallet:Nt,hasOnConnectWalletCallback:!1,srcChainOptions:[],dstChainOptions:[]},D1=(0,Y.createContext)(ct),O1=({children:t,integrationConfig:e,supportedChains:r,wagmiConfig:n,overlay:i})=>{let{address:a,chainId:o}=(0,L1.useAccount)(),[f,d]=(0,Y.useState)(!1),[p,h]=(0,Y.useState)(ct.tab),[v,E]=(0,Y.useState)(ct.error),[S,A]=(0,Y.useState)(ct.expressDelivery),[_,I]=(0,Y.useState)(ct.slippage),[N,L]=(0,Y.useState)(ct.infiniteApproval),[M,V]=(0,Y.useState)(ct.srcChain),[F,B]=(0,Y.useState)(ct.dstChain),[J,Q]=(0,Y.useState)(ct.feeToken),[G,ae]=(0,Y.useState)(ct.srcToken),[W,ne]=(0,Y.useState)(ct.dstToken),[T,s]=(0,Y.useState)(ct.tokenPrices),[l,g]=(0,Y.useState)({}),[w,C]=(0,Y.useState)([]),[b,y]=(0,Y.useState)(ct.srcValue),[m,c]=(0,Y.useState)(ct.srcTokenBalanceWei),[x,R]=(0,Y.useState)(ct.srcChainTokensOptions),[u,k]=(0,Y.useState)(ct.dstChainTokensOptions),[P,O]=(0,Y.useState)(ct.srcChainOtherTokensOptions),[z,$]=(0,Y.useState)(ct.dstChainOtherTokensOptions),[j,Z]=(0,Y.useState)([]),[Ye,ee]=(0,Y.useState)([]),[le,Br]=(0,Y.useState)(ct.isFetchingBalance),[He,Le]=(0,Y.useState)(ct.isFetchingBalances),[cn,De]=(0,Y.useState)(ct.isFetchingRoute),[Ce,nr]=(0,Y.useState)(ct.route),Se=(0,Y.useRef)(null),Oe=(0,Y.useRef)(crypto.randomUUID()),fn=(0,Y.useMemo)(()=>!!e?.srcTokenLocked,[e?.srcTokenLocked]),Ve=(0,Y.useMemo)(()=>!!e?.dstTokenLocked,[e?.dstTokenLocked]),Ge=(0,Y.useMemo)(()=>!!e?.dstChainLocked,[e?.dstChainLocked]),dn=(0,Y.useMemo)(()=>!!e?.srcChainLocked,[e?.srcChainLocked]),se=(0,Y.useMemo)(()=>!!e.bridge,[e.bridge]),ze=(0,Y.useMemo)(()=>!!(e.onConnectWallet||window.xPayOnConnectWallet),[e.onConnectWallet]),ir=(0,Y.useMemo)(()=>{let K=Pt?{}:JSON.parse(localStorage.getItem("custom-tokens")||"{}"),ce={};return r.forEach(oe=>{ce[oe.chainId]={},oe.tokens.forEach(te=>{ce[oe.chainId][te.address]=te})}),qc(ce,K)},[r]),Me=(0,Y.useMemo)(()=>{let K={};return Object.entries(ir).forEach(([ce,oe])=>{K[ce]=Object.entries(oe).filter(([,te])=>te.supported).sort(([,te],[,be])=>be.priority-te.priority).map(([,te])=>({chainId:ce,...te}))}),K},[ir]),ue=(0,Y.useMemo)(()=>{if(!w||w.length===0)return null;let K={},ce=(oe,te,be,pe)=>{K[oe]||(K[oe]={}),K[oe][te]||(K[oe][te]={}),K[oe][te][be]=pe};for(let oe of w){let te=Object.entries(oe);if(te.length!==2)continue;let[be,pe]=te[0],[Ae,yt]=te[1];ce(be,pe,Ae,yt),ce(Ae,yt,be,pe)}return Object.keys(K).length>0?K:null},[w]),ln=(0,Y.useMemo)(()=>G&&M&&T&&T[M.chainId]&&T[M.chainId]?.[G.address]?(Number(b)*Number(T[M.chainId]?.[G.address])).toFixed(2):null,[T,G,b,M]),Ee=(0,Y.useMemo)(()=>Ss({amount:b,decimals:G?.decimals||18}),[G?.decimals,b]),ke=(0,Y.useMemo)(()=>mt({amount:Ce?.estAmountOut||"0",decimals:W?.decimals||18,precisionFractionalPlaces:Math.min(8,W?.decimals||18)}),[Ce]),un=(0,Y.useMemo)(()=>Ss({amount:ke,decimals:W?.decimals||18}),[W?.decimals,ke]),qe=(0,Y.useMemo)(()=>W&&F&&T&&T[F?.chainId]&&T[F?.chainId]?.[W.address]?(Number(ke)*Number(T[F?.chainId]?.[W.address])).toFixed(2):null,[T,W,ke,F]),We=(0,Y.useMemo)(()=>mt({amount:Ce?.minAmountOut||"0",decimals:W?.decimals||18,precisionFractionalPlaces:Math.min(4,W?.decimals||18)}),[Ce]),Fr=(0,Y.useMemo)(()=>S&&!!Ce&&X.from(Ce.xSwapFees?.expressDeliveryFee||"0").gt("0"),[S,Ce]),Ke=(0,Y.useMemo)(()=>r.length>0&&w.length>0,[r,w]),Xe=(0,Y.useMemo)(()=>{if(!G||!m||!a)return"";if(er(m).eq(0))return"0";let K=mt({amount:m,decimals:G.decimals,precisionFractionalPlaces:G.decimals});return new F1.default(K).lt("0.00001")?"<0.00001":mt({amount:m,decimals:G.decimals,precisionFractionalPlaces:5})},[G,m]),Qt=(0,Y.useCallback)(K=>{if(!K)return[];if(!se)return Me[K]||[];if(!Me[K]||!ue)return[];let ce=Object.keys(ue[K]||{});return Me[K].filter(oe=>ce.includes(oe.address))},[ue,se,Me]),Pe=(0,Y.useCallback)(async()=>{if(!M||!F||!G||!W||!Ee||er(Ee).eq(0)||se&&!ue){nr(void 0);return}let{source:K,target:ce}=Bs({source:{chain:M,token:G},target:{chain:F,token:W},type:se?"BRIDGE":"SWAP",supportedChains:r,bridgeTokensDictionary:ue||{}});if(!(K.chain?.chainId!==M?.chainId||ce.chain?.chainId!==F?.chainId||K.token?.address!==G?.address||ce.token?.address!==W?.address))try{E(""),De(!0),Se.current&&Se.current.abort(Vc),Se.current=new AbortController;let oe=await Jc({integratorId:e.integratorId,fromChain:M.chainId,toChain:F.chainId,fromAddress:a||Ot[M.chainId]?.FeeCollector||"",toAddress:a||Ot[F.chainId]?.FeeCollector||"",fromToken:G.address,toToken:W.address,fromAmount:Ee,slippage:Number(_),customContractCalls:e.customContractCalls,paymentToken:wr.AddressZero,expressDelivery:S,infiniteApproval:N},Se.current.signal);nr(oe),Se.current=null}catch(oe){oe!==Vc&&(Se.current=null,console.error(oe),E("Could not find route!"),nr(void 0))}finally{Se.current||De(!1)}},[a,se,F,W,Jc,Fr,_,M,G,Ee]),Ne=(0,Y.useCallback)(async()=>{if(!a||!M?.publicRpcUrls[0]||!G||!G?.address)return;let K=crypto.randomUUID();Oe.current=K,Br(!0);let ce=await zc(a,G.address,M?.publicRpcUrls[0]);K===Oe.current&&(c(Ss({amount:ce,decimals:G.decimals})),Br(!1))},[a,M,G]),pn=(0,Y.useCallback)((K,ce)=>ir[ce]?.[K],[ir]),Je=(0,Y.useCallback)(()=>{e.onConnectWallet?e.onConnectWallet():window.xPayOnConnectWallet&&window.xPayOnConnectWallet()},[e]);return(0,Y.useEffect)(()=>{if(r.length>0){let K=r.map(ce=>ce.chainId);C1({chainId:K}).then(ce=>{s(ce)})}},[r]),(0,Y.useEffect)(()=>{(async()=>{let K=await T1();C(K)})()},[]),(0,Y.useEffect)(()=>{Pe()},[Pe]),(0,Y.useEffect)(()=>{Ne()},[Ne]),(0,Y.useEffect)(()=>{a&&r.length>0&&(Le(!0),A1({walletAddress:a}).then(K=>{g(K),Le(!1)}))},[a,r.length]),(0,Y.useEffect)(()=>{Q(M?.tokens.find(({address:K})=>K.toLowerCase()===wr.AddressZero.toLowerCase()))},[M]),(0,Y.useEffect)(()=>{(async()=>{let K=F?.chainId===M?.chainId,ce=Qt(M?.chainId).filter(({symbol:de})=>K?de!==W?.symbol:!0);R(ce);let oe=Qt(F?.chainId).filter(({symbol:de})=>K?de!==G?.symbol:!0);k(oe);let te=[],be=r.filter(({chainId:de,web3Environment:xe,swapSupported:pt,bridgeSupported:Re})=>de!==M?.chainId&&xe==="mainnet"&&(se&&Re||!se&&pt));for(let{chainId:de}of be)te.push(...Qt(de).filter(({symbol:xe})=>de===F?.chainId?xe!==W?.symbol:!0));O(te);let pe=[],Ae=r.filter(({chainId:de,web3Environment:xe,swapSupported:pt,bridgeSupported:Re})=>de!==F?.chainId&&xe==="mainnet"&&(se&&Re&&M?.supportedDstForBridge?.includes(de)||!se&&pt&&M?.supportedDstForSwap?.includes(de)));for(let{chainId:de}of Ae)pe.push(...Qt(de).filter(({symbol:xe})=>de===M?.chainId?xe!==G?.symbol:!0));$(pe);let yt=de=>de.map(xe=>({...xe,balance:X.from(l[xe.chainId]?.[xe.address]||0)}));R(yt(ce)),k(yt(oe)),O(yt(te)),$(yt(pe))})()},[se,M,F,Qt,r,G?.symbol,W?.symbol,l]),(0,Y.useEffect)(()=>{let K=r.filter(({web3Environment:te,swapSupported:be,bridgeSupported:pe})=>te==="mainnet"&&(se&&pe||!se&&be)),ce=[];if(se&&F&&W&&ue){let te=K.filter(({chainId:be})=>{let pe=ue[be]||{};return Object.values(pe).some(Ae=>Ae[F.chainId])});ce=K.filter(be=>!te.some(pe=>pe.chainId===be.chainId)).map(be=>be.chainId)}let oe=new Set;if(M&&K.filter(te=>se?!M.supportedDstForBridge?.includes(te.chainId):!M.supportedDstForSwap?.includes(te.chainId)).forEach(te=>oe.add(te.chainId)),se&&M&&ue&&!G){let te=ue[M.chainId];te?K.filter(be=>!Object.values(te).some(pe=>pe[be.chainId])).forEach(be=>oe.add(be.chainId)):K.forEach(be=>oe.add(be.chainId))}if(se&&M&&ue&&G){let te=ue[M.chainId]?.[G.address];K.filter(be=>!te?.[be.chainId]).forEach(be=>oe.add(be.chainId))}Z(Kc(K,ce)),ee(Kc(K,[...oe]))},[r,se,M,G,F,W,ue]),(0,Y.useEffect)(()=>{if(!o||!f||e?.srcChainId)return;let K=r.find(({chainId:ce})=>ce===`${o}`);K&&V(K)},[o,f,r,e?.srcChainId]),(0,Y.useEffect)(()=>{f&&(ae(void 0),ne(void 0),V(void 0),B(void 0))},[se]),(0,Y.useEffect)(()=>{if(f||!r||r.length===0||!ue)return;let K=M||e?.srcChainId||(o?`${o}`:void 0)||(se?void 0:ua),ce=r.find(({chainId:pt})=>pt===K),oe=F||e?.dstChainId||(se?void 0:As),te=r.find(({chainId:pt})=>pt===oe),be,pe,Ae=Wc(e.srcTokenAddr,e?.srcChainId,r),yt=Wc(e.dstTokenAddr,e?.dstChainId,r);ce&&(pe=ce.tokens.find(({address:pt})=>pt.toLowerCase()===Ae?.toLowerCase())),te&&(be=te.tokens.find(({address:pt})=>pt.toLowerCase()===yt));let{source:de,target:xe}=Bs({source:{chain:ce,token:pe},target:{chain:te,token:be},type:se?"BRIDGE":"SWAP",supportedChains:r,bridgeTokensDictionary:ue});V(de.chain),B(xe.chain),ae(de.token),ne(xe.token),d(!0)},[e?.srcChainId,e?.srcTokenAddr,e?.dstChainId,e?.dstTokenAddr,r,se,o,f,ue]),(0,Y.useEffect)(()=>{if(!ue||r.length===0||!f)return;let{source:K,target:ce}=Bs({source:{chain:M,token:G},target:{chain:F,token:W},type:se?"BRIDGE":"SWAP",supportedChains:r,bridgeTokensDictionary:ue});K.chain?.chainId!==M?.chainId&&V(K.chain),ce.chain?.chainId!==F?.chainId&&B(ce.chain),(K.token?.address!==G?.address||K.token?.name!==G?.name)&&ae(K.token),(ce.token?.address!==W?.address||ce.token?.name!==W?.name)&&ne(ce.token)},[M,G,F,W,se,r,ue,f]),(0,Y.useEffect)(()=>{f&&(e.onDstChainChange?e.onDstChainChange(F?.chainId):window.xPayOnDstChainChange&&window.xPayOnDstChainChange(F?.chainId))},[e.onDstChainChange,F]),(0,Y.useEffect)(()=>{if(!f)return;let K=W?{address:W.address.toLowerCase(),symbol:W.tokenId}:void 0;e.onDstTokenChange?e.onDstTokenChange(K):window.xPayOnDstTokenChange&&window.xPayOnDstTokenChange(K)},[e.onDstTokenChange,W]),(0,Y.useEffect)(()=>{f&&(e.onSrcChainChange?e.onSrcChainChange(M?.chainId):window.xPayOnSrcChainChange&&window.xPayOnSrcChainChange(M?.chainId))},[e.onSrcChainChange,M]),(0,Y.useEffect)(()=>{if(!f)return;let K=G?{address:G.address.toLowerCase(),symbol:G.tokenId}:void 0;e.onSrcTokenChange?e.onSrcTokenChange(K):window.xPayOnSrcTokenChange&&window.xPayOnSrcTokenChange(K)},[e.onSrcTokenChange,G]),(0,U1.jsx)(D1.Provider,{value:{bridgeUI:se,integrationConfig:e,wagmiConfig:n,supportedChains:r,tab:p,setTab:h,overlay:i,error:v,setError:E,feeToken:J,srcChain:M,setSrcChain:V,srcChainTokensOptions:x,srcChainOtherTokensOptions:P,srcChainOptions:j,dstChainOptions:Ye,tokenPrices:T,dstChain:F,setDstChain:B,dstChainTokensOptions:u,dstChainOtherTokensOptions:z,srcToken:G,setSrcToken:ae,dstToken:W,setDstToken:ne,srcValue:b,setSrcValue:y,srcValueWei:Ee,srcValueUsd:ln,dstValue:ke,dstValueWei:un,dstValueUsd:qe,dstValueMin:We,expressDelivery:S,setExpressDelivery:A,infiniteApproval:N,setInfiniteApproval:L,slippage:_,setSlippage:I,route:Ce,setRoute:nr,isAsyncDataLoaded:Ke,srcTokenBalanceWei:m,setSrcTokenBalanceWei:c,srcTokenBalanceInfo:Xe,isFetchingRoute:cn,isFetchingBalance:le,isFetchingBalances:He,isExpressDeliveryActive:Fr,quoteRoute:Pe,refreshBalance:Ne,findTokenDataByAddressAndChain:pn,srcTokenLocked:fn,srcChainLocked:dn,dstTokenLocked:Ve,dstChainLocked:Ge,bridgeTokensDictionary:ue,onConnectWallet:Je,hasOnConnectWalletCallback:ze},children:t})},re=()=>(0,Y.useContext)(D1);var O5=require("react/jsx-runtime"),jn={rank:0,setRank:()=>{throw new Error("GlobalDataState > setRank is not implemented")},xPower:"0",updateXPower:()=>{throw new Error("GlobalDataState > updateXPower is not implemented")},xSwapBalance:"0",updateXSwapBalance:()=>{throw new Error("GlobalDataState > updateXSwapBalance is not implemented")},unfinishedQuestsCount:0,setUnfinishedQuestsCount:()=>{throw new Error("GlobalDataState > setUnfinishedQuestsCount is not implemented")}},Kv=(0,ma.createContext)({rank:jn.rank,setRank:jn.setRank,xPower:jn.xPower,updateXPower:jn.updateXPower,xSwapBalance:jn.xSwapBalance,updateXSwapBalance:jn.updateXSwapBalance,unfinishedQuestsCount:jn.unfinishedQuestsCount,setUnfinishedQuestsCount:jn.setUnfinishedQuestsCount});var tf=require("react/jsx-runtime"),ki=()=>(0,tf.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,tf.jsx)("path",{d:"M5 6.81252L0 1.81252L0.895833 0.916687L5 5.04169L9.10417 0.93752L10 1.83335L5 6.81252Z"})});var rf=require("react/jsx-runtime"),Fs=()=>(0,rf.jsx)("svg",{width:"15",height:"17",viewBox:"0 0 15 17",xmlns:"http://www.w3.org/2000/svg",children:(0,rf.jsx)("path",{d:"M9 0.459351L9 10.8957L12.8625 7.15026L15 9.18662L7.5 16.4593L-2.79009e-07 9.18662L2.1375 7.15026L6 10.8957L6 0.459351L9 0.459351Z"})});var nf=require("react/jsx-runtime"),H1=()=>(0,nf.jsx)("svg",{width:"10",height:"16",viewBox:"0 0 10 16",xmlns:"http://www.w3.org/2000/svg",children:(0,nf.jsx)("path",{d:"M0.5 8L8.13251 15.5L9.5 14.1562L3.20318 8L9.4682 1.84375L8.10071 0.5L0.5 8Z"})});var U5=require("react/jsx-runtime");var af=require("react/jsx-runtime"),V1=()=>(0,af.jsx)("svg",{width:"14",height:"18",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,af.jsx)("path",{d:"M3.66665 9.83335V3.85419L1.52081 6.00002L0.333313 4.83335L4.49998 0.666687L8.66665 4.83335L7.47915 6.00002L5.33331 3.85419V9.83335H3.66665ZM9.49998 17.3334L5.33331 13.1667L6.52081 12L8.66665 14.1459V8.16669H10.3333V14.1459L12.4791 12L13.6666 13.1667L9.49998 17.3334Z",fill:"white"})});var H5=require("react/jsx-runtime");var V5=require("react/jsx-runtime");var G1=require("react/jsx-runtime");var tr=require("react/jsx-runtime"),z1=()=>(0,tr.jsxs)("svg",{width:"97",height:"31",viewBox:"0 0 97 31",xmlns:"http://www.w3.org/2000/svg",children:[(0,tr.jsx)("path",{d:"M33.5297 15.3088C33.5018 14.6173 33.6103 13.9272 33.8488 13.2781C34.0874 12.629 34.4512 12.0339 34.9195 11.5271C35.3877 11.0203 35.951 10.6119 36.5769 10.3253C37.2028 10.0387 37.8789 9.87969 38.5661 9.85742H38.7797C41.4359 9.85742 43.0036 11.4299 43.4671 13.2698L41.8161 13.8254C41.6678 13.1398 41.2795 12.5307 40.7221 12.1092C40.1647 11.6878 39.4753 11.482 38.7797 11.5295C37.0609 11.5295 35.337 12.7928 35.337 15.3402C35.337 17.8877 37.0193 19.1038 38.8005 19.1038C39.4996 19.123 40.1848 18.9057 40.7466 18.4866C41.3085 18.0675 41.7144 17.4709 41.8994 16.7922L43.5192 17.3164C43.2396 18.3517 42.6177 19.2602 41.7561 19.892C40.8945 20.5238 39.8446 20.8411 38.7797 20.7916C37.4116 20.8169 36.0895 20.2944 35.1041 19.339C34.1187 18.3836 33.5505 17.0735 33.5245 15.6967C33.5193 15.5709 33.5245 15.4398 33.5297 15.3088Z"}),(0,tr.jsx)("path",{d:"M46.7328 20.5504H45.0245V9.82593H46.7328V14.0193C46.9808 13.7233 47.2927 13.4881 47.6447 13.3319C47.9968 13.1756 48.3796 13.1024 48.764 13.1177C50.5297 13.1177 51.3682 14.3914 51.3682 15.9797V20.5504H49.7224V16.2837C49.7717 15.92 49.677 15.5513 49.4588 15.2572C49.2406 14.963 48.9162 14.7669 48.5557 14.7112C48.4535 14.7006 48.3506 14.7006 48.2484 14.7112C47.8534 14.7112 47.4745 14.8691 47.1951 15.1503C46.9158 15.4314 46.7588 15.8127 46.7588 16.2103C46.7562 16.254 46.7562 16.2977 46.7588 16.3414L46.7328 20.5504Z"}),(0,tr.jsx)("path",{d:"M55.201 16.42L57.0344 16.1317C57.451 16.0792 57.5552 15.8643 57.5552 15.6075C57.5552 14.9995 57.1489 14.512 56.201 14.512C55.843 14.4828 55.4881 14.5969 55.2131 14.8295C54.9382 15.0621 54.7654 15.3943 54.7323 15.7543V15.8329L53.1698 15.4817C53.3 14.2342 54.425 13.1229 56.1854 13.1229C58.3937 13.1229 59.2323 14.3809 59.2323 15.8486V19.4287C59.2305 19.8166 59.2601 20.204 59.3208 20.5871H57.7583C57.702 20.283 57.6793 19.9737 57.6906 19.6646C57.4534 20.0319 57.1247 20.3302 56.7372 20.5298C56.3498 20.7294 55.9171 20.8233 55.4823 20.802C54.8885 20.8514 54.2994 20.6616 53.8444 20.2745C53.3894 19.8873 53.1056 19.3343 53.0552 18.7368C53.0552 18.7001 53.0552 18.6634 53.0552 18.632C53.0292 17.3058 53.9719 16.5929 55.201 16.42ZM57.5656 17.5784V17.2481L55.6958 17.5312C55.442 17.5393 55.2011 17.6458 55.0235 17.8285C54.8459 18.0111 54.7453 18.2558 54.7427 18.5114C54.7447 18.638 54.7718 18.763 54.8223 18.879C54.8728 18.995 54.9457 19.0998 55.0369 19.1871C55.128 19.2744 55.2355 19.3426 55.3531 19.3877C55.4707 19.4328 55.5961 19.4538 55.7219 19.4497H55.8C56.0132 19.4721 56.2287 19.4519 56.4341 19.3902C56.6395 19.3284 56.8307 19.2264 56.9967 19.09C57.1628 18.9536 57.3004 18.7855 57.4016 18.5953C57.5028 18.4051 57.5656 18.1967 57.5864 17.982C57.5939 17.8469 57.5851 17.7114 57.5604 17.5784H57.5656Z"}),(0,tr.jsx)("path",{d:"M62.1391 9.67906C62.2859 9.67699 62.4316 9.70412 62.568 9.7589C62.7043 9.81369 62.8286 9.89505 62.9336 9.99831C63.0386 10.1016 63.1223 10.2247 63.1799 10.3606C63.2375 10.4965 63.2679 10.6425 63.2693 10.7903C63.2692 11.0115 63.2042 11.2277 63.0824 11.4118C62.9606 11.5959 62.7875 11.7397 62.5847 11.8251C62.382 11.9104 62.1587 11.9335 61.9429 11.8915C61.7271 11.8495 61.5285 11.7442 61.3721 11.5889C61.2156 11.4336 61.1082 11.2352 61.0635 11.0186C61.0187 10.8021 61.0386 10.577 61.1205 10.3718C61.2025 10.1666 61.3429 9.99035 61.5241 9.86522C61.7054 9.74009 61.9193 9.67168 62.1391 9.66858V9.67906ZM61.3057 20.5818V13.3378H63.014V20.5503L61.3057 20.5818Z"}),(0,tr.jsx)("path",{d:"M66.905 20.5505H65.2018V13.3379H66.8633V14.2971C67.0799 13.9288 67.391 13.6259 67.764 13.4202C68.1369 13.2145 68.558 13.1137 68.9831 13.1282C70.7331 13.1282 71.5872 14.4019 71.5872 15.9902V20.5505H69.8841V16.2837C69.8841 15.3979 69.4831 14.6797 68.4102 14.6797C68.2118 14.6811 68.0157 14.7218 67.8329 14.7995C67.6502 14.8771 67.4845 14.9902 67.3452 15.1324C67.2059 15.2745 67.0958 15.4429 67.0211 15.6278C66.9465 15.8128 66.9088 16.0107 66.9102 16.2103C66.9102 16.268 66.9102 16.3256 66.9102 16.3833L66.905 20.5505Z"}),(0,tr.jsx)("path",{d:"M73.6491 20.5504V9.82593H75.3574V20.5504H73.6491Z"}),(0,tr.jsx)("path",{d:"M78.4048 9.67909C78.6246 9.67805 78.8398 9.74278 79.0231 9.86506C79.2063 9.98735 79.3493 10.1617 79.4339 10.3659C79.5185 10.5701 79.5409 10.795 79.4983 11.0121C79.4556 11.2292 79.3499 11.4286 79.1944 11.585C79.039 11.7415 78.8408 11.8479 78.6251 11.8908C78.4094 11.9338 78.186 11.9112 77.983 11.8261C77.7801 11.7409 77.6069 11.597 77.4854 11.4126C77.3639 11.2282 77.2996 11.0116 77.3006 10.7903C77.3033 10.4965 77.4205 10.2154 77.627 10.0076C77.8335 9.79978 78.1128 9.68182 78.4048 9.67909ZM77.5662 20.5818V13.3378H79.2589V20.5504L77.5662 20.5818Z"}),(0,tr.jsx)("path",{d:"M83.1752 20.5506H81.4669V13.338H83.1284V14.2972C83.3454 13.9293 83.6566 13.6267 84.0295 13.4211C84.4023 13.2155 84.8232 13.1144 85.2482 13.1283C86.9981 13.1283 87.8523 14.4021 87.8523 15.9903V20.5506H86.144V16.2839C86.1933 15.9201 86.0986 15.5515 85.8804 15.2573C85.6622 14.9632 85.3378 14.7671 84.9773 14.7113C84.8734 14.7008 84.7687 14.7008 84.6648 14.7113C84.267 14.7155 83.8868 14.8775 83.6069 15.1621C83.327 15.4467 83.17 15.831 83.17 16.2314C83.1647 16.2925 83.1647 16.3539 83.17 16.4149L83.1752 20.5506Z"}),(0,tr.jsx)("path",{d:"M93.6805 16.383L96.6857 20.5764H94.6024L92.5191 17.6044L91.6389 18.5374V20.5502H89.9462V9.82568H91.6389V16.252L94.3888 13.3376H96.6545L93.6805 16.383Z"}),(0,tr.jsx)("path",{d:"M13.3059 6.922L20.6913 11.1887V19.7642L13.3268 24.0571L5.9466 19.8009V11.2307L13.3059 6.922ZM13.3059 0.631958L10.5976 2.20447L3.22266 6.51314L0.514343 8.08565V22.9564L3.22266 24.5289L10.608 28.7956L13.3163 30.3681L16.0247 28.7956L23.384 24.4974L26.0923 22.9249V8.03324L23.384 6.46073L16.0038 2.20447L13.2955 0.631958H13.3059Z"})]});var of=require("react/jsx-runtime"),Ls=()=>(0,of.jsx)("svg",{width:"17",height:"14",viewBox:"0 0 17 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,of.jsx)("path",{d:"M5.7 13.0125L0 7.31255L1.425 5.88755L5.7 10.1625L14.875 0.987549L16.3 2.41255L5.7 13.0125Z",fill:"#2E7D32"})});var G5=require("react/jsx-runtime");var z5=require("react/jsx-runtime");var q1=require("react/jsx-runtime");var sf=require("react/jsx-runtime"),lt=({className:t})=>(0,sf.jsx)("svg",{height:"18",width:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10.312 8.319",className:t||"",children:(0,sf.jsx)("path",{d:"M6.073 4.078 10.151 0H9.093A1.87 1.87 0 0 0 7.77.548L5.157 3.162 2.543.548A1.87 1.87 0 0 0 1.22 0H.161L4.24 4.078 0 8.318h1.058a1.87 1.87 0 0 0 1.322-.547l2.777-2.777 2.776 2.777a1.869 1.869 0 0 0 1.322.548h1.058Z"})});var q5=require("react/jsx-runtime");var cf=require("react/jsx-runtime"),W1=({className:t})=>(0,cf.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24",className:t||"",children:(0,cf.jsx)("path",{d:"M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"})});var ff=require("react/jsx-runtime"),K1=()=>(0,ff.jsx)("svg",{width:"6",height:"7",viewBox:"0 0 6 7",xmlns:"http://www.w3.org/2000/svg",children:(0,ff.jsx)("circle",{cx:"3",cy:"3.91418",r:"3",fill:"#4CAF50"})});var W5=require("react/jsx-runtime");var X1=require("react/jsx-runtime");var Mn=require("react/jsx-runtime"),J1=()=>(0,Mn.jsxs)("svg",{width:"81",height:"80",viewBox:"0 0 81 80",xmlns:"http://www.w3.org/2000/svg",children:[(0,Mn.jsx)("g",{id:"error_FILL0_wght400_GRAD0_opsz24 1",children:(0,Mn.jsx)("path",{id:"Vector",d:"M40.5001 56.6667C41.4445 56.6667 42.2362 56.3473 42.8751 55.7084C43.514 55.0695 43.8334 54.2779 43.8334 53.3334C43.8334 52.389 43.514 51.5973 42.8751 50.9584C42.2362 50.3195 41.4445 50.0001 40.5001 50.0001C39.5556 50.0001 38.764 50.3195 38.1251 50.9584C37.4862 51.5973 37.1667 52.389 37.1667 53.3334C37.1667 54.2779 37.4862 55.0695 38.1251 55.7084C38.764 56.3473 39.5556 56.6667 40.5001 56.6667ZM37.1667 43.3334H43.8334V23.3334H37.1667V43.3334ZM40.5001 73.3334C35.889 73.3334 31.5556 72.4584 27.5001 70.7084C23.4445 68.9584 19.9167 66.5834 16.9167 63.5834C13.9167 60.5834 11.5417 57.0556 9.79175 53.0001C8.04175 48.9445 7.16675 44.6112 7.16675 40.0001C7.16675 35.389 8.04175 31.0556 9.79175 27.0001C11.5417 22.9445 13.9167 19.4167 16.9167 16.4167C19.9167 13.4167 23.4445 11.0417 27.5001 9.29175C31.5556 7.54175 35.889 6.66675 40.5001 6.66675C45.1112 6.66675 49.4445 7.54175 53.5001 9.29175C57.5556 11.0417 61.0834 13.4167 64.0834 16.4167C67.0834 19.4167 69.4584 22.9445 71.2084 27.0001C72.9584 31.0556 73.8334 35.389 73.8334 40.0001C73.8334 44.6112 72.9584 48.9445 71.2084 53.0001C69.4584 57.0556 67.0834 60.5834 64.0834 63.5834C61.0834 66.5834 57.5556 68.9584 53.5001 70.7084C49.4445 72.4584 45.1112 73.3334 40.5001 73.3334ZM40.5001 66.6667C47.9445 66.6667 54.2501 64.0834 59.4167 58.9167C64.5834 53.7501 67.1667 47.4445 67.1667 40.0001C67.1667 32.5556 64.5834 26.2501 59.4167 21.0834C54.2501 15.9167 47.9445 13.3334 40.5001 13.3334C33.0556 13.3334 26.7501 15.9167 21.5834 21.0834C16.4167 26.2501 13.8334 32.5556 13.8334 40.0001C13.8334 47.4445 16.4167 53.7501 21.5834 58.9167C26.7501 64.0834 33.0556 66.6667 40.5001 66.6667Z",fill:"url(#paint0_linear_230_166)"})}),(0,Mn.jsx)("defs",{children:(0,Mn.jsxs)("linearGradient",{id:"paint0_linear_230_166",x1:"7.16675",y1:"6.66675",x2:"77.4571",y2:"10.7358",gradientUnits:"userSpaceOnUse",children:[(0,Mn.jsx)("stop",{stopColor:"#F44336"}),(0,Mn.jsx)("stop",{offset:"1",stopColor:"#C62828"})]})})]});var Q1=require("react"),df=require("react/jsx-runtime"),_i=(0,Q1.forwardRef)(({className:t},e)=>(0,df.jsx)("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",className:t||"",children:(0,df.jsx)("path",{d:"M478-240q21 0 35.5-14.5T528-290q0-21-14.5-35.5T478-340q-21 0-35.5 14.5T428-290q0 21 14.5 35.5T478-240Zm-36-154h74q0-33 7.5-52t42.5-52q26-26 41-49.5t15-56.5q0-56-41-86t-97-30q-57 0-92.5 30T342-618l66 26q5-18 22.5-39t53.5-21q32 0 48 17.5t16 38.5q0 20-12 37.5T506-526q-44 39-54 59t-10 73Zm38 314q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})}));_i.displayName="HelpIcon";var Ds=require("react/jsx-runtime"),Z1=()=>(0,Ds.jsx)("div",{className:"relative bg-gradient-to-r from-t_main_accent_light to-t_main_accent_dark rounded-full",children:(0,Ds.jsx)("svg",{width:"29",height:"28",viewBox:"0 0 29 28",xmlns:"http://www.w3.org/2000/svg",children:(0,Ds.jsx)("path",{d:"M14.3979 21.5C12.5771 21.5 10.9905 20.8646 9.63805 19.5938C8.28562 18.3229 7.51045 16.7361 7.31253 14.8333H8.93545C9.12017 16.2778 9.73041 17.4722 10.7662 18.4167C11.8019 19.3611 13.0125 19.8333 14.3979 19.8333C15.9417 19.8333 17.2512 19.2674 18.3266 18.1354C19.4019 17.0035 19.9396 15.625 19.9396 14C19.9396 12.375 19.4019 10.9965 18.3266 9.86458C17.2512 8.73264 15.9417 8.16667 14.3979 8.16667C13.4875 8.16667 12.6365 8.38889 11.8448 8.83333C11.0532 9.27778 10.3868 9.88889 9.84587 10.6667H12.0229V12.3333H7.27295V7.33333H8.85628V9.29167C9.5292 8.40278 10.3506 7.71528 11.3203 7.22917C12.2901 6.74306 13.316 6.5 14.3979 6.5C15.3875 6.5 16.3144 6.69792 17.1787 7.09375C18.0429 7.48958 18.795 8.02431 19.4349 8.69792C20.0749 9.37153 20.5828 10.1632 20.9589 11.0729C21.3349 11.9826 21.5229 12.9583 21.5229 14C21.5229 15.0417 21.3349 16.0174 20.9589 16.9271C20.5828 17.8368 20.0749 18.6285 19.4349 19.3021C18.795 19.9757 18.0429 20.5104 17.1787 20.9062C16.3144 21.3021 15.3875 21.5 14.3979 21.5ZM16.6146 17.5L13.6063 14.3333V9.83333H15.1896V13.6667L17.7229 16.3333L16.6146 17.5Z"})})});var K5=require("react/jsx-runtime");var X5=require("react/jsx-runtime");var J5=require("react/jsx-runtime");var lf=require("react/jsx-runtime"),Y1=()=>(0,lf.jsx)("svg",{width:"19",height:"19",viewBox:"0 0 19 19",xmlns:"http://www.w3.org/2000/svg",children:(0,lf.jsx)("path",{d:"M2.5 18.5C1.95 18.5 1.47917 18.3042 1.0875 17.9125C0.695833 17.5208 0.5 17.05 0.5 16.5V2.5C0.5 1.95 0.695833 1.47917 1.0875 1.0875C1.47917 0.695833 1.95 0.5 2.5 0.5H9.5V2.5H2.5V16.5H16.5V9.5H18.5V16.5C18.5 17.05 18.3042 17.5208 17.9125 17.9125C17.5208 18.3042 17.05 18.5 16.5 18.5H2.5ZM7.2 13.2L5.8 11.8L15.1 2.5H11.5V0.5H18.5V7.5H16.5V3.9L7.2 13.2Z"})});var j1=require("react/jsx-runtime");var $1=require("react/jsx-runtime");var uf=require("react/jsx-runtime"),Os=()=>(0,uf.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",viewBox:"0 -960 960 960",children:(0,uf.jsx)("path",{d:"M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"})});var Us=require("react/jsx-runtime"),ep=()=>(0,Us.jsx)("div",{className:"relative bg-gradient-to-r from-t_main_accent_light to-t_main_accent_dark rounded-full",children:(0,Us.jsx)("svg",{width:"29",height:"28",viewBox:"0 0 29 28",xmlns:"http://www.w3.org/2000/svg",children:(0,Us.jsx)("path",{d:"M12.0373 22.5L11.6791 19.78C11.4851 19.7092 11.3022 19.6242 11.1306 19.525C10.959 19.4258 10.791 19.3196 10.6269 19.2063L7.96269 20.2688L5.5 16.2312L7.80597 14.5738C7.79104 14.4746 7.78358 14.379 7.78358 14.2869V13.7131C7.78358 13.621 7.79104 13.5254 7.80597 13.4262L5.5 11.7688L7.96269 7.73125L10.6269 8.79375C10.791 8.68042 10.9627 8.57417 11.1418 8.475C11.3209 8.37583 11.5 8.29083 11.6791 8.22L12.0373 5.5H16.9627L17.3209 8.22C17.5149 8.29083 17.6978 8.37583 17.8694 8.475C18.041 8.57417 18.209 8.68042 18.3731 8.79375L21.0373 7.73125L23.5 11.7688L21.194 13.4262C21.209 13.5254 21.2164 13.621 21.2164 13.7131V14.2869C21.2164 14.379 21.2015 14.4746 21.1716 14.5738L23.4776 16.2312L21.0149 20.2688L18.3731 19.2063C18.209 19.3196 18.0373 19.4258 17.8582 19.525C17.6791 19.6242 17.5 19.7092 17.3209 19.78L16.9627 22.5H12.0373ZM14.5448 16.975C15.4104 16.975 16.1493 16.6846 16.7612 16.1038C17.3731 15.5229 17.6791 14.8217 17.6791 14C17.6791 13.1783 17.3731 12.4771 16.7612 11.8963C16.1493 11.3154 15.4104 11.025 14.5448 11.025C13.6642 11.025 12.9216 11.3154 12.3172 11.8963C11.7127 12.4771 11.4104 13.1783 11.4104 14C11.4104 14.8217 11.7127 15.5229 12.3172 16.1038C12.9216 16.6846 13.6642 16.975 14.5448 16.975ZM14.5448 15.275C14.1716 15.275 13.8545 15.151 13.5933 14.9031C13.3321 14.6552 13.2015 14.3542 13.2015 14C13.2015 13.6458 13.3321 13.3448 13.5933 13.0969C13.8545 12.849 14.1716 12.725 14.5448 12.725C14.9179 12.725 15.2351 12.849 15.4963 13.0969C15.7575 13.3448 15.8881 13.6458 15.8881 14C15.8881 14.3542 15.7575 14.6552 15.4963 14.9031C15.2351 15.151 14.9179 15.275 14.5448 15.275ZM13.6045 20.8H15.3731L15.6866 18.5475C16.1493 18.4342 16.5784 18.2677 16.9739 18.0481C17.3694 17.8285 17.7313 17.5629 18.0597 17.2513L20.2761 18.1225L21.1493 16.6775L19.2239 15.2963C19.2985 15.0979 19.3507 14.889 19.3806 14.6694C19.4104 14.4498 19.4254 14.2267 19.4254 14C19.4254 13.7733 19.4104 13.5502 19.3806 13.3306C19.3507 13.111 19.2985 12.9021 19.2239 12.7038L21.1493 11.3225L20.2761 9.8775L18.0597 10.77C17.7313 10.4442 17.3694 10.1715 16.9739 9.95188C16.5784 9.73229 16.1493 9.56583 15.6866 9.4525L15.3955 7.2H13.6269L13.3134 9.4525C12.8507 9.56583 12.4216 9.73229 12.0261 9.95188C11.6306 10.1715 11.2687 10.4371 10.9403 10.7488L8.72388 9.8775L7.85075 11.3225L9.77612 12.6825C9.70149 12.895 9.64925 13.1075 9.6194 13.32C9.58955 13.5325 9.57463 13.7592 9.57463 14C9.57463 14.2267 9.58955 14.4462 9.6194 14.6588C9.64925 14.8713 9.70149 15.0837 9.77612 15.2963L7.85075 16.6775L8.72388 18.1225L10.9403 17.23C11.2687 17.5558 11.6306 17.8285 12.0261 18.0481C12.4216 18.2677 12.8507 18.4342 13.3134 18.5475L13.6045 20.8Z"})})});var Q5=require("react/jsx-runtime");var pf=require("react/jsx-runtime"),hf=()=>(0,pf.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,pf.jsx)("path",{d:"M4 21V16.75L17.175 3.6C17.375 3.4 17.6 3.25 17.85 3.15C18.1 3.05 18.35 3 18.6 3C18.8667 3 19.1208 3.05 19.3625 3.15C19.6042 3.25 19.8167 3.4 20 3.6L21.4 5C21.6 5.18333 21.75 5.39583 21.85 5.6375C21.95 5.87917 22 6.13333 22 6.4C22 6.65 21.95 6.9 21.85 7.15C21.75 7.4 21.6 7.625 21.4 7.825L8.25 21H4ZM6 19H7.4L17.225 9.2L16.525 8.475L15.8 7.775L6 17.6V19ZM16.525 8.475L15.8 7.775L17.225 9.2L16.525 8.475ZM14 21C15.2333 21 16.375 20.6917 17.425 20.075C18.475 19.4583 19 18.6 19 17.5C19 16.9 18.8417 16.3833 18.525 15.95C18.2083 15.5167 17.7833 15.1417 17.25 14.825L15.775 16.3C16.1583 16.4667 16.4583 16.65 16.675 16.85C16.8917 17.05 17 17.2667 17 17.5C17 17.8833 16.6958 18.2292 16.0875 18.5375C15.4792 18.8458 14.7833 19 14 19C13.7167 19 13.4792 19.0958 13.2875 19.2875C13.0958 19.4792 13 19.7167 13 20C13 20.2833 13.0958 20.5208 13.2875 20.7125C13.4792 20.9042 13.7167 21 14 21ZM4.575 13.35L6.075 11.85C5.74167 11.7167 5.47917 11.5792 5.2875 11.4375C5.09583 11.2958 5 11.15 5 11C5 10.8 5.15 10.6 5.45 10.4C5.75 10.2 6.38333 9.89167 7.35 9.475C8.81667 8.84167 9.79167 8.26667 10.275 7.75C10.7583 7.23333 11 6.65 11 6C11 5.08333 10.6333 4.35417 9.9 3.8125C9.16667 3.27083 8.2 3 7 3C6.25 3 5.57917 3.13333 4.9875 3.4C4.39583 3.66667 3.94167 3.99167 3.625 4.375C3.44167 4.59167 3.36667 4.83333 3.4 5.1C3.43333 5.36667 3.55833 5.58333 3.775 5.75C3.99167 5.93333 4.23333 6.00833 4.5 5.975C4.76667 5.94167 4.99167 5.83333 5.175 5.65C5.40833 5.41667 5.66667 5.25 5.95 5.15C6.23333 5.05 6.58333 5 7 5C7.68333 5 8.1875 5.1 8.5125 5.3C8.8375 5.5 9 5.73333 9 6C9 6.23333 8.85417 6.44583 8.5625 6.6375C8.27083 6.82917 7.6 7.16667 6.55 7.65C5.21667 8.23333 4.29167 8.7625 3.775 9.2375C3.25833 9.7125 3 10.3 3 11C3 11.5333 3.14167 11.9875 3.425 12.3625C3.70833 12.7375 4.09167 13.0667 4.575 13.35Z"})});var tp=require("react/jsx-runtime");var In=require("react/jsx-runtime"),rp=()=>(0,In.jsxs)("svg",{width:"81",height:"80",viewBox:"0 0 81 80",xmlns:"http://www.w3.org/2000/svg",children:[(0,In.jsx)("g",{id:"check_circle_FILL0_wght400_GRAD0_opsz24 (1) 1",children:(0,In.jsx)("path",{id:"Vector",d:"M35.8334 55.3332L59.3334 31.8332L54.6667 27.1665L35.8334 45.9998L26.3334 36.4998L21.6667 41.1665L35.8334 55.3332ZM40.5001 73.3332C35.889 73.3332 31.5556 72.4582 27.5001 70.7082C23.4445 68.9582 19.9167 66.5832 16.9167 63.5832C13.9167 60.5832 11.5417 57.0554 9.79175 52.9998C8.04175 48.9443 7.16675 44.6109 7.16675 39.9998C7.16675 35.3887 8.04175 31.0554 9.79175 26.9998C11.5417 22.9443 13.9167 19.4165 16.9167 16.4165C19.9167 13.4165 23.4445 11.0415 27.5001 9.2915C31.5556 7.5415 35.889 6.6665 40.5001 6.6665C45.1112 6.6665 49.4445 7.5415 53.5001 9.2915C57.5556 11.0415 61.0834 13.4165 64.0834 16.4165C67.0834 19.4165 69.4584 22.9443 71.2084 26.9998C72.9584 31.0554 73.8334 35.3887 73.8334 39.9998C73.8334 44.6109 72.9584 48.9443 71.2084 52.9998C69.4584 57.0554 67.0834 60.5832 64.0834 63.5832C61.0834 66.5832 57.5556 68.9582 53.5001 70.7082C49.4445 72.4582 45.1112 73.3332 40.5001 73.3332ZM40.5001 66.6665C47.9445 66.6665 54.2501 64.0832 59.4167 58.9165C64.5834 53.7498 67.1667 47.4443 67.1667 39.9998C67.1667 32.5554 64.5834 26.2498 59.4167 21.0832C54.2501 15.9165 47.9445 13.3332 40.5001 13.3332C33.0556 13.3332 26.7501 15.9165 21.5834 21.0832C16.4167 26.2498 13.8334 32.5554 13.8334 39.9998C13.8334 47.4443 16.4167 53.7498 21.5834 58.9165C26.7501 64.0832 33.0556 66.6665 40.5001 66.6665Z",fill:"url(#paint0_linear_230_393)"})}),(0,In.jsx)("defs",{children:(0,In.jsxs)("linearGradient",{id:"paint0_linear_230_393",x1:"7.16675",y1:"6.6665",x2:"77.4571",y2:"10.7355",gradientUnits:"userSpaceOnUse",children:[(0,In.jsx)("stop",{stopColor:"#4CAF50"}),(0,In.jsx)("stop",{offset:"1",stopColor:"#2E7D32"})]})})]});var xf=require("react/jsx-runtime"),mf=()=>(0,xf.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,xf.jsx)("path",{d:"M7 16H12.5C12.7833 16 13.0458 15.9292 13.2875 15.7875C13.5292 15.6458 13.7 15.45 13.8 15.2L15.9 10.3C15.9333 10.2167 15.9583 10.1333 15.975 10.05C15.9917 9.96667 16 9.88333 16 9.8V9C16 8.71667 15.9042 8.47917 15.7125 8.2875C15.5208 8.09583 15.2833 8 15 8H10.4L11 4.6C11.0333 4.43333 11.025 4.275 10.975 4.125C10.925 3.975 10.8417 3.84167 10.725 3.725L10 3L5.4 8C5.26667 8.13333 5.16667 8.28333 5.1 8.45C5.03333 8.61667 5 8.8 5 9V14C5 14.55 5.19583 15.0208 5.5875 15.4125C5.97917 15.8042 6.45 16 7 16ZM10 20C8.61667 20 7.31667 19.7375 6.1 19.2125C4.88333 18.6875 3.825 17.975 2.925 17.075C2.025 16.175 1.3125 15.1167 0.7875 13.9C0.2625 12.6833 0 11.3833 0 10C0 8.61667 0.2625 7.31667 0.7875 6.1C1.3125 4.88333 2.025 3.825 2.925 2.925C3.825 2.025 4.88333 1.3125 6.1 0.7875C7.31667 0.2625 8.61667 0 10 0C11.3833 0 12.6833 0.2625 13.9 0.7875C15.1167 1.3125 16.175 2.025 17.075 2.925C17.975 3.825 18.6875 4.88333 19.2125 6.1C19.7375 7.31667 20 8.61667 20 10C20 11.3833 19.7375 12.6833 19.2125 13.9C18.6875 15.1167 17.975 16.175 17.075 17.075C16.175 17.975 15.1167 18.6875 13.9 19.2125C12.6833 19.7375 11.3833 20 10 20ZM10 18C12.2333 18 14.125 17.225 15.675 15.675C17.225 14.125 18 12.2333 18 10C18 7.76667 17.225 5.875 15.675 4.325C14.125 2.775 12.2333 2 10 2C7.76667 2 5.875 2.775 4.325 4.325C2.775 5.875 2 7.76667 2 10C2 12.2333 2.775 14.125 4.325 15.675C5.875 17.225 7.76667 18 10 18Z"})});var bf=require("react/jsx-runtime"),np=()=>(0,bf.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",viewBox:"0 -960 960 960",width:"16",children:(0,bf.jsx)("path",{d:"M360-840v-80h240v80H360Zm80 440h80v-240h-80v240Zm40 320q-74 0-139.5-28.5T226-186q-49-49-77.5-114.5T120-440q0-74 28.5-139.5T226-694q49-49 114.5-77.5T480-800q62 0 119 20t107 58l56-56 56 56-56 56q38 50 58 107t20 119q0 74-28.5 139.5T734-186q-49 49-114.5 77.5T480-80Zm0-80q116 0 198-82t82-198q0-116-82-198t-198-82q-116 0-198 82t-82 198q0 116 82 198t198 82Zm0-280Z"})});var gf=require("react/jsx-runtime"),ip=()=>(0,gf.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:(0,gf.jsx)("path",{d:"M11.5 15C9.825 15 8.40625 14.4188 7.24375 13.2563C6.08125 12.0938 5.5 10.675 5.5 9C5.5 7.325 6.08125 5.90625 7.24375 4.74375C8.40625 3.58125 9.825 3 11.5 3C13.175 3 14.5938 3.58125 15.7563 4.74375C16.9188 5.90625 17.5 7.325 17.5 9C17.5 10.675 16.9188 12.0938 15.7563 13.2563C14.5938 14.4188 13.175 15 11.5 15ZM5.5 14.8125C4.175 14.4625 3.09375 13.75 2.25625 12.675C1.41875 11.6 1 10.375 1 9C1 7.625 1.41875 6.4 2.25625 5.325C3.09375 4.25 4.175 3.5375 5.5 3.1875V4.7625C4.6 5.075 3.875 5.61875 3.325 6.39375C2.775 7.16875 2.5 8.0375 2.5 9C2.5 9.9625 2.775 10.8313 3.325 11.6063C3.875 12.3813 4.6 12.925 5.5 13.2375V14.8125ZM11.5 13.5C12.75 13.5 13.8125 13.0625 14.6875 12.1875C15.5625 11.3125 16 10.25 16 9C16 7.75 15.5625 6.6875 14.6875 5.8125C13.8125 4.9375 12.75 4.5 11.5 4.5C10.25 4.5 9.1875 4.9375 8.3125 5.8125C7.4375 6.6875 7 7.75 7 9C7 10.25 7.4375 11.3125 8.3125 12.1875C9.1875 13.0625 10.25 13.5 11.5 13.5Z",fillOpacity:"0.6"})});var yf=require("react/jsx-runtime"),ap=()=>(0,yf.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:(0,yf.jsx)("path",{d:"M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C12.5083 12.1667 13.2333 11.2 13.65 10H15.75C15.2833 11.7667 14.3333 13.2083 12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z"})});var $n=require("react/jsx-runtime"),op=({className:t})=>(0,$n.jsxs)("svg",{fill:"none",height:"400",viewBox:"0 0 400 400",width:"400",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",className:t||"",children:[(0,$n.jsx)("clipPath",{id:"a",children:(0,$n.jsx)("path",{d:"m0 0h400v400h-400z"})}),(0,$n.jsxs)("g",{clipPath:"url(#a)",children:[(0,$n.jsx)("circle",{cx:"200",cy:"200",fill:"#3396ff",r:"199.5",stroke:"#66b1ff"}),(0,$n.jsx)("path",{d:"m122.519 148.965c42.791-41.729 112.171-41.729 154.962 0l5.15 5.022c2.14 2.086 2.14 5.469 0 7.555l-17.617 17.18c-1.07 1.043-2.804 1.043-3.874 0l-7.087-6.911c-29.853-29.111-78.253-29.111-108.106 0l-7.59 7.401c-1.07 1.043-2.804 1.043-3.874 0l-17.617-17.18c-2.14-2.086-2.14-5.469 0-7.555zm191.397 35.529 15.679 15.29c2.14 2.086 2.14 5.469 0 7.555l-70.7 68.944c-2.139 2.087-5.608 2.087-7.748 0l-50.178-48.931c-.535-.522-1.402-.522-1.937 0l-50.178 48.931c-2.139 2.087-5.608 2.087-7.748 0l-70.7015-68.945c-2.1396-2.086-2.1396-5.469 0-7.555l15.6795-15.29c2.1396-2.086 5.6085-2.086 7.7481 0l50.1789 48.932c.535.522 1.402.522 1.937 0l50.177-48.932c2.139-2.087 5.608-2.087 7.748 0l50.179 48.932c.535.522 1.402.522 1.937 0l50.179-48.931c2.139-2.087 5.608-2.087 7.748 0z",fill:"#fff"})]})]});var Z5=require("react/jsx-runtime");var sp=require("react/jsx-runtime");var cp=require("react/jsx-runtime");var wf=require("react/jsx-runtime"),fp=()=>(0,wf.jsx)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 50 50",enableBackground:"new 0 0 50 50",children:(0,wf.jsx)("image",{id:"image0",x:"0",y:"0",href:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABGdBTUEAALGPC/xhBQAAACBjSFJN
13
13
  AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAQ
14
14
  rElEQVRo3s2aeXSWxb3HPzPP867ZA9lI2CGEEJASRBEUZBcRtJW6XKqiAipXvVbbqrf1cNpra7W3
15
15
  rlcFehCxtSrGFShQlCCLVWQRSELIRhJIyL6+ybs8z8z94w0BqwIGvLe/c3JyzvPM+5vvZ37zm5ln
package/dist/index.mjs CHANGED
@@ -9,7 +9,7 @@ var kh=Object.create;var Ws=Object.defineProperty;var _h=Object.getOwnPropertyDe
9
9
  font-display: swap;
10
10
  font-style: normal;
11
11
  }`,t5=[e5],Qu=t5.join(`
12
- `);import{jsx as s5}from"react/jsx-runtime";var ln=null,ei=null,$o=null,es=null,yc=!1,Yu=()=>{vt||(o5(),n5(),Promise.all([i5(),a5()]).then(t=>{for(let e of t)r5(e);yc=!0}))},ju=async()=>{if(!yc){for(Zu(!0);!yc;)await new Promise(t=>setTimeout(t,10));Zu(!1)}},r5=async t=>{let e=document.createElement("style");e.appendChild(document.createTextNode(jo)),t.appendChild(e)},n5=()=>{let t="xpay-fonts";if(document.querySelector(`style[data-name="${t}"]`))return;let e=document.createElement("style");e.dataset.name=t,e.appendChild(document.createTextNode(Qu)),document.head.appendChild(e)},i5=async()=>{let t=document.createElement("div");return ei=t.attachShadow({mode:"open",delegatesFocus:!0}),t.setAttribute("id","xpay-root"),document.body.appendChild(t),ln=wc(ei),ei},a5=async()=>{let t=document.createElement("div"),e=t.attachShadow({mode:"open"});return t.setAttribute("id","xpay-tx-status"),document.body.appendChild(t),es=wc(e),e},o5=()=>{let t=document.createElement("div");t.setAttribute("id","xpay-init-indicator"),document.body.appendChild(t),$o=wc(t)},Zu=t=>{vt||!$o||(t?$o.render(s5(yf,{})):$o.render(null))};var $u="https://xswap.link/api",ts=t=>{$u=t};async function ti(t,e){let r=await fetch(`${$u}${t}`,{method:"GET",headers:{"Content-Type":"application/json","Cache-Control":"no-cache",...e?.headers},...e});if(!r.ok)throw new Error(`API request failed with status ${r.status}: ${r.statusText}`);return r.json()}async function vc(t,e){return ti("/route",{method:"POST",body:JSON.stringify(t),signal:e})}async function ri(t){return ti(`/chains?data=${JSON.stringify({ecosystem:t})}`)}async function rs(t){return await ti(`/history?${new URLSearchParams({data:JSON.stringify(t)})}`)}async function e1(t){return await ti(`/tokenPrices?${new URLSearchParams({data:JSON.stringify(t)})}`)}async function t1(t){return ti(`/tokenBalances?${new URLSearchParams({data:JSON.stringify(t)})}`)}async function Cc(t){return await ti(`/getTxStatus?${new URLSearchParams({data:JSON.stringify(t)})}`)}async function r1(){return ti("/bridgeTokens")}import{jsxs as TC}from"react/jsx-runtime";import{forwardRef as c5}from"react";import{jsx as f5}from"react/jsx-runtime";var hr=c5(({variant:t,disabled:e,children:r,type:n,value:i,fullWidth:a,onClick:o,className:f="",size:d="medium",secondary:p=!1},h)=>f5("button",{ref:h,type:n||void 0,value:i||void 0,className:`btn ${!t&&e?"btn-disabled":""} ${f} btn-${d} btn-${t}${e?"-disabled":p?"-secondary":""} ${a?"btn--full-width":""}`,disabled:e,onClick:o,children:r}));hr.displayName="Button";import{jsx as ns,jsxs as d5}from"react/jsx-runtime";var n1=({text:t,type:e,className:r,isSnackbar:n,Action:i,Animation:a})=>d5("div",{className:`my-5 mx-0 bg-t_bg_tertiary bg-opacity-10 rounded-2xl max-w-[500px] min-h-[43px] flex items-center text-xs font-medium text-t_text_primary border border-solid ${e==="error"?"border-t_error_dark":e==="warning"?"border-t_warning_dark":e==="info"?"border-t_main_accent_dark":e==="success"?"border-t_success_dark":""} ${n&&"m-0"}`,children:[ns("p",{className:"p-[15px]",children:t}),a&&ns(a,{}),i&&ns("div",{className:`pl-4 fill-t_text_primary text-t_text_primary ${r}`,children:ns(i,{})})]});import{SnackbarContent as l5}from"notistack";import{forwardRef as u5}from"react";import{jsx as i1}from"react/jsx-runtime";var In=u5(({message:t},e)=>{let{text:r,variant:n,className:i,action:a,animation:o}=t;return i1(l5,{ref:e,children:i1(n1,{text:r,type:n,className:i,isSnackbar:!0,Action:a,Animation:o})})});In.displayName="SnackMessage";import{useMemo as p5}from"react";var Ma=()=>p5(()=>({query:async(t,e,r=[])=>t?.provider?await t[e](...r):null,execute:async(t,e,r=[],n={})=>{try{if(t?.provider){let i=await t.estimateGas[e](...r,n);return n.gasLimit||(n.gasLimit=Math.floor(i.toNumber()*hc)),await t[e](...r,n)}return null}catch(i){let a;try{a=t?.interface.parseError(i?.error?.data?.data)}catch{throw i?.error?.data?.message?new Error(i?.error?.data?.message):i}throw new Error(a?.name)}},executeCalldata:async(t,e)=>{try{let r=await t.estimateGas({...e});return await t.sendTransaction({...e,gasLimit:Math.floor(r.toNumber()*hc)})}catch(r){throw r?.error?.data?.message?new Error(r?.error?.data?.message):r}}}),[]),Ac=Ma;import{useCallback as JC}from"react";import{useCallback as h5,useRef as x5}from"react";var a1=({delayMs:t,instantExecution:e})=>{let r=x5(null);return{debounce:h5(i=>{r.current&&(clearTimeout(r.current),r.current=null),e&&e(),r.current=setTimeout(i,t)},[t,e])}};import{useCallback as nA}from"react";var iA=new se.utils.Interface(qu);import{createContext as T5,useCallback as QA,useContext as ZA,useEffect as YA,useState as jA}from"react";import{useAccount as eT}from"wagmi";import y5 from"bignumber.js";import{createContext as w5,useCallback as Ia,useContext as v5,useEffect as Ct,useMemo as lt,useRef as f1,useState as Je}from"react";import{useAccount as C5}from"wagmi";var o1=({supportedChains:t})=>{let e=t.find(r=>r.chainId===Ui)||t[0];if(!e)throw new Error("getDefaultSourceChain > couldn't find default source chain");return e},s1=({supportedChains:t})=>{let e=t.find(r=>r.chainId===Qo)||t[0];if(!e)throw new Error("getDefaultDestinationChain > couldn't find default destination chain");return e},is=(t,e,r,n)=>{if(!t.tokens.some(f=>f.supported))return;let a=t.tokens.find(f=>f.address.toLowerCase()===e.toLowerCase()&&f.supported);if(a)return a;let o=t.tokens.find(f=>r?f.supported&&f.tokenId!==n:f.supported);if(o)return o},m5=({chain:t,bridgeTokensDictionary:e})=>{if(!t)return;let r=t.tokens.find(i=>i.tokenId==="XSWAP");if(r)return r;let n=Object.keys(e[t.chainId]||{})[0];return t.tokens.find(i=>i.address.toLowerCase()===n?.toLowerCase())},Tc=t=>t.swapSupported,Sc=({sourceChain:t,targetChain:e})=>{if(!t)throw new Error("isSwapTargetChainValid > sourceChain should be defined.");return e.swapSupported&&t.supportedDstForSwap?.includes(e.chainId)},Ec=t=>!t||t.bridgeSupported,c1=({sourceChain:t,targetChain:e,sourceToken:r})=>{let n=!0,i=!0,a=!1;return t&&e&&(n=!!t.supportedDstForBridge?.includes(e.chainId)),r&&e&&(i=!!e.tokens.find(o=>o.tokenId===r.tokenId)),t&&e&&(a=t.chainId===e.chainId),i&&!a&&n},b5=({source:t,target:e,supportedChains:r})=>{let n=t.chain||o1({supportedChains:r}),i=e.chain||s1({supportedChains:r}),a=t.token||is(n,lc),o=e.token||is(i,uc,n.chainId===i.chainId,a?.tokenId);if(!n||!i||!a||!o)return{source:{chain:void 0,token:void 0},target:{chain:void 0,token:void 0}};if(!Tc(n)&&(n=o1({supportedChains:r}),a=void 0,!Tc(n)&&(console.error("[WRONG CONFIG] default swap source chain is invalid."),n=r.find(f=>Tc(f)),!n)))throw new Error("mapToValidSwap > None of the chains supports swap. Couldn't set source chain.");if(!Sc({sourceChain:n,targetChain:i})&&(i=s1({supportedChains:r}),o=void 0,!Sc({sourceChain:n,targetChain:i})&&(console.error("[WRONG CONFIG] default swap target chain is invalid."),i=r.find(f=>Sc({sourceChain:n,targetChain:f})),!i)))throw new Error("mapToValidSwap > None of the chains supports swap. Couldn't set target chain.");return a=n.tokens.find(f=>f.tokenId===a?.tokenId&&f.supported),o=i.tokens.find(f=>f.tokenId===o?.tokenId&&f.supported),a||(a=is(n,lc)),(!o||a===o)&&(o=is(i,uc,n.chainId===i.chainId,a?.tokenId)),{source:{chain:n,token:a},target:{chain:i,token:o}}},g5=({source:t,target:e,supportedChains:r,bridgeTokensDictionary:n})=>{let i=t.chain,a=e.chain,o=t.token,f=e.token;if(!Ec(i)&&(i=void 0,o=void 0,!Ec(i)&&(console.error("[WRONG CONFIG] default bridge source chain is invalid."),i=r.find(d=>Ec(d)),!i)))throw new Error("mapToValidSwap > None of the chains supports bridge. Couldn't set source chain.");if(c1({sourceChain:i,targetChain:a,sourceToken:o})||(f=void 0,c1({sourceChain:i,targetChain:a,sourceToken:o})||(a=void 0)),o&&i&&(o=i.tokens.find(d=>d.tokenId===o?.tokenId&&d.supported),o&&(Object.keys(n[i.chainId]?.[o.address.toLowerCase()]||{}).length>0||(o=void 0))),f&&a&&(f=a.tokens.find(d=>d.tokenId===f?.tokenId&&d.supported)),!o){let d=m5({chain:i,bridgeTokensDictionary:n});d&&i&&a&&!!n[i.chainId]?.[d.address.toLowerCase()]?.[a.chainId]?o=d:o=void 0}if(o?.tokenId!==f?.tokenId&&(f=void 0),!f)if(o&&i&&a){let d=n[i.chainId]?.[o.address.toLowerCase()]?.[a.chainId];f=a.tokens.find(h=>h.address.toLowerCase()===d?.toLowerCase())}else f=void 0;return!f&&o&&(a=void 0),{source:{chain:i,token:o},target:{chain:a,token:f}}},as=({type:t,...e})=>t==="SWAP"?b5(e):g5(e);import{jsx as A5}from"react/jsx-runtime";var At=()=>{throw new Error("Not implemented")},nt={bridgeUI:!1,integrationConfig:{},wagmiConfig:{},supportedChains:[],tab:"Swap",overlay:!1,error:"",feeToken:void 0,srcChain:void 0,srcChainTokensOptions:[],srcChainOtherTokensOptions:[],tokenPrices:{},dstChain:void 0,dstChainTokensOptions:[],dstChainOtherTokensOptions:[],srcToken:void 0,dstTokenLocked:!1,dstChainLocked:!1,srcTokenLocked:!1,srcChainLocked:!1,dstToken:void 0,srcValue:"",srcValueWei:"",srcValueUsd:null,dstValue:"",dstValueWei:"",dstValueUsd:null,dstValueMin:"",expressDelivery:!0,infiniteApproval:!0,slippage:"1.5",route:void 0,isAsyncDataLoaded:!1,srcTokenBalanceWei:"",srcTokenBalanceInfo:"-",isFetchingBalance:!1,isFetchingBalances:!1,isFetchingRoute:!1,isExpressDeliveryActive:!0,setTab:At,setError:At,setSrcChain:At,setDstChain:At,setSrcToken:At,setDstToken:At,setSrcValue:At,setExpressDelivery:At,setInfiniteApproval:At,setSlippage:At,setRoute:At,setSrcTokenBalanceWei:At,quoteRoute:At,refreshBalance:At,findTokenDataByAddressAndChain:At,bridgeTokensDictionary:null,onConnectWallet:At,hasOnConnectWalletCallback:!1,srcChainOptions:[],dstChainOptions:[]},d1=w5(nt),l1=({children:t,integrationConfig:e,supportedChains:r,wagmiConfig:n,overlay:i})=>{let{address:a,chainId:o}=C5(),[f,d]=Je(!1),[p,h]=Je(nt.tab),[v,E]=Je(nt.error),[S,A]=Je(nt.expressDelivery),[_,I]=Je(nt.slippage),[N,L]=Je(nt.infiniteApproval),[M,V]=Je(nt.srcChain),[F,B]=Je(nt.dstChain),[J,Q]=Je(nt.feeToken),[G,ne]=Je(nt.srcToken),[W,re]=Je(nt.dstToken),[T,s]=Je(nt.tokenPrices),[l,g]=Je({}),[w,C]=Je([]),[b,y]=Je(nt.srcValue),[m,c]=Je(nt.srcTokenBalanceWei),[x,R]=Je(nt.srcChainTokensOptions),[u,k]=Je(nt.dstChainTokensOptions),[P,O]=Je(nt.srcChainOtherTokensOptions),[z,j]=Je(nt.dstChainOtherTokensOptions),[Y,Z]=Je([]),[Qe,$]=Je([]),[fe,gr]=Je(nt.isFetchingBalance),[Oe,Be]=Je(nt.isFetchingBalances),[zr,Fe]=Je(nt.isFetchingRoute),[ve,zt]=Je(nt.route),Te=f1(null),Le=f1(crypto.randomUUID()),qr=lt(()=>!!e?.srcTokenLocked,[e?.srcTokenLocked]),Ue=lt(()=>!!e?.dstTokenLocked,[e?.dstTokenLocked]),He=lt(()=>!!e?.dstChainLocked,[e?.dstChainLocked]),Wr=lt(()=>!!e?.srcChainLocked,[e?.srcChainLocked]),ae=lt(()=>!!e.bridge,[e.bridge]),Ve=lt(()=>!!(e.onConnectWallet||window.xPayOnConnectWallet),[e.onConnectWallet]),qt=lt(()=>{let K=vt?{}:JSON.parse(localStorage.getItem("custom-tokens")||"{}"),oe={};return r.forEach(ie=>{oe[ie.chainId]={},ie.tokens.forEach(ee=>{oe[ie.chainId][ee.address]=ee})}),mc(oe,K)},[r]),_e=lt(()=>{let K={};return Object.entries(qt).forEach(([oe,ie])=>{K[oe]=Object.entries(ie).filter(([,ee])=>ee.supported).sort(([,ee],[,me])=>me.priority-ee.priority).map(([,ee])=>({chainId:oe,...ee}))}),K},[qt]),de=lt(()=>{if(!w||w.length===0)return null;let K={},oe=(ie,ee,me,le)=>{K[ie]||(K[ie]={}),K[ie][ee]||(K[ie][ee]={}),K[ie][ee][me]=le};for(let ie of w){let ee=Object.entries(ie);if(ee.length!==2)continue;let[me,le]=ee[0],[Ce,ut]=ee[1];oe(me,le,Ce,ut),oe(Ce,ut,me,le)}return Object.keys(K).length>0?K:null},[w]),Kr=lt(()=>G&&M&&T&&T[M.chainId]&&T[M.chainId]?.[G.address]?(Number(b)*Number(T[M.chainId]?.[G.address])).toFixed(2):null,[T,G,b,M]),Se=lt(()=>Yo({amount:b,decimals:G?.decimals||18}),[G?.decimals,b]),Ee=lt(()=>ft({amount:ve?.estAmountOut||"0",decimals:W?.decimals||18,precisionFractionalPlaces:Math.min(8,W?.decimals||18)}),[ve]),Xr=lt(()=>Yo({amount:Ee,decimals:W?.decimals||18}),[W?.decimals,Ee]),Ge=lt(()=>W&&F&&T&&T[F?.chainId]&&T[F?.chainId]?.[W.address]?(Number(Ee)*Number(T[F?.chainId]?.[W.address])).toFixed(2):null,[T,W,Ee,F]),ze=lt(()=>ft({amount:ve?.minAmountOut||"0",decimals:W?.decimals||18,precisionFractionalPlaces:Math.min(4,W?.decimals||18)}),[ve]),yr=lt(()=>S&&!!ve&&X.from(ve.xSwapFees?.expressDeliveryFee||"0").gt("0"),[S,ve]),qe=lt(()=>r.length>0&&w.length>0,[r,w]),We=lt(()=>{if(!G||!m||!a)return"";if(Ht(m).eq(0))return"0";let K=ft({amount:m,decimals:G.decimals,precisionFractionalPlaces:G.decimals});return new y5(K).lt("0.00001")?"<0.00001":ft({amount:m,decimals:G.decimals,precisionFractionalPlaces:5})},[G,m]),Ft=Ia(K=>{if(!K)return[];if(!ae)return _e[K]||[];if(!_e[K]||!de)return[];let oe=Object.keys(de[K]||{});return _e[K].filter(ie=>oe.includes(ie.address))},[de,ae,_e]),Ie=Ia(async()=>{if(!M||!F||!G||!W||!Se||Ht(Se).eq(0)||ae&&!de){zt(void 0);return}let{source:K,target:oe}=as({source:{chain:M,token:G},target:{chain:F,token:W},type:ae?"BRIDGE":"SWAP",supportedChains:r,bridgeTokensDictionary:de||{}});if(!(K.chain?.chainId!==M?.chainId||oe.chain?.chainId!==F?.chainId||K.token?.address!==G?.address||oe.token?.address!==W?.address))try{E(""),Fe(!0),Te.current&&Te.current.abort(pc),Te.current=new AbortController;let ie=await vc({integratorId:e.integratorId,fromChain:M.chainId,toChain:F.chainId,fromAddress:a||It[M.chainId]?.FeeCollector||"",toAddress:a||It[F.chainId]?.FeeCollector||"",fromToken:G.address,toToken:W.address,fromAmount:Se,slippage:Number(_),customContractCalls:e.customContractCalls,paymentToken:ir.AddressZero,expressDelivery:S,infiniteApproval:N},Te.current.signal);zt(ie),Te.current=null}catch(ie){ie!==pc&&(console.error(ie),E("Could not find route!"),zt(void 0))}finally{Fe(!1)}},[a,ae,F,W,vc,yr,_,M,G,Se]),Pe=Ia(async()=>{if(!a||!M?.publicRpcUrls[0]||!G||!G?.address)return;let K=crypto.randomUUID();Le.current=K,gr(!0);let oe=await xc(a,G.address,M?.publicRpcUrls[0]);K===Le.current&&(c(Yo({amount:oe,decimals:G.decimals})),gr(!1))},[a,M,G]),Jr=Ia((K,oe)=>qt[oe]?.[K],[qt]),Ke=Ia(()=>{e.onConnectWallet?e.onConnectWallet():window.xPayOnConnectWallet&&window.xPayOnConnectWallet()},[e]);return Ct(()=>{if(r.length>0){let K=r.map(oe=>oe.chainId);e1({chainId:K}).then(oe=>{s(oe)})}},[r]),Ct(()=>{(async()=>{let K=await r1();C(K)})()},[]),Ct(()=>{Ie()},[Ie]),Ct(()=>{Pe()},[Pe]),Ct(()=>{a&&r.length>0&&(Be(!0),t1({walletAddress:a}).then(K=>{g(K),Be(!1)}))},[a,r.length]),Ct(()=>{Q(M?.tokens.find(({address:K})=>K.toLowerCase()===ir.AddressZero.toLowerCase()))},[M]),Ct(()=>{(async()=>{let K=F?.chainId===M?.chainId,oe=Ft(M?.chainId).filter(({symbol:ce})=>K?ce!==W?.symbol:!0);R(oe);let ie=Ft(F?.chainId).filter(({symbol:ce})=>K?ce!==G?.symbol:!0);k(ie);let ee=[],me=r.filter(({chainId:ce,web3Environment:pe,swapSupported:ot,bridgeSupported:Ne})=>ce!==M?.chainId&&pe==="mainnet"&&(ae&&Ne||!ae&&ot));for(let{chainId:ce}of me)ee.push(...Ft(ce).filter(({symbol:pe})=>ce===F?.chainId?pe!==W?.symbol:!0));O(ee);let le=[],Ce=r.filter(({chainId:ce,web3Environment:pe,swapSupported:ot,bridgeSupported:Ne})=>ce!==F?.chainId&&pe==="mainnet"&&(ae&&Ne&&M?.supportedDstForBridge?.includes(ce)||!ae&&ot&&M?.supportedDstForSwap?.includes(ce)));for(let{chainId:ce}of Ce)le.push(...Ft(ce).filter(({symbol:pe})=>ce===M?.chainId?pe!==G?.symbol:!0));j(le);let ut=ce=>ce.map(pe=>({...pe,balance:X.from(l[pe.chainId]?.[pe.address]||0)}));R(ut(oe)),k(ut(ie)),O(ut(ee)),j(ut(le))})()},[ae,M,F,Ft,r,G?.symbol,W?.symbol,l]),Ct(()=>{let K=r.filter(({web3Environment:ee,swapSupported:me,bridgeSupported:le})=>ee==="mainnet"&&(ae&&le||!ae&&me)),oe=[];if(ae&&F&&W&&de){let ee=K.filter(({chainId:me})=>{let le=de[me]||{};return Object.values(le).some(Ce=>Ce[F.chainId])});oe=K.filter(me=>!ee.some(le=>le.chainId===me.chainId)).map(me=>me.chainId)}let ie=new Set;if(M&&K.filter(ee=>ae?!M.supportedDstForBridge?.includes(ee.chainId):!M.supportedDstForSwap?.includes(ee.chainId)).forEach(ee=>ie.add(ee.chainId)),ae&&M&&de&&!G){let ee=de[M.chainId];ee?K.filter(me=>!Object.values(ee).some(le=>le[me.chainId])).forEach(me=>ie.add(me.chainId)):K.forEach(me=>ie.add(me.chainId))}if(ae&&M&&de&&G){let ee=de[M.chainId]?.[G.address];K.filter(me=>!ee?.[me.chainId]).forEach(me=>ie.add(me.chainId))}Z(gc(K,oe)),$(gc(K,[...ie]))},[r,ae,M,G,F,W,de]),Ct(()=>{if(!o||!f||e?.srcChainId)return;let K=r.find(({chainId:oe})=>oe===`${o}`);K&&V(K)},[o,f,r,e?.srcChainId]),Ct(()=>{f&&(ne(void 0),re(void 0),V(void 0),B(void 0))},[ae]),Ct(()=>{if(f||!r||r.length===0||!de)return;let K=M||e?.srcChainId||(o?`${o}`:void 0)||(ae?void 0:Ui),oe=r.find(({chainId:ot})=>ot===K),ie=F||e?.dstChainId||(ae?void 0:Qo),ee=r.find(({chainId:ot})=>ot===ie),me,le,Ce=bc(e.srcTokenAddr,e?.srcChainId,r),ut=bc(e.dstTokenAddr,e?.dstChainId,r);oe&&(le=oe.tokens.find(({address:ot})=>ot.toLowerCase()===Ce?.toLowerCase())),ee&&(me=ee.tokens.find(({address:ot})=>ot.toLowerCase()===ut));let{source:ce,target:pe}=as({source:{chain:oe,token:le},target:{chain:ee,token:me},type:ae?"BRIDGE":"SWAP",supportedChains:r,bridgeTokensDictionary:de});V(ce.chain),B(pe.chain),ne(ce.token),re(pe.token),d(!0)},[e?.srcChainId,e?.srcTokenAddr,e?.dstChainId,e?.dstTokenAddr,r,ae,o,f,de]),Ct(()=>{if(!de||r.length===0||!f)return;let{source:K,target:oe}=as({source:{chain:M,token:G},target:{chain:F,token:W},type:ae?"BRIDGE":"SWAP",supportedChains:r,bridgeTokensDictionary:de});K.chain?.chainId!==M?.chainId&&V(K.chain),oe.chain?.chainId!==F?.chainId&&B(oe.chain),(K.token?.address!==G?.address||K.token?.name!==G?.name)&&ne(K.token),(oe.token?.address!==W?.address||oe.token?.name!==W?.name)&&re(oe.token)},[M,G,F,W,ae,r,de,f]),Ct(()=>{f&&(e.onDstChainChange?e.onDstChainChange(F?.chainId):window.xPayOnDstChainChange&&window.xPayOnDstChainChange(F?.chainId))},[e.onDstChainChange,F]),Ct(()=>{if(!f)return;let K=W?{address:W.address.toLowerCase(),symbol:W.tokenId}:void 0;e.onDstTokenChange?e.onDstTokenChange(K):window.xPayOnDstTokenChange&&window.xPayOnDstTokenChange(K)},[e.onDstTokenChange,W]),Ct(()=>{f&&(e.onSrcChainChange?e.onSrcChainChange(M?.chainId):window.xPayOnSrcChainChange&&window.xPayOnSrcChainChange(M?.chainId))},[e.onSrcChainChange,M]),Ct(()=>{if(!f)return;let K=G?{address:G.address.toLowerCase(),symbol:G.tokenId}:void 0;e.onSrcTokenChange?e.onSrcTokenChange(K):window.xPayOnSrcTokenChange&&window.xPayOnSrcTokenChange(K)},[e.onSrcTokenChange,G]),A5(d1.Provider,{value:{bridgeUI:ae,integrationConfig:e,wagmiConfig:n,supportedChains:r,tab:p,setTab:h,overlay:i,error:v,setError:E,feeToken:J,srcChain:M,setSrcChain:V,srcChainTokensOptions:x,srcChainOtherTokensOptions:P,srcChainOptions:Y,dstChainOptions:Qe,tokenPrices:T,dstChain:F,setDstChain:B,dstChainTokensOptions:u,dstChainOtherTokensOptions:z,srcToken:G,setSrcToken:ne,dstToken:W,setDstToken:re,srcValue:b,setSrcValue:y,srcValueWei:Se,srcValueUsd:Kr,dstValue:Ee,dstValueWei:Xr,dstValueUsd:Ge,dstValueMin:ze,expressDelivery:S,setExpressDelivery:A,infiniteApproval:N,setInfiniteApproval:L,slippage:_,setSlippage:I,route:ve,setRoute:zt,isAsyncDataLoaded:qe,srcTokenBalanceWei:m,setSrcTokenBalanceWei:c,srcTokenBalanceInfo:We,isFetchingRoute:zr,isFetchingBalance:fe,isFetchingBalances:Oe,isExpressDeliveryActive:yr,quoteRoute:Ie,refreshBalance:Pe,findTokenDataByAddressAndChain:Jr,srcTokenLocked:qr,srcChainLocked:Wr,dstTokenLocked:Ue,dstChainLocked:He,bridgeTokensDictionary:de,onConnectWallet:Ke,hasOnConnectWalletCallback:Ve},children:t})},te=()=>v5(d1);import{jsx as sT}from"react/jsx-runtime";var Pn={rank:0,setRank:()=>{throw new Error("GlobalDataState > setRank is not implemented")},xPower:"0",updateXPower:()=>{throw new Error("GlobalDataState > updateXPower is not implemented")},xSwapBalance:"0",updateXSwapBalance:()=>{throw new Error("GlobalDataState > updateXSwapBalance is not implemented")},unfinishedQuestsCount:0,setUnfinishedQuestsCount:()=>{throw new Error("GlobalDataState > setUnfinishedQuestsCount is not implemented")}},aT=T5({rank:Pn.rank,setRank:Pn.setRank,xPower:Pn.xPower,updateXPower:Pn.updateXPower,xSwapBalance:Pn.xSwapBalance,updateXSwapBalance:Pn.updateXSwapBalance,unfinishedQuestsCount:Pn.unfinishedQuestsCount,setUnfinishedQuestsCount:Pn.setUnfinishedQuestsCount});import{jsx as u1}from"react/jsx-runtime";var ni=()=>u1("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:u1("path",{d:"M5 6.81252L0 1.81252L0.895833 0.916687L5 5.04169L9.10417 0.93752L10 1.83335L5 6.81252Z"})});import{jsx as p1}from"react/jsx-runtime";var os=()=>p1("svg",{width:"15",height:"17",viewBox:"0 0 15 17",xmlns:"http://www.w3.org/2000/svg",children:p1("path",{d:"M9 0.459351L9 10.8957L12.8625 7.15026L15 9.18662L7.5 16.4593L-2.79009e-07 9.18662L2.1375 7.15026L6 10.8957L6 0.459351L9 0.459351Z"})});import{jsx as h1}from"react/jsx-runtime";var x1=()=>h1("svg",{width:"10",height:"16",viewBox:"0 0 10 16",xmlns:"http://www.w3.org/2000/svg",children:h1("path",{d:"M0.5 8L8.13251 15.5L9.5 14.1562L3.20318 8L9.4682 1.84375L8.10071 0.5L0.5 8Z"})});import{jsx as mT}from"react/jsx-runtime";import{jsx as m1}from"react/jsx-runtime";var b1=()=>m1("svg",{width:"14",height:"18",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m1("path",{d:"M3.66665 9.83335V3.85419L1.52081 6.00002L0.333313 4.83335L4.49998 0.666687L8.66665 4.83335L7.47915 6.00002L5.33331 3.85419V9.83335H3.66665ZM9.49998 17.3334L5.33331 13.1667L6.52081 12L8.66665 14.1459V8.16669H10.3333V14.1459L12.4791 12L13.6666 13.1667L9.49998 17.3334Z",fill:"white"})});import{jsx as vT}from"react/jsx-runtime";import{jsx as TT}from"react/jsx-runtime";import{jsx as kT,jsxs as _T}from"react/jsx-runtime";import{jsx as Hr,jsxs as S5}from"react/jsx-runtime";var g1=()=>S5("svg",{width:"97",height:"31",viewBox:"0 0 97 31",xmlns:"http://www.w3.org/2000/svg",children:[Hr("path",{d:"M33.5297 15.3088C33.5018 14.6173 33.6103 13.9272 33.8488 13.2781C34.0874 12.629 34.4512 12.0339 34.9195 11.5271C35.3877 11.0203 35.951 10.6119 36.5769 10.3253C37.2028 10.0387 37.8789 9.87969 38.5661 9.85742H38.7797C41.4359 9.85742 43.0036 11.4299 43.4671 13.2698L41.8161 13.8254C41.6678 13.1398 41.2795 12.5307 40.7221 12.1092C40.1647 11.6878 39.4753 11.482 38.7797 11.5295C37.0609 11.5295 35.337 12.7928 35.337 15.3402C35.337 17.8877 37.0193 19.1038 38.8005 19.1038C39.4996 19.123 40.1848 18.9057 40.7466 18.4866C41.3085 18.0675 41.7144 17.4709 41.8994 16.7922L43.5192 17.3164C43.2396 18.3517 42.6177 19.2602 41.7561 19.892C40.8945 20.5238 39.8446 20.8411 38.7797 20.7916C37.4116 20.8169 36.0895 20.2944 35.1041 19.339C34.1187 18.3836 33.5505 17.0735 33.5245 15.6967C33.5193 15.5709 33.5245 15.4398 33.5297 15.3088Z"}),Hr("path",{d:"M46.7328 20.5504H45.0245V9.82593H46.7328V14.0193C46.9808 13.7233 47.2927 13.4881 47.6447 13.3319C47.9968 13.1756 48.3796 13.1024 48.764 13.1177C50.5297 13.1177 51.3682 14.3914 51.3682 15.9797V20.5504H49.7224V16.2837C49.7717 15.92 49.677 15.5513 49.4588 15.2572C49.2406 14.963 48.9162 14.7669 48.5557 14.7112C48.4535 14.7006 48.3506 14.7006 48.2484 14.7112C47.8534 14.7112 47.4745 14.8691 47.1951 15.1503C46.9158 15.4314 46.7588 15.8127 46.7588 16.2103C46.7562 16.254 46.7562 16.2977 46.7588 16.3414L46.7328 20.5504Z"}),Hr("path",{d:"M55.201 16.42L57.0344 16.1317C57.451 16.0792 57.5552 15.8643 57.5552 15.6075C57.5552 14.9995 57.1489 14.512 56.201 14.512C55.843 14.4828 55.4881 14.5969 55.2131 14.8295C54.9382 15.0621 54.7654 15.3943 54.7323 15.7543V15.8329L53.1698 15.4817C53.3 14.2342 54.425 13.1229 56.1854 13.1229C58.3937 13.1229 59.2323 14.3809 59.2323 15.8486V19.4287C59.2305 19.8166 59.2601 20.204 59.3208 20.5871H57.7583C57.702 20.283 57.6793 19.9737 57.6906 19.6646C57.4534 20.0319 57.1247 20.3302 56.7372 20.5298C56.3498 20.7294 55.9171 20.8233 55.4823 20.802C54.8885 20.8514 54.2994 20.6616 53.8444 20.2745C53.3894 19.8873 53.1056 19.3343 53.0552 18.7368C53.0552 18.7001 53.0552 18.6634 53.0552 18.632C53.0292 17.3058 53.9719 16.5929 55.201 16.42ZM57.5656 17.5784V17.2481L55.6958 17.5312C55.442 17.5393 55.2011 17.6458 55.0235 17.8285C54.8459 18.0111 54.7453 18.2558 54.7427 18.5114C54.7447 18.638 54.7718 18.763 54.8223 18.879C54.8728 18.995 54.9457 19.0998 55.0369 19.1871C55.128 19.2744 55.2355 19.3426 55.3531 19.3877C55.4707 19.4328 55.5961 19.4538 55.7219 19.4497H55.8C56.0132 19.4721 56.2287 19.4519 56.4341 19.3902C56.6395 19.3284 56.8307 19.2264 56.9967 19.09C57.1628 18.9536 57.3004 18.7855 57.4016 18.5953C57.5028 18.4051 57.5656 18.1967 57.5864 17.982C57.5939 17.8469 57.5851 17.7114 57.5604 17.5784H57.5656Z"}),Hr("path",{d:"M62.1391 9.67906C62.2859 9.67699 62.4316 9.70412 62.568 9.7589C62.7043 9.81369 62.8286 9.89505 62.9336 9.99831C63.0386 10.1016 63.1223 10.2247 63.1799 10.3606C63.2375 10.4965 63.2679 10.6425 63.2693 10.7903C63.2692 11.0115 63.2042 11.2277 63.0824 11.4118C62.9606 11.5959 62.7875 11.7397 62.5847 11.8251C62.382 11.9104 62.1587 11.9335 61.9429 11.8915C61.7271 11.8495 61.5285 11.7442 61.3721 11.5889C61.2156 11.4336 61.1082 11.2352 61.0635 11.0186C61.0187 10.8021 61.0386 10.577 61.1205 10.3718C61.2025 10.1666 61.3429 9.99035 61.5241 9.86522C61.7054 9.74009 61.9193 9.67168 62.1391 9.66858V9.67906ZM61.3057 20.5818V13.3378H63.014V20.5503L61.3057 20.5818Z"}),Hr("path",{d:"M66.905 20.5505H65.2018V13.3379H66.8633V14.2971C67.0799 13.9288 67.391 13.6259 67.764 13.4202C68.1369 13.2145 68.558 13.1137 68.9831 13.1282C70.7331 13.1282 71.5872 14.4019 71.5872 15.9902V20.5505H69.8841V16.2837C69.8841 15.3979 69.4831 14.6797 68.4102 14.6797C68.2118 14.6811 68.0157 14.7218 67.8329 14.7995C67.6502 14.8771 67.4845 14.9902 67.3452 15.1324C67.2059 15.2745 67.0958 15.4429 67.0211 15.6278C66.9465 15.8128 66.9088 16.0107 66.9102 16.2103C66.9102 16.268 66.9102 16.3256 66.9102 16.3833L66.905 20.5505Z"}),Hr("path",{d:"M73.6491 20.5504V9.82593H75.3574V20.5504H73.6491Z"}),Hr("path",{d:"M78.4048 9.67909C78.6246 9.67805 78.8398 9.74278 79.0231 9.86506C79.2063 9.98735 79.3493 10.1617 79.4339 10.3659C79.5185 10.5701 79.5409 10.795 79.4983 11.0121C79.4556 11.2292 79.3499 11.4286 79.1944 11.585C79.039 11.7415 78.8408 11.8479 78.6251 11.8908C78.4094 11.9338 78.186 11.9112 77.983 11.8261C77.7801 11.7409 77.6069 11.597 77.4854 11.4126C77.3639 11.2282 77.2996 11.0116 77.3006 10.7903C77.3033 10.4965 77.4205 10.2154 77.627 10.0076C77.8335 9.79978 78.1128 9.68182 78.4048 9.67909ZM77.5662 20.5818V13.3378H79.2589V20.5504L77.5662 20.5818Z"}),Hr("path",{d:"M83.1752 20.5506H81.4669V13.338H83.1284V14.2972C83.3454 13.9293 83.6566 13.6267 84.0295 13.4211C84.4023 13.2155 84.8232 13.1144 85.2482 13.1283C86.9981 13.1283 87.8523 14.4021 87.8523 15.9903V20.5506H86.144V16.2839C86.1933 15.9201 86.0986 15.5515 85.8804 15.2573C85.6622 14.9632 85.3378 14.7671 84.9773 14.7113C84.8734 14.7008 84.7687 14.7008 84.6648 14.7113C84.267 14.7155 83.8868 14.8775 83.6069 15.1621C83.327 15.4467 83.17 15.831 83.17 16.2314C83.1647 16.2925 83.1647 16.3539 83.17 16.4149L83.1752 20.5506Z"}),Hr("path",{d:"M93.6805 16.383L96.6857 20.5764H94.6024L92.5191 17.6044L91.6389 18.5374V20.5502H89.9462V9.82568H91.6389V16.252L94.3888 13.3376H96.6545L93.6805 16.383Z"}),Hr("path",{d:"M13.3059 6.922L20.6913 11.1887V19.7642L13.3268 24.0571L5.9466 19.8009V11.2307L13.3059 6.922ZM13.3059 0.631958L10.5976 2.20447L3.22266 6.51314L0.514343 8.08565V22.9564L3.22266 24.5289L10.608 28.7956L13.3163 30.3681L16.0247 28.7956L23.384 24.4974L26.0923 22.9249V8.03324L23.384 6.46073L16.0038 2.20447L13.2955 0.631958H13.3059Z"})]});import{jsx as y1}from"react/jsx-runtime";var ss=()=>y1("svg",{width:"17",height:"14",viewBox:"0 0 17 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y1("path",{d:"M5.7 13.0125L0 7.31255L1.425 5.88755L5.7 10.1625L14.875 0.987549L16.3 2.41255L5.7 13.0125Z",fill:"#2E7D32"})});import{jsx as FT}from"react/jsx-runtime";import{jsx as OT}from"react/jsx-runtime";import{jsx as VT,jsxs as GT}from"react/jsx-runtime";import{jsx as w1}from"react/jsx-runtime";var at=({className:t})=>w1("svg",{height:"18",width:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10.312 8.319",className:t||"",children:w1("path",{d:"M6.073 4.078 10.151 0H9.093A1.87 1.87 0 0 0 7.77.548L5.157 3.162 2.543.548A1.87 1.87 0 0 0 1.22 0H.161L4.24 4.078 0 8.318h1.058a1.87 1.87 0 0 0 1.322-.547l2.777-2.777 2.776 2.777a1.869 1.869 0 0 0 1.322.548h1.058Z"})});import{jsx as XT}from"react/jsx-runtime";import{jsx as v1}from"react/jsx-runtime";var C1=({className:t})=>v1("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24",className:t||"",children:v1("path",{d:"M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"})});import{jsx as A1}from"react/jsx-runtime";var T1=()=>A1("svg",{width:"6",height:"7",viewBox:"0 0 6 7",xmlns:"http://www.w3.org/2000/svg",children:A1("circle",{cx:"3",cy:"3.91418",r:"3",fill:"#4CAF50"})});import{jsx as eS}from"react/jsx-runtime";import{jsx as nS,jsxs as iS}from"react/jsx-runtime";import{jsx as Pa,jsxs as S1}from"react/jsx-runtime";var E1=()=>S1("svg",{width:"81",height:"80",viewBox:"0 0 81 80",xmlns:"http://www.w3.org/2000/svg",children:[Pa("g",{id:"error_FILL0_wght400_GRAD0_opsz24 1",children:Pa("path",{id:"Vector",d:"M40.5001 56.6667C41.4445 56.6667 42.2362 56.3473 42.8751 55.7084C43.514 55.0695 43.8334 54.2779 43.8334 53.3334C43.8334 52.389 43.514 51.5973 42.8751 50.9584C42.2362 50.3195 41.4445 50.0001 40.5001 50.0001C39.5556 50.0001 38.764 50.3195 38.1251 50.9584C37.4862 51.5973 37.1667 52.389 37.1667 53.3334C37.1667 54.2779 37.4862 55.0695 38.1251 55.7084C38.764 56.3473 39.5556 56.6667 40.5001 56.6667ZM37.1667 43.3334H43.8334V23.3334H37.1667V43.3334ZM40.5001 73.3334C35.889 73.3334 31.5556 72.4584 27.5001 70.7084C23.4445 68.9584 19.9167 66.5834 16.9167 63.5834C13.9167 60.5834 11.5417 57.0556 9.79175 53.0001C8.04175 48.9445 7.16675 44.6112 7.16675 40.0001C7.16675 35.389 8.04175 31.0556 9.79175 27.0001C11.5417 22.9445 13.9167 19.4167 16.9167 16.4167C19.9167 13.4167 23.4445 11.0417 27.5001 9.29175C31.5556 7.54175 35.889 6.66675 40.5001 6.66675C45.1112 6.66675 49.4445 7.54175 53.5001 9.29175C57.5556 11.0417 61.0834 13.4167 64.0834 16.4167C67.0834 19.4167 69.4584 22.9445 71.2084 27.0001C72.9584 31.0556 73.8334 35.389 73.8334 40.0001C73.8334 44.6112 72.9584 48.9445 71.2084 53.0001C69.4584 57.0556 67.0834 60.5834 64.0834 63.5834C61.0834 66.5834 57.5556 68.9584 53.5001 70.7084C49.4445 72.4584 45.1112 73.3334 40.5001 73.3334ZM40.5001 66.6667C47.9445 66.6667 54.2501 64.0834 59.4167 58.9167C64.5834 53.7501 67.1667 47.4445 67.1667 40.0001C67.1667 32.5556 64.5834 26.2501 59.4167 21.0834C54.2501 15.9167 47.9445 13.3334 40.5001 13.3334C33.0556 13.3334 26.7501 15.9167 21.5834 21.0834C16.4167 26.2501 13.8334 32.5556 13.8334 40.0001C13.8334 47.4445 16.4167 53.7501 21.5834 58.9167C26.7501 64.0834 33.0556 66.6667 40.5001 66.6667Z",fill:"url(#paint0_linear_230_166)"})}),Pa("defs",{children:S1("linearGradient",{id:"paint0_linear_230_166",x1:"7.16675",y1:"6.66675",x2:"77.4571",y2:"10.7358",gradientUnits:"userSpaceOnUse",children:[Pa("stop",{stopColor:"#F44336"}),Pa("stop",{offset:"1",stopColor:"#C62828"})]})})]});import{forwardRef as E5}from"react";import{jsx as k1}from"react/jsx-runtime";var ii=E5(({className:t},e)=>k1("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",className:t||"",children:k1("path",{d:"M478-240q21 0 35.5-14.5T528-290q0-21-14.5-35.5T478-340q-21 0-35.5 14.5T428-290q0 21 14.5 35.5T478-240Zm-36-154h74q0-33 7.5-52t42.5-52q26-26 41-49.5t15-56.5q0-56-41-86t-97-30q-57 0-92.5 30T342-618l66 26q5-18 22.5-39t53.5-21q32 0 48 17.5t16 38.5q0 20-12 37.5T506-526q-44 39-54 59t-10 73Zm38 314q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})}));ii.displayName="HelpIcon";import{jsx as kc}from"react/jsx-runtime";var _1=()=>kc("div",{className:"relative bg-gradient-to-r from-t_main_accent_light to-t_main_accent_dark rounded-full",children:kc("svg",{width:"29",height:"28",viewBox:"0 0 29 28",xmlns:"http://www.w3.org/2000/svg",children:kc("path",{d:"M14.3979 21.5C12.5771 21.5 10.9905 20.8646 9.63805 19.5938C8.28562 18.3229 7.51045 16.7361 7.31253 14.8333H8.93545C9.12017 16.2778 9.73041 17.4722 10.7662 18.4167C11.8019 19.3611 13.0125 19.8333 14.3979 19.8333C15.9417 19.8333 17.2512 19.2674 18.3266 18.1354C19.4019 17.0035 19.9396 15.625 19.9396 14C19.9396 12.375 19.4019 10.9965 18.3266 9.86458C17.2512 8.73264 15.9417 8.16667 14.3979 8.16667C13.4875 8.16667 12.6365 8.38889 11.8448 8.83333C11.0532 9.27778 10.3868 9.88889 9.84587 10.6667H12.0229V12.3333H7.27295V7.33333H8.85628V9.29167C9.5292 8.40278 10.3506 7.71528 11.3203 7.22917C12.2901 6.74306 13.316 6.5 14.3979 6.5C15.3875 6.5 16.3144 6.69792 17.1787 7.09375C18.0429 7.48958 18.795 8.02431 19.4349 8.69792C20.0749 9.37153 20.5828 10.1632 20.9589 11.0729C21.3349 11.9826 21.5229 12.9583 21.5229 14C21.5229 15.0417 21.3349 16.0174 20.9589 16.9271C20.5828 17.8368 20.0749 18.6285 19.4349 19.3021C18.795 19.9757 18.0429 20.5104 17.1787 20.9062C16.3144 21.3021 15.3875 21.5 14.3979 21.5ZM16.6146 17.5L13.6063 14.3333V9.83333H15.1896V13.6667L17.7229 16.3333L16.6146 17.5Z"})})});import{jsx as hS}from"react/jsx-runtime";import{jsx as bS}from"react/jsx-runtime";import{jsx as wS}from"react/jsx-runtime";import{jsx as M1}from"react/jsx-runtime";var I1=()=>M1("svg",{width:"19",height:"19",viewBox:"0 0 19 19",xmlns:"http://www.w3.org/2000/svg",children:M1("path",{d:"M2.5 18.5C1.95 18.5 1.47917 18.3042 1.0875 17.9125C0.695833 17.5208 0.5 17.05 0.5 16.5V2.5C0.5 1.95 0.695833 1.47917 1.0875 1.0875C1.47917 0.695833 1.95 0.5 2.5 0.5H9.5V2.5H2.5V16.5H16.5V9.5H18.5V16.5C18.5 17.05 18.3042 17.5208 17.9125 17.9125C17.5208 18.3042 17.05 18.5 16.5 18.5H2.5ZM7.2 13.2L5.8 11.8L15.1 2.5H11.5V0.5H18.5V7.5H16.5V3.9L7.2 13.2Z"})});import{jsx as SS,jsxs as ES}from"react/jsx-runtime";import{jsx as MS,jsxs as IS}from"react/jsx-runtime";import{jsx as P1}from"react/jsx-runtime";var cs=()=>P1("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",viewBox:"0 -960 960 960",children:P1("path",{d:"M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"})});import{jsx as _c}from"react/jsx-runtime";var N1=()=>_c("div",{className:"relative bg-gradient-to-r from-t_main_accent_light to-t_main_accent_dark rounded-full",children:_c("svg",{width:"29",height:"28",viewBox:"0 0 29 28",xmlns:"http://www.w3.org/2000/svg",children:_c("path",{d:"M12.0373 22.5L11.6791 19.78C11.4851 19.7092 11.3022 19.6242 11.1306 19.525C10.959 19.4258 10.791 19.3196 10.6269 19.2063L7.96269 20.2688L5.5 16.2312L7.80597 14.5738C7.79104 14.4746 7.78358 14.379 7.78358 14.2869V13.7131C7.78358 13.621 7.79104 13.5254 7.80597 13.4262L5.5 11.7688L7.96269 7.73125L10.6269 8.79375C10.791 8.68042 10.9627 8.57417 11.1418 8.475C11.3209 8.37583 11.5 8.29083 11.6791 8.22L12.0373 5.5H16.9627L17.3209 8.22C17.5149 8.29083 17.6978 8.37583 17.8694 8.475C18.041 8.57417 18.209 8.68042 18.3731 8.79375L21.0373 7.73125L23.5 11.7688L21.194 13.4262C21.209 13.5254 21.2164 13.621 21.2164 13.7131V14.2869C21.2164 14.379 21.2015 14.4746 21.1716 14.5738L23.4776 16.2312L21.0149 20.2688L18.3731 19.2063C18.209 19.3196 18.0373 19.4258 17.8582 19.525C17.6791 19.6242 17.5 19.7092 17.3209 19.78L16.9627 22.5H12.0373ZM14.5448 16.975C15.4104 16.975 16.1493 16.6846 16.7612 16.1038C17.3731 15.5229 17.6791 14.8217 17.6791 14C17.6791 13.1783 17.3731 12.4771 16.7612 11.8963C16.1493 11.3154 15.4104 11.025 14.5448 11.025C13.6642 11.025 12.9216 11.3154 12.3172 11.8963C11.7127 12.4771 11.4104 13.1783 11.4104 14C11.4104 14.8217 11.7127 15.5229 12.3172 16.1038C12.9216 16.6846 13.6642 16.975 14.5448 16.975ZM14.5448 15.275C14.1716 15.275 13.8545 15.151 13.5933 14.9031C13.3321 14.6552 13.2015 14.3542 13.2015 14C13.2015 13.6458 13.3321 13.3448 13.5933 13.0969C13.8545 12.849 14.1716 12.725 14.5448 12.725C14.9179 12.725 15.2351 12.849 15.4963 13.0969C15.7575 13.3448 15.8881 13.6458 15.8881 14C15.8881 14.3542 15.7575 14.6552 15.4963 14.9031C15.2351 15.151 14.9179 15.275 14.5448 15.275ZM13.6045 20.8H15.3731L15.6866 18.5475C16.1493 18.4342 16.5784 18.2677 16.9739 18.0481C17.3694 17.8285 17.7313 17.5629 18.0597 17.2513L20.2761 18.1225L21.1493 16.6775L19.2239 15.2963C19.2985 15.0979 19.3507 14.889 19.3806 14.6694C19.4104 14.4498 19.4254 14.2267 19.4254 14C19.4254 13.7733 19.4104 13.5502 19.3806 13.3306C19.3507 13.111 19.2985 12.9021 19.2239 12.7038L21.1493 11.3225L20.2761 9.8775L18.0597 10.77C17.7313 10.4442 17.3694 10.1715 16.9739 9.95188C16.5784 9.73229 16.1493 9.56583 15.6866 9.4525L15.3955 7.2H13.6269L13.3134 9.4525C12.8507 9.56583 12.4216 9.73229 12.0261 9.95188C11.6306 10.1715 11.2687 10.4371 10.9403 10.7488L8.72388 9.8775L7.85075 11.3225L9.77612 12.6825C9.70149 12.895 9.64925 13.1075 9.6194 13.32C9.58955 13.5325 9.57463 13.7592 9.57463 14C9.57463 14.2267 9.58955 14.4462 9.6194 14.6588C9.64925 14.8713 9.70149 15.0837 9.77612 15.2963L7.85075 16.6775L8.72388 18.1225L10.9403 17.23C11.2687 17.5558 11.6306 17.8285 12.0261 18.0481C12.4216 18.2677 12.8507 18.4342 13.3134 18.5475L13.6045 20.8Z"})})});import{jsx as DS}from"react/jsx-runtime";import{jsx as R1}from"react/jsx-runtime";var Mc=()=>R1("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:R1("path",{d:"M4 21V16.75L17.175 3.6C17.375 3.4 17.6 3.25 17.85 3.15C18.1 3.05 18.35 3 18.6 3C18.8667 3 19.1208 3.05 19.3625 3.15C19.6042 3.25 19.8167 3.4 20 3.6L21.4 5C21.6 5.18333 21.75 5.39583 21.85 5.6375C21.95 5.87917 22 6.13333 22 6.4C22 6.65 21.95 6.9 21.85 7.15C21.75 7.4 21.6 7.625 21.4 7.825L8.25 21H4ZM6 19H7.4L17.225 9.2L16.525 8.475L15.8 7.775L6 17.6V19ZM16.525 8.475L15.8 7.775L17.225 9.2L16.525 8.475ZM14 21C15.2333 21 16.375 20.6917 17.425 20.075C18.475 19.4583 19 18.6 19 17.5C19 16.9 18.8417 16.3833 18.525 15.95C18.2083 15.5167 17.7833 15.1417 17.25 14.825L15.775 16.3C16.1583 16.4667 16.4583 16.65 16.675 16.85C16.8917 17.05 17 17.2667 17 17.5C17 17.8833 16.6958 18.2292 16.0875 18.5375C15.4792 18.8458 14.7833 19 14 19C13.7167 19 13.4792 19.0958 13.2875 19.2875C13.0958 19.4792 13 19.7167 13 20C13 20.2833 13.0958 20.5208 13.2875 20.7125C13.4792 20.9042 13.7167 21 14 21ZM4.575 13.35L6.075 11.85C5.74167 11.7167 5.47917 11.5792 5.2875 11.4375C5.09583 11.2958 5 11.15 5 11C5 10.8 5.15 10.6 5.45 10.4C5.75 10.2 6.38333 9.89167 7.35 9.475C8.81667 8.84167 9.79167 8.26667 10.275 7.75C10.7583 7.23333 11 6.65 11 6C11 5.08333 10.6333 4.35417 9.9 3.8125C9.16667 3.27083 8.2 3 7 3C6.25 3 5.57917 3.13333 4.9875 3.4C4.39583 3.66667 3.94167 3.99167 3.625 4.375C3.44167 4.59167 3.36667 4.83333 3.4 5.1C3.43333 5.36667 3.55833 5.58333 3.775 5.75C3.99167 5.93333 4.23333 6.00833 4.5 5.975C4.76667 5.94167 4.99167 5.83333 5.175 5.65C5.40833 5.41667 5.66667 5.25 5.95 5.15C6.23333 5.05 6.58333 5 7 5C7.68333 5 8.1875 5.1 8.5125 5.3C8.8375 5.5 9 5.73333 9 6C9 6.23333 8.85417 6.44583 8.5625 6.6375C8.27083 6.82917 7.6 7.16667 6.55 7.65C5.21667 8.23333 4.29167 8.7625 3.775 9.2375C3.25833 9.7125 3 10.3 3 11C3 11.5333 3.14167 11.9875 3.425 12.3625C3.70833 12.7375 4.09167 13.0667 4.575 13.35Z"})});import{jsx as GS,jsxs as zS}from"react/jsx-runtime";import{jsx as Na,jsxs as B1}from"react/jsx-runtime";var F1=()=>B1("svg",{width:"81",height:"80",viewBox:"0 0 81 80",xmlns:"http://www.w3.org/2000/svg",children:[Na("g",{id:"check_circle_FILL0_wght400_GRAD0_opsz24 (1) 1",children:Na("path",{id:"Vector",d:"M35.8334 55.3332L59.3334 31.8332L54.6667 27.1665L35.8334 45.9998L26.3334 36.4998L21.6667 41.1665L35.8334 55.3332ZM40.5001 73.3332C35.889 73.3332 31.5556 72.4582 27.5001 70.7082C23.4445 68.9582 19.9167 66.5832 16.9167 63.5832C13.9167 60.5832 11.5417 57.0554 9.79175 52.9998C8.04175 48.9443 7.16675 44.6109 7.16675 39.9998C7.16675 35.3887 8.04175 31.0554 9.79175 26.9998C11.5417 22.9443 13.9167 19.4165 16.9167 16.4165C19.9167 13.4165 23.4445 11.0415 27.5001 9.2915C31.5556 7.5415 35.889 6.6665 40.5001 6.6665C45.1112 6.6665 49.4445 7.5415 53.5001 9.2915C57.5556 11.0415 61.0834 13.4165 64.0834 16.4165C67.0834 19.4165 69.4584 22.9443 71.2084 26.9998C72.9584 31.0554 73.8334 35.3887 73.8334 39.9998C73.8334 44.6109 72.9584 48.9443 71.2084 52.9998C69.4584 57.0554 67.0834 60.5832 64.0834 63.5832C61.0834 66.5832 57.5556 68.9582 53.5001 70.7082C49.4445 72.4582 45.1112 73.3332 40.5001 73.3332ZM40.5001 66.6665C47.9445 66.6665 54.2501 64.0832 59.4167 58.9165C64.5834 53.7498 67.1667 47.4443 67.1667 39.9998C67.1667 32.5554 64.5834 26.2498 59.4167 21.0832C54.2501 15.9165 47.9445 13.3332 40.5001 13.3332C33.0556 13.3332 26.7501 15.9165 21.5834 21.0832C16.4167 26.2498 13.8334 32.5554 13.8334 39.9998C13.8334 47.4443 16.4167 53.7498 21.5834 58.9165C26.7501 64.0832 33.0556 66.6665 40.5001 66.6665Z",fill:"url(#paint0_linear_230_393)"})}),Na("defs",{children:B1("linearGradient",{id:"paint0_linear_230_393",x1:"7.16675",y1:"6.6665",x2:"77.4571",y2:"10.7355",gradientUnits:"userSpaceOnUse",children:[Na("stop",{stopColor:"#4CAF50"}),Na("stop",{offset:"1",stopColor:"#2E7D32"})]})})]});import{jsx as L1}from"react/jsx-runtime";var Ic=()=>L1("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:L1("path",{d:"M7 16H12.5C12.7833 16 13.0458 15.9292 13.2875 15.7875C13.5292 15.6458 13.7 15.45 13.8 15.2L15.9 10.3C15.9333 10.2167 15.9583 10.1333 15.975 10.05C15.9917 9.96667 16 9.88333 16 9.8V9C16 8.71667 15.9042 8.47917 15.7125 8.2875C15.5208 8.09583 15.2833 8 15 8H10.4L11 4.6C11.0333 4.43333 11.025 4.275 10.975 4.125C10.925 3.975 10.8417 3.84167 10.725 3.725L10 3L5.4 8C5.26667 8.13333 5.16667 8.28333 5.1 8.45C5.03333 8.61667 5 8.8 5 9V14C5 14.55 5.19583 15.0208 5.5875 15.4125C5.97917 15.8042 6.45 16 7 16ZM10 20C8.61667 20 7.31667 19.7375 6.1 19.2125C4.88333 18.6875 3.825 17.975 2.925 17.075C2.025 16.175 1.3125 15.1167 0.7875 13.9C0.2625 12.6833 0 11.3833 0 10C0 8.61667 0.2625 7.31667 0.7875 6.1C1.3125 4.88333 2.025 3.825 2.925 2.925C3.825 2.025 4.88333 1.3125 6.1 0.7875C7.31667 0.2625 8.61667 0 10 0C11.3833 0 12.6833 0.2625 13.9 0.7875C15.1167 1.3125 16.175 2.025 17.075 2.925C17.975 3.825 18.6875 4.88333 19.2125 6.1C19.7375 7.31667 20 8.61667 20 10C20 11.3833 19.7375 12.6833 19.2125 13.9C18.6875 15.1167 17.975 16.175 17.075 17.075C16.175 17.975 15.1167 18.6875 13.9 19.2125C12.6833 19.7375 11.3833 20 10 20ZM10 18C12.2333 18 14.125 17.225 15.675 15.675C17.225 14.125 18 12.2333 18 10C18 7.76667 17.225 5.875 15.675 4.325C14.125 2.775 12.2333 2 10 2C7.76667 2 5.875 2.775 4.325 4.325C2.775 5.875 2 7.76667 2 10C2 12.2333 2.775 14.125 4.325 15.675C5.875 17.225 7.76667 18 10 18Z"})});import{jsx as D1}from"react/jsx-runtime";var O1=()=>D1("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",viewBox:"0 -960 960 960",width:"16",children:D1("path",{d:"M360-840v-80h240v80H360Zm80 440h80v-240h-80v240Zm40 320q-74 0-139.5-28.5T226-186q-49-49-77.5-114.5T120-440q0-74 28.5-139.5T226-694q49-49 114.5-77.5T480-800q62 0 119 20t107 58l56-56 56 56-56 56q38 50 58 107t20 119q0 74-28.5 139.5T734-186q-49 49-114.5 77.5T480-80Zm0-80q116 0 198-82t82-198q0-116-82-198t-198-82q-116 0-198 82t-82 198q0 116 82 198t198 82Zm0-280Z"})});import{jsx as U1}from"react/jsx-runtime";var H1=()=>U1("svg",{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:U1("path",{d:"M11.5 15C9.825 15 8.40625 14.4188 7.24375 13.2563C6.08125 12.0938 5.5 10.675 5.5 9C5.5 7.325 6.08125 5.90625 7.24375 4.74375C8.40625 3.58125 9.825 3 11.5 3C13.175 3 14.5938 3.58125 15.7563 4.74375C16.9188 5.90625 17.5 7.325 17.5 9C17.5 10.675 16.9188 12.0938 15.7563 13.2563C14.5938 14.4188 13.175 15 11.5 15ZM5.5 14.8125C4.175 14.4625 3.09375 13.75 2.25625 12.675C1.41875 11.6 1 10.375 1 9C1 7.625 1.41875 6.4 2.25625 5.325C3.09375 4.25 4.175 3.5375 5.5 3.1875V4.7625C4.6 5.075 3.875 5.61875 3.325 6.39375C2.775 7.16875 2.5 8.0375 2.5 9C2.5 9.9625 2.775 10.8313 3.325 11.6063C3.875 12.3813 4.6 12.925 5.5 13.2375V14.8125ZM11.5 13.5C12.75 13.5 13.8125 13.0625 14.6875 12.1875C15.5625 11.3125 16 10.25 16 9C16 7.75 15.5625 6.6875 14.6875 5.8125C13.8125 4.9375 12.75 4.5 11.5 4.5C10.25 4.5 9.1875 4.9375 8.3125 5.8125C7.4375 6.6875 7 7.75 7 9C7 10.25 7.4375 11.3125 8.3125 12.1875C9.1875 13.0625 10.25 13.5 11.5 13.5Z",fillOpacity:"0.6"})});import{jsx as V1}from"react/jsx-runtime";var G1=()=>V1("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:V1("path",{d:"M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C12.5083 12.1667 13.2333 11.2 13.65 10H15.75C15.2833 11.7667 14.3333 13.2083 12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z"})});import{jsx as fs,jsxs as z1}from"react/jsx-runtime";var q1=({className:t})=>z1("svg",{fill:"none",height:"400",viewBox:"0 0 400 400",width:"400",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",className:t||"",children:[fs("clipPath",{id:"a",children:fs("path",{d:"m0 0h400v400h-400z"})}),z1("g",{clipPath:"url(#a)",children:[fs("circle",{cx:"200",cy:"200",fill:"#3396ff",r:"199.5",stroke:"#66b1ff"}),fs("path",{d:"m122.519 148.965c42.791-41.729 112.171-41.729 154.962 0l5.15 5.022c2.14 2.086 2.14 5.469 0 7.555l-17.617 17.18c-1.07 1.043-2.804 1.043-3.874 0l-7.087-6.911c-29.853-29.111-78.253-29.111-108.106 0l-7.59 7.401c-1.07 1.043-2.804 1.043-3.874 0l-17.617-17.18c-2.14-2.086-2.14-5.469 0-7.555zm191.397 35.529 15.679 15.29c2.14 2.086 2.14 5.469 0 7.555l-70.7 68.944c-2.139 2.087-5.608 2.087-7.748 0l-50.178-48.931c-.535-.522-1.402-.522-1.937 0l-50.178 48.931c-2.139 2.087-5.608 2.087-7.748 0l-70.7015-68.945c-2.1396-2.086-2.1396-5.469 0-7.555l15.6795-15.29c2.1396-2.086 5.6085-2.086 7.7481 0l50.1789 48.932c.535.522 1.402.522 1.937 0l50.177-48.932c2.139-2.087 5.608-2.087 7.748 0l50.179 48.932c.535.522 1.402.522 1.937 0l50.179-48.931c2.139-2.087 5.608-2.087 7.748 0z",fill:"#fff"})]})]});import{jsx as iE}from"react/jsx-runtime";import{jsx as sE,jsxs as cE}from"react/jsx-runtime";import{jsx as lE,jsxs as uE}from"react/jsx-runtime";import{jsx as W1}from"react/jsx-runtime";var K1=()=>W1("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 50 50",enableBackground:"new 0 0 50 50",children:W1("image",{id:"image0",x:"0",y:"0",href:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABGdBTUEAALGPC/xhBQAAACBjSFJN
12
+ `);import{jsx as s5}from"react/jsx-runtime";var ln=null,ei=null,$o=null,es=null,yc=!1,Yu=()=>{vt||(o5(),n5(),Promise.all([i5(),a5()]).then(t=>{for(let e of t)r5(e);yc=!0}))},ju=async()=>{if(!yc){for(Zu(!0);!yc;)await new Promise(t=>setTimeout(t,10));Zu(!1)}},r5=async t=>{let e=document.createElement("style");e.appendChild(document.createTextNode(jo)),t.appendChild(e)},n5=()=>{let t="xpay-fonts";if(document.querySelector(`style[data-name="${t}"]`))return;let e=document.createElement("style");e.dataset.name=t,e.appendChild(document.createTextNode(Qu)),document.head.appendChild(e)},i5=async()=>{let t=document.createElement("div");return ei=t.attachShadow({mode:"open",delegatesFocus:!0}),t.setAttribute("id","xpay-root"),document.body.appendChild(t),ln=wc(ei),ei},a5=async()=>{let t=document.createElement("div"),e=t.attachShadow({mode:"open"});return t.setAttribute("id","xpay-tx-status"),document.body.appendChild(t),es=wc(e),e},o5=()=>{let t=document.createElement("div");t.setAttribute("id","xpay-init-indicator"),document.body.appendChild(t),$o=wc(t)},Zu=t=>{vt||!$o||(t?$o.render(s5(yf,{})):$o.render(null))};var $u="https://xswap.link/api",ts=t=>{$u=t};async function ti(t,e){let r=await fetch(`${$u}${t}`,{method:"GET",headers:{"Content-Type":"application/json","Cache-Control":"no-cache",...e?.headers},...e});if(!r.ok)throw new Error(`API request failed with status ${r.status}: ${r.statusText}`);return r.json()}async function vc(t,e){return ti("/route",{method:"POST",body:JSON.stringify(t),signal:e})}async function ri(t){return ti(`/chains?data=${JSON.stringify({ecosystem:t})}`)}async function rs(t){return await ti(`/history?${new URLSearchParams({data:JSON.stringify(t)})}`)}async function e1(t){return await ti(`/tokenPrices?${new URLSearchParams({data:JSON.stringify(t)})}`)}async function t1(t){return ti(`/tokenBalances?${new URLSearchParams({data:JSON.stringify(t)})}`)}async function Cc(t){return await ti(`/getTxStatus?${new URLSearchParams({data:JSON.stringify(t)})}`)}async function r1(){return ti("/bridgeTokens")}import{jsxs as TC}from"react/jsx-runtime";import{forwardRef as c5}from"react";import{jsx as f5}from"react/jsx-runtime";var hr=c5(({variant:t,disabled:e,children:r,type:n,value:i,fullWidth:a,onClick:o,className:f="",size:d="medium",secondary:p=!1},h)=>f5("button",{ref:h,type:n||void 0,value:i||void 0,className:`btn ${!t&&e?"btn-disabled":""} ${f} btn-${d} btn-${t}${e?"-disabled":p?"-secondary":""} ${a?"btn--full-width":""}`,disabled:e,onClick:o,children:r}));hr.displayName="Button";import{jsx as ns,jsxs as d5}from"react/jsx-runtime";var n1=({text:t,type:e,className:r,isSnackbar:n,Action:i,Animation:a})=>d5("div",{className:`my-5 mx-0 bg-t_bg_tertiary bg-opacity-10 rounded-2xl max-w-[500px] min-h-[43px] flex items-center text-xs font-medium text-t_text_primary border border-solid ${e==="error"?"border-t_error_dark":e==="warning"?"border-t_warning_dark":e==="info"?"border-t_main_accent_dark":e==="success"?"border-t_success_dark":""} ${n&&"m-0"}`,children:[ns("p",{className:"p-[15px]",children:t}),a&&ns(a,{}),i&&ns("div",{className:`pl-4 fill-t_text_primary text-t_text_primary ${r}`,children:ns(i,{})})]});import{SnackbarContent as l5}from"notistack";import{forwardRef as u5}from"react";import{jsx as i1}from"react/jsx-runtime";var In=u5(({message:t},e)=>{let{text:r,variant:n,className:i,action:a,animation:o}=t;return i1(l5,{ref:e,children:i1(n1,{text:r,type:n,className:i,isSnackbar:!0,Action:a,Animation:o})})});In.displayName="SnackMessage";import{useMemo as p5}from"react";var Ma=()=>p5(()=>({query:async(t,e,r=[])=>t?.provider?await t[e](...r):null,execute:async(t,e,r=[],n={})=>{try{if(t?.provider){let i=await t.estimateGas[e](...r,n);return n.gasLimit||(n.gasLimit=Math.floor(i.toNumber()*hc)),await t[e](...r,n)}return null}catch(i){let a;try{a=t?.interface.parseError(i?.error?.data?.data)}catch{throw i?.error?.data?.message?new Error(i?.error?.data?.message):i}throw new Error(a?.name)}},executeCalldata:async(t,e)=>{try{let r=await t.estimateGas({...e});return await t.sendTransaction({...e,gasLimit:Math.floor(r.toNumber()*hc)})}catch(r){throw r?.error?.data?.message?new Error(r?.error?.data?.message):r}}}),[]),Ac=Ma;import{useCallback as JC}from"react";import{useCallback as h5,useRef as x5}from"react";var a1=({delayMs:t,instantExecution:e})=>{let r=x5(null);return{debounce:h5(i=>{r.current&&(clearTimeout(r.current),r.current=null),e&&e(),r.current=setTimeout(i,t)},[t,e])}};import{useCallback as nA}from"react";var iA=new se.utils.Interface(qu);import{createContext as T5,useCallback as QA,useContext as ZA,useEffect as YA,useState as jA}from"react";import{useAccount as eT}from"wagmi";import y5 from"bignumber.js";import{createContext as w5,useCallback as Ia,useContext as v5,useEffect as Ct,useMemo as lt,useRef as f1,useState as Je}from"react";import{useAccount as C5}from"wagmi";var o1=({supportedChains:t})=>{let e=t.find(r=>r.chainId===Ui)||t[0];if(!e)throw new Error("getDefaultSourceChain > couldn't find default source chain");return e},s1=({supportedChains:t})=>{let e=t.find(r=>r.chainId===Qo)||t[0];if(!e)throw new Error("getDefaultDestinationChain > couldn't find default destination chain");return e},is=(t,e,r,n)=>{if(!t.tokens.some(f=>f.supported))return;let a=t.tokens.find(f=>f.address.toLowerCase()===e.toLowerCase()&&f.supported);if(a)return a;let o=t.tokens.find(f=>r?f.supported&&f.tokenId!==n:f.supported);if(o)return o},m5=({chain:t,bridgeTokensDictionary:e})=>{if(!t)return;let r=t.tokens.find(i=>i.tokenId==="XSWAP");if(r)return r;let n=Object.keys(e[t.chainId]||{})[0];return t.tokens.find(i=>i.address.toLowerCase()===n?.toLowerCase())},Tc=t=>t.swapSupported,Sc=({sourceChain:t,targetChain:e})=>{if(!t)throw new Error("isSwapTargetChainValid > sourceChain should be defined.");return e.swapSupported&&t.supportedDstForSwap?.includes(e.chainId)},Ec=t=>!t||t.bridgeSupported,c1=({sourceChain:t,targetChain:e,sourceToken:r})=>{let n=!0,i=!0,a=!1;return t&&e&&(n=!!t.supportedDstForBridge?.includes(e.chainId)),r&&e&&(i=!!e.tokens.find(o=>o.tokenId===r.tokenId)),t&&e&&(a=t.chainId===e.chainId),i&&!a&&n},b5=({source:t,target:e,supportedChains:r})=>{let n=t.chain||o1({supportedChains:r}),i=e.chain||s1({supportedChains:r}),a=t.token||is(n,lc),o=e.token||is(i,uc,n.chainId===i.chainId,a?.tokenId);if(!n||!i||!a||!o)return{source:{chain:void 0,token:void 0},target:{chain:void 0,token:void 0}};if(!Tc(n)&&(n=o1({supportedChains:r}),a=void 0,!Tc(n)&&(console.error("[WRONG CONFIG] default swap source chain is invalid."),n=r.find(f=>Tc(f)),!n)))throw new Error("mapToValidSwap > None of the chains supports swap. Couldn't set source chain.");if(!Sc({sourceChain:n,targetChain:i})&&(i=s1({supportedChains:r}),o=void 0,!Sc({sourceChain:n,targetChain:i})&&(console.error("[WRONG CONFIG] default swap target chain is invalid."),i=r.find(f=>Sc({sourceChain:n,targetChain:f})),!i)))throw new Error("mapToValidSwap > None of the chains supports swap. Couldn't set target chain.");return a=n.tokens.find(f=>f.tokenId===a?.tokenId&&f.supported),o=i.tokens.find(f=>f.tokenId===o?.tokenId&&f.supported),a||(a=is(n,lc)),(!o||a===o)&&(o=is(i,uc,n.chainId===i.chainId,a?.tokenId)),{source:{chain:n,token:a},target:{chain:i,token:o}}},g5=({source:t,target:e,supportedChains:r,bridgeTokensDictionary:n})=>{let i=t.chain,a=e.chain,o=t.token,f=e.token;if(!Ec(i)&&(i=void 0,o=void 0,!Ec(i)&&(console.error("[WRONG CONFIG] default bridge source chain is invalid."),i=r.find(d=>Ec(d)),!i)))throw new Error("mapToValidSwap > None of the chains supports bridge. Couldn't set source chain.");if(c1({sourceChain:i,targetChain:a,sourceToken:o})||(f=void 0,c1({sourceChain:i,targetChain:a,sourceToken:o})||(a=void 0)),o&&i&&(o=i.tokens.find(d=>d.tokenId===o?.tokenId&&d.supported),o&&(Object.keys(n[i.chainId]?.[o.address.toLowerCase()]||{}).length>0||(o=void 0))),f&&a&&(f=a.tokens.find(d=>d.tokenId===f?.tokenId&&d.supported)),!o){let d=m5({chain:i,bridgeTokensDictionary:n});d&&i&&a&&!!n[i.chainId]?.[d.address.toLowerCase()]?.[a.chainId]?o=d:o=void 0}if(o?.tokenId!==f?.tokenId&&(f=void 0),!f)if(o&&i&&a){let d=n[i.chainId]?.[o.address.toLowerCase()]?.[a.chainId];f=a.tokens.find(h=>h.address.toLowerCase()===d?.toLowerCase())}else f=void 0;return!f&&o&&(a=void 0),{source:{chain:i,token:o},target:{chain:a,token:f}}},as=({type:t,...e})=>t==="SWAP"?b5(e):g5(e);import{jsx as A5}from"react/jsx-runtime";var At=()=>{throw new Error("Not implemented")},nt={bridgeUI:!1,integrationConfig:{},wagmiConfig:{},supportedChains:[],tab:"Swap",overlay:!1,error:"",feeToken:void 0,srcChain:void 0,srcChainTokensOptions:[],srcChainOtherTokensOptions:[],tokenPrices:{},dstChain:void 0,dstChainTokensOptions:[],dstChainOtherTokensOptions:[],srcToken:void 0,dstTokenLocked:!1,dstChainLocked:!1,srcTokenLocked:!1,srcChainLocked:!1,dstToken:void 0,srcValue:"",srcValueWei:"",srcValueUsd:null,dstValue:"",dstValueWei:"",dstValueUsd:null,dstValueMin:"",expressDelivery:!0,infiniteApproval:!0,slippage:"1.5",route:void 0,isAsyncDataLoaded:!1,srcTokenBalanceWei:"",srcTokenBalanceInfo:"-",isFetchingBalance:!1,isFetchingBalances:!1,isFetchingRoute:!1,isExpressDeliveryActive:!0,setTab:At,setError:At,setSrcChain:At,setDstChain:At,setSrcToken:At,setDstToken:At,setSrcValue:At,setExpressDelivery:At,setInfiniteApproval:At,setSlippage:At,setRoute:At,setSrcTokenBalanceWei:At,quoteRoute:At,refreshBalance:At,findTokenDataByAddressAndChain:At,bridgeTokensDictionary:null,onConnectWallet:At,hasOnConnectWalletCallback:!1,srcChainOptions:[],dstChainOptions:[]},d1=w5(nt),l1=({children:t,integrationConfig:e,supportedChains:r,wagmiConfig:n,overlay:i})=>{let{address:a,chainId:o}=C5(),[f,d]=Je(!1),[p,h]=Je(nt.tab),[v,E]=Je(nt.error),[S,A]=Je(nt.expressDelivery),[_,I]=Je(nt.slippage),[N,L]=Je(nt.infiniteApproval),[M,V]=Je(nt.srcChain),[F,B]=Je(nt.dstChain),[J,Q]=Je(nt.feeToken),[G,ne]=Je(nt.srcToken),[W,re]=Je(nt.dstToken),[T,s]=Je(nt.tokenPrices),[l,g]=Je({}),[w,C]=Je([]),[b,y]=Je(nt.srcValue),[m,c]=Je(nt.srcTokenBalanceWei),[x,R]=Je(nt.srcChainTokensOptions),[u,k]=Je(nt.dstChainTokensOptions),[P,O]=Je(nt.srcChainOtherTokensOptions),[z,j]=Je(nt.dstChainOtherTokensOptions),[Y,Z]=Je([]),[Qe,$]=Je([]),[fe,gr]=Je(nt.isFetchingBalance),[Oe,Be]=Je(nt.isFetchingBalances),[zr,Fe]=Je(nt.isFetchingRoute),[ve,zt]=Je(nt.route),Te=f1(null),Le=f1(crypto.randomUUID()),qr=lt(()=>!!e?.srcTokenLocked,[e?.srcTokenLocked]),Ue=lt(()=>!!e?.dstTokenLocked,[e?.dstTokenLocked]),He=lt(()=>!!e?.dstChainLocked,[e?.dstChainLocked]),Wr=lt(()=>!!e?.srcChainLocked,[e?.srcChainLocked]),ae=lt(()=>!!e.bridge,[e.bridge]),Ve=lt(()=>!!(e.onConnectWallet||window.xPayOnConnectWallet),[e.onConnectWallet]),qt=lt(()=>{let K=vt?{}:JSON.parse(localStorage.getItem("custom-tokens")||"{}"),oe={};return r.forEach(ie=>{oe[ie.chainId]={},ie.tokens.forEach(ee=>{oe[ie.chainId][ee.address]=ee})}),mc(oe,K)},[r]),_e=lt(()=>{let K={};return Object.entries(qt).forEach(([oe,ie])=>{K[oe]=Object.entries(ie).filter(([,ee])=>ee.supported).sort(([,ee],[,me])=>me.priority-ee.priority).map(([,ee])=>({chainId:oe,...ee}))}),K},[qt]),de=lt(()=>{if(!w||w.length===0)return null;let K={},oe=(ie,ee,me,le)=>{K[ie]||(K[ie]={}),K[ie][ee]||(K[ie][ee]={}),K[ie][ee][me]=le};for(let ie of w){let ee=Object.entries(ie);if(ee.length!==2)continue;let[me,le]=ee[0],[Ce,ut]=ee[1];oe(me,le,Ce,ut),oe(Ce,ut,me,le)}return Object.keys(K).length>0?K:null},[w]),Kr=lt(()=>G&&M&&T&&T[M.chainId]&&T[M.chainId]?.[G.address]?(Number(b)*Number(T[M.chainId]?.[G.address])).toFixed(2):null,[T,G,b,M]),Se=lt(()=>Yo({amount:b,decimals:G?.decimals||18}),[G?.decimals,b]),Ee=lt(()=>ft({amount:ve?.estAmountOut||"0",decimals:W?.decimals||18,precisionFractionalPlaces:Math.min(8,W?.decimals||18)}),[ve]),Xr=lt(()=>Yo({amount:Ee,decimals:W?.decimals||18}),[W?.decimals,Ee]),Ge=lt(()=>W&&F&&T&&T[F?.chainId]&&T[F?.chainId]?.[W.address]?(Number(Ee)*Number(T[F?.chainId]?.[W.address])).toFixed(2):null,[T,W,Ee,F]),ze=lt(()=>ft({amount:ve?.minAmountOut||"0",decimals:W?.decimals||18,precisionFractionalPlaces:Math.min(4,W?.decimals||18)}),[ve]),yr=lt(()=>S&&!!ve&&X.from(ve.xSwapFees?.expressDeliveryFee||"0").gt("0"),[S,ve]),qe=lt(()=>r.length>0&&w.length>0,[r,w]),We=lt(()=>{if(!G||!m||!a)return"";if(Ht(m).eq(0))return"0";let K=ft({amount:m,decimals:G.decimals,precisionFractionalPlaces:G.decimals});return new y5(K).lt("0.00001")?"<0.00001":ft({amount:m,decimals:G.decimals,precisionFractionalPlaces:5})},[G,m]),Ft=Ia(K=>{if(!K)return[];if(!ae)return _e[K]||[];if(!_e[K]||!de)return[];let oe=Object.keys(de[K]||{});return _e[K].filter(ie=>oe.includes(ie.address))},[de,ae,_e]),Ie=Ia(async()=>{if(!M||!F||!G||!W||!Se||Ht(Se).eq(0)||ae&&!de){zt(void 0);return}let{source:K,target:oe}=as({source:{chain:M,token:G},target:{chain:F,token:W},type:ae?"BRIDGE":"SWAP",supportedChains:r,bridgeTokensDictionary:de||{}});if(!(K.chain?.chainId!==M?.chainId||oe.chain?.chainId!==F?.chainId||K.token?.address!==G?.address||oe.token?.address!==W?.address))try{E(""),Fe(!0),Te.current&&Te.current.abort(pc),Te.current=new AbortController;let ie=await vc({integratorId:e.integratorId,fromChain:M.chainId,toChain:F.chainId,fromAddress:a||It[M.chainId]?.FeeCollector||"",toAddress:a||It[F.chainId]?.FeeCollector||"",fromToken:G.address,toToken:W.address,fromAmount:Se,slippage:Number(_),customContractCalls:e.customContractCalls,paymentToken:ir.AddressZero,expressDelivery:S,infiniteApproval:N},Te.current.signal);zt(ie),Te.current=null}catch(ie){ie!==pc&&(Te.current=null,console.error(ie),E("Could not find route!"),zt(void 0))}finally{Te.current||Fe(!1)}},[a,ae,F,W,vc,yr,_,M,G,Se]),Pe=Ia(async()=>{if(!a||!M?.publicRpcUrls[0]||!G||!G?.address)return;let K=crypto.randomUUID();Le.current=K,gr(!0);let oe=await xc(a,G.address,M?.publicRpcUrls[0]);K===Le.current&&(c(Yo({amount:oe,decimals:G.decimals})),gr(!1))},[a,M,G]),Jr=Ia((K,oe)=>qt[oe]?.[K],[qt]),Ke=Ia(()=>{e.onConnectWallet?e.onConnectWallet():window.xPayOnConnectWallet&&window.xPayOnConnectWallet()},[e]);return Ct(()=>{if(r.length>0){let K=r.map(oe=>oe.chainId);e1({chainId:K}).then(oe=>{s(oe)})}},[r]),Ct(()=>{(async()=>{let K=await r1();C(K)})()},[]),Ct(()=>{Ie()},[Ie]),Ct(()=>{Pe()},[Pe]),Ct(()=>{a&&r.length>0&&(Be(!0),t1({walletAddress:a}).then(K=>{g(K),Be(!1)}))},[a,r.length]),Ct(()=>{Q(M?.tokens.find(({address:K})=>K.toLowerCase()===ir.AddressZero.toLowerCase()))},[M]),Ct(()=>{(async()=>{let K=F?.chainId===M?.chainId,oe=Ft(M?.chainId).filter(({symbol:ce})=>K?ce!==W?.symbol:!0);R(oe);let ie=Ft(F?.chainId).filter(({symbol:ce})=>K?ce!==G?.symbol:!0);k(ie);let ee=[],me=r.filter(({chainId:ce,web3Environment:pe,swapSupported:ot,bridgeSupported:Ne})=>ce!==M?.chainId&&pe==="mainnet"&&(ae&&Ne||!ae&&ot));for(let{chainId:ce}of me)ee.push(...Ft(ce).filter(({symbol:pe})=>ce===F?.chainId?pe!==W?.symbol:!0));O(ee);let le=[],Ce=r.filter(({chainId:ce,web3Environment:pe,swapSupported:ot,bridgeSupported:Ne})=>ce!==F?.chainId&&pe==="mainnet"&&(ae&&Ne&&M?.supportedDstForBridge?.includes(ce)||!ae&&ot&&M?.supportedDstForSwap?.includes(ce)));for(let{chainId:ce}of Ce)le.push(...Ft(ce).filter(({symbol:pe})=>ce===M?.chainId?pe!==G?.symbol:!0));j(le);let ut=ce=>ce.map(pe=>({...pe,balance:X.from(l[pe.chainId]?.[pe.address]||0)}));R(ut(oe)),k(ut(ie)),O(ut(ee)),j(ut(le))})()},[ae,M,F,Ft,r,G?.symbol,W?.symbol,l]),Ct(()=>{let K=r.filter(({web3Environment:ee,swapSupported:me,bridgeSupported:le})=>ee==="mainnet"&&(ae&&le||!ae&&me)),oe=[];if(ae&&F&&W&&de){let ee=K.filter(({chainId:me})=>{let le=de[me]||{};return Object.values(le).some(Ce=>Ce[F.chainId])});oe=K.filter(me=>!ee.some(le=>le.chainId===me.chainId)).map(me=>me.chainId)}let ie=new Set;if(M&&K.filter(ee=>ae?!M.supportedDstForBridge?.includes(ee.chainId):!M.supportedDstForSwap?.includes(ee.chainId)).forEach(ee=>ie.add(ee.chainId)),ae&&M&&de&&!G){let ee=de[M.chainId];ee?K.filter(me=>!Object.values(ee).some(le=>le[me.chainId])).forEach(me=>ie.add(me.chainId)):K.forEach(me=>ie.add(me.chainId))}if(ae&&M&&de&&G){let ee=de[M.chainId]?.[G.address];K.filter(me=>!ee?.[me.chainId]).forEach(me=>ie.add(me.chainId))}Z(gc(K,oe)),$(gc(K,[...ie]))},[r,ae,M,G,F,W,de]),Ct(()=>{if(!o||!f||e?.srcChainId)return;let K=r.find(({chainId:oe})=>oe===`${o}`);K&&V(K)},[o,f,r,e?.srcChainId]),Ct(()=>{f&&(ne(void 0),re(void 0),V(void 0),B(void 0))},[ae]),Ct(()=>{if(f||!r||r.length===0||!de)return;let K=M||e?.srcChainId||(o?`${o}`:void 0)||(ae?void 0:Ui),oe=r.find(({chainId:ot})=>ot===K),ie=F||e?.dstChainId||(ae?void 0:Qo),ee=r.find(({chainId:ot})=>ot===ie),me,le,Ce=bc(e.srcTokenAddr,e?.srcChainId,r),ut=bc(e.dstTokenAddr,e?.dstChainId,r);oe&&(le=oe.tokens.find(({address:ot})=>ot.toLowerCase()===Ce?.toLowerCase())),ee&&(me=ee.tokens.find(({address:ot})=>ot.toLowerCase()===ut));let{source:ce,target:pe}=as({source:{chain:oe,token:le},target:{chain:ee,token:me},type:ae?"BRIDGE":"SWAP",supportedChains:r,bridgeTokensDictionary:de});V(ce.chain),B(pe.chain),ne(ce.token),re(pe.token),d(!0)},[e?.srcChainId,e?.srcTokenAddr,e?.dstChainId,e?.dstTokenAddr,r,ae,o,f,de]),Ct(()=>{if(!de||r.length===0||!f)return;let{source:K,target:oe}=as({source:{chain:M,token:G},target:{chain:F,token:W},type:ae?"BRIDGE":"SWAP",supportedChains:r,bridgeTokensDictionary:de});K.chain?.chainId!==M?.chainId&&V(K.chain),oe.chain?.chainId!==F?.chainId&&B(oe.chain),(K.token?.address!==G?.address||K.token?.name!==G?.name)&&ne(K.token),(oe.token?.address!==W?.address||oe.token?.name!==W?.name)&&re(oe.token)},[M,G,F,W,ae,r,de,f]),Ct(()=>{f&&(e.onDstChainChange?e.onDstChainChange(F?.chainId):window.xPayOnDstChainChange&&window.xPayOnDstChainChange(F?.chainId))},[e.onDstChainChange,F]),Ct(()=>{if(!f)return;let K=W?{address:W.address.toLowerCase(),symbol:W.tokenId}:void 0;e.onDstTokenChange?e.onDstTokenChange(K):window.xPayOnDstTokenChange&&window.xPayOnDstTokenChange(K)},[e.onDstTokenChange,W]),Ct(()=>{f&&(e.onSrcChainChange?e.onSrcChainChange(M?.chainId):window.xPayOnSrcChainChange&&window.xPayOnSrcChainChange(M?.chainId))},[e.onSrcChainChange,M]),Ct(()=>{if(!f)return;let K=G?{address:G.address.toLowerCase(),symbol:G.tokenId}:void 0;e.onSrcTokenChange?e.onSrcTokenChange(K):window.xPayOnSrcTokenChange&&window.xPayOnSrcTokenChange(K)},[e.onSrcTokenChange,G]),A5(d1.Provider,{value:{bridgeUI:ae,integrationConfig:e,wagmiConfig:n,supportedChains:r,tab:p,setTab:h,overlay:i,error:v,setError:E,feeToken:J,srcChain:M,setSrcChain:V,srcChainTokensOptions:x,srcChainOtherTokensOptions:P,srcChainOptions:Y,dstChainOptions:Qe,tokenPrices:T,dstChain:F,setDstChain:B,dstChainTokensOptions:u,dstChainOtherTokensOptions:z,srcToken:G,setSrcToken:ne,dstToken:W,setDstToken:re,srcValue:b,setSrcValue:y,srcValueWei:Se,srcValueUsd:Kr,dstValue:Ee,dstValueWei:Xr,dstValueUsd:Ge,dstValueMin:ze,expressDelivery:S,setExpressDelivery:A,infiniteApproval:N,setInfiniteApproval:L,slippage:_,setSlippage:I,route:ve,setRoute:zt,isAsyncDataLoaded:qe,srcTokenBalanceWei:m,setSrcTokenBalanceWei:c,srcTokenBalanceInfo:We,isFetchingRoute:zr,isFetchingBalance:fe,isFetchingBalances:Oe,isExpressDeliveryActive:yr,quoteRoute:Ie,refreshBalance:Pe,findTokenDataByAddressAndChain:Jr,srcTokenLocked:qr,srcChainLocked:Wr,dstTokenLocked:Ue,dstChainLocked:He,bridgeTokensDictionary:de,onConnectWallet:Ke,hasOnConnectWalletCallback:Ve},children:t})},te=()=>v5(d1);import{jsx as sT}from"react/jsx-runtime";var Pn={rank:0,setRank:()=>{throw new Error("GlobalDataState > setRank is not implemented")},xPower:"0",updateXPower:()=>{throw new Error("GlobalDataState > updateXPower is not implemented")},xSwapBalance:"0",updateXSwapBalance:()=>{throw new Error("GlobalDataState > updateXSwapBalance is not implemented")},unfinishedQuestsCount:0,setUnfinishedQuestsCount:()=>{throw new Error("GlobalDataState > setUnfinishedQuestsCount is not implemented")}},aT=T5({rank:Pn.rank,setRank:Pn.setRank,xPower:Pn.xPower,updateXPower:Pn.updateXPower,xSwapBalance:Pn.xSwapBalance,updateXSwapBalance:Pn.updateXSwapBalance,unfinishedQuestsCount:Pn.unfinishedQuestsCount,setUnfinishedQuestsCount:Pn.setUnfinishedQuestsCount});import{jsx as u1}from"react/jsx-runtime";var ni=()=>u1("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:u1("path",{d:"M5 6.81252L0 1.81252L0.895833 0.916687L5 5.04169L9.10417 0.93752L10 1.83335L5 6.81252Z"})});import{jsx as p1}from"react/jsx-runtime";var os=()=>p1("svg",{width:"15",height:"17",viewBox:"0 0 15 17",xmlns:"http://www.w3.org/2000/svg",children:p1("path",{d:"M9 0.459351L9 10.8957L12.8625 7.15026L15 9.18662L7.5 16.4593L-2.79009e-07 9.18662L2.1375 7.15026L6 10.8957L6 0.459351L9 0.459351Z"})});import{jsx as h1}from"react/jsx-runtime";var x1=()=>h1("svg",{width:"10",height:"16",viewBox:"0 0 10 16",xmlns:"http://www.w3.org/2000/svg",children:h1("path",{d:"M0.5 8L8.13251 15.5L9.5 14.1562L3.20318 8L9.4682 1.84375L8.10071 0.5L0.5 8Z"})});import{jsx as mT}from"react/jsx-runtime";import{jsx as m1}from"react/jsx-runtime";var b1=()=>m1("svg",{width:"14",height:"18",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m1("path",{d:"M3.66665 9.83335V3.85419L1.52081 6.00002L0.333313 4.83335L4.49998 0.666687L8.66665 4.83335L7.47915 6.00002L5.33331 3.85419V9.83335H3.66665ZM9.49998 17.3334L5.33331 13.1667L6.52081 12L8.66665 14.1459V8.16669H10.3333V14.1459L12.4791 12L13.6666 13.1667L9.49998 17.3334Z",fill:"white"})});import{jsx as vT}from"react/jsx-runtime";import{jsx as TT}from"react/jsx-runtime";import{jsx as kT,jsxs as _T}from"react/jsx-runtime";import{jsx as Hr,jsxs as S5}from"react/jsx-runtime";var g1=()=>S5("svg",{width:"97",height:"31",viewBox:"0 0 97 31",xmlns:"http://www.w3.org/2000/svg",children:[Hr("path",{d:"M33.5297 15.3088C33.5018 14.6173 33.6103 13.9272 33.8488 13.2781C34.0874 12.629 34.4512 12.0339 34.9195 11.5271C35.3877 11.0203 35.951 10.6119 36.5769 10.3253C37.2028 10.0387 37.8789 9.87969 38.5661 9.85742H38.7797C41.4359 9.85742 43.0036 11.4299 43.4671 13.2698L41.8161 13.8254C41.6678 13.1398 41.2795 12.5307 40.7221 12.1092C40.1647 11.6878 39.4753 11.482 38.7797 11.5295C37.0609 11.5295 35.337 12.7928 35.337 15.3402C35.337 17.8877 37.0193 19.1038 38.8005 19.1038C39.4996 19.123 40.1848 18.9057 40.7466 18.4866C41.3085 18.0675 41.7144 17.4709 41.8994 16.7922L43.5192 17.3164C43.2396 18.3517 42.6177 19.2602 41.7561 19.892C40.8945 20.5238 39.8446 20.8411 38.7797 20.7916C37.4116 20.8169 36.0895 20.2944 35.1041 19.339C34.1187 18.3836 33.5505 17.0735 33.5245 15.6967C33.5193 15.5709 33.5245 15.4398 33.5297 15.3088Z"}),Hr("path",{d:"M46.7328 20.5504H45.0245V9.82593H46.7328V14.0193C46.9808 13.7233 47.2927 13.4881 47.6447 13.3319C47.9968 13.1756 48.3796 13.1024 48.764 13.1177C50.5297 13.1177 51.3682 14.3914 51.3682 15.9797V20.5504H49.7224V16.2837C49.7717 15.92 49.677 15.5513 49.4588 15.2572C49.2406 14.963 48.9162 14.7669 48.5557 14.7112C48.4535 14.7006 48.3506 14.7006 48.2484 14.7112C47.8534 14.7112 47.4745 14.8691 47.1951 15.1503C46.9158 15.4314 46.7588 15.8127 46.7588 16.2103C46.7562 16.254 46.7562 16.2977 46.7588 16.3414L46.7328 20.5504Z"}),Hr("path",{d:"M55.201 16.42L57.0344 16.1317C57.451 16.0792 57.5552 15.8643 57.5552 15.6075C57.5552 14.9995 57.1489 14.512 56.201 14.512C55.843 14.4828 55.4881 14.5969 55.2131 14.8295C54.9382 15.0621 54.7654 15.3943 54.7323 15.7543V15.8329L53.1698 15.4817C53.3 14.2342 54.425 13.1229 56.1854 13.1229C58.3937 13.1229 59.2323 14.3809 59.2323 15.8486V19.4287C59.2305 19.8166 59.2601 20.204 59.3208 20.5871H57.7583C57.702 20.283 57.6793 19.9737 57.6906 19.6646C57.4534 20.0319 57.1247 20.3302 56.7372 20.5298C56.3498 20.7294 55.9171 20.8233 55.4823 20.802C54.8885 20.8514 54.2994 20.6616 53.8444 20.2745C53.3894 19.8873 53.1056 19.3343 53.0552 18.7368C53.0552 18.7001 53.0552 18.6634 53.0552 18.632C53.0292 17.3058 53.9719 16.5929 55.201 16.42ZM57.5656 17.5784V17.2481L55.6958 17.5312C55.442 17.5393 55.2011 17.6458 55.0235 17.8285C54.8459 18.0111 54.7453 18.2558 54.7427 18.5114C54.7447 18.638 54.7718 18.763 54.8223 18.879C54.8728 18.995 54.9457 19.0998 55.0369 19.1871C55.128 19.2744 55.2355 19.3426 55.3531 19.3877C55.4707 19.4328 55.5961 19.4538 55.7219 19.4497H55.8C56.0132 19.4721 56.2287 19.4519 56.4341 19.3902C56.6395 19.3284 56.8307 19.2264 56.9967 19.09C57.1628 18.9536 57.3004 18.7855 57.4016 18.5953C57.5028 18.4051 57.5656 18.1967 57.5864 17.982C57.5939 17.8469 57.5851 17.7114 57.5604 17.5784H57.5656Z"}),Hr("path",{d:"M62.1391 9.67906C62.2859 9.67699 62.4316 9.70412 62.568 9.7589C62.7043 9.81369 62.8286 9.89505 62.9336 9.99831C63.0386 10.1016 63.1223 10.2247 63.1799 10.3606C63.2375 10.4965 63.2679 10.6425 63.2693 10.7903C63.2692 11.0115 63.2042 11.2277 63.0824 11.4118C62.9606 11.5959 62.7875 11.7397 62.5847 11.8251C62.382 11.9104 62.1587 11.9335 61.9429 11.8915C61.7271 11.8495 61.5285 11.7442 61.3721 11.5889C61.2156 11.4336 61.1082 11.2352 61.0635 11.0186C61.0187 10.8021 61.0386 10.577 61.1205 10.3718C61.2025 10.1666 61.3429 9.99035 61.5241 9.86522C61.7054 9.74009 61.9193 9.67168 62.1391 9.66858V9.67906ZM61.3057 20.5818V13.3378H63.014V20.5503L61.3057 20.5818Z"}),Hr("path",{d:"M66.905 20.5505H65.2018V13.3379H66.8633V14.2971C67.0799 13.9288 67.391 13.6259 67.764 13.4202C68.1369 13.2145 68.558 13.1137 68.9831 13.1282C70.7331 13.1282 71.5872 14.4019 71.5872 15.9902V20.5505H69.8841V16.2837C69.8841 15.3979 69.4831 14.6797 68.4102 14.6797C68.2118 14.6811 68.0157 14.7218 67.8329 14.7995C67.6502 14.8771 67.4845 14.9902 67.3452 15.1324C67.2059 15.2745 67.0958 15.4429 67.0211 15.6278C66.9465 15.8128 66.9088 16.0107 66.9102 16.2103C66.9102 16.268 66.9102 16.3256 66.9102 16.3833L66.905 20.5505Z"}),Hr("path",{d:"M73.6491 20.5504V9.82593H75.3574V20.5504H73.6491Z"}),Hr("path",{d:"M78.4048 9.67909C78.6246 9.67805 78.8398 9.74278 79.0231 9.86506C79.2063 9.98735 79.3493 10.1617 79.4339 10.3659C79.5185 10.5701 79.5409 10.795 79.4983 11.0121C79.4556 11.2292 79.3499 11.4286 79.1944 11.585C79.039 11.7415 78.8408 11.8479 78.6251 11.8908C78.4094 11.9338 78.186 11.9112 77.983 11.8261C77.7801 11.7409 77.6069 11.597 77.4854 11.4126C77.3639 11.2282 77.2996 11.0116 77.3006 10.7903C77.3033 10.4965 77.4205 10.2154 77.627 10.0076C77.8335 9.79978 78.1128 9.68182 78.4048 9.67909ZM77.5662 20.5818V13.3378H79.2589V20.5504L77.5662 20.5818Z"}),Hr("path",{d:"M83.1752 20.5506H81.4669V13.338H83.1284V14.2972C83.3454 13.9293 83.6566 13.6267 84.0295 13.4211C84.4023 13.2155 84.8232 13.1144 85.2482 13.1283C86.9981 13.1283 87.8523 14.4021 87.8523 15.9903V20.5506H86.144V16.2839C86.1933 15.9201 86.0986 15.5515 85.8804 15.2573C85.6622 14.9632 85.3378 14.7671 84.9773 14.7113C84.8734 14.7008 84.7687 14.7008 84.6648 14.7113C84.267 14.7155 83.8868 14.8775 83.6069 15.1621C83.327 15.4467 83.17 15.831 83.17 16.2314C83.1647 16.2925 83.1647 16.3539 83.17 16.4149L83.1752 20.5506Z"}),Hr("path",{d:"M93.6805 16.383L96.6857 20.5764H94.6024L92.5191 17.6044L91.6389 18.5374V20.5502H89.9462V9.82568H91.6389V16.252L94.3888 13.3376H96.6545L93.6805 16.383Z"}),Hr("path",{d:"M13.3059 6.922L20.6913 11.1887V19.7642L13.3268 24.0571L5.9466 19.8009V11.2307L13.3059 6.922ZM13.3059 0.631958L10.5976 2.20447L3.22266 6.51314L0.514343 8.08565V22.9564L3.22266 24.5289L10.608 28.7956L13.3163 30.3681L16.0247 28.7956L23.384 24.4974L26.0923 22.9249V8.03324L23.384 6.46073L16.0038 2.20447L13.2955 0.631958H13.3059Z"})]});import{jsx as y1}from"react/jsx-runtime";var ss=()=>y1("svg",{width:"17",height:"14",viewBox:"0 0 17 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y1("path",{d:"M5.7 13.0125L0 7.31255L1.425 5.88755L5.7 10.1625L14.875 0.987549L16.3 2.41255L5.7 13.0125Z",fill:"#2E7D32"})});import{jsx as FT}from"react/jsx-runtime";import{jsx as OT}from"react/jsx-runtime";import{jsx as VT,jsxs as GT}from"react/jsx-runtime";import{jsx as w1}from"react/jsx-runtime";var at=({className:t})=>w1("svg",{height:"18",width:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10.312 8.319",className:t||"",children:w1("path",{d:"M6.073 4.078 10.151 0H9.093A1.87 1.87 0 0 0 7.77.548L5.157 3.162 2.543.548A1.87 1.87 0 0 0 1.22 0H.161L4.24 4.078 0 8.318h1.058a1.87 1.87 0 0 0 1.322-.547l2.777-2.777 2.776 2.777a1.869 1.869 0 0 0 1.322.548h1.058Z"})});import{jsx as XT}from"react/jsx-runtime";import{jsx as v1}from"react/jsx-runtime";var C1=({className:t})=>v1("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24",className:t||"",children:v1("path",{d:"M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"})});import{jsx as A1}from"react/jsx-runtime";var T1=()=>A1("svg",{width:"6",height:"7",viewBox:"0 0 6 7",xmlns:"http://www.w3.org/2000/svg",children:A1("circle",{cx:"3",cy:"3.91418",r:"3",fill:"#4CAF50"})});import{jsx as eS}from"react/jsx-runtime";import{jsx as nS,jsxs as iS}from"react/jsx-runtime";import{jsx as Pa,jsxs as S1}from"react/jsx-runtime";var E1=()=>S1("svg",{width:"81",height:"80",viewBox:"0 0 81 80",xmlns:"http://www.w3.org/2000/svg",children:[Pa("g",{id:"error_FILL0_wght400_GRAD0_opsz24 1",children:Pa("path",{id:"Vector",d:"M40.5001 56.6667C41.4445 56.6667 42.2362 56.3473 42.8751 55.7084C43.514 55.0695 43.8334 54.2779 43.8334 53.3334C43.8334 52.389 43.514 51.5973 42.8751 50.9584C42.2362 50.3195 41.4445 50.0001 40.5001 50.0001C39.5556 50.0001 38.764 50.3195 38.1251 50.9584C37.4862 51.5973 37.1667 52.389 37.1667 53.3334C37.1667 54.2779 37.4862 55.0695 38.1251 55.7084C38.764 56.3473 39.5556 56.6667 40.5001 56.6667ZM37.1667 43.3334H43.8334V23.3334H37.1667V43.3334ZM40.5001 73.3334C35.889 73.3334 31.5556 72.4584 27.5001 70.7084C23.4445 68.9584 19.9167 66.5834 16.9167 63.5834C13.9167 60.5834 11.5417 57.0556 9.79175 53.0001C8.04175 48.9445 7.16675 44.6112 7.16675 40.0001C7.16675 35.389 8.04175 31.0556 9.79175 27.0001C11.5417 22.9445 13.9167 19.4167 16.9167 16.4167C19.9167 13.4167 23.4445 11.0417 27.5001 9.29175C31.5556 7.54175 35.889 6.66675 40.5001 6.66675C45.1112 6.66675 49.4445 7.54175 53.5001 9.29175C57.5556 11.0417 61.0834 13.4167 64.0834 16.4167C67.0834 19.4167 69.4584 22.9445 71.2084 27.0001C72.9584 31.0556 73.8334 35.389 73.8334 40.0001C73.8334 44.6112 72.9584 48.9445 71.2084 53.0001C69.4584 57.0556 67.0834 60.5834 64.0834 63.5834C61.0834 66.5834 57.5556 68.9584 53.5001 70.7084C49.4445 72.4584 45.1112 73.3334 40.5001 73.3334ZM40.5001 66.6667C47.9445 66.6667 54.2501 64.0834 59.4167 58.9167C64.5834 53.7501 67.1667 47.4445 67.1667 40.0001C67.1667 32.5556 64.5834 26.2501 59.4167 21.0834C54.2501 15.9167 47.9445 13.3334 40.5001 13.3334C33.0556 13.3334 26.7501 15.9167 21.5834 21.0834C16.4167 26.2501 13.8334 32.5556 13.8334 40.0001C13.8334 47.4445 16.4167 53.7501 21.5834 58.9167C26.7501 64.0834 33.0556 66.6667 40.5001 66.6667Z",fill:"url(#paint0_linear_230_166)"})}),Pa("defs",{children:S1("linearGradient",{id:"paint0_linear_230_166",x1:"7.16675",y1:"6.66675",x2:"77.4571",y2:"10.7358",gradientUnits:"userSpaceOnUse",children:[Pa("stop",{stopColor:"#F44336"}),Pa("stop",{offset:"1",stopColor:"#C62828"})]})})]});import{forwardRef as E5}from"react";import{jsx as k1}from"react/jsx-runtime";var ii=E5(({className:t},e)=>k1("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",className:t||"",children:k1("path",{d:"M478-240q21 0 35.5-14.5T528-290q0-21-14.5-35.5T478-340q-21 0-35.5 14.5T428-290q0 21 14.5 35.5T478-240Zm-36-154h74q0-33 7.5-52t42.5-52q26-26 41-49.5t15-56.5q0-56-41-86t-97-30q-57 0-92.5 30T342-618l66 26q5-18 22.5-39t53.5-21q32 0 48 17.5t16 38.5q0 20-12 37.5T506-526q-44 39-54 59t-10 73Zm38 314q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})}));ii.displayName="HelpIcon";import{jsx as kc}from"react/jsx-runtime";var _1=()=>kc("div",{className:"relative bg-gradient-to-r from-t_main_accent_light to-t_main_accent_dark rounded-full",children:kc("svg",{width:"29",height:"28",viewBox:"0 0 29 28",xmlns:"http://www.w3.org/2000/svg",children:kc("path",{d:"M14.3979 21.5C12.5771 21.5 10.9905 20.8646 9.63805 19.5938C8.28562 18.3229 7.51045 16.7361 7.31253 14.8333H8.93545C9.12017 16.2778 9.73041 17.4722 10.7662 18.4167C11.8019 19.3611 13.0125 19.8333 14.3979 19.8333C15.9417 19.8333 17.2512 19.2674 18.3266 18.1354C19.4019 17.0035 19.9396 15.625 19.9396 14C19.9396 12.375 19.4019 10.9965 18.3266 9.86458C17.2512 8.73264 15.9417 8.16667 14.3979 8.16667C13.4875 8.16667 12.6365 8.38889 11.8448 8.83333C11.0532 9.27778 10.3868 9.88889 9.84587 10.6667H12.0229V12.3333H7.27295V7.33333H8.85628V9.29167C9.5292 8.40278 10.3506 7.71528 11.3203 7.22917C12.2901 6.74306 13.316 6.5 14.3979 6.5C15.3875 6.5 16.3144 6.69792 17.1787 7.09375C18.0429 7.48958 18.795 8.02431 19.4349 8.69792C20.0749 9.37153 20.5828 10.1632 20.9589 11.0729C21.3349 11.9826 21.5229 12.9583 21.5229 14C21.5229 15.0417 21.3349 16.0174 20.9589 16.9271C20.5828 17.8368 20.0749 18.6285 19.4349 19.3021C18.795 19.9757 18.0429 20.5104 17.1787 20.9062C16.3144 21.3021 15.3875 21.5 14.3979 21.5ZM16.6146 17.5L13.6063 14.3333V9.83333H15.1896V13.6667L17.7229 16.3333L16.6146 17.5Z"})})});import{jsx as hS}from"react/jsx-runtime";import{jsx as bS}from"react/jsx-runtime";import{jsx as wS}from"react/jsx-runtime";import{jsx as M1}from"react/jsx-runtime";var I1=()=>M1("svg",{width:"19",height:"19",viewBox:"0 0 19 19",xmlns:"http://www.w3.org/2000/svg",children:M1("path",{d:"M2.5 18.5C1.95 18.5 1.47917 18.3042 1.0875 17.9125C0.695833 17.5208 0.5 17.05 0.5 16.5V2.5C0.5 1.95 0.695833 1.47917 1.0875 1.0875C1.47917 0.695833 1.95 0.5 2.5 0.5H9.5V2.5H2.5V16.5H16.5V9.5H18.5V16.5C18.5 17.05 18.3042 17.5208 17.9125 17.9125C17.5208 18.3042 17.05 18.5 16.5 18.5H2.5ZM7.2 13.2L5.8 11.8L15.1 2.5H11.5V0.5H18.5V7.5H16.5V3.9L7.2 13.2Z"})});import{jsx as SS,jsxs as ES}from"react/jsx-runtime";import{jsx as MS,jsxs as IS}from"react/jsx-runtime";import{jsx as P1}from"react/jsx-runtime";var cs=()=>P1("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",viewBox:"0 -960 960 960",children:P1("path",{d:"M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"})});import{jsx as _c}from"react/jsx-runtime";var N1=()=>_c("div",{className:"relative bg-gradient-to-r from-t_main_accent_light to-t_main_accent_dark rounded-full",children:_c("svg",{width:"29",height:"28",viewBox:"0 0 29 28",xmlns:"http://www.w3.org/2000/svg",children:_c("path",{d:"M12.0373 22.5L11.6791 19.78C11.4851 19.7092 11.3022 19.6242 11.1306 19.525C10.959 19.4258 10.791 19.3196 10.6269 19.2063L7.96269 20.2688L5.5 16.2312L7.80597 14.5738C7.79104 14.4746 7.78358 14.379 7.78358 14.2869V13.7131C7.78358 13.621 7.79104 13.5254 7.80597 13.4262L5.5 11.7688L7.96269 7.73125L10.6269 8.79375C10.791 8.68042 10.9627 8.57417 11.1418 8.475C11.3209 8.37583 11.5 8.29083 11.6791 8.22L12.0373 5.5H16.9627L17.3209 8.22C17.5149 8.29083 17.6978 8.37583 17.8694 8.475C18.041 8.57417 18.209 8.68042 18.3731 8.79375L21.0373 7.73125L23.5 11.7688L21.194 13.4262C21.209 13.5254 21.2164 13.621 21.2164 13.7131V14.2869C21.2164 14.379 21.2015 14.4746 21.1716 14.5738L23.4776 16.2312L21.0149 20.2688L18.3731 19.2063C18.209 19.3196 18.0373 19.4258 17.8582 19.525C17.6791 19.6242 17.5 19.7092 17.3209 19.78L16.9627 22.5H12.0373ZM14.5448 16.975C15.4104 16.975 16.1493 16.6846 16.7612 16.1038C17.3731 15.5229 17.6791 14.8217 17.6791 14C17.6791 13.1783 17.3731 12.4771 16.7612 11.8963C16.1493 11.3154 15.4104 11.025 14.5448 11.025C13.6642 11.025 12.9216 11.3154 12.3172 11.8963C11.7127 12.4771 11.4104 13.1783 11.4104 14C11.4104 14.8217 11.7127 15.5229 12.3172 16.1038C12.9216 16.6846 13.6642 16.975 14.5448 16.975ZM14.5448 15.275C14.1716 15.275 13.8545 15.151 13.5933 14.9031C13.3321 14.6552 13.2015 14.3542 13.2015 14C13.2015 13.6458 13.3321 13.3448 13.5933 13.0969C13.8545 12.849 14.1716 12.725 14.5448 12.725C14.9179 12.725 15.2351 12.849 15.4963 13.0969C15.7575 13.3448 15.8881 13.6458 15.8881 14C15.8881 14.3542 15.7575 14.6552 15.4963 14.9031C15.2351 15.151 14.9179 15.275 14.5448 15.275ZM13.6045 20.8H15.3731L15.6866 18.5475C16.1493 18.4342 16.5784 18.2677 16.9739 18.0481C17.3694 17.8285 17.7313 17.5629 18.0597 17.2513L20.2761 18.1225L21.1493 16.6775L19.2239 15.2963C19.2985 15.0979 19.3507 14.889 19.3806 14.6694C19.4104 14.4498 19.4254 14.2267 19.4254 14C19.4254 13.7733 19.4104 13.5502 19.3806 13.3306C19.3507 13.111 19.2985 12.9021 19.2239 12.7038L21.1493 11.3225L20.2761 9.8775L18.0597 10.77C17.7313 10.4442 17.3694 10.1715 16.9739 9.95188C16.5784 9.73229 16.1493 9.56583 15.6866 9.4525L15.3955 7.2H13.6269L13.3134 9.4525C12.8507 9.56583 12.4216 9.73229 12.0261 9.95188C11.6306 10.1715 11.2687 10.4371 10.9403 10.7488L8.72388 9.8775L7.85075 11.3225L9.77612 12.6825C9.70149 12.895 9.64925 13.1075 9.6194 13.32C9.58955 13.5325 9.57463 13.7592 9.57463 14C9.57463 14.2267 9.58955 14.4462 9.6194 14.6588C9.64925 14.8713 9.70149 15.0837 9.77612 15.2963L7.85075 16.6775L8.72388 18.1225L10.9403 17.23C11.2687 17.5558 11.6306 17.8285 12.0261 18.0481C12.4216 18.2677 12.8507 18.4342 13.3134 18.5475L13.6045 20.8Z"})})});import{jsx as DS}from"react/jsx-runtime";import{jsx as R1}from"react/jsx-runtime";var Mc=()=>R1("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:R1("path",{d:"M4 21V16.75L17.175 3.6C17.375 3.4 17.6 3.25 17.85 3.15C18.1 3.05 18.35 3 18.6 3C18.8667 3 19.1208 3.05 19.3625 3.15C19.6042 3.25 19.8167 3.4 20 3.6L21.4 5C21.6 5.18333 21.75 5.39583 21.85 5.6375C21.95 5.87917 22 6.13333 22 6.4C22 6.65 21.95 6.9 21.85 7.15C21.75 7.4 21.6 7.625 21.4 7.825L8.25 21H4ZM6 19H7.4L17.225 9.2L16.525 8.475L15.8 7.775L6 17.6V19ZM16.525 8.475L15.8 7.775L17.225 9.2L16.525 8.475ZM14 21C15.2333 21 16.375 20.6917 17.425 20.075C18.475 19.4583 19 18.6 19 17.5C19 16.9 18.8417 16.3833 18.525 15.95C18.2083 15.5167 17.7833 15.1417 17.25 14.825L15.775 16.3C16.1583 16.4667 16.4583 16.65 16.675 16.85C16.8917 17.05 17 17.2667 17 17.5C17 17.8833 16.6958 18.2292 16.0875 18.5375C15.4792 18.8458 14.7833 19 14 19C13.7167 19 13.4792 19.0958 13.2875 19.2875C13.0958 19.4792 13 19.7167 13 20C13 20.2833 13.0958 20.5208 13.2875 20.7125C13.4792 20.9042 13.7167 21 14 21ZM4.575 13.35L6.075 11.85C5.74167 11.7167 5.47917 11.5792 5.2875 11.4375C5.09583 11.2958 5 11.15 5 11C5 10.8 5.15 10.6 5.45 10.4C5.75 10.2 6.38333 9.89167 7.35 9.475C8.81667 8.84167 9.79167 8.26667 10.275 7.75C10.7583 7.23333 11 6.65 11 6C11 5.08333 10.6333 4.35417 9.9 3.8125C9.16667 3.27083 8.2 3 7 3C6.25 3 5.57917 3.13333 4.9875 3.4C4.39583 3.66667 3.94167 3.99167 3.625 4.375C3.44167 4.59167 3.36667 4.83333 3.4 5.1C3.43333 5.36667 3.55833 5.58333 3.775 5.75C3.99167 5.93333 4.23333 6.00833 4.5 5.975C4.76667 5.94167 4.99167 5.83333 5.175 5.65C5.40833 5.41667 5.66667 5.25 5.95 5.15C6.23333 5.05 6.58333 5 7 5C7.68333 5 8.1875 5.1 8.5125 5.3C8.8375 5.5 9 5.73333 9 6C9 6.23333 8.85417 6.44583 8.5625 6.6375C8.27083 6.82917 7.6 7.16667 6.55 7.65C5.21667 8.23333 4.29167 8.7625 3.775 9.2375C3.25833 9.7125 3 10.3 3 11C3 11.5333 3.14167 11.9875 3.425 12.3625C3.70833 12.7375 4.09167 13.0667 4.575 13.35Z"})});import{jsx as GS,jsxs as zS}from"react/jsx-runtime";import{jsx as Na,jsxs as B1}from"react/jsx-runtime";var F1=()=>B1("svg",{width:"81",height:"80",viewBox:"0 0 81 80",xmlns:"http://www.w3.org/2000/svg",children:[Na("g",{id:"check_circle_FILL0_wght400_GRAD0_opsz24 (1) 1",children:Na("path",{id:"Vector",d:"M35.8334 55.3332L59.3334 31.8332L54.6667 27.1665L35.8334 45.9998L26.3334 36.4998L21.6667 41.1665L35.8334 55.3332ZM40.5001 73.3332C35.889 73.3332 31.5556 72.4582 27.5001 70.7082C23.4445 68.9582 19.9167 66.5832 16.9167 63.5832C13.9167 60.5832 11.5417 57.0554 9.79175 52.9998C8.04175 48.9443 7.16675 44.6109 7.16675 39.9998C7.16675 35.3887 8.04175 31.0554 9.79175 26.9998C11.5417 22.9443 13.9167 19.4165 16.9167 16.4165C19.9167 13.4165 23.4445 11.0415 27.5001 9.2915C31.5556 7.5415 35.889 6.6665 40.5001 6.6665C45.1112 6.6665 49.4445 7.5415 53.5001 9.2915C57.5556 11.0415 61.0834 13.4165 64.0834 16.4165C67.0834 19.4165 69.4584 22.9443 71.2084 26.9998C72.9584 31.0554 73.8334 35.3887 73.8334 39.9998C73.8334 44.6109 72.9584 48.9443 71.2084 52.9998C69.4584 57.0554 67.0834 60.5832 64.0834 63.5832C61.0834 66.5832 57.5556 68.9582 53.5001 70.7082C49.4445 72.4582 45.1112 73.3332 40.5001 73.3332ZM40.5001 66.6665C47.9445 66.6665 54.2501 64.0832 59.4167 58.9165C64.5834 53.7498 67.1667 47.4443 67.1667 39.9998C67.1667 32.5554 64.5834 26.2498 59.4167 21.0832C54.2501 15.9165 47.9445 13.3332 40.5001 13.3332C33.0556 13.3332 26.7501 15.9165 21.5834 21.0832C16.4167 26.2498 13.8334 32.5554 13.8334 39.9998C13.8334 47.4443 16.4167 53.7498 21.5834 58.9165C26.7501 64.0832 33.0556 66.6665 40.5001 66.6665Z",fill:"url(#paint0_linear_230_393)"})}),Na("defs",{children:B1("linearGradient",{id:"paint0_linear_230_393",x1:"7.16675",y1:"6.6665",x2:"77.4571",y2:"10.7355",gradientUnits:"userSpaceOnUse",children:[Na("stop",{stopColor:"#4CAF50"}),Na("stop",{offset:"1",stopColor:"#2E7D32"})]})})]});import{jsx as L1}from"react/jsx-runtime";var Ic=()=>L1("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:L1("path",{d:"M7 16H12.5C12.7833 16 13.0458 15.9292 13.2875 15.7875C13.5292 15.6458 13.7 15.45 13.8 15.2L15.9 10.3C15.9333 10.2167 15.9583 10.1333 15.975 10.05C15.9917 9.96667 16 9.88333 16 9.8V9C16 8.71667 15.9042 8.47917 15.7125 8.2875C15.5208 8.09583 15.2833 8 15 8H10.4L11 4.6C11.0333 4.43333 11.025 4.275 10.975 4.125C10.925 3.975 10.8417 3.84167 10.725 3.725L10 3L5.4 8C5.26667 8.13333 5.16667 8.28333 5.1 8.45C5.03333 8.61667 5 8.8 5 9V14C5 14.55 5.19583 15.0208 5.5875 15.4125C5.97917 15.8042 6.45 16 7 16ZM10 20C8.61667 20 7.31667 19.7375 6.1 19.2125C4.88333 18.6875 3.825 17.975 2.925 17.075C2.025 16.175 1.3125 15.1167 0.7875 13.9C0.2625 12.6833 0 11.3833 0 10C0 8.61667 0.2625 7.31667 0.7875 6.1C1.3125 4.88333 2.025 3.825 2.925 2.925C3.825 2.025 4.88333 1.3125 6.1 0.7875C7.31667 0.2625 8.61667 0 10 0C11.3833 0 12.6833 0.2625 13.9 0.7875C15.1167 1.3125 16.175 2.025 17.075 2.925C17.975 3.825 18.6875 4.88333 19.2125 6.1C19.7375 7.31667 20 8.61667 20 10C20 11.3833 19.7375 12.6833 19.2125 13.9C18.6875 15.1167 17.975 16.175 17.075 17.075C16.175 17.975 15.1167 18.6875 13.9 19.2125C12.6833 19.7375 11.3833 20 10 20ZM10 18C12.2333 18 14.125 17.225 15.675 15.675C17.225 14.125 18 12.2333 18 10C18 7.76667 17.225 5.875 15.675 4.325C14.125 2.775 12.2333 2 10 2C7.76667 2 5.875 2.775 4.325 4.325C2.775 5.875 2 7.76667 2 10C2 12.2333 2.775 14.125 4.325 15.675C5.875 17.225 7.76667 18 10 18Z"})});import{jsx as D1}from"react/jsx-runtime";var O1=()=>D1("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",viewBox:"0 -960 960 960",width:"16",children:D1("path",{d:"M360-840v-80h240v80H360Zm80 440h80v-240h-80v240Zm40 320q-74 0-139.5-28.5T226-186q-49-49-77.5-114.5T120-440q0-74 28.5-139.5T226-694q49-49 114.5-77.5T480-800q62 0 119 20t107 58l56-56 56 56-56 56q38 50 58 107t20 119q0 74-28.5 139.5T734-186q-49 49-114.5 77.5T480-80Zm0-80q116 0 198-82t82-198q0-116-82-198t-198-82q-116 0-198 82t-82 198q0 116 82 198t198 82Zm0-280Z"})});import{jsx as U1}from"react/jsx-runtime";var H1=()=>U1("svg",{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:U1("path",{d:"M11.5 15C9.825 15 8.40625 14.4188 7.24375 13.2563C6.08125 12.0938 5.5 10.675 5.5 9C5.5 7.325 6.08125 5.90625 7.24375 4.74375C8.40625 3.58125 9.825 3 11.5 3C13.175 3 14.5938 3.58125 15.7563 4.74375C16.9188 5.90625 17.5 7.325 17.5 9C17.5 10.675 16.9188 12.0938 15.7563 13.2563C14.5938 14.4188 13.175 15 11.5 15ZM5.5 14.8125C4.175 14.4625 3.09375 13.75 2.25625 12.675C1.41875 11.6 1 10.375 1 9C1 7.625 1.41875 6.4 2.25625 5.325C3.09375 4.25 4.175 3.5375 5.5 3.1875V4.7625C4.6 5.075 3.875 5.61875 3.325 6.39375C2.775 7.16875 2.5 8.0375 2.5 9C2.5 9.9625 2.775 10.8313 3.325 11.6063C3.875 12.3813 4.6 12.925 5.5 13.2375V14.8125ZM11.5 13.5C12.75 13.5 13.8125 13.0625 14.6875 12.1875C15.5625 11.3125 16 10.25 16 9C16 7.75 15.5625 6.6875 14.6875 5.8125C13.8125 4.9375 12.75 4.5 11.5 4.5C10.25 4.5 9.1875 4.9375 8.3125 5.8125C7.4375 6.6875 7 7.75 7 9C7 10.25 7.4375 11.3125 8.3125 12.1875C9.1875 13.0625 10.25 13.5 11.5 13.5Z",fillOpacity:"0.6"})});import{jsx as V1}from"react/jsx-runtime";var G1=()=>V1("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:V1("path",{d:"M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C12.5083 12.1667 13.2333 11.2 13.65 10H15.75C15.2833 11.7667 14.3333 13.2083 12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z"})});import{jsx as fs,jsxs as z1}from"react/jsx-runtime";var q1=({className:t})=>z1("svg",{fill:"none",height:"400",viewBox:"0 0 400 400",width:"400",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",className:t||"",children:[fs("clipPath",{id:"a",children:fs("path",{d:"m0 0h400v400h-400z"})}),z1("g",{clipPath:"url(#a)",children:[fs("circle",{cx:"200",cy:"200",fill:"#3396ff",r:"199.5",stroke:"#66b1ff"}),fs("path",{d:"m122.519 148.965c42.791-41.729 112.171-41.729 154.962 0l5.15 5.022c2.14 2.086 2.14 5.469 0 7.555l-17.617 17.18c-1.07 1.043-2.804 1.043-3.874 0l-7.087-6.911c-29.853-29.111-78.253-29.111-108.106 0l-7.59 7.401c-1.07 1.043-2.804 1.043-3.874 0l-17.617-17.18c-2.14-2.086-2.14-5.469 0-7.555zm191.397 35.529 15.679 15.29c2.14 2.086 2.14 5.469 0 7.555l-70.7 68.944c-2.139 2.087-5.608 2.087-7.748 0l-50.178-48.931c-.535-.522-1.402-.522-1.937 0l-50.178 48.931c-2.139 2.087-5.608 2.087-7.748 0l-70.7015-68.945c-2.1396-2.086-2.1396-5.469 0-7.555l15.6795-15.29c2.1396-2.086 5.6085-2.086 7.7481 0l50.1789 48.932c.535.522 1.402.522 1.937 0l50.177-48.932c2.139-2.087 5.608-2.087 7.748 0l50.179 48.932c.535.522 1.402.522 1.937 0l50.179-48.931c2.139-2.087 5.608-2.087 7.748 0z",fill:"#fff"})]})]});import{jsx as iE}from"react/jsx-runtime";import{jsx as sE,jsxs as cE}from"react/jsx-runtime";import{jsx as lE,jsxs as uE}from"react/jsx-runtime";import{jsx as W1}from"react/jsx-runtime";var K1=()=>W1("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 50 50",enableBackground:"new 0 0 50 50",children:W1("image",{id:"image0",x:"0",y:"0",href:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABGdBTUEAALGPC/xhBQAAACBjSFJN
13
13
  AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAQ
14
14
  rElEQVRo3s2aeXSWxb3HPzPP867ZA9lI2CGEEJASRBEUZBcRtJW6XKqiAipXvVbbqrf1cNpra7W3
15
15
  rlcFehCxtSrGFShQlCCLVWQRSELIRhJIyL6+ybs8z8z94w0BqwIGvLe/c3JyzvPM+5vvZ37zm5ln
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xswap-link/sdk",
3
- "version": "0.9.9",
3
+ "version": "0.9.10",
4
4
  "description": "JavaScript SDK for XSwap platform",
5
5
  "homepage": "https://github.com/xswap-link/xswap-sdk",
6
6
  "repository": {
@@ -591,12 +591,15 @@ export const SwapProvider = ({
591
591
  routeAbortController.current = null;
592
592
  } catch (error) {
593
593
  if (error !== DEFAULT_REQUEST_ABORT_MSG) {
594
+ routeAbortController.current = null;
594
595
  console.error(error);
595
596
  setError("Could not find route!");
596
597
  setRoute(undefined);
597
598
  }
598
599
  } finally {
599
- setFetchingRoute(false);
600
+ if (!routeAbortController.current) {
601
+ setFetchingRoute(false);
602
+ }
600
603
  }
601
604
  // eslint-disable-next-line react-hooks/exhaustive-deps
602
605
  }, [