import{b9 as D,bc as b}from"./index-dNe6i2rS.js";const h=["years","months","weeks","days","hours","minutes","seconds"];function y(a,e){const f=b(),c=(e==null?void 0:e.locale)??f.locale??D,u=(e==null?void 0:e.format)??h,m=(e==null?void 0:e.zero)??!1,s=(e==null?void 0:e.delimiter)??" ";return c.formatDistance?u.reduce((t,r)=>{const d=`x${r.replace(/(^.)/,n=>n.toUpperCase())}`,l=a[r];return l!==void 0&&(m||a[r])?t.concat(c.formatDistance(d,l)):t},[]).join(s):""}export{y as f};
