vue-cal 5.0.1-rc.19 → 5.0.1-rc.20

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,10 +1,10 @@
1
- import { computed as M, reactive as $e, watch as me, toRefs as wt, ref as ue, onBeforeUnmount as Xe, inject as Ne, createElementBlock as j, openBlock as C, renderSlot as P, createCommentVNode as K, unref as V, Fragment as re, renderList as ke, normalizeClass as ye, createElementVNode as ge, createVNode as Oe, Transition as Ge, withCtx as J, createBlock as Se, resolveDynamicComponent as Qe, mergeProps as de, toHandlers as Be, normalizeProps as ee, toDisplayString as ie, normalizeStyle as _e, onMounted as qe, withModifiers as xe, nextTick as Ue, createTextVNode as et, TransitionGroup as tt, createSlots as je, useTemplateRef as _t, useId as kt, useAttrs as bt, provide as $t, guardReactiveProps as ae } from "vue";
1
+ import { computed as M, reactive as $e, watch as fe, toRefs as wt, ref as ue, onBeforeUnmount as Xe, inject as Ne, createElementBlock as O, openBlock as C, renderSlot as P, createCommentVNode as q, unref as V, Fragment as oe, renderList as ke, normalizeClass as ye, createElementVNode as ve, createVNode as Oe, Transition as Ge, withCtx as J, createBlock as Se, resolveDynamicComponent as Qe, mergeProps as de, toHandlers as Be, normalizeProps as te, toDisplayString as ie, normalizeStyle as _e, onMounted as qe, withModifiers as xe, nextTick as Ue, createTextVNode as et, TransitionGroup as tt, createSlots as je, useTemplateRef as _t, useId as kt, useAttrs as bt, provide as $t, guardReactiveProps as ae } from "vue";
2
2
  /**
3
- * vue-cal v5.0.1-rc.19
3
+ * vue-cal v5.0.1-rc.20
4
4
  * (c) 2024-2025 Antoni Andre <antoniandre.web@gmail.com>
5
5
  * @license MIT
6
6
  */
