vue-cal 4.10.1 → 4.10.2
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.
- package/dist/drag-and-drop.amd.js +1 -1
- package/dist/drag-and-drop.cjs.js +1 -1
- package/dist/drag-and-drop.es.js +1 -1
- package/dist/i18n/ar.amd.js +1 -1
- package/dist/i18n/ar.cjs.js +1 -1
- package/dist/i18n/ar.es.js +1 -1
- package/dist/i18n/bg.amd.js +1 -1
- package/dist/i18n/bg.cjs.js +1 -1
- package/dist/i18n/bg.es.js +1 -1
- package/dist/i18n/bn.amd.js +1 -1
- package/dist/i18n/bn.cjs.js +1 -1
- package/dist/i18n/bn.es.js +1 -1
- package/dist/i18n/bs.amd.js +1 -1
- package/dist/i18n/bs.cjs.js +1 -1
- package/dist/i18n/bs.es.js +1 -1
- package/dist/i18n/ca.amd.js +1 -1
- package/dist/i18n/ca.cjs.js +1 -1
- package/dist/i18n/ca.es.js +1 -1
- package/dist/i18n/cs.amd.js +1 -1
- package/dist/i18n/cs.cjs.js +1 -1
- package/dist/i18n/cs.es.js +1 -1
- package/dist/i18n/da.amd.js +1 -1
- package/dist/i18n/da.cjs.js +1 -1
- package/dist/i18n/da.es.js +1 -1
- package/dist/i18n/de.amd.js +1 -1
- package/dist/i18n/de.cjs.js +1 -1
- package/dist/i18n/de.es.js +1 -1
- package/dist/i18n/el.amd.js +1 -1
- package/dist/i18n/el.cjs.js +1 -1
- package/dist/i18n/el.es.js +1 -1
- package/dist/i18n/en.amd.js +1 -1
- package/dist/i18n/en.cjs.js +1 -1
- package/dist/i18n/en.es.js +1 -1
- package/dist/i18n/es.amd.js +1 -1
- package/dist/i18n/es.cjs.js +1 -1
- package/dist/i18n/es.es.js +1 -1
- package/dist/i18n/et.amd.js +1 -1
- package/dist/i18n/et.cjs.js +1 -1
- package/dist/i18n/et.es.js +1 -1
- package/dist/i18n/fa.amd.js +1 -1
- package/dist/i18n/fa.cjs.js +1 -1
- package/dist/i18n/fa.es.js +1 -1
- package/dist/i18n/fi.amd.js +1 -1
- package/dist/i18n/fi.cjs.js +1 -1
- package/dist/i18n/fi.es.js +1 -1
- package/dist/i18n/fr.amd.js +1 -1
- package/dist/i18n/fr.cjs.js +1 -1
- package/dist/i18n/fr.es.js +1 -1
- package/dist/i18n/he.amd.js +1 -1
- package/dist/i18n/he.cjs.js +1 -1
- package/dist/i18n/he.es.js +1 -1
- package/dist/i18n/hr.amd.js +1 -1
- package/dist/i18n/hr.cjs.js +1 -1
- package/dist/i18n/hr.es.js +1 -1
- package/dist/i18n/hu.amd.js +1 -1
- package/dist/i18n/hu.cjs.js +1 -1
- package/dist/i18n/hu.es.js +1 -1
- package/dist/i18n/id.amd.js +1 -1
- package/dist/i18n/id.cjs.js +1 -1
- package/dist/i18n/id.es.js +1 -1
- package/dist/i18n/is.amd.js +1 -1
- package/dist/i18n/is.cjs.js +1 -1
- package/dist/i18n/is.es.js +1 -1
- package/dist/i18n/it.amd.js +1 -1
- package/dist/i18n/it.cjs.js +1 -1
- package/dist/i18n/it.es.js +1 -1
- package/dist/i18n/ja.amd.js +1 -1
- package/dist/i18n/ja.cjs.js +1 -1
- package/dist/i18n/ja.es.js +1 -1
- package/dist/i18n/ka.amd.js +1 -1
- package/dist/i18n/ka.cjs.js +1 -1
- package/dist/i18n/ka.es.js +1 -1
- package/dist/i18n/ko.amd.js +1 -1
- package/dist/i18n/ko.cjs.js +1 -1
- package/dist/i18n/ko.es.js +1 -1
- package/dist/i18n/lt.amd.js +1 -1
- package/dist/i18n/lt.cjs.js +1 -1
- package/dist/i18n/lt.es.js +1 -1
- package/dist/i18n/mn.amd.js +1 -1
- package/dist/i18n/mn.cjs.js +1 -1
- package/dist/i18n/mn.es.js +1 -1
- package/dist/i18n/nl.amd.js +1 -1
- package/dist/i18n/nl.cjs.js +1 -1
- package/dist/i18n/nl.es.js +1 -1
- package/dist/i18n/no.amd.js +1 -1
- package/dist/i18n/no.cjs.js +1 -1
- package/dist/i18n/no.es.js +1 -1
- package/dist/i18n/pl.amd.js +1 -1
- package/dist/i18n/pl.cjs.js +1 -1
- package/dist/i18n/pl.es.js +1 -1
- package/dist/i18n/pt-br.amd.js +1 -1
- package/dist/i18n/pt-br.cjs.js +1 -1
- package/dist/i18n/pt-br.es.js +1 -1
- package/dist/i18n/pt-pt.amd.js +1 -1
- package/dist/i18n/pt-pt.cjs.js +1 -1
- package/dist/i18n/pt-pt.es.js +1 -1
- package/dist/i18n/ro.amd.js +1 -1
- package/dist/i18n/ro.cjs.js +1 -1
- package/dist/i18n/ro.es.js +1 -1
- package/dist/i18n/ru.amd.js +1 -1
- package/dist/i18n/ru.cjs.js +1 -1
- package/dist/i18n/ru.es.js +1 -1
- package/dist/i18n/sk.amd.js +1 -1
- package/dist/i18n/sk.cjs.js +1 -1
- package/dist/i18n/sk.es.js +1 -1
- package/dist/i18n/sl.amd.js +1 -1
- package/dist/i18n/sl.cjs.js +1 -1
- package/dist/i18n/sl.es.js +1 -1
- package/dist/i18n/sq.amd.js +1 -1
- package/dist/i18n/sq.cjs.js +1 -1
- package/dist/i18n/sq.es.js +1 -1
- package/dist/i18n/sr.amd.js +1 -1
- package/dist/i18n/sr.cjs.js +1 -1
- package/dist/i18n/sr.es.js +1 -1
- package/dist/i18n/sv.amd.js +1 -1
- package/dist/i18n/sv.cjs.js +1 -1
- package/dist/i18n/sv.es.js +1 -1
- package/dist/i18n/tr.amd.js +1 -1
- package/dist/i18n/tr.cjs.js +1 -1
- package/dist/i18n/tr.es.js +1 -1
- package/dist/i18n/uk.amd.js +1 -1
- package/dist/i18n/uk.cjs.js +1 -1
- package/dist/i18n/uk.es.js +1 -1
- package/dist/i18n/vi.amd.js +1 -1
- package/dist/i18n/vi.cjs.js +1 -1
- package/dist/i18n/vi.es.js +1 -1
- package/dist/i18n/zh-cn.amd.js +1 -1
- package/dist/i18n/zh-cn.cjs.js +1 -1
- package/dist/i18n/zh-cn.es.js +1 -1
- package/dist/i18n/zh-hk.amd.js +1 -1
- package/dist/i18n/zh-hk.cjs.js +1 -1
- package/dist/i18n/zh-hk.es.js +1 -1
- package/dist/vue-cal.amd.js +1 -1
- package/dist/vue-cal.cjs.js +1 -1
- package/dist/vue-cal.es.js +1 -1
- package/package.json +3 -3
package/dist/vue-cal.amd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var __defProp=Object.defineProperty,__defNormalProp=(e,t,i)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,__publicField=(e,t,i)=>__defNormalProp(e,"symbol"!=typeof t?t+"":t,i)
|
|
2
2
|
/**
|
|
3
|
-
* vue-cal v4.10.
|
|
3
|
+
* vue-cal v4.10.2
|
|
4
4
|
* (c) 2025 Antoni Andre <antoniandre.web@gmail.com>
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/;define(["require","vue"],(function(e,t){"use strict";let i,s,n,a,l={},o={};class r{constructor(e){__publicField(this,"_vuecal",null),__publicField(this,"selectCell",((e=!1,t,i)=>{this._vuecal.$emit("cell-click",i?{date:t,split:i}:t),this._vuecal.clickToNavigate||e?this._vuecal.switchToNarrowerView():this._vuecal.dblclickToNavigate&&"ontouchstart"in window&&(this._vuecal.domEvents.dblTapACell.taps++,setTimeout((()=>this._vuecal.domEvents.dblTapACell.taps=0),this._vuecal.domEvents.dblTapACell.timeout),this._vuecal.domEvents.dblTapACell.taps>=2&&(this._vuecal.domEvents.dblTapACell.taps=0,this._vuecal.switchToNarrowerView(),this._vuecal.$emit("cell-dblclick",i?{date:t,split:i}:t)))})),__publicField(this,"keyPressEnterCell",((e,t)=>{this._vuecal.$emit("cell-keypress-enter",t?{date:e,split:t}:e),this._vuecal.switchToNarrowerView()})),__publicField(this,"getPosition",(e=>{const{left:t,top:i}=this._vuecal.cellsEl.getBoundingClientRect(),{clientX:s,clientY:n}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:s-t,y:n-i}})),__publicField(this,"minutesAtCursor",(e=>{let t=0,i={x:0,y:0};const{timeStep:s,timeCellHeight:n,timeFrom:a}=this._vuecal.$props;return"number"==typeof e?t=e:"object"==typeof e&&(i=this.getPosition(e),t=Math.round(i.y*s/parseInt(n)+a)),{minutes:Math.max(Math.min(t,1440),0),cursorCoords:i}})),this._vuecal=e}}const d=1440;let c,u,h;class v{constructor(e,t){__publicField(this,"_vuecal",null),__publicField(this,"eventDefaults",{_eid:null,start:"",startTimeMinutes:0,end:"",endTimeMinutes:0,title:"",content:"",background:!1,allDay:!1,segments:null,repeat:null,daysCount:1,deletable:!0,deleting:!1,titleEditable:!0,resizable:!0,resizing:!1,draggable:!0,dragging:!1,draggingStatic:!1,focused:!1,class:""}),this._vuecal=e,c=t}createAnEvent(e,t,i){if("string"==typeof e&&(e=c.stringToDate(e)),!(e instanceof Date))return!1;const s=c.dateToMinutes(e),n=s+(t=1*t||120),a=c.addMinutes(new Date(e),t);i.end&&("string"==typeof i.end&&(i.end=c.stringToDate(i.end)),i.endTimeMinutes=c.dateToMinutes(i.end));const l={...this.eventDefaults,_eid:`${this._vuecal._.uid}_${this._vuecal.eventIdIncrement++}`,start:e,startTimeMinutes:s,end:a,endTimeMinutes:n,segments:null,...i};return"function"!=typeof this._vuecal.onEventCreate||this._vuecal.onEventCreate(l,(()=>this.deleteAnEvent(l)))?(l.startDateF!==l.endDateF&&(l.daysCount=c.countDays(l.start,l.end)),this._vuecal.mutableEvents.push(l),this._vuecal.addEventsToView([l]),this._vuecal.emitWithEvent("event-create",l),this._vuecal.$emit("event-change",{event:this._vuecal.cleanupEvent(l),originalEvent:null}),l):void 0}addEventSegment(e){e.segments||(e.segments={},e.segments[c.formatDateLite(e.start)]={start:e.start,startTimeMinutes:e.startTimeMinutes,endTimeMinutes:d,isFirstDay:!0,isLastDay:!1});const t=e.segments[c.formatDateLite(e.end)];t&&(t.isLastDay=!1,t.endTimeMinutes=d);const i=c.addDays(e.end,1),s=c.formatDateLite(i);return i.setHours(0,0,0,0),e.segments[s]={start:i,startTimeMinutes:0,endTimeMinutes:e.endTimeMinutes,isFirstDay:!1,isLastDay:!0},e.end=c.addMinutes(i,e.endTimeMinutes),e.daysCount=Object.keys(e.segments).length,s}removeEventSegment(e){let t=Object.keys(e.segments).length;if(t<=1)return c.formatDateLite(e.end);delete e.segments[c.formatDateLite(e.end)],t--;const i=c.subtractDays(e.end,1),s=c.formatDateLite(i),n=e.segments[s];return t?n&&(n.isLastDay=!0,n.endTimeMinutes=e.endTimeMinutes):e.segments=null,e.daysCount=t||1,e.end=i,s}createEventSegments(e,t,i){const s=t.getTime(),n=i.getTime();let a,l,o,r=e.start.getTime(),u=e.end.getTime(),h=!1;for(e.end.getHours()||e.end.getMinutes()||(u-=1e3),e.segments={},e.repeat?(a=s,l=Math.min(n,e.repeat.until?c.stringToDate(e.repeat.until).getTime():n)):(a=Math.max(s,r),l=Math.min(n,u));a<=l;){let t=!1;const i=c.addDays(new Date(a),1).setHours(0,0,0,0);let s,n,v,m;if(e.repeat){const i=new Date(a),l=c.formatDateLite(i);(h||e.occurrences&&e.occurrences[l])&&(h||(r=e.occurrences[l].start,o=new Date(r).setHours(0,0,0,0),u=e.occurrences[l].end),h=!0,t=!0),s=a===o,n=l===c.formatDateLite(new Date(u)),v=new Date(s?r:a),m=c.formatDateLite(v),n&&(h=!1)}else t=!0,s=a===r,n=l===u&&i>l,v=s?e.start:new Date(a),m=c.formatDateLite(s?e.start:v);t&&(e.segments[m]={start:v,startTimeMinutes:s?e.startTimeMinutes:0,endTimeMinutes:n?e.endTimeMinutes:d,isFirstDay:s,isLastDay:n}),a=i}return e}deleteAnEvent(e){this._vuecal.emitWithEvent("event-delete",e),this._vuecal.mutableEvents=this._vuecal.mutableEvents.filter((t=>t._eid!==e._eid)),this._vuecal.view.events=this._vuecal.view.events.filter((t=>t._eid!==e._eid))}checkCellOverlappingEvents(e,t){h=e.slice(0),u={},e.forEach((e=>{h.shift(),u[e._eid]||(u[e._eid]={overlaps:[],start:e.start,position:0}),u[e._eid].position=0,h.forEach((i=>{u[i._eid]||(u[i._eid]={overlaps:[],start:i.start,position:0});const s=this.eventInRange(i,e.start,e.end),n=t.overlapsPerTimeStep?c.datesInSameTimeStep(e.start,i.start,t.timeStep):1;if(e.background||e.allDay||i.background||i.allDay||!s||!n){let t,s;(t=(u[e._eid]||{overlaps:[]}).overlaps.indexOf(i._eid))>-1&&u[e._eid].overlaps.splice(t,1),(s=(u[i._eid]||{overlaps:[]}).overlaps.indexOf(e._eid))>-1&&u[i._eid].overlaps.splice(s,1),u[i._eid].position--}else u[e._eid].overlaps.push(i._eid),u[e._eid].overlaps=[...new Set(u[e._eid].overlaps)],u[i._eid].overlaps.push(e._eid),u[i._eid].overlaps=[...new Set(u[i._eid].overlaps)],u[i._eid].position++}))}));let i=0;for(const s in u){const e=u[s],t=e.overlaps.map((e=>({id:e,start:u[e].start})));t.push({id:s,start:e.start}),t.sort(((e,t)=>e.start<t.start?-1:e.start>t.start?1:e.id>t.id?-1:1)),e.position=t.findIndex((e=>e.id===s)),i=Math.max(this.getOverlapsStreak(e,u),i)}return[u,i]}getOverlapsStreak(e,t={}){let i=e.overlaps.length+1,s=[];return e.overlaps.forEach((i=>{if(!s.includes(i)){e.overlaps.filter((e=>e!==i)).forEach((e=>{t[e].overlaps.includes(i)||s.push(e)}))}})),s=[...new Set(s)],i-=s.length,i}eventInRange(e,t,i){if(e.allDay||!this._vuecal.time){const s=new Date(e.start).setHours(0,0,0,0);return new Date(e.end).setHours(23,59,0,0)>=new Date(t).setHours(0,0,0,0)&&s<=new Date(i).setHours(0,0,0,0)}const s=e.start.getTime(),n=e.end.getTime();return s<i.getTime()&&n>t.getTime()}}const m={class:"vuecal__flex vuecal__weekdays-headings"},p=["onClick"],w={class:"vuecal__flex weekday-label",grow:""},y={class:"full"},g={class:"small"},D={class:"xsmall"},k={key:0},f={key:0,class:"vuecal__flex vuecal__split-days-headers",grow:""};const _=(e,t)=>{const i=e.__vccOpts||e;for(const[s,n]of t)i[s]=n;return i},b=_({inject:["vuecal","utils","view"],props:{transitionDirection:{type:String,default:"right"},weekDays:{type:Array,default:()=>[]},switchToNarrowerView:{type:Function,default:()=>{}}},methods:{selectCell(e,t){e.getTime()!==this.view.selectedDate.getTime()&&(this.view.selectedDate=e),this.utils.cell.selectCell(!1,e,t)},cleanupHeading:e=>({label:e.full,date:e.date,...e.today?{today:e.today}:{}})},computed:{headings(){if(!["month","week"].includes(this.view.id))return[];let e=!1;return this.weekDays.map(((t,i)=>{const s=this.utils.date.addDays(this.view.startDate,this.vuecal.startWeekOnSunday&&this.vuecal.hideWeekends?i-1:i);return{hide:t.hide,full:t.label,small:t.short||t.label.substr(0,3),xsmall:t.short||t.label.substr(0,1),..."week"===this.view.id?{dayOfMonth:s.getDate(),date:s,today:!e&&this.utils.date.isToday(s)&&!e++}:{}}}))},cellWidth(){return 100/(7-this.weekDays.reduce(((e,t)=>e+t.hide),0))},weekdayCellStyles(){return{...this.vuecal.hideWeekdays.length?{width:`${this.cellWidth}%`}:{}}},cellHeadingsClickable(){return"week"===this.view.id&&(this.vuecal.clickToNavigate||this.vuecal.dblclickToNavigate)}}},[["render",function(e,i,s,n,a,l){return t.openBlock(),t.createElementBlock("div",m,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.headings,((n,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:a},[n.hide?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["vuecal__flex vuecal__heading",{today:n.today,clickable:l.cellHeadingsClickable}]),style:t.normalizeStyle(l.weekdayCellStyles),onClick:e=>"week"===l.view.id&&l.selectCell(n.date,e),onDblclick:i[0]||(i[0]=e=>"week"===l.view.id&&l.vuecal.dblclickToNavigate&&s.switchToNarrowerView())},[t.createVNode(t.Transition,{name:`slide-fade--${s.transitionDirection}`,appear:l.vuecal.transitions},{default:t.withCtx((()=>[(t.openBlock(),t.createElementBlock("div",{class:"vuecal__flex",column:"",key:!!l.vuecal.transitions&&`${a}-${n.dayOfMonth}`},[t.createElementVNode("div",w,[t.renderSlot(e.$slots,"weekday-heading",{heading:l.cleanupHeading(n),view:l.view},(()=>[t.createElementVNode("span",y,t.toDisplayString(n.full),1),t.createElementVNode("span",g,t.toDisplayString(n.small),1),t.createElementVNode("span",D,t.toDisplayString(n.xsmall),1),n.dayOfMonth?(t.openBlock(),t.createElementBlock("span",k," "+t.toDisplayString(n.dayOfMonth),1)):t.createCommentVNode("",!0)]))]),l.vuecal.hasSplits&&l.vuecal.stickySplitLabels?(t.openBlock(),t.createElementBlock("div",f,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.vuecal.daySplits,((i,s)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["day-split-header",i.class||!1]),key:s},[t.renderSlot(e.$slots,"split-label",{split:i,view:l.view},(()=>[t.createTextVNode(t.toDisplayString(i.label),1)]))],2)))),128))])):t.createCommentVNode("",!0)]))])),_:2},1032,["name","appear"])],46,p))],64)))),128))])}]]),E={class:"vuecal__header"},C={key:0,class:"vuecal__flex vuecal__menu",role:"tablist","aria-label":"Calendar views navigation"},M=["onDragenter","onDragleave","onClick","aria-label"],T={key:1,class:"vuecal__title-bar"},S=["aria-label"],B={class:"vuecal__flex vuecal__title",grow:""},V=["aria-label"],x={key:0,class:"vuecal__flex vuecal__split-days-headers"};const O=_({inject:["vuecal","previous","next","switchView","updateSelectedDate","modules","view"],components:{WeekdaysHeadings:b},props:{options:{type:Object,default:()=>({})},editEvents:{type:Object,required:!0},hasSplits:{type:[Boolean,Number],default:!1},daySplits:{type:Array,default:()=>[]},viewProps:{type:Object,default:()=>({})},weekDays:{type:Array,default:()=>[]},switchToNarrowerView:{type:Function,default:()=>{}}},data:()=>({highlightedControl:null}),methods:{goToToday(){this.updateSelectedDate(new Date((new Date).setHours(0,0,0,0)))},switchToBroaderView(){this.transitionDirection="left",this.broaderView&&this.switchView(this.broaderView)}},computed:{transitionDirection:{get(){return this.vuecal.transitionDirection},set(e){this.vuecal.transitionDirection=e}},broaderView(){const{enabledViews:e}=this.vuecal;return e[e.indexOf(this.view.id)-1]},showDaySplits(){return"day"===this.view.id&&this.hasSplits&&this.options.stickySplitLabels&&!this.options.minSplitWidth},dnd(){return this.modules.dnd}}},[["render",function(e,i,s,n,a,l){const o=t.resolveComponent("weekdays-headings");return t.openBlock(),t.createElementBlock("div",E,[s.options.hideViewSelector?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",C,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.viewProps.views,((i,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:n},[i.enabled?(t.openBlock(),t.createElementBlock("button",{key:0,class:t.normalizeClass(["vuecal__view-btn",{"vuecal__view-btn--active":l.view.id===n,"vuecal__view-btn--highlighted":e.highlightedControl===n}]),type:"button",onDragenter:t=>s.editEvents.drag&&l.dnd&&l.dnd.viewSelectorDragEnter(t,n,e.$data),onDragleave:t=>s.editEvents.drag&&l.dnd&&l.dnd.viewSelectorDragLeave(t,n,e.$data),onClick:e=>l.switchView(n,null,!0),"aria-label":`${i.label} view`},t.toDisplayString(i.label),43,M)):t.createCommentVNode("",!0)],64)))),128))])),s.options.hideTitleBar?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",T,[t.createElementVNode("button",{class:t.normalizeClass(["vuecal__arrow vuecal__arrow--prev",{"vuecal__arrow--highlighted":"previous"===e.highlightedControl}]),type:"button",onClick:i[0]||(i[0]=(...e)=>l.previous&&l.previous(...e)),onDragenter:i[1]||(i[1]=t=>s.editEvents.drag&&l.dnd&&l.dnd.viewSelectorDragEnter(t,"previous",e.$data)),onDragleave:i[2]||(i[2]=t=>s.editEvents.drag&&l.dnd&&l.dnd.viewSelectorDragLeave(t,"previous",e.$data)),"aria-label":`Previous ${l.view.id}`},[t.renderSlot(e.$slots,"arrow-prev")],42,S),t.createElementVNode("div",B,[t.createVNode(t.Transition,{name:s.options.transitions?`slide-fade--${l.transitionDirection}`:""},{default:t.withCtx((()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.broaderView?"button":"span"),{type:!!l.broaderView&&"button",key:`${l.view.id}${l.view.startDate.toString()}`,onClick:i[3]||(i[3]=e=>!!l.broaderView&&l.switchToBroaderView()),"aria-label":!!l.broaderView&&`Go to ${l.broaderView} view`},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"title")])),_:3},8,["type","aria-label"]))])),_:3},8,["name"])]),s.options.todayButton?(t.openBlock(),t.createElementBlock("button",{key:0,class:t.normalizeClass(["vuecal__today-btn",{"vuecal__today-btn--highlighted":"today"===e.highlightedControl}]),type:"button",onClick:i[4]||(i[4]=(...e)=>l.goToToday&&l.goToToday(...e)),onDragenter:i[5]||(i[5]=t=>s.editEvents.drag&&l.dnd&&l.dnd.viewSelectorDragEnter(t,"today",e.$data)),onDragleave:i[6]||(i[6]=t=>s.editEvents.drag&&l.dnd&&l.dnd.viewSelectorDragLeave(t,"today",e.$data)),"aria-label":"Today"},[t.renderSlot(e.$slots,"today-button")],34)):t.createCommentVNode("",!0),t.createElementVNode("button",{class:t.normalizeClass(["vuecal__arrow vuecal__arrow--next",{"vuecal__arrow--highlighted":"next"===e.highlightedControl}]),type:"button",onClick:i[7]||(i[7]=(...e)=>l.next&&l.next(...e)),onDragenter:i[8]||(i[8]=t=>s.editEvents.drag&&l.dnd&&l.dnd.viewSelectorDragEnter(t,"next",e.$data)),onDragleave:i[9]||(i[9]=t=>s.editEvents.drag&&l.dnd&&l.dnd.viewSelectorDragLeave(t,"next",e.$data)),"aria-label":`Next ${l.view.id}`},[t.renderSlot(e.$slots,"arrow-next")],42,V)])),s.viewProps.weekDaysInHeader?(t.openBlock(),t.createBlock(o,{key:2,"week-days":s.weekDays,"transition-direction":l.transitionDirection,"switch-to-narrower-view":s.switchToNarrowerView},t.createSlots({_:2},[e.$slots["weekday-heading"]?{name:"weekday-heading",fn:t.withCtx((({heading:i,view:s})=>[t.renderSlot(e.$slots,"weekday-heading",{heading:i,view:s})])),key:"0"}:void 0,e.$slots["split-label"]?{name:"split-label",fn:t.withCtx((({split:i})=>[t.renderSlot(e.$slots,"split-label",{split:i,view:l.view})])),key:"1"}:void 0]),1032,["week-days","transition-direction","switch-to-narrower-view"])):t.createCommentVNode("",!0),t.createVNode(t.Transition,{name:`slide-fade--${l.transitionDirection}`},{default:t.withCtx((()=>[l.showDaySplits?(t.openBlock(),t.createElementBlock("div",x,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.daySplits,((i,s)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["day-split-header",i.class||!1]),key:s},[t.renderSlot(e.$slots,"split-label",{split:i,view:l.view.id},(()=>[t.createTextVNode(t.toDisplayString(i.label),1)]))],2)))),128))])):t.createCommentVNode("",!0)])),_:3},8,["name"])])}]]),$=["draggable"];const W={inject:["vuecal","utils","modules","view","domEvents","editEvents"],props:{cellFormattedDate:{type:String,default:""},event:{type:Object,default:()=>({})},cellEvents:{type:Array,default:()=>[]},overlaps:{type:Array,default:()=>[]},eventPosition:{type:Number,default:0},overlapsStreak:{type:Number,default:0},allDay:{type:Boolean,default:!1}},data:()=>({touch:{dragThreshold:30,startX:0,startY:0,dragged:!1}}),methods:{onMouseDown(e,t=!1){if("ontouchstart"in window&&!t)return!1;const{clickHoldAnEvent:i,focusAnEvent:s,resizeAnEvent:n,dragAnEvent:a}=this.domEvents;if(s._eid===this.event._eid&&i._eid===this.event._eid)return!0;this.focusEvent(),i._eid=null,this.vuecal.editEvents.delete&&this.event.deletable&&(i.timeoutId=setTimeout((()=>{n._eid||a._eid||(i._eid=this.event._eid,this.event.deleting=!0)}),i.timeout))},onMouseUp(e){this.domEvents.focusAnEvent._eid!==this.event._eid||this.touch.dragged||(this.domEvents.focusAnEvent.mousedUp=!0),this.touch.dragged=!1},onMouseEnter(e){e.preventDefault(),this.vuecal.emitWithEvent("event-mouse-enter",this.event)},onMouseLeave(e){e.preventDefault(),this.vuecal.emitWithEvent("event-mouse-leave",this.event)},onTouchMove(e){if("function"!=typeof this.vuecal.onEventClick)return;const{clientX:t,clientY:i}=e.touches[0],{startX:s,startY:n,dragThreshold:a}=this.touch;(Math.abs(t-s)>a||Math.abs(i-n)>a)&&(this.touch.dragged=!0)},onTouchStart(e){this.touch.startX=e.touches[0].clientX,this.touch.startY=e.touches[0].clientY,this.onMouseDown(e,!0)},onEnterKeypress(e){if("function"==typeof this.vuecal.onEventClick)return this.vuecal.onEventClick(this.event,e)},onDblClick(e){if("function"==typeof this.vuecal.onEventDblclick)return this.vuecal.onEventDblclick(this.event,e)},onDragStart(e){this.dnd&&this.dnd.eventDragStart(e,this.event)},onDragEnd(){this.dnd&&this.dnd.eventDragEnd(this.event)},onResizeHandleMouseDown(){this.focusEvent(),this.domEvents.dragAnEvent._eid=null,this.domEvents.resizeAnEvent=Object.assign(this.domEvents.resizeAnEvent,{_eid:this.event._eid,start:(this.segment||this.event).start,split:this.event.split||null,segment:!!this.segment&&this.utils.date.formatDateLite(this.segment.start),originalEnd:new Date((this.segment||this.event).end),originalEndTimeMinutes:this.event.endTimeMinutes}),this.event.resizing=!0},deleteEvent(e=!1){if("ontouchstart"in window&&!e)return!1;this.utils.event.deleteAnEvent(this.event)},touchDeleteEvent(e){this.deleteEvent(!0)},cancelDeleteEvent(){this.event.deleting=!1},focusEvent(){const{focusAnEvent:e}=this.domEvents,t=e._eid;if(t!==this.event._eid){if(t){const e=this.view.events.find((e=>e._eid===t));e&&(e.focused=!1)}this.vuecal.cancelDelete(),this.vuecal.emitWithEvent("event-focus",this.event),e._eid=this.event._eid,this.event.focused=!0}}},computed:{eventDimensions(){const{startTimeMinutes:e,endTimeMinutes:t}=this.segment||this.event;let i=e-this.vuecal.timeFrom;const s=Math.max(Math.round(i*this.vuecal.timeCellHeight/this.vuecal.timeStep),0);i=Math.min(t,this.vuecal.timeTo)-this.vuecal.timeFrom;const n=Math.round(i*this.vuecal.timeCellHeight/this.vuecal.timeStep);return{top:s,height:Math.max(n-s,5)}},eventStyles(){if(this.event.allDay||!this.vuecal.time||!this.event.endTimeMinutes||"month"===this.view.id||this.allDay)return{};let e=100/Math.min(this.overlaps.length+1,this.overlapsStreak),t=100/(this.overlaps.length+1)*this.eventPosition;this.vuecal.minEventWidth&&e<this.vuecal.minEventWidth&&(e=this.vuecal.minEventWidth,t=(100-this.vuecal.minEventWidth)/this.overlaps.length*this.eventPosition);const{top:i,height:s}=this.eventDimensions;return{top:`${i}px`,height:`${s}px`,width:`${e}%`,left:this.event.left&&`${this.event.left}px`||`${t}%`}},eventClasses(){const{isFirstDay:e,isLastDay:t}=this.segment||{};return{[this.event.class]:!!this.event.class,"vuecal__event--focus":this.event.focused,"vuecal__event--resizing":this.event.resizing,"vuecal__event--background":this.event.background,"vuecal__event--deletable":this.event.deleting,"vuecal__event--all-day":this.event.allDay,"vuecal__event--dragging":!this.event.draggingStatic&&this.event.dragging,"vuecal__event--static":this.event.dragging&&this.event.draggingStatic,"vuecal__event--multiple-days":!!this.segment,"event-start":this.segment&&e&&!t,"event-middle":this.segment&&!e&&!t,"event-end":this.segment&&t&&!e}},segment(){return this.event.segments&&this.event.segments[this.cellFormattedDate]||null},draggable(){const{draggable:e,background:t,daysCount:i}=this.event;return this.vuecal.editEvents.drag&&e&&!t&&1===i},resizable(){const{editEvents:e,time:t}=this.vuecal;return e.resize&&this.event.resizable&&t&&!this.allDay&&(!this.segment||this.segment&&this.segment.isLastDay)&&"month"!==this.view.id},dnd(){return this.modules.dnd}}},H=["data-split","aria-label","onTouchstart","onMousedown","onDragover","onDrop"],A={key:0,class:"cell-time-labels"},N=["innerHTML"],j={key:2,class:"vuecal__cell-events"},L=["title"];const F=_({inject:["vuecal","utils","modules","view","domEvents"],components:{Event:_(W,[["render",function(e,i,s,n,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["vuecal__event",l.eventClasses]),style:t.normalizeStyle(l.eventStyles),tabindex:"0",onFocus:i[4]||(i[4]=(...e)=>l.focusEvent&&l.focusEvent(...e)),onKeypress:i[5]||(i[5]=t.withKeys(t.withModifiers(((...e)=>l.onEnterKeypress&&l.onEnterKeypress(...e)),["stop"]),["enter"])),onMouseenter:i[6]||(i[6]=(...e)=>l.onMouseEnter&&l.onMouseEnter(...e)),onMouseleave:i[7]||(i[7]=(...e)=>l.onMouseLeave&&l.onMouseLeave(...e)),onTouchstart:i[8]||(i[8]=t.withModifiers(((...e)=>l.onTouchStart&&l.onTouchStart(...e)),["stop"])),onMousedown:i[9]||(i[9]=e=>l.onMouseDown(e)),onMouseup:i[10]||(i[10]=(...e)=>l.onMouseUp&&l.onMouseUp(...e)),onTouchend:i[11]||(i[11]=(...e)=>l.onMouseUp&&l.onMouseUp(...e)),onTouchmove:i[12]||(i[12]=(...e)=>l.onTouchMove&&l.onTouchMove(...e)),onDblclick:i[13]||(i[13]=(...e)=>l.onDblClick&&l.onDblClick(...e)),draggable:l.draggable,onDragstart:i[14]||(i[14]=e=>l.draggable&&l.onDragStart(e)),onDragend:i[15]||(i[15]=e=>l.draggable&&l.onDragEnd())},[l.vuecal.editEvents.delete&&s.event.deletable?(t.openBlock(),t.createElementBlock("div",{key:0,class:"vuecal__event-delete",onClick:i[0]||(i[0]=t.withModifiers(((...e)=>l.deleteEvent&&l.deleteEvent(...e)),["stop"])),onTouchstart:i[1]||(i[1]=t.withModifiers(((...e)=>l.touchDeleteEvent&&l.touchDeleteEvent(...e)),["stop"]))},t.toDisplayString(l.vuecal.texts.deleteEvent),33)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"event",{event:s.event,view:l.view.id}),l.resizable?(t.openBlock(),t.createElementBlock("div",{key:1,class:"vuecal__event-resize-handle",contenteditable:"false",onMousedown:i[2]||(i[2]=t.withModifiers(((...e)=>l.onResizeHandleMouseDown&&l.onResizeHandleMouseDown(...e)),["stop","prevent"])),onTouchstart:i[3]||(i[3]=t.withModifiers(((...e)=>l.onResizeHandleMouseDown&&l.onResizeHandleMouseDown(...e)),["stop","prevent"]))},null,32)):t.createCommentVNode("",!0)],46,$)}]])},props:{options:{type:Object,default:()=>({})},editEvents:{type:Object,required:!0},data:{type:Object,required:!0},cellSplits:{type:Array,default:()=>[]},minTimestamp:{type:[Number,null],default:null},maxTimestamp:{type:[Number,null],default:null},cellWidth:{type:[Number,Boolean],default:!1},allDay:{type:Boolean,default:!1}},data:()=>({cellOverlaps:{},cellOverlapsStreak:1,timeAtCursor:null,highlighted:!1,highlightedSplit:null}),methods:{getSplitAtCursor({target:e}){let t=e.classList.contains("vuecal__cell-split")?e:this.vuecal.findAncestor(e,"vuecal__cell-split");return t&&(t=t.attributes["data-split"].value,parseInt(t).toString()===t.toString()&&(t=parseInt(t))),t||null},splitClasses(e){return{"vuecal__cell-split":!0,"vuecal__cell-split--highlighted":this.highlightedSplit===e.id,[e.class]:!!e.class}},checkCellOverlappingEvents(){this.options.time&&this.eventsCount&&!this.splitsCount&&(1===this.eventsCount?(this.cellOverlaps=[],this.cellOverlapsStreak=1):[this.cellOverlaps,this.cellOverlapsStreak]=this.utils.event.checkCellOverlappingEvents(this.events,this.options))},isDOMElementAnEvent(e){return this.vuecal.isDOMElementAnEvent(e)},selectCell(e,t=!1){const i=this.splitsCount?this.getSplitAtCursor(e):null;this.utils.cell.selectCell(t,this.timeAtCursor,i),this.timeAtCursor=null},onCellkeyPressEnter(e){this.isSelected||this.onCellFocus(e);const t=this.splitsCount?this.getSplitAtCursor(e):null;this.utils.cell.keyPressEnterCell(this.timeAtCursor,t),this.timeAtCursor=null},onCellFocus(e){if(!this.isSelected&&!this.isDisabled){this.isSelected=this.data.startDate;const t=this.splitsCount?this.getSplitAtCursor(e):null,i=this.timeAtCursor||this.data.startDate;this.vuecal.$emit("cell-focus",t?{date:i,split:t}:i)}},onCellMouseDown(e,t=null,i=!1){if("ontouchstart"in window&&!i)return!1;this.isSelected||this.onCellFocus(e);const{clickHoldACell:s,focusAnEvent:n}=this.domEvents;this.domEvents.cancelClickEventCreation=!1,s.eventCreated=!1,this.timeAtCursor=new Date(this.data.startDate);const{minutes:a,cursorCoords:{y:l}}=this.vuecal.minutesAtCursor(e);this.timeAtCursor.setMinutes(a);const o=this.isDOMElementAnEvent(e.target);!o&&n._eid&&((this.view.events.find((e=>e._eid===n._eid))||{}).focused=!1),this.editEvents.create&&!o&&this.setUpEventCreation(e,l)},setUpEventCreation(e,t){if(this.options.dragToCreateEvent&&["week","day"].includes(this.view.id)){const{dragCreateAnEvent:i}=this.domEvents;if(i.startCursorY=t,i.split=this.splitsCount?this.getSplitAtCursor(e):null,i.start=this.timeAtCursor,this.options.snapToTime){let e=60*this.timeAtCursor.getHours()+this.timeAtCursor.getMinutes();const t=e+this.options.snapToTime/2;e=t-t%this.options.snapToTime,i.start.setHours(0,e,0,0)}}else this.options.cellClickHold&&["month","week","day"].includes(this.view.id)&&this.setUpCellHoldTimer(e)},setUpCellHoldTimer(e){const{clickHoldACell:t}=this.domEvents;t.cellId=`${this.vuecal._.uid}_${this.data.formattedDate}`,t.split=this.splitsCount?this.getSplitAtCursor(e):null,t.timeoutId=setTimeout((()=>{if(t.cellId&&!this.domEvents.cancelClickEventCreation){const{_eid:e}=this.utils.event.createAnEvent(this.timeAtCursor,null,t.split?{split:t.split}:{});t.eventCreated=e}}),t.timeout)},onCellTouchStart(e,t=null){this.onCellMouseDown(e,t,!0)},onCellClick(e){this.isDOMElementAnEvent(e.target)||this.selectCell(e)},onCellDblClick(e){const t=new Date(this.data.startDate);t.setMinutes(this.vuecal.minutesAtCursor(e).minutes);const i=this.splitsCount?this.getSplitAtCursor(e):null;this.vuecal.$emit("cell-dblclick",i?{date:t,split:i}:t),this.options.dblclickToNavigate&&this.vuecal.switchToNarrowerView()},onCellContextMenu(e){e.stopPropagation(),e.preventDefault();const t=new Date(this.data.startDate),{cursorCoords:i,minutes:s}=this.vuecal.minutesAtCursor(e);t.setMinutes(s);const n=this.splitsCount?this.getSplitAtCursor(e):null;this.vuecal.$emit("cell-contextmenu",{date:t,...i,...n||{},e:e})}},computed:{dnd(){return this.modules.dnd},nowInMinutes(){return this.utils.date.dateToMinutes(this.vuecal.now)},isBeforeMinDate(){return null!==this.minTimestamp&&this.minTimestamp>this.data.endDate.getTime()},isAfterMaxDate(){return this.maxTimestamp&&this.maxTimestamp<this.data.startDate.getTime()},isDisabled(){const{disableDays:e}=this.options,{isYearsOrYearView:t}=this.vuecal;return!(!e.length||!e.includes(this.data.formattedDate)||t)||(this.isBeforeMinDate||this.isAfterMaxDate)},isSelected:{get(){let e=!1;const{selectedDate:t}=this.view;return e="years"===this.view.id?t.getFullYear()===this.data.startDate.getFullYear():"year"===this.view.id?t.getFullYear()===this.data.startDate.getFullYear()&&t.getMonth()===this.data.startDate.getMonth():t.getTime()===this.data.startDate.getTime(),e},set(e){this.view.selectedDate=e,this.vuecal.$emit("update:selected-date",this.view.selectedDate)}},isWeekOrDayView(){return["week","day"].includes(this.view.id)},transitionDirection(){return this.vuecal.transitionDirection},specialHours(){return this.data.specialHours.map((e=>{let{from:t,to:i}=e;return t=Math.max(t,this.options.timeFrom),i=Math.min(i,this.options.timeTo),{...e,height:(i-t)*this.timeScale,top:(t-this.options.timeFrom)*this.timeScale}}))},events(){const{startDate:e,endDate:t}=this.data;let i=[];if(!["years","year"].includes(this.view.id)||this.options.eventsCountOnYearView){if(i=this.view.events.slice(0),"month"===this.view.id&&i.push(...this.view.outOfScopeEvents),i=i.filter((i=>this.utils.event.eventInRange(i,e,t))),this.options.showAllDayEvents&&"month"!==this.view.id&&(i=i.filter((e=>!!e.allDay===this.allDay))),this.options.time&&this.isWeekOrDayView&&!this.allDay){const{timeFrom:e,timeTo:t}=this.options;i=i.filter((i=>{const s=i.daysCount>1&&i.segments[this.data.formattedDate]||{},n=1===i.daysCount&&i.startTimeMinutes<t&&i.endTimeMinutes>e,a=i.daysCount>1&&s.startTimeMinutes<t&&s.endTimeMinutes>e;return i.allDay||n||a||!1}))}!this.options.time||!this.isWeekOrDayView||this.options.showAllDayEvents&&this.allDay||i.sort(((e,t)=>e.start<t.start?-1:1)),this.cellSplits.length||this.$nextTick(this.checkCellOverlappingEvents)}return i},eventsCount(){return this.events.length},splits(){return this.cellSplits.map(((e,t)=>{const i=this.events.filter((t=>t.split===e.id)),[s,n]=this.utils.event.checkCellOverlappingEvents(i.filter((e=>!e.background&&!e.allDay)),this.options);return{...e,overlaps:s,overlapsStreak:n,events:i}}))},splitsCount(){return this.splits.length},cellClasses(){return{[this.data.class]:!!this.data.class,"vuecal__cell--current":this.data.current,"vuecal__cell--today":this.data.today,"vuecal__cell--out-of-scope":this.data.outOfScope,"vuecal__cell--before-min":this.isDisabled&&this.isBeforeMinDate,"vuecal__cell--after-max":this.isDisabled&&this.isAfterMaxDate,"vuecal__cell--disabled":this.isDisabled,"vuecal__cell--selected":this.isSelected,"vuecal__cell--highlighted":this.highlighted,"vuecal__cell--has-splits":this.splitsCount,"vuecal__cell--has-events":this.eventsCount}},cellStyles(){return{...this.cellWidth?{width:`${this.cellWidth}%`}:{}}},timelineVisible(){const{time:e,timeTo:t}=this.options;return this.data.today&&this.isWeekOrDayView&&e&&!this.allDay&&this.nowInMinutes<=t},todaysTimePosition(){if(!this.data.today||!this.options.time)return;const e=this.nowInMinutes-this.options.timeFrom;return Math.round(e*this.timeScale)},timeScale(){return this.options.timeCellHeight/this.options.timeStep}}},[["render",function(e,i,s,n,a,l){const o=t.resolveComponent("event");return t.openBlock(),t.createBlock(t.TransitionGroup,{class:t.normalizeClass(["vuecal__cell",l.cellClasses]),name:`slide-fade--${l.transitionDirection}`,tag:"div",appear:s.options.transitions,style:t.normalizeStyle(l.cellStyles)},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.splitsCount?l.splits:1,((n,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["vuecal__flex vuecal__cell-content",l.splitsCount&&l.splitClasses(n)]),key:s.options.transitions?`${l.view.id}-${s.data.content}-${a}`:a,"data-split":!!l.splitsCount&&n.id,column:"",tabindex:"0","aria-label":s.data.content,onFocus:i[0]||(i[0]=e=>l.onCellFocus(e)),onKeypress:i[1]||(i[1]=t.withKeys((e=>l.onCellkeyPressEnter(e)),["enter"])),onTouchstart:e=>!l.isDisabled&&l.onCellTouchStart(e,l.splitsCount?n.id:null),onMousedown:e=>!l.isDisabled&&l.onCellMouseDown(e,l.splitsCount?n.id:null),onClick:i[2]||(i[2]=e=>!l.isDisabled&&l.onCellClick(e)),onDblclick:i[3]||(i[3]=e=>!l.isDisabled&&l.onCellDblClick(e)),onContextmenu:i[4]||(i[4]=e=>!l.isDisabled&&s.options.cellContextmenu&&l.onCellContextMenu(e)),onDragenter:i[5]||(i[5]=t=>!l.isDisabled&&s.editEvents.drag&&l.dnd&&l.dnd.cellDragEnter(t,e.$data,s.data.startDate)),onDragover:t=>!l.isDisabled&&s.editEvents.drag&&l.dnd&&l.dnd.cellDragOver(t,e.$data,s.data.startDate,l.splitsCount?n.id:null),onDragleave:i[6]||(i[6]=t=>!l.isDisabled&&s.editEvents.drag&&l.dnd&&l.dnd.cellDragLeave(t,e.$data,s.data.startDate)),onDrop:t=>!l.isDisabled&&s.editEvents.drag&&l.dnd&&l.dnd.cellDragDrop(t,e.$data,s.data.startDate,l.splitsCount?n.id:null)},[s.options.showTimeInCells&&s.options.time&&l.isWeekOrDayView&&!s.allDay?(t.openBlock(),t.createElementBlock("div",A,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.vuecal.timeCells,((e,i)=>(t.openBlock(),t.createElementBlock("span",{class:"cell-time-label",key:i},t.toDisplayString(e.label),1)))),128))])):t.createCommentVNode("",!0),l.isWeekOrDayView&&!s.allDay&&l.specialHours.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(l.specialHours,((e,i)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["vuecal__special-hours",`vuecal__special-hours--day${e.day} ${e.class}`]),style:t.normalizeStyle(`height: ${e.height}px;top: ${e.top}px`)},[e.label?(t.openBlock(),t.createElementBlock("div",{key:0,class:"special-hours-label",innerHTML:e.label},null,8,N)):t.createCommentVNode("",!0)],6)))),256)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"cell-content",{events:l.events,selectCell:e=>l.selectCell(e,!0),split:!!l.splitsCount&&n}),l.eventsCount&&(l.isWeekOrDayView||"month"===l.view.id&&s.options.eventsOnMonthView)?(t.openBlock(),t.createElementBlock("div",j,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.splitsCount?n.events:l.events,((i,a)=>(t.openBlock(),t.createBlock(o,{key:a,"cell-formatted-date":s.data.formattedDate,event:i,"all-day":s.allDay,"cell-events":l.splitsCount?n.events:l.events,overlaps:((l.splitsCount?n.overlaps[i._eid]:e.cellOverlaps[i._eid])||[]).overlaps,"event-position":((l.splitsCount?n.overlaps[i._eid]:e.cellOverlaps[i._eid])||[]).position,"overlaps-streak":l.splitsCount?n.overlapsStreak:e.cellOverlapsStreak},{event:t.withCtx((({event:i,view:s})=>[t.renderSlot(e.$slots,"event",{view:s,event:i})])),_:2},1032,["cell-formatted-date","event","all-day","cell-events","overlaps","event-position","overlaps-streak"])))),128))])):t.createCommentVNode("",!0)],42,H)))),128)),l.timelineVisible?(t.openBlock(),t.createElementBlock("div",{class:"vuecal__now-line",style:t.normalizeStyle(`top: ${l.todaysTimePosition}px`),key:s.options.transitions?`${l.view.id}-now-line`:"now-line",title:l.utils.date.formatTime(l.vuecal.now)},null,12,L)):t.createCommentVNode("",!0)])),_:3},8,["class","name","appear","style"])}]]),Y={key:0,class:"vuecal__all-day-text",style:{width:"3em"}};const P=_({inject:["vuecal","view","editEvents"],components:{"vuecal-cell":F},props:{options:{type:Object,required:!0},cells:{type:Array,required:!0},label:{type:String,required:!0},daySplits:{type:Array,default:()=>[]},shortEvents:{type:Boolean,default:!0},height:{type:String,default:""},cellOrSplitMinWidth:{type:Number,default:null}},computed:{hasCellOrSplitWidth(){return!!(this.options.minCellWidth||this.daySplits.length&&this.options.minSplitWidth)}}},[["render",function(e,i,s,n,a,l){const o=t.resolveComponent("vuecal-cell");return t.openBlock(),t.createElementBlock("div",{class:"vuecal__flex vuecal__all-day",style:t.normalizeStyle(s.cellOrSplitMinWidth&&{height:s.height})},[s.cellOrSplitMinWidth?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Y,[t.createElementVNode("span",null,t.toDisplayString(s.label),1)])),t.createElementVNode("div",{class:t.normalizeClass(["vuecal__flex vuecal__cells",`${l.view.id}-view`]),grow:"",style:t.normalizeStyle(s.cellOrSplitMinWidth?`min-width: ${s.cellOrSplitMinWidth}px`:"")},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.cells,((i,n)=>(t.openBlock(),t.createBlock(o,{key:n,options:s.options,"edit-events":l.editEvents,data:i,"all-day":!0,"cell-width":s.options.hideWeekdays.length&&(l.vuecal.isWeekView||l.vuecal.isMonthView)&&l.vuecal.cellWidth,"min-timestamp":s.options.minTimestamp,"max-timestamp":s.options.maxTimestamp,"cell-splits":s.daySplits},{event:t.withCtx((({event:i,view:s})=>[t.renderSlot(e.$slots,"event",{view:s,event:i})])),_:2},1032,["options","edit-events","data","cell-width","min-timestamp","max-timestamp","cell-splits"])))),128))],6)],4)}]]),z=["lang"],I={class:"default"},U={key:0,class:"vuecal__flex vuecal__body",grow:""},R=["onBlur","innerHTML"],q=["innerHTML"],K=["innerHTML"],X={class:"vuecal__flex",row:"",grow:""},G={key:0,class:"vuecal__time-column"},Z={class:"vuecal__time-cell-label"},J={key:1,class:"vuecal__flex vuecal__week-numbers",column:""},Q=["wrap","column"],ee=["onBlur","innerHTML"],te=["innerHTML"],ie=["innerHTML"],se=["wrap"],ne=["innerHTML"],ae=["innerHTML"],le={key:2,class:"vuecal__cell-events-count"},oe={key:3,class:"vuecal__no-event"},re=["onBlur","innerHTML"],de=["innerHTML"],ce={key:2,class:"vuecal__event-time"},ue={key:0},he={key:1,class:"days-to-end"},ve=["innerHTML"],me={key:0,class:"vuecal__scrollbar-check"};const pe=1440,we={weekDays:Array(7).fill(""),weekDaysShort:[],months:Array(12).fill(""),years:"",year:"",month:"",week:"",day:"",today:"",noEvent:"",allDay:"",deleteEvent:"",createEvent:"",dateFormat:"dddd MMMM D, YYYY",am:"am",pm:"pm"},ye=["years","year","month","week","day"],ge=new class{constructor(e,t=!1){__publicField(this,"texts",{}),__publicField(this,"dateToMinutes",(e=>60*e.getHours()+e.getMinutes())),a=this,this._texts=e,t||!Date||Date.prototype.addDays||this._initDatePrototypes()}_initDatePrototypes(){Date.prototype.addDays=function(e){return a.addDays(this,e)},Date.prototype.subtractDays=function(e){return a.subtractDays(this,e)},Date.prototype.addHours=function(e){return a.addHours(this,e)},Date.prototype.subtractHours=function(e){return a.subtractHours(this,e)},Date.prototype.addMinutes=function(e){return a.addMinutes(this,e)},Date.prototype.subtractMinutes=function(e){return a.subtractMinutes(this,e)},Date.prototype.getWeek=function(){return a.getWeek(this)},Date.prototype.isToday=function(){return a.isToday(this)},Date.prototype.isLeapYear=function(){return a.isLeapYear(this)},Date.prototype.format=function(e="YYYY-MM-DD"){return a.formatDate(this,e)},Date.prototype.formatTime=function(e="HH:mm"){return a.formatTime(this,e)}}removePrototypes(){delete Date.prototype.addDays,delete Date.prototype.subtractDays,delete Date.prototype.addHours,delete Date.prototype.subtractHours,delete Date.prototype.addMinutes,delete Date.prototype.subtractMinutes,delete Date.prototype.getWeek,delete Date.prototype.isToday,delete Date.prototype.isLeapYear,delete Date.prototype.format,delete Date.prototype.formatTime}updateTexts(e){this._texts=e}_todayFormatted(){return s!==(new Date).getDate()&&(i=new Date,s=i.getDate(),n=`${i.getFullYear()}-${i.getMonth()}-${i.getDate()}`),n}addDays(e,t){const i=new Date(e.valueOf());return i.setDate(i.getDate()+t),i}subtractDays(e,t){const i=new Date(e.valueOf());return i.setDate(i.getDate()-t),i}addHours(e,t){const i=new Date(e.valueOf());return i.setHours(i.getHours()+t),i}subtractHours(e,t){const i=new Date(e.valueOf());return i.setHours(i.getHours()-t),i}addMinutes(e,t){const i=new Date(e.valueOf());return i.setMinutes(i.getMinutes()+t),i}subtractMinutes(e,t){const i=new Date(e.valueOf());return i.setMinutes(i.getMinutes()-t),i}getWeek(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),i=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-i);const s=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t-s)/864e5+1)/7)}isToday(e){return`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`===this._todayFormatted()}isLeapYear(e){const t=e.getFullYear();return!(t%400)||t%100&&!(t%4)}getPreviousFirstDayOfWeek(e=null,t){const i=e&&new Date(e.valueOf())||new Date,s=t?7:6;return i.setDate(i.getDate()-(i.getDay()+s)%7),i}stringToDate(e){return e instanceof Date?e:(10===e.length&&(e+=" 00:00"),new Date(e.replace(/-/g,"/")))}countDays(e,t){"string"==typeof e&&(e=e.replace(/-/g,"/")),"string"==typeof t&&(t=t.replace(/-/g,"/")),e=new Date(e).setHours(0,0,0,0),t=new Date(t).setHours(0,0,1,0);const i=60*(new Date(t).getTimezoneOffset()-new Date(e).getTimezoneOffset())*1e3;return Math.ceil((t-e-i)/864e5)}datesInSameTimeStep(e,t,i){return Math.abs(e.getTime()-t.getTime())<=60*i*1e3}formatDate(e,t="YYYY-MM-DD",i=null){if(i||(i=this._texts),t||(t="YYYY-MM-DD"),"YYYY-MM-DD"===t)return this.formatDateLite(e);l={},o={};const s={YYYY:()=>this._hydrateDateObject(e,i).YYYY,YY:()=>this._hydrateDateObject(e,i).YY(),M:()=>this._hydrateDateObject(e,i).M,MM:()=>this._hydrateDateObject(e,i).MM(),MMM:()=>this._hydrateDateObject(e,i).MMM(),MMMM:()=>this._hydrateDateObject(e,i).MMMM(),MMMMG:()=>this._hydrateDateObject(e,i).MMMMG(),D:()=>this._hydrateDateObject(e,i).D,DD:()=>this._hydrateDateObject(e,i).DD(),S:()=>this._hydrateDateObject(e,i).S(),d:()=>this._hydrateDateObject(e,i).d,dd:()=>this._hydrateDateObject(e,i).dd(),ddd:()=>this._hydrateDateObject(e,i).ddd(),dddd:()=>this._hydrateDateObject(e,i).dddd(),HH:()=>this._hydrateTimeObject(e,i).HH,H:()=>this._hydrateTimeObject(e,i).H,hh:()=>this._hydrateTimeObject(e,i).hh,h:()=>this._hydrateTimeObject(e,i).h,am:()=>this._hydrateTimeObject(e,i).am,AM:()=>this._hydrateTimeObject(e,i).AM,mm:()=>this._hydrateTimeObject(e,i).mm,m:()=>this._hydrateTimeObject(e,i).m};return t.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g,((e,t)=>{const i=s[t.replace(/\{|\}/g,"")];return void 0!==i?i():t}))}formatDateLite(e){const t=e.getMonth()+1,i=e.getDate();return`${e.getFullYear()}-${t<10?"0":""}${t}-${i<10?"0":""}${i}`}formatTime(e,t="HH:mm",i=null,s=!1){let n=!1;if(s){const[t,i,s]=[e.getHours(),e.getMinutes(),e.getSeconds()];t+i+s===141&&(n=!0)}if(e instanceof Date&&"HH:mm"===t)return n?"24:00":this.formatTimeLite(e);o={},i||(i=this._texts);const a=this._hydrateTimeObject(e,i),l=t.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g,((e,t)=>{const i=a[t.replace(/\{|\}/g,"")];return void 0!==i?i:t}));return n?l.replace("23:59","24:00"):l}formatTimeLite(e){const t=e.getHours(),i=e.getMinutes();return`${(t<10?"0":"")+t}:${(i<10?"0":"")+i}`}_nth(e){if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}_hydrateDateObject(e,t){if(l.D)return l;const i=e.getFullYear(),s=e.getMonth()+1,n=e.getDate(),a=(e.getDay()-1+7)%7;return l={YYYY:i,YY:()=>i.toString().substring(2),M:s,MM:()=>(s<10?"0":"")+s,MMM:()=>t.months[s-1].substring(0,3),MMMM:()=>t.months[s-1],MMMMG:()=>(t.monthsGenitive||t.months)[s-1],D:n,DD:()=>(n<10?"0":"")+n,S:()=>this._nth(n),d:a+1,dd:()=>t.weekDays[a][0],ddd:()=>t.weekDays[a].substr(0,3),dddd:()=>t.weekDays[a]},l}_hydrateTimeObject(e,t){if(o.am)return o;let i,s;e instanceof Date?(i=e.getHours(),s=e.getMinutes()):(i=Math.floor(e/60),s=Math.floor(e%60));const n=i%12?i%12:12,a=(t||{am:"am",pm:"pm"})[24===i||i<12?"am":"pm"];return o={H:i,h:n,HH:(i<10?"0":"")+i,hh:(n<10?"0":"")+n,am:a,AM:a.toUpperCase(),m:s,mm:(s<10?"0":"")+s},o}}(we);return _({name:"vue-cal",components:{"vuecal-cell":F,"vuecal-header":O,WeekdaysHeadings:b,AllDayBar:P},provide(){return{vuecal:this,utils:this.utils,modules:this.modules,previous:this.previous,next:this.next,switchView:this.switchView,updateSelectedDate:this.updateSelectedDate,editEvents:this.editEvents,view:this.view,domEvents:this.domEvents}},props:{activeView:{type:String,default:"week"},allDayBarHeight:{type:[String,Number],default:"25px"},cellClickHold:{type:Boolean,default:!0},cellContextmenu:{type:Boolean,default:!1},clickToNavigate:{type:Boolean,default:!1},dblclickToNavigate:{type:Boolean,default:!0},disableDatePrototypes:{type:Boolean,default:!1},disableDays:{type:Array,default:()=>[]},disableViews:{type:Array,default:()=>[]},dragToCreateEvent:{type:Boolean,default:!0},dragToCreateThreshold:{type:Number,default:15},editableEvents:{type:[Boolean,Object],default:!1},events:{type:Array,default:()=>[]},eventsCountOnYearView:{type:Boolean,default:!1},eventsOnMonthView:{type:[Boolean,String],default:!1},hideBody:{type:Boolean,default:!1},hideTitleBar:{type:Boolean,default:!1},hideViewSelector:{type:Boolean,default:!1},hideWeekdays:{type:Array,default:()=>[]},hideWeekends:{type:Boolean,default:!1},locale:{type:[String,Object],default:"en"},maxDate:{type:[String,Date],default:""},minCellWidth:{type:Number,default:0},minDate:{type:[String,Date],default:""},minEventWidth:{type:Number,default:0},minSplitWidth:{type:Number,default:0},onEventClick:{type:[Function,null],default:null},onEventCreate:{type:[Function,null],default:null},onEventDblclick:{type:[Function,null],default:null},overlapsPerTimeStep:{type:Boolean,default:!1},resizeX:{type:Boolean,default:!1},selectedDate:{type:[String,Date],default:""},showAllDayEvents:{type:[Boolean,String],default:!1},showTimeInCells:{type:Boolean,default:!1},showWeekNumbers:{type:[Boolean,String],default:!1},snapToTime:{type:Number,default:0},small:{type:Boolean,default:!1},specialHours:{type:Object,default:()=>({})},splitDays:{type:Array,default:()=>[]},startWeekOnSunday:{type:Boolean,default:!1},stickySplitLabels:{type:Boolean,default:!1},time:{type:Boolean,default:!0},timeCellHeight:{type:Number,default:40},timeFormat:{type:String,default:""},timeFrom:{type:Number,default:0},timeStep:{type:Number,default:60},timeTo:{type:Number,default:pe},todayButton:{type:Boolean,default:!1},transitions:{type:Boolean,default:!0},twelveHour:{type:Boolean,default:!1},watchRealTime:{type:Boolean,default:!1},xsmall:{type:Boolean,default:!1}},data(){return{ready:!1,texts:{...we},utils:{date:!!this.disableDatePrototypes&&ge.removePrototypes()||ge,cell:null,event:null},modules:{dnd:null},cellsEl:null,view:{id:"",title:"",startDate:null,endDate:null,firstCellDate:null,lastCellDate:null,selectedDate:null,events:[]},eventIdIncrement:1,now:new Date,timeTickerIds:[null,null],domEvents:{resizeAnEvent:{_eid:null,start:null,split:null,segment:null,originalEndTimeMinutes:0,originalEnd:null,end:null,startCell:null,endCell:null},dragAnEvent:{_eid:null},dragCreateAnEvent:{startCursorY:null,start:null,split:null,event:null},focusAnEvent:{_eid:null,mousedUp:!1},clickHoldAnEvent:{_eid:null,timeout:1200,timeoutId:null},dblTapACell:{taps:0,timeout:500},clickHoldACell:{cellId:null,split:null,timeout:1200,timeoutId:null,eventCreated:!1},cancelClickEventCreation:!1},mutableEvents:[],transitionDirection:"right"}},methods:{async loadLocale(t){if("object"==typeof this.locale)return this.texts=Object.assign({},we,t),void this.utils.date.updateTexts(this.texts);const i=await((e,t,i)=>{const s=e[t];return s?"function"==typeof s?s():Promise.resolve(s):new Promise(((e,s)=>{("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==i?". Note that variables only represent file names one level deep.":""))))}))})(Object.assign({"./i18n/ar.json":()=>new Promise(((t,i)=>e(["./i18n/ar.amd"],t,i))),"./i18n/bg.json":()=>new Promise(((t,i)=>e(["./i18n/bg.amd"],t,i))),"./i18n/bn.json":()=>new Promise(((t,i)=>e(["./i18n/bn.amd"],t,i))),"./i18n/bs.json":()=>new Promise(((t,i)=>e(["./i18n/bs.amd"],t,i))),"./i18n/ca.json":()=>new Promise(((t,i)=>e(["./i18n/ca.amd"],t,i))),"./i18n/cs.json":()=>new Promise(((t,i)=>e(["./i18n/cs.amd"],t,i))),"./i18n/da.json":()=>new Promise(((t,i)=>e(["./i18n/da.amd"],t,i))),"./i18n/de.json":()=>new Promise(((t,i)=>e(["./i18n/de.amd"],t,i))),"./i18n/el.json":()=>new Promise(((t,i)=>e(["./i18n/el.amd"],t,i))),"./i18n/en.json":()=>new Promise(((t,i)=>e(["./i18n/en.amd"],t,i))),"./i18n/es.json":()=>new Promise(((t,i)=>e(["./i18n/es.amd"],t,i))),"./i18n/et.json":()=>new Promise(((t,i)=>e(["./i18n/et.amd"],t,i))),"./i18n/fa.json":()=>new Promise(((t,i)=>e(["./i18n/fa.amd"],t,i))),"./i18n/fi.json":()=>new Promise(((t,i)=>e(["./i18n/fi.amd"],t,i))),"./i18n/fr.json":()=>new Promise(((t,i)=>e(["./i18n/fr.amd"],t,i))),"./i18n/he.json":()=>new Promise(((t,i)=>e(["./i18n/he.amd"],t,i))),"./i18n/hr.json":()=>new Promise(((t,i)=>e(["./i18n/hr.amd"],t,i))),"./i18n/hu.json":()=>new Promise(((t,i)=>e(["./i18n/hu.amd"],t,i))),"./i18n/id.json":()=>new Promise(((t,i)=>e(["./i18n/id.amd"],t,i))),"./i18n/is.json":()=>new Promise(((t,i)=>e(["./i18n/is.amd"],t,i))),"./i18n/it.json":()=>new Promise(((t,i)=>e(["./i18n/it.amd"],t,i))),"./i18n/ja.json":()=>new Promise(((t,i)=>e(["./i18n/ja.amd"],t,i))),"./i18n/ka.json":()=>new Promise(((t,i)=>e(["./i18n/ka.amd"],t,i))),"./i18n/ko.json":()=>new Promise(((t,i)=>e(["./i18n/ko.amd"],t,i))),"./i18n/lt.json":()=>new Promise(((t,i)=>e(["./i18n/lt.amd"],t,i))),"./i18n/mn.json":()=>new Promise(((t,i)=>e(["./i18n/mn.amd"],t,i))),"./i18n/nl.json":()=>new Promise(((t,i)=>e(["./i18n/nl.amd"],t,i))),"./i18n/no.json":()=>new Promise(((t,i)=>e(["./i18n/no.amd"],t,i))),"./i18n/pl.json":()=>new Promise(((t,i)=>e(["./i18n/pl.amd"],t,i))),"./i18n/pt-br.json":()=>new Promise(((t,i)=>e(["./i18n/pt-br.amd"],t,i))),"./i18n/pt-pt.json":()=>new Promise(((t,i)=>e(["./i18n/pt-pt.amd"],t,i))),"./i18n/ro.json":()=>new Promise(((t,i)=>e(["./i18n/ro.amd"],t,i))),"./i18n/ru.json":()=>new Promise(((t,i)=>e(["./i18n/ru.amd"],t,i))),"./i18n/sk.json":()=>new Promise(((t,i)=>e(["./i18n/sk.amd"],t,i))),"./i18n/sl.json":()=>new Promise(((t,i)=>e(["./i18n/sl.amd"],t,i))),"./i18n/sq.json":()=>new Promise(((t,i)=>e(["./i18n/sq.amd"],t,i))),"./i18n/sr.json":()=>new Promise(((t,i)=>e(["./i18n/sr.amd"],t,i))),"./i18n/sv.json":()=>new Promise(((t,i)=>e(["./i18n/sv.amd"],t,i))),"./i18n/tr.json":()=>new Promise(((t,i)=>e(["./i18n/tr.amd"],t,i))),"./i18n/uk.json":()=>new Promise(((t,i)=>e(["./i18n/uk.amd"],t,i))),"./i18n/vi.json":()=>new Promise(((t,i)=>e(["./i18n/vi.amd"],t,i))),"./i18n/zh-cn.json":()=>new Promise(((t,i)=>e(["./i18n/zh-cn.amd"],t,i))),"./i18n/zh-hk.json":()=>new Promise(((t,i)=>e(["./i18n/zh-hk.amd"],t,i)))}),`./i18n/${t}.json`,3);this.texts=Object.assign({},we,i),this.utils.date.updateTexts(this.texts)},loadDragAndDrop(){new Promise(((t,i)=>e(["./drag-and-drop.amd"],t,i))).then((e=>{const{DragAndDrop:t}=e;this.modules.dnd=new t(this)})).catch((()=>console.warn("Vue Cal: Missing drag & drop module.")))},validateView(e){return ye.includes(e)||(console.error(`Vue Cal: invalid active-view parameter provided: "${e}".\nA valid view must be one of: ${ye.join(", ")}.`),e="week"),this.enabledViews.includes(e)||(console.warn(`Vue Cal: the provided active-view "${e}" is disabled. Using the "${this.enabledViews[0]}" view instead.`),e=this.enabledViews[0]),e},switchToNarrowerView(e=null){this.transitionDirection="right";const t=this.enabledViews[this.enabledViews.indexOf(this.view.id)+1];t&&this.switchView(t,e)},switchView(e,t=null,i=!1){e=this.validateView(e);const s=this.utils.date,n=this.view.startDate&&this.view.startDate.getTime();if(this.transitions&&i){if(this.view.id===e)return;const t=this.enabledViews;this.transitionDirection=t.indexOf(this.view.id)>t.indexOf(e)?"left":"right"}const a=this.view.id;switch(this.view.events=[],this.view.id=e,this.view.firstCellDate=null,this.view.lastCellDate=null,t||(t=this.view.selectedDate||this.view.startDate),e){case"years":this.view.startDate=new Date(25*Math.floor(t.getFullYear()/25)||2e3,0,1),this.view.endDate=new Date(this.view.startDate.getFullYear()+25,0,1),this.view.endDate.setSeconds(-1);break;case"year":this.view.startDate=new Date(t.getFullYear(),0,1),this.view.endDate=new Date(t.getFullYear()+1,0,1),this.view.endDate.setSeconds(-1);break;case"month":{this.view.startDate=new Date(t.getFullYear(),t.getMonth(),1),this.view.endDate=new Date(t.getFullYear(),t.getMonth()+1,1),this.view.endDate.setSeconds(-1);let e=new Date(this.view.startDate);if(e.getDay()!==(this.startWeekOnSunday?0:1)&&(e=s.getPreviousFirstDayOfWeek(e,this.startWeekOnSunday)),this.view.firstCellDate=e,this.view.lastCellDate=s.addDays(e,41),this.view.lastCellDate.setHours(23,59,59,0),this.hideWeekends){if([0,6].includes(this.view.firstCellDate.getDay())){const e=6!==this.view.firstCellDate.getDay()||this.startWeekOnSunday?1:2;this.view.firstCellDate=s.addDays(this.view.firstCellDate,e)}if([0,6].includes(this.view.startDate.getDay())){const e=6===this.view.startDate.getDay()?2:1;this.view.startDate=s.addDays(this.view.startDate,e)}if([0,6].includes(this.view.lastCellDate.getDay())){const e=0!==this.view.lastCellDate.getDay()||this.startWeekOnSunday?1:2;this.view.lastCellDate=s.subtractDays(this.view.lastCellDate,e)}if([0,6].includes(this.view.endDate.getDay())){const e=0===this.view.endDate.getDay()?2:1;this.view.endDate=s.subtractDays(this.view.endDate,e)}}break}case"week":{t=s.getPreviousFirstDayOfWeek(t,this.startWeekOnSunday);const e=this.hideWeekends?5:7;this.view.startDate=this.hideWeekends&&this.startWeekOnSunday?s.addDays(t,1):t,this.view.startDate.setHours(0,0,0,0),this.view.endDate=s.addDays(t,e),this.view.endDate.setSeconds(-1);break}case"day":this.view.startDate=t,this.view.startDate.setHours(0,0,0,0),this.view.endDate=new Date(t),this.view.endDate.setHours(23,59,59,0)}this.addEventsToView();const l=this.view.startDate&&this.view.startDate.getTime();if((a!==e||l!==n)&&(this.$emit("update:activeView",e),this.ready)){const t=this.view.startDate,i={view:e,startDate:t,endDate:this.view.endDate,...this.isMonthView?{firstCellDate:this.view.firstCellDate,lastCellDate:this.view.lastCellDate,outOfScopeEvents:this.view.outOfScopeEvents.map(this.cleanupEvent)}:{},events:this.view.events.map(this.cleanupEvent),...this.isWeekView?{week:s.getWeek(this.startWeekOnSunday?s.addDays(t,1):t)}:{}};this.$emit("view-change",i)}},previous(){this.previousNext(!1)},next(){this.previousNext()},previousNext(e=!0){const t=this.utils.date;this.transitionDirection=e?"right":"left";const i=e?1:-1;let s=null;const{startDate:n,id:a}=this.view;switch(a){case"years":s=new Date(n.getFullYear()+25*i,0,1);break;case"year":s=new Date(n.getFullYear()+1*i,1,1);break;case"month":s=new Date(n.getFullYear(),n.getMonth()+1*i,1);break;case"week":s=t[e?"addDays":"subtractDays"](t.getPreviousFirstDayOfWeek(n,this.startWeekOnSunday),7);break;case"day":s=t[e?"addDays":"subtractDays"](n,1);const a=s.getDay(),l=this.startWeekOnSunday?a:(a||7)-1;if(this.weekDays[l].hide){const i=this.weekDays.map(((e,t)=>({...e,i:t})));let n=0;e?([...i.slice(l),...i].find((e=>(n++,!e.hide))).i,n--):[...i,...i.slice(0,l)].reverse().find((e=>(n++,!e.hide))).i,s=t[e?"addDays":"subtractDays"](s,n)}}s&&this.switchView(a,s)},addEventsToView(e=[]){const t=this.utils.event,{startDate:i,endDate:s,firstCellDate:n,lastCellDate:a}=this.view;if(e.length||(this.view.events=[]),!(e=e.length?e:[...this.mutableEvents])||this.isYearsOrYearView&&!this.eventsCountOnYearView)return;let l=e.filter((e=>t.eventInRange(e,i,s)));this.isYearsOrYearView||this.isMonthView&&!this.eventsOnMonthView||(l=l.map((e=>e.daysCount>1?t.createEventSegments(e,n||i,a||s):e))),this.view.events.push(...l),this.isMonthView&&(this.view.outOfScopeEvents=[],e.forEach((e=>{(t.eventInRange(e,n,i)||t.eventInRange(e,s,a))&&(this.view.events.some((t=>t._eid===e._eid))||this.view.outOfScopeEvents.push(e))})))},findAncestor(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e},isDOMElementAnEvent(e){return e.classList.contains("vuecal__event")||this.findAncestor(e,"vuecal__event")},onMouseMove(e){const{resizeAnEvent:t,dragAnEvent:i,dragCreateAnEvent:s}=this.domEvents;(null!==t._eid||null!==i._eid||s.start)&&(e.preventDefault(),t._eid?this.eventResizing(e):this.dragToCreateEvent&&s.start&&this.eventDragCreation(e))},onMouseUp(e){const{focusAnEvent:t,resizeAnEvent:i,clickHoldAnEvent:s,clickHoldACell:n,dragCreateAnEvent:a}=this.domEvents,{_eid:l}=s,{_eid:o}=i;let r=!1;const{event:d,start:c}=a,u=this.isDOMElementAnEvent(e.target),h=t.mousedUp;if(t.mousedUp=!1,u&&(this.domEvents.cancelClickEventCreation=!0),n.eventCreated)return;if(o){const{originalEnd:e,originalEndTimeMinutes:t,endTimeMinutes:s}=i,n=this.view.events.find((e=>e._eid===i._eid));if(r=s&&s!==t,n&&n.end.getTime()!==e.getTime()){const t=this.mutableEvents.find((e=>e._eid===i._eid));t.endTimeMinutes=n.endTimeMinutes,t.end=n.end;const s=this.cleanupEvent(n),a={...this.cleanupEvent(n),end:e,endTimeMinutes:n.originalEndTimeMinutes};this.$emit("event-duration-change",{event:s,oldDate:i.originalEnd,originalEvent:a}),this.$emit("event-change",{event:s,originalEvent:a})}n&&(n.resizing=!1),i._eid=null,i.start=null,i.split=null,i.segment=null,i.originalEndTimeMinutes=null,i.originalEnd=null,i.endTimeMinutes=null,i.startCell=null,i.endCell=null}else c&&(d&&(this.emitWithEvent("event-drag-create",d),a.event.resizing=!1),a.start=null,a.split=null,a.event=null);u||o||this.unfocusEvent(),s.timeoutId&&!l&&(clearTimeout(s.timeoutId),s.timeoutId=null),n.timeoutId&&(clearTimeout(n.timeoutId),n.timeoutId=null);const v="function"==typeof this.onEventClick;if(h&&!r&&!l&&!d&&v){let i=this.view.events.find((e=>e._eid===t._eid));return!i&&this.isMonthView&&(i=this.view.outOfScopeEvents.find((e=>e._eid===t._eid))),i&&this.onEventClick(i,e)}},onKeyUp(e){27===e.keyCode&&this.cancelDelete()},eventResizing(e){const{resizeAnEvent:t}=this.domEvents,i=this.view.events.find((e=>e._eid===t._eid))||{segments:{}},{minutes:s,cursorCoords:n}=this.minutesAtCursor(e),a=i.segments&&i.segments[t.segment],{date:l,event:o}=this.utils,r=Math.max(s,this.timeFrom+1,(a||i).startTimeMinutes+1);if(i.endTimeMinutes=t.endTimeMinutes=r,this.snapToTime){const e=i.endTimeMinutes+this.snapToTime/2;i.endTimeMinutes=e-e%this.snapToTime}if(a&&(a.endTimeMinutes=i.endTimeMinutes),i.end.setHours(0,i.endTimeMinutes,i.endTimeMinutes===pe?-1:0,0),this.resizeX&&this.isWeekView){i.daysCount=l.countDays(i.start,i.end);const e=this.cellsEl,s=e.offsetWidth/e.childElementCount,a=Math.floor(n.x/s);if(null===t.startCell&&(t.startCell=a-(i.daysCount-1)),t.endCell!==a){t.endCell=a;const e=l.addDays(i.start,a-t.startCell),s=Math.max(l.countDays(i.start,e),1);if(s!==i.daysCount){let e=null;e=s>i.daysCount?o.addEventSegment(i):o.removeEventSegment(i),t.segment=e,i.endTimeMinutes+=.001}}}this.$emit("event-resizing",{_eid:i._eid,end:i.end,endTimeMinutes:i.endTimeMinutes})},eventDragCreation(e){const{dragCreateAnEvent:t}=this.domEvents,{start:i,startCursorY:s,split:n}=t,a=new Date(i),{minutes:l,cursorCoords:{y:o}}=this.minutesAtCursor(e);if(t.event||!(Math.abs(s-o)<this.dragToCreateThreshold))if(t.event){if(a.setHours(0,l,l===pe?-1:0,0),this.snapToTime){let e=60*a.getHours()+a.getMinutes();const t=e+this.snapToTime/2;e=t-t%this.snapToTime,a.setHours(0,e,0,0)}const e=i<a,{event:s}=t;s.start=e?i:a,s.end=e?a:i,s.startTimeMinutes=60*s.start.getHours()+s.start.getMinutes(),s.endTimeMinutes=60*s.end.getHours()+s.end.getMinutes()}else{if(t.event=this.utils.event.createAnEvent(i,1,{split:n}),!t.event)return t.start=null,t.split=null,void(t.event=null);t.event.resizing=!0}},unfocusEvent(){const{focusAnEvent:e,clickHoldAnEvent:t}=this.domEvents,i=this.view.events.find((i=>i._eid===(e._eid||t._eid)));e._eid=null,t._eid=null,i&&(i.focused=!1,i.deleting=!1)},cancelDelete(){const{clickHoldAnEvent:e}=this.domEvents;if(e._eid){const t=this.view.events.find((t=>t._eid===e._eid));t&&(t.deleting=!1),e._eid=null,e.timeoutId=null}},onEventTitleBlur(e,t){if(t.title===e.target.innerHTML)return;const i=t.title;t.title=e.target.innerHTML;const s=this.cleanupEvent(t);this.$emit("event-title-change",{event:s,oldTitle:i}),this.$emit("event-change",{event:s,originalEvent:{...s,title:i}})},updateMutableEvents(){const e=this.utils.date;this.mutableEvents=[],this.events.forEach((t=>{const i="string"==typeof t.start?e.stringToDate(t.start):t.start,s=e.formatDateLite(i),n=e.dateToMinutes(i);let a=null;"string"==typeof t.end&&t.end.includes("24:00")?(a=new Date(t.end.replace(" 24:00","")),a.setHours(23,59,59,0)):a="string"==typeof t.end?e.stringToDate(t.end):t.end;let l=e.formatDateLite(a),o=e.dateToMinutes(a);o&&o!==pe||(!this.time||"string"==typeof t.end&&10===t.end.length?a.setHours(23,59,59,0):a.setSeconds(a.getSeconds()-1),l=e.formatDateLite(a),o=pe);const r=s!==l;t=Object.assign({...this.utils.event.eventDefaults},t,{_eid:`${this._.uid}_${this.eventIdIncrement++}`,segments:r?{}:null,start:i,startTimeMinutes:n,end:a,endTimeMinutes:o,daysCount:r?e.countDays(i,a):1,class:t.class}),this.mutableEvents.push(t)}))},minutesAtCursor(e){return this.utils.cell.minutesAtCursor(e)},createEvent(e,t,i={}){return this.utils.event.createAnEvent(e,t,i)},cleanupEvent(e){e={...e};return["segments","deletable","deleting","titleEditable","resizable","resizing","draggable","dragging","draggingStatic","focused"].forEach((t=>{t in e&&delete e[t]})),e.repeat||delete e.repeat,e},emitWithEvent(e,t){this.$emit(e,this.cleanupEvent(t))},updateSelectedDate(e){if((e=e&&"string"==typeof e?this.utils.date.stringToDate(e):new Date(e))&&e instanceof Date){const{selectedDate:t}=this.view;t&&(this.transitionDirection=t.getTime()>e.getTime()?"left":"right"),e.setHours(0,0,0,0),t&&t.getTime()===e.getTime()||(this.view.selectedDate=e),this.switchView(this.view.id)}this.$emit("update:selected-date",this.view.selectedDate)},getWeekNumber(e){const t=this.utils.date,i=this.firstCellDateWeekNumber+e,s=this.startWeekOnSunday?1:0;return i>52?t.getWeek(t.addDays(this.view.firstCellDate,7*e+s)):i},timeTick(){this.now=new Date,this.timeTickerIds[1]=setTimeout(this.timeTick,6e4)},updateDateTexts(){this.utils.date.updateTexts(this.texts)},alignWithScrollbar(){if(document.getElementById("vuecal-align-with-scrollbar"))return;const e=this.$refs.vuecal.getElementsByClassName("vuecal__scrollbar-check")[0],t=e.offsetWidth-e.children[0].offsetWidth;if(t){const e=document.createElement("style");e.id="vuecal-align-with-scrollbar",e.type="text/css",e.innerHTML=`.vuecal--view-with-time .vuecal__weekdays-headings,.vuecal--view-with-time .vuecal__all-day {padding-right: ${t}px}`,document.head.appendChild(e)}},cellOrSplitHasEvents:(e,t=null)=>e.length&&(!t&&e.length||t&&e.some((e=>e.split===t.id)))},created(){this.utils.cell=new r(this),this.utils.event=new v(this,this.utils.date),this.loadLocale(this.locale),this.editEvents.drag&&this.loadDragAndDrop(),this.updateMutableEvents(this.events),this.view.id=this.currentView,this.selectedDate?this.updateSelectedDate(this.selectedDate):(this.view.selectedDate=new Date,this.switchView(this.currentView)),this.time&&this.watchRealTime&&(this.timeTickerIds[0]=setTimeout(this.timeTick,1e3*(60-this.now.getSeconds())))},mounted(){const e=this.utils.date,t="ontouchstart"in window,{resize:i,drag:s,create:n,delete:a,title:l}=this.editEvents,o=this.onEventClick&&"function"==typeof this.onEventClick;(i||s||n||a||l||o)&&window.addEventListener(t?"touchend":"mouseup",this.onMouseUp),(i||s||n&&this.dragToCreateEvent)&&window.addEventListener(t?"touchmove":"mousemove",this.onMouseMove,{passive:!1}),l&&window.addEventListener("keyup",this.onKeyUp),t&&(this.$refs.vuecal.oncontextmenu=function(e){e.preventDefault(),e.stopPropagation()}),this.hideBody||this.alignWithScrollbar();const r=this.view.startDate,d={view:this.view.id,startDate:r,endDate:this.view.endDate,...this.isMonthView?{firstCellDate:this.view.firstCellDate,lastCellDate:this.view.lastCellDate}:{},events:this.view.events.map(this.cleanupEvent),...this.isWeekView?{week:e.getWeek(this.startWeekOnSunday?e.addDays(r,1):r)}:{}};this.$emit("ready",d),this.ready=!0},beforeUnmount(){const e="ontouchstart"in window;window.removeEventListener(e?"touchmove":"mousemove",this.onMouseMove,{passive:!1}),window.removeEventListener(e?"touchend":"mouseup",this.onMouseUp),window.removeEventListener("keyup",this.onKeyUp),this.timeTickerIds[0]&&clearTimeout(this.timeTickerIds[0]),this.timeTickerIds[1]&&clearTimeout(this.timeTickerIds[1]),this.timeTickerIds=[null,null]},computed:{editEvents(){return this.editableEvents&&"object"==typeof this.editableEvents?{title:!!this.editableEvents.title,drag:!!this.editableEvents.drag,resize:!!this.editableEvents.resize,create:!!this.editableEvents.create,delete:!!this.editableEvents.delete}:{title:!!this.editableEvents,drag:!!this.editableEvents,resize:!!this.editableEvents,create:!!this.editableEvents,delete:!!this.editableEvents}},views(){return{years:{label:this.texts.years,enabled:!this.disableViews.includes("years")},year:{label:this.texts.year,enabled:!this.disableViews.includes("year")},month:{label:this.texts.month,enabled:!this.disableViews.includes("month")},week:{label:this.texts.week,enabled:!this.disableViews.includes("week")},day:{label:this.texts.day,enabled:!this.disableViews.includes("day")}}},currentView(){return this.validateView(this.activeView)},enabledViews(){return Object.keys(this.views).filter((e=>this.views[e].enabled))},hasTimeColumn(){return this.time&&this.isWeekOrDayView},isShortMonthView(){return this.isMonthView&&"short"===this.eventsOnMonthView},firstCellDateWeekNumber(){const e=this.utils.date,t=this.view.firstCellDate;return e.getWeek(this.startWeekOnSunday?e.addDays(t,1):t)},timeCells(){const e=[];for(let t=this.timeFrom,i=this.timeTo;t<i;t+=this.timeStep)e.push({hours:Math.floor(t/60),minutes:t%60,label:this.utils.date.formatTime(t,this.TimeFormat),value:t});return e},TimeFormat(){return this.timeFormat||(this.twelveHour?"h:mm{am}":"HH:mm")},daySplits(){return(this.splitDays.filter((e=>!e.hide))||[]).map(((e,t)=>({...e,id:e.id||t+1})))},hasSplits(){return this.daySplits.length&&this.isWeekOrDayView},hasShortEvents(){return"short"===this.showAllDayEvents},cellOrSplitMinWidth(){let e=null;return this.hasSplits&&this.minSplitWidth?e=this.visibleDaysCount*this.minSplitWidth*this.daySplits.length:this.minCellWidth&&this.isWeekView&&(e=this.visibleDaysCount*this.minCellWidth),e},allDayBar(){let e=this.allDayBarHeight||null;return e&&!isNaN(e)&&(e+="px"),{cells:this.viewCells,options:this.$props,label:this.texts.allDay,shortEvents:this.hasShortEvents,daySplits:this.hasSplits&&this.daySplits||[],cellOrSplitMinWidth:this.cellOrSplitMinWidth,height:e}},minTimestamp(){let e=null;return this.minDate&&"string"==typeof this.minDate?e=this.utils.date.stringToDate(this.minDate):this.minDate&&this.minDate instanceof Date&&(e=this.minDate),e?e.getTime():null},maxTimestamp(){let e=null;return this.maxDate&&"string"==typeof this.maxDate?e=this.utils.date.stringToDate(this.maxDate):this.maxDate&&this.maxDate instanceof Date&&(e=this.maxDate),e?e.getTime():null},weekDays(){let{weekDays:e,weekDaysShort:t=[]}=this.texts;return e=e.slice(0).map(((e,i)=>({label:e,...t.length?{short:t[i]}:{},hide:this.hideWeekends&&i>=5||this.hideWeekdays.length&&this.hideWeekdays.includes(i+1)}))),this.startWeekOnSunday&&e.unshift(e.pop()),e},weekDaysInHeader(){return this.isMonthView||this.isWeekView&&!this.minCellWidth&&!(this.hasSplits&&this.minSplitWidth)},months(){return this.texts.months.map((e=>({label:e})))},specialDayHours(){return this.specialHours&&Object.keys(this.specialHours).length?Array(7).fill("").map(((e,t)=>{let i=this.specialHours[t+1]||[];return Array.isArray(i)||(i=[i]),e=[],i.forEach((({from:i,to:s,class:n,label:a},l)=>{e[l]={day:t+1,from:[null,void 0].includes(i)?null:1*i,to:[null,void 0].includes(s)?null:1*s,class:n||"",label:a||""}})),e})):{}},viewTitle(){const e=this.utils.date;let t="";const i=this.view.startDate,s=i.getFullYear(),n=i.getMonth();switch(this.view.id){case"years":t=this.texts.years;break;case"year":t=s;break;case"month":t=`${this.months[n].label} ${s}`;break;case"week":{const s=this.view.endDate,n=i.getFullYear();let a=this.texts.months[i.getMonth()];this.xsmall&&(a=a.substring(0,3));let l=`${a} ${n}`;if(s.getMonth()!==i.getMonth()){const e=s.getFullYear();let t=this.texts.months[s.getMonth()];this.xsmall&&(t=t.substring(0,3)),l=n===e?`${a} - ${t} ${n}`:this.small?`${a.substring(0,3)} ${n} - ${t.substring(0,3)} ${e}`:`${a} ${n} - ${t} ${e}`}t=`${this.texts.week} ${e.getWeek(this.startWeekOnSunday?e.addDays(i,1):i)} (${l})`;break}case"day":t=this.utils.date.formatDate(i,this.texts.dateFormat,this.texts)}return t},viewCells(){const e=this.utils.date;let t=[],i=null,s=!1;this.watchRealTime||(this.now=new Date);const n=this.now;switch(this.view.id){case"years":i=this.view.startDate.getFullYear(),t=Array.apply(null,Array(25)).map(((t,s)=>{const a=new Date(i+s,0,1),l=new Date(i+s+1,0,1);return l.setSeconds(-1),{startDate:a,formattedDate:e.formatDateLite(a),endDate:l,content:i+s,current:i+s===n.getFullYear()}}));break;case"year":i=this.view.startDate.getFullYear(),t=Array.apply(null,Array(12)).map(((t,s)=>{const a=new Date(i,s,1),l=new Date(i,s+1,1);return l.setSeconds(-1),{startDate:a,formattedDate:e.formatDateLite(a),endDate:l,content:this.xsmall?this.months[s].label.substr(0,3):this.months[s].label,current:s===n.getMonth()&&i===n.getFullYear()}}));break;case"month":{const i=this.view.startDate.getMonth(),n=new Date(this.view.firstCellDate);s=!1,t=Array.apply(null,Array(42)).map(((t,a)=>{const l=e.addDays(n,a),o=new Date(l);o.setHours(23,59,59,0);const r=!s&&e.isToday(l)&&!s++;return{startDate:l,formattedDate:e.formatDateLite(l),endDate:o,content:l.getDate(),today:r,outOfScope:l.getMonth()!==i,class:`vuecal__cell--day${l.getDay()||7}`}})),(this.hideWeekends||this.hideWeekdays.length)&&(t=t.filter((e=>{const t=e.startDate.getDay()||7;return!(this.hideWeekends&&t>=6||this.hideWeekdays.length&&this.hideWeekdays.includes(t))})));break}case"week":{s=!1;const i=this.view.startDate,n=this.weekDays;t=n.map(((t,n)=>{const a=e.addDays(i,this.startWeekOnSunday&&this.hideWeekends?n-1:n),l=new Date(a);l.setHours(23,59,59,0);const o=(a.getDay()||7)-1;return{startDate:a,formattedDate:e.formatDateLite(a),endDate:l,today:!s&&e.isToday(a)&&!s++,specialHours:this.specialDayHours[o]||[]}})).filter(((e,t)=>!n[t].hide));break}case"day":{const i=this.view.startDate,s=new Date(this.view.startDate);s.setHours(23,59,59,0);const n=(i.getDay()||7)-1;t=[{startDate:i,formattedDate:e.formatDateLite(i),endDate:s,today:e.isToday(i),specialHours:this.specialDayHours[n]||[]}];break}}return t},visibleDaysCount(){return this.isDayView?1:7-this.weekDays.reduce(((e,t)=>e+t.hide),0)},cellWidth(){return 100/this.visibleDaysCount},cssClasses(){const{resizeAnEvent:e,dragAnEvent:t,dragCreateAnEvent:i}=this.domEvents;return{[`vuecal--${this.view.id}-view`]:!0,[`vuecal--${this.locale}`]:this.locale,"vuecal--no-time":!this.time,"vuecal--view-with-time":this.hasTimeColumn,"vuecal--week-numbers":this.showWeekNumbers&&this.isMonthView,"vuecal--twelve-hour":this.twelveHour,"vuecal--click-to-navigate":this.clickToNavigate,"vuecal--hide-weekends":this.hideWeekends,"vuecal--split-days":this.hasSplits,"vuecal--sticky-split-labels":this.hasSplits&&this.stickySplitLabels,"vuecal--overflow-x":this.minCellWidth&&this.isWeekView||this.hasSplits&&this.minSplitWidth,"vuecal--small":this.small,"vuecal--xsmall":this.xsmall,"vuecal--resizing-event":e._eid,"vuecal--drag-creating-event":i.event,"vuecal--dragging-event":t._eid,"vuecal--events-on-month-view":this.eventsOnMonthView,"vuecal--short-events":this.isMonthView&&"short"===this.eventsOnMonthView,"vuecal--has-touch":"undefined"!=typeof window&&"ontouchstart"in window}},isYearsOrYearView(){return["years","year"].includes(this.view.id)},isYearsView(){return"years"===this.view.id},isYearView(){return"year"===this.view.id},isMonthView(){return"month"===this.view.id},isWeekOrDayView(){return["week","day"].includes(this.view.id)},isWeekView(){return"week"===this.view.id},isDayView(){return"day"===this.view.id}},watch:{events:{handler(e,t){this.updateMutableEvents(e),this.addEventsToView()},deep:!0},locale(e){this.loadLocale(e)},selectedDate(e){this.updateSelectedDate(e)},activeView(e){this.switchView(e)}}},[["render",function(e,i,s,n,a,l){const o=t.resolveComponent("vuecal-header"),r=t.resolveComponent("all-day-bar"),d=t.resolveComponent("weekdays-headings"),c=t.resolveComponent("vuecal-cell");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["vuecal__flex vuecal",l.cssClasses]),column:"",ref:"vuecal",lang:s.locale},[t.createVNode(o,{options:e.$props,"edit-events":l.editEvents,"view-props":{views:l.views,weekDaysInHeader:l.weekDaysInHeader},"week-days":l.weekDays,"has-splits":l.hasSplits,"day-splits":l.daySplits,"switch-to-narrower-view":l.switchToNarrowerView},t.createSlots({"arrow-prev":t.withCtx((()=>[t.renderSlot(e.$slots,"arrow-prev",{},(()=>[i[0]||(i[0]=t.createTextVNode(" ")),i[1]||(i[1]=t.createElementVNode("i",{class:"angle"},null,-1)),i[2]||(i[2]=t.createTextVNode(" "))]))])),"arrow-next":t.withCtx((()=>[t.renderSlot(e.$slots,"arrow-next",{},(()=>[i[3]||(i[3]=t.createTextVNode(" ")),i[4]||(i[4]=t.createElementVNode("i",{class:"angle"},null,-1)),i[5]||(i[5]=t.createTextVNode(" "))]))])),"today-button":t.withCtx((()=>[t.renderSlot(e.$slots,"today-button",{},(()=>[t.createElementVNode("span",I,t.toDisplayString(a.texts.today),1)]))])),title:t.withCtx((()=>[t.renderSlot(e.$slots,"title",{title:l.viewTitle,view:a.view},(()=>[t.createTextVNode(t.toDisplayString(l.viewTitle),1)]))])),_:2},[e.$slots["weekday-heading"]?{name:"weekday-heading",fn:t.withCtx((({heading:i,view:s})=>[t.renderSlot(e.$slots,"weekday-heading",{heading:i,view:s})])),key:"0"}:void 0,e.$slots["split-label"]?{name:"split-label",fn:t.withCtx((({split:i})=>[t.renderSlot(e.$slots,"split-label",{split:i,view:a.view.id})])),key:"1"}:void 0]),1032,["options","edit-events","view-props","week-days","has-splits","day-splits","switch-to-narrower-view"]),s.hideBody?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",U,[t.createVNode(t.Transition,{name:`slide-fade--${a.transitionDirection}`,appear:s.transitions},{default:t.withCtx((()=>[(t.openBlock(),t.createElementBlock("div",{class:"vuecal__flex",style:{"min-width":"100%"},key:!!s.transitions&&a.view.id,column:""},[s.showAllDayEvents&&l.hasTimeColumn&&(!l.cellOrSplitMinWidth||l.isDayView&&!s.minSplitWidth)?(t.openBlock(),t.createBlock(r,t.normalizeProps(t.mergeProps({key:0},l.allDayBar)),{event:t.withCtx((({event:i,view:s})=>[t.renderSlot(e.$slots,"event",{view:s,event:i},(()=>[l.editEvents.title&&i.titleEditable?(t.openBlock(),t.createElementBlock("div",{key:0,class:"vuecal__event-title vuecal__event-title--edit",contenteditable:"",onBlur:e=>l.onEventTitleBlur(e,i),innerHTML:i.title},null,40,R)):i.title?(t.openBlock(),t.createElementBlock("div",{key:1,class:"vuecal__event-title",innerHTML:i.title},null,8,q)):t.createCommentVNode("",!0),!i.content||l.hasShortEvents||l.isShortMonthView?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:2,class:"vuecal__event-content",innerHTML:i.content},null,8,K))]))])),_:3},16)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["vuecal__bg",{vuecal__flex:!l.hasTimeColumn}]),column:""},[t.createElementVNode("div",X,[l.hasTimeColumn?(t.openBlock(),t.createElementBlock("div",G,[s.showAllDayEvents&&l.cellOrSplitMinWidth&&(!l.isDayView||s.minSplitWidth)?(t.openBlock(),t.createElementBlock("div",{key:0,class:"vuecal__all-day-text",style:t.normalizeStyle({height:l.allDayBar.height})},[t.createElementVNode("span",null,t.toDisplayString(a.texts.allDay),1)],4)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.timeCells,((n,a)=>(t.openBlock(),t.createElementBlock("div",{class:"vuecal__time-cell",key:a,style:t.normalizeStyle(`height: ${s.timeCellHeight}px`)},[t.renderSlot(e.$slots,"time-cell",{hours:n.hours,minutes:n.minutes},(()=>[i[6]||(i[6]=t.createElementVNode("span",{class:"vuecal__time-cell-line"},null,-1)),t.createElementVNode("span",Z,t.toDisplayString(n.label),1)]))],4)))),128))])):t.createCommentVNode("",!0),s.showWeekNumbers&&l.isMonthView?(t.openBlock(),t.createElementBlock("div",J,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(6,(i=>t.createElementVNode("div",{class:"vuecal__flex vuecal__week-number-cell",key:i,grow:""},[t.renderSlot(e.$slots,"week-number-cell",{week:l.getWeekNumber(i-1)},(()=>[t.createTextVNode(t.toDisplayString(l.getWeekNumber(i-1)),1)]))]))),64))])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["vuecal__flex vuecal__cells",`${a.view.id}-view`]),grow:"",wrap:!l.cellOrSplitMinWidth||!l.isWeekView,column:!!l.cellOrSplitMinWidth},[l.cellOrSplitMinWidth&&l.isWeekView?(t.openBlock(),t.createBlock(d,{key:0,"transition-direction":a.transitionDirection,"week-days":l.weekDays,"switch-to-narrower-view":l.switchToNarrowerView,style:t.normalizeStyle(l.cellOrSplitMinWidth?`min-width: ${l.cellOrSplitMinWidth}px`:"")},t.createSlots({_:2},[e.$slots["weekday-heading"]?{name:"weekday-heading",fn:t.withCtx((({heading:i,view:s})=>[t.renderSlot(e.$slots,"weekday-heading",{heading:i,view:s})])),key:"0"}:void 0,e.$slots["split-label"]?{name:"split-label",fn:t.withCtx((({split:i})=>[t.renderSlot(e.$slots,"split-label",{split:i,view:a.view.id})])),key:"1"}:void 0]),1032,["transition-direction","week-days","switch-to-narrower-view","style"])):l.hasSplits&&s.stickySplitLabels&&s.minSplitWidth?(t.openBlock(),t.createElementBlock("div",{key:1,class:"vuecal__flex vuecal__split-days-headers",style:t.normalizeStyle(l.cellOrSplitMinWidth?`min-width: ${l.cellOrSplitMinWidth}px`:"")},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.daySplits,((i,s)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["day-split-header",i.class||!1]),key:s},[t.renderSlot(e.$slots,"split-label",{split:i,view:a.view.id},(()=>[t.createTextVNode(t.toDisplayString(i.label),1)]))],2)))),128))],4)):t.createCommentVNode("",!0),s.showAllDayEvents&&l.hasTimeColumn&&(l.isWeekView&&l.cellOrSplitMinWidth||l.isDayView&&l.hasSplits&&s.minSplitWidth)?(t.openBlock(),t.createBlock(r,t.normalizeProps(t.mergeProps({key:2},l.allDayBar)),{event:t.withCtx((({event:i,view:s})=>[t.renderSlot(e.$slots,"event",{view:s,event:i},(()=>[l.editEvents.title&&i.titleEditable?(t.openBlock(),t.createElementBlock("div",{key:0,class:"vuecal__event-title vuecal__event-title--edit",contenteditable:"",onBlur:e=>l.onEventTitleBlur(e,i),innerHTML:i.title},null,40,ee)):i.title?(t.openBlock(),t.createElementBlock("div",{key:1,class:"vuecal__event-title",innerHTML:i.title},null,8,te)):t.createCommentVNode("",!0),!i.content||l.hasShortEvents||l.isShortMonthView?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:2,class:"vuecal__event-content",innerHTML:i.content},null,8,ie))]))])),_:3},16)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"vuecal__flex",ref:e=>a.cellsEl=e,grow:"",wrap:!l.cellOrSplitMinWidth||!l.isWeekView,style:t.normalizeStyle(l.cellOrSplitMinWidth?`min-width: ${l.cellOrSplitMinWidth}px`:"")},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.viewCells,((i,n)=>(t.openBlock(),t.createBlock(c,{key:n,options:e.$props,"edit-events":l.editEvents,data:i,"cell-width":s.hideWeekdays.length&&(l.isWeekView||l.isMonthView)&&l.cellWidth,"min-timestamp":l.minTimestamp,"max-timestamp":l.maxTimestamp,"cell-splits":l.hasSplits&&l.daySplits||[]},{"cell-content":t.withCtx((({events:n,split:o,selectCell:r})=>[t.renderSlot(e.$slots,"cell-content",{cell:i,view:a.view,goNarrower:r,events:n},(()=>[o&&!s.stickySplitLabels?(t.openBlock(),t.createElementBlock("div",{key:0,class:"split-label",innerHTML:o.label},null,8,ne)):t.createCommentVNode("",!0),i.content?(t.openBlock(),t.createElementBlock("div",{key:1,class:"vuecal__cell-date",innerHTML:i.content},null,8,ae)):t.createCommentVNode("",!0),(l.isMonthView&&!s.eventsOnMonthView||l.isYearsOrYearView&&s.eventsCountOnYearView)&&n.length?(t.openBlock(),t.createElementBlock("div",le,[t.renderSlot(e.$slots,"events-count",{view:a.view,events:n},(()=>[t.createTextVNode(t.toDisplayString(n.length),1)]))])):t.createCommentVNode("",!0),!l.cellOrSplitHasEvents(n,o)&&l.isWeekOrDayView?(t.openBlock(),t.createElementBlock("div",oe,[t.renderSlot(e.$slots,"no-event",{},(()=>[t.createTextVNode(t.toDisplayString(a.texts.noEvent),1)]))])):t.createCommentVNode("",!0)]))])),event:t.withCtx((({event:n,view:o})=>[t.renderSlot(e.$slots,"event",{view:o,event:n},(()=>[l.editEvents.title&&n.titleEditable?(t.openBlock(),t.createElementBlock("div",{key:0,class:"vuecal__event-title vuecal__event-title--edit",contenteditable:"",onBlur:e=>l.onEventTitleBlur(e,n),innerHTML:n.title},null,40,re)):n.title?(t.openBlock(),t.createElementBlock("div",{key:1,class:"vuecal__event-title",innerHTML:n.title},null,8,de)):t.createCommentVNode("",!0),!s.time||n.allDay||l.isMonthView&&(n.allDay||"short"===s.showAllDayEvents)||l.isShortMonthView?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",ce,[t.createTextVNode(t.toDisplayString(a.utils.date.formatTime(n.start,l.TimeFormat)),1),n.endTimeMinutes?(t.openBlock(),t.createElementBlock("span",ue," - "+t.toDisplayString(a.utils.date.formatTime(n.end,l.TimeFormat,null,!0)),1)):t.createCommentVNode("",!0),n.daysCount>1&&(n.segments[i.formattedDate]||{}).isFirstDay?(t.openBlock(),t.createElementBlock("small",he," +"+t.toDisplayString(n.daysCount-1)+t.toDisplayString((a.texts.day[0]||"").toLowerCase()),1)):t.createCommentVNode("",!0)])),!n.content||l.isMonthView&&n.allDay&&"short"===s.showAllDayEvents||l.isShortMonthView?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:3,class:"vuecal__event-content",innerHTML:n.content},null,8,ve))]))])),"no-event":t.withCtx((()=>[t.renderSlot(e.$slots,"no-event",{},(()=>[t.createTextVNode(t.toDisplayString(a.texts.noEvent),1)]))])),_:2},1032,["options","edit-events","data","cell-width","min-timestamp","max-timestamp","cell-splits"])))),128))],12,se)],10,Q)])],2)]))])),_:3},8,["name","appear"]),a.ready?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",me,i[7]||(i[7]=[t.createElementVNode("div",null,null,-1)])))]))],10,z)}]])}));
|
package/dist/vue-cal.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";var e=Object.defineProperty,t=(t,i,s)=>((t,i,s)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[i]=s)(t,"symbol"!=typeof i?i+"":i,s)
|
|
2
2
|
/**
|
|
3
|
-
* vue-cal v4.10.
|
|
3
|
+
* vue-cal v4.10.2
|
|
4
4
|
* (c) 2025 Antoni Andre <antoniandre.web@gmail.com>
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/;const i=require("vue");let s,n,l,a,o={},r={};class d{constructor(e){t(this,"_vuecal",null),t(this,"selectCell",((e=!1,t,i)=>{this._vuecal.$emit("cell-click",i?{date:t,split:i}:t),this._vuecal.clickToNavigate||e?this._vuecal.switchToNarrowerView():this._vuecal.dblclickToNavigate&&"ontouchstart"in window&&(this._vuecal.domEvents.dblTapACell.taps++,setTimeout((()=>this._vuecal.domEvents.dblTapACell.taps=0),this._vuecal.domEvents.dblTapACell.timeout),this._vuecal.domEvents.dblTapACell.taps>=2&&(this._vuecal.domEvents.dblTapACell.taps=0,this._vuecal.switchToNarrowerView(),this._vuecal.$emit("cell-dblclick",i?{date:t,split:i}:t)))})),t(this,"keyPressEnterCell",((e,t)=>{this._vuecal.$emit("cell-keypress-enter",t?{date:e,split:t}:e),this._vuecal.switchToNarrowerView()})),t(this,"getPosition",(e=>{const{left:t,top:i}=this._vuecal.cellsEl.getBoundingClientRect(),{clientX:s,clientY:n}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:s-t,y:n-i}})),t(this,"minutesAtCursor",(e=>{let t=0,i={x:0,y:0};const{timeStep:s,timeCellHeight:n,timeFrom:l}=this._vuecal.$props;return"number"==typeof e?t=e:"object"==typeof e&&(i=this.getPosition(e),t=Math.round(i.y*s/parseInt(n)+l)),{minutes:Math.max(Math.min(t,1440),0),cursorCoords:i}})),this._vuecal=e}}const c=1440;let h,u,v;class m{constructor(e,i){t(this,"_vuecal",null),t(this,"eventDefaults",{_eid:null,start:"",startTimeMinutes:0,end:"",endTimeMinutes:0,title:"",content:"",background:!1,allDay:!1,segments:null,repeat:null,daysCount:1,deletable:!0,deleting:!1,titleEditable:!0,resizable:!0,resizing:!1,draggable:!0,dragging:!1,draggingStatic:!1,focused:!1,class:""}),this._vuecal=e,h=i}createAnEvent(e,t,i){if("string"==typeof e&&(e=h.stringToDate(e)),!(e instanceof Date))return!1;const s=h.dateToMinutes(e),n=s+(t=1*t||120),l=h.addMinutes(new Date(e),t);i.end&&("string"==typeof i.end&&(i.end=h.stringToDate(i.end)),i.endTimeMinutes=h.dateToMinutes(i.end));const a={...this.eventDefaults,_eid:`${this._vuecal._.uid}_${this._vuecal.eventIdIncrement++}`,start:e,startTimeMinutes:s,end:l,endTimeMinutes:n,segments:null,...i};return"function"!=typeof this._vuecal.onEventCreate||this._vuecal.onEventCreate(a,(()=>this.deleteAnEvent(a)))?(a.startDateF!==a.endDateF&&(a.daysCount=h.countDays(a.start,a.end)),this._vuecal.mutableEvents.push(a),this._vuecal.addEventsToView([a]),this._vuecal.emitWithEvent("event-create",a),this._vuecal.$emit("event-change",{event:this._vuecal.cleanupEvent(a),originalEvent:null}),a):void 0}addEventSegment(e){e.segments||(e.segments={},e.segments[h.formatDateLite(e.start)]={start:e.start,startTimeMinutes:e.startTimeMinutes,endTimeMinutes:c,isFirstDay:!0,isLastDay:!1});const t=e.segments[h.formatDateLite(e.end)];t&&(t.isLastDay=!1,t.endTimeMinutes=c);const i=h.addDays(e.end,1),s=h.formatDateLite(i);return i.setHours(0,0,0,0),e.segments[s]={start:i,startTimeMinutes:0,endTimeMinutes:e.endTimeMinutes,isFirstDay:!1,isLastDay:!0},e.end=h.addMinutes(i,e.endTimeMinutes),e.daysCount=Object.keys(e.segments).length,s}removeEventSegment(e){let t=Object.keys(e.segments).length;if(t<=1)return h.formatDateLite(e.end);delete e.segments[h.formatDateLite(e.end)],t--;const i=h.subtractDays(e.end,1),s=h.formatDateLite(i),n=e.segments[s];return t?n&&(n.isLastDay=!0,n.endTimeMinutes=e.endTimeMinutes):e.segments=null,e.daysCount=t||1,e.end=i,s}createEventSegments(e,t,i){const s=t.getTime(),n=i.getTime();let l,a,o,r=e.start.getTime(),d=e.end.getTime(),u=!1;for(e.end.getHours()||e.end.getMinutes()||(d-=1e3),e.segments={},e.repeat?(l=s,a=Math.min(n,e.repeat.until?h.stringToDate(e.repeat.until).getTime():n)):(l=Math.max(s,r),a=Math.min(n,d));l<=a;){let t=!1;const i=h.addDays(new Date(l),1).setHours(0,0,0,0);let s,n,v,m;if(e.repeat){const i=new Date(l),a=h.formatDateLite(i);(u||e.occurrences&&e.occurrences[a])&&(u||(r=e.occurrences[a].start,o=new Date(r).setHours(0,0,0,0),d=e.occurrences[a].end),u=!0,t=!0),s=l===o,n=a===h.formatDateLite(new Date(d)),v=new Date(s?r:l),m=h.formatDateLite(v),n&&(u=!1)}else t=!0,s=l===r,n=a===d&&i>a,v=s?e.start:new Date(l),m=h.formatDateLite(s?e.start:v);t&&(e.segments[m]={start:v,startTimeMinutes:s?e.startTimeMinutes:0,endTimeMinutes:n?e.endTimeMinutes:c,isFirstDay:s,isLastDay:n}),l=i}return e}deleteAnEvent(e){this._vuecal.emitWithEvent("event-delete",e),this._vuecal.mutableEvents=this._vuecal.mutableEvents.filter((t=>t._eid!==e._eid)),this._vuecal.view.events=this._vuecal.view.events.filter((t=>t._eid!==e._eid))}checkCellOverlappingEvents(e,t){v=e.slice(0),u={},e.forEach((e=>{v.shift(),u[e._eid]||(u[e._eid]={overlaps:[],start:e.start,position:0}),u[e._eid].position=0,v.forEach((i=>{u[i._eid]||(u[i._eid]={overlaps:[],start:i.start,position:0});const s=this.eventInRange(i,e.start,e.end),n=t.overlapsPerTimeStep?h.datesInSameTimeStep(e.start,i.start,t.timeStep):1;if(e.background||e.allDay||i.background||i.allDay||!s||!n){let t,s;(t=(u[e._eid]||{overlaps:[]}).overlaps.indexOf(i._eid))>-1&&u[e._eid].overlaps.splice(t,1),(s=(u[i._eid]||{overlaps:[]}).overlaps.indexOf(e._eid))>-1&&u[i._eid].overlaps.splice(s,1),u[i._eid].position--}else u[e._eid].overlaps.push(i._eid),u[e._eid].overlaps=[...new Set(u[e._eid].overlaps)],u[i._eid].overlaps.push(e._eid),u[i._eid].overlaps=[...new Set(u[i._eid].overlaps)],u[i._eid].position++}))}));let i=0;for(const s in u){const e=u[s],t=e.overlaps.map((e=>({id:e,start:u[e].start})));t.push({id:s,start:e.start}),t.sort(((e,t)=>e.start<t.start?-1:e.start>t.start?1:e.id>t.id?-1:1)),e.position=t.findIndex((e=>e.id===s)),i=Math.max(this.getOverlapsStreak(e,u),i)}return[u,i]}getOverlapsStreak(e,t={}){let i=e.overlaps.length+1,s=[];return e.overlaps.forEach((i=>{if(!s.includes(i)){e.overlaps.filter((e=>e!==i)).forEach((e=>{t[e].overlaps.includes(i)||s.push(e)}))}})),s=[...new Set(s)],i-=s.length,i}eventInRange(e,t,i){if(e.allDay||!this._vuecal.time){const s=new Date(e.start).setHours(0,0,0,0);return new Date(e.end).setHours(23,59,0,0)>=new Date(t).setHours(0,0,0,0)&&s<=new Date(i).setHours(0,0,0,0)}const s=e.start.getTime(),n=e.end.getTime();return s<i.getTime()&&n>t.getTime()}}const p={class:"vuecal__flex vuecal__weekdays-headings"},w=["onClick"],y={class:"vuecal__flex weekday-label",grow:""},g={class:"full"},D={class:"small"},k={class:"xsmall"},f={key:0},_={key:0,class:"vuecal__flex vuecal__split-days-headers",grow:""};const E=(e,t)=>{const i=e.__vccOpts||e;for(const[s,n]of t)i[s]=n;return i},b=E({inject:["vuecal","utils","view"],props:{transitionDirection:{type:String,default:"right"},weekDays:{type:Array,default:()=>[]},switchToNarrowerView:{type:Function,default:()=>{}}},methods:{selectCell(e,t){e.getTime()!==this.view.selectedDate.getTime()&&(this.view.selectedDate=e),this.utils.cell.selectCell(!1,e,t)},cleanupHeading:e=>({label:e.full,date:e.date,...e.today?{today:e.today}:{}})},computed:{headings(){if(!["month","week"].includes(this.view.id))return[];let e=!1;return this.weekDays.map(((t,i)=>{const s=this.utils.date.addDays(this.view.startDate,this.vuecal.startWeekOnSunday&&this.vuecal.hideWeekends?i-1:i);return{hide:t.hide,full:t.label,small:t.short||t.label.substr(0,3),xsmall:t.short||t.label.substr(0,1),..."week"===this.view.id?{dayOfMonth:s.getDate(),date:s,today:!e&&this.utils.date.isToday(s)&&!e++}:{}}}))},cellWidth(){return 100/(7-this.weekDays.reduce(((e,t)=>e+t.hide),0))},weekdayCellStyles(){return{...this.vuecal.hideWeekdays.length?{width:`${this.cellWidth}%`}:{}}},cellHeadingsClickable(){return"week"===this.view.id&&(this.vuecal.clickToNavigate||this.vuecal.dblclickToNavigate)}}},[["render",function(e,t,s,n,l,a){return i.openBlock(),i.createElementBlock("div",p,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.headings,((n,l)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:l},[n.hide?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["vuecal__flex vuecal__heading",{today:n.today,clickable:a.cellHeadingsClickable}]),style:i.normalizeStyle(a.weekdayCellStyles),onClick:e=>"week"===a.view.id&&a.selectCell(n.date,e),onDblclick:t[0]||(t[0]=e=>"week"===a.view.id&&a.vuecal.dblclickToNavigate&&s.switchToNarrowerView())},[i.createVNode(i.Transition,{name:`slide-fade--${s.transitionDirection}`,appear:a.vuecal.transitions},{default:i.withCtx((()=>[(i.openBlock(),i.createElementBlock("div",{class:"vuecal__flex",column:"",key:!!a.vuecal.transitions&&`${l}-${n.dayOfMonth}`},[i.createElementVNode("div",y,[i.renderSlot(e.$slots,"weekday-heading",{heading:a.cleanupHeading(n),view:a.view},(()=>[i.createElementVNode("span",g,i.toDisplayString(n.full),1),i.createElementVNode("span",D,i.toDisplayString(n.small),1),i.createElementVNode("span",k,i.toDisplayString(n.xsmall),1),n.dayOfMonth?(i.openBlock(),i.createElementBlock("span",f," "+i.toDisplayString(n.dayOfMonth),1)):i.createCommentVNode("",!0)]))]),a.vuecal.hasSplits&&a.vuecal.stickySplitLabels?(i.openBlock(),i.createElementBlock("div",_,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.vuecal.daySplits,((t,s)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["day-split-header",t.class||!1]),key:s},[i.renderSlot(e.$slots,"split-label",{split:t,view:a.view},(()=>[i.createTextVNode(i.toDisplayString(t.label),1)]))],2)))),128))])):i.createCommentVNode("",!0)]))])),_:2},1032,["name","appear"])],46,w))],64)))),128))])}]]),C={class:"vuecal__header"},M={key:0,class:"vuecal__flex vuecal__menu",role:"tablist","aria-label":"Calendar views navigation"},T=["onDragenter","onDragleave","onClick","aria-label"],S={key:1,class:"vuecal__title-bar"},B=["aria-label"],V={class:"vuecal__flex vuecal__title",grow:""},j=["aria-label"],x={key:0,class:"vuecal__flex vuecal__split-days-headers"};const O=E({inject:["vuecal","previous","next","switchView","updateSelectedDate","modules","view"],components:{WeekdaysHeadings:b},props:{options:{type:Object,default:()=>({})},editEvents:{type:Object,required:!0},hasSplits:{type:[Boolean,Number],default:!1},daySplits:{type:Array,default:()=>[]},viewProps:{type:Object,default:()=>({})},weekDays:{type:Array,default:()=>[]},switchToNarrowerView:{type:Function,default:()=>{}}},data:()=>({highlightedControl:null}),methods:{goToToday(){this.updateSelectedDate(new Date((new Date).setHours(0,0,0,0)))},switchToBroaderView(){this.transitionDirection="left",this.broaderView&&this.switchView(this.broaderView)}},computed:{transitionDirection:{get(){return this.vuecal.transitionDirection},set(e){this.vuecal.transitionDirection=e}},broaderView(){const{enabledViews:e}=this.vuecal;return e[e.indexOf(this.view.id)-1]},showDaySplits(){return"day"===this.view.id&&this.hasSplits&&this.options.stickySplitLabels&&!this.options.minSplitWidth},dnd(){return this.modules.dnd}}},[["render",function(e,t,s,n,l,a){const o=i.resolveComponent("weekdays-headings");return i.openBlock(),i.createElementBlock("div",C,[s.options.hideViewSelector?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",M,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.viewProps.views,((t,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:n},[t.enabled?(i.openBlock(),i.createElementBlock("button",{key:0,class:i.normalizeClass(["vuecal__view-btn",{"vuecal__view-btn--active":a.view.id===n,"vuecal__view-btn--highlighted":e.highlightedControl===n}]),type:"button",onDragenter:t=>s.editEvents.drag&&a.dnd&&a.dnd.viewSelectorDragEnter(t,n,e.$data),onDragleave:t=>s.editEvents.drag&&a.dnd&&a.dnd.viewSelectorDragLeave(t,n,e.$data),onClick:e=>a.switchView(n,null,!0),"aria-label":`${t.label} view`},i.toDisplayString(t.label),43,T)):i.createCommentVNode("",!0)],64)))),128))])),s.options.hideTitleBar?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",S,[i.createElementVNode("button",{class:i.normalizeClass(["vuecal__arrow vuecal__arrow--prev",{"vuecal__arrow--highlighted":"previous"===e.highlightedControl}]),type:"button",onClick:t[0]||(t[0]=(...e)=>a.previous&&a.previous(...e)),onDragenter:t[1]||(t[1]=t=>s.editEvents.drag&&a.dnd&&a.dnd.viewSelectorDragEnter(t,"previous",e.$data)),onDragleave:t[2]||(t[2]=t=>s.editEvents.drag&&a.dnd&&a.dnd.viewSelectorDragLeave(t,"previous",e.$data)),"aria-label":`Previous ${a.view.id}`},[i.renderSlot(e.$slots,"arrow-prev")],42,B),i.createElementVNode("div",V,[i.createVNode(i.Transition,{name:s.options.transitions?`slide-fade--${a.transitionDirection}`:""},{default:i.withCtx((()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(a.broaderView?"button":"span"),{type:!!a.broaderView&&"button",key:`${a.view.id}${a.view.startDate.toString()}`,onClick:t[3]||(t[3]=e=>!!a.broaderView&&a.switchToBroaderView()),"aria-label":!!a.broaderView&&`Go to ${a.broaderView} view`},{default:i.withCtx((()=>[i.renderSlot(e.$slots,"title")])),_:3},8,["type","aria-label"]))])),_:3},8,["name"])]),s.options.todayButton?(i.openBlock(),i.createElementBlock("button",{key:0,class:i.normalizeClass(["vuecal__today-btn",{"vuecal__today-btn--highlighted":"today"===e.highlightedControl}]),type:"button",onClick:t[4]||(t[4]=(...e)=>a.goToToday&&a.goToToday(...e)),onDragenter:t[5]||(t[5]=t=>s.editEvents.drag&&a.dnd&&a.dnd.viewSelectorDragEnter(t,"today",e.$data)),onDragleave:t[6]||(t[6]=t=>s.editEvents.drag&&a.dnd&&a.dnd.viewSelectorDragLeave(t,"today",e.$data)),"aria-label":"Today"},[i.renderSlot(e.$slots,"today-button")],34)):i.createCommentVNode("",!0),i.createElementVNode("button",{class:i.normalizeClass(["vuecal__arrow vuecal__arrow--next",{"vuecal__arrow--highlighted":"next"===e.highlightedControl}]),type:"button",onClick:t[7]||(t[7]=(...e)=>a.next&&a.next(...e)),onDragenter:t[8]||(t[8]=t=>s.editEvents.drag&&a.dnd&&a.dnd.viewSelectorDragEnter(t,"next",e.$data)),onDragleave:t[9]||(t[9]=t=>s.editEvents.drag&&a.dnd&&a.dnd.viewSelectorDragLeave(t,"next",e.$data)),"aria-label":`Next ${a.view.id}`},[i.renderSlot(e.$slots,"arrow-next")],42,j)])),s.viewProps.weekDaysInHeader?(i.openBlock(),i.createBlock(o,{key:2,"week-days":s.weekDays,"transition-direction":a.transitionDirection,"switch-to-narrower-view":s.switchToNarrowerView},i.createSlots({_:2},[e.$slots["weekday-heading"]?{name:"weekday-heading",fn:i.withCtx((({heading:t,view:s})=>[i.renderSlot(e.$slots,"weekday-heading",{heading:t,view:s})])),key:"0"}:void 0,e.$slots["split-label"]?{name:"split-label",fn:i.withCtx((({split:t})=>[i.renderSlot(e.$slots,"split-label",{split:t,view:a.view})])),key:"1"}:void 0]),1032,["week-days","transition-direction","switch-to-narrower-view"])):i.createCommentVNode("",!0),i.createVNode(i.Transition,{name:`slide-fade--${a.transitionDirection}`},{default:i.withCtx((()=>[a.showDaySplits?(i.openBlock(),i.createElementBlock("div",x,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.daySplits,((t,s)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["day-split-header",t.class||!1]),key:s},[i.renderSlot(e.$slots,"split-label",{split:t,view:a.view.id},(()=>[i.createTextVNode(i.toDisplayString(t.label),1)]))],2)))),128))])):i.createCommentVNode("",!0)])),_:3},8,["name"])])}]]),$=["draggable"];const W={inject:["vuecal","utils","modules","view","domEvents","editEvents"],props:{cellFormattedDate:{type:String,default:""},event:{type:Object,default:()=>({})},cellEvents:{type:Array,default:()=>[]},overlaps:{type:Array,default:()=>[]},eventPosition:{type:Number,default:0},overlapsStreak:{type:Number,default:0},allDay:{type:Boolean,default:!1}},data:()=>({touch:{dragThreshold:30,startX:0,startY:0,dragged:!1}}),methods:{onMouseDown(e,t=!1){if("ontouchstart"in window&&!t)return!1;const{clickHoldAnEvent:i,focusAnEvent:s,resizeAnEvent:n,dragAnEvent:l}=this.domEvents;if(s._eid===this.event._eid&&i._eid===this.event._eid)return!0;this.focusEvent(),i._eid=null,this.vuecal.editEvents.delete&&this.event.deletable&&(i.timeoutId=setTimeout((()=>{n._eid||l._eid||(i._eid=this.event._eid,this.event.deleting=!0)}),i.timeout))},onMouseUp(e){this.domEvents.focusAnEvent._eid!==this.event._eid||this.touch.dragged||(this.domEvents.focusAnEvent.mousedUp=!0),this.touch.dragged=!1},onMouseEnter(e){e.preventDefault(),this.vuecal.emitWithEvent("event-mouse-enter",this.event)},onMouseLeave(e){e.preventDefault(),this.vuecal.emitWithEvent("event-mouse-leave",this.event)},onTouchMove(e){if("function"!=typeof this.vuecal.onEventClick)return;const{clientX:t,clientY:i}=e.touches[0],{startX:s,startY:n,dragThreshold:l}=this.touch;(Math.abs(t-s)>l||Math.abs(i-n)>l)&&(this.touch.dragged=!0)},onTouchStart(e){this.touch.startX=e.touches[0].clientX,this.touch.startY=e.touches[0].clientY,this.onMouseDown(e,!0)},onEnterKeypress(e){if("function"==typeof this.vuecal.onEventClick)return this.vuecal.onEventClick(this.event,e)},onDblClick(e){if("function"==typeof this.vuecal.onEventDblclick)return this.vuecal.onEventDblclick(this.event,e)},onDragStart(e){this.dnd&&this.dnd.eventDragStart(e,this.event)},onDragEnd(){this.dnd&&this.dnd.eventDragEnd(this.event)},onResizeHandleMouseDown(){this.focusEvent(),this.domEvents.dragAnEvent._eid=null,this.domEvents.resizeAnEvent=Object.assign(this.domEvents.resizeAnEvent,{_eid:this.event._eid,start:(this.segment||this.event).start,split:this.event.split||null,segment:!!this.segment&&this.utils.date.formatDateLite(this.segment.start),originalEnd:new Date((this.segment||this.event).end),originalEndTimeMinutes:this.event.endTimeMinutes}),this.event.resizing=!0},deleteEvent(e=!1){if("ontouchstart"in window&&!e)return!1;this.utils.event.deleteAnEvent(this.event)},touchDeleteEvent(e){this.deleteEvent(!0)},cancelDeleteEvent(){this.event.deleting=!1},focusEvent(){const{focusAnEvent:e}=this.domEvents,t=e._eid;if(t!==this.event._eid){if(t){const e=this.view.events.find((e=>e._eid===t));e&&(e.focused=!1)}this.vuecal.cancelDelete(),this.vuecal.emitWithEvent("event-focus",this.event),e._eid=this.event._eid,this.event.focused=!0}}},computed:{eventDimensions(){const{startTimeMinutes:e,endTimeMinutes:t}=this.segment||this.event;let i=e-this.vuecal.timeFrom;const s=Math.max(Math.round(i*this.vuecal.timeCellHeight/this.vuecal.timeStep),0);i=Math.min(t,this.vuecal.timeTo)-this.vuecal.timeFrom;const n=Math.round(i*this.vuecal.timeCellHeight/this.vuecal.timeStep);return{top:s,height:Math.max(n-s,5)}},eventStyles(){if(this.event.allDay||!this.vuecal.time||!this.event.endTimeMinutes||"month"===this.view.id||this.allDay)return{};let e=100/Math.min(this.overlaps.length+1,this.overlapsStreak),t=100/(this.overlaps.length+1)*this.eventPosition;this.vuecal.minEventWidth&&e<this.vuecal.minEventWidth&&(e=this.vuecal.minEventWidth,t=(100-this.vuecal.minEventWidth)/this.overlaps.length*this.eventPosition);const{top:i,height:s}=this.eventDimensions;return{top:`${i}px`,height:`${s}px`,width:`${e}%`,left:this.event.left&&`${this.event.left}px`||`${t}%`}},eventClasses(){const{isFirstDay:e,isLastDay:t}=this.segment||{};return{[this.event.class]:!!this.event.class,"vuecal__event--focus":this.event.focused,"vuecal__event--resizing":this.event.resizing,"vuecal__event--background":this.event.background,"vuecal__event--deletable":this.event.deleting,"vuecal__event--all-day":this.event.allDay,"vuecal__event--dragging":!this.event.draggingStatic&&this.event.dragging,"vuecal__event--static":this.event.dragging&&this.event.draggingStatic,"vuecal__event--multiple-days":!!this.segment,"event-start":this.segment&&e&&!t,"event-middle":this.segment&&!e&&!t,"event-end":this.segment&&t&&!e}},segment(){return this.event.segments&&this.event.segments[this.cellFormattedDate]||null},draggable(){const{draggable:e,background:t,daysCount:i}=this.event;return this.vuecal.editEvents.drag&&e&&!t&&1===i},resizable(){const{editEvents:e,time:t}=this.vuecal;return e.resize&&this.event.resizable&&t&&!this.allDay&&(!this.segment||this.segment&&this.segment.isLastDay)&&"month"!==this.view.id},dnd(){return this.modules.dnd}}},H=["data-split","aria-label","onTouchstart","onMousedown","onDragover","onDrop"],A={key:0,class:"cell-time-labels"},N=["innerHTML"],L={key:2,class:"vuecal__cell-events"},Y=["title"];const F=E({inject:["vuecal","utils","modules","view","domEvents"],components:{Event:E(W,[["render",function(e,t,s,n,l,a){return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["vuecal__event",a.eventClasses]),style:i.normalizeStyle(a.eventStyles),tabindex:"0",onFocus:t[4]||(t[4]=(...e)=>a.focusEvent&&a.focusEvent(...e)),onKeypress:t[5]||(t[5]=i.withKeys(i.withModifiers(((...e)=>a.onEnterKeypress&&a.onEnterKeypress(...e)),["stop"]),["enter"])),onMouseenter:t[6]||(t[6]=(...e)=>a.onMouseEnter&&a.onMouseEnter(...e)),onMouseleave:t[7]||(t[7]=(...e)=>a.onMouseLeave&&a.onMouseLeave(...e)),onTouchstart:t[8]||(t[8]=i.withModifiers(((...e)=>a.onTouchStart&&a.onTouchStart(...e)),["stop"])),onMousedown:t[9]||(t[9]=e=>a.onMouseDown(e)),onMouseup:t[10]||(t[10]=(...e)=>a.onMouseUp&&a.onMouseUp(...e)),onTouchend:t[11]||(t[11]=(...e)=>a.onMouseUp&&a.onMouseUp(...e)),onTouchmove:t[12]||(t[12]=(...e)=>a.onTouchMove&&a.onTouchMove(...e)),onDblclick:t[13]||(t[13]=(...e)=>a.onDblClick&&a.onDblClick(...e)),draggable:a.draggable,onDragstart:t[14]||(t[14]=e=>a.draggable&&a.onDragStart(e)),onDragend:t[15]||(t[15]=e=>a.draggable&&a.onDragEnd())},[a.vuecal.editEvents.delete&&s.event.deletable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"vuecal__event-delete",onClick:t[0]||(t[0]=i.withModifiers(((...e)=>a.deleteEvent&&a.deleteEvent(...e)),["stop"])),onTouchstart:t[1]||(t[1]=i.withModifiers(((...e)=>a.touchDeleteEvent&&a.touchDeleteEvent(...e)),["stop"]))},i.toDisplayString(a.vuecal.texts.deleteEvent),33)):i.createCommentVNode("",!0),i.renderSlot(e.$slots,"event",{event:s.event,view:a.view.id}),a.resizable?(i.openBlock(),i.createElementBlock("div",{key:1,class:"vuecal__event-resize-handle",contenteditable:"false",onMousedown:t[2]||(t[2]=i.withModifiers(((...e)=>a.onResizeHandleMouseDown&&a.onResizeHandleMouseDown(...e)),["stop","prevent"])),onTouchstart:t[3]||(t[3]=i.withModifiers(((...e)=>a.onResizeHandleMouseDown&&a.onResizeHandleMouseDown(...e)),["stop","prevent"]))},null,32)):i.createCommentVNode("",!0)],46,$)}]])},props:{options:{type:Object,default:()=>({})},editEvents:{type:Object,required:!0},data:{type:Object,required:!0},cellSplits:{type:Array,default:()=>[]},minTimestamp:{type:[Number,null],default:null},maxTimestamp:{type:[Number,null],default:null},cellWidth:{type:[Number,Boolean],default:!1},allDay:{type:Boolean,default:!1}},data:()=>({cellOverlaps:{},cellOverlapsStreak:1,timeAtCursor:null,highlighted:!1,highlightedSplit:null}),methods:{getSplitAtCursor({target:e}){let t=e.classList.contains("vuecal__cell-split")?e:this.vuecal.findAncestor(e,"vuecal__cell-split");return t&&(t=t.attributes["data-split"].value,parseInt(t).toString()===t.toString()&&(t=parseInt(t))),t||null},splitClasses(e){return{"vuecal__cell-split":!0,"vuecal__cell-split--highlighted":this.highlightedSplit===e.id,[e.class]:!!e.class}},checkCellOverlappingEvents(){this.options.time&&this.eventsCount&&!this.splitsCount&&(1===this.eventsCount?(this.cellOverlaps=[],this.cellOverlapsStreak=1):[this.cellOverlaps,this.cellOverlapsStreak]=this.utils.event.checkCellOverlappingEvents(this.events,this.options))},isDOMElementAnEvent(e){return this.vuecal.isDOMElementAnEvent(e)},selectCell(e,t=!1){const i=this.splitsCount?this.getSplitAtCursor(e):null;this.utils.cell.selectCell(t,this.timeAtCursor,i),this.timeAtCursor=null},onCellkeyPressEnter(e){this.isSelected||this.onCellFocus(e);const t=this.splitsCount?this.getSplitAtCursor(e):null;this.utils.cell.keyPressEnterCell(this.timeAtCursor,t),this.timeAtCursor=null},onCellFocus(e){if(!this.isSelected&&!this.isDisabled){this.isSelected=this.data.startDate;const t=this.splitsCount?this.getSplitAtCursor(e):null,i=this.timeAtCursor||this.data.startDate;this.vuecal.$emit("cell-focus",t?{date:i,split:t}:i)}},onCellMouseDown(e,t=null,i=!1){if("ontouchstart"in window&&!i)return!1;this.isSelected||this.onCellFocus(e);const{clickHoldACell:s,focusAnEvent:n}=this.domEvents;this.domEvents.cancelClickEventCreation=!1,s.eventCreated=!1,this.timeAtCursor=new Date(this.data.startDate);const{minutes:l,cursorCoords:{y:a}}=this.vuecal.minutesAtCursor(e);this.timeAtCursor.setMinutes(l);const o=this.isDOMElementAnEvent(e.target);!o&&n._eid&&((this.view.events.find((e=>e._eid===n._eid))||{}).focused=!1),this.editEvents.create&&!o&&this.setUpEventCreation(e,a)},setUpEventCreation(e,t){if(this.options.dragToCreateEvent&&["week","day"].includes(this.view.id)){const{dragCreateAnEvent:i}=this.domEvents;if(i.startCursorY=t,i.split=this.splitsCount?this.getSplitAtCursor(e):null,i.start=this.timeAtCursor,this.options.snapToTime){let e=60*this.timeAtCursor.getHours()+this.timeAtCursor.getMinutes();const t=e+this.options.snapToTime/2;e=t-t%this.options.snapToTime,i.start.setHours(0,e,0,0)}}else this.options.cellClickHold&&["month","week","day"].includes(this.view.id)&&this.setUpCellHoldTimer(e)},setUpCellHoldTimer(e){const{clickHoldACell:t}=this.domEvents;t.cellId=`${this.vuecal._.uid}_${this.data.formattedDate}`,t.split=this.splitsCount?this.getSplitAtCursor(e):null,t.timeoutId=setTimeout((()=>{if(t.cellId&&!this.domEvents.cancelClickEventCreation){const{_eid:e}=this.utils.event.createAnEvent(this.timeAtCursor,null,t.split?{split:t.split}:{});t.eventCreated=e}}),t.timeout)},onCellTouchStart(e,t=null){this.onCellMouseDown(e,t,!0)},onCellClick(e){this.isDOMElementAnEvent(e.target)||this.selectCell(e)},onCellDblClick(e){const t=new Date(this.data.startDate);t.setMinutes(this.vuecal.minutesAtCursor(e).minutes);const i=this.splitsCount?this.getSplitAtCursor(e):null;this.vuecal.$emit("cell-dblclick",i?{date:t,split:i}:t),this.options.dblclickToNavigate&&this.vuecal.switchToNarrowerView()},onCellContextMenu(e){e.stopPropagation(),e.preventDefault();const t=new Date(this.data.startDate),{cursorCoords:i,minutes:s}=this.vuecal.minutesAtCursor(e);t.setMinutes(s);const n=this.splitsCount?this.getSplitAtCursor(e):null;this.vuecal.$emit("cell-contextmenu",{date:t,...i,...n||{},e:e})}},computed:{dnd(){return this.modules.dnd},nowInMinutes(){return this.utils.date.dateToMinutes(this.vuecal.now)},isBeforeMinDate(){return null!==this.minTimestamp&&this.minTimestamp>this.data.endDate.getTime()},isAfterMaxDate(){return this.maxTimestamp&&this.maxTimestamp<this.data.startDate.getTime()},isDisabled(){const{disableDays:e}=this.options,{isYearsOrYearView:t}=this.vuecal;return!(!e.length||!e.includes(this.data.formattedDate)||t)||(this.isBeforeMinDate||this.isAfterMaxDate)},isSelected:{get(){let e=!1;const{selectedDate:t}=this.view;return e="years"===this.view.id?t.getFullYear()===this.data.startDate.getFullYear():"year"===this.view.id?t.getFullYear()===this.data.startDate.getFullYear()&&t.getMonth()===this.data.startDate.getMonth():t.getTime()===this.data.startDate.getTime(),e},set(e){this.view.selectedDate=e,this.vuecal.$emit("update:selected-date",this.view.selectedDate)}},isWeekOrDayView(){return["week","day"].includes(this.view.id)},transitionDirection(){return this.vuecal.transitionDirection},specialHours(){return this.data.specialHours.map((e=>{let{from:t,to:i}=e;return t=Math.max(t,this.options.timeFrom),i=Math.min(i,this.options.timeTo),{...e,height:(i-t)*this.timeScale,top:(t-this.options.timeFrom)*this.timeScale}}))},events(){const{startDate:e,endDate:t}=this.data;let i=[];if(!["years","year"].includes(this.view.id)||this.options.eventsCountOnYearView){if(i=this.view.events.slice(0),"month"===this.view.id&&i.push(...this.view.outOfScopeEvents),i=i.filter((i=>this.utils.event.eventInRange(i,e,t))),this.options.showAllDayEvents&&"month"!==this.view.id&&(i=i.filter((e=>!!e.allDay===this.allDay))),this.options.time&&this.isWeekOrDayView&&!this.allDay){const{timeFrom:e,timeTo:t}=this.options;i=i.filter((i=>{const s=i.daysCount>1&&i.segments[this.data.formattedDate]||{},n=1===i.daysCount&&i.startTimeMinutes<t&&i.endTimeMinutes>e,l=i.daysCount>1&&s.startTimeMinutes<t&&s.endTimeMinutes>e;return i.allDay||n||l||!1}))}!this.options.time||!this.isWeekOrDayView||this.options.showAllDayEvents&&this.allDay||i.sort(((e,t)=>e.start<t.start?-1:1)),this.cellSplits.length||this.$nextTick(this.checkCellOverlappingEvents)}return i},eventsCount(){return this.events.length},splits(){return this.cellSplits.map(((e,t)=>{const i=this.events.filter((t=>t.split===e.id)),[s,n]=this.utils.event.checkCellOverlappingEvents(i.filter((e=>!e.background&&!e.allDay)),this.options);return{...e,overlaps:s,overlapsStreak:n,events:i}}))},splitsCount(){return this.splits.length},cellClasses(){return{[this.data.class]:!!this.data.class,"vuecal__cell--current":this.data.current,"vuecal__cell--today":this.data.today,"vuecal__cell--out-of-scope":this.data.outOfScope,"vuecal__cell--before-min":this.isDisabled&&this.isBeforeMinDate,"vuecal__cell--after-max":this.isDisabled&&this.isAfterMaxDate,"vuecal__cell--disabled":this.isDisabled,"vuecal__cell--selected":this.isSelected,"vuecal__cell--highlighted":this.highlighted,"vuecal__cell--has-splits":this.splitsCount,"vuecal__cell--has-events":this.eventsCount}},cellStyles(){return{...this.cellWidth?{width:`${this.cellWidth}%`}:{}}},timelineVisible(){const{time:e,timeTo:t}=this.options;return this.data.today&&this.isWeekOrDayView&&e&&!this.allDay&&this.nowInMinutes<=t},todaysTimePosition(){if(!this.data.today||!this.options.time)return;const e=this.nowInMinutes-this.options.timeFrom;return Math.round(e*this.timeScale)},timeScale(){return this.options.timeCellHeight/this.options.timeStep}}},[["render",function(e,t,s,n,l,a){const o=i.resolveComponent("event");return i.openBlock(),i.createBlock(i.TransitionGroup,{class:i.normalizeClass(["vuecal__cell",a.cellClasses]),name:`slide-fade--${a.transitionDirection}`,tag:"div",appear:s.options.transitions,style:i.normalizeStyle(a.cellStyles)},{default:i.withCtx((()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.splitsCount?a.splits:1,((n,l)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["vuecal__flex vuecal__cell-content",a.splitsCount&&a.splitClasses(n)]),key:s.options.transitions?`${a.view.id}-${s.data.content}-${l}`:l,"data-split":!!a.splitsCount&&n.id,column:"",tabindex:"0","aria-label":s.data.content,onFocus:t[0]||(t[0]=e=>a.onCellFocus(e)),onKeypress:t[1]||(t[1]=i.withKeys((e=>a.onCellkeyPressEnter(e)),["enter"])),onTouchstart:e=>!a.isDisabled&&a.onCellTouchStart(e,a.splitsCount?n.id:null),onMousedown:e=>!a.isDisabled&&a.onCellMouseDown(e,a.splitsCount?n.id:null),onClick:t[2]||(t[2]=e=>!a.isDisabled&&a.onCellClick(e)),onDblclick:t[3]||(t[3]=e=>!a.isDisabled&&a.onCellDblClick(e)),onContextmenu:t[4]||(t[4]=e=>!a.isDisabled&&s.options.cellContextmenu&&a.onCellContextMenu(e)),onDragenter:t[5]||(t[5]=t=>!a.isDisabled&&s.editEvents.drag&&a.dnd&&a.dnd.cellDragEnter(t,e.$data,s.data.startDate)),onDragover:t=>!a.isDisabled&&s.editEvents.drag&&a.dnd&&a.dnd.cellDragOver(t,e.$data,s.data.startDate,a.splitsCount?n.id:null),onDragleave:t[6]||(t[6]=t=>!a.isDisabled&&s.editEvents.drag&&a.dnd&&a.dnd.cellDragLeave(t,e.$data,s.data.startDate)),onDrop:t=>!a.isDisabled&&s.editEvents.drag&&a.dnd&&a.dnd.cellDragDrop(t,e.$data,s.data.startDate,a.splitsCount?n.id:null)},[s.options.showTimeInCells&&s.options.time&&a.isWeekOrDayView&&!s.allDay?(i.openBlock(),i.createElementBlock("div",A,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.vuecal.timeCells,((e,t)=>(i.openBlock(),i.createElementBlock("span",{class:"cell-time-label",key:t},i.toDisplayString(e.label),1)))),128))])):i.createCommentVNode("",!0),a.isWeekOrDayView&&!s.allDay&&a.specialHours.length?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList(a.specialHours,((e,t)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["vuecal__special-hours",`vuecal__special-hours--day${e.day} ${e.class}`]),style:i.normalizeStyle(`height: ${e.height}px;top: ${e.top}px`)},[e.label?(i.openBlock(),i.createElementBlock("div",{key:0,class:"special-hours-label",innerHTML:e.label},null,8,N)):i.createCommentVNode("",!0)],6)))),256)):i.createCommentVNode("",!0),i.renderSlot(e.$slots,"cell-content",{events:a.events,selectCell:e=>a.selectCell(e,!0),split:!!a.splitsCount&&n}),a.eventsCount&&(a.isWeekOrDayView||"month"===a.view.id&&s.options.eventsOnMonthView)?(i.openBlock(),i.createElementBlock("div",L,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.splitsCount?n.events:a.events,((t,l)=>(i.openBlock(),i.createBlock(o,{key:l,"cell-formatted-date":s.data.formattedDate,event:t,"all-day":s.allDay,"cell-events":a.splitsCount?n.events:a.events,overlaps:((a.splitsCount?n.overlaps[t._eid]:e.cellOverlaps[t._eid])||[]).overlaps,"event-position":((a.splitsCount?n.overlaps[t._eid]:e.cellOverlaps[t._eid])||[]).position,"overlaps-streak":a.splitsCount?n.overlapsStreak:e.cellOverlapsStreak},{event:i.withCtx((({event:t,view:s})=>[i.renderSlot(e.$slots,"event",{view:s,event:t})])),_:2},1032,["cell-formatted-date","event","all-day","cell-events","overlaps","event-position","overlaps-streak"])))),128))])):i.createCommentVNode("",!0)],42,H)))),128)),a.timelineVisible?(i.openBlock(),i.createElementBlock("div",{class:"vuecal__now-line",style:i.normalizeStyle(`top: ${a.todaysTimePosition}px`),key:s.options.transitions?`${a.view.id}-now-line`:"now-line",title:a.utils.date.formatTime(a.vuecal.now)},null,12,Y)):i.createCommentVNode("",!0)])),_:3},8,["class","name","appear","style"])}]]),P={key:0,class:"vuecal__all-day-text",style:{width:"3em"}};const z=E({inject:["vuecal","view","editEvents"],components:{"vuecal-cell":F},props:{options:{type:Object,required:!0},cells:{type:Array,required:!0},label:{type:String,required:!0},daySplits:{type:Array,default:()=>[]},shortEvents:{type:Boolean,default:!0},height:{type:String,default:""},cellOrSplitMinWidth:{type:Number,default:null}},computed:{hasCellOrSplitWidth(){return!!(this.options.minCellWidth||this.daySplits.length&&this.options.minSplitWidth)}}},[["render",function(e,t,s,n,l,a){const o=i.resolveComponent("vuecal-cell");return i.openBlock(),i.createElementBlock("div",{class:"vuecal__flex vuecal__all-day",style:i.normalizeStyle(s.cellOrSplitMinWidth&&{height:s.height})},[s.cellOrSplitMinWidth?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",P,[i.createElementVNode("span",null,i.toDisplayString(s.label),1)])),i.createElementVNode("div",{class:i.normalizeClass(["vuecal__flex vuecal__cells",`${a.view.id}-view`]),grow:"",style:i.normalizeStyle(s.cellOrSplitMinWidth?`min-width: ${s.cellOrSplitMinWidth}px`:"")},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.cells,((t,n)=>(i.openBlock(),i.createBlock(o,{key:n,options:s.options,"edit-events":a.editEvents,data:t,"all-day":!0,"cell-width":s.options.hideWeekdays.length&&(a.vuecal.isWeekView||a.vuecal.isMonthView)&&a.vuecal.cellWidth,"min-timestamp":s.options.minTimestamp,"max-timestamp":s.options.maxTimestamp,"cell-splits":s.daySplits},{event:i.withCtx((({event:t,view:s})=>[i.renderSlot(e.$slots,"event",{view:s,event:t})])),_:2},1032,["options","edit-events","data","cell-width","min-timestamp","max-timestamp","cell-splits"])))),128))],6)],4)}]]),q=["lang"],I={class:"default"},U={key:0,class:"vuecal__flex vuecal__body",grow:""},R=["onBlur","innerHTML"],K=["innerHTML"],X=["innerHTML"],G={class:"vuecal__flex",row:"",grow:""},Z={key:0,class:"vuecal__time-column"},J={class:"vuecal__time-cell-label"},Q={key:1,class:"vuecal__flex vuecal__week-numbers",column:""},ee=["wrap","column"],te=["onBlur","innerHTML"],ie=["innerHTML"],se=["innerHTML"],ne=["wrap"],le=["innerHTML"],ae=["innerHTML"],oe={key:2,class:"vuecal__cell-events-count"},re={key:3,class:"vuecal__no-event"},de=["onBlur","innerHTML"],ce=["innerHTML"],he={key:2,class:"vuecal__event-time"},ue={key:0},ve={key:1,class:"days-to-end"},me=["innerHTML"],pe={key:0,class:"vuecal__scrollbar-check"};const we=1440,ye={weekDays:Array(7).fill(""),weekDaysShort:[],months:Array(12).fill(""),years:"",year:"",month:"",week:"",day:"",today:"",noEvent:"",allDay:"",deleteEvent:"",createEvent:"",dateFormat:"dddd MMMM D, YYYY",am:"am",pm:"pm"},ge=["years","year","month","week","day"],De=new class{constructor(e,i=!1){t(this,"texts",{}),t(this,"dateToMinutes",(e=>60*e.getHours()+e.getMinutes())),a=this,this._texts=e,i||!Date||Date.prototype.addDays||this._initDatePrototypes()}_initDatePrototypes(){Date.prototype.addDays=function(e){return a.addDays(this,e)},Date.prototype.subtractDays=function(e){return a.subtractDays(this,e)},Date.prototype.addHours=function(e){return a.addHours(this,e)},Date.prototype.subtractHours=function(e){return a.subtractHours(this,e)},Date.prototype.addMinutes=function(e){return a.addMinutes(this,e)},Date.prototype.subtractMinutes=function(e){return a.subtractMinutes(this,e)},Date.prototype.getWeek=function(){return a.getWeek(this)},Date.prototype.isToday=function(){return a.isToday(this)},Date.prototype.isLeapYear=function(){return a.isLeapYear(this)},Date.prototype.format=function(e="YYYY-MM-DD"){return a.formatDate(this,e)},Date.prototype.formatTime=function(e="HH:mm"){return a.formatTime(this,e)}}removePrototypes(){delete Date.prototype.addDays,delete Date.prototype.subtractDays,delete Date.prototype.addHours,delete Date.prototype.subtractHours,delete Date.prototype.addMinutes,delete Date.prototype.subtractMinutes,delete Date.prototype.getWeek,delete Date.prototype.isToday,delete Date.prototype.isLeapYear,delete Date.prototype.format,delete Date.prototype.formatTime}updateTexts(e){this._texts=e}_todayFormatted(){return n!==(new Date).getDate()&&(s=new Date,n=s.getDate(),l=`${s.getFullYear()}-${s.getMonth()}-${s.getDate()}`),l}addDays(e,t){const i=new Date(e.valueOf());return i.setDate(i.getDate()+t),i}subtractDays(e,t){const i=new Date(e.valueOf());return i.setDate(i.getDate()-t),i}addHours(e,t){const i=new Date(e.valueOf());return i.setHours(i.getHours()+t),i}subtractHours(e,t){const i=new Date(e.valueOf());return i.setHours(i.getHours()-t),i}addMinutes(e,t){const i=new Date(e.valueOf());return i.setMinutes(i.getMinutes()+t),i}subtractMinutes(e,t){const i=new Date(e.valueOf());return i.setMinutes(i.getMinutes()-t),i}getWeek(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),i=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-i);const s=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t-s)/864e5+1)/7)}isToday(e){return`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`===this._todayFormatted()}isLeapYear(e){const t=e.getFullYear();return!(t%400)||t%100&&!(t%4)}getPreviousFirstDayOfWeek(e=null,t){const i=e&&new Date(e.valueOf())||new Date,s=t?7:6;return i.setDate(i.getDate()-(i.getDay()+s)%7),i}stringToDate(e){return e instanceof Date?e:(10===e.length&&(e+=" 00:00"),new Date(e.replace(/-/g,"/")))}countDays(e,t){"string"==typeof e&&(e=e.replace(/-/g,"/")),"string"==typeof t&&(t=t.replace(/-/g,"/")),e=new Date(e).setHours(0,0,0,0),t=new Date(t).setHours(0,0,1,0);const i=60*(new Date(t).getTimezoneOffset()-new Date(e).getTimezoneOffset())*1e3;return Math.ceil((t-e-i)/864e5)}datesInSameTimeStep(e,t,i){return Math.abs(e.getTime()-t.getTime())<=60*i*1e3}formatDate(e,t="YYYY-MM-DD",i=null){if(i||(i=this._texts),t||(t="YYYY-MM-DD"),"YYYY-MM-DD"===t)return this.formatDateLite(e);o={},r={};const s={YYYY:()=>this._hydrateDateObject(e,i).YYYY,YY:()=>this._hydrateDateObject(e,i).YY(),M:()=>this._hydrateDateObject(e,i).M,MM:()=>this._hydrateDateObject(e,i).MM(),MMM:()=>this._hydrateDateObject(e,i).MMM(),MMMM:()=>this._hydrateDateObject(e,i).MMMM(),MMMMG:()=>this._hydrateDateObject(e,i).MMMMG(),D:()=>this._hydrateDateObject(e,i).D,DD:()=>this._hydrateDateObject(e,i).DD(),S:()=>this._hydrateDateObject(e,i).S(),d:()=>this._hydrateDateObject(e,i).d,dd:()=>this._hydrateDateObject(e,i).dd(),ddd:()=>this._hydrateDateObject(e,i).ddd(),dddd:()=>this._hydrateDateObject(e,i).dddd(),HH:()=>this._hydrateTimeObject(e,i).HH,H:()=>this._hydrateTimeObject(e,i).H,hh:()=>this._hydrateTimeObject(e,i).hh,h:()=>this._hydrateTimeObject(e,i).h,am:()=>this._hydrateTimeObject(e,i).am,AM:()=>this._hydrateTimeObject(e,i).AM,mm:()=>this._hydrateTimeObject(e,i).mm,m:()=>this._hydrateTimeObject(e,i).m};return t.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g,((e,t)=>{const i=s[t.replace(/\{|\}/g,"")];return void 0!==i?i():t}))}formatDateLite(e){const t=e.getMonth()+1,i=e.getDate();return`${e.getFullYear()}-${t<10?"0":""}${t}-${i<10?"0":""}${i}`}formatTime(e,t="HH:mm",i=null,s=!1){let n=!1;if(s){const[t,i,s]=[e.getHours(),e.getMinutes(),e.getSeconds()];t+i+s===141&&(n=!0)}if(e instanceof Date&&"HH:mm"===t)return n?"24:00":this.formatTimeLite(e);r={},i||(i=this._texts);const l=this._hydrateTimeObject(e,i),a=t.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g,((e,t)=>{const i=l[t.replace(/\{|\}/g,"")];return void 0!==i?i:t}));return n?a.replace("23:59","24:00"):a}formatTimeLite(e){const t=e.getHours(),i=e.getMinutes();return`${(t<10?"0":"")+t}:${(i<10?"0":"")+i}`}_nth(e){if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}_hydrateDateObject(e,t){if(o.D)return o;const i=e.getFullYear(),s=e.getMonth()+1,n=e.getDate(),l=(e.getDay()-1+7)%7;return o={YYYY:i,YY:()=>i.toString().substring(2),M:s,MM:()=>(s<10?"0":"")+s,MMM:()=>t.months[s-1].substring(0,3),MMMM:()=>t.months[s-1],MMMMG:()=>(t.monthsGenitive||t.months)[s-1],D:n,DD:()=>(n<10?"0":"")+n,S:()=>this._nth(n),d:l+1,dd:()=>t.weekDays[l][0],ddd:()=>t.weekDays[l].substr(0,3),dddd:()=>t.weekDays[l]},o}_hydrateTimeObject(e,t){if(r.am)return r;let i,s;e instanceof Date?(i=e.getHours(),s=e.getMinutes()):(i=Math.floor(e/60),s=Math.floor(e%60));const n=i%12?i%12:12,l=(t||{am:"am",pm:"pm"})[24===i||i<12?"am":"pm"];return r={H:i,h:n,HH:(i<10?"0":"")+i,hh:(n<10?"0":"")+n,am:l,AM:l.toUpperCase(),m:s,mm:(s<10?"0":"")+s},r}}(ye),ke=E({name:"vue-cal",components:{"vuecal-cell":F,"vuecal-header":O,WeekdaysHeadings:b,AllDayBar:z},provide(){return{vuecal:this,utils:this.utils,modules:this.modules,previous:this.previous,next:this.next,switchView:this.switchView,updateSelectedDate:this.updateSelectedDate,editEvents:this.editEvents,view:this.view,domEvents:this.domEvents}},props:{activeView:{type:String,default:"week"},allDayBarHeight:{type:[String,Number],default:"25px"},cellClickHold:{type:Boolean,default:!0},cellContextmenu:{type:Boolean,default:!1},clickToNavigate:{type:Boolean,default:!1},dblclickToNavigate:{type:Boolean,default:!0},disableDatePrototypes:{type:Boolean,default:!1},disableDays:{type:Array,default:()=>[]},disableViews:{type:Array,default:()=>[]},dragToCreateEvent:{type:Boolean,default:!0},dragToCreateThreshold:{type:Number,default:15},editableEvents:{type:[Boolean,Object],default:!1},events:{type:Array,default:()=>[]},eventsCountOnYearView:{type:Boolean,default:!1},eventsOnMonthView:{type:[Boolean,String],default:!1},hideBody:{type:Boolean,default:!1},hideTitleBar:{type:Boolean,default:!1},hideViewSelector:{type:Boolean,default:!1},hideWeekdays:{type:Array,default:()=>[]},hideWeekends:{type:Boolean,default:!1},locale:{type:[String,Object],default:"en"},maxDate:{type:[String,Date],default:""},minCellWidth:{type:Number,default:0},minDate:{type:[String,Date],default:""},minEventWidth:{type:Number,default:0},minSplitWidth:{type:Number,default:0},onEventClick:{type:[Function,null],default:null},onEventCreate:{type:[Function,null],default:null},onEventDblclick:{type:[Function,null],default:null},overlapsPerTimeStep:{type:Boolean,default:!1},resizeX:{type:Boolean,default:!1},selectedDate:{type:[String,Date],default:""},showAllDayEvents:{type:[Boolean,String],default:!1},showTimeInCells:{type:Boolean,default:!1},showWeekNumbers:{type:[Boolean,String],default:!1},snapToTime:{type:Number,default:0},small:{type:Boolean,default:!1},specialHours:{type:Object,default:()=>({})},splitDays:{type:Array,default:()=>[]},startWeekOnSunday:{type:Boolean,default:!1},stickySplitLabels:{type:Boolean,default:!1},time:{type:Boolean,default:!0},timeCellHeight:{type:Number,default:40},timeFormat:{type:String,default:""},timeFrom:{type:Number,default:0},timeStep:{type:Number,default:60},timeTo:{type:Number,default:we},todayButton:{type:Boolean,default:!1},transitions:{type:Boolean,default:!0},twelveHour:{type:Boolean,default:!1},watchRealTime:{type:Boolean,default:!1},xsmall:{type:Boolean,default:!1}},data(){return{ready:!1,texts:{...ye},utils:{date:!!this.disableDatePrototypes&&De.removePrototypes()||De,cell:null,event:null},modules:{dnd:null},cellsEl:null,view:{id:"",title:"",startDate:null,endDate:null,firstCellDate:null,lastCellDate:null,selectedDate:null,events:[]},eventIdIncrement:1,now:new Date,timeTickerIds:[null,null],domEvents:{resizeAnEvent:{_eid:null,start:null,split:null,segment:null,originalEndTimeMinutes:0,originalEnd:null,end:null,startCell:null,endCell:null},dragAnEvent:{_eid:null},dragCreateAnEvent:{startCursorY:null,start:null,split:null,event:null},focusAnEvent:{_eid:null,mousedUp:!1},clickHoldAnEvent:{_eid:null,timeout:1200,timeoutId:null},dblTapACell:{taps:0,timeout:500},clickHoldACell:{cellId:null,split:null,timeout:1200,timeoutId:null,eventCreated:!1},cancelClickEventCreation:!1},mutableEvents:[],transitionDirection:"right"}},methods:{async loadLocale(e){if("object"==typeof this.locale)return this.texts=Object.assign({},ye,e),void this.utils.date.updateTexts(this.texts);const t=await((e,t,i)=>{const s=e[t];return s?"function"==typeof s?s():Promise.resolve(s):new Promise(((e,s)=>{("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==i?". Note that variables only represent file names one level deep.":""))))}))})(Object.assign({"./i18n/ar.json":()=>Promise.resolve().then((()=>require("./i18n/ar.cjs.js"))),"./i18n/bg.json":()=>Promise.resolve().then((()=>require("./i18n/bg.cjs.js"))),"./i18n/bn.json":()=>Promise.resolve().then((()=>require("./i18n/bn.cjs.js"))),"./i18n/bs.json":()=>Promise.resolve().then((()=>require("./i18n/bs.cjs.js"))),"./i18n/ca.json":()=>Promise.resolve().then((()=>require("./i18n/ca.cjs.js"))),"./i18n/cs.json":()=>Promise.resolve().then((()=>require("./i18n/cs.cjs.js"))),"./i18n/da.json":()=>Promise.resolve().then((()=>require("./i18n/da.cjs.js"))),"./i18n/de.json":()=>Promise.resolve().then((()=>require("./i18n/de.cjs.js"))),"./i18n/el.json":()=>Promise.resolve().then((()=>require("./i18n/el.cjs.js"))),"./i18n/en.json":()=>Promise.resolve().then((()=>require("./i18n/en.cjs.js"))),"./i18n/es.json":()=>Promise.resolve().then((()=>require("./i18n/es.cjs.js"))),"./i18n/et.json":()=>Promise.resolve().then((()=>require("./i18n/et.cjs.js"))),"./i18n/fa.json":()=>Promise.resolve().then((()=>require("./i18n/fa.cjs.js"))),"./i18n/fi.json":()=>Promise.resolve().then((()=>require("./i18n/fi.cjs.js"))),"./i18n/fr.json":()=>Promise.resolve().then((()=>require("./i18n/fr.cjs.js"))),"./i18n/he.json":()=>Promise.resolve().then((()=>require("./i18n/he.cjs.js"))),"./i18n/hr.json":()=>Promise.resolve().then((()=>require("./i18n/hr.cjs.js"))),"./i18n/hu.json":()=>Promise.resolve().then((()=>require("./i18n/hu.cjs.js"))),"./i18n/id.json":()=>Promise.resolve().then((()=>require("./i18n/id.cjs.js"))),"./i18n/is.json":()=>Promise.resolve().then((()=>require("./i18n/is.cjs.js"))),"./i18n/it.json":()=>Promise.resolve().then((()=>require("./i18n/it.cjs.js"))),"./i18n/ja.json":()=>Promise.resolve().then((()=>require("./i18n/ja.cjs.js"))),"./i18n/ka.json":()=>Promise.resolve().then((()=>require("./i18n/ka.cjs.js"))),"./i18n/ko.json":()=>Promise.resolve().then((()=>require("./i18n/ko.cjs.js"))),"./i18n/lt.json":()=>Promise.resolve().then((()=>require("./i18n/lt.cjs.js"))),"./i18n/mn.json":()=>Promise.resolve().then((()=>require("./i18n/mn.cjs.js"))),"./i18n/nl.json":()=>Promise.resolve().then((()=>require("./i18n/nl.cjs.js"))),"./i18n/no.json":()=>Promise.resolve().then((()=>require("./i18n/no.cjs.js"))),"./i18n/pl.json":()=>Promise.resolve().then((()=>require("./i18n/pl.cjs.js"))),"./i18n/pt-br.json":()=>Promise.resolve().then((()=>require("./i18n/pt-br.cjs.js"))),"./i18n/pt-pt.json":()=>Promise.resolve().then((()=>require("./i18n/pt-pt.cjs.js"))),"./i18n/ro.json":()=>Promise.resolve().then((()=>require("./i18n/ro.cjs.js"))),"./i18n/ru.json":()=>Promise.resolve().then((()=>require("./i18n/ru.cjs.js"))),"./i18n/sk.json":()=>Promise.resolve().then((()=>require("./i18n/sk.cjs.js"))),"./i18n/sl.json":()=>Promise.resolve().then((()=>require("./i18n/sl.cjs.js"))),"./i18n/sq.json":()=>Promise.resolve().then((()=>require("./i18n/sq.cjs.js"))),"./i18n/sr.json":()=>Promise.resolve().then((()=>require("./i18n/sr.cjs.js"))),"./i18n/sv.json":()=>Promise.resolve().then((()=>require("./i18n/sv.cjs.js"))),"./i18n/tr.json":()=>Promise.resolve().then((()=>require("./i18n/tr.cjs.js"))),"./i18n/uk.json":()=>Promise.resolve().then((()=>require("./i18n/uk.cjs.js"))),"./i18n/vi.json":()=>Promise.resolve().then((()=>require("./i18n/vi.cjs.js"))),"./i18n/zh-cn.json":()=>Promise.resolve().then((()=>require("./i18n/zh-cn.cjs.js"))),"./i18n/zh-hk.json":()=>Promise.resolve().then((()=>require("./i18n/zh-hk.cjs.js")))}),`./i18n/${e}.json`,3);this.texts=Object.assign({},ye,t),this.utils.date.updateTexts(this.texts)},loadDragAndDrop(){Promise.resolve().then((()=>require("./drag-and-drop.cjs.js"))).then((e=>{const{DragAndDrop:t}=e;this.modules.dnd=new t(this)})).catch((()=>console.warn("Vue Cal: Missing drag & drop module.")))},validateView(e){return ge.includes(e)||(console.error(`Vue Cal: invalid active-view parameter provided: "${e}".\nA valid view must be one of: ${ge.join(", ")}.`),e="week"),this.enabledViews.includes(e)||(console.warn(`Vue Cal: the provided active-view "${e}" is disabled. Using the "${this.enabledViews[0]}" view instead.`),e=this.enabledViews[0]),e},switchToNarrowerView(e=null){this.transitionDirection="right";const t=this.enabledViews[this.enabledViews.indexOf(this.view.id)+1];t&&this.switchView(t,e)},switchView(e,t=null,i=!1){e=this.validateView(e);const s=this.utils.date,n=this.view.startDate&&this.view.startDate.getTime();if(this.transitions&&i){if(this.view.id===e)return;const t=this.enabledViews;this.transitionDirection=t.indexOf(this.view.id)>t.indexOf(e)?"left":"right"}const l=this.view.id;switch(this.view.events=[],this.view.id=e,this.view.firstCellDate=null,this.view.lastCellDate=null,t||(t=this.view.selectedDate||this.view.startDate),e){case"years":this.view.startDate=new Date(25*Math.floor(t.getFullYear()/25)||2e3,0,1),this.view.endDate=new Date(this.view.startDate.getFullYear()+25,0,1),this.view.endDate.setSeconds(-1);break;case"year":this.view.startDate=new Date(t.getFullYear(),0,1),this.view.endDate=new Date(t.getFullYear()+1,0,1),this.view.endDate.setSeconds(-1);break;case"month":{this.view.startDate=new Date(t.getFullYear(),t.getMonth(),1),this.view.endDate=new Date(t.getFullYear(),t.getMonth()+1,1),this.view.endDate.setSeconds(-1);let e=new Date(this.view.startDate);if(e.getDay()!==(this.startWeekOnSunday?0:1)&&(e=s.getPreviousFirstDayOfWeek(e,this.startWeekOnSunday)),this.view.firstCellDate=e,this.view.lastCellDate=s.addDays(e,41),this.view.lastCellDate.setHours(23,59,59,0),this.hideWeekends){if([0,6].includes(this.view.firstCellDate.getDay())){const e=6!==this.view.firstCellDate.getDay()||this.startWeekOnSunday?1:2;this.view.firstCellDate=s.addDays(this.view.firstCellDate,e)}if([0,6].includes(this.view.startDate.getDay())){const e=6===this.view.startDate.getDay()?2:1;this.view.startDate=s.addDays(this.view.startDate,e)}if([0,6].includes(this.view.lastCellDate.getDay())){const e=0!==this.view.lastCellDate.getDay()||this.startWeekOnSunday?1:2;this.view.lastCellDate=s.subtractDays(this.view.lastCellDate,e)}if([0,6].includes(this.view.endDate.getDay())){const e=0===this.view.endDate.getDay()?2:1;this.view.endDate=s.subtractDays(this.view.endDate,e)}}break}case"week":{t=s.getPreviousFirstDayOfWeek(t,this.startWeekOnSunday);const e=this.hideWeekends?5:7;this.view.startDate=this.hideWeekends&&this.startWeekOnSunday?s.addDays(t,1):t,this.view.startDate.setHours(0,0,0,0),this.view.endDate=s.addDays(t,e),this.view.endDate.setSeconds(-1);break}case"day":this.view.startDate=t,this.view.startDate.setHours(0,0,0,0),this.view.endDate=new Date(t),this.view.endDate.setHours(23,59,59,0)}this.addEventsToView();const a=this.view.startDate&&this.view.startDate.getTime();if((l!==e||a!==n)&&(this.$emit("update:activeView",e),this.ready)){const t=this.view.startDate,i={view:e,startDate:t,endDate:this.view.endDate,...this.isMonthView?{firstCellDate:this.view.firstCellDate,lastCellDate:this.view.lastCellDate,outOfScopeEvents:this.view.outOfScopeEvents.map(this.cleanupEvent)}:{},events:this.view.events.map(this.cleanupEvent),...this.isWeekView?{week:s.getWeek(this.startWeekOnSunday?s.addDays(t,1):t)}:{}};this.$emit("view-change",i)}},previous(){this.previousNext(!1)},next(){this.previousNext()},previousNext(e=!0){const t=this.utils.date;this.transitionDirection=e?"right":"left";const i=e?1:-1;let s=null;const{startDate:n,id:l}=this.view;switch(l){case"years":s=new Date(n.getFullYear()+25*i,0,1);break;case"year":s=new Date(n.getFullYear()+1*i,1,1);break;case"month":s=new Date(n.getFullYear(),n.getMonth()+1*i,1);break;case"week":s=t[e?"addDays":"subtractDays"](t.getPreviousFirstDayOfWeek(n,this.startWeekOnSunday),7);break;case"day":s=t[e?"addDays":"subtractDays"](n,1);const l=s.getDay(),a=this.startWeekOnSunday?l:(l||7)-1;if(this.weekDays[a].hide){const i=this.weekDays.map(((e,t)=>({...e,i:t})));let n=0;e?([...i.slice(a),...i].find((e=>(n++,!e.hide))).i,n--):[...i,...i.slice(0,a)].reverse().find((e=>(n++,!e.hide))).i,s=t[e?"addDays":"subtractDays"](s,n)}}s&&this.switchView(l,s)},addEventsToView(e=[]){const t=this.utils.event,{startDate:i,endDate:s,firstCellDate:n,lastCellDate:l}=this.view;if(e.length||(this.view.events=[]),!(e=e.length?e:[...this.mutableEvents])||this.isYearsOrYearView&&!this.eventsCountOnYearView)return;let a=e.filter((e=>t.eventInRange(e,i,s)));this.isYearsOrYearView||this.isMonthView&&!this.eventsOnMonthView||(a=a.map((e=>e.daysCount>1?t.createEventSegments(e,n||i,l||s):e))),this.view.events.push(...a),this.isMonthView&&(this.view.outOfScopeEvents=[],e.forEach((e=>{(t.eventInRange(e,n,i)||t.eventInRange(e,s,l))&&(this.view.events.some((t=>t._eid===e._eid))||this.view.outOfScopeEvents.push(e))})))},findAncestor(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e},isDOMElementAnEvent(e){return e.classList.contains("vuecal__event")||this.findAncestor(e,"vuecal__event")},onMouseMove(e){const{resizeAnEvent:t,dragAnEvent:i,dragCreateAnEvent:s}=this.domEvents;(null!==t._eid||null!==i._eid||s.start)&&(e.preventDefault(),t._eid?this.eventResizing(e):this.dragToCreateEvent&&s.start&&this.eventDragCreation(e))},onMouseUp(e){const{focusAnEvent:t,resizeAnEvent:i,clickHoldAnEvent:s,clickHoldACell:n,dragCreateAnEvent:l}=this.domEvents,{_eid:a}=s,{_eid:o}=i;let r=!1;const{event:d,start:c}=l,h=this.isDOMElementAnEvent(e.target),u=t.mousedUp;if(t.mousedUp=!1,h&&(this.domEvents.cancelClickEventCreation=!0),n.eventCreated)return;if(o){const{originalEnd:e,originalEndTimeMinutes:t,endTimeMinutes:s}=i,n=this.view.events.find((e=>e._eid===i._eid));if(r=s&&s!==t,n&&n.end.getTime()!==e.getTime()){const t=this.mutableEvents.find((e=>e._eid===i._eid));t.endTimeMinutes=n.endTimeMinutes,t.end=n.end;const s=this.cleanupEvent(n),l={...this.cleanupEvent(n),end:e,endTimeMinutes:n.originalEndTimeMinutes};this.$emit("event-duration-change",{event:s,oldDate:i.originalEnd,originalEvent:l}),this.$emit("event-change",{event:s,originalEvent:l})}n&&(n.resizing=!1),i._eid=null,i.start=null,i.split=null,i.segment=null,i.originalEndTimeMinutes=null,i.originalEnd=null,i.endTimeMinutes=null,i.startCell=null,i.endCell=null}else c&&(d&&(this.emitWithEvent("event-drag-create",d),l.event.resizing=!1),l.start=null,l.split=null,l.event=null);h||o||this.unfocusEvent(),s.timeoutId&&!a&&(clearTimeout(s.timeoutId),s.timeoutId=null),n.timeoutId&&(clearTimeout(n.timeoutId),n.timeoutId=null);const v="function"==typeof this.onEventClick;if(u&&!r&&!a&&!d&&v){let i=this.view.events.find((e=>e._eid===t._eid));return!i&&this.isMonthView&&(i=this.view.outOfScopeEvents.find((e=>e._eid===t._eid))),i&&this.onEventClick(i,e)}},onKeyUp(e){27===e.keyCode&&this.cancelDelete()},eventResizing(e){const{resizeAnEvent:t}=this.domEvents,i=this.view.events.find((e=>e._eid===t._eid))||{segments:{}},{minutes:s,cursorCoords:n}=this.minutesAtCursor(e),l=i.segments&&i.segments[t.segment],{date:a,event:o}=this.utils,r=Math.max(s,this.timeFrom+1,(l||i).startTimeMinutes+1);if(i.endTimeMinutes=t.endTimeMinutes=r,this.snapToTime){const e=i.endTimeMinutes+this.snapToTime/2;i.endTimeMinutes=e-e%this.snapToTime}if(l&&(l.endTimeMinutes=i.endTimeMinutes),i.end.setHours(0,i.endTimeMinutes,i.endTimeMinutes===we?-1:0,0),this.resizeX&&this.isWeekView){i.daysCount=a.countDays(i.start,i.end);const e=this.cellsEl,s=e.offsetWidth/e.childElementCount,l=Math.floor(n.x/s);if(null===t.startCell&&(t.startCell=l-(i.daysCount-1)),t.endCell!==l){t.endCell=l;const e=a.addDays(i.start,l-t.startCell),s=Math.max(a.countDays(i.start,e),1);if(s!==i.daysCount){let e=null;e=s>i.daysCount?o.addEventSegment(i):o.removeEventSegment(i),t.segment=e,i.endTimeMinutes+=.001}}}this.$emit("event-resizing",{_eid:i._eid,end:i.end,endTimeMinutes:i.endTimeMinutes})},eventDragCreation(e){const{dragCreateAnEvent:t}=this.domEvents,{start:i,startCursorY:s,split:n}=t,l=new Date(i),{minutes:a,cursorCoords:{y:o}}=this.minutesAtCursor(e);if(t.event||!(Math.abs(s-o)<this.dragToCreateThreshold))if(t.event){if(l.setHours(0,a,a===we?-1:0,0),this.snapToTime){let e=60*l.getHours()+l.getMinutes();const t=e+this.snapToTime/2;e=t-t%this.snapToTime,l.setHours(0,e,0,0)}const e=i<l,{event:s}=t;s.start=e?i:l,s.end=e?l:i,s.startTimeMinutes=60*s.start.getHours()+s.start.getMinutes(),s.endTimeMinutes=60*s.end.getHours()+s.end.getMinutes()}else{if(t.event=this.utils.event.createAnEvent(i,1,{split:n}),!t.event)return t.start=null,t.split=null,void(t.event=null);t.event.resizing=!0}},unfocusEvent(){const{focusAnEvent:e,clickHoldAnEvent:t}=this.domEvents,i=this.view.events.find((i=>i._eid===(e._eid||t._eid)));e._eid=null,t._eid=null,i&&(i.focused=!1,i.deleting=!1)},cancelDelete(){const{clickHoldAnEvent:e}=this.domEvents;if(e._eid){const t=this.view.events.find((t=>t._eid===e._eid));t&&(t.deleting=!1),e._eid=null,e.timeoutId=null}},onEventTitleBlur(e,t){if(t.title===e.target.innerHTML)return;const i=t.title;t.title=e.target.innerHTML;const s=this.cleanupEvent(t);this.$emit("event-title-change",{event:s,oldTitle:i}),this.$emit("event-change",{event:s,originalEvent:{...s,title:i}})},updateMutableEvents(){const e=this.utils.date;this.mutableEvents=[],this.events.forEach((t=>{const i="string"==typeof t.start?e.stringToDate(t.start):t.start,s=e.formatDateLite(i),n=e.dateToMinutes(i);let l=null;"string"==typeof t.end&&t.end.includes("24:00")?(l=new Date(t.end.replace(" 24:00","")),l.setHours(23,59,59,0)):l="string"==typeof t.end?e.stringToDate(t.end):t.end;let a=e.formatDateLite(l),o=e.dateToMinutes(l);o&&o!==we||(!this.time||"string"==typeof t.end&&10===t.end.length?l.setHours(23,59,59,0):l.setSeconds(l.getSeconds()-1),a=e.formatDateLite(l),o=we);const r=s!==a;t=Object.assign({...this.utils.event.eventDefaults},t,{_eid:`${this._.uid}_${this.eventIdIncrement++}`,segments:r?{}:null,start:i,startTimeMinutes:n,end:l,endTimeMinutes:o,daysCount:r?e.countDays(i,l):1,class:t.class}),this.mutableEvents.push(t)}))},minutesAtCursor(e){return this.utils.cell.minutesAtCursor(e)},createEvent(e,t,i={}){return this.utils.event.createAnEvent(e,t,i)},cleanupEvent(e){e={...e};return["segments","deletable","deleting","titleEditable","resizable","resizing","draggable","dragging","draggingStatic","focused"].forEach((t=>{t in e&&delete e[t]})),e.repeat||delete e.repeat,e},emitWithEvent(e,t){this.$emit(e,this.cleanupEvent(t))},updateSelectedDate(e){if((e=e&&"string"==typeof e?this.utils.date.stringToDate(e):new Date(e))&&e instanceof Date){const{selectedDate:t}=this.view;t&&(this.transitionDirection=t.getTime()>e.getTime()?"left":"right"),e.setHours(0,0,0,0),t&&t.getTime()===e.getTime()||(this.view.selectedDate=e),this.switchView(this.view.id)}this.$emit("update:selected-date",this.view.selectedDate)},getWeekNumber(e){const t=this.utils.date,i=this.firstCellDateWeekNumber+e,s=this.startWeekOnSunday?1:0;return i>52?t.getWeek(t.addDays(this.view.firstCellDate,7*e+s)):i},timeTick(){this.now=new Date,this.timeTickerIds[1]=setTimeout(this.timeTick,6e4)},updateDateTexts(){this.utils.date.updateTexts(this.texts)},alignWithScrollbar(){if(document.getElementById("vuecal-align-with-scrollbar"))return;const e=this.$refs.vuecal.getElementsByClassName("vuecal__scrollbar-check")[0],t=e.offsetWidth-e.children[0].offsetWidth;if(t){const e=document.createElement("style");e.id="vuecal-align-with-scrollbar",e.type="text/css",e.innerHTML=`.vuecal--view-with-time .vuecal__weekdays-headings,.vuecal--view-with-time .vuecal__all-day {padding-right: ${t}px}`,document.head.appendChild(e)}},cellOrSplitHasEvents:(e,t=null)=>e.length&&(!t&&e.length||t&&e.some((e=>e.split===t.id)))},created(){this.utils.cell=new d(this),this.utils.event=new m(this,this.utils.date),this.loadLocale(this.locale),this.editEvents.drag&&this.loadDragAndDrop(),this.updateMutableEvents(this.events),this.view.id=this.currentView,this.selectedDate?this.updateSelectedDate(this.selectedDate):(this.view.selectedDate=new Date,this.switchView(this.currentView)),this.time&&this.watchRealTime&&(this.timeTickerIds[0]=setTimeout(this.timeTick,1e3*(60-this.now.getSeconds())))},mounted(){const e=this.utils.date,t="ontouchstart"in window,{resize:i,drag:s,create:n,delete:l,title:a}=this.editEvents,o=this.onEventClick&&"function"==typeof this.onEventClick;(i||s||n||l||a||o)&&window.addEventListener(t?"touchend":"mouseup",this.onMouseUp),(i||s||n&&this.dragToCreateEvent)&&window.addEventListener(t?"touchmove":"mousemove",this.onMouseMove,{passive:!1}),a&&window.addEventListener("keyup",this.onKeyUp),t&&(this.$refs.vuecal.oncontextmenu=function(e){e.preventDefault(),e.stopPropagation()}),this.hideBody||this.alignWithScrollbar();const r=this.view.startDate,d={view:this.view.id,startDate:r,endDate:this.view.endDate,...this.isMonthView?{firstCellDate:this.view.firstCellDate,lastCellDate:this.view.lastCellDate}:{},events:this.view.events.map(this.cleanupEvent),...this.isWeekView?{week:e.getWeek(this.startWeekOnSunday?e.addDays(r,1):r)}:{}};this.$emit("ready",d),this.ready=!0},beforeUnmount(){const e="ontouchstart"in window;window.removeEventListener(e?"touchmove":"mousemove",this.onMouseMove,{passive:!1}),window.removeEventListener(e?"touchend":"mouseup",this.onMouseUp),window.removeEventListener("keyup",this.onKeyUp),this.timeTickerIds[0]&&clearTimeout(this.timeTickerIds[0]),this.timeTickerIds[1]&&clearTimeout(this.timeTickerIds[1]),this.timeTickerIds=[null,null]},computed:{editEvents(){return this.editableEvents&&"object"==typeof this.editableEvents?{title:!!this.editableEvents.title,drag:!!this.editableEvents.drag,resize:!!this.editableEvents.resize,create:!!this.editableEvents.create,delete:!!this.editableEvents.delete}:{title:!!this.editableEvents,drag:!!this.editableEvents,resize:!!this.editableEvents,create:!!this.editableEvents,delete:!!this.editableEvents}},views(){return{years:{label:this.texts.years,enabled:!this.disableViews.includes("years")},year:{label:this.texts.year,enabled:!this.disableViews.includes("year")},month:{label:this.texts.month,enabled:!this.disableViews.includes("month")},week:{label:this.texts.week,enabled:!this.disableViews.includes("week")},day:{label:this.texts.day,enabled:!this.disableViews.includes("day")}}},currentView(){return this.validateView(this.activeView)},enabledViews(){return Object.keys(this.views).filter((e=>this.views[e].enabled))},hasTimeColumn(){return this.time&&this.isWeekOrDayView},isShortMonthView(){return this.isMonthView&&"short"===this.eventsOnMonthView},firstCellDateWeekNumber(){const e=this.utils.date,t=this.view.firstCellDate;return e.getWeek(this.startWeekOnSunday?e.addDays(t,1):t)},timeCells(){const e=[];for(let t=this.timeFrom,i=this.timeTo;t<i;t+=this.timeStep)e.push({hours:Math.floor(t/60),minutes:t%60,label:this.utils.date.formatTime(t,this.TimeFormat),value:t});return e},TimeFormat(){return this.timeFormat||(this.twelveHour?"h:mm{am}":"HH:mm")},daySplits(){return(this.splitDays.filter((e=>!e.hide))||[]).map(((e,t)=>({...e,id:e.id||t+1})))},hasSplits(){return this.daySplits.length&&this.isWeekOrDayView},hasShortEvents(){return"short"===this.showAllDayEvents},cellOrSplitMinWidth(){let e=null;return this.hasSplits&&this.minSplitWidth?e=this.visibleDaysCount*this.minSplitWidth*this.daySplits.length:this.minCellWidth&&this.isWeekView&&(e=this.visibleDaysCount*this.minCellWidth),e},allDayBar(){let e=this.allDayBarHeight||null;return e&&!isNaN(e)&&(e+="px"),{cells:this.viewCells,options:this.$props,label:this.texts.allDay,shortEvents:this.hasShortEvents,daySplits:this.hasSplits&&this.daySplits||[],cellOrSplitMinWidth:this.cellOrSplitMinWidth,height:e}},minTimestamp(){let e=null;return this.minDate&&"string"==typeof this.minDate?e=this.utils.date.stringToDate(this.minDate):this.minDate&&this.minDate instanceof Date&&(e=this.minDate),e?e.getTime():null},maxTimestamp(){let e=null;return this.maxDate&&"string"==typeof this.maxDate?e=this.utils.date.stringToDate(this.maxDate):this.maxDate&&this.maxDate instanceof Date&&(e=this.maxDate),e?e.getTime():null},weekDays(){let{weekDays:e,weekDaysShort:t=[]}=this.texts;return e=e.slice(0).map(((e,i)=>({label:e,...t.length?{short:t[i]}:{},hide:this.hideWeekends&&i>=5||this.hideWeekdays.length&&this.hideWeekdays.includes(i+1)}))),this.startWeekOnSunday&&e.unshift(e.pop()),e},weekDaysInHeader(){return this.isMonthView||this.isWeekView&&!this.minCellWidth&&!(this.hasSplits&&this.minSplitWidth)},months(){return this.texts.months.map((e=>({label:e})))},specialDayHours(){return this.specialHours&&Object.keys(this.specialHours).length?Array(7).fill("").map(((e,t)=>{let i=this.specialHours[t+1]||[];return Array.isArray(i)||(i=[i]),e=[],i.forEach((({from:i,to:s,class:n,label:l},a)=>{e[a]={day:t+1,from:[null,void 0].includes(i)?null:1*i,to:[null,void 0].includes(s)?null:1*s,class:n||"",label:l||""}})),e})):{}},viewTitle(){const e=this.utils.date;let t="";const i=this.view.startDate,s=i.getFullYear(),n=i.getMonth();switch(this.view.id){case"years":t=this.texts.years;break;case"year":t=s;break;case"month":t=`${this.months[n].label} ${s}`;break;case"week":{const s=this.view.endDate,n=i.getFullYear();let l=this.texts.months[i.getMonth()];this.xsmall&&(l=l.substring(0,3));let a=`${l} ${n}`;if(s.getMonth()!==i.getMonth()){const e=s.getFullYear();let t=this.texts.months[s.getMonth()];this.xsmall&&(t=t.substring(0,3)),a=n===e?`${l} - ${t} ${n}`:this.small?`${l.substring(0,3)} ${n} - ${t.substring(0,3)} ${e}`:`${l} ${n} - ${t} ${e}`}t=`${this.texts.week} ${e.getWeek(this.startWeekOnSunday?e.addDays(i,1):i)} (${a})`;break}case"day":t=this.utils.date.formatDate(i,this.texts.dateFormat,this.texts)}return t},viewCells(){const e=this.utils.date;let t=[],i=null,s=!1;this.watchRealTime||(this.now=new Date);const n=this.now;switch(this.view.id){case"years":i=this.view.startDate.getFullYear(),t=Array.apply(null,Array(25)).map(((t,s)=>{const l=new Date(i+s,0,1),a=new Date(i+s+1,0,1);return a.setSeconds(-1),{startDate:l,formattedDate:e.formatDateLite(l),endDate:a,content:i+s,current:i+s===n.getFullYear()}}));break;case"year":i=this.view.startDate.getFullYear(),t=Array.apply(null,Array(12)).map(((t,s)=>{const l=new Date(i,s,1),a=new Date(i,s+1,1);return a.setSeconds(-1),{startDate:l,formattedDate:e.formatDateLite(l),endDate:a,content:this.xsmall?this.months[s].label.substr(0,3):this.months[s].label,current:s===n.getMonth()&&i===n.getFullYear()}}));break;case"month":{const i=this.view.startDate.getMonth(),n=new Date(this.view.firstCellDate);s=!1,t=Array.apply(null,Array(42)).map(((t,l)=>{const a=e.addDays(n,l),o=new Date(a);o.setHours(23,59,59,0);const r=!s&&e.isToday(a)&&!s++;return{startDate:a,formattedDate:e.formatDateLite(a),endDate:o,content:a.getDate(),today:r,outOfScope:a.getMonth()!==i,class:`vuecal__cell--day${a.getDay()||7}`}})),(this.hideWeekends||this.hideWeekdays.length)&&(t=t.filter((e=>{const t=e.startDate.getDay()||7;return!(this.hideWeekends&&t>=6||this.hideWeekdays.length&&this.hideWeekdays.includes(t))})));break}case"week":{s=!1;const i=this.view.startDate,n=this.weekDays;t=n.map(((t,n)=>{const l=e.addDays(i,this.startWeekOnSunday&&this.hideWeekends?n-1:n),a=new Date(l);a.setHours(23,59,59,0);const o=(l.getDay()||7)-1;return{startDate:l,formattedDate:e.formatDateLite(l),endDate:a,today:!s&&e.isToday(l)&&!s++,specialHours:this.specialDayHours[o]||[]}})).filter(((e,t)=>!n[t].hide));break}case"day":{const i=this.view.startDate,s=new Date(this.view.startDate);s.setHours(23,59,59,0);const n=(i.getDay()||7)-1;t=[{startDate:i,formattedDate:e.formatDateLite(i),endDate:s,today:e.isToday(i),specialHours:this.specialDayHours[n]||[]}];break}}return t},visibleDaysCount(){return this.isDayView?1:7-this.weekDays.reduce(((e,t)=>e+t.hide),0)},cellWidth(){return 100/this.visibleDaysCount},cssClasses(){const{resizeAnEvent:e,dragAnEvent:t,dragCreateAnEvent:i}=this.domEvents;return{[`vuecal--${this.view.id}-view`]:!0,[`vuecal--${this.locale}`]:this.locale,"vuecal--no-time":!this.time,"vuecal--view-with-time":this.hasTimeColumn,"vuecal--week-numbers":this.showWeekNumbers&&this.isMonthView,"vuecal--twelve-hour":this.twelveHour,"vuecal--click-to-navigate":this.clickToNavigate,"vuecal--hide-weekends":this.hideWeekends,"vuecal--split-days":this.hasSplits,"vuecal--sticky-split-labels":this.hasSplits&&this.stickySplitLabels,"vuecal--overflow-x":this.minCellWidth&&this.isWeekView||this.hasSplits&&this.minSplitWidth,"vuecal--small":this.small,"vuecal--xsmall":this.xsmall,"vuecal--resizing-event":e._eid,"vuecal--drag-creating-event":i.event,"vuecal--dragging-event":t._eid,"vuecal--events-on-month-view":this.eventsOnMonthView,"vuecal--short-events":this.isMonthView&&"short"===this.eventsOnMonthView,"vuecal--has-touch":"undefined"!=typeof window&&"ontouchstart"in window}},isYearsOrYearView(){return["years","year"].includes(this.view.id)},isYearsView(){return"years"===this.view.id},isYearView(){return"year"===this.view.id},isMonthView(){return"month"===this.view.id},isWeekOrDayView(){return["week","day"].includes(this.view.id)},isWeekView(){return"week"===this.view.id},isDayView(){return"day"===this.view.id}},watch:{events:{handler(e,t){this.updateMutableEvents(e),this.addEventsToView()},deep:!0},locale(e){this.loadLocale(e)},selectedDate(e){this.updateSelectedDate(e)},activeView(e){this.switchView(e)}}},[["render",function(e,t,s,n,l,a){const o=i.resolveComponent("vuecal-header"),r=i.resolveComponent("all-day-bar"),d=i.resolveComponent("weekdays-headings"),c=i.resolveComponent("vuecal-cell");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["vuecal__flex vuecal",a.cssClasses]),column:"",ref:"vuecal",lang:s.locale},[i.createVNode(o,{options:e.$props,"edit-events":a.editEvents,"view-props":{views:a.views,weekDaysInHeader:a.weekDaysInHeader},"week-days":a.weekDays,"has-splits":a.hasSplits,"day-splits":a.daySplits,"switch-to-narrower-view":a.switchToNarrowerView},i.createSlots({"arrow-prev":i.withCtx((()=>[i.renderSlot(e.$slots,"arrow-prev",{},(()=>[t[0]||(t[0]=i.createTextVNode(" ")),t[1]||(t[1]=i.createElementVNode("i",{class:"angle"},null,-1)),t[2]||(t[2]=i.createTextVNode(" "))]))])),"arrow-next":i.withCtx((()=>[i.renderSlot(e.$slots,"arrow-next",{},(()=>[t[3]||(t[3]=i.createTextVNode(" ")),t[4]||(t[4]=i.createElementVNode("i",{class:"angle"},null,-1)),t[5]||(t[5]=i.createTextVNode(" "))]))])),"today-button":i.withCtx((()=>[i.renderSlot(e.$slots,"today-button",{},(()=>[i.createElementVNode("span",I,i.toDisplayString(l.texts.today),1)]))])),title:i.withCtx((()=>[i.renderSlot(e.$slots,"title",{title:a.viewTitle,view:l.view},(()=>[i.createTextVNode(i.toDisplayString(a.viewTitle),1)]))])),_:2},[e.$slots["weekday-heading"]?{name:"weekday-heading",fn:i.withCtx((({heading:t,view:s})=>[i.renderSlot(e.$slots,"weekday-heading",{heading:t,view:s})])),key:"0"}:void 0,e.$slots["split-label"]?{name:"split-label",fn:i.withCtx((({split:t})=>[i.renderSlot(e.$slots,"split-label",{split:t,view:l.view.id})])),key:"1"}:void 0]),1032,["options","edit-events","view-props","week-days","has-splits","day-splits","switch-to-narrower-view"]),s.hideBody?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",U,[i.createVNode(i.Transition,{name:`slide-fade--${l.transitionDirection}`,appear:s.transitions},{default:i.withCtx((()=>[(i.openBlock(),i.createElementBlock("div",{class:"vuecal__flex",style:{"min-width":"100%"},key:!!s.transitions&&l.view.id,column:""},[s.showAllDayEvents&&a.hasTimeColumn&&(!a.cellOrSplitMinWidth||a.isDayView&&!s.minSplitWidth)?(i.openBlock(),i.createBlock(r,i.normalizeProps(i.mergeProps({key:0},a.allDayBar)),{event:i.withCtx((({event:t,view:s})=>[i.renderSlot(e.$slots,"event",{view:s,event:t},(()=>[a.editEvents.title&&t.titleEditable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"vuecal__event-title vuecal__event-title--edit",contenteditable:"",onBlur:e=>a.onEventTitleBlur(e,t),innerHTML:t.title},null,40,R)):t.title?(i.openBlock(),i.createElementBlock("div",{key:1,class:"vuecal__event-title",innerHTML:t.title},null,8,K)):i.createCommentVNode("",!0),!t.content||a.hasShortEvents||a.isShortMonthView?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:2,class:"vuecal__event-content",innerHTML:t.content},null,8,X))]))])),_:3},16)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["vuecal__bg",{vuecal__flex:!a.hasTimeColumn}]),column:""},[i.createElementVNode("div",G,[a.hasTimeColumn?(i.openBlock(),i.createElementBlock("div",Z,[s.showAllDayEvents&&a.cellOrSplitMinWidth&&(!a.isDayView||s.minSplitWidth)?(i.openBlock(),i.createElementBlock("div",{key:0,class:"vuecal__all-day-text",style:i.normalizeStyle({height:a.allDayBar.height})},[i.createElementVNode("span",null,i.toDisplayString(l.texts.allDay),1)],4)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.timeCells,((n,l)=>(i.openBlock(),i.createElementBlock("div",{class:"vuecal__time-cell",key:l,style:i.normalizeStyle(`height: ${s.timeCellHeight}px`)},[i.renderSlot(e.$slots,"time-cell",{hours:n.hours,minutes:n.minutes},(()=>[t[6]||(t[6]=i.createElementVNode("span",{class:"vuecal__time-cell-line"},null,-1)),i.createElementVNode("span",J,i.toDisplayString(n.label),1)]))],4)))),128))])):i.createCommentVNode("",!0),s.showWeekNumbers&&a.isMonthView?(i.openBlock(),i.createElementBlock("div",Q,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(6,(t=>i.createElementVNode("div",{class:"vuecal__flex vuecal__week-number-cell",key:t,grow:""},[i.renderSlot(e.$slots,"week-number-cell",{week:a.getWeekNumber(t-1)},(()=>[i.createTextVNode(i.toDisplayString(a.getWeekNumber(t-1)),1)]))]))),64))])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["vuecal__flex vuecal__cells",`${l.view.id}-view`]),grow:"",wrap:!a.cellOrSplitMinWidth||!a.isWeekView,column:!!a.cellOrSplitMinWidth},[a.cellOrSplitMinWidth&&a.isWeekView?(i.openBlock(),i.createBlock(d,{key:0,"transition-direction":l.transitionDirection,"week-days":a.weekDays,"switch-to-narrower-view":a.switchToNarrowerView,style:i.normalizeStyle(a.cellOrSplitMinWidth?`min-width: ${a.cellOrSplitMinWidth}px`:"")},i.createSlots({_:2},[e.$slots["weekday-heading"]?{name:"weekday-heading",fn:i.withCtx((({heading:t,view:s})=>[i.renderSlot(e.$slots,"weekday-heading",{heading:t,view:s})])),key:"0"}:void 0,e.$slots["split-label"]?{name:"split-label",fn:i.withCtx((({split:t})=>[i.renderSlot(e.$slots,"split-label",{split:t,view:l.view.id})])),key:"1"}:void 0]),1032,["transition-direction","week-days","switch-to-narrower-view","style"])):a.hasSplits&&s.stickySplitLabels&&s.minSplitWidth?(i.openBlock(),i.createElementBlock("div",{key:1,class:"vuecal__flex vuecal__split-days-headers",style:i.normalizeStyle(a.cellOrSplitMinWidth?`min-width: ${a.cellOrSplitMinWidth}px`:"")},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.daySplits,((t,s)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["day-split-header",t.class||!1]),key:s},[i.renderSlot(e.$slots,"split-label",{split:t,view:l.view.id},(()=>[i.createTextVNode(i.toDisplayString(t.label),1)]))],2)))),128))],4)):i.createCommentVNode("",!0),s.showAllDayEvents&&a.hasTimeColumn&&(a.isWeekView&&a.cellOrSplitMinWidth||a.isDayView&&a.hasSplits&&s.minSplitWidth)?(i.openBlock(),i.createBlock(r,i.normalizeProps(i.mergeProps({key:2},a.allDayBar)),{event:i.withCtx((({event:t,view:s})=>[i.renderSlot(e.$slots,"event",{view:s,event:t},(()=>[a.editEvents.title&&t.titleEditable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"vuecal__event-title vuecal__event-title--edit",contenteditable:"",onBlur:e=>a.onEventTitleBlur(e,t),innerHTML:t.title},null,40,te)):t.title?(i.openBlock(),i.createElementBlock("div",{key:1,class:"vuecal__event-title",innerHTML:t.title},null,8,ie)):i.createCommentVNode("",!0),!t.content||a.hasShortEvents||a.isShortMonthView?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:2,class:"vuecal__event-content",innerHTML:t.content},null,8,se))]))])),_:3},16)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"vuecal__flex",ref:e=>l.cellsEl=e,grow:"",wrap:!a.cellOrSplitMinWidth||!a.isWeekView,style:i.normalizeStyle(a.cellOrSplitMinWidth?`min-width: ${a.cellOrSplitMinWidth}px`:"")},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.viewCells,((t,n)=>(i.openBlock(),i.createBlock(c,{key:n,options:e.$props,"edit-events":a.editEvents,data:t,"cell-width":s.hideWeekdays.length&&(a.isWeekView||a.isMonthView)&&a.cellWidth,"min-timestamp":a.minTimestamp,"max-timestamp":a.maxTimestamp,"cell-splits":a.hasSplits&&a.daySplits||[]},{"cell-content":i.withCtx((({events:n,split:o,selectCell:r})=>[i.renderSlot(e.$slots,"cell-content",{cell:t,view:l.view,goNarrower:r,events:n},(()=>[o&&!s.stickySplitLabels?(i.openBlock(),i.createElementBlock("div",{key:0,class:"split-label",innerHTML:o.label},null,8,le)):i.createCommentVNode("",!0),t.content?(i.openBlock(),i.createElementBlock("div",{key:1,class:"vuecal__cell-date",innerHTML:t.content},null,8,ae)):i.createCommentVNode("",!0),(a.isMonthView&&!s.eventsOnMonthView||a.isYearsOrYearView&&s.eventsCountOnYearView)&&n.length?(i.openBlock(),i.createElementBlock("div",oe,[i.renderSlot(e.$slots,"events-count",{view:l.view,events:n},(()=>[i.createTextVNode(i.toDisplayString(n.length),1)]))])):i.createCommentVNode("",!0),!a.cellOrSplitHasEvents(n,o)&&a.isWeekOrDayView?(i.openBlock(),i.createElementBlock("div",re,[i.renderSlot(e.$slots,"no-event",{},(()=>[i.createTextVNode(i.toDisplayString(l.texts.noEvent),1)]))])):i.createCommentVNode("",!0)]))])),event:i.withCtx((({event:n,view:o})=>[i.renderSlot(e.$slots,"event",{view:o,event:n},(()=>[a.editEvents.title&&n.titleEditable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"vuecal__event-title vuecal__event-title--edit",contenteditable:"",onBlur:e=>a.onEventTitleBlur(e,n),innerHTML:n.title},null,40,de)):n.title?(i.openBlock(),i.createElementBlock("div",{key:1,class:"vuecal__event-title",innerHTML:n.title},null,8,ce)):i.createCommentVNode("",!0),!s.time||n.allDay||a.isMonthView&&(n.allDay||"short"===s.showAllDayEvents)||a.isShortMonthView?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",he,[i.createTextVNode(i.toDisplayString(l.utils.date.formatTime(n.start,a.TimeFormat)),1),n.endTimeMinutes?(i.openBlock(),i.createElementBlock("span",ue," - "+i.toDisplayString(l.utils.date.formatTime(n.end,a.TimeFormat,null,!0)),1)):i.createCommentVNode("",!0),n.daysCount>1&&(n.segments[t.formattedDate]||{}).isFirstDay?(i.openBlock(),i.createElementBlock("small",ve," +"+i.toDisplayString(n.daysCount-1)+i.toDisplayString((l.texts.day[0]||"").toLowerCase()),1)):i.createCommentVNode("",!0)])),!n.content||a.isMonthView&&n.allDay&&"short"===s.showAllDayEvents||a.isShortMonthView?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:3,class:"vuecal__event-content",innerHTML:n.content},null,8,me))]))])),"no-event":i.withCtx((()=>[i.renderSlot(e.$slots,"no-event",{},(()=>[i.createTextVNode(i.toDisplayString(l.texts.noEvent),1)]))])),_:2},1032,["options","edit-events","data","cell-width","min-timestamp","max-timestamp","cell-splits"])))),128))],12,ne)],10,ee)])],2)]))])),_:3},8,["name","appear"]),l.ready?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",pe,t[7]||(t[7]=[i.createElementVNode("div",null,null,-1)])))]))],10,q)}]]);module.exports=ke;
|
package/dist/vue-cal.es.js
CHANGED
|
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
/**
|
|
5
|
-
* vue-cal v4.10.
|
|
5
|
+
* vue-cal v4.10.2
|
|
6
6
|
* (c) 2025 Antoni Andre <antoniandre.web@gmail.com>
|
|
7
7
|
* @license MIT
|
|
8
8
|
*/
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-cal",
|
|
3
|
-
"version": "4.10.
|
|
3
|
+
"version": "4.10.2",
|
|
4
4
|
"description": "A Vue JS full calendar, no dependency, no BS. :metal:",
|
|
5
5
|
"author": "Antoni Andre <antoniandre.web@gmail.com>",
|
|
6
|
-
"homepage": "https://antoniandre.github.io/vue-cal",
|
|
7
|
-
"repository": "https://github.com/antoniandre/vue-cal",
|
|
6
|
+
"homepage": "https://antoniandre.github.io/vue-cal-v4",
|
|
7
|
+
"repository": "https://github.com/antoniandre/vue-cal-v4",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"funding": "https://github.com/sponsors/antoniandre",
|
|
10
10
|
"main": "dist/vue-cal.cjs.js",
|