import{t as m,A as u,a as p}from"./Translator-Bios5QX5.js";import{d as a}from"./dayjs.min-2rai63wT.js";import{u as c,t as y}from"./timezone-C2U15obx.js";a.extend(c);a.extend(y);class S{static debounce(s,t=300,r=null){let n;return(...i)=>{clearTimeout(n),n=setTimeout(()=>{s.bind(r)(...i)},t)}}}function x(e,s="MMM DD"){const t=u.get("datei18"),r=a(e).locale({name:"fluent_date_time",weekdays:Object.values(t.weekdays),weekdaysShort:Object.values(t.weekdaysShort),months:Object.values(t.months),monthsShort:Object.values(t.monthsShort),meridiem:(n,i,f)=>{const l=t.am||"AM",o=t.pm||"PM",d=n<12?l:o;return f?d.toLowerCase():d}}).format(s);return h(r)}const h=function(e,s){return e&&(u.get("datei18"),e=e.toString(),p(e))};function O(e){if(e==null)return!0;if(typeof e=="string"||Array.isArray(e))return e.length===0;if(typeof e=="object")return Object.values(e).length===0}function T(e,s){typeof e>"u"||e===null||(Array.isArray(e)?e.forEach((t,r)=>{s(t,r)}):typeof e=="object"&&Object.keys(e).forEach((t,r)=>{let n=e[t];s(n,t)}))}function _(e,s="billing",t=!1){if(!e)return"";e.formatted_address&&(e=e.formatted_address);let r=[t?" ":e.name,e.address_1,e.address_2,e.city,e.state,e.postcode,e.country,e.phone];return r=r.filter(n=>n!==null&&typeof n<"u"&&n.toString().trim().length>0).join(", "),r||m("No %s address provided",s)}export{S as U,x as d,T as e,O as i,_ as p};
