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OAAOT,EAGX,MAAMU,EAyBV,SAAyBR,EAAgBb,GACrC,OAAQa,GACJ,IAAK,MACL,IAAK,UACD,OAAOb,EAAUnV,SACrB,IAAK,QACD,OAAOmV,EAAUjU,WACrB,QACI,MAAM,IAAIoQ,MAAM,uCAAD/X,OAAwCyc,IAEnE,CAnCwBS,CAAgBT,EAAgBb,GAC9Ce,EAAwC,QAAhCH,EAAGQ,EAAiBC,UAAY,IAAAT,EAAAA,EAAI/P,EAClD,OAAA1L,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,GACOwb,GAAU,IACb9P,MAAOkQ,GAEf,C,4CC7KA,MAAMQ,EAAgB,QAiFtB,SAASC,EAAeC,GACpB,OAAQA,GAAOA,EAAIpP,QAAQ,SAAU,IAAIA,QAAQ,KAAM,MAAS,IACpE,CAKA,SAAShC,EAAU5F,GACf,OAAI1E,MAAMuE,QAAQG,GACP+W,EAAe/W,EAAO,KAAO8W,EAEjCC,EAAe/W,IAAW8W,CACrC,CAKA,MAAM7Q,EAAmBxI,GAEhBA,EAIe,kBAATA,EACA,IAAI2B,KAAK,IAAIA,KAAK3B,IAEtB,IAAI2B,KAAK3B,GANL,IAAI2B,I","sources":["../../../node_modules/@tesla/design-system/dist/components/indicator/indicator.js","../../../node_modules/@tesla/design-system-react/dist/indicator/indicator.js","../../../node_modules/@tesla/design-system/dist/components/indicator-group/indicator-group.js","../../../node_modules/@tesla/design-system-react/dist/indicator-group/indicator-group.js","../../../node_modules/@tesla/design-system-react/dist/date-picker/day.js","../../../node_modules/@tesla/design-system-react/dist/date-picker/days-of-week.js","../../../node_modules/@tesla/design-system-react/dist/date-picker/utils/is-enabled-date.js","../../../node_modules/@tesla/design-system-react/dist/date-picker/month-header.js","../../../node_modules/@tesla/design-system-react/dist/date-picker/utils/date-to-iso-date-string.js","../../../node_modules/@tesla/design-system-react/dist/date-picker/utils/get-date-picker-date.js","../../../node_modules/@tesla/design-system-react/dist/date-picker/utils/is-same-utc-date.js","../../../node_modules/@tesla/design-system-react/dist/date-picker/utils/is-date-not-within-range.js","../../../node_modules/@tesla/design-system-react/dist/date-picker/utils/is-iso-date-string.js","../../../node_modules/@tesla/design-system-react/dist/form-feedback/form-feedback.js","../../../node_modules/@tesla/design-system-react/dist/date-picker/utils/is-date-selected.js","../../../node_modules/@tesla/design-system-react/dist/date-picker/date-picker.js","../../../node_modules/@tesla/design-system-react/dist/hooks/use-calendar-grid.js","../../../node_modules/@tesla/intl-date-time/dist/data/placeholder.js","../../../node_modules/@tesla/intl-date-time/dist/lib/get-date-time-parts/get-date-time-parts.js","../../../node_modules/@tesla/intl-date-time/dist/lib/get-placeholder/get-placeholder.js","../../../node_modules/@tesla/design-system-react/dist/form-input-date/manual-entry-utils.js","../../../node_modules/@tesla/intl-date-time/dist/lib/get-days-in-month/get-days-in-month.js","../../../node_modules/@tesla/design-system-react/dist/form-input-date/form-input-date.js","../../../node_modules/@tesla/design-system-react/dist/form-input-option-group/form-input-option-group.js","../../../node_modules/@tesla/design-system-react/dist/form-input-option/form-input-option.js","../../../node_modules/@tesla/design-system-react/dist/form-input-select/form-input-select.js","../../../node_modules/@tesla/design-system-react/dist/form-input-textarea/form-input-textarea.js","../../../node_modules/@tesla/design-system-react/dist/form-label/form-label.js","../../../node_modules/@tesla/design-system-react/node_modules/@tesla/design-system-icons/dist/partials/icon-calendar.js","../../../node_modules/@tesla/design-system/dist/components/date-picker/date-picker.js","../../../node_modules/@tesla/intl-date-time/dist/lib/get-default-options/get-default-options.js","../../../node_modules/@tesla/intl-date-time/dist/data/default-date-options.js","../../../node_modules/@tesla/intl-date-time/dist/data/default-date-time-options.js","../../../node_modules/@tesla/intl-date-time/dist/data/default-day-options.js","../../../node_modules/@tesla/intl-date-time/dist/data/default-month-options.js","../../../node_modules/@tesla/intl-date-time/dist/data/default-time-options.js","../../../node_modules/@tesla/intl-date-time/dist/data/default-weekday-options.js","../../../node_modules/@tesla/intl-date-time/dist/data/default-year-options.js","../../../node_modules/@tesla/intl-date-time/dist/data/format-overrides.js","../../../node_modules/@tesla/intl-date-time/dist/lib/intl-date-time/date-time-format.js","../../../node_modules/@tesla/intl-date-time/dist/lib/shared-utils.js"],"sourcesContent":["import { setAttributes } from \"../../utilities/index.js\";\nfunction calculateIndicatorSvgAttributes() {\n const diameter = 24;\n const radius = diameter / 2;\n return {\n // `circle` refers to the circle child node of the svg node\n circle: {\n cx: radius,\n cy: radius,\n r: radius\n },\n // `container` refers to the svg node\n container: {\n viewBox: `0 0 ${diameter} ${diameter}`\n }\n };\n}\nfunction initIndicators() {\n const xmlns = \"http://www.w3.org/2000/svg\";\n const indicators = Array.from(document.querySelectorAll(\".tds-indicator\"));\n const singleIndicators = indicators.filter(\n (indicator) => !indicator.parentElement?.classList?.contains(\"tds-indicator-group\")\n );\n singleIndicators.forEach((indicator) => {\n const { circle: circleAttrs, container: containerAttrs } = calculateIndicatorSvgAttributes();\n setAttributes(indicator, containerAttrs);\n const circle = document.createElementNS(xmlns, \"circle\");\n circle.setAttribute(\"fill\", \"var(--tds-status-color--background-color)\");\n setAttributes(circle, circleAttrs);\n indicator.append(circle);\n });\n}\nexport {\n calculateIndicatorSvgAttributes,\n initIndicators\n};\n","import cx from 'classnames';\nimport React from 'react';\nimport { calculateIndicatorSvgAttributes } from '@tesla/design-system';\nexport const Indicator = ({ 'aria-label': ariaLabel, bright, circleProps = {}, className, color, label, size, ...rest }) => {\n const svgAttributes = calculateIndicatorSvgAttributes();\n return (React.createElement(\"svg\", { \"aria-label\": ariaLabel || label, className: cx('tds-indicator', {\n [`tds-indicator--${size}`]: !!size,\n [`tds-status-color--${color}`]: bright,\n [`tds-status-color--${color}-pastel`]: !bright,\n }, className), xmlns: \"http://www.w3.org/2000/svg\", ...svgAttributes.container, ...rest },\n React.createElement(\"circle\", { fill: \"var(--tds-status-color--background-color)\", ...svgAttributes.circle, ...circleProps })));\n};\n","import { setAttributes } from \"../../utilities/index.js\";\nfunction calculateIndicatorGroupSvgAttributes({\n id,\n isRtl,\n numIndicators,\n overlapIndicators\n}) {\n const diameter = 24;\n const maskDiameter = 30;\n const radius = diameter / 2;\n const circleOffset = overlapIndicators ? -3 : 6;\n const maskRadius = maskDiameter / 2;\n const maskRadiusDiff = maskRadius - radius;\n const groupWidth = numIndicators * diameter - (numIndicators - 1) * -circleOffset;\n const iterable = Array.from(new Array(numIndicators));\n return {\n // `container` refers to the svg node\n container: {\n viewBox: `0 0 ${groupWidth} ${diameter}`\n },\n // the number of `indicator` svgs corresponds with the value of `numIndicators`\n indicators: iterable.map((_, i) => ({\n // `circle` refers to the circle node inside the indicator svg\n circle: {\n cx: isRtl ? (numIndicators - i) * diameter + (numIndicators - 1 - i) * circleOffset - radius : (i + 1) * diameter + i * circleOffset - radius,\n cy: radius,\n r: radius\n },\n container: {\n mask: `url(#mask-${id}-${i})`,\n viewBox: void 0\n // Override any viewBox attribute set on the individual indicator\n }\n })),\n // there will be one `mask` definition for each `indicator`,\n // which controls what is shown and hidden for its corresponding indicator svg\n masks: iterable.map((_, i) => ({\n container: {\n id: `mask-${id}-${i}`\n },\n // `rectHidden` refers to a circular mask (#000) which is placed concentrically with the circle next to this one,\n // such that it looks like a transparent stroke for that circle overlaid this circle\n rectHidden: circleOffset < 0 && i !== numIndicators - 1 ? {\n height: maskDiameter,\n rx: maskRadius,\n width: maskDiameter,\n x: isRtl ? (numIndicators - i - 1) * (diameter + circleOffset) - diameter - circleOffset - maskRadiusDiff : i * (diameter + circleOffset) + diameter + circleOffset - maskRadiusDiff,\n y: (maskRadius - radius) * -1\n } : void 0,\n // `rectVisible` refers to a circular mask (#fff) placed on top of this circle, through which this circle is visible\n rectVisible: {\n height: diameter,\n width: diameter,\n x: isRtl ? (numIndicators - 1 - i) * (diameter + circleOffset) : i * (diameter + circleOffset)\n }\n }))\n };\n}\nfunction initIndicatorGroups() {\n const xmlns = \"http://www.w3.org/2000/svg\";\n const indicatorGroups = Array.from(document.querySelectorAll(\".tds-indicator-group\"));\n indicatorGroups.forEach((indicatorGroup) => {\n const id = indicatorGroup.id;\n if (!id) {\n console.warn(\n \"Every tds-indicator-group should have a unique `id` attribute to prevent collisions. Without an `id` you may notice issues with rendering.\"\n );\n }\n const isRtl = getComputedStyle(indicatorGroup).direction === \"rtl\";\n const overlapIndicators = indicatorGroup.classList.contains(\"tds-indicator-group--overlap\");\n const indicators = Array.from(indicatorGroup.querySelectorAll(\".tds-indicator\"));\n const svgAttributes = calculateIndicatorGroupSvgAttributes({\n id,\n isRtl,\n numIndicators: indicators.length,\n overlapIndicators\n });\n setAttributes(indicatorGroup, svgAttributes.container);\n const defs = document.createElementNS(xmlns, \"defs\");\n indicators.forEach((indicator, i) => {\n const containerAttrs = svgAttributes.indicators[i]?.container;\n const circleAttrs = svgAttributes.indicators[i]?.circle;\n const maskAttrs = svgAttributes.masks[i]?.container;\n const rectVisibleAttrs = svgAttributes.masks[i]?.rectVisible;\n const rectHiddenAttrs = svgAttributes.masks[i]?.rectHidden;\n setAttributes(indicator, containerAttrs);\n const mask = document.createElementNS(xmlns, \"mask\");\n setAttributes(mask, maskAttrs);\n const rectVisible = document.createElementNS(xmlns, \"rect\");\n rectVisible.setAttribute(\"fill\", \"#fff\");\n setAttributes(rectVisible, rectVisibleAttrs);\n mask.append(rectVisible);\n if (rectHiddenAttrs) {\n const rectHidden = document.createElementNS(xmlns, \"rect\");\n rectHidden.setAttribute(\"fill\", \"#000\");\n setAttributes(rectHidden, rectHiddenAttrs);\n mask.append(rectHidden);\n }\n defs.append(mask);\n const circle = document.createElementNS(xmlns, \"circle\");\n circle.setAttribute(\"fill\", \"var(--tds-status-color--background-color)\");\n setAttributes(circle, circleAttrs);\n indicator.append(circle);\n });\n indicatorGroup.prepend(defs);\n });\n}\nexport {\n calculateIndicatorGroupSvgAttributes,\n initIndicatorGroups\n};\n","import cx from 'classnames';\nimport React from 'react';\nimport { Indicator } from '../indicator/index.js';\nimport { calculateIndicatorGroupSvgAttributes } from '@tesla/design-system';\nimport { useId } from '../index.js';\nexport const IndicatorGroup = ({ className, dir, indicators, indicatorSize, overlap = false, ...rest }) => {\n const uid = useId();\n const isRtl = (dir || getComputedStyle(document.body).direction) === 'rtl';\n const numIndicators = indicators.length;\n const svgAttributes = calculateIndicatorGroupSvgAttributes({\n id: uid,\n isRtl,\n numIndicators,\n overlapIndicators: overlap,\n });\n return (React.createElement(\"svg\", { className: cx('tds-indicator-group', {\n [`tds-indicator-group--${indicatorSize}-indicators`]: !!indicatorSize,\n 'tds-indicator-group--overlap': overlap,\n }, className), overflow: \"visible\", xmlns: \"http://www.w3.org/2000/svg\", ...svgAttributes.container, ...rest },\n React.createElement(\"defs\", null, indicators.map((indicator, i) => {\n const maskAttributes = svgAttributes.masks[i];\n return (React.createElement(\"mask\", { key: indicator.color, ...maskAttributes.container },\n React.createElement(\"rect\", { fill: \"#fff\", ...maskAttributes.rectVisible }),\n overlap && i !== numIndicators - 1 && (React.createElement(\"rect\", { fill: \"#000\", ...maskAttributes.rectHidden }))));\n })),\n indicators.map((indicator, i) => {\n const indicatorAttributes = svgAttributes.indicators[i];\n return (React.createElement(Indicator, { key: indicator.color, ...indicator, ...indicatorAttributes.container, circleProps: indicatorAttributes.circle }));\n })));\n};\n","import { getLocalMonthYear, isSameDay, isSameMonth, isWeekend } from '@tesla/design-system';\nimport cx from 'classnames';\nimport React, { useEffect, useRef } from 'react';\nimport { IndicatorGroup } from '../indicator-group/index.js';\nimport { dateToIsoDateString } from './utils/date-to-iso-date-string.js';\nexport const Day = ({ between, className, date, end, error, first, focused, highlighted, isDisabled, last, month, onDateSelect, overlapStatusIndicators, selected, start, statusIndicators, ...rest }) => {\n const inThisMonth = isSameMonth(date, month);\n const disabled = typeof isDisabled === 'function' ? isDisabled(date) : isDisabled;\n const indicators = statusIndicators === null || statusIndicators === void 0 ? void 0 : statusIndicators[dateToIsoDateString(date)];\n const ref = useRef(null);\n useEffect(() => {\n if (focused && ref.current && inThisMonth && !disabled) {\n // TODO: There's a race-condition somewhere in the rendering logic that causes\n // about 1 in 50 re - renders to lose focus. This is a dirty hack to come back to\n // @ts-expect-error - see above\n setTimeout(() => ref.current.focus(), 25);\n // This would be the prefered approach:\n // ref.current.focus();\n }\n }, [disabled, focused, inThisMonth]);\n return (React.createElement(\"button\", { \"aria-label\": !inThisMonth ? getLocalMonthYear(date) : undefined, \"aria-selected\": start || end, className: cx('tds-day', {\n 'tds-day--error': error,\n 'tds-day--selected': selected,\n 'tds-day--between': between,\n 'tds-day--first': first,\n 'tds-day--last': last,\n 'tds-day--start': start,\n 'tds-day--end': end,\n 'tds-day--highlighted': highlighted,\n 'tds-day--today': isSameDay(date, new Date()),\n 'tds-day--not-this-month': !inThisMonth,\n 'tds-day--weekend': isWeekend(date),\n }, className), disabled: disabled, onClick: (e) => onDateSelect(e, date), ref: ref, tabIndex: inThisMonth ? undefined : -1, type: \"button\", \"data-testid\": date.toISOString().slice(0, 10), ...rest },\n React.createElement(\"span\", null, date.getDate()),\n Array.isArray(indicators) && indicators.length >= 1 && (React.createElement(IndicatorGroup, { className: cx('tds-day-status-indicators'), indicators: indicators, overlap: overlapStatusIndicators }))));\n};\n","import { getLocalDayOfWeek } from '@tesla/design-system';\nimport React from 'react';\n/**\n * Generate days of the week from the days grid\n * Eg. \"S M T W T F S\"\n */\nexport const DaysOfWeek = ({ firstDayOfWeek = 0, locale = 'en-US', ...rest }) => {\n const days = [];\n // Set the first day to Sunday (TODO: Set first day based on locale?)\n const day = new Date();\n day.setDate(day.getDate() - day.getDay() + firstDayOfWeek);\n // Generate flat array for a 7 cell calendar grid\n for (let col = 0; col < 7; col++) {\n const thisDay = new Date(day);\n days.push(thisDay);\n day.setDate(day.getDate() + 1);\n }\n return (React.createElement(\"div\", { className: \"tds-date-picker-days-label\", ...rest }, days.map((day, i) => (React.createElement(\"div\", { className: \"tds-day\", key: `${day}_${i}` },\n React.createElement(\"strong\", null, getLocalDayOfWeek(day, locale)))))));\n};\n","/**\n * Determines if a given date should be considered \"enabled\" based on its relationship to a selected date.\n *\n * The method checks against a provided date `date`. The logic for determining if the date is \"enabled\" is as follows:\n * - If `date` is `undefined`, the method immediately returns `true`, implying that when there's no specific date to check against, it should be considered enabled by default.\n * - If `date` is defined, the method then compares the month and year of `date` to those of a globally referenced `selectedDate`.\n * - If either the month or the year of `date` does not match the month or year of `selectedDate`, the method returns `true`, indicating that the date is enabled because it falls outside the specific month/year of the `selectedDate`.\n * - Conversely, if both the month and year of `date` match those of `selectedDate`, it implies that `date` is in the same month and year as `selectedDate`, and the method would return `false`, indicating the date is not enabled (or is \"disabled\").\n *\n * This method is useful for scenarios such as calendar widgets where certain dates need to be enabled or disabled based on specific logic, for instance, to disable dates from a different month or year than the one currently selected.\n *\n * @param {Date | undefined} date - The date to check for being enabled. If `undefined`, the method treats the date as enabled by default.\n * @returns {boolean} - Returns `true` if the date is enabled (i.e., it's either `undefined` or not in the same month/year as `selectedDate`), otherwise `false`.\n */\nexport const isDateEnabled = (date, selectedDate) => !date ||\n (selectedDate === null || selectedDate === void 0 ? void 0 : selectedDate.getUTCMonth()) !== date.getUTCMonth() ||\n (selectedDate === null || selectedDate === void 0 ? void 0 : selectedDate.getUTCFullYear()) !== date.getUTCFullYear();\n","import { getLangDir } from '@tesla/design-system';\nimport { getLocalMonthYear } from '@tesla/design-system';\nimport { iconChevronSmall270, iconChevronSmall90 } from '@tesla/design-system-icons';\nimport React from 'react';\nimport { Icon } from '../icon/icon.js';\nimport { isDateEnabled } from './utils/is-enabled-date.js';\nexport const MonthHeader = ({ ariaLabelMonthPicker = 'Use left or right arrow keys to increment the month', date: selectedDate, locale = 'en-US', months, onNextClick, onPrevClick, min, max, ...rest }) => {\n // Create a fallback to still render the correct month and year,\n // even if no date is passed in at first (allows for no default selected date)\n const date = selectedDate || new Date();\n const prevMonth = new Date(date);\n prevMonth.setDate(1);\n prevMonth.setMonth(date.getMonth() - 1);\n const nextMonth = new Date(date);\n nextMonth.setDate(1);\n nextMonth.setMonth(date.getMonth() + 1);\n const handleStepMonth = (e) => {\n const dir = getLangDir(e.target);\n if ((dir === 'ltr' && e.key === 'ArrowRight') || (dir === 'rtl' && e.key === 'ArrowLeft')) {\n e.preventDefault();\n if (onNextClick && isDateEnabled(max, selectedDate))\n onNextClick();\n }\n if (e.key === 'ArrowLeft') {\n e.preventDefault();\n if (onPrevClick && isDateEnabled(min, selectedDate))\n onPrevClick();\n }\n };\n return (React.createElement(\"div\", { \"aria-label\": ariaLabelMonthPicker, className: \"tds-date-picker-month\", onKeyDown: handleStepMonth, tabIndex: 0, ...rest },\n React.createElement(\"button\", { \"aria-label\": getLocalMonthYear(prevMonth, locale), onClick: onPrevClick, tabIndex: -1, type: \"button\", disabled: !isDateEnabled(min, selectedDate) },\n React.createElement(Icon, { data: iconChevronSmall270 })),\n React.createElement(\"label\", { \"aria-live\": \"polite\" }, getLocalMonthYear(date, locale)),\n months === 2 && React.createElement(\"label\", null, getLocalMonthYear(nextMonth, locale)),\n React.createElement(\"button\", { \"aria-label\": getLocalMonthYear(nextMonth, locale), onClick: onNextClick, tabIndex: -1, type: \"button\", disabled: !isDateEnabled(max, selectedDate) },\n React.createElement(Icon, { data: iconChevronSmall90 }))));\n};\n","export function dateToIsoDateString(date) {\n if (date == null) {\n return null;\n }\n const year = date.getFullYear().toString();\n const month = (date.getMonth() + 1).toString();\n const day = date.getDate().toString();\n return `${year.padStart(4, '0')}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`;\n}\n","import { isIsoDateString } from './is-iso-date-string.js';\nexport function getDatePickerDate(date, dateType) {\n if (date != null) {\n if (dateType === 'string' && isIsoDateString(date)) {\n return new Date(`${date}T00:00`);\n }\n else if (date instanceof Date && (dateType === 'date' || dateType == null)) {\n return new Date(date);\n }\n }\n // Zeroing out the timestamp is needed so we don't pollute data with timestamps from the user's local timezone.\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n return today;\n}\n","export function isSameUTCDate(date1, date2) {\n return (date1.getUTCFullYear() === date2.getUTCFullYear() &&\n date1.getUTCMonth() === date2.getUTCMonth() &&\n date1.getUTCDate() === date2.getUTCDate());\n}\n","import { isSameUTCDate } from './is-same-utc-date.js';\n/**\n * method calculates whether given day is a valid date based on min and max.\n * Any dates prior to min and after max would result it `true` as it is not within range.\n */\nexport const isDateNotWithinRange = (day, min, max) => {\n // edge case: if same day as min or max, return false\n if ((min && isSameUTCDate(day, min)) || (max && isSameUTCDate(day, max)))\n return false;\n return (min && day < min) || (max && day > max) || false;\n};\n","const ISO_DATE_STRING_REGEX = /^\\d{4}-([0]\\d|1[0-2])-([0-2]\\d|3[01])$/;\nexport function isIsoDateString(date) {\n return typeof date === 'string' && ISO_DATE_STRING_REGEX.test(date);\n}\n","import cx from 'classnames';\nimport React from 'react';\nexport const FormFeedback = ({ className, feedbackText, feedbackTextProps, helperText, helperTextProps, ...rest }) => (React.createElement(\"div\", { className: cx('tds-form-feedback', className), ...rest },\n React.createElement(\"div\", { className: \"tds-form-helper-text\", ...helperTextProps }, helperText),\n React.createElement(\"div\", { className: \"tds-form-feedback-text\", ...feedbackTextProps }, feedbackText)));\n","import { isIsoDateString } from './is-iso-date-string.js';\nexport function isDateSelected(date, dateType) {\n return ((date != null && date instanceof Date && dateType !== 'string') ||\n (dateType === 'string' && isIsoDateString(date)));\n}\n","import { isSameDay, isSameMonth, stepDay, incrementToFirstOfMonth } from '@tesla/design-system';\nimport cx from 'classnames';\nimport React, { useEffect, useLayoutEffect, useState } from 'react';\nimport { useCalendarGrid } from '../index.js';\nimport { Day, DaysOfWeek, MonthHeader } from './index.js';\nimport { dateToIsoDateString, getDatePickerDate, isDateSelected } from './utils/index.js';\nimport { isDateNotWithinRange } from './utils/is-date-not-within-range.js';\nexport const DatePicker = ({ ariaLabelDayPicker = 'Use arrow keys to increment the date', ariaLabelMonthPicker = 'Use left or right arrow keys to increment the month', className, date: selectedDate, dateType, density, disabled, error, firstDayOfWeek = 0, locale = 'en-US', onBlur, onDateChange, overlapStatusIndicators, min, max, statusIndicators, ...rest }) => {\n // Create a fallback to still render the correct month and year,\n // even if no date is passed in at first (allows for no default selected date)\n const date = getDatePickerDate(selectedDate, dateType);\n const isoDateString = date.toISOString();\n const [month, setMonth] = useState(date);\n const [focusedDate, setFocusedDate] = useState(null);\n // Update Date Picker Month when date is updated from the text input field\n useEffect(() => {\n setMonth(new Date(isoDateString));\n }, [isoDateString]);\n useLayoutEffect(() => {\n if (focusedDate) {\n setMonth((prevState) => {\n if (isSameMonth(focusedDate, prevState)) {\n return prevState;\n }\n const updatedMonth = new Date(prevState);\n updatedMonth.setDate(1);\n updatedMonth.setMonth(focusedDate < prevState ? prevState.getMonth() - 1 : prevState.getMonth() + 1);\n return updatedMonth;\n });\n }\n }, [focusedDate]);\n // Create a list of days with some data about each one, only when the month changes\n const days = useCalendarGrid(month, firstDayOfWeek);\n const handleDayKeyDown = (e, day) => {\n if (e.key === 'ArrowRight') {\n e.preventDefault();\n setFocusedDate(stepDay(day, 1));\n }\n if (e.key === 'ArrowLeft') {\n e.preventDefault();\n setFocusedDate(stepDay(day, -1));\n }\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n setFocusedDate(stepDay(day, 7));\n }\n if (e.key === 'ArrowUp') {\n e.preventDefault();\n setFocusedDate(stepDay(day, -7));\n }\n };\n const prevMonth = incrementToFirstOfMonth(month, -1);\n const nextMonth = incrementToFirstOfMonth(month, 1);\n const handleDateSelect = (day) => {\n const newSelectedDay = isDateSelected(selectedDate, dateType) && isSameDay(day, date) ? null : day;\n if (dateType === 'string') {\n const isoDateString = dateToIsoDateString(newSelectedDay);\n onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(isoDateString);\n }\n else {\n onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(newSelectedDay);\n }\n };\n const handleStepMonth = (e) => {\n if (e.key === 'ArrowRight') {\n e.preventDefault();\n setFocusedDate(null);\n setMonth(nextMonth);\n }\n if (e.key === 'ArrowLeft') {\n e.preventDefault();\n setFocusedDate(null);\n setMonth(prevMonth);\n }\n };\n return (React.createElement(\"div\", { className: cx('tds-date-picker', { [`tds-density--${density}`]: density }, className), ...rest },\n React.createElement(MonthHeader, { ariaLabelMonthPicker: ariaLabelMonthPicker, date: month, locale: locale, onKeyDown: handleStepMonth, onNextClick: () => {\n setFocusedDate(null);\n setMonth(nextMonth);\n }, onPrevClick: () => {\n setFocusedDate(null);\n setMonth(prevMonth);\n }, min: min, max: max }),\n React.createElement(DaysOfWeek, { firstDayOfWeek: firstDayOfWeek, locale: locale }),\n React.createElement(\"div\", { \"aria-label\": ariaLabelDayPicker, className: cx('tds-date-picker-days-grid', {\n 'tds-date-picker-days-grid--with-indicators': !!statusIndicators,\n }), onBlur: (e) => {\n if (!e.currentTarget.contains(e.relatedTarget) &&\n !e.target.classList.contains('tds-day--not-this-month')) {\n onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);\n }\n } }, days.map((day) => {\n return (React.createElement(Day, { date: day, error: isSameDay(day, date) && error, focused: isSameDay(day, focusedDate), isDisabled: disabled || isDateNotWithinRange(day, min, max), key: `${day.getDate()}_${day.getMonth()}`, month: month, onDateSelect: (e, date) => {\n handleDateSelect(date);\n e.currentTarget instanceof HTMLElement && e.currentTarget.blur();\n }, onKeyDown: (e) => handleDayKeyDown(e, new Date(day)), overlapStatusIndicators: overlapStatusIndicators, selected: isDateSelected(selectedDate, dateType) && isSameDay(day, date), statusIndicators: statusIndicators }));\n }))));\n};\n","import { getDaysArray } from '@tesla/design-system';\nimport { useMemo } from 'react';\n/**\n * useCalendarGrid\n * - Generate a 7x6 grid of dates representing the current month of the given date\n * @param {Date} date - A date to build the month grid around\n * // Numbers correspond to days of the week, starting with 0/Sunday\n * @param {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7} firstDayOfWeek - First day of week for building calendar grid\n * @return {Date[]} days - An array of dates representing the current month\n */\nexport const useCalendarGrid = (date, firstDayOfWeek = 0) => {\n const days = useMemo(() => getDaysArray(date, firstDayOfWeek), [date, firstDayOfWeek]);\n return days;\n};\n","/**\n * Reference: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n *\n * || Pattern field length | Typical style, alphanumeric item | Typical style, alpha-only item ||\n * || --------------------------------------------------------------------------------------------- ||\n * || 1\t | Numeric, 1-2 digits (e.g. M) | ||\n * || 2\t | Numeric, 2 digits (e.g. MM) | Abbreviated (e.g. E, EE, EEE) ||\n * || 3\t | Abbreviated (e.g. MMM) |________________________________ ||\n * || 4 | Wide / Long / Full e.g. MMMM, EEEE|________________________________ ||\n * || 5 |\tNarrow (e.g. MMMMM, EEEEE) - The counter-intuitive use of 5 letters ||\n * || | for this is forced by backwards compatibility ||\n * || _____________________________________________________________________________________________ ||\n *\n * Example time string: YYYY-MM-DDTHH:mm:ss.sssZ\n * - YYYY: year\n * - MM: month (1 to 12)\n * - DD: date (1 to 31)\n * - h: hour in 12-hour format\n * - hh: hour in 12-hour format with zero padding\n * - H: hour in 24-hour format (0 to 23)\n * - HH: hour in 24-hour format (0 to 23) with zero padding\n * - m: minutes (0 to 59)\n * - mm: minutes (0 to 59) with zero padding\n * - ss: seconds (00 to 59)\n * - sss: milliseconds (0 to 999)\n * - T: separate the date and time in the string\n * - z:\tshort timezone (i.e. PDT)\n * - zzzz: long timezone (i.e. Pacific Daylight Time)\n * - Z: UTC time format\n *\n */\nconst placeholderMap = {\n day: \"D\",\n dayPeriod: \"AM\",\n era: \"AD\",\n fractionalSecond: \"s\",\n hour: \"h\",\n minute: \"m\",\n month: \"M\",\n second: \"s\",\n timeZoneName: \"Z\",\n year: \"Y\",\n};\nexport { placeholderMap };\n","import { getDefaultLocaleOptions } from \"../get-default-options/get-default-options.js\";\nimport { DateTimeFormat } from \"../intl-date-time/date-time-format.js\";\nimport { getLocale, getVerifiedDate, } from \"../shared-utils.js\";\n/**\n * Get localized Date and Time parts\n * @param {Date | number} date dateTime object, defaults to now if not set\n * @param {string | string[]} locale country code, BCP 47 language string, or array of either - default to 'en-US' if not set\n * @param {BetterDateTimeFormatOptions} options standard dateTimeFormat options object\n * reference at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat\n * @returns {Array} array of DateTimeFormatPart objects\n * @deprecated Use polyfill solution instead (see README.md)\n * ```js\n * import \"@tesla/intl-date-time/polyfill.js\";\n *\n * const date = new Date(Date.UTC(2020, 11, 20, 3, 23, 16, 738));\n * const formatter = new Intl.DateTimeFormat(\"en-US\", { dateStyle: \"medium\" });\n * const output = formatter.formatToParts(date);\n * expect(result).toEqual([\n * { type: \"month\", value: \"Dec\" },\n * { type: \"literal\", value: \" \" },\n * { type: \"day\", value: \"19\" },\n * { type: \"literal\", value: \", \" },\n * { type: \"year\", value: \"2020\" },\n * ]);\n * ```\n */\nexport const getDateTimeParts = (date, locale, options) => {\n // ensure we have a locale\n const newLocale = getLocale(locale);\n // check if any locale-specific options\n const newOptions = options ? options : getDefaultLocaleOptions(\"dateTime\", newLocale);\n return new DateTimeFormat(newLocale, newOptions).formatToParts(getVerifiedDate(date));\n};\n","import { placeholderMap } from \"../../data/placeholder.js\";\nimport { getDateTimeParts } from \"../get-date-time-parts/get-date-time-parts.js\";\nconst generatePlaceholderString = (formattedReturn) => {\n return formattedReturn\n .map(({ type, value }) => {\n const char = placeholderMap[type];\n const count = value.length;\n if (type === \"dayPeriod\" || type === \"era\") {\n return value;\n }\n if (char) {\n return char.repeat(count);\n }\n return value;\n })\n .join(\"\");\n};\n/**\n * Get text placeholder text for datetime\n * @param {Date | number} date dateTime object, defaults to now if not set\n * @param {string | string[]} locale country code, BCP 47 language string, or array of either - default to 'en-US' if not set\n * @param {BetterDateTimeFormatOptions} options standard dateTimeFormat options object\n * reference at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat\n * @returns {string} representation of localized placeholder text\n */\nexport const getPlaceholder = (date, locale, options) => {\n const formattedReturn = getDateTimeParts(date, locale, options);\n return generatePlaceholderString(formattedReturn);\n};\n","import { getDateTimeParts, getDaysInMonth, getPlaceholder, } from '@tesla/intl-date-time';\nimport { getDatePickerDate } from '../index.js';\nexport var DatePart;\n(function (DatePart) {\n DatePart[\"Day\"] = \"day\";\n DatePart[\"Month\"] = \"month\";\n DatePart[\"Year\"] = \"year\";\n})(DatePart || (DatePart = {}));\nexport const datePartSpec = {\n [DatePart.Day]: {\n max: 31,\n min: 1,\n },\n [DatePart.Month]: {\n max: 12,\n min: 1,\n },\n [DatePart.Year]: {\n max: 9999,\n min: 1,\n },\n};\nconst options = {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n};\n// return placeholder based on locale\nexport const getLocalePlaceholder = (locale) => {\n return getPlaceholder(new Date(), locale, options);\n};\n// Parse dateParts and seperators from getDateTimeParts\n// Required for getting the order of dateParts and seperators\n// Returns the default placeholder\n// Called when locale has changed\nexport const setLocaleDateParts = (locale, setValue = false) => {\n let placeholder = getLocalePlaceholder(locale);\n const parts = getDateTimeParts(new Date(), locale, options);\n let index = 0;\n let seperatorIndex = 0;\n const dateParts = [];\n // Parse position of each datePart and seperators between them\n for (let i = 0; i < parts.length; i++) {\n if (parts[i].type !== 'literal') {\n const datePartName = stringToDatePart(parts[i].type.toString());\n if (datePartName) {\n const cursorStart = index;\n const cursorEnd = (index += parts[i].value.length);\n const datePart = {\n cursorEnd: cursorEnd,\n cursorStart: cursorStart,\n length: parts[i].value.length,\n max: datePartSpec[datePartName].max,\n min: datePartSpec[datePartName].min,\n placeholder: '',\n seperator: '',\n type: datePartName,\n value: setValue ? parts[i].value : null,\n };\n dateParts.push(datePart);\n }\n }\n else {\n const seperator = parts[i].value;\n dateParts[seperatorIndex++].seperator = seperator;\n index += seperator.length;\n placeholder = placeholder.replace(seperator, ',');\n }\n }\n const placeholderArray = placeholder.split(',');\n for (let i = 0; i < dateParts.length; i++) {\n dateParts[i].placeholder = placeholderArray[i];\n }\n return dateParts;\n};\n// Convert string to DatePart\n// Called in getDateParts to parse string value from getDateTimeParts to datePart\nexport const stringToDatePart = (value) => {\n switch (value) {\n case 'day':\n return DatePart.Day;\n case 'month':\n return DatePart.Month;\n case 'year':\n return DatePart.Year;\n }\n return null;\n};\n// Convert datePart to string with leading zero\n// Called in datePartsToString for converting a specific datePart\nexport const dateValueToString = (dateParts, position) => {\n let value = dateParts[position].value;\n if (value !== null)\n while (value.length < dateParts[position].placeholder.length)\n value = '0' + value;\n else\n value = dateParts[position].placeholder;\n return value;\n};\n// Convert date dateParts to String\n// Called when setting a new displayValue with dateParts\nexport const datePartsToString = (dateParts) => {\n var _a;\n let output = '';\n for (let i = 0; i < dateParts.length; i++)\n output += dateValueToString(dateParts, i) + ((_a = dateParts[i].seperator) !== null && _a !== void 0 ? _a : '');\n return output;\n};\nexport const getDatePart = (dateParts, datePart) => {\n for (let i = 0; i < dateParts.length; i++) {\n if (dateParts[i].type === datePart)\n return [dateParts[i], i];\n }\n return [undefined, 0];\n};\n// Convert date to dateParts\n// Required for getting the dateParts when date is updated\nexport const dateToDateParts = (dateParts, date) => {\n if (date) {\n // If date is not in ISO date format will return current date\n date = typeof date === 'string' ? getDatePickerDate(date, 'string') : date;\n if (date && !isNaN(date.getTime())) {\n const [, dayIndex] = getDatePart(dateParts, DatePart.Day);\n const [, monthIndex] = getDatePart(dateParts, DatePart.Month);\n const [, yearIndex] = getDatePart(dateParts, DatePart.Year);\n dateParts[dayIndex].value = date.getDate().toString();\n dateParts[monthIndex].value = (date.getMonth() + 1).toString();\n dateParts[yearIndex].value = date.getFullYear().toString();\n }\n }\n return dateParts;\n};\n// Convert dateParts to date\n// Called when updating the value\n// Used onDateChange to parse the date value to the user\nexport const datePartsToDate = (dateParts) => {\n // Initialize with a random date to prevent messing up the date\n const output = new Date('2023-01-01T20:00:00Z');\n for (let i = 0; i < dateParts.length; i++) {\n const datePart = dateParts[i];\n if (datePart.value && parseInt(datePart.value) !== 0) {\n switch (datePart.type) {\n case DatePart.Day:\n output.setDate(parseInt(datePart.value));\n break;\n case DatePart.Month:\n output.setMonth(parseInt(datePart.value) - 1);\n break;\n case DatePart.Year:\n output.setFullYear(parseInt(datePart.value));\n break;\n }\n }\n else\n return null;\n }\n return output;\n};\n// Parse the selected datePart input, return null if not number within 1 to 9\n// Called in handleChange to parse user input\nexport const getDatePartValue = (inputValue, position, dateParts) => {\n dateParts.forEach((datePart) => {\n if (datePart.seperator)\n inputValue = inputValue.replace(datePart.seperator, ',');\n });\n const value = parseInt(inputValue.split(',')[position].replace(/\\D/g, ''));\n return Number.isNaN(value) ? null : value.toString();\n};\n// Return default datePart\n// Called getUpdatedDatePart to get the default datePart value\nexport const getDefaultDate = (datePart, direction) => {\n const today = new Date();\n const month = today.getMonth() + 1;\n const year = today.getFullYear();\n switch (datePart) {\n case DatePart.Day:\n if (direction === 'ArrowUp') {\n return 1;\n }\n if (direction === 'ArrowDown') {\n return new Date(year, month, 0).getDate();\n }\n return today.getDate();\n case DatePart.Month:\n if (direction === 'ArrowUp') {\n return 1;\n }\n if (direction === 'ArrowDown') {\n return 12;\n }\n return month + 1;\n case DatePart.Year:\n return year;\n }\n};\n// Update dateParts to the boundary if they are within range\n// When value is larger than max, limit it to max when cap is true, else the value becomes min\n// Called when updating datePart value\nexport const getCorrectDatePartValue = (dateParts, value, position, cap) => {\n let year;\n let month;\n for (let i = 0; i < dateParts.length; i++) {\n if (dateParts[i].type === DatePart.Year)\n year = dateParts[i];\n if (dateParts[i].type === DatePart.Month)\n month = dateParts[i];\n }\n // Check last date of the month when year and month are given\n let max = dateParts[position].max;\n const min = dateParts[position].min;\n if (dateParts[position].type == DatePart.Day &&\n year !== undefined &&\n month !== undefined &&\n year.value !== null &&\n month.value !== null)\n max = getDaysInMonth(new Date(parseInt(year.value), parseInt(month.value) - 1));\n if (value > max)\n return cap ? max : min;\n if (value < min)\n return max;\n return value;\n};\n// Increase or decrease datePart value\n// Use default value when datePart value is undefined\n// Called in handleManualEntryOnClick to get updated datePart value\nexport const getUpdatedDatePart = (dateParts, position, value, direction) => {\n const datePartValueStr = dateParts[position].value;\n return (datePartValueStr === null\n ? getDefaultDate(dateParts[position].type, direction)\n : getCorrectDatePartValue(dateParts, parseInt(datePartValueStr) + value, position, false)).toString();\n};\n// Convert cursor position to matching datePart position\n// Called when user clicks on the component to indentify the correct datePart to highlight\nexport const cursorToPosition = (dateParts, cursorPos) => {\n var _a;\n let i = 0;\n while (((_a = dateParts[i]) === null || _a === void 0 ? void 0 : _a.cursorEnd) < cursorPos)\n i++;\n return i;\n};\n// Change all zeros in dateParts to 1\n// Called in handleZeroInDateParts to update 0s in dateParts to 1\nexport const fixZeroInDateParts = (dateParts) => {\n for (let i = 0; i < dateParts.length; i++) {\n const datePart = dateParts[i];\n if (datePart.value !== null && parseInt(datePart.value) === 0) {\n dateParts[i].value = '1';\n }\n }\n return dateParts;\n};\n// Check if day falls in the range based on year and month\nexport const checkDayRange = (dateParts) => {\n const [dayPart, dayIndex] = getDatePart(dateParts, DatePart.Day);\n if (dayPart !== undefined && dayPart.value !== undefined) {\n dayPart.value =\n dayPart.value != undefined\n ? getCorrectDatePartValue(dateParts, parseInt(dayPart.value), dayIndex, true).toString()\n : dayPart.value;\n }\n return [dayPart, dayIndex];\n};\n","import { getVerifiedDate } from \"../shared-utils.js\";\n/**\n * Get Days in Month\n * @param {Date | number} date dateTime object or timestamp, defaults to now if not set\n * @returns {number} - the number of days in Date's month\n */\nexport const getDaysInMonth = (date) => {\n // verify date is good\n const newDate = getVerifiedDate(date);\n return new Date(newDate.getUTCFullYear(), newDate.getUTCMonth() + 1, 0).getUTCDate();\n};\n","import { getLocalStandardDate } from '@tesla/design-system';\nimport { iconCalendar } from '@tesla/design-system-icons';\nimport cx from 'classnames';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { dateToIsoDateString, isDateSelected, DatePicker, getDatePickerDate, } from '../date-picker/index.js';\nimport { Tooltip, useTooltipState } from '../tooltip/index.js';\nimport { useId } from '../hooks/use-id.js';\nimport { Icon } from '../icon/index.js';\nimport { IconButton } from '../icon-button/index.js';\nimport { DatePart, checkDayRange, cursorToPosition, datePartsToDate, datePartsToString, dateToDateParts, fixZeroInDateParts, getCorrectDatePartValue, getDatePartValue, getLocalePlaceholder, getUpdatedDatePart, setLocaleDateParts, } from './manual-entry-utils.js';\nexport const FormInputDate = ({ className, date, dateDisabled, dateType, disabled, firstDayOfWeek = 0, id, inputRef, leading, trailing, locale = 'en-US', manualEntry, name, onBlur, onDateChange, onDatePickerBlur, open, selectOnFocus, readOnly, value: externalValue, variant = 'default', datePickerProps, tooltipProps, min, max, ...rest }) => {\n const { expanded, handlers, setExpanded, toggleExpanded, wrapperRef } = useTooltipState();\n // Close on user or parent input\n useEffect(() => {\n setExpanded(false);\n }, [date, setExpanded]);\n const value = externalValue ||\n (isDateSelected(date, dateType)\n ? getLocalStandardDate(getDatePickerDate(date, dateType), locale)\n : '');\n const uId = useId();\n const htmlId = id || uId;\n const willSelectOnFocus = selectOnFocus !== null && selectOnFocus !== void 0 ? selectOnFocus : readOnly;\n const fallbackRef = useRef(null);\n const ref = inputRef || fallbackRef;\n // dateParts is a dict for storing each date part value\n const [dateParts, setDateParts] = useState(setLocaleDateParts(locale));\n const [selectedPosition, setSelectedPosition] = useState(0);\n // cursorRange is a array with length 2 that stands for start and end position of highlighted area\n const [cursorRange, setCursorRange] = useState([null, null]);\n // reset is used to allow restart of entering values\n // With reset false, entering 1, 2 will become 12\n // With reset true, entering 1, 2 will become 2 (1 reseted)\n const [reset, setReset] = useState(false);\n // displayValue is what is displayed in the input box\n const [displayValue, setDisplayValue] = useState(getLocalePlaceholder(locale));\n // Overwrite default cursor position with highlight area defined by cursorRange\n // Required for setting the correct highlight area when rendering\n useEffect(() => {\n // Has to be in useEffect, otherwise it will not update cursorRange sometimes\n if (manualEntry) {\n const input = ref === null || ref === void 0 ? void 0 : ref.current;\n input === null || input === void 0 ? void 0 : input.setSelectionRange(cursorRange[0], cursorRange[1]);\n }\n });\n // Initialize the cursor ranges\n // Required for parsing the correct datePart format when locale is updated\n useEffect(() => {\n if (manualEntry) {\n // Get datePart format when locale is changed\n const newDateParts = setLocaleDateParts(locale);\n setDateParts(newDateParts);\n setDisplayValue(datePartsToString(newDateParts));\n }\n }, [manualEntry, locale]);\n // Update dateParts to match the date\n // Required for setting the dateParts to match date when date is updated\n useEffect(() => {\n if (manualEntry) {\n if (date) {\n // Set dateParts to the new date\n const newDateParts = dateToDateParts(dateParts, date);\n setDateParts(newDateParts);\n setDisplayValue(datePartsToString(newDateParts));\n }\n else {\n // If date is null, reset the dateParts and the displayValue\n const newDateParts = setLocaleDateParts(locale);\n setDateParts(newDateParts);\n setDisplayValue(datePartsToString(newDateParts));\n }\n }\n }, [date, manualEntry]);\n // Update selected date part\n // Required for setting the highlighted area based on passed in position\n // Called after updating any dateParts to make sure the correct datePart is being highlighted\n const updateSelection = (position) => {\n const min = 0;\n const max = Object.keys(DatePart).length - 1;\n // Limit position from 0 to number of date parts\n if (position > max)\n position = max;\n if (position < min)\n position = min;\n // Set cursorRange to the passed in position\n setCursorRange([dateParts[position].cursorStart, dateParts[position].cursorEnd]);\n const positionUpdate = position !== selectedPosition;\n setReset(positionUpdate);\n setSelectedPosition(position);\n if (positionUpdate)\n handleZeroInDateParts();\n };\n // Update displaying value\n // Required for updating the value of a datePart\n const updateDisplayValue = (position, value, cap = true) => {\n if (!value) {\n dateParts[position].value = null;\n }\n else {\n if (parseInt(value) === 0) {\n // Do not check range when value is 0\n dateParts[position].value = value;\n }\n else if (parseInt(value)) {\n dateParts[position].value = getCorrectDatePartValue(dateParts, parseInt(value), position, cap).toString();\n // Re-check date range since date range differs when month changes\n const [dayPart, dayIndex] = checkDayRange(dateParts);\n if (dayPart)\n dateParts[dayIndex] = dayPart;\n }\n }\n const newDate = datePartsToDate(dateParts);\n // Update the date value by calling onDateChange\n if (onDateChange)\n dateType === 'string' ? onDateChange(dateToIsoDateString(newDate)) : onDateChange(newDate);\n setDisplayValue(datePartsToString(dateParts));\n };\n // Handle any zeros in dateParts\n // Required for updating 0 in dateParts to 1 to make sure the values are valid\n // Called onBlur and when highlighted position changes\n const handleZeroInDateParts = () => {\n // Set all 0 in dateParts to 1\n const newDateParts = fixZeroInDateParts(dateParts);\n setDateParts(newDateParts);\n setDisplayValue(datePartsToString(newDateParts));\n };\n // Handle User Input\n // Required for handling user input by appending input value to prevValue\n // Called on any value change in the input component\n const handleChange = (e) => {\n const prevValue = dateParts[selectedPosition].value;\n let value = getDatePartValue(e.target.value, selectedPosition, dateParts);\n // Do not update value when input key is null\n if (value === null) {\n updateSelection(selectedPosition);\n // Keep reset the same when value is invalid\n setReset(reset);\n }\n else {\n const datePartLength = dateParts[selectedPosition].placeholder.length;\n if (!reset && prevValue !== undefined) {\n value = prevValue + value;\n }\n updateDisplayValue(selectedPosition, value);\n // Update highlighted area to next datePart when\n // 1. dateParts length is larger than placeholder\n // 2. any value added will exceed the max like 3 in month should go to next datePart\n if (value.length >= datePartLength) {\n updateSelection(selectedPosition + 1);\n setReset(true);\n }\n else {\n if (parseInt(value) > dateParts[selectedPosition].max / 10)\n updateSelection(selectedPosition + 1);\n else\n updateSelection(selectedPosition);\n }\n }\n };\n // Handle key down for manualEntry\n // Required for handling key downs when manualEntry is true\n // Called when user press any key\n // Up: increase value\n // Down: decrease value\n // Left: go to left datePart until the first datePart\n // Rigtht: go to right datePart until the last datePart\n // Tab: got to right datePart and next component\n // Delete or Backspace: remove the value to be palceholder\n const handleManualEntryKeyDown = (e) => {\n const dir = wrapperRef.current ? getComputedStyle(wrapperRef.current).direction : undefined;\n if (cursorRange[0] !== null && cursorRange[1] !== null) {\n switch (e.key) {\n case 'ArrowDown':\n // ArrowDown will decrease the selected date part by 1\n e.preventDefault();\n updateDisplayValue(selectedPosition, getUpdatedDatePart(dateParts, selectedPosition, -1, 'ArrowDown'));\n setReset(true);\n break;\n case 'ArrowLeft':\n // ArrowLeft will move the selected part to the left one\n e.preventDefault();\n updateSelection(dir === 'rtl' ? selectedPosition + 1 : selectedPosition - 1);\n break;\n case 'ArrowRight':\n // ArrowRight will move the selected part to the right one\n e.preventDefault();\n updateSelection(dir === 'rtl' ? selectedPosition - 1 : selectedPosition + 1);\n break;\n case 'ArrowUp':\n // ArrowUp will increase the selected date part by 1\n e.preventDefault();\n updateDisplayValue(selectedPosition, getUpdatedDatePart(dateParts, selectedPosition, 1, 'ArrowUp'));\n setReset(true);\n break;\n case 'Backspace':\n case 'Delete':\n e.preventDefault();\n updateDisplayValue(selectedPosition, null);\n break;\n case 'Tab':\n if (e.shiftKey) {\n if (selectedPosition > 0) {\n e.preventDefault();\n updateSelection(selectedPosition - 1);\n }\n break;\n }\n if (selectedPosition < 2) {\n e.preventDefault();\n updateSelection(selectedPosition + 1);\n }\n break;\n }\n }\n switch (e.key) {\n case ' ':\n e.preventDefault();\n break;\n case 'Enter':\n setExpanded(true);\n break;\n case 'Return':\n setExpanded(true);\n break;\n default:\n break;\n }\n handlers.onKeyDown(e);\n };\n // Extend default tooltip keyboarding\n const handleKeyDown = (e) => {\n switch (e.key) {\n case ' ':\n e.preventDefault();\n setExpanded(true);\n break;\n case 'ArrowDown':\n case 'Enter':\n case 'Return':\n setExpanded(true);\n break;\n default:\n break;\n }\n // @ts-expect-error - React's event types are not self-compatible in this case\n handlers.onKeyDown(e);\n };\n // Manual entry onClick for the component triggers auto-select of date part based on the cursorPos\n // Setting the selected date part based on where the user clicks.\n const handleManualEntrySelect = (event) => {\n const cursorPos = event.target.selectionStart;\n if (cursorPos !== null) {\n updateSelection(cursorToPosition(dateParts, cursorPos));\n setReset(true);\n }\n };\n // Handle manual entry on blur.\n // Required for resetting the value, cursorRange, and handle any 0 value in dateParts\n const handleManualEntryBlur = (e) => {\n setReset(true);\n setCursorRange([null, null]);\n handleZeroInDateParts();\n handleBlur(e);\n };\n // onBlur for the component should only fire when the user is leaving the component\n // since onBlurs can happen as the user clicks around within the component,\n // we have to handle the behavior explicitly\n const handleBlur = (e) => {\n // Note: related target represents the item focused-to in the context of a blur event\n if (wrapperRef.current && !wrapperRef.current.contains(e.relatedTarget)) {\n if (onBlur)\n onBlur(e);\n }\n };\n return (React.createElement(\"div\", { className: cx('tds-form-input', {\n [`tds-form-input--${variant}`]: variant,\n 'tds-form-input--readonly': readOnly,\n 'tds--disabled': disabled,\n }, className), onBlur: manualEntry ? handleManualEntryBlur : handleBlur, onKeyDown: manualEntry ? handleManualEntryKeyDown : handleKeyDown, onClick: (e) => {\n var _a, _b, _c;\n // Autofocus input when outer div is clicked\n if (!e.target.closest('button, .tds-tooltip-wrapper') ||\n willSelectOnFocus) {\n (_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();\n // Auto-select text within the input when focused\n if (willSelectOnFocus && !((_b = document.getSelection()) === null || _b === void 0 ? void 0 : _b.toString().length)) {\n (_c = ref.current) === null || _c === void 0 ? void 0 : _c.select();\n }\n }\n }, ref: wrapperRef },\n !!leading && React.createElement(\"div\", { className: \"tds-form-input-leading\" }, leading),\n React.createElement(\"input\", { autoComplete: \"off\", className: cx('tds-form-input-text tds-form-input-date', {\n ['tds-form-input-date--placeholder']: manualEntry && displayValue === getLocalePlaceholder(locale),\n }), id: htmlId, name: name, onChange: handleChange, onClick: manualEntry ? undefined : toggleExpanded, onSelect: manualEntry ? handleManualEntrySelect : undefined, readOnly: !manualEntry || readOnly, disabled: disabled, ref: ref, type: \"text\", value: manualEntry ? displayValue : value, ...rest }),\n React.createElement(\"div\", { className: \"tds-form-input-trailing\" },\n trailing,\n !readOnly && (React.createElement(IconButton, { onClick: toggleExpanded, disabled: disabled, \"data-testid\": 'openCalendar' },\n React.createElement(Icon, { data: iconCalendar, inline: true })))),\n !readOnly && (React.createElement(Tooltip, { className: \"tds-date-picker-tooltip\", open: open !== null && open !== void 0 ? open : expanded, orientation: \"down\", ...tooltipProps },\n React.createElement(DatePicker, { date: date, dateType: dateType, density: \"dense\", disabled: dateDisabled, firstDayOfWeek: firstDayOfWeek, locale: locale, onBlur: onDatePickerBlur, onDateChange: onDateChange, min: min, max: max, ...datePickerProps })))));\n};\n","import cx from 'classnames';\nimport React from 'react';\nimport { FormInputOption, toValue, useId, } from '../index.js';\nexport const FormInputOptionGroup = ({ children, className, layout, name, onChange, onOptionSelect, options, selected, showVisualCheckbox, type, variant, ...rest }) => {\n const uId = useId();\n const htmlName = name || uId;\n const htmlType = type || (Array.isArray(selected) ? 'checkbox' : 'radio');\n if (!children && (!options || !options.length)) {\n return null;\n }\n const handleChange = (e, option) => {\n if (onChange)\n onChange(e);\n if (onOptionSelect)\n onOptionSelect(e.target.value, option);\n };\n return (React.createElement(\"div\", { className: cx('tds-form-input-group', {\n [`tds-form-input-group--layout-${layout}`]: layout,\n }, className), ...rest }, children ||\n (options === null || options === void 0 ? void 0 : options.map((option) => {\n const value = toValue(option);\n return (React.createElement(FormInputOption, { checked: selected\n ? Array.isArray(selected)\n ? selected.includes(value)\n : selected === option.value\n : undefined, key: String(value), name: htmlName, onChange: (e) => handleChange(e, option), showVisualCheckbox: showVisualCheckbox, type: htmlType, variant: variant, ...option, value: value }));\n }))));\n};\n","import cx from 'classnames';\nimport React from 'react';\nimport { useId } from '../index.js';\nexport const FormInputOption = ({ children, className, id, inputRef, label, labelProps, leading, showVisualCheckbox, trailing, type = 'checkbox', variant, ...rest }) => {\n const uId = useId();\n const htmlId = id || uId;\n return (React.createElement(React.Fragment, null,\n React.createElement(\"input\", { className: \"tds-form-input-hidden-choice\", id: htmlId, ref: inputRef, type: type, ...rest }),\n React.createElement(\"label\", { className: cx('tds-form-input', 'tds-form-input--option', {\n [`tds-form-input--${variant}`]: variant,\n }, className), htmlFor: htmlId, ...labelProps },\n (leading || showVisualCheckbox) && (React.createElement(\"span\", { className: \"tds-form-input-leading\" },\n (showVisualCheckbox !== null && showVisualCheckbox !== void 0 ? showVisualCheckbox : type === 'checkbox') && (React.createElement(\"span\", { className: \"tds-form-input-visual-checkbox\" })),\n leading)),\n children || label,\n trailing && React.createElement(\"span\", { className: \"tds-form-input-trailing\" }, trailing))));\n};\n","import { iconChevronSmall180 } from '@tesla/design-system-icons';\nimport cx from 'classnames';\nimport React, { useMemo, useRef } from 'react';\nimport { useId } from '../hooks/use-id.js';\nimport { Icon } from '../icon/index.js';\nexport const FormInputSelect = ({ children, className, disabled, id, inputRef, leading, nullOptionsLabel = 'Select', options, readOnly, selectOnFocus, trailing, variant = 'default', value, ...rest }) => {\n const uId = useId();\n const htmlId = id || uId;\n const willSelectOnFocus = selectOnFocus !== null && selectOnFocus !== void 0 ? selectOnFocus : readOnly;\n const fallbackRef = useRef(null);\n const ref = inputRef || fallbackRef;\n // Add a fallback in case no options passed\n if (!children && (!options || !options.length)) {\n options = [{ label: nullOptionsLabel, value: '' }];\n }\n const formattedOptions = useMemo(() => {\n return options === null || options === void 0 ? void 0 : options.map((opt) => (typeof opt === 'string' ? { value: opt, label: opt } : opt));\n }, [options]);\n return (React.createElement(\"div\", { className: cx('tds-form-input', {\n [`tds-form-input--${variant}`]: variant,\n 'tds-form-input--readonly': readOnly,\n 'tds--disabled': disabled,\n }, className), onClick: (e) => {\n var _a, _b, _c;\n // Autofocus select/input when outer div is clicked\n if (!e.target.closest('button, .tds-tooltip-wrapper') ||\n willSelectOnFocus) {\n (_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();\n // Auto-select text within the input when focused\n if (willSelectOnFocus && !((_b = document.getSelection()) === null || _b === void 0 ? void 0 : _b.toString().length)) {\n (_c = ref.current) === null || _c === void 0 ? void 0 : _c.select();\n }\n }\n } },\n leading && React.createElement(\"div\", { className: \"tds-form-input-leading\" }, leading),\n !readOnly ? (React.createElement(\"select\", { className: \"tds-form-input-select\", id: htmlId, \n // @ts-expect-error - select|input ref type is the same in practical use, but different in TS\n ref: ref, readOnly: readOnly, value: value, disabled: disabled, ...rest }, children ||\n (formattedOptions === null || formattedOptions === void 0 ? void 0 : formattedOptions.map((option) => (React.createElement(\"option\", { key: String(option.value), ...option }, option.label)))))) : (React.createElement(\"input\", { \n // Replicate a select visually with a text input so that `readOnly` may be applied\n className: \"tds-form-input-select\", id: htmlId, readOnly: readOnly, value: value, \n // @ts-expect-error - select|input ref type is the same in practical use, but different in TS\n ref: ref, ...rest })),\n React.createElement(\"div\", { className: \"tds-form-input-trailing\" },\n trailing,\n !readOnly && React.createElement(Icon, { data: iconChevronSmall180 }))));\n};\n","import cx from 'classnames';\nimport React, { useRef } from 'react';\nimport { useId } from '../hooks/use-id.js';\nexport const FormInputTextarea = ({ className, id, inputRef, name, disabled, readOnly, selectOnFocus, value, variant = 'default', ...rest }) => {\n const uId = useId();\n const htmlId = id || uId;\n const willSelectOnFocus = selectOnFocus !== null && selectOnFocus !== void 0 ? selectOnFocus : readOnly;\n const fallbackRef = useRef(null);\n const ref = inputRef || fallbackRef;\n return (React.createElement(\"div\", { className: cx('tds-form-input', {\n [`tds-form-input--${variant}`]: variant,\n 'tds-form-input--readonly': readOnly,\n 'tds--disabled': disabled,\n }, className), onClick: (e) => {\n var _a, _b;\n // NOTE: textarea covers the whole input, so they don't need any\n // focus-on-click magic like other default inputs do\n if (!e.target.closest('button, .tds-tooltip-wrapper') &&\n willSelectOnFocus &&\n !((_a = document.getSelection()) === null || _a === void 0 ? void 0 : _a.toString().length)) {\n // Auto-select text within the input when focused\n (_b = ref.current) === null || _b === void 0 ? void 0 : _b.select();\n }\n } },\n React.createElement(\"textarea\", { className: \"tds-form-input-textarea\", id: htmlId, name: name, readOnly: readOnly, ref: ref, value: value, disabled: disabled, ...rest })));\n};\n","import cx from 'classnames';\nimport React from 'react';\nexport const FormLabel = ({ caption, children, disabled, className, is: Tag = 'label', tooltip, ...rest }) => {\n const commonProps = {\n className: cx('tds-form-label', { 'tds--disabled': disabled }, className),\n };\n return (React.createElement(React.Fragment, null,\n tooltip ? (React.createElement(\"div\", { ...commonProps },\n React.createElement(Tag, { className: \"tds-form-label-text\", ...rest }, children),\n !!tooltip && React.createElement(React.Fragment, null,\n \" \",\n tooltip))) : (React.createElement(Tag, { ...commonProps, ...rest }, children)),\n caption && React.createElement(\"div\", { className: \"tds-form-caption\" }, caption)));\n};\n","export const iconCalendar = { \"children\": [{ \"name\": \"path\", \"type\": \"element\", \"value\": \"\", \"attributes\": { \"fill\": \"currentColor\", \"d\": \"M18.5 3h-13A2.5 2.5 0 0 0 3 5.5v13A2.5 2.5 0 0 0 5.5 21h13a2.5 2.5 0 0 0 2.5-2.5v-13A2.5 2.5 0 0 0 18.5 3m-13 1.5h13c.551 0 1 .449 1 1v2.211a2.5 2.5 0 0 0-1-.211h-13c-.356 0-.693.077-1 .211V5.5c0-.551.449-1 1-1m14 14c0 .551-.449 1-1 1h-13c-.551 0-1-.449-1-1V10c0-.551.449-1 1-1h13c.551 0 1 .449 1 1zM9 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0m4 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m4 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-8 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0m4 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0\" }, \"children\": [] }], \"id\": \"icon-calendar\", \"viewBox\": \"0 0 24 24\" };\n","const isSameYear = (date1, date2) => !!date1 && !!date2 && date1.getFullYear() === date2.getFullYear();\nconst isSameMonth = (date1, date2) => !!date1 && !!date2 && isSameYear(date1, date2) && date1.getMonth() === date2.getMonth();\nconst isSameDay = (date1, date2) => !!date1 && !!date2 && isSameYear(date1, date2) && isSameMonth(date1, date2) && date1.getDate() === date2.getDate();\nconst isFirstDayOfMonth = (date) => {\n const firstDate = new Date(date);\n firstDate.setDate(1);\n return isSameDay(firstDate, date);\n};\nconst isLastDayOfMonth = (date) => {\n const lastDate = new Date(date);\n lastDate.setDate(1);\n lastDate.setMonth(date.getMonth() + 1);\n lastDate.setDate(0);\n return isSameDay(lastDate, date);\n};\nconst isBetweenDays = (date, start, end) => {\n if (start && end) {\n date.setHours(0, 0, 0, 0);\n start.setHours(0, 0, 0, 0);\n end.setHours(0, 0, 0, 0);\n return date > start && date < end;\n }\n return false;\n};\nconst isWeekend = (date) => !!date && [0, 6].includes(date.getDay());\nconst getLocalMonth = (date, locale = \"en-US\") => date.toLocaleDateString(locale, {\n month: \"short\"\n});\nconst getLocalYear = (date, locale = \"en-US\") => date.toLocaleDateString(locale, {\n year: \"numeric\"\n});\nconst getLocalMonthYear = (date, locale = \"en-US\") => date.toLocaleDateString(locale, {\n month: \"long\",\n year: \"numeric\"\n});\nconst getLocalDayOfWeek = (date, locale = \"en-US\") => date.toLocaleDateString(locale, {\n weekday: \"narrow\"\n});\nconst getLocalStandardDate = (date, locale = \"en-US\") => date.toLocaleDateString(locale, {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\"\n});\nconst getLocalContextualDateRange = (start, end, locale = \"en-US\") => {\n const startString = start.toLocaleDateString(locale, {\n day: \"numeric\",\n month: \"long\",\n year: !isSameYear(start, end) ? \"numeric\" : void 0\n });\n const endString = end.toLocaleDateString(locale, {\n day: \"numeric\",\n month: !isSameMonth(start, end) ? \"long\" : void 0,\n year: !isSameYear(start, end) ? \"numeric\" : void 0\n });\n return `${startString} - ${endString}`;\n};\nconst getDaysArray = (month, firstDayOfWeek = 0) => {\n const array = [];\n if (month) {\n const day = new Date(month);\n day.setDate(1);\n day.setDate(1 - (day.getDay() + (7 - firstDayOfWeek)) % 7);\n for (let row = 0; row < 6; row++) {\n for (let col = 0; col < 7; col++) {\n const thisDay = new Date(day);\n array.push(thisDay);\n day.setDate(day.getDate() + 1);\n }\n }\n }\n return array;\n};\nconst incrementToFirstOfMonth = (date, increment) => {\n const newDate = new Date(date);\n newDate.setDate(1);\n newDate.setMonth(newDate.getMonth() + increment);\n return newDate;\n};\nconst stepDay = (date, increment) => new Date(date.setDate(date.getDate() + increment));\nconst mapDatesToOptions = (dates, type = \"year\", locale = \"en-US\") => dates.map(\n (date) => type === \"month\" ? {\n date,\n label: getLocalMonth(date, locale),\n value: date.getMonth().toString()\n } : {\n date,\n label: getLocalYear(date, locale),\n value: date.getFullYear().toString()\n }\n);\nexport {\n getDaysArray,\n getLocalContextualDateRange,\n getLocalDayOfWeek,\n getLocalMonth,\n getLocalMonthYear,\n getLocalStandardDate,\n getLocalYear,\n incrementToFirstOfMonth,\n isBetweenDays,\n isFirstDayOfMonth,\n isLastDayOfMonth,\n isSameDay,\n isSameMonth,\n isSameYear,\n isWeekend,\n mapDatesToOptions,\n stepDay\n};\n","import { defaultDateOptions } from \"../../data/default-date-options.js\";\nimport { defaultDateTimeOptions } from \"../../data/default-date-time-options.js\";\nimport { defaultDayOptions } from \"../../data/default-day-options.js\";\nimport { defaultMonthOptions } from \"../../data/default-month-options.js\";\nimport { defaultTimeOptions } from \"../../data/default-time-options.js\";\nimport { defaultWeekdayOptions } from \"../../data/default-weekday-options.js\";\nimport { defaultYearOptions } from \"../../data/default-year-options.js\";\nimport { getLocale } from \"../shared-utils.js\";\nconst defaultOptionTypes = [\"date\", \"datetime\", \"day\", \"month\", \"time\", \"weekday\", \"year\"];\nconst defaultOptionTypeToLocaleMap = {\n date: defaultDateOptions,\n datetime: defaultDateTimeOptions,\n day: defaultDayOptions,\n month: defaultMonthOptions,\n time: defaultTimeOptions,\n weekday: defaultWeekdayOptions,\n year: defaultYearOptions,\n};\n/**\n * Get locale-specific default options or generic default options\n *\n * @param {string} defaultOptionsTypesRef\n * @param {string | undefined} locale - {string | string[]} locale country code, BCP 47 language string, or array of either - default to 'en-US' if not set\n * @returns {undefined | Intl.DateTimeFormatOptions } standard dateTimeFormat options object\n */\nconst getDefaultLocaleOptions = (defaultOptionsTypesRef, locale) => {\n const localeForLookup = getLocale(locale);\n if (defaultOptionsTypesRef == null) {\n return undefined;\n }\n if (defaultOptionsTypesRef === \"dateTime\") {\n return getDefaultOptions(localeForLookup, \"datetime\");\n }\n // The original implementation of this function had a bug\n // so we're replicating it while we deprecate this function\n if (defaultOptionsTypesRef === \"day\") {\n return { dateStyle: \"short\", timeStyle: \"short\" };\n }\n return getDefaultOptions(localeForLookup, defaultOptionsTypesRef);\n};\n/**\n * Get recommended locale-specific options for common scenarios. These are just recommendations, you're always\n * welcome to pass custom options instead.\n *\n * @param locale locale country code, BCP 47 language string, or array of either - default to 'en-US' if not set\n * @param defaultOptionsType\n * @returns standard dateTimeFormat options object\n */\nconst getDefaultOptions = (locale, defaultOptionsType) => {\n const localeForLookup = getOverrideLookupKey(locale);\n if (!defaultOptionTypes.includes(defaultOptionsType)) {\n throw new Error(`Unexpected value \"${defaultOptionsType}\". Must be one of ${new Intl.ListFormat(\"en\", {\n type: \"disjunction\",\n }).format(defaultOptionTypes)}.`);\n }\n const localeMap = defaultOptionTypeToLocaleMap[defaultOptionsType];\n if (localeMap == null) {\n return {};\n }\n const options = localeMap[localeForLookup] ?? localeMap[\"default\"];\n return options;\n};\nfunction getOverrideLookupKey(locale) {\n const maximized = new Intl.Locale(locale).maximize();\n const { language, script } = maximized;\n const overrideDataKey = `${language}-${script}`;\n return overrideDataKey;\n}\nexport { \n/**\n * @deprecated use getDefaultOptions\n */\ndefaultDateOptions, \n/**\n * @deprecated use getDefaultOptions\n */\ndefaultDateTimeOptions, \n/**\n * @deprecated use getDefaultOptions\n */\ndefaultMonthOptions, \n/**\n * @deprecated use getDefaultOptions\n */\ndefaultTimeOptions, \n/**\n * @deprecated use getDefaultOptions\n */\ndefaultWeekdayOptions, \n/**\n * @deprecated use getDefaultOptions\n */\ndefaultYearOptions, \n/**\n * @deprecated use getDefaultOptions\n */\ngetDefaultLocaleOptions, getDefaultOptions, };\n","export const defaultDateOptions = {\n default: {\n // 12/31/2020\n },\n};\n","const defaultDateTimeOptions = {\n default: {\n // Dec 19, 2020, 7:23 PM\n dateStyle: \"medium\",\n timeStyle: \"short\",\n },\n};\nexport { defaultDateTimeOptions };\n","export const defaultDayOptions = {\n default: {\n day: \"numeric\",\n },\n};\n","const defaultMonthOptions = {\n default: {\n // December\n month: \"long\",\n },\n};\nexport { defaultMonthOptions };\n","const defaultTimeOptions = {\n default: {\n // 7:23 PM\n timeStyle: \"short\",\n },\n};\nexport { defaultTimeOptions };\n","const defaultWeekdayOptions = {\n default: {\n // Wednesday\n weekday: \"long\",\n },\n};\nexport { defaultWeekdayOptions };\n","const defaultYearOptions = {\n default: {\n // 2021\n year: \"numeric\",\n },\n};\nexport { defaultYearOptions };\n","/**\n * Most of the mappings that we have in this file allow for definitions of specific to generic. For\n * example you can create overrides for:\n * - en-Latn-US - Will impact US Latin English\n * - en-Latn - Will impact All Latin English\n * - en - Will impact All English (Latn, Arabic, etc)\n * This function is a utility function to make it easy to get the most specific override based on\n * the locale provided\n */\nexport function getValueForLocale(locale, map) {\n const maximized = new Intl.Locale(locale).maximize();\n const { language, region, script } = maximized;\n const possibleKeys = [`${language}-${script}-${region}`, `${language}-${script}`];\n for (const possibleKey of possibleKeys) {\n const value = map[possibleKey];\n if (value != null) {\n return value;\n }\n }\n return null;\n}\n/**\n * @see valueOverrides\n */\nconst valueOverridesInternal = {\n \"cs-Latn\": {\n month: {\n short: [\n \"led.\",\n \"ún.\",\n \"břz.\",\n \"dub.\",\n \"květ.\",\n \"čvn.\",\n \"čvc.\",\n \"srp.\",\n \"září\",\n \"říj.\",\n \"list.\",\n // Note: If you modify the value on the next line, update the README documentation using the same value\n \"pros.\",\n ],\n },\n },\n \"da-Latn\": {\n month: {\n short: [\n undefined,\n undefined,\n \"marts\",\n \"april\",\n undefined,\n \"juni\",\n \"juli\",\n undefined,\n \"sept.\",\n undefined,\n undefined,\n undefined,\n ],\n },\n },\n \"es-Latn\": {\n month: {\n short: [\n \"ene.\",\n \"feb.\",\n \"mar.\",\n \"abr.\",\n \"may.\",\n \"jun.\",\n \"jul.\",\n \"ago.\",\n \"sept.\",\n \"oct.\",\n \"nov.\",\n \"dic.\",\n ],\n },\n },\n \"hr-Latn\": {\n month: {\n short: [\n \"siječ.\",\n \"velj.\",\n \"ožuj.\",\n \"trav.\",\n \"svib.\",\n \"lip.\",\n \"srp.\",\n \"kol.\",\n \"ruj.\",\n \"list.\",\n \"stud.\",\n \"pros.\",\n ],\n },\n },\n \"is-Latn\": {\n month: {\n long: [\n \"janúar\",\n \"febrúar\",\n \"mars\",\n \"apríl\",\n \"maí\",\n \"júní\",\n \"júlí\",\n \"ágúst\",\n \"september\",\n \"október\",\n \"nóvember\",\n \"desember\",\n ],\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"Á\", \"S\", \"O\", \"N\", \"D\"],\n short: [\n \"jan.\",\n \"feb.\",\n \"mar.\",\n \"apr.\",\n \"maí\",\n \"jún.\",\n \"júl.\",\n \"ágú.\",\n \"sep.\",\n \"okt.\",\n \"nóv.\",\n \"des.\",\n ],\n },\n weekday: {\n long: [\n \"sunnudagur\",\n \"mánudagur\",\n \"þriðjudagur\",\n \"miðvikudagur\",\n \"fimmtudagur\",\n \"föstudagur\",\n \"laugardagur\",\n ],\n narrow: [\"S\", \"M\", \"Þ\", \"M\", \"F\", \"F\", \"L\"],\n short: [\"su.\", \"má.\", \"þr.\", \"mi.\", \"fi.\", \"fö.\", \"la.\"],\n },\n },\n \"no-Latn\": {\n month: {\n short: [\n \"jan.\",\n \"feb.\",\n \"mars\",\n \"apr.\",\n undefined,\n \"juni\",\n \"juli\",\n \"aug.\",\n \"sep.\",\n \"okt.\",\n \"nov.\",\n \"des.\",\n ],\n },\n },\n \"pl-Latn\": {\n month: {\n short: [\n \"stycz.\",\n \"luty\",\n \"mar.\",\n \"kwiec.\",\n \"maj\",\n \"czerw.\",\n \"lip.\",\n \"sierp.\",\n \"wrzes.\",\n \"paźdz.\",\n \"listop.\",\n \"grudz.\",\n ],\n },\n },\n \"pt-Latn\": {\n month: {\n short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Maio\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\n },\n },\n \"ro-Latn\": {\n month: {\n short: [undefined, \"febr.\", \"mart.\"],\n },\n },\n};\n/**\n * Overrides a particular FormatPart's translation depending on the options configured.\n * Anything that is undefined will use the Intl API result.\n */\nexport const valueOverrides = valueOverridesInternal;\n/**\n * Some browsers don't fully support all locales we ship in (ex. Chrome and is-IS)\n * We have some options:\n *\n * 1. Build out the entire formatting/translation logic ourselves\n * 2. Build out the translations/number format logic ourselves but default the formatting to another language which is close enough\n * to the missing language\n * 3. Force formatjs's polyfill to always install and then select the languages we want:\n * https://stackoverflow.com/questions/64188266/how-to-add-missing-locale-to-intl-datetimeformat-es2020-if-browser-doesnt-sup\n *\n * We've gone with option 2 to reduce the amount of code and data stored in this package. Also we only enable it if the locale\n * returns false for Intl.DateTimeFormat.supportedLocalesOf\n */\nexport const unsupportedLocaleToClosetFormat = {\n \"is-Latn\": \"de\",\n};\n/**\n * Allows you to change any formatPart of type literal. Would be useful if you want to change text like \"25th of December\" to \"25th in December\" where \"of\" is the literal.\n */\nexport const literalOverrides = {\n // In Chrome is-IS isn't supported so we need to map the `de` translations to the `is` translations. For all other browsers it will already be \" kl. \" so it won't get matched.\n \"is-Latn\": {\n \" Uhr\": \"\",\n \" Uhr \": \" \",\n \" um \": \" kl. \",\n \" ├Tageshälfte: \": \" ├f.h./e.h.: \",\n AM: \"f.h.\",\n PM: \"e.h.\",\n \"að kvöldi\": \"abends\",\n \"að morgni\": \"morgens\",\n \"kv.\": \"abends\",\n \"mrg.\": \"morgens\",\n },\n};\n/**\n * Options to apply if the key isn't defined\n */\nexport const optionOverrides = {\n \"ar-Arab\": {\n numberingSystem: \"latn\",\n },\n};\n/**\n * @see optionValueOverrides\n */\nconst optionValueOverridesInternal = {};\n/**\n * @see unsupportedOptionValueOverrides\n */\nconst unsupportedOptionValueOverridesInternal = {\n /**\n * Chrome doesn't support is-IS so instead we use de-Latn as it has the closest\n * literals to is-IS. However the values (e.g. day, month, year) still need correcting\n */\n \"is-Latn\": {\n dateStyle: {\n full: {\n day: \"numeric\",\n month: \"long\",\n weekday: \"long\",\n year: \"numeric\",\n },\n long: {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n },\n medium: {\n day: \"numeric\",\n month: \"short\",\n year: \"numeric\",\n },\n short: {\n day: \"numeric\",\n month: \"numeric\",\n year: \"numeric\",\n },\n },\n timeStyle: {\n full: {\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n timeZoneName: \"shortOffset\",\n },\n long: {\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n timeZoneName: \"shortOffset\",\n },\n medium: {\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n },\n short: {\n hour: \"2-digit\",\n minute: \"2-digit\",\n },\n },\n },\n};\n/**\n * This maps from:\n * - Locale to match -> option key to match -> option value to match -> new option values which replace matched option value.\n *\n * Usually used to change dateStyle or timeStyle as the default might not match up with\n * what is expected by our localizers\n */\nexport const optionValueOverrides = optionValueOverridesInternal;\n/**\n * Same as optionValueOverrides however it only applies when the locale is unsupported\n * (e.g. Intl.DateTimeFormat.supportedLocalesOf(locale).length === 0)\n */\nexport const unsupportedOptionValueOverrides = unsupportedOptionValueOverridesInternal;\n// Useful to help unit test\nvalueOverrides[\"zz-Latn\"] = valueOverrides[\"is-Latn\"];\nunsupportedLocaleToClosetFormat[\"zz-Latn\"] = unsupportedLocaleToClosetFormat[\"is-Latn\"];\noptionValueOverrides[\"zz-Latn\"] = optionValueOverrides[\"is-Latn\"];\nunsupportedOptionValueOverrides[\"zz-Latn\"] = unsupportedOptionValueOverrides[\"is-Latn\"];\nliteralOverrides[\"zz-Latn\"] = literalOverrides[\"is-Latn\"];\n","import { getValueForLocale, literalOverrides, optionOverrides, optionValueOverrides, unsupportedLocaleToClosetFormat, unsupportedOptionValueOverrides, valueOverrides, } from \"../../data/format-overrides.js\";\nconst OriginalDateTimeFormat = Intl.DateTimeFormat || function () { };\nexport class DateTimeFormat extends OriginalDateTimeFormat {\n constructor(...args) {\n const [locales, options, ...restArgs] = args;\n const overrideLocales = getOverrideLocales(locales);\n const newOptions = getOverriddenOptions(locales, options, ...restArgs);\n super(overrideLocales, newOptions, ...restArgs);\n if (locales == null) {\n this.originalLocale = this.resolvedOptions().locale;\n }\n else if (typeof locales === \"string\") {\n this.originalLocale = locales;\n }\n else {\n this.originalLocale = locales[0];\n }\n }\n format(...args) {\n return this.formatToParts(...args)\n .map((part) => part.value)\n .join(\"\");\n }\n formatToParts(...args) {\n const [arg0] = args;\n if (arg0 == null) {\n return super.formatToParts(...args);\n }\n const inputDate = new Date(arg0);\n const options = this.resolvedOptions();\n const overrideOptions = { ...options, locale: this.originalLocale };\n const originalParts = super.formatToParts(...args);\n return originalParts.map((part) => applyOverridesToFormatPart(inputDate, overrideOptions, part));\n }\n formatRange(...args) {\n return this.formatRangeToParts(...args)\n .map((part) => part.value)\n .join(\"\");\n }\n formatRangeToParts(...args) {\n const [arg0, arg1] = args;\n // TODO: deal with bigints\n if (arg0 == null || arg1 == null || typeof arg0 === \"bigint\" || typeof arg1 === \"bigint\") {\n return super.formatRangeToParts(...args);\n }\n const startDate = new Date(arg0);\n const endDate = new Date(arg1);\n const options = this.resolvedOptions();\n const overrideOptions = { ...options, locale: this.originalLocale };\n const originalParts = super.formatRangeToParts(...args);\n return originalParts.map((part) => {\n if (part.source === \"endRange\") {\n return applyOverridesToFormatPart(endDate, overrideOptions, part);\n }\n return applyOverridesToFormatPart(startDate, overrideOptions, part);\n });\n }\n}\n/**\n * Injects a local we prefer to use in the event that the engine doesn't support\n * the requested locale\n */\nfunction getOverrideLocales(locales) {\n if (locales == null) {\n return locales;\n }\n // Looks like it is supported, skip all our custom code\n const isLocaleSupported = OriginalDateTimeFormat.supportedLocalesOf?.(locales).length !== 0;\n if (isLocaleSupported) {\n return locales;\n }\n // Get the first locale and see if it's in the lookup map\n const locale = typeof locales === \"string\" ? locales : locales[0];\n const overrideLocale = getValueForLocale(locale, unsupportedLocaleToClosetFormat);\n if (overrideLocale == null) {\n return locales;\n }\n if (typeof locales === \"string\") {\n return [overrideLocale, locales];\n }\n else {\n return [overrideLocale, ...locales];\n }\n}\n/**\n * When we have unsupported locales, we need to translate dateStyle=\"long\" to it's individual parts (year, month, day)\n * So that the numerical formatting will be correct\n */\nfunction getOverriddenOptions(...args) {\n const [locale, options, ...rest] = args;\n let currOptions = options;\n currOptions = getOverriddenValueOptions(locale, currOptions, ...rest);\n currOptions = getOverriddenGeneralOptions(locale, currOptions, ...rest);\n return currOptions;\n}\nfunction getOverriddenGeneralOptions(...args) {\n const [locales, options] = args;\n if (locales == null || locales.length === 0) {\n // No locale, let Intl API fail\n return options;\n }\n const locale = typeof locales === \"string\" ? locales : locales[0];\n const optionOverride = getValueForLocale(locale, optionOverrides);\n if (optionOverride == null) {\n // No overrides, exit\n return options;\n }\n // Spread in only the values that aren't defined, we don't want to overwrite\n // if someone explicitly requested an option\n const newOptions = { ...options };\n for (const [untypedKey, value] of Object.entries(optionOverride)) {\n const key = untypedKey;\n if (newOptions[key] != null) {\n continue;\n }\n newOptions[key] = value;\n }\n return newOptions;\n}\n/**\n * When we have unsupported locales, we need to translate dateStyle=\"long\" to it's individual parts (year, month, day)\n * So that the numerical formatting will be correct\n */\nfunction getOverriddenValueOptions(...args) {\n const [locales, options] = args;\n if (locales == null || locales.length === 0 || options == null) {\n return options;\n }\n const locale = typeof locales === \"string\" ? locales : locales[0];\n const isLocaleSupported = OriginalDateTimeFormat.supportedLocalesOf?.(locales).length !== 0;\n const optionValueOverride = isLocaleSupported\n ? getValueForLocale(locale, optionValueOverrides)\n : getValueForLocale(locale, unsupportedOptionValueOverrides);\n if (optionValueOverride == null) {\n return options;\n }\n let newOptions = { ...options };\n for (const untypedKey in newOptions) {\n const key = untypedKey;\n if (newOptions[key] == null) {\n continue;\n }\n const optionOverride = optionValueOverride[key];\n if (optionOverride == null) {\n continue;\n }\n const optionValue = newOptions[key];\n if (typeof optionValue !== \"string\") {\n continue;\n }\n const replacementOptions = optionOverride[optionValue];\n if (replacementOptions == null) {\n continue;\n }\n delete newOptions[key];\n newOptions = {\n ...newOptions,\n ...replacementOptions,\n };\n }\n return newOptions;\n}\nfunction applyOverridesToFormatPart(inputDate, options, formatPart) {\n const { type: formatPartType, value } = formatPart;\n const { locale } = options;\n if (formatPartType === \"literal\" || formatPartType === \"dayPeriod\") {\n const literalOverride = getValueForLocale(locale, literalOverrides);\n const newValue = literalOverride?.[value];\n if (newValue != null) {\n return {\n ...formatPart,\n value: newValue,\n };\n }\n return formatPart;\n }\n const styleType = getStyle(options, formatPartType);\n if (styleType === undefined) {\n return formatPart;\n }\n // Get the override if it exists, otherwise return the existing format part\n const allOverridesForLocale = getValueForLocale(locale, valueOverrides);\n const d = allOverridesForLocale?.[formatPartType];\n const overridesForPart = d?.[styleType];\n if (overridesForPart == null) {\n return formatPart;\n }\n // Look up the new value since we do have a lookup map for the override\n const lookupValue = getValueForPart(formatPartType, inputDate);\n const newValue = overridesForPart[lookupValue] ?? value;\n return {\n ...formatPart,\n value: newValue,\n };\n}\n/**\n * Helper function to get style from the resolved options since the types of keyof options and\n * Intl.DateTimeFormatPartTypes don't intersect\n * @param options\n * @param formatPartType\n * @returns\n */\nfunction getStyle(options, formatPartType) {\n // @ts-expect-error Yea we're mixing up types\n const value = options[formatPartType];\n if (typeof value !== \"string\") {\n return undefined;\n }\n return value;\n}\n/**\n * Returns the numerical value associated with the part requested\n */\nfunction getValueForPart(formatPartType, inputDate) {\n switch (formatPartType) {\n case \"day\":\n case \"weekday\":\n return inputDate.getDay();\n case \"month\":\n return inputDate.getMonth();\n default:\n throw new Error(`getValueForPart not implemented for ${formatPartType}`);\n }\n}\n","/**\n * Date and Time formatting using native Intl.DateTimeFormat() constructor and format method\n * Creates objects that enable language-sensitive date and time formatting\n *\n * A Unicode BCP 47 locale identifier, each separated by hyphens, consists of:\n * - a language code,\n * - (optionally) a script code,\n * - (optionally) a region (or country) code,\n * - (optionally) one or more variant codes, and\n * - (optionally) one or more extension sequences,\n *\n * Reference:\n * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat)\n * (https://github.com/unicode-org/cldr/tree/master/common)\n * (https://tc39.es/ecma402/#datetimeformat-objects)\n * (https://tc39.es/ecma402/#sec-intl-datetimeformat-constructor)\n * (https://www.unicode.org/reports/tr35/tr35.html#BCP_47_Conformance)\n * (https://www.unicode.org/reports/tr35/#Unicode_locale_identifier)\n *\n */\n// DEFAULTS\nconst defaultLocale = \"en-US\";\n//////////////////////////////////////////////////////////////////////////// UTILITY FUNCTIONS\nconst addDays = (date, days) => {\n const result = new Date(date);\n return new Date(result.setDate(result.getDate() + +days));\n};\nconst addMonths = (date, months) => {\n const result = new Date(date);\n return new Date(result.setMonth(result.getMonth() + +months));\n};\nconst addYears = (date, years) => {\n const result = new Date(date);\n return new Date(result.setFullYear(result.getFullYear() + +years));\n};\n// const isSameTime = (date1: Date, date2: Date): boolean => {\n// return (\n// new Date(new Date().setUTCHours(date1.getUTCHours(), date1.getUTCMinutes(), 0, 0)).getTime() ==\n// new Date(new Date().setUTCHours(date2.getUTCHours(), date2.getUTCMinutes(), 0, 0)).getTime()\n// );\n// };\n/**\n * Evaluate 2 Date objects to determine if Dates are the same date\n * @param date1 Date object\n * @param date2 Date object\n * @returns boolean\n */\nconst isSameDate = (date1, date2) => {\n return (new Date(Date.UTC(date1.getUTCFullYear(), date1.getUTCMonth(), date1.getUTCDate())).valueOf() ==\n new Date(Date.UTC(date2.getUTCFullYear(), date2.getUTCMonth(), date2.getUTCDate())).valueOf());\n};\n/**\n * Evaluate 2 Date objects to determine if Dates are the same date & time\n * @param date1 Date object\n * @param date2 Date object\n * @returns boolean\n */\nconst isSameDateTime = (date1, date2) => {\n return (new Date(Date.UTC(date1.getUTCFullYear(), date1.getUTCMonth(), date1.getUTCDate(), date1.getUTCHours(), date1.getUTCMinutes())).valueOf() ==\n new Date(Date.UTC(date2.getUTCFullYear(), date2.getUTCMonth(), date2.getUTCDate(), date2.getUTCHours(), date2.getUTCMinutes())).valueOf());\n};\n/**\n * Evaluate 2 Date objects to determine if Dates are in the same month\n * @param date1 Date object\n * @param date2 Date object\n * @returns boolean\n */\nconst isSameMonth = (date1, date2) => {\n return isSameYear(date1, date2) && date1.getUTCMonth() == date2.getUTCMonth();\n};\n/**\n * Evaluate 2 Date objects to determine if Dates are in same year\n * @param date1 Date object\n * @param date2 Date object\n * @returns boolean\n */\nconst isSameYear = (date1, date2) => {\n return date1.getUTCFullYear() === date2.getUTCFullYear();\n};\n/**\n *\n * @param dates - array of Dates\n * @returns ordered array of Dates\n */\nconst orderDates = (dates) => {\n return dates.sort((a, b) => a.valueOf() - b.valueOf());\n};\n/**\n *\n * @param listToCheck - key value data object to check for locale-specific and default\n * @param countryCode - region string\n * @returns string\n */\nconst hasCountryDefault = (listToCheck, countryCode) => {\n const listKeys = Object.keys(listToCheck);\n const hasCode = countryCode ? listKeys.find((el) => el.includes(countryCode)) : undefined;\n return hasCode ? listToCheck[hasCode] : listToCheck[\"001\"];\n};\n/**\n * @param loc - locale string\n * @returns formatted locale string or null\n */\nfunction getCleanLocale(loc) {\n return (loc && loc.replace(/[.:].*/, \"\").replace(/_/g, \"-\")) || null;\n}\n/**\n * @param {undefined | string} locale\n * @returns {string} BCP47 locale string\n */\nfunction getLocale(locale) {\n if (Array.isArray(locale)) {\n return getCleanLocale(locale[0]) || defaultLocale;\n }\n return getCleanLocale(locale) || defaultLocale;\n}\n/**\n * @param {Date | number | undefined} date either Date object or timestamp number\n * @returns {Date} Date object\n */\nconst getVerifiedDate = (date) => {\n // if not passed, then use today\n if (!date) {\n return new Date();\n }\n // if a number, treat as a timestamp\n if (typeof date === \"number\") {\n return new Date(new Date(date));\n }\n return new Date(date);\n};\n/**\n * getLocalDateTimeFromUTC formats a UTC date string into a localized date time.\n * This was made specifically for react native, where UTC string to date conversions\n * aren't handled correctly by default.\n * @param {string} dateString - a UTC date string\n * @returns {Date} - Date object localized to the phone's timezone\n * @deprecated This function is stripping the timezone from the date. If you're relying on the\n * timezone to be stripped, you more likely have a bug upstream or downstream that needs to be\n * better documented.\n */\nconst getLocalDateTimeFromUTC = (dateString) => {\n const date = new Date(dateString);\n const milliseconds = Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds());\n return new Date(milliseconds);\n};\n/**\n * getReactNativeLocalDateTime is a wrapper for getLocalDateTimeFromUTC\n * @param {string} dateString - a UTC date string\n * @returns {Date} - Date object localized to the phone's timezone\n * @deprecated See getLocalDateTimeFromUTC\n */\nconst getReactNativeLocalDateTime = (dateString) => getLocalDateTimeFromUTC(dateString);\nexport { addDays, addMonths, addYears, getLocalDateTimeFromUTC, getLocale, getReactNativeLocalDateTime, getVerifiedDate, hasCountryDefault, isSameDate, isSameDateTime, isSameMonth, isSameYear, orderDates, };\n"],"names":["calculateIndicatorSvgAttributes","circle","cx","diameter","cy","r","container","viewBox","concat","Indicator","_ref","ariaLabel","bright","circleProps","className","color","label","size","rest","_objectWithoutProperties","_excluded","svgAttributes","React","_objectSpread","xmlns","fill","calculateIndicatorGroupSvgAttributes","id","isRtl","numIndicators","overlapIndicators","radius","circleOffset","groupWidth","iterable","Array","from","indicators","map","_","i","mask","masks","rectHidden","height","rx","maskDiameter","width","x","maskRadius","y","rectVisible","IndicatorGroup","dir","indicatorSize","overlap","uid","useId","getComputedStyle","document","body","direction","length","overflow","indicator","maskAttributes","key","indicatorAttributes","Day","between","date","end","error","first","focused","highlighted","isDisabled","last","month","onDateSelect","overlapStatusIndicators","selected","start","statusIndicators","inThisMonth","isSameMonth","disabled","dateToIsoDateString","ref","useRef","useEffect","current","setTimeout","focus","undefined","getLocalMonthYear","isSameDay","Date","isWeekend","onClick","e","tabIndex","type","toISOString","slice","getDate","isArray","DaysOfWeek","firstDayOfWeek","locale","days","day","setDate","getDay","col","thisDay","push","getLocalDayOfWeek","isDateEnabled","selectedDate","getUTCMonth","getUTCFullYear","MonthHeader","ariaLabelMonthPicker","months","onNextClick","onPrevClick","min","max","prevMonth","setMonth","getMonth","nextMonth","onKeyDown","getLangDir","target","preventDefault","Icon","data","iconChevronSmall270","iconChevronSmall90","year","getFullYear","toString","padStart","getDatePickerDate","dateType","isIsoDateString","today","setHours","isSameUTCDate","date1","date2","getUTCDate","isDateNotWithinRange","ISO_DATE_STRING_REGEX","test","FormFeedback","feedbackText","feedbackTextProps","helperText","helperTextProps","isDateSelected","DatePicker","ariaLabelDayPicker","density","onBlur","onDateChange","isoDateString","useState","focusedDate","setFocusedDate","useLayoutEffect","prevState","updatedMonth","arguments","useMemo","getDaysArray","useCalendarGrid","incrementToFirstOfMonth","handleDateSelect","newSelectedDay","currentTarget","contains","relatedTarget","classList","HTMLElement","blur","handleDayKeyDown","stepDay","placeholderMap","dayPeriod","era","fractionalSecond","hour","minute","second","timeZoneName","getDateTimeParts","options","newLocale","getLocale","newOptions","getDefaultLocaleOptions","DateTimeFormat","formatToParts","getVerifiedDate","getPlaceholder","formattedReturn","value","char","count","repeat","join","generatePlaceholderString","DatePart","datePartSpec","Month","Year","getLocalePlaceholder","setLocaleDateParts","setValue","placeholder","parts","index","seperatorIndex","dateParts","datePartName","stringToDatePart","cursorStart","datePart","cursorEnd","seperator","replace","placeholderArray","split","dateValueToString","position","datePartsToString","_a","output","getDatePart","getCorrectDatePartValue","cap","newDate","getDaysInMonth","parseInt","getUpdatedDatePart","datePartValueStr","getDefaultDate","FormInputDate","dateDisabled","inputRef","leading","trailing","manualEntry","name","onDatePickerBlur","open","selectOnFocus","readOnly","externalValue","variant","datePickerProps","tooltipProps","expanded","handlers","setExpanded","toggleExpanded","wrapperRef","useTooltipState","getLocalStandardDate","uId","htmlId","willSelectOnFocus","fallbackRef","setDateParts","selectedPosition","setSelectedPosition","cursorRange","setCursorRange","reset","setReset","displayValue","setDisplayValue","input","setSelectionRange","newDateParts","dateToDateParts","isNaN","getTime","dayIndex","monthIndex","yearIndex","updateSelection","Object","keys","positionUpdate","handleZeroInDateParts","updateDisplayValue","dayPart","checkDayRange","setFullYear","datePartsToDate","fixZeroInDateParts","handleBlur","shiftKey","_b","_c","closest","getSelection","select","autoComplete","onChange","prevValue","getDatePartValue","inputValue","forEach","Number","datePartLength","onSelect","event","cursorPos","selectionStart","cursorToPosition","IconButton","iconCalendar","inline","Tooltip","orientation","FormInputOptionGroup","children","layout","onOptionSelect","showVisualCheckbox","htmlName","htmlType","option","toValue","FormInputOption","checked","includes","String","handleChange","labelProps","htmlFor","FormInputSelect","nullOptionsLabel","formattedOptions","opt","iconChevronSmall180","FormInputTextarea","FormLabel","caption","is","Tag","tooltip","commonProps","isSameYear","isFirstDayOfMonth","firstDate","isLastDayOfMonth","lastDate","isBetweenDays","toLocaleDateString","weekday","getLocalContextualDateRange","startString","endString","array","row","increment","defaultOptionTypes","defaultOptionTypeToLocaleMap","default","datetime","dateStyle","timeStyle","time","defaultOptionsTypesRef","localeForLookup","getDefaultOptions","defaultOptionsType","_localeMap$localeForL","maximized","Intl","Locale","maximize","language","script","getOverrideLookupKey","Error","ListFormat","format","localeMap","getValueForLocale","region","possibleKeys","possibleKey","valueOverrides","short","long","narrow","unsupportedLocaleToClosetFormat","literalOverrides","AM","PM","optionOverrides","numberingSystem","optionValueOverrides","unsupportedOptionValueOverrides","full","medium","OriginalDateTimeFormat","constructor","_len","args","_key","locales","restArgs","overrideLocales","_OriginalDateTimeForm","isLocaleSupported","supportedLocalesOf","call","overrideLocale","getOverrideLocales","_len4","_key4","currOptions","_OriginalDateTimeForm2","_len6","_key6","optionValueOverride","untypedKey","optionOverride","optionValue","replacementOptions","getOverriddenValueOptions","_len5","_key5","entries","getOverriddenGeneralOptions","getOverriddenOptions","super","this","originalLocale","resolvedOptions","part","_len2","_key2","arg0","inputDate","overrideOptions","applyOverridesToFormatPart","formatRange","formatRangeToParts","_len3","_key3","arg1","startDate","endDate","source","formatPart","_overridesForPart$loo","formatPartType","literalOverride","newValue","styleType","getStyle","allOverridesForLocale","d","overridesForPart","lookupValue","getValueForPart","defaultLocale","getCleanLocale","loc"],"sourceRoot":""}