vue-cal 5.0.1-rc.5 → 5.0.1-rc.6

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,6 +1,6 @@
1
- import { computed as T, reactive as $e, watch as me, toRefs as lt, ref as ie, onBeforeUnmount as Xe, inject as Ne, createElementBlock as j, openBlock as Y, renderSlot as F, createCommentVNode as U, unref as C, Fragment as te, renderList as pe, normalizeClass as ke, createElementVNode as ge, createVNode as Oe, Transition as Ge, withCtx as Z, createBlock as Se, resolveDynamicComponent as Ke, mergeProps as ye, 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 rt, useId as it, useAttrs as ot, provide as ut } from "vue";
1
+ import { computed as T, reactive as $e, watch as me, toRefs as lt, ref as ie, onBeforeUnmount as Xe, inject as Ne, createElementBlock as j, openBlock as E, renderSlot as F, createCommentVNode as U, unref as C, Fragment as te, renderList as pe, normalizeClass as ke, createElementVNode as ge, createVNode as Oe, Transition as Ge, withCtx as Z, createBlock as Se, resolveDynamicComponent as Ke, mergeProps as ye, 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 rt, useId as it, useAttrs as ot, provide as ut } from "vue";
2
2
  /**
3
- * vue-cal v5.0.1-rc.5
3
+ * vue-cal v5.0.1-rc.6
4
4
  * (c) 2024-2025 Antoni Andre <antoniandre.web@gmail.com>
5
5
  * @license MIT
6
6
  */
