"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IntervalUnitSecondFactors = exports.IntervalExpressionValidationRegex = exports.IntervalUnitRegexes = exports.IntervalUnitDescArray = exports.IntervalUnitArray = void 0;
const at_parts_1 = require("../at-parts");
exports.IntervalUnitArray = ['ms', 's', 'm', 'h', 'D', 'W', 'M', 'Y'];
exports.IntervalUnitDescArray = exports.IntervalUnitArray.slice().reverse();
exports.IntervalUnitRegexes = {};
exports.IntervalExpressionValidationRegex = /[^\d+(ms|s|m|h|D|W|M|Y)]/g;
exports.IntervalUnitArray.forEach((unit) => {
    exports.IntervalUnitRegexes[unit] = new RegExp('([0-9]+)' + unit + '($|[0-9])');
});
exports.IntervalUnitSecondFactors = {
    Y: at_parts_1.YearTo.seconds,
    M: at_parts_1.MonthTo.seconds,
    W: at_parts_1.WeekTo.seconds,
    D: at_parts_1.DayTo.seconds,
    h: at_parts_1.HourTo.seconds,
    m: at_parts_1.MinuteTo.seconds,
    s: 1,
    ms: 0.001
};
