// @bun
import{NG as c}from"./chunk-xyhgvt88.js";var s={};c(s,{truncateMiddle:()=>h,truncateLeft:()=>m,truncate:()=>d,todayTimeOrDateTime:()=>u,titlecase:()=>l,time:()=>i,pluralize:()=>x,number:()=>f,duration:()=>g,datetime:()=>a,Locale:()=>s});function l(e){return e.replace(/\b\w/g,(t)=>t.toUpperCase())}function i(e){return new Date(e).toLocaleTimeString(void 0,{timeStyle:"short"})}function a(e){let t=new Date(e),r=i(e),n=t.toLocaleDateString();return`${r} \xB7 ${n}`}function u(e){let t=new Date(e),r=new Date;if(t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()&&t.getDate()===r.getDate())return i(e);else return a(e)}function f(e){if(e>=1e6)return(e/1e6).toFixed(1)+"M";else if(e>=1000)return(e/1000).toFixed(1)+"K";return e.toString()}function g(e){if(e<1000)return`${e}ms`;if(e<60000)return`${(e/1000).toFixed(1)}s`;if(e<3600000){let n=Math.floor(e/60000),o=Math.floor(e%60000/1000);return`${n}m ${o}s`}if(e<86400000){let n=Math.floor(e/3600000),o=Math.floor(e%3600000/60000);return`${n}h ${o}m`}let t=Math.floor(e/3600000);return`${Math.floor(e%3600000/86400000)}d ${t}h`}function d(e,t){if(e.length<=t)return e;return e.slice(0,t-1)+"\u2026"}function m(e,t){if(e.length<=t)return e;return"\u2026"+e.slice(-(t-1))}function h(e,t=35){if(e.length<=t)return e;let r="\u2026",n=Math.ceil((t-r.length)/2),o=Math.floor((t-r.length)/2);return e.slice(0,n)+r+e.slice(-o)}function x(e,t,r){return(e===1?t:r).replace("{}",e.toString())}
export{l as Jj,f as Kj,g as Lj,d as Mj,h as Nj,s as Oj};