7
- const fe = {
7
+ const ge = {
8
8
  texts: {
9
9
  weekDays: Array(7).fill(""),
10
10
  weekDaysShort: [],
@@ -35,11 +35,11 @@ const fe = {
35
35
  }
36
36
  }, Tt = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], Re = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], Mt = Re.reduce((y, s, r) => (y[s] = r || 7, y), {}), Yt = (y, s, r) => {
37
37
  const { dateUtils: d } = y, w = !1, b = M(() => {
38
- if (W.value[s.view]) return s.view;
38
+ if (A.value[s.view]) return s.view;
39
39
  const l = s.datePicker ? "month" : "week", p = s.view || l;
40
- return W.value[p] ? p : (console.warn(
41
- `Vue Cal: the provided or default view \`${p}\` is either invalid or not in the list of available views. The first available view will be chosen: \`${Object.keys(W.value)[0]}\`.`
42
- ), Object.keys(W.value)[0]);
40
+ return A.value[p] ? p : (console.warn(
41
+ `Vue Cal: the provided or default view \`${p}\` is either invalid or not in the list of available views. The first available view will be chosen: \`${Object.keys(A.value)[0]}\`.`
42
+ ), Object.keys(A.value)[0]);
43
43
  }), H = M(() => s.sm && !s.xs), f = M(() => s.xs || s.datePicker), F = M(() => s.clickToNavigate || s.datePicker && s.clickToNavigate !== !1), u = M(() => {
44
44
  const l = {
45
45
  cell: {},
@@ -48,27 +48,27 @@ const fe = {
48
48
  // All possible event listeners to attach to calendar events.
49
49
  }, p = (k) => k.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
50
50
  for (const [k, a] of Object.entries(r)) {
51
- const [O, B, R] = k.match(/^on(Cell|Event)(.+)$/) || [];
52
- O && (l[B.toLowerCase()][p(R).replace(/^-+|-+$/g, "")] = a);
51
+ const [j, R, N] = k.match(/^on(Cell|Event)(.+)$/) || [];
52
+ j && (l[R.toLowerCase()][p(N).replace(/^-+|-+$/g, "")] = a);
53
53
  }
54
54
  return l;
55
55
  }), m = M(() => {
56
56
  var p;
57
57
  const l = {};
58
58
  return s.hideWeekends && (l[6] = !0) && (l[7] = !0), (p = s.hideWeekdays) != null && p.length && s.hideWeekdays.forEach((k) => l[Mt[k]] = !0), l;
59
- }), Y = M(() => s.hideWeekends || m.value[6] && m.value[7]), W = M(() => {
59
+ }), Y = M(() => s.hideWeekends || m.value[6] && m.value[7]), A = M(() => {
60
60
  const l = s.datePicker;
61
61
  let p = 0, k = {};
62
62
  const a = s.views;
63
63
  return l && !a ? {
64
- month: { ...fe.availableViews.month },
65
- year: { ...fe.availableViews.year },
66
- years: { ...fe.availableViews.years }
67
- } : (a ? (Array.isArray(a) ? k = a.reduce((O, B) => (typeof B == "string" && fe.availableViews[B] ? O[B] = fe.availableViews[B] : p++, O), {}) : typeof a == "object" && (k = Object.entries(a).reduce((O, [B, R]) => {
68
- const { cols: oe, rows: te } = fe.availableViews[B];
69
- return O[B] = { cols: R.cols || oe, rows: R.rows || te }, O;
70
- }, {})), p && 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);
71
- }), q = M(() => s.datePicker ? "month" : W.value.week ? "week" : Object.keys(W.value)[0]), t = M(() => {
64
+ month: { ...ge.availableViews.month },
65
+ year: { ...ge.availableViews.year },
66
+ years: { ...ge.availableViews.years }
67
+ } : (a ? (Array.isArray(a) ? k = a.reduce((j, R) => (typeof R == "string" && ge.availableViews[R] ? j[R] = ge.availableViews[R] : p++, j), {}) : typeof a == "object" && (k = Object.entries(a).reduce((j, [R, N]) => {
68
+ const { cols: ne, rows: x } = ge.availableViews[R];
69
+ return j[R] = { cols: N.cols || ne, rows: N.rows || x }, j;
70
+ }, {})), p && 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 = { ...ge.availableViews })) : k = { ...ge.availableViews }, k);
71
+ }), Z = M(() => s.datePicker ? "month" : A.value.week ? "week" : Object.keys(A.value)[0]), t = M(() => {
72
72
  if (typeof s.selectedDate == "string") return d.stringToDate(s.selectedDate);
73
73
  if (s.selectedDate instanceof Date) return s.selectedDate;
74
74
  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.");
@@ -91,7 +91,7 @@ const fe = {
91
91
  }), c = M(() => {
92
92
  var k;
93
93
  const { view: l } = y;
94
- return s.schedules.length && (l.isDay || l.isDays || l.isWeek) && ((k = s.schedules) == null ? void 0 : k.map((a, O) => ({ ...a, id: a.id ?? O + 1 }))) || void 0;
94
+ return s.schedules.length && (l.isDay || l.isDays || l.isWeek) && ((k = s.schedules) == null ? void 0 : k.map((a, j) => ({ ...a, id: a.id ?? j + 1 }))) || void 0;
95
95
  }), E = M(() => {
96
96
  const l = {
97
97
  drag: !0,
@@ -113,15 +113,15 @@ const fe = {
113
113
  }
114
114
  p = await ((k = p[`../i18n/${l}.json`]) == null ? void 0 : k.call(p));
115
115
  }
116
- y.texts = Object.assign(y.texts, Object.assign({ ...fe.texts }, p)), d.updateTexts(y.texts);
116
+ y.texts = Object.assign(y.texts, Object.assign({ ...ge.texts }, p)), d.updateTexts(y.texts);
117
117
  }, D = $e(s.events || []);
118
- return me(() => s.events, (l) => D.splice(0, D.length, ...l)), me(() => s.locale, (l) => z(l || "en-us")), (s.locale || !y.texts.today) && z(s.locale || "en-us"), {
118
+ return fe(() => s.events, (l) => D.splice(0, D.length, ...l)), fe(() => s.locale, (l) => z(l || "en-us")), (s.locale || !y.texts.today) && z(s.locale || "en-us"), {
119
119
  ...wt(s),
120
120
  events: D,
121
121
  // All the events listeners for cells and events that the end user may have attached to vue-cal.
122
122
  eventListeners: u,
123
- defaultView: q,
124
- availableViews: W,
123
+ defaultView: Z,
124
+ availableViews: A,
125
125
  disableDays: o,
126
126
  ready: w,
127
127
  sm: H,
@@ -219,7 +219,7 @@ function Et(y) {
219
219
  e.preventDefault(), !e.currentTarget.contains(e.relatedTarget) && (h.highlightedSchedule = !1, pe.cell === h && (clearTimeout(pe.timeout), Object.assign(pe, { el: null, cell: null, timeout: null }), h.highlighted = !1));
220
220
  },
221
221
  cellDragDrop: async (e, h) => {
222
- var a, O, B;
222
+ var a, j, R;
223
223
  e.preventDefault(), clearTimeout(pe.timeout), Object.assign(pe, { el: null, cell: null, timeout: null });
224
224
  const c = JSON.parse(e.dataTransfer.getData("event") || "{}");
225
225
  c.start && (c.start = new Date(c.start)), c.end && (c.end = new Date(c.end));
@@ -227,27 +227,33 @@ function Et(y) {
227
227
  const { start: L, end: z } = F(e, c, h.start), { schedule: D } = ((a = e.target.closest("[data-schedule]")) == null ? void 0 : a.dataset) || {};
228
228
  let l = () => {
229
229
  };
230
- we.fromVueCal === b ? (E = d.getEvent(c._.id), E && (E._.dragging = !1, l = () => {
231
- E.start = L, E.end = z, D !== void 0 && (E.schedule = ~~D);
230
+ we.fromVueCal === b ? (E = d.getEvent(c._.id), E && (E._.dragging = !1, l = (N) => {
231
+ if (E.start = L, E.end = z, D !== void 0 && (E.schedule = ~~D), N && typeof N == "object") {
232
+ const { _: ne, ...x } = N;
233
+ Object.assign(E, x);
234
+ }
232
235
  })) : (E = {
233
236
  ...c,
234
237
  start: L,
235
238
  end: z,
236
239
  ...D !== void 0 && { schedule: ~~D },
237
- _: { id: ((O = c._) == null ? void 0 : O.id) || c.id, duration: u(L, z) },
240
+ _: { id: ((j = c._) == null ? void 0 : j.id) || c.id, duration: u(L, z) },
238
241
  getOverlappingEvents: () => d.getEventsInRange(L, z, { schedule: ~~D })
239
- }, l = () => {
240
- E = d.createEvent(E);
242
+ }, l = (N) => {
243
+ if (E = d.createEvent(E), N && typeof N == "object") {
244
+ const { _: ne, ...x } = N;
245
+ Object.assign(E, x);
246
+ }
241
247
  });
242
248
  let p = !0;
243
- const { drop: k } = (B = s.eventListeners) == null ? void 0 : B.event;
249
+ const { drop: k } = (R = s.eventListeners) == null ? void 0 : R.event;
244
250
  k && (p = await k({
245
251
  e,
246
252
  event: { ...E, start: L, end: z, schedule: ~~D },
247
253
  overlaps: E.getOverlappingEvents({ start: L, end: z, schedule: ~~D }),
248
254
  cell: h,
249
255
  external: we.fromVueCal !== b
250
- })), p !== !1 && l(), h.highlighted = !1, h.highlightedSchedule = null, Je = !1, we.toVueCal = b, w("event-dropped", {
256
+ })), p !== !1 && l(p), h.highlighted = !1, h.highlightedSchedule = null, Je = !1, we.toVueCal = b, w("event-dropped", {
251
257
  e,
252
258
  cell: h,
253
259
  event: E,
@@ -261,9 +267,9 @@ const st = (y, s) => {
261
267
  let r, d, w, b = {}, H = {};
262
268
  const f = ue(y), F = () => {
263
269
  f.value.today || (f.value = s), Date.prototype.addDays = function(n) {
264
- return W(this, n || 0);
270
+ return A(this, n || 0);
265
271
  }, Date.prototype.subtractDays = function(n) {
266
- return q(this, n || 0);
272
+ return Z(this, n || 0);
267
273
  }, Date.prototype.addHours = function(n) {
268
274
  return t(this, n || 0);
269
275
  }, Date.prototype.subtractHours = function(n) {
@@ -279,18 +285,18 @@ const st = (y, s) => {
279
285
  }, Date.prototype.isLeapYear = function() {
280
286
  return l(this);
281
287
  }, Date.prototype.format = function(n = "YYYY-MM-DD") {
282
- return oe(this, n);
288
+ return ne(this, n);
283
289
  }, Date.prototype.formatTime = function(n = "HH:mm") {
284
- return se(this, n);
290
+ return le(this, n);
285
291
  };
286
292
  }, u = () => {
287
293
  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;
288
294
  }, m = (n) => {
289
295
  f.value = n, Date.prototype.subtractDays && F();
290
- }, Y = () => (d !== (/* @__PURE__ */ new Date()).getDate() && (r = /* @__PURE__ */ new Date(), d = r.getDate(), w = `${r.getFullYear()}-${r.getMonth()}-${r.getDate()}`), w), W = (n, _) => {
296
+ }, Y = () => (d !== (/* @__PURE__ */ new Date()).getDate() && (r = /* @__PURE__ */ new Date(), d = r.getDate(), w = `${r.getFullYear()}-${r.getMonth()}-${r.getDate()}`), w), A = (n, _) => {
291
297
  const g = new Date(n.valueOf());
292
298
  return g.setDate(g.getDate() + _), g;
293
- }, q = (n, _) => {
299
+ }, Z = (n, _) => {
294
300
  const g = new Date(n.valueOf());
295
301
  return g.setDate(g.getDate() - _), g;
296
302
  }, t = (n, _) => {
@@ -306,40 +312,40 @@ const st = (y, s) => {
306
312
  const g = new Date(n.valueOf());
307
313
  return g.setMinutes(g.getMinutes() - _), g;
308
314
  }, c = (n, _) => {
309
- const g = (A) => {
310
- const x = A % _;
311
- return x !== 0 && (A += x >= _ / 2 ? _ - x : -x), A;
315
+ const g = (I) => {
316
+ const ee = I % _;
317
+ return ee !== 0 && (I += ee >= _ / 2 ? _ - ee : -ee), I;
312
318
  };
313
319
  if (typeof n == "number") return g(n);
314
320
  if (n instanceof Date) {
315
- let A = g(n.getMinutes());
316
- A >= 60 && (n.setHours(n.getHours() + 1), A = 0), n.setMinutes(A, 0, 0);
321
+ let I = g(n.getMinutes());
322
+ I >= 60 && (n.setHours(n.getHours() + 1), I = 0), n.setMinutes(I, 0, 0);
317
323
  }
318
324
  }, E = (n, _ = !1) => {
319
- const g = new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate())), A = g.getUTCDay() || 7;
320
- g.setUTCDate(g.getUTCDate() + 4 - A);
321
- const x = new Date(Date.UTC(g.getUTCFullYear(), 0, 1));
322
- return Math.ceil(((g - x) / 864e5 + 1) / 7) + (_ ? 1 : 0);
325
+ const g = new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate())), I = g.getUTCDay() || 7;
326
+ g.setUTCDate(g.getUTCDate() + 4 - I);
327
+ const ee = new Date(Date.UTC(g.getUTCFullYear(), 0, 1));
328
+ return Math.ceil(((g - ee) / 864e5 + 1) / 7) + (_ ? 1 : 0);
323
329
  }, L = (n) => `${n.getFullYear()}-${n.getMonth()}-${n.getDate()}` === Y(), z = (n, _) => {
324
330
  if (!n || !_) return console.warn(`Vue Cal: missing date${n ? "2" : "1"} parameter for comparison with \`isSameDate(date1, date2)\`.`);
325
- if (R(n)) {
326
- if (!R(_)) return console.warn(`Vue Cal: invalid date2 provided for comparison with \`isSameDate(date1, date2)\`: \`${_}\`.`);
331
+ if (N(n)) {
332
+ if (!N(_)) return console.warn(`Vue Cal: invalid date2 provided for comparison with \`isSameDate(date1, date2)\`: \`${_}\`.`);
327
333
  } else return console.warn(`Vue Cal: invalid date1 provided for comparison with \`isSameDate(date1, date2)\`: \`${n}\`.`);
328
334
  return n.getFullYear() === _.getFullYear() && n.getMonth() === _.getMonth() && n.getDate() === _.getDate();
329
- }, D = (n, _, g) => R(n) ? n.getTime() >= _ && n.getTime() <= g : console.warn(`Vue Cal: invalid date provided to \`isInRange(date, rangeStart, rangeEnd)\`: \`${n}\`.`), l = (n) => {
335
+ }, D = (n, _, g) => N(n) ? n.getTime() >= _ && n.getTime() <= g : console.warn(`Vue Cal: invalid date provided to \`isInRange(date, rangeStart, rangeEnd)\`: \`${n}\`.`), l = (n) => {
330
336
  const _ = n.getFullYear();
331
337
  return !(_ % 400) || _ % 100 && !(_ % 4);
332
338
  }, p = (n = null, _) => {
333
- const g = n && new Date(n.valueOf()) || /* @__PURE__ */ new Date(), A = _ ? 7 : 6;
334
- return g.setDate(g.getDate() - (g.getDay() + A) % 7), g;
335
- }, k = (n) => n instanceof Date ? n : (n.length === 10 && (n += " 00:00"), new Date(n.replace(/-/g, "/"))), a = (n) => n.getHours() * 60 + n.getMinutes(), O = (n, _) => {
339
+ const g = n && new Date(n.valueOf()) || /* @__PURE__ */ new Date(), I = _ ? 7 : 6;
340
+ return g.setDate(g.getDate() - (g.getDay() + I) % 7), g;
341
+ }, k = (n) => n instanceof Date ? n : (n.length === 10 && (n += " 00:00"), new Date(n.replace(/-/g, "/"))), a = (n) => n.getHours() * 60 + n.getMinutes(), j = (n, _) => {
336
342
  typeof n == "string" && (n = n.replace(/-/g, "/")), typeof _ == "string" && (_ = _.replace(/-/g, "/")), n = new Date(n).setHours(0, 0, 0, 0), _ = new Date(_).setHours(0, 0, 1, 0);
337
343
  const g = (new Date(_).getTimezoneOffset() - new Date(n).getTimezoneOffset()) * 60 * 1e3;
338
344
  return Math.ceil((_ - n - g) / (24 * 3600 * 1e3));
339
- }, B = (n, _, g) => Math.abs(n.getTime() - _.getTime()) <= g * 60 * 1e3, R = (n) => n && n instanceof Date && !isNaN(n), oe = (n, _ = "YYYY-MM-DD", g = null) => {
340
- if (g || (g = f.value), _ || (_ = "YYYY-MM-DD"), _ === "YYYY-MM-DD") return te(n);
345
+ }, R = (n, _, g) => Math.abs(n.getTime() - _.getTime()) <= g * 60 * 1e3, N = (n) => n && n instanceof Date && !isNaN(n), ne = (n, _ = "YYYY-MM-DD", g = null) => {
346
+ if (g || (g = f.value), _ || (_ = "YYYY-MM-DD"), _ === "YYYY-MM-DD") return x(n);
341
347
  b = {}, H = {};
342
- const A = {
348
+ const I = {
343
349
  YYYY: () => Q(n, g).YYYY,
344
350
  YY: () => Q(n, g).YY(),
345
351
  M: () => Q(n, g).M,
@@ -354,36 +360,36 @@ const st = (y, s) => {
354
360
  dd: () => Q(n, g).dd(),
355
361
  ddd: () => Q(n, g).ddd(),
356
362
  dddd: () => Q(n, g).dddd(),
357
- HH: () => le(n, g).HH,
358
- H: () => le(n, g).H,
359
- hh: () => le(n, g).hh,
360
- h: () => le(n, g).h,
361
- am: () => le(n, g).am,
362
- AM: () => le(n, g).AM,
363
- mm: () => le(n, g).mm,
364
- m: () => le(n, g).m,
365
- s: () => le(n, g).s
363
+ HH: () => re(n, g).HH,
364
+ H: () => re(n, g).H,
365
+ hh: () => re(n, g).hh,
366
+ h: () => re(n, g).h,
367
+ am: () => re(n, g).am,
368
+ AM: () => re(n, g).AM,
369
+ mm: () => re(n, g).mm,
370
+ m: () => re(n, g).m,
371
+ s: () => re(n, g).s
366
372
  };
367
- return _.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (x, he) => {
368
- const i = A[he.replace(/\{|\}/g, "")];
373
+ return _.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (ee, he) => {
374
+ const i = I[he.replace(/\{|\}/g, "")];
369
375
  return i !== void 0 ? i() : he;
370
376
  });
371
- }, te = (n) => {
377
+ }, x = (n) => {
372
378
  const _ = n.getMonth() + 1, g = n.getDate();
373
379
  return `${n.getFullYear()}-${_ < 10 ? "0" : ""}${_}-${g < 10 ? "0" : ""}${g}`;
374
- }, se = (n, _ = "HH:mm", g = null, A = !1) => {
375
- let x = !1;
376
- if (A) {
380
+ }, le = (n, _ = "HH:mm", g = null, I = !1) => {
381
+ let ee = !1;
382
+ if (I) {
377
383
  const [T, S, $] = [n.getHours(), n.getMinutes(), n.getSeconds()];
378
- T + S + $ === 141 && (x = !0);
384
+ T + S + $ === 141 && (ee = !0);
379
385
  }
380
- if (n instanceof Date && _ === "HH:mm") return x ? "24:00" : ce(n);
386
+ if (n instanceof Date && _ === "HH:mm") return ee ? "24:00" : ce(n);
381
387
  H = {}, g || (g = f.value);
382
- const he = le(n, g), i = _.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (T, S) => {
388
+ const he = re(n, g), i = _.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (T, S) => {
383
389
  const $ = he[S.replace(/\{|\}/g, "")];
384
390
  return $ !== void 0 ? $ : S;
385
391
  });
386
- return x ? i.replace("23:59", "24:00") : i;
392
+ return ee ? i.replace("23:59", "24:00") : i;
387
393
  }, ce = (n) => {
388
394
  const _ = n.getHours(), g = n.getMinutes();
389
395
  return `${(_ < 10 ? "0" : "") + _}:${(g < 10 ? "0" : "") + g}`;
@@ -404,7 +410,7 @@ const st = (y, s) => {
404
410
  }
405
411
  }, Q = (n, _) => {
406
412
  if (b.D) return b;
407
- const g = n.getFullYear(), A = n.getMonth() + 1, x = n.getDate(), i = (n.getDay() - 1 + 7) % 7;
413
+ const g = n.getFullYear(), I = n.getMonth() + 1, ee = n.getDate(), i = (n.getDay() - 1 + 7) % 7;
408
414
  return b = {
409
415
  // Year.
410
416
  YYYY: g,
@@ -412,22 +418,22 @@ const st = (y, s) => {
412
418
  YY: () => g.toString().substring(2),
413
419
  // 24.
414
420
  // Month.
415
- M: A,
421
+ M: I,
416
422
  // 1 to 12.
417
- MM: () => A.toString().padStart(2, 0),
423
+ MM: () => I.toString().padStart(2, 0),
418
424
  // 01 to 12.
419
- MMM: () => _.months[A - 1].substring(0, 3),
425
+ MMM: () => _.months[I - 1].substring(0, 3),
420
426
  // Jan to Dec.
421
- MMMM: () => _.months[A - 1],
427
+ MMMM: () => _.months[I - 1],
422
428
  // January to December.
423
- MMMMG: () => (_.monthsGenitive || _.months)[A - 1],
429
+ MMMMG: () => (_.monthsGenitive || _.months)[I - 1],
424
430
  // January to December in genitive form (Greek...)
425
431
  // Day.
426
- D: x,
432
+ D: ee,
427
433
  // 1 to 31.
428
- DD: () => x.toString().padStart(2, 0),
434
+ DD: () => ee.toString().padStart(2, 0),
429
435
  // 01 to 31.
430
- S: () => Ee(x),
436
+ S: () => Ee(ee),
431
437
  // st, nd, rd, th.
432
438
  // Day of the week.
433
439
  d: i + 1,
@@ -440,10 +446,10 @@ const st = (y, s) => {
440
446
  dddd: () => _.weekDays[i]
441
447
  // Monday to Sunday.
442
448
  }, b;
443
- }, le = (n, _) => {
449
+ }, re = (n, _) => {
444
450
  if (H.am) return H;
445
- let g, A, x;
446
- n instanceof Date ? (g = n.getHours(), A = n.getMinutes(), x = n.getSeconds()) : (g = Math.floor(n / 60), A = Math.floor(n % 60));
451
+ let g, I, ee;
452
+ n instanceof Date ? (g = n.getHours(), I = n.getMinutes(), ee = n.getSeconds()) : (g = Math.floor(n / 60), I = Math.floor(n % 60));
447
453
  const he = g % 12 ? g % 12 : 12, i = (_ || { am: "am", pm: "pm" })[g === 24 || g < 12 ? "am" : "pm"];
448
454
  return H = {
449
455
  H: g,
@@ -452,17 +458,17 @@ const st = (y, s) => {
452
458
  hh: he.toString().padStart(2, 0),
453
459
  am: i,
454
460
  AM: i.toUpperCase(),
455
- m: A,
456
- mm: A.toString().padStart(2, 0),
457
- s: x
461
+ m: I,
462
+ mm: I.toString().padStart(2, 0),
463
+ s: ee
458
464
  }, H;
459
465
  };
460
466
  return {
461
467
  addDatePrototypes: F,
462
468
  removeDatePrototypes: u,
463
469
  updateTexts: m,
464
- addDays: W,
465
- subtractDays: q,
470
+ addDays: A,
471
+ subtractDays: Z,
466
472
  addHours: t,
467
473
  subtractHours: o,
468
474
  addMinutes: e,
@@ -476,12 +482,12 @@ const st = (y, s) => {
476
482
  getPreviousFirstDayOfWeek: p,
477
483
  stringToDate: k,
478
484
  dateToMinutes: a,
479
- countDays: O,
480
- datesInSameTimeStep: B,
481
- isValid: R,
482
- formatDate: oe,
483
- formatDateLite: te,
484
- formatTime: se,
485
+ countDays: j,
486
+ datesInSameTimeStep: R,
487
+ isValid: N,
488
+ formatDate: ne,
489
+ formatDateLite: x,
490
+ formatTime: le,
485
491
  formatTimeLite: ce,
486
492
  formatMinutes: X
487
493
  };
@@ -514,17 +520,17 @@ const st = (y, s) => {
514
520
  }
515
521
  return t;
516
522
  }), b = (t) => {
517
- if (typeof t.start == "string" && (t.start = s.stringToDate(t.start)), typeof t.end == "string" && (t.end = s.stringToDate(t.end)), t.start.setSeconds(0, 0), t.end.setSeconds(0, 0), isNaN(t.start) || isNaN(t.end)) {
518
- isNaN(t.start) ? console.error(`Vue Cal: invalid start date for event "${t.title}".`, t.start) : console.error(`Vue Cal: invalid end date for event "${t.title}".`, t.end);
523
+ if (typeof t.start == "string" && (t.start = s.stringToDate(t.start)), typeof t.end == "string" && (t.end = s.stringToDate(t.end)), t.start.setSeconds(0, 0), t.end.getSeconds() >= 59 ? t.end.setMinutes(60, 0, 0) : t.end.setSeconds(0, 0), isNaN(t.start) || isNaN(t.end) || t.end.getTime() < t.start.getTime()) {
524
+ isNaN(t.start) ? console.error(`Vue Cal: invalid start date for event "${t.title}".`, t.start) : isNaN(t.end) ? console.error(`Vue Cal: invalid end date for event "${t.title}".`, t.end) : console.error(`Vue Cal: invalid event dates for event "${t.title}". The event ends before it starts.`, t.start, t.end);
519
525
  return;
520
- } else t.end.getTime() < t.start.getTime() && console.error(`Vue Cal: invalid event dates for event "${t.title}". The event ends before it starts.`, t.start, t.end);
526
+ }
521
527
  t._ || (t._ = {}), t._.multiday = !s.isSameDate(t.start, new Date(t.end.getTime() - 1)), t._.startFormatted = s.formatDate(t.start), t._.startMinutes = ~~s.dateToMinutes(t.start), t._.endMinutes = ~~s.dateToMinutes(t.end);
522
528
  const o = t.start.getHours(), e = t.start.getMinutes().toString().padStart(2, 0), h = t.end.getHours(), c = t.end.getMinutes().toString().padStart(2, 0);
523
529
  t._.startTimeFormatted24 = `${o.toString().padStart(2, 0)}:${e}`, t._.startTimeFormatted12 = `${o % 12 || 12}${e ? `:${e}` : ""} ${o < 12 ? "AM" : "PM"}`, t._.endTimeFormatted24 = `${h.toString().padStart(2, 0)}:${c}`, t._.endTimeFormatted12 = `${h % 12 || 12}${c ? `:${c}` : ""} ${h < 12 ? "AM" : "PM"}`, t._.duration = Math.abs(~~((t.end - t.start) / 6e4));
524
530
  }, H = (t) => {
525
531
  t._ || (t._ = {}), t._.id = t._.id || ++d, t.delete || (t.delete = (o) => m(t._.id, o)), t._.deleting = !1, t._.deleted = !1, t.isOverlapping = (o = null) => t.getOverlappingEvents(o).length, t.getOverlappingEvents = (o = null) => {
526
532
  var e;
527
- return W(
533
+ return A(
528
534
  (o == null ? void 0 : o.start) || t.start,
529
535
  (o == null ? void 0 : o.end) || t.end,
530
536
  { excludeIds: [t._.id], schedule: (e = r.schedules) != null && e.length ? ~~((o == null ? void 0 : o.schedule) || t.schedule) : null }
@@ -537,7 +543,7 @@ const st = (y, s) => {
537
543
  }, f = (t) => w.value.byId[t], F = (t) => {
538
544
  const o = [];
539
545
  for (const { start: e, end: h } of t) {
540
- const c = W(e, h);
546
+ const c = A(e, h);
541
547
  c.length && o.push(...c);
542
548
  }
543
549
  return o;
@@ -584,7 +590,7 @@ const st = (y, s) => {
584
590
  }
585
591
  return !0;
586
592
  }, Y = (t, o) => {
587
- const e = W(t, o);
593
+ const e = A(t, o);
588
594
  if (!e.length) return { cellOverlaps: {}, longestStreak: 0 };
589
595
  const h = {};
590
596
  let c = [], E = 0;
@@ -593,18 +599,18 @@ const st = (y, s) => {
593
599
  const z = L._.id;
594
600
  h[z] || (h[z] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), c = c.filter((a) => a.end > L.start);
595
601
  const D = c.filter((a) => {
596
- var B;
597
- return (!((B = r.schedules) != null && B.length) || L.schedule === a.schedule) && a.start < L.end;
602
+ var R;
603
+ return (!((R = r.schedules) != null && R.length) || L.schedule === a.schedule) && a.start < L.end;
598
604
  }), l = new Set(D.map((a) => {
599
- var O;
600
- return ((O = h[a._.id]) == null ? void 0 : O.position) ?? 0;
605
+ var j;
606
+ return ((j = h[a._.id]) == null ? void 0 : j.position) ?? 0;
601
607
  }));
602
608
  let p = 0;
603
609
  for (; l.has(p); ) p++;
604
610
  h[z].position = p, c.push(L);
605
611
  const k = Math.max(1, ...D.map((a) => {
606
- var O;
607
- return ((O = h[a._.id]) == null ? void 0 : O.maxConcurrent) ?? 1;
612
+ var j;
613
+ return ((j = h[a._.id]) == null ? void 0 : j.maxConcurrent) ?? 1;
608
614
  }));
609
615
  h[z].maxConcurrent = Math.max(D.length + 1, k);
610
616
  for (const a of D)
@@ -613,34 +619,34 @@ const st = (y, s) => {
613
619
  }
614
620
  for (const L in h) h[L].overlaps = [...h[L].overlaps];
615
621
  return { cellOverlaps: h, longestStreak: E };
616
- }, W = (t, o, { excludeIds: e = [], schedule: h = null, background: c = !0 } = {}) => {
617
- const E = t.getFullYear(), L = o.getFullYear(), z = t.getMonth() + 1, D = o.getMonth() + 1, l = t.getDate(), p = o.getDate(), k = t.getTime(), a = o.getTime(), O = [], B = new Set(e);
618
- for (let R = E; R <= L; R++) {
619
- const oe = `${R}`, te = w.value.byYear[oe];
620
- if (!te) continue;
621
- const se = R === E ? z : 1, ce = R === L ? D : 12;
622
- for (let X = se; X <= ce; X++) {
623
- const Ee = String(X).padStart(2, "0"), Q = te[Ee];
622
+ }, A = (t, o, { excludeIds: e = [], schedule: h = null, background: c = !0 } = {}) => {
623
+ const E = t.getFullYear(), L = o.getFullYear(), z = t.getMonth() + 1, D = o.getMonth() + 1, l = t.getDate(), p = o.getDate(), k = t.getTime(), a = o.getTime(), j = [], R = new Set(e);
624
+ for (let N = E; N <= L; N++) {
625
+ const ne = `${N}`, x = w.value.byYear[ne];
626
+ if (!x) continue;
627
+ const le = N === E ? z : 1, ce = N === L ? D : 12;
628
+ for (let X = le; X <= ce; X++) {
629
+ const Ee = String(X).padStart(2, "0"), Q = x[Ee];
624
630
  if (Q)
625
- for (const le in Q) {
626
- const n = +le;
627
- if (R === E && X === z && n < l || R === L && X === D && n > p) continue;
628
- const _ = Q[le];
631
+ for (const re in Q) {
632
+ const n = +re;
633
+ if (N === E && X === z && n < l || N === L && X === D && n > p) continue;
634
+ const _ = Q[re];
629
635
  for (let g = 0; g < _.length; g++) {
630
- const A = w.value.byId[_[g]];
631
- !A || B.has(A._.id) || h !== null && h !== A.schedule || c === !1 && A.background || A.end.getTime() > k && A.start.getTime() < a && O.push(A);
636
+ const I = w.value.byId[_[g]];
637
+ !I || R.has(I._.id) || h !== null && h !== I.schedule || c === !1 && I.background || I.end.getTime() > k && I.start.getTime() < a && j.push(I);
632
638
  }
633
639
  }
634
640
  }
635
641
  }
636
- return O;
642
+ return j;
637
643
  };
638
644
  return {
639
645
  events: w,
640
646
  getEvent: f,
641
647
  getViewEvents: F,
642
648
  getCellOverlappingEvents: Y,
643
- getEventsInRange: W,
649
+ getEventsInRange: A,
644
650
  createEvent: u,
645
651
  deleteEvent: m,
646
652
  isEventInRange: (t, o, e) => {
@@ -652,8 +658,8 @@ const st = (y, s) => {
652
658
  const { availableViews: H } = y, f = ue(y.view && H[y.view] ? y.view : y.defaultView), F = ue(y.selectedDate || null), u = ue(/* @__PURE__ */ new Date()), m = ue(new Date(y.viewDate || u.value));
653
659
  m.value.setHours(0, 0, 0, 0);
654
660
  const Y = ue(new Date(m));
655
- let W = null;
656
- const q = M(() => f.value === "month" ? Y.value : l.value), t = M(() => f.value === "month" ? new Date(Y.value.getFullYear(), Y.value.getMonth() + 1, 0, 23, 59, 59, 999) : k.value), o = M(() => f.value === "week" ? s.getPreviousFirstDayOfWeek(l.value, y.startWeekOnSunday) : f.value === "month" ? l.value : q.value), e = M(() => {
661
+ let A = null;
662
+ const Z = M(() => f.value === "month" ? Y.value : l.value), t = M(() => f.value === "month" ? new Date(Y.value.getFullYear(), Y.value.getMonth() + 1, 0, 23, 59, 59, 999) : k.value), o = M(() => f.value === "week" ? s.getPreviousFirstDayOfWeek(l.value, y.startWeekOnSunday) : f.value === "month" ? l.value : Z.value), e = M(() => {
657
663
  if (f.value === "week") {
658
664
  const v = s.addDays(o.value, 7);
659
665
  return v.setMilliseconds(-1), v;
@@ -663,14 +669,14 @@ const st = (y, s) => {
663
669
  const v = u.value.getTime();
664
670
  if (f.value === "week")
665
671
  return o.value.getTime() <= v && v <= e.value.getTime();
666
- const N = l.value.getTime(), Z = k.value.getTime();
667
- return N <= v && v <= Z;
672
+ const W = l.value.getTime(), K = k.value.getTime();
673
+ return W <= v && v <= K;
668
674
  });
669
675
  function c() {
670
- u.value = /* @__PURE__ */ new Date(), W = setTimeout(c, 60 * 1e3);
676
+ u.value = /* @__PURE__ */ new Date(), A = setTimeout(c, 60 * 1e3);
671
677
  }
672
678
  function E() {
673
- W = setTimeout(c, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), c();
679
+ A = setTimeout(c, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), c();
674
680
  }
675
681
  const L = M(() => {
676
682
  if (!y.availableViews[f.value]) return 1;
@@ -685,27 +691,27 @@ const st = (y, s) => {
685
691
  return y.startWeekOnSunday && !y.hideWeekdays[7] && (v += 1), y.viewDayOffset && (v -= y.viewDayOffset), s.subtractDays(Y.value, v - 1);
686
692
  }
687
693
  if (f.value === "week") {
688
- const v = "1234567".split("").filter((Z) => !Object.keys(y.hideWeekdays).includes(Z));
689
- let N = Math.min(...v);
690
- return y.startWeekOnSunday && !y.hideWeekdays[7] && (N = 1), y.viewDayOffset && (N += y.viewDayOffset), s.addDays(Y.value, N - 1);
694
+ const v = "1234567".split("").filter((K) => !Object.keys(y.hideWeekdays).includes(K));
695
+ let W = Math.min(...v);
696
+ return y.startWeekOnSunday && !y.hideWeekdays[7] && (W = 1), y.viewDayOffset && (W += y.viewDayOffset), s.addDays(Y.value, W - 1);
691
697
  }
692
698
  return Y.value;
693
699
  }), p = M(() => {
694
- const v = [], N = ["days", "week", "month"].includes(f.value);
695
- let Z = 0;
696
- for (let U = 0; U < D.value + Z; U++)
700
+ const v = [], W = ["days", "week", "month"].includes(f.value);
701
+ let K = 0;
702
+ for (let U = 0; U < D.value + K; U++)
697
703
  switch (f.value) {
698
704
  case "day":
699
705
  case "days":
700
706
  case "week":
701
707
  case "month": {
702
- const ve = s.addDays(l.value, U), We = ve.getDay() || 7;
703
- if (N && y.hasHiddenDays && y.hideWeekdays[We]) {
704
- Z++;
708
+ const me = s.addDays(l.value, U), We = me.getDay() || 7;
709
+ if (W && y.hasHiddenDays && y.hideWeekdays[We]) {
710
+ K++;
705
711
  continue;
706
712
  }
707
- const Ce = new Date(ve);
708
- Ce.setHours(23, 59, 59, 999), v.push({ start: ve, startFormatted: s.formatDate(ve), end: Ce });
713
+ const Ce = new Date(me);
714
+ Ce.setHours(23, 59, 59, 999), v.push({ start: me, startFormatted: s.formatDate(me), end: Ce });
709
715
  break;
710
716
  }
711
717
  case "year":
@@ -722,24 +728,24 @@ const st = (y, s) => {
722
728
  break;
723
729
  }
724
730
  return v;
725
- }), k = M(() => p.value[p.value.length - 1].end), a = ue("right"), O = M(() => {
731
+ }), k = M(() => p.value[p.value.length - 1].end), a = ue("right"), j = M(() => {
726
732
  const v = Object.keys(y.availableViews);
727
733
  return v[v.indexOf(f.value) + 1];
728
- }), B = M(() => {
734
+ }), R = M(() => {
729
735
  const v = Object.keys(y.availableViews);
730
736
  return v[v.indexOf(f.value) - 1];
731
737
  });
732
- function R(v, N, Z = !1) {
733
- if (!N || !N[v]) return v + 1;
734
- const U = N[v];
735
- return Z && typeof U == "string" ? U.substring(0, 3) : U;
738
+ function N(v, W, K = !1) {
739
+ if (!W || !W[v]) return v + 1;
740
+ const U = W[v];
741
+ return K && typeof U == "string" ? U.substring(0, 3) : U;
736
742
  }
737
- function oe(v, N, Z) {
738
- const { monthsArray: U, monthBeforeDay: ve, canTruncate: We, xs: Ce } = Z, Te = v.getMonth(), Me = v.getFullYear(), Ye = N.getMonth(), Pe = N.getFullYear(), Ae = Te !== Ye, pt = Me !== Pe, be = We && (Ce || Ae), Le = v.getDate(), He = N.getDate();
739
- return pt ? ve ? `${R(Te, U, be)} ${Le}, ${Me} - ${R(Ye, U, be)} ${He}, ${Pe}` : `${Le} ${R(Te, U, be)} ${Me} - ${He} ${R(Ye, U, be)} ${Pe}` : Ae ? ve ? `${R(Te, U, be)} ${Le} - ${R(Ye, U, be)} ${He}, ${Me}` : `${Le} ${R(Te, U, be)} - ${He} ${R(Ye, U, be)} ${Me}` : ve ? `${R(Te, U, be)} ${Le}-${He}, ${Me}` : `${Le}-${He} ${R(Te, U, be)} ${Me}`;
743
+ function ne(v, W, K) {
744
+ const { monthsArray: U, monthBeforeDay: me, canTruncate: We, xs: Ce } = K, Te = v.getMonth(), Me = v.getFullYear(), Ye = W.getMonth(), Pe = W.getFullYear(), Ae = Te !== Ye, pt = Me !== Pe, be = We && (Ce || Ae), Le = v.getDate(), He = W.getDate();
745
+ return pt ? me ? `${N(Te, U, be)} ${Le}, ${Me} - ${N(Ye, U, be)} ${He}, ${Pe}` : `${Le} ${N(Te, U, be)} ${Me} - ${He} ${N(Ye, U, be)} ${Pe}` : Ae ? me ? `${N(Te, U, be)} ${Le} - ${N(Ye, U, be)} ${He}, ${Me}` : `${Le} ${N(Te, U, be)} - ${He} ${N(Ye, U, be)} ${Me}` : me ? `${N(Te, U, be)} ${Le}-${He}, ${Me}` : `${Le}-${He} ${N(Te, U, be)} ${Me}`;
740
746
  }
741
- const te = M(() => {
742
- const { dateFormat: v, months: N, monthsGenitive: Z, week: U, truncations: ve } = d, We = y.locale, Ce = ve !== !1, Te = v.indexOf("M") < v.indexOf("D"), Me = Z && We === "el" ? Z : N;
747
+ const x = M(() => {
748
+ const { dateFormat: v, months: W, monthsGenitive: K, week: U, truncations: me } = d, We = y.locale, Ce = me !== !1, Te = v.indexOf("M") < v.indexOf("D"), Me = K && We === "el" ? K : W;
743
749
  switch (f.value) {
744
750
  case "day":
745
751
  return s.formatDate(l.value, v);
@@ -751,7 +757,7 @@ const st = (y, s) => {
751
757
  canTruncate: Ce,
752
758
  xs: y.xs
753
759
  };
754
- let Pe = oe(l.value, k.value, Ye);
760
+ let Pe = ne(l.value, k.value, Ye);
755
761
  if (f.value === "week") {
756
762
  const Ae = s.getWeek(
757
763
  l.value,
@@ -763,7 +769,7 @@ const st = (y, s) => {
763
769
  }
764
770
  case "month": {
765
771
  const Ye = `${y.xs && Ce ? "MMM" : "MMMM"} YYYY`;
766
- return s.formatDate(q.value, Ye);
772
+ return s.formatDate(Z.value, Ye);
767
773
  }
768
774
  case "year":
769
775
  return l.value.getFullYear();
@@ -771,7 +777,7 @@ const st = (y, s) => {
771
777
  return `${l.value.getFullYear()} - ${t.value.getFullYear()}`;
772
778
  }
773
779
  });
774
- function se() {
780
+ function le() {
775
781
  switch (Y.value = new Date(m.value || u.value), Y.value.setHours(0, 0, 0, 0), f.value) {
776
782
  case "day":
777
783
  break;
@@ -792,8 +798,8 @@ const st = (y, s) => {
792
798
  }
793
799
  y.ready && r("view-change", {
794
800
  id: f.value,
795
- title: te.value,
796
- start: q.value,
801
+ title: x.value,
802
+ start: Z.value,
797
803
  end: t.value,
798
804
  extendedStart: o.value,
799
805
  extendedEnd: e.value,
@@ -803,102 +809,102 @@ const st = (y, s) => {
803
809
  }), u.value = /* @__PURE__ */ new Date();
804
810
  }
805
811
  function ce(v) {
806
- const N = f.value, Z = y.availableViews[N];
807
- v[N] && JSON.stringify(v[N]) === JSON.stringify(Z) || se();
812
+ const W = f.value, K = y.availableViews[W];
813
+ v[W] && JSON.stringify(v[W]) === JSON.stringify(K) || le();
808
814
  }
809
- function X(v, N = !0) {
810
- const Z = Object.keys(y.availableViews);
811
- f.value !== v && (Z.includes(v) ? (a.value = Z.indexOf(v) < Z.indexOf(f.value) ? "left" : "right", f.value = v, r("update:view", v), se()) : console.warn(`Vue Cal: the \`${v}\` view is not available.`));
815
+ function X(v, W = !0) {
816
+ const K = Object.keys(y.availableViews);
817
+ f.value !== v && (K.includes(v) ? (a.value = K.indexOf(v) < K.indexOf(f.value) ? "left" : "right", f.value = v, r("update:view", v), le()) : console.warn(`Vue Cal: the \`${v}\` view is not available.`));
812
818
  }
813
819
  function Ee() {
814
- O.value ? X(O.value) : console.warn("Vue Cal: no broader view is available.");
820
+ j.value ? X(j.value) : console.warn("Vue Cal: no broader view is available.");
815
821
  }
816
822
  function Q() {
817
- B.value ? X(B.value) : console.warn("Vue Cal: no narrower view is available.");
823
+ R.value ? X(R.value) : console.warn("Vue Cal: no narrower view is available.");
818
824
  }
819
- function le() {
825
+ function re() {
820
826
  _(!1);
821
827
  }
822
828
  function n() {
823
829
  _(!0);
824
830
  }
825
831
  function _(v = !0) {
826
- let N = new Date(m.value);
832
+ let W = new Date(m.value);
827
833
  switch (f.value) {
828
834
  case "day":
829
835
  case "days":
830
- v ? N = s.addDays(k.value, 1) : N = s.subtractDays(l.value, D.value);
836
+ v ? W = s.addDays(k.value, 1) : W = s.subtractDays(l.value, D.value);
831
837
  break;
832
838
  case "week": {
833
- v ? (N = s.addDays(e.value, 1), N.setHours(0, 0, 0, 0)) : N = s.subtractDays(o.value, D.value);
839
+ v ? (W = s.addDays(e.value, 1), W.setHours(0, 0, 0, 0)) : W = s.subtractDays(o.value, D.value);
834
840
  break;
835
841
  }
836
842
  case "month": {
837
- const Z = v ? 1 : -1;
838
- N = new Date(N.getFullYear(), N.getMonth() + Z, 1, 0, 0, 0, 0);
843
+ const K = v ? 1 : -1;
844
+ W = new Date(W.getFullYear(), W.getMonth() + K, 1, 0, 0, 0, 0);
839
845
  break;
840
846
  }
841
847
  case "year": {
842
- const Z = v ? 1 : -1;
843
- N = new Date(N.getFullYear() + Z, 1, 1, 0, 0, 0, 0);
848
+ const K = v ? 1 : -1;
849
+ W = new Date(W.getFullYear() + K, 1, 1, 0, 0, 0, 0);
844
850
  break;
845
851
  }
846
852
  case "years": {
847
- const Z = v ? D.value : -D.value;
848
- N = new Date(N.getFullYear() + Z, 1, 1, 0, 0, 0, 0);
853
+ const K = v ? D.value : -D.value;
854
+ W = new Date(W.getFullYear() + K, 1, 1, 0, 0, 0, 0);
849
855
  break;
850
856
  }
851
857
  }
852
- A(N);
858
+ I(W);
853
859
  }
854
860
  function g() {
855
861
  const v = /* @__PURE__ */ new Date();
856
- v.setHours(0, 0, 0, 0), A(v);
862
+ v.setHours(0, 0, 0, 0), I(v);
857
863
  }
858
- function A(v, N = !0, Z = !1) {
864
+ function I(v, W = !0, K = !1) {
859
865
  if (!s.isValid(v)) return console.warn("Vue Cal: can't navigate to the given date: invalid date provided to `updateViewDate(date)`.");
860
- let [U, ve] = [l.value, k.value];
861
- f.value === "month" && ([U, ve] = [q.value, t.value]), (!s.isInRange(v, U, ve) || Z) && (v.setHours(0, 0, 0, 0), a.value = v.getTime() < U.getTime() ? "left" : "right", m.value = v, N && r("update:viewDate", v), se());
866
+ let [U, me] = [l.value, k.value];
867
+ f.value === "month" && ([U, me] = [Z.value, t.value]), (!s.isInRange(v, U, me) || K) && (v.setHours(0, 0, 0, 0), a.value = v.getTime() < U.getTime() ? "left" : "right", m.value = v, W && r("update:viewDate", v), le());
862
868
  }
863
- function x(v, N = !0) {
869
+ function ee(v, W = !0) {
864
870
  if (!s.isValid(v)) return console.warn("Vue Cal: can't update the selected date: invalid date provided to `updateSelectedDate(date)`.");
865
- const { isValid: Z, isSameDate: U } = s;
866
- (!F.value || !Z(F.value) || !U(v, F.value)) && (v.setHours(0, 0, 0, 0), F.value = v, N && r("update:selectedDate", v));
871
+ const { isValid: K, isSameDate: U } = s;
872
+ (!F.value || !K(F.value) || !U(v, F.value)) && (v.setHours(0, 0, 0, 0), F.value = v, W && r("update:selectedDate", v));
867
873
  }
868
874
  function he(v) {
869
- !v && !Y.value.getDay() ? A(s.addDays(Y.value, 1), !0, !0) : (a.value = "left", se());
875
+ !v && !Y.value.getDay() ? I(s.addDays(Y.value, 1), !0, !0) : (a.value = "left", le());
870
876
  }
871
877
  function i(v) {
872
- v && y.startWeekOnSunday && !Y.value.getDay() ? A(s.addDays(Y.value, 1), !0, !0) : !v && y.startWeekOnSunday && Y.value.getDay() === 1 && A(s.subtractDays(Y.value, 1), !0, !0);
878
+ v && y.startWeekOnSunday && !Y.value.getDay() ? I(s.addDays(Y.value, 1), !0, !0) : !v && y.startWeekOnSunday && Y.value.getDay() === 1 && I(s.subtractDays(Y.value, 1), !0, !0);
873
879
  }
874
880
  function T() {
875
881
  console.log("toggling weekdays", y.hideWeekdays);
876
882
  }
877
883
  function S(v) {
878
884
  var U;
879
- const N = (U = b.value) == null ? void 0 : U.querySelector(".vuecal__scrollable"), Z = v ? v * y.timeCellHeight / y.timeStep : 0;
880
- N == null || N.scrollTo({ top: Z, behavior: "smooth" });
885
+ const W = (U = b.value) == null ? void 0 : U.querySelector(".vuecal__scrollable"), K = v ? v * y.timeCellHeight / y.timeStep : 0;
886
+ W == null || W.scrollTo({ top: K, behavior: "smooth" });
881
887
  }
882
888
  function $() {
883
889
  const v = /* @__PURE__ */ new Date();
884
890
  S(v.getHours() * 60 + v.getMinutes());
885
891
  }
886
- function I() {
892
+ function B() {
887
893
  S(0);
888
894
  }
889
- const G = M(() => w.getViewEvents(p.value)), ne = w.createEvent, De = w.deleteEvent;
890
- return me(() => y.view, (v) => X(v, !1)), me(() => y.availableViews, ce), me(() => y.datePicker, () => X("month", !1)), me(() => y.viewDate, (v) => A(v, !1)), me(() => y.selectedDate, (v) => x(v, !1)), me(() => y.startWeekOnSunday, (v) => he(v)), me(() => y.hideWeekends, (v) => i(v)), me(() => y.hideWeekdays, T), me(() => D.value, () => {
895
+ const G = M(() => w.getViewEvents(p.value)), se = w.createEvent, De = w.deleteEvent;
896
+ return fe(() => y.view, (v) => X(v, !1)), fe(() => y.availableViews, ce), fe(() => y.datePicker, () => X("month", !1)), fe(() => y.viewDate, (v) => I(v, !1)), fe(() => y.selectedDate, (v) => ee(v, !1)), fe(() => y.startWeekOnSunday, (v) => he(v)), fe(() => y.hideWeekends, (v) => i(v)), fe(() => y.hideWeekdays, T), fe(() => D.value, () => {
891
897
  D.value > 90 && console.warn("Vue Cal: high cell count detected. Performance may degrade when interactions are enabled.");
892
- }), me(() => y.watchRealTime, (v) => {
893
- v && y.time ? E() : W = clearTimeout(W);
894
- }), se(), y.time && y.watchRealTime && E(), Xe(() => W = clearTimeout(W)), {
898
+ }), fe(() => y.watchRealTime, (v) => {
899
+ v && y.time ? E() : A = clearTimeout(A);
900
+ }), le(), y.time && y.watchRealTime && E(), Xe(() => A = clearTimeout(A)), {
895
901
  now: u,
896
902
  id: f,
897
- broaderView: O,
898
- narrowerView: B,
899
- title: te,
903
+ broaderView: j,
904
+ narrowerView: R,
905
+ title: x,
900
906
  viewDate: m,
901
- start: q,
907
+ start: Z,
902
908
  end: t,
903
909
  extendedStart: o,
904
910
  // Full range, including out of scope month days, and hidden leading/trailing days.
@@ -919,16 +925,16 @@ const st = (y, s) => {
919
925
  switch: X,
920
926
  broader: Ee,
921
927
  narrower: Q,
922
- previous: le,
928
+ previous: re,
923
929
  next: n,
924
930
  navigate: _,
925
931
  goToToday: g,
926
- updateViewDate: A,
927
- updateSelectedDate: x,
932
+ updateViewDate: I,
933
+ updateSelectedDate: ee,
928
934
  scrollToCurrentTime: $,
929
935
  scrollToTime: S,
930
- scrollTop: I,
931
- createEvent: ne,
936
+ scrollTop: B,
937
+ createEvent: se,
932
938
  deleteEvent: De,
933
939
  // Getters.
934
940
  get isDay() {
@@ -983,9 +989,9 @@ const st = (y, s) => {
983
989
  year: it,
984
990
  years: ot
985
991
  }, Symbol.toStringTag, { value: "Module" })), ze = $e({
986
- texts: { ...fe.texts },
992
+ texts: { ...ge.texts },
987
993
  // Make texts reactive before a locale is loaded.
988
- dateUtils: st(fe.texts, Ke)
994
+ dateUtils: st(ge.texts, Ke)
989
995
  // Some Date utils functions need localized texts.
990
996
  }), Ot = ({ props: y, emit: s, attrs: r, vuecalEl: d, uid: w }) => {
991
997
  const b = $e({
@@ -1012,7 +1018,7 @@ const st = (y, s) => {
1012
1018
  isResizingEvent: !1
1013
1019
  }
1014
1020
  });
1015
- return b.dateUtils = st(Object.assign(fe.texts, b.texts), Ke), b.config = Yt(b, y, r), b.eventsManager = St(b), b.view = Ct(b, d), b.dnd = Et(b), b;
1021
+ return b.dateUtils = st(Object.assign(ge.texts, b.texts), Ke), b.config = Yt(b, y, r), b.eventsManager = St(b), b.view = Ct(b, d), b.dnd = Et(b), b;
1016
1022
  }, jt = 24 * 60, Ft = {
1017
1023
  allDayEvents: { type: [Boolean, String], default: !1 },
1018
1024
  // Coming soon.
@@ -1122,35 +1128,35 @@ const st = (y, s) => {
1122
1128
  const s = Ne("vuecal"), { view: r, config: d } = s, w = () => {
1123
1129
  d.clickToNavigate && r.broader();
1124
1130
  }, b = M(() => d.clickToNavigate ? { click: w } : {});
1125
- return (H, f) => (C(), j("div", Pt, [
1131
+ return (H, f) => (C(), O("div", Pt, [
1126
1132
  P(H.$slots, "header", {
1127
1133
  view: V(r),
1128
1134
  availableViews: V(d).availableViews,
1129
1135
  vuecal: V(s)
1130
1136
  }),
1131
- H.$slots.header ? K("", !0) : (C(), j(re, { key: 0 }, [
1132
- V(d).viewsBar ? (C(), j("div", Lt, [
1133
- (C(!0), j(re, null, ke(V(d).availableViews, (F, u) => (C(), j("button", {
1137
+ H.$slots.header ? q("", !0) : (C(), O(oe, { key: 0 }, [
1138
+ V(d).viewsBar ? (C(), O("div", Lt, [
1139
+ (C(!0), O(oe, null, ke(V(d).availableViews, (F, u) => (C(), O("button", {
1134
1140
  class: ye(["vuecal__view-button", { "vuecal__view-button--active": V(r).id === u }]),
1135
1141
  onClick: (m) => V(r).switch(u),
1136
1142
  innerHTML: V(s).texts[u],
1137
1143
  type: "button"
1138
1144
  }, null, 10, Ht))), 256))
1139
- ])) : K("", !0),
1140
- V(d).titleBar ? (C(), j("nav", zt, [
1141
- ge("button", {
1145
+ ])) : q("", !0),
1146
+ V(d).titleBar ? (C(), O("nav", zt, [
1147
+ ve("button", {
1142
1148
  class: ye(["vuecal__nav vuecal__nav--prev", { "vuecal__nav--default": !H.$slots["previous-button"] }]),
1143
1149
  onClick: f[0] || (f[0] = (...F) => V(r).previous && V(r).previous(...F)),
1144
1150
  type: "button"
1145
1151
  }, [
1146
1152
  P(H.$slots, "previous-button")
1147
1153
  ], 2),
1148
- ge("div", Nt, [
1154
+ ve("div", Nt, [
1149
1155
  Oe(Ge, {
1150
1156
  name: `vuecal-slide-fade--${V(r).transitionDirection}`
1151
1157
  }, {
1152
1158
  default: J(() => [
1153
- (C(), j("div", {
1159
+ (C(), O("div", {
1154
1160
  key: V(r).id + V(r).start.getTime()
1155
1161
  }, [
1156
1162
  H.$slots.title || H.$slots[`title.${V(r).id}`] ? (C(), Se(Qe(V(d).clickToNavigate && V(r).broaderView ? "button" : "div"), de({
@@ -1158,7 +1164,7 @@ const st = (y, s) => {
1158
1164
  class: "vuecal__title"
1159
1165
  }, Be(b.value)), {
1160
1166
  default: J(() => [
1161
- H.$slots[`title.${V(r).id}`] ? P(H.$slots, `title.${V(r).id}`, ee(de({ key: 0 }, V(r)))) : P(H.$slots, "title", ee(de({ key: 1 }, V(r))))
1167
+ H.$slots[`title.${V(r).id}`] ? P(H.$slots, `title.${V(r).id}`, te(de({ key: 0 }, V(r)))) : P(H.$slots, "title", te(de({ key: 1 }, V(r))))
1162
1168
  ]),
1163
1169
  _: 3
1164
1170
  }, 16)) : (C(), Se(Qe(V(d).clickToNavigate && V(r).broaderView ? "button" : "div"), de({
@@ -1172,12 +1178,12 @@ const st = (y, s) => {
1172
1178
  _: 3
1173
1179
  }, 8, ["name"])
1174
1180
  ]),
1175
- V(d).todayButton ? (C(), j(re, { key: 0 }, [
1181
+ V(d).todayButton ? (C(), O(oe, { key: 0 }, [
1176
1182
  H.$slots["today-button"] ? P(H.$slots, "today-button", {
1177
1183
  key: 0,
1178
1184
  navigate: () => !V(r).containsToday && V(r).goToToday(),
1179
1185
  active: V(r).containsToday
1180
- }) : (C(), j("button", {
1186
+ }) : (C(), O("button", {
1181
1187
  key: 1,
1182
1188
  class: ye(["vuecal__nav vuecal__nav--today vuecal__nav--default", { "vuecal__nav--active": V(r).containsToday }]),
1183
1189
  onClick: f[1] || (f[1] = (F) => !V(r).containsToday && V(r).goToToday()),
@@ -1185,15 +1191,15 @@ const st = (y, s) => {
1185
1191
  type: "button",
1186
1192
  innerHTML: V(s).texts.today
1187
1193
  }, null, 10, Wt))
1188
- ], 64)) : K("", !0),
1189
- ge("button", {
1194
+ ], 64)) : q("", !0),
1195
+ ve("button", {
1190
1196
  class: ye(["vuecal__nav vuecal__nav--next", { "vuecal__nav--default": !H.$slots["next-button"] }]),
1191
1197
  onClick: f[2] || (f[2] = (...F) => V(r).next && V(r).next(...F)),
1192
1198
  type: "button"
1193
1199
  }, [
1194
1200
  P(H.$slots, "next-button")
1195
1201
  ], 2)
1196
- ])) : K("", !0)
1202
+ ])) : q("", !0)
1197
1203
  ], 64))
1198
1204
  ]));
1199
1205
  }
@@ -1225,43 +1231,43 @@ const st = (y, s) => {
1225
1231
  (r.isDays || r.isWeek) && r.updateSelectedDate(u);
1226
1232
  }
1227
1233
  };
1228
- return (u, m) => H.value ? (C(), j("div", It, [
1229
- V(r).isDay ? K("", !0) : (C(), j("div", Bt, [
1230
- (C(!0), j(re, null, ke(f.value, (Y, W) => (C(), j("div", {
1234
+ return (u, m) => H.value ? (C(), O("div", It, [
1235
+ V(r).isDay ? q("", !0) : (C(), O("div", Bt, [
1236
+ (C(!0), O(oe, null, ke(f.value, (Y, A) => (C(), O("div", {
1231
1237
  class: ye(["vuecal__weekday", { "vuecal__weekday--today": Y.isToday }]),
1232
- key: W,
1233
- onClick: (q) => F.click(Y.date)
1238
+ key: A,
1239
+ onClick: (Z) => F.click(Y.date)
1234
1240
  }, [
1235
1241
  P(u.$slots, "weekday-heading", {
1236
1242
  label: Y[b.value],
1237
1243
  id: Y.id,
1238
1244
  date: Y.date
1239
1245
  }, () => [
1240
- ge("span", Xt, ie(Y[b.value]), 1),
1241
- V(r).isMonth ? K("", !0) : (C(), j("strong", Gt, ie(Y.dateNumber), 1))
1246
+ ve("span", Xt, ie(Y[b.value]), 1),
1247
+ V(r).isMonth ? q("", !0) : (C(), O("strong", Gt, ie(Y.dateNumber), 1))
1242
1248
  ])
1243
1249
  ], 10, Rt))), 128))
1244
1250
  ])),
1245
- V(d).schedules ? (C(), j("div", Jt, [
1246
- (C(!0), j(re, null, ke(f.value, (Y, W) => (C(), j(re, { key: W }, [
1247
- (C(!0), j(re, null, ke(V(d).schedules, (q, t) => (C(), j(re, { key: t }, [
1248
- u.$slots["schedule-heading"] ? (C(), j("div", {
1251
+ V(d).schedules ? (C(), O("div", Jt, [
1252
+ (C(!0), O(oe, null, ke(f.value, (Y, A) => (C(), O(oe, { key: A }, [
1253
+ (C(!0), O(oe, null, ke(V(d).schedules, (Z, t) => (C(), O(oe, { key: t }, [
1254
+ u.$slots["schedule-heading"] ? (C(), O("div", {
1249
1255
  key: 0,
1250
- class: ye(["vuecal__schedule vuecal__schedule--heading", q.class])
1256
+ class: ye(["vuecal__schedule vuecal__schedule--heading", Z.class])
1251
1257
  }, [
1252
1258
  P(u.$slots, "schedule-heading", {
1253
- schedule: q,
1259
+ schedule: Z,
1254
1260
  view: V(r)
1255
1261
  })
1256
- ], 2)) : (C(), j("div", {
1262
+ ], 2)) : (C(), O("div", {
1257
1263
  key: 1,
1258
- class: ye(["vuecal__schedule vuecal__schedule--heading", q.class]),
1259
- innerHTML: q.label
1264
+ class: ye(["vuecal__schedule vuecal__schedule--heading", Z.class]),
1265
+ innerHTML: Z.label
1260
1266
  }, null, 10, Ut))
1261
1267
  ], 64))), 128))
1262
1268
  ], 64))), 128))
1263
- ])) : K("", !0)
1264
- ])) : K("", !0);
1269
+ ])) : q("", !0)
1270
+ ])) : q("", !0);
1265
1271
  }
1266
1272
  }, Zt = { class: "vuecal__time-column" }, Kt = {
1267
1273
  __name: "time-column",
@@ -1270,21 +1276,21 @@ const st = (y, s) => {
1270
1276
  const b = [];
1271
1277
  for (let f = r.timeFrom; f < r.timeTo; f += r.timeStep) {
1272
1278
  const F = f + r.timeStep > r.timeTo, u = ~~(f / 60), m = f % 60, Y = d[f < 720 ? "am" : "pm"];
1273
- let W = null;
1274
- F && (W = `calc(var(--vuecal-time-cell-height) * ${(r.timeTo - f) / r.timeStep})`), b.push({
1279
+ let A = null;
1280
+ F && (A = `calc(var(--vuecal-time-cell-height) * ${(r.timeTo - f) / r.timeStep})`), b.push({
1275
1281
  minutesSum: f,
1276
1282
  // The sum of hours + minutes in minutes.
1277
1283
  hours: u,
1278
1284
  minutes: m,
1279
1285
  formatted12: `${u % 12 ? u % 12 : 12}${m ? `:${m.toString().padStart(2, 0)}` : ""}${Y}`,
1280
1286
  formatted24: `${u.toString().padStart(2, 0)}:${m.toString().padStart(2, 0)}`,
1281
- height: W
1287
+ height: A
1282
1288
  });
1283
1289
  }
1284
1290
  return b;
1285
1291
  });
1286
- return (b, H) => (C(), j("div", Zt, [
1287
- (C(!0), j(re, null, ke(w.value, (f, F) => (C(), j("div", {
1292
+ return (b, H) => (C(), O("div", Zt, [
1293
+ (C(!0), O(oe, null, ke(w.value, (f, F) => (C(), O("div", {
1288
1294
  class: "vuecal__time-cell",
1289
1295
  key: F,
1290
1296
  style: _e({ height: f.height || null })
@@ -1297,7 +1303,7 @@ const st = (y, s) => {
1297
1303
  format12: f.formatted12,
1298
1304
  format24: f.formatted24
1299
1305
  }, () => [
1300
- ge("label", null, ie(V(r).twelveHour ? f.formatted12 : f.formatted24), 1)
1306
+ ve("label", null, ie(V(r).twelveHour ? f.formatted12 : f.formatted24), 1)
1301
1307
  ])
1302
1308
  ], 4))), 128))
1303
1309
  ]));
@@ -1305,7 +1311,13 @@ const st = (y, s) => {
1305
1311
  }, Qt = ["draggable"], xt = { class: "vuecal__event-details" }, ea = { class: "vuecal__event-title" }, ta = {
1306
1312
  key: 0,
1307
1313
  class: "vuecal__event-time"
1308
- }, aa = ["innerHTML"], nt = {
1314
+ }, aa = {
1315
+ key: 0,
1316
+ class: "vuecal__event-comma"
1317
+ }, na = { class: "vuecal__event-start" }, sa = {
1318
+ key: 1,
1319
+ class: "vuecal__event-end"
1320
+ }, la = ["innerHTML"], nt = {
1309
1321
  __name: "event",
1310
1322
  props: {
1311
1323
  event: { type: Object, required: !0 }
@@ -1346,9 +1358,9 @@ const st = (y, s) => {
1346
1358
  cellEl: null,
1347
1359
  // Store the cell DOM node for a more efficient resizing calc in mousemove/touchmove.
1348
1360
  schedule: null
1349
- }), Y = M(() => r.editableEvents.drag && u.draggable !== !1 && !u.background), W = M(() => d.isMonth || d.isYear || d.isYears ? !1 : r.time && r.editableEvents.resize && u.resizable !== !1 && !u.background);
1361
+ }), Y = M(() => r.editableEvents.drag && u.draggable !== !1 && !u.background), A = M(() => d.isMonth || d.isYear || d.isYears ? !1 : r.time && r.editableEvents.resize && u.resizable !== !1 && !u.background);
1350
1362
  M(() => r.editableEvents.delete && u.deletable !== !1 && !u.background);
1351
- const q = M(() => {
1363
+ const Z = M(() => {
1352
1364
  var D, l, p;
1353
1365
  return {
1354
1366
  [`vuecal__event--${u._.id}`]: !0,
@@ -1357,7 +1369,7 @@ const st = (y, s) => {
1357
1369
  "vuecal__event--background": !!u.background,
1358
1370
  "vuecal__event--multiday": !!((D = u._) != null && D.multiday),
1359
1371
  "vuecal__event--cut-top": ((l = u._) == null ? void 0 : l.startMinutes) < r.timeFrom,
1360
- "vuecal__event--cut-bottom": ((p = u._) == null ? void 0 : p.endMinutes) > r.timeTo || u.end.getDate() !== u.start.getDate(),
1372
+ "vuecal__event--cut-bottom": ((p = u._) == null ? void 0 : p.endMinutes) > r.timeTo || u._.multiday,
1361
1373
  // Only apply the dragging class on the event copy that is being dragged.
1362
1374
  "vuecal__event--dragging": !u._.draggingGhost && u._.dragging,
1363
1375
  // Only apply the dragging-ghost class on the event original that remains fixed while a copy is being
@@ -1377,15 +1389,15 @@ const st = (y, s) => {
1377
1389
  color: u.color || null
1378
1390
  };
1379
1391
  if (D) {
1380
- const p = Math.max(r.timeFrom, u._.startMinutes), k = Math.min(r.timeTo, u._.endMinutes), a = Ve(p, r), O = Ve(k, r) - a;
1381
- l.top = `${a}%`, l.height = `${O}%`;
1392
+ const p = Math.max(r.timeFrom, u._.startMinutes), k = Math.min(r.timeTo, u._.endMinutes) + (u._.duration && !u._.endMinutes ? 24 * 60 : 0), a = Ve(p, r), j = Ve(k, r) - a;
1393
+ l.top = `${a}%`, l.height = `${j}%`;
1382
1394
  }
1383
1395
  return l;
1384
1396
  }), o = M(() => {
1385
1397
  const D = { ...r.eventListeners.event };
1386
1398
  for (const [k, a] of Object.entries(D))
1387
- ["resize-end"].includes(k) || (D[k] = (O) => {
1388
- O.type !== "drop" && a(O.type ? { e: O, event: u } : O);
1399
+ ["resize-end"].includes(k) || (D[k] = (j) => {
1400
+ j.type !== "drop" && a(j.type ? { e: j, event: u } : j);
1389
1401
  });
1390
1402
  const l = { ...D };
1391
1403
  D.touchstart = (k) => {
@@ -1399,51 +1411,51 @@ const st = (y, s) => {
1399
1411
  return D.click = (k) => {
1400
1412
  var a;
1401
1413
  (a = l.click) == null || a.call(l, { e: k, event: u }), p ? p = clearTimeout(p) : p = setTimeout(() => {
1402
- var O;
1403
- p = null, (O = l["delayed-click"]) == null || O.call(l, { e: k, event: u });
1414
+ var j;
1415
+ p = null, (j = l["delayed-click"]) == null || j.call(l, { e: k, event: u });
1404
1416
  }, 400);
1405
1417
  }, D.dblclick = (k) => {
1406
1418
  l.dblclick ? l.dblclick({ e: k, event: u }) : u.delete(1);
1407
1419
  }, D;
1408
1420
  }), e = (D) => {
1409
- var k, a, O;
1421
+ var k, a, j;
1410
1422
  const l = ((k = D.touches) == null ? void 0 : k[0]) || D;
1411
1423
  m.fromResizer = l.target.matches(".vuecal__event-resizer, .vuecal__event-resizer *");
1412
1424
  const p = F.value.getBoundingClientRect();
1413
- m.startX = (((a = D.touches) == null ? void 0 : a[0]) || D).clientX - p.left, m.startY = (((O = D.touches) == null ? void 0 : O[0]) || D).clientY - p.top, m.startPercentageX = m.startX * 100 / p.width, m.startPercentageY = m.startY * 100 / p.height, m.cellEl = F.value.closest(".vuecal__cell"), m.resizeStartDate = u.start, z(D.type === "touchstart" ? "touchmove" : "mousemove", h), z(D.type === "touchstart" ? "touchend" : "mouseup", c, { once: !0 }), m.holdTimer = setTimeout(() => {
1414
- var B, R;
1415
- m.holding = !0, (R = (B = o.value).hold) == null || R.call(B, { e: D, event: u });
1425
+ m.startX = (((a = D.touches) == null ? void 0 : a[0]) || D).clientX - p.left, m.startY = (((j = D.touches) == null ? void 0 : j[0]) || D).clientY - p.top, m.startPercentageX = m.startX * 100 / p.width, m.startPercentageY = m.startY * 100 / p.height, m.cellEl = F.value.closest(".vuecal__cell"), m.resizeStartDate = u.start, z(D.type === "touchstart" ? "touchmove" : "mousemove", h), z(D.type === "touchstart" ? "touchend" : "mouseup", c, { once: !0 }), m.holdTimer = setTimeout(() => {
1426
+ var R, N;
1427
+ m.holding = !0, (N = (R = o.value).hold) == null || N.call(R, { e: D, event: u });
1416
1428
  }, 1e3);
1417
1429
  }, h = async (D) => {
1418
- var p, k, a, O;
1430
+ var p, k, a, j;
1419
1431
  const l = ((p = D.touches) == null ? void 0 : p[0]) || D;
1420
1432
  if (m.fromResizer && !m.resizing && (m.resizing = !0, m.resizingOriginalEvent = { ...u, _: { ...u._ } }, b.isResizingEvent = !0, (a = (k = o.value).resizeStart) == null || a.call(k, { e: D, event: u })), m.holdTimer = clearTimeout(m.holdTimer), m.holding = !1, m.cellEl) {
1421
- const { top: B, left: R, width: oe, height: te } = m.cellEl.getBoundingClientRect();
1422
- m.moveX = l.clientX - R, m.moveY = l.clientY - B, m.movePercentageX = m.moveX * 100 / oe, m.movePercentageY = m.moveY * 100 / te;
1433
+ const { top: R, left: N, width: ne, height: x } = m.cellEl.getBoundingClientRect();
1434
+ m.moveX = l.clientX - N, m.moveY = l.clientY - R, m.movePercentageX = m.moveX * 100 / ne, m.movePercentageY = m.moveY * 100 / x;
1423
1435
  }
1424
1436
  if (m.fromResizer) {
1425
- const { newStart: B, newEnd: R } = E(u);
1426
- let oe = !0;
1427
- const { resize: te } = (O = r.eventListeners) == null ? void 0 : O.event;
1428
- te && (oe = await te({
1437
+ const { newStart: R, newEnd: N } = E(u);
1438
+ let ne = !0;
1439
+ const { resize: x } = (j = r.eventListeners) == null ? void 0 : j.event;
1440
+ x && (ne = await x({
1429
1441
  e: D,
1430
- event: { ...u, start: B, end: R },
1431
- overlaps: u.getOverlappingEvents({ start: B, end: R })
1432
- })), oe !== !1 ? (u.start = B, u.end = R, m.resizingLastAcceptedEvent && (m.resizingLastAcceptedEvent = null)) : te && (m.resizingLastAcceptedEvent = { ...u, _: { ...u._ } });
1442
+ event: { ...u, start: R, end: N },
1443
+ overlaps: u.getOverlappingEvents({ start: R, end: N })
1444
+ })), ne !== !1 ? (u.start = R, u.end = N, m.resizingLastAcceptedEvent && (m.resizingLastAcceptedEvent = null)) : x && (m.resizingLastAcceptedEvent = { ...u, _: { ...u._ } });
1433
1445
  }
1434
1446
  }, c = async (D) => {
1435
1447
  var l, p;
1436
1448
  if (m.holdTimer = clearTimeout(m.holdTimer), m.holding = !1, m.resizing) {
1437
1449
  const { newStart: k, newEnd: a } = E(u);
1438
- let O = !0;
1439
- const B = o.value["resize-end"];
1440
- B && (O = await B({
1450
+ let j = !0;
1451
+ const R = o.value["resize-end"];
1452
+ R && (j = await R({
1441
1453
  e: D,
1442
1454
  event: u,
1443
1455
  original: m.resizingOriginalEvent,
1444
1456
  // Original event details before resizing.
1445
1457
  overlaps: u.getOverlappingEvents({ start: k, end: a })
1446
- })), u.start = O === !1 ? (m.resizingLastAcceptedEvent || m.resizingOriginalEvent).start : ((l = m.resizingLastAcceptedEvent) == null ? void 0 : l.start) || k, u.end = O === !1 ? (m.resizingLastAcceptedEvent || m.resizingOriginalEvent).end : ((p = m.resizingLastAcceptedEvent) == null ? void 0 : p.end) || a, u._.duration < 1 && (u.start = m.resizingOriginalEvent.start, u.end = m.resizingOriginalEvent.end), b.isResizingEvent = !1;
1458
+ })), u.start = j === !1 ? (m.resizingLastAcceptedEvent || m.resizingOriginalEvent).start : ((l = m.resizingLastAcceptedEvent) == null ? void 0 : l.start) || k, u.end = j === !1 ? (m.resizingLastAcceptedEvent || m.resizingOriginalEvent).end : ((p = m.resizingLastAcceptedEvent) == null ? void 0 : p.end) || a, u._.duration < 1 && (u.start = m.resizingOriginalEvent.start, u.end = m.resizingOriginalEvent.end), b.isResizingEvent = !1;
1447
1459
  }
1448
1460
  document.removeEventListener(D.type === "touchend" ? "touchmove" : "mousemove", h), 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;
1449
1461
  }, E = (D) => {
@@ -1451,11 +1463,11 @@ const st = (y, s) => {
1451
1463
  new Date(l).setDate(l.getDate() + 1);
1452
1464
  let k = Fe(m.movePercentageY, r);
1453
1465
  if (k = Math.max(0, Math.min(k, 24 * 60)), r.snapToInterval) {
1454
- const B = k + r.snapToInterval / 2;
1455
- k = B - B % r.snapToInterval;
1466
+ const R = k + r.snapToInterval / 2;
1467
+ k = R - R % r.snapToInterval;
1456
1468
  }
1457
- let a = D.start, O = new Date(l.getTime() + k * 6e4);
1458
- return O < m.resizeStartDate && (a = O, O = m.resizeStartDate), { newStart: a, newEnd: O };
1469
+ let a = D.start, j = new Date(l.getTime() + k * 6e4);
1470
+ return j < m.resizeStartDate && (a = j, j = m.resizeStartDate), { newStart: a, newEnd: j };
1459
1471
  };
1460
1472
  qe(() => u._.register(F.value));
1461
1473
  const L = [], z = (D, l, p) => {
@@ -1465,66 +1477,69 @@ const st = (y, s) => {
1465
1477
  u._.unregister();
1466
1478
  for (const { event: D, handler: l, options: p } of L)
1467
1479
  document.removeEventListener(D, l, p);
1468
- }), (D, l) => (C(), j("div", de({ class: "vuecal__event" }, Be(o.value, !0), {
1480
+ }), (D, l) => (C(), O("div", de({ class: "vuecal__event" }, Be(o.value, !0), {
1469
1481
  ref_key: "eventEl",
1470
1482
  ref: F,
1471
- class: q.value,
1483
+ class: Z.value,
1472
1484
  style: t.value,
1473
1485
  draggable: Y.value ? "true" : void 0,
1474
1486
  onDragstart: l[2] || (l[2] = (p) => Y.value && V(w).eventDragStart(p, u)),
1475
1487
  onDragend: l[3] || (l[3] = (p) => Y.value && V(w).eventDragEnd(p, u))
1476
1488
  }), [
1477
- ge("div", xt, [
1489
+ ve("div", xt, [
1478
1490
  P(D.$slots, "event", { event: u }, () => [
1479
- ge("div", ea, ie(u.title), 1),
1480
- V(r).time ? (C(), j("div", ta, ie(u._[`startTimeFormatted${V(r).twelveHour ? 12 : 24}`]) + `
1481
- - ` + ie(u._[`endTimeFormatted${V(r).twelveHour ? 12 : 24}`]), 1)) : K("", !0),
1482
- ge("div", {
1491
+ ve("div", ea, ie(u.title), 1),
1492
+ V(r).time && !(V(r).allDayEvents && u.allDay) ? (C(), O("div", ta, [
1493
+ V(d).isMonth ? (C(), O("span", aa, ",")) : q("", !0),
1494
+ ve("span", na, ie(u._[`startTimeFormatted${V(r).twelveHour ? 12 : 24}`]), 1),
1495
+ V(d).isMonth ? q("", !0) : (C(), O("span", sa, "- " + ie(u._[`endTimeFormatted${V(r).twelveHour ? 12 : 24}`]), 1))
1496
+ ])) : q("", !0),
1497
+ ve("div", {
1483
1498
  class: "vuecal__event-content",
1484
1499
  innerHTML: u.content
1485
- }, null, 8, aa)
1500
+ }, null, 8, la)
1486
1501
  ])
1487
1502
  ]),
1488
- W.value ? (C(), j("div", {
1503
+ A.value ? (C(), O("div", {
1489
1504
  key: 0,
1490
1505
  class: "vuecal__event-resizer",
1491
1506
  onDragstart: l[0] || (l[0] = xe(() => {
1492
1507
  }, ["prevent", "stop"]))
1493
- }, null, 32)) : K("", !0),
1508
+ }, null, 32)) : q("", !0),
1494
1509
  Oe(Ge, { name: "vuecal-delete-btn" }, {
1495
1510
  default: J(() => [
1496
- u._.deleting ? (C(), j("div", {
1511
+ u._.deleting ? (C(), O("div", {
1497
1512
  key: 0,
1498
1513
  class: "vuecal__event-delete",
1499
1514
  onClick: l[1] || (l[1] = xe((p) => u.delete(3), ["stop"]))
1500
- }, "Delete")) : K("", !0)
1515
+ }, "Delete")) : q("", !0)
1501
1516
  ]),
1502
1517
  _: 1
1503
1518
  })
1504
1519
  ], 16, Qt));
1505
1520
  }
1506
- }, na = ["innerHTML"], sa = ["data-schedule"], la = {
1521
+ }, ra = ["innerHTML"], oa = ["data-schedule"], ia = {
1507
1522
  key: 1,
1508
1523
  class: "vuecal__cell-date"
1509
- }, ra = {
1524
+ }, ua = {
1510
1525
  key: 2,
1511
1526
  class: "vuecal__cell-content"
1512
- }, oa = {
1527
+ }, ca = {
1513
1528
  key: 3,
1514
1529
  class: "vuecal__cell-events"
1515
- }, ia = {
1530
+ }, da = {
1516
1531
  key: 1,
1517
1532
  class: "vuecal__cell-date"
1518
- }, ua = {
1533
+ }, va = {
1519
1534
  key: 2,
1520
1535
  class: "vuecal__cell-content"
1521
- }, ca = {
1536
+ }, ma = {
1522
1537
  key: 3,
1523
1538
  class: "vuecal__cell-events"
1524
- }, da = {
1539
+ }, fa = {
1525
1540
  key: 5,
1526
1541
  class: "vuecal__cell-events-count"
1527
- }, va = ["title"], ma = {
1542
+ }, ga = ["title"], ha = {
1528
1543
  __name: "cell",
1529
1544
  props: {
1530
1545
  // Even with time=false, the date of the cell will still be provided in order to attach
@@ -1534,9 +1549,9 @@ const st = (y, s) => {
1534
1549
  index: { type: Number, required: !0 }
1535
1550
  },
1536
1551
  setup(y) {
1537
- const s = y, r = Ne("vuecal"), { view: d, config: w, dateUtils: b, eventsManager: H, dnd: f, touch: F } = r, u = M(() => b.isToday(s.start)), m = ue(null), Y = ue([]), W = ue(!1), q = (i) => {
1538
- Y.value.push(i.detail), W.value = !0;
1539
- }, t = () => setTimeout(() => W.value = !1, 300), o = $e({
1552
+ const s = y, r = Ne("vuecal"), { view: d, config: w, dateUtils: b, eventsManager: H, dnd: f, touch: F } = r, u = M(() => b.isToday(s.start)), m = ue(null), Y = ue([]), A = ue(!1), Z = (i) => {
1553
+ Y.value.push(i.detail), A.value = !0;
1554
+ }, t = () => setTimeout(() => A.value = !1, 300), o = $e({
1540
1555
  dragging: !1,
1541
1556
  holding: !1,
1542
1557
  // When the cell is clicked and hold for a certain amount of time.
@@ -1574,21 +1589,21 @@ const st = (y, s) => {
1574
1589
  const i = w.editableEvents.create && (o.dragging || e.value), T = w.eventCreateMinDrag && o.thresholdPassed || !w.eventCreateMinDrag;
1575
1590
  return i && T;
1576
1591
  }), L = M(() => {
1577
- var ne;
1578
- const i = /* @__PURE__ */ new Date(), T = d.start.getFullYear(), S = d.start.getMonth(), $ = s.start.getFullYear(), I = s.start.getMonth();
1592
+ var se;
1593
+ const i = /* @__PURE__ */ new Date(), T = d.start.getFullYear(), S = d.start.getMonth(), $ = s.start.getFullYear(), B = s.start.getMonth();
1579
1594
  return {
1580
1595
  [`vuecal__cell--${Re[s.start.getDay()]}`]: d.isDay || d.isDays || d.isWeek || d.isMonth,
1581
- [`vuecal__cell--${Tt[I]}`]: d.isYear,
1596
+ [`vuecal__cell--${Tt[B]}`]: d.isYear,
1582
1597
  [`vuecal__cell--${$}`]: d.isYears,
1583
1598
  "vuecal__cell--today": u.value,
1584
- "vuecal__cell--current-month": d.isYear && $ === i.getFullYear() && I === i.getMonth(),
1599
+ "vuecal__cell--current-month": d.isYear && $ === i.getFullYear() && B === i.getMonth(),
1585
1600
  "vuecal__cell--current-year": d.isYears && $ === i.getFullYear(),
1586
- "vuecal__cell--out-of-range": d.isMonth && ($ !== T || I !== S),
1587
- "vuecal__cell--before-min": te.value && R.value,
1588
- "vuecal__cell--after-max": te.value && oe.value,
1589
- "vuecal__cell--disabled": te.value,
1601
+ "vuecal__cell--out-of-range": d.isMonth && ($ !== T || B !== S),
1602
+ "vuecal__cell--before-min": x.value && N.value,
1603
+ "vuecal__cell--after-max": x.value && ne.value,
1604
+ "vuecal__cell--disabled": x.value,
1590
1605
  "vuecal__cell--selected": d.selectedDate && d.selectedDate.getTime() >= s.start.getTime() && d.selectedDate.getTime() <= s.end.getTime(),
1591
- "vuecal__cell--has-schedules": (ne = w.schedules) == null ? void 0 : ne.length,
1606
+ "vuecal__cell--has-schedules": (se = w.schedules) == null ? void 0 : se.length,
1592
1607
  "vuecal__cell--dragging": o.dragging,
1593
1608
  "vuecal__cell--has-events": D.value.length
1594
1609
  };
@@ -1616,73 +1631,73 @@ const st = (y, s) => {
1616
1631
  if (d.isMonth || d.isYear || d.isYears) return {};
1617
1632
  const i = {};
1618
1633
  for (const T of D.value) {
1619
- const S = T._.id, { maxConcurrent: $ = 1, position: I = 0 } = h.value.cellOverlaps[S] || {};
1620
- i[S] = { left: `${100 / $ * I}%` }, w.stackEvents ? i[S].width = `${100 / $ + (I === $ - 1 ? 0 : 15)}%` : i[S].width = `${100 / $}%`;
1634
+ const S = T._.id, { maxConcurrent: $ = 1, position: B = 0 } = h.value.cellOverlaps[S] || {};
1635
+ i[S] = { left: `${100 / $ * B}%` }, w.stackEvents ? i[S].width = `${100 / $ + (B === $ - 1 ? 0 : 15)}%` : i[S].width = `${100 / $}%`;
1621
1636
  }
1622
1637
  return i;
1623
1638
  }), a = M(() => {
1624
1639
  const i = {};
1625
1640
  for (const T of D.value) {
1626
- const S = T._.id, { maxConcurrent: $ = 1, position: I = 0 } = h.value.cellOverlaps[S] || {};
1627
- i[S] = `vuecal__event--stack-${I + 1}-${$}`;
1641
+ const S = T._.id, { maxConcurrent: $ = 1, position: B = 0 } = h.value.cellOverlaps[S] || {};
1642
+ i[S] = `vuecal__event--stack-${B + 1}-${$}`;
1628
1643
  }
1629
1644
  return i;
1630
- }), O = M(() => w.showCellEventCount && l.value.length), B = M(() => {
1645
+ }), j = M(() => w.showCellEventCount && l.value.length), R = M(() => {
1631
1646
  var S;
1632
1647
  if (!w.specialHours || d.isMonth || d.isYear || d.isYears) return;
1633
1648
  const i = Re[s.start.getDay()];
1634
1649
  let T = (S = w.specialHours) == null ? void 0 : S[i];
1635
1650
  if (T)
1636
1651
  return Array.isArray(T) || (T = [T]), T.map(($) => {
1637
- let { from: I, to: G, class: ne, label: De } = $;
1638
- if (isNaN(I) || isNaN(G) || w.timeFrom >= G || w.timeTo <= I) return;
1639
- I = Math.max(w.timeFrom, I), G = Math.min(w.timeTo, G);
1640
- const v = Ve(I, w), N = Ve(G, w) - v;
1652
+ let { from: B, to: G, class: se, label: De } = $;
1653
+ if (isNaN(B) || isNaN(G) || w.timeFrom >= G || w.timeTo <= B) return;
1654
+ B = Math.max(w.timeFrom, B), G = Math.min(w.timeTo, G);
1655
+ const v = Ve(B, w), W = Ve(G, w) - v;
1641
1656
  return {
1642
- style: { top: `${v}%`, height: `${N}%` },
1657
+ style: { top: `${v}%`, height: `${W}%` },
1643
1658
  label: De,
1644
- class: ne
1659
+ class: se
1645
1660
  };
1646
1661
  }).filter(($) => !!$);
1647
- }), R = M(() => w.minTimestamp !== null && w.minTimestamp > s.end.getTime()), oe = M(() => w.maxTimestamp && w.maxTimestamp < s.start.getTime()), te = M(() => {
1662
+ }), N = M(() => w.minTimestamp !== null && w.minTimestamp > s.end.getTime()), ne = M(() => w.maxTimestamp && w.maxTimestamp < s.start.getTime()), x = M(() => {
1648
1663
  const { disableDays: i } = w, T = d.isYear || d.isYears;
1649
- return i.length && i.includes(b.formatDate(s.start)) && !T ? !0 : R.value || oe.value;
1650
- }), se = $e({
1664
+ return i.length && i.includes(b.formatDate(s.start)) && !T ? !0 : N.value || ne.value;
1665
+ }), le = $e({
1651
1666
  show: M(() => {
1652
1667
  if (!(!d.isDay && !d.isDays && !d.isWeek) && !(!u.value || !w.time) && !(w.timeFrom > b.dateToMinutes(d.now)) && !(b.dateToMinutes(d.now) > w.timeTo))
1653
1668
  return !0;
1654
1669
  }),
1655
1670
  nowInMinutes: M(() => b.dateToMinutes(d.now)),
1656
- todaysTimePosition: M(() => Ve(se.nowInMinutes, w)),
1657
- style: M(() => `top: ${se.todaysTimePosition}%`),
1671
+ todaysTimePosition: M(() => Ve(le.nowInMinutes, w)),
1672
+ style: M(() => `top: ${le.todaysTimePosition}%`),
1658
1673
  currentTime: M(() => b.formatTime(d.now))
1659
1674
  }), ce = M(() => {
1660
- if (te.value) return {};
1675
+ if (x.value) return {};
1661
1676
  const i = { ...w.eventListeners.cell };
1662
- for (const [$, I] of Object.entries(i))
1677
+ for (const [$, B] of Object.entries(i))
1663
1678
  i[$] = (G) => {
1664
- var ne, De, v;
1665
- (v = (De = G.target || ((ne = G.e) == null ? void 0 : ne.target)).closest) != null && v.call(De, ".vuecal__event") || I(G.type ? { e: G, cell: X.value, cursor: Q.value } : G);
1679
+ var se, De, v;
1680
+ (v = (De = G.target || ((se = G.e) == null ? void 0 : se.target)).closest) != null && v.call(De, ".vuecal__event") || B(G.type ? { e: G, cell: X.value, cursor: Q.value } : G);
1666
1681
  };
1667
1682
  const T = { ...i };
1668
1683
  let S = null;
1669
1684
  return i.click = ($) => {
1670
1685
  var G;
1671
- le();
1672
- const I = Ee($);
1673
- (G = T.click) == null || G.call(T, { e: $, cell: X.value, cursor: I }), S ? S = clearTimeout(S) : S = setTimeout(() => {
1674
- var ne;
1675
- S = null, (ne = T["delayed-click"]) == null || ne.call(T, { e: $, cell: X.value, cursor: I });
1686
+ re();
1687
+ const B = Ee($);
1688
+ (G = T.click) == null || G.call(T, { e: $, cell: X.value, cursor: B }), S ? S = clearTimeout(S) : S = setTimeout(() => {
1689
+ var se;
1690
+ S = null, (se = T["delayed-click"]) == null || se.call(T, { e: $, cell: X.value, cursor: B });
1676
1691
  }, 400);
1677
1692
  }, (w.time && d.isDay || d.isDays || d.isWeek) && (i.touchstart = ($) => {
1678
- var I;
1679
- n($.e || $), (I = T.touchstart) == null || I.call(T, { e: $, cell: X.value, cursor: Q.value });
1693
+ var B;
1694
+ n($.e || $), (B = T.touchstart) == null || B.call(T, { e: $, cell: X.value, cursor: Q.value });
1680
1695
  }, i.mousedown = ($) => {
1681
- var I;
1682
- n($.e || $), (I = T.mousedown) == null || I.call(T, { e: $, cell: X.value, cursor: Q.value });
1696
+ var B;
1697
+ n($.e || $), (B = T.mousedown) == null || B.call(T, { e: $, cell: X.value, cursor: Q.value });
1683
1698
  }), T.dblclick && (i.dblclick = ($) => {
1684
- var I;
1685
- (I = T.dblclick) == null || I.call(T, { e: $, cell: X.value, cursor: Ee($) });
1699
+ var B;
1700
+ (B = T.dblclick) == null || B.call(T, { e: $, cell: X.value, cursor: Ee($) });
1686
1701
  }), w.editableEvents.drag && (i.dragenter = ($) => f.cellDragEnter($, X.value), i.dragover = ($) => {
1687
1702
  $.preventDefault(), f.cellDragOver($, X.value);
1688
1703
  }, i.dragleave = ($) => f.cellDragLeave($, X.value), i.drop = ($) => f.cellDragDrop($, X.value)), i;
@@ -1697,8 +1712,8 @@ const st = (y, s) => {
1697
1712
  narrower: d.narrowerView
1698
1713
  })), Ee = (i) => {
1699
1714
  var G;
1700
- const T = (((G = i.touches) == null ? void 0 : G[0]) || i).clientY, { top: S } = m.value.getBoundingClientRect(), $ = Ze(T - S, m.value), I = new Date(s.start);
1701
- return I.setMinutes(Fe($, w)), { y: $, date: I };
1715
+ const T = (((G = i.touches) == null ? void 0 : G[0]) || i).clientY, { top: S } = m.value.getBoundingClientRect(), $ = Ze(T - S, m.value), B = new Date(s.start);
1716
+ return B.setMinutes(Fe($, w)), { y: $, date: B };
1702
1717
  }, Q = M(() => {
1703
1718
  const i = Fe(o.movePercentageY || o.startPercentageY, w), T = new Date(s.start);
1704
1719
  return T.setMinutes(i), {
@@ -1706,42 +1721,42 @@ const st = (y, s) => {
1706
1721
  y: o.movePercentageY || o.startPercentageY,
1707
1722
  date: T
1708
1723
  };
1709
- }), le = () => {
1724
+ }), re = () => {
1710
1725
  d.updateSelectedDate(s.start), w.clickToNavigate && ((d.isMonth || d.isDays || d.isWeek) && w.availableViews.day ? d.switch("day") : d.isYear && w.availableViews.month ? d.switch("month") : d.isYears && w.availableViews.year && d.switch("year")), d.updateViewDate(s.start);
1711
1726
  }, n = (i) => {
1712
1727
  var S, $;
1713
1728
  o.schedule = ~~i.target.dataset.schedule;
1714
1729
  const T = m.value.getBoundingClientRect();
1715
1730
  o.startX = (((S = i.touches) == null ? void 0 : S[0]) || i).clientX - T.left, o.startY = ((($ = i.touches) == null ? void 0 : $[0]) || i).clientY - T.top, o.startPercentageX = o.startX * 100 / T.width, o.startPercentageY = o.startY * 100 / T.height, o.thresholdPassed = !1, document.addEventListener(i.type === "touchstart" ? "touchmove" : "mousemove", _), document.addEventListener(i.type === "touchstart" ? "touchend" : "mouseup", g, { once: !0 }), o.holdTimer = setTimeout(() => {
1716
- var I, G;
1717
- o.holding = !0, (G = (I = ce.value).hold) == null || G.call(I, { e: i, cell: X.value, cursor: Q.value });
1731
+ var B, G;
1732
+ o.holding = !0, (G = (B = ce.value).hold) == null || G.call(B, { e: i, cell: X.value, cursor: Q.value });
1718
1733
  }, 1e3);
1719
1734
  }, _ = (i) => {
1720
- var S, $, I, G, ne, De;
1735
+ var S, $, B, G, se, De;
1721
1736
  o.dragging || (F.isDraggingCell = !0, ($ = (S = ce.value)["drag-start"]) == null || $.call(S, { e: i, cell: X.value, cursor: Q.value })), o.dragging = !0, o.holdTimer = clearTimeout(o.holdTimer), o.holding = !1;
1722
1737
  const T = m.value.getBoundingClientRect();
1723
- o.moveX = (((I = i.touches) == null ? void 0 : I[0]) || i).clientX - T.left, o.moveY = (((G = i.touches) == null ? void 0 : G[0]) || i).clientY - T.top, o.movePercentageX = o.moveX * 100 / T.width, o.movePercentageY = o.moveY * 100 / T.height, w.eventCreateMinDrag && Math.abs(o.startY - o.moveY) > w.eventCreateMinDrag && (o.thresholdPassed = !0), (De = (ne = ce.value).drag) == null || De.call(ne, { e: i, cell: X.value, cursor: Q.value });
1738
+ o.moveX = (((B = i.touches) == null ? void 0 : B[0]) || i).clientX - T.left, o.moveY = (((G = i.touches) == null ? void 0 : G[0]) || i).clientY - T.top, o.movePercentageX = o.moveX * 100 / T.width, o.movePercentageY = o.moveY * 100 / T.height, w.eventCreateMinDrag && Math.abs(o.startY - o.moveY) > w.eventCreateMinDrag && (o.thresholdPassed = !0), (De = (se = ce.value).drag) == null || De.call(se, { e: i, cell: X.value, cursor: Q.value });
1724
1739
  }, g = async (i) => {
1725
1740
  var T, S;
1726
- document.removeEventListener(i.type === "touchend" ? "touchmove" : "mousemove", _, { passive: !1 }), o.dragging && ((S = (T = ce.value)["drag-end"]) == null || S.call(T, { e: i, cell: X.value, cursor: Q.value }), F.isDraggingCell = !1, w.editableEvents.create && (e.value = !0, await A(i), e.value = !1)), o.holdTimer = clearTimeout(o.holdTimer), o.holding = !1, o.dragging = !1, o.startX = 0, o.startY = 0, o.moveX = 0, o.moveY = 0, o.startPercentageX = 0, o.startPercentageY = 0, o.movePercentageX = 0, o.movePercentageY = 0, o.thresholdPassed = !1, o.schedule = null;
1727
- }, A = async (i) => {
1741
+ document.removeEventListener(i.type === "touchend" ? "touchmove" : "mousemove", _, { passive: !1 }), o.dragging && ((S = (T = ce.value)["drag-end"]) == null || S.call(T, { e: i, cell: X.value, cursor: Q.value }), F.isDraggingCell = !1, w.editableEvents.create && (e.value = !0, await I(i), e.value = !1)), o.holdTimer = clearTimeout(o.holdTimer), o.holding = !1, o.dragging = !1, o.startX = 0, o.startY = 0, o.moveX = 0, o.moveY = 0, o.startPercentageX = 0, o.startPercentageY = 0, o.movePercentageX = 0, o.movePercentageY = 0, o.thresholdPassed = !1, o.schedule = null;
1742
+ }, I = async (i) => {
1728
1743
  if (!E.value) return;
1729
- let { start: T, end: S, startMinutes: $, endMinutes: I } = c.value;
1730
- T = new Date(s.start), T.setMinutes($), S = new Date(s.start), S.setMinutes(I);
1744
+ let { start: T, end: S, startMinutes: $, endMinutes: B } = c.value;
1745
+ T = new Date(s.start), T.setMinutes($), S = new Date(s.start), S.setMinutes(B);
1731
1746
  let G = { ...c.value, start: T, end: S };
1732
- const { create: ne } = w.eventListeners.event;
1733
- if (typeof ne == "function") {
1747
+ const { create: se } = w.eventListeners.event;
1748
+ if (typeof se == "function") {
1734
1749
  const De = G;
1735
- G = await new Promise((v) => ne({ e: i, event: G, cell: X.value, resolve: v, cursor: Q.value })), G && typeof G == "object" && d.createEvent(G), G && typeof G == "boolean" && d.createEvent(De);
1750
+ G = await new Promise((v) => se({ e: i, event: G, cell: X.value, resolve: v, cursor: Q.value })), G && typeof G == "object" && d.createEvent(G), G && typeof G == "boolean" && d.createEvent(De);
1736
1751
  } else d.createEvent(G);
1737
- }, x = () => {
1752
+ }, ee = () => {
1738
1753
  var i;
1739
1754
  for (const T of Object.keys(ce.value))
1740
1755
  (i = m.value) == null || i.removeEventListener(T, ce.value[T]);
1741
1756
  }, he = () => {
1742
1757
  h.value = H.getCellOverlappingEvents(s.start, s.end);
1743
1758
  };
1744
- return me(
1759
+ return fe(
1745
1760
  // Watch event IDs and start/end dates (only) to detect event resizing/dnd.
1746
1761
  () => !d.isYears && !d.isYear && l.value.map((i) => `${i._.id}${i.start.getTime()}${i.end.getTime()}`).join(),
1747
1762
  async () => {
@@ -1751,8 +1766,8 @@ const st = (y, s) => {
1751
1766
  // Use flush: 'post' to prevent infinite updates.
1752
1767
  ), Xe(async () => {
1753
1768
  for (const i of Y.value) H.deleteEvent(i, 3);
1754
- x(), await Ue();
1755
- }), (i, T) => (C(), j("div", de({
1769
+ ee(), await Ue();
1770
+ }), (i, T) => (C(), O("div", de({
1756
1771
  class: ["vuecal__cell", L.value],
1757
1772
  ref_key: "cellEl",
1758
1773
  ref: m
@@ -1760,13 +1775,13 @@ const st = (y, s) => {
1760
1775
  i.$slots.cell ? P(i.$slots, "cell", {
1761
1776
  key: 0,
1762
1777
  cell: X.value
1763
- }) : K("", !0),
1764
- B.value ? (C(!0), j(re, { key: 1 }, ke(B.value, (S, $) => (C(), j("div", {
1778
+ }) : q("", !0),
1779
+ R.value ? (C(!0), O(oe, { key: 1 }, ke(R.value, (S, $) => (C(), O("div", {
1765
1780
  class: ye(["vuecal__special-hours", S.class]),
1766
1781
  style: _e(S.style),
1767
1782
  innerHTML: S.label || ""
1768
- }, null, 14, na))), 256)) : K("", !0),
1769
- !i.$slots.cell && V(w).schedules ? (C(!0), j(re, { key: 2 }, ke(V(w).schedules, (S) => (C(), j("div", {
1783
+ }, null, 14, ra))), 256)) : q("", !0),
1784
+ !i.$slots.cell && V(w).schedules ? (C(!0), O(oe, { key: 2 }, ke(V(w).schedules, (S) => (C(), O("div", {
1770
1785
  class: ye(["vuecal__schedule vuecal__schedule--cell", S.class]),
1771
1786
  key: S.id,
1772
1787
  style: _e(S.style || null),
@@ -1775,77 +1790,77 @@ const st = (y, s) => {
1775
1790
  i.$slots["cell-events"] ? P(i.$slots, "cell-events", {
1776
1791
  key: 0,
1777
1792
  cell: X.value
1778
- }) : K("", !0),
1779
- z.value || i.$slots["cell-date"] ? (C(), j("div", la, [
1793
+ }) : q("", !0),
1794
+ z.value || i.$slots["cell-date"] ? (C(), O("div", ia, [
1780
1795
  P(i.$slots, "cell-date", { cell: X.value }, () => [
1781
1796
  et(ie(z.value), 1)
1782
1797
  ])
1783
- ])) : K("", !0),
1784
- i.$slots["cell-content"] ? (C(), j("div", ra, [
1798
+ ])) : q("", !0),
1799
+ i.$slots["cell-content"] ? (C(), O("div", ua, [
1785
1800
  P(i.$slots, "cell-content", { cell: X.value })
1786
- ])) : K("", !0),
1787
- i.$slots["cell-events"] && D.value.length ? (C(), j("div", oa, [
1801
+ ])) : q("", !0),
1802
+ i.$slots["cell-events"] && D.value.length ? (C(), O("div", ca, [
1788
1803
  P(i.$slots, "cell-events", { cell: X.value })
1789
- ])) : D.value.length || W.value ? (C(), Se(tt, {
1804
+ ])) : D.value.length || A.value ? (C(), Se(tt, {
1790
1805
  key: 4,
1791
1806
  class: "vuecal__cell-events",
1792
1807
  name: "vuecal-event-delete",
1793
- onBeforeLeave: T[0] || (T[0] = ($) => W.value = !0),
1808
+ onBeforeLeave: T[0] || (T[0] = ($) => A.value = !0),
1794
1809
  onAfterLeave: t,
1795
1810
  tag: "div"
1796
1811
  }, {
1797
1812
  default: J(() => [
1798
- (C(!0), j(re, null, ke(p.value[S.id], ($) => (C(), Se(nt, {
1813
+ (C(!0), O(oe, null, ke(p.value[S.id], ($) => (C(), Se(nt, {
1799
1814
  key: $._.id,
1800
1815
  event: $,
1801
- onEventDeleted: q,
1816
+ onEventDeleted: Z,
1802
1817
  style: _e(k.value[$._.id])
1803
1818
  }, je({ _: 2 }, [
1804
1819
  i.$slots.event ? {
1805
1820
  name: "event",
1806
- fn: J((I) => [
1807
- P(i.$slots, "event", de({ ref_for: !0 }, I))
1821
+ fn: J((B) => [
1822
+ P(i.$slots, "event", de({ ref_for: !0 }, B))
1808
1823
  ]),
1809
1824
  key: "0"
1810
1825
  } : void 0
1811
1826
  ]), 1032, ["event", "style"]))), 128))
1812
1827
  ]),
1813
1828
  _: 2
1814
- }, 1024)) : K("", !0),
1815
- E.value && o.schedule === S.id ? (C(), j("div", {
1829
+ }, 1024)) : q("", !0),
1830
+ E.value && o.schedule === S.id ? (C(), O("div", {
1816
1831
  key: 5,
1817
1832
  class: "vuecal__event-placeholder",
1818
1833
  style: _e(c.value.style)
1819
- }, ie(c.value.start) + " - " + ie(c.value.end), 5)) : K("", !0)
1820
- ], 14, sa))), 128)) : K("", !0),
1821
- !i.$slots.cell && !V(w).schedules ? (C(), j(re, { key: 3 }, [
1834
+ }, ie(c.value.start) + " - " + ie(c.value.end), 5)) : q("", !0)
1835
+ ], 14, oa))), 128)) : q("", !0),
1836
+ !i.$slots.cell && !V(w).schedules ? (C(), O(oe, { key: 3 }, [
1822
1837
  i.$slots["cell-events"] ? P(i.$slots, "cell-events", {
1823
1838
  key: 0,
1824
1839
  cell: X.value
1825
- }) : K("", !0),
1826
- z.value || i.$slots["cell-date"] ? (C(), j("div", ia, [
1840
+ }) : q("", !0),
1841
+ z.value || i.$slots["cell-date"] ? (C(), O("div", da, [
1827
1842
  P(i.$slots, "cell-date", { cell: X.value }, () => [
1828
1843
  et(ie(z.value), 1)
1829
1844
  ])
1830
- ])) : K("", !0),
1831
- i.$slots["cell-content"] ? (C(), j("div", ua, [
1845
+ ])) : q("", !0),
1846
+ i.$slots["cell-content"] ? (C(), O("div", va, [
1832
1847
  P(i.$slots, "cell-content", { cell: X.value })
1833
- ])) : K("", !0),
1834
- i.$slots["cell-events"] && D.value.length ? (C(), j("div", ca, [
1848
+ ])) : q("", !0),
1849
+ i.$slots["cell-events"] && D.value.length ? (C(), O("div", ma, [
1835
1850
  P(i.$slots, "cell-events", { cell: X.value })
1836
- ])) : !(V(d).isMonth && !V(w).eventsOnMonthView) && !V(d).isYear && !V(d).isYears && (D.value.length || W.value) ? (C(), Se(tt, {
1851
+ ])) : !(V(d).isMonth && !V(w).eventsOnMonthView) && !V(d).isYear && !V(d).isYears && (D.value.length || A.value) ? (C(), Se(tt, {
1837
1852
  key: 4,
1838
1853
  class: "vuecal__cell-events",
1839
1854
  name: "vuecal-event-delete",
1840
- onBeforeLeave: T[1] || (T[1] = (S) => W.value = !0),
1855
+ onBeforeLeave: T[1] || (T[1] = (S) => A.value = !0),
1841
1856
  onAfterLeave: t,
1842
1857
  tag: "div"
1843
1858
  }, {
1844
1859
  default: J(() => [
1845
- (C(!0), j(re, null, ke(D.value, (S) => (C(), Se(nt, {
1860
+ (C(!0), O(oe, null, ke(D.value, (S) => (C(), Se(nt, {
1846
1861
  key: S._.id,
1847
1862
  event: S,
1848
- onEventDeleted: q,
1863
+ onEventDeleted: Z,
1849
1864
  class: ye(a.value[S._.id]),
1850
1865
  style: _e(k.value[S._.id])
1851
1866
  }, je({ _: 2 }, [
@@ -1859,28 +1874,28 @@ const st = (y, s) => {
1859
1874
  ]), 1032, ["event", "class", "style"]))), 128))
1860
1875
  ]),
1861
1876
  _: 3
1862
- })) : K("", !0),
1863
- E.value ? (C(), j("div", {
1877
+ })) : q("", !0),
1878
+ E.value ? (C(), O("div", {
1864
1879
  key: 5,
1865
1880
  class: "vuecal__event-placeholder",
1866
1881
  style: _e(c.value.style)
1867
- }, ie(c.value.start) + " - " + ie(c.value.end), 5)) : K("", !0)
1868
- ], 64)) : K("", !0),
1882
+ }, ie(c.value.start) + " - " + ie(c.value.end), 5)) : q("", !0)
1883
+ ], 64)) : q("", !0),
1869
1884
  i.$slots["event-count"] ? P(i.$slots, "event-count", {
1870
1885
  key: 4,
1871
1886
  events: l.value
1872
- }) : O.value ? (C(), j("div", da, ie(l.value.length), 1)) : K("", !0),
1873
- se.show ? (C(), j("div", {
1887
+ }) : j.value ? (C(), O("div", fa, ie(l.value.length), 1)) : q("", !0),
1888
+ le.show ? (C(), O("div", {
1874
1889
  key: 6,
1875
1890
  class: "vuecal__now-line",
1876
- style: _e(se.style),
1877
- title: se.currentTime
1891
+ style: _e(le.style),
1892
+ title: le.currentTime
1878
1893
  }, [
1879
- ge("span", null, ie(se.currentTime), 1)
1880
- ], 12, va)) : K("", !0)
1894
+ ve("span", null, ie(le.currentTime), 1)
1895
+ ], 12, ga)) : q("", !0)
1881
1896
  ], 16));
1882
1897
  }
1883
- }, fa = {
1898
+ }, ya = {
1884
1899
  __name: "body",
1885
1900
  setup(y) {
1886
1901
  const s = Ne("vuecal"), { view: r, config: d, dateUtils: w } = s, b = ue(null), H = ue(null), f = M(() => ({
@@ -1895,8 +1910,8 @@ const st = (y, s) => {
1895
1910
  }), u = (Y) => {
1896
1911
  var t;
1897
1912
  if (r.isMonth || r.isYear || r.isYears) return;
1898
- const W = (((t = Y.touches) == null ? void 0 : t[0]) || Y).clientY, { top: q } = b.value.getBoundingClientRect();
1899
- H.value = Ze(W - q, b.value);
1913
+ const A = (((t = Y.touches) == null ? void 0 : t[0]) || Y).clientY, { top: Z } = b.value.getBoundingClientRect();
1914
+ H.value = Ze(A - Z, b.value);
1900
1915
  }, m = () => {
1901
1916
  H.value = null;
1902
1917
  };
@@ -1904,7 +1919,7 @@ const st = (y, s) => {
1904
1919
  b.value.addEventListener("mousemove", u), b.value.addEventListener("touchmove", u), b.value.addEventListener("mouseleave", m), b.value.addEventListener("touchend", m);
1905
1920
  }), Xe(() => {
1906
1921
  b.value && (b.value.removeEventListener("mousemove", u), b.value.removeEventListener("touchmove", u), b.value.removeEventListener("mouseleave", m), b.value.removeEventListener("touchend", m));
1907
- }), (Y, W) => (C(), j("div", {
1922
+ }), (Y, A) => (C(), O("div", {
1908
1923
  class: "vuecal__body",
1909
1924
  ref_key: "bodyEl",
1910
1925
  ref: b,
@@ -1912,20 +1927,20 @@ const st = (y, s) => {
1912
1927
  }, [
1913
1928
  Oe(Ge, { name: "vuecal-shrink" }, {
1914
1929
  default: J(() => [
1915
- V(d).timeAtCursor && H.value !== null ? (C(), j("div", {
1930
+ V(d).timeAtCursor && H.value !== null ? (C(), O("div", {
1916
1931
  key: 0,
1917
1932
  class: "vuecal__time-at-cursor",
1918
1933
  style: _e(F.value.style)
1919
1934
  }, [
1920
- ge("label", null, ie(F.value.time), 1)
1921
- ], 4)) : K("", !0)
1935
+ ve("label", null, ie(F.value.time), 1)
1936
+ ], 4)) : q("", !0)
1922
1937
  ]),
1923
1938
  _: 1
1924
1939
  }),
1925
- (C(!0), j(re, null, ke(V(r).cellDates, (q, t) => (C(), Se(ma, {
1940
+ (C(!0), O(oe, null, ke(V(r).cellDates, (Z, t) => (C(), Se(ha, {
1926
1941
  key: t,
1927
- start: q.start,
1928
- end: q.end,
1942
+ start: Z.start,
1943
+ end: Z.end,
1929
1944
  index: t
1930
1945
  }, je({ _: 2 }, [
1931
1946
  Y.$slots.cell ? {
@@ -1971,10 +1986,10 @@ const st = (y, s) => {
1971
1986
  ]), 1032, ["start", "end", "index"]))), 128))
1972
1987
  ], 4));
1973
1988
  }
1974
- }, ga = ["data-locale"], ha = { class: "vuecal__scrollable-wrap" }, ya = {
1989
+ }, Da = ["data-locale"], pa = { class: "vuecal__scrollable-wrap" }, wa = {
1975
1990
  key: 1,
1976
1991
  class: "vuecal__week-numbers"
1977
- }, Da = { class: "vuecal__week-number" }, pa = { class: "vuecal__body-wrap" }, _a = {
1992
+ }, _a = { class: "vuecal__week-number" }, ka = { class: "vuecal__body-wrap" }, $a = {
1978
1993
  __name: "index",
1979
1994
  props: Ft,
1980
1995
  emits: [
@@ -1991,7 +2006,7 @@ const st = (y, s) => {
1991
2006
  "event-drag-end"
1992
2007
  ],
1993
2008
  setup(y, { expose: s, emit: r }) {
1994
- const d = y, w = r, b = _t("vuecal-el"), H = Ot({ props: d, emit: w, attrs: bt(), vuecalEl: b, uid: kt() }), { config: f, view: F, dateUtils: u, touch: m } = H, Y = M(() => f.time && (F.isDay || F.isDays || F.isWeek)), W = M(() => Array(F.rows).fill().map((e, h) => u.getWeek(u.addDays(F.firstCellDate, 7 * h)))), q = M(() => {
2009
+ const d = y, w = r, b = _t("vuecal-el"), H = Ot({ props: d, emit: w, attrs: bt(), vuecalEl: b, uid: kt() }), { config: f, view: F, dateUtils: u, touch: m } = H, Y = M(() => f.time && (F.isDay || F.isDays || F.isWeek)), A = M(() => Array(F.rows).fill().map((e, h) => u.getWeek(u.addDays(F.firstCellDate, 7 * h)))), Z = M(() => {
1995
2010
  var e;
1996
2011
  return {
1997
2012
  "vuecal--ready": f.ready,
@@ -2022,8 +2037,8 @@ const st = (y, s) => {
2022
2037
  });
2023
2038
  return qe(async () => {
2024
2039
  await Ue(), f.ready = !0, w("ready", { config: f, view: F });
2025
- }), $t("vuecal", H), s({ view: H.view }), (e, h) => (C(), j("div", {
2026
- class: ye(["vuecal", q.value]),
2040
+ }), $t("vuecal", H), s({ view: H.view }), (e, h) => (C(), O("div", {
2041
+ class: ye(["vuecal", Z.value]),
2027
2042
  ref: "vuecal-el",
2028
2043
  "data-locale": e.locale,
2029
2044
  style: _e(t.value)
@@ -2031,99 +2046,99 @@ const st = (y, s) => {
2031
2046
  e.$slots.diy ? P(e.$slots, "diy", {
2032
2047
  key: 0,
2033
2048
  vuecal: V(H)
2034
- }) : (C(), j(re, { key: 1 }, [
2049
+ }) : (C(), O(oe, { key: 1 }, [
2035
2050
  Oe(At, null, je({ _: 2 }, [
2036
2051
  e.$slots.header ? {
2037
2052
  name: "header",
2038
2053
  fn: J((c) => [
2039
- P(e.$slots, "header", ee(ae(c)))
2054
+ P(e.$slots, "header", te(ae(c)))
2040
2055
  ]),
2041
2056
  key: "0"
2042
2057
  } : void 0,
2043
2058
  !e.$slots.header && e.$slots["previous-button"] ? {
2044
2059
  name: "previous-button",
2045
2060
  fn: J((c) => [
2046
- P(e.$slots, "previous-button", ee(ae(c)))
2061
+ P(e.$slots, "previous-button", te(ae(c)))
2047
2062
  ]),
2048
2063
  key: "1"
2049
2064
  } : void 0,
2050
2065
  !e.$slots.header && e.$slots["next-button"] ? {
2051
2066
  name: "next-button",
2052
2067
  fn: J((c) => [
2053
- P(e.$slots, "next-button", ee(ae(c)))
2068
+ P(e.$slots, "next-button", te(ae(c)))
2054
2069
  ]),
2055
2070
  key: "2"
2056
2071
  } : void 0,
2057
2072
  !e.$slots.header && e.$slots["today-button"] ? {
2058
2073
  name: "today-button",
2059
2074
  fn: J((c) => [
2060
- P(e.$slots, "today-button", ee(ae(c)))
2075
+ P(e.$slots, "today-button", te(ae(c)))
2061
2076
  ]),
2062
2077
  key: "3"
2063
2078
  } : void 0,
2064
2079
  !e.$slots.header && e.$slots.title ? {
2065
2080
  name: "title",
2066
2081
  fn: J((c) => [
2067
- P(e.$slots, "title", ee(ae(c)))
2082
+ P(e.$slots, "title", te(ae(c)))
2068
2083
  ]),
2069
2084
  key: "4"
2070
2085
  } : void 0,
2071
2086
  !e.$slots.header && e.$slots["title.day"] ? {
2072
2087
  name: "title.day",
2073
2088
  fn: J((c) => [
2074
- P(e.$slots, "title.day", ee(ae(c)))
2089
+ P(e.$slots, "title.day", te(ae(c)))
2075
2090
  ]),
2076
2091
  key: "5"
2077
2092
  } : void 0,
2078
2093
  !e.$slots.header && e.$slots["title.days"] ? {
2079
2094
  name: "title.days",
2080
2095
  fn: J((c) => [
2081
- P(e.$slots, "title.days", ee(ae(c)))
2096
+ P(e.$slots, "title.days", te(ae(c)))
2082
2097
  ]),
2083
2098
  key: "6"
2084
2099
  } : void 0,
2085
2100
  !e.$slots.header && e.$slots["title.week"] ? {
2086
2101
  name: "title.week",
2087
2102
  fn: J((c) => [
2088
- P(e.$slots, "title.week", ee(ae(c)))
2103
+ P(e.$slots, "title.week", te(ae(c)))
2089
2104
  ]),
2090
2105
  key: "7"
2091
2106
  } : void 0,
2092
2107
  !e.$slots.header && e.$slots["title.month"] ? {
2093
2108
  name: "title.month",
2094
2109
  fn: J((c) => [
2095
- P(e.$slots, "title.month", ee(ae(c)))
2110
+ P(e.$slots, "title.month", te(ae(c)))
2096
2111
  ]),
2097
2112
  key: "8"
2098
2113
  } : void 0,
2099
2114
  !e.$slots.header && e.$slots["title.year"] ? {
2100
2115
  name: "title.year",
2101
2116
  fn: J((c) => [
2102
- P(e.$slots, "title.year", ee(ae(c)))
2117
+ P(e.$slots, "title.year", te(ae(c)))
2103
2118
  ]),
2104
2119
  key: "9"
2105
2120
  } : void 0,
2106
2121
  !e.$slots.header && e.$slots["title.years"] ? {
2107
2122
  name: "title.years",
2108
2123
  fn: J((c) => [
2109
- P(e.$slots, "title.years", ee(ae(c)))
2124
+ P(e.$slots, "title.years", te(ae(c)))
2110
2125
  ]),
2111
2126
  key: "10"
2112
2127
  } : void 0,
2113
2128
  !e.$slots.header && e.$slots["schedule-heading"] ? {
2114
2129
  name: "schedule-heading",
2115
2130
  fn: J((c) => [
2116
- P(e.$slots, "schedule-heading", ee(ae(c)))
2131
+ P(e.$slots, "schedule-heading", te(ae(c)))
2117
2132
  ]),
2118
2133
  key: "11"
2119
2134
  } : void 0
2120
2135
  ]), 1024),
2121
- ge("div", ha, [
2136
+ ve("div", pa, [
2122
2137
  Oe(Ge, {
2123
2138
  name: `vuecal-slide-fade--${V(F).transitionDirection}`
2124
2139
  }, {
2125
2140
  default: J(() => [
2126
- (C(), j("div", {
2141
+ (C(), O("div", {
2127
2142
  class: ye(["vuecal__scrollable", o.value]),
2128
2143
  key: V(F).id + V(F).start.getTime()
2129
2144
  }, [
@@ -2131,75 +2146,75 @@ const st = (y, s) => {
2131
2146
  e.$slots["time-cell"] ? {
2132
2147
  name: "time-cell",
2133
2148
  fn: J((c) => [
2134
- P(e.$slots, "time-cell", ee(ae(c)))
2149
+ P(e.$slots, "time-cell", te(ae(c)))
2135
2150
  ]),
2136
2151
  key: "0"
2137
2152
  } : void 0
2138
- ]), 1024)) : K("", !0),
2139
- V(f).weekNumbers && V(F).isMonth ? (C(), j("div", ya, [
2140
- (C(!0), j(re, null, ke(W.value, (c) => (C(), j("div", Da, [
2153
+ ]), 1024)) : q("", !0),
2154
+ V(f).weekNumbers && V(F).isMonth ? (C(), O("div", wa, [
2155
+ (C(!0), O(oe, null, ke(A.value, (c) => (C(), O("div", _a, [
2141
2156
  P(e.$slots, "week-number", {}, () => [
2142
- ge("small", null, ie(c), 1)
2157
+ ve("small", null, ie(c), 1)
2143
2158
  ])
2144
2159
  ]))), 256))
2145
- ])) : K("", !0),
2146
- ge("div", pa, [
2160
+ ])) : q("", !0),
2161
+ ve("div", ka, [
2147
2162
  Oe(qt, null, je({ _: 2 }, [
2148
2163
  e.$slots["weekday-heading"] ? {
2149
2164
  name: "weekday-heading",
2150
2165
  fn: J((c) => [
2151
- P(e.$slots, "weekday-heading", ee(ae(c)))
2166
+ P(e.$slots, "weekday-heading", te(ae(c)))
2152
2167
  ]),
2153
2168
  key: "0"
2154
2169
  } : void 0,
2155
2170
  e.$slots["schedule-heading"] ? {
2156
2171
  name: "schedule-heading",
2157
2172
  fn: J((c) => [
2158
- P(e.$slots, "schedule-heading", ee(ae(c)))
2173
+ P(e.$slots, "schedule-heading", te(ae(c)))
2159
2174
  ]),
2160
2175
  key: "1"
2161
2176
  } : void 0
2162
2177
  ]), 1024),
2163
- Oe(fa, null, je({ _: 2 }, [
2178
+ Oe(ya, null, je({ _: 2 }, [
2164
2179
  e.$slots.cell ? {
2165
2180
  name: "cell",
2166
2181
  fn: J((c) => [
2167
- P(e.$slots, "cell", ee(ae(c)))
2182
+ P(e.$slots, "cell", te(ae(c)))
2168
2183
  ]),
2169
2184
  key: "0"
2170
2185
  } : void 0,
2171
2186
  !e.$slots.cell && e.$slots["cell-date"] ? {
2172
2187
  name: "cell-date",
2173
2188
  fn: J((c) => [
2174
- P(e.$slots, "cell-date", ee(ae(c)))
2189
+ P(e.$slots, "cell-date", te(ae(c)))
2175
2190
  ]),
2176
2191
  key: "1"
2177
2192
  } : void 0,
2178
2193
  !e.$slots.cell && e.$slots["cell-content"] ? {
2179
2194
  name: "cell-content",
2180
2195
  fn: J((c) => [
2181
- P(e.$slots, "cell-content", ee(ae(c)))
2196
+ P(e.$slots, "cell-content", te(ae(c)))
2182
2197
  ]),
2183
2198
  key: "2"
2184
2199
  } : void 0,
2185
2200
  !e.$slots.cell && e.$slots["cell-events"] ? {
2186
2201
  name: "cell-events",
2187
2202
  fn: J((c) => [
2188
- P(e.$slots, "cell-events", ee(ae(c)))
2203
+ P(e.$slots, "cell-events", te(ae(c)))
2189
2204
  ]),
2190
2205
  key: "3"
2191
2206
  } : void 0,
2192
2207
  !e.$slots.cell && e.$slots.event ? {
2193
2208
  name: "event",
2194
2209
  fn: J((c) => [
2195
- P(e.$slots, "event", ee(ae(c)))
2210
+ P(e.$slots, "event", te(ae(c)))
2196
2211
  ]),
2197
2212
  key: "4"
2198
2213
  } : void 0,
2199
2214
  !e.$slots.cell && e.$slots["event-count"] ? {
2200
2215
  name: "event-count",
2201
2216
  fn: J((c) => [
2202
- P(e.$slots, "event-count", ee(ae(c)))
2217
+ P(e.$slots, "event-count", te(ae(c)))
2203
2218
  ]),
2204
2219
  key: "5"
2205
2220
  } : void 0
@@ -2211,63 +2226,63 @@ const st = (y, s) => {
2211
2226
  }, 8, ["name"])
2212
2227
  ])
2213
2228
  ], 64))
2214
- ], 14, ga));
2229
+ ], 14, Da));
2215
2230
  }
2216
- }, ka = (y) => {
2217
- ze.texts = { ...fe.texts, ...y }, ze.dateUtils.updateTexts(ze.texts);
2231
+ }, Ta = (y) => {
2232
+ ze.texts = { ...ge.texts, ...y }, ze.dateUtils.updateTexts(ze.texts);
2218
2233
  }, {
2219
- addDatePrototypes: ba,
2220
- removeDatePrototypes: $a,
2221
- updateTexts: Ta,
2222
- addDays: Ma,
2223
- subtractDays: Ya,
2224
- addHours: Ea,
2225
- subtractHours: Sa,
2226
- addMinutes: Ca,
2227
- subtractMinutes: Va,
2228
- getWeek: Oa,
2229
- isToday: ja,
2230
- isSameDate: Fa,
2231
- isInRange: Pa,
2232
- isLeapYear: La,
2233
- getPreviousFirstDayOfWeek: Ha,
2234
- stringToDate: za,
2235
- dateToMinutes: Na,
2236
- countDays: Wa,
2237
- datesInSameTimeStep: Aa,
2238
- isValid: Ia,
2239
- formatDate: Ba,
2240
- formatDateLite: Ra,
2241
- formatTime: Xa,
2242
- formatTimeLite: Ga,
2243
- formatMinutes: Ja
2234
+ addDatePrototypes: Ma,
2235
+ removeDatePrototypes: Ya,
2236
+ updateTexts: Ea,
2237
+ addDays: Sa,
2238
+ subtractDays: Ca,
2239
+ addHours: Va,
2240
+ subtractHours: Oa,
2241
+ addMinutes: ja,
2242
+ subtractMinutes: Fa,
2243
+ getWeek: Pa,
2244
+ isToday: La,
2245
+ isSameDate: Ha,
2246
+ isInRange: za,
2247
+ isLeapYear: Na,
2248
+ getPreviousFirstDayOfWeek: Wa,
2249
+ stringToDate: Aa,
2250
+ dateToMinutes: Ia,
2251
+ countDays: Ba,
2252
+ datesInSameTimeStep: Ra,
2253
+ isValid: Xa,
2254
+ formatDate: Ga,
2255
+ formatDateLite: Ja,
2256
+ formatTime: Ua,
2257
+ formatTimeLite: qa,
2258
+ formatMinutes: Za
2244
2259
  } = ze.dateUtils;
2245
2260
  export {
2246
- _a as VueCal,
2247
- ba as addDatePrototypes,
2248
- Ma as addDays,
2249
- Ea as addHours,
2250
- Ca as addMinutes,
2251
- Wa as countDays,
2252
- Na as dateToMinutes,
2253
- Aa as datesInSameTimeStep,
2254
- Ba as formatDate,
2255
- Ra as formatDateLite,
2256
- Ja as formatMinutes,
2257
- Xa as formatTime,
2258
- Ga as formatTimeLite,
2259
- Ha as getPreviousFirstDayOfWeek,
2260
- Oa as getWeek,
2261
- Pa as isInRange,
2262
- La as isLeapYear,
2263
- Fa as isSameDate,
2264
- ja as isToday,
2265
- Ia as isValidDate,
2266
- $a as removeDatePrototypes,
2267
- za as stringToDate,
2268
- Ya as subtractDays,
2269
- Sa as subtractHours,
2270
- Va as subtractMinutes,
2271
- Ta as updateTexts,
2272
- ka as useLocale
2261
+ $a as VueCal,
2262
+ Ma as addDatePrototypes,
2263
+ Sa as addDays,
2264
+ Va as addHours,
2265
+ ja as addMinutes,
2266
+ Ba as countDays,
2267
+ Ia as dateToMinutes,
2268
+ Ra as datesInSameTimeStep,
2269
+ Ga as formatDate,
2270
+ Ja as formatDateLite,
2271
+ Za as formatMinutes,
2272
+ Ua as formatTime,
2273
+ qa as formatTimeLite,
2274
+ Wa as getPreviousFirstDayOfWeek,
2275
+ Pa as getWeek,
2276
+ za as isInRange,
2277
+ Na as isLeapYear,
2278
+ Ha as isSameDate,
2279
+ La as isToday,
2280
+ Xa as isValidDate,
2281
+ Ya as removeDatePrototypes,
2282
+ Aa as stringToDate,
2283
+ Ca as subtractDays,
2284
+ Oa as subtractHours,
2285
+ Fa as subtractMinutes,
2286
+ Ea as updateTexts,
2287
+ Ta as useLocale
2273
2288
  };