@@ -89,11 +89,11 @@ const fe = {
89
89
  }), v = T(() => {
90
90
  let l = null;
91
91
  return s.maxDate && typeof s.maxDate == "string" ? l = D.stringToDate(s.maxDate) : s.maxDate && s.maxDate instanceof Date && (l = s.maxDate), (l == null ? void 0 : l.getTime()) || null;
92
- }), h = T(() => {
92
+ }), y = T(() => {
93
93
  var k;
94
94
  const { view: l } = c;
95
95
  return s.schedules.length && (l.isDay || l.isDays || l.isWeek) && ((k = s.schedules) == null ? void 0 : k.map((t, O) => ({ ...t, id: t.id ?? O + 1 }))) || void 0;
96
- }), E = T(() => {
96
+ }), Y = T(() => {
97
97
  const l = {
98
98
  drag: !0,
99
99
  resize: !0,
@@ -130,9 +130,9 @@ const fe = {
130
130
  hideWeekends: b,
131
131
  minTimestamp: e,
132
132
  maxTimestamp: v,
133
- schedules: h,
133
+ schedules: y,
134
134
  selectedDate: u,
135
- editableEvents: E,
135
+ editableEvents: Y,
136
136
  view: _,
137
137
  // Getters.
138
138
  get hasHiddenDays() {
@@ -162,44 +162,44 @@ const we = $e({ el: null, cell: null, timeout: null }), be = $e({
162
162
  function mt(c) {
163
163
  const { config: s, view: i, eventsManager: D, emit: w, uid: _, dateUtils: z } = c, m = (e) => {
164
164
  var n;
165
- const { timeStep: v, timeCellHeight: h, timeFrom: E } = s, L = (((n = e.touches) == null ? void 0 : n[0]) || e).clientY, { top: B } = e.currentTarget.getBoundingClientRect(), l = L - B - ~~e.dataTransfer.getData("cursor-grab-at");
165
+ const { timeStep: v, timeCellHeight: y, timeFrom: Y } = s, L = (((n = e.touches) == null ? void 0 : n[0]) || e).clientY, { top: B } = e.currentTarget.getBoundingClientRect(), l = L - B - ~~e.dataTransfer.getData("cursor-grab-at");
166
166
  return Pe(Je(l, e.currentTarget), s);
167
- }, V = (e, v, h) => {
168
- const E = v.duration || o(v.start, v.end) || s.timeStep;
167
+ }, V = (e, v, y) => {
168
+ const Y = v.duration || o(v.start, v.end) || s.timeStep;
169
169
  let L = Math.max(m(e), 0);
170
170
  if (s.snapToInterval) {
171
171
  const k = L + s.snapToInterval / 2;
172
172
  L = k - k % s.snapToInterval;
173
173
  }
174
- const B = new Date(new Date(h).setMinutes(L)), l = Math.min(L + E, 24 * 60), n = new Date(new Date(h).setMinutes(l));
174
+ const B = new Date(new Date(y).setMinutes(L)), l = Math.min(L + Y, 24 * 60), n = new Date(new Date(y).setMinutes(l));
175
175
  return { start: B, end: n };
176
176
  }, o = (e, v) => Math.round((v - e) / 6e4);
177
177
  return {
178
178
  eventDragStart: (e, v) => {
179
179
  if (e.target.nodeType === 3 || c.touch.isResizingEvent) return e.preventDefault();
180
180
  e.dataTransfer.dropEffect = "move";
181
- const h = { ...v, _: { id: v._.id, duration: o(v.start, v.end) } };
182
- e.dataTransfer.setData("event", JSON.stringify(h)), e.dataTransfer.setData("cursor-grab-at", e.offsetY), be.eventId = v._.id, be.fromVueCal = _;
183
- const E = e.target.closest(".vuecal__event");
184
- E.classList.add("vuecal__event--dragging-ghost"), setTimeout(() => {
185
- E.classList.add("vuecal__event--dragging-original"), E.classList.remove("vuecal__event--dragging-ghost");
181
+ const y = { ...v, _: { id: v._.id, duration: o(v.start, v.end) } };
182
+ e.dataTransfer.setData("event", JSON.stringify(y)), e.dataTransfer.setData("cursor-grab-at", e.offsetY), be.eventId = v._.id, be.fromVueCal = _;
183
+ const Y = e.target.closest(".vuecal__event");
184
+ Y.classList.add("vuecal__event--dragging-ghost"), setTimeout(() => {
185
+ Y.classList.add("vuecal__event--dragging-original"), Y.classList.remove("vuecal__event--dragging-ghost");
186
186
  }, 0), tt = !1, Object.assign(Ae, { id: i.id, date: i.firstCellDate }), qe = !0, c.touch.isDraggingEvent = !0;
187
187
  },
188
188
  eventDragEnd: (e, v) => {
189
189
  be.eventId = null, e.target.closest(".vuecal__event").classList.remove("vuecal__event--dragging-original");
190
- const { fromVueCal: h, toVueCal: E } = be;
191
- E && h !== E && D.deleteEvent(v._.id, 3), be.fromVueCal = null, be.toVueCal = null, tt && qe && Ae.id && i.switchView(Ae.id, Ae.date, !0), c.touch.isDraggingEvent = !1;
190
+ const { fromVueCal: y, toVueCal: Y } = be;
191
+ Y && y !== Y && D.deleteEvent(v._.id, 3), be.fromVueCal = null, be.toVueCal = null, tt && qe && Ae.id && i.switchView(Ae.id, Ae.date, !0), c.touch.isDraggingEvent = !1;
192
192
  },
193
193
  cellDragEnter: (e, v) => {
194
- const { start: h } = v, E = e.currentTarget;
194
+ const { start: y } = v, Y = e.currentTarget;
195
195
  if (!e.currentTarget.contains(e.relatedTarget)) {
196
- if (E === we.el || !E.className.includes("vuecal__cell-content")) return !1;
197
- we.el && (we.cell.highlighted = !1), Object.assign(we, { el: E, cell: v, timeout: clearTimeout(we.timeout) }), v.highlighted = !0, ["years", "year", "month"].includes(i.id) && (we.timeout = setTimeout(() => c.switchToNarrowerView(h), 2e3));
196
+ if (Y === we.el || !Y.className.includes("vuecal__cell-content")) return !1;
197
+ we.el && (we.cell.highlighted = !1), Object.assign(we, { el: Y, cell: v, timeout: clearTimeout(we.timeout) }), v.highlighted = !0, ["years", "year", "month"].includes(i.id) && (we.timeout = setTimeout(() => c.switchToNarrowerView(y), 2e3));
198
198
  }
199
199
  },
200
200
  cellDragOver: (e, v) => {
201
- const { start: h, schedule: E } = v;
202
- e.preventDefault(), v.highlighted = !0, (E || E === 0) && (v.highlightedSchedule = E);
201
+ const { start: y, schedule: Y } = v;
202
+ e.preventDefault(), v.highlighted = !0, (Y || Y === 0) && (v.highlightedSchedule = Y);
203
203
  },
204
204
  cellDragLeave: (e, v) => {
205
205
  e.preventDefault(), !e.currentTarget.contains(e.relatedTarget) && (v.highlightedSchedule = !1, we.cell === v && (clearTimeout(we.timeout), Object.assign(we, { el: null, cell: null, timeout: null }), v.highlighted = !1));
@@ -207,37 +207,43 @@ function mt(c) {
207
207
  cellDragDrop: async (e, v) => {
208
208
  var O, P, I;
209
209
  e.preventDefault(), clearTimeout(we.timeout), Object.assign(we, { el: null, cell: null, timeout: null });
210
- const h = JSON.parse(e.dataTransfer.getData("event") || "{}");
211
- h.start && (h.start = new Date(h.start)), h.end && (h.end = new Date(h.end));
212
- let E;
213
- const { start: L, end: B } = V(e, h, v.start), { schedule: l } = ((O = e.target.closest("[data-schedule]")) == null ? void 0 : O.dataset) || {};
210
+ const y = JSON.parse(e.dataTransfer.getData("event") || "{}");
211
+ y.start && (y.start = new Date(y.start)), y.end && (y.end = new Date(y.end));
212
+ let Y;
213
+ const { start: L, end: B } = V(e, y, v.start), { schedule: l } = ((O = e.target.closest("[data-schedule]")) == null ? void 0 : O.dataset) || {};
214
214
  let n = () => {
215
215
  };
216
- be.fromVueCal === _ ? (E = D.getEvent(h._.id), E && (E._.dragging = !1, n = () => {
217
- E.start = L, E.end = B, l !== void 0 && (E.schedule = ~~l);
218
- })) : (E = {
219
- ...h,
216
+ be.fromVueCal === _ ? (Y = D.getEvent(y._.id), Y && (Y._.dragging = !1, n = () => {
217
+ Y.start = L, Y.end = B, l !== void 0 && (Y.schedule = ~~l);
218
+ })) : (Y = {
219
+ ...y,
220
220
  start: L,
221
221
  end: B,
222
222
  ...l !== void 0 && { schedule: ~~l },
223
- _: { id: ((P = h._) == null ? void 0 : P.id) || h.id, duration: o(L, B) },
223
+ _: { id: ((P = y._) == null ? void 0 : P.id) || y.id, duration: o(L, B) },
224
224
  getOverlappingEvents: () => D.getEventsInRange(
225
225
  D.getEventsByDate(z.formatDate(L), !0),
226
226
  { start: L, end: B },
227
227
  { schedule: ~~l }
228
228
  )
229
229
  }, n = () => {
230
- E = D.createEvent(E);
230
+ Y = D.createEvent(Y);
231
231
  });
232
232
  let k = !0;
233
233
  const { drop: t } = (I = s.eventListeners) == null ? void 0 : I.event;
234
234
  t && (k = await t({
235
235
  e,
236
- event: { ...E, start: L, end: B, schedule: ~~l },
237
- overlaps: E.getOverlappingEvents({ start: L, end: B, schedule: ~~l }),
236
+ event: { ...Y, start: L, end: B, schedule: ~~l },
237
+ overlaps: Y.getOverlappingEvents({ start: L, end: B, schedule: ~~l }),
238
238
  cell: v,
239
239
  external: be.fromVueCal !== _
240
- })), k !== !1 && n(), v.highlighted = !1, v.highlightedSchedule = null, qe = !1, be.toVueCal = _, w("event-dropped", { event: E, originalEvent: h, external: be.fromVueCal !== _ }), w("event-change", { event: E, originalEvent: h });
240
+ })), k !== !1 && n(), v.highlighted = !1, v.highlightedSchedule = null, qe = !1, be.toVueCal = _, w("event-dropped", {
241
+ e,
242
+ cell: v,
243
+ event: Y,
244
+ originalEvent: y,
245
+ external: be.fromVueCal !== _
246
+ });
241
247
  }
242
248
  };
243
249
  }
@@ -257,9 +263,9 @@ const st = (c) => {
257
263
  }, Date.prototype.subtractMinutes = function(a) {
258
264
  return e(this, a || 0);
259
265
  }, Date.prototype.getWeek = function() {
260
- return h(this);
266
+ return y(this);
261
267
  }, Date.prototype.isToday = function() {
262
- return E(this);
268
+ return Y(this);
263
269
  }, Date.prototype.isLeapYear = function() {
264
270
  return l(this);
265
271
  }, Date.prototype.format = function(a = "YYYY-MM-DD") {
@@ -270,108 +276,108 @@ const st = (c) => {
270
276
  }, V = () => {
271
277
  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;
272
278
  }, o = (a) => z.value = a, f = () => (i !== (/* @__PURE__ */ new Date()).getDate() && (s = /* @__PURE__ */ new Date(), i = s.getDate(), D = `${s.getFullYear()}-${s.getMonth()}-${s.getDate()}`), D), b = (a, p) => {
273
- const y = new Date(a.valueOf());
274
- return y.setDate(y.getDate() + p), y;
279
+ const h = new Date(a.valueOf());
280
+ return h.setDate(h.getDate() + p), h;
275
281
  }, N = (a, p) => {
276
- const y = new Date(a.valueOf());
277
- return y.setDate(y.getDate() - p), y;
282
+ const h = new Date(a.valueOf());
283
+ return h.setDate(h.getDate() - p), h;
278
284
  }, G = (a, p) => {
279
- const y = new Date(a.valueOf());
280
- return y.setHours(y.getHours() + p), y;
285
+ const h = new Date(a.valueOf());
286
+ return h.setHours(h.getHours() + p), h;
281
287
  }, u = (a, p) => {
282
- const y = new Date(a.valueOf());
283
- return y.setHours(y.getHours() - p), y;
288
+ const h = new Date(a.valueOf());
289
+ return h.setHours(h.getHours() - p), h;
284
290
  }, d = (a, p) => {
285
- const y = new Date(a.valueOf());
286
- return y.setMinutes(y.getMinutes() + p), y;
291
+ const h = new Date(a.valueOf());
292
+ return h.setMinutes(h.getMinutes() + p), h;
287
293
  }, e = (a, p) => {
288
- const y = new Date(a.valueOf());
289
- return y.setMinutes(y.getMinutes() - p), y;
294
+ const h = new Date(a.valueOf());
295
+ return h.setMinutes(h.getMinutes() - p), h;
290
296
  }, v = (a, p) => {
291
- const y = (q) => {
297
+ const h = (q) => {
292
298
  const J = q % p;
293
299
  return J !== 0 && (q += J >= p / 2 ? p - J : -J), q;
294
300
  };
295
- if (typeof a == "number") return y(a);
301
+ if (typeof a == "number") return h(a);
296
302
  if (a instanceof Date) {
297
- let q = y(a.getMinutes());
303
+ let q = h(a.getMinutes());
298
304
  q >= 60 && (a.setHours(a.getHours() + 1), q = 0), a.setMinutes(q, 0, 0);
299
305
  }
300
- }, h = (a, p = !1) => {
301
- const y = new Date(Date.UTC(a.getFullYear(), a.getMonth(), a.getDate())), q = y.getUTCDay() || 7;
302
- y.setUTCDate(y.getUTCDate() + 4 - q);
303
- const J = new Date(Date.UTC(y.getUTCFullYear(), 0, 1));
304
- return Math.ceil(((y - J) / 864e5 + 1) / 7) + (p ? 1 : 0);
305
- }, E = (a) => `${a.getFullYear()}-${a.getMonth()}-${a.getDate()}` === f(), L = (a, p) => {
306
+ }, y = (a, p = !1) => {
307
+ const h = new Date(Date.UTC(a.getFullYear(), a.getMonth(), a.getDate())), q = h.getUTCDay() || 7;
308
+ h.setUTCDate(h.getUTCDate() + 4 - q);
309
+ const J = new Date(Date.UTC(h.getUTCFullYear(), 0, 1));
310
+ return Math.ceil(((h - J) / 864e5 + 1) / 7) + (p ? 1 : 0);
311
+ }, Y = (a) => `${a.getFullYear()}-${a.getMonth()}-${a.getDate()}` === f(), L = (a, p) => {
306
312
  if (!a || !p) return console.warn(`Vue Cal: missing date${a ? "2" : "1"} parameter for comparison with \`isSameDate(date1, date2)\`.`);
307
313
  if (I(a)) {
308
314
  if (!I(p)) return console.warn(`Vue Cal: invalid date2 provided for comparison with \`isSameDate(date1, date2)\`: \`${p}\`.`);
309
315
  } else return console.warn(`Vue Cal: invalid date1 provided for comparison with \`isSameDate(date1, date2)\`: \`${a}\`.`);
310
316
  return a.getFullYear() === p.getFullYear() && a.getMonth() === p.getMonth() && a.getDate() === p.getDate();
311
- }, B = (a, p, y) => I(a) ? a.getTime() >= p && a.getTime() <= y : console.warn(`Vue Cal: invalid date provided to \`isInRange(date, rangeStart, rangeEnd)\`: \`${a}\`.`), l = (a) => {
317
+ }, B = (a, p, h) => I(a) ? a.getTime() >= p && a.getTime() <= h : console.warn(`Vue Cal: invalid date provided to \`isInRange(date, rangeStart, rangeEnd)\`: \`${a}\`.`), l = (a) => {
312
318
  const p = a.getFullYear();
313
319
  return !(p % 400) || p % 100 && !(p % 4);
314
320
  }, n = (a = null, p) => {
315
- const y = a && new Date(a.valueOf()) || /* @__PURE__ */ new Date(), q = p ? 7 : 6;
316
- return y.setDate(y.getDate() - (y.getDay() + q) % 7), y;
321
+ const h = a && new Date(a.valueOf()) || /* @__PURE__ */ new Date(), q = p ? 7 : 6;
322
+ return h.setDate(h.getDate() - (h.getDay() + q) % 7), h;
317
323
  }, k = (a) => a instanceof Date ? a : (a.length === 10 && (a += " 00:00"), new Date(a.replace(/-/g, "/"))), t = (a) => a.getHours() * 60 + a.getMinutes(), O = (a, p) => {
318
324
  typeof a == "string" && (a = a.replace(/-/g, "/")), typeof p == "string" && (p = p.replace(/-/g, "/")), a = new Date(a).setHours(0, 0, 0, 0), p = new Date(p).setHours(0, 0, 1, 0);
319
- const y = (new Date(p).getTimezoneOffset() - new Date(a).getTimezoneOffset()) * 60 * 1e3;
320
- return Math.ceil((p - a - y) / (24 * 3600 * 1e3));
321
- }, P = (a, p, y) => Math.abs(a.getTime() - p.getTime()) <= y * 60 * 1e3, I = (a) => a && a instanceof Date && !isNaN(a), K = (a, p = "YYYY-MM-DD", y = null) => {
322
- if (y || (y = z.value), p || (p = "YYYY-MM-DD"), p === "YYYY-MM-DD") return oe(a);
325
+ const h = (new Date(p).getTimezoneOffset() - new Date(a).getTimezoneOffset()) * 60 * 1e3;
326
+ return Math.ceil((p - a - h) / (24 * 3600 * 1e3));
327
+ }, P = (a, p, h) => Math.abs(a.getTime() - p.getTime()) <= h * 60 * 1e3, I = (a) => a && a instanceof Date && !isNaN(a), K = (a, p = "YYYY-MM-DD", h = null) => {
328
+ if (h || (h = z.value), p || (p = "YYYY-MM-DD"), p === "YYYY-MM-DD") return oe(a);
323
329
  w = {}, _ = {};
324
330
  const q = {
325
- YYYY: () => Q(a, y).YYYY,
326
- YY: () => Q(a, y).YY(),
327
- M: () => Q(a, y).M,
328
- MM: () => Q(a, y).MM(),
329
- MMM: () => Q(a, y).MMM(),
330
- MMMM: () => Q(a, y).MMMM(),
331
- MMMMG: () => Q(a, y).MMMMG(),
332
- D: () => Q(a, y).D,
333
- DD: () => Q(a, y).DD(),
334
- S: () => Q(a, y).S(),
335
- d: () => Q(a, y).d,
336
- dd: () => Q(a, y).dd(),
337
- ddd: () => Q(a, y).ddd(),
338
- dddd: () => Q(a, y).dddd(),
339
- HH: () => ue(a, y).HH,
340
- H: () => ue(a, y).H,
341
- hh: () => ue(a, y).hh,
342
- h: () => ue(a, y).h,
343
- am: () => ue(a, y).am,
344
- AM: () => ue(a, y).AM,
345
- mm: () => ue(a, y).mm,
346
- m: () => ue(a, y).m,
347
- s: () => ue(a, y).s
331
+ YYYY: () => Q(a, h).YYYY,
332
+ YY: () => Q(a, h).YY(),
333
+ M: () => Q(a, h).M,
334
+ MM: () => Q(a, h).MM(),
335
+ MMM: () => Q(a, h).MMM(),
336
+ MMMM: () => Q(a, h).MMMM(),
337
+ MMMMG: () => Q(a, h).MMMMG(),
338
+ D: () => Q(a, h).D,
339
+ DD: () => Q(a, h).DD(),
340
+ S: () => Q(a, h).S(),
341
+ d: () => Q(a, h).d,
342
+ dd: () => Q(a, h).dd(),
343
+ ddd: () => Q(a, h).ddd(),
344
+ dddd: () => Q(a, h).dddd(),
345
+ HH: () => ue(a, h).HH,
346
+ H: () => ue(a, h).H,
347
+ hh: () => ue(a, h).hh,
348
+ h: () => ue(a, h).h,
349
+ am: () => ue(a, h).am,
350
+ AM: () => ue(a, h).AM,
351
+ mm: () => ue(a, h).mm,
352
+ m: () => ue(a, h).m,
353
+ s: () => ue(a, h).s
348
354
  };
349
355
  return p.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (J, ce) => {
350
356
  const r = q[ce.replace(/\{|\}/g, "")];
351
357
  return r !== void 0 ? r() : ce;
352
358
  });
353
359
  }, oe = (a) => {
354
- const p = a.getMonth() + 1, y = a.getDate();
355
- return `${a.getFullYear()}-${p < 10 ? "0" : ""}${p}-${y < 10 ? "0" : ""}${y}`;
356
- }, ae = (a, p = "HH:mm", y = null, q = !1) => {
360
+ const p = a.getMonth() + 1, h = a.getDate();
361
+ return `${a.getFullYear()}-${p < 10 ? "0" : ""}${p}-${h < 10 ? "0" : ""}${h}`;
362
+ }, ae = (a, p = "HH:mm", h = null, q = !1) => {
357
363
  let J = !1;
358
364
  if (q) {
359
365
  const [$, S, M] = [a.getHours(), a.getMinutes(), a.getSeconds()];
360
366
  $ + S + M === 141 && (J = !0);
361
367
  }
362
368
  if (a instanceof Date && p === "HH:mm") return J ? "24:00" : re(a);
363
- _ = {}, y || (y = z.value);
364
- const ce = ue(a, y), r = p.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, ($, S) => {
369
+ _ = {}, h || (h = z.value);
370
+ const ce = ue(a, h), r = p.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, ($, S) => {
365
371
  const M = ce[S.replace(/\{|\}/g, "")];
366
372
  return M !== void 0 ? M : S;
367
373
  });
368
374
  return J ? r.replace("23:59", "24:00") : r;
369
375
  }, re = (a) => {
370
- const p = a.getHours(), y = a.getMinutes();
371
- return `${(p < 10 ? "0" : "") + p}:${(y < 10 ? "0" : "") + y}`;
376
+ const p = a.getHours(), h = a.getMinutes();
377
+ return `${(p < 10 ? "0" : "") + p}:${(h < 10 ? "0" : "") + h}`;
372
378
  }, De = (a) => {
373
- const p = Math.floor(a / 60).toString().padStart(2, 0), y = (a % 60).toString().padStart(2, 0);
374
- return `${p}:${y}`;
379
+ const p = Math.floor(a / 60).toString().padStart(2, 0), h = (a % 60).toString().padStart(2, 0);
380
+ return `${p}:${h}`;
375
381
  }, x = (a) => {
376
382
  if (a > 3 && a < 21) return "th";
377
383
  switch (a % 10) {
@@ -386,12 +392,12 @@ const st = (c) => {
386
392
  }
387
393
  }, Q = (a, p) => {
388
394
  if (w.D) return w;
389
- const y = a.getFullYear(), q = a.getMonth() + 1, J = a.getDate(), r = (a.getDay() - 1 + 7) % 7;
395
+ const h = a.getFullYear(), q = a.getMonth() + 1, J = a.getDate(), r = (a.getDay() - 1 + 7) % 7;
390
396
  return w = {
391
397
  // Year.
392
- YYYY: y,
398
+ YYYY: h,
393
399
  // 2024.
394
- YY: () => y.toString().substring(2),
400
+ YY: () => h.toString().substring(2),
395
401
  // 24.
396
402
  // Month.
397
403
  M: q,
@@ -424,13 +430,13 @@ const st = (c) => {
424
430
  }, w;
425
431
  }, ue = (a, p) => {
426
432
  if (_.am) return _;
427
- let y, q, J;
428
- a instanceof Date ? (y = a.getHours(), q = a.getMinutes(), J = a.getSeconds()) : (y = Math.floor(a / 60), q = Math.floor(a % 60));
429
- const ce = y % 12 ? y % 12 : 12, r = (p || { am: "am", pm: "pm" })[y === 24 || y < 12 ? "am" : "pm"];
433
+ let h, q, J;
434
+ a instanceof Date ? (h = a.getHours(), q = a.getMinutes(), J = a.getSeconds()) : (h = Math.floor(a / 60), q = Math.floor(a % 60));
435
+ const ce = h % 12 ? h % 12 : 12, r = (p || { am: "am", pm: "pm" })[h === 24 || h < 12 ? "am" : "pm"];
430
436
  return _ = {
431
- H: y,
437
+ H: h,
432
438
  h: ce,
433
- HH: y.toString().padStart(2, 0),
439
+ HH: h.toString().padStart(2, 0),
434
440
  hh: ce.toString().padStart(2, 0),
435
441
  am: r,
436
442
  AM: r.toUpperCase(),
@@ -450,8 +456,8 @@ const st = (c) => {
450
456
  addMinutes: d,
451
457
  subtractMinutes: e,
452
458
  snapToInterval: v,
453
- getWeek: h,
454
- isToday: E,
459
+ getWeek: y,
460
+ isToday: Y,
455
461
  isSameDate: L,
456
462
  isInRange: B,
457
463
  isLeapYear: l,
@@ -483,11 +489,11 @@ const st = (c) => {
483
489
  };
484
490
  return i.events.sort((e, v) => e.start - v.start < 0 ? -1 : 1).forEach((e) => {
485
491
  _(e), e._ || (e._ = {}), e._.id = e._.id || ++D, e.delete || (e.delete = (v) => f(e._.id, v)), e._.deleting = !1, e._.deleted = !1, e.isOverlapping = (v = null) => e.getOverlappingEvents(v).length, e.getOverlappingEvents = (v = null) => {
486
- var h;
492
+ var y;
487
493
  return N(
488
494
  m(s.formatDate((v == null ? void 0 : v.start) || e.start), !0),
489
495
  { start: (v == null ? void 0 : v.start) || e.start, end: (v == null ? void 0 : v.end) || e.end },
490
- { excludeIds: [e._.id], schedule: (h = i.schedules) != null && h.length ? ~~((v == null ? void 0 : v.schedule) || e.schedule) : null }
496
+ { excludeIds: [e._.id], schedule: (y = i.schedules) != null && y.length ? ~~((v == null ? void 0 : v.schedule) || e.schedule) : null }
491
497
  );
492
498
  }, e._.register = (v) => {
493
499
  e._.$el = v, e._.fireCreated && (c.emit("event-created", e), delete e._.fireCreated);
@@ -501,11 +507,11 @@ const st = (c) => {
501
507
  return;
502
508
  } else u.end.getTime() < u.start.getTime() && console.error(`Vue Cal: invalid event dates for event "${u.title}". The event ends before it starts.`, u.start, u.end);
503
509
  u._ || (u._ = {}), u._.multiday = !s.isSameDate(u.start, new Date(u.end.getTime() - 1)), u._.startFormatted = s.formatDate(u.start), u._.startMinutes = ~~s.dateToMinutes(u.start), u._.endMinutes = ~~s.dateToMinutes(u.end);
504
- const d = u.start.getHours(), e = u.start.getMinutes().toString().padStart(2, 0), v = u.end.getHours(), h = u.end.getMinutes().toString().padStart(2, 0);
505
- u._.startTimeFormatted24 = `${d.toString().padStart(2, 0)}:${e}`, u._.startTimeFormatted12 = `${d % 12 || 12}${e ? `:${e}` : ""} ${d < 12 ? "AM" : "PM"}`, u._.endTimeFormatted24 = `${v.toString().padStart(2, 0)}:${h}`, u._.endTimeFormatted12 = `${v % 12 || 12}${h ? `:${h}` : ""} ${v < 12 ? "AM" : "PM"}`, u._.duration = Math.abs(~~((u.end - u.start) / 6e4));
510
+ const d = u.start.getHours(), e = u.start.getMinutes().toString().padStart(2, 0), v = u.end.getHours(), y = u.end.getMinutes().toString().padStart(2, 0);
511
+ u._.startTimeFormatted24 = `${d.toString().padStart(2, 0)}:${e}`, u._.startTimeFormatted12 = `${d % 12 || 12}${e ? `:${e}` : ""} ${d < 12 ? "AM" : "PM"}`, u._.endTimeFormatted24 = `${v.toString().padStart(2, 0)}:${y}`, u._.endTimeFormatted12 = `${v % 12 || 12}${y ? `:${y}` : ""} ${v < 12 ? "AM" : "PM"}`, u._.duration = Math.abs(~~((u.end - u.start) / 6e4));
506
512
  }, z = (u) => w.value.byId[u], m = (u, d = !1, e = !1) => {
507
513
  let v = w.value.byDate[u] || [];
508
- return v = d || e ? v.map(z) : v, e || (v = v.filter((h) => !h.background), d || (v = v.map((h) => h._.id))), v;
514
+ return v = d || e ? v.map(z) : v, e || (v = v.filter((y) => !y.background), d || (v = v.map((y) => y._.id))), v;
509
515
  }, V = (u) => {
510
516
  const d = {};
511
517
  return u.forEach(({ startFormatted: e }) => {
@@ -520,11 +526,11 @@ const st = (c) => {
520
526
  }
521
527
  return i.snapToInterval && (s.snapToInterval(u.start, i.snapToInterval), s.snapToInterval(u.end, i.snapToInterval)), u = { ...u }, u._ || (u._ = {}), u._.id = ++D, u._.fireCreated = !0, i.events.push(u), u;
522
528
  }, f = (u, d = 0) => {
523
- var h;
529
+ var y;
524
530
  if (!i.editableEvents.delete)
525
531
  return console.info("Vue Cal: Event deletion is disabled. Enable it with the `editable-events` props.");
526
532
  if (!u) return console.warn("Vue Cal: Cannot delete event without its ID.");
527
- const e = i.events.findIndex((E) => E._.id === u);
533
+ const e = i.events.findIndex((Y) => Y._.id === u);
528
534
  if (e === -1) return console.warn(`Vue Cal: Cannot delete unknown event \`${u}\`.`);
529
535
  const v = i.events[e];
530
536
  if (v.deletable === !1) return console.warn(`Vue Cal: Can't delete event \`${u}\` since it was explicitely set to \`delete: false\`.`);
@@ -540,7 +546,7 @@ const st = (c) => {
540
546
  // When explicitly using this stage, the event will be visually deleted but still present in the
541
547
  // source of truth until the cell is unmounted (by navigating away).
542
548
  case 2:
543
- v._.deleted = !0, i.events[e]._.deleted = !0, (h = v._.$el) == null || h.dispatchEvent(new CustomEvent("event-deleted", { detail: v._.id }));
549
+ v._.deleted = !0, i.events[e]._.deleted = !0, (y = v._.$el) == null || y.dispatchEvent(new CustomEvent("event-deleted", { detail: v._.id }));
544
550
  break;
545
551
  // Effective deletion from the source of truth (by default, when unmounting the cell).
546
552
  case 3:
@@ -551,20 +557,20 @@ const st = (c) => {
551
557
  }, b = (u) => {
552
558
  const d = m(u, !0);
553
559
  if (!d.length) return { cellOverlaps: {}, longestStreak: 0 };
554
- let e = {}, v = [], h = 0;
555
- d.sort((E, L) => E.start - L.start || E.end - E.start - (L.end - L.start));
556
- for (const E of d) {
557
- const L = E._.id;
558
- e[L] || (e[L] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), v = v.filter((t) => t.end > E.start);
560
+ let e = {}, v = [], y = 0;
561
+ d.sort((Y, L) => Y.start - L.start || Y.end - Y.start - (L.end - L.start));
562
+ for (const Y of d) {
563
+ const L = Y._.id;
564
+ e[L] || (e[L] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), v = v.filter((t) => t.end > Y.start);
559
565
  let B = v.filter((t) => {
560
566
  var P;
561
- return (!((P = i.schedules) != null && P.length) || E.schedule === t.schedule) && t.start < E.end;
567
+ return (!((P = i.schedules) != null && P.length) || Y.schedule === t.schedule) && t.start < Y.end;
562
568
  }), l = new Set(B.map((t) => {
563
569
  var O;
564
570
  return ((O = e[t._.id]) == null ? void 0 : O.position) ?? 0;
565
571
  })), n = 0;
566
572
  for (; l.has(n); ) n++;
567
- e[L].position = n, v.push(E);
573
+ e[L].position = n, v.push(Y);
568
574
  let k = Math.max(1, ...B.map((t) => {
569
575
  var O;
570
576
  return ((O = e[t._.id]) == null ? void 0 : O.maxConcurrent) ?? 1;
@@ -572,19 +578,19 @@ const st = (c) => {
572
578
  e[L].maxConcurrent = Math.max(B.length + 1, k);
573
579
  for (const t of B)
574
580
  e[t._.id].overlaps.add(L), e[L].overlaps.add(t._.id), e[t._.id].maxConcurrent = e[L].maxConcurrent;
575
- h = Math.max(h, e[L].maxConcurrent);
581
+ y = Math.max(y, e[L].maxConcurrent);
576
582
  }
577
- for (const E in e) e[E].overlaps = [...e[E].overlaps];
578
- return { cellOverlaps: e, longestStreak: h };
579
- }, N = (u = [], { start: d, end: e }, { excludeIds: v = [], schedule: h = null }) => {
583
+ for (const Y in e) e[Y].overlaps = [...e[Y].overlaps];
584
+ return { cellOverlaps: e, longestStreak: y };
585
+ }, N = (u = [], { start: d, end: e }, { excludeIds: v = [], schedule: y = null }) => {
580
586
  var B;
581
- const E = new Set(v), L = [];
587
+ const Y = new Set(v), L = [];
582
588
  for (const l of u)
583
- !E.has((B = l._) == null ? void 0 : B.id) && (h === null || h === l.schedule) && G(l, d, e) && L.push(l);
589
+ !Y.has((B = l._) == null ? void 0 : B.id) && (y === null || y === l.schedule) && G(l, d, e) && L.push(l);
584
590
  return L;
585
591
  }, G = (u, d, e) => {
586
- const v = u.allDay || !i.time, h = v ? new Date(u.start).setHours(0, 0, 0, 0) : u.start.getTime(), E = v ? new Date(u.end).setHours(23, 59, 59, 999) : u.end.getTime(), L = v ? new Date(d).setHours(0, 0, 0, 0) : d.getTime(), B = v ? new Date(e).setHours(23, 59, 59, 999) : e.getTime();
587
- return E > L && h < B;
592
+ const v = u.allDay || !i.time, y = v ? new Date(u.start).setHours(0, 0, 0, 0) : u.start.getTime(), Y = v ? new Date(u.end).setHours(23, 59, 59, 999) : u.end.getTime(), L = v ? new Date(d).setHours(0, 0, 0, 0) : d.getTime(), B = v ? new Date(e).setHours(23, 59, 59, 999) : e.getTime();
593
+ return Y > L && y < B;
588
594
  };
589
595
  return {
590
596
  events: w,
@@ -617,11 +623,11 @@ const st = (c) => {
617
623
  const H = n.value.getTime(), R = t.value.getTime();
618
624
  return H <= g && g <= R;
619
625
  });
620
- function h() {
621
- o.value = /* @__PURE__ */ new Date(), N = setTimeout(h, 60 * 1e3);
626
+ function y() {
627
+ o.value = /* @__PURE__ */ new Date(), N = setTimeout(y, 60 * 1e3);
622
628
  }
623
- function E() {
624
- N = setTimeout(h, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), h();
629
+ function Y() {
630
+ N = setTimeout(y, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), y();
625
631
  }
626
632
  const L = T(() => {
627
633
  if (!c.availableViews[m.value]) return 1;
@@ -684,23 +690,23 @@ const st = (c) => {
684
690
  return R && typeof X == "string" ? X.substring(0, 3) : X;
685
691
  }
686
692
  function oe(g, H, R) {
687
- const { monthsArray: X, monthBeforeDay: ve, canTruncate: We, xs: Ce } = R, Me = g.getMonth(), Ee = g.getFullYear(), Ye = H.getMonth(), He = H.getFullYear(), Be = Me !== Ye, nt = Ee !== He, _e = We && (Ce || Be), Le = g.getDate(), ze = H.getDate();
688
- return nt ? ve ? `${K(Me, X, _e)} ${Le}, ${Ee} - ${K(Ye, X, _e)} ${ze}, ${He}` : `${Le} ${K(Me, X, _e)} ${Ee} - ${ze} ${K(Ye, X, _e)} ${He}` : Be ? ve ? `${K(Me, X, _e)} ${Le} - ${K(Ye, X, _e)} ${ze}, ${Ee}` : `${Le} ${K(Me, X, _e)} - ${ze} ${K(Ye, X, _e)} ${Ee}` : ve ? `${K(Me, X, _e)} ${Le}-${ze}, ${Ee}` : `${Le}-${ze} ${K(Me, X, _e)} ${Ee}`;
693
+ const { monthsArray: X, monthBeforeDay: ve, canTruncate: We, xs: Ce } = R, Me = g.getMonth(), Ye = g.getFullYear(), Ee = H.getMonth(), He = H.getFullYear(), Be = Me !== Ee, nt = Ye !== He, _e = We && (Ce || Be), Le = g.getDate(), ze = H.getDate();
694
+ return nt ? ve ? `${K(Me, X, _e)} ${Le}, ${Ye} - ${K(Ee, X, _e)} ${ze}, ${He}` : `${Le} ${K(Me, X, _e)} ${Ye} - ${ze} ${K(Ee, X, _e)} ${He}` : Be ? ve ? `${K(Me, X, _e)} ${Le} - ${K(Ee, X, _e)} ${ze}, ${Ye}` : `${Le} ${K(Me, X, _e)} - ${ze} ${K(Ee, X, _e)} ${Ye}` : ve ? `${K(Me, X, _e)} ${Le}-${ze}, ${Ye}` : `${Le}-${ze} ${K(Me, X, _e)} ${Ye}`;
689
695
  }
690
696
  const ae = T(() => {
691
- const { dateFormat: g, months: H, monthsGenitive: R, week: X, truncations: ve } = D, We = c.locale, Ce = ve !== !1, Me = g.indexOf("M") < g.indexOf("D"), Ee = R && We === "el" ? R : H;
697
+ const { dateFormat: g, months: H, monthsGenitive: R, week: X, truncations: ve } = D, We = c.locale, Ce = ve !== !1, Me = g.indexOf("M") < g.indexOf("D"), Ye = R && We === "el" ? R : H;
692
698
  switch (m.value) {
693
699
  case "day":
694
700
  return s.formatDate(n.value, g);
695
701
  case "days":
696
702
  case "week": {
697
- const Ye = {
698
- monthsArray: Ee,
703
+ const Ee = {
704
+ monthsArray: Ye,
699
705
  monthBeforeDay: Me,
700
706
  canTruncate: Ce,
701
707
  xs: c.xs
702
708
  };
703
- let He = oe(n.value, t.value, Ye);
709
+ let He = oe(n.value, t.value, Ee);
704
710
  if (m.value === "week") {
705
711
  const Be = s.getWeek(
706
712
  n.value,
@@ -711,8 +717,8 @@ const st = (c) => {
711
717
  return He;
712
718
  }
713
719
  case "month": {
714
- const Ye = `${c.xs && Ce ? "MMM" : "MMMM"} YYYY`;
715
- return s.formatDate(G.value, Ye);
720
+ const Ee = `${c.xs && Ce ? "MMM" : "MMMM"} YYYY`;
721
+ return s.formatDate(G.value, Ee);
716
722
  }
717
723
  case "year":
718
724
  return n.value.getFullYear();
@@ -739,7 +745,7 @@ const st = (c) => {
739
745
  b.value = new Date(b.value.getFullYear() - b.value.getFullYear() % l.value, 0, 1, 0, 0, 0, 0);
740
746
  break;
741
747
  }
742
- i("view-change", {
748
+ c.ready && i("view-change", {
743
749
  id: m.value,
744
750
  title: ae.value,
745
751
  start: G.value,
@@ -766,12 +772,12 @@ const st = (c) => {
766
772
  I.value ? x(I.value) : console.warn("Vue Cal: no narrower view is available.");
767
773
  }
768
774
  function a() {
769
- y(!1);
775
+ h(!1);
770
776
  }
771
777
  function p() {
772
- y(!0);
778
+ h(!0);
773
779
  }
774
- function y(g = !0) {
780
+ function h(g = !0) {
775
781
  let H = new Date(f.value);
776
782
  switch (m.value) {
777
783
  case "day":
@@ -841,8 +847,8 @@ const st = (c) => {
841
847
  return me(() => c.view, (g) => x(g, !1)), me(() => c.availableViews, De), me(() => c.datePicker, () => x("month", !1)), me(() => c.viewDate, (g) => J(g, !1)), me(() => c.selectedDate, (g) => ce(g, !1)), me(() => c.startWeekOnSunday, (g) => r(g)), me(() => c.hideWeekends, (g) => $(g)), me(() => c.hideWeekdays, S), me(() => l.value, () => {
842
848
  l.value > 90 && console.warn("Vue Cal: high cell count detected. Performance may degrade when interactions are enabled.");
843
849
  }), me(() => c.watchRealTime, (g) => {
844
- g && c.time ? E() : N = clearTimeout(N);
845
- }), re(), c.time && c.watchRealTime && E(), Xe(() => N = clearTimeout(N)), {
850
+ g && c.time ? Y() : N = clearTimeout(N);
851
+ }), re(), c.time && c.watchRealTime && Y(), Xe(() => N = clearTimeout(N)), {
846
852
  now: o,
847
853
  id: m,
848
854
  broaderView: P,
@@ -872,7 +878,7 @@ const st = (c) => {
872
878
  narrower: ue,
873
879
  previous: a,
874
880
  next: p,
875
- navigate: y,
881
+ navigate: h,
876
882
  goToToday: q,
877
883
  updateViewDate: J,
878
884
  updateSelectedDate: ce,
@@ -1040,22 +1046,22 @@ const st = (c) => {
1040
1046
  const s = Ne("vuecal"), { view: i, config: D } = s, w = () => {
1041
1047
  D.clickToNavigate && i.broader();
1042
1048
  }, _ = T(() => D.clickToNavigate ? { click: w } : {});
1043
- return (z, m) => (Y(), j("div", wt, [
1049
+ return (z, m) => (E(), j("div", wt, [
1044
1050
  F(z.$slots, "header", {
1045
1051
  view: C(i),
1046
1052
  availableViews: C(D).availableViews,
1047
1053
  vuecal: C(s)
1048
1054
  }),
1049
- z.$slots.header ? U("", !0) : (Y(), j(te, { key: 0 }, [
1050
- C(D).viewsBar ? (Y(), j("div", pt, [
1051
- (Y(!0), j(te, null, pe(C(D).availableViews, (V, o) => (Y(), j("button", {
1055
+ z.$slots.header ? U("", !0) : (E(), j(te, { key: 0 }, [
1056
+ C(D).viewsBar ? (E(), j("div", pt, [
1057
+ (E(!0), j(te, null, pe(C(D).availableViews, (V, o) => (E(), j("button", {
1052
1058
  class: ke(["vuecal__view-button", { "vuecal__view-button--active": C(i).id === o }]),
1053
1059
  onClick: (f) => C(i).switch(o),
1054
1060
  innerHTML: C(s).texts[o],
1055
1061
  type: "button"
1056
1062
  }, null, 10, kt))), 256))
1057
1063
  ])) : U("", !0),
1058
- C(D).titleBar ? (Y(), j("nav", _t, [
1064
+ C(D).titleBar ? (E(), j("nav", _t, [
1059
1065
  ge("button", {
1060
1066
  class: ke(["vuecal__nav vuecal__nav--prev", { "vuecal__nav--default": !z.$slots["previous-button"] }]),
1061
1067
  onClick: m[0] || (m[0] = (...V) => C(i).previous && C(i).previous(...V)),
@@ -1068,10 +1074,10 @@ const st = (c) => {
1068
1074
  name: `vuecal-slide-fade--${C(i).transitionDirection}`
1069
1075
  }, {
1070
1076
  default: Z(() => [
1071
- (Y(), j("div", {
1077
+ (E(), j("div", {
1072
1078
  key: C(i).id + C(i).start.getTime()
1073
1079
  }, [
1074
- z.$slots.title ? (Y(), Se(Ke(C(D).clickToNavigate && C(i).broaderView ? "button" : "div"), ye({
1080
+ z.$slots.title ? (E(), Se(Ke(C(D).clickToNavigate && C(i).broaderView ? "button" : "div"), ye({
1075
1081
  key: 0,
1076
1082
  class: "vuecal__title"
1077
1083
  }, Ie(_.value)), {
@@ -1079,7 +1085,7 @@ const st = (c) => {
1079
1085
  F(z.$slots, "title", se(ne(C(i))))
1080
1086
  ]),
1081
1087
  _: 3
1082
- }, 16)) : (Y(), Se(Ke(C(D).clickToNavigate && C(i).broaderView ? "button" : "div"), ye({
1088
+ }, 16)) : (E(), Se(Ke(C(D).clickToNavigate && C(i).broaderView ? "button" : "div"), ye({
1083
1089
  key: 1,
1084
1090
  class: "vuecal__title"
1085
1091
  }, Ie(_.value), {
@@ -1090,12 +1096,12 @@ const st = (c) => {
1090
1096
  _: 3
1091
1097
  }, 8, ["name"])
1092
1098
  ]),
1093
- C(D).todayButton ? (Y(), j(te, { key: 0 }, [
1099
+ C(D).todayButton ? (E(), j(te, { key: 0 }, [
1094
1100
  z.$slots["today-button"] ? F(z.$slots, "today-button", {
1095
1101
  key: 0,
1096
1102
  navigate: () => !C(i).containsToday && C(i).goToToday(),
1097
1103
  active: C(i).containsToday
1098
- }) : (Y(), j("button", {
1104
+ }) : (E(), j("button", {
1099
1105
  key: 1,
1100
1106
  class: ke(["vuecal__nav vuecal__nav--today vuecal__nav--default", { "vuecal__nav--active": C(i).containsToday }]),
1101
1107
  onClick: m[1] || (m[1] = (V) => !C(i).containsToday && C(i).goToToday()),
@@ -1118,10 +1124,10 @@ const st = (c) => {
1118
1124
  }, Mt = {
1119
1125
  key: 0,
1120
1126
  class: "vuecal__headings"
1121
- }, Et = {
1127
+ }, Yt = {
1122
1128
  key: 0,
1123
1129
  class: "vuecal__weekdays-headings"
1124
- }, Yt = ["onClick"], St = { class: "vuecal__weekday-day" }, Ct = {
1130
+ }, Et = ["onClick"], St = { class: "vuecal__weekday-day" }, Ct = {
1125
1131
  key: 0,
1126
1132
  class: "vuecal__weekday-date"
1127
1133
  }, Vt = {
@@ -1143,9 +1149,9 @@ const st = (c) => {
1143
1149
  (i.isDays || i.isWeek) && i.updateSelectedDate(o);
1144
1150
  }
1145
1151
  };
1146
- return (o, f) => z.value ? (Y(), j("div", Mt, [
1147
- C(i).isDay ? U("", !0) : (Y(), j("div", Et, [
1148
- (Y(!0), j(te, null, pe(m.value, (b, N) => (Y(), j("div", {
1152
+ return (o, f) => z.value ? (E(), j("div", Mt, [
1153
+ C(i).isDay ? U("", !0) : (E(), j("div", Yt, [
1154
+ (E(!0), j(te, null, pe(m.value, (b, N) => (E(), j("div", {
1149
1155
  class: ke(["vuecal__weekday", { "vuecal__weekday--today": b.isToday }]),
1150
1156
  key: N,
1151
1157
  onClick: (G) => V.click(b.date)
@@ -1156,14 +1162,14 @@ const st = (c) => {
1156
1162
  date: b.date
1157
1163
  }, () => [
1158
1164
  ge("span", St, le(b[_.value]), 1),
1159
- C(i).isMonth ? U("", !0) : (Y(), j("strong", Ct, le(b.dateNumber), 1))
1165
+ C(i).isMonth ? U("", !0) : (E(), j("strong", Ct, le(b.dateNumber), 1))
1160
1166
  ])
1161
- ], 10, Yt))), 128))
1167
+ ], 10, Et))), 128))
1162
1168
  ])),
1163
- C(D).schedules ? (Y(), j("div", Vt, [
1164
- (Y(!0), j(te, null, pe(m.value, (b, N) => (Y(), j(te, { key: N }, [
1165
- (Y(!0), j(te, null, pe(C(D).schedules, (G, u) => (Y(), j(te, { key: u }, [
1166
- o.$slots["schedule-heading"] ? (Y(), j("div", {
1169
+ C(D).schedules ? (E(), j("div", Vt, [
1170
+ (E(!0), j(te, null, pe(m.value, (b, N) => (E(), j(te, { key: N }, [
1171
+ (E(!0), j(te, null, pe(C(D).schedules, (G, u) => (E(), j(te, { key: u }, [
1172
+ o.$slots["schedule-heading"] ? (E(), j("div", {
1167
1173
  key: 0,
1168
1174
  class: ke(["vuecal__schedule vuecal__schedule--heading", G.class])
1169
1175
  }, [
@@ -1171,7 +1177,7 @@ const st = (c) => {
1171
1177
  schedule: G,
1172
1178
  view: C(i)
1173
1179
  })
1174
- ], 2)) : (Y(), j("div", {
1180
+ ], 2)) : (E(), j("div", {
1175
1181
  key: 1,
1176
1182
  class: ke(["vuecal__schedule vuecal__schedule--heading", G.class]),
1177
1183
  innerHTML: G.label
@@ -1199,8 +1205,8 @@ const st = (c) => {
1199
1205
  }
1200
1206
  return _;
1201
1207
  });
1202
- return (_, z) => (Y(), j("div", Pt, [
1203
- (Y(!0), j(te, null, pe(w.value, (m, V) => (Y(), j("div", {
1208
+ return (_, z) => (E(), j("div", Pt, [
1209
+ (E(!0), j(te, null, pe(w.value, (m, V) => (E(), j("div", {
1204
1210
  class: "vuecal__time-cell",
1205
1211
  key: V
1206
1212
  }, [
@@ -1326,7 +1332,7 @@ const st = (c) => {
1326
1332
  const n = ((t = l.touches) == null ? void 0 : t[0]) || l;
1327
1333
  f.fromResizer = n.target.matches(".vuecal__event-resizer, .vuecal__event-resizer *");
1328
1334
  const k = V.value.getBoundingClientRect();
1329
- f.startX = (((O = l.touches) == null ? void 0 : O[0]) || l).clientX - k.left, f.startY = (((P = l.touches) == null ? void 0 : P[0]) || l).clientY - k.top, f.startPercentageX = f.startX * 100 / k.width, f.startPercentageY = f.startY * 100 / k.height, f.cellEl = V.value.closest(".vuecal__cell"), f.resizeStartDate = o.start, B(l.type === "touchstart" ? "touchmove" : "mousemove", v), B(l.type === "touchstart" ? "touchend" : "mouseup", h, { once: !0 }), f.holdTimer = setTimeout(() => {
1335
+ f.startX = (((O = l.touches) == null ? void 0 : O[0]) || l).clientX - k.left, f.startY = (((P = l.touches) == null ? void 0 : P[0]) || l).clientY - k.top, f.startPercentageX = f.startX * 100 / k.width, f.startPercentageY = f.startY * 100 / k.height, f.cellEl = V.value.closest(".vuecal__cell"), f.resizeStartDate = o.start, B(l.type === "touchstart" ? "touchmove" : "mousemove", v), B(l.type === "touchstart" ? "touchend" : "mouseup", y, { once: !0 }), f.holdTimer = setTimeout(() => {
1330
1336
  var I, K;
1331
1337
  f.holding = !0, (K = (I = d.value).hold) == null || K.call(I, { e: l, event: o });
1332
1338
  }, 1e3);
@@ -1338,7 +1344,7 @@ const st = (c) => {
1338
1344
  f.moveX = n.clientX - K, f.moveY = n.clientY - I, f.movePercentageX = f.moveX * 100 / oe, f.movePercentageY = f.moveY * 100 / ae;
1339
1345
  }
1340
1346
  if (f.fromResizer) {
1341
- const { newStart: I, newEnd: K } = E(o);
1347
+ const { newStart: I, newEnd: K } = Y(o);
1342
1348
  let oe = !0;
1343
1349
  const { resize: ae } = (P = i.eventListeners) == null ? void 0 : P.event;
1344
1350
  ae && (oe = await ae({
@@ -1347,10 +1353,10 @@ const st = (c) => {
1347
1353
  overlaps: o.getOverlappingEvents({ start: I, end: K })
1348
1354
  })), oe !== !1 ? (o.start = I, o.end = K, f.resizingLastAcceptedEvent && (f.resizingLastAcceptedEvent = null)) : ae && (f.resizingLastAcceptedEvent = { ...o, _: { ...o._ } });
1349
1355
  }
1350
- }, h = async (l) => {
1356
+ }, y = async (l) => {
1351
1357
  var n, k;
1352
1358
  if (f.holdTimer = clearTimeout(f.holdTimer), f.holding = !1, f.resizing) {
1353
- const { newStart: t, newEnd: O } = E(o);
1359
+ const { newStart: t, newEnd: O } = Y(o);
1354
1360
  let P = !0;
1355
1361
  const I = d.value["resize-end"];
1356
1362
  I && (P = await I({
@@ -1362,7 +1368,7 @@ const st = (c) => {
1362
1368
  })), o.start = P === !1 ? (f.resizingLastAcceptedEvent || f.resizingOriginalEvent).start : ((n = f.resizingLastAcceptedEvent) == null ? void 0 : n.start) || t, o.end = P === !1 ? (f.resizingLastAcceptedEvent || f.resizingOriginalEvent).end : ((k = f.resizingLastAcceptedEvent) == null ? void 0 : k.end) || O, o._.duration < 1 && (o.start = f.resizingOriginalEvent.start, o.end = f.resizingOriginalEvent.end), _.isResizingEvent = !1;
1363
1369
  }
1364
1370
  document.removeEventListener(l.type === "touchend" ? "touchmove" : "mousemove", v), f.resizing = !1, f.fromResizer = !1, f.dragging = !1, f.startX = 0, f.startY = 0, f.moveX = 0, f.moveY = 0, f.startPercentageX = 0, f.startPercentageY = 0, f.movePercentageX = 0, f.movePercentageY = 0, f.cellEl = null, f.resizeStartDate = null, f.resizingOriginalEvent = null, f.resizingLastAcceptedEvent = null, f.schedule = null;
1365
- }, E = (l) => {
1371
+ }, Y = (l) => {
1366
1372
  const n = new Date(l.start.getFullYear(), l.start.getMonth(), l.start.getDate());
1367
1373
  new Date(n).setDate(n.getDate() + 1);
1368
1374
  let t = Pe(f.movePercentageY, i);
@@ -1381,7 +1387,7 @@ const st = (c) => {
1381
1387
  o._.unregister(), L.forEach(({ event: l, handler: n, options: k }) => {
1382
1388
  document.removeEventListener(l, n, k);
1383
1389
  });
1384
- }), (l, n) => (Y(), j("div", ye({ class: "vuecal__event" }, Ie(d.value, !0), {
1390
+ }), (l, n) => (E(), j("div", ye({ class: "vuecal__event" }, Ie(d.value, !0), {
1385
1391
  ref_key: "eventEl",
1386
1392
  ref: V,
1387
1393
  class: G.value,
@@ -1393,7 +1399,7 @@ const st = (c) => {
1393
1399
  ge("div", zt, [
1394
1400
  F(l.$slots, "event", { event: o }, () => [
1395
1401
  ge("div", Ft, le(o.title), 1),
1396
- C(i).time ? (Y(), j("div", Nt, le(o._[`startTimeFormatted${C(i).twelveHour ? 12 : 24}`]) + `
1402
+ C(i).time ? (E(), j("div", Nt, le(o._[`startTimeFormatted${C(i).twelveHour ? 12 : 24}`]) + `
1397
1403
  - ` + le(o._[`endTimeFormatted${C(i).twelveHour ? 12 : 24}`]), 1)) : U("", !0),
1398
1404
  ge("div", {
1399
1405
  class: "vuecal__event-content",
@@ -1401,7 +1407,7 @@ const st = (c) => {
1401
1407
  }, null, 8, Wt)
1402
1408
  ])
1403
1409
  ]),
1404
- N.value ? (Y(), j("div", {
1410
+ N.value ? (E(), j("div", {
1405
1411
  key: 0,
1406
1412
  class: "vuecal__event-resizer",
1407
1413
  onDragstart: n[0] || (n[0] = Qe(() => {
@@ -1409,7 +1415,7 @@ const st = (c) => {
1409
1415
  }, null, 32)) : U("", !0),
1410
1416
  Oe(Ge, { name: "vuecal-delete-btn" }, {
1411
1417
  default: Z(() => [
1412
- o._.deleting ? (Y(), j("div", {
1418
+ o._.deleting ? (E(), j("div", {
1413
1419
  key: 0,
1414
1420
  class: "vuecal__event-delete",
1415
1421
  onClick: n[1] || (n[1] = Qe((k) => o.delete(3), ["stop"]))
@@ -1473,7 +1479,7 @@ const st = (c) => {
1473
1479
  movePercentageX: 0,
1474
1480
  movePercentageY: 0,
1475
1481
  schedule: null
1476
- }), e = ie(!1), v = ie({ cellOverlaps: {}, longestStreak: 0 }), h = T(() => {
1482
+ }), e = ie(!1), v = ie({ cellOverlaps: {}, longestStreak: 0 }), y = T(() => {
1477
1483
  let r = Math.min(d.startPercentageY, d.movePercentageY), $ = Math.max(d.startPercentageY, d.movePercentageY), S = Pe(r, w), M = Pe($, w);
1478
1484
  return w.snapToInterval && (S = _.snapToInterval(S, w.snapToInterval), M = _.snapToInterval(M, w.snapToInterval), r = Ve(S, w), $ = Ve(M, w)), {
1479
1485
  style: {
@@ -1486,7 +1492,7 @@ const st = (c) => {
1486
1492
  end: _.formatMinutes(M),
1487
1493
  ...d.schedule ? { schedule: d.schedule } : {}
1488
1494
  };
1489
- }), E = T(() => {
1495
+ }), Y = T(() => {
1490
1496
  const r = w.editableEvents.create && (d.dragging || e.value), $ = w.eventCreateMinDrag && d.thresholdPassed || !w.eventCreateMinDrag;
1491
1497
  return r && $;
1492
1498
  }), L = T(() => {
@@ -1618,7 +1624,7 @@ const st = (c) => {
1618
1624
  var S, M;
1619
1625
  d.schedule = ~~r.target.dataset.schedule;
1620
1626
  const $ = f.value.getBoundingClientRect();
1621
- d.startX = (((S = r.touches) == null ? void 0 : S[0]) || r).clientX - $.left, d.startY = (((M = r.touches) == null ? void 0 : M[0]) || r).clientY - $.top, d.startPercentageX = d.startX * 100 / $.width, d.startPercentageY = d.startY * 100 / $.height, d.thresholdPassed = !1, document.addEventListener(r.type === "touchstart" ? "touchmove" : "mousemove", p), document.addEventListener(r.type === "touchstart" ? "touchend" : "mouseup", y, { once: !0 }), d.holdTimer = setTimeout(() => {
1627
+ d.startX = (((S = r.touches) == null ? void 0 : S[0]) || r).clientX - $.left, d.startY = (((M = r.touches) == null ? void 0 : M[0]) || r).clientY - $.top, d.startPercentageX = d.startX * 100 / $.width, d.startPercentageY = d.startY * 100 / $.height, d.thresholdPassed = !1, document.addEventListener(r.type === "touchstart" ? "touchmove" : "mousemove", p), document.addEventListener(r.type === "touchstart" ? "touchend" : "mouseup", h, { once: !0 }), d.holdTimer = setTimeout(() => {
1622
1628
  var W, A;
1623
1629
  d.holding = !0, (A = (W = De.value).hold) == null || A.call(W, { e: r, cell: x.value, cursor: Q.value });
1624
1630
  }, 1e3);
@@ -1627,14 +1633,14 @@ const st = (c) => {
1627
1633
  d.dragging || (V.isDraggingCell = !0, (M = (S = De.value).dragStart) == null || M.call(S, { e: r, cell: x.value, cursor: Q.value })), d.dragging = !0, d.holdTimer = clearTimeout(d.holdTimer), d.holding = !1;
1628
1634
  const $ = f.value.getBoundingClientRect();
1629
1635
  d.moveX = (((W = r.touches) == null ? void 0 : W[0]) || r).clientX - $.left, d.moveY = (((A = r.touches) == null ? void 0 : A[0]) || r).clientY - $.top, d.movePercentageX = d.moveX * 100 / $.width, d.movePercentageY = d.moveY * 100 / $.height, w.eventCreateMinDrag && Math.abs(d.startY - d.moveY) > w.eventCreateMinDrag && (d.thresholdPassed = !0), (de = (ee = De.value).drag) == null || de.call(ee, { e: r, cell: x.value, cursor: Q.value });
1630
- }, y = async (r) => {
1636
+ }, h = async (r) => {
1631
1637
  var $, S;
1632
1638
  document.removeEventListener(r.type === "touchend" ? "touchmove" : "mousemove", p, { passive: !1 }), d.dragging && ((S = ($ = De.value).dragEnd) == null || S.call($, { e: r, cell: x.value, cursor: Q.value }), V.isDraggingCell = !1, w.editableEvents.create && (e.value = !0, await q(r), e.value = !1)), d.holdTimer = clearTimeout(d.holdTimer), d.holding = !1, d.dragging = !1, d.startX = 0, d.startY = 0, d.moveX = 0, d.moveY = 0, d.startPercentageX = 0, d.startPercentageY = 0, d.movePercentageX = 0, d.movePercentageY = 0, d.thresholdPassed = !1, d.schedule = null;
1633
1639
  }, q = async (r) => {
1634
- if (!E.value) return;
1635
- let { start: $, end: S, startMinutes: M, endMinutes: W } = h.value;
1640
+ if (!Y.value) return;
1641
+ let { start: $, end: S, startMinutes: M, endMinutes: W } = y.value;
1636
1642
  $ = new Date(s.start), $.setMinutes(M), S = new Date(s.start), S.setMinutes(W);
1637
- let A = { ...h.value, start: $, end: S };
1643
+ let A = { ...y.value, start: $, end: S };
1638
1644
  const { create: ee } = w.eventListeners.event;
1639
1645
  if (typeof ee == "function") {
1640
1646
  const de = A;
@@ -1658,7 +1664,7 @@ const st = (c) => {
1658
1664
  // Use flush: 'post' to prevent infinite updates.
1659
1665
  ), Xe(async () => {
1660
1666
  b.value.forEach((r) => z.deleteEvent(r, 3)), J(), await Ue();
1661
- }), (r, $) => (Y(), j("div", ye({
1667
+ }), (r, $) => (E(), j("div", ye({
1662
1668
  class: ["vuecal__cell", L.value],
1663
1669
  ref_key: "cellEl",
1664
1670
  ref: f
@@ -1670,12 +1676,12 @@ const st = (c) => {
1670
1676
  index: c.index,
1671
1677
  events: n.value
1672
1678
  }) : U("", !0),
1673
- I.value ? (Y(!0), j(te, { key: 1 }, pe(I.value, (S, M) => (Y(), j("div", {
1679
+ I.value ? (E(!0), j(te, { key: 1 }, pe(I.value, (S, M) => (E(), j("div", {
1674
1680
  class: ke(["vuecal__special-hours", S.class]),
1675
1681
  style: Te(S.style),
1676
1682
  innerHTML: S.label || ""
1677
1683
  }, null, 14, Bt))), 256)) : U("", !0),
1678
- !r.$slots.cell && C(w).schedules ? (Y(!0), j(te, { key: 2 }, pe(C(w).schedules, (S) => (Y(), j("div", {
1684
+ !r.$slots.cell && C(w).schedules ? (E(!0), j(te, { key: 2 }, pe(C(w).schedules, (S) => (E(), j("div", {
1679
1685
  class: ke(["vuecal__schedule vuecal__schedule--cell", S.class]),
1680
1686
  key: S.id,
1681
1687
  style: Te(S.style || null),
@@ -1687,7 +1693,7 @@ const st = (c) => {
1687
1693
  end: c.end,
1688
1694
  events: n.value
1689
1695
  }) : U("", !0),
1690
- l.value || r.$slots["cell-date"] ? (Y(), j("div", It, [
1696
+ l.value || r.$slots["cell-date"] ? (E(), j("div", It, [
1691
1697
  F(r.$slots, "cell-date", {
1692
1698
  start: c.start,
1693
1699
  end: c.end,
@@ -1696,20 +1702,20 @@ const st = (c) => {
1696
1702
  xe(le(l.value), 1)
1697
1703
  ])
1698
1704
  ])) : U("", !0),
1699
- r.$slots["cell-content"] ? (Y(), j("div", Rt, [
1705
+ r.$slots["cell-content"] ? (E(), j("div", Rt, [
1700
1706
  F(r.$slots, "cell-content", {
1701
1707
  start: c.start,
1702
1708
  end: c.end,
1703
1709
  events: n.value
1704
1710
  })
1705
1711
  ])) : U("", !0),
1706
- r.$slots["cell-events"] && n.value.length ? (Y(), j("div", Xt, [
1712
+ r.$slots["cell-events"] && n.value.length ? (E(), j("div", Xt, [
1707
1713
  F(r.$slots, "cell-events", {
1708
1714
  start: c.start,
1709
1715
  end: c.end,
1710
1716
  events: n.value
1711
1717
  })
1712
- ])) : n.value.length || N.value ? (Y(), Se(et, {
1718
+ ])) : n.value.length || N.value ? (E(), Se(et, {
1713
1719
  key: 4,
1714
1720
  class: "vuecal__cell-events",
1715
1721
  name: "vuecal-event-delete",
@@ -1718,7 +1724,7 @@ const st = (c) => {
1718
1724
  tag: "div"
1719
1725
  }, {
1720
1726
  default: Z(() => [
1721
- (Y(!0), j(te, null, pe(t.value[S.id], (M) => (Y(), Se(at, {
1727
+ (E(!0), j(te, null, pe(t.value[S.id], (M) => (E(), Se(at, {
1722
1728
  key: M._.id,
1723
1729
  event: M,
1724
1730
  onEventDeleted: G,
@@ -1735,15 +1741,15 @@ const st = (c) => {
1735
1741
  ]),
1736
1742
  _: 2
1737
1743
  }, 1024)) : U("", !0),
1738
- E.value && d.schedule === S.id ? (Y(), j("div", {
1744
+ Y.value && d.schedule === S.id ? (E(), j("div", {
1739
1745
  key: 5,
1740
1746
  class: "vuecal__event-placeholder",
1741
- style: Te(h.value.style)
1742
- }, le(h.value.start) + " - " + le(h.value.end), 5)) : U("", !0)
1747
+ style: Te(y.value.style)
1748
+ }, le(y.value.start) + " - " + le(y.value.end), 5)) : U("", !0)
1743
1749
  ], 14, At))), 128)) : U("", !0),
1744
- !r.$slots.cell && !C(w).schedules ? (Y(), j(te, { key: 3 }, [
1750
+ !r.$slots.cell && !C(w).schedules ? (E(), j(te, { key: 3 }, [
1745
1751
  r.$slots["cell-events"] ? F(r.$slots, "cell-events", { key: 0 }) : U("", !0),
1746
- l.value || r.$slots["cell-date"] ? (Y(), j("div", Gt, [
1752
+ l.value || r.$slots["cell-date"] ? (E(), j("div", Gt, [
1747
1753
  F(r.$slots, "cell-date", {
1748
1754
  start: c.start,
1749
1755
  end: c.end,
@@ -1752,20 +1758,20 @@ const st = (c) => {
1752
1758
  xe(le(l.value), 1)
1753
1759
  ])
1754
1760
  ])) : U("", !0),
1755
- r.$slots["cell-content"] ? (Y(), j("div", qt, [
1761
+ r.$slots["cell-content"] ? (E(), j("div", qt, [
1756
1762
  F(r.$slots, "cell-content", {
1757
1763
  start: c.start,
1758
1764
  end: c.end,
1759
1765
  events: n.value
1760
1766
  })
1761
1767
  ])) : U("", !0),
1762
- r.$slots["cell-events"] && n.value.length ? (Y(), j("div", Ut, [
1768
+ r.$slots["cell-events"] && n.value.length ? (E(), j("div", Ut, [
1763
1769
  F(r.$slots, "cell-events", {
1764
1770
  start: c.start,
1765
1771
  end: c.end,
1766
1772
  events: n.value
1767
1773
  })
1768
- ])) : (n.value.length || N.value) && !(C(D).isMonth && !C(w).eventsOnMonthView) ? (Y(), Se(et, {
1774
+ ])) : (n.value.length || N.value) && !(C(D).isMonth && !C(w).eventsOnMonthView) ? (E(), Se(et, {
1769
1775
  key: 4,
1770
1776
  class: "vuecal__cell-events",
1771
1777
  name: "vuecal-event-delete",
@@ -1774,7 +1780,7 @@ const st = (c) => {
1774
1780
  tag: "div"
1775
1781
  }, {
1776
1782
  default: Z(() => [
1777
- (Y(!0), j(te, null, pe(n.value, (S) => (Y(), Se(at, {
1783
+ (E(!0), j(te, null, pe(n.value, (S) => (E(), Se(at, {
1778
1784
  key: S._.id,
1779
1785
  event: S,
1780
1786
  onEventDeleted: G,
@@ -1791,17 +1797,17 @@ const st = (c) => {
1791
1797
  ]),
1792
1798
  _: 3
1793
1799
  })) : U("", !0),
1794
- E.value ? (Y(), j("div", {
1800
+ Y.value ? (E(), j("div", {
1795
1801
  key: 5,
1796
1802
  class: "vuecal__event-placeholder",
1797
- style: Te(h.value.style)
1798
- }, le(h.value.start) + " - " + le(h.value.end), 5)) : U("", !0)
1803
+ style: Te(y.value.style)
1804
+ }, le(y.value.start) + " - " + le(y.value.end), 5)) : U("", !0)
1799
1805
  ], 64)) : U("", !0),
1800
1806
  r.$slots["event-count"] ? F(r.$slots, "event-count", {
1801
1807
  key: 4,
1802
1808
  events: k.value
1803
- }) : P.value ? (Y(), j("div", Zt, le(k.value.length), 1)) : U("", !0),
1804
- re.show ? (Y(), j("div", {
1809
+ }) : P.value ? (E(), j("div", Zt, le(k.value.length), 1)) : U("", !0),
1810
+ re.show ? (E(), j("div", {
1805
1811
  key: 6,
1806
1812
  class: "vuecal__now-line",
1807
1813
  style: Te(re.style),
@@ -1837,7 +1843,7 @@ const st = (c) => {
1837
1843
  _.value.addEventListener("mousemove", o), _.value.addEventListener("touchmove", o), _.value.addEventListener("mouseleave", f), _.value.addEventListener("touchend", f);
1838
1844
  }), Xe(() => {
1839
1845
  _.value && (_.value.removeEventListener("mousemove", o), _.value.removeEventListener("touchmove", o), _.value.removeEventListener("mouseleave", f), _.value.removeEventListener("touchend", f));
1840
- }), (b, N) => (Y(), j("div", {
1846
+ }), (b, N) => (E(), j("div", {
1841
1847
  class: "vuecal__body",
1842
1848
  ref_key: "bodyEl",
1843
1849
  ref: _,
@@ -1845,7 +1851,7 @@ const st = (c) => {
1845
1851
  }, [
1846
1852
  Oe(Ge, { name: "vuecal-shrink" }, {
1847
1853
  default: Z(() => [
1848
- C(D).timeAtCursor && z.value !== null ? (Y(), j("div", {
1854
+ C(D).timeAtCursor && z.value !== null ? (E(), j("div", {
1849
1855
  key: 0,
1850
1856
  class: "vuecal__time-at-cursor",
1851
1857
  style: Te(V.value.style)
@@ -1855,7 +1861,7 @@ const st = (c) => {
1855
1861
  ]),
1856
1862
  _: 1
1857
1863
  }),
1858
- (Y(!0), j(te, null, pe(C(i).cellDates, (G, u) => (Y(), Se(Kt, {
1864
+ (E(!0), j(te, null, pe(C(i).cellDates, (G, u) => (E(), Se(Kt, {
1859
1865
  key: u,
1860
1866
  start: G.start,
1861
1867
  end: G.end,
@@ -1919,8 +1925,7 @@ const st = (c) => {
1919
1925
  "update:events",
1920
1926
  "event-delete",
1921
1927
  "event-created",
1922
- "event-dropped",
1923
- "event-change"
1928
+ "event-dropped"
1924
1929
  ],
1925
1930
  setup(c, { expose: s, emit: i }) {
1926
1931
  const D = c, w = i, _ = rt("vuecal-el"), z = ht({ props: D, emit: w, attrs: ot(), vuecalEl: _, uid: it() }), { config: m, view: V, dateUtils: o, touch: f } = z, b = T(() => m.time && (V.isDay || V.isDays || V.isWeek)), N = T(() => Array(V.rows).fill().map((e, v) => o.getWeek(o.addDays(V.firstCellDate, 7 * v)))), G = T(() => {
@@ -1953,8 +1958,8 @@ const st = (c) => {
1953
1958
  };
1954
1959
  });
1955
1960
  return Ze(async () => {
1956
- await Ue(), w("ready", { config: m, view: V });
1957
- }), me(() => m.locale, (e) => m.loadTexts(e)), ut("vuecal", z), s({ view: z.view }), (e, v) => (Y(), j("div", {
1961
+ await Ue(), m.ready = !0, w("ready", { config: m, view: V });
1962
+ }), me(() => m.locale, (e) => m.loadTexts(e)), ut("vuecal", z), s({ view: z.view }), (e, v) => (E(), j("div", {
1958
1963
  class: ke(["vuecal", G.value]),
1959
1964
  ref: "vuecal-el",
1960
1965
  "data-locale": e.locale,
@@ -1965,47 +1970,47 @@ const st = (c) => {
1965
1970
  vuecal: C(z),
1966
1971
  view: C(V),
1967
1972
  availableViews: C(m).availableViews
1968
- }) : (Y(), j(te, { key: 1 }, [
1973
+ }) : (E(), j(te, { key: 1 }, [
1969
1974
  Oe($t, null, je({ _: 2 }, [
1970
1975
  e.$slots.header ? {
1971
1976
  name: "header",
1972
- fn: Z((h) => [
1973
- F(e.$slots, "header", se(ne(h)))
1977
+ fn: Z((y) => [
1978
+ F(e.$slots, "header", se(ne(y)))
1974
1979
  ]),
1975
1980
  key: "0"
1976
1981
  } : void 0,
1977
1982
  !e.$slots.header && e.$slots["previous-button"] ? {
1978
1983
  name: "previous-button",
1979
- fn: Z((h) => [
1980
- F(e.$slots, "previous-button", se(ne(h)))
1984
+ fn: Z((y) => [
1985
+ F(e.$slots, "previous-button", se(ne(y)))
1981
1986
  ]),
1982
1987
  key: "1"
1983
1988
  } : void 0,
1984
1989
  !e.$slots.header && e.$slots["next-button"] ? {
1985
1990
  name: "next-button",
1986
- fn: Z((h) => [
1987
- F(e.$slots, "next-button", se(ne(h)))
1991
+ fn: Z((y) => [
1992
+ F(e.$slots, "next-button", se(ne(y)))
1988
1993
  ]),
1989
1994
  key: "2"
1990
1995
  } : void 0,
1991
1996
  !e.$slots.header && e.$slots["today-button"] ? {
1992
1997
  name: "today-button",
1993
- fn: Z((h) => [
1994
- F(e.$slots, "today-button", se(ne(h)))
1998
+ fn: Z((y) => [
1999
+ F(e.$slots, "today-button", se(ne(y)))
1995
2000
  ]),
1996
2001
  key: "3"
1997
2002
  } : void 0,
1998
2003
  !e.$slots.header && e.$slots.title ? {
1999
2004
  name: "title",
2000
- fn: Z((h) => [
2001
- F(e.$slots, "title", se(ne(h)))
2005
+ fn: Z((y) => [
2006
+ F(e.$slots, "title", se(ne(y)))
2002
2007
  ]),
2003
2008
  key: "4"
2004
2009
  } : void 0,
2005
2010
  !e.$slots.header && e.$slots["schedule-heading"] ? {
2006
2011
  name: "schedule-heading",
2007
- fn: Z((h) => [
2008
- F(e.$slots, "schedule-heading", se(ne(h)))
2012
+ fn: Z((y) => [
2013
+ F(e.$slots, "schedule-heading", se(ne(y)))
2009
2014
  ]),
2010
2015
  key: "5"
2011
2016
  } : void 0
@@ -2015,23 +2020,23 @@ const st = (c) => {
2015
2020
  name: `vuecal-slide-fade--${C(V).transitionDirection}`
2016
2021
  }, {
2017
2022
  default: Z(() => [
2018
- (Y(), j("div", {
2023
+ (E(), j("div", {
2019
2024
  class: ke(["vuecal__scrollable", d.value]),
2020
2025
  key: C(V).id + C(V).start.getTime()
2021
2026
  }, [
2022
- b.value ? (Y(), Se(Ht, { key: 0 }, je({ _: 2 }, [
2027
+ b.value ? (E(), Se(Ht, { key: 0 }, je({ _: 2 }, [
2023
2028
  e.$slots["time-cell"] ? {
2024
2029
  name: "time-cell",
2025
- fn: Z((h) => [
2026
- F(e.$slots, "time-cell", se(ne(h)))
2030
+ fn: Z((y) => [
2031
+ F(e.$slots, "time-cell", se(ne(y)))
2027
2032
  ]),
2028
2033
  key: "0"
2029
2034
  } : void 0
2030
2035
  ]), 1024)) : U("", !0),
2031
- C(m).weekNumbers && C(V).isMonth ? (Y(), j("div", ta, [
2032
- (Y(!0), j(te, null, pe(N.value, (h) => (Y(), j("div", aa, [
2036
+ C(m).weekNumbers && C(V).isMonth ? (E(), j("div", ta, [
2037
+ (E(!0), j(te, null, pe(N.value, (y) => (E(), j("div", aa, [
2033
2038
  F(e.$slots, "week-number", {}, () => [
2034
- ge("small", null, le(h), 1)
2039
+ ge("small", null, le(y), 1)
2035
2040
  ])
2036
2041
  ]))), 256))
2037
2042
  ])) : U("", !0),
@@ -2039,15 +2044,15 @@ const st = (c) => {
2039
2044
  Oe(jt, null, je({ _: 2 }, [
2040
2045
  e.$slots["weekday-heading"] ? {
2041
2046
  name: "weekday-heading",
2042
- fn: Z((h) => [
2043
- F(e.$slots, "weekday-heading", se(ne(h)))
2047
+ fn: Z((y) => [
2048
+ F(e.$slots, "weekday-heading", se(ne(y)))
2044
2049
  ]),
2045
2050
  key: "0"
2046
2051
  } : void 0,
2047
2052
  e.$slots["schedule-heading"] ? {
2048
2053
  name: "schedule-heading",
2049
- fn: Z((h) => [
2050
- F(e.$slots, "schedule-heading", se(ne(h)))
2054
+ fn: Z((y) => [
2055
+ F(e.$slots, "schedule-heading", se(ne(y)))
2051
2056
  ]),
2052
2057
  key: "1"
2053
2058
  } : void 0
@@ -2055,43 +2060,43 @@ const st = (c) => {
2055
2060
  Oe(Qt, null, je({ _: 2 }, [
2056
2061
  e.$slots.cell ? {
2057
2062
  name: "cell",
2058
- fn: Z((h) => [
2059
- F(e.$slots, "cell", se(ne(h)))
2063
+ fn: Z((y) => [
2064
+ F(e.$slots, "cell", se(ne(y)))
2060
2065
  ]),
2061
2066
  key: "0"
2062
2067
  } : void 0,
2063
2068
  !e.$slots.cell && e.$slots["cell-date"] ? {
2064
2069
  name: "cell-date",
2065
- fn: Z((h) => [
2066
- F(e.$slots, "cell-date", se(ne(h)))
2070
+ fn: Z((y) => [
2071
+ F(e.$slots, "cell-date", se(ne(y)))
2067
2072
  ]),
2068
2073
  key: "1"
2069
2074
  } : void 0,
2070
2075
  !e.$slots.cell && e.$slots["cell-content"] ? {
2071
2076
  name: "cell-content",
2072
- fn: Z((h) => [
2073
- F(e.$slots, "cell-content", se(ne(h)))
2077
+ fn: Z((y) => [
2078
+ F(e.$slots, "cell-content", se(ne(y)))
2074
2079
  ]),
2075
2080
  key: "2"
2076
2081
  } : void 0,
2077
2082
  !e.$slots.cell && e.$slots["cell-events"] ? {
2078
2083
  name: "cell-events",
2079
- fn: Z((h) => [
2080
- F(e.$slots, "cell-events", se(ne(h)))
2084
+ fn: Z((y) => [
2085
+ F(e.$slots, "cell-events", se(ne(y)))
2081
2086
  ]),
2082
2087
  key: "3"
2083
2088
  } : void 0,
2084
2089
  !e.$slots.cell && e.$slots.event ? {
2085
2090
  name: "event",
2086
- fn: Z((h) => [
2087
- F(e.$slots, "event", se(ne(h)))
2091
+ fn: Z((y) => [
2092
+ F(e.$slots, "event", se(ne(y)))
2088
2093
  ]),
2089
2094
  key: "4"
2090
2095
  } : void 0,
2091
2096
  !e.$slots.cell && e.$slots["event-count"] ? {
2092
2097
  name: "event-count",
2093
- fn: Z((h) => [
2094
- F(e.$slots, "event-count", se(ne(h)))
2098
+ fn: Z((y) => [
2099
+ F(e.$slots, "event-count", se(ne(y)))
2095
2100
  ]),
2096
2101
  key: "5"
2097
2102
  } : void 0
@@ -2128,8 +2133,8 @@ const st = (c) => {
2128
2133
  countDays: Ta,
2129
2134
  datesInSameTimeStep: $a,
2130
2135
  isValid: Ma,
2131
- formatDate: Ea,
2132
- formatDateLite: Ya,
2136
+ formatDate: Ya,
2137
+ formatDateLite: Ea,
2133
2138
  formatTime: Sa,
2134
2139
  formatTimeLite: Ca,
2135
2140
  formatMinutes: Va
@@ -2143,8 +2148,8 @@ export {
2143
2148
  Ta as countDays,
2144
2149
  ba as dateToMinutes,
2145
2150
  $a as datesInSameTimeStep,
2146
- Ea as formatDate,
2147
- Ya as formatDateLite,
2151
+ Ya as formatDate,
2152
+ Ea as formatDateLite,
2148
2153
  Va as formatMinutes,
2149
2154
  Sa as formatTime,
2150
2155
  Ca as formatTimeLite,