@progress/kendo-vue-dateinputs 7.0.2 → 7.0.3-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,4 +12,4 @@
12
12
  * Licensed under commercial license. See LICENSE.md in the package root for more information
13
13
  *-------------------------------------------------------------------------------------------
14
14
  */
15
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-common"),require("@progress/kendo-date-math"),require("@progress/kendo-vue-intl"),require("@progress/kendo-vue-buttons"),require("@progress/kendo-svg-icons"),require("@progress/kendo-vue-labels"),require("@progress/kendo-vue-popup")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-common","@progress/kendo-date-math","@progress/kendo-vue-intl","@progress/kendo-vue-buttons","@progress/kendo-svg-icons","@progress/kendo-vue-labels","@progress/kendo-vue-popup"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueDateinputs={},e.Vue,e.KendoVueCommon,e.KendoDateMath,e.KendoVueIntl,e.KendoVueButtons,e.KendoSVGIcons,e.KendoVueLabels,e.KendoVuePopup)}(this,(function(e,t,i,s,a,n,o,r,l){"use strict";const h={name:"@progress/kendo-vue-dateinputs",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1641551183,version:"7.0.2",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"},u=t.defineComponent({name:"KendoCalendarCell",emits:{click:e=>!0,mousedown:e=>!0,mouseenter:e=>!0,mouseleave:e=>!0},props:{isDisabled:Boolean,view:Number,formattedValue:String,id:String,isWeekend:Boolean,isFocused:Boolean,isSelected:Boolean,isInRange:Boolean,isRangeStart:Boolean,isRangeEnd:Boolean,isRangeMid:Boolean,isRangeSplitEnd:Boolean,isRangeSplitStart:Boolean,isToday:Boolean,title:String,value:Date},updated(){},render(){const e=i.getDefaultSlots(this),{formattedValue:s,isWeekend:a,isFocused:n,isInRange:o,isSelected:r,isRangeStart:l,isRangeMid:h,isRangeEnd:u,isRangeSplitStart:d,isRangeSplitEnd:c,isToday:p,isDisabled:m,view:g,value:f}=this.$props,v="end"===this.$props.activeRangeEnd&&u,w="start"===this.$props.activeRangeEnd&&l;return t.createVNode("td",{id:this.$props.id,title:this.$props.title,class:{"k-calendar-td":!0,"k-range-end":u,"k-range-mid":h,"k-range-split-end":c,"k-range-split-start":d,"k-range-start":l,"k-active":w||v,"k-focus":n,"k-selected":r||l||u,"k-today":p,"k-weekend":a,"k-disabled":m},onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave},[t.createVNode("span",{class:"k-link"},[e])])},methods:{handleClick(e){const{value:t}=this.$props;this.$emit("click",t,e)},handleMouseDown(e){const{value:t}=this.$props;this.$emit("mousedown",t,e)},handleMouseEnter(){const{value:e}=this.$props;this.$emit("mouseenter",e)},handleMouseLeave(){const{value:e}=this.$props;this.$emit("mouseleave",e)}}}),d=t.defineComponent({props:{id:String,value:Number,className:String},emits:{click:e=>!0},render(){const e=i.getDefaultSlots(this);return t.createVNode("td",{onClick:this.handleClick,id:this.$props.id},[void 0!==this.$props.value?this.$props.value:e])},methods:{handleClick(e){const{value:t}=this.$props;this.$emit("click",t,e)}}});var c=(e=>(e[e.month=0]="month",e[e.year=1]="year",e[e.decade=2]="decade",e[e.century=3]="century",e))(c||{});const p={start:null,end:null},m=(e,t,i)=>void 0===t||void 0===i||t<=e&&e<=i?e:e<t?t:i,g=new Date(1980,0,1),f=new Date(1900,0,1),v=new Date(2099,11,31),w=new Date(1980,0,1),$=new Date(1980,0,1,23,59,59),y=(e,t)=>{const i=s.cloneDate(e);return i.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),i},D=()=>s.getDate(new Date),S=(e,t,i)=>!e||!(t&&t>e||i&&i<e),b=(e,t,i)=>null===e||!(t&&s.getDate(t)>s.getDate(e)||i&&s.getDate(i)<s.getDate(e)),k=(e,t)=>{const{start:i,end:s}=t||p;return!(!i||!s)&&(i<e&&e<s)},V=(e,t,i=1)=>{const s=[];for(let a=e;a<t;a+=i)s.push(a);return s},I=(e,t)=>e.slice(t).concat(e.slice(0,t)),C=(e,t,i)=>e&&(t&&e<t?s.cloneDate(t):i&&e>i?s.cloneDate(i):e),M=e=>(t,i="",s={})=>{const a=document.createElement(e);return a.className=i,Object.keys(s).map((e=>a.style[e]=s[e])),"string"==typeof t?a.innerHTML=t||"":(t||[]).forEach((e=>e&&a.appendChild(e))),a};let F=class{constructor(e){this.intl=e}getWeekNames(e=!1){const t=I(this.intl.dateFormatNames({nameType:"short",type:"days"}),this.intl.firstDay());return e?[""].concat(t):t}};const x=t.defineComponent({name:"KendoView",inject:{kendoIntlService:{default:null}},props:{activeRangeEnd:{type:String},activeView:{type:Number,required:!0},cell:[String,Function,Object],cellUID:{type:String,required:!0},direction:{type:String,default:"vertical"},isActive:{type:Boolean,default:void 0},focusedDate:{type:Date,required:!0},max:{type:Date,required:!0},min:{type:Date,required:!0},selectedDate:{type:[Date,Array,Object],default:function(){return D()}},selectionRange:Object,showWeekNumbers:{type:Boolean,default:!1},viewDate:{type:Date,required:!0},weekCell:[String,Function,Object],bus:Object,service:Object,onChange:Function,onWeekcellclick:Function,onCellenter:Function,onViewmousedown:Function},computed:{isHorizontal(){return"horizontal"===this.$props.direction},isMonthView(){return this.$props.activeView===c.month},weekNumber(){return!(!this.$props.showWeekNumbers||this.$props.activeView!==c.month)}},methods:{getWeekNumber(e){return this.weekNumber?s.weekInYear(e,this._intl.firstDay()):null},firstDate(e){const t=this.firstWeekDateContext(e);return t?t.value:null},firstWeekDateContext(e){if(!this.weekNumber)return null;let t=0,i=e[t];for(;!i&&t<e.length;)i=e[++t];return i},handleClick(e,t){const i={value:s.cloneDate(e),target:this,event:t};this.$emit("change",i)},handleWeekCellClick(e,t){const i={value:e,event:t};this.$emit("weekcellclick",i)},handleMouseDown(e,t){const i={value:s.cloneDate(e),target:this,event:t};this.$emit("viewmousedown",i)},handleMouseEnter(e){this.$emit("cellenter",s.cloneDate(e))},handleMouseLeave(e){this.$emit("cellleave",s.cloneDate(e))}},setup:()=>({kendoIntlService:t.inject("kendoIntlService",{})}),render(){this._intl=a.provideIntlService(this),this._weekService=new F(this._intl);const e=e=>t.createVNode("td",{key:e,class:"k-calendar-td k-empty"},[t.createTextVNode(" ")]),s=D(),n=this.$props.isActive?this.$props.focusedDate:null,o=y(this.$props.viewDate,s),r=this.$props.service.data({cellUID:this.$props.cellUID,min:this.$props.min,max:this.$props.max,focusedDate:n,isActiveView:!this.$props.bus.canMoveDown(this.$props.activeView),selectedDate:this.$props.selectedDate,selectionRange:this.$props.selectionRange,viewDate:o}),l=function(s,a){if(!this.firstDate(s))return e(`week-cell-${a}`);const n=this.getWeekNumber(this.firstDate(s)),o=`kendo-vue-calendar-week-cell-${n}`,r=t.createVNode(d,{class:"k-calendar-td k-alt",value:n,onClick:this.handleWeekCellClick,key:o},function(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}(n)?n:{default:()=>[n]});return i.getTemplate.call(this,{h:t.h,template:this.$props.weekCell,defaultRendering:r,defaultSlots:n,additionalListeners:{click:this.handleWeekCellClick},additionalProps:{value:n,key:o}})},h=function(s){return s.map((function(s,a){if(!s)return e(a);const n=`kendo-vue-calendar-cell-${s.value.getTime()}`,o=t.createVNode(u,{"aria-selected":s.isSelected,formattedValue:s.formattedValue,id:s.id,isFocused:s.isFocused,isSelected:s.isSelected,isInRange:s.isInRange,isWeekend:s.isWeekend,isRangeStart:s.isRangeStart,isRangeMid:s.isRangeMid,isRangeEnd:s.isRangeEnd,isRangeSplitStart:s.isRangeSplitStart,isRangeSplitEnd:s.isRangeSplitEnd,isToday:s.isToday,title:s.title,value:s.value,isDisabled:!s.isInRange,view:this.$props.activeView,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,key:n},{default:()=>[s.formattedValue]});return i.getTemplate.call(this,{h:t.h,template:this.$props.cell,defaultRendering:o,defaultSlots:s.formattedValue,additionalListeners:{click:this.handleClick,mousedown:this.handleMouseDown,mouseenter:this.handleMouseEnter,mouseleave:this.handleMouseLeave},additionalProps:{formattedValue:s.formattedValue,id:s.id,isFocused:s.isFocused,isSelected:s.isSelected,isInRange:s.isInRange,isWeekend:s.isWeekend,isRangeStart:s.isRangeStart,isRangeMid:s.isRangeMid,isRangeEnd:s.isRangeEnd,isRangeSplitStart:s.isRangeSplitStart,isRangeSplitEnd:s.isRangeSplitEnd,isToday:s.isToday,title:s.title,value:s.value,isDisabled:!s.isInRange,view:this.$props.activeView,key:n}})}),this)};return t.createVNode("tbody",{class:"k-calendar-tbody",role:"rowgroup"},[r.map((function(e,i){return t.createVNode("tr",{class:"k-calendar-tr",role:"row",key:i},[this.weekNumber&&l.call(this,e,i),h.call(this,e)])}),this)])}}),_=t.defineComponent({name:"KendoViewList",inheritAttrs:!1,inject:{kendoIntlService:{default:null}},props:{allowReverse:Boolean,hasFocusedDate:Boolean,activeView:{type:Number,required:!0},bottomOffset:{type:Number},cell:[String,Function,Object],cellUID:{type:String,required:!0},dates:Array,focusedDate:{type:Date,required:!0},isActive:{type:Boolean,default:void 0},max:{type:Date,required:!0},min:{type:Date,required:!0},selectionRange:Object,showWeekNumbers:{type:Boolean,default:!1},take:{type:Number,default:5},value:{type:[Date,Array,Object]},views:{type:Number,default:1},viewHeight:Number,viewOffset:Number,bus:Object,dom:Object,weekCell:[String,Function,Object],service:Object,tabIndex:Number,shouldScroll:Boolean,onChange:Function,onWeekcellclick:Function,onWeeknameclick:Function,onCellenter:Function,onViewmousedown:Function,onListfocus:Function,onListblur:Function,onListkeydown:Function,onListmousedown:Function},data:function(){return{lastViewsCount:0,valueHasUpdated:!1,shouldScrollValue:!1}},computed:{weekNames(){this._intl=a.provideIntlService(this);const e=I(this._intl.dateFormatNames({nameType:"short",type:"days"}),this._intl.firstDay());return this.weekNumber?[""].concat(e):e},weekNumber(){return!(!this.$props.showWeekNumbers||this.$props.activeView!==c.month)}},created(){this.lastView=this.$props.activeView,this.lastFocus=this.$props.focusedDate,this.shouldScrollValue=this.$props.shouldScroll},updated(){this.shouldScrollValue=!1,this.lastView=this.$props.activeView,this.$data.lastViewsCount=this.$props.views,this.indexToScroll=void 0},methods:{handleFocus(e){this.$emit("listfocus",e)},handleBlur(e){this.$emit("listblur",e)},handleKeyDown(e){this.$emit("listkeydown",e)},handleVirtualizationMount(e){},calculateHeights(){if(!this.$props.dom)return;const e=this.$props.activeView===c.month?this.$props.dom.scrollableContentHeight:this.$props.dom.scrollableYearContentHeight;this._bottomOffset=e-this.$props.dom.viewHeight(this.$props.activeView),this._viewOffset=-1*this.$props.dom.headerHeight,this._viewHeight=this.$props.dom.viewHeight(this.$props.activeView)||1},getTake(e,t){return Math.min(t-e,this.$props.take)},handleScrollAction(){},handleTodayClick(e){this.shouldScrollValue=!0,this.handleDateChange(e,!0)},handleMouseDown(e){const t={event:e.event,value:s.cloneDate(e.value),target:this};this.$emit("listmousedown",t)},handleDateChange(e,t=!1){const i={event:e.event,value:s.cloneDate(e.value),target:this,isTodayClick:t};this.$emit("change",i)},handleWeekCellClick(e){this.$emit("weekcellclick",e)},handleWeekNameClick(e,t){const i={value:t,event:e};this.$emit("weeknameclick",i)},handleCellEnter(e){this.$emit("cellenter",e)},rotateSelectionRange(e){if(null===e.start||null===e.end)return e;const t=e.end<e.start;return{start:t?e.end:e.start,end:t?e.start:e.end}}},setup:()=>({kendoIntlService:t.inject("kendoIntlService",{})}),mounted(){this._calendarView=this.$refs.calendarView},render(){const e=this.$props.allowReverse?this.rotateSelectionRange(this.$props.selectionRange):this.$props.selectionRange,s=i.classNames("k-calendar-view","k-hstack k-align-items-start k-justify-content-center",{"k-calendar-monthview":this.$props.activeView===c.month,"k-calendar-yearview":this.$props.activeView===c.year,"k-calendar-decadeview":this.$props.activeView===c.decade,"k-calendar-centuryview":this.$props.activeView===c.century}),a=i.classNames("k-calendar-table"),n=function(e){return t.createVNode("thead",{class:"k-calendar-thead"},[t.createVNode("tr",{class:"k-calendar-tr"},[e.map(((e,i)=>t.createVNode("th",{class:"k-calendar-th",key:i,onClick:t=>this.handleWeekNameClick(t,e)},[e])),this)])])};return t.createVNode("div",{style:this.$attrs.style,class:s,onFocusin:this.handleFocus,onFocusout:this.handleBlur},[function(){const i=this.$props.cellUID;return this.$props.dates.map((function(s){return t.createVNode("table",{role:"grid","aria-label":this.$props.service.title(this.$props.focusedDate),"aria-live":"polite","aria-activedescendant":i+this.$props.focusedDate.getTime(),tabindex:this.$props.tabIndex,class:a,onKeydown:this.handleKeyDown},[this.$props.activeView===c.month&&n.call(this,this.weekNames),t.createVNode(x,{key:s.getTime(),activeView:this.$props.activeView,viewDate:s,min:this.$props.min,max:this.$props.max,cellUID:i,isActive:this.$props.isActive,focusedDate:this.$props.focusedDate,cell:this.$props.cell,selectionRange:e,selectedDate:this.$props.value,showWeekNumbers:this.weekNumber,onChange:this.handleDateChange,onWeekcellclick:this.handleWeekCellClick,onCellenter:this.handleCellEnter,onViewmousedown:this.handleMouseDown,bus:this.$props.bus,service:this.$props.service,weekCell:this.$props.weekCell},null)])}),this)}.call(this)])}}),T=new Date(1980,0,1),R=new Date(1900,0,1),N=new Date(2099,11,31),O=new Date(1980,0,1),B=new Date(1980,0,1,23,59,59);var L=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Up=2]="Up",e[e.Down=3]="Down",e[e.PrevView=4]="PrevView",e[e.NextView=5]="NextView",e[e.FirstInView=6]="FirstInView",e[e.LastInView=7]="LastInView",e[e.LowerView=8]="LowerView",e[e.UpperView=9]="UpperView",e))(L||{});const E=[[]],A={[L.Left]:e=>s.addDecades(e,-1),[L.Up]:e=>s.addDecades(e,-4),[L.Right]:e=>s.addDecades(e,1),[L.Down]:e=>s.addDecades(e,4),[L.PrevView]:e=>s.addCenturies(e,-1),[L.NextView]:e=>s.addCenturies(e,1),[L.FirstInView]:e=>s.firstDecadeOfCentury(e),[L.LastInView]:e=>s.lastDecadeOfCentury(e)};const j=[[]],H={[L.Left]:e=>s.addYears(e,-1),[L.Up]:e=>s.addYears(e,-4),[L.Right]:e=>s.addYears(e,1),[L.Down]:e=>s.addYears(e,4),[L.PrevView]:e=>s.addDecades(e,-1),[L.NextView]:e=>s.addDecades(e,1),[L.FirstInView]:e=>s.firstYearOfDecade(e),[L.LastInView]:e=>s.lastYearOfDecade(e)};const P=[[]],z={[L.Left]:e=>s.addDays(e,-1),[L.Up]:e=>s.addWeeks(e,-1),[L.Right]:e=>s.addDays(e,1),[L.Down]:e=>s.addWeeks(e,1),[L.PrevView]:e=>s.addMonths(e,-1),[L.NextView]:e=>s.addMonths(e,1),[L.FirstInView]:e=>s.firstDayOfMonth(e),[L.LastInView]:e=>s.lastDayOfMonth(e)};const q=[[]],K={[L.Left]:e=>s.addMonths(e,-1),[L.Up]:e=>s.addMonths(e,-4),[L.Right]:e=>s.addMonths(e,1),[L.Down]:e=>s.addMonths(e,4),[L.PrevView]:e=>s.addYears(e,-1),[L.NextView]:e=>s.addYears(e,1),[L.FirstInView]:e=>s.firstMonthOfYear(e),[L.LastInView]:e=>s.lastMonthOfYear(e)};const Y={[c.month]:class{constructor(e){this.intl=e}addToDate(e,t){return s.addMonths(e,t)}datesList(e,t){return V(0,t).map((t=>s.addMonths(e,t)))}data(e){const{cellUID:t,focusedDate:i,isActiveView:a,max:n,min:o,selectedDate:r,selectionRange:l=p,viewDate:h}=e;if(!h)return P;const u=s.firstDayOfMonth(h),d=s.lastDayOfMonth(h),c=s.dayOfWeek(u,this.intl.firstDay(),-1),m=V(0,7),g=D();return V(0,6).map((e=>{const h=s.addDays(c,7*e);return m.map((e=>{const c=this.normalize(s.addDays(h,e),o,n);if(c<u||c>d)return null;const p=this.isEqual(c,l.start),m=this.isEqual(c,l.end),f=!p&&!m&&k(c,l),v=a&&(Array.isArray(r)?this.isSelectedFromArray(c,r,o,n):S(r,o,n)&&this.isEqual(c,r));return{formattedValue:this.value(c),id:`${t}${c.getTime()}`,isFocused:this.isEqual(c,i),isSelected:v,isInRange:S(c,o,n),isWeekend:this.isWeekend(c),isRangeStart:p,isRangeMid:f,isRangeEnd:m,isRangeSplitStart:f&&this.isEqual(c,u),isRangeSplitEnd:f&&this.isEqual(c,d),isToday:this.isEqual(c,g),title:this.cellTitle(c),value:c}}))}))}isEqual(e,t){return!(!e||!t)&&s.getDate(e).getTime()===s.getDate(t).getTime()}isSelectedFromArray(e,t,i,s){let a=!1;return t.forEach((t=>{S(e,i,s)&&this.isEqual(e,t)&&(a=!0)})),a}isInArray(e,t){return!!t.length&&s.firstDayOfMonth(t[0])<=e&&e<=s.lastDayOfMonth(t[t.length-1])}isInRange(e,t,i){const a=s.getDate(e),n=!t||s.getDate(t)<=a,o=!i||a<=s.getDate(i);return n&&o}isInSameView(e,t){return 0===s.durationInMonths(e,t)}isRangeStart(e){return!e.getMonth()}move(e,t){const i=z[t];return i?i(e):e}cellTitle(e){return this.intl.formatDate(e,"D")}navigationTitle(e){return e?this.isRangeStart(e)?e.getFullYear().toString():this.abbrMonthNames()[e.getMonth()]:""}title(e){return`${this.wideMonthNames()[e.getMonth()]} ${e.getFullYear()}`}rowLength(e){return 7+(e?1:0)}skip(e,t){return s.durationInMonths(t,e)}total(e,t){return s.durationInMonths(e,t)+1}value(e){return e?e.getDate().toString():""}viewDate(e,t,i=1){return s.durationInMonths(e,t)<i?s.addMonths(e,-1):e}isWeekend(e){const t=e.getDay();return 6===t||0===t}abbrMonthNames(){return this.intl.dateFormatNames({nameType:"abbreviated",type:"months"})}normalize(e,t,i){return e<t&&this.isEqual(e,t)?s.getDate(t):e>i&&this.isEqual(e,i)?s.getDate(i):e}wideMonthNames(){return this.intl.dateFormatNames({nameType:"wide",type:"months",standAlone:!0})}},[c.year]:class{constructor(e){this._intl=e}addToDate(e,t){return s.addYears(e,t)}datesList(e,t){return V(0,t).map((t=>s.addYears(e,t)))}data(e){const{cellUID:t,focusedDate:i,isActiveView:a,max:n,min:o,selectedDate:r,selectionRange:l=p,viewDate:h}=e;if(!h)return q;const u=this.abbrMonthNames(),d=s.firstMonthOfYear(h),c=s.lastMonthOfYear(h),m=d.getFullYear(),g=V(0,4),f=D();return V(0,3).map((e=>{const h=s.addMonths(d,4*e);return g.map((e=>{const p=this.normalize(s.addMonths(h,e),o,n);if(!p||m<p.getFullYear())return null;const g=this.isEqual(p,l.start),v=this.isEqual(p,l.end),w=!g&&!v&&k(p,l),$=a&&(Array.isArray(r)?this.isSelectedFromArray(p,r,o,n):S(r,o,n)&&this.isEqual(p,r));return{formattedValue:u[p.getMonth()],id:`${t}${p.getTime()}`,isFocused:this.isEqual(p,i),isSelected:$,isInRange:S(p,o,n),isWeekend:!1,isRangeStart:g,isRangeMid:w,isRangeEnd:v,isRangeSplitEnd:w&&this.isEqual(p,c),isRangeSplitStart:w&&this.isEqual(p,d),isToday:this.isEqual(p,f),title:this.cellTitle(p),value:p}}))}))}isSelectedFromArray(e,t,i,s){let a=!1;return t.forEach((t=>{S(e,i,s)&&this.isEqual(e,t)&&(a=!0)})),a}isEqual(e,t){return!(!e||!t)&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth())}isInArray(e,t){if(!t.length)return!1;const i=e.getFullYear();return t[0].getFullYear()<=i&&i<=t[t.length-1].getFullYear()}isInRange(e,t,i){const a=s.createDate(e.getFullYear(),e.getMonth(),1),n=!t||s.createDate(t.getFullYear(),t.getMonth(),1)<=a,o=!i||a<=s.createDate(i.getFullYear(),i.getMonth(),1);return n&&o}isInSameView(e,t){return 0===s.durationInYears(e,t)}isRangeStart(e){return e.getFullYear()%10==0}move(e,t){const i=K[t];return i?i(e):e}cellTitle(e){return`${e.getFullYear()} ${this.value(e)}`}navigationTitle(e){return this.title(e)}title(e){return e?e.getFullYear().toString():""}rowLength(e){return 4}skip(e,t){return s.durationInYears(t,e)}total(e,t){return s.durationInYears(e,t)+1}value(e){return e?this.abbrMonthNames()[e.getMonth()]:""}viewDate(e,t,i=1){return s.durationInYears(e,t)<i?s.addYears(e,-1):e}abbrMonthNames(){return this._intl.dateFormatNames({nameType:"abbreviated",type:"months"})}normalize(e,t,s){return e<t&&this.isEqual(e,t)?i.cloneDate(t):e>s&&this.isEqual(e,s)?i.cloneDate(s):e}},[c.decade]:class{addToDate(e,t){return s.addDecades(e,t)}datesList(e,t){return V(0,t).map((t=>s.addDecades(s.firstYearOfDecade(e),t)))}data(e){const{cellUID:t,focusedDate:i,isActiveView:a,max:n,min:o,selectedDate:r,selectionRange:l=p,viewDate:h}=e;if(!h)return j;const u=V(0,4),d=s.firstYearOfDecade(h),c=s.lastYearOfDecade(h),m=D();return V(0,3).map((e=>{const h=s.addYears(d,4*e);return u.map((e=>{const u=this.normalize(s.addYears(h,e),o,n);if(!this.isInSameView(u,c))return null;const p=this.isEqual(u,l.start),g=this.isEqual(u,l.end),f=!p&&!g&&k(u,l),v=a&&(Array.isArray(r)?this.isSelectedFromArray(u,r,o,n):S(r,o,n)&&this.isEqual(u,r));return{formattedValue:this.value(u),id:`${t}${u.getTime()}`,isFocused:this.isEqual(u,i),isSelected:v,isWeekend:!1,isInRange:S(u,o,n),isRangeStart:p,isRangeMid:f,isRangeEnd:g,isRangeSplitEnd:f&&this.isEqual(u,c),isRangeSplitStart:f&&this.isEqual(u,d),isToday:this.isEqual(u,m),title:this.cellTitle(u),value:u}}))}))}isSelectedFromArray(e,t,i,s){let a=!1;return t.forEach((t=>{S(e,i,s)&&this.isEqual(e,t)&&(a=!0)})),a}isEqual(e,t){return!(!e||!t)&&e.getFullYear()===t.getFullYear()}isInArray(e,t){if(!t.length)return!1;const i=e.getFullYear();return t[0].getFullYear()<=i&&i<=t[t.length-1].getFullYear()+9}isInRange(e,t,i){const s=e.getFullYear(),a=!t||t.getFullYear()<=s,n=!i||s<=i.getFullYear();return a&&n}isRangeStart(e){return e.getFullYear()%100==0}isInSameView(e,t){return 0===s.durationInDecades(e,t)}move(e,t){const i=H[t];return i?i(e):e}cellTitle(e){return e.getFullYear().toString()}navigationTitle(e){return e?s.firstYearOfDecade(e).getFullYear().toString():""}title(e){return e?`${s.firstYearOfDecade(e).getFullYear()} - ${s.lastYearOfDecade(e).getFullYear()}`:""}rowLength(e){return 4}skip(e,t){return s.durationInDecades(t,e)}total(e,t){return s.durationInDecades(e,t)+1}value(e){return e?e.getFullYear().toString():""}viewDate(e,t,i=1){return s.durationInDecades(e,t)<i?s.addDecades(e,-1):e}normalize(e,t,i){return e<t&&this.isEqual(e,t)?s.cloneDate(t):e>i&&this.isEqual(e,i)?s.cloneDate(i):e}},[c.century]:class{addToDate(e,t){return s.addCenturies(e,t)}datesList(e,t){return V(0,t).map((t=>s.addCenturies(e,t)))}data(e){const{cellUID:t,focusedDate:i,isActiveView:a,max:n,min:o,selectedDate:r,selectionRange:l=p,viewDate:h}=e;if(!h)return E;const u=V(0,4),d=s.firstDecadeOfCentury(h),c=s.lastDecadeOfCentury(h),m=D();return V(0,3).map((e=>{const h=s.addDecades(d,4*e);return u.map((e=>{const u=this.normalize(s.addDecades(h,e),o,n);if(!this.isInSameView(u,c))return null;const p=this.isEqual(u,l.start),g=this.isEqual(u,l.end),f=!p&&!g&&k(u,l),v=a&&(Array.isArray(r)?this.isSelectedFromArray(u,r,o,n):S(r,o,n)&&this.isEqual(u,r));return{formattedValue:this.value(u),id:`${t}${u.getTime()}`,isFocused:this.isEqual(u,i),isSelected:v,isWeekend:!1,isInRange:S(u,o,n),isRangeStart:p,isRangeMid:f,isRangeEnd:g,isRangeSplitEnd:f&&this.isEqual(u,c),isRangeSplitStart:f&&this.isEqual(u,d),isToday:this.isEqual(u,m),title:this.cellTitle(u),value:u}}))}))}isSelectedFromArray(e,t,i,s){let a=!1;return t.forEach((t=>{S(e,i,s)&&this.isEqual(e,t)&&(a=!0)})),a}isEqual(e,t){return!(!e||!t)&&s.firstYearOfDecade(e).getFullYear()===s.firstYearOfDecade(t).getFullYear()}isInArray(e,t){if(!t.length)return!1;const i=e.getFullYear();return t[0].getFullYear()<=i&&i<=t[t.length-1].getFullYear()+99}isInRange(e,t,i){const a=s.firstYearOfDecade(e).getFullYear(),n=!t||s.firstYearOfDecade(t).getFullYear()<=a,o=!i||a<=s.firstYearOfDecade(i).getFullYear();return n&&o}isInSameView(e,t){return 0===s.durationInCenturies(e,t)}isRangeStart(e){return e.getFullYear()%1e3==0}move(e,t){const i=A[t];return i?i(e):e}cellTitle(e){return s.firstYearOfDecade(e).getFullYear().toString()}navigationTitle(e){return e?s.firstDecadeOfCentury(e).getFullYear().toString():""}title(e){return e?`${s.firstDecadeOfCentury(e).getFullYear()} - ${s.lastDecadeOfCentury(e).getFullYear()}`:""}rowLength(e){return 4}skip(e,t){return s.durationInCenturies(t,e)}total(e,t){return s.durationInCenturies(e,t)+1}value(e){return e?s.firstYearOfDecade(e).getFullYear().toString():""}viewDate(e,t,i=1){return s.durationInCenturies(e,t)<i?s.addCenturies(e,-1):e}normalize(e,t,i){return e<t&&this.isEqual(e,t)?s.cloneDate(t):e>i&&this.isEqual(e,i)?s.cloneDate(i):e}}};let U=class{constructor(e){this.bottom=c.month,this.top=c.century,this.onViewChanged=e}configure(e,t){this.bottom=e,this.top=t}service(e,t){return new Y[`${e}`](t)}moveDown(e,t){this.move(e,-1,t)}moveUp(e,t){this.move(e,1,t)}moveToBottom(e){e!==this.bottom&&this.onViewChanged({view:this.bottom})}canMoveDown(e){return this.bottom<e}canMoveUp(e){return e<this.top}clamp(e){return e<this.bottom?this.bottom:e>this.top?this.top:e}move(e,t,i){const s=this.clamp(((e,t)=>{const i=c[c[e+t]];return void 0!==i?i:e})(e,t));s!==e&&this.onViewChanged({view:s},i)}},W=class{constructor(){this.didCalculate=!1}ensureHeights(){void 0===this.calendarHeight&&this.calculateHeights()}calculateHeights(e){if(!i.canUseDOM)return;const t=M("div"),s=M("ul"),a=M("li"),n=M("td"),o=M("th"),r=M("tr"),l=M("tbody"),h=M("thead"),u=M("table"),d=()=>t('\n <span class="k-calendar-title">March 2017</span>\n <span class="k-calendar-today">TODAY</span>\n ',"k-calendar-header"),c=(e,t)=>new Array(e).fill("1").map(t),p=e=>t(e,"k-content k-scrollable"),m=(()=>{let e;return()=>i.canUseDOM?(e||(e=t([p([s([a("<span>FEB</span>")])])],"k-calendar-navigation",{left:"0px",position:"absolute"})),e):null})(),g=({cells:e,rows:s},a,m)=>{let g;return()=>i.canUseDOM?(g||(g=((e,i,s)=>t(s?[d(),u([h([r([o("MO")])])]),p([e,e])]:[d(),p([e,e])],i,{left:"-10000px",position:"absolute"}))(((e,t=1)=>u([l([r([o("1")])].concat(c(e,(()=>r(c(t,(e=>n(`<span class="k-link">${e}</span>`))))))))]))(s,e),a,m)),g):null},f=e=>e.querySelector(".k-scrollable"),v=e=>{const t=f(e);return t.className=`${t.className} k-scrollable-horizontal`,e},w=g({cells:7,rows:6},"k-calendar-view k-calendar-monthview",!0),$=g({cells:5,rows:3},"k-calendar-view k-calendar-yearview",!1),y=g({cells:5,rows:2},"k-calendar-view k-calendar-decadeview",!1),D=e=>parseFloat(window.getComputedStyle(e).height)||e.offsetHeight,S=e=>{const t=window.getComputedStyle(e);return parseFloat(t.width)+parseFloat(t.paddingLeft)+parseFloat(t.paddingRight)||e.offsetWidth},b=e=>e.querySelector("tbody");this.didCalculate=!0,e&&(this.hostContainer=e),this.batch(w(),(e=>{const t=b(e);this.calendarHeight=D(e),this.monthViewHeight=D(t),this.headerHeight=D(t.children[0]),this.scrollableContentHeight=D(f(e))})),this.batch(v(w()),(e=>{const t=b(e);this.calendarWidth=S(e),this.monthViewWidth=S(t),this.scrollableContentWidth=S(f(e))})),this.batch($(),(e=>{this.yearViewHeight=D(b(e)),this.scrollableYearContentHeight=D(f(e))})),this.batch(v($()),(e=>{this.yearViewWidth=S(b(e))})),this.batch(y(),(e=>{this.decadeViewHeight=D(b(e)),this.centuryViewHeight=this.decadeViewHeight})),this.batch(v(y()),(e=>{this.decadeViewWidth=S(b(e)),this.centuryViewWidth=this.decadeViewWidth})),this.batch(m(),(e=>{this.navigationItemHeight=D(e.querySelector("li"))}))}viewHeight(e){return this.viewDimension(e,"height")}viewWidth(e){return this.viewDimension(e,"width")}viewDimension(e,t){const i="height"===t?"ViewHeight":"ViewWidth";switch(e){case c.month:return this[`month${i}`];case c.year:return this[`year${i}`];case c.decade:return this[`decade${i}`];case c.century:return this[`century${i}`];default:return 1}}batch(e,t){const i=this.hostContainer||document.body,s=i.appendChild(e);t(s),i.removeChild(s)}};const Z={33:L.PrevView,34:L.NextView,35:L.LastInView,36:L.FirstInView,37:L.Left,38:L.Up,39:L.Right,40:L.Down,"meta+38":L.UpperView,"meta+40":L.LowerView,"meta+37":L.PrevView,"meta+39":L.NextView};let G=class{constructor(e){this.bus=e}action(e){const t=`${e.ctrlKey||e.metaKey?"meta+":""}${e.keyCode}`;return Z[t]}move(e,t,i,s,a){return s?t===L.UpperView&&this.bus.canMoveUp(i)?(this.bus.moveUp(i,a),e):t===L.LowerView&&this.bus.canMoveDown(i)?(this.bus.moveDown(i,a),e):s.move(e,t):e}};const J=t.defineComponent({name:"KendoHeaderTitle",emits:{click:e=>!0},props:{id:String,value:String,view:Number},methods:{handleClick(e){this.$emit("click",e)}},render(){const e=i.getDefaultSlots(this);return t.createVNode(n.Button,{role:"link",type:"button",id:this.$props.id,fillMode:"flat",themeColor:"primary",onClick:this.handleClick,tabIndex:0},function(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}(e)?e:{default:()=>[e]})}}),Q="calendar.prevView",X="calendar.nextView",ee="dateinput.increment",te="dateinput.decrement",ie="calendar.today",se="datepicker.toggleCalendar",ae="daterangepicker.swapStartEnd",ne="daterangepicker.start",oe="daterangepicker.end",re="daterangepicker.separator",le="datetimepicker.toggleDateTimeSelector",he="timepicker.now",ue="timepicker.selectNow",de="timepicker.cancel",ce="timepicker.set",pe="timepicker.toggleTimeSelector",me="timepicker.toggleClock",ge="datetimepicker.date",fe="datetimepicker.time",ve="datetimepicker.cancel",we="datetimepicker.set",$e={[ie]:"Today",[he]:"NOW",[ce]:"Set",[de]:"Cancel",[ge]:"Date",[fe]:"Time",[ve]:"Cancel",[we]:"Set",[ne]:"Start",[oe]:"End",[re]:" ",[ue]:"Select Now",[pe]:"Toggle TimeSelector",[me]:"Toggle Clock",[ee]:"Increase value",[te]:"Decrease value",[se]:"Toggle calendar",[Q]:"Navigate to previous view",[X]:"Navigate to next view",[ae]:"Swap start and end values",[le]:"Toggle date-time selector"};function ye(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const De=t.defineComponent({name:"KendoCalendarHeader",inheritAttrs:!1,inject:{kendoLocalizationService:{default:null}},emits:["titleclick","todayclick","nextclick","prevclick"],props:{activeView:{type:Number,required:!0},currentDate:{type:Date,required:!0},focusedDate:{type:Date,required:!0},headerTitle:{type:[String,Object,Function],default:function(){}},max:{type:Date,default:function(){return v}},min:{type:Date,default:function(){return R}},bus:Object,service:Object,rangeLength:{type:Number,default:1},tabIndex:{type:Number,default:0},onTodayClick:Function,onNextClick:Function,onPrevClick:Function,onTitleClick:Function},data:()=>({currentRtl:!1}),mounted(){this.currentRtl=i.isRtl(this.$el)},computed:{navigate(){return this.$props.bus.canMoveUp(this.$props.activeView)},todayIsInRange(){return S(D(),s.getDate(this.$props.min),s.getDate(this.$props.max))}},methods:{getTitle(){if(!this.$props.currentDate)return"";const e=this.$props.rangeLength-1,t=this.$props.service.title(this.$props.currentDate),i=this.$props.service.addToDate(this.$props.currentDate,e);return e<1||!this.$props.service.isInRange(i,this.$props.min,this.$props.max)?t:`${t} - ${this.$props.service.title(i)}`},handleTitleClick(e){this.navigate&&(this.$props.bus.moveUp(this.$props.activeView,e),this.$emit("titleclick",e))},canNavigate(e){if(!this.$props.service)return!1;const t=this.$props.service.move(this.$props.focusedDate,e);return this.$props.min<=t&&t<=this.$props.max||this.$props.service.isInSameView(t,this.$props.min)||this.$props.service.isInSameView(t,this.$props.max)},move(e){return this.clampDate(this.$props.service.move(this.$props.focusedDate,e))},clampDate(e){return C(e,this.$props.min,this.$props.max)},handleNextClick(e){const t={event:e,value:this.move(L.NextView),target:this};this.$emit("nextclick",t)},handlePrevClick(e){const t={event:e,value:this.move(L.PrevView),target:this};this.$emit("prevclick",t)},handleTodayClick(e){if(!this.todayIsInRange)return;this.$props.bus.moveToBottom(this.$props.activeView);const t={event:e,value:C(D(),this.$props.min,this.$props.max),target:this};this.$emit("todayclick",t)},todayKeyDown(e){const{keyCode:t}=e;t===i.Keys.enter&&this.handleTodayClick(e)}},setup:()=>({kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){this._localization=a.provideLocalizationService(this);const e=this._localization.toLanguageString(ie,$e[ie]),s=this.getTitle(),r=this._localization.toLanguageString(Q,$e[Q]),l=this._localization.toLanguageString(X,$e[X]),h=!this.canNavigate(L.PrevView),u=!this.canNavigate(L.NextView),d=i.classNames("k-calendar-title",{"k-disabled":!this.navigate}),c=i.classNames("k-calendar-nav-today",{"k-disabled":!this.todayIsInRange});let p;const m=t.createVNode(J,{value:s,view:this.$props.activeView,class:d,onClick:this.handleTitleClick},ye(s)?s:{default:()=>[s]});p=i.getTemplate.call(this,{h:t.h,template:this.$props.headerTitle,defaultRendering:m});const g=t.createVNode(n.Button,{type:"button",fillMode:"flat",themeColor:"base",class:c,tabIndex:this.$props.tabIndex,onKeydown:this.todayKeyDown,onClick:this.handleTodayClick},ye(e)?e:{default:()=>[e]}),f=i.getTemplate.call(this,{h:t.h,defaultRendering:g});return t.createVNode("div",{class:"k-calendar-header k-hstack",style:this.$attrs.style},[p,t.createVNode("span",{class:"k-spacer"},null),t.createVNode("span",{class:"k-calendar-nav k-hstack"},[t.createVNode(n.Button,{type:"button",icon:this.currentRtl?"chevron-right":"chevron-left",svgIcon:this.currentRtl?o.chevronRightIcon:o.chevronLeftIcon,size:this.$props.size,fillMode:"flat",class:"k-calendar-nav-pre",disabled:h,"aria-label":r,title:r,onClick:this.handlePrevClick},null),f,t.createVNode(n.Button,{type:"button",icon:this.currentRtl?"chevron-left":"chevron-right",svgIcon:this.currentRtl?o.chevronLeftIcon:o.chevronRightIcon,size:this.$props.size,fillMode:"flat",class:"k-calendar-nav-next",disabled:u,"aria-label":l,title:l,onClick:this.handleNextClick},null)])])}}),Se=(e,t,i)=>i instanceof Date&&!Array.isArray(i)&&S(s.getDate(i),e,t)?s.getDate(i):null,be=(e,t,i)=>Array.isArray(i)?i.filter((i=>S(i,e,t))).map((e=>s.getDate(e))):null,ke=e=>!i.isObject(e)||e instanceof Date||null===e||Array.isArray(e)?p:e,Ve=(e,t,i)=>e||t&&t[0]||i&&i.start,Ie=t.defineComponent({name:"KendoCalendar",inject:{kendoIntlService:{default:null}},model:{event:"changemodel"},props:{activeRangeEnd:{type:String,default:void 0},allowReverse:{type:Boolean,default:!1},cell:[String,Function,Object],className:String,defaultActiveView:{type:String,default:"month"},modelValue:{type:[Date,Array,Object],default:void 0},defaultValue:{type:[Date,Array,Object],default:null},disabled:{type:Boolean,default:!1},focusedDate:Date,id:{type:String,default:function(){return i.guid()}},headerTitle:[String,Function,Object],max:{type:Date,default:function(){return N}},min:{type:Date,default:function(){return R}},mode:String,navigation:{type:Boolean,default:!0},tabIndex:Number,value:[Date,Array,Object],views:{type:Number,default:1},weekNumber:Boolean,weekCell:[String,Function,Object],topView:{type:String,default:"century"},bottomView:{type:String,default:"month"},onFocus:Function,onBlur:Function,onChange:Function,onKeydown:Function},data:function(){return{valueDuringOnChange:void 0,currentFocusedDate:null,currentActiveView:null,currentValue:null,cellUID:i.guid(),isActive:!1,oldValue:null,didNavigationChange:!1,currentActiveRangeEnd:void 0}},created:function(){i.validatePackage(h);const e=((e,t,i,s)=>void 0!==s?null!==s&&S(s,e,t)?s:null:null!==i&&S(i,e,t)?i:null)(this.currentMin,this.currentMax,this.$props.defaultValue,this.$props.value||this.$props.modelValue),t=Se(this.currentMin,this.currentMax,e),s=be(this.currentMin,this.currentMax,e),a=ke(e),n=Ve(t,s,a);this._hasMounted=!1,this.$data.currentFocusedDate=C(this.$props.focusedDate||n||D(),this.currentMin,this.currentMax),this.$data.currentValue=e,this.$data.currentActiveView=m(c[this.$props.defaultActiveView],c[this.$props.bottomView],c[this.$props.topView]),this.$data.currentActiveRangeEnd=((e,t)=>null===e.start&&null===t?"start":null===e.end?"end":"start")(a,t),this._dates=[],this._calculateFocusFromValue=!1,this._lastView=this.$props.activeView||this.$data.currentActiveView,this._lastViewsCount=this.$props.views,this._dom=new W,this._bus=new U(this.handleViewChange),this._navigation=new G(this._bus),this._oldValue=e},watch:{value:function(e){this.$data.currentFocusedDate=e},focusedDate:function(e){this.$data.currentFocusedDate=e}},setup:()=>({kendoIntlService:t.inject("kendoIntlService",{})}),mounted(){this.calendarViewList=this.calendarViewListRef,this._calculateFocusFromValue=!0},updated(){const e=Se(this.currentMin,this.currentMax,this.computedValue());this._calculateFocusFromValue=!!(this._selectedDate&&e&&this._selectedDate.getTime()&&e.getTime()),this._lastView=this.$props.activeView||this.$data.currentActiveView,this._lastViewsCount=this.$props.views,this._oldValue=this.computedValue(),this.calendarViewList||(this.calendarViewList=this.calendarViewListRef)},computed:{activeRange(){return void 0!==this.$props.activeRangeEnd?this.$props.activeRangeEnd:this.$data.currentActiveRangeEnd},currentMin(){return s.getDate(this.$props.min)},currentMax(){return s.getDate(this.$props.max)}},methods:{element(){return this.$el},computedValue(){return void 0!==this.$data.valueDuringOnChange?this.$data.valueDuringOnChange:void 0!==this.$props.value?this.$props.value:void 0!==this.$props.modelValue?this.$props.modelValue:this.$data.currentValue},focus(){this.calendarViewList&&this.calendarViewList.$el.firstElementChild.focus()},handleBlur(){this.$data.isActive=!1},handleFocus(){this.$data.isActive=!0},emitBlur(e){this.$emit("blur",e)},emitFocus(e){this.$emit("focus",e)},handleTodayClick(e){if(this.$props.disabled)return;this.$data.didNavigationChange=!0;const t=s.cloneDate(e.value);this.$data.currentFocusedDate=t,this.$data.currentValue=t,this.triggerChange(t,e)},handleViewChange({view:e}){this.$data.currentActiveView=e},handlePrevClick(e){const t=s.cloneDate(e.value);this.focus(),!this.$props.disabled&&(this.$data.currentFocusedDate=t)},handleTitleClick(){this.focus()},handleNextClick(e){const t=s.cloneDate(e.value);this.focus(),!this.$props.disabled&&(this.$data.currentFocusedDate=t)},handleCellEnter(e){"range"===this.$props.mode&&(this.$data.currentFocusedDate=e)},generateRange(e,t){let{end:i,start:s}=t;const a=null!==t.start&&e.getTime()<=t.start.getTime();return!this.$props.allowReverse&&a?{start:e,end:this._selectedRange.start}:"end"!==this.activeRange?{start:e,end:i}:{start:s||this._selectedDate,end:e}},clampRange:e=>({start:e,end:null}),handleWeekCellClick(e){this.$emit("weekcellclick",e)},handleWeekNameClick(e){this.$emit("weeknameclick",e)},handleDateChange(e){const t=s.cloneDate(e.value),i=this._bus.canMoveDown(this.$data.currentActiveView);if(this.$props.disabled)return;if(i){if(!e.isTodayClick)return this._bus.moveDown(this.$data.currentActiveView,e.event),void(this.$data.currentFocusedDate=t);this._bus.moveToBottom(this.$data.currentActiveView)}let a,n;switch(this.$props.mode){case"single":default:a=s.cloneDate(e.value);break;case"multiple":if(Array.isArray(this._selectedMultiple)){let t=this._selectedMultiple.slice(),i=-1;t.forEach(((t,a)=>{s.isEqualDate(t,e.value)&&(i=a)})),-1!==i?t.splice(i,1):t.push(s.cloneDate(e.value)),a=t.slice()}else a=this._selectedDate?[s.cloneDate(this._selectedDate),s.cloneDate(e.value)]:[s.cloneDate(e.value)];break;case"range":n=null!==this._selectedRange.start&&null!==this._selectedRange.end&&"start"===this.activeRange,a=n?this.clampRange(e.value):this.generateRange(e.value,this._selectedRange),this.$data.currentActiveRangeEnd="end"!==this.activeRange?"end":"start"}this.$data.currentValue=a,this.triggerChange(a,e)},triggerChange(e,t){this.$data.valueDuringOnChange=e;const i={event:t.event,value:e,component:this,target:{name:this.$props.name,value:e,valueAsDate:e}};this.$emit("changemodel",e),this.$emit("update:modelValue",e),this.$emit("change",i),this.$data.valueDuringOnChange=void 0},handleMouseDown(e){const t=s.cloneDate(e.value);this.$props.disabled||0!==this.$data.currentActiveView||(this.$data.currentFocusedDate=t)},tableKeyDown(e){const{keyCode:t}=e;if(this.$emit("keydown",e),t===i.Keys.enter){const t={event:e,value:this._focusedDate,component:this,target:{name:this.$props.name,value:this._focusedDate,valueAsDate:this._focusedDate}};this.handleDateChange(t)}else{const t=C(this._navigation.move(this._focusedDate,this._navigation.action(e),this.$data.currentActiveView,this._service,e),this.currentMin,this.currentMax);if(s.isEqualDate(this._focusedDate,t))return;this._calculateFocusFromValue=!1,this.$data.currentFocusedDate=t}e.preventDefault()},isValueEqual:(e,t)=>e instanceof Date&&t instanceof Date?s.isEqualDate(e,t):e instanceof Object&&t instanceof Object?!!(e&&t&&s.isEqualDate(e.start,t.start)&&s.isEqualDate(e.end,t.end)):e instanceof Array&&t instanceof Array&&!(!e||!t||e.length!==t.length),rangeWithFocused(e,t){return{start:e.start,end:null===e.end&&null!==e.start&&this.$data.isActive?t.end:e.end}}},render(){const e=this.$props.views,n=this.computedValue(),o=this.$data.currentFocusedDate,r=null!==n&&null!==this._oldValue?!this.isValueEqual(n,this._oldValue):n!==this._oldValue;this._selectedDate=Se(this.currentMin,this.currentMax,n),this._selectedMultiple=be(this.currentMin,this.currentMax,n);const l=i.templateRendering.call(this,this.$props.cell,i.getListeners.call(this)),h=i.templateRendering.call(this,this.$props.weekCell,i.getListeners.call(this)),u=i.templateRendering.call(this,this.$props.headerTitle,i.getListeners.call(this)),d=m(this.$data.currentActiveView,c[this.$props.bottomView],c[this.$props.topView]);this._selectedDate=Se(this.currentMin,this.currentMax,n),this._selectedMultiple=be(this.currentMin,this.currentMax,n),this._selectedRange=ke(n);const p=Ve(this._selectedDate,this._selectedMultiple,this._selectedRange),g=C(r&&null!==p?p:o,this.currentMin,this.currentMax);g instanceof Date?this._focusedDate=s.getDate(g):p&&(this._focusedDate=p);const f=this.rangeWithFocused(this._selectedRange,o);this._intl=a.provideIntlService(this),this._bus.configure(c[this.$props.bottomView],c[this.$props.topView]),this._service=this._bus.service(d,this._intl);const v=i.classNames("k-calendar","k-calendar-md",{"k-calendar-range":e>1,"k-disabled":this.$props.disabled,"k-week-number":this.$props.weekNumber},this.$props.className),w=this._lastView!==this.$data.currentActiveView,$=this._dates&&this._service.isInArray(this._focusedDate,this._dates),y=this._lastViewsCount!==this.$props.views;(!$||w||y)&&(this._dates=this._service.datesList(this._focusedDate,e));const D=s.cloneDate(this._dates&&this._dates[0]?this._dates[0]:void 0),S=[this.$props.navigation&&t.createVNode(De,{tabIndex:this.$props.disabled?void 0:this.$props.tabIndex||0,activeView:this.$data.currentActiveView,currentDate:D,focusedDate:this._focusedDate,min:this.currentMin,max:this.currentMax,rangeLength:this.$props.views,onTodayclick:this.handleTodayClick,onNextclick:this.handleNextClick,onPrevclick:this.handlePrevClick,onTitleclick:this.handleTitleClick,bus:this._bus,service:this._service,headerTitle:u},null),t.createVNode(_,{allowReverse:this.$props.allowReverse,isActive:this.$data.isActive,tabIndex:this.$props.tabIndex||0,ref:e=>{this.calendarViewListRef=e},activeView:this.$data.currentActiveView,focusedDate:this._focusedDate,min:this.currentMin,max:this.currentMax,bus:this._bus,dates:this._dates,shouldScroll:this.$data.didNavigationChange,service:this._service,cell:l,weekCell:h,dom:this._dom,views:this.$props.views,selectionRange:f,showWeekNumbers:this.$props.weekNumber,onChange:this.handleDateChange,onWeekcellclick:this.handleWeekCellClick,onWeeknameclick:this.handleWeekNameClick,onListmousedown:this.handleMouseDown,onCellenter:this.handleCellEnter,onListkeydown:this.tableKeyDown,onListfocus:this.handleFocus,onListblur:this.handleBlur,value:this._selectedMultiple||this._selectedDate,cellUID:this.$data.cellUID},null)];return t.createVNode("div",{"aria-disabled":!0===this.$props.disabled||void 0,class:v,id:this.$props.id,onFocusout:this.emitBlur,onFocusin:this.emitFocus},[S])}});let Ce=class{constructor(){this.symbols=""}};const Me="wide",Fe=(e,t)=>(e[t.pattern[0]]=t.type,e);let xe=class{constructor(e,t,i){this.year=!0,this.month=!0,this.date=!0,this.hours=!0,this.minutes=!0,this.seconds=!0,this.milliseconds=!0,this.leadingZero=null,this.typedMonthPart="",this.knownParts="adHhmMsEy",this.symbols={E:"E",H:"H",M:"M",a:"a",d:"d",h:"h",m:"m",s:"s",y:"y"},this._value=s.getDate(new Date),this.intlProvider=e,this.formatPlaceholder=t,this.format=i,this.monthNames=this.allFormatedMonths()}get intl(){return this.intlProvider()}get value(){return this._value}setValue(e){e?s.isEqual(e,this._value)||(this._value=s.cloneDate(e),this.modifyExisting(!0)):(this._value=s.getDate(new Date),this.modifyExisting(!1))}hasValue(){return this.intl.splitDateFormat(this.format).reduce(((e,t)=>e||"literal"!==t.type&&"dayperiod"!==t.type&&this.getExisting(t.pattern[0])),!1)}getDateObject(){for(let e=0;e<this.knownParts.length;e++)if(!this.getExisting(this.knownParts[e]))return null;return s.cloneDate(this.value)}getTextAndFormat(){return this.merge(this.intl.formatDate(this.value,this.format),this.dateFormatString(this.value,this.format))}modifyExisting(e){const t=this.dateFormatString(this.value,this.format).symbols;for(let i=0;i<t.length;i++)this.setExisting(t[i],e)}getExisting(e){switch(e){case"y":return this.year;case"M":case"L":return this.month;case"d":return this.date;case"E":return this.date&&this.month&&this.year;case"h":case"H":return this.hours;case"m":return this.minutes;case"s":return this.seconds;default:return!0}}setExisting(e,t){switch(e){case"y":this.year=t,!1===t&&this._value.setFullYear(2e3);break;case"M":this.month=t,!1===t&&this._value.setMonth(0);break;case"d":this.date=t;break;case"h":case"H":this.hours=t;break;case"m":this.minutes=t;break;case"s":this.seconds=t;break;default:return}}modifyPart(e,t){let i=s.cloneDate(this.value);switch(e){case"y":i.setFullYear(i.getFullYear()+t);break;case"M":i=s.addMonths(this.value,t);break;case"d":case"E":i.setDate(i.getDate()+t);break;case"h":case"H":i.setHours(i.getHours()+t);break;case"m":i.setMinutes(i.getMinutes()+t);break;case"s":i.setSeconds(i.getSeconds()+t);break;case"a":i.setHours(i.getHours()+12*t)}this.setExisting(e,!0),this._value=i}parsePart(e,t){if(this.resetLeadingZero(),!t)return this.setExisting(e,!1),{value:null};const i=this.intl.formatDate(this.value,this.format),a=this.dateFormatString(this.value,this.format),n=a.symbols;let o=!1,r="",l="",h="";for(let t=0;t<i.length;t++)n[t]===e?(l+=this.getExisting(e)?i[t]:"0",o=!0):o?h+=i[t]:r+=i[t];let u=null;const d=this.matchMonth(t);for(;l.length>0&&"0"===l.charAt(0);)l=l.slice(1);l.length>=4&&(l="");for(let i=0;i<2;i++){let i=l+t,a=parseInt(i,10);if(u=this.intl.parseDate(r+i+h,this.format),!u&&!isNaN(a)&&!isNaN(parseInt(t,10))){if("M"===e&&!d){const e=a-1;e>-1&&e<12&&(u=s.cloneDate(this.value),u.setMonth(e),u.getMonth()!==e&&(u=s.lastDayOfMonth(s.addMonths(u,-1))))}"y"===e&&(u=s.createDate(parseInt(i,10),this.month?this.value.getMonth():0,this.date?this.value.getDate():1,this.hours?this.value.getHours():0,this.minutes?this.value.getMinutes():0,this.seconds?this.value.getSeconds():0,this.milliseconds?this.value.getMilliseconds():0),this.date&&u.getDate()!==this.value.getDate()&&(u=s.lastDayOfMonth(s.addMonths(u,-1))))}if(u)return this._value=u,this.setExisting(e,!0),{value:this.value};l=""}return d&&(u=this.intl.parseDate(r+d+h,this.format),u)?(this._value=u,this.setExisting(e,!0),{value:this.value}):("0"===t&&(this.leadingZero=this.isAbbrMonth(a.partMap,e)?null:{[e]:!0},this.setExisting(e,!1)),{value:null})}symbolMap(e){return this.intl.splitDateFormat(this.format).reduce(Fe,{})[e]}resetLeadingZero(){const e=null!==this.leadingZero;return this.leadingZero=null,e}isAbbrMonth(e,t){const i=this.partPattern(e,t);return"month"===i.type&&i.names}partPattern(e,t){return e.filter((e=>-1!==e.pattern.indexOf(t)))[0]}matchMonth(e){if(this.typedMonthPart+=e.toLowerCase(),0===this.monthNames.length)return"";for(;this.typedMonthPart.length>0;){for(let e=0;e<this.monthNames.length;e++)if(0===this.monthNames[e].toLowerCase().indexOf(this.typedMonthPart))return this.monthNames[e];const e=parseInt(this.typedMonthPart,10);if(e>=1&&e<=12&&e.toString()===this.typedMonthPart)return this.monthNames[e-1];this.typedMonthPart=this.typedMonthPart.substring(1,this.typedMonthPart.length)}return""}allFormatedMonths(){const e=this.intl.splitDateFormat(this.format);for(let t=0;t<e.length;t++)if("month"===e[t].type&&e[t].names)return this.intl.dateFormatNames(e[t].names);return[]}dateFormatString(e,t){const i=this.intl.splitDateFormat(t),s=[],a=[];for(let t=0;t<i.length;t++){let n=this.intl.formatDate(e,{pattern:i[t].pattern}).length;for(;n>0;)s.push(this.symbols[i[t].pattern[0]]||"_"),a.push(i[t]),n--}const n=new Ce;return n.symbols=s.join(""),n.partMap=a,n}merge(e,t){var i;let s="",a="",n=t.symbols;for(let o=n.length-1;o>=0;){if(-1===this.knownParts.indexOf(n[o])||this.getExisting(n[o]))s=e[o]+s,a=n[o]+a;else{const e=n[o];for(;o>=0&&e===n[o];)o--;for(o++,s=null!=(i=this.leadingZero)&&i[e]?"0"+s:this.dateFieldName(t.partMap[o])+s;a.length<s.length;)a=n[o]+a}o--}return{text:s,format:a}}dateFieldName(e){const t=this.formatPlaceholder||"wide";return t[e.type]?t[e.type]:"formatPattern"===t?e.pattern:this.intl.dateFieldName(Object.assign(e,{nameType:t}))}};const _e="dayperiod",Te="hour",Re="minute",Ne="second",Oe=e=>(t,i)=>{const a=s.cloneDate(t);return a[e](i),a},Be=[{type:Te,getter:e=>e.getHours()},{type:Re,getter:e=>e.getMinutes()},{type:Ne,getter:e=>e.getSeconds()},{type:"millisecond",getter:e=>e.getMilliseconds()}],Le=(e=>t=>e.map((e=>t=>e[t.type]?(e=>(t,i)=>e(i))(t.getter):(e=>(t,i)=>e(t))(t.getter))((e=>e.reduce(((e,t)=>(e[t.type]=t.type,e)),{}))(t))))(Be),Ee=(e=>(t,i)=>e.map((e=>{const s=Math.floor(t[e.type]);return s?((e,t,i,s)=>a=>{const n=e(a),o=e(i);return"hour"===s?n-(n-o)%t:a.getTime()<=i.getTime()&&0!==n&&n<=o?Math.ceil(n/t)*t:n-n%t})(e.getter,s,i,e.type):e.getter})))(Be),Ae=e=>t=>{const i=s.cloneDate(t);return i.setHours(...e.map((e=>e(i)))),i},je=Oe("setHours"),He=Oe("setMinutes"),Pe=Oe("setSeconds"),ze=()=>new Date,qe=(e,t,i=1)=>{const s=[];for(let a=e;a<t;a+=i)s.push(a);return s},Ke=(e,t,i)=>({candidateValue:y(g,e),maxValue:s.addDays(y(g,i),t.getHours()<i.getHours()?0:1),minValue:y(g,t)}),Ye=(e,t,i)=>{if(!e||!t||!i)return!0;const{candidateValue:s,minValue:a,maxValue:n}=Ke(e,t,i);return a<=s&&s<=n},Ue=(e,t,i)=>{if(null===e)return!0;const{candidateValue:s,minValue:a,maxValue:n}=Ke(e,t,i);return a<=s&&s<=n},We=(e,t)=>{if(null===e||null===t)return!1;const i=y(g,e),s=y(g,t);return i.getTime()<s.getHours()},Ze=(e,t)=>{if(null===e||null===t)return!1;const i=y(g,e);return y(g,t).getTime()<i.getHours()};const Ge=t.defineComponent({name:"DateInput",model:{event:"changemodel"},inject:{kendoIntlService:{default:null},kendoLocalizationService:{default:null}},emits:{change:e=>!0,changemodel:e=>!0,"update:modelValue":e=>!0,focus:e=>!0,blur:e=>!0},props:{modelValue:Date,value:Date,defaultValue:Date,format:{type:[String,Object],default:function(){return"d"}},formatPlaceholder:{type:[String,Object],default:function(){return Me}},rounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].includes(e)}},tabIndex:Number,title:String,steps:Object,placeholder:String,max:{type:Date,default:function(){return s.cloneDate(v)}},min:{type:Date,default:function(){return s.cloneDate(f)}},maxTime:{type:Date,default:function(){return s.cloneDate(B)}},minTime:{type:Date,default:function(){return s.cloneDate(O)}},disabled:{type:Boolean,default:!1},spinners:{type:Boolean,default:!1},name:String,dir:String,label:String,id:String,validationMessage:{type:String,default:"Please enter a valid value!"},required:{type:Boolean,default:!1},validityStyles:{type:Boolean,default:!0},validate:Boolean,valid:{type:Boolean,default:void 0},ariaRole:{type:String,default:"textbox"},ariaControls:String,ariaLabel:String,ariaExpanded:{type:Boolean,default:void 0},ariaHasPopup:{type:String,default:void 0},inputAttributes:Object},data:()=>({kendoDate:null,currentFormat:void 0,valueDuringOnChange:void 0,hasMounted:!1,isEmpty:void 0,lastSelectedSymbol:void 0,isFocused:!1}),created(){i.validatePackage(h);const{formatPlaceholder:e,format:t,value:s,defaultValue:a}=this.$props;this.kendoDate=new xe(this.intl,e,t),this.kendoDate.setValue(null),this._emptyText=this.kendoDate.getTextAndFormat().text,this.kendoDate.setValue(s||a||null),this._element=null,this._inputId=i.guid()},computed:{computedValue(){return void 0!==this.$data.valueDuringOnChange?this.$data.valueDuringOnChange:this.kendoDate&&this.kendoDate.getDateObject()},wrapperClassNames(){const e=!this.$data.hasMounted||!this.$props.validityStyles||this.validity().valid,t=this.$props.disabled,{size:s,fillMode:a,rounded:n}=this.$props;return{"k-dateinput":!0,"k-input":!0,[`k-input-${i.kendoThemeMaps.sizeMap[s]||s}`]:s,[`k-input-${a}`]:a,[`k-rounded-${i.kendoThemeMaps.roundedMap[n]||n}`]:n,"k-disabled":t,"k-invalid":!e&&void 0!==e,"k-focus":this.isFocused,"k-rtl":"rtl"===this.$props.dir}}},methods:{selection(){let e={start:0,end:0};const t=this.element();return null!==t&&void 0!==t.selectionStart&&(e={start:t.selectionStart,end:t.selectionEnd}),e},element(){return this._element},focus(e){this._element&&this._element.focus(e)},handleFocus(e){this.$data.isFocused=!0,this.$emit("focus",{event:e})},handleBlur(e){this.$data.isFocused=!1,this.$emit("blur",{event:e})},intl(){return a.provideIntlService(this)},setValidity(){const e=this.element();e&&e.setCustomValidity&&e.setCustomValidity(this.validity().valid?"":this.$props.validationMessage)},spinnersMouseDown(e){const t=this.element();e.preventDefault(),t&&i.canUseDOM&&document.activeElement!==t&&t.focus({preventScroll:!0})},elementChange(e){const t=this.element();if(!t||!this.kendoDate)return;const{text:i,format:s}=this.kendoDate.getTextAndFormat();this.$data.currentFormat=s;const a=this.computedValue,n=((e,t,i,s)=>{const a=e[s+e.length-i.length],n=e.substring(0,s+e.length-i.length),o=i.substring(0,s),r=[];if(n===o&&s>0)return r.push([t[s-1],o[s-1]]),r;if(0===n.indexOf(o)&&(0===o.length||t[o.length-1]!==t[o.length])){let e="";1===o.length&&r.push([t[0],o[0]]);for(let i=o.length;i<n.length;i++)t[i]!==e&&"_"!==t[i]&&(e=t[i],r.push([e,""]));return r}if(0===o.indexOf(n)||"_"===t[s-1]){let e=t[0];for(let i=Math.max(0,n.length-1);i<t.length;i++)if("_"!==t[i]){e=t[i];break}return[[e,o[s-1]]]}return" "===o[o.length-1]||o[o.length-1]===a?[[t[s-1],"_"]]:[[t[s-1],o[s-1]]]})(i,this.$data.currentFormat,t.value,this.selection().start),o=1===n.length&&"_"===n[0][1];if(!o)for(let e=0;e<n.length;e++)this.kendoDate.parsePart(n[e][0],n[e][1]);n.length&&"_"!==n[0][0]&&this.setSelection(this.selectionBySymbol(n[0][0])),o&&this.switchDateSegment(1),this.triggerChange(e,a)},elementClick(e){this.setSelection(this.selectionByIndex(this.selection().start))},wheel(e){const t=this.element();i.canUseDOM&&document.activeElement!==t||(e.deltaY<0&&(e.preventDefault(),this.increasePart(e)),e.deltaY>0&&(e.preventDefault(),this.decreasePart(e)))},increasePart(e){e.preventDefault(),this.modifyDateSegmentValue(1,e)},decreasePart(e){e.preventDefault(),this.modifyDateSegmentValue(-1,e)},elementKeyDown(e){if(!e.altKey){switch(e.keyCode){case 37:this.switchDateSegment(-1);break;case 38:this.modifyDateSegmentValue(1,e);break;case 39:this.switchDateSegment(1);break;case 40:this.modifyDateSegmentValue(-1,e);break;default:return}e.preventDefault()}},setSelection(e){const t=this.element();this.$data.lastSelectedSymbol=this.$data.currentFormat[e.start],i.canUseDOM&&window.requestAnimationFrame((()=>{t&&i.canUseDOM&&document.activeElement===t&&t.setSelectionRange(e.start,e.end)}))},triggerChange(e,t){this.$data.valueDuringOnChange=this.computedValue,s.isEqual(t,this.computedValue)||(this.$emit("changemodel",this.computedValue),this.$emit("update:modelValue",this.computedValue),this.$emit("change",{event:e,value:this.computedValue,component:this,target:{name:this.$props.name,value:this.$data.valueDuringOnChange,valueAsDate:this.$data.valueDuringOnChange},validity:this.validity()})),this.$data.valueDuringOnChange=void 0},selectionBySymbol(e){let t=-1,i=0;for(let s=0;s<this.$data.currentFormat.length;s++)this.$data.currentFormat[s]===e&&(i=s+1,-1===t&&(t=s));return t<0&&(t=0),{start:t,end:i}},selectionByIndex(e){let t={start:e,end:e};for(let i=e,s=e-1;i<this.$data.currentFormat.length||s>=0;i++,s--){if(i<this.$data.currentFormat.length&&"_"!==this.$data.currentFormat[i]){t=this.selectionBySymbol(this.$data.currentFormat[i]);break}if(s>=0&&"_"!==this.$data.currentFormat[s]){t=this.selectionBySymbol(this.$data.currentFormat[s]);break}}return t},switchDateSegment(e){const{start:t,end:i}=this.selection();if(t<i&&this.$data.currentFormat[t]!==this.$data.currentFormat[i-1])return void this.setSelection(this.selectionByIndex(e>0?t:i-1));const s=this.$data.currentFormat[t];let a=t+e;for(;a>0&&a<this.$data.currentFormat.length&&(this.$data.currentFormat[a]===s||"_"===this.$data.currentFormat[a]);)a+=e;if("_"===this.$data.currentFormat[a])return;let n=a;for(;n>=0&&n<this.$data.currentFormat.length&&this.$data.currentFormat[n]===this.$data.currentFormat[a];)n+=e;a>n&&(n+1!==t||a+1!==i)?this.setSelection({start:n+1,end:a+1}):a<n&&(a!==t||n!==i)&&this.setSelection({start:a,end:n})},modifyDateSegmentValue(e,t){if(!this.kendoDate)return;const i=this.computedValue,s=this.$data.currentFormat[this.selection().start],a=this.kendoDate.symbolMap(s),n=((this.$props.steps||{})[a]||1)*e;this.kendoDate.modifyPart(s,n),this.setSelection(this.selectionBySymbol(s)),this.triggerChange(t,i)},validity(){const e=((e,t,i)=>null===e||!(t&&t>e||i&&i<e))(this.computedValue,this.$props.min,this.$props.max)&&Ye(this.computedValue,this.$props.minTime,this.$props.maxTime),t=void 0!==this.$props.validationMessage,i=(!this.$props.required||null!==this.computedValue)&&e,s=void 0!==this.$props.valid?this.$props.valid:i;return{customError:t,rangeOverflow:this.computedValue&&this.$props.max.getTime()<this.computedValue.getTime()||!1,rangeUnderflow:this.computedValue&&this.computedValue.getTime()<this.$props.min.getTime()||!1,valid:s,valueMissing:null===this.computedValue}}},mounted(){this._element=i.getRef(this,"input"),this.setValidity(),this.$data.hasMounted=!0},updated(){this.$data.lastSelectedSymbol&&this.setSelection(this.selectionBySymbol(this.$data.lastSelectedSymbol)),this.setValidity()},setup:()=>({inputRef:t.ref(null),kendoIntlService:t.inject("kendoIntlService",{}),kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){const e=i.getDefaultSlots(this),s=a.provideLocalizationService(this),{formatPlaceholder:l,format:h,value:u,modelValue:d,name:c,label:p,id:m,ariaLabel:g,ariaExpanded:f,ariaHasPopup:v,ariaRole:w,ariaControls:$,inputAttributes:y}=this.$props,D=void 0!==u?u:d;this.kendoDate.format=h,this.kendoDate.formatPlaceholder=l,this.valueDuringOnChange=this.valueDuringOnChange?this.valueDuringOnChange:void 0,void 0!==D&&this.computedValue!==D&&this.kendoDate.setValue(D);const{text:S,format:b}=this.kendoDate.getTextAndFormat();this.$data.currentFormat=b,this.$data.isEmpty=S===this._emptyText;const k=void 0!==this.$props.placeholder&&this.$data.isEmpty&&!this.$data.isFocused?null:S,V=m||this._inputId,I=!this.$props.validityStyles||this.validity().valid,C=t.createVNode("span",{class:this.wrapperClassNames,dir:this.$props.dir},[t.createVNode("input",t.mergeProps({role:w,tabindex:this.$props.tabIndex,disabled:this.$props.disabled,title:void 0!==this.$props.title?this.$props.title:S,type:"text",spellcheck:!1,autocomplete:"off",autocorrect:"off",class:"k-input-inner",id:V,placeholder:this.$props.placeholder,onWheel:this.wheel,onClick:this.elementClick,onInput:this.elementChange,onKeydown:this.elementKeyDown,onChange:i.noop,onFocusin:this.handleFocus,onFocusout:this.handleBlur,value:k,name:c,"aria-label":g,"aria-expanded":f,"aria-haspopup":v,"aria-controls":$,"aria-disabled":this.$props.disabled,ref:i.setRef(this,"input")},y),null),e,this.$props.spinners&&t.createVNode("span",{class:"k-input-spinner k-spin-button",onMousedown:this.spinnersMouseDown},[t.createVNode(n.Button,{type:"button",tabIndex:-1,icon:"caret-alt-up",svgIcon:o.caretAltUpIcon,size:this.$props.size,fillMode:this.$props.fillMode,class:"k-spinner-increase","aria-label":s.toLanguageString(ee,$e[ee]),title:s.toLanguageString(ee,$e[ee]),onClick:this.increasePart},null),t.createVNode(n.Button,{type:"button",tabIndex:-1,class:"k-spinner-decrease",icon:"caret-alt-down",svgIcon:o.caretAltDownIcon,size:this.$props.size,fillMode:this.$props.fillMode,"aria-label":s.toLanguageString(te,$e[te]),title:s.toLanguageString(te,$e[te]),onClick:this.decreasePart},null)])]);return p?t.createVNode(r.FloatingLabel,{label:p,editorId:V,editorValue:k,editorPlaceholder:this.$props.placeholder,editorValid:I,editorDisabled:this.$props.disabled},function(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}(C)?C:{default:()=>[C]}):C}}),Je=n.Button;function Qe(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const Xe=t.defineComponent({name:"DatePicker",inject:{kendoLocalizationService:{default:null}},model:{event:"changemodel"},emits:{change:e=>!0,changemodel:e=>!0,"update:modelValue":e=>!0,iconclick:e=>!0,focus:e=>!0,blur:e=>!0,keydown:e=>!0,open:e=>!0,close:e=>!0},props:{defaultShow:{type:Boolean,default:!1},modelValue:{type:Date,default:void 0},defaultValue:{type:Date,default:void 0},disabled:{type:Boolean,default:!1},dateInput:{type:[String,Object,Function],default:function(){}},calendar:{type:[String,Object,Function],default:function(){}},toggleButton:{type:[String,Object,Function],default:function(){}},label:String,placeholder:String,popup:{type:[String,Object,Function],default:function(){}},rounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].includes(e)}},focusedDate:Date,format:{type:[Object,String],default:function(){return"d"}},formatPlaceholder:[Object,String],id:String,max:{type:Date,default:function(){return s.cloneDate(v)}},min:{type:Date,default:function(){return s.cloneDate(f)}},name:String,popupSettings:{type:Object,default:function(){return{}}},show:{type:Boolean,default:void 0},tabIndex:{type:Number,default:0},title:{type:String,default:function(){return""}},value:Date,weekNumber:Boolean,width:[Number,String],validityStyles:{type:Boolean,default:!0},validationMessage:String,required:Boolean,validate:Boolean,valid:{type:Boolean,default:void 0},ariaLabel:String,inputAttributes:Object},data:function(){return{isFocused:!1,currentValue:void 0,currentShow:void 0,valueDuringOnChange:void 0,showDuringOnChange:void 0,shouldFocusDateInput:!1}},created(){i.validatePackage(h),this._popupId=i.guid(),this._anchor=i.guid(),this._dateInput=null,this._calendar=null,this.$data.currentValue=this.$props.defaultValue,this.$data.currentShow=this.$props.defaultShow},mounted(){this._dateInput=i.getRef(this,"dateInput"),(this.$refs.calendar||this.calendarRef)&&(this._calendar=i.getRef(this,"calendar")),this.computedShow&&this.$forceUpdate()},updated(){(this.$refs.calendar||this.calendarRef)&&(this._calendar=i.getRef(this,"calendar")),this.computedShow?this._calendar&&this._calendar.$el&&!this._oldShow&&this._calendar.focus({preventScroll:!0}):this._dateInput&&this._dateInput.$el&&this.$data.shouldFocusDateInput&&this._dateInput.focus({preventScroll:!0}),this.$data.shouldFocusDateInput=!1},watch:{show:function(e,t){this._oldShow=t},currentShow:function(e,t){this._oldShow=t}},computed:{computedValue(){const e=void 0!==this.$data.valueDuringOnChange?this.$data.valueDuringOnChange:void 0!==this.$props.value?this.$props.value:void 0!==this.$props.modelValue?this.$props.modelValue:this.$data.currentValue;return null!==e?s.cloneDate(e):null},computedShow(){return void 0!==this.$data.showDuringOnChange?this.$data.showDuringOnChange:void 0!==this.$props.show?this.$props.show:this.$data.currentShow}},methods:{focus(){this._dateInput&&this._dateInput.focus()},handleFocus(e){this._oldShow=this.computedShow,this.$data.isFocused=!0,this.$emit("focus",{event:e})},handleBlur(e){this.$data.isFocused=!1,this.createBlurTimeout(),this.$emit("blur",{event:e})},calendarBlur(e){this.$emit("blur",{event:e}),clearTimeout(this._blurTimeout),this.createBlurTimeout()},calendarFocus(e){this.$emit("focus",{event:e}),clearTimeout(this._blurTimeout)},createBlurTimeout(){this._blurTimeout=setTimeout((()=>{this._dateInput&&i.canUseDOM&&document.activeElement!==this._dateInput._element&&this.setShow(!1)}),200)},validity(){const e=this.computedValue,t=b(e,this.$props.min,this.$props.max),i=void 0!==this.$props.validationMessage,s=(!this.$props.required||null!==e)&&t,a=void 0!==this.$props.valid?this.$props.valid:s;return{customError:i,rangeOverflow:e&&this.$props.max.getTime()<e.getTime()||!1,rangeUnderflow:e&&e.getTime()<this.$props.min.getTime()||!1,valid:a,valueMissing:null===e}},nextValue:(e,t)=>void 0!==e.value?e.value:t.value,nextShow:(e,t)=>void 0!==e.show?e.show:t.show,setShow(e){this.computedShow!==e&&(this.$data.currentShow=e,this.$emit(e?"open":"close",{component:this}))},mergeTime(e){return this.computedValue&&e?y(e,this.computedValue):e},handleInputValueChange(e){this.handleValueChange(e.value,e)},handleCalendarValueChange(e){const t=this.mergeTime(e.value);this.handleValueChange(t,e)},getDateInputText(){return!!this.computedValue||(this._dateInput?this._dateInput._element.value:"")},handleValueChange(e,t){this.$data.currentValue=s.cloneDate(e||void 0),this.$data.valueDuringOnChange=e,this.$data.showDuringOnChange=!1,this.$data.shouldFocusDateInput=!0,this.$emit("changemodel",this.computedValue),this.$emit("update:modelValue",this.computedValue),this.$emit("change",{event:t.event,value:this.computedValue,show:this.computedShow,component:this,target:{name:this.$props.name,value:this.computedValue,valueAsDate:this.computedValue},validity:this.validity()}),this.$data.valueDuringOnChange=void 0,this.$data.showDuringOnChange=void 0,this.setShow(!1)},handleIconClick(e){e.stopPropagation(),e.preventDefault(),!this.$props.disabled&&(this.$data.shouldFocusDateInput=!0,this.$emit("iconclick",e),this.setShow(!this.computedShow))},handleIconMouseDown(e){e.stopPropagation(),e.preventDefault()},handleKeyDown(e){const{altKey:t,keyCode:s}=e;return s===i.Keys.tab&&this._dateInput&&e.target!==this._dateInput._element?(e.preventDefault(),this.$data.shouldFocusDateInput=!0,void this.setShow(!1)):s===i.Keys.esc?(this.$data.shouldFocusDateInput=!0,void this.setShow(!1)):(t&&(s===i.Keys.up||s===i.Keys.down)&&(e.preventDefault(),e.stopPropagation(),this.$data.shouldFocusDateInput=s===i.Keys.up,this.setShow(s===i.Keys.down)),void this.$emit("keydown",e))}},setup:()=>({listRef:t.ref(null),kendoAnchorRef:t.ref(null),kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){i.getDefaultSlots(this);const{disabled:e,tabIndex:n,title:h,id:u,format:d,formatPlaceholder:c,min:p,max:m,weekNumber:g,focusedDate:f,width:v,name:w,validationMessage:$,required:y,validityStyles:D,size:S,fillMode:b,rounded:k,ariaLabel:V,inputAttributes:I}=this.$props,{popupClass:C,animate:M,appendTo:F}=this.$props.popupSettings,x=this.computedShow,_=this.computedValue,T=_&&s.getDate(_),R=!this.$props.validityStyles||this.validity().valid,N=i.classNames("k-calendar-container k-group k-reset",C),O=this.$props.toggleButton?i.templateRendering.call(this,this.$props.toggleButton,i.getListeners.call(this)):void 0,B=t.createVNode(Je,{type:"button",tabIndex:-1,icon:"calendar",svgIcon:o.calendarIcon,onMousedown:this.handleIconMouseDown,onClick:this.handleIconClick,title:a.provideLocalizationService(this).toLanguageString(se,$e[se]),"aria-label":a.provideLocalizationService(this).toLanguageString(se,$e[se]),rounded:null,class:"k-input-button"},null),L=i.getTemplate.call(this,{h:t.h,template:O,defaultRendering:B,defaultSlots:t.createVNode(i.Icon,{name:"calendar",icon:o.calendarIcon},null),additionalListeners:{click:this.handleIconClick}}),E=this.$props.dateInput?i.templateRendering.call(this,this.$props.dateInput,i.getListeners.call(this)):void 0,A=t.createVNode(Ge,{ref:i.setRef(this,"dateInput"),placeholder:this.$props.placeholder,disabled:e,format:d,formatPlaceholder:c,id:u,max:m,min:p,name:w,size:null,rounded:null,fillMode:null,onChange:this.handleInputValueChange,required:y,tabIndex:x?-1:n,title:h,valid:this.validity().valid,validationMessage:$,validityStyles:D,value:_,ariaHasPopup:"grid",ariaExpanded:x,ariaRole:"combobox",ariaControls:this._popupId,ariaLabel:V,inputAttributes:I},null),j=i.getTemplate.call(this,{h:t.h,template:E,defaultRendering:A}),H=this.$props.calendar?i.templateRendering.call(this,this.$props.calendar,i.getListeners.call(this)):void 0,P=t.createVNode(Ie,{ref:i.setRef(this,"calendar"),onKeydown:this.handleKeyDown,onFocus:this.calendarFocus,onBlur:this.calendarBlur,disabled:e,value:T,min:p,max:m,weekNumber:g,focusedDate:f,onChange:this.handleCalendarValueChange},null),z=i.getTemplate.call(this,{h:t.h,template:H,defaultRendering:P}),q=this.$props.popup?i.templateRendering.call(this,this.$props.popup,i.getListeners.call(this)):void 0,K=t.createVNode(l.Popup,{show:x,anchor:this._anchor,class:N,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},animate:M,appendTo:F},Qe(z)?z:{default:()=>[z]}),Y=i.getTemplate.call(this,{h:t.h,template:q,defaultRendering:K,defaultSlots:z}),U=t.createVNode("span",{ref:i.setRef(this,"kendoAnchor"),role:"group",class:i.classNames("k-input","k-datepicker",{[`k-input-${i.kendoThemeMaps.sizeMap[S]||S}`]:S,[`k-input-${b}`]:b,[`k-rounded-${i.kendoThemeMaps.roundedMap[k]||k}`]:k,"k-invalid":!R,"k-required":this.required,"k-disabled":this.$props.disabled,"k-focus":this.$data.isFocused}),onKeydown:this.handleKeyDown,onFocusin:this.handleFocus,onFocusout:this.handleBlur},[j,L,Y]);return this.$props.label?t.createVNode(r.FloatingLabel,{label:this.$props.label,editorId:u,editorValid:R,editorValue:this.getDateInputText(),editorPlaceholder:this.$props.placeholder,editorDisabled:this.$props.disabled,style:{width:v}},Qe(U)?U:{default:()=>[U]}):U}});let et=class{constructor(e=0,t,i){this.total=e,this.rowHeight=t,this.detailRowHeight=i,this.offsets=[],this.heights=[];let s=0;for(let i=0;i<e;i++)this.offsets.push(s),s+=t,this.heights.push(t)}height(e){return this.heights[e]}expandDetail(e){this.height(e)===this.rowHeight&&this.updateRowHeight(e,this.detailRowHeight)}collapseDetail(e){this.height(e)>this.rowHeight&&this.updateRowHeight(e,-1*this.detailRowHeight)}index(e){for(let t=0;t<this.offsets.length;t++){if(e===this.offsets[t])return t;if(e<this.offsets[t])return t-1}return this.total-1}offset(e){return this.offsets[e]}totalHeight(){return this.heights.reduce(((e,t)=>e+t),0)}updateRowHeight(e,t){this.heights[e]+=t,this.offsets=((e,t,i)=>[...e.slice(0,t+1),...e.slice(t+1).map((e=>e+i))])(this.offsets,e,t)}};const tt=e=>Math.max(e,0);let it=class{constructor(e){this.offset=e}},st=class{constructor(e){this.skip=e}},at=class{constructor(e,t){this.onScrollAction=e,this.onPageAction=t,this.firstLoaded=0,this.bottomOffset=0,this.topOffset=0}create(e,t,i,s,a=0,n=0,o="vertical"){this.rowHeightService=e,this.firstLoaded=t,this.lastLoaded=t+i,this.take=i,this.total=s,this.lastScrollTop=0,this.topOffset=a,this.bottomOffset=n,this.direction=o;const r=this.rowsForHeight(a),l=tt(t-r);this.onScrollAction(new it(this.rowOffset(l))),this.onPageAction(new st(l))}onScroll({scrollLeft:e,scrollTop:t,offsetHeight:i,offsetWidth:s}){const a="vertical"===this.direction?t:e,n="vertical"===this.direction?i:s;if(this.lastScrollTop===a)return;const o=this.lastScrollTop>=a;this.lastScrollTop=a;const r=this.rowHeightService.index(tt(a-this.topOffset)),l=this.rowHeightService.index(tt(a+n-this.bottomOffset));if(!o&&l>=this.lastLoaded&&this.lastLoaded<this.total&&(this.firstLoaded=r,this.onScrollAction(new it(this.rowOffset(r))),this.lastLoaded=Math.min(this.firstLoaded+this.take,this.total),this.onPageAction(new st(this.firstLoaded))),o&&r<=this.firstLoaded){const e=Math.floor(.3*this.take);this.firstLoaded=tt(r-e),this.onScrollAction(new it(this.rowOffset(this.firstLoaded))),this.lastLoaded=Math.min(this.firstLoaded+this.take,this.total),this.onPageAction(new st(this.firstLoaded))}}rowOffset(e){return this.rowHeightService.offset(e)+this.topOffset}rowsForHeight(e){return Math.ceil(e/this.rowHeightService.height(0))}},nt=function(e){return e[e.Backward=0]="Backward",e[e.Forward=1]="Forward",e}({});const ot={[nt.Forward]:e=>t=>t+e,[nt.Backward]:e=>t=>t-e},rt={[nt.Forward]:e=>t=>Math.min(t,e),[nt.Backward]:e=>t=>Math.max(t,e)},lt={[nt.Forward]:e=>t=>t<e,[nt.Backward]:e=>t=>t>e},ht=t.defineComponent({name:"Virtualization",emits:{scroll:e=>!0,scrollaction:e=>!0},props:{bottomOffset:{type:Number,required:!0},direction:{type:String,default:function(){return"vertical"}},forceScroll:{type:Boolean,default:!1},itemHeight:Number,itemWidth:Number,maxScrollDifference:{type:Number,default:100},scrollDuration:{type:Number,default:100},scrollOffsetSize:{type:Number,default:0},skip:{type:Number,required:!0},tabIndex:Number,take:{type:Number,required:!0},topOffset:{type:Number,required:!0},total:{type:Number,required:!0},role:String},created(){this.animationInProgress=!1,this.lastTotal=void 0,this.scrollerService=new at(this.handleScrollAction,this.handlePageAction)},mounted(){this.scrollContainer=this.$refs.scrollContainer},computed:{element(){return this.scrollContainer}},methods:{containerOffsetSize(){return this.getContainerProperty("vertical"===this.$props.direction?"offsetHeight":"offsetWidth")},containerScrollSize(){return this.getContainerProperty("vertical"===this.$props.direction?"scrollHeight":"scrollWidth")},containerScrollPosition(){return this.getContainerProperty("vertical"===this.$props.direction?"scrollTop":"scrollLeft")},activeIndex(){return this.itemIndex(Math.ceil(this.containerScrollPosition()))},itemIndex(e){return this.rowHeightService?this.rowHeightService.index(e):0},itemOffset(e){return this.rowHeightService?this.rowHeightService.offset(e):0},isIndexVisible(e){if(!this.rowHeightService)return!1;const t=this.containerScrollPosition(),i=t+this.containerOffsetSize(),s=this.rowHeightService.offset(e),a=s+this.rowHeightService.height(e);return s>=t&&a<=i},isListScrolled(e){return!!this.rowHeightService&&this.containerScrollPosition()!==this.rowHeightService.offset(e)},scrollTo(e){const t="vertical"===this.$props.direction?"scrollTop":"scrollLeft";this.scrollContainer&&(this.scrollContainer[t]=e)},scrollToIndex(e){this.rowHeightService&&(this.animationInProgress=!1,this.scrollTo(this.rowHeightService.offset(e)))},animateToIndex(e){if(!this.rowHeightService||!window)return;window.cancelAnimationFrame(this.cancelAnimation);const t=this.rowHeightService.offset(e),i=this.getContainerScrollDirection(t);let{start:s,end:a}=this.scrollRange(t,i);if(s===a)return;const n=this.scrollStep(s,a),o=ot[i](n),r=rt[i](a),l=lt[i](o(a)),h=e=>{this.animationInProgress=!0;const t=o(e);this.scrollTo(r(t)),l(t)?this.cancelAnimation=window.requestAnimationFrame((()=>{h(t)})):this.animationInProgress=!1};this.cancelAnimation=window.requestAnimationFrame((()=>{h(s)}))},scrollToBottom(){this.rowHeightService&&this.scrollTo(this.rowHeightService.totalHeight()+this.$props.bottomOffset)},scrollStep(e,t){const i=this.$props.scrollDuration;return Math.abs(t-e)/(i/17)},scrollRange(e,t){const i=this.containerScrollPosition();if(parseInt(`${e}`,10)===parseInt(`${i}`,10))return{start:e,end:e};const s=this.containerMaxScroll(),a=t===nt.Backward?1:-1,n=((e,t,i)=>Math.min(Math.abs(t-e),i))(i,e,this.$props.maxScrollDifference),o=Math.min(e,s);return{start:Math.min(Math.max(o+a*n,0),s),end:o}},containerMaxScroll(){return this.containerScrollSize()-this.containerOffsetSize()},getContainerScrollDirection(e){return e<this.containerScrollPosition()?nt.Backward:nt.Forward},initServices(e){const t=e||this.$props,i="vertical"===t.direction?t.itemHeight:t.itemWidth;void 0!==i&&(this.rowHeightService=new et(t.total,i,0),this.scrollerService.create(this.rowHeightService,t.skip,t.take,t.total,t.topOffset,this.$props.scrollOffsetSize,this.$props.direction))},getContainerProperty(e){return this.scrollContainer?this.scrollContainer[e]:0},handleScroll(e){if(!this.scrollContainer||!this.rowHeightService)return;const t=e.target;this.scrollerService.onScroll({scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,offsetHeight:t.offsetHeight,offsetWidth:t.offsetWidth});const i={index:this.rowHeightService.index(this.containerScrollPosition()-this.$props.topOffset),target:t,scrollAction:this.scrollAction,pageAction:this.pageAction,animationInProgress:this.animationInProgress};this.$emit("scrollaction",i),this.scrollAction=void 0,this.pageAction=void 0},handleScrollAction(e){this.scrollAction=e},handlePageAction(e){this.pageAction=e}},render(){const e=i.getDefaultSlots(this);(this.lastTotal!==this.$props.total||this.lastDirection!==this.$props.direction||this.lastTake!==this.$props.take)&&(this.initServices(),this.lastTotal=this.$props.total,this.lastDirection=this.$props.direction,this.lastTake=this.$props.take);const s=`${(this.rowHeightService?this.rowHeightService.totalHeight():0)+this.$props.bottomOffset}`,a="vertical"===this.$props.direction?{height:`${s}px`}:{width:`${s}px`},n=i.classNames("k-content k-scrollable",{"k-scrollable-horizontal":"horizontal"===this.$props.direction}),o=i.classNames("k-scrollable-placeholder",{"k-scrollable-horizontal-placeholder":"horizontal"===this.$props.direction});return t.createVNode("div",{ref:"scrollContainer",onScroll:this.handleScroll,class:n,tabindex:this.$props.tabIndex,role:this.$props.role},[e,t.createVNode("div",{style:a,class:o},null)])}}),ut=(e,t)=>{const i=s.cloneDate(e);return i.setHours(t),i},dt=e=>null!==e&&e<12,ct=(e,t,i)=>!t&&!i||e>=t&&e<=i,pt=(e,t,i)=>!t&&!i||e>=t||e<=i;let mt=class{constructor(){this.didCalculate=!1}ensureHeights(){void 0===this.timeListHeight&&this.calculateHeights()}calculateHeights(e){if(!i.canUseDOM)return;const t=M("div"),s=M("ul"),a=M("li"),n=t([t([t([s([a("<span>02</span>","k-item")],"k-reset")],"k-time-container k-content k-scrollable")],"k-time-list")],"k-time-list-wrapper",{left:"-10000px",position:"absolute"}),o=e&&e.querySelector(".k-time-container"),r=o||document.body,l=r.appendChild(n);this.timeListHeight=o.offsetHeight,this.itemHeight=l.querySelector("li").offsetHeight,r.removeChild(l),this.didCalculate=!0}};const gt=(e=>t=>t%e)(24),ft=(e,t)=>gt(24+e-t),vt=e=>(t,i)=>i&&s.getDate(t).getTime()!==s.getDate(i).getTime()?je(t,e):t,wt=vt(0),$t=vt(23);const yt=(e=>t=>t%e)(60),Dt=(e,t)=>yt(60+e-t),St=e=>(t,i)=>i&&t.getHours()!==i.getHours()?He(t,e):t,bt=St(0),kt=St(59);const Vt=(e=>t=>t%e)(60),It=(e,t)=>Vt(60+e-t),Ct=e=>(t,i)=>!i||t.getMinutes()===i.getMinutes()&&t.getHours()===i.getHours()?t:Pe(t,e),Mt=Ct(0),Ft=Ct(59);function xt(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const _t={[i.Keys.end]:(e,t)=>e[e.length-1],[i.Keys.home]:(e,t)=>e[0],[i.Keys.up]:(e,t)=>e[t-1],[i.Keys.down]:(e,t)=>e[t+1]},Tt={[_e]:class{constructor(e){this.intl=e}apply(e,t){const i=e.getHours(),s=dt(i),a=dt(t.getHours());if(s&&a||!s&&!a)return e;const[n,o=24]=this.normalizedRange(),r=i+(a?-12:12);return ut(e,Math.min(Math.max(n,r),o||24))}configure(e){const{min:t=this.min,max:i=this.max,part:s=this.part}=e;this.min=t,this.max=i,this.part=s}data(e){const t=this.part.names;if(!t)return[];const i=[],[s,a]=this.normalizedRange(),n=this.intl.dateFormatNames(t);return dt(s)&&i.push({text:n.am,value:ut(this.min,s)}),(e=>null!==e&&(!e||e>11))(a)&&i.push({text:n.pm,value:ut(this.min,Math.max(12,a))}),this.min.getHours()!==s?i.reverse():i}isRangeChanged(e,t){return!1}limitRange(e,t,i){return[e,t]}total(){const[e,t]=this.normalizedRange();return(e||t)&&(e>11||t<12)?1:2}selectedIndex(e){if(!this.valueInList(e))return-1;const t=Math.floor(e.getHours()/12);return this.min.getHours()===this.normalizedRange()[0]?t:0===t?1:0}valueInList(e){return(this.min.getHours()!==this.normalizedRange()[0]?pt:ct)(e.getHours(),this.min.getHours(),this.max.getHours())}normalizedRange(){const e=this.min.getHours(),t=this.max.getHours();return[Math.min(e,t),Math.max(e,t)]}},[Te]:class{constructor(e){this.intl=e,this.boundRange=!1,this.insertUndividedMax=!1}apply(e,t){return je(e,t.getHours())}configure(e){const{boundRange:t=this.boundRange,insertUndividedMax:i=this.insertUndividedMax,min:s=this.min,max:a=this.max,part:n,step:o=this.step}=e;this.boundRange=t,this.insertUndividedMax=i,this.toListItem=e=>{const t=je(g,e);return{text:this.intl.formatDate(t,n.pattern),value:t}},this.min=s,this.max=a,this.step=o}data(e){const[t]=this.range(e),i=((e,t)=>i=>gt(e+i*t))(t,this.step),s=qe(0,this.countFromMin(e)).map((e=>this.toListItem(i(e))));return this.addLast(s),e&&this.addMissing(s,e),s}isRangeChanged(e,t){return!s.isEqual(this.min,e)||!s.isEqual(this.max,t)}limitRange(e,t,i){return this.boundRange?[wt(e,i),$t(t,i)]:[e,t]}total(e){const t=this.insertUndividedMax&&this.isLastMissing(e)?1:0,i=this.isMissing(e)?1:0;return this.countFromMin(e)+i+t}selectedIndex(e){return Math.ceil(this.divideByStep(e))}valueInList(e){return!e||(this.insertUndividedMax&&this.lastHour(e)===e.getHours()||!this.isMissing(e))}addLast(e,t){return this.insertUndividedMax&&this.isLastMissing(t)&&e.push(this.toListItem(this.lastHour(t))),e}addMissing(e,t){if(this.valueInList(t))return e;const i=this.toListItem(t.getHours());return e.splice(this.selectedIndex(t),0,i),e}countFromMin(e){const[t,i]=this.range(e);return Math.floor(ft(i,t)/this.step)+1}isMissing(e){return!!e&&this.selectedIndex(e)!==this.divideByStep(e)}isLastMissing(e){return this.isMissing(je(this.max,this.lastHour(e)))}divideByStep(e){return ft(e.getHours(),this.min.getHours())/this.step}lastHour(e){return this.range(e)[1]}range(e){const[t,i]=this.limitRange(this.min,this.max,e);return[t.getHours(),i.getHours()]}},[Re]:class{constructor(e){this.intl=e,this.insertUndividedMax=!1}apply(e,t){return He(e,t.getMinutes())}configure(e){const{insertUndividedMax:t=this.insertUndividedMax,min:i=this.min,max:s=this.max,part:a,step:n=this.step}=e;this.insertUndividedMax=t,this.toListItem=e=>{const t=He(g,e);return{text:this.intl.formatDate(t,a.pattern),value:t}},this.min=i,this.max=s,this.step=n}data(e){const[t]=this.range(e),i=((e,t)=>i=>yt(e+i*t))(t,this.step),s=qe(0,this.countFromMin(e)).map((e=>this.toListItem(i(e))));return this.addLast(s),e&&this.addMissing(s,e),s}isRangeChanged(e,t){return!s.isEqual(this.min,e)||!s.isEqual(this.max,t)}limitRange(e,t,i){return[bt(e,i),kt(t,i)]}total(e){const t=this.insertUndividedMax&&this.isLastMissing(e)?1:0,i=this.isMissing(e)?1:0;return this.countFromMin(e)+i+t}selectedIndex(e){return Math.ceil(this.divideByStep(e))}valueInList(e){return!e||(this.insertUndividedMax&&this.lastMinute(e)===e.getMinutes()||!this.isMissing(e))}addLast(e,t){return this.insertUndividedMax&&this.isLastMissing(t)&&e.push(this.toListItem(this.lastMinute(t))),e}addMissing(e,t){if(this.valueInList(t))return e;const i=this.toListItem(t.getMinutes());return e.splice(this.selectedIndex(t),0,i),e}countFromMin(e){const[t,i]=this.range(e);return Math.floor(Dt(i,t)/this.step)+1}isMissing(e){return!!e&&this.selectedIndex(e)!==this.divideByStep(e)}isLastMissing(e){return this.isMissing(He(this.max,this.lastMinute(e)))}divideByStep(e){return Dt(e.getMinutes(),this.min.getMinutes())/this.step}lastMinute(e){return this.range(e)[1]}range(e){const[t,i]=this.limitRange(this.min,this.max,e);return[t.getMinutes(),i.getMinutes()]}},[Ne]:class{constructor(e){this.intl=e,this.insertUndividedMax=!1}apply(e,t){return Pe(e,t.getSeconds())}configure(e){const{insertUndividedMax:t=this.insertUndividedMax,min:i=this.min,max:s=this.max,part:a,step:n=this.step}=e;this.insertUndividedMax=t,this.toListItem=e=>{const t=Pe(g,e);return{text:this.intl.formatDate(t,a.pattern),value:t}},this.min=i,this.max=s,this.step=n}data(e){const[t]=this.range(e),i=((e,t)=>i=>Vt(e+i*t))(t,this.step),s=qe(0,this.countFromMin(e)).map((e=>this.toListItem(i(e))));return this.addLast(s),e&&this.addMissing(s,e),s}isRangeChanged(e,t){return!s.isEqual(this.min,e)||!s.isEqual(this.max,t)}limitRange(e,t,i){return[Mt(e,i),Ft(t,i)]}total(e){const t=this.insertUndividedMax&&this.isLastMissing(e)?1:0,i=this.isMissing(e)?1:0;return this.countFromMin(e)+i+t}selectedIndex(e){return Math.ceil(this.divideByStep(e))}valueInList(e){return!e||(this.insertUndividedMax&&this.lastSecond(e)===e.getSeconds()||!this.isMissing(e))}divideByStep(e){return It(e.getSeconds(),this.min.getSeconds())/this.step}addLast(e,t){return this.insertUndividedMax&&this.isLastMissing(t)&&e.push(this.toListItem(this.lastSecond(t))),e}addMissing(e,t){if(this.valueInList(t))return e;const i=this.toListItem(t.getSeconds());return e.splice(this.selectedIndex(t),0,i),e}countFromMin(e){const[t,i]=this.range(e);return Math.floor(It(i,t)/this.step)+1}isMissing(e){return!!e&&this.selectedIndex(e)!==this.divideByStep(e)}isLastMissing(e){return this.isMissing(Pe(this.max,this.lastSecond(e)))}lastSecond(e){return this.range(e)[1]}range(e){const[t,i]=this.limitRange(this.min,this.max,e);return[t.getSeconds(),i.getSeconds()]}}},Rt=t.defineComponent({name:"KendoTimeList",emits:{change:e=>!0,focus:e=>!0,blur:e=>!0},props:{id:Number,boundRange:{type:Boolean,default:!1},max:{type:Date,default:function(){return $}},min:{type:Date,default:function(){return g}},part:Object,step:{type:Number,default:1},value:Date,smoothScroll:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},inject:{kendoIntlService:{default:null}},data:()=>({animateToIndex:!1}),created(){this.topOffset=void 0,this.dom=new mt},computed:{animate(){return!(!this.$props.smoothScroll||!this.animateToIndex)}},mounted(){this.virtualization=this.$refs.virtualization,Promise.resolve().then((()=>{this.$el&&(this.dom.calculateHeights(this.$el),this.$forceUpdate())}))},updated(){if(!this.$refs.virtualization)return;this.virtualization=this.$refs.virtualization;const e=this.service.selectedIndex(this.$props.value);this.virtualization[this.animate?"animateToIndex":"scrollToIndex"](e),this.animateToIndex=!0},setup:()=>({kendoIntlService:t.inject("kendoIntlService",{})}),render(){let e;if(!this.$props.part.type||!Tt[this.$props.part.type])return;this.calculateHeights(),this.intl=a.provideIntlService(this),this.service=new Tt[this.$props.part.type](this.intl),this.configureServices();const i=this.service.data(this.$props.value),s="translateY("+this.topOffset+"px)",n=this.service.total(this.$props.value),o=function(){return t.createVNode("ul",{style:{transform:s,msTransform:s},class:"k-reset"},[i.map((function(e,i){return t.createVNode("li",{key:i,class:"k-item",onClick:()=>{this.handleChange(e)}},[t.createVNode("span",null,[e.text])])}),this)])};return t.createVNode("div",{class:"k-time-list",id:String(this.$props.id||""),tabindex:this.$props.disabled?-1:0,onKeydown:this.handleKeyDown,onFocusin:this.handleFocus,onFocusout:this.handleBlur,onMouseover:this.handleMouseOver},[this.dom.didCalculate?t.createVNode(ht,{bottomOffset:this.bottomOffset,class:"k-time-container",itemHeight:this.itemHeight,maxScrollDifference:this.listHeight,onScrollaction:this.handleScrollAction,ref:"virtualization",role:"presentation",skip:0,tabIndex:-1,take:n,topOffset:this.topOffset,total:n},xt(e=o.call(this))?e:{default:()=>[e]}):t.createVNode("div",{class:"k-time-container"},[o.call(this)])])},methods:{focus(e){Promise.resolve().then((()=>{this.$el&&this.$el.focus(e)}))},itemOffset(e){if(!this.virtualization)return-1;const t=this.service.selectedIndex(this.$props.value),i=this.virtualization.activeIndex(),s=this.virtualization.itemOffset(i),a=Math.abs(Math.ceil(e)-s);if(t===i&&a<2)return s;const n=t>i;return n&&a>=this.bottomThreshold||!n&&a>this.topThreshold?this.virtualization.itemOffset(i+1):s},calculateHeights(){this.dom.didCalculate&&(this.itemHeight=this.dom.itemHeight,this.listHeight=this.dom.timeListHeight,this.topOffset=(this.listHeight-this.itemHeight)/2,this.bottomOffset=this.listHeight-this.itemHeight,this.topThreshold=.05*this.itemHeight,this.bottomThreshold=.95*this.itemHeight)},configureServices(e){let{min:t,max:i,value:s}=e||this.$props;const[a,n]=this.service.limitRange(t||this.$props.min,i||this.$props.max,s||this.$props.value);this.service.configure(this.serviceSettings({min:a,max:n}))},serviceSettings(e){const t={boundRange:this.$props.boundRange,insertUndividedMax:!1,min:s.cloneDate(this.$props.min),max:s.cloneDate(this.$props.max),part:this.$props.part,step:this.$props.step},i=Object.assign({},t,e);return i.boundRange="hour"!==i.part.type||this.$props.boundRange,i},handleScrollAction({target:e,animationInProgress:t}){if(this.virtualization&&e&&!t){this.animateToIndex=!1;const t=this.virtualization.itemIndex(this.itemOffset(e.scrollTop)),i=this.service.data(this.$props.value)[t];this.handleChange(i)}},handleFocus(e){this.$emit("focus",e)},handleBlur(e){this.$emit("blur",e)},handleMouseOver(){this.$el&&i.canUseDOM&&document.activeElement!==this.$el&&this.$el.focus({preventScroll:!0})},handleKeyDown(e){const{keyCode:t}=e;(t===i.Keys.down||t===i.Keys.up||t===i.Keys.end||t===i.Keys.home)&&e.preventDefault();const s=(_t[e.keyCode]||i.noop)(this.service.data(this.$props.value),this.service.selectedIndex(this.$props.value));s&&this.handleChange(s)},handleChange(e){const t=this.service.apply(this.$props.value,e.value);this.$props.value.getTime()!==t.getTime()&&(this.currentValue=t,this.$emit("change",t))}}});function Nt(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const Ot=new RegExp(`${Te}|${Re}|${Ne}|${_e}|literal`);let Bt=function(e){return e[e.Left=0]="Left",e[e.Right=1]="Right",e}({});const Lt=t.defineComponent({name:"KendoTimePart",props:{cancelButton:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},format:{type:[String,Object],default:function(){return"hh:mm a"}},max:{type:Date,default:function(){return $}},min:{type:Date,default:function(){return w}},nowButton:{type:Boolean,default:!0},steps:{type:Object,default:function(){return{}}},smoothScroll:{type:Boolean,default:!0},tabIndex:Number,value:{type:Date,default:function(){return null}},boundRange:{type:Boolean,default:!1}},emits:{change:e=>!0,focus:e=>!0,blur:e=>!0,nowclick:e=>!0},created(){this.timeLists=[],this.snapTime=Ae(Ee(this.$props.steps,this.$props.min)),this.activeListIndex=-1,this.hasActiveButton=this.hasActiveButton.bind(this)},inject:{kendoIntlService:{default:null},kendoLocalizationService:{default:null}},data:()=>({activeListIndex:null}),computed:{element(){return this._element},computedValue(){return((e,t,i)=>{if(!e||!t||!i)return e;const{candidateValue:s,minValue:a,maxValue:n}=Ke(e,t,i);return s<a?y(e,t):s>n?y(e,i):e})(this.snapTime(s.cloneDate(this.$props.value||g)),this.computedMin,this.computedMax)},intl(){return a.provideIntlService(this)},computedMin(){return this.snapTime(this.$props.min)},computedMax(){return this.snapTime(this.$props.max)}},mounted(){this._nowButton=this.$refs.nowButton,this.dateFormatParts.forEach(((e,t)=>{"literal"!==e.type&&this.timeLists.push(this.$refs["timeList"+t])}))},setup:()=>({kendoIntlService:t.inject("kendoIntlService",{}),kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){let e;const{format:s,smoothScroll:o,disabled:r}=this.$props;this.snapTime=Ae(Ee(this.$props.steps,this.computedMin)),this.dateFormatParts=this.intl.splitDateFormat(s).filter(this.timeFormatFilter);const l=i.classNames({"k-disabled":r},"k-time-part"),h=a.provideLocalizationService(this),u=h.toLanguageString(ue,$e[ue]);return t.createVNode("div",{class:l},[t.createVNode("div",{class:"k-time-header"},[t.createVNode("span",{class:"k-title"},[this.intl.formatDate(this.computedValue,this.dateFormatParts.reduce(this.timeFormatReducer,""))]),this.showNowButton()&&t.createVNode(n.Button,{type:"button",ref:"nowButton",fillMode:"flat",class:"k-time-now",title:u,"aria-label":u,onClick:this.onNowClick,tabIndex:r?-1:0},Nt(e=h.toLanguageString(he,$e[he]))?e:{default:()=>[e]})]),t.createVNode("div",{class:"k-time-list-container",onKeydown:this.handleKeyDown},[t.createVNode("span",{class:"k-time-highlight"},null),this.dateFormatParts.map((function(e,s){return"literal"!==e.type?t.createVNode("div",{key:s,class:i.classNames("k-time-list-wrapper",{"k-focus":s===this.activeListIndex}),role:"presentation",tabindex:-1},[t.createVNode("span",{class:"k-title",onMousedown:e=>{e.preventDefault()}},[this.intl.dateFieldName(e)]),t.createVNode(Rt,{min:this.computedMin,max:this.computedMax,boundRange:this.$props.boundRange,part:e,step:e.type?this.$props.steps[e.type]:1,smoothScroll:o,ref:"timeList"+s,id:s,onFocus:e=>{this.handleListFocus(e,s)},onBlur:this.handleListBlur,onChange:this.handleChange,value:this.computedValue,disabled:r},null)]):t.createVNode("div",{key:s,class:"k-time-separator"},[e.pattern])}),this)])])},methods:{onNowClick(e){this.$emit("nowclick",e)},focus(e){this.$nextTick((()=>{const t=this.timeLists[0];!this.hasActiveButton()&&t&&t.$el&&t.focus(e)}))},timeFormatReducer:(e,t)=>e+t.pattern,timeFormatFilter(e,t,i){const s=t>=1&&i[t-1];return s&&s&&"literal"===e.type?Ot.test(s.type||""):Ot.test(e.type||"")},hasActiveButton(){return i.canUseDOM&&this._nowButton&&document.activeElement===this._nowButton.$el},focusList(e){this.timeLists.length&&this.timeLists.reduce(this.listReducer,[]).map((t=>e===Bt.Right?t.next:t.prev)).map((e=>e&&e.$el&&e.$el.focus({preventScroll:!0})))},listReducer(e,t,i,s){return e.length||t.$props.id!==this.activeListIndex?e:[{next:s[i+1]||t,prev:s[i-1]||t}]},showNowButton(){return!this.hasSteps()&&this.$props.nowButton&&Ye(ze(),this.computedMin,this.computedMax)},hasSteps(){const e=Object.keys(this.$props.steps);return e.length!==e.reduce(((e,t)=>e+this.$props.steps[t]),0)},handleKeyDown(e){const{keyCode:t}=e;switch(t){case i.Keys.left:return e.preventDefault(),void this.focusList(Bt.Left);case i.Keys.right:return e.preventDefault(),void this.focusList(Bt.Right);default:return}},handleListBlur(e){this.$emit("blur",e)},handleListFocus(e,t){this.$emit("focus",e),this.activeListIndex=t},handleChange(e){this.$emit("change",e)}}});function Et(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const At=t.defineComponent({name:"KendoTimeSelector",emits:{change:e=>!0,focus:e=>!0,blur:e=>!0,keydown:e=>!0,reject:e=>!0},props:{cancelButton:{type:Boolean,default:!0},boundRange:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},format:{type:[String,Object],default:function(){return"t"}},max:{type:Date,default:function(){return $}},min:{type:Date,default:function(){return w}},nowButton:Boolean,steps:{type:Object,default:function(){return{}}},smoothScroll:{type:Boolean,default:!0},tabIndex:Number,value:{type:Date,default:function(){return null}},onChange:Function,onReject:Function,onKeydown:Function},created(){this.dateFormatParts=this.intl.splitDateFormat(this.$props.format),this.mergeValue=(e=>(t,i)=>(t.setHours(...e.map((e=>e(t,i)))),t))(Le(this.dateFormatParts)),this.hasActiveButton=this.hasActiveButton.bind(this),this.currentState=this.$props.value||g,this.currentValue=this.$props.value},inject:{kendoIntlService:{default:null},kendoLocalizationService:{default:null}},data:()=>({currentState:null,currentValue:null,valueDuringOnChange:void 0}),computed:{computedValue(){const e=void 0!==this.valueDuringOnChange?this.valueDuringOnChange:null!==this.$props.value?this.$props.value:this.currentValue;return null!==e?s.cloneDate(e):null},intl(){return a.provideIntlService(this)},current(){return null!==this.currentState?s.cloneDate(this.currentState):null}},mounted(){this.timePart=this.$refs.timePart,this._acceptButton=this.$refs.acceptButton,this._cancelButton=this.$refs.cancelButton},setup:()=>({kendoIntlService:t.inject("kendoIntlService",{}),kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){const{format:e,cancelButton:s,disabled:o,tabIndex:r,smoothScroll:l,min:h,max:u,boundRange:d,nowButton:c,steps:p}=this.$props,m=a.provideLocalizationService(this),g=m.toLanguageString(de,$e[de]),f=m.toLanguageString(ce,$e[ce]);return t.createVNode("div",{tabindex:o?void 0:r||0,class:i.classNames("k-timeselector",{"k-disabled":o}),onKeydown:this.handleKeyDown},[t.createVNode(Lt,{ref:"timePart",value:this.current,onChange:this.handleChange,onNowclick:this.handleNowClick,format:e,smoothScroll:l,min:h,max:u,onFocus:this.handleFocus,onBlur:this.handleBlur,boundRange:d,disabled:o,nowButton:c,steps:p},null),t.createVNode("div",{class:"k-time-footer k-actions k-actions-stretched"},[s&&t.createVNode(n.Button,{type:"button",ref:"cancelButton",class:"k-time-cancel",onClick:this.handleReject,title:g,"aria-label":g},Et(g)?g:{default:()=>[g]}),t.createVNode(n.Button,{type:"button",ref:"acceptButton",themeColor:"primary",class:"k-time-accept",onClick:this.handleAccept,title:f,"aria-label":f},Et(f)?f:{default:()=>[f]})])])},methods:{handleBlur(e){this.$emit("blur",e)},handleFocus(e){this.$emit("focus",e)},focusActiveList(){this.timePart&&this.timePart.focus({preventScroll:!0})},hasActiveButton(){return!!this._acceptButton&&(i.canUseDOM&&(document.activeElement===this._acceptButton.$el||document.activeElement===this._cancelButton.$el))},handleKeyDown(e){const{keyCode:t}=e;this.$emit("keydown",e),t!==i.Keys.enter||this.hasActiveButton()||this.handleAccept(e)},handleAccept(e){const t=this.mergeValue(s.cloneDate(this.computedValue||ze()),this.timePart?this.timePart.computedValue:this.current);this.currentValue=t,this.valueDuringOnChange=t,this.$emit("change",{event:e,value:this.computedValue,target:this}),this.valueDuringOnChange=void 0},handleReject(e){this.currentState=this.computedValue,this.$emit("reject",e)},handleNowClick(e){const t=this.mergeValue(s.cloneDate(this.computedValue||ze()),ze());this.currentState=t,this.currentValue=t,this.valueDuringOnChange=t,this.$emit("change",{event:e,value:this.computedValue,target:this}),this.valueDuringOnChange=void 0},handleChange(e){this.currentState=e}}});function jt(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const Ht=t.defineComponent({name:"KendoTimePicker",emits:{changemodel:e=>!0,"update:modelValue":e=>!0,iconclick:e=>!0,change:e=>!0,focus:e=>!0,blur:e=>!0,keydown:e=>!0,open:e=>!0,close:e=>!0},model:{event:"changemodel"},props:{cancelButton:{type:Boolean,default:!0},nowButton:{type:Boolean,default:void 0},defaultShow:{type:Boolean,default:!1},modelValue:{type:Date,default:void 0},defaultValue:{type:Date,default:function(){return null}},dateInput:{type:[String,Object,Function],default:function(){}},popup:{type:[String,Object,Function],default:function(){}},disabled:{type:Boolean,default:!1},format:{type:[String,Object],default:function(){return"t"}},formatPlaceholder:{type:[String,Object],default:function(){return Me}},rounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].includes(e)}},id:String,ariaLabelledBy:String,ariaDescribedBy:String,min:{type:Date,default:function(){return w}},max:{type:Date,default:function(){return $}},name:String,label:String,placeholder:String,popupSettings:{type:Object,default:function(){return{}}},show:{type:Boolean,default:void 0},tabIndex:{type:Number,default:0},steps:{type:Object,default:function(){return{}}},smoothScroll:{type:Boolean,default:!0},title:{type:String,default:function(){return""}},value:{type:Date,default:function(){}},width:[Number,String],validationMessage:String,required:{type:Boolean,default:!1},validityStyles:{type:Boolean,default:!0},validate:Boolean,valid:{type:Boolean,default:void 0},inputAttributes:Object},created(){this._anchor=i.guid(),this._popupId="popup"+i.guid(),this._element=null,this._wrapper=null,this._dateInput=null,this._timeSelector=null,this.shouldFocusDateInput=!1,this.currentValue=this.$props.defaultValue,this.currentShow=this.$props.defaultShow},inject:{kendoLocalizationService:{default:null}},data:()=>({currentValue:null,currentShow:!1,valueDuringOnChange:void 0,showDuringOnChange:void 0,isFocused:!1}),computed:{timeSelector(){return this._timeSelector},computedValue(){const e=void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.$props.value?this.$props.value:void 0!==this.$props.modelValue?this.$props.modelValue:this.$data.currentValue;return null!==e?s.cloneDate(e):null},computedShow(){return void 0!==this.showDuringOnChange?this.showDuringOnChange:void 0!==this.$props.show?this.$props.show:this.currentShow}},watch:{show:function(e,t){this._oldShow=t},currentShow:function(e,t){this._oldShow=t}},mounted(){this.computedShow&&this.$forceUpdate(),this._dateInput=this.dateInputRef,this._timeSelector=this.$refs.timeSelector,this._wrapper=this.kendoAnchorRef,this._dateInput&&this._dateInput.element()&&this._dateInput.element().setAttribute("aria-haspopup","true")},updated(){this._dateInput=this.dateInputRef,this._timeSelector=this.$refs.timeSelector,this._wrapper=this.kendoAnchorRef,this._timeSelector&&this.computedShow&&!this._oldShow?this._timeSelector.focusActiveList():this._dateInput&&this._dateInput.element()&&!this.computedShow&&this.shouldFocusDateInput&&this._dateInput.element().focus({preventScroll:!0}),this.shouldFocusDateInput=!1},setup:()=>({kendoAnchorRef:t.ref(null),kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){const e=i.getDefaultSlots(this),{disabled:s,tabIndex:h,title:u,id:d,placeholder:c,format:p,formatPlaceholder:m,smoothScroll:g,width:f,name:v,steps:w,cancelButton:$,nowButton:y,validationMessage:D,required:S,validityStyles:b,ariaLabelledBy:k,ariaDescribedBy:V,size:I,rounded:C,fillMode:M,inputAttributes:F}=this.$props,{popupClass:x,appendTo:_,animate:T}=this.$props.popupSettings,R=!this.$props.validityStyles||this.validity().valid;i.classNames("k-picker-wrap",{"k-invalid":!R,"k-disabled":s,"k-focus":this.isFocused});const N=i.classNames("k-group k-reset",x),O=a.provideLocalizationService(this),B=O.toLanguageString(me,$e[me]),L=O.toLanguageString(pe,$e[pe]),E=this.$props.dateInput?i.templateRendering.call(this,this.$props.dateInput,i.getListeners.call(this)):void 0,A=t.createVNode(Ge,{ref:e=>{this.dateInputRef=e},placeholder:c,disabled:s,format:p,formatPlaceholder:m,id:d,size:null,rounded:null,fillMode:null,max:this.normalizeTime(this.$props.max),min:this.normalizeTime(this.$props.min),name:v,onChange:this.handleInputValueChange,required:S,steps:w,tabIndex:this.computedShow?-1:h,title:u,valid:this.validity().valid,validationMessage:D,validityStyles:b,value:this.computedValue&&this.normalizeTime(this.computedValue),ariaHasPopup:"grid",ariaExpanded:this.computedShow,ariaRole:"combobox",ariaControls:this._popupId,inputAttributes:F},jt(e)?e:{default:()=>[e]}),j=t.createVNode(At,{ref:"timeSelector",cancelButton:$,disabled:s,nowButton:y,format:p,min:this.$props.min,max:this.$props.max,steps:w,smoothScroll:g,value:this.computedValue,onChange:this.handleValueChange,onReject:this.handleValueReject,onFocus:this.timeFocus,onBlur:this.timeBlur,onKeydown:this.handleKeyDown},null),H=i.getTemplate.call(this,{h:t.h,template:E,defaultRendering:A,additionalListeners:{change:this.handleInputValueChange}}),P=this.$props.popup?i.templateRendering.call(this,this.$props.popup,i.getListeners.call(this)):void 0,z=t.createVNode(l.Popup,{show:this.computedShow,anchor:this._anchor,class:N,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},appendTo:_,animate:T},jt(j)?j:{default:()=>[j]}),q=i.getTemplate.call(this,{h:t.h,template:P,defaultRendering:z,defaultSlots:j}),K=t.createVNode("div",{class:i.classNames("k-input","k-timepicker",{[`k-input-${i.kendoThemeMaps.sizeMap[I]||I}`]:I,[`k-input-${M}`]:M,[`k-rounded-${i.kendoThemeMaps.roundedMap[C]||C}`]:C,"k-invalid":!R,"k-required":this.required,"k-disabled":this.$props.disabled,"k-focus":this.isFocused}),onKeydown:this.handleKeyDown,style:{width:f},onFocusin:this.handleFocus,onFocusout:this.handleBlur,ref:e=>{this.kendoAnchorRef=e}},[H,t.createVNode(n.Button,{type:"button",tabIndex:-1,icon:"clock",svgIcon:o.clockIcon,onMousedown:this.handleIconMouseDown,onClick:this.handleIconClick,title:L,rounded:null,class:"k-input-button","aria-controls":this._popupId,"aria-label":B},null),q]);return this.$props.label?t.createVNode(r.FloatingLabel,{label:this.$props.label,editorId:d,editorValid:R,editorValue:this.getDateInputText(),editorPlaceholder:this.$props.placeholder,editorDisabled:this.$props.disabled,style:{width:f}},jt(K)?K:{default:()=>[K]}):K},methods:{validity(){const e=this.computedValue&&this.normalizeTime(this.computedValue),t=this.normalizeTime(this.$props.min),i=this.normalizeTime(this.$props.max),s=Ue(e,t,i),a=void 0!==this.$props.validationMessage,n=(!this.$props.required||null!==this.computedValue)&&s,o=void 0!==this.$props.valid?this.$props.valid:n;return{customError:a,rangeOverflow:Ze(e,i),rangeUnderflow:We(e,t),valid:o,valueMissing:null===this.computedValue}},getDateInputText(){return!!this.computedValue||(this._dateInput?this._dateInput._element.value:"")},focus(){this._dateInput&&this._dateInput.focus()},normalizeTime:e=>y(g,e),setShow(e){this.computedShow!==e&&(this.currentShow=e,this.$emit(e?"open":"close",{component:this}))},mergeTime(e){return this.computedValue&&e?y(this.computedValue,e):e},handleInputValueChange(e){const t=this.mergeTime(e.value);this.handleValueChange({...e,value:t})},handleValueChange(e){this.currentValue=s.cloneDate(e.value),this.valueDuringOnChange=e.value,this.showDuringOnChange=!1,this.shouldFocusDateInput=!0,this.$emit("changemodel",this.computedValue),this.$emit("update:modelValue",this.computedValue),this.$emit("change",{event:e.event,value:this.computedValue,show:this.computedShow,component:this,target:{name:this.$props.name,value:this.computedValue,valueAsDate:this.computedValue}}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,this.setShow(!1)},handleFocus(e){this._oldShow=this.computedShow,this.isFocused=!0,this.$emit("focus",{event:e})},handleBlur(e){this.createBlurTimeout(),this.$emit("blur",{event:e})},timeBlur(e){this.$emit("blur",{event:e}),clearTimeout(this._blurTimeout),this.createBlurTimeout()},timeFocus(){clearTimeout(this._blurTimeout)},createBlurTimeout(){this._blurTimeout=setTimeout((()=>{this.isFocused=!1;const e=document.activeElement&&document.activeElement.closest(`#${this._popupId}`);this._dateInput&&i.canUseDOM&&document.activeElement!==this._dateInput.element()&&!e&&this.setShow(!1)}),200)},handleValueReject(e){this.setShow(!1)},handleIconClick(e){this.$props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.computedShow),this.$emit("iconclick",e))},handleIconMouseDown(e){e.preventDefault()},handleKeyDown(e){const{altKey:t,keyCode:s}=e;return s===i.Keys.tab&&this._dateInput&&e.target!==this._dateInput._element?(e.preventDefault(),this.shouldFocusDateInput=!0,void this.setShow(!1)):s===i.Keys.esc?(this.shouldFocusDateInput=!0,void this.setShow(!1)):(t&&(s===i.Keys.up||s===i.Keys.down)&&(e.preventDefault(),e.stopPropagation(),this.shouldFocusDateInput=s===i.Keys.up,this.setShow(s===i.Keys.down)),void this.$emit("keydown",e))}}}),Pt=t.defineComponent({name:"KendoDateRangePicker",emits:{blur:e=>!0,change:e=>!0,changemodel:e=>!0,"update:modelValue":e=>!0,focus:e=>!0,keydown:e=>!0,open:e=>!0,close:e=>!0},inject:{kendoLocalizationService:{default:null}},model:{event:"changemodel"},props:{allowReverse:{type:Boolean,default:!1},calendarSettings:Object,defaultShow:{type:Boolean,default:!1},defaultValue:{type:Object,default:function(){return p}},modelValue:{type:Object,default:void 0},disabled:{type:Boolean,default:!1},popup:[String,Object,Function],calendar:[String,Object,Function],startDateInput:[String,Object,Function],endDateInput:[String,Object,Function],endDateInputSettings:Object,focusedDate:Date,format:{type:[String,Object],default:function(){return"d"}},id:String,ariaLabelledBy:String,ariaDescribedBy:String,max:{type:Date,default:function(){return N}},min:{type:Date,default:function(){return R}},rounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].includes(e)}},popupSettings:{type:Object,default:function(){return{}}},show:{type:Boolean,default:void 0},startDateInputSettings:Object,swapButton:{type:Boolean,default:!1},tabIndex:Number,value:{type:Object,default:function(){}},inputAttributes:Object},created(){this._element=null,this._wrapper=null,this._calendar=null,this._startDateInput=null,this._endDateInput=null,this._popupId=i.guid(),this._anchor=i.guid(),this._startInputId=i.guid(),this._endInputId=i.guid(),this._calendarId=i.guid(),i.validatePackage(h),this.currentShow=this.$props.show||this.$props.defaultShow,this.currentValue=this.$props.value||this.$props.defaultValue,this.initialAnimation=this.currentShow},mounted(){this._calendar=this.calendarRef,this._startDateInput=this.startDateInputRef,this._endDateInput=this.endDateInputRef,this.computedShow&&(this.$forceUpdate(),this.$nextTick((function(){this.initialAnimation=!1})))},updated(){this._calendar=this.calendarRef,this._startDateInput=this.startDateInputRef,this._endDateInput=this.endDateInputRef,this.shouldFocusCalendar&&this.focusCalendarElement(),this.shouldFocusDateInput&&this.focusDateInputElement(),this.shouldFocusCalendar=!1,this.shouldFocusDateInput=!1},data:()=>({currentShow:!1,currentValue:null,valueDuringOnChange:void 0,shouldFocusDateInput:!1,shouldFocusCalendar:!1}),computed:{rootClassName(){return{"k-daterangepicker":!0,"k-disabled":this.$props.disabled}},computedValue(){return(void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.$props.value?this.$props.value:void 0!==this.$props.modelValue?this.$props.modelValue:this.currentValue)||p},computedShow(){return void 0!==this.$props.show?this.$props.show:this.currentShow},swapButtonClass(){const{size:e,rounded:t}=this.$props;return{"k-button":!0,[`k-button-${i.kendoThemeMaps.sizeMap[e]||e}`]:e,"k-button-flat":!0,"k-button-flat-base":!0,"k-icon-button":!0,[`k-rounded-${i.kendoThemeMaps.roundedMap[t]||t}`]:t}}},setup:()=>({kendoAnchorRef:t.ref(null),kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){const e=this.computedValue||p,{size:s,fillMode:n,rounded:r}=this.$props,h=(this.$props.startDateInputSettings||{}).id||this._startInputId,u=(this.$props.endDateInputSettings||{}).id||this._endInputId,d=a.provideLocalizationService(this),c=d.toLanguageString(ne,$e[ne]),m=d.toLanguageString(oe,$e[oe]),g=d.toLanguageString(re,$e[re]),f=this.$props.startDateInput?i.templateRendering.call(this,this.$props.startDateInput,i.getListeners.call(this)):void 0,v={label:c,format:this.$props.format,min:this.min,max:this.max,id:this._startInputId,disabled:this.$props.disabled,valid:this.$props.valid,size:s,fillMode:n,rounded:r,ariaHasPopup:"grid",ariaExpanded:this.computedShow,value:e.start,ariaRole:"combobox",ariaControls:this._popupId,inputAttributes:this.$props.inputAttributes,...this.$props.startDateInputSettings},w=t.h(Ge,{ref:e=>{this.startDateInputRef=e},...v,onChange:this.handleStartChange}),$=i.getTemplate.call(this,{h:t.h,template:f,defaultRendering:w,additionalListeners:{change:this.handleStartChange}}),y=this.$props.endDateInput?i.templateRendering.call(this,this.$props.endDateInput,i.getListeners.call(this)):void 0,D={label:m,format:this.$props.format,min:this.min,max:this.max,id:this._endInputId,size:s,fillMode:n,rounded:r,disabled:this.$props.disabled,valid:this.$props.valid,ariaHasPopup:"grid",ariaExpanded:this.computedShow,value:e.end,ariaRole:"combobox",ariaControls:this._popupId,inputAttributes:this.$props.inputAttributes,...this.$props.endDateInputSettings},S=t.h(Ge,{ref:e=>{this.endDateInputRef=e},...D,onChange:this.handleEndChange}),b=i.getTemplate.call(this,{h:t.h,template:y,defaultRendering:S,additionalListeners:{change:this.handleEndChange}}),k=this.$props.calendar?i.templateRendering.call(this,this.$props.calendar,i.getListeners.call(this)):void 0,V={id:this._calendarId,min:this.min,max:this.max,views:2,allowReverse:this.$props.allowReverse,mode:"range",focusedDate:this.$props.focusedDate,disabled:this.$props.disabled,value:e,...this.$props.calendarSettings},I=t.h(Ie,{ref:e=>{this.calendarRef=e},onKeydown:this.handleKeyDown,onFocus:this.calendarFocus,onBlur:this.calendarBlur,onChange:this.handleCalendarChange,...V}),C=i.getTemplate.call(this,{h:t.h,template:k,defaultRendering:I,additionalListeners:{change:this.handleCalendarChange,keydown:this.handleKeyDown,focus:this.calendarFocus,blur:this.calendarBlur}}),{popupClass:M,animate:F}=this.$props.popupSettings,x=this.$props.popup?i.templateRendering.call(this,this.$props.popup,i.getListeners.call(this)):void 0,_={show:this.computedShow,anchor:this._anchor,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},animate:!this.initialAnimation&&F,...this.$props.popupSettings},T=t.h(l.Popup,{class:M,..._},(function(){return[C]})),R=i.getTemplate.call(this,{h:t.h,template:x,defaultRendering:T,defaultSlots:C}),N=t.createVNode("button",{class:this.swapButtonClass,role:"button",title:a.provideLocalizationService(this).toLanguageString(ae,$e[ae]),onMousedown:this.handleReverseMouseDown,onClick:this.handleReverseClick,"aria-controls":h+" "+u,"aria-label":a.provideLocalizationService(this).toLanguageString(ae,$e[ae])},[t.createVNode(i.Icon,{name:"arrows-swap",icon:o.arrowsSwapIcon,style:{transform:"rotate(90deg)"},class:"k-button-icon"},null)]);return t.createVNode("span",{class:this.rootClassName,style:this.$attrs.style,id:this.$props.id,"aria-labelledby":this.$props.ariaLabelledBy,"aria-describedby":this.$props.ariaDescribedBy,tabindex:this.$props.tabIndex,onFocusin:this.handleFocus,onFocusout:this.handleBlur,onKeydown:this.handleKeyDown,ref:e=>{this.kendoAnchorRef=e}},[$,(this.$props.allowReverse||this.$props.calendarSettings&&this.$props.calendarSettings.allowReverse)&&this.$props.swapButton?N:g,b,R])},methods:{focus(){const e=this.getStartInput();e&&e.focus()},focusCalendarElement(){const e=this.getCalendar();e&&e.focus({preventScroll:!0})},focusDateInputElement(){const e=this.getStartInput(),t=this.getEndInput();!document||!e||!t||(null!==this.computedValue.start&&null===this.computedValue.end||document.activeElement===t?document.activeElement!==e&&t.focus({preventScroll:!0}):e.focus({preventScroll:!0}))},calculateValue:(e,t)=>(void 0!==e.value?e.value:t.currentValue)||p,calculateShow:(e,t)=>void 0!==e.show?e.show:t.currentShow,setShow(e){this.currentShow!==e&&(this.currentShow=e,this.$emit(e?"open":"close",{component:this}))},handleReverseClick(e){const t={start:this.computedValue.end,end:this.computedValue.start},i={event:e.event};this.handleChange(t,i)},handleReverseMouseDown(e){e.preventDefault()},handleFocus(e){this.shouldFocusDateInput||this.setShow(!0),this.$emit("focus",{event:e})},calendarBlur(){clearTimeout(this._blurTimeout),this.createBlurTimeout()},calendarFocus(){clearTimeout(this._blurTimeout)},createBlurTimeout(){this._blurTimeout=setTimeout((()=>{const e=this.getStartInput(),t=this.getEndInput();e&&t&&i.canUseDOM&&e&&document.activeElement!==t&&this.setShow(!1)}),200)},getStartInput(){return this._startDateInput&&this._startDateInput.element?this._startDateInput.element():document.getElementById(this._startInputId)},getEndInput(){return this._endDateInput&&this._endDateInput.element?this._endDateInput.element():document.getElementById(this._endInputId)},getCalendar(){return this._calendar&&this._calendar.element?this._calendar:document.getElementById(this._calendarId)},handleBlur(e){this.createBlurTimeout(),this.$emit("blur",{event:e})},handleEndChange(e){const t={start:this.computedValue.start,end:s.cloneDate(e.value||void 0)};this.handleChange(t,e)},handleStartChange(e){const t={start:s.cloneDate(e.value||void 0),end:this.computedValue.end};this.handleChange(t,e)},extractRangeFromValue(e){if(!(Array.isArray(e.value)||e.value instanceof Date))return e.value||p;const t=Array.isArray(e.value)?e.value[0]:e.value;return{start:null!==this.computedValue.end?t:this.computedValue.start,end:null!==this.computedValue.start?t:this.computedValue.end}},handleCalendarChange(e){const t=this.extractRangeFromValue(e);this.handleChange(t,e)},handleKeyDown(e){const{keyCode:t,altKey:s}=e,a=this.getEndInput(),n=this.getCalendar();t===i.Keys.esc?(e.preventDefault(),this.shouldFocusDateInput=!0,this.setShow(!1)):s&&t===i.Keys.down?(e.preventDefault(),this.shouldFocusCalendar=!0,this.setShow(!0)):t===i.Keys.tab&&this.computedShow&&n&&a&&document&&document.activeElement===a&&(e.preventDefault(),this.focusCalendarElement()),this.$emit("keydown",e)},handleChange(e,t){this.currentValue=e,this.valueDuringOnChange=e;const i={event:t.event,value:this.computedValue,show:this.computedShow,component:this,target:{name:this.$props.name,value:this.computedValue,show:this.computedShow}};this.$emit("changemodel",this.computedValue),this.$emit("update:modelValue",this.computedValue),this.$emit("change",i),this.valueDuringOnChange=void 0}}});function zt(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const qt=t.defineComponent({name:"KendoDateTimeSelector",props:{value:Date,disabled:{type:Boolean,default:!1},cancelButton:{type:Boolean,default:!0},min:{type:Date,default:f},max:{type:Date,default:v},maxTime:{type:Date,default:function(){return i.cloneDate($)}},minTime:{type:Date,default:function(){return i.cloneDate(w)}},weekNumber:{type:Boolean,default:!1},steps:{type:Object,default:function(){return{}}},focusedDate:Date,format:[String,Object],calendar:Object,onChange:Function,onReject:Function,onFocus:Function,onBlur:Function,onKeydown:Function},created(){this._calendarWrap=null,this.currentTab="date",this.dateValue=this.$props.value,this.timeValue=this.$props.value||T},inject:{kendoLocalizationService:{default:null}},data:()=>({currentTab:null,dateValue:null,timeValue:Date}),computed:{hasDateValue(){return null!==this.dateValue},computedMinTime(){return void 0!==this.$props.minTime?this.$props.minTime:this.normalizeRange(this.$props.min,this.dateValue)},computedMaxTime(){return void 0!==this.$props.maxTime?this.$props.maxTime:this.normalizeRange(this.$props.max,this.dateValue)}},mounted(){this._acceptButton=this.$refs.acceptButton,this._calendar=this.$refs.calendar,this._calendarWrap=this.$refs.calendarWrap,this._cancelButton=this.$refs.cancelButton,this._timePart=this.$refs.timePart,this.focus({preventScroll:!0})},updated(){this.shouldFocusPart&&this.focus({preventScroll:!0}),this.shouldFocusPart=!1},setup:()=>({kendoAnchorRef:t.ref(null),kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){const{disabled:e,cancelButton:s,min:o,max:r,weekNumber:l,focusedDate:h,format:u,steps:d}=this.$props,c=i.classNames({"k-date-tab":"date"===this.currentTab,"k-time-tab":"time"===this.currentTab,"k-disabled":e},"k-datetime-wrap"),p=a.provideLocalizationService(this),m=p.toLanguageString(ge,$e[ge]),g=p.toLanguageString(fe,$e[fe]),f=p.toLanguageString(ve,$e[ve]),v=p.toLanguageString(we,$e[we]),y=t.createVNode(Ie,{ref:"calendar",min:o,max:r,weekNumber:l,focusedDate:h,disabled:e||"date"!==this.currentTab,value:this.dateValue,onChange:this.handleCalendarValueChange,onFocus:this.handleFocus,onBlur:this.handleBlur},null),D=i.getTemplate.call(this,{h:t.h,template:this.$props.calendar,defaultRendering:y});return t.createVNode("div",{onKeydown:this.handleKeyDown,class:c,tabindex:-1},[t.createVNode("div",{class:"k-datetime-buttongroup"},[t.createVNode(n.ButtonGroup,{width:"100%"},{default:()=>[t.createVNode(n.Button,{type:"button",selected:"date"===this.currentTab,togglable:!0,onClick:this.handleDateClick},zt(m)?m:{default:()=>[m]}),t.createVNode(n.Button,{type:"button",selected:"time"===this.currentTab,togglable:!0,onClick:this.handleTimeClick},zt(g)?g:{default:()=>[g]})]})]),t.createVNode("div",{class:"k-datetime-selector"},[t.createVNode("div",{class:"k-datetime-calendar-wrap",ref:"calendarWrap"},[D]),t.createVNode("div",{class:"k-datetime-time-wrap"},[t.createVNode(Lt,{key:1,onNowclick:this.handleNowClick,disabled:e||"time"!==this.currentTab,ref:"timePart",min:this.computedMinTime||w,max:this.computedMaxTime||$,value:this.timeValue,format:u,steps:d,onChange:this.handleTimeListContainerChange,onFocus:this.handleFocus,onBlur:this.handleBlur},null)])]),t.createVNode("div",{class:"k-datetime-footer k-actions k-actions-stretched"},[s&&t.createVNode(n.Button,{type:"button",ref:"cancelButton",class:"k-time-cancel",onClick:this.handleReject,title:f,"aria-label":f},zt(f)?f:{default:()=>[f]}),t.createVNode(n.Button,{type:"button",ref:"acceptButton",disabled:!this.hasDateValue,themeColor:"primary",class:"k-time-accept",onClick:this.handleAccept,title:v,"aria-label":v},zt(v)?v:{default:()=>[v]})])])},methods:{handleBlur(e){this.$emit("blur",e)},handleFocus(e){this.$emit("focus",e)},focus(e){this.$nextTick((()=>{"time"===this.currentTab&&this._timePart&&this._timePart.focus(e);const t=this.calendarElement();"date"===this.currentTab&&t&&t.focus(e)}))},calendarElement(){return this._calendar&&this._calendar.$el?this._calendar:null},normalizeRange:(e,t)=>s.isEqualDate(e,t||D())?e:null,hasActiveButton(){return!!this._acceptButton&&(i.canUseDOM&&(document.activeElement===this._acceptButton.$el||document.activeElement===this._cancelButton.$el))},mergeTime:(e,t)=>e&&t?y(t,e):t,mergeDate:(e,t)=>e?y(e||D(),t):t,move(e){if("right"===e&&"time"===this.currentTab||"left"===e&&"date"===this.currentTab)return;const t="left"===e?"date":"time";this.shouldFocusPart=!0,this.currentTab=t},handleReject(e){this.dateValue=this.$props.value,this.timeValue=this.$props.value||T;const t={event:e,target:this,value:this.mergeDate(this.$props.value,this.$props.value||T)};this.$emit("reject",t)},handleAccept(e,t){if(!this.dateValue||!this.timeValue||!this.hasDateValue)return;const i=this.mergeDate(this.dateValue,t||this.timeValue);this.$emit("change",{event:e,value:i,target:this})},handleNowClick(e){this.timeValue=ze(),this.handleAccept(e,ze())},handleCalendarValueChange(e){e.event.stopPropagation(),this.dateValue=e.value,this.currentTab="time",this.shouldFocusPart=!0},handleTimeListContainerChange(e){this.timeValue=e},handleDateClick(e){e.stopPropagation(),this.move("left")},handleTimeClick(e){e.stopPropagation(),this.move("right")},handleKeyDown(e){const{keyCode:t,altKey:s}=e;switch(this.$emit("keydown",e),t){case i.Keys.enter:return void(!this.hasActiveButton()&&this.hasDateValue&&this.handleAccept(e));case i.Keys.left:if(!s)return;return void this.move("left");case i.Keys.right:if(!s)return;return void this.move("right");default:return}},handleTimePartMount(e){this.timeValue=e}}});function Kt(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const Yt=t.defineComponent({name:"KendoDateTimePicker",emits:{changemodel:e=>!0,"update:modelValue":e=>!0,iconclick:e=>!0,change:e=>!0,focus:e=>!0,blur:e=>!0,keydown:e=>!0,open:e=>!0,close:e=>!0},props:{modelValue:{type:Date,default:void 0},defaultShow:{type:Boolean,default:!1},defaultValue:{type:Date,default:null},disabled:{type:Boolean,default:!1},dateInput:{type:[String,Object,Function],default:function(){}},popup:{type:[String,Object,Function],default:function(){}},calendar:{type:[String,Object,Function],default:function(){}},focusedDate:Date,format:{type:[String,Object],default:function(){return"g"}},formatPlaceholder:{type:[String,Object],default:function(){return Me}},rounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].includes(e)}},id:String,ariaLabelledBy:String,ariaDescribedBy:String,min:{type:Date,default:function(){return f}},max:{type:Date,default:function(){return v}},maxTime:{type:Date,default:function(){return s.cloneDate($)}},minTime:{type:Date,default:function(){return s.cloneDate(O)}},name:String,label:String,placeholder:String,popupSettings:{type:Object,default:function(){return{}}},show:{type:Boolean,default:void 0},tabIndex:{type:Number,default:0},title:{type:String,default:function(){return""}},steps:{type:Object,default:function(){return{}}},value:Date,weekNumber:{type:Boolean,default:!1},width:String,validationMessage:String,required:{type:Boolean,default:!1},validityStyles:{type:Boolean,default:!0},validate:Boolean,valid:{type:Boolean,default:void 0},cancelButton:{type:Boolean,default:!0},inputAttributes:Object},model:{event:"changemodel"},created(){this._anchor=i.guid(),this._popupId="popup"+i.guid(),this._wrapper=null,this._dateInput=null,this._dateTimeSelector=null,i.validatePackage(h),this.currentValue=this.$props.defaultValue,this.currentShow=this.$props.defaultShow},inject:{kendoLocalizationService:{default:null}},data:()=>({currentValue:null,currentShow:!1,valueDuringOnChange:void 0,showDuringOnChange:void 0,shouldFocusDateInput:!1,isFocused:!1}),computed:{computedValue(){const e=void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.$props.value?this.$props.value:void 0!==this.$props.modelValue?this.$props.modelValue:this.$data.currentValue;return null!==e?s.cloneDate(e):null},computedShow(){return void 0!==this.showDuringOnChange?this.showDuringOnChange:void 0!==this.$props.show?this.$props.show:this.currentShow}},watch:{show:function(e,t){this._oldShow=t},currentShow:function(e,t){this._oldShow=t}},mounted(){this.computedShow&&this.$forceUpdate();const e=this.dateInputElement();this._dateTimeSelector=this.$refs.dateTimeSelector,this._wrapper=this.kendoAnchorRef,this._dateInput=this.dateInputRef,e&&e.setAttribute("aria-haspopup","true")},updated(){const e=this.dateInputElement();this._dateTimeSelector=this.$refs.dateTimeSelector,this._wrapper=this.kendoAnchorRef,this._dateTimeSelector&&this.computedShow&&!this._oldShow&&this._dateTimeSelector.focus({preventScroll:!0}),e&&!this.computedShow&&this.shouldFocusDateInput&&this._dateInput.focus({preventScroll:!0}),this.shouldFocusDateInput=!1},setup:()=>({kendoAnchorRef:t.ref(null),kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){const e=i.getDefaultSlots(this),{disabled:s,tabIndex:h,title:u,id:d,format:c,formatPlaceholder:p,min:m,max:g,weekNumber:f,focusedDate:v,width:w,name:$,steps:y,placeholder:D,validationMessage:S,required:b,validityStyles:k,cancelButton:V,minTime:I,maxTime:C,ariaLabelledBy:M,ariaDescribedBy:F,size:x,fillMode:_,rounded:T,inputAttributes:R}=this.$props,{popupClass:N,appendTo:O,animate:B}=this.$props.popupSettings,L=!this.$props.validityStyles||this.validity().valid,E=this.$props.dateInput?i.templateRendering.call(this,this.$props.dateInput,i.getListeners.call(this)):void 0,A=t.createVNode(Ge,{ref:e=>{this.dateInputRef=e},placeholder:D,disabled:s,format:c,formatPlaceholder:p,id:d,max:g,min:m,minTime:I,maxTime:C,name:$,size:null,rounded:null,fillMode:null,onChange:this.handleValueChange,required:b,steps:y,tabIndex:this.computedShow?-1:h,title:u,valid:this.validity().valid,validationMessage:S,validityStyles:k,value:this.computedValue,ariaHasPopup:"dialog",ariaExpanded:this.computedShow,ariaRole:"combobox",ariaControls:this._popupId,inputAttributes:R},Kt(e)?e:{default:()=>[e]}),j=i.getTemplate.call(this,{h:t.h,template:E,defaultRendering:A}),H=this.$props.calendar?i.templateRendering.call(this,this.$props.calendar,i.getListeners.call(this)):void 0,P=t.createVNode(qt,{ref:"dateTimeSelector",cancelButton:V,value:this.computedValue,onChange:this.handleValueChange,onReject:this.handleReject,disabled:s,weekNumber:f,min:this.$props.min,max:this.$props.max,minTime:I,maxTime:C,focusedDate:v,format:c,calendar:H,steps:y,onFocus:this.timeSelectorFocus,onBlur:this.timeSelectorBlur,onKeydown:this.handleKeyDown},null),z=i.classNames("k-datetime-container k-reset",N),q=this.$props.popup?i.templateRendering.call(this,this.$props.popup,i.getListeners.call(this)):void 0,K=t.createVNode(l.Popup,{show:this.computedShow,anchor:this._anchor,popupClass:z,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},appendTo:O,animate:B},Kt(P)?P:{default:()=>[P]}),Y=i.getTemplate.call(this,{h:t.h,template:q,defaultRendering:K,defaultSlots:P}),U=t.createVNode("div",{class:i.classNames("k-input","k-datetimepicker",{[`k-input-${i.kendoThemeMaps.sizeMap[x]||x}`]:x,[`k-input-${_}`]:_,[`k-rounded-${i.kendoThemeMaps.roundedMap[T]||T}`]:T,"k-invalid":!L,"k-required":this.required,"k-disabled":this.$props.disabled}),ref:e=>{this.kendoAnchorRef=e},onKeydown:this.handleKeyDown,style:{width:w},onFocusin:this.handleFocus,onFocusout:this.handleBlur},[j,t.createVNode(n.Button,{type:"button",tabIndex:-1,icon:"calendar",svgIcon:o.calendarIcon,onMousedown:this.handleIconMouseDown,onClick:this.handleDateIconClick,title:a.provideLocalizationService(this).toLanguageString(le,$e[le]),rounded:null,class:"k-input-button","aria-controls":this._popupId,"aria-label":a.provideLocalizationService(this).toLanguageString(le,$e[le])},null),Y]);return this.$props.label?t.createVNode(r.FloatingLabel,{label:this.$props.label,editorId:d,editorValid:L,editorValue:this.getDateInputText(),editorPlaceholder:this.$props.placeholder,editorDisabled:this.$props.disabled,style:{width:w}},Kt(U)?U:{default:()=>[U]}):U},methods:{validity(){const e=b(this.computedValue,this.$props.min,this.$props.max)&&Ye(this.computedValue,this.$props.minTime||O,this.$props.maxTime||$),t=void 0!==this.$props.validationMessage,i=(!this.$props.required||null!==this.computedValue)&&e,s=void 0!==this.$props.valid?this.$props.valid:i;return{customError:t,rangeOverflow:this.computedValue&&this.$props.max.getTime()<this.computedValue.getTime()||!1,rangeUnderflow:this.computedValue&&this.computedValue.getTime()<this.$props.min.getTime()||!1,valid:s,valueMissing:null===this.computedValue}},getDateInputText(){return!!this.computedValue||(this._dateInput?this._dateInput._element.value:"")},focus(){const e=this.dateInputElement();e&&e.focus()},setShow(e){this.computedShow!==e&&(this.currentShow=e,this.$emit(e?"open":"close",{component:this}))},handleReject(){this.setShow(!1)},handleValueChange(e){this.currentValue=s.cloneDate(e.value||void 0),this.valueDuringOnChange=e.value,this.showDuringOnChange=!1,this.shouldFocusDateInput=!0,this.$emit("changemodel",this.computedValue),this.$emit("update:modelValue",this.computedValue),this.$emit("change",{event:e.event,value:this.computedValue,show:this.computedShow,component:this,target:{name:this.$props.name,value:this.computedValue,valueAsDate:this.computedValue}}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,this.setShow(!1)},handleFocus(e){this.isFocused=!0,this.$emit("focus",{event:e})},handleBlur(e){this.createBlurTimeout(),this.$emit("blur",{event:e})},timeSelectorBlur(e){this.$emit("blur",{event:e}),clearTimeout(this._blurTimeout),this.createBlurTimeout()},timeSelectorFocus(){clearTimeout(this._blurTimeout)},createBlurTimeout(){this._blurTimeout=setTimeout((()=>{this.isFocused=!1;const e=document.activeElement&&document.activeElement.closest(`#${this._popupId}`);this._dateInput&&i.canUseDOM&&document.activeElement!==this._dateInput.element()&&!e&&this.setShow(!1)}),200)},handleDateIconClick(e){this.$props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.computedShow),this.$emit("iconclick",e))},handleIconMouseDown(e){e.preventDefault()},handleKeyDown(e){const{altKey:t,keyCode:s}=e;return s===i.Keys.tab&&this._dateInput&&e.target!==this._dateInput._element?(e.preventDefault(),this.$data.shouldFocusDateInput=!0,void this.setShow(!1)):s===i.Keys.esc?(this.shouldFocusDateInput=!0,void this.setShow(!1)):(t&&(s===i.Keys.up||s===i.Keys.down)&&(e.preventDefault(),e.stopPropagation(),this.shouldFocusDateInput=s===i.Keys.up,this.setShow(s===i.Keys.down)),void this.$emit("keydown",e))},dateInputElement(){return this._dateInput&&this._dateInput.$el||this._wrapper&&this._wrapper.querySelector(".k-dateinput-wrap > input.k-input")}}}),Ut=t.defineComponent({props:{id:String},render(){const e=i.getDefaultSlots(this);return t.createVNode("span",{id:this.$props.id,class:"k-picker-wrap"},[e])}});e.Calendar=Ie,e.CalendarCell=u,e.CalendarHeaderTitle=J,e.CalendarViewEnum=c,e.CalendarWeekCell=d,e.DateInput=Ge,e.DatePicker=Xe,e.DateRangePicker=Pt,e.DateTimePicker=Yt,e.PickerWrap=Ut,e.TimePicker=Ht,e.ToggleButton=Je}));
15
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-common"),require("@progress/kendo-date-math"),require("@progress/kendo-vue-intl"),require("@progress/kendo-vue-buttons"),require("@progress/kendo-svg-icons"),require("@progress/kendo-vue-labels"),require("@progress/kendo-vue-popup")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-common","@progress/kendo-date-math","@progress/kendo-vue-intl","@progress/kendo-vue-buttons","@progress/kendo-svg-icons","@progress/kendo-vue-labels","@progress/kendo-vue-popup"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueDateinputs={},e.Vue,e.KendoVueCommon,e.KendoDateMath,e.KendoVueIntl,e.KendoVueButtons,e.KendoSVGIcons,e.KendoVueLabels,e.KendoVuePopup)}(this,(function(e,t,i,s,a,n,o,r,l){"use strict";const h={name:"@progress/kendo-vue-dateinputs",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1641551183,version:"7.0.3-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"},u=t.defineComponent({name:"KendoCalendarCell",emits:{click:e=>!0,mousedown:e=>!0,mouseenter:e=>!0,mouseleave:e=>!0},props:{isDisabled:Boolean,view:Number,formattedValue:String,id:String,isWeekend:Boolean,isFocused:Boolean,isSelected:Boolean,isInRange:Boolean,isRangeStart:Boolean,isRangeEnd:Boolean,isRangeMid:Boolean,isRangeSplitEnd:Boolean,isRangeSplitStart:Boolean,isToday:Boolean,title:String,value:Date},updated(){},render(){const e=i.getDefaultSlots(this),{formattedValue:s,isWeekend:a,isFocused:n,isInRange:o,isSelected:r,isRangeStart:l,isRangeMid:h,isRangeEnd:u,isRangeSplitStart:d,isRangeSplitEnd:c,isToday:p,isDisabled:m,view:g,value:f}=this.$props,v="end"===this.$props.activeRangeEnd&&u,w="start"===this.$props.activeRangeEnd&&l;return t.createVNode("td",{id:this.$props.id,title:this.$props.title,class:{"k-calendar-td":!0,"k-range-end":u,"k-range-mid":h,"k-range-split-end":c,"k-range-split-start":d,"k-range-start":l,"k-active":w||v,"k-focus":n,"k-selected":r||l||u,"k-today":p,"k-weekend":a,"k-disabled":m},onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave},[t.createVNode("span",{class:"k-link"},[e])])},methods:{handleClick(e){const{value:t}=this.$props;this.$emit("click",t,e)},handleMouseDown(e){const{value:t}=this.$props;this.$emit("mousedown",t,e)},handleMouseEnter(){const{value:e}=this.$props;this.$emit("mouseenter",e)},handleMouseLeave(){const{value:e}=this.$props;this.$emit("mouseleave",e)}}}),d=t.defineComponent({props:{id:String,value:Number,className:String},emits:{click:e=>!0},render(){const e=i.getDefaultSlots(this);return t.createVNode("td",{onClick:this.handleClick,id:this.$props.id},[void 0!==this.$props.value?this.$props.value:e])},methods:{handleClick(e){const{value:t}=this.$props;this.$emit("click",t,e)}}});var c=(e=>(e[e.month=0]="month",e[e.year=1]="year",e[e.decade=2]="decade",e[e.century=3]="century",e))(c||{});const p={start:null,end:null},m=(e,t,i)=>void 0===t||void 0===i||t<=e&&e<=i?e:e<t?t:i,g=new Date(1980,0,1),f=new Date(1900,0,1),v=new Date(2099,11,31),w=new Date(1980,0,1),$=new Date(1980,0,1,23,59,59),y=(e,t)=>{const i=s.cloneDate(e);return i.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),i},D=()=>s.getDate(new Date),S=(e,t,i)=>!e||!(t&&t>e||i&&i<e),b=(e,t,i)=>null===e||!(t&&s.getDate(t)>s.getDate(e)||i&&s.getDate(i)<s.getDate(e)),k=(e,t)=>{const{start:i,end:s}=t||p;return!(!i||!s)&&(i<e&&e<s)},V=(e,t,i=1)=>{const s=[];for(let a=e;a<t;a+=i)s.push(a);return s},I=(e,t)=>e.slice(t).concat(e.slice(0,t)),C=(e,t,i)=>e&&(t&&e<t?s.cloneDate(t):i&&e>i?s.cloneDate(i):e),M=e=>(t,i="",s={})=>{const a=document.createElement(e);return a.className=i,Object.keys(s).map((e=>a.style[e]=s[e])),"string"==typeof t?a.innerHTML=t||"":(t||[]).forEach((e=>e&&a.appendChild(e))),a};let F=class{constructor(e){this.intl=e}getWeekNames(e=!1){const t=I(this.intl.dateFormatNames({nameType:"short",type:"days"}),this.intl.firstDay());return e?[""].concat(t):t}};const x=t.defineComponent({name:"KendoView",inject:{kendoIntlService:{default:null}},props:{activeRangeEnd:{type:String},activeView:{type:Number,required:!0},cell:[String,Function,Object],cellUID:{type:String,required:!0},direction:{type:String,default:"vertical"},isActive:{type:Boolean,default:void 0},focusedDate:{type:Date,required:!0},max:{type:Date,required:!0},min:{type:Date,required:!0},selectedDate:{type:[Date,Array,Object],default:function(){return D()}},selectionRange:Object,showWeekNumbers:{type:Boolean,default:!1},viewDate:{type:Date,required:!0},weekCell:[String,Function,Object],bus:Object,service:Object,onChange:Function,onWeekcellclick:Function,onCellenter:Function,onViewmousedown:Function},computed:{isHorizontal(){return"horizontal"===this.$props.direction},isMonthView(){return this.$props.activeView===c.month},weekNumber(){return!(!this.$props.showWeekNumbers||this.$props.activeView!==c.month)}},methods:{getWeekNumber(e){return this.weekNumber?s.weekInYear(e,this._intl.firstDay()):null},firstDate(e){const t=this.firstWeekDateContext(e);return t?t.value:null},firstWeekDateContext(e){if(!this.weekNumber)return null;let t=0,i=e[t];for(;!i&&t<e.length;)i=e[++t];return i},handleClick(e,t){const i={value:s.cloneDate(e),target:this,event:t};this.$emit("change",i)},handleWeekCellClick(e,t){const i={value:e,event:t};this.$emit("weekcellclick",i)},handleMouseDown(e,t){const i={value:s.cloneDate(e),target:this,event:t};this.$emit("viewmousedown",i)},handleMouseEnter(e){this.$emit("cellenter",s.cloneDate(e))},handleMouseLeave(e){this.$emit("cellleave",s.cloneDate(e))}},setup:()=>({kendoIntlService:t.inject("kendoIntlService",{})}),render(){this._intl=a.provideIntlService(this),this._weekService=new F(this._intl);const e=e=>t.createVNode("td",{key:e,class:"k-calendar-td k-empty"},[t.createTextVNode(" ")]),s=D(),n=this.$props.isActive?this.$props.focusedDate:null,o=y(this.$props.viewDate,s),r=this.$props.service.data({cellUID:this.$props.cellUID,min:this.$props.min,max:this.$props.max,focusedDate:n,isActiveView:!this.$props.bus.canMoveDown(this.$props.activeView),selectedDate:this.$props.selectedDate,selectionRange:this.$props.selectionRange,viewDate:o}),l=function(s,a){if(!this.firstDate(s))return e(`week-cell-${a}`);const n=this.getWeekNumber(this.firstDate(s)),o=`kendo-vue-calendar-week-cell-${n}`,r=t.createVNode(d,{class:"k-calendar-td k-alt",value:n,onClick:this.handleWeekCellClick,key:o},function(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}(n)?n:{default:()=>[n]});return i.getTemplate.call(this,{h:t.h,template:this.$props.weekCell,defaultRendering:r,defaultSlots:n,additionalListeners:{click:this.handleWeekCellClick},additionalProps:{value:n,key:o}})},h=function(s){return s.map((function(s,a){if(!s)return e(a);const n=`kendo-vue-calendar-cell-${s.value.getTime()}`,o=t.createVNode(u,{"aria-selected":s.isSelected,formattedValue:s.formattedValue,id:s.id,isFocused:s.isFocused,isSelected:s.isSelected,isInRange:s.isInRange,isWeekend:s.isWeekend,isRangeStart:s.isRangeStart,isRangeMid:s.isRangeMid,isRangeEnd:s.isRangeEnd,isRangeSplitStart:s.isRangeSplitStart,isRangeSplitEnd:s.isRangeSplitEnd,isToday:s.isToday,title:s.title,value:s.value,isDisabled:!s.isInRange,view:this.$props.activeView,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,key:n},{default:()=>[s.formattedValue]});return i.getTemplate.call(this,{h:t.h,template:this.$props.cell,defaultRendering:o,defaultSlots:s.formattedValue,additionalListeners:{click:this.handleClick,mousedown:this.handleMouseDown,mouseenter:this.handleMouseEnter,mouseleave:this.handleMouseLeave},additionalProps:{formattedValue:s.formattedValue,id:s.id,isFocused:s.isFocused,isSelected:s.isSelected,isInRange:s.isInRange,isWeekend:s.isWeekend,isRangeStart:s.isRangeStart,isRangeMid:s.isRangeMid,isRangeEnd:s.isRangeEnd,isRangeSplitStart:s.isRangeSplitStart,isRangeSplitEnd:s.isRangeSplitEnd,isToday:s.isToday,title:s.title,value:s.value,isDisabled:!s.isInRange,view:this.$props.activeView,key:n}})}),this)};return t.createVNode("tbody",{class:"k-calendar-tbody",role:"rowgroup"},[r.map((function(e,i){return t.createVNode("tr",{class:"k-calendar-tr",role:"row",key:i},[this.weekNumber&&l.call(this,e,i),h.call(this,e)])}),this)])}}),_=t.defineComponent({name:"KendoViewList",inheritAttrs:!1,inject:{kendoIntlService:{default:null}},props:{allowReverse:Boolean,hasFocusedDate:Boolean,activeView:{type:Number,required:!0},bottomOffset:{type:Number},cell:[String,Function,Object],cellUID:{type:String,required:!0},dates:Array,focusedDate:{type:Date,required:!0},isActive:{type:Boolean,default:void 0},max:{type:Date,required:!0},min:{type:Date,required:!0},selectionRange:Object,showWeekNumbers:{type:Boolean,default:!1},take:{type:Number,default:5},value:{type:[Date,Array,Object]},views:{type:Number,default:1},viewHeight:Number,viewOffset:Number,bus:Object,dom:Object,weekCell:[String,Function,Object],service:Object,tabIndex:Number,shouldScroll:Boolean,onChange:Function,onWeekcellclick:Function,onWeeknameclick:Function,onCellenter:Function,onViewmousedown:Function,onListfocus:Function,onListblur:Function,onListkeydown:Function,onListmousedown:Function},data:function(){return{lastViewsCount:0,valueHasUpdated:!1,shouldScrollValue:!1}},computed:{weekNames(){this._intl=a.provideIntlService(this);const e=I(this._intl.dateFormatNames({nameType:"short",type:"days"}),this._intl.firstDay());return this.weekNumber?[""].concat(e):e},weekNumber(){return!(!this.$props.showWeekNumbers||this.$props.activeView!==c.month)}},created(){this.lastView=this.$props.activeView,this.lastFocus=this.$props.focusedDate,this.shouldScrollValue=this.$props.shouldScroll},updated(){this.shouldScrollValue=!1,this.lastView=this.$props.activeView,this.$data.lastViewsCount=this.$props.views,this.indexToScroll=void 0},methods:{handleFocus(e){this.$emit("listfocus",e)},handleBlur(e){this.$emit("listblur",e)},handleKeyDown(e){this.$emit("listkeydown",e)},handleVirtualizationMount(e){},calculateHeights(){if(!this.$props.dom)return;const e=this.$props.activeView===c.month?this.$props.dom.scrollableContentHeight:this.$props.dom.scrollableYearContentHeight;this._bottomOffset=e-this.$props.dom.viewHeight(this.$props.activeView),this._viewOffset=-1*this.$props.dom.headerHeight,this._viewHeight=this.$props.dom.viewHeight(this.$props.activeView)||1},getTake(e,t){return Math.min(t-e,this.$props.take)},handleScrollAction(){},handleTodayClick(e){this.shouldScrollValue=!0,this.handleDateChange(e,!0)},handleMouseDown(e){const t={event:e.event,value:s.cloneDate(e.value),target:this};this.$emit("listmousedown",t)},handleDateChange(e,t=!1){const i={event:e.event,value:s.cloneDate(e.value),target:this,isTodayClick:t};this.$emit("change",i)},handleWeekCellClick(e){this.$emit("weekcellclick",e)},handleWeekNameClick(e,t){const i={value:t,event:e};this.$emit("weeknameclick",i)},handleCellEnter(e){this.$emit("cellenter",e)},rotateSelectionRange(e){if(null===e.start||null===e.end)return e;const t=e.end<e.start;return{start:t?e.end:e.start,end:t?e.start:e.end}}},setup:()=>({kendoIntlService:t.inject("kendoIntlService",{})}),mounted(){this._calendarView=this.$refs.calendarView},render(){const e=this.$props.allowReverse?this.rotateSelectionRange(this.$props.selectionRange):this.$props.selectionRange,s=i.classNames("k-calendar-view","k-hstack k-align-items-start k-justify-content-center",{"k-calendar-monthview":this.$props.activeView===c.month,"k-calendar-yearview":this.$props.activeView===c.year,"k-calendar-decadeview":this.$props.activeView===c.decade,"k-calendar-centuryview":this.$props.activeView===c.century}),a=i.classNames("k-calendar-table"),n=function(e){return t.createVNode("thead",{class:"k-calendar-thead"},[t.createVNode("tr",{class:"k-calendar-tr"},[e.map(((e,i)=>t.createVNode("th",{class:"k-calendar-th",key:i,onClick:t=>this.handleWeekNameClick(t,e)},[e])),this)])])};return t.createVNode("div",{style:this.$attrs.style,class:s,onFocusin:this.handleFocus,onFocusout:this.handleBlur},[function(){const i=this.$props.cellUID;return this.$props.dates.map((function(s){return t.createVNode("table",{role:"grid","aria-label":this.$props.service.title(this.$props.focusedDate),"aria-live":"polite","aria-activedescendant":i+this.$props.focusedDate.getTime(),tabindex:this.$props.tabIndex,class:a,onKeydown:this.handleKeyDown},[this.$props.activeView===c.month&&n.call(this,this.weekNames),t.createVNode(x,{key:s.getTime(),activeView:this.$props.activeView,viewDate:s,min:this.$props.min,max:this.$props.max,cellUID:i,isActive:this.$props.isActive,focusedDate:this.$props.focusedDate,cell:this.$props.cell,selectionRange:e,selectedDate:this.$props.value,showWeekNumbers:this.weekNumber,onChange:this.handleDateChange,onWeekcellclick:this.handleWeekCellClick,onCellenter:this.handleCellEnter,onViewmousedown:this.handleMouseDown,bus:this.$props.bus,service:this.$props.service,weekCell:this.$props.weekCell},null)])}),this)}.call(this)])}}),T=new Date(1980,0,1),R=new Date(1900,0,1),N=new Date(2099,11,31),O=new Date(1980,0,1),B=new Date(1980,0,1,23,59,59);var L=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Up=2]="Up",e[e.Down=3]="Down",e[e.PrevView=4]="PrevView",e[e.NextView=5]="NextView",e[e.FirstInView=6]="FirstInView",e[e.LastInView=7]="LastInView",e[e.LowerView=8]="LowerView",e[e.UpperView=9]="UpperView",e))(L||{});const E=[[]],A={[L.Left]:e=>s.addDecades(e,-1),[L.Up]:e=>s.addDecades(e,-4),[L.Right]:e=>s.addDecades(e,1),[L.Down]:e=>s.addDecades(e,4),[L.PrevView]:e=>s.addCenturies(e,-1),[L.NextView]:e=>s.addCenturies(e,1),[L.FirstInView]:e=>s.firstDecadeOfCentury(e),[L.LastInView]:e=>s.lastDecadeOfCentury(e)};const j=[[]],H={[L.Left]:e=>s.addYears(e,-1),[L.Up]:e=>s.addYears(e,-4),[L.Right]:e=>s.addYears(e,1),[L.Down]:e=>s.addYears(e,4),[L.PrevView]:e=>s.addDecades(e,-1),[L.NextView]:e=>s.addDecades(e,1),[L.FirstInView]:e=>s.firstYearOfDecade(e),[L.LastInView]:e=>s.lastYearOfDecade(e)};const P=[[]],z={[L.Left]:e=>s.addDays(e,-1),[L.Up]:e=>s.addWeeks(e,-1),[L.Right]:e=>s.addDays(e,1),[L.Down]:e=>s.addWeeks(e,1),[L.PrevView]:e=>s.addMonths(e,-1),[L.NextView]:e=>s.addMonths(e,1),[L.FirstInView]:e=>s.firstDayOfMonth(e),[L.LastInView]:e=>s.lastDayOfMonth(e)};const q=[[]],K={[L.Left]:e=>s.addMonths(e,-1),[L.Up]:e=>s.addMonths(e,-4),[L.Right]:e=>s.addMonths(e,1),[L.Down]:e=>s.addMonths(e,4),[L.PrevView]:e=>s.addYears(e,-1),[L.NextView]:e=>s.addYears(e,1),[L.FirstInView]:e=>s.firstMonthOfYear(e),[L.LastInView]:e=>s.lastMonthOfYear(e)};const Y={[c.month]:class{constructor(e){this.intl=e}addToDate(e,t){return s.addMonths(e,t)}datesList(e,t){return V(0,t).map((t=>s.addMonths(e,t)))}data(e){const{cellUID:t,focusedDate:i,isActiveView:a,max:n,min:o,selectedDate:r,selectionRange:l=p,viewDate:h}=e;if(!h)return P;const u=s.firstDayOfMonth(h),d=s.lastDayOfMonth(h),c=s.dayOfWeek(u,this.intl.firstDay(),-1),m=V(0,7),g=D();return V(0,6).map((e=>{const h=s.addDays(c,7*e);return m.map((e=>{const c=this.normalize(s.addDays(h,e),o,n);if(c<u||c>d)return null;const p=this.isEqual(c,l.start),m=this.isEqual(c,l.end),f=!p&&!m&&k(c,l),v=a&&(Array.isArray(r)?this.isSelectedFromArray(c,r,o,n):S(r,o,n)&&this.isEqual(c,r));return{formattedValue:this.value(c),id:`${t}${c.getTime()}`,isFocused:this.isEqual(c,i),isSelected:v,isInRange:S(c,o,n),isWeekend:this.isWeekend(c),isRangeStart:p,isRangeMid:f,isRangeEnd:m,isRangeSplitStart:f&&this.isEqual(c,u),isRangeSplitEnd:f&&this.isEqual(c,d),isToday:this.isEqual(c,g),title:this.cellTitle(c),value:c}}))}))}isEqual(e,t){return!(!e||!t)&&s.getDate(e).getTime()===s.getDate(t).getTime()}isSelectedFromArray(e,t,i,s){let a=!1;return t.forEach((t=>{S(e,i,s)&&this.isEqual(e,t)&&(a=!0)})),a}isInArray(e,t){return!!t.length&&s.firstDayOfMonth(t[0])<=e&&e<=s.lastDayOfMonth(t[t.length-1])}isInRange(e,t,i){const a=s.getDate(e),n=!t||s.getDate(t)<=a,o=!i||a<=s.getDate(i);return n&&o}isInSameView(e,t){return 0===s.durationInMonths(e,t)}isRangeStart(e){return!e.getMonth()}move(e,t){const i=z[t];return i?i(e):e}cellTitle(e){return this.intl.formatDate(e,"D")}navigationTitle(e){return e?this.isRangeStart(e)?e.getFullYear().toString():this.abbrMonthNames()[e.getMonth()]:""}title(e){return`${this.wideMonthNames()[e.getMonth()]} ${e.getFullYear()}`}rowLength(e){return 7+(e?1:0)}skip(e,t){return s.durationInMonths(t,e)}total(e,t){return s.durationInMonths(e,t)+1}value(e){return e?e.getDate().toString():""}viewDate(e,t,i=1){return s.durationInMonths(e,t)<i?s.addMonths(e,-1):e}isWeekend(e){const t=e.getDay();return 6===t||0===t}abbrMonthNames(){return this.intl.dateFormatNames({nameType:"abbreviated",type:"months"})}normalize(e,t,i){return e<t&&this.isEqual(e,t)?s.getDate(t):e>i&&this.isEqual(e,i)?s.getDate(i):e}wideMonthNames(){return this.intl.dateFormatNames({nameType:"wide",type:"months",standAlone:!0})}},[c.year]:class{constructor(e){this._intl=e}addToDate(e,t){return s.addYears(e,t)}datesList(e,t){return V(0,t).map((t=>s.addYears(e,t)))}data(e){const{cellUID:t,focusedDate:i,isActiveView:a,max:n,min:o,selectedDate:r,selectionRange:l=p,viewDate:h}=e;if(!h)return q;const u=this.abbrMonthNames(),d=s.firstMonthOfYear(h),c=s.lastMonthOfYear(h),m=d.getFullYear(),g=V(0,4),f=D();return V(0,3).map((e=>{const h=s.addMonths(d,4*e);return g.map((e=>{const p=this.normalize(s.addMonths(h,e),o,n);if(!p||m<p.getFullYear())return null;const g=this.isEqual(p,l.start),v=this.isEqual(p,l.end),w=!g&&!v&&k(p,l),$=a&&(Array.isArray(r)?this.isSelectedFromArray(p,r,o,n):S(r,o,n)&&this.isEqual(p,r));return{formattedValue:u[p.getMonth()],id:`${t}${p.getTime()}`,isFocused:this.isEqual(p,i),isSelected:$,isInRange:S(p,o,n),isWeekend:!1,isRangeStart:g,isRangeMid:w,isRangeEnd:v,isRangeSplitEnd:w&&this.isEqual(p,c),isRangeSplitStart:w&&this.isEqual(p,d),isToday:this.isEqual(p,f),title:this.cellTitle(p),value:p}}))}))}isSelectedFromArray(e,t,i,s){let a=!1;return t.forEach((t=>{S(e,i,s)&&this.isEqual(e,t)&&(a=!0)})),a}isEqual(e,t){return!(!e||!t)&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth())}isInArray(e,t){if(!t.length)return!1;const i=e.getFullYear();return t[0].getFullYear()<=i&&i<=t[t.length-1].getFullYear()}isInRange(e,t,i){const a=s.createDate(e.getFullYear(),e.getMonth(),1),n=!t||s.createDate(t.getFullYear(),t.getMonth(),1)<=a,o=!i||a<=s.createDate(i.getFullYear(),i.getMonth(),1);return n&&o}isInSameView(e,t){return 0===s.durationInYears(e,t)}isRangeStart(e){return e.getFullYear()%10==0}move(e,t){const i=K[t];return i?i(e):e}cellTitle(e){return`${e.getFullYear()} ${this.value(e)}`}navigationTitle(e){return this.title(e)}title(e){return e?e.getFullYear().toString():""}rowLength(e){return 4}skip(e,t){return s.durationInYears(t,e)}total(e,t){return s.durationInYears(e,t)+1}value(e){return e?this.abbrMonthNames()[e.getMonth()]:""}viewDate(e,t,i=1){return s.durationInYears(e,t)<i?s.addYears(e,-1):e}abbrMonthNames(){return this._intl.dateFormatNames({nameType:"abbreviated",type:"months"})}normalize(e,t,s){return e<t&&this.isEqual(e,t)?i.cloneDate(t):e>s&&this.isEqual(e,s)?i.cloneDate(s):e}},[c.decade]:class{addToDate(e,t){return s.addDecades(e,t)}datesList(e,t){return V(0,t).map((t=>s.addDecades(s.firstYearOfDecade(e),t)))}data(e){const{cellUID:t,focusedDate:i,isActiveView:a,max:n,min:o,selectedDate:r,selectionRange:l=p,viewDate:h}=e;if(!h)return j;const u=V(0,4),d=s.firstYearOfDecade(h),c=s.lastYearOfDecade(h),m=D();return V(0,3).map((e=>{const h=s.addYears(d,4*e);return u.map((e=>{const u=this.normalize(s.addYears(h,e),o,n);if(!this.isInSameView(u,c))return null;const p=this.isEqual(u,l.start),g=this.isEqual(u,l.end),f=!p&&!g&&k(u,l),v=a&&(Array.isArray(r)?this.isSelectedFromArray(u,r,o,n):S(r,o,n)&&this.isEqual(u,r));return{formattedValue:this.value(u),id:`${t}${u.getTime()}`,isFocused:this.isEqual(u,i),isSelected:v,isWeekend:!1,isInRange:S(u,o,n),isRangeStart:p,isRangeMid:f,isRangeEnd:g,isRangeSplitEnd:f&&this.isEqual(u,c),isRangeSplitStart:f&&this.isEqual(u,d),isToday:this.isEqual(u,m),title:this.cellTitle(u),value:u}}))}))}isSelectedFromArray(e,t,i,s){let a=!1;return t.forEach((t=>{S(e,i,s)&&this.isEqual(e,t)&&(a=!0)})),a}isEqual(e,t){return!(!e||!t)&&e.getFullYear()===t.getFullYear()}isInArray(e,t){if(!t.length)return!1;const i=e.getFullYear();return t[0].getFullYear()<=i&&i<=t[t.length-1].getFullYear()+9}isInRange(e,t,i){const s=e.getFullYear(),a=!t||t.getFullYear()<=s,n=!i||s<=i.getFullYear();return a&&n}isRangeStart(e){return e.getFullYear()%100==0}isInSameView(e,t){return 0===s.durationInDecades(e,t)}move(e,t){const i=H[t];return i?i(e):e}cellTitle(e){return e.getFullYear().toString()}navigationTitle(e){return e?s.firstYearOfDecade(e).getFullYear().toString():""}title(e){return e?`${s.firstYearOfDecade(e).getFullYear()} - ${s.lastYearOfDecade(e).getFullYear()}`:""}rowLength(e){return 4}skip(e,t){return s.durationInDecades(t,e)}total(e,t){return s.durationInDecades(e,t)+1}value(e){return e?e.getFullYear().toString():""}viewDate(e,t,i=1){return s.durationInDecades(e,t)<i?s.addDecades(e,-1):e}normalize(e,t,i){return e<t&&this.isEqual(e,t)?s.cloneDate(t):e>i&&this.isEqual(e,i)?s.cloneDate(i):e}},[c.century]:class{addToDate(e,t){return s.addCenturies(e,t)}datesList(e,t){return V(0,t).map((t=>s.addCenturies(e,t)))}data(e){const{cellUID:t,focusedDate:i,isActiveView:a,max:n,min:o,selectedDate:r,selectionRange:l=p,viewDate:h}=e;if(!h)return E;const u=V(0,4),d=s.firstDecadeOfCentury(h),c=s.lastDecadeOfCentury(h),m=D();return V(0,3).map((e=>{const h=s.addDecades(d,4*e);return u.map((e=>{const u=this.normalize(s.addDecades(h,e),o,n);if(!this.isInSameView(u,c))return null;const p=this.isEqual(u,l.start),g=this.isEqual(u,l.end),f=!p&&!g&&k(u,l),v=a&&(Array.isArray(r)?this.isSelectedFromArray(u,r,o,n):S(r,o,n)&&this.isEqual(u,r));return{formattedValue:this.value(u),id:`${t}${u.getTime()}`,isFocused:this.isEqual(u,i),isSelected:v,isWeekend:!1,isInRange:S(u,o,n),isRangeStart:p,isRangeMid:f,isRangeEnd:g,isRangeSplitEnd:f&&this.isEqual(u,c),isRangeSplitStart:f&&this.isEqual(u,d),isToday:this.isEqual(u,m),title:this.cellTitle(u),value:u}}))}))}isSelectedFromArray(e,t,i,s){let a=!1;return t.forEach((t=>{S(e,i,s)&&this.isEqual(e,t)&&(a=!0)})),a}isEqual(e,t){return!(!e||!t)&&s.firstYearOfDecade(e).getFullYear()===s.firstYearOfDecade(t).getFullYear()}isInArray(e,t){if(!t.length)return!1;const i=e.getFullYear();return t[0].getFullYear()<=i&&i<=t[t.length-1].getFullYear()+99}isInRange(e,t,i){const a=s.firstYearOfDecade(e).getFullYear(),n=!t||s.firstYearOfDecade(t).getFullYear()<=a,o=!i||a<=s.firstYearOfDecade(i).getFullYear();return n&&o}isInSameView(e,t){return 0===s.durationInCenturies(e,t)}isRangeStart(e){return e.getFullYear()%1e3==0}move(e,t){const i=A[t];return i?i(e):e}cellTitle(e){return s.firstYearOfDecade(e).getFullYear().toString()}navigationTitle(e){return e?s.firstDecadeOfCentury(e).getFullYear().toString():""}title(e){return e?`${s.firstDecadeOfCentury(e).getFullYear()} - ${s.lastDecadeOfCentury(e).getFullYear()}`:""}rowLength(e){return 4}skip(e,t){return s.durationInCenturies(t,e)}total(e,t){return s.durationInCenturies(e,t)+1}value(e){return e?s.firstYearOfDecade(e).getFullYear().toString():""}viewDate(e,t,i=1){return s.durationInCenturies(e,t)<i?s.addCenturies(e,-1):e}normalize(e,t,i){return e<t&&this.isEqual(e,t)?s.cloneDate(t):e>i&&this.isEqual(e,i)?s.cloneDate(i):e}}};let U=class{constructor(e){this.bottom=c.month,this.top=c.century,this.onViewChanged=e}configure(e,t){this.bottom=e,this.top=t}service(e,t){return new Y[`${e}`](t)}moveDown(e,t){this.move(e,-1,t)}moveUp(e,t){this.move(e,1,t)}moveToBottom(e){e!==this.bottom&&this.onViewChanged({view:this.bottom})}canMoveDown(e){return this.bottom<e}canMoveUp(e){return e<this.top}clamp(e){return e<this.bottom?this.bottom:e>this.top?this.top:e}move(e,t,i){const s=this.clamp(((e,t)=>{const i=c[c[e+t]];return void 0!==i?i:e})(e,t));s!==e&&this.onViewChanged({view:s},i)}},W=class{constructor(){this.didCalculate=!1}ensureHeights(){void 0===this.calendarHeight&&this.calculateHeights()}calculateHeights(e){if(!i.canUseDOM)return;const t=M("div"),s=M("ul"),a=M("li"),n=M("td"),o=M("th"),r=M("tr"),l=M("tbody"),h=M("thead"),u=M("table"),d=()=>t('\n <span class="k-calendar-title">March 2017</span>\n <span class="k-calendar-today">TODAY</span>\n ',"k-calendar-header"),c=(e,t)=>new Array(e).fill("1").map(t),p=e=>t(e,"k-content k-scrollable"),m=(()=>{let e;return()=>i.canUseDOM?(e||(e=t([p([s([a("<span>FEB</span>")])])],"k-calendar-navigation",{left:"0px",position:"absolute"})),e):null})(),g=({cells:e,rows:s},a,m)=>{let g;return()=>i.canUseDOM?(g||(g=((e,i,s)=>t(s?[d(),u([h([r([o("MO")])])]),p([e,e])]:[d(),p([e,e])],i,{left:"-10000px",position:"absolute"}))(((e,t=1)=>u([l([r([o("1")])].concat(c(e,(()=>r(c(t,(e=>n(`<span class="k-link">${e}</span>`))))))))]))(s,e),a,m)),g):null},f=e=>e.querySelector(".k-scrollable"),v=e=>{const t=f(e);return t.className=`${t.className} k-scrollable-horizontal`,e},w=g({cells:7,rows:6},"k-calendar-view k-calendar-monthview",!0),$=g({cells:5,rows:3},"k-calendar-view k-calendar-yearview",!1),y=g({cells:5,rows:2},"k-calendar-view k-calendar-decadeview",!1),D=e=>parseFloat(window.getComputedStyle(e).height)||e.offsetHeight,S=e=>{const t=window.getComputedStyle(e);return parseFloat(t.width)+parseFloat(t.paddingLeft)+parseFloat(t.paddingRight)||e.offsetWidth},b=e=>e.querySelector("tbody");this.didCalculate=!0,e&&(this.hostContainer=e),this.batch(w(),(e=>{const t=b(e);this.calendarHeight=D(e),this.monthViewHeight=D(t),this.headerHeight=D(t.children[0]),this.scrollableContentHeight=D(f(e))})),this.batch(v(w()),(e=>{const t=b(e);this.calendarWidth=S(e),this.monthViewWidth=S(t),this.scrollableContentWidth=S(f(e))})),this.batch($(),(e=>{this.yearViewHeight=D(b(e)),this.scrollableYearContentHeight=D(f(e))})),this.batch(v($()),(e=>{this.yearViewWidth=S(b(e))})),this.batch(y(),(e=>{this.decadeViewHeight=D(b(e)),this.centuryViewHeight=this.decadeViewHeight})),this.batch(v(y()),(e=>{this.decadeViewWidth=S(b(e)),this.centuryViewWidth=this.decadeViewWidth})),this.batch(m(),(e=>{this.navigationItemHeight=D(e.querySelector("li"))}))}viewHeight(e){return this.viewDimension(e,"height")}viewWidth(e){return this.viewDimension(e,"width")}viewDimension(e,t){const i="height"===t?"ViewHeight":"ViewWidth";switch(e){case c.month:return this[`month${i}`];case c.year:return this[`year${i}`];case c.decade:return this[`decade${i}`];case c.century:return this[`century${i}`];default:return 1}}batch(e,t){const i=this.hostContainer||document.body,s=i.appendChild(e);t(s),i.removeChild(s)}};const Z={33:L.PrevView,34:L.NextView,35:L.LastInView,36:L.FirstInView,37:L.Left,38:L.Up,39:L.Right,40:L.Down,"meta+38":L.UpperView,"meta+40":L.LowerView,"meta+37":L.PrevView,"meta+39":L.NextView};let G=class{constructor(e){this.bus=e}action(e){const t=`${e.ctrlKey||e.metaKey?"meta+":""}${e.keyCode}`;return Z[t]}move(e,t,i,s,a){return s?t===L.UpperView&&this.bus.canMoveUp(i)?(this.bus.moveUp(i,a),e):t===L.LowerView&&this.bus.canMoveDown(i)?(this.bus.moveDown(i,a),e):s.move(e,t):e}};const J=t.defineComponent({name:"KendoHeaderTitle",emits:{click:e=>!0},props:{id:String,value:String,view:Number},methods:{handleClick(e){this.$emit("click",e)}},render(){const e=i.getDefaultSlots(this);return t.createVNode(n.Button,{role:"link",type:"button",id:this.$props.id,fillMode:"flat",themeColor:"primary",onClick:this.handleClick,tabIndex:0},function(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}(e)?e:{default:()=>[e]})}}),Q="calendar.prevView",X="calendar.nextView",ee="dateinput.increment",te="dateinput.decrement",ie="calendar.today",se="datepicker.toggleCalendar",ae="daterangepicker.swapStartEnd",ne="daterangepicker.start",oe="daterangepicker.end",re="daterangepicker.separator",le="datetimepicker.toggleDateTimeSelector",he="timepicker.now",ue="timepicker.selectNow",de="timepicker.cancel",ce="timepicker.set",pe="timepicker.toggleTimeSelector",me="timepicker.toggleClock",ge="datetimepicker.date",fe="datetimepicker.time",ve="datetimepicker.cancel",we="datetimepicker.set",$e={[ie]:"Today",[he]:"NOW",[ce]:"Set",[de]:"Cancel",[ge]:"Date",[fe]:"Time",[ve]:"Cancel",[we]:"Set",[ne]:"Start",[oe]:"End",[re]:" ",[ue]:"Select Now",[pe]:"Toggle TimeSelector",[me]:"Toggle Clock",[ee]:"Increase value",[te]:"Decrease value",[se]:"Toggle calendar",[Q]:"Navigate to previous view",[X]:"Navigate to next view",[ae]:"Swap start and end values",[le]:"Toggle date-time selector"};function ye(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const De=t.defineComponent({name:"KendoCalendarHeader",inheritAttrs:!1,inject:{kendoLocalizationService:{default:null}},emits:["titleclick","todayclick","nextclick","prevclick"],props:{activeView:{type:Number,required:!0},currentDate:{type:Date,required:!0},focusedDate:{type:Date,required:!0},headerTitle:{type:[String,Object,Function],default:function(){}},max:{type:Date,default:function(){return v}},min:{type:Date,default:function(){return R}},bus:Object,service:Object,rangeLength:{type:Number,default:1},tabIndex:{type:Number,default:0},onTodayClick:Function,onNextClick:Function,onPrevClick:Function,onTitleClick:Function},data:()=>({currentRtl:!1}),mounted(){this.currentRtl=i.isRtl(this.$el)},computed:{navigate(){return this.$props.bus.canMoveUp(this.$props.activeView)},todayIsInRange(){return S(D(),s.getDate(this.$props.min),s.getDate(this.$props.max))}},methods:{getTitle(){if(!this.$props.currentDate)return"";const e=this.$props.rangeLength-1,t=this.$props.service.title(this.$props.currentDate),i=this.$props.service.addToDate(this.$props.currentDate,e);return e<1||!this.$props.service.isInRange(i,this.$props.min,this.$props.max)?t:`${t} - ${this.$props.service.title(i)}`},handleTitleClick(e){this.navigate&&(this.$props.bus.moveUp(this.$props.activeView,e),this.$emit("titleclick",e))},canNavigate(e){if(!this.$props.service)return!1;const t=this.$props.service.move(this.$props.focusedDate,e);return this.$props.min<=t&&t<=this.$props.max||this.$props.service.isInSameView(t,this.$props.min)||this.$props.service.isInSameView(t,this.$props.max)},move(e){return this.clampDate(this.$props.service.move(this.$props.focusedDate,e))},clampDate(e){return C(e,this.$props.min,this.$props.max)},handleNextClick(e){const t={event:e,value:this.move(L.NextView),target:this};this.$emit("nextclick",t)},handlePrevClick(e){const t={event:e,value:this.move(L.PrevView),target:this};this.$emit("prevclick",t)},handleTodayClick(e){if(!this.todayIsInRange)return;this.$props.bus.moveToBottom(this.$props.activeView);const t={event:e,value:C(D(),this.$props.min,this.$props.max),target:this};this.$emit("todayclick",t)},todayKeyDown(e){const{keyCode:t}=e;t===i.Keys.enter&&this.handleTodayClick(e)}},setup:()=>({kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){this._localization=a.provideLocalizationService(this);const e=this._localization.toLanguageString(ie,$e[ie]),s=this.getTitle(),r=this._localization.toLanguageString(Q,$e[Q]),l=this._localization.toLanguageString(X,$e[X]),h=!this.canNavigate(L.PrevView),u=!this.canNavigate(L.NextView),d=i.classNames("k-calendar-title",{"k-disabled":!this.navigate}),c=i.classNames("k-calendar-nav-today",{"k-disabled":!this.todayIsInRange});let p;const m=t.createVNode(J,{value:s,view:this.$props.activeView,class:d,onClick:this.handleTitleClick},ye(s)?s:{default:()=>[s]});p=i.getTemplate.call(this,{h:t.h,template:this.$props.headerTitle,defaultRendering:m});const g=t.createVNode(n.Button,{type:"button",fillMode:"flat",themeColor:"base",class:c,tabIndex:this.$props.tabIndex,onKeydown:this.todayKeyDown,onClick:this.handleTodayClick},ye(e)?e:{default:()=>[e]}),f=i.getTemplate.call(this,{h:t.h,defaultRendering:g});return t.createVNode("div",{class:"k-calendar-header k-hstack",style:this.$attrs.style},[p,t.createVNode("span",{class:"k-spacer"},null),t.createVNode("span",{class:"k-calendar-nav k-hstack"},[t.createVNode(n.Button,{type:"button",icon:this.currentRtl?"chevron-right":"chevron-left",svgIcon:this.currentRtl?o.chevronRightIcon:o.chevronLeftIcon,size:this.$props.size,fillMode:"flat",class:"k-calendar-nav-pre",disabled:h,"aria-label":r,title:r,onClick:this.handlePrevClick},null),f,t.createVNode(n.Button,{type:"button",icon:this.currentRtl?"chevron-left":"chevron-right",svgIcon:this.currentRtl?o.chevronLeftIcon:o.chevronRightIcon,size:this.$props.size,fillMode:"flat",class:"k-calendar-nav-next",disabled:u,"aria-label":l,title:l,onClick:this.handleNextClick},null)])])}}),Se=(e,t,i)=>i instanceof Date&&!Array.isArray(i)&&S(s.getDate(i),e,t)?s.getDate(i):null,be=(e,t,i)=>Array.isArray(i)?i.filter((i=>S(i,e,t))).map((e=>s.getDate(e))):null,ke=e=>!i.isObject(e)||e instanceof Date||null===e||Array.isArray(e)?p:e,Ve=(e,t,i)=>e||t&&t[0]||i&&i.start,Ie=t.defineComponent({name:"KendoCalendar",inject:{kendoIntlService:{default:null}},model:{event:"changemodel"},props:{activeRangeEnd:{type:String,default:void 0},allowReverse:{type:Boolean,default:!1},cell:[String,Function,Object],className:String,defaultActiveView:{type:String,default:"month"},modelValue:{type:[Date,Array,Object],default:void 0},defaultValue:{type:[Date,Array,Object],default:null},disabled:{type:Boolean,default:!1},focusedDate:Date,id:{type:String,default:function(){return i.guid()}},headerTitle:[String,Function,Object],max:{type:Date,default:function(){return N}},min:{type:Date,default:function(){return R}},mode:String,navigation:{type:Boolean,default:!0},tabIndex:Number,value:[Date,Array,Object],views:{type:Number,default:1},weekNumber:Boolean,weekCell:[String,Function,Object],topView:{type:String,default:"century"},bottomView:{type:String,default:"month"},onFocus:Function,onBlur:Function,onChange:Function,onKeydown:Function},data:function(){return{valueDuringOnChange:void 0,currentFocusedDate:null,currentActiveView:null,currentValue:null,cellUID:i.guid(),isActive:!1,oldValue:null,didNavigationChange:!1,currentActiveRangeEnd:void 0}},created:function(){i.validatePackage(h);const e=((e,t,i,s)=>void 0!==s?null!==s&&S(s,e,t)?s:null:null!==i&&S(i,e,t)?i:null)(this.currentMin,this.currentMax,this.$props.defaultValue,this.$props.value||this.$props.modelValue),t=Se(this.currentMin,this.currentMax,e),s=be(this.currentMin,this.currentMax,e),a=ke(e),n=Ve(t,s,a);this._hasMounted=!1,this.$data.currentFocusedDate=C(this.$props.focusedDate||n||D(),this.currentMin,this.currentMax),this.$data.currentValue=e,this.$data.currentActiveView=m(c[this.$props.defaultActiveView],c[this.$props.bottomView],c[this.$props.topView]),this.$data.currentActiveRangeEnd=((e,t)=>null===e.start&&null===t?"start":null===e.end?"end":"start")(a,t),this._dates=[],this._calculateFocusFromValue=!1,this._lastView=this.$props.activeView||this.$data.currentActiveView,this._lastViewsCount=this.$props.views,this._dom=new W,this._bus=new U(this.handleViewChange),this._navigation=new G(this._bus),this._oldValue=e},watch:{value:function(e){this.$data.currentFocusedDate=e},focusedDate:function(e){this.$data.currentFocusedDate=e}},setup:()=>({kendoIntlService:t.inject("kendoIntlService",{})}),mounted(){this.calendarViewList=this.calendarViewListRef,this._calculateFocusFromValue=!0},updated(){const e=Se(this.currentMin,this.currentMax,this.computedValue());this._calculateFocusFromValue=!!(this._selectedDate&&e&&this._selectedDate.getTime()&&e.getTime()),this._lastView=this.$props.activeView||this.$data.currentActiveView,this._lastViewsCount=this.$props.views,this._oldValue=this.computedValue(),this.calendarViewList||(this.calendarViewList=this.calendarViewListRef)},computed:{activeRange(){return void 0!==this.$props.activeRangeEnd?this.$props.activeRangeEnd:this.$data.currentActiveRangeEnd},currentMin(){return s.getDate(this.$props.min)},currentMax(){return s.getDate(this.$props.max)}},methods:{element(){return this.$el},computedValue(){return void 0!==this.$data.valueDuringOnChange?this.$data.valueDuringOnChange:void 0!==this.$props.value?this.$props.value:void 0!==this.$props.modelValue?this.$props.modelValue:this.$data.currentValue},focus(){this.calendarViewList&&this.calendarViewList.$el.firstElementChild.focus()},handleBlur(){this.$data.isActive=!1},handleFocus(){this.$data.isActive=!0},emitBlur(e){this.$emit("blur",e)},emitFocus(e){this.$emit("focus",e)},handleTodayClick(e){if(this.$props.disabled)return;this.$data.didNavigationChange=!0;const t=s.cloneDate(e.value);this.$data.currentFocusedDate=t,this.$data.currentValue=t,this.triggerChange(t,e)},handleViewChange({view:e}){this.$data.currentActiveView=e},handlePrevClick(e){const t=s.cloneDate(e.value);this.focus(),!this.$props.disabled&&(this.$data.currentFocusedDate=t)},handleTitleClick(){this.focus()},handleNextClick(e){const t=s.cloneDate(e.value);this.focus(),!this.$props.disabled&&(this.$data.currentFocusedDate=t)},handleCellEnter(e){"range"===this.$props.mode&&(this.$data.currentFocusedDate=e)},generateRange(e,t){let{end:i,start:s}=t;const a=null!==t.start&&e.getTime()<=t.start.getTime();return!this.$props.allowReverse&&a?{start:e,end:this._selectedRange.start}:"end"!==this.activeRange?{start:e,end:i}:{start:s||this._selectedDate,end:e}},clampRange:e=>({start:e,end:null}),handleWeekCellClick(e){this.$emit("weekcellclick",e)},handleWeekNameClick(e){this.$emit("weeknameclick",e)},handleDateChange(e){const t=s.cloneDate(e.value),i=this._bus.canMoveDown(this.$data.currentActiveView);if(this.$props.disabled)return;if(i){if(!e.isTodayClick)return this._bus.moveDown(this.$data.currentActiveView,e.event),void(this.$data.currentFocusedDate=t);this._bus.moveToBottom(this.$data.currentActiveView)}let a,n;switch(this.$props.mode){case"single":default:a=s.cloneDate(e.value);break;case"multiple":if(Array.isArray(this._selectedMultiple)){let t=this._selectedMultiple.slice(),i=-1;t.forEach(((t,a)=>{s.isEqualDate(t,e.value)&&(i=a)})),-1!==i?t.splice(i,1):t.push(s.cloneDate(e.value)),a=t.slice()}else a=this._selectedDate?[s.cloneDate(this._selectedDate),s.cloneDate(e.value)]:[s.cloneDate(e.value)];break;case"range":n=null!==this._selectedRange.start&&null!==this._selectedRange.end&&"start"===this.activeRange,a=n?this.clampRange(e.value):this.generateRange(e.value,this._selectedRange),this.$data.currentActiveRangeEnd="end"!==this.activeRange?"end":"start"}this.$data.currentValue=a,this.triggerChange(a,e)},triggerChange(e,t){this.$data.valueDuringOnChange=e;const i={event:t.event,value:e,component:this,target:{name:this.$props.name,value:e,valueAsDate:e}};this.$emit("changemodel",e),this.$emit("update:modelValue",e),this.$emit("change",i),this.$data.valueDuringOnChange=void 0},handleMouseDown(e){const t=s.cloneDate(e.value);this.$props.disabled||0!==this.$data.currentActiveView||(this.$data.currentFocusedDate=t)},tableKeyDown(e){const{keyCode:t}=e;if(this.$emit("keydown",e),t===i.Keys.enter){const t={event:e,value:this._focusedDate,component:this,target:{name:this.$props.name,value:this._focusedDate,valueAsDate:this._focusedDate}};this.handleDateChange(t)}else{const t=C(this._navigation.move(this._focusedDate,this._navigation.action(e),this.$data.currentActiveView,this._service,e),this.currentMin,this.currentMax);if(s.isEqualDate(this._focusedDate,t))return;this._calculateFocusFromValue=!1,this.$data.currentFocusedDate=t}e.preventDefault()},isValueEqual:(e,t)=>e instanceof Date&&t instanceof Date?s.isEqualDate(e,t):e instanceof Object&&t instanceof Object?!!(e&&t&&s.isEqualDate(e.start,t.start)&&s.isEqualDate(e.end,t.end)):e instanceof Array&&t instanceof Array&&!(!e||!t||e.length!==t.length),rangeWithFocused(e,t){return{start:e.start,end:null===e.end&&null!==e.start&&this.$data.isActive?t.end:e.end}}},render(){const e=this.$props.views,n=this.computedValue(),o=this.$data.currentFocusedDate,r=null!==n&&null!==this._oldValue?!this.isValueEqual(n,this._oldValue):n!==this._oldValue;this._selectedDate=Se(this.currentMin,this.currentMax,n),this._selectedMultiple=be(this.currentMin,this.currentMax,n);const l=i.templateRendering.call(this,this.$props.cell,i.getListeners.call(this)),h=i.templateRendering.call(this,this.$props.weekCell,i.getListeners.call(this)),u=i.templateRendering.call(this,this.$props.headerTitle,i.getListeners.call(this)),d=m(this.$data.currentActiveView,c[this.$props.bottomView],c[this.$props.topView]);this._selectedDate=Se(this.currentMin,this.currentMax,n),this._selectedMultiple=be(this.currentMin,this.currentMax,n),this._selectedRange=ke(n);const p=Ve(this._selectedDate,this._selectedMultiple,this._selectedRange),g=C(r&&null!==p?p:o,this.currentMin,this.currentMax);g instanceof Date?this._focusedDate=s.getDate(g):p&&(this._focusedDate=p);const f=this.rangeWithFocused(this._selectedRange,o);this._intl=a.provideIntlService(this),this._bus.configure(c[this.$props.bottomView],c[this.$props.topView]),this._service=this._bus.service(d,this._intl);const v=i.classNames("k-calendar","k-calendar-md",{"k-calendar-range":e>1,"k-disabled":this.$props.disabled,"k-week-number":this.$props.weekNumber},this.$props.className),w=this._lastView!==this.$data.currentActiveView,$=this._dates&&this._service.isInArray(this._focusedDate,this._dates),y=this._lastViewsCount!==this.$props.views;(!$||w||y)&&(this._dates=this._service.datesList(this._focusedDate,e));const D=s.cloneDate(this._dates&&this._dates[0]?this._dates[0]:void 0),S=[this.$props.navigation&&t.createVNode(De,{tabIndex:this.$props.disabled?void 0:this.$props.tabIndex||0,activeView:this.$data.currentActiveView,currentDate:D,focusedDate:this._focusedDate,min:this.currentMin,max:this.currentMax,rangeLength:this.$props.views,onTodayclick:this.handleTodayClick,onNextclick:this.handleNextClick,onPrevclick:this.handlePrevClick,onTitleclick:this.handleTitleClick,bus:this._bus,service:this._service,headerTitle:u},null),t.createVNode(_,{allowReverse:this.$props.allowReverse,isActive:this.$data.isActive,tabIndex:this.$props.tabIndex||0,ref:e=>{this.calendarViewListRef=e},activeView:this.$data.currentActiveView,focusedDate:this._focusedDate,min:this.currentMin,max:this.currentMax,bus:this._bus,dates:this._dates,shouldScroll:this.$data.didNavigationChange,service:this._service,cell:l,weekCell:h,dom:this._dom,views:this.$props.views,selectionRange:f,showWeekNumbers:this.$props.weekNumber,onChange:this.handleDateChange,onWeekcellclick:this.handleWeekCellClick,onWeeknameclick:this.handleWeekNameClick,onListmousedown:this.handleMouseDown,onCellenter:this.handleCellEnter,onListkeydown:this.tableKeyDown,onListfocus:this.handleFocus,onListblur:this.handleBlur,value:this._selectedMultiple||this._selectedDate,cellUID:this.$data.cellUID},null)];return t.createVNode("div",{"aria-disabled":!0===this.$props.disabled||void 0,class:v,id:this.$props.id,onFocusout:this.emitBlur,onFocusin:this.emitFocus},[S])}});let Ce=class{constructor(){this.symbols=""}};const Me="wide",Fe=(e,t)=>(e[t.pattern[0]]=t.type,e);let xe=class{constructor(e,t,i){this.year=!0,this.month=!0,this.date=!0,this.hours=!0,this.minutes=!0,this.seconds=!0,this.milliseconds=!0,this.leadingZero=null,this.typedMonthPart="",this.knownParts="adHhmMsEy",this.symbols={E:"E",H:"H",M:"M",a:"a",d:"d",h:"h",m:"m",s:"s",y:"y"},this._value=s.getDate(new Date),this.intlProvider=e,this.formatPlaceholder=t,this.format=i,this.monthNames=this.allFormatedMonths()}get intl(){return this.intlProvider()}get value(){return this._value}setValue(e){e?s.isEqual(e,this._value)||(this._value=s.cloneDate(e),this.modifyExisting(!0)):(this._value=s.getDate(new Date),this.modifyExisting(!1))}hasValue(){return this.intl.splitDateFormat(this.format).reduce(((e,t)=>e||"literal"!==t.type&&"dayperiod"!==t.type&&this.getExisting(t.pattern[0])),!1)}getDateObject(){for(let e=0;e<this.knownParts.length;e++)if(!this.getExisting(this.knownParts[e]))return null;return s.cloneDate(this.value)}getTextAndFormat(){return this.merge(this.intl.formatDate(this.value,this.format),this.dateFormatString(this.value,this.format))}modifyExisting(e){const t=this.dateFormatString(this.value,this.format).symbols;for(let i=0;i<t.length;i++)this.setExisting(t[i],e)}getExisting(e){switch(e){case"y":return this.year;case"M":case"L":return this.month;case"d":return this.date;case"E":return this.date&&this.month&&this.year;case"h":case"H":return this.hours;case"m":return this.minutes;case"s":return this.seconds;default:return!0}}setExisting(e,t){switch(e){case"y":this.year=t,!1===t&&this._value.setFullYear(2e3);break;case"M":this.month=t,!1===t&&this._value.setMonth(0);break;case"d":this.date=t;break;case"h":case"H":this.hours=t;break;case"m":this.minutes=t;break;case"s":this.seconds=t;break;default:return}}modifyPart(e,t){let i=s.cloneDate(this.value);switch(e){case"y":i.setFullYear(i.getFullYear()+t);break;case"M":i=s.addMonths(this.value,t);break;case"d":case"E":i.setDate(i.getDate()+t);break;case"h":case"H":i.setHours(i.getHours()+t);break;case"m":i.setMinutes(i.getMinutes()+t);break;case"s":i.setSeconds(i.getSeconds()+t);break;case"a":i.setHours(i.getHours()+12*t)}this.setExisting(e,!0),this._value=i}parsePart(e,t){if(this.resetLeadingZero(),!t)return this.setExisting(e,!1),{value:null};const i=this.intl.formatDate(this.value,this.format),a=this.dateFormatString(this.value,this.format),n=a.symbols;let o=!1,r="",l="",h="";for(let t=0;t<i.length;t++)n[t]===e?(l+=this.getExisting(e)?i[t]:"0",o=!0):o?h+=i[t]:r+=i[t];let u=null;const d=this.matchMonth(t);for(;l.length>0&&"0"===l.charAt(0);)l=l.slice(1);l.length>=4&&(l="");for(let i=0;i<2;i++){let i=l+t,a=parseInt(i,10);if(u=this.intl.parseDate(r+i+h,this.format),!u&&!isNaN(a)&&!isNaN(parseInt(t,10))){if("M"===e&&!d){const e=a-1;e>-1&&e<12&&(u=s.cloneDate(this.value),u.setMonth(e),u.getMonth()!==e&&(u=s.lastDayOfMonth(s.addMonths(u,-1))))}"y"===e&&(u=s.createDate(parseInt(i,10),this.month?this.value.getMonth():0,this.date?this.value.getDate():1,this.hours?this.value.getHours():0,this.minutes?this.value.getMinutes():0,this.seconds?this.value.getSeconds():0,this.milliseconds?this.value.getMilliseconds():0),this.date&&u.getDate()!==this.value.getDate()&&(u=s.lastDayOfMonth(s.addMonths(u,-1))))}if(u)return this._value=u,this.setExisting(e,!0),{value:this.value};l=""}return d&&(u=this.intl.parseDate(r+d+h,this.format),u)?(this._value=u,this.setExisting(e,!0),{value:this.value}):("0"===t&&(this.leadingZero=this.isAbbrMonth(a.partMap,e)?null:{[e]:!0},this.setExisting(e,!1)),{value:null})}symbolMap(e){return this.intl.splitDateFormat(this.format).reduce(Fe,{})[e]}resetLeadingZero(){const e=null!==this.leadingZero;return this.leadingZero=null,e}isAbbrMonth(e,t){const i=this.partPattern(e,t);return"month"===i.type&&i.names}partPattern(e,t){return e.filter((e=>-1!==e.pattern.indexOf(t)))[0]}matchMonth(e){if(this.typedMonthPart+=e.toLowerCase(),0===this.monthNames.length)return"";for(;this.typedMonthPart.length>0;){for(let e=0;e<this.monthNames.length;e++)if(0===this.monthNames[e].toLowerCase().indexOf(this.typedMonthPart))return this.monthNames[e];const e=parseInt(this.typedMonthPart,10);if(e>=1&&e<=12&&e.toString()===this.typedMonthPart)return this.monthNames[e-1];this.typedMonthPart=this.typedMonthPart.substring(1,this.typedMonthPart.length)}return""}allFormatedMonths(){const e=this.intl.splitDateFormat(this.format);for(let t=0;t<e.length;t++)if("month"===e[t].type&&e[t].names)return this.intl.dateFormatNames(e[t].names);return[]}dateFormatString(e,t){const i=this.intl.splitDateFormat(t),s=[],a=[];for(let t=0;t<i.length;t++){let n=this.intl.formatDate(e,{pattern:i[t].pattern}).length;for(;n>0;)s.push(this.symbols[i[t].pattern[0]]||"_"),a.push(i[t]),n--}const n=new Ce;return n.symbols=s.join(""),n.partMap=a,n}merge(e,t){var i;let s="",a="",n=t.symbols;for(let o=n.length-1;o>=0;){if(-1===this.knownParts.indexOf(n[o])||this.getExisting(n[o]))s=e[o]+s,a=n[o]+a;else{const e=n[o];for(;o>=0&&e===n[o];)o--;for(o++,s=null!=(i=this.leadingZero)&&i[e]?"0"+s:this.dateFieldName(t.partMap[o])+s;a.length<s.length;)a=n[o]+a}o--}return{text:s,format:a}}dateFieldName(e){const t=this.formatPlaceholder||"wide";return t[e.type]?t[e.type]:"formatPattern"===t?e.pattern:this.intl.dateFieldName(Object.assign(e,{nameType:t}))}};const _e="dayperiod",Te="hour",Re="minute",Ne="second",Oe=e=>(t,i)=>{const a=s.cloneDate(t);return a[e](i),a},Be=[{type:Te,getter:e=>e.getHours()},{type:Re,getter:e=>e.getMinutes()},{type:Ne,getter:e=>e.getSeconds()},{type:"millisecond",getter:e=>e.getMilliseconds()}],Le=(e=>t=>e.map((e=>t=>e[t.type]?(e=>(t,i)=>e(i))(t.getter):(e=>(t,i)=>e(t))(t.getter))((e=>e.reduce(((e,t)=>(e[t.type]=t.type,e)),{}))(t))))(Be),Ee=(e=>(t,i)=>e.map((e=>{const s=Math.floor(t[e.type]);return s?((e,t,i,s)=>a=>{const n=e(a),o=e(i);return"hour"===s?n-(n-o)%t:a.getTime()<=i.getTime()&&0!==n&&n<=o?Math.ceil(n/t)*t:n-n%t})(e.getter,s,i,e.type):e.getter})))(Be),Ae=e=>t=>{const i=s.cloneDate(t);return i.setHours(...e.map((e=>e(i)))),i},je=Oe("setHours"),He=Oe("setMinutes"),Pe=Oe("setSeconds"),ze=()=>new Date,qe=(e,t,i=1)=>{const s=[];for(let a=e;a<t;a+=i)s.push(a);return s},Ke=(e,t,i)=>({candidateValue:y(g,e),maxValue:s.addDays(y(g,i),t.getHours()<i.getHours()?0:1),minValue:y(g,t)}),Ye=(e,t,i)=>{if(!e||!t||!i)return!0;const{candidateValue:s,minValue:a,maxValue:n}=Ke(e,t,i);return a<=s&&s<=n},Ue=(e,t,i)=>{if(null===e)return!0;const{candidateValue:s,minValue:a,maxValue:n}=Ke(e,t,i);return a<=s&&s<=n},We=(e,t)=>{if(null===e||null===t)return!1;const i=y(g,e),s=y(g,t);return i.getTime()<s.getHours()},Ze=(e,t)=>{if(null===e||null===t)return!1;const i=y(g,e);return y(g,t).getTime()<i.getHours()};const Ge=t.defineComponent({name:"DateInput",model:{event:"changemodel"},inject:{kendoIntlService:{default:null},kendoLocalizationService:{default:null}},emits:{change:e=>!0,changemodel:e=>!0,"update:modelValue":e=>!0,focus:e=>!0,blur:e=>!0},props:{modelValue:Date,value:Date,defaultValue:Date,format:{type:[String,Object],default:function(){return"d"}},formatPlaceholder:{type:[String,Object],default:function(){return Me}},rounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].includes(e)}},tabIndex:Number,title:String,steps:Object,placeholder:String,max:{type:Date,default:function(){return s.cloneDate(v)}},min:{type:Date,default:function(){return s.cloneDate(f)}},maxTime:{type:Date,default:function(){return s.cloneDate(B)}},minTime:{type:Date,default:function(){return s.cloneDate(O)}},disabled:{type:Boolean,default:!1},spinners:{type:Boolean,default:!1},name:String,dir:String,label:String,id:String,validationMessage:{type:String,default:"Please enter a valid value!"},required:{type:Boolean,default:!1},validityStyles:{type:Boolean,default:!0},validate:Boolean,valid:{type:Boolean,default:void 0},ariaRole:{type:String,default:"textbox"},ariaControls:String,ariaLabel:String,ariaExpanded:{type:Boolean,default:void 0},ariaHasPopup:{type:String,default:void 0},inputAttributes:Object},data:()=>({kendoDate:null,currentFormat:void 0,valueDuringOnChange:void 0,hasMounted:!1,isEmpty:void 0,lastSelectedSymbol:void 0,isFocused:!1}),created(){i.validatePackage(h);const{formatPlaceholder:e,format:t,value:s,defaultValue:a}=this.$props;this.kendoDate=new xe(this.intl,e,t),this.kendoDate.setValue(null),this._emptyText=this.kendoDate.getTextAndFormat().text,this.kendoDate.setValue(s||a||null),this._element=null,this._inputId=i.guid()},computed:{computedValue(){return void 0!==this.$data.valueDuringOnChange?this.$data.valueDuringOnChange:this.kendoDate&&this.kendoDate.getDateObject()},wrapperClassNames(){const e=!this.$data.hasMounted||!this.$props.validityStyles||this.validity().valid,t=this.$props.disabled,{size:s,fillMode:a,rounded:n}=this.$props;return{"k-dateinput":!0,"k-input":!0,[`k-input-${i.kendoThemeMaps.sizeMap[s]||s}`]:s,[`k-input-${a}`]:a,[`k-rounded-${i.kendoThemeMaps.roundedMap[n]||n}`]:n,"k-disabled":t,"k-invalid":!e&&void 0!==e,"k-focus":this.isFocused,"k-rtl":"rtl"===this.$props.dir}}},methods:{selection(){let e={start:0,end:0};const t=this.element();return null!==t&&void 0!==t.selectionStart&&(e={start:t.selectionStart,end:t.selectionEnd}),e},element(){return this._element},focus(e){this._element&&this._element.focus(e)},handleFocus(e){this.$data.isFocused=!0,this.$emit("focus",{event:e})},handleBlur(e){this.$data.isFocused=!1,this.$emit("blur",{event:e})},intl(){return a.provideIntlService(this)},setValidity(){const e=this.element();e&&e.setCustomValidity&&e.setCustomValidity(this.validity().valid?"":this.$props.validationMessage)},spinnersMouseDown(e){const t=this.element();e.preventDefault(),t&&i.canUseDOM&&document.activeElement!==t&&t.focus({preventScroll:!0})},elementChange(e){const t=this.element();if(!t||!this.kendoDate)return;const{text:i,format:s}=this.kendoDate.getTextAndFormat();this.$data.currentFormat=s;const a=this.computedValue,n=((e,t,i,s)=>{const a=e[s+e.length-i.length],n=e.substring(0,s+e.length-i.length),o=i.substring(0,s),r=[];if(n===o&&s>0)return r.push([t[s-1],o[s-1]]),r;if(0===n.indexOf(o)&&(0===o.length||t[o.length-1]!==t[o.length])){let e="";1===o.length&&r.push([t[0],o[0]]);for(let i=o.length;i<n.length;i++)t[i]!==e&&"_"!==t[i]&&(e=t[i],r.push([e,""]));return r}if(0===o.indexOf(n)||"_"===t[s-1]){let e=t[0];for(let i=Math.max(0,n.length-1);i<t.length;i++)if("_"!==t[i]){e=t[i];break}return[[e,o[s-1]]]}return" "===o[o.length-1]||o[o.length-1]===a?[[t[s-1],"_"]]:[[t[s-1],o[s-1]]]})(i,this.$data.currentFormat,t.value,this.selection().start),o=1===n.length&&"_"===n[0][1];if(!o)for(let e=0;e<n.length;e++)this.kendoDate.parsePart(n[e][0],n[e][1]);n.length&&"_"!==n[0][0]&&this.setSelection(this.selectionBySymbol(n[0][0])),o&&this.switchDateSegment(1),this.triggerChange(e,a)},elementClick(e){this.setSelection(this.selectionByIndex(this.selection().start))},wheel(e){const t=this.element();i.canUseDOM&&document.activeElement!==t||(e.deltaY<0&&(e.preventDefault(),this.increasePart(e)),e.deltaY>0&&(e.preventDefault(),this.decreasePart(e)))},increasePart(e){e.preventDefault(),this.modifyDateSegmentValue(1,e)},decreasePart(e){e.preventDefault(),this.modifyDateSegmentValue(-1,e)},elementKeyDown(e){if(!e.altKey){switch(e.keyCode){case 37:this.switchDateSegment(-1);break;case 38:this.modifyDateSegmentValue(1,e);break;case 39:this.switchDateSegment(1);break;case 40:this.modifyDateSegmentValue(-1,e);break;default:return}e.preventDefault()}},setSelection(e){const t=this.element();this.$data.lastSelectedSymbol=this.$data.currentFormat[e.start],i.canUseDOM&&window.requestAnimationFrame((()=>{t&&i.canUseDOM&&document.activeElement===t&&t.setSelectionRange(e.start,e.end)}))},triggerChange(e,t){this.$data.valueDuringOnChange=this.computedValue,s.isEqual(t,this.computedValue)||(this.$emit("changemodel",this.computedValue),this.$emit("update:modelValue",this.computedValue),this.$emit("change",{event:e,value:this.computedValue,component:this,target:{name:this.$props.name,value:this.$data.valueDuringOnChange,valueAsDate:this.$data.valueDuringOnChange},validity:this.validity()})),this.$data.valueDuringOnChange=void 0},selectionBySymbol(e){let t=-1,i=0;for(let s=0;s<this.$data.currentFormat.length;s++)this.$data.currentFormat[s]===e&&(i=s+1,-1===t&&(t=s));return t<0&&(t=0),{start:t,end:i}},selectionByIndex(e){let t={start:e,end:e};for(let i=e,s=e-1;i<this.$data.currentFormat.length||s>=0;i++,s--){if(i<this.$data.currentFormat.length&&"_"!==this.$data.currentFormat[i]){t=this.selectionBySymbol(this.$data.currentFormat[i]);break}if(s>=0&&"_"!==this.$data.currentFormat[s]){t=this.selectionBySymbol(this.$data.currentFormat[s]);break}}return t},switchDateSegment(e){const{start:t,end:i}=this.selection();if(t<i&&this.$data.currentFormat[t]!==this.$data.currentFormat[i-1])return void this.setSelection(this.selectionByIndex(e>0?t:i-1));const s=this.$data.currentFormat[t];let a=t+e;for(;a>0&&a<this.$data.currentFormat.length&&(this.$data.currentFormat[a]===s||"_"===this.$data.currentFormat[a]);)a+=e;if("_"===this.$data.currentFormat[a])return;let n=a;for(;n>=0&&n<this.$data.currentFormat.length&&this.$data.currentFormat[n]===this.$data.currentFormat[a];)n+=e;a>n&&(n+1!==t||a+1!==i)?this.setSelection({start:n+1,end:a+1}):a<n&&(a!==t||n!==i)&&this.setSelection({start:a,end:n})},modifyDateSegmentValue(e,t){if(!this.kendoDate)return;const i=this.computedValue,s=this.$data.currentFormat[this.selection().start],a=this.kendoDate.symbolMap(s),n=((this.$props.steps||{})[a]||1)*e;this.kendoDate.modifyPart(s,n),this.setSelection(this.selectionBySymbol(s)),this.triggerChange(t,i)},validity(){const e=((e,t,i)=>null===e||!(t&&t>e||i&&i<e))(this.computedValue,this.$props.min,this.$props.max)&&Ye(this.computedValue,this.$props.minTime,this.$props.maxTime),t=void 0!==this.$props.validationMessage,i=(!this.$props.required||null!==this.computedValue)&&e,s=void 0!==this.$props.valid?this.$props.valid:i;return{customError:t,rangeOverflow:this.computedValue&&this.$props.max.getTime()<this.computedValue.getTime()||!1,rangeUnderflow:this.computedValue&&this.computedValue.getTime()<this.$props.min.getTime()||!1,valid:s,valueMissing:null===this.computedValue}}},mounted(){this._element=i.getRef(this,"input"),this.setValidity(),this.$data.hasMounted=!0},updated(){this.$data.lastSelectedSymbol&&this.setSelection(this.selectionBySymbol(this.$data.lastSelectedSymbol)),this.setValidity()},setup:()=>({inputRef:t.ref(null),kendoIntlService:t.inject("kendoIntlService",{}),kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){const e=i.getDefaultSlots(this),s=a.provideLocalizationService(this),{formatPlaceholder:l,format:h,value:u,modelValue:d,name:c,label:p,id:m,ariaLabel:g,ariaExpanded:f,ariaHasPopup:v,ariaRole:w,ariaControls:$,inputAttributes:y}=this.$props,D=void 0!==u?u:d;this.kendoDate.format=h,this.kendoDate.formatPlaceholder=l,this.valueDuringOnChange=this.valueDuringOnChange?this.valueDuringOnChange:void 0,void 0!==D&&this.computedValue!==D&&this.kendoDate.setValue(D);const{text:S,format:b}=this.kendoDate.getTextAndFormat();this.$data.currentFormat=b,this.$data.isEmpty=S===this._emptyText;const k=void 0!==this.$props.placeholder&&this.$data.isEmpty&&!this.$data.isFocused?null:S,V=m||this._inputId,I=!this.$props.validityStyles||this.validity().valid,C=t.createVNode("span",{class:this.wrapperClassNames,dir:this.$props.dir},[t.createVNode("input",t.mergeProps({role:w,tabindex:this.$props.tabIndex,disabled:this.$props.disabled,title:void 0!==this.$props.title?this.$props.title:S,type:"text",spellcheck:!1,autocomplete:"off",autocorrect:"off",class:"k-input-inner",id:V,placeholder:this.$props.placeholder,onWheel:this.wheel,onClick:this.elementClick,onInput:this.elementChange,onKeydown:this.elementKeyDown,onChange:i.noop,onFocusin:this.handleFocus,onFocusout:this.handleBlur,value:k,name:c,"aria-label":g,"aria-expanded":f,"aria-haspopup":v,"aria-controls":$,"aria-disabled":this.$props.disabled,ref:i.setRef(this,"input")},y),null),e,this.$props.spinners&&t.createVNode("span",{class:"k-input-spinner k-spin-button",onMousedown:this.spinnersMouseDown},[t.createVNode(n.Button,{type:"button",tabIndex:-1,icon:"caret-alt-up",svgIcon:o.caretAltUpIcon,size:this.$props.size,fillMode:this.$props.fillMode,class:"k-spinner-increase","aria-label":s.toLanguageString(ee,$e[ee]),title:s.toLanguageString(ee,$e[ee]),onClick:this.increasePart},null),t.createVNode(n.Button,{type:"button",tabIndex:-1,class:"k-spinner-decrease",icon:"caret-alt-down",svgIcon:o.caretAltDownIcon,size:this.$props.size,fillMode:this.$props.fillMode,"aria-label":s.toLanguageString(te,$e[te]),title:s.toLanguageString(te,$e[te]),onClick:this.decreasePart},null)])]);return p?t.createVNode(r.FloatingLabel,{label:p,editorId:V,editorValue:k,editorPlaceholder:this.$props.placeholder,editorValid:I,editorDisabled:this.$props.disabled},function(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}(C)?C:{default:()=>[C]}):C}}),Je=n.Button;function Qe(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const Xe=t.defineComponent({name:"DatePicker",inject:{kendoLocalizationService:{default:null}},model:{event:"changemodel"},emits:{change:e=>!0,changemodel:e=>!0,"update:modelValue":e=>!0,iconclick:e=>!0,focus:e=>!0,blur:e=>!0,keydown:e=>!0,open:e=>!0,close:e=>!0},props:{defaultShow:{type:Boolean,default:!1},modelValue:{type:Date,default:void 0},defaultValue:{type:Date,default:void 0},disabled:{type:Boolean,default:!1},dateInput:{type:[String,Object,Function],default:function(){}},calendar:{type:[String,Object,Function],default:function(){}},toggleButton:{type:[String,Object,Function],default:function(){}},label:String,placeholder:String,popup:{type:[String,Object,Function],default:function(){}},rounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].includes(e)}},focusedDate:Date,format:{type:[Object,String],default:function(){return"d"}},formatPlaceholder:[Object,String],id:String,max:{type:Date,default:function(){return s.cloneDate(v)}},min:{type:Date,default:function(){return s.cloneDate(f)}},name:String,popupSettings:{type:Object,default:function(){return{}}},show:{type:Boolean,default:void 0},tabIndex:{type:Number,default:0},title:{type:String,default:function(){return""}},value:Date,weekNumber:Boolean,width:[Number,String],validityStyles:{type:Boolean,default:!0},validationMessage:String,required:Boolean,validate:Boolean,valid:{type:Boolean,default:void 0},ariaLabel:String,inputAttributes:Object},data:function(){return{isFocused:!1,currentValue:void 0,currentShow:void 0,valueDuringOnChange:void 0,showDuringOnChange:void 0,shouldFocusDateInput:!1}},created(){i.validatePackage(h),this._popupId=i.guid(),this._anchor=i.guid(),this._dateInput=null,this._calendar=null,this.$data.currentValue=this.$props.defaultValue,this.$data.currentShow=this.$props.defaultShow},mounted(){this._dateInput=i.getRef(this,"dateInput"),(this.$refs.calendar||this.calendarRef)&&(this._calendar=i.getRef(this,"calendar")),this.computedShow&&this.$forceUpdate()},updated(){(this.$refs.calendar||this.calendarRef)&&(this._calendar=i.getRef(this,"calendar")),this.computedShow?this._calendar&&this._calendar.$el&&!this._oldShow&&this._calendar.focus({preventScroll:!0}):this._dateInput&&this._dateInput.$el&&this.$data.shouldFocusDateInput&&this._dateInput.focus({preventScroll:!0}),this.$data.shouldFocusDateInput=!1},watch:{show:function(e,t){this._oldShow=t},currentShow:function(e,t){this._oldShow=t}},computed:{computedValue(){const e=void 0!==this.$data.valueDuringOnChange?this.$data.valueDuringOnChange:void 0!==this.$props.value?this.$props.value:void 0!==this.$props.modelValue?this.$props.modelValue:this.$data.currentValue;return null!==e?s.cloneDate(e):null},computedShow(){return void 0!==this.$data.showDuringOnChange?this.$data.showDuringOnChange:void 0!==this.$props.show?this.$props.show:this.$data.currentShow}},methods:{focus(){this._dateInput&&this._dateInput.focus()},handleFocus(e){this._oldShow=this.computedShow,this.$data.isFocused=!0,this.$emit("focus",{event:e})},handleBlur(e){this.$data.isFocused=!1,this.createBlurTimeout(),this.$emit("blur",{event:e})},calendarBlur(e){this.$emit("blur",{event:e}),clearTimeout(this._blurTimeout),this.createBlurTimeout()},calendarFocus(e){this.$emit("focus",{event:e}),clearTimeout(this._blurTimeout)},createBlurTimeout(){this._blurTimeout=setTimeout((()=>{this._dateInput&&i.canUseDOM&&document.activeElement!==this._dateInput._element&&this.setShow(!1)}),200)},validity(){const e=this.computedValue,t=b(e,this.$props.min,this.$props.max),i=void 0!==this.$props.validationMessage,s=(!this.$props.required||null!==e)&&t,a=void 0!==this.$props.valid?this.$props.valid:s;return{customError:i,rangeOverflow:e&&this.$props.max.getTime()<e.getTime()||!1,rangeUnderflow:e&&e.getTime()<this.$props.min.getTime()||!1,valid:a,valueMissing:null===e}},nextValue:(e,t)=>void 0!==e.value?e.value:t.value,nextShow:(e,t)=>void 0!==e.show?e.show:t.show,setShow(e){this.computedShow!==e&&(this.$data.currentShow=e,this.$emit(e?"open":"close",{component:this}))},mergeTime(e){return this.computedValue&&e?y(e,this.computedValue):e},handleInputValueChange(e){this.handleValueChange(e.value,e)},handleCalendarValueChange(e){const t=this.mergeTime(e.value);this.handleValueChange(t,e)},getDateInputText(){return!!this.computedValue||(this._dateInput?this._dateInput._element.value:"")},handleValueChange(e,t){this.$data.currentValue=s.cloneDate(e||void 0),this.$data.valueDuringOnChange=e,this.$data.showDuringOnChange=!1,this.$data.shouldFocusDateInput=!0,this.$emit("changemodel",this.computedValue),this.$emit("update:modelValue",this.computedValue),this.$emit("change",{event:t.event,value:this.computedValue,show:this.computedShow,component:this,target:{name:this.$props.name,value:this.computedValue,valueAsDate:this.computedValue},validity:this.validity()}),this.$data.valueDuringOnChange=void 0,this.$data.showDuringOnChange=void 0,this.setShow(!1)},handleIconClick(e){e.stopPropagation(),e.preventDefault(),!this.$props.disabled&&(this.$data.shouldFocusDateInput=!0,this.$emit("iconclick",e),this.setShow(!this.computedShow))},handleIconMouseDown(e){e.stopPropagation(),e.preventDefault()},handleKeyDown(e){const{altKey:t,keyCode:s}=e;return s===i.Keys.tab&&this._dateInput&&e.target!==this._dateInput._element?(e.preventDefault(),this.$data.shouldFocusDateInput=!0,void this.setShow(!1)):s===i.Keys.esc?(this.$data.shouldFocusDateInput=!0,void this.setShow(!1)):(t&&(s===i.Keys.up||s===i.Keys.down)&&(e.preventDefault(),e.stopPropagation(),this.$data.shouldFocusDateInput=s===i.Keys.up,this.setShow(s===i.Keys.down)),void this.$emit("keydown",e))}},setup:()=>({listRef:t.ref(null),kendoAnchorRef:t.ref(null),kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){i.getDefaultSlots(this);const{disabled:e,tabIndex:n,title:h,id:u,format:d,formatPlaceholder:c,min:p,max:m,weekNumber:g,focusedDate:f,width:v,name:w,validationMessage:$,required:y,validityStyles:D,size:S,fillMode:b,rounded:k,ariaLabel:V,inputAttributes:I}=this.$props,{popupClass:C,animate:M,appendTo:F}=this.$props.popupSettings,x=this.computedShow,_=this.computedValue,T=_&&s.getDate(_),R=!this.$props.validityStyles||this.validity().valid,N=i.classNames("k-calendar-container k-group k-reset",C),O=this.$props.toggleButton?i.templateRendering.call(this,this.$props.toggleButton,i.getListeners.call(this)):void 0,B=t.createVNode(Je,{type:"button",tabIndex:-1,icon:"calendar",svgIcon:o.calendarIcon,onMousedown:this.handleIconMouseDown,onClick:this.handleIconClick,title:a.provideLocalizationService(this).toLanguageString(se,$e[se]),"aria-label":a.provideLocalizationService(this).toLanguageString(se,$e[se]),rounded:null,class:"k-input-button"},null),L=i.getTemplate.call(this,{h:t.h,template:O,defaultRendering:B,defaultSlots:t.createVNode(i.Icon,{name:"calendar",icon:o.calendarIcon},null),additionalListeners:{click:this.handleIconClick}}),E=this.$props.dateInput?i.templateRendering.call(this,this.$props.dateInput,i.getListeners.call(this)):void 0,A=t.createVNode(Ge,{ref:i.setRef(this,"dateInput"),placeholder:this.$props.placeholder,disabled:e,format:d,formatPlaceholder:c,id:u,max:m,min:p,name:w,size:null,rounded:null,fillMode:null,onChange:this.handleInputValueChange,required:y,tabIndex:x?-1:n,title:h,valid:this.validity().valid,validationMessage:$,validityStyles:D,value:_,ariaHasPopup:"grid",ariaExpanded:x,ariaRole:"combobox",ariaControls:this._popupId,ariaLabel:V,inputAttributes:I},null),j=i.getTemplate.call(this,{h:t.h,template:E,defaultRendering:A}),H=this.$props.calendar?i.templateRendering.call(this,this.$props.calendar,i.getListeners.call(this)):void 0,P=t.createVNode(Ie,{ref:i.setRef(this,"calendar"),onKeydown:this.handleKeyDown,onFocus:this.calendarFocus,onBlur:this.calendarBlur,disabled:e,value:T,min:p,max:m,weekNumber:g,focusedDate:f,onChange:this.handleCalendarValueChange},null),z=i.getTemplate.call(this,{h:t.h,template:H,defaultRendering:P}),q=this.$props.popup?i.templateRendering.call(this,this.$props.popup,i.getListeners.call(this)):void 0,K=t.createVNode(l.Popup,{show:x,anchor:this._anchor,class:N,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},animate:M,appendTo:F},Qe(z)?z:{default:()=>[z]}),Y=i.getTemplate.call(this,{h:t.h,template:q,defaultRendering:K,defaultSlots:z}),U=t.createVNode("span",{ref:i.setRef(this,"kendoAnchor"),role:"group",class:i.classNames("k-input","k-datepicker",{[`k-input-${i.kendoThemeMaps.sizeMap[S]||S}`]:S,[`k-input-${b}`]:b,[`k-rounded-${i.kendoThemeMaps.roundedMap[k]||k}`]:k,"k-invalid":!R,"k-required":this.required,"k-disabled":this.$props.disabled,"k-focus":this.$data.isFocused}),onKeydown:this.handleKeyDown,onFocusin:this.handleFocus,onFocusout:this.handleBlur},[j,L,Y]);return this.$props.label?t.createVNode(r.FloatingLabel,{label:this.$props.label,editorId:u,editorValid:R,editorValue:this.getDateInputText(),editorPlaceholder:this.$props.placeholder,editorDisabled:this.$props.disabled,style:{width:v}},Qe(U)?U:{default:()=>[U]}):U}});let et=class{constructor(e=0,t,i){this.total=e,this.rowHeight=t,this.detailRowHeight=i,this.offsets=[],this.heights=[];let s=0;for(let i=0;i<e;i++)this.offsets.push(s),s+=t,this.heights.push(t)}height(e){return this.heights[e]}expandDetail(e){this.height(e)===this.rowHeight&&this.updateRowHeight(e,this.detailRowHeight)}collapseDetail(e){this.height(e)>this.rowHeight&&this.updateRowHeight(e,-1*this.detailRowHeight)}index(e){for(let t=0;t<this.offsets.length;t++){if(e===this.offsets[t])return t;if(e<this.offsets[t])return t-1}return this.total-1}offset(e){return this.offsets[e]}totalHeight(){return this.heights.reduce(((e,t)=>e+t),0)}updateRowHeight(e,t){this.heights[e]+=t,this.offsets=((e,t,i)=>[...e.slice(0,t+1),...e.slice(t+1).map((e=>e+i))])(this.offsets,e,t)}};const tt=e=>Math.max(e,0);let it=class{constructor(e){this.offset=e}},st=class{constructor(e){this.skip=e}},at=class{constructor(e,t){this.onScrollAction=e,this.onPageAction=t,this.firstLoaded=0,this.bottomOffset=0,this.topOffset=0}create(e,t,i,s,a=0,n=0,o="vertical"){this.rowHeightService=e,this.firstLoaded=t,this.lastLoaded=t+i,this.take=i,this.total=s,this.lastScrollTop=0,this.topOffset=a,this.bottomOffset=n,this.direction=o;const r=this.rowsForHeight(a),l=tt(t-r);this.onScrollAction(new it(this.rowOffset(l))),this.onPageAction(new st(l))}onScroll({scrollLeft:e,scrollTop:t,offsetHeight:i,offsetWidth:s}){const a="vertical"===this.direction?t:e,n="vertical"===this.direction?i:s;if(this.lastScrollTop===a)return;const o=this.lastScrollTop>=a;this.lastScrollTop=a;const r=this.rowHeightService.index(tt(a-this.topOffset)),l=this.rowHeightService.index(tt(a+n-this.bottomOffset));if(!o&&l>=this.lastLoaded&&this.lastLoaded<this.total&&(this.firstLoaded=r,this.onScrollAction(new it(this.rowOffset(r))),this.lastLoaded=Math.min(this.firstLoaded+this.take,this.total),this.onPageAction(new st(this.firstLoaded))),o&&r<=this.firstLoaded){const e=Math.floor(.3*this.take);this.firstLoaded=tt(r-e),this.onScrollAction(new it(this.rowOffset(this.firstLoaded))),this.lastLoaded=Math.min(this.firstLoaded+this.take,this.total),this.onPageAction(new st(this.firstLoaded))}}rowOffset(e){return this.rowHeightService.offset(e)+this.topOffset}rowsForHeight(e){return Math.ceil(e/this.rowHeightService.height(0))}},nt=function(e){return e[e.Backward=0]="Backward",e[e.Forward=1]="Forward",e}({});const ot={[nt.Forward]:e=>t=>t+e,[nt.Backward]:e=>t=>t-e},rt={[nt.Forward]:e=>t=>Math.min(t,e),[nt.Backward]:e=>t=>Math.max(t,e)},lt={[nt.Forward]:e=>t=>t<e,[nt.Backward]:e=>t=>t>e},ht=t.defineComponent({name:"Virtualization",emits:{scroll:e=>!0,scrollaction:e=>!0},props:{bottomOffset:{type:Number,required:!0},direction:{type:String,default:function(){return"vertical"}},forceScroll:{type:Boolean,default:!1},itemHeight:Number,itemWidth:Number,maxScrollDifference:{type:Number,default:100},scrollDuration:{type:Number,default:100},scrollOffsetSize:{type:Number,default:0},skip:{type:Number,required:!0},tabIndex:Number,take:{type:Number,required:!0},topOffset:{type:Number,required:!0},total:{type:Number,required:!0},role:String},created(){this.animationInProgress=!1,this.lastTotal=void 0,this.scrollerService=new at(this.handleScrollAction,this.handlePageAction)},mounted(){this.scrollContainer=this.$refs.scrollContainer},computed:{element(){return this.scrollContainer}},methods:{containerOffsetSize(){return this.getContainerProperty("vertical"===this.$props.direction?"offsetHeight":"offsetWidth")},containerScrollSize(){return this.getContainerProperty("vertical"===this.$props.direction?"scrollHeight":"scrollWidth")},containerScrollPosition(){return this.getContainerProperty("vertical"===this.$props.direction?"scrollTop":"scrollLeft")},activeIndex(){return this.itemIndex(Math.ceil(this.containerScrollPosition()))},itemIndex(e){return this.rowHeightService?this.rowHeightService.index(e):0},itemOffset(e){return this.rowHeightService?this.rowHeightService.offset(e):0},isIndexVisible(e){if(!this.rowHeightService)return!1;const t=this.containerScrollPosition(),i=t+this.containerOffsetSize(),s=this.rowHeightService.offset(e),a=s+this.rowHeightService.height(e);return s>=t&&a<=i},isListScrolled(e){return!!this.rowHeightService&&this.containerScrollPosition()!==this.rowHeightService.offset(e)},scrollTo(e){const t="vertical"===this.$props.direction?"scrollTop":"scrollLeft";this.scrollContainer&&(this.scrollContainer[t]=e)},scrollToIndex(e){this.rowHeightService&&(this.animationInProgress=!1,this.scrollTo(this.rowHeightService.offset(e)))},animateToIndex(e){if(!this.rowHeightService||!window)return;window.cancelAnimationFrame(this.cancelAnimation);const t=this.rowHeightService.offset(e),i=this.getContainerScrollDirection(t);let{start:s,end:a}=this.scrollRange(t,i);if(s===a)return;const n=this.scrollStep(s,a),o=ot[i](n),r=rt[i](a),l=lt[i](o(a)),h=e=>{this.animationInProgress=!0;const t=o(e);this.scrollTo(r(t)),l(t)?this.cancelAnimation=window.requestAnimationFrame((()=>{h(t)})):this.animationInProgress=!1};this.cancelAnimation=window.requestAnimationFrame((()=>{h(s)}))},scrollToBottom(){this.rowHeightService&&this.scrollTo(this.rowHeightService.totalHeight()+this.$props.bottomOffset)},scrollStep(e,t){const i=this.$props.scrollDuration;return Math.abs(t-e)/(i/17)},scrollRange(e,t){const i=this.containerScrollPosition();if(parseInt(`${e}`,10)===parseInt(`${i}`,10))return{start:e,end:e};const s=this.containerMaxScroll(),a=t===nt.Backward?1:-1,n=((e,t,i)=>Math.min(Math.abs(t-e),i))(i,e,this.$props.maxScrollDifference),o=Math.min(e,s);return{start:Math.min(Math.max(o+a*n,0),s),end:o}},containerMaxScroll(){return this.containerScrollSize()-this.containerOffsetSize()},getContainerScrollDirection(e){return e<this.containerScrollPosition()?nt.Backward:nt.Forward},initServices(e){const t=e||this.$props,i="vertical"===t.direction?t.itemHeight:t.itemWidth;void 0!==i&&(this.rowHeightService=new et(t.total,i,0),this.scrollerService.create(this.rowHeightService,t.skip,t.take,t.total,t.topOffset,this.$props.scrollOffsetSize,this.$props.direction))},getContainerProperty(e){return this.scrollContainer?this.scrollContainer[e]:0},handleScroll(e){if(!this.scrollContainer||!this.rowHeightService)return;const t=e.target;this.scrollerService.onScroll({scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,offsetHeight:t.offsetHeight,offsetWidth:t.offsetWidth});const i={index:this.rowHeightService.index(this.containerScrollPosition()-this.$props.topOffset),target:t,scrollAction:this.scrollAction,pageAction:this.pageAction,animationInProgress:this.animationInProgress};this.$emit("scrollaction",i),this.scrollAction=void 0,this.pageAction=void 0},handleScrollAction(e){this.scrollAction=e},handlePageAction(e){this.pageAction=e}},render(){const e=i.getDefaultSlots(this);(this.lastTotal!==this.$props.total||this.lastDirection!==this.$props.direction||this.lastTake!==this.$props.take)&&(this.initServices(),this.lastTotal=this.$props.total,this.lastDirection=this.$props.direction,this.lastTake=this.$props.take);const s=`${(this.rowHeightService?this.rowHeightService.totalHeight():0)+this.$props.bottomOffset}`,a="vertical"===this.$props.direction?{height:`${s}px`}:{width:`${s}px`},n=i.classNames("k-content k-scrollable",{"k-scrollable-horizontal":"horizontal"===this.$props.direction}),o=i.classNames("k-scrollable-placeholder",{"k-scrollable-horizontal-placeholder":"horizontal"===this.$props.direction});return t.createVNode("div",{ref:"scrollContainer",onScroll:this.handleScroll,class:n,tabindex:this.$props.tabIndex,role:this.$props.role},[e,t.createVNode("div",{style:a,class:o},null)])}}),ut=(e,t)=>{const i=s.cloneDate(e);return i.setHours(t),i},dt=e=>null!==e&&e<12,ct=(e,t,i)=>!t&&!i||e>=t&&e<=i,pt=(e,t,i)=>!t&&!i||e>=t||e<=i;let mt=class{constructor(){this.didCalculate=!1}ensureHeights(){void 0===this.timeListHeight&&this.calculateHeights()}calculateHeights(e){if(!i.canUseDOM)return;const t=M("div"),s=M("ul"),a=M("li"),n=t([t([t([s([a("<span>02</span>","k-item")],"k-reset")],"k-time-container k-content k-scrollable")],"k-time-list")],"k-time-list-wrapper",{left:"-10000px",position:"absolute"}),o=e&&e.querySelector(".k-time-container"),r=o||document.body,l=r.appendChild(n);this.timeListHeight=o.offsetHeight,this.itemHeight=l.querySelector("li").offsetHeight,r.removeChild(l),this.didCalculate=!0}};const gt=(e=>t=>t%e)(24),ft=(e,t)=>gt(24+e-t),vt=e=>(t,i)=>i&&s.getDate(t).getTime()!==s.getDate(i).getTime()?je(t,e):t,wt=vt(0),$t=vt(23);const yt=(e=>t=>t%e)(60),Dt=(e,t)=>yt(60+e-t),St=e=>(t,i)=>i&&t.getHours()!==i.getHours()?He(t,e):t,bt=St(0),kt=St(59);const Vt=(e=>t=>t%e)(60),It=(e,t)=>Vt(60+e-t),Ct=e=>(t,i)=>!i||t.getMinutes()===i.getMinutes()&&t.getHours()===i.getHours()?t:Pe(t,e),Mt=Ct(0),Ft=Ct(59);function xt(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const _t={[i.Keys.end]:(e,t)=>e[e.length-1],[i.Keys.home]:(e,t)=>e[0],[i.Keys.up]:(e,t)=>e[t-1],[i.Keys.down]:(e,t)=>e[t+1]},Tt={[_e]:class{constructor(e){this.intl=e}apply(e,t){const i=e.getHours(),s=dt(i),a=dt(t.getHours());if(s&&a||!s&&!a)return e;const[n,o=24]=this.normalizedRange(),r=i+(a?-12:12);return ut(e,Math.min(Math.max(n,r),o||24))}configure(e){const{min:t=this.min,max:i=this.max,part:s=this.part}=e;this.min=t,this.max=i,this.part=s}data(e){const t=this.part.names;if(!t)return[];const i=[],[s,a]=this.normalizedRange(),n=this.intl.dateFormatNames(t);return dt(s)&&i.push({text:n.am,value:ut(this.min,s)}),(e=>null!==e&&(!e||e>11))(a)&&i.push({text:n.pm,value:ut(this.min,Math.max(12,a))}),this.min.getHours()!==s?i.reverse():i}isRangeChanged(e,t){return!1}limitRange(e,t,i){return[e,t]}total(){const[e,t]=this.normalizedRange();return(e||t)&&(e>11||t<12)?1:2}selectedIndex(e){if(!this.valueInList(e))return-1;const t=Math.floor(e.getHours()/12);return this.min.getHours()===this.normalizedRange()[0]?t:0===t?1:0}valueInList(e){return(this.min.getHours()!==this.normalizedRange()[0]?pt:ct)(e.getHours(),this.min.getHours(),this.max.getHours())}normalizedRange(){const e=this.min.getHours(),t=this.max.getHours();return[Math.min(e,t),Math.max(e,t)]}},[Te]:class{constructor(e){this.intl=e,this.boundRange=!1,this.insertUndividedMax=!1}apply(e,t){return je(e,t.getHours())}configure(e){const{boundRange:t=this.boundRange,insertUndividedMax:i=this.insertUndividedMax,min:s=this.min,max:a=this.max,part:n,step:o=this.step}=e;this.boundRange=t,this.insertUndividedMax=i,this.toListItem=e=>{const t=je(g,e);return{text:this.intl.formatDate(t,n.pattern),value:t}},this.min=s,this.max=a,this.step=o}data(e){const[t]=this.range(e),i=((e,t)=>i=>gt(e+i*t))(t,this.step),s=qe(0,this.countFromMin(e)).map((e=>this.toListItem(i(e))));return this.addLast(s),e&&this.addMissing(s,e),s}isRangeChanged(e,t){return!s.isEqual(this.min,e)||!s.isEqual(this.max,t)}limitRange(e,t,i){return this.boundRange?[wt(e,i),$t(t,i)]:[e,t]}total(e){const t=this.insertUndividedMax&&this.isLastMissing(e)?1:0,i=this.isMissing(e)?1:0;return this.countFromMin(e)+i+t}selectedIndex(e){return Math.ceil(this.divideByStep(e))}valueInList(e){return!e||(this.insertUndividedMax&&this.lastHour(e)===e.getHours()||!this.isMissing(e))}addLast(e,t){return this.insertUndividedMax&&this.isLastMissing(t)&&e.push(this.toListItem(this.lastHour(t))),e}addMissing(e,t){if(this.valueInList(t))return e;const i=this.toListItem(t.getHours());return e.splice(this.selectedIndex(t),0,i),e}countFromMin(e){const[t,i]=this.range(e);return Math.floor(ft(i,t)/this.step)+1}isMissing(e){return!!e&&this.selectedIndex(e)!==this.divideByStep(e)}isLastMissing(e){return this.isMissing(je(this.max,this.lastHour(e)))}divideByStep(e){return ft(e.getHours(),this.min.getHours())/this.step}lastHour(e){return this.range(e)[1]}range(e){const[t,i]=this.limitRange(this.min,this.max,e);return[t.getHours(),i.getHours()]}},[Re]:class{constructor(e){this.intl=e,this.insertUndividedMax=!1}apply(e,t){return He(e,t.getMinutes())}configure(e){const{insertUndividedMax:t=this.insertUndividedMax,min:i=this.min,max:s=this.max,part:a,step:n=this.step}=e;this.insertUndividedMax=t,this.toListItem=e=>{const t=He(g,e);return{text:this.intl.formatDate(t,a.pattern),value:t}},this.min=i,this.max=s,this.step=n}data(e){const[t]=this.range(e),i=((e,t)=>i=>yt(e+i*t))(t,this.step),s=qe(0,this.countFromMin(e)).map((e=>this.toListItem(i(e))));return this.addLast(s),e&&this.addMissing(s,e),s}isRangeChanged(e,t){return!s.isEqual(this.min,e)||!s.isEqual(this.max,t)}limitRange(e,t,i){return[bt(e,i),kt(t,i)]}total(e){const t=this.insertUndividedMax&&this.isLastMissing(e)?1:0,i=this.isMissing(e)?1:0;return this.countFromMin(e)+i+t}selectedIndex(e){return Math.ceil(this.divideByStep(e))}valueInList(e){return!e||(this.insertUndividedMax&&this.lastMinute(e)===e.getMinutes()||!this.isMissing(e))}addLast(e,t){return this.insertUndividedMax&&this.isLastMissing(t)&&e.push(this.toListItem(this.lastMinute(t))),e}addMissing(e,t){if(this.valueInList(t))return e;const i=this.toListItem(t.getMinutes());return e.splice(this.selectedIndex(t),0,i),e}countFromMin(e){const[t,i]=this.range(e);return Math.floor(Dt(i,t)/this.step)+1}isMissing(e){return!!e&&this.selectedIndex(e)!==this.divideByStep(e)}isLastMissing(e){return this.isMissing(He(this.max,this.lastMinute(e)))}divideByStep(e){return Dt(e.getMinutes(),this.min.getMinutes())/this.step}lastMinute(e){return this.range(e)[1]}range(e){const[t,i]=this.limitRange(this.min,this.max,e);return[t.getMinutes(),i.getMinutes()]}},[Ne]:class{constructor(e){this.intl=e,this.insertUndividedMax=!1}apply(e,t){return Pe(e,t.getSeconds())}configure(e){const{insertUndividedMax:t=this.insertUndividedMax,min:i=this.min,max:s=this.max,part:a,step:n=this.step}=e;this.insertUndividedMax=t,this.toListItem=e=>{const t=Pe(g,e);return{text:this.intl.formatDate(t,a.pattern),value:t}},this.min=i,this.max=s,this.step=n}data(e){const[t]=this.range(e),i=((e,t)=>i=>Vt(e+i*t))(t,this.step),s=qe(0,this.countFromMin(e)).map((e=>this.toListItem(i(e))));return this.addLast(s),e&&this.addMissing(s,e),s}isRangeChanged(e,t){return!s.isEqual(this.min,e)||!s.isEqual(this.max,t)}limitRange(e,t,i){return[Mt(e,i),Ft(t,i)]}total(e){const t=this.insertUndividedMax&&this.isLastMissing(e)?1:0,i=this.isMissing(e)?1:0;return this.countFromMin(e)+i+t}selectedIndex(e){return Math.ceil(this.divideByStep(e))}valueInList(e){return!e||(this.insertUndividedMax&&this.lastSecond(e)===e.getSeconds()||!this.isMissing(e))}divideByStep(e){return It(e.getSeconds(),this.min.getSeconds())/this.step}addLast(e,t){return this.insertUndividedMax&&this.isLastMissing(t)&&e.push(this.toListItem(this.lastSecond(t))),e}addMissing(e,t){if(this.valueInList(t))return e;const i=this.toListItem(t.getSeconds());return e.splice(this.selectedIndex(t),0,i),e}countFromMin(e){const[t,i]=this.range(e);return Math.floor(It(i,t)/this.step)+1}isMissing(e){return!!e&&this.selectedIndex(e)!==this.divideByStep(e)}isLastMissing(e){return this.isMissing(Pe(this.max,this.lastSecond(e)))}lastSecond(e){return this.range(e)[1]}range(e){const[t,i]=this.limitRange(this.min,this.max,e);return[t.getSeconds(),i.getSeconds()]}}},Rt=t.defineComponent({name:"KendoTimeList",emits:{change:e=>!0,focus:e=>!0,blur:e=>!0},props:{id:Number,boundRange:{type:Boolean,default:!1},max:{type:Date,default:function(){return $}},min:{type:Date,default:function(){return g}},part:Object,step:{type:Number,default:1},value:Date,smoothScroll:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},inject:{kendoIntlService:{default:null}},data:()=>({animateToIndex:!1}),created(){this.topOffset=void 0,this.dom=new mt},computed:{animate(){return!(!this.$props.smoothScroll||!this.animateToIndex)}},mounted(){this.virtualization=this.$refs.virtualization,Promise.resolve().then((()=>{this.$el&&(this.dom.calculateHeights(this.$el),this.$forceUpdate())}))},updated(){if(!this.$refs.virtualization)return;this.virtualization=this.$refs.virtualization;const e=this.service.selectedIndex(this.$props.value);this.virtualization[this.animate?"animateToIndex":"scrollToIndex"](e),this.animateToIndex=!0},setup:()=>({kendoIntlService:t.inject("kendoIntlService",{})}),render(){let e;if(!this.$props.part.type||!Tt[this.$props.part.type])return;this.calculateHeights(),this.intl=a.provideIntlService(this),this.service=new Tt[this.$props.part.type](this.intl),this.configureServices();const i=this.service.data(this.$props.value),s="translateY("+this.topOffset+"px)",n=this.service.total(this.$props.value),o=function(){return t.createVNode("ul",{style:{transform:s,msTransform:s},class:"k-reset"},[i.map((function(e,i){return t.createVNode("li",{key:i,class:"k-item",onClick:()=>{this.handleChange(e)}},[t.createVNode("span",null,[e.text])])}),this)])};return t.createVNode("div",{class:"k-time-list",id:String(this.$props.id||""),tabindex:this.$props.disabled?-1:0,onKeydown:this.handleKeyDown,onFocusin:this.handleFocus,onFocusout:this.handleBlur,onMouseover:this.handleMouseOver},[this.dom.didCalculate?t.createVNode(ht,{bottomOffset:this.bottomOffset,class:"k-time-container",itemHeight:this.itemHeight,maxScrollDifference:this.listHeight,onScrollaction:this.handleScrollAction,ref:"virtualization",role:"presentation",skip:0,tabIndex:-1,take:n,topOffset:this.topOffset,total:n},xt(e=o.call(this))?e:{default:()=>[e]}):t.createVNode("div",{class:"k-time-container"},[o.call(this)])])},methods:{focus(e){Promise.resolve().then((()=>{this.$el&&this.$el.focus(e)}))},itemOffset(e){if(!this.virtualization)return-1;const t=this.service.selectedIndex(this.$props.value),i=this.virtualization.activeIndex(),s=this.virtualization.itemOffset(i),a=Math.abs(Math.ceil(e)-s);if(t===i&&a<2)return s;const n=t>i;return n&&a>=this.bottomThreshold||!n&&a>this.topThreshold?this.virtualization.itemOffset(i+1):s},calculateHeights(){this.dom.didCalculate&&(this.itemHeight=this.dom.itemHeight,this.listHeight=this.dom.timeListHeight,this.topOffset=(this.listHeight-this.itemHeight)/2,this.bottomOffset=this.listHeight-this.itemHeight,this.topThreshold=.05*this.itemHeight,this.bottomThreshold=.95*this.itemHeight)},configureServices(e){let{min:t,max:i,value:s}=e||this.$props;const[a,n]=this.service.limitRange(t||this.$props.min,i||this.$props.max,s||this.$props.value);this.service.configure(this.serviceSettings({min:a,max:n}))},serviceSettings(e){const t={boundRange:this.$props.boundRange,insertUndividedMax:!1,min:s.cloneDate(this.$props.min),max:s.cloneDate(this.$props.max),part:this.$props.part,step:this.$props.step},i=Object.assign({},t,e);return i.boundRange="hour"!==i.part.type||this.$props.boundRange,i},handleScrollAction({target:e,animationInProgress:t}){if(this.virtualization&&e&&!t){this.animateToIndex=!1;const t=this.virtualization.itemIndex(this.itemOffset(e.scrollTop)),i=this.service.data(this.$props.value)[t];this.handleChange(i)}},handleFocus(e){this.$emit("focus",e)},handleBlur(e){this.$emit("blur",e)},handleMouseOver(){this.$el&&i.canUseDOM&&document.activeElement!==this.$el&&this.$el.focus({preventScroll:!0})},handleKeyDown(e){const{keyCode:t}=e;(t===i.Keys.down||t===i.Keys.up||t===i.Keys.end||t===i.Keys.home)&&e.preventDefault();const s=(_t[e.keyCode]||i.noop)(this.service.data(this.$props.value),this.service.selectedIndex(this.$props.value));s&&this.handleChange(s)},handleChange(e){const t=this.service.apply(this.$props.value,e.value);this.$props.value.getTime()!==t.getTime()&&(this.currentValue=t,this.$emit("change",t))}}});function Nt(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const Ot=new RegExp(`${Te}|${Re}|${Ne}|${_e}|literal`);let Bt=function(e){return e[e.Left=0]="Left",e[e.Right=1]="Right",e}({});const Lt=t.defineComponent({name:"KendoTimePart",props:{cancelButton:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},format:{type:[String,Object],default:function(){return"hh:mm a"}},max:{type:Date,default:function(){return $}},min:{type:Date,default:function(){return w}},nowButton:{type:Boolean,default:!0},steps:{type:Object,default:function(){return{}}},smoothScroll:{type:Boolean,default:!0},tabIndex:Number,value:{type:Date,default:function(){return null}},boundRange:{type:Boolean,default:!1}},emits:{change:e=>!0,focus:e=>!0,blur:e=>!0,nowclick:e=>!0},created(){this.timeLists=[],this.snapTime=Ae(Ee(this.$props.steps,this.$props.min)),this.activeListIndex=-1,this.hasActiveButton=this.hasActiveButton.bind(this)},inject:{kendoIntlService:{default:null},kendoLocalizationService:{default:null}},data:()=>({activeListIndex:null}),computed:{element(){return this._element},computedValue(){return((e,t,i)=>{if(!e||!t||!i)return e;const{candidateValue:s,minValue:a,maxValue:n}=Ke(e,t,i);return s<a?y(e,t):s>n?y(e,i):e})(this.snapTime(s.cloneDate(this.$props.value||g)),this.computedMin,this.computedMax)},intl(){return a.provideIntlService(this)},computedMin(){return this.snapTime(this.$props.min)},computedMax(){return this.snapTime(this.$props.max)}},mounted(){this._nowButton=this.$refs.nowButton,this.dateFormatParts.forEach(((e,t)=>{"literal"!==e.type&&this.timeLists.push(this.$refs["timeList"+t])}))},setup:()=>({kendoIntlService:t.inject("kendoIntlService",{}),kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){let e;const{format:s,smoothScroll:o,disabled:r}=this.$props;this.snapTime=Ae(Ee(this.$props.steps,this.computedMin)),this.dateFormatParts=this.intl.splitDateFormat(s).filter(this.timeFormatFilter);const l=i.classNames({"k-disabled":r},"k-time-part"),h=a.provideLocalizationService(this),u=h.toLanguageString(ue,$e[ue]);return t.createVNode("div",{class:l},[t.createVNode("div",{class:"k-time-header"},[t.createVNode("span",{class:"k-title"},[this.intl.formatDate(this.computedValue,this.dateFormatParts.reduce(this.timeFormatReducer,""))]),this.showNowButton()&&t.createVNode(n.Button,{type:"button",ref:"nowButton",fillMode:"flat",class:"k-time-now",title:u,"aria-label":u,onClick:this.onNowClick,tabIndex:r?-1:0},Nt(e=h.toLanguageString(he,$e[he]))?e:{default:()=>[e]})]),t.createVNode("div",{class:"k-time-list-container",onKeydown:this.handleKeyDown},[t.createVNode("span",{class:"k-time-highlight"},null),this.dateFormatParts.map((function(e,s){return"literal"!==e.type?t.createVNode("div",{key:s,class:i.classNames("k-time-list-wrapper",{"k-focus":s===this.activeListIndex}),role:"presentation",tabindex:-1},[t.createVNode("span",{class:"k-title",onMousedown:e=>{e.preventDefault()}},[this.intl.dateFieldName(e)]),t.createVNode(Rt,{min:this.computedMin,max:this.computedMax,boundRange:this.$props.boundRange,part:e,step:e.type?this.$props.steps[e.type]:1,smoothScroll:o,ref:"timeList"+s,id:s,onFocus:e=>{this.handleListFocus(e,s)},onBlur:this.handleListBlur,onChange:this.handleChange,value:this.computedValue,disabled:r},null)]):t.createVNode("div",{key:s,class:"k-time-separator"},[e.pattern])}),this)])])},methods:{onNowClick(e){this.$emit("nowclick",e)},focus(e){this.$nextTick((()=>{const t=this.timeLists[0];!this.hasActiveButton()&&t&&t.$el&&t.focus(e)}))},timeFormatReducer:(e,t)=>e+t.pattern,timeFormatFilter(e,t,i){const s=t>=1&&i[t-1];return s&&s&&"literal"===e.type?Ot.test(s.type||""):Ot.test(e.type||"")},hasActiveButton(){return i.canUseDOM&&this._nowButton&&document.activeElement===this._nowButton.$el},focusList(e){this.timeLists.length&&this.timeLists.reduce(this.listReducer,[]).map((t=>e===Bt.Right?t.next:t.prev)).map((e=>e&&e.$el&&e.$el.focus({preventScroll:!0})))},listReducer(e,t,i,s){return e.length||t.$props.id!==this.activeListIndex?e:[{next:s[i+1]||t,prev:s[i-1]||t}]},showNowButton(){return!this.hasSteps()&&this.$props.nowButton&&Ye(ze(),this.computedMin,this.computedMax)},hasSteps(){const e=Object.keys(this.$props.steps);return e.length!==e.reduce(((e,t)=>e+this.$props.steps[t]),0)},handleKeyDown(e){const{keyCode:t}=e;switch(t){case i.Keys.left:return e.preventDefault(),void this.focusList(Bt.Left);case i.Keys.right:return e.preventDefault(),void this.focusList(Bt.Right);default:return}},handleListBlur(e){this.$emit("blur",e)},handleListFocus(e,t){this.$emit("focus",e),this.activeListIndex=t},handleChange(e){this.$emit("change",e)}}});function Et(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const At=t.defineComponent({name:"KendoTimeSelector",emits:{change:e=>!0,focus:e=>!0,blur:e=>!0,keydown:e=>!0,reject:e=>!0},props:{cancelButton:{type:Boolean,default:!0},boundRange:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},format:{type:[String,Object],default:function(){return"t"}},max:{type:Date,default:function(){return $}},min:{type:Date,default:function(){return w}},nowButton:Boolean,steps:{type:Object,default:function(){return{}}},smoothScroll:{type:Boolean,default:!0},tabIndex:Number,value:{type:Date,default:function(){return null}},onChange:Function,onReject:Function,onKeydown:Function},created(){this.dateFormatParts=this.intl.splitDateFormat(this.$props.format),this.mergeValue=(e=>(t,i)=>(t.setHours(...e.map((e=>e(t,i)))),t))(Le(this.dateFormatParts)),this.hasActiveButton=this.hasActiveButton.bind(this),this.currentState=this.$props.value||g,this.currentValue=this.$props.value},inject:{kendoIntlService:{default:null},kendoLocalizationService:{default:null}},data:()=>({currentState:null,currentValue:null,valueDuringOnChange:void 0}),computed:{computedValue(){const e=void 0!==this.valueDuringOnChange?this.valueDuringOnChange:null!==this.$props.value?this.$props.value:this.currentValue;return null!==e?s.cloneDate(e):null},intl(){return a.provideIntlService(this)},current(){return null!==this.currentState?s.cloneDate(this.currentState):null}},mounted(){this.timePart=this.$refs.timePart,this._acceptButton=this.$refs.acceptButton,this._cancelButton=this.$refs.cancelButton},setup:()=>({kendoIntlService:t.inject("kendoIntlService",{}),kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){const{format:e,cancelButton:s,disabled:o,tabIndex:r,smoothScroll:l,min:h,max:u,boundRange:d,nowButton:c,steps:p}=this.$props,m=a.provideLocalizationService(this),g=m.toLanguageString(de,$e[de]),f=m.toLanguageString(ce,$e[ce]);return t.createVNode("div",{tabindex:o?void 0:r||0,class:i.classNames("k-timeselector",{"k-disabled":o}),onKeydown:this.handleKeyDown},[t.createVNode(Lt,{ref:"timePart",value:this.current,onChange:this.handleChange,onNowclick:this.handleNowClick,format:e,smoothScroll:l,min:h,max:u,onFocus:this.handleFocus,onBlur:this.handleBlur,boundRange:d,disabled:o,nowButton:c,steps:p},null),t.createVNode("div",{class:"k-time-footer k-actions k-actions-stretched"},[s&&t.createVNode(n.Button,{type:"button",ref:"cancelButton",class:"k-time-cancel",onClick:this.handleReject,title:g,"aria-label":g},Et(g)?g:{default:()=>[g]}),t.createVNode(n.Button,{type:"button",ref:"acceptButton",themeColor:"primary",class:"k-time-accept",onClick:this.handleAccept,title:f,"aria-label":f},Et(f)?f:{default:()=>[f]})])])},methods:{handleBlur(e){this.$emit("blur",e)},handleFocus(e){this.$emit("focus",e)},focusActiveList(){this.timePart&&this.timePart.focus({preventScroll:!0})},hasActiveButton(){return!!this._acceptButton&&(i.canUseDOM&&(document.activeElement===this._acceptButton.$el||document.activeElement===this._cancelButton.$el))},handleKeyDown(e){const{keyCode:t}=e;this.$emit("keydown",e),t!==i.Keys.enter||this.hasActiveButton()||this.handleAccept(e)},handleAccept(e){const t=this.mergeValue(s.cloneDate(this.computedValue||ze()),this.timePart?this.timePart.computedValue:this.current);this.currentValue=t,this.valueDuringOnChange=t,this.$emit("change",{event:e,value:this.computedValue,target:this}),this.valueDuringOnChange=void 0},handleReject(e){this.currentState=this.computedValue,this.$emit("reject",e)},handleNowClick(e){const t=this.mergeValue(s.cloneDate(this.computedValue||ze()),ze());this.currentState=t,this.currentValue=t,this.valueDuringOnChange=t,this.$emit("change",{event:e,value:this.computedValue,target:this}),this.valueDuringOnChange=void 0},handleChange(e){this.currentState=e}}});function jt(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const Ht=t.defineComponent({name:"KendoTimePicker",emits:{changemodel:e=>!0,"update:modelValue":e=>!0,iconclick:e=>!0,change:e=>!0,focus:e=>!0,blur:e=>!0,keydown:e=>!0,open:e=>!0,close:e=>!0},model:{event:"changemodel"},props:{cancelButton:{type:Boolean,default:!0},nowButton:{type:Boolean,default:void 0},defaultShow:{type:Boolean,default:!1},modelValue:{type:Date,default:void 0},defaultValue:{type:Date,default:function(){return null}},dateInput:{type:[String,Object,Function],default:function(){}},popup:{type:[String,Object,Function],default:function(){}},disabled:{type:Boolean,default:!1},format:{type:[String,Object],default:function(){return"t"}},formatPlaceholder:{type:[String,Object],default:function(){return Me}},rounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].includes(e)}},id:String,ariaLabelledBy:String,ariaDescribedBy:String,min:{type:Date,default:function(){return w}},max:{type:Date,default:function(){return $}},name:String,label:String,placeholder:String,popupSettings:{type:Object,default:function(){return{}}},show:{type:Boolean,default:void 0},tabIndex:{type:Number,default:0},steps:{type:Object,default:function(){return{}}},smoothScroll:{type:Boolean,default:!0},title:{type:String,default:function(){return""}},value:{type:Date,default:function(){}},width:[Number,String],validationMessage:String,required:{type:Boolean,default:!1},validityStyles:{type:Boolean,default:!0},validate:Boolean,valid:{type:Boolean,default:void 0},inputAttributes:Object},created(){this._anchor=i.guid(),this._popupId="popup"+i.guid(),this._element=null,this._wrapper=null,this._dateInput=null,this._timeSelector=null,this.shouldFocusDateInput=!1,this.currentValue=this.$props.defaultValue,this.currentShow=this.$props.defaultShow},inject:{kendoLocalizationService:{default:null}},data:()=>({currentValue:null,currentShow:!1,valueDuringOnChange:void 0,showDuringOnChange:void 0,isFocused:!1}),computed:{timeSelector(){return this._timeSelector},computedValue(){const e=void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.$props.value?this.$props.value:void 0!==this.$props.modelValue?this.$props.modelValue:this.$data.currentValue;return null!==e?s.cloneDate(e):null},computedShow(){return void 0!==this.showDuringOnChange?this.showDuringOnChange:void 0!==this.$props.show?this.$props.show:this.currentShow}},watch:{show:function(e,t){this._oldShow=t},currentShow:function(e,t){this._oldShow=t}},mounted(){this.computedShow&&this.$forceUpdate(),this._dateInput=this.dateInputRef,this._timeSelector=this.$refs.timeSelector,this._wrapper=this.kendoAnchorRef,this._dateInput&&this._dateInput.element()&&this._dateInput.element().setAttribute("aria-haspopup","true")},updated(){this._dateInput=this.dateInputRef,this._timeSelector=this.$refs.timeSelector,this._wrapper=this.kendoAnchorRef,this._timeSelector&&this.computedShow&&!this._oldShow?this._timeSelector.focusActiveList():this._dateInput&&this._dateInput.element()&&!this.computedShow&&this.shouldFocusDateInput&&this._dateInput.element().focus({preventScroll:!0}),this.shouldFocusDateInput=!1},setup:()=>({kendoAnchorRef:t.ref(null),kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){const e=i.getDefaultSlots(this),{disabled:s,tabIndex:h,title:u,id:d,placeholder:c,format:p,formatPlaceholder:m,smoothScroll:g,width:f,name:v,steps:w,cancelButton:$,nowButton:y,validationMessage:D,required:S,validityStyles:b,ariaLabelledBy:k,ariaDescribedBy:V,size:I,rounded:C,fillMode:M,inputAttributes:F}=this.$props,{popupClass:x,appendTo:_,animate:T}=this.$props.popupSettings,R=!this.$props.validityStyles||this.validity().valid;i.classNames("k-picker-wrap",{"k-invalid":!R,"k-disabled":s,"k-focus":this.isFocused});const N=i.classNames("k-group k-reset",x),O=a.provideLocalizationService(this),B=O.toLanguageString(me,$e[me]),L=O.toLanguageString(pe,$e[pe]),E=this.$props.dateInput?i.templateRendering.call(this,this.$props.dateInput,i.getListeners.call(this)):void 0,A=t.createVNode(Ge,{ref:e=>{this.dateInputRef=e},placeholder:c,disabled:s,format:p,formatPlaceholder:m,id:d,size:null,rounded:null,fillMode:null,max:this.normalizeTime(this.$props.max),min:this.normalizeTime(this.$props.min),name:v,onChange:this.handleInputValueChange,required:S,steps:w,tabIndex:this.computedShow?-1:h,title:u,valid:this.validity().valid,validationMessage:D,validityStyles:b,value:this.computedValue&&this.normalizeTime(this.computedValue),ariaHasPopup:"grid",ariaExpanded:this.computedShow,ariaRole:"combobox",ariaControls:this._popupId,inputAttributes:F},jt(e)?e:{default:()=>[e]}),j=t.createVNode(At,{ref:"timeSelector",cancelButton:$,disabled:s,nowButton:y,format:p,min:this.$props.min,max:this.$props.max,steps:w,smoothScroll:g,value:this.computedValue,onChange:this.handleValueChange,onReject:this.handleValueReject,onFocus:this.timeFocus,onBlur:this.timeBlur,onKeydown:this.handleKeyDown},null),H=i.getTemplate.call(this,{h:t.h,template:E,defaultRendering:A,additionalListeners:{change:this.handleInputValueChange}}),P=this.$props.popup?i.templateRendering.call(this,this.$props.popup,i.getListeners.call(this)):void 0,z=t.createVNode(l.Popup,{show:this.computedShow,anchor:this._anchor,class:N,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},appendTo:_,animate:T},jt(j)?j:{default:()=>[j]}),q=i.getTemplate.call(this,{h:t.h,template:P,defaultRendering:z,defaultSlots:j}),K=t.createVNode("div",{class:i.classNames("k-input","k-timepicker",{[`k-input-${i.kendoThemeMaps.sizeMap[I]||I}`]:I,[`k-input-${M}`]:M,[`k-rounded-${i.kendoThemeMaps.roundedMap[C]||C}`]:C,"k-invalid":!R,"k-required":this.required,"k-disabled":this.$props.disabled,"k-focus":this.isFocused}),onKeydown:this.handleKeyDown,style:{width:f},onFocusin:this.handleFocus,onFocusout:this.handleBlur,ref:e=>{this.kendoAnchorRef=e}},[H,t.createVNode(n.Button,{type:"button",tabIndex:-1,icon:"clock",svgIcon:o.clockIcon,onMousedown:this.handleIconMouseDown,onClick:this.handleIconClick,title:L,rounded:null,class:"k-input-button","aria-controls":this._popupId,"aria-label":B},null),q]);return this.$props.label?t.createVNode(r.FloatingLabel,{label:this.$props.label,editorId:d,editorValid:R,editorValue:this.getDateInputText(),editorPlaceholder:this.$props.placeholder,editorDisabled:this.$props.disabled,style:{width:f}},jt(K)?K:{default:()=>[K]}):K},methods:{validity(){const e=this.computedValue&&this.normalizeTime(this.computedValue),t=this.normalizeTime(this.$props.min),i=this.normalizeTime(this.$props.max),s=Ue(e,t,i),a=void 0!==this.$props.validationMessage,n=(!this.$props.required||null!==this.computedValue)&&s,o=void 0!==this.$props.valid?this.$props.valid:n;return{customError:a,rangeOverflow:Ze(e,i),rangeUnderflow:We(e,t),valid:o,valueMissing:null===this.computedValue}},getDateInputText(){return!!this.computedValue||(this._dateInput?this._dateInput._element.value:"")},focus(){this._dateInput&&this._dateInput.focus()},normalizeTime:e=>y(g,e),setShow(e){this.computedShow!==e&&(this.currentShow=e,this.$emit(e?"open":"close",{component:this}))},mergeTime(e){return this.computedValue&&e?y(this.computedValue,e):e},handleInputValueChange(e){const t=this.mergeTime(e.value);this.handleValueChange({...e,value:t})},handleValueChange(e){this.currentValue=s.cloneDate(e.value),this.valueDuringOnChange=e.value,this.showDuringOnChange=!1,this.shouldFocusDateInput=!0,this.$emit("changemodel",this.computedValue),this.$emit("update:modelValue",this.computedValue),this.$emit("change",{event:e.event,value:this.computedValue,show:this.computedShow,component:this,target:{name:this.$props.name,value:this.computedValue,valueAsDate:this.computedValue}}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,this.setShow(!1)},handleFocus(e){this._oldShow=this.computedShow,this.isFocused=!0,this.$emit("focus",{event:e})},handleBlur(e){this.createBlurTimeout(),this.$emit("blur",{event:e})},timeBlur(e){this.$emit("blur",{event:e}),clearTimeout(this._blurTimeout),this.createBlurTimeout()},timeFocus(){clearTimeout(this._blurTimeout)},createBlurTimeout(){this._blurTimeout=setTimeout((()=>{this.isFocused=!1;const e=document.activeElement&&document.activeElement.closest(`#${this._popupId}`);this._dateInput&&i.canUseDOM&&document.activeElement!==this._dateInput.element()&&!e&&this.setShow(!1)}),200)},handleValueReject(e){this.setShow(!1)},handleIconClick(e){this.$props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.computedShow),this.$emit("iconclick",e))},handleIconMouseDown(e){e.preventDefault()},handleKeyDown(e){const{altKey:t,keyCode:s}=e;return s===i.Keys.tab&&this._dateInput&&e.target!==this._dateInput._element?(e.preventDefault(),this.shouldFocusDateInput=!0,void this.setShow(!1)):s===i.Keys.esc?(this.shouldFocusDateInput=!0,void this.setShow(!1)):(t&&(s===i.Keys.up||s===i.Keys.down)&&(e.preventDefault(),e.stopPropagation(),this.shouldFocusDateInput=s===i.Keys.up,this.setShow(s===i.Keys.down)),void this.$emit("keydown",e))}}}),Pt=t.defineComponent({name:"KendoDateRangePicker",emits:{blur:e=>!0,change:e=>!0,changemodel:e=>!0,"update:modelValue":e=>!0,focus:e=>!0,keydown:e=>!0,open:e=>!0,close:e=>!0},inject:{kendoLocalizationService:{default:null}},model:{event:"changemodel"},props:{allowReverse:{type:Boolean,default:!1},calendarSettings:Object,defaultShow:{type:Boolean,default:!1},defaultValue:{type:Object,default:function(){return p}},modelValue:{type:Object,default:void 0},disabled:{type:Boolean,default:!1},popup:[String,Object,Function],calendar:[String,Object,Function],startDateInput:[String,Object,Function],endDateInput:[String,Object,Function],endDateInputSettings:Object,focusedDate:Date,format:{type:[String,Object],default:function(){return"d"}},id:String,ariaLabelledBy:String,ariaDescribedBy:String,max:{type:Date,default:function(){return N}},min:{type:Date,default:function(){return R}},rounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].includes(e)}},popupSettings:{type:Object,default:function(){return{}}},show:{type:Boolean,default:void 0},startDateInputSettings:Object,swapButton:{type:Boolean,default:!1},tabIndex:Number,value:{type:Object,default:function(){}},inputAttributes:Object},created(){this._element=null,this._wrapper=null,this._calendar=null,this._startDateInput=null,this._endDateInput=null,this._popupId=i.guid(),this._anchor=i.guid(),this._startInputId=i.guid(),this._endInputId=i.guid(),this._calendarId=i.guid(),i.validatePackage(h),this.currentShow=this.$props.show||this.$props.defaultShow,this.currentValue=this.$props.value||this.$props.defaultValue,this.initialAnimation=this.currentShow},mounted(){this._calendar=this.calendarRef,this._startDateInput=this.startDateInputRef,this._endDateInput=this.endDateInputRef,this.computedShow&&(this.$forceUpdate(),this.$nextTick((function(){this.initialAnimation=!1})))},updated(){this._calendar=this.calendarRef,this._startDateInput=this.startDateInputRef,this._endDateInput=this.endDateInputRef,this.shouldFocusCalendar&&this.focusCalendarElement(),this.shouldFocusDateInput&&this.focusDateInputElement(),this.shouldFocusCalendar=!1,this.shouldFocusDateInput=!1},data:()=>({currentShow:!1,currentValue:null,valueDuringOnChange:void 0,shouldFocusDateInput:!1,shouldFocusCalendar:!1}),computed:{rootClassName(){return{"k-daterangepicker":!0,"k-disabled":this.$props.disabled}},computedValue(){return(void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.$props.value?this.$props.value:void 0!==this.$props.modelValue?this.$props.modelValue:this.currentValue)||p},computedShow(){return void 0!==this.$props.show?this.$props.show:this.currentShow},swapButtonClass(){const{size:e,rounded:t}=this.$props;return{"k-button":!0,[`k-button-${i.kendoThemeMaps.sizeMap[e]||e}`]:e,"k-button-flat":!0,"k-button-flat-base":!0,"k-icon-button":!0,[`k-rounded-${i.kendoThemeMaps.roundedMap[t]||t}`]:t}}},setup:()=>({kendoAnchorRef:t.ref(null),kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){const e=this.computedValue||p,{size:s,fillMode:n,rounded:r}=this.$props,h=(this.$props.startDateInputSettings||{}).id||this._startInputId,u=(this.$props.endDateInputSettings||{}).id||this._endInputId,d=a.provideLocalizationService(this),c=d.toLanguageString(ne,$e[ne]),m=d.toLanguageString(oe,$e[oe]),g=d.toLanguageString(re,$e[re]),f=this.$props.startDateInput?i.templateRendering.call(this,this.$props.startDateInput,i.getListeners.call(this)):void 0,v={label:c,format:this.$props.format,min:this.min,max:this.max,id:this._startInputId,disabled:this.$props.disabled,valid:this.$props.valid,size:s,fillMode:n,rounded:r,ariaHasPopup:"grid",ariaExpanded:this.computedShow,value:e.start,ariaRole:"combobox",ariaControls:this._popupId,inputAttributes:this.$props.inputAttributes,...this.$props.startDateInputSettings},w=t.h(Ge,{ref:e=>{this.startDateInputRef=e},...v,onChange:this.handleStartChange}),$=i.getTemplate.call(this,{h:t.h,template:f,defaultRendering:w,additionalListeners:{change:this.handleStartChange}}),y=this.$props.endDateInput?i.templateRendering.call(this,this.$props.endDateInput,i.getListeners.call(this)):void 0,D={label:m,format:this.$props.format,min:this.min,max:this.max,id:this._endInputId,size:s,fillMode:n,rounded:r,disabled:this.$props.disabled,valid:this.$props.valid,ariaHasPopup:"grid",ariaExpanded:this.computedShow,value:e.end,ariaRole:"combobox",ariaControls:this._popupId,inputAttributes:this.$props.inputAttributes,...this.$props.endDateInputSettings},S=t.h(Ge,{ref:e=>{this.endDateInputRef=e},...D,onChange:this.handleEndChange}),b=i.getTemplate.call(this,{h:t.h,template:y,defaultRendering:S,additionalListeners:{change:this.handleEndChange}}),k=this.$props.calendar?i.templateRendering.call(this,this.$props.calendar,i.getListeners.call(this)):void 0,V={id:this._calendarId,min:this.min,max:this.max,views:2,allowReverse:this.$props.allowReverse,mode:"range",focusedDate:this.$props.focusedDate,disabled:this.$props.disabled,value:e,...this.$props.calendarSettings},I=t.h(Ie,{ref:e=>{this.calendarRef=e},onKeydown:this.handleKeyDown,onFocus:this.calendarFocus,onBlur:this.calendarBlur,onChange:this.handleCalendarChange,...V}),C=i.getTemplate.call(this,{h:t.h,template:k,defaultRendering:I,additionalListeners:{change:this.handleCalendarChange,keydown:this.handleKeyDown,focus:this.calendarFocus,blur:this.calendarBlur}}),{popupClass:M,animate:F}=this.$props.popupSettings,x=this.$props.popup?i.templateRendering.call(this,this.$props.popup,i.getListeners.call(this)):void 0,_={show:this.computedShow,anchor:this._anchor,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},animate:!this.initialAnimation&&F,...this.$props.popupSettings},T=t.h(l.Popup,{class:M,..._},(function(){return[C]})),R=i.getTemplate.call(this,{h:t.h,template:x,defaultRendering:T,defaultSlots:C}),N=t.createVNode("button",{class:this.swapButtonClass,role:"button",title:a.provideLocalizationService(this).toLanguageString(ae,$e[ae]),onMousedown:this.handleReverseMouseDown,onClick:this.handleReverseClick,"aria-controls":h+" "+u,"aria-label":a.provideLocalizationService(this).toLanguageString(ae,$e[ae])},[t.createVNode(i.Icon,{name:"arrows-swap",icon:o.arrowsSwapIcon,style:{transform:"rotate(90deg)"},class:"k-button-icon"},null)]);return t.createVNode("span",{class:this.rootClassName,style:this.$attrs.style,id:this.$props.id,"aria-labelledby":this.$props.ariaLabelledBy,"aria-describedby":this.$props.ariaDescribedBy,tabindex:this.$props.tabIndex,onFocusin:this.handleFocus,onFocusout:this.handleBlur,onKeydown:this.handleKeyDown,ref:e=>{this.kendoAnchorRef=e}},[$,(this.$props.allowReverse||this.$props.calendarSettings&&this.$props.calendarSettings.allowReverse)&&this.$props.swapButton?N:g,b,R])},methods:{focus(){const e=this.getStartInput();e&&e.focus()},focusCalendarElement(){const e=this.getCalendar();e&&e.focus({preventScroll:!0})},focusDateInputElement(){const e=this.getStartInput(),t=this.getEndInput();!document||!e||!t||(null!==this.computedValue.start&&null===this.computedValue.end||document.activeElement===t?document.activeElement!==e&&t.focus({preventScroll:!0}):e.focus({preventScroll:!0}))},calculateValue:(e,t)=>(void 0!==e.value?e.value:t.currentValue)||p,calculateShow:(e,t)=>void 0!==e.show?e.show:t.currentShow,setShow(e){this.currentShow!==e&&(this.currentShow=e,this.$emit(e?"open":"close",{component:this}))},handleReverseClick(e){const t={start:this.computedValue.end,end:this.computedValue.start},i={event:e.event};this.handleChange(t,i)},handleReverseMouseDown(e){e.preventDefault()},handleFocus(e){this.shouldFocusDateInput||this.setShow(!0),this.$emit("focus",{event:e})},calendarBlur(){clearTimeout(this._blurTimeout),this.createBlurTimeout()},calendarFocus(){clearTimeout(this._blurTimeout)},createBlurTimeout(){this._blurTimeout=setTimeout((()=>{const e=this.getStartInput(),t=this.getEndInput();e&&t&&i.canUseDOM&&e&&document.activeElement!==t&&this.setShow(!1)}),200)},getStartInput(){return this._startDateInput&&this._startDateInput.element?this._startDateInput.element():document.getElementById(this._startInputId)},getEndInput(){return this._endDateInput&&this._endDateInput.element?this._endDateInput.element():document.getElementById(this._endInputId)},getCalendar(){return this._calendar&&this._calendar.element?this._calendar:document.getElementById(this._calendarId)},handleBlur(e){this.createBlurTimeout(),this.$emit("blur",{event:e})},handleEndChange(e){const t={start:this.computedValue.start,end:s.cloneDate(e.value||void 0)};this.handleChange(t,e)},handleStartChange(e){const t={start:s.cloneDate(e.value||void 0),end:this.computedValue.end};this.handleChange(t,e)},extractRangeFromValue(e){if(!(Array.isArray(e.value)||e.value instanceof Date))return e.value||p;const t=Array.isArray(e.value)?e.value[0]:e.value;return{start:null!==this.computedValue.end?t:this.computedValue.start,end:null!==this.computedValue.start?t:this.computedValue.end}},handleCalendarChange(e){const t=this.extractRangeFromValue(e);this.handleChange(t,e)},handleKeyDown(e){const{keyCode:t,altKey:s}=e,a=this.getEndInput(),n=this.getCalendar();t===i.Keys.esc?(e.preventDefault(),this.shouldFocusDateInput=!0,this.setShow(!1)):s&&t===i.Keys.down?(e.preventDefault(),this.shouldFocusCalendar=!0,this.setShow(!0)):t===i.Keys.tab&&this.computedShow&&n&&a&&document&&document.activeElement===a&&(e.preventDefault(),this.focusCalendarElement()),this.$emit("keydown",e)},handleChange(e,t){this.currentValue=e,this.valueDuringOnChange=e;const i={event:t.event,value:this.computedValue,show:this.computedShow,component:this,target:{name:this.$props.name,value:this.computedValue,show:this.computedShow}};this.$emit("changemodel",this.computedValue),this.$emit("update:modelValue",this.computedValue),this.$emit("change",i),this.valueDuringOnChange=void 0}}});function zt(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const qt=t.defineComponent({name:"KendoDateTimeSelector",props:{value:Date,disabled:{type:Boolean,default:!1},cancelButton:{type:Boolean,default:!0},min:{type:Date,default:f},max:{type:Date,default:v},maxTime:{type:Date,default:function(){return i.cloneDate($)}},minTime:{type:Date,default:function(){return i.cloneDate(w)}},weekNumber:{type:Boolean,default:!1},steps:{type:Object,default:function(){return{}}},focusedDate:Date,format:[String,Object],calendar:Object,onChange:Function,onReject:Function,onFocus:Function,onBlur:Function,onKeydown:Function},created(){this._calendarWrap=null,this.currentTab="date",this.dateValue=this.$props.value,this.timeValue=this.$props.value||T},inject:{kendoLocalizationService:{default:null}},data:()=>({currentTab:null,dateValue:null,timeValue:Date}),computed:{hasDateValue(){return null!==this.dateValue},computedMinTime(){return void 0!==this.$props.minTime?this.$props.minTime:this.normalizeRange(this.$props.min,this.dateValue)},computedMaxTime(){return void 0!==this.$props.maxTime?this.$props.maxTime:this.normalizeRange(this.$props.max,this.dateValue)}},mounted(){this._acceptButton=this.$refs.acceptButton,this._calendar=this.$refs.calendar,this._calendarWrap=this.$refs.calendarWrap,this._cancelButton=this.$refs.cancelButton,this._timePart=this.$refs.timePart,this.focus({preventScroll:!0})},updated(){this.shouldFocusPart&&this.focus({preventScroll:!0}),this.shouldFocusPart=!1},setup:()=>({kendoAnchorRef:t.ref(null),kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){const{disabled:e,cancelButton:s,min:o,max:r,weekNumber:l,focusedDate:h,format:u,steps:d}=this.$props,c=i.classNames({"k-date-tab":"date"===this.currentTab,"k-time-tab":"time"===this.currentTab,"k-disabled":e},"k-datetime-wrap"),p=a.provideLocalizationService(this),m=p.toLanguageString(ge,$e[ge]),g=p.toLanguageString(fe,$e[fe]),f=p.toLanguageString(ve,$e[ve]),v=p.toLanguageString(we,$e[we]),y=t.createVNode(Ie,{ref:"calendar",min:o,max:r,weekNumber:l,focusedDate:h,disabled:e||"date"!==this.currentTab,value:this.dateValue,onChange:this.handleCalendarValueChange,onFocus:this.handleFocus,onBlur:this.handleBlur},null),D=i.getTemplate.call(this,{h:t.h,template:this.$props.calendar,defaultRendering:y});return t.createVNode("div",{onKeydown:this.handleKeyDown,class:c,tabindex:-1},[t.createVNode("div",{class:"k-datetime-buttongroup"},[t.createVNode(n.ButtonGroup,{width:"100%"},{default:()=>[t.createVNode(n.Button,{type:"button",selected:"date"===this.currentTab,togglable:!0,onClick:this.handleDateClick},zt(m)?m:{default:()=>[m]}),t.createVNode(n.Button,{type:"button",selected:"time"===this.currentTab,togglable:!0,onClick:this.handleTimeClick},zt(g)?g:{default:()=>[g]})]})]),t.createVNode("div",{class:"k-datetime-selector"},[t.createVNode("div",{class:"k-datetime-calendar-wrap",ref:"calendarWrap"},[D]),t.createVNode("div",{class:"k-datetime-time-wrap"},[t.createVNode(Lt,{key:1,onNowclick:this.handleNowClick,disabled:e||"time"!==this.currentTab,ref:"timePart",min:this.computedMinTime||w,max:this.computedMaxTime||$,value:this.timeValue,format:u,steps:d,onChange:this.handleTimeListContainerChange,onFocus:this.handleFocus,onBlur:this.handleBlur},null)])]),t.createVNode("div",{class:"k-datetime-footer k-actions k-actions-stretched"},[s&&t.createVNode(n.Button,{type:"button",ref:"cancelButton",class:"k-time-cancel",onClick:this.handleReject,title:f,"aria-label":f},zt(f)?f:{default:()=>[f]}),t.createVNode(n.Button,{type:"button",ref:"acceptButton",disabled:!this.hasDateValue,themeColor:"primary",class:"k-time-accept",onClick:this.handleAccept,title:v,"aria-label":v},zt(v)?v:{default:()=>[v]})])])},methods:{handleBlur(e){this.$emit("blur",e)},handleFocus(e){this.$emit("focus",e)},focus(e){this.$nextTick((()=>{"time"===this.currentTab&&this._timePart&&this._timePart.focus(e);const t=this.calendarElement();"date"===this.currentTab&&t&&t.focus(e)}))},calendarElement(){return this._calendar&&this._calendar.$el?this._calendar:null},normalizeRange:(e,t)=>s.isEqualDate(e,t||D())?e:null,hasActiveButton(){return!!this._acceptButton&&(i.canUseDOM&&(document.activeElement===this._acceptButton.$el||document.activeElement===this._cancelButton.$el))},mergeTime:(e,t)=>e&&t?y(t,e):t,mergeDate:(e,t)=>e?y(e||D(),t):t,move(e){if("right"===e&&"time"===this.currentTab||"left"===e&&"date"===this.currentTab)return;const t="left"===e?"date":"time";this.shouldFocusPart=!0,this.currentTab=t},handleReject(e){this.dateValue=this.$props.value,this.timeValue=this.$props.value||T;const t={event:e,target:this,value:this.mergeDate(this.$props.value,this.$props.value||T)};this.$emit("reject",t)},handleAccept(e,t){if(!this.dateValue||!this.timeValue||!this.hasDateValue)return;const i=this.mergeDate(this.dateValue,t||this.timeValue);this.$emit("change",{event:e,value:i,target:this})},handleNowClick(e){this.timeValue=ze(),this.handleAccept(e,ze())},handleCalendarValueChange(e){e.event.stopPropagation(),this.dateValue=e.value,this.currentTab="time",this.shouldFocusPart=!0},handleTimeListContainerChange(e){this.timeValue=e},handleDateClick(e){e.stopPropagation(),this.move("left")},handleTimeClick(e){e.stopPropagation(),this.move("right")},handleKeyDown(e){const{keyCode:t,altKey:s}=e;switch(this.$emit("keydown",e),t){case i.Keys.enter:return void(!this.hasActiveButton()&&this.hasDateValue&&this.handleAccept(e));case i.Keys.left:if(!s)return;return void this.move("left");case i.Keys.right:if(!s)return;return void this.move("right");default:return}},handleTimePartMount(e){this.timeValue=e}}});function Kt(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}const Yt=t.defineComponent({name:"KendoDateTimePicker",emits:{changemodel:e=>!0,"update:modelValue":e=>!0,iconclick:e=>!0,change:e=>!0,focus:e=>!0,blur:e=>!0,keydown:e=>!0,open:e=>!0,close:e=>!0},props:{modelValue:{type:Date,default:void 0},defaultShow:{type:Boolean,default:!1},defaultValue:{type:Date,default:null},disabled:{type:Boolean,default:!1},dateInput:{type:[String,Object,Function],default:function(){}},popup:{type:[String,Object,Function],default:function(){}},calendar:{type:[String,Object,Function],default:function(){}},focusedDate:Date,format:{type:[String,Object],default:function(){return"g"}},formatPlaceholder:{type:[String,Object],default:function(){return Me}},rounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].includes(e)}},id:String,ariaLabelledBy:String,ariaDescribedBy:String,min:{type:Date,default:function(){return f}},max:{type:Date,default:function(){return v}},maxTime:{type:Date,default:function(){return s.cloneDate($)}},minTime:{type:Date,default:function(){return s.cloneDate(O)}},name:String,label:String,placeholder:String,popupSettings:{type:Object,default:function(){return{}}},show:{type:Boolean,default:void 0},tabIndex:{type:Number,default:0},title:{type:String,default:function(){return""}},steps:{type:Object,default:function(){return{}}},value:Date,weekNumber:{type:Boolean,default:!1},width:String,validationMessage:String,required:{type:Boolean,default:!1},validityStyles:{type:Boolean,default:!0},validate:Boolean,valid:{type:Boolean,default:void 0},cancelButton:{type:Boolean,default:!0},inputAttributes:Object},model:{event:"changemodel"},created(){this._anchor=i.guid(),this._popupId="popup"+i.guid(),this._wrapper=null,this._dateInput=null,this._dateTimeSelector=null,i.validatePackage(h),this.currentValue=this.$props.defaultValue,this.currentShow=this.$props.defaultShow},inject:{kendoLocalizationService:{default:null}},data:()=>({currentValue:null,currentShow:!1,valueDuringOnChange:void 0,showDuringOnChange:void 0,shouldFocusDateInput:!1,isFocused:!1}),computed:{computedValue(){const e=void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.$props.value?this.$props.value:void 0!==this.$props.modelValue?this.$props.modelValue:this.$data.currentValue;return null!==e?s.cloneDate(e):null},computedShow(){return void 0!==this.showDuringOnChange?this.showDuringOnChange:void 0!==this.$props.show?this.$props.show:this.currentShow}},watch:{show:function(e,t){this._oldShow=t},currentShow:function(e,t){this._oldShow=t}},mounted(){this.computedShow&&this.$forceUpdate();const e=this.dateInputElement();this._dateTimeSelector=this.$refs.dateTimeSelector,this._wrapper=this.kendoAnchorRef,this._dateInput=this.dateInputRef,e&&e.setAttribute("aria-haspopup","true")},updated(){const e=this.dateInputElement();this._dateTimeSelector=this.$refs.dateTimeSelector,this._wrapper=this.kendoAnchorRef,this._dateTimeSelector&&this.computedShow&&!this._oldShow&&this._dateTimeSelector.focus({preventScroll:!0}),e&&!this.computedShow&&this.shouldFocusDateInput&&this._dateInput.focus({preventScroll:!0}),this.shouldFocusDateInput=!1},setup:()=>({kendoAnchorRef:t.ref(null),kendoLocalizationService:t.inject("kendoLocalizationService",{})}),render(){const e=i.getDefaultSlots(this),{disabled:s,tabIndex:h,title:u,id:d,format:c,formatPlaceholder:p,min:m,max:g,weekNumber:f,focusedDate:v,width:w,name:$,steps:y,placeholder:D,validationMessage:S,required:b,validityStyles:k,cancelButton:V,minTime:I,maxTime:C,ariaLabelledBy:M,ariaDescribedBy:F,size:x,fillMode:_,rounded:T,inputAttributes:R}=this.$props,{popupClass:N,appendTo:O,animate:B}=this.$props.popupSettings,L=!this.$props.validityStyles||this.validity().valid,E=this.$props.dateInput?i.templateRendering.call(this,this.$props.dateInput,i.getListeners.call(this)):void 0,A=t.createVNode(Ge,{ref:e=>{this.dateInputRef=e},placeholder:D,disabled:s,format:c,formatPlaceholder:p,id:d,max:g,min:m,minTime:I,maxTime:C,name:$,size:null,rounded:null,fillMode:null,onChange:this.handleValueChange,required:b,steps:y,tabIndex:this.computedShow?-1:h,title:u,valid:this.validity().valid,validationMessage:S,validityStyles:k,value:this.computedValue,ariaHasPopup:"dialog",ariaExpanded:this.computedShow,ariaRole:"combobox",ariaControls:this._popupId,inputAttributes:R},Kt(e)?e:{default:()=>[e]}),j=i.getTemplate.call(this,{h:t.h,template:E,defaultRendering:A}),H=this.$props.calendar?i.templateRendering.call(this,this.$props.calendar,i.getListeners.call(this)):void 0,P=t.createVNode(qt,{ref:"dateTimeSelector",cancelButton:V,value:this.computedValue,onChange:this.handleValueChange,onReject:this.handleReject,disabled:s,weekNumber:f,min:this.$props.min,max:this.$props.max,minTime:I,maxTime:C,focusedDate:v,format:c,calendar:H,steps:y,onFocus:this.timeSelectorFocus,onBlur:this.timeSelectorBlur,onKeydown:this.handleKeyDown},null),z=i.classNames("k-datetime-container k-reset",N),q=this.$props.popup?i.templateRendering.call(this,this.$props.popup,i.getListeners.call(this)):void 0,K=t.createVNode(l.Popup,{show:this.computedShow,anchor:this._anchor,popupClass:z,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},appendTo:O,animate:B},Kt(P)?P:{default:()=>[P]}),Y=i.getTemplate.call(this,{h:t.h,template:q,defaultRendering:K,defaultSlots:P}),U=t.createVNode("div",{class:i.classNames("k-input","k-datetimepicker",{[`k-input-${i.kendoThemeMaps.sizeMap[x]||x}`]:x,[`k-input-${_}`]:_,[`k-rounded-${i.kendoThemeMaps.roundedMap[T]||T}`]:T,"k-invalid":!L,"k-required":this.required,"k-disabled":this.$props.disabled}),ref:e=>{this.kendoAnchorRef=e},onKeydown:this.handleKeyDown,style:{width:w},onFocusin:this.handleFocus,onFocusout:this.handleBlur},[j,t.createVNode(n.Button,{type:"button",tabIndex:-1,icon:"calendar",svgIcon:o.calendarIcon,onMousedown:this.handleIconMouseDown,onClick:this.handleDateIconClick,title:a.provideLocalizationService(this).toLanguageString(le,$e[le]),rounded:null,class:"k-input-button","aria-controls":this._popupId,"aria-label":a.provideLocalizationService(this).toLanguageString(le,$e[le])},null),Y]);return this.$props.label?t.createVNode(r.FloatingLabel,{label:this.$props.label,editorId:d,editorValid:L,editorValue:this.getDateInputText(),editorPlaceholder:this.$props.placeholder,editorDisabled:this.$props.disabled,style:{width:w}},Kt(U)?U:{default:()=>[U]}):U},methods:{validity(){const e=b(this.computedValue,this.$props.min,this.$props.max)&&Ye(this.computedValue,this.$props.minTime||O,this.$props.maxTime||$),t=void 0!==this.$props.validationMessage,i=(!this.$props.required||null!==this.computedValue)&&e,s=void 0!==this.$props.valid?this.$props.valid:i;return{customError:t,rangeOverflow:this.computedValue&&this.$props.max.getTime()<this.computedValue.getTime()||!1,rangeUnderflow:this.computedValue&&this.computedValue.getTime()<this.$props.min.getTime()||!1,valid:s,valueMissing:null===this.computedValue}},getDateInputText(){return!!this.computedValue||(this._dateInput?this._dateInput._element.value:"")},focus(){const e=this.dateInputElement();e&&e.focus()},setShow(e){this.computedShow!==e&&(this.currentShow=e,this.$emit(e?"open":"close",{component:this}))},handleReject(){this.setShow(!1)},handleValueChange(e){this.currentValue=s.cloneDate(e.value||void 0),this.valueDuringOnChange=e.value,this.showDuringOnChange=!1,this.shouldFocusDateInput=!0,this.$emit("changemodel",this.computedValue),this.$emit("update:modelValue",this.computedValue),this.$emit("change",{event:e.event,value:this.computedValue,show:this.computedShow,component:this,target:{name:this.$props.name,value:this.computedValue,valueAsDate:this.computedValue}}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,this.setShow(!1)},handleFocus(e){this.isFocused=!0,this.$emit("focus",{event:e})},handleBlur(e){this.createBlurTimeout(),this.$emit("blur",{event:e})},timeSelectorBlur(e){this.$emit("blur",{event:e}),clearTimeout(this._blurTimeout),this.createBlurTimeout()},timeSelectorFocus(){clearTimeout(this._blurTimeout)},createBlurTimeout(){this._blurTimeout=setTimeout((()=>{this.isFocused=!1;const e=document.activeElement&&document.activeElement.closest(`#${this._popupId}`);this._dateInput&&i.canUseDOM&&document.activeElement!==this._dateInput.element()&&!e&&this.setShow(!1)}),200)},handleDateIconClick(e){this.$props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.computedShow),this.$emit("iconclick",e))},handleIconMouseDown(e){e.preventDefault()},handleKeyDown(e){const{altKey:t,keyCode:s}=e;return s===i.Keys.tab&&this._dateInput&&e.target!==this._dateInput._element?(e.preventDefault(),this.$data.shouldFocusDateInput=!0,void this.setShow(!1)):s===i.Keys.esc?(this.shouldFocusDateInput=!0,void this.setShow(!1)):(t&&(s===i.Keys.up||s===i.Keys.down)&&(e.preventDefault(),e.stopPropagation(),this.shouldFocusDateInput=s===i.Keys.up,this.setShow(s===i.Keys.down)),void this.$emit("keydown",e))},dateInputElement(){return this._dateInput&&this._dateInput.$el||this._wrapper&&this._wrapper.querySelector(".k-dateinput-wrap > input.k-input")}}}),Ut=t.defineComponent({props:{id:String},render(){const e=i.getDefaultSlots(this);return t.createVNode("span",{id:this.$props.id,class:"k-picker-wrap"},[e])}});e.Calendar=Ie,e.CalendarCell=u,e.CalendarHeaderTitle=J,e.CalendarViewEnum=c,e.CalendarWeekCell=d,e.DateInput=Ge,e.DatePicker=Xe,e.DateRangePicker=Pt,e.DateTimePicker=Yt,e.PickerWrap=Ut,e.TimePicker=Ht,e.ToggleButton=Je}));
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-dateinputs",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1763478552,version:"7.0.2",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-dateinputs",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1764664463,version:"7.0.3-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
@@ -10,8 +10,8 @@ const e = {
10
10
  productName: "Kendo UI for Vue",
11
11
  productCode: "KENDOUIVUE",
12
12
  productCodes: ["KENDOUIVUE"],
13
- publishDate: 1763478552,
14
- version: "7.0.2",
13
+ publishDate: 1764664463,
14
+ version: "7.0.3-develop.1",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
16
16
  };
