const F=6048e5;const b=6e4,S=36e5,_=1e3,d=Symbol.for("constructDateFrom");function D(e,n){return typeof e=="function"?e(n):e&&typeof e=="object"&&d in e?e[d](n):e instanceof Date?new e.constructor(n):new Date(n)}function i(e,n){return D(n||e,e)}function g(e){const n=i(e),t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+e-+t}function l(e,...n){const t=D.bind(null,n.find(c=>typeof c=="object"));return n.map(t)}function m(e,n){const t=i(e,n==null?void 0:n.in);return t.setHours(0,0,0,0),t}function I(e,n,t){const[c,s]=l(t==null?void 0:t.in,e,n),r=m(c),u=m(s),o=+r-g(r),f=+u-g(u);return Math.round((o-f)/864e5)}function y(e,n,t){const[c,s]=l(t==null?void 0:t.in,e,n),r=M(c,s),u=Math.abs(I(c,s));c.setDate(c.getDate()-r*u);const o=+(M(c,s)===-r),f=r*(u-o);return f===0?0:f}function M(e,n){const t=e.getFullYear()-n.getFullYear()||e.getMonth()-n.getMonth()||e.getDate()-n.getDate()||e.getHours()-n.getHours()||e.getMinutes()-n.getMinutes()||e.getSeconds()-n.getSeconds()||e.getMilliseconds()-n.getMilliseconds();return t<0?-1:t>0?1:t}function a(e){return n=>{const c=(e?Math[e]:Math.trunc)(n);return c===0?0:c}}function H(e,n,t){const[c,s]=l(t==null?void 0:t.in,e,n),r=(+c-+s)/36e5;return a(t==null?void 0:t.roundingMethod)(r)}function h(e,n){return+i(e)-+i(n)}function T(e,n,t){const c=h(e,n)/6e4;return a(t==null?void 0:t.roundingMethod)(c)}function Y(e,n,t){const c=y(e,n,t)/7;return a(t==null?void 0:t.roundingMethod)(c)}export{S as a,b,D as c,_ as d,T as e,H as f,g,y as h,Y as i,F as m,i as t};
