function _array_like_to_array(arr, len) {
    if (len == null || len > arr.length) len = arr.length;
    for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
    return arr2;
}
function _array_with_holes(arr) {
    if (Array.isArray(arr)) return arr;
}
function _iterable_to_array(iter) {
    if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}
function _non_iterable_rest() {
    throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _to_array(arr) {
    return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
}
function _unsupported_iterable_to_array(o, minLen) {
    if (!o) return;
    if (typeof o === "string") return _array_like_to_array(o, minLen);
    var n = Object.prototype.toString.call(o).slice(8, -1);
    if (n === "Object" && o.constructor) n = o.constructor.name;
    if (n === "Map" || n === "Set") return Array.from(n);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
}
var LOCALES = {
    ru: 'ru-RU',
    en: 'en-US'
};
export var MONTHS = Array.from({
    length: 12
}, function(_, i) {
    return i + 1;
});
var WEEKS = Array.from({
    length: 7
}, function(_, i) {
    return i + 1;
});
var callbackDayFormatter = function callbackDayFormatter(locale, options) {
    var dateFormatter = new Intl.DateTimeFormat(LOCALES[locale], options);
    return function(index) {
        // INFO: Start for monday
        var day = new Date(Date.UTC(2024, 0, index));
        var _dateFormatter_format = _to_array(dateFormatter.format(day)), first = _dateFormatter_format[0], rest = _dateFormatter_format.slice(1);
        return first.toUpperCase() + rest.join('');
    };
};
var callbackMonthFormatter = function callbackMonthFormatter(locale, options) {
    var dateFormatter = new Intl.DateTimeFormat(LOCALES[locale], options);
    return function(month) {
        var data = new Date(Date.UTC(2024, month - 1));
        var _dateFormatter_format = _to_array(dateFormatter.format(data)), first = _dateFormatter_format[0], rest = _dateFormatter_format.slice(1);
        return first.toUpperCase() + rest.join('').replace('.', '');
    };
};
export var ROW_STEP = 6;
export var ROW_MONTH_STEP = 4;
export var ROW_YEAR_STEP = 4;
export var ROW_QUARTER_STEP = 2;
export var YEAR_RENDER_COUNT = 12;
export var offsetMap = {
    Days: ROW_STEP,
    Months: ROW_MONTH_STEP,
    Years: ROW_YEAR_STEP,
    Quarters: ROW_QUARTER_STEP
};
export var QUARTER_NAMES = [
    'Q1',
    'Q2',
    'Q3',
    'Q4'
];
export var quarterDates = {
    Q1: {
        monthIndex: 0,
        day: 1
    },
    Q2: {
        monthIndex: 3,
        day: 1
    },
    Q3: {
        monthIndex: 6,
        day: 1
    },
    Q4: {
        monthIndex: 9,
        day: 1
    }
};
export var SHORT_DAY_NAMES = {
    ru: WEEKS.map(callbackDayFormatter('ru', {
        weekday: 'short'
    })),
    en: WEEKS.map(callbackDayFormatter('en', {
        weekday: 'short'
    }))
};
export var FULL_DAY_NAMES = {
    ru: {
        Пн: 'Понедельник',
        Вт: 'Вторник',
        Ср: 'Среда',
        Чт: 'Четверг',
        Пт: 'Пятница',
        Сб: 'Суббота',
        Вс: 'Воскресенье'
    },
    en: {
        Mon: 'Monday',
        Tue: 'Tuesday',
        Wed: 'Wednesday',
        Thu: 'Thursday',
        Fri: 'Friday',
        Sat: 'Saturday',
        Sun: 'Sunday'
    }
};
export var SHORT_MONTH_NAME = {
    ru: MONTHS.map(callbackMonthFormatter('ru', {
        month: 'short'
    })),
    en: MONTHS.map(callbackMonthFormatter('en', {
        month: 'short'
    }))
};
export var MONTH_NAMES = {
    ru: MONTHS.map(callbackMonthFormatter('ru', {
        month: 'long'
    })),
    en: MONTHS.map(callbackMonthFormatter('en', {
        month: 'long'
    }))
};
export var I18N = {
    next: {
        ru: 'Следующий',
        en: 'Next'
    },
    previous: {
        ru: 'Предыдущий',
        en: 'Previous'
    },
    selectDate: {
        ru: 'Выбор даты',
        en: 'Date selection'
    },
    navigationByShift: {
        ru: 'Для навигации только по доступным датам удерживайте клавишу Shift.',
        en: 'To navigate exclusively among the available dates, hold down the Shift key.'
    },
    year: {
        ru: 'год',
        en: 'year'
    },
    period: {
        ru: 'период',
        en: 'period'
    },
    month: {
        ru: 'месяц',
        en: 'month'
    }
};