17
17
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-dateinputs",
3
- "version": "7.0.2",
3
+ "version": "7.0.3-develop.1",
4
4
  "description": "TODO",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -20,12 +20,12 @@
20
20
  "peerDependencies": {
21
21
  "@progress/kendo-date-math": "^1.4.0",
22
22
  "@progress/kendo-licensing": "^1.7.2",
23
- "@progress/kendo-vue-buttons": "7.0.2",
24
- "@progress/kendo-vue-common": "7.0.2",
25
- "@progress/kendo-vue-intl": "7.0.2",
26
- "@progress/kendo-vue-labels": "7.0.2",
27
- "@progress/kendo-vue-layout": "7.0.2",
28
- "@progress/kendo-vue-popup": "7.0.2",
23
+ "@progress/kendo-vue-buttons": "7.0.3-develop.1",
24
+ "@progress/kendo-vue-common": "7.0.3-develop.1",
25
+ "@progress/kendo-vue-intl": "7.0.3-develop.1",
26
+ "@progress/kendo-vue-labels": "7.0.3-develop.1",
27
+ "@progress/kendo-vue-layout": "7.0.3-develop.1",
28
+ "@progress/kendo-vue-popup": "7.0.3-develop.1",
29
29
  "@progress/kendo-svg-icons": "^4.4.0",
30
30
  "vue": "^3.0.2"
31
31
  },
@@ -46,7 +46,7 @@
46
46
  "package": {
47
47
  "productName": "Kendo UI for Vue",
48
48
  "productCode": "KENDOUIVUE",
49
- "publishDate": 1763478552,
49
+ "publishDate": 1764664463,
50
50
  "licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
51
51
  }
52
52
  },