import{M as e}from"./index-ded57513-1715787996172.js";function D(t){let n=t;const a=new Date(t);a.getDay()==0&&(n-=7*24*60*60*1e3);const o=n-(a.getDay()-1)*24*60*60*1e3;return new Date(o).getTime()}function c(t){const n=t;let o=7-new Date(t).getDay();o==7&&(o=0);const r=n+o*24*60*60*1e3;return new Date(r).getTime()}const u=(t,n=[],a="YYYY-MM-DD")=>t&&t.length?a=="YYYY-MM-DD"?{[n[0]||"start"]:e(t[0]).isValid()?e(t[0]).format(a)+" 00:00:00":"",[n[1]||"end"]:e(t[1]).isValid()?e(t[1]).format(a)+" 23:59:59":""}:{[n[0]||"start"]:e(t[0]).isValid()?e(t[0]).format(a):"",[n[1]||"end"]:e(t[1]).isValid()?e(t[1]).format(a):""}:{};function i(t){return Math.floor(t/60)}function g(t){return Math.floor(t%60)}export{c as a,u as b,i as c,g as d,D as g};
