2025-07-27 10:51:22 +03:30
|
|
|
import{z as W,h as A}from"./Dlu6riyL.js";import{m as O}from"./QegaKTWK.js";import{G as I,cq as $}from"./vNwORUzZ.js";const j=864e5,N=6e4,V=36e5,D=43200,x=1440,F=Symbol.for("constructDateFrom");function k(e,n){return typeof e=="function"?e(n):e&&typeof e=="object"&&F in e?e[F](n):e instanceof Date?new e.constructor(n):new Date(n)}function l(e,n){return k(e,e)}let H={};function L(){return H}function v(e){const n=l(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 b(e,...n){const t=k.bind(null,e||n.find(a=>typeof a=="object"));return n.map(t)}function Y(e,n){const t=l(e);return t.setHours(0,0,0,0),t}function q(e,n,t){const[a,r]=b(t==null?void 0:t.in,e,n),s=Y(a),i=Y(r),o=+s-v(s),u=+i-v(i);return Math.round((o-u)/j)}function P(e,n){const t=+l(e)-+l(n);return t<0?-1:t>0?1:t}function E(e){return k(e,Date.now())}function R(e,n,t){const[a,r]=b(t==null?void 0:t.in,e,n),s=a.getFullYear()-r.getFullYear(),i=a.getMonth()-r.getMonth();return s*12+i}function J(e,n,t){const[a,r]=b(t==null?void 0:t.in,e,n),s=z(a,r),i=Math.abs(q(a,r));a.setDate(a.getDate()-s*i);const o=+(z(a,r)===-s),u=s*(i-o);return u===0?0:u}function z(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 T(e){return n=>{const a=(e?Math[e]:Math.trunc)(n);return a===0?0:a}}function Q(e,n,t){const[a,r]=b(t==null?void 0:t.in,e,n),s=(+a-+r)/V;return T(t==null?void 0:t.roundingMethod)(s)}function X(e,n){return+l(e)-+l(n)}function U(e,n,t){const a=X(e,n)/N;return T(t==null?void 0:t.roundingMethod)(a)}function B(e,n){const t=l(e);return t.setHours(23,59,59,999),t}function G(e,n){const t=l(e),a=t.getMonth();return t.setFullYear(t.getFullYear(),a+1,0),t.setHours(23,59,59,999),t}function K(e,n){const t=l(e);return+B(t)==+G(t)}function Z(e,n,t){const[a,r,s]=b(t==null?void 0:t.in,e,e,n),i=P(r,s),o=Math.abs(R(r,s));if(o<1)return 0;r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*o);let u=P(r,s)===-i;K(a)&&o===1&&P(a,s)===1&&(u=!1);const d=i*(o-+u);return d===0?0:d}function _(e,n,t){const a=X(e,n)/1e3;return T(t==null?void 0:t.roundingMethod)(a)}const tt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},et=(e,n,t)=>{let a;const r=tt[e];return typeof r=="string"?a=r:n===1?a=r.one:a=r.other.replace("{{count}}",n.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+a:a+" ago":a};function M(e){return(n={})=>{const t=n.width?String(n.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const nt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},at={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ot={date:M({formats:nt,defaultWidth:"full"}),time:M({formats:at,defaultWidth:"full"}),dateTime:M({formats:rt,defaultWidth:"full"})},it={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",
|