@ionic/core
Version:
Base components for Ionic
4 lines • 73.7 kB
JavaScript
/*!
* (C) Ionic http://ionicframework.com - MIT License
*/
import{o as t,m as e,r as i,d as a,e as o,w as n,h as r,j as s,k as d}from"./p-B_U9CtaY.js";import{startFocusVisible as l}from"./p-BmVRXR1y.js";import{r as c,g as h,a as p,e as m}from"./p-Do-uqmtX.js";import{i as b}from"./p-C53feagD.js";import{c as g,g as u}from"./p-DiVJyqlX.js";import{l as f,o as y,p as x,q as k,c as v}from"./p-BLV6ykCk.js";import{i as w,a as j,g as C,b as O,c as P,d as z,e as D,v as $,f as M,h as A,j as T,k as V,l as S,m as I,n as W,o as E,p as B,q as R,r as F,s as L,w as q,t as Y,u as H,x as _,y as G,z as N,A as X,B as K,C as U,D as Z,E as J,F as Q,G as tt,H as et,I as it,J as at,K as ot,L as nt,M as rt,N as st,O as dt,P as lt,Q as ct,R as ht}from"./p-7qk7mxdr.js";import{c as pt}from"./p-B-hirT0v.js";import{d as mt,e as bt,B as gt,i as ut,j as ft,k as yt,f as xt,g as kt,h as vt,s as wt}from"./p-aIxOGKys.js";import{c as jt}from"./p-bNmY-WfR.js";import{a as Ct,h as Ot,b as Pt}from"./p-CKvCXMs9.js";import"./p-ZjP4CjeZ.js";import"./p-DzH0J0yi.js";import"./p-BhLqfMrf.js";import"./p-BTEOs1at.js";import"./p-CIGNaXM1.js";const zt=(t,e,i,a)=>null===t.day||void 0!==a&&!a.includes(t.day)||!(!e||!w(t,e))||!(!i||!j(t,i)),Dt=(t,e,i,a,o,n,r)=>{const s=void 0!==(Array.isArray(i)?i:[i]).find((t=>P(e,t))),d=P(e,a);return{disabled:zt(e,o,n,r),isActive:s,isToday:d,ariaSelected:s?"true":null,ariaLabel:D(t,d,e),text:null!=e.day?z(t,e):null}},$t=(t,{minParts:e,maxParts:i})=>!!((t,e,i)=>!!(e&&e.year>t)||!!(i&&i.year<t))(t.year,e,i)||!!(e&&w(t,e)||i&&j(t,i)),Mt=(t,i)=>{var a,o,n,r;((null===(a=null==i?void 0:i.date)||void 0===a?void 0:a.timeZone)||(null===(o=null==i?void 0:i.date)||void 0===o?void 0:o.timeZoneName)||(null===(n=null==i?void 0:i.time)||void 0===n?void 0:n.timeZone)||(null===(r=null==i?void 0:i.time)||void 0===r?void 0:r.timeZoneName))&&e('[ion-datetime] - "timeZone" and "timeZoneName" are not supported in "formatOptions".',t)},At=(t,i,a)=>{if(a)switch(i){case"date":case"month-year":case"month":case"year":void 0===a.date&&e(`[ion-datetime] - The '${i}' presentation requires a date object in formatOptions.`,t);break;case"time":void 0===a.time&&e("[ion-datetime] - The 'time' presentation requires a time object in formatOptions.",t);break;case"date-time":case"time-date":void 0===a.date&&void 0===a.time&&e(`[ion-datetime] - The '${i}' presentation requires either a date or time object (or both) in formatOptions.`,t)}},Tt=class{constructor(t){i(this,t),this.ionCancel=a(this,"ionCancel",7),this.ionChange=a(this,"ionChange",7),this.ionValueChange=a(this,"ionValueChange",7),this.ionFocus=a(this,"ionFocus",7),this.ionBlur=a(this,"ionBlur",7),this.ionStyle=a(this,"ionStyle",7),this.ionRender=a(this,"ionRender",7),this.inputId="ion-dt-"+Vt++,this.prevPresentation=null,this.showMonthAndYear=!1,this.activeParts=[],this.workingParts={month:5,day:28,year:2021,hour:13,minute:52,ampm:"pm",isAdjacentDay:!1},this.isTimePopoverOpen=!1,this.color="primary",this.name=this.inputId,this.disabled=!1,this.readonly=!1,this.showAdjacentDays=!1,this.presentation="date-time",this.cancelText="Cancel",this.doneText="Done",this.clearText="Clear",this.locale="default",this.firstDayOfWeek=0,this.multiple=!1,this.showDefaultTitle=!1,this.showDefaultButtons=!1,this.showClearButton=!1,this.showDefaultTimeLabel=!0,this.size="fixed",this.preferWheel=!1,this.warnIfIncorrectValueUsage=()=>{const{multiple:t,value:i}=this;!t&&Array.isArray(i)&&e(`[ion-datetime] - An array of values was passed, but multiple is "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: [${i.map((t=>`'${t}'`)).join(", ")}]\n`,this.el)},this.setValue=t=>{this.value=t,this.ionChange.emit({value:t})},this.getActivePartsWithFallback=()=>{var t;const{defaultParts:e}=this;return null!==(t=this.getActivePart())&&void 0!==t?t:e},this.getActivePart=()=>{const{activeParts:t}=this;return Array.isArray(t)?t[0]:t},this.closeParentOverlay=t=>{const e=this.el.closest("ion-modal, ion-popover");e&&e.dismiss(void 0,t)},this.setWorkingParts=t=>{this.workingParts=Object.assign({},t)},this.setActiveParts=(t,e=!1)=>{if(this.readonly)return;const{multiple:i,minParts:a,maxParts:o,activeParts:n}=this,r=$(t,a,o);if(this.setWorkingParts(r),i){const t=Array.isArray(n)?n:[n];this.activeParts=e?t.filter((t=>!P(t,r))):[...t,r]}else this.activeParts=Object.assign({},r);null!==this.el.querySelector('[slot="buttons"]')||this.showDefaultButtons||this.confirm()},this.initializeKeyboardListeners=()=>{const t=this.calendarBodyRef;if(!t)return;const e=this.el.shadowRoot,i=t.querySelector(".calendar-month:nth-of-type(2)"),a=new MutationObserver((e=>{var a;!(null===(a=e[0].oldValue)||void 0===a?void 0:a.includes("ion-focused"))&&t.classList.contains("ion-focused")&&this.focusWorkingDay(i)}));a.observe(t,{attributeFilter:["class"],attributeOldValue:!0}),this.destroyKeyboardMO=()=>{null==a||a.disconnect()},t.addEventListener("keydown",(t=>{const a=e.activeElement;if(!a||!a.classList.contains("calendar-day"))return;const o=M(a);let n;switch(t.key){case"ArrowDown":t.preventDefault(),n=B(o);break;case"ArrowUp":t.preventDefault(),n=E(o);break;case"ArrowRight":t.preventDefault(),n=W(o);break;case"ArrowLeft":t.preventDefault(),n=I(o);break;case"Home":t.preventDefault(),n=S(o);break;case"End":t.preventDefault(),n=V(o);break;case"PageUp":t.preventDefault(),n=t.shiftKey?T(o):C(o);break;case"PageDown":t.preventDefault(),n=t.shiftKey?A(o):O(o);break;default:return}zt(n,this.minParts,this.maxParts)||(this.setWorkingParts(Object.assign(Object.assign({},this.workingParts),n)),requestAnimationFrame((()=>this.focusWorkingDay(i))))}))},this.focusWorkingDay=t=>{const{day:e,month:i,year:a}=this.workingParts,o=new Date(`${i}/1/${a}`).getDay();if(null===e)return;const n=t.querySelector(`.calendar-day-wrapper:nth-of-type(${(o>=this.firstDayOfWeek?o-this.firstDayOfWeek:7-(this.firstDayOfWeek-o))+e}) .calendar-day`);n&&n.focus()},this.processMinParts=()=>{const{min:t,defaultParts:e}=this;this.minParts=void 0!==t?R(t,e):void 0},this.processMaxParts=()=>{const{max:t,defaultParts:e}=this;this.maxParts=void 0!==t?F(t,e):void 0},this.initializeCalendarListener=()=>{const t=this.calendarBodyRef;if(!t)return;const e=t.querySelectorAll(".calendar-month"),i=e[0],a=e[1],r=e[2],s="ios"===o(this)&&"undefined"!=typeof navigator&&navigator.maxTouchPoints>1;n((()=>{t.scrollLeft=i.clientWidth*(b(this.el)?-1:1);const e=e=>{const a=t.getBoundingClientRect(),o=(b(this.el)?t.scrollLeft>=-2:t.scrollLeft<=2)?i:r,n=o.getBoundingClientRect();if(Math.abs(n.x-a.x)>2)return;const{forceRenderDate:s}=this;return void 0!==s?{month:s.month,year:s.year,day:s.day}:o===i?C(e):o===r?O(e):void 0},o=()=>{s&&(t.style.removeProperty("pointer-events"),l=!1);const i=e(this.workingParts);if(!i)return;const{month:o,day:r,year:d}=i;$t({month:o,year:d,day:null},{minParts:Object.assign(Object.assign({},this.minParts),{day:null}),maxParts:Object.assign(Object.assign({},this.maxParts),{day:null})})||(t.style.setProperty("overflow","hidden"),n((()=>{this.setWorkingParts(Object.assign(Object.assign({},this.workingParts),{month:o,day:r,year:d})),t.scrollLeft=a.clientWidth*(b(this.el)?-1:1),t.style.removeProperty("overflow"),this.resolveForceDateScrolling&&this.resolveForceDateScrolling()})))};let d,l=!1;const c=()=>{d&&clearTimeout(d),!l&&s&&(t.style.setProperty("pointer-events","none"),l=!0),d=setTimeout(o,50)};t.addEventListener("scroll",c),this.destroyCalendarListener=()=>{t.removeEventListener("scroll",c)}}))},this.destroyInteractionListeners=()=>{const{destroyCalendarListener:t,destroyKeyboardMO:e}=this;void 0!==t&&t(),void 0!==e&&e()},this.processValue=t=>{const e=null!=t&&""!==t&&(!Array.isArray(t)||t.length>0),i=e?L(t):this.defaultParts,{minParts:a,maxParts:o,workingParts:n,el:r}=this;if(this.warnIfIncorrectValueUsage(),!i)return;e&&q(i,a,o);const s=Array.isArray(i)?i[i.length-1]:i,d=H(s,a,o),{month:l,day:c,year:h,hour:p,minute:m}=d,b=Y(p);this.activeParts=e?Array.isArray(i)?[...i]:{month:l,day:c,year:h,hour:p,minute:m,ampm:b}:[];const g=void 0!==l&&l!==n.month||void 0!==h&&h!==n.year,u=r.classList.contains("datetime-ready"),{isGridStyle:f,showMonthAndYear:y}=this;f&&g&&u&&!y?this.animateToDate(d):this.setWorkingParts({month:l,day:c,year:h,hour:p,minute:m,ampm:b})},this.animateToDate=async t=>{const{workingParts:e}=this;this.forceRenderDate=t;const i=new Promise((t=>{this.resolveForceDateScrolling=t}));w(t,e)?this.prevMonth():this.nextMonth(),await i,this.resolveForceDateScrolling=void 0,this.forceRenderDate=void 0},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()},this.hasValue=()=>null!=this.value,this.nextMonth=()=>{const t=this.calendarBodyRef;if(!t)return;const e=t.querySelector(".calendar-month:last-of-type");e&&t.scrollTo({top:0,left:2*e.offsetWidth*(b(this.el)?-1:1),behavior:"smooth"})},this.prevMonth=()=>{const t=this.calendarBodyRef;t&&t.querySelector(".calendar-month:first-of-type")&&t.scrollTo({top:0,left:0,behavior:"smooth"})},this.toggleMonthAndYearView=()=>{this.showMonthAndYear=!this.showMonthAndYear}}formatOptionsChanged(){const{el:t,formatOptions:e,presentation:i}=this;At(t,i,e),Mt(t,e)}disabledChanged(){this.emitStyle()}minChanged(){this.processMinParts()}maxChanged(){this.processMaxParts()}presentationChanged(){const{el:t,formatOptions:e,presentation:i}=this;At(t,i,e)}get isGridStyle(){const{presentation:t,preferWheel:e}=this;return("date"===t||"date-time"===t||"time-date"===t)&&!e}yearValuesChanged(){this.parsedYearValues=_(this.yearValues)}monthValuesChanged(){this.parsedMonthValues=_(this.monthValues)}dayValuesChanged(){this.parsedDayValues=_(this.dayValues)}hourValuesChanged(){this.parsedHourValues=_(this.hourValues)}minuteValuesChanged(){this.parsedMinuteValues=_(this.minuteValues)}async valueChanged(){const{value:t}=this;this.hasValue()&&this.processValue(t),this.emitStyle(),this.ionValueChange.emit({value:t})}async confirm(t=!1){const{isCalendarPicker:e,activeParts:i,preferWheel:a,workingParts:o}=this;if(void 0!==i||!e){const t=Array.isArray(i);this.setValue(t&&0===i.length?a?G(o):void 0:G(i))}t&&this.closeParentOverlay(It)}async reset(t){this.processValue(t)}async cancel(t=!1){this.ionCancel.emit(),t&&this.closeParentOverlay(St)}get isCalendarPicker(){const{presentation:t}=this;return"date"===t||"date-time"===t||"time-date"===t}connectedCallback(){this.clearFocusVisible=l(this.el).destroy}disconnectedCallback(){this.clearFocusVisible&&(this.clearFocusVisible(),this.clearFocusVisible=void 0)}initializeListeners(){this.initializeCalendarListener(),this.initializeKeyboardListeners()}componentDidLoad(){const{el:t,intersectionTrackerRef:e}=this,i=new IntersectionObserver((t=>{t[0].isIntersecting&&(this.initializeListeners(),n((()=>{this.el.classList.add("datetime-ready")})))}),{threshold:.01,root:t});c((()=>null==i?void 0:i.observe(e)));const a=new IntersectionObserver((t=>{t[0].isIntersecting||(this.destroyInteractionListeners(),this.showMonthAndYear=!1,n((()=>{this.el.classList.remove("datetime-ready")})))}),{threshold:0,root:t});c((()=>null==a?void 0:a.observe(e)));const o=h(this.el);o.addEventListener("ionFocus",(t=>t.stopPropagation())),o.addEventListener("ionBlur",(t=>t.stopPropagation()))}componentDidRender(){const{presentation:t,prevPresentation:e,calendarBodyRef:i,minParts:a,preferWheel:o,forceRenderDate:n}=this,r=!o&&["date-time","time-date","date"].includes(t);if(void 0!==a&&r&&i){const t=i.querySelector(".calendar-month:nth-of-type(1)");t&&void 0===n&&(i.scrollLeft=t.clientWidth*(b(this.el)?-1:1))}null!==e?t!==e&&(this.prevPresentation=t,this.destroyInteractionListeners(),this.initializeListeners(),this.showMonthAndYear=!1,c((()=>{this.ionRender.emit()}))):this.prevPresentation=t}componentWillLoad(){const{el:t,formatOptions:i,highlightedDates:a,multiple:o,presentation:n,preferWheel:r}=this;o&&("date"!==n&&e('[ion-datetime] - Multiple date selection is only supported for presentation="date".',t),r&&e('[ion-datetime] - Multiple date selection is not supported with preferWheel="true".',t)),void 0!==a&&("date"!==n&&"date-time"!==n&&"time-date"!==n&&e("[ion-datetime] - The highlightedDates property is only supported with the date, date-time, and time-date presentations.",t),r&&e('[ion-datetime] - The highlightedDates property is not supported with preferWheel="true".',t)),i&&(At(t,n,i),Mt(t,i));const s=this.parsedHourValues=_(this.hourValues),d=this.parsedMinuteValues=_(this.minuteValues),l=this.parsedMonthValues=_(this.monthValues),c=this.parsedYearValues=_(this.yearValues),h=this.parsedDayValues=_(this.dayValues),p=this.todayParts=L(N());this.processMinParts(),this.processMaxParts(),this.defaultParts=X({refParts:p,monthValues:l,dayValues:h,yearValues:c,hourValues:s,minuteValues:d,minParts:this.minParts,maxParts:this.maxParts}),this.processValue(this.value),this.emitStyle()}emitStyle(){this.ionStyle.emit({interactive:!0,datetime:!0,"interactive-disabled":this.disabled})}renderFooter(){const{disabled:t,readonly:e,showDefaultButtons:i,showClearButton:a}=this,o=t||e;if(null===this.el.querySelector('[slot="buttons"]')&&!i&&!a)return;const n=()=>{this.reset(),this.setValue(void 0)};return r("div",{class:"datetime-footer"},r("div",{class:"datetime-buttons"},r("div",{class:{"datetime-action-buttons":!0,"has-clear-button":this.showClearButton}},r("slot",{name:"buttons"},r("ion-buttons",null,i&&r("ion-button",{id:"cancel-button",color:this.color,onClick:()=>this.cancel(!0),disabled:o},this.cancelText),r("div",{class:"datetime-action-buttons-container"},a&&r("ion-button",{id:"clear-button",color:this.color,onClick:()=>n(),disabled:o},this.clearText),i&&r("ion-button",{id:"confirm-button",color:this.color,onClick:()=>this.confirm(!0),disabled:o},this.doneText)))))))}renderWheelPicker(t=this.presentation){const e="time-date"===t?[this.renderTimePickerColumns(t),this.renderDatePickerColumns(t)]:[this.renderDatePickerColumns(t),this.renderTimePickerColumns(t)];return r("ion-picker",null,e)}renderDatePickerColumns(t){return"date-time"===t||"time-date"===t?this.renderCombinedDatePickerColumn():this.renderIndividualDatePickerColumns(t)}renderCombinedDatePickerColumn(){const{defaultParts:e,disabled:i,workingParts:a,locale:o,minParts:n,maxParts:s,todayParts:d,isDateEnabled:l}=this,c=this.getActivePartsWithFallback(),h=K(a),p=h[h.length-1];h[0].day=1,p.day=U(p.month,p.year);const m=void 0!==n&&j(n,h[0])?n:h[0],b=void 0!==s&&w(s,p)?s:p,g=Z(o,d,m,b,this.parsedDayValues,this.parsedMonthValues);let u=g.items;const f=g.parts;l&&(u=u.map(((e,i)=>{const a=f[i];let o;try{o=!l(G(a))}catch(e){t("[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",e)}return Object.assign(Object.assign({},e),{disabled:o})})));const y=null!==a.day?`${a.year}-${a.month}-${a.day}`:`${e.year}-${e.month}-${e.day}`;return r("ion-picker-column",{"aria-label":"Select a date",class:"date-column",color:this.color,disabled:i,value:y,onIonChange:t=>{const{value:e}=t.detail,i=f.find((({month:t,day:i,year:a})=>e===`${a}-${t}-${i}`));this.setWorkingParts(Object.assign(Object.assign({},a),i)),this.setActiveParts(Object.assign(Object.assign({},c),i)),t.stopPropagation()}},u.map((t=>r("ion-picker-column-option",{part:t.value===y?`${Wt} ${Et}`:Wt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderIndividualDatePickerColumns(e){const{workingParts:i,isDateEnabled:a}=this,o="year"!==e&&"time"!==e?J(this.locale,i,this.minParts,this.maxParts,this.parsedMonthValues):[];let n="date"===e?Q(this.locale,i,this.minParts,this.maxParts,this.parsedDayValues):[];a&&(n=n.map((e=>{const{value:o}=e,n="string"==typeof o?parseInt(o):o,r={month:i.month,day:n,year:i.year};let s;try{s=!a(G(r))}catch(e){t("[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",e)}return Object.assign(Object.assign({},e),{disabled:s})})));const r="month"!==e&&"time"!==e?tt(this.locale,this.defaultParts,this.minParts,this.maxParts,this.parsedYearValues):[];let s=[];return s=et(this.locale,{month:"numeric",day:"numeric"})?[this.renderMonthPickerColumn(o),this.renderDayPickerColumn(n),this.renderYearPickerColumn(r)]:[this.renderDayPickerColumn(n),this.renderMonthPickerColumn(o),this.renderYearPickerColumn(r)],s}renderDayPickerColumn(t){var e;if(0===t.length)return[];const{disabled:i,workingParts:a}=this,o=this.getActivePartsWithFallback(),n=null!==(e=null!==a.day?a.day:this.defaultParts.day)&&void 0!==e?e:void 0;return r("ion-picker-column",{"aria-label":"Select a day",class:"day-column",color:this.color,disabled:i,value:n,onIonChange:t=>{this.setWorkingParts(Object.assign(Object.assign({},a),{day:t.detail.value})),this.setActiveParts(Object.assign(Object.assign({},o),{day:t.detail.value})),t.stopPropagation()}},t.map((t=>r("ion-picker-column-option",{part:t.value===n?`${Wt} ${Et}`:Wt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderMonthPickerColumn(t){if(0===t.length)return[];const{disabled:e,workingParts:i}=this,a=this.getActivePartsWithFallback();return r("ion-picker-column",{"aria-label":"Select a month",class:"month-column",color:this.color,disabled:e,value:i.month,onIonChange:t=>{this.setWorkingParts(Object.assign(Object.assign({},i),{month:t.detail.value})),this.setActiveParts(Object.assign(Object.assign({},a),{month:t.detail.value})),t.stopPropagation()}},t.map((t=>r("ion-picker-column-option",{part:t.value===i.month?`${Wt} ${Et}`:Wt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderYearPickerColumn(t){if(0===t.length)return[];const{disabled:e,workingParts:i}=this,a=this.getActivePartsWithFallback();return r("ion-picker-column",{"aria-label":"Select a year",class:"year-column",color:this.color,disabled:e,value:i.year,onIonChange:t=>{this.setWorkingParts(Object.assign(Object.assign({},i),{year:t.detail.value})),this.setActiveParts(Object.assign(Object.assign({},a),{year:t.detail.value})),t.stopPropagation()}},t.map((t=>r("ion-picker-column-option",{part:t.value===i.year?`${Wt} ${Et}`:Wt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderTimePickerColumns(t){if(["date","month","month-year","year"].includes(t))return[];const e=void 0!==this.getActivePart(),{hoursData:i,minutesData:a,dayPeriodData:o}=it(this.locale,this.workingParts,this.hourCycle,e?this.minParts:void 0,e?this.maxParts:void 0,this.parsedHourValues,this.parsedMinuteValues);return[this.renderHourPickerColumn(i),this.renderMinutePickerColumn(a),this.renderDayPeriodPickerColumn(o)]}renderHourPickerColumn(t){const{disabled:e,workingParts:i}=this;if(0===t.length)return[];const a=this.getActivePartsWithFallback();return r("ion-picker-column",{"aria-label":"Select an hour",color:this.color,disabled:e,value:a.hour,numericInput:!0,onIonChange:t=>{this.setWorkingParts(Object.assign(Object.assign({},i),{hour:t.detail.value})),this.setActiveParts(Object.assign(Object.assign({},this.getActivePartsWithFallback()),{hour:t.detail.value})),t.stopPropagation()}},t.map((t=>r("ion-picker-column-option",{part:t.value===a.hour?`${Wt} ${Et}`:Wt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderMinutePickerColumn(t){const{disabled:e,workingParts:i}=this;if(0===t.length)return[];const a=this.getActivePartsWithFallback();return r("ion-picker-column",{"aria-label":"Select a minute",color:this.color,disabled:e,value:a.minute,numericInput:!0,onIonChange:t=>{this.setWorkingParts(Object.assign(Object.assign({},i),{minute:t.detail.value})),this.setActiveParts(Object.assign(Object.assign({},this.getActivePartsWithFallback()),{minute:t.detail.value})),t.stopPropagation()}},t.map((t=>r("ion-picker-column-option",{part:t.value===a.minute?`${Wt} ${Et}`:Wt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderDayPeriodPickerColumn(t){const{disabled:e,workingParts:i}=this;if(0===t.length)return[];const a=this.getActivePartsWithFallback(),o=at(this.locale);return r("ion-picker-column",{"aria-label":"Select a day period",style:o?{order:"-1"}:{},color:this.color,disabled:e,value:a.ampm,onIonChange:t=>{const e=ot(i,t.detail.value);this.setWorkingParts(Object.assign(Object.assign({},i),{ampm:t.detail.value,hour:e})),this.setActiveParts(Object.assign(Object.assign({},this.getActivePartsWithFallback()),{ampm:t.detail.value,hour:e})),t.stopPropagation()}},t.map((t=>r("ion-picker-column-option",{part:t.value===a.ampm?`${Wt} ${Et}`:Wt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderWheelView(t){const{locale:e}=this,i=et(e)?"month-first":"year-first";return r("div",{class:{[`wheel-order-${i}`]:!0}},this.renderWheelPicker(t))}renderCalendarHeader(t){const{disabled:e}=this,i="ios"===t?f:y,a="ios"===t?x:k,o=e||((t,e,i)=>{const a=Object.assign(Object.assign({},C(this.workingParts)),{day:null});return $t(a,{minParts:e,maxParts:i})})(0,this.minParts,this.maxParts),n=e||((t,e)=>{const i=Object.assign(Object.assign({},O(this.workingParts)),{day:null});return $t(i,{maxParts:e})})(0,this.maxParts),s=this.el.getAttribute("dir")||void 0;return r("div",{class:"calendar-header"},r("div",{class:"calendar-action-buttons"},r("div",{class:"calendar-month-year"},r("button",{class:{"calendar-month-year-toggle":!0,"ion-activatable":!0,"ion-focusable":!0},part:"month-year-button",disabled:e,"aria-label":this.showMonthAndYear?"Hide year picker":"Show year picker",onClick:()=>this.toggleMonthAndYearView()},r("span",{id:"toggle-wrapper"},rt(this.locale,this.workingParts),r("ion-icon",{"aria-hidden":"true",icon:this.showMonthAndYear?i:a,lazy:!1,flipRtl:!0})),"md"===t&&r("ion-ripple-effect",null))),r("div",{class:"calendar-next-prev"},r("ion-buttons",null,r("ion-button",{"aria-label":"Previous month",disabled:o,onClick:()=>this.prevMonth()},r("ion-icon",{dir:s,"aria-hidden":"true",slot:"icon-only",icon:v,lazy:!1,flipRtl:!0})),r("ion-button",{"aria-label":"Next month",disabled:n,onClick:()=>this.nextMonth()},r("ion-icon",{dir:s,"aria-hidden":"true",slot:"icon-only",icon:x,lazy:!1,flipRtl:!0}))))),r("div",{class:"calendar-days-of-week","aria-hidden":"true"},nt(this.locale,t,this.firstDayOfWeek%7).map((t=>r("div",{class:"day-of-week"},t)))))}renderMonth(e,i){const{disabled:a,readonly:o}=this,n=void 0===this.parsedYearValues||this.parsedYearValues.includes(i),s=void 0===this.parsedMonthValues||this.parsedMonthValues.includes(e),d=!n||!s,l=a||o,c=a||$t({month:e,year:i,day:null},{minParts:Object.assign(Object.assign({},this.minParts),{day:null}),maxParts:Object.assign(Object.assign({},this.maxParts),{day:null})}),h=this.workingParts.month===e&&this.workingParts.year===i,p=this.getActivePartsWithFallback();return r("div",{"aria-hidden":h?null:"true",class:{"calendar-month":!0,"calendar-month-disabled":!h&&c}},r("div",{class:"calendar-month-grid"},st(e,i,this.firstDayOfWeek%7,this.showAdjacentDays).map(((a,o)=>{const{day:n,dayOfWeek:s,isAdjacentDay:c}=a,{el:h,highlightedDates:m,isDateEnabled:b,multiple:g,showAdjacentDays:u}=this;let f=e,y=i;u&&c&&null!==n&&(n>20?1===e?(y=i-1,f=12):f=e-1:n<15&&(12===e?(y=i+1,f=1):f=e+1));const x={month:f,day:n,year:y,isAdjacentDay:c},k=null===n,{isActive:v,isToday:w,ariaLabel:j,ariaSelected:C,disabled:O,text:P}=Dt(this.locale,x,this.activeParts,this.todayParts,this.minParts,this.maxParts,this.parsedDayValues),z=G(x);let D=d||O;if(!D&&void 0!==b)try{D=!b(z)}catch(e){t("[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",h,e)}const $=D&&l,M=D||l;let A,T;return void 0===m||v||null===n||c||(A=((e,i,a)=>{if(Array.isArray(e)){const t=i.split("T")[0],a=e.find((e=>e.date===t));if(a)return{textColor:a.textColor,backgroundColor:a.backgroundColor}}else try{return e(i)}catch(e){t("[ion-datetime] - Exception thrown from provided `highlightedDates` callback. Please check your function and try again.",a,e)}})(m,z,h)),k||c?c&&(T="calendar-day"+(D?" disabled":"")):T=`calendar-day${v?" active":""}${w?" today":""}${D?" disabled":""}`,r("div",{class:"calendar-day-wrapper"},r("button",{ref:t=>{t&&(t.style.setProperty("color",`${A?A.textColor:""}`,"important"),t.style.setProperty("background-color",`${A?A.backgroundColor:""}`,"important"))},tabindex:"-1","data-day":n,"data-month":f,"data-year":y,"data-index":o,"data-day-of-week":s,disabled:M,class:{"calendar-day-padding":k,"calendar-day":!0,"calendar-day-active":v,"calendar-day-constrained":$,"calendar-day-today":w,"calendar-day-adjacent-day":c},part:T,"aria-hidden":k?"true":null,"aria-selected":C,"aria-label":j,onClick:()=>{k||(c?(this.el.blur(),this.activeParts=Object.assign(Object.assign({},p),x),this.animateToDate(x),this.confirm()):(this.setWorkingParts(Object.assign(Object.assign({},this.workingParts),x)),g?this.setActiveParts(x,v):this.setActiveParts(Object.assign(Object.assign({},p),x))))}},P))}))))}renderCalendarBody(){return r("div",{class:"calendar-body ion-focusable",ref:t=>this.calendarBodyRef=t,tabindex:"0"},K(this.workingParts,this.forceRenderDate).map((({month:t,year:e})=>this.renderMonth(t,e))))}renderCalendar(t){return r("div",{class:"datetime-calendar",key:"datetime-calendar"},this.renderCalendarHeader(t),this.renderCalendarBody())}renderTimeLabel(){if(null!==this.el.querySelector('[slot="time-label"]')||this.showDefaultTimeLabel)return r("slot",{name:"time-label"},"Time")}renderTimeOverlay(){const{disabled:t,hourCycle:e,isTimePopoverOpen:i,locale:a,formatOptions:o}=this,n=dt(a,e),s=this.getActivePartsWithFallback();return[r("div",{class:"time-header"},this.renderTimeLabel()),r("button",{class:{"time-body":!0,"time-body-active":i},part:"time-button"+(i?" active":""),"aria-expanded":"false","aria-haspopup":"true",disabled:t,onClick:async t=>{const{popoverRef:e}=this;e&&(this.isTimePopoverOpen=!0,e.present(new CustomEvent("ionShadowTarget",{detail:{ionShadowTarget:t.target}})),await e.onWillDismiss(),this.isTimePopoverOpen=!1)}},lt(a,s,n,null==o?void 0:o.time)),r("ion-popover",{alignment:"center",translucent:!0,overlayIndex:1,arrow:!1,onWillPresent:t=>{t.target.querySelectorAll("ion-picker-column").forEach((t=>t.scrollActiveItemIntoView()))},style:{"--offset-y":"-10px","--min-width":"fit-content"},keyboardEvents:!0,ref:t=>this.popoverRef=t},this.renderWheelPicker("time"))]}getHeaderSelectedDateText(){var e;const{activeParts:i,formatOptions:a,multiple:o,titleSelectedDatesFormatter:n}=this,r=Array.isArray(i);let s;if(o&&r&&1!==i.length){if(s=`${i.length} days`,void 0!==n)try{s=n(G(i))}catch(e){t("[ion-datetime] - Exception in provided `titleSelectedDatesFormatter`:",e)}}else s=ct(this.locale,this.getActivePartsWithFallback(),null!==(e=null==a?void 0:a.date)&&void 0!==e?e:{weekday:"short",month:"short",day:"numeric"});return s}renderHeader(t=!0){if(null!==this.el.querySelector('[slot="title"]')||this.showDefaultTitle)return r("div",{class:"datetime-header"},r("div",{class:"datetime-title"},r("slot",{name:"title"},"Select Date")),t&&r("div",{class:"datetime-selected-date"},this.getHeaderSelectedDateText()))}renderTime(){const{presentation:t}=this;return r("div",{class:"datetime-time"},"time"===t?this.renderWheelPicker():this.renderTimeOverlay())}renderCalendarViewMonthYearPicker(){return r("div",{class:"datetime-year"},this.renderWheelView("month-year"))}renderDatetime(t){const{presentation:e,preferWheel:i}=this;if(i&&("date"===e||"date-time"===e||"time-date"===e))return[this.renderHeader(!1),this.renderWheelView(),this.renderFooter()];switch(e){case"date-time":return[this.renderHeader(),this.renderCalendar(t),this.renderCalendarViewMonthYearPicker(),this.renderTime(),this.renderFooter()];case"time-date":return[this.renderHeader(),this.renderTime(),this.renderCalendar(t),this.renderCalendarViewMonthYearPicker(),this.renderFooter()];case"time":return[this.renderHeader(!1),this.renderTime(),this.renderFooter()];case"month":case"month-year":case"year":return[this.renderHeader(!1),this.renderWheelView(),this.renderFooter()];default:return[this.renderHeader(),this.renderCalendar(t),this.renderCalendarViewMonthYearPicker(),this.renderFooter()]}}render(){const{name:t,value:e,disabled:i,el:a,color:n,readonly:d,showMonthAndYear:l,preferWheel:c,presentation:h,size:m,isGridStyle:b}=this,u=o(this),f="year"===h||"month"===h||"month-year"===h,y=l||f,x=l&&!f,k=("date"===h||"date-time"===h||"time-date"===h)&&c;return p(!0,a,t,ht(e),i),r(s,{key:"79677f5bc0fb32fb68569636bd76e68238e62eb8","aria-disabled":i?"true":null,onFocus:this.onFocus,onBlur:this.onBlur,class:Object.assign({},g(n,{[u]:!0,"datetime-readonly":d,"datetime-disabled":i,"show-month-and-year":y,"month-year-picker-open":x,[`datetime-presentation-${h}`]:!0,[`datetime-size-${m}`]:!0,"datetime-prefer-wheel":k,"datetime-grid":b}))},r("div",{key:"bf07b1e3c64af6e837663ff470bea93787a6e86f",class:"intersection-tracker",ref:t=>this.intersectionTrackerRef=t}),this.renderDatetime(u))}get el(){return d(this)}static get watchers(){return{formatOptions:["formatOptionsChanged"],disabled:["disabledChanged"],min:["minChanged"],max:["maxChanged"],presentation:["presentationChanged"],yearValues:["yearValuesChanged"],monthValues:["monthValuesChanged"],dayValues:["dayValuesChanged"],hourValues:["hourValuesChanged"],minuteValues:["minuteValuesChanged"],value:["valueChanged"]}}};let Vt=0;const St="datetime-cancel",It="datetime-confirm",Wt="wheel-item",Et="active";Tt.style={ios:':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:not(.calendar-day-adjacent-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,:host .calendar-day.calendar-day-adjacent-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 .calendar-day.calendar-day-adjacent-day{color:var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3))}: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%}',md:':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:not(.calendar-day-adjacent-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,:host .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-contrast)}.calendar-day.calendar-day-active,.calendar-day.calendar-day-active:focus{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}:host .calendar-day.calendar-day-adjacent-day{color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray))}: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;-