PageSourceSearch

https://thorchain.org/_nuxt/D5rOMx5S.js

js thorchain.org collected 2026-10-02 03:32:37 UTC 9,884 bytes, 1 lines download raw bytes

1import{d as ae,V as o,D as se,f as C,t as oe,am as D,an as le,l as S,v as e,ai as re,o as L,Z as s,y as m,S as N,O as M,F as U,z as j,X as i,bo as ie,a1 as ce,q as y,$ as ue,x as pe,E as de,b9 as p}from"./CzmLbeac.js";import{u as fe}from"./BCaRlKa6.js";const xe={ref:"wrapper",class:"flex-parent-center"},me={class:"flex h-full flex-col rounded-20 bg-white p-10 shadow-2"},he={class:"relative flex h-full flex-col"},ve={class:"flex-parent-center grow rounded-15 border border-neutral-200 bg-neutral-50 p-30"},_e={class:"w-full"},be={class:"mt-20 flex items-center justify-between"},ge={class:"flex flex-col"},we={class:"app-text-20 text-[34px] text-neutral-950"},Ce={class:"mt-5 app-text-16 text-[16px] text-neutral-650"},Se={class:"z-10 mt-5 flex-parent-center h-0"},ye={class:"flex-parent-center size-34 self-center rounded-full border border-neutral-200 bg-white transition-normal"},Te={class:"flex-parent-center grow rounded-15 border border-neutral-200 bg-neutral-50 p-30"},ke={class:"w-full"},Be={class:"mt-20 flex items-center justify-between"},Re={class:"flex flex-col"},Ae={ref:"ethValue",class:"app-text-20 text-[34px] text-neutral-950"},ze={class:"grid"},Fe={ref:"selectToken",class:"col-start-1 row-start-1 flex h-51 items-center rounded-40 bg-black px-15 py-10 transition-normal"},Pe={ref:"destinationToken",class:"gsap-hidden col-start-1 row-start-1 flex items-center rounded-40 bg-white p-10 transition-normal"},Ee={ref:"confirmation",class:"gsap-hidden full-parent z-20 flex-parent-center rounded-15 border border-neutral-200 bg-neutral-50"},$e={class:"flex items-end gap-[30px]"},Oe={ref:"confirmationText",class:"flex flex-col items-center gap-[16px]"},Ve={ref:"popup",class:"gsap-hidden full-parent z-10 flex h-auto flex-col gap-[30px] rounded-20 bg-white px-[35px] py-[50px] shadow-2"},De={class:"flex items-center justify-between"},Le={class:"mt-auto flex min-h-1 gap-[24px]"},Ne={class:"flex w-37/100 flex-col gap-[10px] overflow-hidden"},Me={class:"app-text-14 text-[14px] text-neutral-850"},Ue={class:"grow overflow-hidden"},je={class:"flex items-center rounded-12 border border-neutral-400 bg-neutral-100 px-[16px] py-[11px]"},He={class:"mt-[16px] flex w-full flex-col gap-[10px]"},We={class:"flex flex-col"},Ie={class:"app-text-16 text-[16px] text-neutral-850"},Xe={class:"app-text-12 text-[12px] text-neutral-650"},qe=ae({__name:"SwapSlice",props:{swapLink:{},btcSellValue:{},btcPriceMetric:{},ethPriceMetric:{},isFirstSlice:{type:Boolean},isLastSlice:{type:Boolean},previousSliceType:{},nextSliceType:{},backgroundColor:{}},setup(H){const d=H,l=o("cursor"),v=o("wrapper"),c=o("root"),x=o("selectToken"),_=o("swapButton"),b=o("popup"),W=o("coin"),I=o("confirmation"),X=o("confirmationFirstCoin"),q=o("confirmationSecondCoin"),G=o("confirmationText"),T=o("destinationToken"),k=o("ethValue"),{resolveByPath:B}=fe();let f;const R=se(.5);let A=null;const Z=[{icon:"swap/chains/all_clean",label:"All chains"},{icon:"swap/chains/avalanche_clean",label:"Avalanche"},{icon:"swap/chains/bnb_clean",label:"BNB Chain"},{icon:"swap/chains/ethereum_clean",label:"Ethereum"},{icon:"swap/chains/solana_clean",label:"Solana"},{icon:"swap/chains/tron_clean",label:"TRON"},{icon:"swap/chains/xrp_clean",label:"XRP Ledger"}],J=[{icon:"swap/coins/btc_clean",label:"BTC",subtitle:"Bitcoin"},{icon:"swap/coins/doge_clean",label:"DOGE",subtitle:"Dogecoin"},{icon:"swap/coins/eth_clean",label:"ETH",subtitle:"Ethereum"},{icon:"swap/coins/usdc_clean",label:"USDC",subtitle:"Ethereum"},{icon:"swap/coins/usdt_clean",label:"USDT",subtitle:"Ethereum"}];function z(n,t=!1){return t?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(n):n.toFixed(4)}const F=C(()=>{const n=B(d.btcPriceMetric);return n?Number(n):0}),K=C(()=>{const n=B(d.ethPriceMetric);return n?Number(n):0}),Q=C(()=>{const n=F.value/K.value;return d.btcSellValue*n});function Y(){if(l.value)return i.to(l.value.$el,{autoAlpha:1,duration:.3,ease:"linear"})}function ee(){if(l.value)return i.to(l.value.$el,{autoAlpha:0,duration:.3,ease:"linear"})}function P(n){const t=window.getComputedStyle(n).transform;return t==="none"?1:new DOMMatrixReadOnly(t).a}function g(n){if(!(!c.value||!l.value))return i.to(l.value.$el,{x:()=>{const t=c.value,a=t.getBoundingClientRect(),u=n.getBoundingClientRect(),r=P(t);return(u.left-a.left+u.width*.75)/r},y:()=>{const t=c.value,a=t.getBoundingClientRect(),u=n.getBoundingClientRect(),r=P(t);return(u.top-a.top+u.height*.5)/r},duration:1,ease:"elastic.out(0.8, 0.7)"})}function w(){if(l.value)return i.timeline().to(l.value.$el,{scale:.8,duration:.2,ease:"power2.inOut"}).to(l.value.$el,{scale:1,duration:.3,ease:"power2.inOut"})}function te(){const n=W.value?.[2];if(!c.value||!n)return;const t=c.value.getBoundingClientRect();f=i.timeline({paused:!0,repeat:-1,repeatRefresh:!0}).set(l.value?.$el,{x:t.width+100,y:t.height*.75}).add(Y()??p).add(g(x.value)??p,"<").fromTo(x.value,{backgroundColor:"#000000"},{backgroundColor:"#4d4d4d"},"<").add(w()??p).fromTo(b.value,{autoAlpha:0},{autoAlpha:1}).fromTo(b.value,{y:30},{y:0},"<").to(x.value,{backgroundColor:"#000000"}).add(g(n)??p).fromTo(n,{backgroundColor:"#FFFFFF"},{backgroundColor:"#F5F5F5"}).add(w()??p).set(x.value,{autoAlpha:0},"<").set(T.value,{autoAlpha:1},"<").to(b.value,{autoAlpha:0}
1).to(k.value,{scrambleText:{text:z(Q.value),chars:"0123456789"}},"<").add(g(_.value?.$el)??p).fromTo(_.value?.$el,{backgroundColor:"#31fd9d"},{backgroundColor:"#ddfef1"},"<").add(w()??p).fromTo(I.value,{autoAlpha:0},{autoAlpha:1}).set(x.value,{autoAlpha:1}).set(T.value,{autoAlpha:0}).fromTo([X.value?.$el,q.value?.$el],{autoAlpha:0,y:30,scale:.7},{autoAlpha:1,y:0,scale:1,duration:.3,ease:"elastic.out(1.3, 0.7)",stagger:.1}).fromTo(G.value,{autoAlpha:0,y:30},{autoAlpha:1,y:0},"<").set(k.value,{textContent:"0"},"<").to(_.value?.$el,{backgroundColor:"#31fd9d"}).add(ee()??p).duration(10)}function E(){R.value=i.utils.pipe(i.utils.mapRange(320,1600,450/1e3,.85),i.utils.clamp(0,.85))(window.innerWidth)}function $(){!c.value||!v.value||(v.value.style.height=`${c.value.getBoundingClientRect().height}px`)}function O(){const n=f?.time();f?.kill(),te(),n&&f.time(n),f?.play()}function V(){O(),E(),D(()=>{$()})}function ne(){A=ie.create({markers:!1,trigger:c.value,start:"top bottom",end:"+=300px",scrub:!0,animation:i.fromTo(v.value,{y:50,scale:.85},{y:0,scale:1,onComplete:()=>{O()}}),once:!0})}return oe(()=>{window.addEventListener("resize",V),E(),D(()=>{$()}),ne()}),le(()=>{window.removeEventListener("resize",V),f?.kill(),A?.kill()}),(n,t)=>{const a=ue,u=ce;return y(),S("section",null,[e("div",xe,[e("div",{ref:"root",class:"aspect-494/464 min-w-620",style:re({transform:`scale(${L(R)})`})},[s(a,{ref:"cursor",name:"swap/cursor_clean",class:"gsap-hidden absolute top-0 left-0 z-20 h-33 w-31 -rotate-30"},null,512),e("div",me,[e("div",he,[e("div",ve,[e("div",_e,[t[1]||(t[1]=e("span",{class:"app-text-16 text-[16px] text-neutral-650"},"Sell",-1)),e("div",be,[e("div",ge,[e("span",we,m(d.btcSellValue),1),e("span",Ce,m(z(L(F)*d.btcSellValue,!0)),1)]),s(u,M(d.swapLink,{class:"flex items-center rounded-40 bg-white p-10 transition-normal hover-focus:bg-neutral-200"}),{default:N(()=>[s(a,{name:"swap/coins/btc_clean",class:"size-28"}),t[0]||(t[0]=e("div",{class:"ml-10 flex flex-col"},[e("span",{class:"app-text-16 text-[16px] text-neutral-900"},"BTC"),e("span",{class:"app-text-12 text-[12px] text-neutral-650"},"Bitcoin")],-1)),s(a,{name:"swap/chevron",class:"ml-10 size-24 fill-neutral-560"})]),_:1},16)])])]),e("div",Se,[e("div",ye,[s(a,{name:"swap/arrows",class:"h-16 w-19 fill-neutral-950"})])]),e("div",Te,[e("div",ke,[t[4]||(t[4]=e("span",{class:"app-text-16 text-[16px] text-neutral-650"},"Buy",-1)),e("div",Be,[e("div",Re,[e("span",Ae,"0",512)]),e("div",ze,[e("div",Fe,[t[2]||(t[2]=e("span",{class:"app-text-16 text-[16px] text-neutral-50"},"Select a token",-1)),s(a,{name:"swap/chevron",class:"ml-10 size-24 fill-neutral-560"})],512),e("div",Pe,[s(a,{name:"swap/coins/eth_clean",class:"size-28"}),t[3]||(t[3]=e("div",{class:"ml-10 flex flex-col"},[e("span",{class:"app-text-16 text-[16px] text-neutral-900"},"ETH"),e("span",{class:"app-text-12 text-[12px] text-neutral-650"},"Ethereum")],-1)),s(a,{name:"swap/chevron",class:"ml-10 size-24 fill-neutral-560"})],512)])])])]),e("div",Ee,[e("div",$e,[s(a,{ref:"confirmationFirstCoin",name:"swap/coins/btc_clean",class:"size-[96px]"},null,512),e("div",Oe,[s(a,{name:"swap/completed",class:"size-[47px] fill-[#00CB95]"}),t[5]||(t[5]=e("span",{class:"app-text-12 text-[12px] text-neutral-650"},"Completed",-1))],512),s(a,{ref:"confirmationSecondCoin",name:"swap/coins/eth_clean",class:"size-[96px]"},null,512)])],512)]),s(u,M({ref:"swapButton",class:"mt-[5px] flex-parent-center h-[100px] rounded-15 bg-green-100 p-[20px] text-center app-text-20 text-[20px] transition-normal hover-focus:bg-green-clear"},d.swapLink),{default:N(()=>[...t[6]||(t[6]=[pe(" Launch Swap ",-1)])]),_:1},16)]),e("div",Ve,[e("div",De,[t[7]||(t[7]=e("span",{class:"app-text-18 text-[18px] text-neutral-850"},"Select coin",-1)),s(a,{name:"swap/cross",class:"size-[24px] fill-neutral-565"})]),e("div",Le,[e("ul",Ne,[(y(),S(U,null,j(Z,(r,h)=>e("li",{key:h,class:de(["flex items-center gap-[8px] rounded-6 py-[13px] pr-[11px] pl-[16px]",{"border border-green-100":h===0}])},[s(a,{class:"size-[24px]",name:r.icon},null,8,["name"]),e("span",Me,m(r.label),1)],2)),64))]),t[8]||(t[8]=e("div",{class:"w-1 bg-neutral-400"},null,-1)),e("div",Ue,[e("div",je,[s(a,{class:"size-[24px] fill-neutral-565",name:"search"})]),e("ul",He,[(y(),S(U,null,j(J,(r,h)=>e("li",{key:h,ref_for:!0,ref:"coin",class:"flex items-center gap-[10px] rounded-6 p-[12px]"},[s(a,{class:"size-[28px]",name:r.icon},null,8,["name"]),e("div",We,[e("span",Ie,m(r.label),1),e("span",Xe,m(r.subtitle),
11)])])),64))])])])],512)],4)],512)])}}}),Je=Object.assign(qe,{__name:"SwapSlice"});export{Je as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.