722230e87589ad7d34778c32c820b7859f18eca2dee4d865e678c9297174a766.json 286 KB

1
  1. {"ast":null,"code":"import _asyncToGenerator from \"F:/workspace/202226701027/huinongbao-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\n/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { proxyCustomElement, HTMLElement, createEvent, writeTask, h, Host } from '@stencil/core/internal/client';\nimport { startFocusVisible } from './focus-visible.js';\nimport { r as raf, e as renderHiddenInput, g as getElementRoot } from './helpers.js';\nimport { a as printIonError, p as printIonWarning } from './index6.js';\nimport { i as isRTL } from './dir.js';\nimport { c as createColorClasses } from './theme.js';\nimport { a as chevronBack, f as chevronForward, c as chevronDown, g as caretUpSharp, h as caretDownSharp } from './index7.js';\nimport { b as getIonMode } from './ionic-global.js';\nimport { g as generateDayAriaLabel, a as getDay, i as isBefore, b as isAfter, c as isSameDay, d as getPreviousMonth, e as getNextMonth, v as validateParts, f as getPartsFromCalendarDay, h as getNextYear, j as getPreviousYear, k as getEndOfWeek, l as getStartOfWeek, m as getPreviousDay, n as getNextDay, o as getPreviousWeek, p as getNextWeek, q as parseMinParts, r as parseMaxParts, s as parseDate, w as warnIfValueOutOfBounds, t as convertToArrayOfNumbers, u as convertDataToISO, x as getToday, y as getClosestValidDate, z as generateMonths, A as getNumDaysInMonth, B as getCombinedDateColumnData, C as getMonthColumnData, D as getDayColumnData, E as getYearColumnData, F as isMonthFirstLocale, G as getTimeColumnsData, H as isLocaleDayPeriodRTL, I as getMonthAndYear, J as getDaysOfWeek, K as getDaysOfMonth, L as getHourCycle, M as getLocalizedTime, N as getLocalizedDateTime, O as formatValue, P as clampDate, Q as parseAmPm, R as calculateHourFromAMPM } from './data.js';\nimport { d as defineCustomElement$a } from './backdrop.js';\nimport { d as defineCustomElement$9 } from './button.js';\nimport { d as defineCustomElement$8 } from './buttons.js';\nimport { d as defineCustomElement$7 } from './icon.js';\nimport { d as defineCustomElement$6 } from './picker.js';\nimport { d as defineCustomElement$5 } from './picker-column.js';\nimport { d as defineCustomElement$4 } from './picker-column-option.js';\nimport { d as defineCustomElement$3 } from './popover.js';\nimport { d as defineCustomElement$2 } from './ripple-effect.js';\nconst isYearDisabled = (refYear, minParts, maxParts) => {\n if (minParts && minParts.year > refYear) {\n return true;\n }\n if (maxParts && maxParts.year < refYear) {\n return true;\n }\n return false;\n};\n/**\n * Returns true if a given day should\n * not be interactive according to its value,\n * or the max/min dates.\n */\nconst isDayDisabled = (refParts, minParts, maxParts, dayValues) => {\n /**\n * If this is a filler date (i.e. padding)\n * then the date is disabled.\n */\n if (refParts.day === null) {\n return true;\n }\n /**\n * If user passed in a list of acceptable day values\n * check to make sure that the date we are looking\n * at is in this array.\n */\n if (dayValues !== undefined && !dayValues.includes(refParts.day)) {\n return true;\n }\n /**\n * Given a min date, perform the following\n * checks. If any of them are true, then the\n * day should be disabled:\n * 1. Is the current year < the min allowed year?\n * 2. Is the current year === min allowed year,\n * but the current month < the min allowed month?\n * 3. Is the current year === min allowed year, the\n * current month === min allow month, but the current\n * day < the min allowed day?\n */\n if (minParts && isBefore(refParts, minParts)) {\n return true;\n }\n /**\n * Given a max date, perform the following\n * checks. If any of them are true, then the\n * day should be disabled:\n * 1. Is the current year > the max allowed year?\n * 2. Is the current year === max allowed year,\n * but the current month > the max allowed month?\n * 3. Is the current year === max allowed year, the\n * current month === max allow month, but the current\n * day > the max allowed day?\n */\n if (maxParts && isAfter(refParts, maxParts)) {\n return true;\n }\n /**\n * If none of these checks\n * passed then the date should\n * be interactive.\n */\n return false;\n};\n/**\n * Given a locale, a date, the selected date(s), and today's date,\n * generate the state for a given calendar day button.\n */\nconst getCalendarDayState = (locale, refParts, activeParts, todayParts, minParts, maxParts, dayValues) => {\n /**\n * activeParts signals what day(s) are currently selected in the datetime.\n * If multiple=\"true\", this will be an array, but the logic in this util\n * is the same whether we have one selected day or many because we're only\n * calculating the state for one button. So, we treat a single activeParts value\n * the same as an array of length one.\n */\n const activePartsArray = Array.isArray(activeParts) ? activeParts : [activeParts];\n /**\n * The day button is active if it is selected, or in other words, if refParts\n * matches at least one selected date.\n */\n const isActive = activePartsArray.find(parts => isSameDay(refParts, parts)) !== undefined;\n const isToday = isSameDay(refParts, todayParts);\n const disabled = isDayDisabled(refParts, minParts, maxParts, dayValues);\n /**\n * Note that we always return one object regardless of whether activeParts\n * was an array, since we pare down to one value for isActive.\n */\n return {\n disabled,\n isActive,\n isToday,\n ariaSelected: isActive ? 'true' : null,\n ariaLabel: generateDayAriaLabel(locale, isToday, refParts),\n text: refParts.day != null ? getDay(locale, refParts) : null\n };\n};\n/**\n * Returns `true` if the month is disabled given the\n * current date value and min/max date constraints.\n */\nconst isMonthDisabled = (refParts, {\n minParts,\n maxParts\n}) => {\n // If the year is disabled then the month is disabled.\n if (isYearDisabled(refParts.year, minParts, maxParts)) {\n return true;\n }\n // If the date value is before the min date, then the month is disabled.\n // If the date value is after the max date, then the month is disabled.\n if (minParts && isBefore(refParts, minParts) || maxParts && isAfter(refParts, maxParts)) {\n return true;\n }\n return false;\n};\n/**\n * Given a working date, an optional minimum date range,\n * and an optional maximum date range; determine if the\n * previous navigation button is disabled.\n */\nconst isPrevMonthDisabled = (refParts, minParts, maxParts) => {\n const prevMonth = Object.assign(Object.assign({}, getPreviousMonth(refParts)), {\n day: null\n });\n return isMonthDisabled(prevMonth, {\n minParts,\n maxParts\n });\n};\n/**\n * Given a working date and a maximum date range,\n * determine if the next navigation button is disabled.\n */\nconst isNextMonthDisabled = (refParts, maxParts) => {\n const nextMonth = Object.assign(Object.assign({}, getNextMonth(refParts)), {\n day: null\n });\n return isMonthDisabled(nextMonth, {\n maxParts\n });\n};\n/**\n * Given the value of the highlightedDates property\n * and an ISO string, return the styles to use for\n * that date, or undefined if none are found.\n */\nconst getHighlightStyles = (highlightedDates, dateIsoString, el) => {\n if (Array.isArray(highlightedDates)) {\n const dateStringWithoutTime = dateIsoString.split('T')[0];\n const matchingHighlight = highlightedDates.find(hd => hd.date === dateStringWithoutTime);\n if (matchingHighlight) {\n return {\n textColor: matchingHighlight.textColor,\n backgroundColor: matchingHighlight.backgroundColor\n };\n }\n } else {\n /**\n * Wrap in a try-catch to prevent exceptions in the user's function\n * from interrupting the calendar's rendering.\n */\n try {\n return highlightedDates(dateIsoString);\n } catch (e) {\n printIonError('Exception thrown from provided `highlightedDates` callback. Please check your function and try again.', el, e);\n }\n }\n return undefined;\n};\n\n/**\n * If a time zone is provided in the format options, the rendered text could\n * differ from what was selected in the Datetime, which could cause\n * confusion.\n */\nconst warnIfTimeZoneProvided = (el, formatOptions) => {\n var _a, _b, _c, _d;\n if (((_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) === null || _a === void 0 ? void 0 : _a.timeZone) || ((_b = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) === null || _b === void 0 ? void 0 : _b.timeZoneName) || ((_c = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) === null || _c === void 0 ? void 0 : _c.timeZone) || ((_d = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) === null || _d === void 0 ? void 0 : _d.timeZoneName)) {\n printIonWarning('Datetime: \"timeZone\" and \"timeZoneName\" are not supported in \"formatOptions\".', el);\n }\n};\nconst checkForPresentationFormatMismatch = (el, presentation, formatOptions) => {\n // formatOptions is not required\n if (!formatOptions) return;\n // If formatOptions is provided, the date and/or time objects are required, depending on the presentation\n switch (presentation) {\n case 'date':\n case 'month-year':\n case 'month':\n case 'year':\n if (formatOptions.date === undefined) {\n printIonWarning(`Datetime: The '${presentation}' presentation requires a date object in formatOptions.`, el);\n }\n break;\n case 'time':\n if (formatOptions.time === undefined) {\n printIonWarning(`Datetime: The 'time' presentation requires a time object in formatOptions.`, el);\n }\n break;\n case 'date-time':\n case 'time-date':\n if (formatOptions.date === undefined && formatOptions.time === undefined) {\n printIonWarning(`Datetime: The '${presentation}' presentation requires either a date or time object (or both) in formatOptions.`, el);\n }\n break;\n }\n};\nconst datetimeIosCss = \":host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\\\"\\\";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}.calendar-month-year-toggle.ion-focused::after{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}.calendar-month-year-toggle #toggle-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-light, #f4f5f8);--background-rgb:var(--ion-color-light-rgb, 244, 245, 248);--title-color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}:host(.datetime-presentation-date-time:not(.datetime-prefer-wheel)),:host(.datetime-presentation-time-date:not(.datetime-prefer-wheel)),:host(.datetime-presentation-date:not(.datetime-prefer-wheel)){min-height:350px}:host .datetime-header{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:16px;padding-bottom:16px;border-bottom:0.55px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #cccccc));font-size:min(0.875rem, 22.4px)}:host .datetime-header .datetime-title{color:var(--title-color)}:host .datetime-header .datetime-selected-date{margin-top:10px}.calendar-month-year-toggle{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;min-height:44px;font-size:min(1rem, 25.6px);font-weight:600}.calendar-month-year-toggle.ion-focused::after{opacity:0.15}.calendar-month-year-toggle #toggle-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:10px;margin-bottom:10px}:host .calendar-action-buttons .calendar-month-year-toggle ion-icon,:host .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-buttons{padding-left:0;padding-right:0;padding-top:8px;padding-bottom:0}:host .calendar-action-buttons ion-buttons ion-button{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host .calendar-days-of-week{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;color:var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3));font-size:min(0.75rem, 19.2px);font-weight:600;line-height:24px;text-transform:uppercase}@supports (border-radius: mod(1px, 1px)){.calendar-days-of-week .day-of-week{width:clamp(20px, calc(mod(min(1rem, 24px), 24px) * 10), 100%);height:24px;overflow:hidden}.calendar-day{border-radius:max(8px, mod(min(1rem, 24px), 24px) * 10)}}@supports ((border-radius: mod(1px, 1px)) and (background: -webkit-named-image(apple-pay-logo-black)) and (not (contain-intrinsic-size: none))) or (not (border-radius: mod(1px, 1px))){.calendar-days-of-week .day-of-week{width:auto;height:auto;overflow:initial}.calendar-day{border-radius:32px}}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-ms-flex-align:center;align-items:center;height:calc(100% - 16px)}:host .calendar-day-wrapper{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;height:0;min-height:1rem}:host .calendar-day{width:40px;min-width:40px;height:40px;font-size:min(1.25rem, 32px)}.calendar-day.calendar-day-active{background:rgba(var(--ion-color-base-rgb), 0.2);font-size:min(1.375rem, 35.2px)}:host .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-active{color:var(--ion-color-base);font-weight:600}:host .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:16px;font-size:min(1rem, 25.6px)}:host .datetime-time .time-header{font-weight:600}:host .datetime-buttons{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;border-top:0.55px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #cccccc))}:host .datetime-buttons ::slotted(ion-buttons),:host .datetime-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}:host .datetime-action-buttons{width:100%}\";\nconst IonDatetimeIosStyle0 = datetimeIosCss;\nconst datetimeMdCss = \":host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\\\"\\\";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}.calendar-month-year-toggle.ion-focused::after{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}.calendar-month-year-toggle #toggle-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #ffffff));--title-color:var(--ion-color-contrast)}:host .datetime-header{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px;padding-top:20px;padding-bottom:20px;background:var(--ion-color-base);color:var(--title-color)}:host .datetime-header .datetime-title{font-size:0.75rem;text-transform:uppercase}:host .datetime-header .datetime-selected-date{margin-top:30px;font-size:2.125rem}:host .calendar-action-buttons ion-button{--color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}.calendar-month-year-toggle{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:12px;min-height:48px;background:transparent;color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959));z-index:1}.calendar-month-year-toggle.ion-focused::after{opacity:0.04}.calendar-month-year-toggle ion-ripple-effect{color:currentColor}@media (any-hover: hover){.calendar-month-year-toggle.ion-activatable:not(.ion-focused):hover::after{background:currentColor;opacity:0.04}}:host .calendar-days-of-week{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:0px;padding-bottom:0px;color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray));font-size:0.875rem;line-height:36px}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:4px;padding-bottom:4px;grid-template-rows:repeat(6, 1fr)}:host .calendar-day{width:42px;min-width:42px;height:42px;font-size:0.875rem}:host .calendar-day.calendar-day-today{border:1px solid var(--ion-color-base);color:var(--ion-color-base)}:host .calendar-day.calendar-day-active{color:var(--ion-color-contrast)}.calendar-day.calendar-day-active{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:8px}:host .time-header{color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}:host(.datetime-presentation-month) .datetime-year,:host(.datetime-presentation-year) .datetime-year,:host(.datetime-presentation-month-year) .datetime-year{margin-top:20px;margin-bottom:20px}:host .datetime-buttons{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}\";\nconst IonDatetimeMdStyle0 = datetimeMdCss;\nconst Datetime = /*@__PURE__*/proxyCustomElement(class Datetime extends HTMLElement {\n constructor() {\n var _this;\n super();\n _this = this;\n this.__registerHost();\n this.__attachShadow();\n this.ionCancel = createEvent(this, \"ionCancel\", 7);\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.ionValueChange = createEvent(this, \"ionValueChange\", 7);\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n this.ionRender = createEvent(this, \"ionRender\", 7);\n this.inputId = `ion-dt-${datetimeIds++}`;\n this.prevPresentation = null;\n this.warnIfIncorrectValueUsage = () => {\n const {\n multiple,\n value\n } = this;\n if (!multiple && Array.isArray(value)) {\n /**\n * We do some processing on the `value` array so\n * that it looks more like an array when logged to\n * the console.\n * Example given ['a', 'b']\n * Default toString() behavior: a,b\n * Custom behavior: ['a', 'b']\n */\n printIonWarning(`ion-datetime was passed an array of values, but multiple=\"false\". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the \"value\" property when multiple=\"false\".\n\n Value Passed: [${value.map(v => `'${v}'`).join(', ')}]\n`, this.el);\n }\n };\n this.setValue = value => {\n this.value = value;\n this.ionChange.emit({\n value\n });\n };\n /**\n * Returns the DatetimePart interface\n * to use when rendering an initial set of\n * data. This should be used when rendering an\n * interface in an environment where the `value`\n * may not be set. This function works\n * by returning the first selected date and then\n * falling back to defaultParts if no active date\n * is selected.\n */\n this.getActivePartsWithFallback = () => {\n var _a;\n const {\n defaultParts\n } = this;\n return (_a = this.getActivePart()) !== null && _a !== void 0 ? _a : defaultParts;\n };\n this.getActivePart = () => {\n const {\n activeParts\n } = this;\n return Array.isArray(activeParts) ? activeParts[0] : activeParts;\n };\n this.closeParentOverlay = role => {\n const popoverOrModal = this.el.closest('ion-modal, ion-popover');\n if (popoverOrModal) {\n popoverOrModal.dismiss(undefined, role);\n }\n };\n this.setWorkingParts = parts => {\n this.workingParts = Object.assign({}, parts);\n };\n this.setActiveParts = (parts, removeDate = false) => {\n /** if the datetime component is in readonly mode,\n * allow browsing of the calendar without changing\n * the set value\n */\n if (this.readonly) {\n return;\n }\n const {\n multiple,\n minParts,\n maxParts,\n activeParts\n } = this;\n /**\n * When setting the active parts, it is possible\n * to set invalid data. For example,\n * when updating January 31 to February,\n * February 31 does not exist. As a result\n * we need to validate the active parts and\n * ensure that we are only setting valid dates.\n * Additionally, we need to update the working parts\n * too in the event that the validated parts are different.\n */\n const validatedParts = validateParts(parts, minParts, maxParts);\n this.setWorkingParts(validatedParts);\n if (multiple) {\n const activePartsArray = Array.isArray(activeParts) ? activeParts : [activeParts];\n if (removeDate) {\n this.activeParts = activePartsArray.filter(p => !isSameDay(p, validatedParts));\n } else {\n this.activeParts = [...activePartsArray, validatedParts];\n }\n } else {\n this.activeParts = Object.assign({}, validatedParts);\n }\n const hasSlottedButtons = this.el.querySelector('[slot=\"buttons\"]') !== null;\n if (hasSlottedButtons || this.showDefaultButtons) {\n return;\n }\n this.confirm();\n };\n this.initializeKeyboardListeners = () => {\n const calendarBodyRef = this.calendarBodyRef;\n if (!calendarBodyRef) {\n return;\n }\n const root = this.el.shadowRoot;\n /**\n * Get a reference to the month\n * element we are currently viewing.\n */\n const currentMonth = calendarBodyRef.querySelector('.calendar-month:nth-of-type(2)');\n /**\n * When focusing the calendar body, we want to pass focus\n * to the working day, but other days should\n * only be accessible using the arrow keys. Pressing\n * Tab should jump between bodies of selectable content.\n */\n const checkCalendarBodyFocus = ev => {\n var _a;\n const record = ev[0];\n /**\n * If calendar body was already focused\n * when this fired or if the calendar body\n * if not currently focused, we should not re-focus\n * the inner day.\n */\n if (((_a = record.oldValue) === null || _a === void 0 ? void 0 : _a.includes('ion-focused')) || !calendarBodyRef.classList.contains('ion-focused')) {\n return;\n }\n this.focusWorkingDay(currentMonth);\n };\n const mo = new MutationObserver(checkCalendarBodyFocus);\n mo.observe(calendarBodyRef, {\n attributeFilter: ['class'],\n attributeOldValue: true\n });\n this.destroyKeyboardMO = () => {\n mo === null || mo === void 0 ? void 0 : mo.disconnect();\n };\n /**\n * We must use keydown not keyup as we want\n * to prevent scrolling when using the arrow keys.\n */\n calendarBodyRef.addEventListener('keydown', ev => {\n const activeElement = root.activeElement;\n if (!activeElement || !activeElement.classList.contains('calendar-day')) {\n return;\n }\n const parts = getPartsFromCalendarDay(activeElement);\n let partsToFocus;\n switch (ev.key) {\n case 'ArrowDown':\n ev.preventDefault();\n partsToFocus = getNextWeek(parts);\n break;\n case 'ArrowUp':\n ev.preventDefault();\n partsToFocus = getPreviousWeek(parts);\n break;\n case 'ArrowRight':\n ev.preventDefault();\n partsToFocus = getNextDay(parts);\n break;\n case 'ArrowLeft':\n ev.preventDefault();\n partsToFocus = getPreviousDay(parts);\n break;\n case 'Home':\n ev.preventDefault();\n partsToFocus = getStartOfWeek(parts);\n break;\n case 'End':\n ev.preventDefault();\n partsToFocus = getEndOfWeek(parts);\n break;\n case 'PageUp':\n ev.preventDefault();\n partsToFocus = ev.shiftKey ? getPreviousYear(parts) : getPreviousMonth(parts);\n break;\n case 'PageDown':\n ev.preventDefault();\n partsToFocus = ev.shiftKey ? getNextYear(parts) : getNextMonth(parts);\n break;\n /**\n * Do not preventDefault here\n * as we do not want to override other\n * browser defaults such as pressing Enter/Space\n * to select a day.\n */\n default:\n return;\n }\n /**\n * If the day we want to move focus to is\n * disabled, do not do anything.\n */\n if (isDayDisabled(partsToFocus, this.minParts, this.maxParts)) {\n return;\n }\n this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), partsToFocus));\n /**\n * Give view a chance to re-render\n * then move focus to the new working day\n */\n requestAnimationFrame(() => this.focusWorkingDay(currentMonth));\n });\n };\n this.focusWorkingDay = currentMonth => {\n /**\n * Get the number of padding days so\n * we know how much to offset our next selector by\n * to grab the correct calendar-day element.\n */\n const padding = currentMonth.querySelectorAll('.calendar-day-padding');\n const {\n day\n } = this.workingParts;\n if (day === null) {\n return;\n }\n /**\n * Get the calendar day element\n * and focus it.\n */\n const dayEl = currentMonth.querySelector(`.calendar-day-wrapper:nth-of-type(${padding.length + day}) .calendar-day`);\n if (dayEl) {\n dayEl.focus();\n }\n };\n this.processMinParts = () => {\n const {\n min,\n defaultParts\n } = this;\n if (min === undefined) {\n this.minParts = undefined;\n return;\n }\n this.minParts = parseMinParts(min, defaultParts);\n };\n this.processMaxParts = () => {\n const {\n max,\n defaultParts\n } = this;\n if (max === undefined) {\n this.maxParts = undefined;\n return;\n }\n this.maxParts = parseMaxParts(max, defaultParts);\n };\n this.initializeCalendarListener = () => {\n const calendarBodyRef = this.calendarBodyRef;\n if (!calendarBodyRef) {\n return;\n }\n /**\n * For performance reasons, we only render 3\n * months at a time: The current month, the previous\n * month, and the next month. We have a scroll listener\n * on the calendar body to append/prepend new months.\n *\n * We can do this because Stencil is smart enough to not\n * re-create the .calendar-month containers, but rather\n * update the content within those containers.\n *\n * As an added bonus, WebKit has some troubles with\n * scroll-snap-stop: always, so not rendering all of\n * the months in a row allows us to mostly sidestep\n * that issue.\n */\n const months = calendarBodyRef.querySelectorAll('.calendar-month');\n const startMonth = months[0];\n const workingMonth = months[1];\n const endMonth = months[2];\n const mode = getIonMode(this);\n const needsiOSRubberBandFix = mode === 'ios' && typeof navigator !== 'undefined' && navigator.maxTouchPoints > 1;\n /**\n * Before setting up the scroll listener,\n * scroll the middle month into view.\n * scrollIntoView() will scroll entire page\n * if element is not in viewport. Use scrollLeft instead.\n */\n writeTask(() => {\n calendarBodyRef.scrollLeft = startMonth.clientWidth * (isRTL(this.el) ? -1 : 1);\n const getChangedMonth = parts => {\n const box = calendarBodyRef.getBoundingClientRect();\n /**\n * If the current scroll position is all the way to the left\n * then we have scrolled to the previous month.\n * Otherwise, assume that we have scrolled to the next\n * month. We have a tolerance of 2px to account for\n * sub pixel rendering.\n *\n * Check below the next line ensures that we did not\n * swipe and abort (i.e. we swiped but we are still on the current month).\n */\n const condition = isRTL(this.el) ? calendarBodyRef.scrollLeft >= -2 : calendarBodyRef.scrollLeft <= 2;\n const month = condition ? startMonth : endMonth;\n /**\n * The edge of the month must be lined up with\n * the edge of the calendar body in order for\n * the component to update. Otherwise, it\n * may be the case that the user has paused their\n * swipe or the browser has not finished snapping yet.\n * Rather than check if the x values are equal,\n * we give it a tolerance of 2px to account for\n * sub pixel rendering.\n */\n const monthBox = month.getBoundingClientRect();\n if (Math.abs(monthBox.x - box.x) > 2) return;\n /**\n * If we're force-rendering a month, assume we've\n * scrolled to that and return it.\n *\n * If forceRenderDate is ever used in a context where the\n * forced month is not immediately auto-scrolled to, this\n * should be updated to also check whether `month` has the\n * same month and year as the forced date.\n */\n const {\n forceRenderDate\n } = this;\n if (forceRenderDate !== undefined) {\n return {\n month: forceRenderDate.month,\n year: forceRenderDate.year,\n day: forceRenderDate.day\n };\n }\n /**\n * From here, we can determine if the start\n * month or the end month was scrolled into view.\n * If no month was changed, then we can return from\n * the scroll callback early.\n */\n if (month === startMonth) {\n return getPreviousMonth(parts);\n } else if (month === endMonth) {\n return getNextMonth(parts);\n } else {\n return;\n }\n };\n const updateActiveMonth = () => {\n if (needsiOSRubberBandFix) {\n calendarBodyRef.style.removeProperty('pointer-events');\n appliediOSRubberBandFix = false;\n }\n /**\n * If the month did not change\n * then we can return early.\n */\n const newDate = getChangedMonth(this.workingParts);\n if (!newDate) return;\n const {\n month,\n day,\n year\n } = newDate;\n if (isMonthDisabled({\n month,\n year,\n day: null\n }, {\n minParts: Object.assign(Object.assign({}, this.minParts), {\n day: null\n }),\n maxParts: Object.assign(Object.assign({}, this.maxParts), {\n day: null\n })\n })) {\n return;\n }\n /**\n * Prevent scrolling for other browsers\n * to give the DOM time to update and the container\n * time to properly snap.\n */\n calendarBodyRef.style.setProperty('overflow', 'hidden');\n /**\n * Use a writeTask here to ensure\n * that the state is updated and the\n * correct month is scrolled into view\n * in the same frame. This is not\n * typically a problem on newer devices\n * but older/slower device may have a flicker\n * if we did not do this.\n */\n writeTask(() => {\n this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), {\n month,\n day: day,\n year\n }));\n calendarBodyRef.scrollLeft = workingMonth.clientWidth * (isRTL(this.el) ? -1 : 1);\n calendarBodyRef.style.removeProperty('overflow');\n if (this.resolveForceDateScrolling) {\n this.resolveForceDateScrolling();\n }\n });\n };\n /**\n * When the container finishes scrolling we\n * need to update the DOM with the selected month.\n */\n let scrollTimeout;\n /**\n * We do not want to attempt to set pointer-events\n * multiple times within a single swipe gesture as\n * that adds unnecessary work to the main thread.\n */\n let appliediOSRubberBandFix = false;\n const scrollCallback = () => {\n if (scrollTimeout) {\n clearTimeout(scrollTimeout);\n }\n /**\n * On iOS it is possible to quickly rubber band\n * the scroll area before the scroll timeout has fired.\n * This results in users reaching the end of the scrollable\n * container before the DOM has updated.\n * By setting `pointer-events: none` we can ensure that\n * subsequent swipes do not happen while the container\n * is snapping.\n */\n if (!appliediOSRubberBandFix && needsiOSRubberBandFix) {\n calendarBodyRef.style.setProperty('pointer-events', 'none');\n appliediOSRubberBandFix = true;\n }\n // Wait ~3 frames\n scrollTimeout = setTimeout(updateActiveMonth, 50);\n };\n calendarBodyRef.addEventListener('scroll', scrollCallback);\n this.destroyCalendarListener = () => {\n calendarBodyRef.removeEventListener('scroll', scrollCallback);\n };\n });\n };\n /**\n * Clean up all listeners except for the overlay\n * listener. This is so that we can re-create the listeners\n * if the datetime has been hidden/presented by a modal or popover.\n */\n this.destroyInteractionListeners = () => {\n const {\n destroyCalendarListener,\n destroyKeyboardMO\n } = this;\n if (destroyCalendarListener !== undefined) {\n destroyCalendarListener();\n }\n if (destroyKeyboardMO !== undefined) {\n destroyKeyboardMO();\n }\n };\n this.processValue = value => {\n const hasValue = value !== null && value !== undefined && value !== '' && (!Array.isArray(value) || value.length > 0);\n const valueToProcess = hasValue ? parseDate(value) : this.defaultParts;\n const {\n minParts,\n maxParts,\n workingParts,\n el\n } = this;\n this.warnIfIncorrectValueUsage();\n /**\n * Return early if the value wasn't parsed correctly, such as\n * if an improperly formatted date string was provided.\n */\n if (!valueToProcess) {\n return;\n }\n /**\n * Datetime should only warn of out of bounds values\n * if set by the user. If the `value` is undefined,\n * we will default to today's date which may be out\n * of bounds. In this case, the warning makes it look\n * like the developer did something wrong which is\n * not true.\n */\n if (hasValue) {\n warnIfValueOutOfBounds(valueToProcess, minParts, maxParts);\n }\n /**\n * If there are multiple values, pick an arbitrary one to clamp to. This way,\n * if the values are across months, we always show at least one of them. Note\n * that the values don't necessarily have to be in order.\n */\n const singleValue = Array.isArray(valueToProcess) ? valueToProcess[0] : valueToProcess;\n const targetValue = clampDate(singleValue, minParts, maxParts);\n const {\n month,\n day,\n year,\n hour,\n minute\n } = targetValue;\n const ampm = parseAmPm(hour);\n /**\n * Since `activeParts` indicates a value that\n * been explicitly selected either by the\n * user or the app, only update `activeParts`\n * if the `value` property is set.\n */\n if (hasValue) {\n if (Array.isArray(valueToProcess)) {\n this.activeParts = [...valueToProcess];\n } else {\n this.activeParts = {\n month,\n day,\n year,\n hour,\n minute,\n ampm\n };\n }\n } else {\n /**\n * Reset the active parts if the value is not set.\n * This will clear the selected calendar day when\n * performing a clear action or using the reset() method.\n */\n this.activeParts = [];\n }\n /**\n * Only animate if:\n * 1. We're using grid style (wheel style pickers should just jump to new value)\n * 2. The month and/or year actually changed, and both are defined (otherwise there's nothing to animate to)\n * 3. The calendar body is visible (prevents animation when in collapsed datetime-button, for example)\n * 4. The month/year picker is not open (since you wouldn't see the animation anyway)\n */\n const didChangeMonth = month !== undefined && month !== workingParts.month || year !== undefined && year !== workingParts.year;\n const bodyIsVisible = el.classList.contains('datetime-ready');\n const {\n isGridStyle,\n showMonthAndYear\n } = this;\n let areAllSelectedDatesInSameMonth = true;\n if (Array.isArray(valueToProcess)) {\n const firstMonth = valueToProcess[0].month;\n for (const date of valueToProcess) {\n if (date.month !== firstMonth) {\n areAllSelectedDatesInSameMonth = false;\n break;\n }\n }\n }\n /**\n * If there is more than one date selected\n * and the dates aren't all in the same month,\n * then we should neither animate to the date\n * nor update the working parts because we do\n * not know which date the user wants to view.\n */\n if (areAllSelectedDatesInSameMonth) {\n if (isGridStyle && didChangeMonth && bodyIsVisible && !showMonthAndYear) {\n this.animateToDate(targetValue);\n } else {\n /**\n * We only need to do this if we didn't just animate to a new month,\n * since that calls prevMonth/nextMonth which calls setWorkingParts for us.\n */\n this.setWorkingParts({\n month,\n day,\n year,\n hour,\n minute,\n ampm\n });\n }\n }\n };\n this.animateToDate = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (targetValue) {\n const {\n workingParts\n } = _this;\n /**\n * Tell other render functions that we need to force the\n * target month to appear in place of the actual next/prev month.\n * Because this is a State variable, a rerender will be triggered\n * automatically, updating the rendered months.\n */\n _this.forceRenderDate = targetValue;\n /**\n * Flag that we've started scrolling to the forced date.\n * The resolve function will be called by the datetime's\n * scroll listener when it's done updating everything.\n * This is a replacement for making prev/nextMonth async,\n * since the logic we're waiting on is in a listener.\n */\n const forceDateScrollingPromise = new Promise(resolve => {\n _this.resolveForceDateScrolling = resolve;\n });\n /**\n * Animate smoothly to the forced month. This will also update\n * workingParts and correct the surrounding months for us.\n */\n const targetMonthIsBefore = isBefore(targetValue, workingParts);\n targetMonthIsBefore ? _this.prevMonth() : _this.nextMonth();\n yield forceDateScrollingPromise;\n _this.resolveForceDateScrolling = undefined;\n _this.forceRenderDate = undefined;\n });\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }();\n this.onFocus = () => {\n this.ionFocus.emit();\n };\n this.onBlur = () => {\n this.ionBlur.emit();\n };\n this.hasValue = () => {\n return this.value != null;\n };\n this.nextMonth = () => {\n const calendarBodyRef = this.calendarBodyRef;\n if (!calendarBodyRef) {\n return;\n }\n const nextMonth = calendarBodyRef.querySelector('.calendar-month:last-of-type');\n if (!nextMonth) {\n return;\n }\n const left = nextMonth.offsetWidth * 2;\n calendarBodyRef.scrollTo({\n top: 0,\n left: left * (isRTL(this.el) ? -1 : 1),\n behavior: 'smooth'\n });\n };\n this.prevMonth = () => {\n const calendarBodyRef = this.calendarBodyRef;\n if (!calendarBodyRef) {\n return;\n }\n const prevMonth = calendarBodyRef.querySelector('.calendar-month:first-of-type');\n if (!prevMonth) {\n return;\n }\n calendarBodyRef.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n };\n this.toggleMonthAndYearView = () => {\n this.showMonthAndYear = !this.showMonthAndYear;\n };\n this.showMonthAndYear = false;\n this.activeParts = [];\n this.workingParts = {\n month: 5,\n day: 28,\n year: 2021,\n hour: 13,\n minute: 52,\n ampm: 'pm'\n };\n this.isTimePopoverOpen = false;\n this.forceRenderDate = undefined;\n this.color = 'primary';\n this.name = this.inputId;\n this.disabled = false;\n this.formatOptions = undefined;\n this.readonly = false;\n this.isDateEnabled = undefined;\n this.min = undefined;\n this.max = undefined;\n this.presentation = 'date-time';\n this.cancelText = 'Cancel';\n this.doneText = 'Done';\n this.clearText = 'Clear';\n this.yearValues = undefined;\n this.monthValues = undefined;\n this.dayValues = undefined;\n this.hourValues = undefined;\n this.minuteValues = undefined;\n this.locale = 'default';\n this.firstDayOfWeek = 0;\n this.titleSelectedDatesFormatter = undefined;\n this.multiple = false;\n this.highlightedDates = undefined;\n this.value = undefined;\n this.showDefaultTitle = false;\n this.showDefaultButtons = false;\n this.showClearButton = false;\n this.showDefaultTimeLabel = true;\n this.hourCycle = undefined;\n this.size = 'fixed';\n this.preferWheel = false;\n }\n formatOptionsChanged() {\n const {\n el,\n formatOptions,\n presentation\n } = this;\n checkForPresentationFormatMismatch(el, presentation, formatOptions);\n warnIfTimeZoneProvided(el, formatOptions);\n }\n disabledChanged() {\n this.emitStyle();\n }\n minChanged() {\n this.processMinParts();\n }\n maxChanged() {\n this.processMaxParts();\n }\n presentationChanged() {\n const {\n el,\n formatOptions,\n presentation\n } = this;\n checkForPresentationFormatMismatch(el, presentation, formatOptions);\n }\n get isGridStyle() {\n const {\n presentation,\n preferWheel\n } = this;\n const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';\n return hasDatePresentation && !preferWheel;\n }\n yearValuesChanged() {\n this.parsedYearValues = convertToArrayOfNumbers(this.yearValues);\n }\n monthValuesChanged() {\n this.parsedMonthValues = convertToArrayOfNumbers(this.monthValues);\n }\n dayValuesChanged() {\n this.parsedDayValues = convertToArrayOfNumbers(this.dayValues);\n }\n hourValuesChanged() {\n this.parsedHourValues = convertToArrayOfNumbers(this.hourValues);\n }\n minuteValuesChanged() {\n this.parsedMinuteValues = convertToArrayOfNumbers(this.minuteValues);\n }\n /**\n * Update the datetime value when the value changes\n */\n valueChanged() {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n const {\n value\n } = _this2;\n if (_this2.hasValue()) {\n _this2.processValue(value);\n }\n _this2.emitStyle();\n _this2.ionValueChange.emit({\n value\n });\n })();\n }\n /**\n * Confirms the selected datetime value, updates the\n * `value` property, and optionally closes the popover\n * or modal that the datetime was presented in.\n */\n confirm(closeOverlay = false) {\n var _this3 = this;\n return _asyncToGenerator(function* () {\n const {\n isCalendarPicker,\n activeParts,\n preferWheel,\n workingParts\n } = _this3;\n /**\n * We only update the value if the presentation is not a calendar picker.\n */\n if (activeParts !== undefined || !isCalendarPicker) {\n const activePartsIsArray = Array.isArray(activeParts);\n if (activePartsIsArray && activeParts.length === 0) {\n if (preferWheel) {\n /**\n * If the datetime is using a wheel picker, but the\n * active parts are empty, then the user has confirmed the\n * initial value (working parts) presented to them.\n */\n _this3.setValue(convertDataToISO(workingParts));\n } else {\n _this3.setValue(undefined);\n }\n } else {\n _this3.setValue(convertDataToISO(activeParts));\n }\n }\n if (closeOverlay) {\n _this3.closeParentOverlay(CONFIRM_ROLE);\n }\n })();\n }\n /**\n * Resets the internal state of the datetime but does not update the value.\n * Passing a valid ISO-8601 string will reset the state of the component to the provided date.\n * If no value is provided, the internal state will be reset to the clamped value of the min, max and today.\n */\n reset(startDate) {\n var _this4 = this;\n return _asyncToGenerator(function* () {\n _this4.processValue(startDate);\n })();\n }\n /**\n * Emits the ionCancel event and\n * optionally closes the popover\n * or modal that the datetime was\n * presented in.\n */\n cancel(closeOverlay = false) {\n var _this5 = this;\n return _asyncToGenerator(function* () {\n _this5.ionCancel.emit();\n if (closeOverlay) {\n _this5.closeParentOverlay(CANCEL_ROLE);\n }\n })();\n }\n get isCalendarPicker() {\n const {\n presentation\n } = this;\n return presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';\n }\n connectedCallback() {\n this.clearFocusVisible = startFocusVisible(this.el).destroy;\n }\n disconnectedCallback() {\n if (this.clearFocusVisible) {\n this.clearFocusVisible();\n this.clearFocusVisible = undefined;\n }\n }\n initializeListeners() {\n this.initializeCalendarListener();\n this.initializeKeyboardListeners();\n }\n componentDidLoad() {\n const {\n el,\n intersectionTrackerRef\n } = this;\n /**\n * If a scrollable element is hidden using `display: none`,\n * it will not have a scroll height meaning we cannot scroll elements\n * into view. As a result, we will need to wait for the datetime to become\n * visible if used inside of a modal or a popover otherwise the scrollable\n * areas will not have the correct values snapped into place.\n */\n const visibleCallback = entries => {\n const ev = entries[0];\n if (!ev.isIntersecting) {\n return;\n }\n this.initializeListeners();\n /**\n * TODO FW-2793: Datetime needs a frame to ensure that it\n * can properly scroll contents into view. As a result\n * we hide the scrollable content until after that frame\n * so users do not see the content quickly shifting. The downside\n * is that the content will pop into view a frame after. Maybe there\n * is a better way to handle this?\n */\n writeTask(() => {\n this.el.classList.add('datetime-ready');\n });\n };\n const visibleIO = new IntersectionObserver(visibleCallback, {\n threshold: 0.01,\n root: el\n });\n /**\n * Use raf to avoid a race condition between the component loading and\n * its display animation starting (such as when shown in a modal). This\n * could cause the datetime to start at a visibility of 0, erroneously\n * triggering the `hiddenIO` observer below.\n */\n raf(() => visibleIO === null || visibleIO === void 0 ? void 0 : visibleIO.observe(intersectionTrackerRef));\n /**\n * We need to clean up listeners when the datetime is hidden\n * in a popover/modal so that we can properly scroll containers\n * back into view if they are re-presented. When the datetime is hidden\n * the scroll areas have scroll widths/heights of 0px, so any snapping\n * we did originally has been lost.\n */\n const hiddenCallback = entries => {\n const ev = entries[0];\n if (ev.isIntersecting) {\n return;\n }\n this.destroyInteractionListeners();\n /**\n * When datetime is hidden, we need to make sure that\n * the month/year picker is closed. Otherwise,\n * it will be open when the datetime re-appears\n * and the scroll area of the calendar grid will be 0.\n * As a result, the wrong month will be shown.\n */\n this.showMonthAndYear = false;\n writeTask(() => {\n this.el.classList.remove('datetime-ready');\n });\n };\n const hiddenIO = new IntersectionObserver(hiddenCallback, {\n threshold: 0,\n root: el\n });\n raf(() => hiddenIO === null || hiddenIO === void 0 ? void 0 : hiddenIO.observe(intersectionTrackerRef));\n /**\n * Datetime uses Ionic components that emit\n * ionFocus and ionBlur. These events are\n * composed meaning they will cross\n * the shadow dom boundary. We need to\n * stop propagation on these events otherwise\n * developers will see 2 ionFocus or 2 ionBlur\n * events at a time.\n */\n const root = getElementRoot(this.el);\n root.addEventListener('ionFocus', ev => ev.stopPropagation());\n root.addEventListener('ionBlur', ev => ev.stopPropagation());\n }\n /**\n * When the presentation is changed, all calendar content is recreated,\n * so we need to re-init behavior with the new elements.\n */\n componentDidRender() {\n const {\n presentation,\n prevPresentation,\n calendarBodyRef,\n minParts,\n preferWheel,\n forceRenderDate\n } = this;\n /**\n * TODO(FW-2165)\n * Remove this when https://bugs.webkit.org/show_bug.cgi?id=235960 is fixed.\n * When using `min`, we add `scroll-snap-align: none`\n * to the disabled month so that users cannot scroll to it.\n * This triggers a bug in WebKit where the scroll position is reset.\n * Since the month change logic is handled by a scroll listener,\n * this causes the month to change leading to `scroll-snap-align`\n * changing again, thus changing the scroll position again and causing\n * an infinite loop.\n * This issue only applies to the calendar grid, so we can disable\n * it if the calendar grid is not being used.\n */\n const hasCalendarGrid = !preferWheel && ['date-time', 'time-date', 'date'].includes(presentation);\n if (minParts !== undefined && hasCalendarGrid && calendarBodyRef) {\n const workingMonth = calendarBodyRef.querySelector('.calendar-month:nth-of-type(1)');\n /**\n * We need to make sure the datetime is not in the process\n * of scrolling to a new datetime value if the value\n * is updated programmatically.\n * Otherwise, the datetime will appear to not scroll at all because\n * we are resetting the scroll position to the center of the view.\n * Prior to the datetime's value being updated programmatically,\n * the calendarBodyRef is scrolled such that the middle month is centered\n * in the view. The below code updates the scroll position so the middle\n * month is also centered in the view. Since the scroll position did not change,\n * the scroll callback in this file does not fire,\n * and the resolveForceDateScrolling promise never resolves.\n */\n if (workingMonth && forceRenderDate === undefined) {\n calendarBodyRef.scrollLeft = workingMonth.clientWidth * (isRTL(this.el) ? -1 : 1);\n }\n }\n if (prevPresentation === null) {\n this.prevPresentation = presentation;\n return;\n }\n if (presentation === prevPresentation) {\n return;\n }\n this.prevPresentation = presentation;\n this.destroyInteractionListeners();\n this.initializeListeners();\n /**\n * The month/year picker from the date interface\n * should be closed as it is not available in non-date\n * interfaces.\n */\n this.showMonthAndYear = false;\n raf(() => {\n this.ionRender.emit();\n });\n }\n componentWillLoad() {\n const {\n el,\n formatOptions,\n highlightedDates,\n multiple,\n presentation,\n preferWheel\n } = this;\n if (multiple) {\n if (presentation !== 'date') {\n printIonWarning('Multiple date selection is only supported for presentation=\"date\".', el);\n }\n if (preferWheel) {\n printIonWarning('Multiple date selection is not supported with preferWheel=\"true\".', el);\n }\n }\n if (highlightedDates !== undefined) {\n if (presentation !== 'date' && presentation !== 'date-time' && presentation !== 'time-date') {\n printIonWarning('The highlightedDates property is only supported with the date, date-time, and time-date presentations.', el);\n }\n if (preferWheel) {\n printIonWarning('The highlightedDates property is not supported with preferWheel=\"true\".', el);\n }\n }\n if (formatOptions) {\n checkForPresentationFormatMismatch(el, presentation, formatOptions);\n warnIfTimeZoneProvided(el, formatOptions);\n }\n const hourValues = this.parsedHourValues = convertToArrayOfNumbers(this.hourValues);\n const minuteValues = this.parsedMinuteValues = convertToArrayOfNumbers(this.minuteValues);\n const monthValues = this.parsedMonthValues = convertToArrayOfNumbers(this.monthValues);\n const yearValues = this.parsedYearValues = convertToArrayOfNumbers(this.yearValues);\n const dayValues = this.parsedDayValues = convertToArrayOfNumbers(this.dayValues);\n const todayParts = this.todayParts = parseDate(getToday());\n this.processMinParts();\n this.processMaxParts();\n this.defaultParts = getClosestValidDate({\n refParts: todayParts,\n monthValues,\n dayValues,\n yearValues,\n hourValues,\n minuteValues,\n minParts: this.minParts,\n maxParts: this.maxParts\n });\n this.processValue(this.value);\n this.emitStyle();\n }\n emitStyle() {\n this.ionStyle.emit({\n interactive: true,\n datetime: true,\n 'interactive-disabled': this.disabled\n });\n }\n /**\n * Universal render methods\n * These are pieces of datetime that\n * are rendered independently of presentation.\n */\n renderFooter() {\n const {\n disabled,\n readonly,\n showDefaultButtons,\n showClearButton\n } = this;\n /**\n * The cancel, clear, and confirm buttons\n * should not be interactive if the datetime\n * is disabled or readonly.\n */\n const isButtonDisabled = disabled || readonly;\n const hasSlottedButtons = this.el.querySelector('[slot=\"buttons\"]') !== null;\n if (!hasSlottedButtons && !showDefaultButtons && !showClearButton) {\n return;\n }\n const clearButtonClick = () => {\n this.reset();\n this.setValue(undefined);\n };\n /**\n * By default we render two buttons:\n * Cancel - Dismisses the datetime and\n * does not update the `value` prop.\n * OK - Dismisses the datetime and\n * updates the `value` prop.\n */\n return h(\"div\", {\n class: \"datetime-footer\"\n }, h(\"div\", {\n class: \"datetime-buttons\"\n }, h(\"div\", {\n class: {\n ['datetime-action-buttons']: true,\n ['has-clear-button']: this.showClearButton\n }\n }, h(\"slot\", {\n name: \"buttons\"\n }, h(\"ion-buttons\", null, showDefaultButtons && h(\"ion-button\", {\n id: \"cancel-button\",\n color: this.color,\n onClick: () => this.cancel(true),\n disabled: isButtonDisabled\n }, this.cancelText), h(\"div\", {\n class: \"datetime-action-buttons-container\"\n }, showClearButton && h(\"ion-button\", {\n id: \"clear-button\",\n color: this.color,\n onClick: () => clearButtonClick(),\n disabled: isButtonDisabled\n }, this.clearText), showDefaultButtons && h(\"ion-button\", {\n id: \"confirm-button\",\n color: this.color,\n onClick: () => this.confirm(true),\n disabled: isButtonDisabled\n }, this.doneText)))))));\n }\n /**\n * Wheel picker render methods\n */\n renderWheelPicker(forcePresentation = this.presentation) {\n /**\n * If presentation=\"time-date\" we switch the\n * order of the render array here instead of\n * manually reordering each date/time picker\n * column with CSS. This allows for additional\n * flexibility if we need to render subsets\n * of the date/time data or do additional ordering\n * within the child render functions.\n */\n const renderArray = forcePresentation === 'time-date' ? [this.renderTimePickerColumns(forcePresentation), this.renderDatePickerColumns(forcePresentation)] : [this.renderDatePickerColumns(forcePresentation), this.renderTimePickerColumns(forcePresentation)];\n return h(\"ion-picker\", null, renderArray);\n }\n renderDatePickerColumns(forcePresentation) {\n return forcePresentation === 'date-time' || forcePresentation === 'time-date' ? this.renderCombinedDatePickerColumn() : this.renderIndividualDatePickerColumns(forcePresentation);\n }\n renderCombinedDatePickerColumn() {\n const {\n defaultParts,\n disabled,\n workingParts,\n locale,\n minParts,\n maxParts,\n todayParts,\n isDateEnabled\n } = this;\n const activePart = this.getActivePartsWithFallback();\n /**\n * By default, generate a range of 3 months:\n * Previous month, current month, and next month\n */\n const monthsToRender = generateMonths(workingParts);\n const lastMonth = monthsToRender[monthsToRender.length - 1];\n /**\n * Ensure that users can select the entire window of dates.\n */\n monthsToRender[0].day = 1;\n lastMonth.day = getNumDaysInMonth(lastMonth.month, lastMonth.year);\n /**\n * Narrow the dates rendered based on min/max dates (if any).\n * The `min` date is used if the min is after the generated min month.\n * The `max` date is used if the max is before the generated max month.\n * This ensures that the sliding window always stays at 3 months\n * but still allows future dates to be lazily rendered based on any min/max\n * constraints.\n */\n const min = minParts !== undefined && isAfter(minParts, monthsToRender[0]) ? minParts : monthsToRender[0];\n const max = maxParts !== undefined && isBefore(maxParts, lastMonth) ? maxParts : lastMonth;\n const result = getCombinedDateColumnData(locale, todayParts, min, max, this.parsedDayValues, this.parsedMonthValues);\n let items = result.items;\n const parts = result.parts;\n if (isDateEnabled) {\n items = items.map((itemObject, index) => {\n const referenceParts = parts[index];\n let disabled;\n try {\n /**\n * The `isDateEnabled` implementation is try-catch wrapped\n * to prevent exceptions in the user's function from\n * interrupting the calendar rendering.\n */\n disabled = !isDateEnabled(convertDataToISO(referenceParts));\n } catch (e) {\n printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', e);\n }\n return Object.assign(Object.assign({}, itemObject), {\n disabled\n });\n });\n }\n /**\n * If we have selected a day already, then default the column\n * to that value. Otherwise, set it to the default date.\n */\n const todayString = workingParts.day !== null ? `${workingParts.year}-${workingParts.month}-${workingParts.day}` : `${defaultParts.year}-${defaultParts.month}-${defaultParts.day}`;\n return h(\"ion-picker-column\", {\n \"aria-label\": \"Select a date\",\n class: \"date-column\",\n color: this.color,\n disabled: disabled,\n value: todayString,\n onIonChange: ev => {\n const {\n value\n } = ev.detail;\n const findPart = parts.find(({\n month,\n day,\n year\n }) => value === `${year}-${month}-${day}`);\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), findPart));\n this.setActiveParts(Object.assign(Object.assign({}, activePart), findPart));\n ev.stopPropagation();\n }\n }, items.map(item => h(\"ion-picker-column-option\", {\n part: item.value === todayString ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART,\n key: item.value,\n disabled: item.disabled,\n value: item.value\n }, item.text)));\n }\n renderIndividualDatePickerColumns(forcePresentation) {\n const {\n workingParts,\n isDateEnabled\n } = this;\n const shouldRenderMonths = forcePresentation !== 'year' && forcePresentation !== 'time';\n const months = shouldRenderMonths ? getMonthColumnData(this.locale, workingParts, this.minParts, this.maxParts, this.parsedMonthValues) : [];\n const shouldRenderDays = forcePresentation === 'date';\n let days = shouldRenderDays ? getDayColumnData(this.locale, workingParts, this.minParts, this.maxParts, this.parsedDayValues) : [];\n if (isDateEnabled) {\n days = days.map(dayObject => {\n const {\n value\n } = dayObject;\n const valueNum = typeof value === 'string' ? parseInt(value) : value;\n const referenceParts = {\n month: workingParts.month,\n day: valueNum,\n year: workingParts.year\n };\n let disabled;\n try {\n /**\n * The `isDateEnabled` implementation is try-catch wrapped\n * to prevent exceptions in the user's function from\n * interrupting the calendar rendering.\n */\n disabled = !isDateEnabled(convertDataToISO(referenceParts));\n } catch (e) {\n printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', e);\n }\n return Object.assign(Object.assign({}, dayObject), {\n disabled\n });\n });\n }\n const shouldRenderYears = forcePresentation !== 'month' && forcePresentation !== 'time';\n const years = shouldRenderYears ? getYearColumnData(this.locale, this.defaultParts, this.minParts, this.maxParts, this.parsedYearValues) : [];\n /**\n * Certain locales show the day before the month.\n */\n const showMonthFirst = isMonthFirstLocale(this.locale, {\n month: 'numeric',\n day: 'numeric'\n });\n let renderArray = [];\n if (showMonthFirst) {\n renderArray = [this.renderMonthPickerColumn(months), this.renderDayPickerColumn(days), this.renderYearPickerColumn(years)];\n } else {\n renderArray = [this.renderDayPickerColumn(days), this.renderMonthPickerColumn(months), this.renderYearPickerColumn(years)];\n }\n return renderArray;\n }\n renderDayPickerColumn(days) {\n var _a;\n if (days.length === 0) {\n return [];\n }\n const {\n disabled,\n workingParts\n } = this;\n const activePart = this.getActivePartsWithFallback();\n const pickerColumnValue = (_a = workingParts.day !== null ? workingParts.day : this.defaultParts.day) !== null && _a !== void 0 ? _a : undefined;\n return h(\"ion-picker-column\", {\n \"aria-label\": \"Select a day\",\n class: \"day-column\",\n color: this.color,\n disabled: disabled,\n value: pickerColumnValue,\n onIonChange: ev => {\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), {\n day: ev.detail.value\n }));\n this.setActiveParts(Object.assign(Object.assign({}, activePart), {\n day: ev.detail.value\n }));\n ev.stopPropagation();\n }\n }, days.map(day => h(\"ion-picker-column-option\", {\n part: day.value === pickerColumnValue ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART,\n key: day.value,\n disabled: day.disabled,\n value: day.value\n }, day.text)));\n }\n renderMonthPickerColumn(months) {\n if (months.length === 0) {\n return [];\n }\n const {\n disabled,\n workingParts\n } = this;\n const activePart = this.getActivePartsWithFallback();\n return h(\"ion-picker-column\", {\n \"aria-label\": \"Select a month\",\n class: \"month-column\",\n color: this.color,\n disabled: disabled,\n value: workingParts.month,\n onIonChange: ev => {\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), {\n month: ev.detail.value\n }));\n this.setActiveParts(Object.assign(Object.assign({}, activePart), {\n month: ev.detail.value\n }));\n ev.stopPropagation();\n }\n }, months.map(month => h(\"ion-picker-column-option\", {\n part: month.value === workingParts.month ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART,\n key: month.value,\n disabled: month.disabled,\n value: month.value\n }, month.text)));\n }\n renderYearPickerColumn(years) {\n if (years.length === 0) {\n return [];\n }\n const {\n disabled,\n workingParts\n } = this;\n const activePart = this.getActivePartsWithFallback();\n return h(\"ion-picker-column\", {\n \"aria-label\": \"Select a year\",\n class: \"year-column\",\n color: this.color,\n disabled: disabled,\n value: workingParts.year,\n onIonChange: ev => {\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), {\n year: ev.detail.value\n }));\n this.setActiveParts(Object.assign(Object.assign({}, activePart), {\n year: ev.detail.value\n }));\n ev.stopPropagation();\n }\n }, years.map(year => h(\"ion-picker-column-option\", {\n part: year.value === workingParts.year ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART,\n key: year.value,\n disabled: year.disabled,\n value: year.value\n }, year.text)));\n }\n renderTimePickerColumns(forcePresentation) {\n if (['date', 'month', 'month-year', 'year'].includes(forcePresentation)) {\n return [];\n }\n /**\n * If a user has not selected a date,\n * then we should show all times. If the\n * user has selected a date (even if it has\n * not been confirmed yet), we should apply\n * the max and min restrictions so that the\n * time picker shows values that are\n * appropriate for the selected date.\n */\n const activePart = this.getActivePart();\n const userHasSelectedDate = activePart !== undefined;\n const {\n hoursData,\n minutesData,\n dayPeriodData\n } = getTimeColumnsData(this.locale, this.workingParts, this.hourCycle, userHasSelectedDate ? this.minParts : undefined, userHasSelectedDate ? this.maxParts : undefined, this.parsedHourValues, this.parsedMinuteValues);\n return [this.renderHourPickerColumn(hoursData), this.renderMinutePickerColumn(minutesData), this.renderDayPeriodPickerColumn(dayPeriodData)];\n }\n renderHourPickerColumn(hoursData) {\n const {\n disabled,\n workingParts\n } = this;\n if (hoursData.length === 0) return [];\n const activePart = this.getActivePartsWithFallback();\n return h(\"ion-picker-column\", {\n \"aria-label\": \"Select an hour\",\n color: this.color,\n disabled: disabled,\n value: activePart.hour,\n numericInput: true,\n onIonChange: ev => {\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), {\n hour: ev.detail.value\n }));\n this.setActiveParts(Object.assign(Object.assign({}, activePart), {\n hour: ev.detail.value\n }));\n ev.stopPropagation();\n }\n }, hoursData.map(hour => h(\"ion-picker-column-option\", {\n part: hour.value === activePart.hour ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART,\n key: hour.value,\n disabled: hour.disabled,\n value: hour.value\n }, hour.text)));\n }\n renderMinutePickerColumn(minutesData) {\n const {\n disabled,\n workingParts\n } = this;\n if (minutesData.length === 0) return [];\n const activePart = this.getActivePartsWithFallback();\n return h(\"ion-picker-column\", {\n \"aria-label\": \"Select a minute\",\n color: this.color,\n disabled: disabled,\n value: activePart.minute,\n numericInput: true,\n onIonChange: ev => {\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), {\n minute: ev.detail.value\n }));\n this.setActiveParts(Object.assign(Object.assign({}, activePart), {\n minute: ev.detail.value\n }));\n ev.stopPropagation();\n }\n }, minutesData.map(minute => h(\"ion-picker-column-option\", {\n part: minute.value === activePart.minute ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART,\n key: minute.value,\n disabled: minute.disabled,\n value: minute.value\n }, minute.text)));\n }\n renderDayPeriodPickerColumn(dayPeriodData) {\n const {\n disabled,\n workingParts\n } = this;\n if (dayPeriodData.length === 0) {\n return [];\n }\n const activePart = this.getActivePartsWithFallback();\n const isDayPeriodRTL = isLocaleDayPeriodRTL(this.locale);\n return h(\"ion-picker-column\", {\n \"aria-label\": \"Select a day period\",\n style: isDayPeriodRTL ? {\n order: '-1'\n } : {},\n color: this.color,\n disabled: disabled,\n value: activePart.ampm,\n onIonChange: ev => {\n const hour = calculateHourFromAMPM(workingParts, ev.detail.value);\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), {\n ampm: ev.detail.value,\n hour\n }));\n this.setActiveParts(Object.assign(Object.assign({}, activePart), {\n ampm: ev.detail.value,\n hour\n }));\n ev.stopPropagation();\n }\n }, dayPeriodData.map(dayPeriod => h(\"ion-picker-column-option\", {\n part: dayPeriod.value === activePart.ampm ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART,\n key: dayPeriod.value,\n disabled: dayPeriod.disabled,\n value: dayPeriod.value\n }, dayPeriod.text)));\n }\n renderWheelView(forcePresentation) {\n const {\n locale\n } = this;\n const showMonthFirst = isMonthFirstLocale(locale);\n const columnOrder = showMonthFirst ? 'month-first' : 'year-first';\n return h(\"div\", {\n class: {\n [`wheel-order-${columnOrder}`]: true\n }\n }, this.renderWheelPicker(forcePresentation));\n }\n /**\n * Grid Render Methods\n */\n renderCalendarHeader(mode) {\n const {\n disabled\n } = this;\n const expandedIcon = mode === 'ios' ? chevronDown : caretUpSharp;\n const collapsedIcon = mode === 'ios' ? chevronForward : caretDownSharp;\n const prevMonthDisabled = disabled || isPrevMonthDisabled(this.workingParts, this.minParts, this.maxParts);\n const nextMonthDisabled = disabled || isNextMonthDisabled(this.workingParts, this.maxParts);\n // don't use the inheritAttributes util because it removes dir from the host, and we still need that\n const hostDir = this.el.getAttribute('dir') || undefined;\n return h(\"div\", {\n class: \"calendar-header\"\n }, h(\"div\", {\n class: \"calendar-action-buttons\"\n }, h(\"div\", {\n class: \"calendar-month-year\"\n }, h(\"button\", {\n class: {\n 'calendar-month-year-toggle': true,\n 'ion-activatable': true,\n 'ion-focusable': true\n },\n part: \"month-year-button\",\n disabled: disabled,\n \"aria-label\": this.showMonthAndYear ? 'Hide year picker' : 'Show year picker',\n onClick: () => this.toggleMonthAndYearView()\n }, h(\"span\", {\n id: \"toggle-wrapper\"\n }, getMonthAndYear(this.locale, this.workingParts), h(\"ion-icon\", {\n \"aria-hidden\": \"true\",\n icon: this.showMonthAndYear ? expandedIcon : collapsedIcon,\n lazy: false,\n flipRtl: true\n })), mode === 'md' && h(\"ion-ripple-effect\", null))), h(\"div\", {\n class: \"calendar-next-prev\"\n }, h(\"ion-buttons\", null, h(\"ion-button\", {\n \"aria-label\": \"Previous month\",\n disabled: prevMonthDisabled,\n onClick: () => this.prevMonth()\n }, h(\"ion-icon\", {\n dir: hostDir,\n \"aria-hidden\": \"true\",\n slot: \"icon-only\",\n icon: chevronBack,\n lazy: false,\n flipRtl: true\n })), h(\"ion-button\", {\n \"aria-label\": \"Next month\",\n disabled: nextMonthDisabled,\n onClick: () => this.nextMonth()\n }, h(\"ion-icon\", {\n dir: hostDir,\n \"aria-hidden\": \"true\",\n slot: \"icon-only\",\n icon: chevronForward,\n lazy: false,\n flipRtl: true\n }))))), h(\"div\", {\n class: \"calendar-days-of-week\",\n \"aria-hidden\": \"true\"\n }, getDaysOfWeek(this.locale, mode, this.firstDayOfWeek % 7).map(d => {\n return h(\"div\", {\n class: \"day-of-week\"\n }, d);\n })));\n }\n renderMonth(month, year) {\n const {\n disabled,\n readonly\n } = this;\n const yearAllowed = this.parsedYearValues === undefined || this.parsedYearValues.includes(year);\n const monthAllowed = this.parsedMonthValues === undefined || this.parsedMonthValues.includes(month);\n const isCalMonthDisabled = !yearAllowed || !monthAllowed;\n const isDatetimeDisabled = disabled || readonly;\n const swipeDisabled = disabled || isMonthDisabled({\n month,\n year,\n day: null\n }, {\n // The day is not used when checking if a month is disabled.\n // Users should be able to access the min or max month, even if the\n // min/max date is out of bounds (e.g. min is set to Feb 15, Feb should not be disabled).\n minParts: Object.assign(Object.assign({}, this.minParts), {\n day: null\n }),\n maxParts: Object.assign(Object.assign({}, this.maxParts), {\n day: null\n })\n });\n // The working month should never have swipe disabled.\n // Otherwise the CSS scroll snap will not work and the user\n // can free-scroll the calendar.\n const isWorkingMonth = this.workingParts.month === month && this.workingParts.year === year;\n const activePart = this.getActivePartsWithFallback();\n return h(\"div\", {\n \"aria-hidden\": !isWorkingMonth ? 'true' : null,\n class: {\n 'calendar-month': true,\n // Prevents scroll snap swipe gestures for months outside of the min/max bounds\n 'calendar-month-disabled': !isWorkingMonth && swipeDisabled\n }\n }, h(\"div\", {\n class: \"calendar-month-grid\"\n }, getDaysOfMonth(month, year, this.firstDayOfWeek % 7).map((dateObject, index) => {\n const {\n day,\n dayOfWeek\n } = dateObject;\n const {\n el,\n highlightedDates,\n isDateEnabled,\n multiple\n } = this;\n const referenceParts = {\n month,\n day,\n year\n };\n const isCalendarPadding = day === null;\n const {\n isActive,\n isToday,\n ariaLabel,\n ariaSelected,\n disabled: isDayDisabled,\n text\n } = getCalendarDayState(this.locale, referenceParts, this.activeParts, this.todayParts, this.minParts, this.maxParts, this.parsedDayValues);\n const dateIsoString = convertDataToISO(referenceParts);\n let isCalDayDisabled = isCalMonthDisabled || isDayDisabled;\n if (!isCalDayDisabled && isDateEnabled !== undefined) {\n try {\n /**\n * The `isDateEnabled` implementation is try-catch wrapped\n * to prevent exceptions in the user's function from\n * interrupting the calendar rendering.\n */\n isCalDayDisabled = !isDateEnabled(dateIsoString);\n } catch (e) {\n printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', el, e);\n }\n }\n /**\n * Some days are constrained through max & min or allowed dates\n * and also disabled because the component is readonly or disabled.\n * These need to be displayed differently.\n */\n const isCalDayConstrained = isCalDayDisabled && isDatetimeDisabled;\n const isButtonDisabled = isCalDayDisabled || isDatetimeDisabled;\n let dateStyle = undefined;\n /**\n * Custom highlight styles should not override the style for selected dates,\n * nor apply to \"filler days\" at the start of the grid.\n */\n if (highlightedDates !== undefined && !isActive && day !== null) {\n dateStyle = getHighlightStyles(highlightedDates, dateIsoString, el);\n }\n let dateParts = undefined;\n // \"Filler days\" at the beginning of the grid should not get the calendar day\n // CSS parts added to them\n if (!isCalendarPadding) {\n dateParts = `calendar-day${isActive ? ' active' : ''}${isToday ? ' today' : ''}${isCalDayDisabled ? ' disabled' : ''}`;\n }\n return h(\"div\", {\n class: \"calendar-day-wrapper\"\n }, h(\"button\", {\n // We need to use !important for the inline styles here because\n // otherwise the CSS shadow parts will override these styles.\n // See https://github.com/WICG/webcomponents/issues/847\n // Both the CSS shadow parts and highlightedDates styles are\n // provided by the developer, but highlightedDates styles should\n // always take priority.\n ref: el => {\n if (el) {\n el.style.setProperty('color', `${dateStyle ? dateStyle.textColor : ''}`, 'important');\n el.style.setProperty('background-color', `${dateStyle ? dateStyle.backgroundColor : ''}`, 'important');\n }\n },\n tabindex: \"-1\",\n \"data-day\": day,\n \"data-month\": month,\n \"data-year\": year,\n \"data-index\": index,\n \"data-day-of-week\": dayOfWeek,\n disabled: isButtonDisabled,\n class: {\n 'calendar-day-padding': isCalendarPadding,\n 'calendar-day': true,\n 'calendar-day-active': isActive,\n 'calendar-day-constrained': isCalDayConstrained,\n 'calendar-day-today': isToday\n },\n part: dateParts,\n \"aria-hidden\": isCalendarPadding ? 'true' : null,\n \"aria-selected\": ariaSelected,\n \"aria-label\": ariaLabel,\n onClick: () => {\n if (isCalendarPadding) {\n return;\n }\n this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), {\n month,\n day,\n year\n }));\n // multiple only needs date info, so we can wipe out other fields like time\n if (multiple) {\n this.setActiveParts({\n month,\n day,\n year\n }, isActive);\n } else {\n this.setActiveParts(Object.assign(Object.assign({}, activePart), {\n month,\n day,\n year\n }));\n }\n }\n }, text));\n })));\n }\n renderCalendarBody() {\n return h(\"div\", {\n class: \"calendar-body ion-focusable\",\n ref: el => this.calendarBodyRef = el,\n tabindex: \"0\"\n }, generateMonths(this.workingParts, this.forceRenderDate).map(({\n month,\n year\n }) => {\n return this.renderMonth(month, year);\n }));\n }\n renderCalendar(mode) {\n return h(\"div\", {\n class: \"datetime-calendar\",\n key: \"datetime-calendar\"\n }, this.renderCalendarHeader(mode), this.renderCalendarBody());\n }\n renderTimeLabel() {\n const hasSlottedTimeLabel = this.el.querySelector('[slot=\"time-label\"]') !== null;\n if (!hasSlottedTimeLabel && !this.showDefaultTimeLabel) {\n return;\n }\n return h(\"slot\", {\n name: \"time-label\"\n }, \"Time\");\n }\n renderTimeOverlay() {\n var _this6 = this;\n const {\n disabled,\n hourCycle,\n isTimePopoverOpen,\n locale,\n formatOptions\n } = this;\n const computedHourCycle = getHourCycle(locale, hourCycle);\n const activePart = this.getActivePartsWithFallback();\n return [h(\"div\", {\n class: \"time-header\"\n }, this.renderTimeLabel()), h(\"button\", {\n class: {\n 'time-body': true,\n 'time-body-active': isTimePopoverOpen\n },\n part: `time-button${isTimePopoverOpen ? ' active' : ''}`,\n \"aria-expanded\": \"false\",\n \"aria-haspopup\": \"true\",\n disabled: disabled,\n onClick: function () {\n var _ref2 = _asyncToGenerator(function* (ev) {\n const {\n popoverRef\n } = _this6;\n if (popoverRef) {\n _this6.isTimePopoverOpen = true;\n popoverRef.present(new CustomEvent('ionShadowTarget', {\n detail: {\n ionShadowTarget: ev.target\n }\n }));\n yield popoverRef.onWillDismiss();\n _this6.isTimePopoverOpen = false;\n }\n });\n return function onClick(_x2) {\n return _ref2.apply(this, arguments);\n };\n }()\n }, getLocalizedTime(locale, activePart, computedHourCycle, formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time)), h(\"ion-popover\", {\n alignment: \"center\",\n translucent: true,\n overlayIndex: 1,\n arrow: false,\n onWillPresent: ev => {\n /**\n * Intersection Observers do not consistently fire between Blink and Webkit\n * when toggling the visibility of the popover and trying to scroll the picker\n * column to the correct time value.\n *\n * This will correctly scroll the element position to the correct time value,\n * before the popover is fully presented.\n */\n const cols = ev.target.querySelectorAll('ion-picker-column');\n // TODO (FW-615): Potentially remove this when intersection observers are fixed in picker column\n cols.forEach(col => col.scrollActiveItemIntoView());\n },\n style: {\n '--offset-y': '-10px',\n '--min-width': 'fit-content'\n },\n // Allow native browser keyboard events to support up/down/home/end key\n // navigation within the time picker.\n keyboardEvents: true,\n ref: el => this.popoverRef = el\n }, this.renderWheelPicker('time'))];\n }\n getHeaderSelectedDateText() {\n var _a;\n const {\n activeParts,\n formatOptions,\n multiple,\n titleSelectedDatesFormatter\n } = this;\n const isArray = Array.isArray(activeParts);\n let headerText;\n if (multiple && isArray && activeParts.length !== 1) {\n headerText = `${activeParts.length} days`; // default/fallback for multiple selection\n if (titleSelectedDatesFormatter !== undefined) {\n try {\n headerText = titleSelectedDatesFormatter(convertDataToISO(activeParts));\n } catch (e) {\n printIonError('Exception in provided `titleSelectedDatesFormatter`: ', e);\n }\n }\n } else {\n // for exactly 1 day selected (multiple set or not), show a formatted version of that\n headerText = getLocalizedDateTime(this.locale, this.getActivePartsWithFallback(), (_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _a !== void 0 ? _a : {\n weekday: 'short',\n month: 'short',\n day: 'numeric'\n });\n }\n return headerText;\n }\n renderHeader(showExpandedHeader = true) {\n const hasSlottedTitle = this.el.querySelector('[slot=\"title\"]') !== null;\n if (!hasSlottedTitle && !this.showDefaultTitle) {\n return;\n }\n return h(\"div\", {\n class: \"datetime-header\"\n }, h(\"div\", {\n class: \"datetime-title\"\n }, h(\"slot\", {\n name: \"title\"\n }, \"Select Date\")), showExpandedHeader && h(\"div\", {\n class: \"datetime-selected-date\"\n }, this.getHeaderSelectedDateText()));\n }\n /**\n * Render time picker inside of datetime.\n * Do not pass color prop to segment on\n * iOS mode. MD segment has been customized and\n * should take on the color prop, but iOS\n * should just be the default segment.\n */\n renderTime() {\n const {\n presentation\n } = this;\n const timeOnlyPresentation = presentation === 'time';\n return h(\"div\", {\n class: \"datetime-time\"\n }, timeOnlyPresentation ? this.renderWheelPicker() : this.renderTimeOverlay());\n }\n /**\n * Renders the month/year picker that is\n * displayed on the calendar grid.\n * The .datetime-year class has additional\n * styles that let us show/hide the\n * picker when the user clicks on the\n * toggle in the calendar header.\n */\n renderCalendarViewMonthYearPicker() {\n return h(\"div\", {\n class: \"datetime-year\"\n }, this.renderWheelView('month-year'));\n }\n /**\n * Render entry point\n * All presentation types are rendered from here.\n */\n renderDatetime(mode) {\n const {\n presentation,\n preferWheel\n } = this;\n /**\n * Certain presentation types have separate grid and wheel displays.\n * If preferWheel is true then we should show a wheel picker instead.\n */\n const hasWheelVariant = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';\n if (preferWheel && hasWheelVariant) {\n return [this.renderHeader(false), this.renderWheelView(), this.renderFooter()];\n }\n switch (presentation) {\n case 'date-time':\n return [this.renderHeader(), this.renderCalendar(mode), this.renderCalendarViewMonthYearPicker(), this.renderTime(), this.renderFooter()];\n case 'time-date':\n return [this.renderHeader(), this.renderTime(), this.renderCalendar(mode), this.renderCalendarViewMonthYearPicker(), this.renderFooter()];\n case 'time':\n return [this.renderHeader(false), this.renderTime(), this.renderFooter()];\n case 'month':\n case 'month-year':\n case 'year':\n return [this.renderHeader(false), this.renderWheelView(), this.renderFooter()];\n default:\n return [this.renderHeader(), this.renderCalendar(mode), this.renderCalendarViewMonthYearPicker(), this.renderFooter()];\n }\n }\n render() {\n const {\n name,\n value,\n disabled,\n el,\n color,\n readonly,\n showMonthAndYear,\n preferWheel,\n presentation,\n size,\n isGridStyle\n } = this;\n const mode = getIonMode(this);\n const isMonthAndYearPresentation = presentation === 'year' || presentation === 'month' || presentation === 'month-year';\n const shouldShowMonthAndYear = showMonthAndYear || isMonthAndYearPresentation;\n const monthYearPickerOpen = showMonthAndYear && !isMonthAndYearPresentation;\n const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';\n const hasWheelVariant = hasDatePresentation && preferWheel;\n renderHiddenInput(true, el, name, formatValue(value), disabled);\n return h(Host, {\n key: '7afbb1a7e6c78389b4588999779e5c90e010e85d',\n \"aria-disabled\": disabled ? 'true' : null,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n class: Object.assign({}, createColorClasses(color, {\n [mode]: true,\n ['datetime-readonly']: readonly,\n ['datetime-disabled']: disabled,\n 'show-month-and-year': shouldShowMonthAndYear,\n 'month-year-picker-open': monthYearPickerOpen,\n [`datetime-presentation-${presentation}`]: true,\n [`datetime-size-${size}`]: true,\n [`datetime-prefer-wheel`]: hasWheelVariant,\n [`datetime-grid`]: isGridStyle\n }))\n }, h(\"div\", {\n key: '297c458d4d17154cb297e2ef5926505bcb2d1fce',\n class: \"intersection-tracker\",\n ref: el => this.intersectionTrackerRef = el\n }), this.renderDatetime(mode));\n }\n get el() {\n return this;\n }\n static get watchers() {\n return {\n \"formatOptions\": [\"formatOptionsChanged\"],\n \"disabled\": [\"disabledChanged\"],\n \"min\": [\"minChanged\"],\n \"max\": [\"maxChanged\"],\n \"presentation\": [\"presentationChanged\"],\n \"yearValues\": [\"yearValuesChanged\"],\n \"monthValues\": [\"monthValuesChanged\"],\n \"dayValues\": [\"dayValuesChanged\"],\n \"hourValues\": [\"hourValuesChanged\"],\n \"minuteValues\": [\"minuteValuesChanged\"],\n \"value\": [\"valueChanged\"]\n };\n }\n static get style() {\n return {\n ios: IonDatetimeIosStyle0,\n md: IonDatetimeMdStyle0\n };\n }\n}, [33, \"ion-datetime\", {\n \"color\": [1],\n \"name\": [1],\n \"disabled\": [4],\n \"formatOptions\": [16],\n \"readonly\": [4],\n \"isDateEnabled\": [16],\n \"min\": [1025],\n \"max\": [1025],\n \"presentation\": [1],\n \"cancelText\": [1, \"cancel-text\"],\n \"doneText\": [1, \"done-text\"],\n \"clearText\": [1, \"clear-text\"],\n \"yearValues\": [8, \"year-values\"],\n \"monthValues\": [8, \"month-values\"],\n \"dayValues\": [8, \"day-values\"],\n \"hourValues\": [8, \"hour-values\"],\n \"minuteValues\": [8, \"minute-values\"],\n \"locale\": [1],\n \"firstDayOfWeek\": [2, \"first-day-of-week\"],\n \"titleSelectedDatesFormatter\": [16],\n \"multiple\": [4],\n \"highlightedDates\": [16],\n \"value\": [1025],\n \"showDefaultTitle\": [4, \"show-default-title\"],\n \"showDefaultButtons\": [4, \"show-default-buttons\"],\n \"showClearButton\": [4, \"show-clear-button\"],\n \"showDefaultTimeLabel\": [4, \"show-default-time-label\"],\n \"hourCycle\": [1, \"hour-cycle\"],\n \"size\": [1],\n \"preferWheel\": [4, \"prefer-wheel\"],\n \"showMonthAndYear\": [32],\n \"activeParts\": [32],\n \"workingParts\": [32],\n \"isTimePopoverOpen\": [32],\n \"forceRenderDate\": [32],\n \"confirm\": [64],\n \"reset\": [64],\n \"cancel\": [64]\n}, undefined, {\n \"formatOptions\": [\"formatOptionsChanged\"],\n \"disabled\": [\"disabledChanged\"],\n \"min\": [\"minChanged\"],\n \"max\": [\"maxChanged\"],\n \"presentation\": [\"presentationChanged\"],\n \"yearValues\": [\"yearValuesChanged\"],\n \"monthValues\": [\"monthValuesChanged\"],\n \"dayValues\": [\"dayValuesChanged\"],\n \"hourValues\": [\"hourValuesChanged\"],\n \"minuteValues\": [\"minuteValuesChanged\"],\n \"value\": [\"valueChanged\"]\n}]);\nlet datetimeIds = 0;\nconst CANCEL_ROLE = 'datetime-cancel';\nconst CONFIRM_ROLE = 'datetime-confirm';\nconst WHEEL_ITEM_PART = 'wheel-item';\nconst WHEEL_ITEM_ACTIVE_PART = `active`;\nfunction defineCustomElement$1() {\n if (typeof customElements === \"undefined\") {\n return;\n }\n const components = [\"ion-datetime\", \"ion-backdrop\", \"ion-button\", \"ion-buttons\", \"ion-icon\", \"ion-picker\", \"ion-picker-column\", \"ion-picker-column-option\", \"ion-popover\", \"ion-ripple-effect\"];\n components.forEach(tagName => {\n switch (tagName) {\n case \"ion-datetime\":\n if (!customElements.get(tagName)) {\n customElements.define(tagName, Datetime);\n }\n break;\n case \"ion-backdrop\":\n if (!customElements.get(tagName)) {\n defineCustomElement$a();\n }\n break;\n case \"ion-button\":\n if (!customElements.get(tagName)) {\n defineCustomElement$9();\n }\n break;\n case \"ion-buttons\":\n if (!customElements.get(tagName)) {\n defineCustomElement$8();\n }\n break;\n case \"ion-icon\":\n if (!customElements.get(tagName)) {\n defineCustomElement$7();\n }\n break;\n case \"ion-picker\":\n if (!customElements.get(tagName)) {\n defineCustomElement$6();\n }\n break;\n case \"ion-picker-column\":\n if (!customElements.get(tagName)) {\n defineCustomElement$5();\n }\n break;\n case \"ion-picker-column-option\":\n if (!customElements.get(tagName)) {\n defineCustomElement$4();\n }\n break;\n case \"ion-popover\":\n if (!customElements.get(tagName)) {\n defineCustomElement$3();\n }\n break;\n case \"ion-ripple-effect\":\n if (!customElements.get(tagName)) {\n defineCustomElement$2();\n }\n break;\n }\n });\n}\nconst IonDatetime = Datetime;\nconst defineCustomElement = defineCustomElement$1;\nexport { IonDatetime, defineCustomElement };","map":{"version":3,"names":["proxyCustomElement","HTMLElement","createEvent","writeTask","h","Host","startFocusVisible","r","raf","e","renderHiddenInput","g","getElementRoot","a","printIonError","p","printIonWarning","i","isRTL","c","createColorClasses","chevronBack","f","chevronForward","chevronDown","caretUpSharp","caretDownSharp","b","getIonMode","generateDayAriaLabel","getDay","isBefore","isAfter","isSameDay","d","getPreviousMonth","getNextMonth","v","validateParts","getPartsFromCalendarDay","getNextYear","j","getPreviousYear","k","getEndOfWeek","l","getStartOfWeek","m","getPreviousDay","n","getNextDay","o","getPreviousWeek","getNextWeek","q","parseMinParts","parseMaxParts","s","parseDate","w","warnIfValueOutOfBounds","t","convertToArrayOfNumbers","u","convertDataToISO","x","getToday","y","getClosestValidDate","z","generateMonths","A","getNumDaysInMonth","B","getCombinedDateColumnData","C","getMonthColumnData","D","getDayColumnData","E","getYearColumnData","F","isMonthFirstLocale","G","getTimeColumnsData","H","isLocaleDayPeriodRTL","I","getMonthAndYear","J","getDaysOfWeek","K","getDaysOfMonth","L","getHourCycle","M","getLocalizedTime","N","getLocalizedDateTime","O","formatValue","P","clampDate","Q","parseAmPm","R","calculateHourFromAMPM","defineCustomElement$a","defineCustomElement$9","defineCustomElement$8","defineCustomElement$7","defineCustomElement$6","defineCustomElement$5","defineCustomElement$4","defineCustomElement$3","defineCustomElement$2","isYearDisabled","refYear","minParts","maxParts","year","isDayDisabled","refParts","dayValues","day","undefined","includes","getCalendarDayState","locale","activeParts","todayParts","activePartsArray","Array","isArray","isActive","find","parts","isToday","disabled","ariaSelected","ariaLabel","text","isMonthDisabled","isPrevMonthDisabled","prevMonth","Object","assign","isNextMonthDisabled","nextMonth","getHighlightStyles","highlightedDates","dateIsoString","el","dateStringWithoutTime","split","matchingHighlight","hd","date","textColor","backgroundColor","warnIfTimeZoneProvided","formatOptions","_a","_b","_c","_d","timeZone","timeZoneName","time","checkForPresentationFormatMismatch","presentation","datetimeIosCss","IonDatetimeIosStyle0","datetimeMdCss","IonDatetimeMdStyle0","Datetime","constructor","_this","this","__registerHost","__attachShadow","ionCancel","ionChange","ionValueChange","ionFocus","ionBlur","ionStyle","ionRender","inputId","datetimeIds","prevPresentation","warnIfIncorrectValueUsage","multiple","value","map","join","setValue","emit","getActivePartsWithFallback","defaultParts","getActivePart","closeParentOverlay","role","popoverOrModal","closest","dismiss","setWorkingParts","workingParts","setActiveParts","removeDate","readonly","validatedParts","filter","hasSlottedButtons","querySelector","showDefaultButtons","confirm","initializeKeyboardListeners","calendarBodyRef","root","shadowRoot","currentMonth","checkCalendarBodyFocus","ev","record","oldValue","classList","contains","focusWorkingDay","mo","MutationObserver","observe","attributeFilter","attributeOldValue","destroyKeyboardMO","disconnect","addEventListener","activeElement","partsToFocus","key","preventDefault","shiftKey","requestAnimationFrame","padding","querySelectorAll","dayEl","length","focus","processMinParts","min","processMaxParts","max","initializeCalendarListener","months","startMonth","workingMonth","endMonth","mode","needsiOSRubberBandFix","navigator","maxTouchPoints","scrollLeft","clientWidth","getChangedMonth","box","getBoundingClientRect","condition","month","monthBox","Math","abs","forceRenderDate","updateActiveMonth","style","removeProperty","appliediOSRubberBandFix","newDate","setProperty","resolveForceDateScrolling","scrollTimeout","scrollCallback","clearTimeout","setTimeout","destroyCalendarListener","removeEventListener","destroyInteractionListeners","processValue","hasValue","valueToProcess","singleValue","targetValue","hour","minute","ampm","didChangeMonth","bodyIsVisible","isGridStyle","showMonthAndYear","areAllSelectedDatesInSameMonth","firstMonth","animateToDate","_ref","_asyncToGenerator","forceDateScrollingPromise","Promise","resolve","targetMonthIsBefore","_x","apply","arguments","onFocus","onBlur","left","offsetWidth","scrollTo","top","behavior","toggleMonthAndYearView","isTimePopoverOpen","color","name","isDateEnabled","cancelText","doneText","clearText","yearValues","monthValues","hourValues","minuteValues","firstDayOfWeek","titleSelectedDatesFormatter","showDefaultTitle","showClearButton","showDefaultTimeLabel","hourCycle","size","preferWheel","formatOptionsChanged","disabledChanged","emitStyle","minChanged","maxChanged","presentationChanged","hasDatePresentation","yearValuesChanged","parsedYearValues","monthValuesChanged","parsedMonthValues","dayValuesChanged","parsedDayValues","hourValuesChanged","parsedHourValues","minuteValuesChanged","parsedMinuteValues","valueChanged","_this2","closeOverlay","_this3","isCalendarPicker","activePartsIsArray","CONFIRM_ROLE","reset","startDate","_this4","cancel","_this5","CANCEL_ROLE","connectedCallback","clearFocusVisible","destroy","disconnectedCallback","initializeListeners","componentDidLoad","intersectionTrackerRef","visibleCallback","entries","isIntersecting","add","visibleIO","IntersectionObserver","threshold","hiddenCallback","remove","hiddenIO","stopPropagation","componentDidRender","hasCalendarGrid","componentWillLoad","interactive","datetime","renderFooter","isButtonDisabled","clearButtonClick","class","id","onClick","renderWheelPicker","forcePresentation","renderArray","renderTimePickerColumns","renderDatePickerColumns","renderCombinedDatePickerColumn","renderIndividualDatePickerColumns","activePart","monthsToRender","lastMonth","result","items","itemObject","index","referenceParts","todayString","onIonChange","detail","findPart","item","part","WHEEL_ITEM_PART","WHEEL_ITEM_ACTIVE_PART","shouldRenderMonths","shouldRenderDays","days","dayObject","valueNum","parseInt","shouldRenderYears","years","showMonthFirst","renderMonthPickerColumn","renderDayPickerColumn","renderYearPickerColumn","pickerColumnValue","userHasSelectedDate","hoursData","minutesData","dayPeriodData","renderHourPickerColumn","renderMinutePickerColumn","renderDayPeriodPickerColumn","numericInput","isDayPeriodRTL","order","dayPeriod","renderWheelView","columnOrder","renderCalendarHeader","expandedIcon","collapsedIcon","prevMonthDisabled","nextMonthDisabled","hostDir","getAttribute","icon","lazy","flipRtl","dir","slot","renderMonth","yearAllowed","monthAllowed","isCalMonthDisabled","isDatetimeDisabled","swipeDisabled","isWorkingMonth","dateObject","dayOfWeek","isCalendarPadding","isCalDayDisabled","isCalDayConstrained","dateStyle","dateParts","ref","tabindex","renderCalendarBody","renderCalendar","renderTimeLabel","hasSlottedTimeLabel","renderTimeOverlay","_this6","computedHourCycle","_ref2","popoverRef","present","CustomEvent","ionShadowTarget","target","onWillDismiss","_x2","alignment","translucent","overlayIndex","arrow","onWillPresent","cols","forEach","col","scrollActiveItemIntoView","keyboardEvents","getHeaderSelectedDateText","headerText","weekday","renderHeader","showExpandedHeader","hasSlottedTitle","renderTime","timeOnlyPresentation","renderCalendarViewMonthYearPicker","renderDatetime","hasWheelVariant","render","isMonthAndYearPresentation","shouldShowMonthAndYear","monthYearPickerOpen","watchers","ios","md","defineCustomElement$1","customElements","components","tagName","get","define","IonDatetime","defineCustomElement"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@ionic/core/components/ion-datetime.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { proxyCustomElement, HTMLElement, createEvent, writeTask, h, Host } from '@stencil/core/internal/client';\nimport { startFocusVisible } from './focus-visible.js';\nimport { r as raf, e as renderHiddenInput, g as getElementRoot } from './helpers.js';\nimport { a as printIonError, p as printIonWarning } from './index6.js';\nimport { i as isRTL } from './dir.js';\nimport { c as createColorClasses } from './theme.js';\nimport { a as chevronBack, f as chevronForward, c as chevronDown, g as caretUpSharp, h as caretDownSharp } from './index7.js';\nimport { b as getIonMode } from './ionic-global.js';\nimport { g as generateDayAriaLabel, a as getDay, i as isBefore, b as isAfter, c as isSameDay, d as getPreviousMonth, e as getNextMonth, v as validateParts, f as getPartsFromCalendarDay, h as getNextYear, j as getPreviousYear, k as getEndOfWeek, l as getStartOfWeek, m as getPreviousDay, n as getNextDay, o as getPreviousWeek, p as getNextWeek, q as parseMinParts, r as parseMaxParts, s as parseDate, w as warnIfValueOutOfBounds, t as convertToArrayOfNumbers, u as convertDataToISO, x as getToday, y as getClosestValidDate, z as generateMonths, A as getNumDaysInMonth, B as getCombinedDateColumnData, C as getMonthColumnData, D as getDayColumnData, E as getYearColumnData, F as isMonthFirstLocale, G as getTimeColumnsData, H as isLocaleDayPeriodRTL, I as getMonthAndYear, J as getDaysOfWeek, K as getDaysOfMonth, L as getHourCycle, M as getLocalizedTime, N as getLocalizedDateTime, O as formatValue, P as clampDate, Q as parseAmPm, R as calculateHourFromAMPM } from './data.js';\nimport { d as defineCustomElement$a } from './backdrop.js';\nimport { d as defineCustomElement$9 } from './button.js';\nimport { d as defineCustomElement$8 } from './buttons.js';\nimport { d as defineCustomElement$7 } from './icon.js';\nimport { d as defineCustomElement$6 } from './picker.js';\nimport { d as defineCustomElement$5 } from './picker-column.js';\nimport { d as defineCustomElement$4 } from './picker-column-option.js';\nimport { d as defineCustomElement$3 } from './popover.js';\nimport { d as defineCustomElement$2 } from './ripple-effect.js';\n\nconst isYearDisabled = (refYear, minParts, maxParts) => {\n if (minParts && minParts.year > refYear) {\n return true;\n }\n if (maxParts && maxParts.year < refYear) {\n return true;\n }\n return false;\n};\n/**\n * Returns true if a given day should\n * not be interactive according to its value,\n * or the max/min dates.\n */\nconst isDayDisabled = (refParts, minParts, maxParts, dayValues) => {\n /**\n * If this is a filler date (i.e. padding)\n * then the date is disabled.\n */\n if (refParts.day === null) {\n return true;\n }\n /**\n * If user passed in a list of acceptable day values\n * check to make sure that the date we are looking\n * at is in this array.\n */\n if (dayValues !== undefined && !dayValues.includes(refParts.day)) {\n return true;\n }\n /**\n * Given a min date, perform the following\n * checks. If any of them are true, then the\n * day should be disabled:\n * 1. Is the current year < the min allowed year?\n * 2. Is the current year === min allowed year,\n * but the current month < the min allowed month?\n * 3. Is the current year === min allowed year, the\n * current month === min allow month, but the current\n * day < the min allowed day?\n */\n if (minParts && isBefore(refParts, minParts)) {\n return true;\n }\n /**\n * Given a max date, perform the following\n * checks. If any of them are true, then the\n * day should be disabled:\n * 1. Is the current year > the max allowed year?\n * 2. Is the current year === max allowed year,\n * but the current month > the max allowed month?\n * 3. Is the current year === max allowed year, the\n * current month === max allow month, but the current\n * day > the max allowed day?\n */\n if (maxParts && isAfter(refParts, maxParts)) {\n return true;\n }\n /**\n * If none of these checks\n * passed then the date should\n * be interactive.\n */\n return false;\n};\n/**\n * Given a locale, a date, the selected date(s), and today's date,\n * generate the state for a given calendar day button.\n */\nconst getCalendarDayState = (locale, refParts, activeParts, todayParts, minParts, maxParts, dayValues) => {\n /**\n * activeParts signals what day(s) are currently selected in the datetime.\n * If multiple=\"true\", this will be an array, but the logic in this util\n * is the same whether we have one selected day or many because we're only\n * calculating the state for one button. So, we treat a single activeParts value\n * the same as an array of length one.\n */\n const activePartsArray = Array.isArray(activeParts) ? activeParts : [activeParts];\n /**\n * The day button is active if it is selected, or in other words, if refParts\n * matches at least one selected date.\n */\n const isActive = activePartsArray.find((parts) => isSameDay(refParts, parts)) !== undefined;\n const isToday = isSameDay(refParts, todayParts);\n const disabled = isDayDisabled(refParts, minParts, maxParts, dayValues);\n /**\n * Note that we always return one object regardless of whether activeParts\n * was an array, since we pare down to one value for isActive.\n */\n return {\n disabled,\n isActive,\n isToday,\n ariaSelected: isActive ? 'true' : null,\n ariaLabel: generateDayAriaLabel(locale, isToday, refParts),\n text: refParts.day != null ? getDay(locale, refParts) : null,\n };\n};\n/**\n * Returns `true` if the month is disabled given the\n * current date value and min/max date constraints.\n */\nconst isMonthDisabled = (refParts, { minParts, maxParts, }) => {\n // If the year is disabled then the month is disabled.\n if (isYearDisabled(refParts.year, minParts, maxParts)) {\n return true;\n }\n // If the date value is before the min date, then the month is disabled.\n // If the date value is after the max date, then the month is disabled.\n if ((minParts && isBefore(refParts, minParts)) || (maxParts && isAfter(refParts, maxParts))) {\n return true;\n }\n return false;\n};\n/**\n * Given a working date, an optional minimum date range,\n * and an optional maximum date range; determine if the\n * previous navigation button is disabled.\n */\nconst isPrevMonthDisabled = (refParts, minParts, maxParts) => {\n const prevMonth = Object.assign(Object.assign({}, getPreviousMonth(refParts)), { day: null });\n return isMonthDisabled(prevMonth, {\n minParts,\n maxParts,\n });\n};\n/**\n * Given a working date and a maximum date range,\n * determine if the next navigation button is disabled.\n */\nconst isNextMonthDisabled = (refParts, maxParts) => {\n const nextMonth = Object.assign(Object.assign({}, getNextMonth(refParts)), { day: null });\n return isMonthDisabled(nextMonth, {\n maxParts,\n });\n};\n/**\n * Given the value of the highlightedDates property\n * and an ISO string, return the styles to use for\n * that date, or undefined if none are found.\n */\nconst getHighlightStyles = (highlightedDates, dateIsoString, el) => {\n if (Array.isArray(highlightedDates)) {\n const dateStringWithoutTime = dateIsoString.split('T')[0];\n const matchingHighlight = highlightedDates.find((hd) => hd.date === dateStringWithoutTime);\n if (matchingHighlight) {\n return {\n textColor: matchingHighlight.textColor,\n backgroundColor: matchingHighlight.backgroundColor,\n };\n }\n }\n else {\n /**\n * Wrap in a try-catch to prevent exceptions in the user's function\n * from interrupting the calendar's rendering.\n */\n try {\n return highlightedDates(dateIsoString);\n }\n catch (e) {\n printIonError('Exception thrown from provided `highlightedDates` callback. Please check your function and try again.', el, e);\n }\n }\n return undefined;\n};\n\n/**\n * If a time zone is provided in the format options, the rendered text could\n * differ from what was selected in the Datetime, which could cause\n * confusion.\n */\nconst warnIfTimeZoneProvided = (el, formatOptions) => {\n var _a, _b, _c, _d;\n if (((_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) === null || _a === void 0 ? void 0 : _a.timeZone) ||\n ((_b = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) === null || _b === void 0 ? void 0 : _b.timeZoneName) ||\n ((_c = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) === null || _c === void 0 ? void 0 : _c.timeZone) ||\n ((_d = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) === null || _d === void 0 ? void 0 : _d.timeZoneName)) {\n printIonWarning('Datetime: \"timeZone\" and \"timeZoneName\" are not supported in \"formatOptions\".', el);\n }\n};\nconst checkForPresentationFormatMismatch = (el, presentation, formatOptions) => {\n // formatOptions is not required\n if (!formatOptions)\n return;\n // If formatOptions is provided, the date and/or time objects are required, depending on the presentation\n switch (presentation) {\n case 'date':\n case 'month-year':\n case 'month':\n case 'year':\n if (formatOptions.date === undefined) {\n printIonWarning(`Datetime: The '${presentation}' presentation requires a date object in formatOptions.`, el);\n }\n break;\n case 'time':\n if (formatOptions.time === undefined) {\n printIonWarning(`Datetime: The 'time' presentation requires a time object in formatOptions.`, el);\n }\n break;\n case 'date-time':\n case 'time-date':\n if (formatOptions.date === undefined && formatOptions.time === undefined) {\n printIonWarning(`Datetime: The '${presentation}' presentation requires either a date or time object (or both) in formatOptions.`, el);\n }\n break;\n }\n};\n\nconst datetimeIosCss = \":host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\\\"\\\";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}.calendar-month-year-toggle.ion-focused::after{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}.calendar-month-year-toggle #toggle-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-light, #f4f5f8);--background-rgb:var(--ion-color-light-rgb, 244, 245, 248);--title-color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}:host(.datetime-presentation-date-time:not(.datetime-prefer-wheel)),:host(.datetime-presentation-time-date:not(.datetime-prefer-wheel)),:host(.datetime-presentation-date:not(.datetime-prefer-wheel)){min-height:350px}:host .datetime-header{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:16px;padding-bottom:16px;border-bottom:0.55px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #cccccc));font-size:min(0.875rem, 22.4px)}:host .datetime-header .datetime-title{color:var(--title-color)}:host .datetime-header .datetime-selected-date{margin-top:10px}.calendar-month-year-toggle{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;min-height:44px;font-size:min(1rem, 25.6px);font-weight:600}.calendar-month-year-toggle.ion-focused::after{opacity:0.15}.calendar-month-year-toggle #toggle-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:10px;margin-bottom:10px}:host .calendar-action-buttons .calendar-month-year-toggle ion-icon,:host .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-buttons{padding-left:0;padding-right:0;padding-top:8px;padding-bottom:0}:host .calendar-action-buttons ion-buttons ion-button{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host .calendar-days-of-week{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;color:var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3));font-size:min(0.75rem, 19.2px);font-weight:600;line-height:24px;text-transform:uppercase}@supports (border-radius: mod(1px, 1px)){.calendar-days-of-week .day-of-week{width:clamp(20px, calc(mod(min(1rem, 24px), 24px) * 10), 100%);height:24px;overflow:hidden}.calendar-day{border-radius:max(8px, mod(min(1rem, 24px), 24px) * 10)}}@supports ((border-radius: mod(1px, 1px)) and (background: -webkit-named-image(apple-pay-logo-black)) and (not (contain-intrinsic-size: none))) or (not (border-radius: mod(1px, 1px))){.calendar-days-of-week .day-of-week{width:auto;height:auto;overflow:initial}.calendar-day{border-radius:32px}}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-ms-flex-align:center;align-items:center;height:calc(100% - 16px)}:host .calendar-day-wrapper{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;height:0;min-height:1rem}:host .calendar-day{width:40px;min-width:40px;height:40px;font-size:min(1.25rem, 32px)}.calendar-day.calendar-day-active{background:rgba(var(--ion-color-base-rgb), 0.2);font-size:min(1.375rem, 35.2px)}:host .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-active{color:var(--ion-color-base);font-weight:600}:host .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:16px;font-size:min(1rem, 25.6px)}:host .datetime-time .time-header{font-weight:600}:host .datetime-buttons{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;border-top:0.55px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #cccccc))}:host .datetime-buttons ::slotted(ion-buttons),:host .datetime-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}:host .datetime-action-buttons{width:100%}\";\nconst IonDatetimeIosStyle0 = datetimeIosCss;\n\nconst datetimeMdCss = \":host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\\\"\\\";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}.calendar-month-year-toggle.ion-focused::after{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}.calendar-month-year-toggle #toggle-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #ffffff));--title-color:var(--ion-color-contrast)}:host .datetime-header{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px;padding-top:20px;padding-bottom:20px;background:var(--ion-color-base);color:var(--title-color)}:host .datetime-header .datetime-title{font-size:0.75rem;text-transform:uppercase}:host .datetime-header .datetime-selected-date{margin-top:30px;font-size:2.125rem}:host .calendar-action-buttons ion-button{--color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}.calendar-month-year-toggle{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:12px;min-height:48px;background:transparent;color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959));z-index:1}.calendar-month-year-toggle.ion-focused::after{opacity:0.04}.calendar-month-year-toggle ion-ripple-effect{color:currentColor}@media (any-hover: hover){.calendar-month-year-toggle.ion-activatable:not(.ion-focused):hover::after{background:currentColor;opacity:0.04}}:host .calendar-days-of-week{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:0px;padding-bottom:0px;color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray));font-size:0.875rem;line-height:36px}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:4px;padding-bottom:4px;grid-template-rows:repeat(6, 1fr)}:host .calendar-day{width:42px;min-width:42px;height:42px;font-size:0.875rem}:host .calendar-day.calendar-day-today{border:1px solid var(--ion-color-base);color:var(--ion-color-base)}:host .calendar-day.calendar-day-active{color:var(--ion-color-contrast)}.calendar-day.calendar-day-active{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:8px}:host .time-header{color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}:host(.datetime-presentation-month) .datetime-year,:host(.datetime-presentation-year) .datetime-year,:host(.datetime-presentation-month-year) .datetime-year{margin-top:20px;margin-bottom:20px}:host .datetime-buttons{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}\";\nconst IonDatetimeMdStyle0 = datetimeMdCss;\n\nconst Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLElement {\n constructor() {\n super();\n this.__registerHost();\n this.__attachShadow();\n this.ionCancel = createEvent(this, \"ionCancel\", 7);\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.ionValueChange = createEvent(this, \"ionValueChange\", 7);\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n this.ionRender = createEvent(this, \"ionRender\", 7);\n this.inputId = `ion-dt-${datetimeIds++}`;\n this.prevPresentation = null;\n this.warnIfIncorrectValueUsage = () => {\n const { multiple, value } = this;\n if (!multiple && Array.isArray(value)) {\n /**\n * We do some processing on the `value` array so\n * that it looks more like an array when logged to\n * the console.\n * Example given ['a', 'b']\n * Default toString() behavior: a,b\n * Custom behavior: ['a', 'b']\n */\n printIonWarning(`ion-datetime was passed an array of values, but multiple=\"false\". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the \"value\" property when multiple=\"false\".\n\n Value Passed: [${value.map((v) => `'${v}'`).join(', ')}]\n`, this.el);\n }\n };\n this.setValue = (value) => {\n this.value = value;\n this.ionChange.emit({ value });\n };\n /**\n * Returns the DatetimePart interface\n * to use when rendering an initial set of\n * data. This should be used when rendering an\n * interface in an environment where the `value`\n * may not be set. This function works\n * by returning the first selected date and then\n * falling back to defaultParts if no active date\n * is selected.\n */\n this.getActivePartsWithFallback = () => {\n var _a;\n const { defaultParts } = this;\n return (_a = this.getActivePart()) !== null && _a !== void 0 ? _a : defaultParts;\n };\n this.getActivePart = () => {\n const { activeParts } = this;\n return Array.isArray(activeParts) ? activeParts[0] : activeParts;\n };\n this.closeParentOverlay = (role) => {\n const popoverOrModal = this.el.closest('ion-modal, ion-popover');\n if (popoverOrModal) {\n popoverOrModal.dismiss(undefined, role);\n }\n };\n this.setWorkingParts = (parts) => {\n this.workingParts = Object.assign({}, parts);\n };\n this.setActiveParts = (parts, removeDate = false) => {\n /** if the datetime component is in readonly mode,\n * allow browsing of the calendar without changing\n * the set value\n */\n if (this.readonly) {\n return;\n }\n const { multiple, minParts, maxParts, activeParts } = this;\n /**\n * When setting the active parts, it is possible\n * to set invalid data. For example,\n * when updating January 31 to February,\n * February 31 does not exist. As a result\n * we need to validate the active parts and\n * ensure that we are only setting valid dates.\n * Additionally, we need to update the working parts\n * too in the event that the validated parts are different.\n */\n const validatedParts = validateParts(parts, minParts, maxParts);\n this.setWorkingParts(validatedParts);\n if (multiple) {\n const activePartsArray = Array.isArray(activeParts) ? activeParts : [activeParts];\n if (removeDate) {\n this.activeParts = activePartsArray.filter((p) => !isSameDay(p, validatedParts));\n }\n else {\n this.activeParts = [...activePartsArray, validatedParts];\n }\n }\n else {\n this.activeParts = Object.assign({}, validatedParts);\n }\n const hasSlottedButtons = this.el.querySelector('[slot=\"buttons\"]') !== null;\n if (hasSlottedButtons || this.showDefaultButtons) {\n return;\n }\n this.confirm();\n };\n this.initializeKeyboardListeners = () => {\n const calendarBodyRef = this.calendarBodyRef;\n if (!calendarBodyRef) {\n return;\n }\n const root = this.el.shadowRoot;\n /**\n * Get a reference to the month\n * element we are currently viewing.\n */\n const currentMonth = calendarBodyRef.querySelector('.calendar-month:nth-of-type(2)');\n /**\n * When focusing the calendar body, we want to pass focus\n * to the working day, but other days should\n * only be accessible using the arrow keys. Pressing\n * Tab should jump between bodies of selectable content.\n */\n const checkCalendarBodyFocus = (ev) => {\n var _a;\n const record = ev[0];\n /**\n * If calendar body was already focused\n * when this fired or if the calendar body\n * if not currently focused, we should not re-focus\n * the inner day.\n */\n if (((_a = record.oldValue) === null || _a === void 0 ? void 0 : _a.includes('ion-focused')) || !calendarBodyRef.classList.contains('ion-focused')) {\n return;\n }\n this.focusWorkingDay(currentMonth);\n };\n const mo = new MutationObserver(checkCalendarBodyFocus);\n mo.observe(calendarBodyRef, { attributeFilter: ['class'], attributeOldValue: true });\n this.destroyKeyboardMO = () => {\n mo === null || mo === void 0 ? void 0 : mo.disconnect();\n };\n /**\n * We must use keydown not keyup as we want\n * to prevent scrolling when using the arrow keys.\n */\n calendarBodyRef.addEventListener('keydown', (ev) => {\n const activeElement = root.activeElement;\n if (!activeElement || !activeElement.classList.contains('calendar-day')) {\n return;\n }\n const parts = getPartsFromCalendarDay(activeElement);\n let partsToFocus;\n switch (ev.key) {\n case 'ArrowDown':\n ev.preventDefault();\n partsToFocus = getNextWeek(parts);\n break;\n case 'ArrowUp':\n ev.preventDefault();\n partsToFocus = getPreviousWeek(parts);\n break;\n case 'ArrowRight':\n ev.preventDefault();\n partsToFocus = getNextDay(parts);\n break;\n case 'ArrowLeft':\n ev.preventDefault();\n partsToFocus = getPreviousDay(parts);\n break;\n case 'Home':\n ev.preventDefault();\n partsToFocus = getStartOfWeek(parts);\n break;\n case 'End':\n ev.preventDefault();\n partsToFocus = getEndOfWeek(parts);\n break;\n case 'PageUp':\n ev.preventDefault();\n partsToFocus = ev.shiftKey ? getPreviousYear(parts) : getPreviousMonth(parts);\n break;\n case 'PageDown':\n ev.preventDefault();\n partsToFocus = ev.shiftKey ? getNextYear(parts) : getNextMonth(parts);\n break;\n /**\n * Do not preventDefault here\n * as we do not want to override other\n * browser defaults such as pressing Enter/Space\n * to select a day.\n */\n default:\n return;\n }\n /**\n * If the day we want to move focus to is\n * disabled, do not do anything.\n */\n if (isDayDisabled(partsToFocus, this.minParts, this.maxParts)) {\n return;\n }\n this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), partsToFocus));\n /**\n * Give view a chance to re-render\n * then move focus to the new working day\n */\n requestAnimationFrame(() => this.focusWorkingDay(currentMonth));\n });\n };\n this.focusWorkingDay = (currentMonth) => {\n /**\n * Get the number of padding days so\n * we know how much to offset our next selector by\n * to grab the correct calendar-day element.\n */\n const padding = currentMonth.querySelectorAll('.calendar-day-padding');\n const { day } = this.workingParts;\n if (day === null) {\n return;\n }\n /**\n * Get the calendar day element\n * and focus it.\n */\n const dayEl = currentMonth.querySelector(`.calendar-day-wrapper:nth-of-type(${padding.length + day}) .calendar-day`);\n if (dayEl) {\n dayEl.focus();\n }\n };\n this.processMinParts = () => {\n const { min, defaultParts } = this;\n if (min === undefined) {\n this.minParts = undefined;\n return;\n }\n this.minParts = parseMinParts(min, defaultParts);\n };\n this.processMaxParts = () => {\n const { max, defaultParts } = this;\n if (max === undefined) {\n this.maxParts = undefined;\n return;\n }\n this.maxParts = parseMaxParts(max, defaultParts);\n };\n this.initializeCalendarListener = () => {\n const calendarBodyRef = this.calendarBodyRef;\n if (!calendarBodyRef) {\n return;\n }\n /**\n * For performance reasons, we only render 3\n * months at a time: The current month, the previous\n * month, and the next month. We have a scroll listener\n * on the calendar body to append/prepend new months.\n *\n * We can do this because Stencil is smart enough to not\n * re-create the .calendar-month containers, but rather\n * update the content within those containers.\n *\n * As an added bonus, WebKit has some troubles with\n * scroll-snap-stop: always, so not rendering all of\n * the months in a row allows us to mostly sidestep\n * that issue.\n */\n const months = calendarBodyRef.querySelectorAll('.calendar-month');\n const startMonth = months[0];\n const workingMonth = months[1];\n const endMonth = months[2];\n const mode = getIonMode(this);\n const needsiOSRubberBandFix = mode === 'ios' && typeof navigator !== 'undefined' && navigator.maxTouchPoints > 1;\n /**\n * Before setting up the scroll listener,\n * scroll the middle month into view.\n * scrollIntoView() will scroll entire page\n * if element is not in viewport. Use scrollLeft instead.\n */\n writeTask(() => {\n calendarBodyRef.scrollLeft = startMonth.clientWidth * (isRTL(this.el) ? -1 : 1);\n const getChangedMonth = (parts) => {\n const box = calendarBodyRef.getBoundingClientRect();\n /**\n * If the current scroll position is all the way to the left\n * then we have scrolled to the previous month.\n * Otherwise, assume that we have scrolled to the next\n * month. We have a tolerance of 2px to account for\n * sub pixel rendering.\n *\n * Check below the next line ensures that we did not\n * swipe and abort (i.e. we swiped but we are still on the current month).\n */\n const condition = isRTL(this.el) ? calendarBodyRef.scrollLeft >= -2 : calendarBodyRef.scrollLeft <= 2;\n const month = condition ? startMonth : endMonth;\n /**\n * The edge of the month must be lined up with\n * the edge of the calendar body in order for\n * the component to update. Otherwise, it\n * may be the case that the user has paused their\n * swipe or the browser has not finished snapping yet.\n * Rather than check if the x values are equal,\n * we give it a tolerance of 2px to account for\n * sub pixel rendering.\n */\n const monthBox = month.getBoundingClientRect();\n if (Math.abs(monthBox.x - box.x) > 2)\n return;\n /**\n * If we're force-rendering a month, assume we've\n * scrolled to that and return it.\n *\n * If forceRenderDate is ever used in a context where the\n * forced month is not immediately auto-scrolled to, this\n * should be updated to also check whether `month` has the\n * same month and year as the forced date.\n */\n const { forceRenderDate } = this;\n if (forceRenderDate !== undefined) {\n return { month: forceRenderDate.month, year: forceRenderDate.year, day: forceRenderDate.day };\n }\n /**\n * From here, we can determine if the start\n * month or the end month was scrolled into view.\n * If no month was changed, then we can return from\n * the scroll callback early.\n */\n if (month === startMonth) {\n return getPreviousMonth(parts);\n }\n else if (month === endMonth) {\n return getNextMonth(parts);\n }\n else {\n return;\n }\n };\n const updateActiveMonth = () => {\n if (needsiOSRubberBandFix) {\n calendarBodyRef.style.removeProperty('pointer-events');\n appliediOSRubberBandFix = false;\n }\n /**\n * If the month did not change\n * then we can return early.\n */\n const newDate = getChangedMonth(this.workingParts);\n if (!newDate)\n return;\n const { month, day, year } = newDate;\n if (isMonthDisabled({ month, year, day: null }, {\n minParts: Object.assign(Object.assign({}, this.minParts), { day: null }),\n maxParts: Object.assign(Object.assign({}, this.maxParts), { day: null }),\n })) {\n return;\n }\n /**\n * Prevent scrolling for other browsers\n * to give the DOM time to update and the container\n * time to properly snap.\n */\n calendarBodyRef.style.setProperty('overflow', 'hidden');\n /**\n * Use a writeTask here to ensure\n * that the state is updated and the\n * correct month is scrolled into view\n * in the same frame. This is not\n * typically a problem on newer devices\n * but older/slower device may have a flicker\n * if we did not do this.\n */\n writeTask(() => {\n this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), { month, day: day, year }));\n calendarBodyRef.scrollLeft = workingMonth.clientWidth * (isRTL(this.el) ? -1 : 1);\n calendarBodyRef.style.removeProperty('overflow');\n if (this.resolveForceDateScrolling) {\n this.resolveForceDateScrolling();\n }\n });\n };\n /**\n * When the container finishes scrolling we\n * need to update the DOM with the selected month.\n */\n let scrollTimeout;\n /**\n * We do not want to attempt to set pointer-events\n * multiple times within a single swipe gesture as\n * that adds unnecessary work to the main thread.\n */\n let appliediOSRubberBandFix = false;\n const scrollCallback = () => {\n if (scrollTimeout) {\n clearTimeout(scrollTimeout);\n }\n /**\n * On iOS it is possible to quickly rubber band\n * the scroll area before the scroll timeout has fired.\n * This results in users reaching the end of the scrollable\n * container before the DOM has updated.\n * By setting `pointer-events: none` we can ensure that\n * subsequent swipes do not happen while the container\n * is snapping.\n */\n if (!appliediOSRubberBandFix && needsiOSRubberBandFix) {\n calendarBodyRef.style.setProperty('pointer-events', 'none');\n appliediOSRubberBandFix = true;\n }\n // Wait ~3 frames\n scrollTimeout = setTimeout(updateActiveMonth, 50);\n };\n calendarBodyRef.addEventListener('scroll', scrollCallback);\n this.destroyCalendarListener = () => {\n calendarBodyRef.removeEventListener('scroll', scrollCallback);\n };\n });\n };\n /**\n * Clean up all listeners except for the overlay\n * listener. This is so that we can re-create the listeners\n * if the datetime has been hidden/presented by a modal or popover.\n */\n this.destroyInteractionListeners = () => {\n const { destroyCalendarListener, destroyKeyboardMO } = this;\n if (destroyCalendarListener !== undefined) {\n destroyCalendarListener();\n }\n if (destroyKeyboardMO !== undefined) {\n destroyKeyboardMO();\n }\n };\n this.processValue = (value) => {\n const hasValue = value !== null && value !== undefined && value !== '' && (!Array.isArray(value) || value.length > 0);\n const valueToProcess = hasValue ? parseDate(value) : this.defaultParts;\n const { minParts, maxParts, workingParts, el } = this;\n this.warnIfIncorrectValueUsage();\n /**\n * Return early if the value wasn't parsed correctly, such as\n * if an improperly formatted date string was provided.\n */\n if (!valueToProcess) {\n return;\n }\n /**\n * Datetime should only warn of out of bounds values\n * if set by the user. If the `value` is undefined,\n * we will default to today's date which may be out\n * of bounds. In this case, the warning makes it look\n * like the developer did something wrong which is\n * not true.\n */\n if (hasValue) {\n warnIfValueOutOfBounds(valueToProcess, minParts, maxParts);\n }\n /**\n * If there are multiple values, pick an arbitrary one to clamp to. This way,\n * if the values are across months, we always show at least one of them. Note\n * that the values don't necessarily have to be in order.\n */\n const singleValue = Array.isArray(valueToProcess) ? valueToProcess[0] : valueToProcess;\n const targetValue = clampDate(singleValue, minParts, maxParts);\n const { month, day, year, hour, minute } = targetValue;\n const ampm = parseAmPm(hour);\n /**\n * Since `activeParts` indicates a value that\n * been explicitly selected either by the\n * user or the app, only update `activeParts`\n * if the `value` property is set.\n */\n if (hasValue) {\n if (Array.isArray(valueToProcess)) {\n this.activeParts = [...valueToProcess];\n }\n else {\n this.activeParts = {\n month,\n day,\n year,\n hour,\n minute,\n ampm,\n };\n }\n }\n else {\n /**\n * Reset the active parts if the value is not set.\n * This will clear the selected calendar day when\n * performing a clear action or using the reset() method.\n */\n this.activeParts = [];\n }\n /**\n * Only animate if:\n * 1. We're using grid style (wheel style pickers should just jump to new value)\n * 2. The month and/or year actually changed, and both are defined (otherwise there's nothing to animate to)\n * 3. The calendar body is visible (prevents animation when in collapsed datetime-button, for example)\n * 4. The month/year picker is not open (since you wouldn't see the animation anyway)\n */\n const didChangeMonth = (month !== undefined && month !== workingParts.month) || (year !== undefined && year !== workingParts.year);\n const bodyIsVisible = el.classList.contains('datetime-ready');\n const { isGridStyle, showMonthAndYear } = this;\n let areAllSelectedDatesInSameMonth = true;\n if (Array.isArray(valueToProcess)) {\n const firstMonth = valueToProcess[0].month;\n for (const date of valueToProcess) {\n if (date.month !== firstMonth) {\n areAllSelectedDatesInSameMonth = false;\n break;\n }\n }\n }\n /**\n * If there is more than one date selected\n * and the dates aren't all in the same month,\n * then we should neither animate to the date\n * nor update the working parts because we do\n * not know which date the user wants to view.\n */\n if (areAllSelectedDatesInSameMonth) {\n if (isGridStyle && didChangeMonth && bodyIsVisible && !showMonthAndYear) {\n this.animateToDate(targetValue);\n }\n else {\n /**\n * We only need to do this if we didn't just animate to a new month,\n * since that calls prevMonth/nextMonth which calls setWorkingParts for us.\n */\n this.setWorkingParts({\n month,\n day,\n year,\n hour,\n minute,\n ampm,\n });\n }\n }\n };\n this.animateToDate = async (targetValue) => {\n const { workingParts } = this;\n /**\n * Tell other render functions that we need to force the\n * target month to appear in place of the actual next/prev month.\n * Because this is a State variable, a rerender will be triggered\n * automatically, updating the rendered months.\n */\n this.forceRenderDate = targetValue;\n /**\n * Flag that we've started scrolling to the forced date.\n * The resolve function will be called by the datetime's\n * scroll listener when it's done updating everything.\n * This is a replacement for making prev/nextMonth async,\n * since the logic we're waiting on is in a listener.\n */\n const forceDateScrollingPromise = new Promise((resolve) => {\n this.resolveForceDateScrolling = resolve;\n });\n /**\n * Animate smoothly to the forced month. This will also update\n * workingParts and correct the surrounding months for us.\n */\n const targetMonthIsBefore = isBefore(targetValue, workingParts);\n targetMonthIsBefore ? this.prevMonth() : this.nextMonth();\n await forceDateScrollingPromise;\n this.resolveForceDateScrolling = undefined;\n this.forceRenderDate = undefined;\n };\n this.onFocus = () => {\n this.ionFocus.emit();\n };\n this.onBlur = () => {\n this.ionBlur.emit();\n };\n this.hasValue = () => {\n return this.value != null;\n };\n this.nextMonth = () => {\n const calendarBodyRef = this.calendarBodyRef;\n if (!calendarBodyRef) {\n return;\n }\n const nextMonth = calendarBodyRef.querySelector('.calendar-month:last-of-type');\n if (!nextMonth) {\n return;\n }\n const left = nextMonth.offsetWidth * 2;\n calendarBodyRef.scrollTo({\n top: 0,\n left: left * (isRTL(this.el) ? -1 : 1),\n behavior: 'smooth',\n });\n };\n this.prevMonth = () => {\n const calendarBodyRef = this.calendarBodyRef;\n if (!calendarBodyRef) {\n return;\n }\n const prevMonth = calendarBodyRef.querySelector('.calendar-month:first-of-type');\n if (!prevMonth) {\n return;\n }\n calendarBodyRef.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth',\n });\n };\n this.toggleMonthAndYearView = () => {\n this.showMonthAndYear = !this.showMonthAndYear;\n };\n this.showMonthAndYear = false;\n this.activeParts = [];\n this.workingParts = {\n month: 5,\n day: 28,\n year: 2021,\n hour: 13,\n minute: 52,\n ampm: 'pm',\n };\n this.isTimePopoverOpen = false;\n this.forceRenderDate = undefined;\n this.color = 'primary';\n this.name = this.inputId;\n this.disabled = false;\n this.formatOptions = undefined;\n this.readonly = false;\n this.isDateEnabled = undefined;\n this.min = undefined;\n this.max = undefined;\n this.presentation = 'date-time';\n this.cancelText = 'Cancel';\n this.doneText = 'Done';\n this.clearText = 'Clear';\n this.yearValues = undefined;\n this.monthValues = undefined;\n this.dayValues = undefined;\n this.hourValues = undefined;\n this.minuteValues = undefined;\n this.locale = 'default';\n this.firstDayOfWeek = 0;\n this.titleSelectedDatesFormatter = undefined;\n this.multiple = false;\n this.highlightedDates = undefined;\n this.value = undefined;\n this.showDefaultTitle = false;\n this.showDefaultButtons = false;\n this.showClearButton = false;\n this.showDefaultTimeLabel = true;\n this.hourCycle = undefined;\n this.size = 'fixed';\n this.preferWheel = false;\n }\n formatOptionsChanged() {\n const { el, formatOptions, presentation } = this;\n checkForPresentationFormatMismatch(el, presentation, formatOptions);\n warnIfTimeZoneProvided(el, formatOptions);\n }\n disabledChanged() {\n this.emitStyle();\n }\n minChanged() {\n this.processMinParts();\n }\n maxChanged() {\n this.processMaxParts();\n }\n presentationChanged() {\n const { el, formatOptions, presentation } = this;\n checkForPresentationFormatMismatch(el, presentation, formatOptions);\n }\n get isGridStyle() {\n const { presentation, preferWheel } = this;\n const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';\n return hasDatePresentation && !preferWheel;\n }\n yearValuesChanged() {\n this.parsedYearValues = convertToArrayOfNumbers(this.yearValues);\n }\n monthValuesChanged() {\n this.parsedMonthValues = convertToArrayOfNumbers(this.monthValues);\n }\n dayValuesChanged() {\n this.parsedDayValues = convertToArrayOfNumbers(this.dayValues);\n }\n hourValuesChanged() {\n this.parsedHourValues = convertToArrayOfNumbers(this.hourValues);\n }\n minuteValuesChanged() {\n this.parsedMinuteValues = convertToArrayOfNumbers(this.minuteValues);\n }\n /**\n * Update the datetime value when the value changes\n */\n async valueChanged() {\n const { value } = this;\n if (this.hasValue()) {\n this.processValue(value);\n }\n this.emitStyle();\n this.ionValueChange.emit({ value });\n }\n /**\n * Confirms the selected datetime value, updates the\n * `value` property, and optionally closes the popover\n * or modal that the datetime was presented in.\n */\n async confirm(closeOverlay = false) {\n const { isCalendarPicker, activeParts, preferWheel, workingParts } = this;\n /**\n * We only update the value if the presentation is not a calendar picker.\n */\n if (activeParts !== undefined || !isCalendarPicker) {\n const activePartsIsArray = Array.isArray(activeParts);\n if (activePartsIsArray && activeParts.length === 0) {\n if (preferWheel) {\n /**\n * If the datetime is using a wheel picker, but the\n * active parts are empty, then the user has confirmed the\n * initial value (working parts) presented to them.\n */\n this.setValue(convertDataToISO(workingParts));\n }\n else {\n this.setValue(undefined);\n }\n }\n else {\n this.setValue(convertDataToISO(activeParts));\n }\n }\n if (closeOverlay) {\n this.closeParentOverlay(CONFIRM_ROLE);\n }\n }\n /**\n * Resets the internal state of the datetime but does not update the value.\n * Passing a valid ISO-8601 string will reset the state of the component to the provided date.\n * If no value is provided, the internal state will be reset to the clamped value of the min, max and today.\n */\n async reset(startDate) {\n this.processValue(startDate);\n }\n /**\n * Emits the ionCancel event and\n * optionally closes the popover\n * or modal that the datetime was\n * presented in.\n */\n async cancel(closeOverlay = false) {\n this.ionCancel.emit();\n if (closeOverlay) {\n this.closeParentOverlay(CANCEL_ROLE);\n }\n }\n get isCalendarPicker() {\n const { presentation } = this;\n return presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';\n }\n connectedCallback() {\n this.clearFocusVisible = startFocusVisible(this.el).destroy;\n }\n disconnectedCallback() {\n if (this.clearFocusVisible) {\n this.clearFocusVisible();\n this.clearFocusVisible = undefined;\n }\n }\n initializeListeners() {\n this.initializeCalendarListener();\n this.initializeKeyboardListeners();\n }\n componentDidLoad() {\n const { el, intersectionTrackerRef } = this;\n /**\n * If a scrollable element is hidden using `display: none`,\n * it will not have a scroll height meaning we cannot scroll elements\n * into view. As a result, we will need to wait for the datetime to become\n * visible if used inside of a modal or a popover otherwise the scrollable\n * areas will not have the correct values snapped into place.\n */\n const visibleCallback = (entries) => {\n const ev = entries[0];\n if (!ev.isIntersecting) {\n return;\n }\n this.initializeListeners();\n /**\n * TODO FW-2793: Datetime needs a frame to ensure that it\n * can properly scroll contents into view. As a result\n * we hide the scrollable content until after that frame\n * so users do not see the content quickly shifting. The downside\n * is that the content will pop into view a frame after. Maybe there\n * is a better way to handle this?\n */\n writeTask(() => {\n this.el.classList.add('datetime-ready');\n });\n };\n const visibleIO = new IntersectionObserver(visibleCallback, { threshold: 0.01, root: el });\n /**\n * Use raf to avoid a race condition between the component loading and\n * its display animation starting (such as when shown in a modal). This\n * could cause the datetime to start at a visibility of 0, erroneously\n * triggering the `hiddenIO` observer below.\n */\n raf(() => visibleIO === null || visibleIO === void 0 ? void 0 : visibleIO.observe(intersectionTrackerRef));\n /**\n * We need to clean up listeners when the datetime is hidden\n * in a popover/modal so that we can properly scroll containers\n * back into view if they are re-presented. When the datetime is hidden\n * the scroll areas have scroll widths/heights of 0px, so any snapping\n * we did originally has been lost.\n */\n const hiddenCallback = (entries) => {\n const ev = entries[0];\n if (ev.isIntersecting) {\n return;\n }\n this.destroyInteractionListeners();\n /**\n * When datetime is hidden, we need to make sure that\n * the month/year picker is closed. Otherwise,\n * it will be open when the datetime re-appears\n * and the scroll area of the calendar grid will be 0.\n * As a result, the wrong month will be shown.\n */\n this.showMonthAndYear = false;\n writeTask(() => {\n this.el.classList.remove('datetime-ready');\n });\n };\n const hiddenIO = new IntersectionObserver(hiddenCallback, { threshold: 0, root: el });\n raf(() => hiddenIO === null || hiddenIO === void 0 ? void 0 : hiddenIO.observe(intersectionTrackerRef));\n /**\n * Datetime uses Ionic components that emit\n * ionFocus and ionBlur. These events are\n * composed meaning they will cross\n * the shadow dom boundary. We need to\n * stop propagation on these events otherwise\n * developers will see 2 ionFocus or 2 ionBlur\n * events at a time.\n */\n const root = getElementRoot(this.el);\n root.addEventListener('ionFocus', (ev) => ev.stopPropagation());\n root.addEventListener('ionBlur', (ev) => ev.stopPropagation());\n }\n /**\n * When the presentation is changed, all calendar content is recreated,\n * so we need to re-init behavior with the new elements.\n */\n componentDidRender() {\n const { presentation, prevPresentation, calendarBodyRef, minParts, preferWheel, forceRenderDate } = this;\n /**\n * TODO(FW-2165)\n * Remove this when https://bugs.webkit.org/show_bug.cgi?id=235960 is fixed.\n * When using `min`, we add `scroll-snap-align: none`\n * to the disabled month so that users cannot scroll to it.\n * This triggers a bug in WebKit where the scroll position is reset.\n * Since the month change logic is handled by a scroll listener,\n * this causes the month to change leading to `scroll-snap-align`\n * changing again, thus changing the scroll position again and causing\n * an infinite loop.\n * This issue only applies to the calendar grid, so we can disable\n * it if the calendar grid is not being used.\n */\n const hasCalendarGrid = !preferWheel && ['date-time', 'time-date', 'date'].includes(presentation);\n if (minParts !== undefined && hasCalendarGrid && calendarBodyRef) {\n const workingMonth = calendarBodyRef.querySelector('.calendar-month:nth-of-type(1)');\n /**\n * We need to make sure the datetime is not in the process\n * of scrolling to a new datetime value if the value\n * is updated programmatically.\n * Otherwise, the datetime will appear to not scroll at all because\n * we are resetting the scroll position to the center of the view.\n * Prior to the datetime's value being updated programmatically,\n * the calendarBodyRef is scrolled such that the middle month is centered\n * in the view. The below code updates the scroll position so the middle\n * month is also centered in the view. Since the scroll position did not change,\n * the scroll callback in this file does not fire,\n * and the resolveForceDateScrolling promise never resolves.\n */\n if (workingMonth && forceRenderDate === undefined) {\n calendarBodyRef.scrollLeft = workingMonth.clientWidth * (isRTL(this.el) ? -1 : 1);\n }\n }\n if (prevPresentation === null) {\n this.prevPresentation = presentation;\n return;\n }\n if (presentation === prevPresentation) {\n return;\n }\n this.prevPresentation = presentation;\n this.destroyInteractionListeners();\n this.initializeListeners();\n /**\n * The month/year picker from the date interface\n * should be closed as it is not available in non-date\n * interfaces.\n */\n this.showMonthAndYear = false;\n raf(() => {\n this.ionRender.emit();\n });\n }\n componentWillLoad() {\n const { el, formatOptions, highlightedDates, multiple, presentation, preferWheel } = this;\n if (multiple) {\n if (presentation !== 'date') {\n printIonWarning('Multiple date selection is only supported for presentation=\"date\".', el);\n }\n if (preferWheel) {\n printIonWarning('Multiple date selection is not supported with preferWheel=\"true\".', el);\n }\n }\n if (highlightedDates !== undefined) {\n if (presentation !== 'date' && presentation !== 'date-time' && presentation !== 'time-date') {\n printIonWarning('The highlightedDates property is only supported with the date, date-time, and time-date presentations.', el);\n }\n if (preferWheel) {\n printIonWarning('The highlightedDates property is not supported with preferWheel=\"true\".', el);\n }\n }\n if (formatOptions) {\n checkForPresentationFormatMismatch(el, presentation, formatOptions);\n warnIfTimeZoneProvided(el, formatOptions);\n }\n const hourValues = (this.parsedHourValues = convertToArrayOfNumbers(this.hourValues));\n const minuteValues = (this.parsedMinuteValues = convertToArrayOfNumbers(this.minuteValues));\n const monthValues = (this.parsedMonthValues = convertToArrayOfNumbers(this.monthValues));\n const yearValues = (this.parsedYearValues = convertToArrayOfNumbers(this.yearValues));\n const dayValues = (this.parsedDayValues = convertToArrayOfNumbers(this.dayValues));\n const todayParts = (this.todayParts = parseDate(getToday()));\n this.processMinParts();\n this.processMaxParts();\n this.defaultParts = getClosestValidDate({\n refParts: todayParts,\n monthValues,\n dayValues,\n yearValues,\n hourValues,\n minuteValues,\n minParts: this.minParts,\n maxParts: this.maxParts,\n });\n this.processValue(this.value);\n this.emitStyle();\n }\n emitStyle() {\n this.ionStyle.emit({\n interactive: true,\n datetime: true,\n 'interactive-disabled': this.disabled,\n });\n }\n /**\n * Universal render methods\n * These are pieces of datetime that\n * are rendered independently of presentation.\n */\n renderFooter() {\n const { disabled, readonly, showDefaultButtons, showClearButton } = this;\n /**\n * The cancel, clear, and confirm buttons\n * should not be interactive if the datetime\n * is disabled or readonly.\n */\n const isButtonDisabled = disabled || readonly;\n const hasSlottedButtons = this.el.querySelector('[slot=\"buttons\"]') !== null;\n if (!hasSlottedButtons && !showDefaultButtons && !showClearButton) {\n return;\n }\n const clearButtonClick = () => {\n this.reset();\n this.setValue(undefined);\n };\n /**\n * By default we render two buttons:\n * Cancel - Dismisses the datetime and\n * does not update the `value` prop.\n * OK - Dismisses the datetime and\n * updates the `value` prop.\n */\n return (h(\"div\", { class: \"datetime-footer\" }, h(\"div\", { class: \"datetime-buttons\" }, h(\"div\", { class: {\n ['datetime-action-buttons']: true,\n ['has-clear-button']: this.showClearButton,\n } }, h(\"slot\", { name: \"buttons\" }, h(\"ion-buttons\", null, showDefaultButtons && (h(\"ion-button\", { id: \"cancel-button\", color: this.color, onClick: () => this.cancel(true), disabled: isButtonDisabled }, this.cancelText)), h(\"div\", { class: \"datetime-action-buttons-container\" }, showClearButton && (h(\"ion-button\", { id: \"clear-button\", color: this.color, onClick: () => clearButtonClick(), disabled: isButtonDisabled }, this.clearText)), showDefaultButtons && (h(\"ion-button\", { id: \"confirm-button\", color: this.color, onClick: () => this.confirm(true), disabled: isButtonDisabled }, this.doneText)))))))));\n }\n /**\n * Wheel picker render methods\n */\n renderWheelPicker(forcePresentation = this.presentation) {\n /**\n * If presentation=\"time-date\" we switch the\n * order of the render array here instead of\n * manually reordering each date/time picker\n * column with CSS. This allows for additional\n * flexibility if we need to render subsets\n * of the date/time data or do additional ordering\n * within the child render functions.\n */\n const renderArray = forcePresentation === 'time-date'\n ? [this.renderTimePickerColumns(forcePresentation), this.renderDatePickerColumns(forcePresentation)]\n : [this.renderDatePickerColumns(forcePresentation), this.renderTimePickerColumns(forcePresentation)];\n return h(\"ion-picker\", null, renderArray);\n }\n renderDatePickerColumns(forcePresentation) {\n return forcePresentation === 'date-time' || forcePresentation === 'time-date'\n ? this.renderCombinedDatePickerColumn()\n : this.renderIndividualDatePickerColumns(forcePresentation);\n }\n renderCombinedDatePickerColumn() {\n const { defaultParts, disabled, workingParts, locale, minParts, maxParts, todayParts, isDateEnabled } = this;\n const activePart = this.getActivePartsWithFallback();\n /**\n * By default, generate a range of 3 months:\n * Previous month, current month, and next month\n */\n const monthsToRender = generateMonths(workingParts);\n const lastMonth = monthsToRender[monthsToRender.length - 1];\n /**\n * Ensure that users can select the entire window of dates.\n */\n monthsToRender[0].day = 1;\n lastMonth.day = getNumDaysInMonth(lastMonth.month, lastMonth.year);\n /**\n * Narrow the dates rendered based on min/max dates (if any).\n * The `min` date is used if the min is after the generated min month.\n * The `max` date is used if the max is before the generated max month.\n * This ensures that the sliding window always stays at 3 months\n * but still allows future dates to be lazily rendered based on any min/max\n * constraints.\n */\n const min = minParts !== undefined && isAfter(minParts, monthsToRender[0]) ? minParts : monthsToRender[0];\n const max = maxParts !== undefined && isBefore(maxParts, lastMonth) ? maxParts : lastMonth;\n const result = getCombinedDateColumnData(locale, todayParts, min, max, this.parsedDayValues, this.parsedMonthValues);\n let items = result.items;\n const parts = result.parts;\n if (isDateEnabled) {\n items = items.map((itemObject, index) => {\n const referenceParts = parts[index];\n let disabled;\n try {\n /**\n * The `isDateEnabled` implementation is try-catch wrapped\n * to prevent exceptions in the user's function from\n * interrupting the calendar rendering.\n */\n disabled = !isDateEnabled(convertDataToISO(referenceParts));\n }\n catch (e) {\n printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', e);\n }\n return Object.assign(Object.assign({}, itemObject), { disabled });\n });\n }\n /**\n * If we have selected a day already, then default the column\n * to that value. Otherwise, set it to the default date.\n */\n const todayString = workingParts.day !== null\n ? `${workingParts.year}-${workingParts.month}-${workingParts.day}`\n : `${defaultParts.year}-${defaultParts.month}-${defaultParts.day}`;\n return (h(\"ion-picker-column\", { \"aria-label\": \"Select a date\", class: \"date-column\", color: this.color, disabled: disabled, value: todayString, onIonChange: (ev) => {\n const { value } = ev.detail;\n const findPart = parts.find(({ month, day, year }) => value === `${year}-${month}-${day}`);\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), findPart));\n this.setActiveParts(Object.assign(Object.assign({}, activePart), findPart));\n ev.stopPropagation();\n } }, items.map((item) => (h(\"ion-picker-column-option\", { part: item.value === todayString ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: item.value, disabled: item.disabled, value: item.value }, item.text)))));\n }\n renderIndividualDatePickerColumns(forcePresentation) {\n const { workingParts, isDateEnabled } = this;\n const shouldRenderMonths = forcePresentation !== 'year' && forcePresentation !== 'time';\n const months = shouldRenderMonths\n ? getMonthColumnData(this.locale, workingParts, this.minParts, this.maxParts, this.parsedMonthValues)\n : [];\n const shouldRenderDays = forcePresentation === 'date';\n let days = shouldRenderDays\n ? getDayColumnData(this.locale, workingParts, this.minParts, this.maxParts, this.parsedDayValues)\n : [];\n if (isDateEnabled) {\n days = days.map((dayObject) => {\n const { value } = dayObject;\n const valueNum = typeof value === 'string' ? parseInt(value) : value;\n const referenceParts = {\n month: workingParts.month,\n day: valueNum,\n year: workingParts.year,\n };\n let disabled;\n try {\n /**\n * The `isDateEnabled` implementation is try-catch wrapped\n * to prevent exceptions in the user's function from\n * interrupting the calendar rendering.\n */\n disabled = !isDateEnabled(convertDataToISO(referenceParts));\n }\n catch (e) {\n printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', e);\n }\n return Object.assign(Object.assign({}, dayObject), { disabled });\n });\n }\n const shouldRenderYears = forcePresentation !== 'month' && forcePresentation !== 'time';\n const years = shouldRenderYears\n ? getYearColumnData(this.locale, this.defaultParts, this.minParts, this.maxParts, this.parsedYearValues)\n : [];\n /**\n * Certain locales show the day before the month.\n */\n const showMonthFirst = isMonthFirstLocale(this.locale, { month: 'numeric', day: 'numeric' });\n let renderArray = [];\n if (showMonthFirst) {\n renderArray = [\n this.renderMonthPickerColumn(months),\n this.renderDayPickerColumn(days),\n this.renderYearPickerColumn(years),\n ];\n }\n else {\n renderArray = [\n this.renderDayPickerColumn(days),\n this.renderMonthPickerColumn(months),\n this.renderYearPickerColumn(years),\n ];\n }\n return renderArray;\n }\n renderDayPickerColumn(days) {\n var _a;\n if (days.length === 0) {\n return [];\n }\n const { disabled, workingParts } = this;\n const activePart = this.getActivePartsWithFallback();\n const pickerColumnValue = (_a = (workingParts.day !== null ? workingParts.day : this.defaultParts.day)) !== null && _a !== void 0 ? _a : undefined;\n return (h(\"ion-picker-column\", { \"aria-label\": \"Select a day\", class: \"day-column\", color: this.color, disabled: disabled, value: pickerColumnValue, onIonChange: (ev) => {\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { day: ev.detail.value }));\n this.setActiveParts(Object.assign(Object.assign({}, activePart), { day: ev.detail.value }));\n ev.stopPropagation();\n } }, days.map((day) => (h(\"ion-picker-column-option\", { part: day.value === pickerColumnValue ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: day.value, disabled: day.disabled, value: day.value }, day.text)))));\n }\n renderMonthPickerColumn(months) {\n if (months.length === 0) {\n return [];\n }\n const { disabled, workingParts } = this;\n const activePart = this.getActivePartsWithFallback();\n return (h(\"ion-picker-column\", { \"aria-label\": \"Select a month\", class: \"month-column\", color: this.color, disabled: disabled, value: workingParts.month, onIonChange: (ev) => {\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { month: ev.detail.value }));\n this.setActiveParts(Object.assign(Object.assign({}, activePart), { month: ev.detail.value }));\n ev.stopPropagation();\n } }, months.map((month) => (h(\"ion-picker-column-option\", { part: month.value === workingParts.month ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: month.value, disabled: month.disabled, value: month.value }, month.text)))));\n }\n renderYearPickerColumn(years) {\n if (years.length === 0) {\n return [];\n }\n const { disabled, workingParts } = this;\n const activePart = this.getActivePartsWithFallback();\n return (h(\"ion-picker-column\", { \"aria-label\": \"Select a year\", class: \"year-column\", color: this.color, disabled: disabled, value: workingParts.year, onIonChange: (ev) => {\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { year: ev.detail.value }));\n this.setActiveParts(Object.assign(Object.assign({}, activePart), { year: ev.detail.value }));\n ev.stopPropagation();\n } }, years.map((year) => (h(\"ion-picker-column-option\", { part: year.value === workingParts.year ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: year.value, disabled: year.disabled, value: year.value }, year.text)))));\n }\n renderTimePickerColumns(forcePresentation) {\n if (['date', 'month', 'month-year', 'year'].includes(forcePresentation)) {\n return [];\n }\n /**\n * If a user has not selected a date,\n * then we should show all times. If the\n * user has selected a date (even if it has\n * not been confirmed yet), we should apply\n * the max and min restrictions so that the\n * time picker shows values that are\n * appropriate for the selected date.\n */\n const activePart = this.getActivePart();\n const userHasSelectedDate = activePart !== undefined;\n const { hoursData, minutesData, dayPeriodData } = getTimeColumnsData(this.locale, this.workingParts, this.hourCycle, userHasSelectedDate ? this.minParts : undefined, userHasSelectedDate ? this.maxParts : undefined, this.parsedHourValues, this.parsedMinuteValues);\n return [\n this.renderHourPickerColumn(hoursData),\n this.renderMinutePickerColumn(minutesData),\n this.renderDayPeriodPickerColumn(dayPeriodData),\n ];\n }\n renderHourPickerColumn(hoursData) {\n const { disabled, workingParts } = this;\n if (hoursData.length === 0)\n return [];\n const activePart = this.getActivePartsWithFallback();\n return (h(\"ion-picker-column\", { \"aria-label\": \"Select an hour\", color: this.color, disabled: disabled, value: activePart.hour, numericInput: true, onIonChange: (ev) => {\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { hour: ev.detail.value }));\n this.setActiveParts(Object.assign(Object.assign({}, activePart), { hour: ev.detail.value }));\n ev.stopPropagation();\n } }, hoursData.map((hour) => (h(\"ion-picker-column-option\", { part: hour.value === activePart.hour ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: hour.value, disabled: hour.disabled, value: hour.value }, hour.text)))));\n }\n renderMinutePickerColumn(minutesData) {\n const { disabled, workingParts } = this;\n if (minutesData.length === 0)\n return [];\n const activePart = this.getActivePartsWithFallback();\n return (h(\"ion-picker-column\", { \"aria-label\": \"Select a minute\", color: this.color, disabled: disabled, value: activePart.minute, numericInput: true, onIonChange: (ev) => {\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { minute: ev.detail.value }));\n this.setActiveParts(Object.assign(Object.assign({}, activePart), { minute: ev.detail.value }));\n ev.stopPropagation();\n } }, minutesData.map((minute) => (h(\"ion-picker-column-option\", { part: minute.value === activePart.minute ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: minute.value, disabled: minute.disabled, value: minute.value }, minute.text)))));\n }\n renderDayPeriodPickerColumn(dayPeriodData) {\n const { disabled, workingParts } = this;\n if (dayPeriodData.length === 0) {\n return [];\n }\n const activePart = this.getActivePartsWithFallback();\n const isDayPeriodRTL = isLocaleDayPeriodRTL(this.locale);\n return (h(\"ion-picker-column\", { \"aria-label\": \"Select a day period\", style: isDayPeriodRTL ? { order: '-1' } : {}, color: this.color, disabled: disabled, value: activePart.ampm, onIonChange: (ev) => {\n const hour = calculateHourFromAMPM(workingParts, ev.detail.value);\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { ampm: ev.detail.value, hour }));\n this.setActiveParts(Object.assign(Object.assign({}, activePart), { ampm: ev.detail.value, hour }));\n ev.stopPropagation();\n } }, dayPeriodData.map((dayPeriod) => (h(\"ion-picker-column-option\", { part: dayPeriod.value === activePart.ampm ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: dayPeriod.value, disabled: dayPeriod.disabled, value: dayPeriod.value }, dayPeriod.text)))));\n }\n renderWheelView(forcePresentation) {\n const { locale } = this;\n const showMonthFirst = isMonthFirstLocale(locale);\n const columnOrder = showMonthFirst ? 'month-first' : 'year-first';\n return (h(\"div\", { class: {\n [`wheel-order-${columnOrder}`]: true,\n } }, this.renderWheelPicker(forcePresentation)));\n }\n /**\n * Grid Render Methods\n */\n renderCalendarHeader(mode) {\n const { disabled } = this;\n const expandedIcon = mode === 'ios' ? chevronDown : caretUpSharp;\n const collapsedIcon = mode === 'ios' ? chevronForward : caretDownSharp;\n const prevMonthDisabled = disabled || isPrevMonthDisabled(this.workingParts, this.minParts, this.maxParts);\n const nextMonthDisabled = disabled || isNextMonthDisabled(this.workingParts, this.maxParts);\n // don't use the inheritAttributes util because it removes dir from the host, and we still need that\n const hostDir = this.el.getAttribute('dir') || undefined;\n return (h(\"div\", { class: \"calendar-header\" }, h(\"div\", { class: \"calendar-action-buttons\" }, h(\"div\", { class: \"calendar-month-year\" }, h(\"button\", { class: {\n 'calendar-month-year-toggle': true,\n 'ion-activatable': true,\n 'ion-focusable': true,\n }, part: \"month-year-button\", disabled: disabled, \"aria-label\": this.showMonthAndYear ? 'Hide year picker' : 'Show year picker', onClick: () => this.toggleMonthAndYearView() }, h(\"span\", { id: \"toggle-wrapper\" }, getMonthAndYear(this.locale, this.workingParts), h(\"ion-icon\", { \"aria-hidden\": \"true\", icon: this.showMonthAndYear ? expandedIcon : collapsedIcon, lazy: false, flipRtl: true })), mode === 'md' && h(\"ion-ripple-effect\", null))), h(\"div\", { class: \"calendar-next-prev\" }, h(\"ion-buttons\", null, h(\"ion-button\", { \"aria-label\": \"Previous month\", disabled: prevMonthDisabled, onClick: () => this.prevMonth() }, h(\"ion-icon\", { dir: hostDir, \"aria-hidden\": \"true\", slot: \"icon-only\", icon: chevronBack, lazy: false, flipRtl: true })), h(\"ion-button\", { \"aria-label\": \"Next month\", disabled: nextMonthDisabled, onClick: () => this.nextMonth() }, h(\"ion-icon\", { dir: hostDir, \"aria-hidden\": \"true\", slot: \"icon-only\", icon: chevronForward, lazy: false, flipRtl: true }))))), h(\"div\", { class: \"calendar-days-of-week\", \"aria-hidden\": \"true\" }, getDaysOfWeek(this.locale, mode, this.firstDayOfWeek % 7).map((d) => {\n return h(\"div\", { class: \"day-of-week\" }, d);\n }))));\n }\n renderMonth(month, year) {\n const { disabled, readonly } = this;\n const yearAllowed = this.parsedYearValues === undefined || this.parsedYearValues.includes(year);\n const monthAllowed = this.parsedMonthValues === undefined || this.parsedMonthValues.includes(month);\n const isCalMonthDisabled = !yearAllowed || !monthAllowed;\n const isDatetimeDisabled = disabled || readonly;\n const swipeDisabled = disabled ||\n isMonthDisabled({\n month,\n year,\n day: null,\n }, {\n // The day is not used when checking if a month is disabled.\n // Users should be able to access the min or max month, even if the\n // min/max date is out of bounds (e.g. min is set to Feb 15, Feb should not be disabled).\n minParts: Object.assign(Object.assign({}, this.minParts), { day: null }),\n maxParts: Object.assign(Object.assign({}, this.maxParts), { day: null }),\n });\n // The working month should never have swipe disabled.\n // Otherwise the CSS scroll snap will not work and the user\n // can free-scroll the calendar.\n const isWorkingMonth = this.workingParts.month === month && this.workingParts.year === year;\n const activePart = this.getActivePartsWithFallback();\n return (h(\"div\", { \"aria-hidden\": !isWorkingMonth ? 'true' : null, class: {\n 'calendar-month': true,\n // Prevents scroll snap swipe gestures for months outside of the min/max bounds\n 'calendar-month-disabled': !isWorkingMonth && swipeDisabled,\n } }, h(\"div\", { class: \"calendar-month-grid\" }, getDaysOfMonth(month, year, this.firstDayOfWeek % 7).map((dateObject, index) => {\n const { day, dayOfWeek } = dateObject;\n const { el, highlightedDates, isDateEnabled, multiple } = this;\n const referenceParts = { month, day, year };\n const isCalendarPadding = day === null;\n const { isActive, isToday, ariaLabel, ariaSelected, disabled: isDayDisabled, text, } = getCalendarDayState(this.locale, referenceParts, this.activeParts, this.todayParts, this.minParts, this.maxParts, this.parsedDayValues);\n const dateIsoString = convertDataToISO(referenceParts);\n let isCalDayDisabled = isCalMonthDisabled || isDayDisabled;\n if (!isCalDayDisabled && isDateEnabled !== undefined) {\n try {\n /**\n * The `isDateEnabled` implementation is try-catch wrapped\n * to prevent exceptions in the user's function from\n * interrupting the calendar rendering.\n */\n isCalDayDisabled = !isDateEnabled(dateIsoString);\n }\n catch (e) {\n printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', el, e);\n }\n }\n /**\n * Some days are constrained through max & min or allowed dates\n * and also disabled because the component is readonly or disabled.\n * These need to be displayed differently.\n */\n const isCalDayConstrained = isCalDayDisabled && isDatetimeDisabled;\n const isButtonDisabled = isCalDayDisabled || isDatetimeDisabled;\n let dateStyle = undefined;\n /**\n * Custom highlight styles should not override the style for selected dates,\n * nor apply to \"filler days\" at the start of the grid.\n */\n if (highlightedDates !== undefined && !isActive && day !== null) {\n dateStyle = getHighlightStyles(highlightedDates, dateIsoString, el);\n }\n let dateParts = undefined;\n // \"Filler days\" at the beginning of the grid should not get the calendar day\n // CSS parts added to them\n if (!isCalendarPadding) {\n dateParts = `calendar-day${isActive ? ' active' : ''}${isToday ? ' today' : ''}${isCalDayDisabled ? ' disabled' : ''}`;\n }\n return (h(\"div\", { class: \"calendar-day-wrapper\" }, h(\"button\", {\n // We need to use !important for the inline styles here because\n // otherwise the CSS shadow parts will override these styles.\n // See https://github.com/WICG/webcomponents/issues/847\n // Both the CSS shadow parts and highlightedDates styles are\n // provided by the developer, but highlightedDates styles should\n // always take priority.\n ref: (el) => {\n if (el) {\n el.style.setProperty('color', `${dateStyle ? dateStyle.textColor : ''}`, 'important');\n el.style.setProperty('background-color', `${dateStyle ? dateStyle.backgroundColor : ''}`, 'important');\n }\n }, tabindex: \"-1\", \"data-day\": day, \"data-month\": month, \"data-year\": year, \"data-index\": index, \"data-day-of-week\": dayOfWeek, disabled: isButtonDisabled, class: {\n 'calendar-day-padding': isCalendarPadding,\n 'calendar-day': true,\n 'calendar-day-active': isActive,\n 'calendar-day-constrained': isCalDayConstrained,\n 'calendar-day-today': isToday,\n }, part: dateParts, \"aria-hidden\": isCalendarPadding ? 'true' : null, \"aria-selected\": ariaSelected, \"aria-label\": ariaLabel, onClick: () => {\n if (isCalendarPadding) {\n return;\n }\n this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), { month,\n day,\n year }));\n // multiple only needs date info, so we can wipe out other fields like time\n if (multiple) {\n this.setActiveParts({\n month,\n day,\n year,\n }, isActive);\n }\n else {\n this.setActiveParts(Object.assign(Object.assign({}, activePart), { month,\n day,\n year }));\n }\n }\n }, text)));\n }))));\n }\n renderCalendarBody() {\n return (h(\"div\", { class: \"calendar-body ion-focusable\", ref: (el) => (this.calendarBodyRef = el), tabindex: \"0\" }, generateMonths(this.workingParts, this.forceRenderDate).map(({ month, year }) => {\n return this.renderMonth(month, year);\n })));\n }\n renderCalendar(mode) {\n return (h(\"div\", { class: \"datetime-calendar\", key: \"datetime-calendar\" }, this.renderCalendarHeader(mode), this.renderCalendarBody()));\n }\n renderTimeLabel() {\n const hasSlottedTimeLabel = this.el.querySelector('[slot=\"time-label\"]') !== null;\n if (!hasSlottedTimeLabel && !this.showDefaultTimeLabel) {\n return;\n }\n return h(\"slot\", { name: \"time-label\" }, \"Time\");\n }\n renderTimeOverlay() {\n const { disabled, hourCycle, isTimePopoverOpen, locale, formatOptions } = this;\n const computedHourCycle = getHourCycle(locale, hourCycle);\n const activePart = this.getActivePartsWithFallback();\n return [\n h(\"div\", { class: \"time-header\" }, this.renderTimeLabel()),\n h(\"button\", { class: {\n 'time-body': true,\n 'time-body-active': isTimePopoverOpen,\n }, part: `time-button${isTimePopoverOpen ? ' active' : ''}`, \"aria-expanded\": \"false\", \"aria-haspopup\": \"true\", disabled: disabled, onClick: async (ev) => {\n const { popoverRef } = this;\n if (popoverRef) {\n this.isTimePopoverOpen = true;\n popoverRef.present(new CustomEvent('ionShadowTarget', {\n detail: {\n ionShadowTarget: ev.target,\n },\n }));\n await popoverRef.onWillDismiss();\n this.isTimePopoverOpen = false;\n }\n } }, getLocalizedTime(locale, activePart, computedHourCycle, formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time)),\n h(\"ion-popover\", { alignment: \"center\", translucent: true, overlayIndex: 1, arrow: false, onWillPresent: (ev) => {\n /**\n * Intersection Observers do not consistently fire between Blink and Webkit\n * when toggling the visibility of the popover and trying to scroll the picker\n * column to the correct time value.\n *\n * This will correctly scroll the element position to the correct time value,\n * before the popover is fully presented.\n */\n const cols = ev.target.querySelectorAll('ion-picker-column');\n // TODO (FW-615): Potentially remove this when intersection observers are fixed in picker column\n cols.forEach((col) => col.scrollActiveItemIntoView());\n }, style: {\n '--offset-y': '-10px',\n '--min-width': 'fit-content',\n },\n // Allow native browser keyboard events to support up/down/home/end key\n // navigation within the time picker.\n keyboardEvents: true, ref: (el) => (this.popoverRef = el) }, this.renderWheelPicker('time')),\n ];\n }\n getHeaderSelectedDateText() {\n var _a;\n const { activeParts, formatOptions, multiple, titleSelectedDatesFormatter } = this;\n const isArray = Array.isArray(activeParts);\n let headerText;\n if (multiple && isArray && activeParts.length !== 1) {\n headerText = `${activeParts.length} days`; // default/fallback for multiple selection\n if (titleSelectedDatesFormatter !== undefined) {\n try {\n headerText = titleSelectedDatesFormatter(convertDataToISO(activeParts));\n }\n catch (e) {\n printIonError('Exception in provided `titleSelectedDatesFormatter`: ', e);\n }\n }\n }\n else {\n // for exactly 1 day selected (multiple set or not), show a formatted version of that\n headerText = getLocalizedDateTime(this.locale, this.getActivePartsWithFallback(), (_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _a !== void 0 ? _a : { weekday: 'short', month: 'short', day: 'numeric' });\n }\n return headerText;\n }\n renderHeader(showExpandedHeader = true) {\n const hasSlottedTitle = this.el.querySelector('[slot=\"title\"]') !== null;\n if (!hasSlottedTitle && !this.showDefaultTitle) {\n return;\n }\n return (h(\"div\", { class: \"datetime-header\" }, h(\"div\", { class: \"datetime-title\" }, h(\"slot\", { name: \"title\" }, \"Select Date\")), showExpandedHeader && h(\"div\", { class: \"datetime-selected-date\" }, this.getHeaderSelectedDateText())));\n }\n /**\n * Render time picker inside of datetime.\n * Do not pass color prop to segment on\n * iOS mode. MD segment has been customized and\n * should take on the color prop, but iOS\n * should just be the default segment.\n */\n renderTime() {\n const { presentation } = this;\n const timeOnlyPresentation = presentation === 'time';\n return (h(\"div\", { class: \"datetime-time\" }, timeOnlyPresentation ? this.renderWheelPicker() : this.renderTimeOverlay()));\n }\n /**\n * Renders the month/year picker that is\n * displayed on the calendar grid.\n * The .datetime-year class has additional\n * styles that let us show/hide the\n * picker when the user clicks on the\n * toggle in the calendar header.\n */\n renderCalendarViewMonthYearPicker() {\n return h(\"div\", { class: \"datetime-year\" }, this.renderWheelView('month-year'));\n }\n /**\n * Render entry point\n * All presentation types are rendered from here.\n */\n renderDatetime(mode) {\n const { presentation, preferWheel } = this;\n /**\n * Certain presentation types have separate grid and wheel displays.\n * If preferWheel is true then we should show a wheel picker instead.\n */\n const hasWheelVariant = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';\n if (preferWheel && hasWheelVariant) {\n return [this.renderHeader(false), this.renderWheelView(), this.renderFooter()];\n }\n switch (presentation) {\n case 'date-time':\n return [\n this.renderHeader(),\n this.renderCalendar(mode),\n this.renderCalendarViewMonthYearPicker(),\n this.renderTime(),\n this.renderFooter(),\n ];\n case 'time-date':\n return [\n this.renderHeader(),\n this.renderTime(),\n this.renderCalendar(mode),\n this.renderCalendarViewMonthYearPicker(),\n this.renderFooter(),\n ];\n case 'time':\n return [this.renderHeader(false), this.renderTime(), this.renderFooter()];\n case 'month':\n case 'month-year':\n case 'year':\n return [this.renderHeader(false), this.renderWheelView(), this.renderFooter()];\n default:\n return [\n this.renderHeader(),\n this.renderCalendar(mode),\n this.renderCalendarViewMonthYearPicker(),\n this.renderFooter(),\n ];\n }\n }\n render() {\n const { name, value, disabled, el, color, readonly, showMonthAndYear, preferWheel, presentation, size, isGridStyle, } = this;\n const mode = getIonMode(this);\n const isMonthAndYearPresentation = presentation === 'year' || presentation === 'month' || presentation === 'month-year';\n const shouldShowMonthAndYear = showMonthAndYear || isMonthAndYearPresentation;\n const monthYearPickerOpen = showMonthAndYear && !isMonthAndYearPresentation;\n const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';\n const hasWheelVariant = hasDatePresentation && preferWheel;\n renderHiddenInput(true, el, name, formatValue(value), disabled);\n return (h(Host, { key: '7afbb1a7e6c78389b4588999779e5c90e010e85d', \"aria-disabled\": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {\n [mode]: true,\n ['datetime-readonly']: readonly,\n ['datetime-disabled']: disabled,\n 'show-month-and-year': shouldShowMonthAndYear,\n 'month-year-picker-open': monthYearPickerOpen,\n [`datetime-presentation-${presentation}`]: true,\n [`datetime-size-${size}`]: true,\n [`datetime-prefer-wheel`]: hasWheelVariant,\n [`datetime-grid`]: isGridStyle,\n })) }, h(\"div\", { key: '297c458d4d17154cb297e2ef5926505bcb2d1fce', class: \"intersection-tracker\", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));\n }\n get el() { return this; }\n static get watchers() { return {\n \"formatOptions\": [\"formatOptionsChanged\"],\n \"disabled\": [\"disabledChanged\"],\n \"min\": [\"minChanged\"],\n \"max\": [\"maxChanged\"],\n \"presentation\": [\"presentationChanged\"],\n \"yearValues\": [\"yearValuesChanged\"],\n \"monthValues\": [\"monthValuesChanged\"],\n \"dayValues\": [\"dayValuesChanged\"],\n \"hourValues\": [\"hourValuesChanged\"],\n \"minuteValues\": [\"minuteValuesChanged\"],\n \"value\": [\"valueChanged\"]\n }; }\n static get style() { return {\n ios: IonDatetimeIosStyle0,\n md: IonDatetimeMdStyle0\n }; }\n}, [33, \"ion-datetime\", {\n \"color\": [1],\n \"name\": [1],\n \"disabled\": [4],\n \"formatOptions\": [16],\n \"readonly\": [4],\n \"isDateEnabled\": [16],\n \"min\": [1025],\n \"max\": [1025],\n \"presentation\": [1],\n \"cancelText\": [1, \"cancel-text\"],\n \"doneText\": [1, \"done-text\"],\n \"clearText\": [1, \"clear-text\"],\n \"yearValues\": [8, \"year-values\"],\n \"monthValues\": [8, \"month-values\"],\n \"dayValues\": [8, \"day-values\"],\n \"hourValues\": [8, \"hour-values\"],\n \"minuteValues\": [8, \"minute-values\"],\n \"locale\": [1],\n \"firstDayOfWeek\": [2, \"first-day-of-week\"],\n \"titleSelectedDatesFormatter\": [16],\n \"multiple\": [4],\n \"highlightedDates\": [16],\n \"value\": [1025],\n \"showDefaultTitle\": [4, \"show-default-title\"],\n \"showDefaultButtons\": [4, \"show-default-buttons\"],\n \"showClearButton\": [4, \"show-clear-button\"],\n \"showDefaultTimeLabel\": [4, \"show-default-time-label\"],\n \"hourCycle\": [1, \"hour-cycle\"],\n \"size\": [1],\n \"preferWheel\": [4, \"prefer-wheel\"],\n \"showMonthAndYear\": [32],\n \"activeParts\": [32],\n \"workingParts\": [32],\n \"isTimePopoverOpen\": [32],\n \"forceRenderDate\": [32],\n \"confirm\": [64],\n \"reset\": [64],\n \"cancel\": [64]\n }, undefined, {\n \"formatOptions\": [\"formatOptionsChanged\"],\n \"disabled\": [\"disabledChanged\"],\n \"min\": [\"minChanged\"],\n \"max\": [\"maxChanged\"],\n \"presentation\": [\"presentationChanged\"],\n \"yearValues\": [\"yearValuesChanged\"],\n \"monthValues\": [\"monthValuesChanged\"],\n \"dayValues\": [\"dayValuesChanged\"],\n \"hourValues\": [\"hourValuesChanged\"],\n \"minuteValues\": [\"minuteValuesChanged\"],\n \"value\": [\"valueChanged\"]\n }]);\nlet datetimeIds = 0;\nconst CANCEL_ROLE = 'datetime-cancel';\nconst CONFIRM_ROLE = 'datetime-confirm';\nconst WHEEL_ITEM_PART = 'wheel-item';\nconst WHEEL_ITEM_ACTIVE_PART = `active`;\nfunction defineCustomElement$1() {\n if (typeof customElements === \"undefined\") {\n return;\n }\n const components = [\"ion-datetime\", \"ion-backdrop\", \"ion-button\", \"ion-buttons\", \"ion-icon\", \"ion-picker\", \"ion-picker-column\", \"ion-picker-column-option\", \"ion-popover\", \"ion-ripple-effect\"];\n components.forEach(tagName => { switch (tagName) {\n case \"ion-datetime\":\n if (!customElements.get(tagName)) {\n customElements.define(tagName, Datetime);\n }\n break;\n case \"ion-backdrop\":\n if (!customElements.get(tagName)) {\n defineCustomElement$a();\n }\n break;\n case \"ion-button\":\n if (!customElements.get(tagName)) {\n defineCustomElement$9();\n }\n break;\n case \"ion-buttons\":\n if (!customElements.get(tagName)) {\n defineCustomElement$8();\n }\n break;\n case \"ion-icon\":\n if (!customElements.get(tagName)) {\n defineCustomElement$7();\n }\n break;\n case \"ion-picker\":\n if (!customElements.get(tagName)) {\n defineCustomElement$6();\n }\n break;\n case \"ion-picker-column\":\n if (!customElements.get(tagName)) {\n defineCustomElement$5();\n }\n break;\n case \"ion-picker-column-option\":\n if (!customElements.get(tagName)) {\n defineCustomElement$4();\n }\n break;\n case \"ion-popover\":\n if (!customElements.get(tagName)) {\n defineCustomElement$3();\n }\n break;\n case \"ion-ripple-effect\":\n if (!customElements.get(tagName)) {\n defineCustomElement$2();\n }\n break;\n } });\n}\n\nconst IonDatetime = Datetime;\nconst defineCustomElement = defineCustomElement$1;\n\nexport { IonDatetime, defineCustomElement };\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,kBAAkB,EAAEC,WAAW,EAAEC,WAAW,EAAEC,SAAS,EAAEC,CAAC,EAAEC,IAAI,QAAQ,+BAA+B;AAChH,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,CAAC,IAAIC,GAAG,EAAEC,CAAC,IAAIC,iBAAiB,EAAEC,CAAC,IAAIC,cAAc,QAAQ,cAAc;AACpF,SAASC,CAAC,IAAIC,aAAa,EAAEC,CAAC,IAAIC,eAAe,QAAQ,aAAa;AACtE,SAASC,CAAC,IAAIC,KAAK,QAAQ,UAAU;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