2026-03-26 09:29:55 +00:00
import {
constructFrom ,
daysInWeek ,
daysInYear ,
enUS ,
getDefaultOptions ,
isSameWeek ,
millisecondsInDay ,
millisecondsInHour ,
millisecondsInMinute ,
millisecondsInSecond ,
millisecondsInWeek ,
minutesInDay ,
minutesInHour ,
minutesInMonth ,
minutesInYear ,
monthsInQuarter ,
monthsInYear ,
normalizeDates ,
quartersInYear ,
secondsInDay ,
secondsInHour ,
secondsInMinute ,
secondsInMonth ,
secondsInQuarter ,
secondsInWeek ,
secondsInYear ,
setDefaultOptions ,
startOfWeek ,
toDate
} from "./chunk-7VK2ROTQ.js" ;
2026-03-19 06:58:19 +00:00
import {
_ _publicField
} from "./chunk-2TUXWMP5.js" ;
// node_modules/date-fns/addDays.js
function addDays ( date , amount , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
if ( isNaN ( amount ) ) return constructFrom ( ( options == null ? void 0 : options . in ) || date , NaN ) ;
if ( ! amount ) return _date ;
_date . setDate ( _date . getDate ( ) + amount ) ;
return _date ;
}
// node_modules/date-fns/addMonths.js
function addMonths ( date , amount , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
if ( isNaN ( amount ) ) return constructFrom ( ( options == null ? void 0 : options . in ) || date , NaN ) ;
if ( ! amount ) {
return _date ;
}
const dayOfMonth = _date . getDate ( ) ;
const endOfDesiredMonth = constructFrom ( ( options == null ? void 0 : options . in ) || date , _date . getTime ( ) ) ;
endOfDesiredMonth . setMonth ( _date . getMonth ( ) + amount + 1 , 0 ) ;
const daysInMonth = endOfDesiredMonth . getDate ( ) ;
if ( dayOfMonth >= daysInMonth ) {
return endOfDesiredMonth ;
} else {
_date . setFullYear (
endOfDesiredMonth . getFullYear ( ) ,
endOfDesiredMonth . getMonth ( ) ,
dayOfMonth
) ;
return _date ;
}
}
// node_modules/date-fns/add.js
function add ( date , duration , options ) {
const {
years = 0 ,
months : months2 = 0 ,
weeks = 0 ,
days : days2 = 0 ,
hours = 0 ,
minutes = 0 ,
seconds = 0
} = duration ;
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const dateWithMonths = months2 || years ? addMonths ( _date , months2 + years * 12 ) : _date ;
const dateWithDays = days2 || weeks ? addDays ( dateWithMonths , days2 + weeks * 7 ) : dateWithMonths ;
const minutesToAdd = minutes + hours * 60 ;
const secondsToAdd = seconds + minutesToAdd * 60 ;
const msToAdd = secondsToAdd * 1e3 ;
return constructFrom ( ( options == null ? void 0 : options . in ) || date , + dateWithDays + msToAdd ) ;
}
// node_modules/date-fns/isSaturday.js
function isSaturday ( date , options ) {
return toDate ( date , options == null ? void 0 : options . in ) . getDay ( ) === 6 ;
}
// node_modules/date-fns/isSunday.js
function isSunday ( date , options ) {
return toDate ( date , options == null ? void 0 : options . in ) . getDay ( ) === 0 ;
}
// node_modules/date-fns/isWeekend.js
function isWeekend ( date , options ) {
const day = toDate ( date , options == null ? void 0 : options . in ) . getDay ( ) ;
return day === 0 || day === 6 ;
}
// node_modules/date-fns/addBusinessDays.js
function addBusinessDays ( date , amount , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const startedOnWeekend = isWeekend ( _date , options ) ;
if ( isNaN ( amount ) ) return constructFrom ( options == null ? void 0 : options . in , NaN ) ;
const hours = _date . getHours ( ) ;
const sign = amount < 0 ? - 1 : 1 ;
const fullWeeks = Math . trunc ( amount / 5 ) ;
_date . setDate ( _date . getDate ( ) + fullWeeks * 7 ) ;
let restDays = Math . abs ( amount % 5 ) ;
while ( restDays > 0 ) {
_date . setDate ( _date . getDate ( ) + sign ) ;
if ( ! isWeekend ( _date , options ) ) restDays -= 1 ;
}
if ( startedOnWeekend && isWeekend ( _date , options ) && amount !== 0 ) {
if ( isSaturday ( _date , options ) )
_date . setDate ( _date . getDate ( ) + ( sign < 0 ? 2 : - 1 ) ) ;
if ( isSunday ( _date , options ) )
_date . setDate ( _date . getDate ( ) + ( sign < 0 ? 1 : - 2 ) ) ;
}
_date . setHours ( hours ) ;
return _date ;
}
// node_modules/date-fns/addMilliseconds.js
function addMilliseconds ( date , amount , options ) {
return constructFrom ( ( options == null ? void 0 : options . in ) || date , + toDate ( date ) + amount ) ;
}
// node_modules/date-fns/addHours.js
function addHours ( date , amount , options ) {
return addMilliseconds ( date , amount * millisecondsInHour , options ) ;
}
// node_modules/date-fns/startOfISOWeek.js
function startOfISOWeek ( date , options ) {
return startOfWeek ( date , { ... options , weekStartsOn : 1 } ) ;
}
// node_modules/date-fns/getISOWeekYear.js
function getISOWeekYear ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const year = _date . getFullYear ( ) ;
const fourthOfJanuaryOfNextYear = constructFrom ( _date , 0 ) ;
fourthOfJanuaryOfNextYear . setFullYear ( year + 1 , 0 , 4 ) ;
fourthOfJanuaryOfNextYear . setHours ( 0 , 0 , 0 , 0 ) ;
const startOfNextYear = startOfISOWeek ( fourthOfJanuaryOfNextYear ) ;
const fourthOfJanuaryOfThisYear = constructFrom ( _date , 0 ) ;
fourthOfJanuaryOfThisYear . setFullYear ( year , 0 , 4 ) ;
fourthOfJanuaryOfThisYear . setHours ( 0 , 0 , 0 , 0 ) ;
const startOfThisYear = startOfISOWeek ( fourthOfJanuaryOfThisYear ) ;
if ( _date . getTime ( ) >= startOfNextYear . getTime ( ) ) {
return year + 1 ;
} else if ( _date . getTime ( ) >= startOfThisYear . getTime ( ) ) {
return year ;
} else {
return year - 1 ;
}
}
// node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
function getTimezoneOffsetInMilliseconds ( date ) {
const _date = toDate ( date ) ;
const utcDate = new Date (
Date . UTC (
_date . getFullYear ( ) ,
_date . getMonth ( ) ,
_date . getDate ( ) ,
_date . getHours ( ) ,
_date . getMinutes ( ) ,
_date . getSeconds ( ) ,
_date . getMilliseconds ( )
)
) ;
utcDate . setUTCFullYear ( _date . getFullYear ( ) ) ;
return + date - + utcDate ;
}
// node_modules/date-fns/startOfDay.js
function startOfDay ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
_date . setHours ( 0 , 0 , 0 , 0 ) ;
return _date ;
}
// node_modules/date-fns/differenceInCalendarDays.js
function differenceInCalendarDays ( laterDate , earlierDate , options ) {
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
const laterStartOfDay = startOfDay ( laterDate _ ) ;
const earlierStartOfDay = startOfDay ( earlierDate _ ) ;
const laterTimestamp = + laterStartOfDay - getTimezoneOffsetInMilliseconds ( laterStartOfDay ) ;
const earlierTimestamp = + earlierStartOfDay - getTimezoneOffsetInMilliseconds ( earlierStartOfDay ) ;
return Math . round ( ( laterTimestamp - earlierTimestamp ) / millisecondsInDay ) ;
}
// node_modules/date-fns/startOfISOWeekYear.js
function startOfISOWeekYear ( date , options ) {
const year = getISOWeekYear ( date , options ) ;
const fourthOfJanuary = constructFrom ( ( options == null ? void 0 : options . in ) || date , 0 ) ;
fourthOfJanuary . setFullYear ( year , 0 , 4 ) ;
fourthOfJanuary . setHours ( 0 , 0 , 0 , 0 ) ;
return startOfISOWeek ( fourthOfJanuary ) ;
}
// node_modules/date-fns/setISOWeekYear.js
function setISOWeekYear ( date , weekYear , options ) {
let _date = toDate ( date , options == null ? void 0 : options . in ) ;
const diff = differenceInCalendarDays (
_date ,
startOfISOWeekYear ( _date , options )
) ;
const fourthOfJanuary = constructFrom ( ( options == null ? void 0 : options . in ) || date , 0 ) ;
fourthOfJanuary . setFullYear ( weekYear , 0 , 4 ) ;
fourthOfJanuary . setHours ( 0 , 0 , 0 , 0 ) ;
_date = startOfISOWeekYear ( fourthOfJanuary ) ;
_date . setDate ( _date . getDate ( ) + diff ) ;
return _date ;
}
// node_modules/date-fns/addISOWeekYears.js
function addISOWeekYears ( date , amount , options ) {
return setISOWeekYear ( date , getISOWeekYear ( date , options ) + amount , options ) ;
}
// node_modules/date-fns/addMinutes.js
function addMinutes ( date , amount , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
_date . setTime ( _date . getTime ( ) + amount * millisecondsInMinute ) ;
return _date ;
}
// node_modules/date-fns/addQuarters.js
function addQuarters ( date , amount , options ) {
return addMonths ( date , amount * 3 , options ) ;
}
// node_modules/date-fns/addSeconds.js
function addSeconds ( date , amount , options ) {
return addMilliseconds ( date , amount * 1e3 , options ) ;
}
// node_modules/date-fns/addWeeks.js
function addWeeks ( date , amount , options ) {
return addDays ( date , amount * 7 , options ) ;
}
// node_modules/date-fns/addYears.js
function addYears ( date , amount , options ) {
return addMonths ( date , amount * 12 , options ) ;
}
// node_modules/date-fns/areIntervalsOverlapping.js
function areIntervalsOverlapping ( intervalLeft , intervalRight , options ) {
const [ leftStartTime , leftEndTime ] = [
+ toDate ( intervalLeft . start , options == null ? void 0 : options . in ) ,
+ toDate ( intervalLeft . end , options == null ? void 0 : options . in )
] . sort ( ( a , b ) => a - b ) ;
const [ rightStartTime , rightEndTime ] = [
+ toDate ( intervalRight . start , options == null ? void 0 : options . in ) ,
+ toDate ( intervalRight . end , options == null ? void 0 : options . in )
] . sort ( ( a , b ) => a - b ) ;
if ( options == null ? void 0 : options . inclusive )
return leftStartTime <= rightEndTime && rightStartTime <= leftEndTime ;
return leftStartTime < rightEndTime && rightStartTime < leftEndTime ;
}
// node_modules/date-fns/max.js
function max ( dates , options ) {
let result ;
let context = options == null ? void 0 : options . in ;
dates . forEach ( ( date ) => {
if ( ! context && typeof date === "object" )
context = constructFrom . bind ( null , date ) ;
const date _ = toDate ( date , context ) ;
if ( ! result || result < date _ || isNaN ( + date _ ) ) result = date _ ;
} ) ;
return constructFrom ( context , result || NaN ) ;
}
// node_modules/date-fns/min.js
function min ( dates , options ) {
let result ;
let context = options == null ? void 0 : options . in ;
dates . forEach ( ( date ) => {
if ( ! context && typeof date === "object" )
context = constructFrom . bind ( null , date ) ;
const date _ = toDate ( date , context ) ;
if ( ! result || result > date _ || isNaN ( + date _ ) ) result = date _ ;
} ) ;
return constructFrom ( context , result || NaN ) ;
}
// node_modules/date-fns/clamp.js
function clamp ( date , interval2 , options ) {
const [ date _ , start , end ] = normalizeDates (
options == null ? void 0 : options . in ,
date ,
interval2 . start ,
interval2 . end
) ;
return min ( [ max ( [ date _ , start ] , options ) , end ] , options ) ;
}
// node_modules/date-fns/closestIndexTo.js
function closestIndexTo ( dateToCompare , dates ) {
const timeToCompare = + toDate ( dateToCompare ) ;
if ( isNaN ( timeToCompare ) ) return NaN ;
let result ;
let minDistance ;
dates . forEach ( ( date , index ) => {
const date _ = toDate ( date ) ;
if ( isNaN ( + date _ ) ) {
result = NaN ;
minDistance = NaN ;
return ;
}
const distance = Math . abs ( timeToCompare - + date _ ) ;
if ( result == null || distance < minDistance ) {
result = index ;
minDistance = distance ;
}
} ) ;
return result ;
}
// node_modules/date-fns/closestTo.js
function closestTo ( dateToCompare , dates , options ) {
const [ dateToCompare _ , ... dates _ ] = normalizeDates (
options == null ? void 0 : options . in ,
dateToCompare ,
... dates
) ;
const index = closestIndexTo ( dateToCompare _ , dates _ ) ;
if ( typeof index === "number" && isNaN ( index ) )
return constructFrom ( dateToCompare _ , NaN ) ;
if ( index !== void 0 ) return dates _ [ index ] ;
}
// node_modules/date-fns/compareAsc.js
function compareAsc ( dateLeft , dateRight ) {
const diff = + toDate ( dateLeft ) - + toDate ( dateRight ) ;
if ( diff < 0 ) return - 1 ;
else if ( diff > 0 ) return 1 ;
return diff ;
}
// node_modules/date-fns/compareDesc.js
function compareDesc ( dateLeft , dateRight ) {
const diff = + toDate ( dateLeft ) - + toDate ( dateRight ) ;
if ( diff > 0 ) return - 1 ;
else if ( diff < 0 ) return 1 ;
return diff ;
}
// node_modules/date-fns/constructNow.js
function constructNow ( date ) {
return constructFrom ( date , Date . now ( ) ) ;
}
// node_modules/date-fns/daysToWeeks.js
function daysToWeeks ( days2 ) {
const result = Math . trunc ( days2 / daysInWeek ) ;
return result === 0 ? 0 : result ;
}
// node_modules/date-fns/isSameDay.js
function isSameDay ( laterDate , earlierDate , options ) {
const [ dateLeft _ , dateRight _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
return + startOfDay ( dateLeft _ ) === + startOfDay ( dateRight _ ) ;
}
// node_modules/date-fns/isDate.js
function isDate ( value ) {
return value instanceof Date || typeof value === "object" && Object . prototype . toString . call ( value ) === "[object Date]" ;
}
// node_modules/date-fns/isValid.js
function isValid ( date ) {
return ! ( ! isDate ( date ) && typeof date !== "number" || isNaN ( + toDate ( date ) ) ) ;
}
// node_modules/date-fns/differenceInBusinessDays.js
function differenceInBusinessDays ( laterDate , earlierDate , options ) {
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
if ( ! isValid ( laterDate _ ) || ! isValid ( earlierDate _ ) ) return NaN ;
const diff = differenceInCalendarDays ( laterDate _ , earlierDate _ ) ;
const sign = diff < 0 ? - 1 : 1 ;
const weeks = Math . trunc ( diff / 7 ) ;
let result = weeks * 5 ;
let movingDate = addDays ( earlierDate _ , weeks * 7 ) ;
while ( ! isSameDay ( laterDate _ , movingDate ) ) {
result += isWeekend ( movingDate , options ) ? 0 : sign ;
movingDate = addDays ( movingDate , sign ) ;
}
return result === 0 ? 0 : result ;
}
// node_modules/date-fns/differenceInCalendarISOWeekYears.js
function differenceInCalendarISOWeekYears ( laterDate , earlierDate , options ) {
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
return getISOWeekYear ( laterDate _ , options ) - getISOWeekYear ( earlierDate _ , options ) ;
}
// node_modules/date-fns/differenceInCalendarISOWeeks.js
function differenceInCalendarISOWeeks ( laterDate , earlierDate , options ) {
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
const startOfISOWeekLeft = startOfISOWeek ( laterDate _ ) ;
const startOfISOWeekRight = startOfISOWeek ( earlierDate _ ) ;
const timestampLeft = + startOfISOWeekLeft - getTimezoneOffsetInMilliseconds ( startOfISOWeekLeft ) ;
const timestampRight = + startOfISOWeekRight - getTimezoneOffsetInMilliseconds ( startOfISOWeekRight ) ;
return Math . round ( ( timestampLeft - timestampRight ) / millisecondsInWeek ) ;
}
// node_modules/date-fns/differenceInCalendarMonths.js
function differenceInCalendarMonths ( laterDate , earlierDate , options ) {
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
const yearsDiff = laterDate _ . getFullYear ( ) - earlierDate _ . getFullYear ( ) ;
const monthsDiff = laterDate _ . getMonth ( ) - earlierDate _ . getMonth ( ) ;
return yearsDiff * 12 + monthsDiff ;
}
// node_modules/date-fns/getQuarter.js
function getQuarter ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const quarter = Math . trunc ( _date . getMonth ( ) / 3 ) + 1 ;
return quarter ;
}
// node_modules/date-fns/differenceInCalendarQuarters.js
function differenceInCalendarQuarters ( laterDate , earlierDate , options ) {
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
const yearsDiff = laterDate _ . getFullYear ( ) - earlierDate _ . getFullYear ( ) ;
const quartersDiff = getQuarter ( laterDate _ ) - getQuarter ( earlierDate _ ) ;
return yearsDiff * 4 + quartersDiff ;
}
// node_modules/date-fns/differenceInCalendarWeeks.js
function differenceInCalendarWeeks ( laterDate , earlierDate , options ) {
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
const laterStartOfWeek = startOfWeek ( laterDate _ , options ) ;
const earlierStartOfWeek = startOfWeek ( earlierDate _ , options ) ;
const laterTimestamp = + laterStartOfWeek - getTimezoneOffsetInMilliseconds ( laterStartOfWeek ) ;
const earlierTimestamp = + earlierStartOfWeek - getTimezoneOffsetInMilliseconds ( earlierStartOfWeek ) ;
return Math . round ( ( laterTimestamp - earlierTimestamp ) / millisecondsInWeek ) ;
}
// node_modules/date-fns/differenceInCalendarYears.js
function differenceInCalendarYears ( laterDate , earlierDate , options ) {
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
return laterDate _ . getFullYear ( ) - earlierDate _ . getFullYear ( ) ;
}
// node_modules/date-fns/differenceInDays.js
function differenceInDays ( laterDate , earlierDate , options ) {
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
const sign = compareLocalAsc ( laterDate _ , earlierDate _ ) ;
const difference = Math . abs (
differenceInCalendarDays ( laterDate _ , earlierDate _ )
) ;
laterDate _ . setDate ( laterDate _ . getDate ( ) - sign * difference ) ;
const isLastDayNotFull = Number (
compareLocalAsc ( laterDate _ , earlierDate _ ) === - sign
) ;
const result = sign * ( difference - isLastDayNotFull ) ;
return result === 0 ? 0 : result ;
}
function compareLocalAsc ( laterDate , earlierDate ) {
const diff = laterDate . getFullYear ( ) - earlierDate . getFullYear ( ) || laterDate . getMonth ( ) - earlierDate . getMonth ( ) || laterDate . getDate ( ) - earlierDate . getDate ( ) || laterDate . getHours ( ) - earlierDate . getHours ( ) || laterDate . getMinutes ( ) - earlierDate . getMinutes ( ) || laterDate . getSeconds ( ) - earlierDate . getSeconds ( ) || laterDate . getMilliseconds ( ) - earlierDate . getMilliseconds ( ) ;
if ( diff < 0 ) return - 1 ;
if ( diff > 0 ) return 1 ;
return diff ;
}
// node_modules/date-fns/_lib/getRoundingMethod.js
function getRoundingMethod ( method ) {
return ( number ) => {
const round = method ? Math [ method ] : Math . trunc ;
const result = round ( number ) ;
return result === 0 ? 0 : result ;
} ;
}
// node_modules/date-fns/differenceInHours.js
function differenceInHours ( laterDate , earlierDate , options ) {
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
const diff = ( + laterDate _ - + earlierDate _ ) / millisecondsInHour ;
return getRoundingMethod ( options == null ? void 0 : options . roundingMethod ) ( diff ) ;
}
// node_modules/date-fns/subISOWeekYears.js
function subISOWeekYears ( date , amount , options ) {
return addISOWeekYears ( date , - amount , options ) ;
}
// node_modules/date-fns/differenceInISOWeekYears.js
function differenceInISOWeekYears ( laterDate , earlierDate , options ) {
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
const sign = compareAsc ( laterDate _ , earlierDate _ ) ;
const diff = Math . abs (
differenceInCalendarISOWeekYears ( laterDate _ , earlierDate _ , options )
) ;
const adjustedDate = subISOWeekYears ( laterDate _ , sign * diff , options ) ;
const isLastISOWeekYearNotFull = Number (
compareAsc ( adjustedDate , earlierDate _ ) === - sign
) ;
const result = sign * ( diff - isLastISOWeekYearNotFull ) ;
return result === 0 ? 0 : result ;
}
// node_modules/date-fns/differenceInMilliseconds.js
function differenceInMilliseconds ( laterDate , earlierDate ) {
return + toDate ( laterDate ) - + toDate ( earlierDate ) ;
}
// node_modules/date-fns/differenceInMinutes.js
function differenceInMinutes ( dateLeft , dateRight , options ) {
const diff = differenceInMilliseconds ( dateLeft , dateRight ) / millisecondsInMinute ;
return getRoundingMethod ( options == null ? void 0 : options . roundingMethod ) ( diff ) ;
}
// node_modules/date-fns/endOfDay.js
function endOfDay ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
_date . setHours ( 23 , 59 , 59 , 999 ) ;
return _date ;
}
// node_modules/date-fns/endOfMonth.js
function endOfMonth ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const month = _date . getMonth ( ) ;
_date . setFullYear ( _date . getFullYear ( ) , month + 1 , 0 ) ;
_date . setHours ( 23 , 59 , 59 , 999 ) ;
return _date ;
}
// node_modules/date-fns/isLastDayOfMonth.js
function isLastDayOfMonth ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
return + endOfDay ( _date , options ) === + endOfMonth ( _date , options ) ;
}
// node_modules/date-fns/differenceInMonths.js
function differenceInMonths ( laterDate , earlierDate , options ) {
const [ laterDate _ , workingLaterDate , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
laterDate ,
earlierDate
) ;
const sign = compareAsc ( workingLaterDate , earlierDate _ ) ;
const difference = Math . abs (
differenceInCalendarMonths ( workingLaterDate , earlierDate _ )
) ;
if ( difference < 1 ) return 0 ;
if ( workingLaterDate . getMonth ( ) === 1 && workingLaterDate . getDate ( ) > 27 )
workingLaterDate . setDate ( 30 ) ;
workingLaterDate . setMonth ( workingLaterDate . getMonth ( ) - sign * difference ) ;
let isLastMonthNotFull = compareAsc ( workingLaterDate , earlierDate _ ) === - sign ;
if ( isLastDayOfMonth ( laterDate _ ) && difference === 1 && compareAsc ( laterDate _ , earlierDate _ ) === 1 ) {
isLastMonthNotFull = false ;
}
const result = sign * ( difference - + isLastMonthNotFull ) ;
return result === 0 ? 0 : result ;
}
// node_modules/date-fns/differenceInQuarters.js
function differenceInQuarters ( laterDate , earlierDate , options ) {
const diff = differenceInMonths ( laterDate , earlierDate , options ) / 3 ;
return getRoundingMethod ( options == null ? void 0 : options . roundingMethod ) ( diff ) ;
}
// node_modules/date-fns/differenceInSeconds.js
function differenceInSeconds ( laterDate , earlierDate , options ) {
const diff = differenceInMilliseconds ( laterDate , earlierDate ) / 1e3 ;
return getRoundingMethod ( options == null ? void 0 : options . roundingMethod ) ( diff ) ;
}
// node_modules/date-fns/differenceInWeeks.js
function differenceInWeeks ( laterDate , earlierDate , options ) {
const diff = differenceInDays ( laterDate , earlierDate , options ) / 7 ;
return getRoundingMethod ( options == null ? void 0 : options . roundingMethod ) ( diff ) ;
}
// node_modules/date-fns/differenceInYears.js
function differenceInYears ( laterDate , earlierDate , options ) {
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
const sign = compareAsc ( laterDate _ , earlierDate _ ) ;
const diff = Math . abs ( differenceInCalendarYears ( laterDate _ , earlierDate _ ) ) ;
laterDate _ . setFullYear ( 1584 ) ;
earlierDate _ . setFullYear ( 1584 ) ;
const partial = compareAsc ( laterDate _ , earlierDate _ ) === - sign ;
const result = sign * ( diff - + partial ) ;
return result === 0 ? 0 : result ;
}
// node_modules/date-fns/_lib/normalizeInterval.js
function normalizeInterval ( context , interval2 ) {
const [ start , end ] = normalizeDates ( context , interval2 . start , interval2 . end ) ;
return { start , end } ;
}
// node_modules/date-fns/eachDayOfInterval.js
function eachDayOfInterval ( interval2 , options ) {
const { start , end } = normalizeInterval ( options == null ? void 0 : options . in , interval2 ) ;
let reversed = + start > + end ;
const endTime = reversed ? + start : + end ;
const date = reversed ? end : start ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
let step = ( options == null ? void 0 : options . step ) ? ? 1 ;
if ( ! step ) return [ ] ;
if ( step < 0 ) {
step = - step ;
reversed = ! reversed ;
}
const dates = [ ] ;
while ( + date <= endTime ) {
dates . push ( constructFrom ( start , date ) ) ;
date . setDate ( date . getDate ( ) + step ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
}
return reversed ? dates . reverse ( ) : dates ;
}
// node_modules/date-fns/eachHourOfInterval.js
function eachHourOfInterval ( interval2 , options ) {
const { start , end } = normalizeInterval ( options == null ? void 0 : options . in , interval2 ) ;
let reversed = + start > + end ;
const endTime = reversed ? + start : + end ;
const date = reversed ? end : start ;
date . setMinutes ( 0 , 0 , 0 ) ;
let step = ( options == null ? void 0 : options . step ) ? ? 1 ;
if ( ! step ) return [ ] ;
if ( step < 0 ) {
step = - step ;
reversed = ! reversed ;
}
const dates = [ ] ;
while ( + date <= endTime ) {
dates . push ( constructFrom ( start , date ) ) ;
date . setHours ( date . getHours ( ) + step ) ;
}
return reversed ? dates . reverse ( ) : dates ;
}
// node_modules/date-fns/eachMinuteOfInterval.js
function eachMinuteOfInterval ( interval2 , options ) {
const { start , end } = normalizeInterval ( options == null ? void 0 : options . in , interval2 ) ;
start . setSeconds ( 0 , 0 ) ;
let reversed = + start > + end ;
const endTime = reversed ? + start : + end ;
let date = reversed ? end : start ;
let step = ( options == null ? void 0 : options . step ) ? ? 1 ;
if ( ! step ) return [ ] ;
if ( step < 0 ) {
step = - step ;
reversed = ! reversed ;
}
const dates = [ ] ;
while ( + date <= endTime ) {
dates . push ( constructFrom ( start , date ) ) ;
date = addMinutes ( date , step ) ;
}
return reversed ? dates . reverse ( ) : dates ;
}
// node_modules/date-fns/eachMonthOfInterval.js
function eachMonthOfInterval ( interval2 , options ) {
const { start , end } = normalizeInterval ( options == null ? void 0 : options . in , interval2 ) ;
let reversed = + start > + end ;
const endTime = reversed ? + start : + end ;
const date = reversed ? end : start ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
date . setDate ( 1 ) ;
let step = ( options == null ? void 0 : options . step ) ? ? 1 ;
if ( ! step ) return [ ] ;
if ( step < 0 ) {
step = - step ;
reversed = ! reversed ;
}
const dates = [ ] ;
while ( + date <= endTime ) {
dates . push ( constructFrom ( start , date ) ) ;
date . setMonth ( date . getMonth ( ) + step ) ;
}
return reversed ? dates . reverse ( ) : dates ;
}
// node_modules/date-fns/startOfQuarter.js
function startOfQuarter ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const currentMonth = _date . getMonth ( ) ;
const month = currentMonth - currentMonth % 3 ;
_date . setMonth ( month , 1 ) ;
_date . setHours ( 0 , 0 , 0 , 0 ) ;
return _date ;
}
// node_modules/date-fns/eachQuarterOfInterval.js
function eachQuarterOfInterval ( interval2 , options ) {
const { start , end } = normalizeInterval ( options == null ? void 0 : options . in , interval2 ) ;
let reversed = + start > + end ;
const endTime = reversed ? + startOfQuarter ( start ) : + startOfQuarter ( end ) ;
let date = reversed ? startOfQuarter ( end ) : startOfQuarter ( start ) ;
let step = ( options == null ? void 0 : options . step ) ? ? 1 ;
if ( ! step ) return [ ] ;
if ( step < 0 ) {
step = - step ;
reversed = ! reversed ;
}
const dates = [ ] ;
while ( + date <= endTime ) {
dates . push ( constructFrom ( start , date ) ) ;
date = addQuarters ( date , step ) ;
}
return reversed ? dates . reverse ( ) : dates ;
}
// node_modules/date-fns/eachWeekOfInterval.js
function eachWeekOfInterval ( interval2 , options ) {
const { start , end } = normalizeInterval ( options == null ? void 0 : options . in , interval2 ) ;
let reversed = + start > + end ;
const startDateWeek = reversed ? startOfWeek ( end , options ) : startOfWeek ( start , options ) ;
const endDateWeek = reversed ? startOfWeek ( start , options ) : startOfWeek ( end , options ) ;
startDateWeek . setHours ( 15 ) ;
endDateWeek . setHours ( 15 ) ;
const endTime = + endDateWeek . getTime ( ) ;
let currentDate = startDateWeek ;
let step = ( options == null ? void 0 : options . step ) ? ? 1 ;
if ( ! step ) return [ ] ;
if ( step < 0 ) {
step = - step ;
reversed = ! reversed ;
}
const dates = [ ] ;
while ( + currentDate <= endTime ) {
currentDate . setHours ( 0 ) ;
dates . push ( constructFrom ( start , currentDate ) ) ;
currentDate = addWeeks ( currentDate , step ) ;
currentDate . setHours ( 15 ) ;
}
return reversed ? dates . reverse ( ) : dates ;
}
// node_modules/date-fns/eachWeekendOfInterval.js
function eachWeekendOfInterval ( interval2 , options ) {
const { start , end } = normalizeInterval ( options == null ? void 0 : options . in , interval2 ) ;
const dateInterval = eachDayOfInterval ( { start , end } , options ) ;
const weekends = [ ] ;
let index = 0 ;
while ( index < dateInterval . length ) {
const date = dateInterval [ index ++ ] ;
if ( isWeekend ( date ) ) weekends . push ( constructFrom ( start , date ) ) ;
}
return weekends ;
}
// node_modules/date-fns/startOfMonth.js
function startOfMonth ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
_date . setDate ( 1 ) ;
_date . setHours ( 0 , 0 , 0 , 0 ) ;
return _date ;
}
// node_modules/date-fns/eachWeekendOfMonth.js
function eachWeekendOfMonth ( date , options ) {
const start = startOfMonth ( date , options ) ;
const end = endOfMonth ( date , options ) ;
return eachWeekendOfInterval ( { start , end } , options ) ;
}
// node_modules/date-fns/endOfYear.js
function endOfYear ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const year = _date . getFullYear ( ) ;
_date . setFullYear ( year + 1 , 0 , 0 ) ;
_date . setHours ( 23 , 59 , 59 , 999 ) ;
return _date ;
}
// node_modules/date-fns/startOfYear.js
function startOfYear ( date , options ) {
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
date _ . setFullYear ( date _ . getFullYear ( ) , 0 , 1 ) ;
date _ . setHours ( 0 , 0 , 0 , 0 ) ;
return date _ ;
}
// node_modules/date-fns/eachWeekendOfYear.js
function eachWeekendOfYear ( date , options ) {
const start = startOfYear ( date , options ) ;
const end = endOfYear ( date , options ) ;
return eachWeekendOfInterval ( { start , end } , options ) ;
}
// node_modules/date-fns/eachYearOfInterval.js
function eachYearOfInterval ( interval2 , options ) {
const { start , end } = normalizeInterval ( options == null ? void 0 : options . in , interval2 ) ;
let reversed = + start > + end ;
const endTime = reversed ? + start : + end ;
const date = reversed ? end : start ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
date . setMonth ( 0 , 1 ) ;
let step = ( options == null ? void 0 : options . step ) ? ? 1 ;
if ( ! step ) return [ ] ;
if ( step < 0 ) {
step = - step ;
reversed = ! reversed ;
}
const dates = [ ] ;
while ( + date <= endTime ) {
dates . push ( constructFrom ( start , date ) ) ;
date . setFullYear ( date . getFullYear ( ) + step ) ;
}
return reversed ? dates . reverse ( ) : dates ;
}
// node_modules/date-fns/endOfDecade.js
function endOfDecade ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const year = _date . getFullYear ( ) ;
const decade = 9 + Math . floor ( year / 10 ) * 10 ;
_date . setFullYear ( decade , 11 , 31 ) ;
_date . setHours ( 23 , 59 , 59 , 999 ) ;
return _date ;
}
// node_modules/date-fns/endOfHour.js
function endOfHour ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
_date . setMinutes ( 59 , 59 , 999 ) ;
return _date ;
}
// node_modules/date-fns/endOfWeek.js
function endOfWeek ( date , options ) {
var _a , _b , _c , _d ;
2026-03-26 09:29:55 +00:00
const defaultOptions = getDefaultOptions ( ) ;
const weekStartsOn = ( options == null ? void 0 : options . weekStartsOn ) ? ? ( ( _b = ( _a = options == null ? void 0 : options . locale ) == null ? void 0 : _a . options ) == null ? void 0 : _b . weekStartsOn ) ? ? defaultOptions . weekStartsOn ? ? ( ( _d = ( _c = defaultOptions . locale ) == null ? void 0 : _c . options ) == null ? void 0 : _d . weekStartsOn ) ? ? 0 ;
2026-03-19 06:58:19 +00:00
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const day = _date . getDay ( ) ;
const diff = ( day < weekStartsOn ? - 7 : 0 ) + 6 - ( day - weekStartsOn ) ;
_date . setDate ( _date . getDate ( ) + diff ) ;
_date . setHours ( 23 , 59 , 59 , 999 ) ;
return _date ;
}
// node_modules/date-fns/endOfISOWeek.js
function endOfISOWeek ( date , options ) {
return endOfWeek ( date , { ... options , weekStartsOn : 1 } ) ;
}
// node_modules/date-fns/endOfISOWeekYear.js
function endOfISOWeekYear ( date , options ) {
const year = getISOWeekYear ( date , options ) ;
const fourthOfJanuaryOfNextYear = constructFrom ( ( options == null ? void 0 : options . in ) || date , 0 ) ;
fourthOfJanuaryOfNextYear . setFullYear ( year + 1 , 0 , 4 ) ;
fourthOfJanuaryOfNextYear . setHours ( 0 , 0 , 0 , 0 ) ;
const _date = startOfISOWeek ( fourthOfJanuaryOfNextYear , options ) ;
_date . setMilliseconds ( _date . getMilliseconds ( ) - 1 ) ;
return _date ;
}
// node_modules/date-fns/endOfMinute.js
function endOfMinute ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
_date . setSeconds ( 59 , 999 ) ;
return _date ;
}
// node_modules/date-fns/endOfQuarter.js
function endOfQuarter ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const currentMonth = _date . getMonth ( ) ;
const month = currentMonth - currentMonth % 3 + 3 ;
_date . setMonth ( month , 0 ) ;
_date . setHours ( 23 , 59 , 59 , 999 ) ;
return _date ;
}
// node_modules/date-fns/endOfSecond.js
function endOfSecond ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
_date . setMilliseconds ( 999 ) ;
return _date ;
}
// node_modules/date-fns/endOfToday.js
function endOfToday ( options ) {
return endOfDay ( Date . now ( ) , options ) ;
}
// node_modules/date-fns/endOfTomorrow.js
function endOfTomorrow ( options ) {
const now = constructNow ( options == null ? void 0 : options . in ) ;
const year = now . getFullYear ( ) ;
const month = now . getMonth ( ) ;
const day = now . getDate ( ) ;
const date = constructNow ( options == null ? void 0 : options . in ) ;
date . setFullYear ( year , month , day + 1 ) ;
date . setHours ( 23 , 59 , 59 , 999 ) ;
return ( options == null ? void 0 : options . in ) ? options . in ( date ) : date ;
}
// node_modules/date-fns/endOfYesterday.js
function endOfYesterday ( options ) {
const now = constructNow ( options == null ? void 0 : options . in ) ;
const date = constructFrom ( options == null ? void 0 : options . in , 0 ) ;
date . setFullYear ( now . getFullYear ( ) , now . getMonth ( ) , now . getDate ( ) - 1 ) ;
date . setHours ( 23 , 59 , 59 , 999 ) ;
return date ;
}
// node_modules/date-fns/getDayOfYear.js
function getDayOfYear ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const diff = differenceInCalendarDays ( _date , startOfYear ( _date ) ) ;
const dayOfYear = diff + 1 ;
return dayOfYear ;
}
// node_modules/date-fns/getISOWeek.js
function getISOWeek ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const diff = + startOfISOWeek ( _date ) - + startOfISOWeekYear ( _date ) ;
return Math . round ( diff / millisecondsInWeek ) + 1 ;
}
// node_modules/date-fns/getWeekYear.js
function getWeekYear ( date , options ) {
var _a , _b , _c , _d ;
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const year = _date . getFullYear ( ) ;
2026-03-26 09:29:55 +00:00
const defaultOptions = getDefaultOptions ( ) ;
const firstWeekContainsDate = ( options == null ? void 0 : options . firstWeekContainsDate ) ? ? ( ( _b = ( _a = options == null ? void 0 : options . locale ) == null ? void 0 : _a . options ) == null ? void 0 : _b . firstWeekContainsDate ) ? ? defaultOptions . firstWeekContainsDate ? ? ( ( _d = ( _c = defaultOptions . locale ) == null ? void 0 : _c . options ) == null ? void 0 : _d . firstWeekContainsDate ) ? ? 1 ;
2026-03-19 06:58:19 +00:00
const firstWeekOfNextYear = constructFrom ( ( options == null ? void 0 : options . in ) || date , 0 ) ;
firstWeekOfNextYear . setFullYear ( year + 1 , 0 , firstWeekContainsDate ) ;
firstWeekOfNextYear . setHours ( 0 , 0 , 0 , 0 ) ;
const startOfNextYear = startOfWeek ( firstWeekOfNextYear , options ) ;
const firstWeekOfThisYear = constructFrom ( ( options == null ? void 0 : options . in ) || date , 0 ) ;
firstWeekOfThisYear . setFullYear ( year , 0 , firstWeekContainsDate ) ;
firstWeekOfThisYear . setHours ( 0 , 0 , 0 , 0 ) ;
const startOfThisYear = startOfWeek ( firstWeekOfThisYear , options ) ;
if ( + _date >= + startOfNextYear ) {
return year + 1 ;
} else if ( + _date >= + startOfThisYear ) {
return year ;
} else {
return year - 1 ;
}
}
// node_modules/date-fns/startOfWeekYear.js
function startOfWeekYear ( date , options ) {
var _a , _b , _c , _d ;
2026-03-26 09:29:55 +00:00
const defaultOptions = getDefaultOptions ( ) ;
const firstWeekContainsDate = ( options == null ? void 0 : options . firstWeekContainsDate ) ? ? ( ( _b = ( _a = options == null ? void 0 : options . locale ) == null ? void 0 : _a . options ) == null ? void 0 : _b . firstWeekContainsDate ) ? ? defaultOptions . firstWeekContainsDate ? ? ( ( _d = ( _c = defaultOptions . locale ) == null ? void 0 : _c . options ) == null ? void 0 : _d . firstWeekContainsDate ) ? ? 1 ;
2026-03-19 06:58:19 +00:00
const year = getWeekYear ( date , options ) ;
const firstWeek = constructFrom ( ( options == null ? void 0 : options . in ) || date , 0 ) ;
firstWeek . setFullYear ( year , 0 , firstWeekContainsDate ) ;
firstWeek . setHours ( 0 , 0 , 0 , 0 ) ;
const _date = startOfWeek ( firstWeek , options ) ;
return _date ;
}
// node_modules/date-fns/getWeek.js
function getWeek ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const diff = + startOfWeek ( _date , options ) - + startOfWeekYear ( _date , options ) ;
return Math . round ( diff / millisecondsInWeek ) + 1 ;
}
// node_modules/date-fns/_lib/addLeadingZeros.js
function addLeadingZeros ( number , targetLength ) {
const sign = number < 0 ? "-" : "" ;
const output = Math . abs ( number ) . toString ( ) . padStart ( targetLength , "0" ) ;
return sign + output ;
}
// node_modules/date-fns/_lib/format/lightFormatters.js
var lightFormatters = {
// Year
y ( date , token ) {
const signedYear = date . getFullYear ( ) ;
const year = signedYear > 0 ? signedYear : 1 - signedYear ;
return addLeadingZeros ( token === "yy" ? year % 100 : year , token . length ) ;
} ,
// Month
M ( date , token ) {
const month = date . getMonth ( ) ;
return token === "M" ? String ( month + 1 ) : addLeadingZeros ( month + 1 , 2 ) ;
} ,
// Day of the month
d ( date , token ) {
return addLeadingZeros ( date . getDate ( ) , token . length ) ;
} ,
// AM or PM
a ( date , token ) {
const dayPeriodEnumValue = date . getHours ( ) / 12 >= 1 ? "pm" : "am" ;
switch ( token ) {
case "a" :
case "aa" :
return dayPeriodEnumValue . toUpperCase ( ) ;
case "aaa" :
return dayPeriodEnumValue ;
case "aaaaa" :
return dayPeriodEnumValue [ 0 ] ;
case "aaaa" :
default :
return dayPeriodEnumValue === "am" ? "a.m." : "p.m." ;
}
} ,
// Hour [1-12]
h ( date , token ) {
return addLeadingZeros ( date . getHours ( ) % 12 || 12 , token . length ) ;
} ,
// Hour [0-23]
H ( date , token ) {
return addLeadingZeros ( date . getHours ( ) , token . length ) ;
} ,
// Minute
m ( date , token ) {
return addLeadingZeros ( date . getMinutes ( ) , token . length ) ;
} ,
// Second
s ( date , token ) {
return addLeadingZeros ( date . getSeconds ( ) , token . length ) ;
} ,
// Fraction of second
S ( date , token ) {
const numberOfDigits = token . length ;
const milliseconds2 = date . getMilliseconds ( ) ;
const fractionalSeconds = Math . trunc (
milliseconds2 * Math . pow ( 10 , numberOfDigits - 3 )
) ;
return addLeadingZeros ( fractionalSeconds , token . length ) ;
}
} ;
// node_modules/date-fns/_lib/format/formatters.js
var dayPeriodEnum = {
am : "am" ,
pm : "pm" ,
midnight : "midnight" ,
noon : "noon" ,
morning : "morning" ,
afternoon : "afternoon" ,
evening : "evening" ,
night : "night"
} ;
var formatters = {
// Era
2026-03-26 09:29:55 +00:00
G : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
const era = date . getFullYear ( ) > 0 ? 1 : 0 ;
switch ( token ) {
// AD, BC
case "G" :
case "GG" :
case "GGG" :
2026-03-26 09:29:55 +00:00
return localize . era ( era , { width : "abbreviated" } ) ;
2026-03-19 06:58:19 +00:00
// A, B
case "GGGGG" :
2026-03-26 09:29:55 +00:00
return localize . era ( era , { width : "narrow" } ) ;
2026-03-19 06:58:19 +00:00
// Anno Domini, Before Christ
case "GGGG" :
default :
2026-03-26 09:29:55 +00:00
return localize . era ( era , { width : "wide" } ) ;
2026-03-19 06:58:19 +00:00
}
} ,
// Year
2026-03-26 09:29:55 +00:00
y : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
if ( token === "yo" ) {
const signedYear = date . getFullYear ( ) ;
const year = signedYear > 0 ? signedYear : 1 - signedYear ;
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( year , { unit : "year" } ) ;
2026-03-19 06:58:19 +00:00
}
return lightFormatters . y ( date , token ) ;
} ,
// Local week-numbering year
2026-03-26 09:29:55 +00:00
Y : function ( date , token , localize , options ) {
2026-03-19 06:58:19 +00:00
const signedWeekYear = getWeekYear ( date , options ) ;
const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear ;
if ( token === "YY" ) {
const twoDigitYear = weekYear % 100 ;
return addLeadingZeros ( twoDigitYear , 2 ) ;
}
if ( token === "Yo" ) {
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( weekYear , { unit : "year" } ) ;
2026-03-19 06:58:19 +00:00
}
return addLeadingZeros ( weekYear , token . length ) ;
} ,
// ISO week-numbering year
R : function ( date , token ) {
const isoWeekYear = getISOWeekYear ( date ) ;
return addLeadingZeros ( isoWeekYear , token . length ) ;
} ,
// Extended year. This is a single number designating the year of this calendar system.
// The main difference between `y` and `u` localizers are B.C. years:
// | Year | `y` | `u` |
// |------|-----|-----|
// | AC 1 | 1 | 1 |
// | BC 1 | 1 | 0 |
// | BC 2 | 2 | -1 |
// Also `yy` always returns the last two digits of a year,
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
u : function ( date , token ) {
const year = date . getFullYear ( ) ;
return addLeadingZeros ( year , token . length ) ;
} ,
// Quarter
2026-03-26 09:29:55 +00:00
Q : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
const quarter = Math . ceil ( ( date . getMonth ( ) + 1 ) / 3 ) ;
switch ( token ) {
// 1, 2, 3, 4
case "Q" :
return String ( quarter ) ;
// 01, 02, 03, 04
case "QQ" :
return addLeadingZeros ( quarter , 2 ) ;
// 1st, 2nd, 3rd, 4th
case "Qo" :
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( quarter , { unit : "quarter" } ) ;
2026-03-19 06:58:19 +00:00
// Q1, Q2, Q3, Q4
case "QQQ" :
2026-03-26 09:29:55 +00:00
return localize . quarter ( quarter , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
} ) ;
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
case "QQQQQ" :
2026-03-26 09:29:55 +00:00
return localize . quarter ( quarter , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
// 1st quarter, 2nd quarter, ...
case "QQQQ" :
default :
2026-03-26 09:29:55 +00:00
return localize . quarter ( quarter , {
2026-03-19 06:58:19 +00:00
width : "wide" ,
context : "formatting"
} ) ;
}
} ,
// Stand-alone quarter
2026-03-26 09:29:55 +00:00
q : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
const quarter = Math . ceil ( ( date . getMonth ( ) + 1 ) / 3 ) ;
switch ( token ) {
// 1, 2, 3, 4
case "q" :
return String ( quarter ) ;
// 01, 02, 03, 04
case "qq" :
return addLeadingZeros ( quarter , 2 ) ;
// 1st, 2nd, 3rd, 4th
case "qo" :
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( quarter , { unit : "quarter" } ) ;
2026-03-19 06:58:19 +00:00
// Q1, Q2, Q3, Q4
case "qqq" :
2026-03-26 09:29:55 +00:00
return localize . quarter ( quarter , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "standalone"
} ) ;
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
case "qqqqq" :
2026-03-26 09:29:55 +00:00
return localize . quarter ( quarter , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "standalone"
} ) ;
// 1st quarter, 2nd quarter, ...
case "qqqq" :
default :
2026-03-26 09:29:55 +00:00
return localize . quarter ( quarter , {
2026-03-19 06:58:19 +00:00
width : "wide" ,
context : "standalone"
} ) ;
}
} ,
// Month
2026-03-26 09:29:55 +00:00
M : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
const month = date . getMonth ( ) ;
switch ( token ) {
case "M" :
case "MM" :
return lightFormatters . M ( date , token ) ;
// 1st, 2nd, ..., 12th
case "Mo" :
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( month + 1 , { unit : "month" } ) ;
2026-03-19 06:58:19 +00:00
// Jan, Feb, ..., Dec
case "MMM" :
2026-03-26 09:29:55 +00:00
return localize . month ( month , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
} ) ;
// J, F, ..., D
case "MMMMM" :
2026-03-26 09:29:55 +00:00
return localize . month ( month , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
// January, February, ..., December
case "MMMM" :
default :
2026-03-26 09:29:55 +00:00
return localize . month ( month , { width : "wide" , context : "formatting" } ) ;
2026-03-19 06:58:19 +00:00
}
} ,
// Stand-alone month
2026-03-26 09:29:55 +00:00
L : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
const month = date . getMonth ( ) ;
switch ( token ) {
// 1, 2, ..., 12
case "L" :
return String ( month + 1 ) ;
// 01, 02, ..., 12
case "LL" :
return addLeadingZeros ( month + 1 , 2 ) ;
// 1st, 2nd, ..., 12th
case "Lo" :
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( month + 1 , { unit : "month" } ) ;
2026-03-19 06:58:19 +00:00
// Jan, Feb, ..., Dec
case "LLL" :
2026-03-26 09:29:55 +00:00
return localize . month ( month , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "standalone"
} ) ;
// J, F, ..., D
case "LLLLL" :
2026-03-26 09:29:55 +00:00
return localize . month ( month , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "standalone"
} ) ;
// January, February, ..., December
case "LLLL" :
default :
2026-03-26 09:29:55 +00:00
return localize . month ( month , { width : "wide" , context : "standalone" } ) ;
2026-03-19 06:58:19 +00:00
}
} ,
// Local week of year
2026-03-26 09:29:55 +00:00
w : function ( date , token , localize , options ) {
2026-03-19 06:58:19 +00:00
const week = getWeek ( date , options ) ;
if ( token === "wo" ) {
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( week , { unit : "week" } ) ;
2026-03-19 06:58:19 +00:00
}
return addLeadingZeros ( week , token . length ) ;
} ,
// ISO week of year
2026-03-26 09:29:55 +00:00
I : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
const isoWeek = getISOWeek ( date ) ;
if ( token === "Io" ) {
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( isoWeek , { unit : "week" } ) ;
2026-03-19 06:58:19 +00:00
}
return addLeadingZeros ( isoWeek , token . length ) ;
} ,
// Day of the month
2026-03-26 09:29:55 +00:00
d : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
if ( token === "do" ) {
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( date . getDate ( ) , { unit : "date" } ) ;
2026-03-19 06:58:19 +00:00
}
return lightFormatters . d ( date , token ) ;
} ,
// Day of year
2026-03-26 09:29:55 +00:00
D : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
const dayOfYear = getDayOfYear ( date ) ;
if ( token === "Do" ) {
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( dayOfYear , { unit : "dayOfYear" } ) ;
2026-03-19 06:58:19 +00:00
}
return addLeadingZeros ( dayOfYear , token . length ) ;
} ,
// Day of week
2026-03-26 09:29:55 +00:00
E : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
const dayOfWeek = date . getDay ( ) ;
switch ( token ) {
// Tue
case "E" :
case "EE" :
case "EEE" :
2026-03-26 09:29:55 +00:00
return localize . day ( dayOfWeek , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
} ) ;
// T
case "EEEEE" :
2026-03-26 09:29:55 +00:00
return localize . day ( dayOfWeek , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
// Tu
case "EEEEEE" :
2026-03-26 09:29:55 +00:00
return localize . day ( dayOfWeek , {
2026-03-19 06:58:19 +00:00
width : "short" ,
context : "formatting"
} ) ;
// Tuesday
case "EEEE" :
default :
2026-03-26 09:29:55 +00:00
return localize . day ( dayOfWeek , {
2026-03-19 06:58:19 +00:00
width : "wide" ,
context : "formatting"
} ) ;
}
} ,
// Local day of week
2026-03-26 09:29:55 +00:00
e : function ( date , token , localize , options ) {
2026-03-19 06:58:19 +00:00
const dayOfWeek = date . getDay ( ) ;
const localDayOfWeek = ( dayOfWeek - options . weekStartsOn + 8 ) % 7 || 7 ;
switch ( token ) {
// Numerical value (Nth day of week with current locale or weekStartsOn)
case "e" :
return String ( localDayOfWeek ) ;
// Padded numerical value
case "ee" :
return addLeadingZeros ( localDayOfWeek , 2 ) ;
// 1st, 2nd, ..., 7th
case "eo" :
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( localDayOfWeek , { unit : "day" } ) ;
2026-03-19 06:58:19 +00:00
case "eee" :
2026-03-26 09:29:55 +00:00
return localize . day ( dayOfWeek , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
} ) ;
// T
case "eeeee" :
2026-03-26 09:29:55 +00:00
return localize . day ( dayOfWeek , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
// Tu
case "eeeeee" :
2026-03-26 09:29:55 +00:00
return localize . day ( dayOfWeek , {
2026-03-19 06:58:19 +00:00
width : "short" ,
context : "formatting"
} ) ;
// Tuesday
case "eeee" :
default :
2026-03-26 09:29:55 +00:00
return localize . day ( dayOfWeek , {
2026-03-19 06:58:19 +00:00
width : "wide" ,
context : "formatting"
} ) ;
}
} ,
// Stand-alone local day of week
2026-03-26 09:29:55 +00:00
c : function ( date , token , localize , options ) {
2026-03-19 06:58:19 +00:00
const dayOfWeek = date . getDay ( ) ;
const localDayOfWeek = ( dayOfWeek - options . weekStartsOn + 8 ) % 7 || 7 ;
switch ( token ) {
// Numerical value (same as in `e`)
case "c" :
return String ( localDayOfWeek ) ;
// Padded numerical value
case "cc" :
return addLeadingZeros ( localDayOfWeek , token . length ) ;
// 1st, 2nd, ..., 7th
case "co" :
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( localDayOfWeek , { unit : "day" } ) ;
2026-03-19 06:58:19 +00:00
case "ccc" :
2026-03-26 09:29:55 +00:00
return localize . day ( dayOfWeek , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "standalone"
} ) ;
// T
case "ccccc" :
2026-03-26 09:29:55 +00:00
return localize . day ( dayOfWeek , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "standalone"
} ) ;
// Tu
case "cccccc" :
2026-03-26 09:29:55 +00:00
return localize . day ( dayOfWeek , {
2026-03-19 06:58:19 +00:00
width : "short" ,
context : "standalone"
} ) ;
// Tuesday
case "cccc" :
default :
2026-03-26 09:29:55 +00:00
return localize . day ( dayOfWeek , {
2026-03-19 06:58:19 +00:00
width : "wide" ,
context : "standalone"
} ) ;
}
} ,
// ISO day of week
2026-03-26 09:29:55 +00:00
i : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
const dayOfWeek = date . getDay ( ) ;
const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek ;
switch ( token ) {
// 2
case "i" :
return String ( isoDayOfWeek ) ;
// 02
case "ii" :
return addLeadingZeros ( isoDayOfWeek , token . length ) ;
// 2nd
case "io" :
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( isoDayOfWeek , { unit : "day" } ) ;
2026-03-19 06:58:19 +00:00
// Tue
case "iii" :
2026-03-26 09:29:55 +00:00
return localize . day ( dayOfWeek , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
} ) ;
// T
case "iiiii" :
2026-03-26 09:29:55 +00:00
return localize . day ( dayOfWeek , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
// Tu
case "iiiiii" :
2026-03-26 09:29:55 +00:00
return localize . day ( dayOfWeek , {
2026-03-19 06:58:19 +00:00
width : "short" ,
context : "formatting"
} ) ;
// Tuesday
case "iiii" :
default :
2026-03-26 09:29:55 +00:00
return localize . day ( dayOfWeek , {
2026-03-19 06:58:19 +00:00
width : "wide" ,
context : "formatting"
} ) ;
}
} ,
// AM or PM
2026-03-26 09:29:55 +00:00
a : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
const hours = date . getHours ( ) ;
const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am" ;
switch ( token ) {
case "a" :
case "aa" :
2026-03-26 09:29:55 +00:00
return localize . dayPeriod ( dayPeriodEnumValue , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
} ) ;
case "aaa" :
2026-03-26 09:29:55 +00:00
return localize . dayPeriod ( dayPeriodEnumValue , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
} ) . toLowerCase ( ) ;
case "aaaaa" :
2026-03-26 09:29:55 +00:00
return localize . dayPeriod ( dayPeriodEnumValue , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
case "aaaa" :
default :
2026-03-26 09:29:55 +00:00
return localize . dayPeriod ( dayPeriodEnumValue , {
2026-03-19 06:58:19 +00:00
width : "wide" ,
context : "formatting"
} ) ;
}
} ,
// AM, PM, midnight, noon
2026-03-26 09:29:55 +00:00
b : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
const hours = date . getHours ( ) ;
let dayPeriodEnumValue ;
if ( hours === 12 ) {
dayPeriodEnumValue = dayPeriodEnum . noon ;
} else if ( hours === 0 ) {
dayPeriodEnumValue = dayPeriodEnum . midnight ;
} else {
dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am" ;
}
switch ( token ) {
case "b" :
case "bb" :
2026-03-26 09:29:55 +00:00
return localize . dayPeriod ( dayPeriodEnumValue , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
} ) ;
case "bbb" :
2026-03-26 09:29:55 +00:00
return localize . dayPeriod ( dayPeriodEnumValue , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
} ) . toLowerCase ( ) ;
case "bbbbb" :
2026-03-26 09:29:55 +00:00
return localize . dayPeriod ( dayPeriodEnumValue , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
case "bbbb" :
default :
2026-03-26 09:29:55 +00:00
return localize . dayPeriod ( dayPeriodEnumValue , {
2026-03-19 06:58:19 +00:00
width : "wide" ,
context : "formatting"
} ) ;
}
} ,
// in the morning, in the afternoon, in the evening, at night
2026-03-26 09:29:55 +00:00
B : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
const hours = date . getHours ( ) ;
let dayPeriodEnumValue ;
if ( hours >= 17 ) {
dayPeriodEnumValue = dayPeriodEnum . evening ;
} else if ( hours >= 12 ) {
dayPeriodEnumValue = dayPeriodEnum . afternoon ;
} else if ( hours >= 4 ) {
dayPeriodEnumValue = dayPeriodEnum . morning ;
} else {
dayPeriodEnumValue = dayPeriodEnum . night ;
}
switch ( token ) {
case "B" :
case "BB" :
case "BBB" :
2026-03-26 09:29:55 +00:00
return localize . dayPeriod ( dayPeriodEnumValue , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
} ) ;
case "BBBBB" :
2026-03-26 09:29:55 +00:00
return localize . dayPeriod ( dayPeriodEnumValue , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
case "BBBB" :
default :
2026-03-26 09:29:55 +00:00
return localize . dayPeriod ( dayPeriodEnumValue , {
2026-03-19 06:58:19 +00:00
width : "wide" ,
context : "formatting"
} ) ;
}
} ,
// Hour [1-12]
2026-03-26 09:29:55 +00:00
h : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
if ( token === "ho" ) {
let hours = date . getHours ( ) % 12 ;
if ( hours === 0 ) hours = 12 ;
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( hours , { unit : "hour" } ) ;
2026-03-19 06:58:19 +00:00
}
return lightFormatters . h ( date , token ) ;
} ,
// Hour [0-23]
2026-03-26 09:29:55 +00:00
H : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
if ( token === "Ho" ) {
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( date . getHours ( ) , { unit : "hour" } ) ;
2026-03-19 06:58:19 +00:00
}
return lightFormatters . H ( date , token ) ;
} ,
// Hour [0-11]
2026-03-26 09:29:55 +00:00
K : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
const hours = date . getHours ( ) % 12 ;
if ( token === "Ko" ) {
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( hours , { unit : "hour" } ) ;
2026-03-19 06:58:19 +00:00
}
return addLeadingZeros ( hours , token . length ) ;
} ,
// Hour [1-24]
2026-03-26 09:29:55 +00:00
k : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
let hours = date . getHours ( ) ;
if ( hours === 0 ) hours = 24 ;
if ( token === "ko" ) {
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( hours , { unit : "hour" } ) ;
2026-03-19 06:58:19 +00:00
}
return addLeadingZeros ( hours , token . length ) ;
} ,
// Minute
2026-03-26 09:29:55 +00:00
m : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
if ( token === "mo" ) {
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( date . getMinutes ( ) , { unit : "minute" } ) ;
2026-03-19 06:58:19 +00:00
}
return lightFormatters . m ( date , token ) ;
} ,
// Second
2026-03-26 09:29:55 +00:00
s : function ( date , token , localize ) {
2026-03-19 06:58:19 +00:00
if ( token === "so" ) {
2026-03-26 09:29:55 +00:00
return localize . ordinalNumber ( date . getSeconds ( ) , { unit : "second" } ) ;
2026-03-19 06:58:19 +00:00
}
return lightFormatters . s ( date , token ) ;
} ,
// Fraction of second
S : function ( date , token ) {
return lightFormatters . S ( date , token ) ;
} ,
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
X : function ( date , token , _localize ) {
const timezoneOffset = date . getTimezoneOffset ( ) ;
if ( timezoneOffset === 0 ) {
return "Z" ;
}
switch ( token ) {
// Hours and optional minutes
case "X" :
return formatTimezoneWithOptionalMinutes ( timezoneOffset ) ;
// Hours, minutes and optional seconds without `:` delimiter
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
// so this token always has the same output as `XX`
case "XXXX" :
case "XX" :
return formatTimezone ( timezoneOffset ) ;
// Hours, minutes and optional seconds with `:` delimiter
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
// so this token always has the same output as `XXX`
case "XXXXX" :
case "XXX" :
// Hours and minutes with `:` delimiter
default :
return formatTimezone ( timezoneOffset , ":" ) ;
}
} ,
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
x : function ( date , token , _localize ) {
const timezoneOffset = date . getTimezoneOffset ( ) ;
switch ( token ) {
// Hours and optional minutes
case "x" :
return formatTimezoneWithOptionalMinutes ( timezoneOffset ) ;
// Hours, minutes and optional seconds without `:` delimiter
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
// so this token always has the same output as `xx`
case "xxxx" :
case "xx" :
return formatTimezone ( timezoneOffset ) ;
// Hours, minutes and optional seconds with `:` delimiter
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
// so this token always has the same output as `xxx`
case "xxxxx" :
case "xxx" :
// Hours and minutes with `:` delimiter
default :
return formatTimezone ( timezoneOffset , ":" ) ;
}
} ,
// Timezone (GMT)
O : function ( date , token , _localize ) {
const timezoneOffset = date . getTimezoneOffset ( ) ;
switch ( token ) {
// Short
case "O" :
case "OO" :
case "OOO" :
return "GMT" + formatTimezoneShort ( timezoneOffset , ":" ) ;
// Long
case "OOOO" :
default :
return "GMT" + formatTimezone ( timezoneOffset , ":" ) ;
}
} ,
// Timezone (specific non-location)
z : function ( date , token , _localize ) {
const timezoneOffset = date . getTimezoneOffset ( ) ;
switch ( token ) {
// Short
case "z" :
case "zz" :
case "zzz" :
return "GMT" + formatTimezoneShort ( timezoneOffset , ":" ) ;
// Long
case "zzzz" :
default :
return "GMT" + formatTimezone ( timezoneOffset , ":" ) ;
}
} ,
// Seconds timestamp
t : function ( date , token , _localize ) {
const timestamp = Math . trunc ( + date / 1e3 ) ;
return addLeadingZeros ( timestamp , token . length ) ;
} ,
// Milliseconds timestamp
T : function ( date , token , _localize ) {
return addLeadingZeros ( + date , token . length ) ;
}
} ;
function formatTimezoneShort ( offset , delimiter = "" ) {
const sign = offset > 0 ? "-" : "+" ;
const absOffset = Math . abs ( offset ) ;
const hours = Math . trunc ( absOffset / 60 ) ;
const minutes = absOffset % 60 ;
if ( minutes === 0 ) {
return sign + String ( hours ) ;
}
return sign + String ( hours ) + delimiter + addLeadingZeros ( minutes , 2 ) ;
}
function formatTimezoneWithOptionalMinutes ( offset , delimiter ) {
if ( offset % 60 === 0 ) {
const sign = offset > 0 ? "-" : "+" ;
return sign + addLeadingZeros ( Math . abs ( offset ) / 60 , 2 ) ;
}
return formatTimezone ( offset , delimiter ) ;
}
function formatTimezone ( offset , delimiter = "" ) {
const sign = offset > 0 ? "-" : "+" ;
const absOffset = Math . abs ( offset ) ;
const hours = addLeadingZeros ( Math . trunc ( absOffset / 60 ) , 2 ) ;
const minutes = addLeadingZeros ( absOffset % 60 , 2 ) ;
return sign + hours + delimiter + minutes ;
}
// node_modules/date-fns/_lib/format/longFormatters.js
2026-03-26 09:29:55 +00:00
var dateLongFormatter = ( pattern , formatLong ) => {
2026-03-19 06:58:19 +00:00
switch ( pattern ) {
case "P" :
2026-03-26 09:29:55 +00:00
return formatLong . date ( { width : "short" } ) ;
2026-03-19 06:58:19 +00:00
case "PP" :
2026-03-26 09:29:55 +00:00
return formatLong . date ( { width : "medium" } ) ;
2026-03-19 06:58:19 +00:00
case "PPP" :
2026-03-26 09:29:55 +00:00
return formatLong . date ( { width : "long" } ) ;
2026-03-19 06:58:19 +00:00
case "PPPP" :
default :
2026-03-26 09:29:55 +00:00
return formatLong . date ( { width : "full" } ) ;
2026-03-19 06:58:19 +00:00
}
} ;
2026-03-26 09:29:55 +00:00
var timeLongFormatter = ( pattern , formatLong ) => {
2026-03-19 06:58:19 +00:00
switch ( pattern ) {
case "p" :
2026-03-26 09:29:55 +00:00
return formatLong . time ( { width : "short" } ) ;
2026-03-19 06:58:19 +00:00
case "pp" :
2026-03-26 09:29:55 +00:00
return formatLong . time ( { width : "medium" } ) ;
2026-03-19 06:58:19 +00:00
case "ppp" :
2026-03-26 09:29:55 +00:00
return formatLong . time ( { width : "long" } ) ;
2026-03-19 06:58:19 +00:00
case "pppp" :
default :
2026-03-26 09:29:55 +00:00
return formatLong . time ( { width : "full" } ) ;
2026-03-19 06:58:19 +00:00
}
} ;
2026-03-26 09:29:55 +00:00
var dateTimeLongFormatter = ( pattern , formatLong ) => {
2026-03-19 06:58:19 +00:00
const matchResult = pattern . match ( /(P+)(p+)?/ ) || [ ] ;
const datePattern = matchResult [ 1 ] ;
const timePattern = matchResult [ 2 ] ;
if ( ! timePattern ) {
2026-03-26 09:29:55 +00:00
return dateLongFormatter ( pattern , formatLong ) ;
2026-03-19 06:58:19 +00:00
}
let dateTimeFormat ;
switch ( datePattern ) {
case "P" :
2026-03-26 09:29:55 +00:00
dateTimeFormat = formatLong . dateTime ( { width : "short" } ) ;
2026-03-19 06:58:19 +00:00
break ;
case "PP" :
2026-03-26 09:29:55 +00:00
dateTimeFormat = formatLong . dateTime ( { width : "medium" } ) ;
2026-03-19 06:58:19 +00:00
break ;
case "PPP" :
2026-03-26 09:29:55 +00:00
dateTimeFormat = formatLong . dateTime ( { width : "long" } ) ;
2026-03-19 06:58:19 +00:00
break ;
case "PPPP" :
default :
2026-03-26 09:29:55 +00:00
dateTimeFormat = formatLong . dateTime ( { width : "full" } ) ;
2026-03-19 06:58:19 +00:00
break ;
}
2026-03-26 09:29:55 +00:00
return dateTimeFormat . replace ( "{{date}}" , dateLongFormatter ( datePattern , formatLong ) ) . replace ( "{{time}}" , timeLongFormatter ( timePattern , formatLong ) ) ;
2026-03-19 06:58:19 +00:00
} ;
var longFormatters = {
p : timeLongFormatter ,
P : dateTimeLongFormatter
} ;
// node_modules/date-fns/_lib/protectedTokens.js
var dayOfYearTokenRE = /^D+$/ ;
var weekYearTokenRE = /^Y+$/ ;
var throwTokens = [ "D" , "DD" , "YY" , "YYYY" ] ;
function isProtectedDayOfYearToken ( token ) {
return dayOfYearTokenRE . test ( token ) ;
}
function isProtectedWeekYearToken ( token ) {
return weekYearTokenRE . test ( token ) ;
}
function warnOrThrowProtectedError ( token , format2 , input ) {
const _message = message ( token , format2 , input ) ;
console . warn ( _message ) ;
if ( throwTokens . includes ( token ) ) throw new RangeError ( _message ) ;
}
function message ( token , format2 , input ) {
const subject = token [ 0 ] === "Y" ? "years" : "days of the month" ;
return ` Use \` ${ token . toLowerCase ( ) } \` instead of \` ${ token } \` (in \` ${ format2 } \` ) for formatting ${ subject } to the input \` ${ input } \` ; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md ` ;
}
// node_modules/date-fns/format.js
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g ;
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g ;
var escapedStringRegExp = /^'([^]*?)'?$/ ;
var doubleQuoteRegExp = /''/g ;
var unescapedLatinCharacterRegExp = /[a-zA-Z]/ ;
function format ( date , formatStr , options ) {
var _a , _b , _c , _d , _e , _f , _g , _h ;
2026-03-26 09:29:55 +00:00
const defaultOptions = getDefaultOptions ( ) ;
const locale = ( options == null ? void 0 : options . locale ) ? ? defaultOptions . locale ? ? enUS ;
const firstWeekContainsDate = ( options == null ? void 0 : options . firstWeekContainsDate ) ? ? ( ( _b = ( _a = options == null ? void 0 : options . locale ) == null ? void 0 : _a . options ) == null ? void 0 : _b . firstWeekContainsDate ) ? ? defaultOptions . firstWeekContainsDate ? ? ( ( _d = ( _c = defaultOptions . locale ) == null ? void 0 : _c . options ) == null ? void 0 : _d . firstWeekContainsDate ) ? ? 1 ;
const weekStartsOn = ( options == null ? void 0 : options . weekStartsOn ) ? ? ( ( _f = ( _e = options == null ? void 0 : options . locale ) == null ? void 0 : _e . options ) == null ? void 0 : _f . weekStartsOn ) ? ? defaultOptions . weekStartsOn ? ? ( ( _h = ( _g = defaultOptions . locale ) == null ? void 0 : _g . options ) == null ? void 0 : _h . weekStartsOn ) ? ? 0 ;
2026-03-19 06:58:19 +00:00
const originalDate = toDate ( date , options == null ? void 0 : options . in ) ;
if ( ! isValid ( originalDate ) ) {
throw new RangeError ( "Invalid time value" ) ;
}
let parts = formatStr . match ( longFormattingTokensRegExp ) . map ( ( substring ) => {
const firstCharacter = substring [ 0 ] ;
if ( firstCharacter === "p" || firstCharacter === "P" ) {
const longFormatter = longFormatters [ firstCharacter ] ;
return longFormatter ( substring , locale . formatLong ) ;
}
return substring ;
} ) . join ( "" ) . match ( formattingTokensRegExp ) . map ( ( substring ) => {
if ( substring === "''" ) {
return { isToken : false , value : "'" } ;
}
const firstCharacter = substring [ 0 ] ;
if ( firstCharacter === "'" ) {
return { isToken : false , value : cleanEscapedString ( substring ) } ;
}
if ( formatters [ firstCharacter ] ) {
return { isToken : true , value : substring } ;
}
if ( firstCharacter . match ( unescapedLatinCharacterRegExp ) ) {
throw new RangeError (
"Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
) ;
}
return { isToken : false , value : substring } ;
} ) ;
if ( locale . localize . preprocessor ) {
parts = locale . localize . preprocessor ( originalDate , parts ) ;
}
const formatterOptions = {
firstWeekContainsDate ,
weekStartsOn ,
locale
} ;
return parts . map ( ( part ) => {
if ( ! part . isToken ) return part . value ;
const token = part . value ;
if ( ! ( options == null ? void 0 : options . useAdditionalWeekYearTokens ) && isProtectedWeekYearToken ( token ) || ! ( options == null ? void 0 : options . useAdditionalDayOfYearTokens ) && isProtectedDayOfYearToken ( token ) ) {
warnOrThrowProtectedError ( token , formatStr , String ( date ) ) ;
}
const formatter = formatters [ token [ 0 ] ] ;
return formatter ( originalDate , token , locale . localize , formatterOptions ) ;
} ) . join ( "" ) ;
}
function cleanEscapedString ( input ) {
const matched = input . match ( escapedStringRegExp ) ;
if ( ! matched ) {
return input ;
}
return matched [ 1 ] . replace ( doubleQuoteRegExp , "'" ) ;
}
// node_modules/date-fns/formatDistance.js
2026-03-26 09:29:55 +00:00
function formatDistance ( laterDate , earlierDate , options ) {
const defaultOptions = getDefaultOptions ( ) ;
const locale = ( options == null ? void 0 : options . locale ) ? ? defaultOptions . locale ? ? enUS ;
2026-03-19 06:58:19 +00:00
const minutesInAlmostTwoDays = 2520 ;
const comparison = compareAsc ( laterDate , earlierDate ) ;
if ( isNaN ( comparison ) ) throw new RangeError ( "Invalid time value" ) ;
const localizeOptions = Object . assign ( { } , options , {
addSuffix : options == null ? void 0 : options . addSuffix ,
comparison
} ) ;
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
... comparison > 0 ? [ earlierDate , laterDate ] : [ laterDate , earlierDate ]
) ;
const seconds = differenceInSeconds ( earlierDate _ , laterDate _ ) ;
const offsetInSeconds = ( getTimezoneOffsetInMilliseconds ( earlierDate _ ) - getTimezoneOffsetInMilliseconds ( laterDate _ ) ) / 1e3 ;
const minutes = Math . round ( ( seconds - offsetInSeconds ) / 60 ) ;
let months2 ;
if ( minutes < 2 ) {
if ( options == null ? void 0 : options . includeSeconds ) {
if ( seconds < 5 ) {
return locale . formatDistance ( "lessThanXSeconds" , 5 , localizeOptions ) ;
} else if ( seconds < 10 ) {
return locale . formatDistance ( "lessThanXSeconds" , 10 , localizeOptions ) ;
} else if ( seconds < 20 ) {
return locale . formatDistance ( "lessThanXSeconds" , 20 , localizeOptions ) ;
} else if ( seconds < 40 ) {
return locale . formatDistance ( "halfAMinute" , 0 , localizeOptions ) ;
} else if ( seconds < 60 ) {
return locale . formatDistance ( "lessThanXMinutes" , 1 , localizeOptions ) ;
} else {
return locale . formatDistance ( "xMinutes" , 1 , localizeOptions ) ;
}
} else {
if ( minutes === 0 ) {
return locale . formatDistance ( "lessThanXMinutes" , 1 , localizeOptions ) ;
} else {
return locale . formatDistance ( "xMinutes" , minutes , localizeOptions ) ;
}
}
} else if ( minutes < 45 ) {
return locale . formatDistance ( "xMinutes" , minutes , localizeOptions ) ;
} else if ( minutes < 90 ) {
return locale . formatDistance ( "aboutXHours" , 1 , localizeOptions ) ;
} else if ( minutes < minutesInDay ) {
const hours = Math . round ( minutes / 60 ) ;
return locale . formatDistance ( "aboutXHours" , hours , localizeOptions ) ;
} else if ( minutes < minutesInAlmostTwoDays ) {
return locale . formatDistance ( "xDays" , 1 , localizeOptions ) ;
} else if ( minutes < minutesInMonth ) {
const days2 = Math . round ( minutes / minutesInDay ) ;
return locale . formatDistance ( "xDays" , days2 , localizeOptions ) ;
} else if ( minutes < minutesInMonth * 2 ) {
months2 = Math . round ( minutes / minutesInMonth ) ;
return locale . formatDistance ( "aboutXMonths" , months2 , localizeOptions ) ;
}
months2 = differenceInMonths ( earlierDate _ , laterDate _ ) ;
if ( months2 < 12 ) {
const nearestMonth = Math . round ( minutes / minutesInMonth ) ;
return locale . formatDistance ( "xMonths" , nearestMonth , localizeOptions ) ;
} else {
const monthsSinceStartOfYear = months2 % 12 ;
const years = Math . trunc ( months2 / 12 ) ;
if ( monthsSinceStartOfYear < 3 ) {
return locale . formatDistance ( "aboutXYears" , years , localizeOptions ) ;
} else if ( monthsSinceStartOfYear < 9 ) {
return locale . formatDistance ( "overXYears" , years , localizeOptions ) ;
} else {
return locale . formatDistance ( "almostXYears" , years + 1 , localizeOptions ) ;
}
}
}
// node_modules/date-fns/formatDistanceStrict.js
function formatDistanceStrict ( laterDate , earlierDate , options ) {
2026-03-26 09:29:55 +00:00
const defaultOptions = getDefaultOptions ( ) ;
const locale = ( options == null ? void 0 : options . locale ) ? ? defaultOptions . locale ? ? enUS ;
2026-03-19 06:58:19 +00:00
const comparison = compareAsc ( laterDate , earlierDate ) ;
if ( isNaN ( comparison ) ) {
throw new RangeError ( "Invalid time value" ) ;
}
const localizeOptions = Object . assign ( { } , options , {
addSuffix : options == null ? void 0 : options . addSuffix ,
comparison
} ) ;
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
... comparison > 0 ? [ earlierDate , laterDate ] : [ laterDate , earlierDate ]
) ;
const roundingMethod = getRoundingMethod ( ( options == null ? void 0 : options . roundingMethod ) ? ? "round" ) ;
const milliseconds2 = earlierDate _ . getTime ( ) - laterDate _ . getTime ( ) ;
const minutes = milliseconds2 / millisecondsInMinute ;
const timezoneOffset = getTimezoneOffsetInMilliseconds ( earlierDate _ ) - getTimezoneOffsetInMilliseconds ( laterDate _ ) ;
const dstNormalizedMinutes = ( milliseconds2 - timezoneOffset ) / millisecondsInMinute ;
const defaultUnit = options == null ? void 0 : options . unit ;
let unit ;
if ( ! defaultUnit ) {
if ( minutes < 1 ) {
unit = "second" ;
} else if ( minutes < 60 ) {
unit = "minute" ;
} else if ( minutes < minutesInDay ) {
unit = "hour" ;
} else if ( dstNormalizedMinutes < minutesInMonth ) {
unit = "day" ;
} else if ( dstNormalizedMinutes < minutesInYear ) {
unit = "month" ;
} else {
unit = "year" ;
}
} else {
unit = defaultUnit ;
}
if ( unit === "second" ) {
const seconds = roundingMethod ( milliseconds2 / 1e3 ) ;
return locale . formatDistance ( "xSeconds" , seconds , localizeOptions ) ;
} else if ( unit === "minute" ) {
const roundedMinutes = roundingMethod ( minutes ) ;
return locale . formatDistance ( "xMinutes" , roundedMinutes , localizeOptions ) ;
} else if ( unit === "hour" ) {
const hours = roundingMethod ( minutes / 60 ) ;
return locale . formatDistance ( "xHours" , hours , localizeOptions ) ;
} else if ( unit === "day" ) {
const days2 = roundingMethod ( dstNormalizedMinutes / minutesInDay ) ;
return locale . formatDistance ( "xDays" , days2 , localizeOptions ) ;
} else if ( unit === "month" ) {
const months2 = roundingMethod ( dstNormalizedMinutes / minutesInMonth ) ;
return months2 === 12 && defaultUnit !== "month" ? locale . formatDistance ( "xYears" , 1 , localizeOptions ) : locale . formatDistance ( "xMonths" , months2 , localizeOptions ) ;
} else {
const years = roundingMethod ( dstNormalizedMinutes / minutesInYear ) ;
return locale . formatDistance ( "xYears" , years , localizeOptions ) ;
}
}
// node_modules/date-fns/formatDistanceToNow.js
function formatDistanceToNow ( date , options ) {
2026-03-26 09:29:55 +00:00
return formatDistance ( date , constructNow ( date ) , options ) ;
2026-03-19 06:58:19 +00:00
}
// node_modules/date-fns/formatDistanceToNowStrict.js
function formatDistanceToNowStrict ( date , options ) {
return formatDistanceStrict ( date , constructNow ( date ) , options ) ;
}
// node_modules/date-fns/formatDuration.js
var defaultFormat = [
"years" ,
"months" ,
"weeks" ,
"days" ,
"hours" ,
"minutes" ,
"seconds"
] ;
function formatDuration ( duration , options ) {
2026-03-26 09:29:55 +00:00
const defaultOptions = getDefaultOptions ( ) ;
const locale = ( options == null ? void 0 : options . locale ) ? ? defaultOptions . locale ? ? enUS ;
2026-03-19 06:58:19 +00:00
const format2 = ( options == null ? void 0 : options . format ) ? ? defaultFormat ;
const zero = ( options == null ? void 0 : options . zero ) ? ? false ;
const delimiter = ( options == null ? void 0 : options . delimiter ) ? ? " " ;
if ( ! locale . formatDistance ) {
return "" ;
}
const result = format2 . reduce ( ( acc , unit ) => {
const token = ` x ${ unit . replace ( /(^.)/ , ( m ) => m . toUpperCase ( ) ) } ` ;
const value = duration [ unit ] ;
if ( value !== void 0 && ( zero || duration [ unit ] ) ) {
return acc . concat ( locale . formatDistance ( token , value ) ) ;
}
return acc ;
} , [ ] ) . join ( delimiter ) ;
return result ;
}
// node_modules/date-fns/formatISO.js
function formatISO ( date , options ) {
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
if ( isNaN ( + date _ ) ) {
throw new RangeError ( "Invalid time value" ) ;
}
const format2 = ( options == null ? void 0 : options . format ) ? ? "extended" ;
const representation = ( options == null ? void 0 : options . representation ) ? ? "complete" ;
let result = "" ;
let tzOffset = "" ;
const dateDelimiter = format2 === "extended" ? "-" : "" ;
const timeDelimiter = format2 === "extended" ? ":" : "" ;
if ( representation !== "time" ) {
const day = addLeadingZeros ( date _ . getDate ( ) , 2 ) ;
const month = addLeadingZeros ( date _ . getMonth ( ) + 1 , 2 ) ;
const year = addLeadingZeros ( date _ . getFullYear ( ) , 4 ) ;
result = ` ${ year } ${ dateDelimiter } ${ month } ${ dateDelimiter } ${ day } ` ;
}
if ( representation !== "date" ) {
const offset = date _ . getTimezoneOffset ( ) ;
if ( offset !== 0 ) {
const absoluteOffset = Math . abs ( offset ) ;
const hourOffset = addLeadingZeros ( Math . trunc ( absoluteOffset / 60 ) , 2 ) ;
const minuteOffset = addLeadingZeros ( absoluteOffset % 60 , 2 ) ;
const sign = offset < 0 ? "+" : "-" ;
tzOffset = ` ${ sign } ${ hourOffset } : ${ minuteOffset } ` ;
} else {
tzOffset = "Z" ;
}
const hour = addLeadingZeros ( date _ . getHours ( ) , 2 ) ;
const minute = addLeadingZeros ( date _ . getMinutes ( ) , 2 ) ;
const second = addLeadingZeros ( date _ . getSeconds ( ) , 2 ) ;
const separator = result === "" ? "" : "T" ;
const time = [ hour , minute , second ] . join ( timeDelimiter ) ;
result = ` ${ result } ${ separator } ${ time } ${ tzOffset } ` ;
}
return result ;
}
// node_modules/date-fns/formatISO9075.js
function formatISO9075 ( date , options ) {
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
if ( ! isValid ( date _ ) ) {
throw new RangeError ( "Invalid time value" ) ;
}
const format2 = ( options == null ? void 0 : options . format ) ? ? "extended" ;
const representation = ( options == null ? void 0 : options . representation ) ? ? "complete" ;
let result = "" ;
const dateDelimiter = format2 === "extended" ? "-" : "" ;
const timeDelimiter = format2 === "extended" ? ":" : "" ;
if ( representation !== "time" ) {
const day = addLeadingZeros ( date _ . getDate ( ) , 2 ) ;
const month = addLeadingZeros ( date _ . getMonth ( ) + 1 , 2 ) ;
const year = addLeadingZeros ( date _ . getFullYear ( ) , 4 ) ;
result = ` ${ year } ${ dateDelimiter } ${ month } ${ dateDelimiter } ${ day } ` ;
}
if ( representation !== "date" ) {
const hour = addLeadingZeros ( date _ . getHours ( ) , 2 ) ;
const minute = addLeadingZeros ( date _ . getMinutes ( ) , 2 ) ;
const second = addLeadingZeros ( date _ . getSeconds ( ) , 2 ) ;
const separator = result === "" ? "" : " " ;
result = ` ${ result } ${ separator } ${ hour } ${ timeDelimiter } ${ minute } ${ timeDelimiter } ${ second } ` ;
}
return result ;
}
// node_modules/date-fns/formatISODuration.js
function formatISODuration ( duration ) {
const {
years = 0 ,
months : months2 = 0 ,
days : days2 = 0 ,
hours = 0 ,
minutes = 0 ,
seconds = 0
} = duration ;
return ` P ${ years } Y ${ months2 } M ${ days2 } DT ${ hours } H ${ minutes } M ${ seconds } S ` ;
}
// node_modules/date-fns/formatRFC3339.js
function formatRFC3339 ( date , options ) {
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
if ( ! isValid ( date _ ) ) {
throw new RangeError ( "Invalid time value" ) ;
}
const fractionDigits = ( options == null ? void 0 : options . fractionDigits ) ? ? 0 ;
const day = addLeadingZeros ( date _ . getDate ( ) , 2 ) ;
const month = addLeadingZeros ( date _ . getMonth ( ) + 1 , 2 ) ;
const year = date _ . getFullYear ( ) ;
const hour = addLeadingZeros ( date _ . getHours ( ) , 2 ) ;
const minute = addLeadingZeros ( date _ . getMinutes ( ) , 2 ) ;
const second = addLeadingZeros ( date _ . getSeconds ( ) , 2 ) ;
let fractionalSecond = "" ;
if ( fractionDigits > 0 ) {
const milliseconds2 = date _ . getMilliseconds ( ) ;
const fractionalSeconds = Math . trunc (
milliseconds2 * Math . pow ( 10 , fractionDigits - 3 )
) ;
fractionalSecond = "." + addLeadingZeros ( fractionalSeconds , fractionDigits ) ;
}
let offset = "" ;
const tzOffset = date _ . getTimezoneOffset ( ) ;
if ( tzOffset !== 0 ) {
const absoluteOffset = Math . abs ( tzOffset ) ;
const hourOffset = addLeadingZeros ( Math . trunc ( absoluteOffset / 60 ) , 2 ) ;
const minuteOffset = addLeadingZeros ( absoluteOffset % 60 , 2 ) ;
const sign = tzOffset < 0 ? "+" : "-" ;
offset = ` ${ sign } ${ hourOffset } : ${ minuteOffset } ` ;
} else {
offset = "Z" ;
}
return ` ${ year } - ${ month } - ${ day } T ${ hour } : ${ minute } : ${ second } ${ fractionalSecond } ${ offset } ` ;
}
// node_modules/date-fns/formatRFC7231.js
var days = [ "Sun" , "Mon" , "Tue" , "Wed" , "Thu" , "Fri" , "Sat" ] ;
var months = [
"Jan" ,
"Feb" ,
"Mar" ,
"Apr" ,
"May" ,
"Jun" ,
"Jul" ,
"Aug" ,
"Sep" ,
"Oct" ,
"Nov" ,
"Dec"
] ;
function formatRFC7231 ( date ) {
const _date = toDate ( date ) ;
if ( ! isValid ( _date ) ) {
throw new RangeError ( "Invalid time value" ) ;
}
const dayName = days [ _date . getUTCDay ( ) ] ;
const dayOfMonth = addLeadingZeros ( _date . getUTCDate ( ) , 2 ) ;
const monthName = months [ _date . getUTCMonth ( ) ] ;
const year = _date . getUTCFullYear ( ) ;
const hour = addLeadingZeros ( _date . getUTCHours ( ) , 2 ) ;
const minute = addLeadingZeros ( _date . getUTCMinutes ( ) , 2 ) ;
const second = addLeadingZeros ( _date . getUTCSeconds ( ) , 2 ) ;
return ` ${ dayName } , ${ dayOfMonth } ${ monthName } ${ year } ${ hour } : ${ minute } : ${ second } GMT ` ;
}
// node_modules/date-fns/formatRelative.js
2026-03-26 09:29:55 +00:00
function formatRelative ( date , baseDate , options ) {
2026-03-19 06:58:19 +00:00
var _a , _b , _c , _d ;
const [ date _ , baseDate _ ] = normalizeDates ( options == null ? void 0 : options . in , date , baseDate ) ;
2026-03-26 09:29:55 +00:00
const defaultOptions = getDefaultOptions ( ) ;
const locale = ( options == null ? void 0 : options . locale ) ? ? defaultOptions . locale ? ? enUS ;
const weekStartsOn = ( options == null ? void 0 : options . weekStartsOn ) ? ? ( ( _b = ( _a = options == null ? void 0 : options . locale ) == null ? void 0 : _a . options ) == null ? void 0 : _b . weekStartsOn ) ? ? defaultOptions . weekStartsOn ? ? ( ( _d = ( _c = defaultOptions . locale ) == null ? void 0 : _c . options ) == null ? void 0 : _d . weekStartsOn ) ? ? 0 ;
2026-03-19 06:58:19 +00:00
const diff = differenceInCalendarDays ( date _ , baseDate _ ) ;
if ( isNaN ( diff ) ) {
throw new RangeError ( "Invalid time value" ) ;
}
let token ;
if ( diff < - 6 ) {
token = "other" ;
} else if ( diff < - 1 ) {
token = "lastWeek" ;
} else if ( diff < 0 ) {
token = "yesterday" ;
} else if ( diff < 1 ) {
token = "today" ;
} else if ( diff < 2 ) {
token = "tomorrow" ;
} else if ( diff < 7 ) {
token = "nextWeek" ;
} else {
token = "other" ;
}
const formatStr = locale . formatRelative ( token , date _ , baseDate _ , {
locale ,
weekStartsOn
} ) ;
return format ( date _ , formatStr , { locale , weekStartsOn } ) ;
}
// node_modules/date-fns/fromUnixTime.js
function fromUnixTime ( unixTime , options ) {
return toDate ( unixTime * 1e3 , options == null ? void 0 : options . in ) ;
}
// node_modules/date-fns/getDate.js
function getDate ( date , options ) {
return toDate ( date , options == null ? void 0 : options . in ) . getDate ( ) ;
}
// node_modules/date-fns/getDay.js
function getDay ( date , options ) {
return toDate ( date , options == null ? void 0 : options . in ) . getDay ( ) ;
}
// node_modules/date-fns/getDaysInMonth.js
function getDaysInMonth ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const year = _date . getFullYear ( ) ;
const monthIndex = _date . getMonth ( ) ;
const lastDayOfMonth2 = constructFrom ( _date , 0 ) ;
lastDayOfMonth2 . setFullYear ( year , monthIndex + 1 , 0 ) ;
lastDayOfMonth2 . setHours ( 0 , 0 , 0 , 0 ) ;
return lastDayOfMonth2 . getDate ( ) ;
}
// node_modules/date-fns/isLeapYear.js
function isLeapYear ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const year = _date . getFullYear ( ) ;
return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0 ;
}
// node_modules/date-fns/getDaysInYear.js
function getDaysInYear ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
if ( Number . isNaN ( + _date ) ) return NaN ;
return isLeapYear ( _date ) ? 366 : 365 ;
}
// node_modules/date-fns/getDecade.js
function getDecade ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const year = _date . getFullYear ( ) ;
const decade = Math . floor ( year / 10 ) * 10 ;
return decade ;
}
// node_modules/date-fns/getDefaultOptions.js
function getDefaultOptions2 ( ) {
return Object . assign ( { } , getDefaultOptions ( ) ) ;
}
// node_modules/date-fns/getHours.js
function getHours ( date , options ) {
return toDate ( date , options == null ? void 0 : options . in ) . getHours ( ) ;
}
// node_modules/date-fns/getISODay.js
function getISODay ( date , options ) {
const day = toDate ( date , options == null ? void 0 : options . in ) . getDay ( ) ;
return day === 0 ? 7 : day ;
}
// node_modules/date-fns/getISOWeeksInYear.js
function getISOWeeksInYear ( date , options ) {
const thisYear = startOfISOWeekYear ( date , options ) ;
const nextYear = startOfISOWeekYear ( addWeeks ( thisYear , 60 ) ) ;
const diff = + nextYear - + thisYear ;
return Math . round ( diff / millisecondsInWeek ) ;
}
// node_modules/date-fns/getMilliseconds.js
function getMilliseconds ( date ) {
return toDate ( date ) . getMilliseconds ( ) ;
}
// node_modules/date-fns/getMinutes.js
function getMinutes ( date , options ) {
return toDate ( date , options == null ? void 0 : options . in ) . getMinutes ( ) ;
}
// node_modules/date-fns/getMonth.js
function getMonth ( date , options ) {
return toDate ( date , options == null ? void 0 : options . in ) . getMonth ( ) ;
}
// node_modules/date-fns/getOverlappingDaysInIntervals.js
function getOverlappingDaysInIntervals ( intervalLeft , intervalRight ) {
const [ leftStart , leftEnd ] = [
+ toDate ( intervalLeft . start ) ,
+ toDate ( intervalLeft . end )
] . sort ( ( a , b ) => a - b ) ;
const [ rightStart , rightEnd ] = [
+ toDate ( intervalRight . start ) ,
+ toDate ( intervalRight . end )
] . sort ( ( a , b ) => a - b ) ;
const isOverlapping = leftStart < rightEnd && rightStart < leftEnd ;
if ( ! isOverlapping ) return 0 ;
const overlapLeft = rightStart < leftStart ? leftStart : rightStart ;
const left = overlapLeft - getTimezoneOffsetInMilliseconds ( overlapLeft ) ;
const overlapRight = rightEnd > leftEnd ? leftEnd : rightEnd ;
const right = overlapRight - getTimezoneOffsetInMilliseconds ( overlapRight ) ;
return Math . ceil ( ( right - left ) / millisecondsInDay ) ;
}
// node_modules/date-fns/getSeconds.js
function getSeconds ( date ) {
return toDate ( date ) . getSeconds ( ) ;
}
// node_modules/date-fns/getTime.js
function getTime ( date ) {
return + toDate ( date ) ;
}
// node_modules/date-fns/getUnixTime.js
function getUnixTime ( date ) {
return Math . trunc ( + toDate ( date ) / 1e3 ) ;
}
// node_modules/date-fns/getWeekOfMonth.js
function getWeekOfMonth ( date , options ) {
var _a , _b , _c , _d ;
2026-03-26 09:29:55 +00:00
const defaultOptions = getDefaultOptions ( ) ;
const weekStartsOn = ( options == null ? void 0 : options . weekStartsOn ) ? ? ( ( _b = ( _a = options == null ? void 0 : options . locale ) == null ? void 0 : _a . options ) == null ? void 0 : _b . weekStartsOn ) ? ? defaultOptions . weekStartsOn ? ? ( ( _d = ( _c = defaultOptions . locale ) == null ? void 0 : _c . options ) == null ? void 0 : _d . weekStartsOn ) ? ? 0 ;
2026-03-19 06:58:19 +00:00
const currentDayOfMonth = getDate ( toDate ( date , options == null ? void 0 : options . in ) ) ;
if ( isNaN ( currentDayOfMonth ) ) return NaN ;
const startWeekDay = getDay ( startOfMonth ( date , options ) ) ;
let lastDayOfFirstWeek = weekStartsOn - startWeekDay ;
if ( lastDayOfFirstWeek <= 0 ) lastDayOfFirstWeek += 7 ;
const remainingDaysAfterFirstWeek = currentDayOfMonth - lastDayOfFirstWeek ;
return Math . ceil ( remainingDaysAfterFirstWeek / 7 ) + 1 ;
}
// node_modules/date-fns/lastDayOfMonth.js
function lastDayOfMonth ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const month = _date . getMonth ( ) ;
_date . setFullYear ( _date . getFullYear ( ) , month + 1 , 0 ) ;
_date . setHours ( 0 , 0 , 0 , 0 ) ;
return toDate ( _date , options == null ? void 0 : options . in ) ;
}
// node_modules/date-fns/getWeeksInMonth.js
function getWeeksInMonth ( date , options ) {
const contextDate = toDate ( date , options == null ? void 0 : options . in ) ;
return differenceInCalendarWeeks (
lastDayOfMonth ( contextDate , options ) ,
startOfMonth ( contextDate , options ) ,
options
) + 1 ;
}
// node_modules/date-fns/getYear.js
function getYear ( date , options ) {
return toDate ( date , options == null ? void 0 : options . in ) . getFullYear ( ) ;
}
// node_modules/date-fns/hoursToMilliseconds.js
function hoursToMilliseconds ( hours ) {
return Math . trunc ( hours * millisecondsInHour ) ;
}
// node_modules/date-fns/hoursToMinutes.js
function hoursToMinutes ( hours ) {
return Math . trunc ( hours * minutesInHour ) ;
}
// node_modules/date-fns/hoursToSeconds.js
function hoursToSeconds ( hours ) {
return Math . trunc ( hours * secondsInHour ) ;
}
// node_modules/date-fns/interval.js
function interval ( start , end , options ) {
const [ _start , _end ] = normalizeDates ( options == null ? void 0 : options . in , start , end ) ;
if ( isNaN ( + _start ) ) throw new TypeError ( "Start date is invalid" ) ;
if ( isNaN ( + _end ) ) throw new TypeError ( "End date is invalid" ) ;
if ( ( options == null ? void 0 : options . assertPositive ) && + _start > + _end )
throw new TypeError ( "End date must be after start date" ) ;
return { start : _start , end : _end } ;
}
// node_modules/date-fns/intervalToDuration.js
function intervalToDuration ( interval2 , options ) {
const { start , end } = normalizeInterval ( options == null ? void 0 : options . in , interval2 ) ;
const duration = { } ;
const years = differenceInYears ( end , start ) ;
if ( years ) duration . years = years ;
const remainingMonths = add ( start , { years : duration . years } ) ;
const months2 = differenceInMonths ( end , remainingMonths ) ;
if ( months2 ) duration . months = months2 ;
const remainingDays = add ( remainingMonths , { months : duration . months } ) ;
const days2 = differenceInDays ( end , remainingDays ) ;
if ( days2 ) duration . days = days2 ;
const remainingHours = add ( remainingDays , { days : duration . days } ) ;
const hours = differenceInHours ( end , remainingHours ) ;
if ( hours ) duration . hours = hours ;
const remainingMinutes = add ( remainingHours , { hours : duration . hours } ) ;
const minutes = differenceInMinutes ( end , remainingMinutes ) ;
if ( minutes ) duration . minutes = minutes ;
const remainingSeconds = add ( remainingMinutes , { minutes : duration . minutes } ) ;
const seconds = differenceInSeconds ( end , remainingSeconds ) ;
if ( seconds ) duration . seconds = seconds ;
return duration ;
}
// node_modules/date-fns/intlFormat.js
function intlFormat ( date , formatOrLocale , localeOptions ) {
let formatOptions ;
if ( isFormatOptions ( formatOrLocale ) ) {
formatOptions = formatOrLocale ;
} else {
localeOptions = formatOrLocale ;
}
return new Intl . DateTimeFormat ( localeOptions == null ? void 0 : localeOptions . locale , formatOptions ) . format (
toDate ( date )
) ;
}
function isFormatOptions ( opts ) {
return opts !== void 0 && ! ( "locale" in opts ) ;
}
// node_modules/date-fns/intlFormatDistance.js
function intlFormatDistance ( laterDate , earlierDate , options ) {
let value = 0 ;
let unit ;
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
if ( ! ( options == null ? void 0 : options . unit ) ) {
const diffInSeconds = differenceInSeconds ( laterDate _ , earlierDate _ ) ;
if ( Math . abs ( diffInSeconds ) < secondsInMinute ) {
value = differenceInSeconds ( laterDate _ , earlierDate _ ) ;
unit = "second" ;
} else if ( Math . abs ( diffInSeconds ) < secondsInHour ) {
value = differenceInMinutes ( laterDate _ , earlierDate _ ) ;
unit = "minute" ;
} else if ( Math . abs ( diffInSeconds ) < secondsInDay && Math . abs ( differenceInCalendarDays ( laterDate _ , earlierDate _ ) ) < 1 ) {
value = differenceInHours ( laterDate _ , earlierDate _ ) ;
unit = "hour" ;
} else if ( Math . abs ( diffInSeconds ) < secondsInWeek && ( value = differenceInCalendarDays ( laterDate _ , earlierDate _ ) ) && Math . abs ( value ) < 7 ) {
unit = "day" ;
} else if ( Math . abs ( diffInSeconds ) < secondsInMonth ) {
value = differenceInCalendarWeeks ( laterDate _ , earlierDate _ ) ;
unit = "week" ;
} else if ( Math . abs ( diffInSeconds ) < secondsInQuarter ) {
value = differenceInCalendarMonths ( laterDate _ , earlierDate _ ) ;
unit = "month" ;
} else if ( Math . abs ( diffInSeconds ) < secondsInYear ) {
if ( differenceInCalendarQuarters ( laterDate _ , earlierDate _ ) < 4 ) {
value = differenceInCalendarQuarters ( laterDate _ , earlierDate _ ) ;
unit = "quarter" ;
} else {
value = differenceInCalendarYears ( laterDate _ , earlierDate _ ) ;
unit = "year" ;
}
} else {
value = differenceInCalendarYears ( laterDate _ , earlierDate _ ) ;
unit = "year" ;
}
} else {
unit = options == null ? void 0 : options . unit ;
if ( unit === "second" ) {
value = differenceInSeconds ( laterDate _ , earlierDate _ ) ;
} else if ( unit === "minute" ) {
value = differenceInMinutes ( laterDate _ , earlierDate _ ) ;
} else if ( unit === "hour" ) {
value = differenceInHours ( laterDate _ , earlierDate _ ) ;
} else if ( unit === "day" ) {
value = differenceInCalendarDays ( laterDate _ , earlierDate _ ) ;
} else if ( unit === "week" ) {
value = differenceInCalendarWeeks ( laterDate _ , earlierDate _ ) ;
} else if ( unit === "month" ) {
value = differenceInCalendarMonths ( laterDate _ , earlierDate _ ) ;
} else if ( unit === "quarter" ) {
value = differenceInCalendarQuarters ( laterDate _ , earlierDate _ ) ;
} else if ( unit === "year" ) {
value = differenceInCalendarYears ( laterDate _ , earlierDate _ ) ;
}
}
const rtf = new Intl . RelativeTimeFormat ( options == null ? void 0 : options . locale , {
numeric : "auto" ,
... options
} ) ;
return rtf . format ( value , unit ) ;
}
// node_modules/date-fns/isAfter.js
function isAfter ( date , dateToCompare ) {
return + toDate ( date ) > + toDate ( dateToCompare ) ;
}
// node_modules/date-fns/isBefore.js
function isBefore ( date , dateToCompare ) {
return + toDate ( date ) < + toDate ( dateToCompare ) ;
}
// node_modules/date-fns/isEqual.js
function isEqual ( leftDate , rightDate ) {
return + toDate ( leftDate ) === + toDate ( rightDate ) ;
}
// node_modules/date-fns/isExists.js
function isExists ( year , month , day ) {
const date = new Date ( year , month , day ) ;
return date . getFullYear ( ) === year && date . getMonth ( ) === month && date . getDate ( ) === day ;
}
// node_modules/date-fns/isFirstDayOfMonth.js
function isFirstDayOfMonth ( date , options ) {
return toDate ( date , options == null ? void 0 : options . in ) . getDate ( ) === 1 ;
}
// node_modules/date-fns/isFriday.js
function isFriday ( date , options ) {
return toDate ( date , options == null ? void 0 : options . in ) . getDay ( ) === 5 ;
}
// node_modules/date-fns/isFuture.js
function isFuture ( date ) {
return + toDate ( date ) > Date . now ( ) ;
}
// node_modules/date-fns/transpose.js
function transpose ( date , constructor ) {
const date _ = isConstructor ( constructor ) ? new constructor ( 0 ) : constructFrom ( constructor , 0 ) ;
date _ . setFullYear ( date . getFullYear ( ) , date . getMonth ( ) , date . getDate ( ) ) ;
date _ . setHours (
date . getHours ( ) ,
date . getMinutes ( ) ,
date . getSeconds ( ) ,
date . getMilliseconds ( )
) ;
return date _ ;
}
function isConstructor ( constructor ) {
var _a ;
return typeof constructor === "function" && ( ( _a = constructor . prototype ) == null ? void 0 : _a . constructor ) === constructor ;
}
// node_modules/date-fns/parse/_lib/Setter.js
var TIMEZONE _UNIT _PRIORITY = 10 ;
var Setter = class {
constructor ( ) {
_ _publicField ( this , "subPriority" , 0 ) ;
}
validate ( _utcDate , _options ) {
return true ;
}
} ;
var ValueSetter = class extends Setter {
constructor ( value , validateValue , setValue , priority , subPriority ) {
super ( ) ;
this . value = value ;
this . validateValue = validateValue ;
this . setValue = setValue ;
this . priority = priority ;
if ( subPriority ) {
this . subPriority = subPriority ;
}
}
validate ( date , options ) {
return this . validateValue ( date , this . value , options ) ;
}
set ( date , flags , options ) {
return this . setValue ( date , flags , this . value , options ) ;
}
} ;
var DateTimezoneSetter = class extends Setter {
constructor ( context , reference ) {
super ( ) ;
_ _publicField ( this , "priority" , TIMEZONE _UNIT _PRIORITY ) ;
_ _publicField ( this , "subPriority" , - 1 ) ;
this . context = context || ( ( date ) => constructFrom ( reference , date ) ) ;
}
set ( date , flags ) {
if ( flags . timestampIsSet ) return date ;
return constructFrom ( date , transpose ( date , this . context ) ) ;
}
} ;
// node_modules/date-fns/parse/_lib/Parser.js
var Parser = class {
2026-03-26 09:29:55 +00:00
run ( dateString , token , match , options ) {
const result = this . parse ( dateString , token , match , options ) ;
2026-03-19 06:58:19 +00:00
if ( ! result ) {
return null ;
}
return {
setter : new ValueSetter (
result . value ,
this . validate ,
this . set ,
this . priority ,
this . subPriority
) ,
rest : result . rest
} ;
}
validate ( _utcDate , _value , _options ) {
return true ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/EraParser.js
var EraParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 140 ) ;
_ _publicField ( this , "incompatibleTokens" , [ "R" , "u" , "t" , "T" ] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
// AD, BC
case "G" :
case "GG" :
case "GGG" :
2026-03-26 09:29:55 +00:00
return match . era ( dateString , { width : "abbreviated" } ) || match . era ( dateString , { width : "narrow" } ) ;
2026-03-19 06:58:19 +00:00
// A, B
case "GGGGG" :
2026-03-26 09:29:55 +00:00
return match . era ( dateString , { width : "narrow" } ) ;
2026-03-19 06:58:19 +00:00
// Anno Domini, Before Christ
case "GGGG" :
default :
2026-03-26 09:29:55 +00:00
return match . era ( dateString , { width : "wide" } ) || match . era ( dateString , { width : "abbreviated" } ) || match . era ( dateString , { width : "narrow" } ) ;
2026-03-19 06:58:19 +00:00
}
}
set ( date , flags , value ) {
flags . era = value ;
date . setFullYear ( value , 0 , 1 ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/constants.js
var numericPatterns = {
month : /^(1[0-2]|0?\d)/ ,
// 0 to 12
date : /^(3[0-1]|[0-2]?\d)/ ,
// 0 to 31
dayOfYear : /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/ ,
// 0 to 366
week : /^(5[0-3]|[0-4]?\d)/ ,
// 0 to 53
hour23h : /^(2[0-3]|[0-1]?\d)/ ,
// 0 to 23
hour24h : /^(2[0-4]|[0-1]?\d)/ ,
// 0 to 24
hour11h : /^(1[0-1]|0?\d)/ ,
// 0 to 11
hour12h : /^(1[0-2]|0?\d)/ ,
// 0 to 12
minute : /^[0-5]?\d/ ,
// 0 to 59
second : /^[0-5]?\d/ ,
// 0 to 59
singleDigit : /^\d/ ,
// 0 to 9
twoDigits : /^\d{1,2}/ ,
// 0 to 99
threeDigits : /^\d{1,3}/ ,
// 0 to 999
fourDigits : /^\d{1,4}/ ,
// 0 to 9999
anyDigitsSigned : /^-?\d+/ ,
singleDigitSigned : /^-?\d/ ,
// 0 to 9, -0 to -9
twoDigitsSigned : /^-?\d{1,2}/ ,
// 0 to 99, -0 to -99
threeDigitsSigned : /^-?\d{1,3}/ ,
// 0 to 999, -0 to -999
fourDigitsSigned : /^-?\d{1,4}/
// 0 to 9999, -0 to -9999
} ;
var timezonePatterns = {
basicOptionalMinutes : /^([+-])(\d{2})(\d{2})?|Z/ ,
basic : /^([+-])(\d{2})(\d{2})|Z/ ,
basicOptionalSeconds : /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/ ,
extended : /^([+-])(\d{2}):(\d{2})|Z/ ,
extendedOptionalSeconds : /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/
} ;
// node_modules/date-fns/parse/_lib/utils.js
function mapValue ( parseFnResult , mapFn ) {
if ( ! parseFnResult ) {
return parseFnResult ;
}
return {
value : mapFn ( parseFnResult . value ) ,
rest : parseFnResult . rest
} ;
}
function parseNumericPattern ( pattern , dateString ) {
const matchResult = dateString . match ( pattern ) ;
if ( ! matchResult ) {
return null ;
}
return {
value : parseInt ( matchResult [ 0 ] , 10 ) ,
rest : dateString . slice ( matchResult [ 0 ] . length )
} ;
}
function parseTimezonePattern ( pattern , dateString ) {
const matchResult = dateString . match ( pattern ) ;
if ( ! matchResult ) {
return null ;
}
if ( matchResult [ 0 ] === "Z" ) {
return {
value : 0 ,
rest : dateString . slice ( 1 )
} ;
}
const sign = matchResult [ 1 ] === "+" ? 1 : - 1 ;
const hours = matchResult [ 2 ] ? parseInt ( matchResult [ 2 ] , 10 ) : 0 ;
const minutes = matchResult [ 3 ] ? parseInt ( matchResult [ 3 ] , 10 ) : 0 ;
const seconds = matchResult [ 5 ] ? parseInt ( matchResult [ 5 ] , 10 ) : 0 ;
return {
value : sign * ( hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * millisecondsInSecond ) ,
rest : dateString . slice ( matchResult [ 0 ] . length )
} ;
}
function parseAnyDigitsSigned ( dateString ) {
return parseNumericPattern ( numericPatterns . anyDigitsSigned , dateString ) ;
}
function parseNDigits ( n , dateString ) {
switch ( n ) {
case 1 :
return parseNumericPattern ( numericPatterns . singleDigit , dateString ) ;
case 2 :
return parseNumericPattern ( numericPatterns . twoDigits , dateString ) ;
case 3 :
return parseNumericPattern ( numericPatterns . threeDigits , dateString ) ;
case 4 :
return parseNumericPattern ( numericPatterns . fourDigits , dateString ) ;
default :
return parseNumericPattern ( new RegExp ( "^\\d{1," + n + "}" ) , dateString ) ;
}
}
function parseNDigitsSigned ( n , dateString ) {
switch ( n ) {
case 1 :
return parseNumericPattern ( numericPatterns . singleDigitSigned , dateString ) ;
case 2 :
return parseNumericPattern ( numericPatterns . twoDigitsSigned , dateString ) ;
case 3 :
return parseNumericPattern ( numericPatterns . threeDigitsSigned , dateString ) ;
case 4 :
return parseNumericPattern ( numericPatterns . fourDigitsSigned , dateString ) ;
default :
return parseNumericPattern ( new RegExp ( "^-?\\d{1," + n + "}" ) , dateString ) ;
}
}
function dayPeriodEnumToHours ( dayPeriod ) {
switch ( dayPeriod ) {
case "morning" :
return 4 ;
case "evening" :
return 17 ;
case "pm" :
case "noon" :
case "afternoon" :
return 12 ;
case "am" :
case "midnight" :
case "night" :
default :
return 0 ;
}
}
function normalizeTwoDigitYear ( twoDigitYear , currentYear ) {
const isCommonEra = currentYear > 0 ;
const absCurrentYear = isCommonEra ? currentYear : 1 - currentYear ;
let result ;
if ( absCurrentYear <= 50 ) {
result = twoDigitYear || 100 ;
} else {
const rangeEnd = absCurrentYear + 50 ;
const rangeEndCentury = Math . trunc ( rangeEnd / 100 ) * 100 ;
const isPreviousCentury = twoDigitYear >= rangeEnd % 100 ;
result = twoDigitYear + rangeEndCentury - ( isPreviousCentury ? 100 : 0 ) ;
}
return isCommonEra ? result : 1 - result ;
}
function isLeapYearIndex ( year ) {
return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0 ;
}
// node_modules/date-fns/parse/_lib/parsers/YearParser.js
var YearParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 130 ) ;
_ _publicField ( this , "incompatibleTokens" , [ "Y" , "R" , "u" , "w" , "I" , "i" , "e" , "c" , "t" , "T" ] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
const valueCallback = ( year ) => ( {
year ,
isTwoDigitYear : token === "yy"
} ) ;
switch ( token ) {
case "y" :
return mapValue ( parseNDigits ( 4 , dateString ) , valueCallback ) ;
case "yo" :
return mapValue (
2026-03-26 09:29:55 +00:00
match . ordinalNumber ( dateString , {
2026-03-19 06:58:19 +00:00
unit : "year"
} ) ,
valueCallback
) ;
default :
return mapValue ( parseNDigits ( token . length , dateString ) , valueCallback ) ;
}
}
validate ( _date , value ) {
return value . isTwoDigitYear || value . year > 0 ;
}
set ( date , flags , value ) {
const currentYear = date . getFullYear ( ) ;
if ( value . isTwoDigitYear ) {
const normalizedTwoDigitYear = normalizeTwoDigitYear (
value . year ,
currentYear
) ;
date . setFullYear ( normalizedTwoDigitYear , 0 , 1 ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return date ;
}
const year = ! ( "era" in flags ) || flags . era === 1 ? value . year : 1 - value . year ;
date . setFullYear ( year , 0 , 1 ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js
var LocalWeekYearParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 130 ) ;
_ _publicField ( this , "incompatibleTokens" , [
"y" ,
"R" ,
"u" ,
"Q" ,
"q" ,
"M" ,
"L" ,
"I" ,
"d" ,
"D" ,
"i" ,
"t" ,
"T"
] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
const valueCallback = ( year ) => ( {
year ,
isTwoDigitYear : token === "YY"
} ) ;
switch ( token ) {
case "Y" :
return mapValue ( parseNDigits ( 4 , dateString ) , valueCallback ) ;
case "Yo" :
return mapValue (
2026-03-26 09:29:55 +00:00
match . ordinalNumber ( dateString , {
2026-03-19 06:58:19 +00:00
unit : "year"
} ) ,
valueCallback
) ;
default :
return mapValue ( parseNDigits ( token . length , dateString ) , valueCallback ) ;
}
}
validate ( _date , value ) {
return value . isTwoDigitYear || value . year > 0 ;
}
set ( date , flags , value , options ) {
const currentYear = getWeekYear ( date , options ) ;
if ( value . isTwoDigitYear ) {
const normalizedTwoDigitYear = normalizeTwoDigitYear (
value . year ,
currentYear
) ;
date . setFullYear (
normalizedTwoDigitYear ,
0 ,
options . firstWeekContainsDate
) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return startOfWeek ( date , options ) ;
}
const year = ! ( "era" in flags ) || flags . era === 1 ? value . year : 1 - value . year ;
date . setFullYear ( year , 0 , options . firstWeekContainsDate ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return startOfWeek ( date , options ) ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js
var ISOWeekYearParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 130 ) ;
_ _publicField ( this , "incompatibleTokens" , [
"G" ,
"y" ,
"Y" ,
"u" ,
"Q" ,
"q" ,
"M" ,
"L" ,
"w" ,
"d" ,
"D" ,
"e" ,
"c" ,
"t" ,
"T"
] ) ;
}
parse ( dateString , token ) {
if ( token === "R" ) {
return parseNDigitsSigned ( 4 , dateString ) ;
}
return parseNDigitsSigned ( token . length , dateString ) ;
}
set ( date , _flags , value ) {
const firstWeekOfYear = constructFrom ( date , 0 ) ;
firstWeekOfYear . setFullYear ( value , 0 , 4 ) ;
firstWeekOfYear . setHours ( 0 , 0 , 0 , 0 ) ;
return startOfISOWeek ( firstWeekOfYear ) ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js
var ExtendedYearParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 130 ) ;
_ _publicField ( this , "incompatibleTokens" , [ "G" , "y" , "Y" , "R" , "w" , "I" , "i" , "e" , "c" , "t" , "T" ] ) ;
}
parse ( dateString , token ) {
if ( token === "u" ) {
return parseNDigitsSigned ( 4 , dateString ) ;
}
return parseNDigitsSigned ( token . length , dateString ) ;
}
set ( date , _flags , value ) {
date . setFullYear ( value , 0 , 1 ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/QuarterParser.js
var QuarterParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 120 ) ;
_ _publicField ( this , "incompatibleTokens" , [
"Y" ,
"R" ,
"q" ,
"M" ,
"L" ,
"w" ,
"I" ,
"d" ,
"D" ,
"i" ,
"e" ,
"c" ,
"t" ,
"T"
] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
// 1, 2, 3, 4
case "Q" :
case "QQ" :
return parseNDigits ( token . length , dateString ) ;
// 1st, 2nd, 3rd, 4th
case "Qo" :
2026-03-26 09:29:55 +00:00
return match . ordinalNumber ( dateString , { unit : "quarter" } ) ;
2026-03-19 06:58:19 +00:00
// Q1, Q2, Q3, Q4
case "QQQ" :
2026-03-26 09:29:55 +00:00
return match . quarter ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . quarter ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
case "QQQQQ" :
2026-03-26 09:29:55 +00:00
return match . quarter ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
// 1st quarter, 2nd quarter, ...
case "QQQQ" :
default :
2026-03-26 09:29:55 +00:00
return match . quarter ( dateString , {
2026-03-19 06:58:19 +00:00
width : "wide" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . quarter ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . quarter ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
}
}
validate ( _date , value ) {
return value >= 1 && value <= 4 ;
}
set ( date , _flags , value ) {
date . setMonth ( ( value - 1 ) * 3 , 1 ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js
var StandAloneQuarterParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 120 ) ;
_ _publicField ( this , "incompatibleTokens" , [
"Y" ,
"R" ,
"Q" ,
"M" ,
"L" ,
"w" ,
"I" ,
"d" ,
"D" ,
"i" ,
"e" ,
"c" ,
"t" ,
"T"
] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
// 1, 2, 3, 4
case "q" :
case "qq" :
return parseNDigits ( token . length , dateString ) ;
// 1st, 2nd, 3rd, 4th
case "qo" :
2026-03-26 09:29:55 +00:00
return match . ordinalNumber ( dateString , { unit : "quarter" } ) ;
2026-03-19 06:58:19 +00:00
// Q1, Q2, Q3, Q4
case "qqq" :
2026-03-26 09:29:55 +00:00
return match . quarter ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "standalone"
2026-03-26 09:29:55 +00:00
} ) || match . quarter ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "standalone"
} ) ;
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
case "qqqqq" :
2026-03-26 09:29:55 +00:00
return match . quarter ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "standalone"
} ) ;
// 1st quarter, 2nd quarter, ...
case "qqqq" :
default :
2026-03-26 09:29:55 +00:00
return match . quarter ( dateString , {
2026-03-19 06:58:19 +00:00
width : "wide" ,
context : "standalone"
2026-03-26 09:29:55 +00:00
} ) || match . quarter ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "standalone"
2026-03-26 09:29:55 +00:00
} ) || match . quarter ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "standalone"
} ) ;
}
}
validate ( _date , value ) {
return value >= 1 && value <= 4 ;
}
set ( date , _flags , value ) {
date . setMonth ( ( value - 1 ) * 3 , 1 ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/MonthParser.js
var MonthParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "incompatibleTokens" , [
"Y" ,
"R" ,
"q" ,
"Q" ,
"L" ,
"w" ,
"I" ,
"D" ,
"i" ,
"e" ,
"c" ,
"t" ,
"T"
] ) ;
_ _publicField ( this , "priority" , 110 ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
const valueCallback = ( value ) => value - 1 ;
switch ( token ) {
// 1, 2, ..., 12
case "M" :
return mapValue (
parseNumericPattern ( numericPatterns . month , dateString ) ,
valueCallback
) ;
// 01, 02, ..., 12
case "MM" :
return mapValue ( parseNDigits ( 2 , dateString ) , valueCallback ) ;
// 1st, 2nd, ..., 12th
case "Mo" :
return mapValue (
2026-03-26 09:29:55 +00:00
match . ordinalNumber ( dateString , {
2026-03-19 06:58:19 +00:00
unit : "month"
} ) ,
valueCallback
) ;
// Jan, Feb, ..., Dec
case "MMM" :
2026-03-26 09:29:55 +00:00
return match . month ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . month ( dateString , { width : "narrow" , context : "formatting" } ) ;
2026-03-19 06:58:19 +00:00
// J, F, ..., D
case "MMMMM" :
2026-03-26 09:29:55 +00:00
return match . month ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
// January, February, ..., December
case "MMMM" :
default :
2026-03-26 09:29:55 +00:00
return match . month ( dateString , { width : "wide" , context : "formatting" } ) || match . month ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . month ( dateString , { width : "narrow" , context : "formatting" } ) ;
2026-03-19 06:58:19 +00:00
}
}
validate ( _date , value ) {
return value >= 0 && value <= 11 ;
}
set ( date , _flags , value ) {
date . setMonth ( value , 1 ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js
var StandAloneMonthParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 110 ) ;
_ _publicField ( this , "incompatibleTokens" , [
"Y" ,
"R" ,
"q" ,
"Q" ,
"M" ,
"w" ,
"I" ,
"D" ,
"i" ,
"e" ,
"c" ,
"t" ,
"T"
] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
const valueCallback = ( value ) => value - 1 ;
switch ( token ) {
// 1, 2, ..., 12
case "L" :
return mapValue (
parseNumericPattern ( numericPatterns . month , dateString ) ,
valueCallback
) ;
// 01, 02, ..., 12
case "LL" :
return mapValue ( parseNDigits ( 2 , dateString ) , valueCallback ) ;
// 1st, 2nd, ..., 12th
case "Lo" :
return mapValue (
2026-03-26 09:29:55 +00:00
match . ordinalNumber ( dateString , {
2026-03-19 06:58:19 +00:00
unit : "month"
} ) ,
valueCallback
) ;
// Jan, Feb, ..., Dec
case "LLL" :
2026-03-26 09:29:55 +00:00
return match . month ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "standalone"
2026-03-26 09:29:55 +00:00
} ) || match . month ( dateString , { width : "narrow" , context : "standalone" } ) ;
2026-03-19 06:58:19 +00:00
// J, F, ..., D
case "LLLLL" :
2026-03-26 09:29:55 +00:00
return match . month ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "standalone"
} ) ;
// January, February, ..., December
case "LLLL" :
default :
2026-03-26 09:29:55 +00:00
return match . month ( dateString , { width : "wide" , context : "standalone" } ) || match . month ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "standalone"
2026-03-26 09:29:55 +00:00
} ) || match . month ( dateString , { width : "narrow" , context : "standalone" } ) ;
2026-03-19 06:58:19 +00:00
}
}
validate ( _date , value ) {
return value >= 0 && value <= 11 ;
}
set ( date , _flags , value ) {
date . setMonth ( value , 1 ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/setWeek.js
function setWeek ( date , week , options ) {
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
const diff = getWeek ( date _ , options ) - week ;
date _ . setDate ( date _ . getDate ( ) - diff * 7 ) ;
return toDate ( date _ , options == null ? void 0 : options . in ) ;
}
// node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js
var LocalWeekParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 100 ) ;
_ _publicField ( this , "incompatibleTokens" , [
"y" ,
"R" ,
"u" ,
"q" ,
"Q" ,
"M" ,
"L" ,
"I" ,
"d" ,
"D" ,
"i" ,
"t" ,
"T"
] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
case "w" :
return parseNumericPattern ( numericPatterns . week , dateString ) ;
case "wo" :
2026-03-26 09:29:55 +00:00
return match . ordinalNumber ( dateString , { unit : "week" } ) ;
2026-03-19 06:58:19 +00:00
default :
return parseNDigits ( token . length , dateString ) ;
}
}
validate ( _date , value ) {
return value >= 1 && value <= 53 ;
}
set ( date , _flags , value , options ) {
return startOfWeek ( setWeek ( date , value , options ) , options ) ;
}
} ;
// node_modules/date-fns/setISOWeek.js
function setISOWeek ( date , week , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const diff = getISOWeek ( _date , options ) - week ;
_date . setDate ( _date . getDate ( ) - diff * 7 ) ;
return _date ;
}
// node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js
var ISOWeekParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 100 ) ;
_ _publicField ( this , "incompatibleTokens" , [
"y" ,
"Y" ,
"u" ,
"q" ,
"Q" ,
"M" ,
"L" ,
"w" ,
"d" ,
"D" ,
"e" ,
"c" ,
"t" ,
"T"
] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
case "I" :
return parseNumericPattern ( numericPatterns . week , dateString ) ;
case "Io" :
2026-03-26 09:29:55 +00:00
return match . ordinalNumber ( dateString , { unit : "week" } ) ;
2026-03-19 06:58:19 +00:00
default :
return parseNDigits ( token . length , dateString ) ;
}
}
validate ( _date , value ) {
return value >= 1 && value <= 53 ;
}
set ( date , _flags , value ) {
return startOfISOWeek ( setISOWeek ( date , value ) ) ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/DateParser.js
var DAYS _IN _MONTH = [ 31 , 28 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31 ] ;
var DAYS _IN _MONTH _LEAP _YEAR = [
31 ,
29 ,
31 ,
30 ,
31 ,
30 ,
31 ,
31 ,
30 ,
31 ,
30 ,
31
] ;
var DateParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 90 ) ;
_ _publicField ( this , "subPriority" , 1 ) ;
_ _publicField ( this , "incompatibleTokens" , [
"Y" ,
"R" ,
"q" ,
"Q" ,
"w" ,
"I" ,
"D" ,
"i" ,
"e" ,
"c" ,
"t" ,
"T"
] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
case "d" :
return parseNumericPattern ( numericPatterns . date , dateString ) ;
case "do" :
2026-03-26 09:29:55 +00:00
return match . ordinalNumber ( dateString , { unit : "date" } ) ;
2026-03-19 06:58:19 +00:00
default :
return parseNDigits ( token . length , dateString ) ;
}
}
validate ( date , value ) {
const year = date . getFullYear ( ) ;
const isLeapYear2 = isLeapYearIndex ( year ) ;
const month = date . getMonth ( ) ;
if ( isLeapYear2 ) {
return value >= 1 && value <= DAYS _IN _MONTH _LEAP _YEAR [ month ] ;
} else {
return value >= 1 && value <= DAYS _IN _MONTH [ month ] ;
}
}
set ( date , _flags , value ) {
date . setDate ( value ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js
var DayOfYearParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 90 ) ;
_ _publicField ( this , "subpriority" , 1 ) ;
_ _publicField ( this , "incompatibleTokens" , [
"Y" ,
"R" ,
"q" ,
"Q" ,
"M" ,
"L" ,
"w" ,
"I" ,
"d" ,
"E" ,
"i" ,
"e" ,
"c" ,
"t" ,
"T"
] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
case "D" :
case "DD" :
return parseNumericPattern ( numericPatterns . dayOfYear , dateString ) ;
case "Do" :
2026-03-26 09:29:55 +00:00
return match . ordinalNumber ( dateString , { unit : "date" } ) ;
2026-03-19 06:58:19 +00:00
default :
return parseNDigits ( token . length , dateString ) ;
}
}
validate ( date , value ) {
const year = date . getFullYear ( ) ;
const isLeapYear2 = isLeapYearIndex ( year ) ;
if ( isLeapYear2 ) {
return value >= 1 && value <= 366 ;
} else {
return value >= 1 && value <= 365 ;
}
}
set ( date , _flags , value ) {
date . setMonth ( 0 , value ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/setDay.js
function setDay ( date , day , options ) {
var _a , _b , _c , _d ;
2026-03-26 09:29:55 +00:00
const defaultOptions = getDefaultOptions ( ) ;
const weekStartsOn = ( options == null ? void 0 : options . weekStartsOn ) ? ? ( ( _b = ( _a = options == null ? void 0 : options . locale ) == null ? void 0 : _a . options ) == null ? void 0 : _b . weekStartsOn ) ? ? defaultOptions . weekStartsOn ? ? ( ( _d = ( _c = defaultOptions . locale ) == null ? void 0 : _c . options ) == null ? void 0 : _d . weekStartsOn ) ? ? 0 ;
2026-03-19 06:58:19 +00:00
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
const currentDay = date _ . getDay ( ) ;
const remainder = day % 7 ;
const dayIndex = ( remainder + 7 ) % 7 ;
const delta = 7 - weekStartsOn ;
const diff = day < 0 || day > 6 ? day - ( currentDay + delta ) % 7 : ( dayIndex + delta ) % 7 - ( currentDay + delta ) % 7 ;
return addDays ( date _ , diff , options ) ;
}
// node_modules/date-fns/parse/_lib/parsers/DayParser.js
var DayParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 90 ) ;
_ _publicField ( this , "incompatibleTokens" , [ "D" , "i" , "e" , "c" , "t" , "T" ] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
// Tue
case "E" :
case "EE" :
case "EEE" :
2026-03-26 09:29:55 +00:00
return match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . day ( dateString , { width : "short" , context : "formatting" } ) || match . day ( dateString , { width : "narrow" , context : "formatting" } ) ;
2026-03-19 06:58:19 +00:00
// T
case "EEEEE" :
2026-03-26 09:29:55 +00:00
return match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
// Tu
case "EEEEEE" :
2026-03-26 09:29:55 +00:00
return match . day ( dateString , { width : "short" , context : "formatting" } ) || match . day ( dateString , { width : "narrow" , context : "formatting" } ) ;
2026-03-19 06:58:19 +00:00
// Tuesday
case "EEEE" :
default :
2026-03-26 09:29:55 +00:00
return match . day ( dateString , { width : "wide" , context : "formatting" } ) || match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . day ( dateString , { width : "short" , context : "formatting" } ) || match . day ( dateString , { width : "narrow" , context : "formatting" } ) ;
2026-03-19 06:58:19 +00:00
}
}
validate ( _date , value ) {
return value >= 0 && value <= 6 ;
}
set ( date , _flags , value , options ) {
date = setDay ( date , value , options ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js
var LocalDayParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 90 ) ;
_ _publicField ( this , "incompatibleTokens" , [
"y" ,
"R" ,
"u" ,
"q" ,
"Q" ,
"M" ,
"L" ,
"I" ,
"d" ,
"D" ,
"E" ,
"i" ,
"c" ,
"t" ,
"T"
] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match , options ) {
2026-03-19 06:58:19 +00:00
const valueCallback = ( value ) => {
const wholeWeekDays = Math . floor ( ( value - 1 ) / 7 ) * 7 ;
return ( value + options . weekStartsOn + 6 ) % 7 + wholeWeekDays ;
} ;
switch ( token ) {
// 3
case "e" :
case "ee" :
return mapValue ( parseNDigits ( token . length , dateString ) , valueCallback ) ;
// 3rd
case "eo" :
return mapValue (
2026-03-26 09:29:55 +00:00
match . ordinalNumber ( dateString , {
2026-03-19 06:58:19 +00:00
unit : "day"
} ) ,
valueCallback
) ;
// Tue
case "eee" :
2026-03-26 09:29:55 +00:00
return match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . day ( dateString , { width : "short" , context : "formatting" } ) || match . day ( dateString , { width : "narrow" , context : "formatting" } ) ;
2026-03-19 06:58:19 +00:00
// T
case "eeeee" :
2026-03-26 09:29:55 +00:00
return match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
// Tu
case "eeeeee" :
2026-03-26 09:29:55 +00:00
return match . day ( dateString , { width : "short" , context : "formatting" } ) || match . day ( dateString , { width : "narrow" , context : "formatting" } ) ;
2026-03-19 06:58:19 +00:00
// Tuesday
case "eeee" :
default :
2026-03-26 09:29:55 +00:00
return match . day ( dateString , { width : "wide" , context : "formatting" } ) || match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . day ( dateString , { width : "short" , context : "formatting" } ) || match . day ( dateString , { width : "narrow" , context : "formatting" } ) ;
2026-03-19 06:58:19 +00:00
}
}
validate ( _date , value ) {
return value >= 0 && value <= 6 ;
}
set ( date , _flags , value , options ) {
date = setDay ( date , value , options ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js
var StandAloneLocalDayParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 90 ) ;
_ _publicField ( this , "incompatibleTokens" , [
"y" ,
"R" ,
"u" ,
"q" ,
"Q" ,
"M" ,
"L" ,
"I" ,
"d" ,
"D" ,
"E" ,
"i" ,
"e" ,
"t" ,
"T"
] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match , options ) {
2026-03-19 06:58:19 +00:00
const valueCallback = ( value ) => {
const wholeWeekDays = Math . floor ( ( value - 1 ) / 7 ) * 7 ;
return ( value + options . weekStartsOn + 6 ) % 7 + wholeWeekDays ;
} ;
switch ( token ) {
// 3
case "c" :
case "cc" :
return mapValue ( parseNDigits ( token . length , dateString ) , valueCallback ) ;
// 3rd
case "co" :
return mapValue (
2026-03-26 09:29:55 +00:00
match . ordinalNumber ( dateString , {
2026-03-19 06:58:19 +00:00
unit : "day"
} ) ,
valueCallback
) ;
// Tue
case "ccc" :
2026-03-26 09:29:55 +00:00
return match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "standalone"
2026-03-26 09:29:55 +00:00
} ) || match . day ( dateString , { width : "short" , context : "standalone" } ) || match . day ( dateString , { width : "narrow" , context : "standalone" } ) ;
2026-03-19 06:58:19 +00:00
// T
case "ccccc" :
2026-03-26 09:29:55 +00:00
return match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "standalone"
} ) ;
// Tu
case "cccccc" :
2026-03-26 09:29:55 +00:00
return match . day ( dateString , { width : "short" , context : "standalone" } ) || match . day ( dateString , { width : "narrow" , context : "standalone" } ) ;
2026-03-19 06:58:19 +00:00
// Tuesday
case "cccc" :
default :
2026-03-26 09:29:55 +00:00
return match . day ( dateString , { width : "wide" , context : "standalone" } ) || match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "standalone"
2026-03-26 09:29:55 +00:00
} ) || match . day ( dateString , { width : "short" , context : "standalone" } ) || match . day ( dateString , { width : "narrow" , context : "standalone" } ) ;
2026-03-19 06:58:19 +00:00
}
}
validate ( _date , value ) {
return value >= 0 && value <= 6 ;
}
set ( date , _flags , value , options ) {
date = setDay ( date , value , options ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/setISODay.js
function setISODay ( date , day , options ) {
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
const currentDay = getISODay ( date _ , options ) ;
const diff = day - currentDay ;
return addDays ( date _ , diff , options ) ;
}
// node_modules/date-fns/parse/_lib/parsers/ISODayParser.js
var ISODayParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 90 ) ;
_ _publicField ( this , "incompatibleTokens" , [
"y" ,
"Y" ,
"u" ,
"q" ,
"Q" ,
"M" ,
"L" ,
"w" ,
"d" ,
"D" ,
"E" ,
"e" ,
"c" ,
"t" ,
"T"
] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
const valueCallback = ( value ) => {
if ( value === 0 ) {
return 7 ;
}
return value ;
} ;
switch ( token ) {
// 2
case "i" :
case "ii" :
return parseNDigits ( token . length , dateString ) ;
// 2nd
case "io" :
2026-03-26 09:29:55 +00:00
return match . ordinalNumber ( dateString , { unit : "day" } ) ;
2026-03-19 06:58:19 +00:00
// Tue
case "iii" :
return mapValue (
2026-03-26 09:29:55 +00:00
match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "short" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ,
valueCallback
) ;
// T
case "iiiii" :
return mapValue (
2026-03-26 09:29:55 +00:00
match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ,
valueCallback
) ;
// Tu
case "iiiiii" :
return mapValue (
2026-03-26 09:29:55 +00:00
match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "short" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ,
valueCallback
) ;
// Tuesday
case "iiii" :
default :
return mapValue (
2026-03-26 09:29:55 +00:00
match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "wide" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "short" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . day ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ,
valueCallback
) ;
}
}
validate ( _date , value ) {
return value >= 1 && value <= 7 ;
}
set ( date , _flags , value ) {
date = setISODay ( date , value ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/AMPMParser.js
var AMPMParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 80 ) ;
_ _publicField ( this , "incompatibleTokens" , [ "b" , "B" , "H" , "k" , "t" , "T" ] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
case "a" :
case "aa" :
case "aaa" :
2026-03-26 09:29:55 +00:00
return match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
case "aaaaa" :
2026-03-26 09:29:55 +00:00
return match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
case "aaaa" :
default :
2026-03-26 09:29:55 +00:00
return match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "wide" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
}
}
set ( date , _flags , value ) {
date . setHours ( dayPeriodEnumToHours ( value ) , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js
var AMPMMidnightParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 80 ) ;
_ _publicField ( this , "incompatibleTokens" , [ "a" , "B" , "H" , "k" , "t" , "T" ] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
case "b" :
case "bb" :
case "bbb" :
2026-03-26 09:29:55 +00:00
return match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
case "bbbbb" :
2026-03-26 09:29:55 +00:00
return match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
case "bbbb" :
default :
2026-03-26 09:29:55 +00:00
return match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "wide" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
}
}
set ( date , _flags , value ) {
date . setHours ( dayPeriodEnumToHours ( value ) , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js
var DayPeriodParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 80 ) ;
_ _publicField ( this , "incompatibleTokens" , [ "a" , "b" , "t" , "T" ] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
case "B" :
case "BB" :
case "BBB" :
2026-03-26 09:29:55 +00:00
return match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
case "BBBBB" :
2026-03-26 09:29:55 +00:00
return match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
case "BBBB" :
default :
2026-03-26 09:29:55 +00:00
return match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "wide" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "abbreviated" ,
context : "formatting"
2026-03-26 09:29:55 +00:00
} ) || match . dayPeriod ( dateString , {
2026-03-19 06:58:19 +00:00
width : "narrow" ,
context : "formatting"
} ) ;
}
}
set ( date , _flags , value ) {
date . setHours ( dayPeriodEnumToHours ( value ) , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js
var Hour1to12Parser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 70 ) ;
_ _publicField ( this , "incompatibleTokens" , [ "H" , "K" , "k" , "t" , "T" ] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
case "h" :
return parseNumericPattern ( numericPatterns . hour12h , dateString ) ;
case "ho" :
2026-03-26 09:29:55 +00:00
return match . ordinalNumber ( dateString , { unit : "hour" } ) ;
2026-03-19 06:58:19 +00:00
default :
return parseNDigits ( token . length , dateString ) ;
}
}
validate ( _date , value ) {
return value >= 1 && value <= 12 ;
}
set ( date , _flags , value ) {
const isPM = date . getHours ( ) >= 12 ;
if ( isPM && value < 12 ) {
date . setHours ( value + 12 , 0 , 0 , 0 ) ;
} else if ( ! isPM && value === 12 ) {
date . setHours ( 0 , 0 , 0 , 0 ) ;
} else {
date . setHours ( value , 0 , 0 , 0 ) ;
}
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js
var Hour0to23Parser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 70 ) ;
_ _publicField ( this , "incompatibleTokens" , [ "a" , "b" , "h" , "K" , "k" , "t" , "T" ] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
case "H" :
return parseNumericPattern ( numericPatterns . hour23h , dateString ) ;
case "Ho" :
2026-03-26 09:29:55 +00:00
return match . ordinalNumber ( dateString , { unit : "hour" } ) ;
2026-03-19 06:58:19 +00:00
default :
return parseNDigits ( token . length , dateString ) ;
}
}
validate ( _date , value ) {
return value >= 0 && value <= 23 ;
}
set ( date , _flags , value ) {
date . setHours ( value , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js
var Hour0To11Parser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 70 ) ;
_ _publicField ( this , "incompatibleTokens" , [ "h" , "H" , "k" , "t" , "T" ] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
case "K" :
return parseNumericPattern ( numericPatterns . hour11h , dateString ) ;
case "Ko" :
2026-03-26 09:29:55 +00:00
return match . ordinalNumber ( dateString , { unit : "hour" } ) ;
2026-03-19 06:58:19 +00:00
default :
return parseNDigits ( token . length , dateString ) ;
}
}
validate ( _date , value ) {
return value >= 0 && value <= 11 ;
}
set ( date , _flags , value ) {
const isPM = date . getHours ( ) >= 12 ;
if ( isPM && value < 12 ) {
date . setHours ( value + 12 , 0 , 0 , 0 ) ;
} else {
date . setHours ( value , 0 , 0 , 0 ) ;
}
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js
var Hour1To24Parser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 70 ) ;
_ _publicField ( this , "incompatibleTokens" , [ "a" , "b" , "h" , "H" , "K" , "t" , "T" ] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
case "k" :
return parseNumericPattern ( numericPatterns . hour24h , dateString ) ;
case "ko" :
2026-03-26 09:29:55 +00:00
return match . ordinalNumber ( dateString , { unit : "hour" } ) ;
2026-03-19 06:58:19 +00:00
default :
return parseNDigits ( token . length , dateString ) ;
}
}
validate ( _date , value ) {
return value >= 1 && value <= 24 ;
}
set ( date , _flags , value ) {
const hours = value <= 24 ? value % 24 : value ;
date . setHours ( hours , 0 , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/MinuteParser.js
var MinuteParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 60 ) ;
_ _publicField ( this , "incompatibleTokens" , [ "t" , "T" ] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
case "m" :
return parseNumericPattern ( numericPatterns . minute , dateString ) ;
case "mo" :
2026-03-26 09:29:55 +00:00
return match . ordinalNumber ( dateString , { unit : "minute" } ) ;
2026-03-19 06:58:19 +00:00
default :
return parseNDigits ( token . length , dateString ) ;
}
}
validate ( _date , value ) {
return value >= 0 && value <= 59 ;
}
set ( date , _flags , value ) {
date . setMinutes ( value , 0 , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/SecondParser.js
var SecondParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 50 ) ;
_ _publicField ( this , "incompatibleTokens" , [ "t" , "T" ] ) ;
}
2026-03-26 09:29:55 +00:00
parse ( dateString , token , match ) {
2026-03-19 06:58:19 +00:00
switch ( token ) {
case "s" :
return parseNumericPattern ( numericPatterns . second , dateString ) ;
case "so" :
2026-03-26 09:29:55 +00:00
return match . ordinalNumber ( dateString , { unit : "second" } ) ;
2026-03-19 06:58:19 +00:00
default :
return parseNDigits ( token . length , dateString ) ;
}
}
validate ( _date , value ) {
return value >= 0 && value <= 59 ;
}
set ( date , _flags , value ) {
date . setSeconds ( value , 0 ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js
var FractionOfSecondParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 30 ) ;
_ _publicField ( this , "incompatibleTokens" , [ "t" , "T" ] ) ;
}
parse ( dateString , token ) {
const valueCallback = ( value ) => Math . trunc ( value * Math . pow ( 10 , - token . length + 3 ) ) ;
return mapValue ( parseNDigits ( token . length , dateString ) , valueCallback ) ;
}
set ( date , _flags , value ) {
date . setMilliseconds ( value ) ;
return date ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js
var ISOTimezoneWithZParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 10 ) ;
_ _publicField ( this , "incompatibleTokens" , [ "t" , "T" , "x" ] ) ;
}
parse ( dateString , token ) {
switch ( token ) {
case "X" :
return parseTimezonePattern (
timezonePatterns . basicOptionalMinutes ,
dateString
) ;
case "XX" :
return parseTimezonePattern ( timezonePatterns . basic , dateString ) ;
case "XXXX" :
return parseTimezonePattern (
timezonePatterns . basicOptionalSeconds ,
dateString
) ;
case "XXXXX" :
return parseTimezonePattern (
timezonePatterns . extendedOptionalSeconds ,
dateString
) ;
case "XXX" :
default :
return parseTimezonePattern ( timezonePatterns . extended , dateString ) ;
}
}
set ( date , flags , value ) {
if ( flags . timestampIsSet ) return date ;
return constructFrom (
date ,
date . getTime ( ) - getTimezoneOffsetInMilliseconds ( date ) - value
) ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js
var ISOTimezoneParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 10 ) ;
_ _publicField ( this , "incompatibleTokens" , [ "t" , "T" , "X" ] ) ;
}
parse ( dateString , token ) {
switch ( token ) {
case "x" :
return parseTimezonePattern (
timezonePatterns . basicOptionalMinutes ,
dateString
) ;
case "xx" :
return parseTimezonePattern ( timezonePatterns . basic , dateString ) ;
case "xxxx" :
return parseTimezonePattern (
timezonePatterns . basicOptionalSeconds ,
dateString
) ;
case "xxxxx" :
return parseTimezonePattern (
timezonePatterns . extendedOptionalSeconds ,
dateString
) ;
case "xxx" :
default :
return parseTimezonePattern ( timezonePatterns . extended , dateString ) ;
}
}
set ( date , flags , value ) {
if ( flags . timestampIsSet ) return date ;
return constructFrom (
date ,
date . getTime ( ) - getTimezoneOffsetInMilliseconds ( date ) - value
) ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js
var TimestampSecondsParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 40 ) ;
_ _publicField ( this , "incompatibleTokens" , "*" ) ;
}
parse ( dateString ) {
return parseAnyDigitsSigned ( dateString ) ;
}
set ( date , _flags , value ) {
return [ constructFrom ( date , value * 1e3 ) , { timestampIsSet : true } ] ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js
var TimestampMillisecondsParser = class extends Parser {
constructor ( ) {
super ( ... arguments ) ;
_ _publicField ( this , "priority" , 20 ) ;
_ _publicField ( this , "incompatibleTokens" , "*" ) ;
}
parse ( dateString ) {
return parseAnyDigitsSigned ( dateString ) ;
}
set ( date , _flags , value ) {
return [ constructFrom ( date , value ) , { timestampIsSet : true } ] ;
}
} ;
// node_modules/date-fns/parse/_lib/parsers.js
var parsers = {
G : new EraParser ( ) ,
y : new YearParser ( ) ,
Y : new LocalWeekYearParser ( ) ,
R : new ISOWeekYearParser ( ) ,
u : new ExtendedYearParser ( ) ,
Q : new QuarterParser ( ) ,
q : new StandAloneQuarterParser ( ) ,
M : new MonthParser ( ) ,
L : new StandAloneMonthParser ( ) ,
w : new LocalWeekParser ( ) ,
I : new ISOWeekParser ( ) ,
d : new DateParser ( ) ,
D : new DayOfYearParser ( ) ,
E : new DayParser ( ) ,
e : new LocalDayParser ( ) ,
c : new StandAloneLocalDayParser ( ) ,
i : new ISODayParser ( ) ,
a : new AMPMParser ( ) ,
b : new AMPMMidnightParser ( ) ,
B : new DayPeriodParser ( ) ,
h : new Hour1to12Parser ( ) ,
H : new Hour0to23Parser ( ) ,
K : new Hour0To11Parser ( ) ,
k : new Hour1To24Parser ( ) ,
m : new MinuteParser ( ) ,
s : new SecondParser ( ) ,
S : new FractionOfSecondParser ( ) ,
X : new ISOTimezoneWithZParser ( ) ,
x : new ISOTimezoneParser ( ) ,
t : new TimestampSecondsParser ( ) ,
T : new TimestampMillisecondsParser ( )
} ;
// node_modules/date-fns/parse.js
var formattingTokensRegExp2 = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g ;
var longFormattingTokensRegExp2 = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g ;
var escapedStringRegExp2 = /^'([^]*?)'?$/ ;
var doubleQuoteRegExp2 = /''/g ;
var notWhitespaceRegExp = /\S/ ;
var unescapedLatinCharacterRegExp2 = /[a-zA-Z]/ ;
function parse ( dateStr , formatStr , referenceDate , options ) {
var _a , _b , _c , _d , _e , _f , _g , _h ;
const invalidDate = ( ) => constructFrom ( ( options == null ? void 0 : options . in ) || referenceDate , NaN ) ;
2026-03-26 09:29:55 +00:00
const defaultOptions = getDefaultOptions2 ( ) ;
const locale = ( options == null ? void 0 : options . locale ) ? ? defaultOptions . locale ? ? enUS ;
const firstWeekContainsDate = ( options == null ? void 0 : options . firstWeekContainsDate ) ? ? ( ( _b = ( _a = options == null ? void 0 : options . locale ) == null ? void 0 : _a . options ) == null ? void 0 : _b . firstWeekContainsDate ) ? ? defaultOptions . firstWeekContainsDate ? ? ( ( _d = ( _c = defaultOptions . locale ) == null ? void 0 : _c . options ) == null ? void 0 : _d . firstWeekContainsDate ) ? ? 1 ;
const weekStartsOn = ( options == null ? void 0 : options . weekStartsOn ) ? ? ( ( _f = ( _e = options == null ? void 0 : options . locale ) == null ? void 0 : _e . options ) == null ? void 0 : _f . weekStartsOn ) ? ? defaultOptions . weekStartsOn ? ? ( ( _h = ( _g = defaultOptions . locale ) == null ? void 0 : _g . options ) == null ? void 0 : _h . weekStartsOn ) ? ? 0 ;
2026-03-19 06:58:19 +00:00
if ( ! formatStr )
return dateStr ? invalidDate ( ) : toDate ( referenceDate , options == null ? void 0 : options . in ) ;
const subFnOptions = {
firstWeekContainsDate ,
weekStartsOn ,
locale
} ;
const setters = [ new DateTimezoneSetter ( options == null ? void 0 : options . in , referenceDate ) ] ;
const tokens = formatStr . match ( longFormattingTokensRegExp2 ) . map ( ( substring ) => {
const firstCharacter = substring [ 0 ] ;
if ( firstCharacter in longFormatters ) {
const longFormatter = longFormatters [ firstCharacter ] ;
return longFormatter ( substring , locale . formatLong ) ;
}
return substring ;
} ) . join ( "" ) . match ( formattingTokensRegExp2 ) ;
const usedTokens = [ ] ;
for ( let token of tokens ) {
if ( ! ( options == null ? void 0 : options . useAdditionalWeekYearTokens ) && isProtectedWeekYearToken ( token ) ) {
warnOrThrowProtectedError ( token , formatStr , dateStr ) ;
}
if ( ! ( options == null ? void 0 : options . useAdditionalDayOfYearTokens ) && isProtectedDayOfYearToken ( token ) ) {
warnOrThrowProtectedError ( token , formatStr , dateStr ) ;
}
const firstCharacter = token [ 0 ] ;
const parser = parsers [ firstCharacter ] ;
if ( parser ) {
const { incompatibleTokens } = parser ;
if ( Array . isArray ( incompatibleTokens ) ) {
const incompatibleToken = usedTokens . find (
( usedToken ) => incompatibleTokens . includes ( usedToken . token ) || usedToken . token === firstCharacter
) ;
if ( incompatibleToken ) {
throw new RangeError (
` The format string mustn't contain \` ${ incompatibleToken . fullToken } \` and \` ${ token } \` at the same time `
) ;
}
} else if ( parser . incompatibleTokens === "*" && usedTokens . length > 0 ) {
throw new RangeError (
` The format string mustn't contain \` ${ token } \` and any other token at the same time `
) ;
}
usedTokens . push ( { token : firstCharacter , fullToken : token } ) ;
const parseResult = parser . run (
dateStr ,
token ,
locale . match ,
subFnOptions
) ;
if ( ! parseResult ) {
return invalidDate ( ) ;
}
setters . push ( parseResult . setter ) ;
dateStr = parseResult . rest ;
} else {
if ( firstCharacter . match ( unescapedLatinCharacterRegExp2 ) ) {
throw new RangeError (
"Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
) ;
}
if ( token === "''" ) {
token = "'" ;
} else if ( firstCharacter === "'" ) {
token = cleanEscapedString2 ( token ) ;
}
if ( dateStr . indexOf ( token ) === 0 ) {
dateStr = dateStr . slice ( token . length ) ;
} else {
return invalidDate ( ) ;
}
}
}
if ( dateStr . length > 0 && notWhitespaceRegExp . test ( dateStr ) ) {
return invalidDate ( ) ;
}
const uniquePrioritySetters = setters . map ( ( setter ) => setter . priority ) . sort ( ( a , b ) => b - a ) . filter ( ( priority , index , array ) => array . indexOf ( priority ) === index ) . map (
( priority ) => setters . filter ( ( setter ) => setter . priority === priority ) . sort ( ( a , b ) => b . subPriority - a . subPriority )
) . map ( ( setterArray ) => setterArray [ 0 ] ) ;
let date = toDate ( referenceDate , options == null ? void 0 : options . in ) ;
if ( isNaN ( + date ) ) return invalidDate ( ) ;
const flags = { } ;
for ( const setter of uniquePrioritySetters ) {
if ( ! setter . validate ( date , subFnOptions ) ) {
return invalidDate ( ) ;
}
const result = setter . set ( date , flags , subFnOptions ) ;
if ( Array . isArray ( result ) ) {
date = result [ 0 ] ;
Object . assign ( flags , result [ 1 ] ) ;
} else {
date = result ;
}
}
return date ;
}
function cleanEscapedString2 ( input ) {
return input . match ( escapedStringRegExp2 ) [ 1 ] . replace ( doubleQuoteRegExp2 , "'" ) ;
}
// node_modules/date-fns/isMatch.js
function isMatch ( dateStr , formatStr , options ) {
return isValid ( parse ( dateStr , formatStr , /* @__PURE__ */ new Date ( ) , options ) ) ;
}
// node_modules/date-fns/isMonday.js
function isMonday ( date , options ) {
return toDate ( date , options == null ? void 0 : options . in ) . getDay ( ) === 1 ;
}
// node_modules/date-fns/isPast.js
function isPast ( date ) {
return + toDate ( date ) < Date . now ( ) ;
}
// node_modules/date-fns/startOfHour.js
function startOfHour ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
_date . setMinutes ( 0 , 0 , 0 ) ;
return _date ;
}
// node_modules/date-fns/isSameHour.js
function isSameHour ( dateLeft , dateRight , options ) {
const [ dateLeft _ , dateRight _ ] = normalizeDates (
options == null ? void 0 : options . in ,
dateLeft ,
dateRight
) ;
return + startOfHour ( dateLeft _ ) === + startOfHour ( dateRight _ ) ;
}
// node_modules/date-fns/isSameISOWeek.js
function isSameISOWeek ( laterDate , earlierDate , options ) {
return isSameWeek ( laterDate , earlierDate , { ... options , weekStartsOn : 1 } ) ;
}
// node_modules/date-fns/isSameISOWeekYear.js
function isSameISOWeekYear ( laterDate , earlierDate , options ) {
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
return + startOfISOWeekYear ( laterDate _ ) === + startOfISOWeekYear ( earlierDate _ ) ;
}
// node_modules/date-fns/startOfMinute.js
function startOfMinute ( date , options ) {
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
date _ . setSeconds ( 0 , 0 ) ;
return date _ ;
}
// node_modules/date-fns/isSameMinute.js
function isSameMinute ( laterDate , earlierDate ) {
return + startOfMinute ( laterDate ) === + startOfMinute ( earlierDate ) ;
}
// node_modules/date-fns/isSameMonth.js
function isSameMonth ( laterDate , earlierDate , options ) {
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
return laterDate _ . getFullYear ( ) === earlierDate _ . getFullYear ( ) && laterDate _ . getMonth ( ) === earlierDate _ . getMonth ( ) ;
}
// node_modules/date-fns/isSameQuarter.js
function isSameQuarter ( laterDate , earlierDate , options ) {
const [ dateLeft _ , dateRight _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
return + startOfQuarter ( dateLeft _ ) === + startOfQuarter ( dateRight _ ) ;
}
// node_modules/date-fns/startOfSecond.js
function startOfSecond ( date , options ) {
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
date _ . setMilliseconds ( 0 ) ;
return date _ ;
}
// node_modules/date-fns/isSameSecond.js
function isSameSecond ( laterDate , earlierDate ) {
return + startOfSecond ( laterDate ) === + startOfSecond ( earlierDate ) ;
}
// node_modules/date-fns/isSameYear.js
function isSameYear ( laterDate , earlierDate , options ) {
const [ laterDate _ , earlierDate _ ] = normalizeDates (
options == null ? void 0 : options . in ,
laterDate ,
earlierDate
) ;
return laterDate _ . getFullYear ( ) === earlierDate _ . getFullYear ( ) ;
}
// node_modules/date-fns/isThisHour.js
function isThisHour ( date , options ) {
return isSameHour (
toDate ( date , options == null ? void 0 : options . in ) ,
constructNow ( ( options == null ? void 0 : options . in ) || date )
) ;
}
// node_modules/date-fns/isThisISOWeek.js
function isThisISOWeek ( date , options ) {
return isSameISOWeek (
constructFrom ( ( options == null ? void 0 : options . in ) || date , date ) ,
constructNow ( ( options == null ? void 0 : options . in ) || date )
) ;
}
// node_modules/date-fns/isThisMinute.js
function isThisMinute ( date ) {
return isSameMinute ( date , constructNow ( date ) ) ;
}
// node_modules/date-fns/isThisMonth.js
function isThisMonth ( date , options ) {
return isSameMonth (
constructFrom ( ( options == null ? void 0 : options . in ) || date , date ) ,
constructNow ( ( options == null ? void 0 : options . in ) || date )
) ;
}
// node_modules/date-fns/isThisQuarter.js
function isThisQuarter ( date , options ) {
return isSameQuarter (
constructFrom ( ( options == null ? void 0 : options . in ) || date , date ) ,
constructNow ( ( options == null ? void 0 : options . in ) || date )
) ;
}
// node_modules/date-fns/isThisSecond.js
function isThisSecond ( date ) {
return isSameSecond ( date , constructNow ( date ) ) ;
}
// node_modules/date-fns/isThisWeek.js
function isThisWeek ( date , options ) {
return isSameWeek (
constructFrom ( ( options == null ? void 0 : options . in ) || date , date ) ,
constructNow ( ( options == null ? void 0 : options . in ) || date ) ,
options
) ;
}
// node_modules/date-fns/isThisYear.js
function isThisYear ( date , options ) {
return isSameYear (
constructFrom ( ( options == null ? void 0 : options . in ) || date , date ) ,
constructNow ( ( options == null ? void 0 : options . in ) || date )
) ;
}
// node_modules/date-fns/isThursday.js
function isThursday ( date , options ) {
return toDate ( date , options == null ? void 0 : options . in ) . getDay ( ) === 4 ;
}
// node_modules/date-fns/isToday.js
function isToday ( date , options ) {
return isSameDay (
constructFrom ( ( options == null ? void 0 : options . in ) || date , date ) ,
constructNow ( ( options == null ? void 0 : options . in ) || date )
) ;
}
// node_modules/date-fns/isTomorrow.js
function isTomorrow ( date , options ) {
return isSameDay (
date ,
addDays ( constructNow ( ( options == null ? void 0 : options . in ) || date ) , 1 ) ,
options
) ;
}
// node_modules/date-fns/isTuesday.js
function isTuesday ( date , options ) {
return toDate ( date , options == null ? void 0 : options . in ) . getDay ( ) === 2 ;
}
// node_modules/date-fns/isWednesday.js
function isWednesday ( date , options ) {
return toDate ( date , options == null ? void 0 : options . in ) . getDay ( ) === 3 ;
}
// node_modules/date-fns/isWithinInterval.js
function isWithinInterval ( date , interval2 , options ) {
const time = + toDate ( date , options == null ? void 0 : options . in ) ;
const [ startTime , endTime ] = [
+ toDate ( interval2 . start , options == null ? void 0 : options . in ) ,
+ toDate ( interval2 . end , options == null ? void 0 : options . in )
] . sort ( ( a , b ) => a - b ) ;
return time >= startTime && time <= endTime ;
}
// node_modules/date-fns/subDays.js
function subDays ( date , amount , options ) {
return addDays ( date , - amount , options ) ;
}
// node_modules/date-fns/isYesterday.js
function isYesterday ( date , options ) {
return isSameDay (
constructFrom ( ( options == null ? void 0 : options . in ) || date , date ) ,
subDays ( constructNow ( ( options == null ? void 0 : options . in ) || date ) , 1 )
) ;
}
// node_modules/date-fns/lastDayOfDecade.js
function lastDayOfDecade ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const year = _date . getFullYear ( ) ;
const decade = 9 + Math . floor ( year / 10 ) * 10 ;
_date . setFullYear ( decade + 1 , 0 , 0 ) ;
_date . setHours ( 0 , 0 , 0 , 0 ) ;
return toDate ( _date , options == null ? void 0 : options . in ) ;
}
// node_modules/date-fns/lastDayOfWeek.js
function lastDayOfWeek ( date , options ) {
var _a , _b , _c , _d ;
2026-03-26 09:29:55 +00:00
const defaultOptions = getDefaultOptions ( ) ;
const weekStartsOn = ( options == null ? void 0 : options . weekStartsOn ) ? ? ( ( _b = ( _a = options == null ? void 0 : options . locale ) == null ? void 0 : _a . options ) == null ? void 0 : _b . weekStartsOn ) ? ? defaultOptions . weekStartsOn ? ? ( ( _d = ( _c = defaultOptions . locale ) == null ? void 0 : _c . options ) == null ? void 0 : _d . weekStartsOn ) ? ? 0 ;
2026-03-19 06:58:19 +00:00
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const day = _date . getDay ( ) ;
const diff = ( day < weekStartsOn ? - 7 : 0 ) + 6 - ( day - weekStartsOn ) ;
_date . setHours ( 0 , 0 , 0 , 0 ) ;
_date . setDate ( _date . getDate ( ) + diff ) ;
return _date ;
}
// node_modules/date-fns/lastDayOfISOWeek.js
function lastDayOfISOWeek ( date , options ) {
return lastDayOfWeek ( date , { ... options , weekStartsOn : 1 } ) ;
}
// node_modules/date-fns/lastDayOfISOWeekYear.js
function lastDayOfISOWeekYear ( date , options ) {
const year = getISOWeekYear ( date , options ) ;
const fourthOfJanuary = constructFrom ( ( options == null ? void 0 : options . in ) || date , 0 ) ;
fourthOfJanuary . setFullYear ( year + 1 , 0 , 4 ) ;
fourthOfJanuary . setHours ( 0 , 0 , 0 , 0 ) ;
const date _ = startOfISOWeek ( fourthOfJanuary , options ) ;
date _ . setDate ( date _ . getDate ( ) - 1 ) ;
return date _ ;
}
// node_modules/date-fns/lastDayOfQuarter.js
function lastDayOfQuarter ( date , options ) {
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
const currentMonth = date _ . getMonth ( ) ;
const month = currentMonth - currentMonth % 3 + 3 ;
date _ . setMonth ( month , 0 ) ;
date _ . setHours ( 0 , 0 , 0 , 0 ) ;
return date _ ;
}
// node_modules/date-fns/lastDayOfYear.js
function lastDayOfYear ( date , options ) {
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
const year = date _ . getFullYear ( ) ;
date _ . setFullYear ( year + 1 , 0 , 0 ) ;
date _ . setHours ( 0 , 0 , 0 , 0 ) ;
return date _ ;
}
// node_modules/date-fns/lightFormat.js
var formattingTokensRegExp3 = /(\w)\1*|''|'(''|[^'])+('|$)|./g ;
var escapedStringRegExp3 = /^'([^]*?)'?$/ ;
var doubleQuoteRegExp3 = /''/g ;
var unescapedLatinCharacterRegExp3 = /[a-zA-Z]/ ;
function lightFormat ( date , formatStr ) {
const date _ = toDate ( date ) ;
if ( ! isValid ( date _ ) ) {
throw new RangeError ( "Invalid time value" ) ;
}
const tokens = formatStr . match ( formattingTokensRegExp3 ) ;
if ( ! tokens ) return "" ;
const result = tokens . map ( ( substring ) => {
if ( substring === "''" ) {
return "'" ;
}
const firstCharacter = substring [ 0 ] ;
if ( firstCharacter === "'" ) {
return cleanEscapedString3 ( substring ) ;
}
const formatter = lightFormatters [ firstCharacter ] ;
if ( formatter ) {
return formatter ( date _ , substring ) ;
}
if ( firstCharacter . match ( unescapedLatinCharacterRegExp3 ) ) {
throw new RangeError (
"Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
) ;
}
return substring ;
} ) . join ( "" ) ;
return result ;
}
function cleanEscapedString3 ( input ) {
const matches = input . match ( escapedStringRegExp3 ) ;
if ( ! matches ) return input ;
return matches [ 1 ] . replace ( doubleQuoteRegExp3 , "'" ) ;
}
// node_modules/date-fns/milliseconds.js
function milliseconds ( {
years ,
months : months2 ,
weeks ,
days : days2 ,
hours ,
minutes ,
seconds
} ) {
let totalDays = 0 ;
if ( years ) totalDays += years * daysInYear ;
if ( months2 ) totalDays += months2 * ( daysInYear / 12 ) ;
if ( weeks ) totalDays += weeks * 7 ;
if ( days2 ) totalDays += days2 ;
let totalSeconds = totalDays * 24 * 60 * 60 ;
if ( hours ) totalSeconds += hours * 60 * 60 ;
if ( minutes ) totalSeconds += minutes * 60 ;
if ( seconds ) totalSeconds += seconds ;
return Math . trunc ( totalSeconds * 1e3 ) ;
}
// node_modules/date-fns/millisecondsToHours.js
function millisecondsToHours ( milliseconds2 ) {
const hours = milliseconds2 / millisecondsInHour ;
return Math . trunc ( hours ) ;
}
// node_modules/date-fns/millisecondsToMinutes.js
function millisecondsToMinutes ( milliseconds2 ) {
const minutes = milliseconds2 / millisecondsInMinute ;
return Math . trunc ( minutes ) ;
}
// node_modules/date-fns/millisecondsToSeconds.js
function millisecondsToSeconds ( milliseconds2 ) {
const seconds = milliseconds2 / millisecondsInSecond ;
return Math . trunc ( seconds ) ;
}
// node_modules/date-fns/minutesToHours.js
function minutesToHours ( minutes ) {
const hours = minutes / minutesInHour ;
return Math . trunc ( hours ) ;
}
// node_modules/date-fns/minutesToMilliseconds.js
function minutesToMilliseconds ( minutes ) {
return Math . trunc ( minutes * millisecondsInMinute ) ;
}
// node_modules/date-fns/minutesToSeconds.js
function minutesToSeconds ( minutes ) {
return Math . trunc ( minutes * secondsInMinute ) ;
}
// node_modules/date-fns/monthsToQuarters.js
function monthsToQuarters ( months2 ) {
const quarters = months2 / monthsInQuarter ;
return Math . trunc ( quarters ) ;
}
// node_modules/date-fns/monthsToYears.js
function monthsToYears ( months2 ) {
const years = months2 / monthsInYear ;
return Math . trunc ( years ) ;
}
// node_modules/date-fns/nextDay.js
function nextDay ( date , day , options ) {
let delta = day - getDay ( date , options ) ;
if ( delta <= 0 ) delta += 7 ;
return addDays ( date , delta , options ) ;
}
// node_modules/date-fns/nextFriday.js
function nextFriday ( date , options ) {
return nextDay ( date , 5 , options ) ;
}
// node_modules/date-fns/nextMonday.js
function nextMonday ( date , options ) {
return nextDay ( date , 1 , options ) ;
}
// node_modules/date-fns/nextSaturday.js
function nextSaturday ( date , options ) {
return nextDay ( date , 6 , options ) ;
}
// node_modules/date-fns/nextSunday.js
function nextSunday ( date , options ) {
return nextDay ( date , 0 , options ) ;
}
// node_modules/date-fns/nextThursday.js
function nextThursday ( date , options ) {
return nextDay ( date , 4 , options ) ;
}
// node_modules/date-fns/nextTuesday.js
function nextTuesday ( date , options ) {
return nextDay ( date , 2 , options ) ;
}
// node_modules/date-fns/nextWednesday.js
function nextWednesday ( date , options ) {
return nextDay ( date , 3 , options ) ;
}
// node_modules/date-fns/parseISO.js
function parseISO ( argument , options ) {
const invalidDate = ( ) => constructFrom ( options == null ? void 0 : options . in , NaN ) ;
const additionalDigits = ( options == null ? void 0 : options . additionalDigits ) ? ? 2 ;
const dateStrings = splitDateString ( argument ) ;
let date ;
if ( dateStrings . date ) {
const parseYearResult = parseYear ( dateStrings . date , additionalDigits ) ;
date = parseDate ( parseYearResult . restDateString , parseYearResult . year ) ;
}
if ( ! date || isNaN ( + date ) ) return invalidDate ( ) ;
const timestamp = + date ;
let time = 0 ;
let offset ;
if ( dateStrings . time ) {
time = parseTime ( dateStrings . time ) ;
if ( isNaN ( time ) ) return invalidDate ( ) ;
}
if ( dateStrings . timezone ) {
offset = parseTimezone ( dateStrings . timezone ) ;
if ( isNaN ( offset ) ) return invalidDate ( ) ;
} else {
const tmpDate = new Date ( timestamp + time ) ;
const result = toDate ( 0 , options == null ? void 0 : options . in ) ;
result . setFullYear (
tmpDate . getUTCFullYear ( ) ,
tmpDate . getUTCMonth ( ) ,
tmpDate . getUTCDate ( )
) ;
result . setHours (
tmpDate . getUTCHours ( ) ,
tmpDate . getUTCMinutes ( ) ,
tmpDate . getUTCSeconds ( ) ,
tmpDate . getUTCMilliseconds ( )
) ;
return result ;
}
return toDate ( timestamp + time + offset , options == null ? void 0 : options . in ) ;
}
var patterns = {
dateTimeDelimiter : /[T ]/ ,
timeZoneDelimiter : /[Z ]/i ,
timezone : /([Z+-].*)$/
} ;
var dateRegex = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/ ;
var timeRegex = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/ ;
var timezoneRegex = /^([+-])(\d{2})(?::?(\d{2}))?$/ ;
function splitDateString ( dateString ) {
const dateStrings = { } ;
const array = dateString . split ( patterns . dateTimeDelimiter ) ;
let timeString ;
if ( array . length > 2 ) {
return dateStrings ;
}
if ( /:/ . test ( array [ 0 ] ) ) {
timeString = array [ 0 ] ;
} else {
dateStrings . date = array [ 0 ] ;
timeString = array [ 1 ] ;
if ( patterns . timeZoneDelimiter . test ( dateStrings . date ) ) {
dateStrings . date = dateString . split ( patterns . timeZoneDelimiter ) [ 0 ] ;
timeString = dateString . substr (
dateStrings . date . length ,
dateString . length
) ;
}
}
if ( timeString ) {
const token = patterns . timezone . exec ( timeString ) ;
if ( token ) {
dateStrings . time = timeString . replace ( token [ 1 ] , "" ) ;
dateStrings . timezone = token [ 1 ] ;
} else {
dateStrings . time = timeString ;
}
}
return dateStrings ;
}
function parseYear ( dateString , additionalDigits ) {
const regex = new RegExp (
"^(?:(\\d{4}|[+-]\\d{" + ( 4 + additionalDigits ) + "})|(\\d{2}|[+-]\\d{" + ( 2 + additionalDigits ) + "})$)"
) ;
const captures = dateString . match ( regex ) ;
if ( ! captures ) return { year : NaN , restDateString : "" } ;
const year = captures [ 1 ] ? parseInt ( captures [ 1 ] ) : null ;
const century = captures [ 2 ] ? parseInt ( captures [ 2 ] ) : null ;
return {
year : century === null ? year : century * 100 ,
restDateString : dateString . slice ( ( captures [ 1 ] || captures [ 2 ] ) . length )
} ;
}
function parseDate ( dateString , year ) {
if ( year === null ) return /* @__PURE__ */ new Date ( NaN ) ;
const captures = dateString . match ( dateRegex ) ;
if ( ! captures ) return /* @__PURE__ */ new Date ( NaN ) ;
const isWeekDate = ! ! captures [ 4 ] ;
const dayOfYear = parseDateUnit ( captures [ 1 ] ) ;
const month = parseDateUnit ( captures [ 2 ] ) - 1 ;
const day = parseDateUnit ( captures [ 3 ] ) ;
const week = parseDateUnit ( captures [ 4 ] ) ;
const dayOfWeek = parseDateUnit ( captures [ 5 ] ) - 1 ;
if ( isWeekDate ) {
if ( ! validateWeekDate ( year , week , dayOfWeek ) ) {
return /* @__PURE__ */ new Date ( NaN ) ;
}
return dayOfISOWeekYear ( year , week , dayOfWeek ) ;
} else {
const date = /* @__PURE__ */ new Date ( 0 ) ;
if ( ! validateDate ( year , month , day ) || ! validateDayOfYearDate ( year , dayOfYear ) ) {
return /* @__PURE__ */ new Date ( NaN ) ;
}
date . setUTCFullYear ( year , month , Math . max ( dayOfYear , day ) ) ;
return date ;
}
}
function parseDateUnit ( value ) {
return value ? parseInt ( value ) : 1 ;
}
function parseTime ( timeString ) {
const captures = timeString . match ( timeRegex ) ;
if ( ! captures ) return NaN ;
const hours = parseTimeUnit ( captures [ 1 ] ) ;
const minutes = parseTimeUnit ( captures [ 2 ] ) ;
const seconds = parseTimeUnit ( captures [ 3 ] ) ;
if ( ! validateTime ( hours , minutes , seconds ) ) {
return NaN ;
}
return hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * 1e3 ;
}
function parseTimeUnit ( value ) {
return value && parseFloat ( value . replace ( "," , "." ) ) || 0 ;
}
function parseTimezone ( timezoneString ) {
if ( timezoneString === "Z" ) return 0 ;
const captures = timezoneString . match ( timezoneRegex ) ;
if ( ! captures ) return 0 ;
const sign = captures [ 1 ] === "+" ? - 1 : 1 ;
const hours = parseInt ( captures [ 2 ] ) ;
const minutes = captures [ 3 ] && parseInt ( captures [ 3 ] ) || 0 ;
if ( ! validateTimezone ( hours , minutes ) ) {
return NaN ;
}
return sign * ( hours * millisecondsInHour + minutes * millisecondsInMinute ) ;
}
function dayOfISOWeekYear ( isoWeekYear , week , day ) {
const date = /* @__PURE__ */ new Date ( 0 ) ;
date . setUTCFullYear ( isoWeekYear , 0 , 4 ) ;
const fourthOfJanuaryDay = date . getUTCDay ( ) || 7 ;
const diff = ( week - 1 ) * 7 + day + 1 - fourthOfJanuaryDay ;
date . setUTCDate ( date . getUTCDate ( ) + diff ) ;
return date ;
}
var daysInMonths = [ 31 , null , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31 ] ;
function isLeapYearIndex2 ( year ) {
return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0 ;
}
function validateDate ( year , month , date ) {
return month >= 0 && month <= 11 && date >= 1 && date <= ( daysInMonths [ month ] || ( isLeapYearIndex2 ( year ) ? 29 : 28 ) ) ;
}
function validateDayOfYearDate ( year , dayOfYear ) {
return dayOfYear >= 1 && dayOfYear <= ( isLeapYearIndex2 ( year ) ? 366 : 365 ) ;
}
function validateWeekDate ( _year , week , day ) {
return week >= 1 && week <= 53 && day >= 0 && day <= 6 ;
}
function validateTime ( hours , minutes , seconds ) {
if ( hours === 24 ) {
return minutes === 0 && seconds === 0 ;
}
return seconds >= 0 && seconds < 60 && minutes >= 0 && minutes < 60 && hours >= 0 && hours < 25 ;
}
function validateTimezone ( _hours , minutes ) {
return minutes >= 0 && minutes <= 59 ;
}
// node_modules/date-fns/parseJSON.js
function parseJSON ( dateStr , options ) {
const parts = dateStr . match (
/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/
) ;
if ( ! parts ) return toDate ( NaN , options == null ? void 0 : options . in ) ;
return toDate (
Date . UTC (
+ parts [ 1 ] ,
+ parts [ 2 ] - 1 ,
+ parts [ 3 ] ,
+ parts [ 4 ] - ( + parts [ 9 ] || 0 ) * ( parts [ 8 ] == "-" ? - 1 : 1 ) ,
+ parts [ 5 ] - ( + parts [ 10 ] || 0 ) * ( parts [ 8 ] == "-" ? - 1 : 1 ) ,
+ parts [ 6 ] ,
+ ( ( parts [ 7 ] || "0" ) + "00" ) . substring ( 0 , 3 )
) ,
options == null ? void 0 : options . in
) ;
}
// node_modules/date-fns/previousDay.js
function previousDay ( date , day , options ) {
let delta = getDay ( date , options ) - day ;
if ( delta <= 0 ) delta += 7 ;
return subDays ( date , delta , options ) ;
}
// node_modules/date-fns/previousFriday.js
function previousFriday ( date , options ) {
return previousDay ( date , 5 , options ) ;
}
// node_modules/date-fns/previousMonday.js
function previousMonday ( date , options ) {
return previousDay ( date , 1 , options ) ;
}
// node_modules/date-fns/previousSaturday.js
function previousSaturday ( date , options ) {
return previousDay ( date , 6 , options ) ;
}
// node_modules/date-fns/previousSunday.js
function previousSunday ( date , options ) {
return previousDay ( date , 0 , options ) ;
}
// node_modules/date-fns/previousThursday.js
function previousThursday ( date , options ) {
return previousDay ( date , 4 , options ) ;
}
// node_modules/date-fns/previousTuesday.js
function previousTuesday ( date , options ) {
return previousDay ( date , 2 , options ) ;
}
// node_modules/date-fns/previousWednesday.js
function previousWednesday ( date , options ) {
return previousDay ( date , 3 , options ) ;
}
// node_modules/date-fns/quartersToMonths.js
function quartersToMonths ( quarters ) {
return Math . trunc ( quarters * monthsInQuarter ) ;
}
// node_modules/date-fns/quartersToYears.js
function quartersToYears ( quarters ) {
const years = quarters / quartersInYear ;
return Math . trunc ( years ) ;
}
// node_modules/date-fns/roundToNearestHours.js
function roundToNearestHours ( date , options ) {
const nearestTo = ( options == null ? void 0 : options . nearestTo ) ? ? 1 ;
if ( nearestTo < 1 || nearestTo > 12 )
return constructFrom ( ( options == null ? void 0 : options . in ) || date , NaN ) ;
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
const fractionalMinutes = date _ . getMinutes ( ) / 60 ;
const fractionalSeconds = date _ . getSeconds ( ) / 60 / 60 ;
const fractionalMilliseconds = date _ . getMilliseconds ( ) / 1e3 / 60 / 60 ;
const hours = date _ . getHours ( ) + fractionalMinutes + fractionalSeconds + fractionalMilliseconds ;
const method = ( options == null ? void 0 : options . roundingMethod ) ? ? "round" ;
const roundingMethod = getRoundingMethod ( method ) ;
const roundedHours = roundingMethod ( hours / nearestTo ) * nearestTo ;
date _ . setHours ( roundedHours , 0 , 0 , 0 ) ;
return date _ ;
}
// node_modules/date-fns/roundToNearestMinutes.js
function roundToNearestMinutes ( date , options ) {
const nearestTo = ( options == null ? void 0 : options . nearestTo ) ? ? 1 ;
if ( nearestTo < 1 || nearestTo > 30 ) return constructFrom ( date , NaN ) ;
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
const fractionalSeconds = date _ . getSeconds ( ) / 60 ;
const fractionalMilliseconds = date _ . getMilliseconds ( ) / 1e3 / 60 ;
const minutes = date _ . getMinutes ( ) + fractionalSeconds + fractionalMilliseconds ;
const method = ( options == null ? void 0 : options . roundingMethod ) ? ? "round" ;
const roundingMethod = getRoundingMethod ( method ) ;
const roundedMinutes = roundingMethod ( minutes / nearestTo ) * nearestTo ;
date _ . setMinutes ( roundedMinutes , 0 , 0 ) ;
return date _ ;
}
// node_modules/date-fns/secondsToHours.js
function secondsToHours ( seconds ) {
const hours = seconds / secondsInHour ;
return Math . trunc ( hours ) ;
}
// node_modules/date-fns/secondsToMilliseconds.js
function secondsToMilliseconds ( seconds ) {
return seconds * millisecondsInSecond ;
}
// node_modules/date-fns/secondsToMinutes.js
function secondsToMinutes ( seconds ) {
const minutes = seconds / secondsInMinute ;
return Math . trunc ( minutes ) ;
}
// node_modules/date-fns/setMonth.js
function setMonth ( date , month , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const year = _date . getFullYear ( ) ;
const day = _date . getDate ( ) ;
const midMonth = constructFrom ( ( options == null ? void 0 : options . in ) || date , 0 ) ;
midMonth . setFullYear ( year , month , 15 ) ;
midMonth . setHours ( 0 , 0 , 0 , 0 ) ;
const daysInMonth = getDaysInMonth ( midMonth ) ;
_date . setMonth ( month , Math . min ( day , daysInMonth ) ) ;
return _date ;
}
// node_modules/date-fns/set.js
function set ( date , values , options ) {
let _date = toDate ( date , options == null ? void 0 : options . in ) ;
if ( isNaN ( + _date ) ) return constructFrom ( ( options == null ? void 0 : options . in ) || date , NaN ) ;
if ( values . year != null ) _date . setFullYear ( values . year ) ;
if ( values . month != null ) _date = setMonth ( _date , values . month ) ;
if ( values . date != null ) _date . setDate ( values . date ) ;
if ( values . hours != null ) _date . setHours ( values . hours ) ;
if ( values . minutes != null ) _date . setMinutes ( values . minutes ) ;
if ( values . seconds != null ) _date . setSeconds ( values . seconds ) ;
if ( values . milliseconds != null ) _date . setMilliseconds ( values . milliseconds ) ;
return _date ;
}
// node_modules/date-fns/setDate.js
function setDate ( date , dayOfMonth , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
_date . setDate ( dayOfMonth ) ;
return _date ;
}
// node_modules/date-fns/setDayOfYear.js
function setDayOfYear ( date , dayOfYear , options ) {
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
date _ . setMonth ( 0 ) ;
date _ . setDate ( dayOfYear ) ;
return date _ ;
}
// node_modules/date-fns/setDefaultOptions.js
function setDefaultOptions2 ( options ) {
const result = { } ;
2026-03-26 09:29:55 +00:00
const defaultOptions = getDefaultOptions ( ) ;
for ( const property in defaultOptions ) {
if ( Object . prototype . hasOwnProperty . call ( defaultOptions , property ) ) {
result [ property ] = defaultOptions [ property ] ;
2026-03-19 06:58:19 +00:00
}
}
for ( const property in options ) {
if ( Object . prototype . hasOwnProperty . call ( options , property ) ) {
if ( options [ property ] === void 0 ) {
delete result [ property ] ;
} else {
result [ property ] = options [ property ] ;
}
}
}
setDefaultOptions ( result ) ;
}
// node_modules/date-fns/setHours.js
function setHours ( date , hours , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
_date . setHours ( hours ) ;
return _date ;
}
// node_modules/date-fns/setMilliseconds.js
function setMilliseconds ( date , milliseconds2 , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
_date . setMilliseconds ( milliseconds2 ) ;
return _date ;
}
// node_modules/date-fns/setMinutes.js
function setMinutes ( date , minutes , options ) {
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
date _ . setMinutes ( minutes ) ;
return date _ ;
}
// node_modules/date-fns/setQuarter.js
function setQuarter ( date , quarter , options ) {
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
const oldQuarter = Math . trunc ( date _ . getMonth ( ) / 3 ) + 1 ;
const diff = quarter - oldQuarter ;
return setMonth ( date _ , date _ . getMonth ( ) + diff * 3 ) ;
}
// node_modules/date-fns/setSeconds.js
function setSeconds ( date , seconds , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
_date . setSeconds ( seconds ) ;
return _date ;
}
// node_modules/date-fns/setWeekYear.js
function setWeekYear ( date , weekYear , options ) {
var _a , _b , _c , _d ;
2026-03-26 09:29:55 +00:00
const defaultOptions = getDefaultOptions ( ) ;
const firstWeekContainsDate = ( options == null ? void 0 : options . firstWeekContainsDate ) ? ? ( ( _b = ( _a = options == null ? void 0 : options . locale ) == null ? void 0 : _a . options ) == null ? void 0 : _b . firstWeekContainsDate ) ? ? defaultOptions . firstWeekContainsDate ? ? ( ( _d = ( _c = defaultOptions . locale ) == null ? void 0 : _c . options ) == null ? void 0 : _d . firstWeekContainsDate ) ? ? 1 ;
2026-03-19 06:58:19 +00:00
const diff = differenceInCalendarDays (
toDate ( date , options == null ? void 0 : options . in ) ,
startOfWeekYear ( date , options ) ,
options
) ;
const firstWeek = constructFrom ( ( options == null ? void 0 : options . in ) || date , 0 ) ;
firstWeek . setFullYear ( weekYear , 0 , firstWeekContainsDate ) ;
firstWeek . setHours ( 0 , 0 , 0 , 0 ) ;
const date _ = startOfWeekYear ( firstWeek , options ) ;
date _ . setDate ( date _ . getDate ( ) + diff ) ;
return date _ ;
}
// node_modules/date-fns/setYear.js
function setYear ( date , year , options ) {
const date _ = toDate ( date , options == null ? void 0 : options . in ) ;
if ( isNaN ( + date _ ) ) return constructFrom ( ( options == null ? void 0 : options . in ) || date , NaN ) ;
date _ . setFullYear ( year ) ;
return date _ ;
}
// node_modules/date-fns/startOfDecade.js
function startOfDecade ( date , options ) {
const _date = toDate ( date , options == null ? void 0 : options . in ) ;
const year = _date . getFullYear ( ) ;
const decade = Math . floor ( year / 10 ) * 10 ;
_date . setFullYear ( decade , 0 , 1 ) ;
_date . setHours ( 0 , 0 , 0 , 0 ) ;
return _date ;
}
// node_modules/date-fns/startOfToday.js
function startOfToday ( options ) {
return startOfDay ( Date . now ( ) , options ) ;
}
// node_modules/date-fns/startOfTomorrow.js
function startOfTomorrow ( options ) {
const now = constructNow ( options == null ? void 0 : options . in ) ;
const year = now . getFullYear ( ) ;
const month = now . getMonth ( ) ;
const day = now . getDate ( ) ;
const date = constructFrom ( options == null ? void 0 : options . in , 0 ) ;
date . setFullYear ( year , month , day + 1 ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return date ;
}
// node_modules/date-fns/startOfYesterday.js
function startOfYesterday ( options ) {
const now = constructNow ( options == null ? void 0 : options . in ) ;
const year = now . getFullYear ( ) ;
const month = now . getMonth ( ) ;
const day = now . getDate ( ) ;
const date = constructNow ( options == null ? void 0 : options . in ) ;
date . setFullYear ( year , month , day - 1 ) ;
date . setHours ( 0 , 0 , 0 , 0 ) ;
return date ;
}
// node_modules/date-fns/subMonths.js
function subMonths ( date , amount , options ) {
return addMonths ( date , - amount , options ) ;
}
// node_modules/date-fns/sub.js
function sub ( date , duration , options ) {
const {
years = 0 ,
months : months2 = 0 ,
weeks = 0 ,
days : days2 = 0 ,
hours = 0 ,
minutes = 0 ,
seconds = 0
} = duration ;
const withoutMonths = subMonths ( date , months2 + years * 12 , options ) ;
const withoutDays = subDays ( withoutMonths , days2 + weeks * 7 , options ) ;
const minutesToSub = minutes + hours * 60 ;
const secondsToSub = seconds + minutesToSub * 60 ;
const msToSub = secondsToSub * 1e3 ;
return constructFrom ( ( options == null ? void 0 : options . in ) || date , + withoutDays - msToSub ) ;
}
// node_modules/date-fns/subBusinessDays.js
function subBusinessDays ( date , amount , options ) {
return addBusinessDays ( date , - amount , options ) ;
}
// node_modules/date-fns/subHours.js
function subHours ( date , amount , options ) {
return addHours ( date , - amount , options ) ;
}
// node_modules/date-fns/subMilliseconds.js
function subMilliseconds ( date , amount , options ) {
return addMilliseconds ( date , - amount , options ) ;
}
// node_modules/date-fns/subMinutes.js
function subMinutes ( date , amount , options ) {
return addMinutes ( date , - amount , options ) ;
}
// node_modules/date-fns/subQuarters.js
function subQuarters ( date , amount , options ) {
return addQuarters ( date , - amount , options ) ;
}
// node_modules/date-fns/subSeconds.js
function subSeconds ( date , amount , options ) {
return addSeconds ( date , - amount , options ) ;
}
// node_modules/date-fns/subWeeks.js
function subWeeks ( date , amount , options ) {
return addWeeks ( date , - amount , options ) ;
}
// node_modules/date-fns/subYears.js
function subYears ( date , amount , options ) {
return addYears ( date , - amount , options ) ;
}
// node_modules/date-fns/weeksToDays.js
function weeksToDays ( weeks ) {
return Math . trunc ( weeks * daysInWeek ) ;
}
// node_modules/date-fns/yearsToDays.js
function yearsToDays ( years ) {
return Math . trunc ( years * daysInYear ) ;
}
// node_modules/date-fns/yearsToMonths.js
function yearsToMonths ( years ) {
return Math . trunc ( years * monthsInYear ) ;
}
// node_modules/date-fns/yearsToQuarters.js
function yearsToQuarters ( years ) {
return Math . trunc ( years * quartersInYear ) ;
}
export {
add ,
addBusinessDays ,
addDays ,
addHours ,
addISOWeekYears ,
addMilliseconds ,
addMinutes ,
addMonths ,
addQuarters ,
addSeconds ,
addWeeks ,
addYears ,
areIntervalsOverlapping ,
clamp ,
closestIndexTo ,
closestTo ,
compareAsc ,
compareDesc ,
constructFrom ,
constructNow ,
daysToWeeks ,
differenceInBusinessDays ,
differenceInCalendarDays ,
differenceInCalendarISOWeekYears ,
differenceInCalendarISOWeeks ,
differenceInCalendarMonths ,
differenceInCalendarQuarters ,
differenceInCalendarWeeks ,
differenceInCalendarYears ,
differenceInDays ,
differenceInHours ,
differenceInISOWeekYears ,
differenceInMilliseconds ,
differenceInMinutes ,
differenceInMonths ,
differenceInQuarters ,
differenceInSeconds ,
differenceInWeeks ,
differenceInYears ,
eachDayOfInterval ,
eachHourOfInterval ,
eachMinuteOfInterval ,
eachMonthOfInterval ,
eachQuarterOfInterval ,
eachWeekOfInterval ,
eachWeekendOfInterval ,
eachWeekendOfMonth ,
eachWeekendOfYear ,
eachYearOfInterval ,
endOfDay ,
endOfDecade ,
endOfHour ,
endOfISOWeek ,
endOfISOWeekYear ,
endOfMinute ,
endOfMonth ,
endOfQuarter ,
endOfSecond ,
endOfToday ,
endOfTomorrow ,
endOfWeek ,
endOfYear ,
endOfYesterday ,
format ,
format as formatDate ,
2026-03-26 09:29:55 +00:00
formatDistance ,
2026-03-19 06:58:19 +00:00
formatDistanceStrict ,
formatDistanceToNow ,
formatDistanceToNowStrict ,
formatDuration ,
formatISO ,
formatISO9075 ,
formatISODuration ,
formatRFC3339 ,
formatRFC7231 ,
2026-03-26 09:29:55 +00:00
formatRelative ,
2026-03-19 06:58:19 +00:00
formatters ,
fromUnixTime ,
getDate ,
getDay ,
getDayOfYear ,
getDaysInMonth ,
getDaysInYear ,
getDecade ,
getDefaultOptions2 as getDefaultOptions ,
getHours ,
getISODay ,
getISOWeek ,
getISOWeekYear ,
getISOWeeksInYear ,
getMilliseconds ,
getMinutes ,
getMonth ,
getOverlappingDaysInIntervals ,
getQuarter ,
getSeconds ,
getTime ,
getUnixTime ,
getWeek ,
getWeekOfMonth ,
getWeekYear ,
getWeeksInMonth ,
getYear ,
hoursToMilliseconds ,
hoursToMinutes ,
hoursToSeconds ,
interval ,
intervalToDuration ,
intlFormat ,
intlFormatDistance ,
isAfter ,
isBefore ,
isDate ,
isEqual ,
isExists ,
isFirstDayOfMonth ,
isFriday ,
isFuture ,
isLastDayOfMonth ,
isLeapYear ,
isMatch ,
isMonday ,
isPast ,
isSameDay ,
isSameHour ,
isSameISOWeek ,
isSameISOWeekYear ,
isSameMinute ,
isSameMonth ,
isSameQuarter ,
isSameSecond ,
isSameWeek ,
isSameYear ,
isSaturday ,
isSunday ,
isThisHour ,
isThisISOWeek ,
isThisMinute ,
isThisMonth ,
isThisQuarter ,
isThisSecond ,
isThisWeek ,
isThisYear ,
isThursday ,
isToday ,
isTomorrow ,
isTuesday ,
isValid ,
isWednesday ,
isWeekend ,
isWithinInterval ,
isYesterday ,
lastDayOfDecade ,
lastDayOfISOWeek ,
lastDayOfISOWeekYear ,
lastDayOfMonth ,
lastDayOfQuarter ,
lastDayOfWeek ,
lastDayOfYear ,
lightFormat ,
lightFormatters ,
longFormatters ,
max ,
milliseconds ,
millisecondsToHours ,
millisecondsToMinutes ,
millisecondsToSeconds ,
min ,
minutesToHours ,
minutesToMilliseconds ,
minutesToSeconds ,
monthsToQuarters ,
monthsToYears ,
nextDay ,
nextFriday ,
nextMonday ,
nextSaturday ,
nextSunday ,
nextThursday ,
nextTuesday ,
nextWednesday ,
parse ,
parseISO ,
parseJSON ,
parsers ,
previousDay ,
previousFriday ,
previousMonday ,
previousSaturday ,
previousSunday ,
previousThursday ,
previousTuesday ,
previousWednesday ,
quartersToMonths ,
quartersToYears ,
roundToNearestHours ,
roundToNearestMinutes ,
secondsToHours ,
secondsToMilliseconds ,
secondsToMinutes ,
set ,
setDate ,
setDay ,
setDayOfYear ,
setDefaultOptions2 as setDefaultOptions ,
setHours ,
setISODay ,
setISOWeek ,
setISOWeekYear ,
setMilliseconds ,
setMinutes ,
setMonth ,
setQuarter ,
setSeconds ,
setWeek ,
setWeekYear ,
setYear ,
startOfDay ,
startOfDecade ,
startOfHour ,
startOfISOWeek ,
startOfISOWeekYear ,
startOfMinute ,
startOfMonth ,
startOfQuarter ,
startOfSecond ,
startOfToday ,
startOfTomorrow ,
startOfWeek ,
startOfWeekYear ,
startOfYear ,
startOfYesterday ,
sub ,
subBusinessDays ,
subDays ,
subHours ,
subISOWeekYears ,
subMilliseconds ,
subMinutes ,
subMonths ,
subQuarters ,
subSeconds ,
subWeeks ,
subYears ,
toDate ,
transpose ,
weeksToDays ,
yearsToDays ,
yearsToMonths ,
yearsToQuarters
} ;
//# sourceMappingURL=date-fns.js.map