vue-cal 5.0.1-rc.8 → 5.0.1-rc.9

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.
@@ -1,7 +1,7 @@
1
- import { computed as T, reactive as $e, watch as me, toRefs as rt, ref as ie, onBeforeUnmount as Xe, inject as Ne, createElementBlock as j, openBlock as Y, renderSlot as F, createCommentVNode as Z, unref as O, Fragment as te, renderList as we, normalizeClass as _e, createElementVNode as ge, createVNode as Oe, Transition as Ge, withCtx as J, createBlock as Se, resolveDynamicComponent as Ke, mergeProps as De, toHandlers as Ie, normalizeProps as se, guardReactiveProps as ne, toDisplayString as le, onMounted as Ze, withModifiers as Qe, nextTick as Ue, normalizeStyle as Te, createTextVNode as xe, TransitionGroup as et, createSlots as je, useTemplateRef as ot, useId as it, useAttrs as ut, provide as ct } from "vue";
2
- import st from "./i18n/en-us.json";
1
+ import { computed as T, reactive as $e, watch as me, toRefs as rt, ref as ie, onBeforeUnmount as Xe, inject as Ne, createElementBlock as j, openBlock as E, renderSlot as F, createCommentVNode as Z, unref as O, Fragment as te, renderList as we, normalizeClass as _e, createElementVNode as ge, createVNode as Oe, Transition as Ge, withCtx as J, createBlock as Se, resolveDynamicComponent as Ke, mergeProps as De, toHandlers as Ie, normalizeProps as ne, guardReactiveProps as se, toDisplayString as le, onMounted as Ze, withModifiers as Qe, nextTick as Ue, normalizeStyle as Te, createTextVNode as xe, TransitionGroup as et, createSlots as je, useTemplateRef as ot, useId as it, useAttrs as ut, provide as ct } from "vue";
2
+ import nt from "./i18n/en-us.json";
3
3
  /**
4
- * vue-cal v5.0.1-rc.8
4
+ * vue-cal v5.0.1-rc.9
5
5
  * (c) 2024-2025 Antoni Andre <antoniandre.web@gmail.com>
6
6
  * @license MIT
7
7
  */
@@ -34,35 +34,34 @@ const fe = {
34
34
  years: { cols: 5, rows: 5 }
35
35
  // Arbitrary range of quarters of century (25y).
36
36
  }
