import{a as p}from"./chunk-CP4WO7MM.mjs";import{a as m}from"./chunk-IHX4EDUF.mjs";var D=r=>{let[o,t]=r.toLowerCase().split("@");return{username:o||"",domain:t||""}};function y({domain:r,key:o,pretty:t,searchParams:f}){if(!r)return"";let e=`https://${m(r)}${o&&o!=="_root"?`/${m(o)}`:""}`;if(f){let x=new URLSearchParams;for(let[n,i]of Object.entries(f))x.set(n,i);e+=`?${x.toString()}`}return t?e.replace(/^https?:\/\//,""):e}function U({domain:r,key:o}){return`https://${r}${o==="_root"?"":`/${o}`}`}var dr=r=>!r.periodStart||!r.periodEnd?"-":`${p(r.periodStart,{month:"short",year:new Date(r.periodStart).getUTCFullYear()===new Date(r.periodEnd).getUTCFullYear()?void 0:"numeric",timeZone:"utc"})}-${p(r.periodEnd,{month:"short",timeZone:"utc"})}`;export{dr as a,D as b,y as c,U as d};
