import{H as e,Vt as t}from"./useActiveWallet-CEs8euQ3.js";import{Ht as n}from"./ccip.js";var r=new Intl.NumberFormat(void 0,{style:`currency`,currency:`USD`,maximumFractionDigits:2}),i=e=>r.format(e),a=(e,t)=>{let n=i(t*parseFloat(e));return n===`$0.00`?`<$0.01`:n},o=(e,t)=>{let r=i(t*parseFloat(n(e)));return r===`$0.00`?`<$0.01`:r},s=(e,t,n=6,r=!1)=>`${c(e,n,r)} ${t}`,c=(e,t=6,r=!1)=>{let i=parseFloat(n(e)).toFixed(t).replace(/0+$/,``).replace(/\.$/,``);return r?i:`${i===`0`?`<0.001`:i}`},l=e=>e.reduce(((e,t)=>e+t),0n),u=(n,r)=>{let{chains:i}=t(),a=`https://etherscan.io/address/${r}`,o=`${e(n,i)}/address/${r}`;if(!o)return a;try{new URL(o)}catch{return a}return o};export{a,l as i,u as n,o,c as r,s as t};