37
- }, dt = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], Re = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], vt = Re.reduce((D, s, r) => (D[s] = r || 7, D), {}), mt = (D, s, r) => {
37
+ }, dt = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], Re = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], vt = Re.reduce((D, n, r) => (D[n] = r || 7, D), {}), mt = (D, n, r) => {
38
38
  const { dateUtils: g } = D, p = !1, b = T(() => {
39
- if (W.value[s.view]) return s.view;
40
- {
41
- const n = s.datePicker ? "month" : "week", l = s.view || n;
42
- return W.value[l] ? l : (console.warn(
43
- `Vue Cal: the provided or default view \`${l}\` is either invalid or not in the list of available views. The first available view will be chosen: \`${Object.keys(W.value)[0]}\`.`
44
- ), Object.keys(W.value)[0]);
45
- }
46
- }), L = T(() => s.sm && !s.xs), v = T(() => s.xs || s.datePicker), C = T(() => s.clickToNavigate || s.datePicker && s.clickToNavigate !== !1), o = T(() => {
47
- const n = {
39
+ if (W.value[n.view]) return n.view;
40
+ const s = n.datePicker ? "month" : "week", l = n.view || s;
41
+ return W.value[l] ? l : (console.warn(
42
+ `Vue Cal: the provided or default view \`${l}\` is either invalid or not in the list of available views. The first available view will be chosen: \`${Object.keys(W.value)[0]}\`.`
43
+ ), Object.keys(W.value)[0]);
44
+ }), L = T(() => n.sm && !n.xs), v = T(() => n.xs || n.datePicker), C = T(() => n.clickToNavigate || n.datePicker && n.clickToNavigate !== !1), o = T(() => {
45
+ const s = {
48
46
  cell: {},
49
47
  // All possible event listeners to attach to cells.
50
48
  event: {}
51
49
  // All possible event listeners to attach to calendar events.
52
50
  }, l = (k) => k.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
53
- return Object.entries(r).forEach(([k, t]) => {
51
+ for (const [k, t] of Object.entries(r)) {
54
52
  const [V, H, U] = k.match(/^on(Cell|Event)(.+)$/) || [];
55
- V && (n[H.toLowerCase()][l(U).replace(/^-+|-+$/g, "")] = t);
56
- }), n;
53
+ V && (s[H.toLowerCase()][l(U).replace(/^-+|-+$/g, "")] = t);
54
+ }
55
+ return s;
57
56
  }), m = T(() => {
58
57
  var l;
59
- const n = {};
60
- return s.hideWeekends && (n[6] = !0) && (n[7] = !0), (l = s.hideWeekdays) != null && l.length && s.hideWeekdays.forEach((k) => n[vt[k]] = !0), n;
61
- }), $ = T(() => s.hideWeekends || m.value[6] && m.value[7]), W = T(() => {
62
- const n = s.datePicker;
58
+ const s = {};
59
+ return n.hideWeekends && (s[6] = !0) && (s[7] = !0), (l = n.hideWeekdays) != null && l.length && n.hideWeekdays.forEach((k) => s[vt[k]] = !0), s;
60
+ }), $ = T(() => n.hideWeekends || m.value[6] && m.value[7]), W = T(() => {
61
+ const s = n.datePicker;
63
62
  let l = 0, k = {};
64
- const t = s.views;
65
- return n && !t ? {
63
+ const t = n.views;
64
+ return s && !t ? {
66
65
  month: { ...fe.availableViews.month },
67
66
  year: { ...fe.availableViews.year },
68
67
  years: { ...fe.availableViews.years }
@@ -70,52 +69,52 @@ const fe = {
70
69
  const { cols: K, rows: ue } = fe.availableViews[H];
71
70
  return V[H] = { cols: U.cols || K, rows: U.rows || ue }, V;
72
71
  }, {})), l && console.warn("Vue Cal: the provided `views` prop contains invalid views that will be ignored."), Object.keys(k).length || (console.warn("Vue Cal: No valid view in the provided `views` prop. Falling back to default views."), k = { ...fe.availableViews })) : k = { ...fe.availableViews }, k);
73
- }), G = T(() => s.datePicker ? "month" : W.value.week ? "week" : Object.keys(W.value)[0]), i = T(() => {
74
- if (typeof s.selectedDate == "string") return g.stringToDate(s.selectedDate);
75
- if (s.selectedDate instanceof Date) return s.selectedDate;
76
- s.selectedDate ? console.warn("Vue Cal: The provided selected date is invalid:", s.selectedDate) : console.log("Vue Cal: Info - The provided selected date is undefined.");
72
+ }), G = T(() => n.datePicker ? "month" : W.value.week ? "week" : Object.keys(W.value)[0]), i = T(() => {
73
+ if (typeof n.selectedDate == "string") return g.stringToDate(n.selectedDate);
74
+ if (n.selectedDate instanceof Date) return n.selectedDate;
75
+ n.selectedDate ? console.warn("Vue Cal: The provided selected date is invalid:", n.selectedDate) : console.log("Vue Cal: Info - The provided selected date is undefined.");
77
76
  }), u = T(() => {
78
- if (!s.disableDays) return [];
79
- const n = [];
80
- return Array.isArray(s.disableDays) ? s.disableDays.forEach((l) => {
81
- let k = l;
82
- if (typeof l == "string" ? k = g.stringToDate(l) : l instanceof Date && (l = g.formatDate(l, "YYYY-MM-DD")), k instanceof Date && !isNaN(k.getTime())) {
83
- n.push(l);
84
- return;
85
- } else console.warn("Vue Cal: The provided `disableDays` prop contains an invalid date:", l);
86
- }) : console.warn("Vue Cal: The provided `disableDays` prop is invalid:", s.disableDays), n;
77
+ if (!n.disableDays) return [];
78
+ const s = [];
79
+ if (Array.isArray(n.disableDays))
80
+ for (let l of n.disableDays) {
81
+ let k = l;
82
+ typeof l == "string" ? k = g.stringToDate(l) : l instanceof Date && (l = g.formatDate(l, "YYYY-MM-DD")), k instanceof Date && !isNaN(k.getTime()) ? s.push(l) : console.warn("Vue Cal: The provided `disableDays` prop contains an invalid date:", l);
83
+ }
84
+ else console.warn("Vue Cal: The provided `disableDays` prop is invalid:", n.disableDays);
85
+ return s;
87
86
  }), e = T(() => {
88
- let n = null;
89
- return s.minDate && typeof s.minDate == "string" ? n = g.stringToDate(s.minDate) : s.minDate && s.minDate instanceof Date && (n = s.minDate), (n == null ? void 0 : n.getTime()) || null;
87
+ let s = null;
88
+ return n.minDate && typeof n.minDate == "string" ? s = g.stringToDate(n.minDate) : n.minDate && n.minDate instanceof Date && (s = n.minDate), (s == null ? void 0 : s.getTime()) || null;
90
89
  }), d = T(() => {
91
- let n = null;
92
- return s.maxDate && typeof s.maxDate == "string" ? n = g.stringToDate(s.maxDate) : s.maxDate && s.maxDate instanceof Date && (n = s.maxDate), (n == null ? void 0 : n.getTime()) || null;
90
+ let s = null;
91
+ return n.maxDate && typeof n.maxDate == "string" ? s = g.stringToDate(n.maxDate) : n.maxDate && n.maxDate instanceof Date && (s = n.maxDate), (s == null ? void 0 : s.getTime()) || null;
93
92
  }), h = T(() => {
94
93
  var k;
95
- const { view: n } = D;
96
- return s.schedules.length && (n.isDay || n.isDays || n.isWeek) && ((k = s.schedules) == null ? void 0 : k.map((t, V) => ({ ...t, id: t.id ?? V + 1 }))) || void 0;
97
- }), E = T(() => {
98
- const n = {
94
+ const { view: s } = D;
95
+ return n.schedules.length && (s.isDay || s.isDays || s.isWeek) && ((k = n.schedules) == null ? void 0 : k.map((t, V) => ({ ...t, id: t.id ?? V + 1 }))) || void 0;
96
+ }), Y = T(() => {
97
+ const s = {
99
98
  drag: !0,
100
99
  resize: !0,
101
100
  delete: !0,
102
101
  create: !0
103
102
  };
104
- return s.editableEvents === !0 ? n : s.editableEvents === !1 ? Object.keys(n).map((l) => n[l] = !1) : { ...n, ...s.editableEvents };
105
- }), P = async (n) => {
103
+ return n.editableEvents === !0 ? s : n.editableEvents === !1 ? Object.keys(s).map((l) => s[l] = !1) : { ...s, ...n.editableEvents };
104
+ }), P = async (s) => {
106
105
  var k;
107
106
  let l = /* @__PURE__ */ Object.assign({ "../i18n/ar.json": () => import("./i18n/ar.json").then((t) => t.default), "../i18n/bg.json": () => import("./i18n/bg.json").then((t) => t.default), "../i18n/bn.json": () => import("./i18n/bn.json").then((t) => t.default), "../i18n/bs.json": () => import("./i18n/bs.json").then((t) => t.default), "../i18n/ca.json": () => import("./i18n/ca.json").then((t) => t.default), "../i18n/cs.json": () => import("./i18n/cs.json").then((t) => t.default), "../i18n/da.json": () => import("./i18n/da.json").then((t) => t.default), "../i18n/de.json": () => import("./i18n/de.json").then((t) => t.default), "../i18n/el.json": () => import("./i18n/el.json").then((t) => t.default), "../i18n/en-gb.json": () => import("./i18n/en-gb.json").then((t) => t.default), "../i18n/en-us.json": () => import("./i18n/en-us.json").then((t) => t.default), "../i18n/es.json": () => import("./i18n/es.json").then((t) => t.default), "../i18n/et.json": () => import("./i18n/et.json").then((t) => t.default), "../i18n/fa.json": () => import("./i18n/fa.json").then((t) => t.default), "../i18n/fi.json": () => import("./i18n/fi.json").then((t) => t.default), "../i18n/fr.json": () => import("./i18n/fr.json").then((t) => t.default), "../i18n/he.json": () => import("./i18n/he.json").then((t) => t.default), "../i18n/hr.json": () => import("./i18n/hr.json").then((t) => t.default), "../i18n/hu.json": () => import("./i18n/hu.json").then((t) => t.default), "../i18n/id.json": () => import("./i18n/id.json").then((t) => t.default), "../i18n/is.json": () => import("./i18n/is.json").then((t) => t.default), "../i18n/it.json": () => import("./i18n/it.json").then((t) => t.default), "../i18n/ja.json": () => import("./i18n/ja.json").then((t) => t.default), "../i18n/ka.json": () => import("./i18n/ka.json").then((t) => t.default), "../i18n/ko.json": () => import("./i18n/ko.json").then((t) => t.default), "../i18n/lt.json": () => import("./i18n/lt.json").then((t) => t.default), "../i18n/mn.json": () => import("./i18n/mn.json").then((t) => t.default), "../i18n/nl.json": () => import("./i18n/nl.json").then((t) => t.default), "../i18n/no.json": () => import("./i18n/no.json").then((t) => t.default), "../i18n/pl.json": () => import("./i18n/pl.json").then((t) => t.default), "../i18n/pt-br.json": () => import("./i18n/pt-br.json").then((t) => t.default), "../i18n/pt-pt.json": () => import("./i18n/pt-pt.json").then((t) => t.default), "../i18n/ro.json": () => import("./i18n/ro.json").then((t) => t.default), "../i18n/ru.json": () => import("./i18n/ru.json").then((t) => t.default), "../i18n/sk.json": () => import("./i18n/sk.json").then((t) => t.default), "../i18n/sl.json": () => import("./i18n/sl.json").then((t) => t.default), "../i18n/sq.json": () => import("./i18n/sq.json").then((t) => t.default), "../i18n/sr.json": () => import("./i18n/sr.json").then((t) => t.default), "../i18n/sv.json": () => import("./i18n/sv.json").then((t) => t.default), "../i18n/tr.json": () => import("./i18n/tr.json").then((t) => t.default), "../i18n/uk.json": () => import("./i18n/uk.json").then((t) => t.default), "../i18n/vi.json": () => import("./i18n/vi.json").then((t) => t.default), "../i18n/zh-cn.json": () => import("./i18n/zh-cn.json").then((t) => t.default), "../i18n/zh-hk.json": () => import("./i18n/zh-hk.json").then((t) => t.default) });
108
107
  {
109
- if (!l[`../i18n/${n}.json`]) {
110
- console.warn(`Vue Cal: the locale \`${n}\` does not exist. Falling back to \`en-us\`.`), n = "en-us";
108
+ if (!l[`../i18n/${s}.json`]) {
109
+ console.warn(`Vue Cal: the locale \`${s}\` does not exist. Falling back to \`en-us\`.`), s = "en-us";
111
110
  return;
112
111
  }
113
- l = await ((k = l[`../i18n/${n}.json`]) == null ? void 0 : k.call(l));
112
+ l = await ((k = l[`../i18n/${s}.json`]) == null ? void 0 : k.call(l));
114
113
  }
115
114
  D.texts = Object.assign(D.texts, Object.assign({ ...fe.texts }, l)), g.updateTexts(D.texts);
116
- }, A = $e(s.events || []);
117
- return me(() => s.events, (n) => A.splice(0, A.length, ...n)), me(() => s.locale, (n) => P(n || "en-us")), (s.locale || !D.texts.today) && P(s.locale || "en-us"), {
118
- ...rt(s),
115
+ }, A = $e(n.events || []);
116
+ return me(() => n.events, (s) => A.splice(0, A.length, ...s)), me(() => n.locale, (s) => P(s || "en-us")), (n.locale || !D.texts.today) && P(n.locale || "en-us"), {
117
+ ...rt(n),
119
118
  events: A,
120
119
  // All the events listeners for cells and events that the end user may have attached to vue-cal.
121
120
  eventListeners: o,
@@ -132,7 +131,7 @@ const fe = {
132
131
  maxTimestamp: d,
133
132
  schedules: h,
134
133
  selectedDate: i,
135
- editableEvents: E,
134
+ editableEvents: Y,
136
135
  view: b,
137
136
  // Getters.
138
137
  get hasHiddenDays() {
@@ -143,14 +142,14 @@ const fe = {
143
142
  },
144
143
  loadTexts: P
145
144
  };
146
- }, Ve = (D, s) => {
147
- const r = s.timeTo - s.timeFrom;
148
- return (D - s.timeFrom) * 100 / r;
149
- }, Pe = (D, s) => {
150
- const r = s.timeTo - s.timeFrom;
151
- return ~~(D * r / 100 + s.timeFrom);
152
- }, Je = (D, s) => {
153
- const r = s.clientHeight;
145
+ }, Ve = (D, n) => {
146
+ const r = n.timeTo - n.timeFrom;
147
+ return (D - n.timeFrom) * 100 / r;
148
+ }, Pe = (D, n) => {
149
+ const r = n.timeTo - n.timeFrom;
150
+ return ~~(D * r / 100 + n.timeFrom);
151
+ }, Je = (D, n) => {
152
+ const r = n.clientHeight;
154
153
  return D * 100 / r;
155
154
  }, Ae = $e({ id: null, date: null });
156
155
  let tt = !1, qe = !0;
@@ -160,18 +159,18 @@ const pe = $e({ el: null, cell: null, timeout: null }), be = $e({
160
159
  toVueCal: null
161
160
  });
162
161
  function ft(D) {
163
- const { config: s, view: r, eventsManager: g, emit: p, uid: b, dateUtils: L } = D, v = (e) => {
162
+ const { config: n, view: r, eventsManager: g, emit: p, uid: b, dateUtils: L } = D, v = (e) => {
164
163
  var l;
165
- const { timeStep: d, timeCellHeight: h, timeFrom: E } = s, P = (((l = e.touches) == null ? void 0 : l[0]) || e).clientY, { top: A } = e.currentTarget.getBoundingClientRect(), n = P - A - ~~e.dataTransfer.getData("cursor-grab-at");
166
- return Pe(Je(n, e.currentTarget), s);
164
+ const { timeStep: d, timeCellHeight: h, timeFrom: Y } = n, P = (((l = e.touches) == null ? void 0 : l[0]) || e).clientY, { top: A } = e.currentTarget.getBoundingClientRect(), s = P - A - ~~e.dataTransfer.getData("cursor-grab-at");
165
+ return Pe(Je(s, e.currentTarget), n);
167
166
  }, C = (e, d, h) => {
168
- const E = d.duration || o(d.start, d.end) || s.timeStep;
167
+ const Y = d.duration || o(d.start, d.end) || n.timeStep;
169
168
  let P = Math.max(v(e), 0);
170
- if (s.snapToInterval) {
171
- const k = P + s.snapToInterval / 2;
172
- P = k - k % s.snapToInterval;
169
+ if (n.snapToInterval) {
170
+ const k = P + n.snapToInterval / 2;
171
+ P = k - k % n.snapToInterval;
173
172
  }
174
- const A = new Date(new Date(h).setMinutes(P)), n = Math.min(P + E, 24 * 60), l = new Date(new Date(h).setMinutes(n));
173
+ const A = new Date(new Date(h).setMinutes(P)), s = Math.min(P + Y, 24 * 60), l = new Date(new Date(h).setMinutes(s));
175
174
  return { start: A, end: l };
176
175
  }, o = (e, d) => Math.round((d - e) / 6e4);
177
176
  return {
@@ -185,26 +184,26 @@ function ft(D) {
185
184
  return console.warn("Vue Cal: Failed to set drag data:", P), e.preventDefault();
186
185
  }
187
186
  be.eventId = d._.id, be.fromVueCal = b;
188
- const E = e.target.closest(".vuecal__event");
189
- E.classList.add("vuecal__event--dragging-ghost"), setTimeout(() => {
190
- E.classList.add("vuecal__event--dragging-original"), E.classList.remove("vuecal__event--dragging-ghost");
187
+ const Y = e.target.closest(".vuecal__event");
188
+ Y.classList.add("vuecal__event--dragging-ghost"), setTimeout(() => {
189
+ Y.classList.add("vuecal__event--dragging-original"), Y.classList.remove("vuecal__event--dragging-ghost");
191
190
  }, 0), tt = !1, Object.assign(Ae, { id: r.id, date: r.firstCellDate }), qe = !0, D.touch.isDraggingEvent = !0;
192
191
  },
193
192
  eventDragEnd: (e, d) => {
194
193
  be.eventId = null, e.target.closest(".vuecal__event").classList.remove("vuecal__event--dragging-original");
195
- const { fromVueCal: h, toVueCal: E } = be;
196
- E && h !== E && g.deleteEvent(d._.id, 3), be.fromVueCal = null, be.toVueCal = null, tt && qe && Ae.id && r.switchView(Ae.id, Ae.date, !0), D.touch.isDraggingEvent = !1;
194
+ const { fromVueCal: h, toVueCal: Y } = be;
195
+ Y && h !== Y && g.deleteEvent(d._.id, 3), be.fromVueCal = null, be.toVueCal = null, tt && qe && Ae.id && r.switchView(Ae.id, Ae.date, !0), D.touch.isDraggingEvent = !1;
197
196
  },
198
197
  cellDragEnter: (e, d) => {
199
- const { start: h } = d, E = e.currentTarget;
198
+ const { start: h } = d, Y = e.currentTarget;
200
199
  if (!e.currentTarget.contains(e.relatedTarget)) {
201
- if (E === pe.el || !E.className.includes("vuecal__cell-content")) return !1;
202
- pe.el && (pe.cell.highlighted = !1), Object.assign(pe, { el: E, cell: d, timeout: clearTimeout(pe.timeout) }), d.highlighted = !0, ["years", "year", "month"].includes(r.id) && (pe.timeout = setTimeout(() => D.switchToNarrowerView(h), 2e3));
200
+ if (Y === pe.el || !Y.className.includes("vuecal__cell-content")) return !1;
201
+ pe.el && (pe.cell.highlighted = !1), Object.assign(pe, { el: Y, cell: d, timeout: clearTimeout(pe.timeout) }), d.highlighted = !0, ["years", "year", "month"].includes(r.id) && (pe.timeout = setTimeout(() => D.switchToNarrowerView(h), 2e3));
203
202
  }
204
203
  },
205
204
  cellDragOver: (e, d) => {
206
- const { start: h, schedule: E } = d;
207
- e.preventDefault(), d.highlighted = !0, (E || E === 0) && (d.highlightedSchedule = E);
205
+ const { start: h, schedule: Y } = d;
206
+ e.preventDefault(), d.highlighted = !0, (Y || Y === 0) && (d.highlightedSchedule = Y);
208
207
  },
209
208
  cellDragLeave: (e, d) => {
210
209
  e.preventDefault(), !e.currentTarget.contains(e.relatedTarget) && (d.highlightedSchedule = !1, pe.cell === d && (clearTimeout(pe.timeout), Object.assign(pe, { el: null, cell: null, timeout: null }), d.highlighted = !1));
@@ -214,48 +213,48 @@ function ft(D) {
214
213
  e.preventDefault(), clearTimeout(pe.timeout), Object.assign(pe, { el: null, cell: null, timeout: null });
215
214
  const h = JSON.parse(e.dataTransfer.getData("event") || "{}");
216
215
  h.start && (h.start = new Date(h.start)), h.end && (h.end = new Date(h.end));
217
- let E;
218
- const { start: P, end: A } = C(e, h, d.start), { schedule: n } = ((V = e.target.closest("[data-schedule]")) == null ? void 0 : V.dataset) || {};
216
+ let Y;
217
+ const { start: P, end: A } = C(e, h, d.start), { schedule: s } = ((V = e.target.closest("[data-schedule]")) == null ? void 0 : V.dataset) || {};
219
218
  let l = () => {
220
219
  };
221
- be.fromVueCal === b ? (E = g.getEvent(h._.id), E && (E._.dragging = !1, l = () => {
222
- E.start = P, E.end = A, n !== void 0 && (E.schedule = ~~n);
223
- })) : (E = {
220
+ be.fromVueCal === b ? (Y = g.getEvent(h._.id), Y && (Y._.dragging = !1, l = () => {
221
+ Y.start = P, Y.end = A, s !== void 0 && (Y.schedule = ~~s);
222
+ })) : (Y = {
224
223
  ...h,
225
224
  start: P,
226
225
  end: A,
227
- ...n !== void 0 && { schedule: ~~n },
226
+ ...s !== void 0 && { schedule: ~~s },
228
227
  _: { id: ((H = h._) == null ? void 0 : H.id) || h.id, duration: o(P, A) },
229
228
  getOverlappingEvents: () => g.getEventsInRange(
230
229
  g.getEventsByDate(L.formatDate(P), !0),
231
230
  { start: P, end: A },
232
- { schedule: ~~n }
231
+ { schedule: ~~s }
233
232
  )
234
233
  }, l = () => {
235
- E = g.createEvent(E);
234
+ Y = g.createEvent(Y);
236
235
  });
237
236
  let k = !0;
238
- const { drop: t } = (U = s.eventListeners) == null ? void 0 : U.event;
237
+ const { drop: t } = (U = n.eventListeners) == null ? void 0 : U.event;
239
238
  t && (k = await t({
240
239
  e,
241
- event: { ...E, start: P, end: A, schedule: ~~n },
242
- overlaps: E.getOverlappingEvents({ start: P, end: A, schedule: ~~n }),
240
+ event: { ...Y, start: P, end: A, schedule: ~~s },
241
+ overlaps: Y.getOverlappingEvents({ start: P, end: A, schedule: ~~s }),
243
242
  cell: d,
244
243
  external: be.fromVueCal !== b
245
244
  })), k !== !1 && l(), d.highlighted = !1, d.highlightedSchedule = null, qe = !1, be.toVueCal = b, p("event-dropped", {
246
245
  e,
247
246
  cell: d,
248
- event: E,
247
+ event: Y,
249
248
  originalEvent: h,
250
249
  external: be.fromVueCal !== b
251
250
  });
252
251
  }
253
252
  };
254
253
  }
255
- const nt = (D, s) => {
254
+ const st = (D, n) => {
256
255
  let r, g, p, b = {}, L = {};
257
256
  const v = ie(D), C = () => {
258
- v.value.today || (v.value = s), Date.prototype.addDays = function(a) {
257
+ v.value.today || (v.value = n), Date.prototype.addDays = function(a) {
259
258
  return W(this, a || 0);
260
259
  }, Date.prototype.subtractDays = function(a) {
261
260
  return G(this, a || 0);
@@ -268,7 +267,7 @@ const nt = (D, s) => {
268
267
  }, Date.prototype.subtractMinutes = function(a) {
269
268
  return d(this, a || 0);
270
269
  }, Date.prototype.getWeek = function() {
271
- return E(this);
270
+ return Y(this);
272
271
  }, Date.prototype.isToday = function() {
273
272
  return P(this);
274
273
  }, Date.prototype.isLeapYear = function() {
@@ -310,7 +309,7 @@ const nt = (D, s) => {
310
309
  let B = y(a.getMinutes());
311
310
  B >= 60 && (a.setHours(a.getHours() + 1), B = 0), a.setMinutes(B, 0, 0);
312
311
  }
313
- }, E = (a, _ = !1) => {
312
+ }, Y = (a, _ = !1) => {
314
313
  const y = new Date(Date.UTC(a.getFullYear(), a.getMonth(), a.getDate())), B = y.getUTCDay() || 7;
315
314
  y.setUTCDate(y.getUTCDate() + 4 - B);
316
315
  const Q = new Date(Date.UTC(y.getUTCFullYear(), 0, 1));
@@ -321,7 +320,7 @@ const nt = (D, s) => {
321
320
  if (!K(_)) return console.warn(`Vue Cal: invalid date2 provided for comparison with \`isSameDate(date1, date2)\`: \`${_}\`.`);
322
321
  } else return console.warn(`Vue Cal: invalid date1 provided for comparison with \`isSameDate(date1, date2)\`: \`${a}\`.`);
323
322
  return a.getFullYear() === _.getFullYear() && a.getMonth() === _.getMonth() && a.getDate() === _.getDate();
324
- }, n = (a, _, y) => K(a) ? a.getTime() >= _ && a.getTime() <= y : console.warn(`Vue Cal: invalid date provided to \`isInRange(date, rangeStart, rangeEnd)\`: \`${a}\`.`), l = (a) => {
323
+ }, s = (a, _, y) => K(a) ? a.getTime() >= _ && a.getTime() <= y : console.warn(`Vue Cal: invalid date provided to \`isInRange(date, rangeStart, rangeEnd)\`: \`${a}\`.`), l = (a) => {
325
324
  const _ = a.getFullYear();
326
325
  return !(_ % 400) || _ % 100 && !(_ % 4);
327
326
  }, k = (a = null, _) => {
@@ -463,10 +462,10 @@ const nt = (D, s) => {
463
462
  addMinutes: e,
464
463
  subtractMinutes: d,
465
464
  snapToInterval: h,
466
- getWeek: E,
465
+ getWeek: Y,
467
466
  isToday: P,
468
467
  isSameDate: A,
469
- isInRange: n,
468
+ isInRange: s,
470
469
  isLeapYear: l,
471
470
  getPreviousFirstDayOfWeek: k,
472
471
  stringToDate: t,
@@ -481,7 +480,7 @@ const nt = (D, s) => {
481
480
  formatMinutes: q
482
481
  };
483
482
  }, gt = (D) => {
484
- const { dateUtils: s, config: r } = D;
483
+ const { dateUtils: n, config: r } = D;
485
484
  let g = 0;
486
485
  const p = T(() => {
487
486
  const i = {
@@ -493,12 +492,12 @@ const nt = (D, s) => {
493
492
  // An array of events IDs that are multiday.
494
493
  byId: {}
495
494
  // A map of all the events indexed by ID for fast lookup.
496
- };
497
- return r.events.sort((e, d) => e.start - d.start < 0 ? -1 : 1).forEach((e) => {
495
+ }, u = r.events.sort((e, d) => e.start - d.start < 0 ? -1 : 1);
496
+ for (const e of u)
498
497
  b(e), e._ || (e._ = {}), e._.id = e._.id || ++g, e.delete || (e.delete = (d) => m(e._.id, d)), e._.deleting = !1, e._.deleted = !1, e.isOverlapping = (d = null) => e.getOverlappingEvents(d).length, e.getOverlappingEvents = (d = null) => {
499
498
  var h;
500
499
  return W(
501
- v(s.formatDate((d == null ? void 0 : d.start) || e.start), !0),
500
+ v(n.formatDate((d == null ? void 0 : d.start) || e.start), !0),
502
501
  { start: (d == null ? void 0 : d.start) || e.start, end: (d == null ? void 0 : d.end) || e.end },
503
502
  { excludeIds: [e._.id], schedule: (h = r.schedules) != null && h.length ? ~~((d == null ? void 0 : d.schedule) || e.schedule) : null }
504
503
  );
@@ -507,13 +506,13 @@ const nt = (D, s) => {
507
506
  }, e._.unregister = () => {
508
507
  e._.$el = null, e._.register = null, e.isOverlapping = null, e.getOverlappingEvents = null, e.delete = null;
509
508
  }, i.byId[e._.id] = e, e.recurring ? i.recurring.push(e._.id) : e._.multiday ? (i.multiday.push(e._.id), i.byDate[e._.startFormatted] || (i.byDate[e._.startFormatted] = []), i.byDate[e._.startFormatted].push(e._.id)) : (i.byDate[e._.startFormatted] || (i.byDate[e._.startFormatted] = []), i.byDate[e._.startFormatted].push(e._.id));
510
- }), i;
509
+ return i;
511
510
  }), b = (i) => {
512
- if (typeof i.start == "string" && (i.start = s.stringToDate(i.start)), typeof i.end == "string" && (i.end = s.stringToDate(i.end)), i.start.setSeconds(0, 0), i.end.setSeconds(0, 0), isNaN(i.start) || isNaN(i.end)) {
511
+ if (typeof i.start == "string" && (i.start = n.stringToDate(i.start)), typeof i.end == "string" && (i.end = n.stringToDate(i.end)), i.start.setSeconds(0, 0), i.end.setSeconds(0, 0), isNaN(i.start) || isNaN(i.end)) {
513
512
  isNaN(i.start) ? console.error(`Vue Cal: invalid start date for event "${i.title}".`, i.start) : console.error(`Vue Cal: invalid end date for event "${i.title}".`, i.end);
514
513
  return;
515
514
  } else i.end.getTime() < i.start.getTime() && console.error(`Vue Cal: invalid event dates for event "${i.title}". The event ends before it starts.`, i.start, i.end);
516
- i._ || (i._ = {}), i._.multiday = !s.isSameDate(i.start, new Date(i.end.getTime() - 1)), i._.startFormatted = s.formatDate(i.start), i._.startMinutes = ~~s.dateToMinutes(i.start), i._.endMinutes = ~~s.dateToMinutes(i.end);
515
+ i._ || (i._ = {}), i._.multiday = !n.isSameDate(i.start, new Date(i.end.getTime() - 1)), i._.startFormatted = n.formatDate(i.start), i._.startMinutes = ~~n.dateToMinutes(i.start), i._.endMinutes = ~~n.dateToMinutes(i.end);
517
516
  const u = i.start.getHours(), e = i.start.getMinutes().toString().padStart(2, 0), d = i.end.getHours(), h = i.end.getMinutes().toString().padStart(2, 0);
518
517
  i._.startTimeFormatted24 = `${u.toString().padStart(2, 0)}:${e}`, i._.startTimeFormatted12 = `${u % 12 || 12}${e ? `:${e}` : ""} ${u < 12 ? "AM" : "PM"}`, i._.endTimeFormatted24 = `${d.toString().padStart(2, 0)}:${h}`, i._.endTimeFormatted12 = `${d % 12 || 12}${h ? `:${h}` : ""} ${d < 12 ? "AM" : "PM"}`, i._.duration = Math.abs(~~((i.end - i.start) / 6e4));
519
518
  }, L = (i) => p.value.byId[i], v = (i, u = !1, e = !1) => {
@@ -521,23 +520,24 @@ const nt = (D, s) => {
521
520
  return d = u || e ? d.map(L) : d, e || (d = d.filter((h) => !h.background), u || (d = d.map((h) => h._.id))), d;
522
521
  }, C = (i) => {
523
522
  const u = {};
524
- return i.forEach(({ startFormatted: e }) => {
523
+ for (const { startFormatted: e } of i) {
525
524
  u[e] = [];
526
525
  const d = v(e, !1, !0);
527
526
  d.length && u[e].push(...d);
528
- }), u;
527
+ }
528
+ return u;
529
529
  }, o = (i) => {
530
530
  if (!i.start || !i.end) {
531
531
  console.error("Vue Cal: Cannot create an event without valid start and end dates.");
532
532
  return;
533
533
  }
534
- return r.snapToInterval && (s.snapToInterval(i.start, r.snapToInterval), s.snapToInterval(i.end, r.snapToInterval)), i = { ...i }, i._ || (i._ = {}), i._.id = ++g, i._.fireCreated = !0, r.events.push(i), i;
534
+ return r.snapToInterval && (n.snapToInterval(i.start, r.snapToInterval), n.snapToInterval(i.end, r.snapToInterval)), i = { ...i }, i._ || (i._ = {}), i._.id = ++g, i._.fireCreated = !0, r.events.push(i), i;
535
535
  }, m = (i, u = 0) => {
536
536
  var h;
537
537
  if (!r.editableEvents.delete)
538
538
  return console.info("Vue Cal: Event deletion is disabled. Enable it with the `editable-events` props.");
539
539
  if (!i) return console.warn("Vue Cal: Cannot delete event without its ID.");
540
- const e = r.events.findIndex((E) => E._.id === i);
540
+ const e = r.events.findIndex((Y) => Y._.id === i);
541
541
  if (e === -1) return console.warn(`Vue Cal: Cannot delete unknown event \`${i}\`.`);
542
542
  const d = r.events[e];
543
543
  if (d.deletable === !1) return console.warn(`Vue Cal: Can't delete event \`${i}\` since it was explicitely set to \`delete: false\`.`);
@@ -564,20 +564,21 @@ const nt = (D, s) => {
564
564
  }, $ = (i) => {
565
565
  const u = v(i, !0);
566
566
  if (!u.length) return { cellOverlaps: {}, longestStreak: 0 };
567
- let e = {}, d = [], h = 0;
568
- u.sort((E, P) => E.start - P.start || E.end - E.start - (P.end - P.start));
569
- for (const E of u) {
570
- const P = E._.id;
571
- e[P] || (e[P] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), d = d.filter((t) => t.end > E.start);
567
+ const e = {};
568
+ let d = [], h = 0;
569
+ u.sort((Y, P) => Y.start - P.start || Y.end - Y.start - (P.end - P.start));
570
+ for (const Y of u) {
571
+ const P = Y._.id;
572
+ e[P] || (e[P] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), d = d.filter((t) => t.end > Y.start);
572
573
  let A = d.filter((t) => {
573
574
  var H;
574
- return (!((H = r.schedules) != null && H.length) || E.schedule === t.schedule) && t.start < E.end;
575
- }), n = new Set(A.map((t) => {
575
+ return (!((H = r.schedules) != null && H.length) || Y.schedule === t.schedule) && t.start < Y.end;
576
+ }), s = new Set(A.map((t) => {
576
577
  var V;
577
578
  return ((V = e[t._.id]) == null ? void 0 : V.position) ?? 0;
578
579
  })), l = 0;
579
- for (; n.has(l); ) l++;
580
- e[P].position = l, d.push(E);
580
+ for (; s.has(l); ) l++;
581
+ e[P].position = l, d.push(Y);
581
582
  let k = Math.max(1, ...A.map((t) => {
582
583
  var V;
583
584
  return ((V = e[t._.id]) == null ? void 0 : V.maxConcurrent) ?? 1;
@@ -587,17 +588,17 @@ const nt = (D, s) => {
587
588
  e[t._.id].overlaps.add(P), e[P].overlaps.add(t._.id), e[t._.id].maxConcurrent = e[P].maxConcurrent;
588
589
  h = Math.max(h, e[P].maxConcurrent);
589
590
  }
590
- for (const E in e) e[E].overlaps = [...e[E].overlaps];
591
+ for (const Y in e) e[Y].overlaps = [...e[Y].overlaps];
591
592
  return { cellOverlaps: e, longestStreak: h };
592
593
  }, W = (i = [], { start: u, end: e }, { excludeIds: d = [], schedule: h = null }) => {
593
594
  var A;
594
- const E = new Set(d), P = [];
595
- for (const n of i)
596
- !E.has((A = n._) == null ? void 0 : A.id) && (h === null || h === n.schedule) && G(n, u, e) && P.push(n);
595
+ const Y = new Set(d), P = [];
596
+ for (const s of i)
597
+ !Y.has((A = s._) == null ? void 0 : A.id) && (h === null || h === s.schedule) && G(s, u, e) && P.push(s);
597
598
  return P;
598
599
  }, G = (i, u, e) => {
599
- const d = i.allDay || !r.time, h = d ? new Date(i.start).setHours(0, 0, 0, 0) : i.start.getTime(), E = d ? new Date(i.end).setHours(23, 59, 59, 999) : i.end.getTime(), P = d ? new Date(u).setHours(0, 0, 0, 0) : u.getTime(), A = d ? new Date(e).setHours(23, 59, 59, 999) : e.getTime();
600
- return E > P && h < A;
600
+ const d = i.allDay || !r.time, h = d ? new Date(i.start).setHours(0, 0, 0, 0) : i.start.getTime(), Y = d ? new Date(i.end).setHours(23, 59, 59, 999) : i.end.getTime(), P = d ? new Date(u).setHours(0, 0, 0, 0) : u.getTime(), A = d ? new Date(e).setHours(23, 59, 59, 999) : e.getTime();
601
+ return Y > P && h < A;
601
602
  };
602
603
  return {
603
604
  events: p,
@@ -610,19 +611,17 @@ const nt = (D, s) => {
610
611
  deleteEvent: m,
611
612
  isEventInRange: G
612
613
  };
613
- }, ht = ({ config: D, dateUtils: s, emit: r, texts: g, eventsManager: p }, b) => {
614
- const { availableViews: L } = D, v = ie(D.view && L[D.view] ? D.view : D.defaultView), C = ie(D.selectedDate || null);
615
- let o = ie(/* @__PURE__ */ new Date());
616
- const m = ie(new Date(D.viewDate || o.value));
614
+ }, ht = ({ config: D, dateUtils: n, emit: r, texts: g, eventsManager: p }, b) => {
615
+ const { availableViews: L } = D, v = ie(D.view && L[D.view] ? D.view : D.defaultView), C = ie(D.selectedDate || null), o = ie(/* @__PURE__ */ new Date()), m = ie(new Date(D.viewDate || o.value));
617
616
  m.value.setHours(0, 0, 0, 0);
618
617
  const $ = ie(new Date(m));
619
618
  let W = null;
620
- const G = T(() => v.value === "month" ? $.value : l.value), i = T(() => v.value === "month" ? new Date($.value.getFullYear(), $.value.getMonth() + 1, 0, 23, 59, 59, 999) : t.value), u = T(() => v.value === "week" ? s.getPreviousFirstDayOfWeek(l.value, D.startWeekOnSunday) : v.value === "month" ? l.value : G.value), e = T(() => {
619
+ const G = T(() => v.value === "month" ? $.value : l.value), i = T(() => v.value === "month" ? new Date($.value.getFullYear(), $.value.getMonth() + 1, 0, 23, 59, 59, 999) : t.value), u = T(() => v.value === "week" ? n.getPreviousFirstDayOfWeek(l.value, D.startWeekOnSunday) : v.value === "month" ? l.value : G.value), e = T(() => {
621
620
  if (v.value === "week") {
622
- const f = s.addDays(u.value, 7);
621
+ const f = n.addDays(u.value, 7);
623
622
  return f.setMilliseconds(-1), f;
624
- } else if (v.value === "month") return t.value;
625
- return i.value;
623
+ }
624
+ return v.value === "month" ? t.value : i.value;
626
625
  }), d = T(() => {
627
626
  const f = o.value.getTime();
628
627
  if (v.value === "week")
@@ -633,7 +632,7 @@ const nt = (D, s) => {
633
632
  function h() {
634
633
  o.value = /* @__PURE__ */ new Date(), W = setTimeout(h, 60 * 1e3);
635
634
  }
636
- function E() {
635
+ function Y() {
637
636
  W = setTimeout(h, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), h();
638
637
  }
639
638
  const P = T(() => {
@@ -643,31 +642,33 @@ const nt = (D, s) => {
643
642
  }), A = T(() => {
644
643
  var f;
645
644
  return ((f = D.availableViews[v.value]) == null ? void 0 : f.rows) || 1;
646
- }), n = T(() => P.value * A.value), l = T(() => {
645
+ }), s = T(() => P.value * A.value), l = T(() => {
647
646
  if (v.value === "month") {
648
647
  let f = $.value.getDay() || 7;
649
- return D.startWeekOnSunday && !D.hideWeekdays[7] && (f += 1), D.viewDayOffset && (f -= D.viewDayOffset), s.subtractDays($.value, f - 1);
650
- } else if (v.value === "week") {
648
+ return D.startWeekOnSunday && !D.hideWeekdays[7] && (f += 1), D.viewDayOffset && (f -= D.viewDayOffset), n.subtractDays($.value, f - 1);
649
+ }
650
+ if (v.value === "week") {
651
651
  const f = "1234567".split("").filter((R) => !Object.keys(D.hideWeekdays).includes(R));
652
652
  let z = Math.min(...f);
653
- return D.startWeekOnSunday && !D.hideWeekdays[7] && (z = 1), D.viewDayOffset && (z += D.viewDayOffset), s.addDays($.value, z - 1);
654
- } else return $.value;
653
+ return D.startWeekOnSunday && !D.hideWeekdays[7] && (z = 1), D.viewDayOffset && (z += D.viewDayOffset), n.addDays($.value, z - 1);
654
+ }
655
+ return $.value;
655
656
  }), k = T(() => {
656
657
  const f = [], z = ["days", "week", "month"].includes(v.value);
657
658
  let R = 0;
658
- for (let X = 0; X < n.value + R; X++)
659
+ for (let X = 0; X < s.value + R; X++)
659
660
  switch (v.value) {
660
661
  case "day":
661
662
  case "days":
662
663
  case "week":
663
664
  case "month": {
664
- const ve = s.addDays(l.value, X), We = ve.getDay() || 7;
665
+ const ve = n.addDays(l.value, X), We = ve.getDay() || 7;
665
666
  if (z && D.hasHiddenDays && D.hideWeekdays[We]) {
666
667
  R++;
667
668
  continue;
668
669
  }
669
670
  const Ce = new Date(ve);
670
- Ce.setHours(23, 59, 59, 999), f.push({ start: ve, startFormatted: s.formatDate(ve), end: Ce });
671
+ Ce.setHours(23, 59, 59, 999), f.push({ start: ve, startFormatted: n.formatDate(ve), end: Ce });
671
672
  break;
672
673
  }
673
674
  case "year":
@@ -697,25 +698,25 @@ const nt = (D, s) => {
697
698
  return R && typeof X == "string" ? X.substring(0, 3) : X;
698
699
  }
699
700
  function ue(f, z, R) {
700
- const { monthsArray: X, monthBeforeDay: ve, canTruncate: We, xs: Ce } = R, Me = f.getMonth(), Ee = f.getFullYear(), Ye = z.getMonth(), He = z.getFullYear(), Be = Me !== Ye, lt = Ee !== He, ke = We && (Ce || Be), Le = f.getDate(), ze = z.getDate();
701
- return lt ? ve ? `${K(Me, X, ke)} ${Le}, ${Ee} - ${K(Ye, X, ke)} ${ze}, ${He}` : `${Le} ${K(Me, X, ke)} ${Ee} - ${ze} ${K(Ye, X, ke)} ${He}` : Be ? ve ? `${K(Me, X, ke)} ${Le} - ${K(Ye, X, ke)} ${ze}, ${Ee}` : `${Le} ${K(Me, X, ke)} - ${ze} ${K(Ye, X, ke)} ${Ee}` : ve ? `${K(Me, X, ke)} ${Le}-${ze}, ${Ee}` : `${Le}-${ze} ${K(Me, X, ke)} ${Ee}`;
701
+ const { monthsArray: X, monthBeforeDay: ve, canTruncate: We, xs: Ce } = R, Me = f.getMonth(), Ye = f.getFullYear(), Ee = z.getMonth(), He = z.getFullYear(), Be = Me !== Ee, lt = Ye !== He, ke = We && (Ce || Be), Le = f.getDate(), ze = z.getDate();
702
+ return lt ? ve ? `${K(Me, X, ke)} ${Le}, ${Ye} - ${K(Ee, X, ke)} ${ze}, ${He}` : `${Le} ${K(Me, X, ke)} ${Ye} - ${ze} ${K(Ee, X, ke)} ${He}` : Be ? ve ? `${K(Me, X, ke)} ${Le} - ${K(Ee, X, ke)} ${ze}, ${Ye}` : `${Le} ${K(Me, X, ke)} - ${ze} ${K(Ee, X, ke)} ${Ye}` : ve ? `${K(Me, X, ke)} ${Le}-${ze}, ${Ye}` : `${Le}-${ze} ${K(Me, X, ke)} ${Ye}`;
702
703
  }
703
704
  const ae = T(() => {
704
- const { dateFormat: f, months: z, monthsGenitive: R, week: X, truncations: ve } = g, We = D.locale, Ce = ve !== !1, Me = f.indexOf("M") < f.indexOf("D"), Ee = R && We === "el" ? R : z;
705
+ const { dateFormat: f, months: z, monthsGenitive: R, week: X, truncations: ve } = g, We = D.locale, Ce = ve !== !1, Me = f.indexOf("M") < f.indexOf("D"), Ye = R && We === "el" ? R : z;
705
706
  switch (v.value) {
706
707
  case "day":
707
- return s.formatDate(l.value, f);
708
+ return n.formatDate(l.value, f);
708
709
  case "days":
709
710
  case "week": {
710
- const Ye = {
711
- monthsArray: Ee,
711
+ const Ee = {
712
+ monthsArray: Ye,
712
713
  monthBeforeDay: Me,
713
714
  canTruncate: Ce,
714
715
  xs: D.xs
715
716
  };
716
- let He = ue(l.value, t.value, Ye);
717
+ let He = ue(l.value, t.value, Ee);
717
718
  if (v.value === "week") {
718
- const Be = s.getWeek(
719
+ const Be = n.getWeek(
719
720
  l.value,
720
721
  D.startWeekOnSunday && !D.hideWeekdays[7]
721
722
  );
@@ -724,8 +725,8 @@ const nt = (D, s) => {
724
725
  return He;
725
726
  }
726
727
  case "month": {
727
- const Ye = `${D.xs && Ce ? "MMM" : "MMMM"} YYYY`;
728
- return s.formatDate(G.value, Ye);
728
+ const Ee = `${D.xs && Ce ? "MMM" : "MMMM"} YYYY`;
729
+ return n.formatDate(G.value, Ee);
729
730
  }
730
731
  case "year":
731
732
  return l.value.getFullYear();
@@ -740,7 +741,7 @@ const nt = (D, s) => {
740
741
  case "days":
741
742
  break;
742
743
  case "week":
743
- $.value = s.getPreviousFirstDayOfWeek($.value, D.startWeekOnSunday && !D.hideWeekdays[7]);
744
+ $.value = n.getPreviousFirstDayOfWeek($.value, D.startWeekOnSunday && !D.hideWeekdays[7]);
744
745
  break;
745
746
  case "month":
746
747
  $.value = new Date($.value.getFullYear(), $.value.getMonth(), 1, 0, 0, 0, 0);
@@ -749,7 +750,7 @@ const nt = (D, s) => {
749
750
  $.value = new Date($.value.getFullYear(), 0, 1, 0, 0, 0, 0);
750
751
  break;
751
752
  case "years":
752
- $.value = new Date($.value.getFullYear() - $.value.getFullYear() % n.value, 0, 1, 0, 0, 0, 0);
753
+ $.value = new Date($.value.getFullYear() - $.value.getFullYear() % s.value, 0, 1, 0, 0, 0, 0);
753
754
  break;
754
755
  }
755
756
  D.ready && r("view-change", {
@@ -789,10 +790,10 @@ const nt = (D, s) => {
789
790
  switch (v.value) {
790
791
  case "day":
791
792
  case "days":
792
- f ? z = s.addDays(t.value, 1) : z = s.subtractDays(l.value, n.value);
793
+ f ? z = n.addDays(t.value, 1) : z = n.subtractDays(l.value, s.value);
793
794
  break;
794
795
  case "week": {
795
- f ? (z = s.addDays(e.value, 1), z.setHours(0, 0, 0, 0)) : z = s.subtractDays(u.value, n.value);
796
+ f ? (z = n.addDays(e.value, 1), z.setHours(0, 0, 0, 0)) : z = n.subtractDays(u.value, s.value);
796
797
  break;
797
798
  }
798
799
  case "month": {
@@ -806,7 +807,7 @@ const nt = (D, s) => {
806
807
  break;
807
808
  }
808
809
  case "years": {
809
- const R = f ? n.value : -n.value;
810
+ const R = f ? s.value : -s.value;
810
811
  z = new Date(z.getFullYear() + R, 1, 1, 0, 0, 0, 0);
811
812
  break;
812
813
  }
@@ -818,22 +819,20 @@ const nt = (D, s) => {
818
819
  f.setHours(0, 0, 0, 0), B(f);
819
820
  }
820
821
  function B(f, z = !0, R = !1) {
821
- if (!s.isValid(f)) return console.warn("Vue Cal: can't navigate to the given date: invalid date provided to `updateViewDate(date)`.");
822
+ if (!n.isValid(f)) return console.warn("Vue Cal: can't navigate to the given date: invalid date provided to `updateViewDate(date)`.");
822
823
  let [X, ve] = [l.value, t.value];
823
- v.value === "month" && ([X, ve] = [G.value, i.value]), (!s.isInRange(f, X, ve) || R) && (f.setHours(0, 0, 0, 0), V.value = f.getTime() < X.getTime() ? "left" : "right", m.value = f, z && r("update:viewDate", f), re());
824
+ v.value === "month" && ([X, ve] = [G.value, i.value]), (!n.isInRange(f, X, ve) || R) && (f.setHours(0, 0, 0, 0), V.value = f.getTime() < X.getTime() ? "left" : "right", m.value = f, z && r("update:viewDate", f), re());
824
825
  }
825
826
  function Q(f, z = !0) {
826
- if (s.isValid(f)) {
827
- const { isValid: R, isSameDate: X } = s;
828
- (!C.value || !R(C.value) || !X(f, C.value)) && (f.setHours(0, 0, 0, 0), C.value = f, z && r("update:selectedDate", f));
829
- } else
830
- return console.warn("Vue Cal: can't update the selected date: invalid date provided to `updateSelectedDate(date)`.");
827
+ if (!n.isValid(f)) return console.warn("Vue Cal: can't update the selected date: invalid date provided to `updateSelectedDate(date)`.");
828
+ const { isValid: R, isSameDate: X } = n;
829
+ (!C.value || !R(C.value) || !X(f, C.value)) && (f.setHours(0, 0, 0, 0), C.value = f, z && r("update:selectedDate", f));
831
830
  }
832
831
  function c(f) {
833
- !f && !$.value.getDay() ? B(s.addDays($.value, 1), !0, !0) : (V.value = "left", re());
832
+ !f && !$.value.getDay() ? B(n.addDays($.value, 1), !0, !0) : (V.value = "left", re());
834
833
  }
835
834
  function w(f) {
836
- f && D.startWeekOnSunday && !$.value.getDay() ? B(s.addDays($.value, 1), !0, !0) : !f && D.startWeekOnSunday && $.value.getDay() === 1 && B(s.subtractDays($.value, 1), !0, !0);
835
+ f && D.startWeekOnSunday && !$.value.getDay() ? B(n.addDays($.value, 1), !0, !0) : !f && D.startWeekOnSunday && $.value.getDay() === 1 && B(n.subtractDays($.value, 1), !0, !0);
837
836
  }
838
837
  function S() {
839
838
  console.log("toggling weekdays", D.hideWeekdays);
@@ -851,11 +850,11 @@ const nt = (D, s) => {
851
850
  M(0);
852
851
  }
853
852
  const x = T(() => p.getViewEvents(k.value)), de = p.createEvent, ye = p.deleteEvent;
854
- return me(() => D.view, (f) => q(f, !1)), me(() => D.availableViews, he), me(() => D.datePicker, () => q("month", !1)), me(() => D.viewDate, (f) => B(f, !1)), me(() => D.selectedDate, (f) => Q(f, !1)), me(() => D.startWeekOnSunday, (f) => c(f)), me(() => D.hideWeekends, (f) => w(f)), me(() => D.hideWeekdays, S), me(() => n.value, () => {
855
- n.value > 90 && console.warn("Vue Cal: high cell count detected. Performance may degrade when interactions are enabled.");
853
+ return me(() => D.view, (f) => q(f, !1)), me(() => D.availableViews, he), me(() => D.datePicker, () => q("month", !1)), me(() => D.viewDate, (f) => B(f, !1)), me(() => D.selectedDate, (f) => Q(f, !1)), me(() => D.startWeekOnSunday, (f) => c(f)), me(() => D.hideWeekends, (f) => w(f)), me(() => D.hideWeekdays, S), me(() => s.value, () => {
854
+ s.value > 90 && console.warn("Vue Cal: high cell count detected. Performance may degrade when interactions are enabled.");
856
855
  }), me(() => D.watchRealTime, (f) => {
857
- f && D.time ? E() : W = clearTimeout(W);
858
- }), re(), D.time && D.watchRealTime && E(), Xe(() => W = clearTimeout(W)), {
856
+ f && D.time ? Y() : W = clearTimeout(W);
857
+ }), re(), D.time && D.watchRealTime && Y(), Xe(() => W = clearTimeout(W)), {
859
858
  now: o,
860
859
  id: v,
861
860
  broaderView: H,
@@ -917,13 +916,13 @@ const nt = (D, s) => {
917
916
  }, Fe = $e({
918
917
  texts: { ...fe.texts },
919
918
  // Make texts reactive before a locale is loaded.
920
- dateUtils: nt(fe.texts, st)
919
+ dateUtils: st(fe.texts, nt)
921
920
  // Some Date utils functions need localized texts.
922
- }), yt = ({ props: D, emit: s, attrs: r, vuecalEl: g, uid: p }) => {
921
+ }), yt = ({ props: D, emit: n, attrs: r, vuecalEl: g, uid: p }) => {
923
922
  const b = $e({
924
923
  uid: p,
925
924
  // The Vuecal instance unique ID, used for dnd source-target identification.
926
- emit: s,
925
+ emit: n,
927
926
  texts: { ...Fe.texts },
928
927
  // Make texts reactive before a locale is loaded.
929
928
  // The date utils composable.
@@ -944,7 +943,7 @@ const nt = (D, s) => {
944
943
  isResizingEvent: !1
945
944
  }
946
945
  });
947
- return b.dateUtils = nt(Object.assign(fe.texts, b.texts), st), b.config = mt(b, D, r), b.eventsManager = gt(b), b.view = ht(b, g), b.dnd = ft(b), b;
946
+ return b.dateUtils = st(Object.assign(fe.texts, b.texts), nt), b.config = mt(b, D, r), b.eventsManager = gt(b), b.view = ht(b, g), b.dnd = ft(b), b;
948
947
  }, Dt = 24 * 60, pt = {
949
948
  allDayEvents: { type: [Boolean, String], default: !1 },
950
949
  // Coming soon.
@@ -1050,25 +1049,25 @@ const nt = (D, s) => {
1050
1049
  }, Tt = { class: "vuecal__transition-wrap" }, $t = ["disabled", "innerHTML"], Mt = {
1051
1050
  __name: "header",
1052
1051
  setup(D) {
1053
- const s = Ne("vuecal"), { view: r, config: g } = s, p = () => {
1052
+ const n = Ne("vuecal"), { view: r, config: g } = n, p = () => {
1054
1053
  g.clickToNavigate && r.broader();
1055
1054
  }, b = T(() => g.clickToNavigate ? { click: p } : {});
1056
- return (L, v) => (Y(), j("div", wt, [
1055
+ return (L, v) => (E(), j("div", wt, [
1057
1056
  F(L.$slots, "header", {
1058
1057
  view: O(r),
1059
1058
  availableViews: O(g).availableViews,
1060
- vuecal: O(s)
1059
+ vuecal: O(n)
1061
1060
  }),
1062
- L.$slots.header ? Z("", !0) : (Y(), j(te, { key: 0 }, [
1063
- O(g).viewsBar ? (Y(), j("div", _t, [
1064
- (Y(!0), j(te, null, we(O(g).availableViews, (C, o) => (Y(), j("button", {
1061
+ L.$slots.header ? Z("", !0) : (E(), j(te, { key: 0 }, [
1062
+ O(g).viewsBar ? (E(), j("div", _t, [
1063
+ (E(!0), j(te, null, we(O(g).availableViews, (C, o) => (E(), j("button", {
1065
1064
  class: _e(["vuecal__view-button", { "vuecal__view-button--active": O(r).id === o }]),
1066
1065
  onClick: (m) => O(r).switch(o),
1067
- innerHTML: O(s).texts[o],
1066
+ innerHTML: O(n).texts[o],
1068
1067
  type: "button"
1069
1068
  }, null, 10, kt))), 256))
1070
1069
  ])) : Z("", !0),
1071
- O(g).titleBar ? (Y(), j("nav", bt, [
1070
+ O(g).titleBar ? (E(), j("nav", bt, [
1072
1071
  ge("button", {
1073
1072
  class: _e(["vuecal__nav vuecal__nav--prev", { "vuecal__nav--default": !L.$slots["previous-button"] }]),
1074
1073
  onClick: v[0] || (v[0] = (...C) => O(r).previous && O(r).previous(...C)),
@@ -1081,18 +1080,18 @@ const nt = (D, s) => {
1081
1080
  name: `vuecal-slide-fade--${O(r).transitionDirection}`
1082
1081
  }, {
1083
1082
  default: J(() => [
1084
- (Y(), j("div", {
1083
+ (E(), j("div", {
1085
1084
  key: O(r).id + O(r).start.getTime()
1086
1085
  }, [
1087
- L.$slots.title ? (Y(), Se(Ke(O(g).clickToNavigate && O(r).broaderView ? "button" : "div"), De({
1086
+ L.$slots.title ? (E(), Se(Ke(O(g).clickToNavigate && O(r).broaderView ? "button" : "div"), De({
1088
1087
  key: 0,
1089
1088
  class: "vuecal__title"
1090
1089
  }, Ie(b.value)), {
1091
1090
  default: J(() => [
1092
- F(L.$slots, "title", se(ne(O(r))))
1091
+ F(L.$slots, "title", ne(se(O(r))))
1093
1092
  ]),
1094
1093
  _: 3
1095
- }, 16)) : (Y(), Se(Ke(O(g).clickToNavigate && O(r).broaderView ? "button" : "div"), De({
1094
+ }, 16)) : (E(), Se(Ke(O(g).clickToNavigate && O(r).broaderView ? "button" : "div"), De({
1096
1095
  key: 1,
1097
1096
  class: "vuecal__title"
1098
1097
  }, Ie(b.value), {
@@ -1103,18 +1102,18 @@ const nt = (D, s) => {
1103
1102
  _: 3
1104
1103
  }, 8, ["name"])
1105
1104
  ]),
1106
- O(g).todayButton ? (Y(), j(te, { key: 0 }, [
1105
+ O(g).todayButton ? (E(), j(te, { key: 0 }, [
1107
1106
  L.$slots["today-button"] ? F(L.$slots, "today-button", {
1108
1107
  key: 0,
1109
1108
  navigate: () => !O(r).containsToday && O(r).goToToday(),
1110
1109
  active: O(r).containsToday
1111
- }) : (Y(), j("button", {
1110
+ }) : (E(), j("button", {
1112
1111
  key: 1,
1113
1112
  class: _e(["vuecal__nav vuecal__nav--today vuecal__nav--default", { "vuecal__nav--active": O(r).containsToday }]),
1114
1113
  onClick: v[1] || (v[1] = (C) => !O(r).containsToday && O(r).goToToday()),
1115
1114
  disabled: !!O(r).containsToday,
1116
1115
  type: "button",
1117
- innerHTML: O(s).texts.today
1116
+ innerHTML: O(n).texts.today
1118
1117
  }, null, 10, $t))
1119
1118
  ], 64)) : Z("", !0),
1120
1119
  ge("button", {
@@ -1128,10 +1127,10 @@ const nt = (D, s) => {
1128
1127
  ], 64))
1129
1128
  ]));
1130
1129
  }
1131
- }, Et = {
1130
+ }, Yt = {
1132
1131
  key: 0,
1133
1132
  class: "vuecal__headings"
1134
- }, Yt = {
1133
+ }, Et = {
1135
1134
  key: 0,
1136
1135
  class: "vuecal__weekdays-headings"
1137
1136
  }, St = ["onClick"], Ct = { class: "vuecal__weekday-day" }, Vt = {
@@ -1143,7 +1142,7 @@ const nt = (D, s) => {
1143
1142
  }, jt = ["innerHTML"], Pt = {
1144
1143
  __name: "headings-bar",
1145
1144
  setup(D) {
1146
- const s = Ne("vuecal"), { view: r, config: g, dateUtils: p } = s, b = T(() => g.xs ? "day-xs" : g.sm || r.isDays || r.isMonth ? "day-sm" : "day"), L = T(() => (r.isDay || r.isDays || r.isWeek || r.isMonth) && !(r.isDay && !g.schedules)), v = T(() => r.cellDates.slice(0, r.cols).map(({ start: o }) => ({
1145
+ const n = Ne("vuecal"), { view: r, config: g, dateUtils: p } = n, b = T(() => g.xs ? "day-xs" : g.sm || r.isDays || r.isMonth ? "day-sm" : "day"), L = T(() => (r.isDay || r.isDays || r.isWeek || r.isMonth) && !(r.isDay && !g.schedules)), v = T(() => r.cellDates.slice(0, r.cols).map(({ start: o }) => ({
1147
1146
  id: Re[o.getDay()],
1148
1147
  date: o,
1149
1148
  dateNumber: o.getDate(),
@@ -1156,9 +1155,9 @@ const nt = (D, s) => {
1156
1155
  (r.isDays || r.isWeek) && r.updateSelectedDate(o);
1157
1156
  }
1158
1157
  };
1159
- return (o, m) => L.value ? (Y(), j("div", Et, [
1160
- O(r).isDay ? Z("", !0) : (Y(), j("div", Yt, [
1161
- (Y(!0), j(te, null, we(v.value, ($, W) => (Y(), j("div", {
1158
+ return (o, m) => L.value ? (E(), j("div", Yt, [
1159
+ O(r).isDay ? Z("", !0) : (E(), j("div", Et, [
1160
+ (E(!0), j(te, null, we(v.value, ($, W) => (E(), j("div", {
1162
1161
  class: _e(["vuecal__weekday", { "vuecal__weekday--today": $.isToday }]),
1163
1162
  key: W,
1164
1163
  onClick: (G) => C.click($.date)
@@ -1169,14 +1168,14 @@ const nt = (D, s) => {
1169
1168
  date: $.date
1170
1169
  }, () => [
1171
1170
  ge("span", Ct, le($[b.value]), 1),
1172
- O(r).isMonth ? Z("", !0) : (Y(), j("strong", Vt, le($.dateNumber), 1))
1171
+ O(r).isMonth ? Z("", !0) : (E(), j("strong", Vt, le($.dateNumber), 1))
1173
1172
  ])
1174
1173
  ], 10, St))), 128))
1175
1174
  ])),
1176
- O(g).schedules ? (Y(), j("div", Ot, [
1177
- (Y(!0), j(te, null, we(v.value, ($, W) => (Y(), j(te, { key: W }, [
1178
- (Y(!0), j(te, null, we(O(g).schedules, (G, i) => (Y(), j(te, { key: i }, [
1179
- o.$slots["schedule-heading"] ? (Y(), j("div", {
1175
+ O(g).schedules ? (E(), j("div", Ot, [
1176
+ (E(!0), j(te, null, we(v.value, ($, W) => (E(), j(te, { key: W }, [
1177
+ (E(!0), j(te, null, we(O(g).schedules, (G, i) => (E(), j(te, { key: i }, [
1178
+ o.$slots["schedule-heading"] ? (E(), j("div", {
1180
1179
  key: 0,
1181
1180
  class: _e(["vuecal__schedule vuecal__schedule--heading", G.class])
1182
1181
  }, [
@@ -1184,7 +1183,7 @@ const nt = (D, s) => {
1184
1183
  schedule: G,
1185
1184
  view: O(r)
1186
1185
  })
1187
- ], 2)) : (Y(), j("div", {
1186
+ ], 2)) : (E(), j("div", {
1188
1187
  key: 1,
1189
1188
  class: _e(["vuecal__schedule vuecal__schedule--heading", G.class]),
1190
1189
  innerHTML: G.label
@@ -1197,7 +1196,7 @@ const nt = (D, s) => {
1197
1196
  }, Ht = { class: "vuecal__time-column" }, Lt = {
1198
1197
  __name: "time-column",
1199
1198
  setup(D) {
1200
- const s = Ne("vuecal"), { config: r, texts: g } = s, p = T(() => {
1199
+ const n = Ne("vuecal"), { config: r, texts: g } = n, p = T(() => {
1201
1200
  const b = [];
1202
1201
  for (let v = r.timeFrom; v < r.timeTo; v += r.timeStep) {
1203
1202
  const C = ~~(v / 60), o = v % 60, m = g[v < 720 ? "am" : "pm"];
@@ -1212,8 +1211,8 @@ const nt = (D, s) => {
1212
1211
  }
1213
1212
  return b;
1214
1213
  });
1215
- return (b, L) => (Y(), j("div", Ht, [
1216
- (Y(!0), j(te, null, we(p.value, (v, C) => (Y(), j("div", {
1214
+ return (b, L) => (E(), j("div", Ht, [
1215
+ (E(!0), j(te, null, we(p.value, (v, C) => (E(), j("div", {
1217
1216
  class: "vuecal__time-cell",
1218
1217
  key: C
1219
1218
  }, [
@@ -1239,7 +1238,7 @@ const nt = (D, s) => {
1239
1238
  event: { type: Object, required: !0 }
1240
1239
  },
1241
1240
  emits: ["event-drag-start", "event-drag-end", "event-resize-start", "event-resize-end"],
1242
- setup(D, { emit: s }) {
1241
+ setup(D, { emit: n }) {
1243
1242
  const { config: r, view: g, dnd: p, touch: b, dateUtils: L } = Ne("vuecal"), v = D, C = ie(null), o = $e(v.event), m = $e({
1244
1243
  dragging: !1,
1245
1244
  resizing: !1,
@@ -1277,13 +1276,13 @@ const nt = (D, s) => {
1277
1276
  }), $ = T(() => r.editableEvents.drag && o.draggable !== !1 && !o.background), W = T(() => r.time && r.editableEvents.resize && o.resizable !== !1 && !o.background);
1278
1277
  T(() => r.editableEvents.delete && o.deletable !== !1 && !o.background);
1279
1278
  const G = T(() => {
1280
- var n, l, k;
1279
+ var s, l, k;
1281
1280
  return {
1282
1281
  [`vuecal__event--${o._.id}`]: !0,
1283
1282
  [o.class]: !!o.class,
1284
1283
  "vuecal__event--recurring": !!o.recurring,
1285
1284
  "vuecal__event--background": !!o.background,
1286
- "vuecal__event--multiday": !!((n = o._) != null && n.multiday),
1285
+ "vuecal__event--multiday": !!((s = o._) != null && s.multiday),
1287
1286
  "vuecal__event--cut-top": ((l = o._) == null ? void 0 : l.startMinutes) < r.timeFrom,
1288
1287
  "vuecal__event--cut-bottom": ((k = o._) == null ? void 0 : k.endMinutes) > r.timeTo || o.end.getDate() !== o.start.getDate(),
1289
1288
  // Only apply the dragging class on the event copy that is being dragged.
@@ -1298,103 +1297,103 @@ const nt = (D, s) => {
1298
1297
  "vuecal__event--resizing": m.resizing
1299
1298
  };
1300
1299
  }), i = T(() => {
1301
- const n = (g.isDay || g.isDays || g.isWeek) && r.time;
1302
- if (!n && !o.backgroundColor && !o.color) return !1;
1300
+ const s = (g.isDay || g.isDays || g.isWeek) && r.time;
1301
+ if (!s && !o.backgroundColor && !o.color) return !1;
1303
1302
  const l = {
1304
1303
  backgroundColor: o.backgroundColor || null,
1305
1304
  color: o.color || null
1306
1305
  };
1307
- if (n) {
1306
+ if (s) {
1308
1307
  const k = Math.max(r.timeFrom, o._.startMinutes), t = Math.min(r.timeTo, o._.endMinutes), V = Ve(k, r), H = Ve(t, r) - V;
1309
1308
  l.top = `${V}%`, l.height = `${H}%`;
1310
1309
  }
1311
1310
  return l;
1312
1311
  }), u = T(() => {
1313
- const n = { ...r.eventListeners.event };
1314
- Object.entries(n).forEach(([t, V]) => {
1315
- ["resize-end"].includes(t) || (n[t] = (H) => {
1312
+ const s = { ...r.eventListeners.event };
1313
+ Object.entries(s).forEach(([t, V]) => {
1314
+ ["resize-end"].includes(t) || (s[t] = (H) => {
1316
1315
  H.type !== "drop" && V(H.type ? { e: H, event: o } : H);
1317
1316
  });
1318
1317
  });
1319
- const l = { ...n };
1320
- n.touchstart = (t) => {
1318
+ const l = { ...s };
1319
+ s.touchstart = (t) => {
1321
1320
  var V;
1322
1321
  t.stopPropagation(), e(t), (V = l.touchstart) == null || V.call(l, { e: t, event: o });
1323
- }, n.mousedown = (t) => {
1322
+ }, s.mousedown = (t) => {
1324
1323
  var V;
1325
1324
  t.stopPropagation(), e(t), (V = l.mousedown) == null || V.call(l, { e: t, event: o });
1326
1325
  };
1327
1326
  let k = null;
1328
- return n.click = (t) => {
1327
+ return s.click = (t) => {
1329
1328
  var V;
1330
1329
  (V = l.click) == null || V.call(l, { e: t, event: o }), k ? k = clearTimeout(k) : k = setTimeout(() => {
1331
1330
  var H;
1332
1331
  k = null, (H = l["delayed-click"]) == null || H.call(l, { e: t, event: o });
1333
1332
  }, 400);
1334
- }, n.dblclick = (t) => {
1333
+ }, s.dblclick = (t) => {
1335
1334
  l.dblclick ? l.dblclick({ e: t, event: o }) : o.delete(1);
1336
- }, n;
1337
- }), e = (n) => {
1335
+ }, s;
1336
+ }), e = (s) => {
1338
1337
  var t, V, H;
1339
- const l = ((t = n.touches) == null ? void 0 : t[0]) || n;
1338
+ const l = ((t = s.touches) == null ? void 0 : t[0]) || s;
1340
1339
  m.fromResizer = l.target.matches(".vuecal__event-resizer, .vuecal__event-resizer *");
1341
1340
  const k = C.value.getBoundingClientRect();
1342
- m.startX = (((V = n.touches) == null ? void 0 : V[0]) || n).clientX - k.left, m.startY = (((H = n.touches) == null ? void 0 : H[0]) || n).clientY - k.top, m.startPercentageX = m.startX * 100 / k.width, m.startPercentageY = m.startY * 100 / k.height, m.cellEl = C.value.closest(".vuecal__cell"), m.resizeStartDate = o.start, A(n.type === "touchstart" ? "touchmove" : "mousemove", d), A(n.type === "touchstart" ? "touchend" : "mouseup", h, { once: !0 }), m.holdTimer = setTimeout(() => {
1341
+ m.startX = (((V = s.touches) == null ? void 0 : V[0]) || s).clientX - k.left, m.startY = (((H = s.touches) == null ? void 0 : H[0]) || s).clientY - k.top, m.startPercentageX = m.startX * 100 / k.width, m.startPercentageY = m.startY * 100 / k.height, m.cellEl = C.value.closest(".vuecal__cell"), m.resizeStartDate = o.start, A(s.type === "touchstart" ? "touchmove" : "mousemove", d), A(s.type === "touchstart" ? "touchend" : "mouseup", h, { once: !0 }), m.holdTimer = setTimeout(() => {
1343
1342
  var U, K;
1344
- m.holding = !0, (K = (U = u.value).hold) == null || K.call(U, { e: n, event: o });
1343
+ m.holding = !0, (K = (U = u.value).hold) == null || K.call(U, { e: s, event: o });
1345
1344
  }, 1e3);
1346
- }, d = async (n) => {
1345
+ }, d = async (s) => {
1347
1346
  var k, t, V, H;
1348
- const l = ((k = n.touches) == null ? void 0 : k[0]) || n;
1349
- if (m.fromResizer && !m.resizing && (m.resizing = !0, m.resizingOriginalEvent = { ...o, _: { ...o._ } }, b.isResizingEvent = !0, (V = (t = u.value).resizeStart) == null || V.call(t, { e: n, event: o })), m.holdTimer = clearTimeout(m.holdTimer), m.holding = !1, m.cellEl) {
1347
+ const l = ((k = s.touches) == null ? void 0 : k[0]) || s;
1348
+ if (m.fromResizer && !m.resizing && (m.resizing = !0, m.resizingOriginalEvent = { ...o, _: { ...o._ } }, b.isResizingEvent = !0, (V = (t = u.value).resizeStart) == null || V.call(t, { e: s, event: o })), m.holdTimer = clearTimeout(m.holdTimer), m.holding = !1, m.cellEl) {
1350
1349
  const { top: U, left: K, width: ue, height: ae } = m.cellEl.getBoundingClientRect();
1351
1350
  m.moveX = l.clientX - K, m.moveY = l.clientY - U, m.movePercentageX = m.moveX * 100 / ue, m.movePercentageY = m.moveY * 100 / ae;
1352
1351
  }
1353
1352
  if (m.fromResizer) {
1354
- const { newStart: U, newEnd: K } = E(o);
1353
+ const { newStart: U, newEnd: K } = Y(o);
1355
1354
  let ue = !0;
1356
1355
  const { resize: ae } = (H = r.eventListeners) == null ? void 0 : H.event;
1357
1356
  ae && (ue = await ae({
1358
- e: n,
1357
+ e: s,
1359
1358
  event: { ...o, start: U, end: K },
1360
1359
  overlaps: o.getOverlappingEvents({ start: U, end: K })
1361
1360
  })), ue !== !1 ? (o.start = U, o.end = K, m.resizingLastAcceptedEvent && (m.resizingLastAcceptedEvent = null)) : ae && (m.resizingLastAcceptedEvent = { ...o, _: { ...o._ } });
1362
1361
  }
1363
- }, h = async (n) => {
1362
+ }, h = async (s) => {
1364
1363
  var l, k;
1365
1364
  if (m.holdTimer = clearTimeout(m.holdTimer), m.holding = !1, m.resizing) {
1366
- const { newStart: t, newEnd: V } = E(o);
1365
+ const { newStart: t, newEnd: V } = Y(o);
1367
1366
  let H = !0;
1368
1367
  const U = u.value["resize-end"];
1369
1368
  U && (H = await U({
1370
- e: n,
1369
+ e: s,
1371
1370
  event: o,
1372
1371
  original: m.resizingOriginalEvent,
1373
1372
  // Original event details before resizing.
1374
1373
  overlaps: o.getOverlappingEvents({ start: t, end: V })
1375
1374
  })), o.start = H === !1 ? (m.resizingLastAcceptedEvent || m.resizingOriginalEvent).start : ((l = m.resizingLastAcceptedEvent) == null ? void 0 : l.start) || t, o.end = H === !1 ? (m.resizingLastAcceptedEvent || m.resizingOriginalEvent).end : ((k = m.resizingLastAcceptedEvent) == null ? void 0 : k.end) || V, o._.duration < 1 && (o.start = m.resizingOriginalEvent.start, o.end = m.resizingOriginalEvent.end), b.isResizingEvent = !1;
1376
1375
  }
1377
- document.removeEventListener(n.type === "touchend" ? "touchmove" : "mousemove", d), m.resizing = !1, m.fromResizer = !1, m.dragging = !1, m.startX = 0, m.startY = 0, m.moveX = 0, m.moveY = 0, m.startPercentageX = 0, m.startPercentageY = 0, m.movePercentageX = 0, m.movePercentageY = 0, m.cellEl = null, m.resizeStartDate = null, m.resizingOriginalEvent = null, m.resizingLastAcceptedEvent = null, m.schedule = null;
1378
- }, E = (n) => {
1379
- const l = new Date(n.start.getFullYear(), n.start.getMonth(), n.start.getDate());
1376
+ document.removeEventListener(s.type === "touchend" ? "touchmove" : "mousemove", d), m.resizing = !1, m.fromResizer = !1, m.dragging = !1, m.startX = 0, m.startY = 0, m.moveX = 0, m.moveY = 0, m.startPercentageX = 0, m.startPercentageY = 0, m.movePercentageX = 0, m.movePercentageY = 0, m.cellEl = null, m.resizeStartDate = null, m.resizingOriginalEvent = null, m.resizingLastAcceptedEvent = null, m.schedule = null;
1377
+ }, Y = (s) => {
1378
+ const l = new Date(s.start.getFullYear(), s.start.getMonth(), s.start.getDate());
1380
1379
  new Date(l).setDate(l.getDate() + 1);
1381
1380
  let t = Pe(m.movePercentageY, r);
1382
1381
  if (t = Math.max(0, Math.min(t, 24 * 60)), r.snapToInterval) {
1383
1382
  const U = t + r.snapToInterval / 2;
1384
1383
  t = U - U % r.snapToInterval;
1385
1384
  }
1386
- let V = n.start, H = new Date(l.getTime() + t * 6e4);
1385
+ let V = s.start, H = new Date(l.getTime() + t * 6e4);
1387
1386
  return H < m.resizeStartDate && (V = H, H = m.resizeStartDate), { newStart: V, newEnd: H };
1388
1387
  };
1389
1388
  Ze(() => o._.register(C.value));
1390
- const P = [], A = (n, l, k) => {
1391
- document.addEventListener(n, l, k), P.push({ event: n, handler: l, options: k });
1389
+ const P = [], A = (s, l, k) => {
1390
+ document.addEventListener(s, l, k), P.push({ event: s, handler: l, options: k });
1392
1391
  };
1393
1392
  return Xe(() => {
1394
- o._.unregister(), P.forEach(({ event: n, handler: l, options: k }) => {
1395
- document.removeEventListener(n, l, k);
1393
+ o._.unregister(), P.forEach(({ event: s, handler: l, options: k }) => {
1394
+ document.removeEventListener(s, l, k);
1396
1395
  });
1397
- }), (n, l) => (Y(), j("div", De({ class: "vuecal__event" }, Ie(u.value, !0), {
1396
+ }), (s, l) => (E(), j("div", De({ class: "vuecal__event" }, Ie(u.value, !0), {
1398
1397
  ref_key: "eventEl",
1399
1398
  ref: C,
1400
1399
  class: G.value,
@@ -1404,9 +1403,9 @@ const nt = (D, s) => {
1404
1403
  onDragend: l[3] || (l[3] = (k) => $.value && O(p).eventDragEnd(k, o))
1405
1404
  }), [
1406
1405
  ge("div", Ft, [
1407
- F(n.$slots, "event", { event: o }, () => [
1406
+ F(s.$slots, "event", { event: o }, () => [
1408
1407
  ge("div", Nt, le(o.title), 1),
1409
- O(r).time ? (Y(), j("div", Wt, le(o._[`startTimeFormatted${O(r).twelveHour ? 12 : 24}`]) + `
1408
+ O(r).time ? (E(), j("div", Wt, le(o._[`startTimeFormatted${O(r).twelveHour ? 12 : 24}`]) + `
1410
1409
  - ` + le(o._[`endTimeFormatted${O(r).twelveHour ? 12 : 24}`]), 1)) : Z("", !0),
1411
1410
  ge("div", {
1412
1411
  class: "vuecal__event-content",
@@ -1414,7 +1413,7 @@ const nt = (D, s) => {
1414
1413
  }, null, 8, Bt)
1415
1414
  ])
1416
1415
  ]),
1417
- W.value ? (Y(), j("div", {
1416
+ W.value ? (E(), j("div", {
1418
1417
  key: 0,
1419
1418
  class: "vuecal__event-resizer",
1420
1419
  onDragstart: l[0] || (l[0] = Qe(() => {
@@ -1422,7 +1421,7 @@ const nt = (D, s) => {
1422
1421
  }, null, 32)) : Z("", !0),
1423
1422
  Oe(Ge, { name: "vuecal-delete-btn" }, {
1424
1423
  default: J(() => [
1425
- o._.deleting ? (Y(), j("div", {
1424
+ o._.deleting ? (E(), j("div", {
1426
1425
  key: 0,
1427
1426
  class: "vuecal__event-delete",
1428
1427
  onClick: l[1] || (l[1] = Qe((k) => o.delete(3), ["stop"]))
@@ -1463,7 +1462,7 @@ const nt = (D, s) => {
1463
1462
  index: { type: Number, required: !0 }
1464
1463
  },
1465
1464
  setup(D) {
1466
- const s = D, r = Ne("vuecal"), { view: g, config: p, dateUtils: b, eventsManager: L, dnd: v, touch: C } = r, o = T(() => b.isToday(s.start)), m = ie(null), $ = ie([]), W = ie(!1), G = (c) => {
1465
+ const n = D, r = Ne("vuecal"), { view: g, config: p, dateUtils: b, eventsManager: L, dnd: v, touch: C } = r, o = T(() => b.isToday(n.start)), m = ie(null), $ = ie([]), W = ie(!1), G = (c) => {
1467
1466
  $.value.push(c.detail), W.value = !0;
1468
1467
  }, i = () => setTimeout(() => W.value = !1, 300), u = $e({
1469
1468
  dragging: !1,
@@ -1499,14 +1498,14 @@ const nt = (D, s) => {
1499
1498
  end: b.formatMinutes(M),
1500
1499
  ...u.schedule ? { schedule: u.schedule } : {}
1501
1500
  };
1502
- }), E = T(() => {
1501
+ }), Y = T(() => {
1503
1502
  const c = p.editableEvents.create && (u.dragging || e.value), w = p.eventCreateMinDrag && u.thresholdPassed || !p.eventCreateMinDrag;
1504
1503
  return c && w;
1505
1504
  }), P = T(() => {
1506
1505
  var x;
1507
- const c = /* @__PURE__ */ new Date(), w = g.start.getFullYear(), S = g.start.getMonth(), M = s.start.getFullYear(), N = s.start.getMonth();
1506
+ const c = /* @__PURE__ */ new Date(), w = g.start.getFullYear(), S = g.start.getMonth(), M = n.start.getFullYear(), N = n.start.getMonth();
1508
1507
  return {
1509
- [`vuecal__cell--${Re[s.start.getDay()]}`]: g.isDay || g.isDays || g.isWeek || g.isMonth,
1508
+ [`vuecal__cell--${Re[n.start.getDay()]}`]: g.isDay || g.isDays || g.isWeek || g.isMonth,
1510
1509
  [`vuecal__cell--${dt[N]}`]: g.isYear,
1511
1510
  [`vuecal__cell--${M}`]: g.isYears,
1512
1511
  "vuecal__cell--today": o.value,
@@ -1516,25 +1515,25 @@ const nt = (D, s) => {
1516
1515
  "vuecal__cell--before-min": ae.value && K.value,
1517
1516
  "vuecal__cell--after-max": ae.value && ue.value,
1518
1517
  "vuecal__cell--disabled": ae.value,
1519
- "vuecal__cell--selected": g.selectedDate && g.selectedDate.getTime() >= s.start.getTime() && g.selectedDate.getTime() <= s.end.getTime(),
1518
+ "vuecal__cell--selected": g.selectedDate && g.selectedDate.getTime() >= n.start.getTime() && g.selectedDate.getTime() <= n.end.getTime(),
1520
1519
  "vuecal__cell--has-schedules": (x = p.schedules) == null ? void 0 : x.length,
1521
1520
  "vuecal__cell--dragging": u.dragging,
1522
1521
  "vuecal__cell--has-events": l.value.length
1523
1522
  };
1524
- }), A = T(() => b.formatDate(s.start)), n = T(() => {
1523
+ }), A = T(() => b.formatDate(n.start)), s = T(() => {
1525
1524
  switch (g.id) {
1526
1525
  case "day":
1527
1526
  return "";
1528
1527
  case "days":
1529
- return p.availableViews.days.rows > 1 && b.formatDate(s.start, "D"), "";
1528
+ return p.availableViews.days.rows > 1 && b.formatDate(n.start, "D"), "";
1530
1529
  case "week":
1531
1530
  return "";
1532
1531
  case "month":
1533
- return b.formatDate(s.start, "D");
1532
+ return b.formatDate(n.start, "D");
1534
1533
  case "year":
1535
- return b.formatDate(s.start, p.xs ? "MMM" : "MMMM");
1534
+ return b.formatDate(n.start, p.xs ? "MMM" : "MMMM");
1536
1535
  case "years":
1537
- return b.formatDate(s.start, "YYYY");
1536
+ return b.formatDate(n.start, "YYYY");
1538
1537
  }
1539
1538
  }), l = T(() => p.datePicker ? [] : L.getEventsByDate(A.value, !0, !0).filter((c) => !$.value.includes(c._.id))), k = T(() => l.value.filter((c) => !c.background)), t = T(() => {
1540
1539
  var c;
@@ -1552,7 +1551,7 @@ const nt = (D, s) => {
1552
1551
  }), H = T(() => g.isMonth && p.eventCount && !p.eventsOnMonthView && k.value.length), U = T(() => {
1553
1552
  var S;
1554
1553
  if (!p.specialHours || g.isMonth || g.isYear || g.isYears) return;
1555
- const c = Re[s.start.getDay()];
1554
+ const c = Re[n.start.getDay()];
1556
1555
  let w = (S = p.specialHours) == null ? void 0 : S[c];
1557
1556
  if (w)
1558
1557
  return Array.isArray(w) || (w = [w]), w.map((M) => {
@@ -1566,9 +1565,9 @@ const nt = (D, s) => {
1566
1565
  class: x
1567
1566
  };
1568
1567
  }).filter((M) => !!M);
1569
- }), K = T(() => p.minTimestamp !== null && p.minTimestamp > s.end.getTime()), ue = T(() => p.maxTimestamp && p.maxTimestamp < s.start.getTime()), ae = T(() => {
1568
+ }), K = T(() => p.minTimestamp !== null && p.minTimestamp > n.end.getTime()), ue = T(() => p.maxTimestamp && p.maxTimestamp < n.start.getTime()), ae = T(() => {
1570
1569
  const { disableDays: c } = p, w = g.isYear || g.isYears;
1571
- return c.length && c.includes(b.formatDate(s.start)) && !w ? !0 : K.value || ue.value;
1570
+ return c.length && c.includes(b.formatDate(n.start)) && !w ? !0 : K.value || ue.value;
1572
1571
  }), re = $e({
1573
1572
  show: T(() => {
1574
1573
  if (!(!g.isDay && !g.isDays && !g.isWeek) && !(!o.value || !p.time) && !(p.timeFrom > b.dateToMinutes(g.now)) && !(b.dateToMinutes(g.now) > p.timeTo))
@@ -1603,7 +1602,7 @@ const nt = (D, s) => {
1603
1602
  oe(M.e || M), (N = w.mousedown) == null || N.call(w, { e: M, cell: q.value, cursor: ce.value });
1604
1603
  }), w.dblclick && (c.dblclick = (M) => {
1605
1604
  var z, R;
1606
- const N = (((z = M.touches) == null ? void 0 : z[0]) || M).clientY, { top: I } = m.value.getBoundingClientRect(), x = Je(N - I, m.value), de = Pe(x, p), ye = new Date(s.start);
1605
+ const N = (((z = M.touches) == null ? void 0 : z[0]) || M).clientY, { top: I } = m.value.getBoundingClientRect(), x = Je(N - I, m.value), de = Pe(x, p), ye = new Date(n.start);
1607
1606
  ye.setMinutes(de);
1608
1607
  const f = {
1609
1608
  y: x,
@@ -1614,8 +1613,8 @@ const nt = (D, s) => {
1614
1613
  M.preventDefault(), v.cellDragOver(M, q.value);
1615
1614
  }, c.dragleave = (M) => v.cellDragLeave(M, q.value), c.drop = (M) => v.cellDragDrop(M, q.value)), c;
1616
1615
  }), q = T(() => ({
1617
- start: s.start,
1618
- end: s.end,
1616
+ start: n.start,
1617
+ end: n.end,
1619
1618
  events: l,
1620
1619
  ...u.schedule ? { schedule: u.schedule } : {},
1621
1620
  goNarrower: () => g.narrower(),
@@ -1623,14 +1622,14 @@ const nt = (D, s) => {
1623
1622
  broader: g.broaderView,
1624
1623
  narrower: g.narrowerView
1625
1624
  })), ce = T(() => {
1626
- const c = Pe(u.movePercentageY || u.startPercentageY, p), w = new Date(s.start);
1625
+ const c = Pe(u.movePercentageY || u.startPercentageY, p), w = new Date(n.start);
1627
1626
  return w.setMinutes(c), {
1628
1627
  x: u.movePercentageX || u.startPercentageX,
1629
1628
  y: u.movePercentageY || u.startPercentageY,
1630
1629
  date: w
1631
1630
  };
1632
1631
  }), ee = () => {
1633
- g.updateSelectedDate(s.start), p.clickToNavigate && ((g.isMonth || g.isDays || g.isWeek) && p.availableViews.day ? g.switch("day") : g.isYear && p.availableViews.month ? g.switch("month") : g.isYears && p.availableViews.year && g.switch("year")), g.updateViewDate(s.start);
1632
+ g.updateSelectedDate(n.start), p.clickToNavigate && ((g.isMonth || g.isDays || g.isWeek) && p.availableViews.day ? g.switch("day") : g.isYear && p.availableViews.month ? g.switch("month") : g.isYears && p.availableViews.year && g.switch("year")), g.updateViewDate(n.start);
1634
1633
  }, oe = (c) => {
1635
1634
  var S, M;
1636
1635
  u.schedule = ~~c.target.dataset.schedule;
@@ -1648,9 +1647,9 @@ const nt = (D, s) => {
1648
1647
  var w, S;
1649
1648
  document.removeEventListener(c.type === "touchend" ? "touchmove" : "mousemove", a, { passive: !1 }), u.dragging && ((S = (w = he.value).dragEnd) == null || S.call(w, { e: c, cell: q.value, cursor: ce.value }), C.isDraggingCell = !1, p.editableEvents.create && (e.value = !0, await y(c), e.value = !1)), u.holdTimer = clearTimeout(u.holdTimer), u.holding = !1, u.dragging = !1, u.startX = 0, u.startY = 0, u.moveX = 0, u.moveY = 0, u.startPercentageX = 0, u.startPercentageY = 0, u.movePercentageX = 0, u.movePercentageY = 0, u.thresholdPassed = !1, u.schedule = null;
1650
1649
  }, y = async (c) => {
1651
- if (!E.value) return;
1650
+ if (!Y.value) return;
1652
1651
  let { start: w, end: S, startMinutes: M, endMinutes: N } = h.value;
1653
- w = new Date(s.start), w.setMinutes(M), S = new Date(s.start), S.setMinutes(N);
1652
+ w = new Date(n.start), w.setMinutes(M), S = new Date(n.start), S.setMinutes(N);
1654
1653
  let I = { ...h.value, start: w, end: S };
1655
1654
  const { create: x } = p.eventListeners.event;
1656
1655
  if (typeof x == "function") {
@@ -1675,7 +1674,7 @@ const nt = (D, s) => {
1675
1674
  // Use flush: 'post' to prevent infinite updates.
1676
1675
  ), Xe(async () => {
1677
1676
  $.value.forEach((c) => L.deleteEvent(c, 3)), B(), await Ue();
1678
- }), (c, w) => (Y(), j("div", De({
1677
+ }), (c, w) => (E(), j("div", De({
1679
1678
  class: ["vuecal__cell", P.value],
1680
1679
  ref_key: "cellEl",
1681
1680
  ref: m
@@ -1684,12 +1683,12 @@ const nt = (D, s) => {
1684
1683
  key: 0,
1685
1684
  cell: q.value
1686
1685
  }) : Z("", !0),
1687
- U.value ? (Y(!0), j(te, { key: 1 }, we(U.value, (S, M) => (Y(), j("div", {
1686
+ U.value ? (E(!0), j(te, { key: 1 }, we(U.value, (S, M) => (E(), j("div", {
1688
1687
  class: _e(["vuecal__special-hours", S.class]),
1689
1688
  style: Te(S.style),
1690
1689
  innerHTML: S.label || ""
1691
1690
  }, null, 14, At))), 256)) : Z("", !0),
1692
- !c.$slots.cell && O(p).schedules ? (Y(!0), j(te, { key: 2 }, we(O(p).schedules, (S) => (Y(), j("div", {
1691
+ !c.$slots.cell && O(p).schedules ? (E(!0), j(te, { key: 2 }, we(O(p).schedules, (S) => (E(), j("div", {
1693
1692
  class: _e(["vuecal__schedule vuecal__schedule--cell", S.class]),
1694
1693
  key: S.id,
1695
1694
  style: Te(S.style || null),
@@ -1699,17 +1698,17 @@ const nt = (D, s) => {
1699
1698
  key: 0,
1700
1699
  cell: q.value
1701
1700
  }) : Z("", !0),
1702
- n.value || c.$slots["cell-date"] ? (Y(), j("div", Rt, [
1701
+ s.value || c.$slots["cell-date"] ? (E(), j("div", Rt, [
1703
1702
  F(c.$slots, "cell-date", { cell: q.value }, () => [
1704
- xe(le(n.value), 1)
1703
+ xe(le(s.value), 1)
1705
1704
  ])
1706
1705
  ])) : Z("", !0),
1707
- c.$slots["cell-content"] ? (Y(), j("div", Xt, [
1706
+ c.$slots["cell-content"] ? (E(), j("div", Xt, [
1708
1707
  F(c.$slots, "cell-content", { cell: q.value })
1709
1708
  ])) : Z("", !0),
1710
- c.$slots["cell-events"] && l.value.length ? (Y(), j("div", Gt, [
1709
+ c.$slots["cell-events"] && l.value.length ? (E(), j("div", Gt, [
1711
1710
  F(c.$slots, "cell-events", { cell: q.value })
1712
- ])) : l.value.length || W.value ? (Y(), Se(et, {
1711
+ ])) : l.value.length || W.value ? (E(), Se(et, {
1713
1712
  key: 4,
1714
1713
  class: "vuecal__cell-events",
1715
1714
  name: "vuecal-event-delete",
@@ -1718,7 +1717,7 @@ const nt = (D, s) => {
1718
1717
  tag: "div"
1719
1718
  }, {
1720
1719
  default: J(() => [
1721
- (Y(!0), j(te, null, we(t.value[S.id], (M) => (Y(), Se(at, {
1720
+ (E(!0), j(te, null, we(t.value[S.id], (M) => (E(), Se(at, {
1722
1721
  key: M._.id,
1723
1722
  event: M,
1724
1723
  onEventDeleted: G,
@@ -1735,28 +1734,28 @@ const nt = (D, s) => {
1735
1734
  ]),
1736
1735
  _: 2
1737
1736
  }, 1024)) : Z("", !0),
1738
- E.value && u.schedule === S.id ? (Y(), j("div", {
1737
+ Y.value && u.schedule === S.id ? (E(), j("div", {
1739
1738
  key: 5,
1740
1739
  class: "vuecal__event-placeholder",
1741
1740
  style: Te(h.value.style)
1742
1741
  }, le(h.value.start) + " - " + le(h.value.end), 5)) : Z("", !0)
1743
1742
  ], 14, It))), 128)) : Z("", !0),
1744
- !c.$slots.cell && !O(p).schedules ? (Y(), j(te, { key: 3 }, [
1743
+ !c.$slots.cell && !O(p).schedules ? (E(), j(te, { key: 3 }, [
1745
1744
  c.$slots["cell-events"] ? F(c.$slots, "cell-events", {
1746
1745
  key: 0,
1747
1746
  cell: q.value
1748
1747
  }) : Z("", !0),
1749
- n.value || c.$slots["cell-date"] ? (Y(), j("div", qt, [
1748
+ s.value || c.$slots["cell-date"] ? (E(), j("div", qt, [
1750
1749
  F(c.$slots, "cell-date", { cell: q.value }, () => [
1751
- xe(le(n.value), 1)
1750
+ xe(le(s.value), 1)
1752
1751
  ])
1753
1752
  ])) : Z("", !0),
1754
- c.$slots["cell-content"] ? (Y(), j("div", Ut, [
1753
+ c.$slots["cell-content"] ? (E(), j("div", Ut, [
1755
1754
  F(c.$slots, "cell-content", { cell: q.value })
1756
1755
  ])) : Z("", !0),
1757
- c.$slots["cell-events"] && l.value.length ? (Y(), j("div", Zt, [
1756
+ c.$slots["cell-events"] && l.value.length ? (E(), j("div", Zt, [
1758
1757
  F(c.$slots, "cell-events", { cell: q.value })
1759
- ])) : (l.value.length || W.value) && !(O(g).isMonth && !O(p).eventsOnMonthView) ? (Y(), Se(et, {
1758
+ ])) : (l.value.length || W.value) && !(O(g).isMonth && !O(p).eventsOnMonthView) ? (E(), Se(et, {
1760
1759
  key: 4,
1761
1760
  class: "vuecal__cell-events",
1762
1761
  name: "vuecal-event-delete",
@@ -1765,7 +1764,7 @@ const nt = (D, s) => {
1765
1764
  tag: "div"
1766
1765
  }, {
1767
1766
  default: J(() => [
1768
- (Y(!0), j(te, null, we(l.value, (S) => (Y(), Se(at, {
1767
+ (E(!0), j(te, null, we(l.value, (S) => (E(), Se(at, {
1769
1768
  key: S._.id,
1770
1769
  event: S,
1771
1770
  onEventDeleted: G,
@@ -1782,7 +1781,7 @@ const nt = (D, s) => {
1782
1781
  ]),
1783
1782
  _: 3
1784
1783
  })) : Z("", !0),
1785
- E.value ? (Y(), j("div", {
1784
+ Y.value ? (E(), j("div", {
1786
1785
  key: 5,
1787
1786
  class: "vuecal__event-placeholder",
1788
1787
  style: Te(h.value.style)
@@ -1791,8 +1790,8 @@ const nt = (D, s) => {
1791
1790
  c.$slots["event-count"] ? F(c.$slots, "event-count", {
1792
1791
  key: 4,
1793
1792
  events: k.value
1794
- }) : H.value ? (Y(), j("div", Jt, le(k.value.length), 1)) : Z("", !0),
1795
- re.show ? (Y(), j("div", {
1793
+ }) : H.value ? (E(), j("div", Jt, le(k.value.length), 1)) : Z("", !0),
1794
+ re.show ? (E(), j("div", {
1796
1795
  key: 6,
1797
1796
  class: "vuecal__now-line",
1798
1797
  style: Te(re.style),
@@ -1805,7 +1804,7 @@ const nt = (D, s) => {
1805
1804
  }, xt = {
1806
1805
  __name: "body",
1807
1806
  setup(D) {
1808
- const s = Ne("vuecal"), { view: r, config: g, dateUtils: p } = s, b = ie(null), L = ie(null), v = T(() => ({
1807
+ const n = Ne("vuecal"), { view: r, config: g, dateUtils: p } = n, b = ie(null), L = ie(null), v = T(() => ({
1809
1808
  "--vuecal-grid-columns": r.cols,
1810
1809
  "--vuecal-grid-rows": r.rows
1811
1810
  })), C = T(() => {
@@ -1826,7 +1825,7 @@ const nt = (D, s) => {
1826
1825
  b.value.addEventListener("mousemove", o), b.value.addEventListener("touchmove", o), b.value.addEventListener("mouseleave", m), b.value.addEventListener("touchend", m);
1827
1826
  }), Xe(() => {
1828
1827
  b.value && (b.value.removeEventListener("mousemove", o), b.value.removeEventListener("touchmove", o), b.value.removeEventListener("mouseleave", m), b.value.removeEventListener("touchend", m));
1829
- }), ($, W) => (Y(), j("div", {
1828
+ }), ($, W) => (E(), j("div", {
1830
1829
  class: "vuecal__body",
1831
1830
  ref_key: "bodyEl",
1832
1831
  ref: b,
@@ -1834,7 +1833,7 @@ const nt = (D, s) => {
1834
1833
  }, [
1835
1834
  Oe(Ge, { name: "vuecal-shrink" }, {
1836
1835
  default: J(() => [
1837
- O(g).timeAtCursor && L.value !== null ? (Y(), j("div", {
1836
+ O(g).timeAtCursor && L.value !== null ? (E(), j("div", {
1838
1837
  key: 0,
1839
1838
  class: "vuecal__time-at-cursor",
1840
1839
  style: Te(C.value.style)
@@ -1844,7 +1843,7 @@ const nt = (D, s) => {
1844
1843
  ]),
1845
1844
  _: 1
1846
1845
  }),
1847
- (Y(!0), j(te, null, we(O(r).cellDates, (G, i) => (Y(), Se(Qt, {
1846
+ (E(!0), j(te, null, we(O(r).cellDates, (G, i) => (E(), Se(Qt, {
1848
1847
  key: i,
1849
1848
  start: G.start,
1850
1849
  end: G.end,
@@ -1896,7 +1895,7 @@ const nt = (D, s) => {
1896
1895
  }, ea = ["data-locale"], ta = { class: "vuecal__scrollable-wrap" }, aa = {
1897
1896
  key: 1,
1898
1897
  class: "vuecal__week-numbers"
1899
- }, sa = { class: "vuecal__week-number" }, na = { class: "vuecal__body-wrap" }, oa = {
1898
+ }, na = { class: "vuecal__week-number" }, sa = { class: "vuecal__body-wrap" }, oa = {
1900
1899
  __name: "index",
1901
1900
  props: pt,
1902
1901
  emits: [
@@ -1910,7 +1909,7 @@ const nt = (D, s) => {
1910
1909
  "event-created",
1911
1910
  "event-dropped"
1912
1911
  ],
1913
- setup(D, { expose: s, emit: r }) {
1912
+ setup(D, { expose: n, emit: r }) {
1914
1913
  const g = D, p = r, b = ot("vuecal-el"), L = yt({ props: g, emit: p, attrs: ut(), vuecalEl: b, uid: it() }), { config: v, view: C, dateUtils: o, touch: m } = L, $ = T(() => v.time && (C.isDay || C.isDays || C.isWeek)), W = T(() => Array(C.rows).fill().map((e, d) => o.getWeek(o.addDays(C.firstCellDate, 7 * d)))), G = T(() => {
1915
1914
  var e;
1916
1915
  return {
@@ -1942,7 +1941,7 @@ const nt = (D, s) => {
1942
1941
  });
1943
1942
  return Ze(async () => {
1944
1943
  await Ue(), v.ready = !0, p("ready", { config: v, view: C });
1945
- }), ct("vuecal", L), s({ view: L.view }), (e, d) => (Y(), j("div", {
1944
+ }), ct("vuecal", L), n({ view: L.view }), (e, d) => (E(), j("div", {
1946
1945
  class: _e(["vuecal", G.value]),
1947
1946
  ref: "vuecal-el",
1948
1947
  "data-locale": e.locale,
@@ -1951,47 +1950,47 @@ const nt = (D, s) => {
1951
1950
  e.$slots.diy ? F(e.$slots, "diy", {
1952
1951
  key: 0,
1953
1952
  vuecal: O(L)
1954
- }) : (Y(), j(te, { key: 1 }, [
1953
+ }) : (E(), j(te, { key: 1 }, [
1955
1954
  Oe(Mt, null, je({ _: 2 }, [
1956
1955
  e.$slots.header ? {
1957
1956
  name: "header",
1958
1957
  fn: J((h) => [
1959
- F(e.$slots, "header", se(ne(h)))
1958
+ F(e.$slots, "header", ne(se(h)))
1960
1959
  ]),
1961
1960
  key: "0"
1962
1961
  } : void 0,
1963
1962
  !e.$slots.header && e.$slots["previous-button"] ? {
1964
1963
  name: "previous-button",
1965
1964
  fn: J((h) => [
1966
- F(e.$slots, "previous-button", se(ne(h)))
1965
+ F(e.$slots, "previous-button", ne(se(h)))
1967
1966
  ]),
1968
1967
  key: "1"
1969
1968
  } : void 0,
1970
1969
  !e.$slots.header && e.$slots["next-button"] ? {
1971
1970
  name: "next-button",
1972
1971
  fn: J((h) => [
1973
- F(e.$slots, "next-button", se(ne(h)))
1972
+ F(e.$slots, "next-button", ne(se(h)))
1974
1973
  ]),
1975
1974
  key: "2"
1976
1975
  } : void 0,
1977
1976
  !e.$slots.header && e.$slots["today-button"] ? {
1978
1977
  name: "today-button",
1979
1978
  fn: J((h) => [
1980
- F(e.$slots, "today-button", se(ne(h)))
1979
+ F(e.$slots, "today-button", ne(se(h)))
1981
1980
  ]),
1982
1981
  key: "3"
1983
1982
  } : void 0,
1984
1983
  !e.$slots.header && e.$slots.title ? {
1985
1984
  name: "title",
1986
1985
  fn: J((h) => [
1987
- F(e.$slots, "title", se(ne(h)))
1986
+ F(e.$slots, "title", ne(se(h)))
1988
1987
  ]),
1989
1988
  key: "4"
1990
1989
  } : void 0,
1991
1990
  !e.$slots.header && e.$slots["schedule-heading"] ? {
1992
1991
  name: "schedule-heading",
1993
1992
  fn: J((h) => [
1994
- F(e.$slots, "schedule-heading", se(ne(h)))
1993
+ F(e.$slots, "schedule-heading", ne(se(h)))
1995
1994
  ]),
1996
1995
  key: "5"
1997
1996
  } : void 0
@@ -2001,39 +2000,39 @@ const nt = (D, s) => {
2001
2000
  name: `vuecal-slide-fade--${O(C).transitionDirection}`
2002
2001
  }, {
2003
2002
  default: J(() => [
2004
- (Y(), j("div", {
2003
+ (E(), j("div", {
2005
2004
  class: _e(["vuecal__scrollable", u.value]),
2006
2005
  key: O(C).id + O(C).start.getTime()
2007
2006
  }, [
2008
- $.value ? (Y(), Se(Lt, { key: 0 }, je({ _: 2 }, [
2007
+ $.value ? (E(), Se(Lt, { key: 0 }, je({ _: 2 }, [
2009
2008
  e.$slots["time-cell"] ? {
2010
2009
  name: "time-cell",
2011
2010
  fn: J((h) => [
2012
- F(e.$slots, "time-cell", se(ne(h)))
2011
+ F(e.$slots, "time-cell", ne(se(h)))
2013
2012
  ]),
2014
2013
  key: "0"
2015
2014
  } : void 0
2016
2015
  ]), 1024)) : Z("", !0),
2017
- O(v).weekNumbers && O(C).isMonth ? (Y(), j("div", aa, [
2018
- (Y(!0), j(te, null, we(W.value, (h) => (Y(), j("div", sa, [
2016
+ O(v).weekNumbers && O(C).isMonth ? (E(), j("div", aa, [
2017
+ (E(!0), j(te, null, we(W.value, (h) => (E(), j("div", na, [
2019
2018
  F(e.$slots, "week-number", {}, () => [
2020
2019
  ge("small", null, le(h), 1)
2021
2020
  ])
2022
2021
  ]))), 256))
2023
2022
  ])) : Z("", !0),
2024
- ge("div", na, [
2023
+ ge("div", sa, [
2025
2024
  Oe(Pt, null, je({ _: 2 }, [
2026
2025
  e.$slots["weekday-heading"] ? {
2027
2026
  name: "weekday-heading",
2028
2027
  fn: J((h) => [
2029
- F(e.$slots, "weekday-heading", se(ne(h)))
2028
+ F(e.$slots, "weekday-heading", ne(se(h)))
2030
2029
  ]),
2031
2030
  key: "0"
2032
2031
  } : void 0,
2033
2032
  e.$slots["schedule-heading"] ? {
2034
2033
  name: "schedule-heading",
2035
2034
  fn: J((h) => [
2036
- F(e.$slots, "schedule-heading", se(ne(h)))
2035
+ F(e.$slots, "schedule-heading", ne(se(h)))
2037
2036
  ]),
2038
2037
  key: "1"
2039
2038
  } : void 0
@@ -2042,42 +2041,42 @@ const nt = (D, s) => {
2042
2041
  e.$slots.cell ? {
2043
2042
  name: "cell",
2044
2043
  fn: J((h) => [
2045
- F(e.$slots, "cell", se(ne(h)))
2044
+ F(e.$slots, "cell", ne(se(h)))
2046
2045
  ]),
2047
2046
  key: "0"
2048
2047
  } : void 0,
2049
2048
  !e.$slots.cell && e.$slots["cell-date"] ? {
2050
2049
  name: "cell-date",
2051
2050
  fn: J((h) => [
2052
- F(e.$slots, "cell-date", se(ne(h)))
2051
+ F(e.$slots, "cell-date", ne(se(h)))
2053
2052
  ]),
2054
2053
  key: "1"
2055
2054
  } : void 0,
2056
2055
  !e.$slots.cell && e.$slots["cell-content"] ? {
2057
2056
  name: "cell-content",
2058
2057
  fn: J((h) => [
2059
- F(e.$slots, "cell-content", se(ne(h)))
2058
+ F(e.$slots, "cell-content", ne(se(h)))
2060
2059
  ]),
2061
2060
  key: "2"
2062
2061
  } : void 0,
2063
2062
  !e.$slots.cell && e.$slots["cell-events"] ? {
2064
2063
  name: "cell-events",
2065
2064
  fn: J((h) => [
2066
- F(e.$slots, "cell-events", se(ne(h)))
2065
+ F(e.$slots, "cell-events", ne(se(h)))
2067
2066
  ]),
2068
2067
  key: "3"
2069
2068
  } : void 0,
2070
2069
  !e.$slots.cell && e.$slots.event ? {
2071
2070
  name: "event",
2072
2071
  fn: J((h) => [
2073
- F(e.$slots, "event", se(ne(h)))
2072
+ F(e.$slots, "event", ne(se(h)))
2074
2073
  ]),
2075
2074
  key: "4"
2076
2075
  } : void 0,
2077
2076
  !e.$slots.cell && e.$slots["event-count"] ? {
2078
2077
  name: "event-count",
2079
2078
  fn: J((h) => [
2080
- F(e.$slots, "event-count", se(ne(h)))
2079
+ F(e.$slots, "event-count", ne(se(h)))
2081
2080
  ]),
2082
2081
  key: "5"
2083
2082
  } : void 0
@@ -2112,8 +2111,8 @@ const nt = (D, s) => {
2112
2111
  stringToDate: Ta,
2113
2112
  dateToMinutes: $a,
2114
2113
  countDays: Ma,
2115
- datesInSameTimeStep: Ea,
2116
- isValid: Ya,
2114
+ datesInSameTimeStep: Ya,
2115
+ isValid: Ea,
2117
2116
  formatDate: Sa,
2118
2117
  formatDateLite: Ca,
2119
2118
  formatTime: Va,
@@ -2128,7 +2127,7 @@ export {
2128
2127
  ha as addMinutes,
2129
2128
  Ma as countDays,
2130
2129
  $a as dateToMinutes,
2131
- Ea as datesInSameTimeStep,
2130
+ Ya as datesInSameTimeStep,
2132
2131
  Sa as formatDate,
2133
2132
  Ca as formatDateLite,
2134
2133
  ja as formatMinutes,
@@ -2140,7 +2139,7 @@ export {
2140
2139
  ka as isLeapYear,
2141
2140
  wa as isSameDate,
2142
2141
  pa as isToday,
2143
- Ya as isValidDate,
2142
+ Ea as isValidDate,
2144
2143
  ca as removeDatePrototypes,
2145
2144
  Ta as stringToDate,
2146
2145
  ma as subtractDays,