vue-cal 5.0.1-rc.13 → 5.0.1-rc.15

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 T, reactive as Te, watch as he, toRefs as pt, ref as ie, onBeforeUnmount as Re, inject as Le, createElementBlock as j, openBlock as E, renderSlot as L, createCommentVNode as q, unref as O, Fragment as te, renderList as pe, normalizeClass as we, createElementVNode as fe, createVNode as Ve, Transition as Xe, withCtx as Z, createBlock as Ee, resolveDynamicComponent as Ke, mergeProps as ye, toHandlers as Be, normalizeProps as se, guardReactiveProps as le, toDisplayString as re, onMounted as Je, withModifiers as Qe, nextTick as Ge, normalizeStyle as be, createTextVNode as xe, TransitionGroup as et, createSlots as Oe, useTemplateRef as wt, useId as _t, useAttrs as kt, provide as bt } from "vue";
1
+ import { computed as M, reactive as Te, watch as de, toRefs as wt, ref as oe, onBeforeUnmount as Xe, inject as Ne, createElementBlock as O, openBlock as E, renderSlot as z, createCommentVNode as q, unref as V, Fragment as te, renderList as we, normalizeClass as _e, createElementVNode as me, createVNode as Ve, Transition as Ge, withCtx as Z, createBlock as Ee, resolveDynamicComponent as Qe, mergeProps as he, toHandlers as Ie, normalizeProps as ne, guardReactiveProps as se, toDisplayString as le, normalizeStyle as pe, onMounted as qe, withModifiers as xe, nextTick as Ue, createTextVNode as et, TransitionGroup as tt, createSlots as Oe, useTemplateRef as _t, useId as kt, useAttrs as bt, provide as Tt } from "vue";
2
2
  /**
3
- * vue-cal v5.0.1-rc.12
3
+ * vue-cal v5.0.1-rc.15
4
4
  * (c) 2024-2025 Antoni Andre <antoniandre.web@gmail.com>
5
5
  * @license MIT
6
6
  */
7
- const me = {
7
+ const ve = {
8
8
  texts: {
9
9
  weekDays: Array(7).fill(""),
10
10
  weekDaysShort: [],
@@ -33,14 +33,14 @@ const me = {
33
33
  years: { cols: 5, rows: 5 }
34
34
  // Arbitrary range of quarters of century (25y).
35
35
  }
36
- }, Tt = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], Ie = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], Mt = Ie.reduce((D, n, r) => (D[n] = r || 7, D), {}), $t = (D, n, r) => {
37
- const { dateUtils: h } = D, p = !1, b = T(() => {
38
- if (W.value[n.view]) return n.view;
36
+ }, Mt = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], Re = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], $t = Re.reduce((D, n, r) => (D[n] = r || 7, D), {}), Yt = (D, n, r) => {
37
+ const { dateUtils: h } = D, p = !1, k = M(() => {
38
+ if (N.value[n.view]) return n.view;
39
39
  const s = n.datePicker ? "month" : "week", l = n.view || s;
40
- return W.value[l] ? l : (console.warn(
41
- `Vue Cal: the provided or default view \`${l}\` is either invalid or not in the list of available views. The first available view will be chosen: \`${Object.keys(W.value)[0]}\`.`
42
- ), Object.keys(W.value)[0]);
43
- }), H = T(() => n.sm && !n.xs), v = T(() => n.xs || n.datePicker), C = T(() => n.clickToNavigate || n.datePicker && n.clickToNavigate !== !1), i = T(() => {
40
+ return N.value[l] ? l : (console.warn(
41
+ `Vue Cal: the provided or default view \`${l}\` is either invalid or not in the list of available views. The first available view will be chosen: \`${Object.keys(N.value)[0]}\`.`
42
+ ), Object.keys(N.value)[0]);
43
+ }), L = M(() => n.sm && !n.xs), d = M(() => n.xs || n.datePicker), j = M(() => n.clickToNavigate || n.datePicker && n.clickToNavigate !== !1), u = M(() => {
44
44
  const s = {
45
45
  cell: {},
46
46
  // All possible event listeners to attach to cells.
@@ -48,33 +48,31 @@ const me = {
48
48
  // All possible event listeners to attach to calendar events.
49
49
  }, l = (_) => _.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
50
50
  for (const [_, t] of Object.entries(r)) {
51
- const [V, F, J] = _.match(/^on(Cell|Event)(.+)$/) || [];
52
- V && (s[F.toLowerCase()][l(J).replace(/^-+|-+$/g, "")] = t);
51
+ const [C, F, J] = _.match(/^on(Cell|Event)(.+)$/) || [];
52
+ C && (s[F.toLowerCase()][l(J).replace(/^-+|-+$/g, "")] = t);
53
53
  }
54
54
  return s;
55
- }), f = T(() => {
55
+ }), m = M(() => {
56
56
  var l;
57
57
  const s = {};
58
- if (n.hideWeekends && (s[6] = s[7] = !0), (l = n.hideWeekdays) != null && l.length)
59
- for (const _ of n.hideWeekdays) weekDays[Mt[_]] = !0;
60
- return s;
61
- }), Y = T(() => f.value[6] && f.value[7]), W = T(() => {
58
+ return n.hideWeekends && (s[6] = !0) && (s[7] = !0), (l = n.hideWeekdays) != null && l.length && n.hideWeekdays.forEach((_) => s[$t[_]] = !0), s;
59
+ }), b = M(() => n.hideWeekends || m.value[6] && m.value[7]), N = M(() => {
62
60
  const s = n.datePicker;
63
61
  let l = 0, _ = {};
64
62
  const t = n.views;
65
63
  return s && !t ? {
66
- month: { ...me.availableViews.month },
67
- year: { ...me.availableViews.year },
68
- years: { ...me.availableViews.years }
69
- } : (t ? (Array.isArray(t) ? _ = t.reduce((V, F) => (typeof F == "string" && me.availableViews[F] ? V[F] = me.availableViews[F] : l++, V), {}) : typeof t == "object" && (_ = Object.entries(t).reduce((V, [F, J]) => {
70
- const { cols: K, rows: ue } = me.availableViews[F];
71
- return V[F] = { cols: J.cols || K, rows: J.rows || ue }, V;
72
- }, {})), l && console.warn("Vue Cal: the provided `views` prop contains invalid views that will be ignored."), Object.keys(_).length || (console.warn("Vue Cal: No valid view in the provided `views` prop. Falling back to default views."), _ = { ...me.availableViews })) : _ = { ...me.availableViews }, _);
73
- }), U = T(() => n.datePicker ? "month" : W.value.week ? "week" : Object.keys(W.value)[0]), o = T(() => {
64
+ month: { ...ve.availableViews.month },
65
+ year: { ...ve.availableViews.year },
66
+ years: { ...ve.availableViews.years }
67
+ } : (t ? (Array.isArray(t) ? _ = t.reduce((C, F) => (typeof F == "string" && ve.availableViews[F] ? C[F] = ve.availableViews[F] : l++, C), {}) : typeof t == "object" && (_ = Object.entries(t).reduce((C, [F, J]) => {
68
+ const { cols: K, rows: ie } = ve.availableViews[F];
69
+ return C[F] = { cols: J.cols || K, rows: J.rows || ie }, C;
70
+ }, {})), l && console.warn("Vue Cal: the provided `views` prop contains invalid views that will be ignored."), Object.keys(_).length || (console.warn("Vue Cal: No valid view in the provided `views` prop. Falling back to default views."), _ = { ...ve.availableViews })) : _ = { ...ve.availableViews }, _);
71
+ }), R = M(() => n.datePicker ? "month" : N.value.week ? "week" : Object.keys(N.value)[0]), i = M(() => {
74
72
  if (typeof n.selectedDate == "string") return h.stringToDate(n.selectedDate);
75
73
  if (n.selectedDate instanceof Date) return n.selectedDate;
76
74
  n.selectedDate ? console.warn("Vue Cal: The provided selected date is invalid:", n.selectedDate) : console.log("Vue Cal: Info - The provided selected date is undefined.");
77
- }), u = T(() => {
75
+ }), c = M(() => {
78
76
  if (!n.disableDays) return [];
79
77
  const s = [];
80
78
  if (Array.isArray(n.disableDays))
@@ -84,17 +82,17 @@ const me = {
84
82
  }
85
83
  else console.warn("Vue Cal: The provided `disableDays` prop is invalid:", n.disableDays);
86
84
  return s;
87
- }), e = T(() => {
85
+ }), e = M(() => {
88
86
  let s = null;
89
87
  return n.minDate && typeof n.minDate == "string" ? s = h.stringToDate(n.minDate) : n.minDate && n.minDate instanceof Date && (s = n.minDate), (s == null ? void 0 : s.getTime()) || null;
90
- }), d = T(() => {
88
+ }), f = M(() => {
91
89
  let s = null;
92
90
  return n.maxDate && typeof n.maxDate == "string" ? s = h.stringToDate(n.maxDate) : n.maxDate && n.maxDate instanceof Date && (s = n.maxDate), (s == null ? void 0 : s.getTime()) || null;
93
- }), g = T(() => {
91
+ }), g = M(() => {
94
92
  var _;
95
93
  const { view: s } = D;
96
- return n.schedules.length && (s.isDay || s.isDays || s.isWeek) && ((_ = n.schedules) == null ? void 0 : _.map((t, V) => ({ ...t, id: t.id ?? V + 1 }))) || void 0;
97
- }), M = T(() => {
94
+ return n.schedules.length && (s.isDay || s.isDays || s.isWeek) && ((_ = n.schedules) == null ? void 0 : _.map((t, C) => ({ ...t, id: t.id ?? C + 1 }))) || void 0;
95
+ }), $ = M(() => {
98
96
  const s = {
99
97
  drag: !0,
100
98
  resize: !0,
@@ -104,7 +102,7 @@ const me = {
104
102
  return n.editableEvents === !0 ? s : n.editableEvents === !1 ? Object.keys(s).map((l) => s[l] = !1) : { ...s, ...n.editableEvents };
105
103
  }), P = async (s) => {
106
104
  var _;
107
- let l = /* @__PURE__ */ Object.assign({ "../i18n/ar.json": () => import("./i18n/ar.js").then((t) => t.default), "../i18n/bg.json": () => import("./i18n/bg.js").then((t) => t.default), "../i18n/bn.json": () => import("./i18n/bn.js").then((t) => t.default), "../i18n/bs.json": () => import("./i18n/bs.js").then((t) => t.default), "../i18n/ca.json": () => import("./i18n/ca.js").then((t) => t.default), "../i18n/cs.json": () => import("./i18n/cs.js").then((t) => t.default), "../i18n/da.json": () => import("./i18n/da.js").then((t) => t.default), "../i18n/de.json": () => import("./i18n/de.js").then((t) => t.default), "../i18n/el.json": () => import("./i18n/el.js").then((t) => t.default), "../i18n/en-gb.json": () => import("./i18n/en-gb.js").then((t) => t.default), "../i18n/en-us.json": () => Promise.resolve().then(() => Ct).then((t) => t.default), "../i18n/es.json": () => import("./i18n/es.js").then((t) => t.default), "../i18n/et.json": () => import("./i18n/et.js").then((t) => t.default), "../i18n/fa.json": () => import("./i18n/fa.js").then((t) => t.default), "../i18n/fi.json": () => import("./i18n/fi.js").then((t) => t.default), "../i18n/fr.json": () => import("./i18n/fr.js").then((t) => t.default), "../i18n/he.json": () => import("./i18n/he.js").then((t) => t.default), "../i18n/hr.json": () => import("./i18n/hr.js").then((t) => t.default), "../i18n/hu.json": () => import("./i18n/hu.js").then((t) => t.default), "../i18n/id.json": () => import("./i18n/id.js").then((t) => t.default), "../i18n/is.json": () => import("./i18n/is.js").then((t) => t.default), "../i18n/it.json": () => import("./i18n/it.js").then((t) => t.default), "../i18n/ja.json": () => import("./i18n/ja.js").then((t) => t.default), "../i18n/ka.json": () => import("./i18n/ka.js").then((t) => t.default), "../i18n/ko.json": () => import("./i18n/ko.js").then((t) => t.default), "../i18n/lt.json": () => import("./i18n/lt.js").then((t) => t.default), "../i18n/mn.json": () => import("./i18n/mn.js").then((t) => t.default), "../i18n/nl.json": () => import("./i18n/nl.js").then((t) => t.default), "../i18n/no.json": () => import("./i18n/no.js").then((t) => t.default), "../i18n/pl.json": () => import("./i18n/pl.js").then((t) => t.default), "../i18n/pt-br.json": () => import("./i18n/pt-br.js").then((t) => t.default), "../i18n/pt-pt.json": () => import("./i18n/pt-pt.js").then((t) => t.default), "../i18n/ro.json": () => import("./i18n/ro.js").then((t) => t.default), "../i18n/ru.json": () => import("./i18n/ru.js").then((t) => t.default), "../i18n/sk.json": () => import("./i18n/sk.js").then((t) => t.default), "../i18n/sl.json": () => import("./i18n/sl.js").then((t) => t.default), "../i18n/sq.json": () => import("./i18n/sq.js").then((t) => t.default), "../i18n/sr.json": () => import("./i18n/sr.js").then((t) => t.default), "../i18n/sv.json": () => import("./i18n/sv.js").then((t) => t.default), "../i18n/tr.json": () => import("./i18n/tr.js").then((t) => t.default), "../i18n/uk.json": () => import("./i18n/uk.js").then((t) => t.default), "../i18n/vi.json": () => import("./i18n/vi.js").then((t) => t.default), "../i18n/zh-cn.json": () => import("./i18n/zh-cn.js").then((t) => t.default), "../i18n/zh-hk.json": () => import("./i18n/zh-hk.js").then((t) => t.default) });
105
+ let l = /* @__PURE__ */ Object.assign({ "../i18n/ar.json": () => import("./i18n/ar.js").then((t) => t.default), "../i18n/bg.json": () => import("./i18n/bg.js").then((t) => t.default), "../i18n/bn.json": () => import("./i18n/bn.js").then((t) => t.default), "../i18n/bs.json": () => import("./i18n/bs.js").then((t) => t.default), "../i18n/ca.json": () => import("./i18n/ca.js").then((t) => t.default), "../i18n/cs.json": () => import("./i18n/cs.js").then((t) => t.default), "../i18n/da.json": () => import("./i18n/da.js").then((t) => t.default), "../i18n/de.json": () => import("./i18n/de.js").then((t) => t.default), "../i18n/el.json": () => import("./i18n/el.js").then((t) => t.default), "../i18n/en-gb.json": () => import("./i18n/en-gb.js").then((t) => t.default), "../i18n/en-us.json": () => Promise.resolve().then(() => Vt).then((t) => t.default), "../i18n/es.json": () => import("./i18n/es.js").then((t) => t.default), "../i18n/et.json": () => import("./i18n/et.js").then((t) => t.default), "../i18n/fa.json": () => import("./i18n/fa.js").then((t) => t.default), "../i18n/fi.json": () => import("./i18n/fi.js").then((t) => t.default), "../i18n/fr.json": () => import("./i18n/fr.js").then((t) => t.default), "../i18n/he.json": () => import("./i18n/he.js").then((t) => t.default), "../i18n/hr.json": () => import("./i18n/hr.js").then((t) => t.default), "../i18n/hu.json": () => import("./i18n/hu.js").then((t) => t.default), "../i18n/id.json": () => import("./i18n/id.js").then((t) => t.default), "../i18n/is.json": () => import("./i18n/is.js").then((t) => t.default), "../i18n/it.json": () => import("./i18n/it.js").then((t) => t.default), "../i18n/ja.json": () => import("./i18n/ja.js").then((t) => t.default), "../i18n/ka.json": () => import("./i18n/ka.js").then((t) => t.default), "../i18n/ko.json": () => import("./i18n/ko.js").then((t) => t.default), "../i18n/lt.json": () => import("./i18n/lt.js").then((t) => t.default), "../i18n/mn.json": () => import("./i18n/mn.js").then((t) => t.default), "../i18n/nl.json": () => import("./i18n/nl.js").then((t) => t.default), "../i18n/no.json": () => import("./i18n/no.js").then((t) => t.default), "../i18n/pl.json": () => import("./i18n/pl.js").then((t) => t.default), "../i18n/pt-br.json": () => import("./i18n/pt-br.js").then((t) => t.default), "../i18n/pt-pt.json": () => import("./i18n/pt-pt.js").then((t) => t.default), "../i18n/ro.json": () => import("./i18n/ro.js").then((t) => t.default), "../i18n/ru.json": () => import("./i18n/ru.js").then((t) => t.default), "../i18n/sk.json": () => import("./i18n/sk.js").then((t) => t.default), "../i18n/sl.json": () => import("./i18n/sl.js").then((t) => t.default), "../i18n/sq.json": () => import("./i18n/sq.js").then((t) => t.default), "../i18n/sr.json": () => import("./i18n/sr.js").then((t) => t.default), "../i18n/sv.json": () => import("./i18n/sv.js").then((t) => t.default), "../i18n/tr.json": () => import("./i18n/tr.js").then((t) => t.default), "../i18n/uk.json": () => import("./i18n/uk.js").then((t) => t.default), "../i18n/vi.json": () => import("./i18n/vi.js").then((t) => t.default), "../i18n/zh-cn.json": () => import("./i18n/zh-cn.js").then((t) => t.default), "../i18n/zh-hk.json": () => import("./i18n/zh-hk.js").then((t) => t.default) });
108
106
  {
109
107
  if (!l[`../i18n/${s}.json`]) {
110
108
  console.warn(`Vue Cal: the locale \`${s}\` does not exist. Falling back to \`en-us\`.`), s = "en-us";
@@ -112,34 +110,34 @@ const me = {
112
110
  }
113
111
  l = await ((_ = l[`../i18n/${s}.json`]) == null ? void 0 : _.call(l));
114
112
  }
115
- D.texts = Object.assign(D.texts, Object.assign({ ...me.texts }, l)), h.updateTexts(D.texts);
113
+ D.texts = Object.assign(D.texts, Object.assign({ ...ve.texts }, l)), h.updateTexts(D.texts);
116
114
  }, A = Te(n.events || []);
117
- return he(() => n.events, (s) => A.splice(0, A.length, ...s)), he(() => n.locale, (s) => P(s || "en-us")), (n.locale || !D.texts.today) && P(n.locale || "en-us"), {
118
- ...pt(n),
115
+ return de(() => n.events, (s) => A.splice(0, A.length, ...s)), de(() => n.locale, (s) => P(s || "en-us")), (n.locale || !D.texts.today) && P(n.locale || "en-us"), {
116
+ ...wt(n),
119
117
  events: A,
120
118
  // All the events listeners for cells and events that the end user may have attached to vue-cal.
121
- eventListeners: i,
122
- defaultView: U,
123
- availableViews: W,
124
- disableDays: u,
119
+ eventListeners: u,
120
+ defaultView: R,
121
+ availableViews: N,
122
+ disableDays: c,
125
123
  ready: p,
126
- sm: H,
127
- xs: v,
128
- clickToNavigate: C,
129
- hideWeekdays: f,
130
- hideWeekends: Y,
124
+ sm: L,
125
+ xs: d,
126
+ clickToNavigate: j,
127
+ hideWeekdays: m,
128
+ hideWeekends: b,
131
129
  minTimestamp: e,
132
- maxTimestamp: d,
130
+ maxTimestamp: f,
133
131
  schedules: g,
134
- selectedDate: o,
135
- editableEvents: M,
136
- view: b,
132
+ selectedDate: i,
133
+ editableEvents: $,
134
+ view: k,
137
135
  // Getters.
138
136
  get hasHiddenDays() {
139
- return Object.keys(f.value).length;
137
+ return Object.keys(m.value).length;
140
138
  },
141
139
  get size() {
142
- return v.value ? "xs" : H.value ? "sm" : "lg";
140
+ return d.value ? "xs" : L.value ? "sm" : "lg";
143
141
  },
144
142
  loadTexts: P
145
143
  };
@@ -149,243 +147,243 @@ const me = {
149
147
  }, je = (D, n) => {
150
148
  const r = n.timeTo - n.timeFrom;
151
149
  return ~~(D * r / 100 + n.timeFrom);
152
- }, qe = (D, n) => {
150
+ }, Ze = (D, n) => {
153
151
  const r = n.clientHeight;
154
152
  return D * 100 / r;
155
- }, Ae = Te({ id: null, date: null });
156
- let tt = !1, Ue = !0;
157
- const De = Te({ el: null, cell: null, timeout: null }), ke = Te({
153
+ }, Be = Te({ id: null, date: null });
154
+ let at = !1, Je = !0;
155
+ const De = Te({ el: null, cell: null, timeout: null }), be = Te({
158
156
  eventId: null,
159
157
  fromVueCal: null,
160
158
  toVueCal: null
161
159
  });
162
- function Yt(D) {
163
- const { config: n, view: r, eventsManager: h, emit: p, uid: b, dateUtils: H } = D, v = (e) => {
160
+ function Et(D) {
161
+ const { config: n, view: r, eventsManager: h, emit: p, uid: k, dateUtils: L } = D, d = (e) => {
164
162
  var l;
165
- const { timeStep: d, timeCellHeight: g, timeFrom: M } = n, P = (((l = e.touches) == null ? void 0 : l[0]) || e).clientY, { top: A } = e.currentTarget.getBoundingClientRect(), s = P - A - ~~e.dataTransfer.getData("cursor-grab-at");
166
- return je(qe(s, e.currentTarget), n);
167
- }, C = (e, d, g) => {
168
- const M = d.duration || i(d.start, d.end) || n.timeStep;
169
- let P = Math.max(v(e), 0);
163
+ const { timeStep: f, timeCellHeight: g, timeFrom: $ } = n, P = (((l = e.touches) == null ? void 0 : l[0]) || e).clientY, { top: A } = e.currentTarget.getBoundingClientRect(), s = P - A - ~~e.dataTransfer.getData("cursor-grab-at");
164
+ return je(Ze(s, e.currentTarget), n);
165
+ }, j = (e, f, g) => {
166
+ const $ = f.duration || u(f.start, f.end) || n.timeStep;
167
+ let P = Math.max(d(e), 0);
170
168
  if (n.snapToInterval) {
171
169
  const _ = P + n.snapToInterval / 2;
172
170
  P = _ - _ % n.snapToInterval;
173
171
  }
174
- const A = new Date(new Date(g).setMinutes(P)), s = Math.min(P + M, 24 * 60), l = new Date(new Date(g).setMinutes(s));
172
+ const A = new Date(new Date(g).setMinutes(P)), s = Math.min(P + $, 24 * 60), l = new Date(new Date(g).setMinutes(s));
175
173
  return { start: A, end: l };
176
- }, i = (e, d) => Math.round((d - e) / 6e4);
174
+ }, u = (e, f) => Math.round((f - e) / 6e4);
177
175
  return {
178
- eventDragStart: (e, d) => {
176
+ eventDragStart: (e, f) => {
179
177
  if (e.target.nodeType === 3 || D.touch.isResizingEvent) return e.preventDefault();
180
178
  e.dataTransfer.effectAllowed = "move", e.dataTransfer.dropEffect = "move";
181
- const g = { ...d, _: { id: d._.id, duration: i(d.start, d.end) } };
179
+ const g = { ...f, _: { id: f._.id, duration: u(f.start, f.end) } };
182
180
  try {
183
181
  e.dataTransfer.setData("text/plain", ""), e.dataTransfer.setData("event", JSON.stringify(g)), e.dataTransfer.setData("cursor-grab-at", e.offsetY);
184
182
  } catch (P) {
185
183
  return console.warn("Vue Cal: Failed to set drag data:", P), e.preventDefault();
186
184
  }
187
- ke.eventId = d._.id, ke.fromVueCal = b;
188
- const M = e.target.closest(".vuecal__event");
189
- M.classList.add("vuecal__event--dragging-ghost"), setTimeout(() => {
190
- M.classList.add("vuecal__event--dragging-original"), M.classList.remove("vuecal__event--dragging-ghost");
191
- }, 0), tt = !1, Object.assign(Ae, { id: r.id, date: r.firstCellDate }), Ue = !0, D.touch.isDraggingEvent = !0;
185
+ be.eventId = f._.id, be.fromVueCal = k;
186
+ const $ = e.target.closest(".vuecal__event");
187
+ $.classList.add("vuecal__event--dragging-ghost"), setTimeout(() => {
188
+ $.classList.add("vuecal__event--dragging-original"), $.classList.remove("vuecal__event--dragging-ghost");
189
+ }, 0), at = !1, Object.assign(Be, { id: r.id, date: r.firstCellDate }), Je = !0, D.touch.isDraggingEvent = !0;
192
190
  },
193
- eventDragEnd: (e, d) => {
194
- ke.eventId = null, e.target.closest(".vuecal__event").classList.remove("vuecal__event--dragging-original");
195
- const { fromVueCal: g, toVueCal: M } = ke;
196
- M && g !== M && h.deleteEvent(d._.id, 3), ke.fromVueCal = null, ke.toVueCal = null, tt && Ue && Ae.id && r.switchView(Ae.id, Ae.date, !0), D.touch.isDraggingEvent = !1;
191
+ eventDragEnd: (e, f) => {
192
+ be.eventId = null, e.target.closest(".vuecal__event").classList.remove("vuecal__event--dragging-original");
193
+ const { fromVueCal: g, toVueCal: $ } = be;
194
+ $ && g !== $ && h.deleteEvent(f._.id, 3), be.fromVueCal = null, be.toVueCal = null, at && Je && Be.id && r.switchView(Be.id, Be.date, !0), D.touch.isDraggingEvent = !1;
197
195
  },
198
- cellDragEnter: (e, d) => {
199
- const { start: g } = d, M = e.currentTarget;
196
+ cellDragEnter: (e, f) => {
197
+ const { start: g } = f, $ = e.currentTarget;
200
198
  if (!e.currentTarget.contains(e.relatedTarget)) {
201
- if (M === De.el || !M.className.includes("vuecal__cell-content")) return !1;
202
- De.el && (De.cell.highlighted = !1), Object.assign(De, { el: M, cell: d, timeout: clearTimeout(De.timeout) }), d.highlighted = !0, ["years", "year", "month"].includes(r.id) && (De.timeout = setTimeout(() => D.switchToNarrowerView(g), 2e3));
199
+ if ($ === De.el || !$.className.includes("vuecal__cell-content")) return !1;
200
+ De.el && (De.cell.highlighted = !1), Object.assign(De, { el: $, cell: f, timeout: clearTimeout(De.timeout) }), f.highlighted = !0, ["years", "year", "month"].includes(r.id) && (De.timeout = setTimeout(() => D.switchToNarrowerView(g), 2e3));
203
201
  }
204
202
  },
205
- cellDragOver: (e, d) => {
206
- const { start: g, schedule: M } = d;
207
- e.preventDefault(), d.highlighted = !0, (M || M === 0) && (d.highlightedSchedule = M);
203
+ cellDragOver: (e, f) => {
204
+ const { start: g, schedule: $ } = f;
205
+ e.preventDefault(), f.highlighted = !0, ($ || $ === 0) && (f.highlightedSchedule = $);
208
206
  },
209
- cellDragLeave: (e, d) => {
210
- e.preventDefault(), !e.currentTarget.contains(e.relatedTarget) && (d.highlightedSchedule = !1, De.cell === d && (clearTimeout(De.timeout), Object.assign(De, { el: null, cell: null, timeout: null }), d.highlighted = !1));
207
+ cellDragLeave: (e, f) => {
208
+ e.preventDefault(), !e.currentTarget.contains(e.relatedTarget) && (f.highlightedSchedule = !1, De.cell === f && (clearTimeout(De.timeout), Object.assign(De, { el: null, cell: null, timeout: null }), f.highlighted = !1));
211
209
  },
212
- cellDragDrop: async (e, d) => {
213
- var V, F, J;
210
+ cellDragDrop: async (e, f) => {
211
+ var C, F, J;
214
212
  e.preventDefault(), clearTimeout(De.timeout), Object.assign(De, { el: null, cell: null, timeout: null });
215
213
  const g = JSON.parse(e.dataTransfer.getData("event") || "{}");
216
214
  g.start && (g.start = new Date(g.start)), g.end && (g.end = new Date(g.end));
217
- let M;
218
- const { start: P, end: A } = C(e, g, d.start), { schedule: s } = ((V = e.target.closest("[data-schedule]")) == null ? void 0 : V.dataset) || {};
215
+ let $;
216
+ const { start: P, end: A } = j(e, g, f.start), { schedule: s } = ((C = e.target.closest("[data-schedule]")) == null ? void 0 : C.dataset) || {};
219
217
  let l = () => {
220
218
  };
221
- ke.fromVueCal === b ? (M = h.getEvent(g._.id), M && (M._.dragging = !1, l = () => {
222
- M.start = P, M.end = A, s !== void 0 && (M.schedule = ~~s);
223
- })) : (M = {
219
+ be.fromVueCal === k ? ($ = h.getEvent(g._.id), $ && ($._.dragging = !1, l = () => {
220
+ $.start = P, $.end = A, s !== void 0 && ($.schedule = ~~s);
221
+ })) : ($ = {
224
222
  ...g,
225
223
  start: P,
226
224
  end: A,
227
225
  ...s !== void 0 && { schedule: ~~s },
228
- _: { id: ((F = g._) == null ? void 0 : F.id) || g.id, duration: i(P, A) },
226
+ _: { id: ((F = g._) == null ? void 0 : F.id) || g.id, duration: u(P, A) },
229
227
  getOverlappingEvents: () => h.getEventsInRange(
230
- h.getEventsByDate(H.formatDate(P), !0),
228
+ h.getEventsByDate(L.formatDate(P), !0),
231
229
  { start: P, end: A },
232
230
  { schedule: ~~s }
233
231
  )
234
232
  }, l = () => {
235
- M = h.createEvent(M);
233
+ $ = h.createEvent($);
236
234
  });
237
235
  let _ = !0;
238
236
  const { drop: t } = (J = n.eventListeners) == null ? void 0 : J.event;
239
237
  t && (_ = await t({
240
238
  e,
241
- event: { ...M, start: P, end: A, schedule: ~~s },
242
- overlaps: M.getOverlappingEvents({ start: P, end: A, schedule: ~~s }),
243
- cell: d,
244
- external: ke.fromVueCal !== b
245
- })), _ !== !1 && l(), d.highlighted = !1, d.highlightedSchedule = null, Ue = !1, ke.toVueCal = b, p("event-dropped", {
239
+ event: { ...$, start: P, end: A, schedule: ~~s },
240
+ overlaps: $.getOverlappingEvents({ start: P, end: A, schedule: ~~s }),
241
+ cell: f,
242
+ external: be.fromVueCal !== k
243
+ })), _ !== !1 && l(), f.highlighted = !1, f.highlightedSchedule = null, Je = !1, be.toVueCal = k, p("event-dropped", {
246
244
  e,
247
- cell: d,
248
- event: M,
245
+ cell: f,
246
+ event: $,
249
247
  originalEvent: g,
250
- external: ke.fromVueCal !== b
248
+ external: be.fromVueCal !== k
251
249
  });
252
250
  }
253
251
  };
254
252
  }
255
- const nt = (D, n) => {
256
- let r, h, p, b = {}, H = {};
257
- const v = ie(D), C = () => {
258
- v.value.today || (v.value = n), Date.prototype.addDays = function(a) {
259
- return W(this, a || 0);
253
+ const st = (D, n) => {
254
+ let r, h, p, k = {}, L = {};
255
+ const d = oe(D), j = () => {
256
+ d.value.today || (d.value = n), Date.prototype.addDays = function(a) {
257
+ return N(this, a || 0);
260
258
  }, Date.prototype.subtractDays = function(a) {
261
- return U(this, a || 0);
259
+ return R(this, a || 0);
262
260
  }, Date.prototype.addHours = function(a) {
263
- return o(this, a || 0);
261
+ return i(this, a || 0);
264
262
  }, Date.prototype.subtractHours = function(a) {
265
- return u(this, a || 0);
263
+ return c(this, a || 0);
266
264
  }, Date.prototype.addMinutes = function(a) {
267
265
  return e(this, a || 0);
268
266
  }, Date.prototype.subtractMinutes = function(a) {
269
- return d(this, a || 0);
267
+ return f(this, a || 0);
270
268
  }, Date.prototype.getWeek = function() {
271
- return M(this);
269
+ return $(this);
272
270
  }, Date.prototype.isToday = function() {
273
271
  return P(this);
274
272
  }, Date.prototype.isLeapYear = function() {
275
273
  return l(this);
276
274
  }, Date.prototype.format = function(a = "YYYY-MM-DD") {
277
- return ue(this, a);
275
+ return ie(this, a);
278
276
  }, Date.prototype.formatTime = function(a = "HH:mm") {
279
- return ne(this, a);
277
+ return re(this, a);
280
278
  };
281
- }, i = () => {
279
+ }, u = () => {
282
280
  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;
283
- }, f = (a) => {
284
- v.value = a, Date.prototype.subtractDays && C();
285
- }, Y = () => (h !== (/* @__PURE__ */ new Date()).getDate() && (r = /* @__PURE__ */ new Date(), h = r.getDate(), p = `${r.getFullYear()}-${r.getMonth()}-${r.getDate()}`), p), W = (a, k) => {
281
+ }, m = (a) => {
282
+ d.value = a, Date.prototype.subtractDays && j();
283
+ }, b = () => (h !== (/* @__PURE__ */ new Date()).getDate() && (r = /* @__PURE__ */ new Date(), h = r.getDate(), p = `${r.getFullYear()}-${r.getMonth()}-${r.getDate()}`), p), N = (a, w) => {
286
284
  const y = new Date(a.valueOf());
287
- return y.setDate(y.getDate() + k), y;
288
- }, U = (a, k) => {
285
+ return y.setDate(y.getDate() + w), y;
286
+ }, R = (a, w) => {
289
287
  const y = new Date(a.valueOf());
290
- return y.setDate(y.getDate() - k), y;
291
- }, o = (a, k) => {
288
+ return y.setDate(y.getDate() - w), y;
289
+ }, i = (a, w) => {
292
290
  const y = new Date(a.valueOf());
293
- return y.setHours(y.getHours() + k), y;
294
- }, u = (a, k) => {
291
+ return y.setHours(y.getHours() + w), y;
292
+ }, c = (a, w) => {
295
293
  const y = new Date(a.valueOf());
296
- return y.setHours(y.getHours() - k), y;
297
- }, e = (a, k) => {
294
+ return y.setHours(y.getHours() - w), y;
295
+ }, e = (a, w) => {
298
296
  const y = new Date(a.valueOf());
299
- return y.setMinutes(y.getMinutes() + k), y;
300
- }, d = (a, k) => {
297
+ return y.setMinutes(y.getMinutes() + w), y;
298
+ }, f = (a, w) => {
301
299
  const y = new Date(a.valueOf());
302
- return y.setMinutes(y.getMinutes() - k), y;
303
- }, g = (a, k) => {
304
- const y = (R) => {
305
- const Q = R % k;
306
- return Q !== 0 && (R += Q >= k / 2 ? k - Q : -Q), R;
300
+ return y.setMinutes(y.getMinutes() - w), y;
301
+ }, g = (a, w) => {
302
+ const y = (I) => {
303
+ const x = I % w;
304
+ return x !== 0 && (I += x >= w / 2 ? w - x : -x), I;
307
305
  };
308
306
  if (typeof a == "number") return y(a);
309
307
  if (a instanceof Date) {
310
- let R = y(a.getMinutes());
311
- R >= 60 && (a.setHours(a.getHours() + 1), R = 0), a.setMinutes(R, 0, 0);
308
+ let I = y(a.getMinutes());
309
+ I >= 60 && (a.setHours(a.getHours() + 1), I = 0), a.setMinutes(I, 0, 0);
312
310
  }
313
- }, M = (a, k = !1) => {
314
- const y = new Date(Date.UTC(a.getFullYear(), a.getMonth(), a.getDate())), R = y.getUTCDay() || 7;
315
- y.setUTCDate(y.getUTCDate() + 4 - R);
316
- const Q = new Date(Date.UTC(y.getUTCFullYear(), 0, 1));
317
- return Math.ceil(((y - Q) / 864e5 + 1) / 7) + (k ? 1 : 0);
318
- }, P = (a) => `${a.getFullYear()}-${a.getMonth()}-${a.getDate()}` === Y(), A = (a, k) => {
319
- if (!a || !k) return console.warn(`Vue Cal: missing date${a ? "2" : "1"} parameter for comparison with \`isSameDate(date1, date2)\`.`);
311
+ }, $ = (a, w = !1) => {
312
+ const y = new Date(Date.UTC(a.getFullYear(), a.getMonth(), a.getDate())), I = y.getUTCDay() || 7;
313
+ y.setUTCDate(y.getUTCDate() + 4 - I);
314
+ const x = new Date(Date.UTC(y.getUTCFullYear(), 0, 1));
315
+ return Math.ceil(((y - x) / 864e5 + 1) / 7) + (w ? 1 : 0);
316
+ }, P = (a) => `${a.getFullYear()}-${a.getMonth()}-${a.getDate()}` === b(), A = (a, w) => {
317
+ if (!a || !w) return console.warn(`Vue Cal: missing date${a ? "2" : "1"} parameter for comparison with \`isSameDate(date1, date2)\`.`);
320
318
  if (K(a)) {
321
- if (!K(k)) return console.warn(`Vue Cal: invalid date2 provided for comparison with \`isSameDate(date1, date2)\`: \`${k}\`.`);
319
+ if (!K(w)) return console.warn(`Vue Cal: invalid date2 provided for comparison with \`isSameDate(date1, date2)\`: \`${w}\`.`);
322
320
  } else return console.warn(`Vue Cal: invalid date1 provided for comparison with \`isSameDate(date1, date2)\`: \`${a}\`.`);
323
- return a.getFullYear() === k.getFullYear() && a.getMonth() === k.getMonth() && a.getDate() === k.getDate();
324
- }, s = (a, k, y) => K(a) ? a.getTime() >= k && a.getTime() <= y : console.warn(`Vue Cal: invalid date provided to \`isInRange(date, rangeStart, rangeEnd)\`: \`${a}\`.`), l = (a) => {
325
- const k = a.getFullYear();
326
- return !(k % 400) || k % 100 && !(k % 4);
327
- }, _ = (a = null, k) => {
328
- const y = a && new Date(a.valueOf()) || /* @__PURE__ */ new Date(), R = k ? 7 : 6;
329
- return y.setDate(y.getDate() - (y.getDay() + R) % 7), y;
330
- }, t = (a) => a instanceof Date ? a : (a.length === 10 && (a += " 00:00"), new Date(a.replace(/-/g, "/"))), V = (a) => a.getHours() * 60 + a.getMinutes(), F = (a, k) => {
331
- typeof a == "string" && (a = a.replace(/-/g, "/")), typeof k == "string" && (k = k.replace(/-/g, "/")), a = new Date(a).setHours(0, 0, 0, 0), k = new Date(k).setHours(0, 0, 1, 0);
332
- const y = (new Date(k).getTimezoneOffset() - new Date(a).getTimezoneOffset()) * 60 * 1e3;
333
- return Math.ceil((k - a - y) / (24 * 3600 * 1e3));
334
- }, J = (a, k, y) => Math.abs(a.getTime() - k.getTime()) <= y * 60 * 1e3, K = (a) => a && a instanceof Date && !isNaN(a), ue = (a, k = "YYYY-MM-DD", y = null) => {
335
- if (y || (y = v.value), k || (k = "YYYY-MM-DD"), k === "YYYY-MM-DD") return ae(a);
336
- b = {}, H = {};
337
- const R = {
338
- YYYY: () => x(a, y).YYYY,
339
- YY: () => x(a, y).YY(),
340
- M: () => x(a, y).M,
341
- MM: () => x(a, y).MM(),
342
- MMM: () => x(a, y).MMM(),
343
- MMMM: () => x(a, y).MMMM(),
344
- MMMMG: () => x(a, y).MMMMG(),
345
- D: () => x(a, y).D,
346
- DD: () => x(a, y).DD(),
347
- S: () => x(a, y).S(),
348
- d: () => x(a, y).d,
349
- dd: () => x(a, y).dd(),
350
- ddd: () => x(a, y).ddd(),
351
- dddd: () => x(a, y).dddd(),
352
- HH: () => oe(a, y).HH,
353
- H: () => oe(a, y).H,
354
- hh: () => oe(a, y).hh,
355
- h: () => oe(a, y).h,
356
- am: () => oe(a, y).am,
357
- AM: () => oe(a, y).AM,
358
- mm: () => oe(a, y).mm,
359
- m: () => oe(a, y).m,
360
- s: () => oe(a, y).s
321
+ return a.getFullYear() === w.getFullYear() && a.getMonth() === w.getMonth() && a.getDate() === w.getDate();
322
+ }, s = (a, w, y) => K(a) ? a.getTime() >= w && a.getTime() <= y : console.warn(`Vue Cal: invalid date provided to \`isInRange(date, rangeStart, rangeEnd)\`: \`${a}\`.`), l = (a) => {
323
+ const w = a.getFullYear();
324
+ return !(w % 400) || w % 100 && !(w % 4);
325
+ }, _ = (a = null, w) => {
326
+ const y = a && new Date(a.valueOf()) || /* @__PURE__ */ new Date(), I = w ? 7 : 6;
327
+ return y.setDate(y.getDate() - (y.getDay() + I) % 7), y;
328
+ }, t = (a) => a instanceof Date ? a : (a.length === 10 && (a += " 00:00"), new Date(a.replace(/-/g, "/"))), C = (a) => a.getHours() * 60 + a.getMinutes(), F = (a, w) => {
329
+ typeof a == "string" && (a = a.replace(/-/g, "/")), typeof w == "string" && (w = w.replace(/-/g, "/")), a = new Date(a).setHours(0, 0, 0, 0), w = new Date(w).setHours(0, 0, 1, 0);
330
+ const y = (new Date(w).getTimezoneOffset() - new Date(a).getTimezoneOffset()) * 60 * 1e3;
331
+ return Math.ceil((w - a - y) / (24 * 3600 * 1e3));
332
+ }, J = (a, w, y) => Math.abs(a.getTime() - w.getTime()) <= y * 60 * 1e3, K = (a) => a && a instanceof Date && !isNaN(a), ie = (a, w = "YYYY-MM-DD", y = null) => {
333
+ if (y || (y = d.value), w || (w = "YYYY-MM-DD"), w === "YYYY-MM-DD") return ae(a);
334
+ k = {}, L = {};
335
+ const I = {
336
+ YYYY: () => Q(a, y).YYYY,
337
+ YY: () => Q(a, y).YY(),
338
+ M: () => Q(a, y).M,
339
+ MM: () => Q(a, y).MM(),
340
+ MMM: () => Q(a, y).MMM(),
341
+ MMMM: () => Q(a, y).MMMM(),
342
+ MMMMG: () => Q(a, y).MMMMG(),
343
+ D: () => Q(a, y).D,
344
+ DD: () => Q(a, y).DD(),
345
+ S: () => Q(a, y).S(),
346
+ d: () => Q(a, y).d,
347
+ dd: () => Q(a, y).dd(),
348
+ ddd: () => Q(a, y).ddd(),
349
+ dddd: () => Q(a, y).dddd(),
350
+ HH: () => ue(a, y).HH,
351
+ H: () => ue(a, y).H,
352
+ hh: () => ue(a, y).hh,
353
+ h: () => ue(a, y).h,
354
+ am: () => ue(a, y).am,
355
+ AM: () => ue(a, y).AM,
356
+ mm: () => ue(a, y).mm,
357
+ m: () => ue(a, y).m,
358
+ s: () => ue(a, y).s
361
359
  };
362
- return k.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (Q, c) => {
363
- const w = R[c.replace(/\{|\}/g, "")];
364
- return w !== void 0 ? w() : c;
360
+ return w.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (x, ge) => {
361
+ const o = I[ge.replace(/\{|\}/g, "")];
362
+ return o !== void 0 ? o() : ge;
365
363
  });
366
364
  }, ae = (a) => {
367
- const k = a.getMonth() + 1, y = a.getDate();
368
- return `${a.getFullYear()}-${k < 10 ? "0" : ""}${k}-${y < 10 ? "0" : ""}${y}`;
369
- }, ne = (a, k = "HH:mm", y = null, R = !1) => {
370
- let Q = !1;
371
- if (R) {
372
- const [S, $, N] = [a.getHours(), a.getMinutes(), a.getSeconds()];
373
- S + $ + N === 141 && (Q = !0);
365
+ const w = a.getMonth() + 1, y = a.getDate();
366
+ return `${a.getFullYear()}-${w < 10 ? "0" : ""}${w}-${y < 10 ? "0" : ""}${y}`;
367
+ }, re = (a, w = "HH:mm", y = null, I = !1) => {
368
+ let x = !1;
369
+ if (I) {
370
+ const [T, S, Y] = [a.getHours(), a.getMinutes(), a.getSeconds()];
371
+ T + S + Y === 141 && (x = !0);
374
372
  }
375
- if (a instanceof Date && k === "HH:mm") return Q ? "24:00" : ge(a);
376
- H = {}, y || (y = v.value);
377
- const c = oe(a, y), w = k.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (S, $) => {
378
- const N = c[$.replace(/\{|\}/g, "")];
379
- return N !== void 0 ? N : $;
373
+ if (a instanceof Date && w === "HH:mm") return x ? "24:00" : fe(a);
374
+ L = {}, y || (y = d.value);
375
+ const ge = ue(a, y), o = w.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (T, S) => {
376
+ const Y = ge[S.replace(/\{|\}/g, "")];
377
+ return Y !== void 0 ? Y : S;
380
378
  });
381
- return Q ? w.replace("23:59", "24:00") : w;
382
- }, ge = (a) => {
383
- const k = a.getHours(), y = a.getMinutes();
384
- return `${(k < 10 ? "0" : "") + k}:${(y < 10 ? "0" : "") + y}`;
379
+ return x ? o.replace("23:59", "24:00") : o;
380
+ }, fe = (a) => {
381
+ const w = a.getHours(), y = a.getMinutes();
382
+ return `${(w < 10 ? "0" : "") + w}:${(y < 10 ? "0" : "") + y}`;
385
383
  }, G = (a) => {
386
- const k = Math.floor(a / 60).toString().padStart(2, 0), y = (a % 60).toString().padStart(2, 0);
387
- return `${k}:${y}`;
388
- }, ce = (a) => {
384
+ const w = Math.floor(a / 60).toString().padStart(2, 0), y = (a % 60).toString().padStart(2, 0);
385
+ return `${w}:${y}`;
386
+ }, Pe = (a) => {
389
387
  if (a > 3 && a < 21) return "th";
390
388
  switch (a % 10) {
391
389
  case 1:
@@ -397,94 +395,94 @@ const nt = (D, n) => {
397
395
  default:
398
396
  return "th";
399
397
  }
400
- }, x = (a, k) => {
401
- if (b.D) return b;
402
- const y = a.getFullYear(), R = a.getMonth() + 1, Q = a.getDate(), w = (a.getDay() - 1 + 7) % 7;
403
- return b = {
398
+ }, Q = (a, w) => {
399
+ if (k.D) return k;
400
+ const y = a.getFullYear(), I = a.getMonth() + 1, x = a.getDate(), o = (a.getDay() - 1 + 7) % 7;
401
+ return k = {
404
402
  // Year.
405
403
  YYYY: y,
406
404
  // 2024.
407
405
  YY: () => y.toString().substring(2),
408
406
  // 24.
409
407
  // Month.
410
- M: R,
408
+ M: I,
411
409
  // 1 to 12.
412
- MM: () => R.toString().padStart(2, 0),
410
+ MM: () => I.toString().padStart(2, 0),
413
411
  // 01 to 12.
414
- MMM: () => k.months[R - 1].substring(0, 3),
412
+ MMM: () => w.months[I - 1].substring(0, 3),
415
413
  // Jan to Dec.
416
- MMMM: () => k.months[R - 1],
414
+ MMMM: () => w.months[I - 1],
417
415
  // January to December.
418
- MMMMG: () => (k.monthsGenitive || k.months)[R - 1],
416
+ MMMMG: () => (w.monthsGenitive || w.months)[I - 1],
419
417
  // January to December in genitive form (Greek...)
420
418
  // Day.
421
- D: Q,
419
+ D: x,
422
420
  // 1 to 31.
423
- DD: () => Q.toString().padStart(2, 0),
421
+ DD: () => x.toString().padStart(2, 0),
424
422
  // 01 to 31.
425
- S: () => ce(Q),
423
+ S: () => Pe(x),
426
424
  // st, nd, rd, th.
427
425
  // Day of the week.
428
- d: w + 1,
426
+ d: o + 1,
429
427
  // 1 to 7 with 7 = Sunday.
430
428
  // Some locales have same start for all the days, so they have specific abbrev in weekDaysShort.
431
- dd: () => k.weekDaysShort.length ? k.weekDaysShort[w] : k.weekDays[w][0],
429
+ dd: () => w.weekDaysShort.length ? w.weekDaysShort[o] : w.weekDays[o][0],
432
430
  // M to S.
433
- ddd: () => k.weekDaysShort.length ? k.weekDaysShort[w] : k.weekDays[w].substr(0, 3),
431
+ ddd: () => w.weekDaysShort.length ? w.weekDaysShort[o] : w.weekDays[o].substr(0, 3),
434
432
  // Mon to Sun.
435
- dddd: () => k.weekDays[w]
433
+ dddd: () => w.weekDays[o]
436
434
  // Monday to Sunday.
437
- }, b;
438
- }, oe = (a, k) => {
439
- if (H.am) return H;
440
- let y, R, Q;
441
- a instanceof Date ? (y = a.getHours(), R = a.getMinutes(), Q = a.getSeconds()) : (y = Math.floor(a / 60), R = Math.floor(a % 60));
442
- const c = y % 12 ? y % 12 : 12, w = (k || { am: "am", pm: "pm" })[y === 24 || y < 12 ? "am" : "pm"];
443
- return H = {
435
+ }, k;
436
+ }, ue = (a, w) => {
437
+ if (L.am) return L;
438
+ let y, I, x;
439
+ a instanceof Date ? (y = a.getHours(), I = a.getMinutes(), x = a.getSeconds()) : (y = Math.floor(a / 60), I = Math.floor(a % 60));
440
+ const ge = y % 12 ? y % 12 : 12, o = (w || { am: "am", pm: "pm" })[y === 24 || y < 12 ? "am" : "pm"];
441
+ return L = {
444
442
  H: y,
445
- h: c,
443
+ h: ge,
446
444
  HH: y.toString().padStart(2, 0),
447
- hh: c.toString().padStart(2, 0),
448
- am: w,
449
- AM: w.toUpperCase(),
450
- m: R,
451
- mm: R.toString().padStart(2, 0),
452
- s: Q
453
- }, H;
445
+ hh: ge.toString().padStart(2, 0),
446
+ am: o,
447
+ AM: o.toUpperCase(),
448
+ m: I,
449
+ mm: I.toString().padStart(2, 0),
450
+ s: x
451
+ }, L;
454
452
  };
455
453
  return {
456
- addDatePrototypes: C,
457
- removeDatePrototypes: i,
458
- updateTexts: f,
459
- addDays: W,
460
- subtractDays: U,
461
- addHours: o,
462
- subtractHours: u,
454
+ addDatePrototypes: j,
455
+ removeDatePrototypes: u,
456
+ updateTexts: m,
457
+ addDays: N,
458
+ subtractDays: R,
459
+ addHours: i,
460
+ subtractHours: c,
463
461
  addMinutes: e,
464
- subtractMinutes: d,
462
+ subtractMinutes: f,
465
463
  snapToInterval: g,
466
- getWeek: M,
464
+ getWeek: $,
467
465
  isToday: P,
468
466
  isSameDate: A,
469
467
  isInRange: s,
470
468
  isLeapYear: l,
471
469
  getPreviousFirstDayOfWeek: _,
472
470
  stringToDate: t,
473
- dateToMinutes: V,
471
+ dateToMinutes: C,
474
472
  countDays: F,
475
473
  datesInSameTimeStep: J,
476
474
  isValid: K,
477
- formatDate: ue,
475
+ formatDate: ie,
478
476
  formatDateLite: ae,
479
- formatTime: ne,
480
- formatTimeLite: ge,
477
+ formatTime: re,
478
+ formatTimeLite: fe,
481
479
  formatMinutes: G
482
480
  };
483
- }, Et = (D) => {
481
+ }, St = (D) => {
484
482
  const { dateUtils: n, config: r } = D;
485
483
  let h = 0;
486
- const p = T(() => {
487
- const o = {
484
+ const p = M(() => {
485
+ const i = {
488
486
  byDate: {},
489
487
  // A map of single-day events indexed by date.
490
488
  recurring: [],
@@ -493,53 +491,53 @@ const nt = (D, n) => {
493
491
  // An array of events IDs that are multiday.
494
492
  byId: {}
495
493
  // A map of all the events indexed by ID for fast lookup.
496
- }, u = r.events.sort((e, d) => e.start - d.start < 0 ? -1 : 1);
497
- for (const e of u)
498
- b(e), e._ || (e._ = {}), e._.id = e._.id || ++h, e.delete || (e.delete = (d) => f(e._.id, d)), e._.deleting = !1, e._.deleted = !1, e.isOverlapping = (d = null) => e.getOverlappingEvents(d).length, e.getOverlappingEvents = (d = null) => {
494
+ }, c = r.events.sort((e, f) => e.start - f.start < 0 ? -1 : 1);
495
+ for (const e of c)
496
+ k(e), e._ || (e._ = {}), e._.id = e._.id || ++h, e.delete || (e.delete = (f) => m(e._.id, f)), e._.deleting = !1, e._.deleted = !1, e.isOverlapping = (f = null) => e.getOverlappingEvents(f).length, e.getOverlappingEvents = (f = null) => {
499
497
  var g;
500
- return W(
501
- v(n.formatDate((d == null ? void 0 : d.start) || e.start), !0),
502
- { start: (d == null ? void 0 : d.start) || e.start, end: (d == null ? void 0 : d.end) || e.end },
503
- { excludeIds: [e._.id], schedule: (g = r.schedules) != null && g.length ? ~~((d == null ? void 0 : d.schedule) || e.schedule) : null }
498
+ return N(
499
+ d(n.formatDate((f == null ? void 0 : f.start) || e.start), !0),
500
+ { start: (f == null ? void 0 : f.start) || e.start, end: (f == null ? void 0 : f.end) || e.end },
501
+ { excludeIds: [e._.id], schedule: (g = r.schedules) != null && g.length ? ~~((f == null ? void 0 : f.schedule) || e.schedule) : null }
504
502
  );
505
- }, e._.register = (d) => {
506
- e._.$el = d, e._.fireCreated && (D.emit("event-created", e), delete e._.fireCreated);
503
+ }, e._.register = (f) => {
504
+ e._.$el = f, e._.fireCreated && (D.emit("event-created", e), delete e._.fireCreated);
507
505
  }, e._.unregister = () => {
508
506
  e._.$el = null, e._.register = null, e.isOverlapping = null, e.getOverlappingEvents = null, e.delete = null;
509
- }, o.byId[e._.id] = e, e.recurring ? o.recurring.push(e._.id) : e._.multiday ? (o.multiday.push(e._.id), o.byDate[e._.startFormatted] || (o.byDate[e._.startFormatted] = []), o.byDate[e._.startFormatted].push(e._.id)) : (o.byDate[e._.startFormatted] || (o.byDate[e._.startFormatted] = []), o.byDate[e._.startFormatted].push(e._.id));
510
- return o;
511
- }), b = (o) => {
512
- if (typeof o.start == "string" && (o.start = n.stringToDate(o.start)), typeof o.end == "string" && (o.end = n.stringToDate(o.end)), o.start.setSeconds(0, 0), o.end.setSeconds(0, 0), isNaN(o.start) || isNaN(o.end)) {
513
- isNaN(o.start) ? console.error(`Vue Cal: invalid start date for event "${o.title}".`, o.start) : console.error(`Vue Cal: invalid end date for event "${o.title}".`, o.end);
507
+ }, i.byId[e._.id] = e, e.recurring ? i.recurring.push(e._.id) : e._.multiday ? (i.multiday.push(e._.id), i.byDate[e._.startFormatted] || (i.byDate[e._.startFormatted] = []), i.byDate[e._.startFormatted].push(e._.id)) : (i.byDate[e._.startFormatted] || (i.byDate[e._.startFormatted] = []), i.byDate[e._.startFormatted].push(e._.id));
508
+ return i;
509
+ }), k = (i) => {
510
+ if (typeof i.start == "string" && (i.start = n.stringToDate(i.start)), typeof i.end == "string" && (i.end = n.stringToDate(i.end)), i.start.setSeconds(0, 0), i.end.setSeconds(0, 0), isNaN(i.start) || isNaN(i.end)) {
511
+ isNaN(i.start) ? console.error(`Vue Cal: invalid start date for event "${i.title}".`, i.start) : console.error(`Vue Cal: invalid end date for event "${i.title}".`, i.end);
514
512
  return;
515
- } else o.end.getTime() < o.start.getTime() && console.error(`Vue Cal: invalid event dates for event "${o.title}". The event ends before it starts.`, o.start, o.end);
516
- o._ || (o._ = {}), o._.multiday = !n.isSameDate(o.start, new Date(o.end.getTime() - 1)), o._.startFormatted = n.formatDate(o.start), o._.startMinutes = ~~n.dateToMinutes(o.start), o._.endMinutes = ~~n.dateToMinutes(o.end);
517
- const u = o.start.getHours(), e = o.start.getMinutes().toString().padStart(2, 0), d = o.end.getHours(), g = o.end.getMinutes().toString().padStart(2, 0);
518
- o._.startTimeFormatted24 = `${u.toString().padStart(2, 0)}:${e}`, o._.startTimeFormatted12 = `${u % 12 || 12}${e ? `:${e}` : ""} ${u < 12 ? "AM" : "PM"}`, o._.endTimeFormatted24 = `${d.toString().padStart(2, 0)}:${g}`, o._.endTimeFormatted12 = `${d % 12 || 12}${g ? `:${g}` : ""} ${d < 12 ? "AM" : "PM"}`, o._.duration = Math.abs(~~((o.end - o.start) / 6e4));
519
- }, H = (o) => p.value.byId[o], v = (o, u = !1, e = !1) => {
520
- let d = p.value.byDate[o] || [];
521
- return d = u || e ? d.map(H) : d, e || (d = d.filter((g) => !g.background && !g._.deleted), u || (d = d.map((g) => g._.id))), d;
522
- }, C = (o) => {
523
- const u = {};
524
- for (const { startFormatted: e } of o) {
525
- u[e] = [];
526
- const d = v(e, !1, !0);
527
- d.length && u[e].push(...d);
513
+ } else i.end.getTime() < i.start.getTime() && console.error(`Vue Cal: invalid event dates for event "${i.title}". The event ends before it starts.`, i.start, i.end);
514
+ i._ || (i._ = {}), i._.multiday = !n.isSameDate(i.start, new Date(i.end.getTime() - 1)), i._.startFormatted = n.formatDate(i.start), i._.startMinutes = ~~n.dateToMinutes(i.start), i._.endMinutes = ~~n.dateToMinutes(i.end);
515
+ const c = i.start.getHours(), e = i.start.getMinutes().toString().padStart(2, 0), f = i.end.getHours(), g = i.end.getMinutes().toString().padStart(2, 0);
516
+ i._.startTimeFormatted24 = `${c.toString().padStart(2, 0)}:${e}`, i._.startTimeFormatted12 = `${c % 12 || 12}${e ? `:${e}` : ""} ${c < 12 ? "AM" : "PM"}`, i._.endTimeFormatted24 = `${f.toString().padStart(2, 0)}:${g}`, i._.endTimeFormatted12 = `${f % 12 || 12}${g ? `:${g}` : ""} ${f < 12 ? "AM" : "PM"}`, i._.duration = Math.abs(~~((i.end - i.start) / 6e4));
517
+ }, L = (i) => p.value.byId[i], d = (i, c = !1, e = !1) => {
518
+ let f = p.value.byDate[i] || [];
519
+ return f = c || e ? f.map(L) : f, e || (f = f.filter((g) => !g.background && !g._.deleted), c || (f = f.map((g) => g._.id))), f;
520
+ }, j = (i) => {
521
+ const c = {};
522
+ for (const { startFormatted: e } of i) {
523
+ c[e] = [];
524
+ const f = d(e, !1, !0);
525
+ f.length && c[e].push(...f);
528
526
  }
529
- return u;
530
- }, i = (o) => {
531
- if (!o.start || !o.end) {
527
+ return c;
528
+ }, u = (i) => {
529
+ if (!i.start || !i.end) {
532
530
  console.error("Vue Cal: Cannot create an event without valid start and end dates.");
533
531
  return;
534
532
  }
535
- return r.snapToInterval && (n.snapToInterval(o.start, r.snapToInterval), n.snapToInterval(o.end, r.snapToInterval)), o = { ...o }, o._ || (o._ = {}), o._.id = ++h, o._.fireCreated = !0, r.events.push(o), o;
536
- }, f = async (o, u = 0) => {
533
+ return r.snapToInterval && (n.snapToInterval(i.start, r.snapToInterval), n.snapToInterval(i.end, r.snapToInterval)), i = { ...i }, i._ || (i._ = {}), i._.id = ++h, i._.fireCreated = !0, r.events.push(i), i;
534
+ }, m = async (i, c = 0) => {
537
535
  var P, A;
538
- if (!o) return console.warn("Vue Cal: Cannot delete event without its ID or criteria.");
539
- let e = typeof o == "string" || !isNaN(o) ? o : null;
540
- const d = typeof o == "object" ? Object.entries(o) : null;
541
- if (d) {
542
- const [s, l] = d[0];
536
+ if (!i) return console.warn("Vue Cal: Cannot delete event without its ID or criteria.");
537
+ let e = typeof i == "string" || !isNaN(i) ? i : null;
538
+ const f = typeof i == "object" ? Object.entries(i) : null;
539
+ if (f) {
540
+ const [s, l] = f[0];
543
541
  e = (P = r.events.find((_) => _[s] === l)) == null ? void 0 : P._.id;
544
542
  }
545
543
  if (!r.editableEvents.delete)
@@ -547,173 +545,173 @@ const nt = (D, n) => {
547
545
  if (!e) return console.warn("Vue Cal: Cannot delete event without its ID.");
548
546
  const g = r.events.findIndex((s) => s._.id === e);
549
547
  if (g === -1) return console.warn(`Vue Cal: Cannot delete unknown event \`${e}\`.`);
550
- const M = r.events[g];
551
- if (M.deletable === !1) return console.warn(`Vue Cal: Can't delete event \`${e}\` since it was explicitely set to \`delete: false\`.`);
552
- switch (u) {
548
+ const $ = r.events[g];
549
+ if ($.deletable === !1) return console.warn(`Vue Cal: Can't delete event \`${e}\` since it was explicitely set to \`delete: false\`.`);
550
+ switch (c) {
553
551
  case 0:
554
- M._.deleting ? r.events.splice(g, 1) : M._.deleting = !0;
552
+ $._.deleting ? r.events.splice(g, 1) : $._.deleting = !0;
555
553
  break;
556
554
  // Display the delete button.
557
555
  case 1:
558
- M._.deleting = !0;
556
+ $._.deleting = !0;
559
557
  break;
560
558
  // Visual deletion + external DOM event firing.
561
559
  // When explicitly using this stage, the event will be visually deleted but still present in the
562
560
  // source of truth until the cell is unmounted (by navigating away).
563
561
  case 2:
564
- M._.deleted = !0, r.events[g]._.deleted = !0, (A = M._.$el) == null || A.dispatchEvent(new CustomEvent("event-deleted", { detail: M._.id }));
562
+ $._.deleted = !0, r.events[g]._.deleted = !0, (A = $._.$el) == null || A.dispatchEvent(new CustomEvent("event-deleted", { detail: $._.id }));
565
563
  break;
566
564
  // Effective deletion from the source of truth (by default, when unmounting the cell).
567
565
  case 3:
568
- r.events.splice(g, 1), D.emit("update:events", r.events), D.emit("event-delete", M);
566
+ r.events.splice(g, 1), D.emit("update:events", r.events), D.emit("event-delete", $);
569
567
  break;
570
568
  }
571
569
  return !0;
572
- }, Y = (o) => {
573
- const u = v(o, !0);
574
- if (!u.length) return { cellOverlaps: {}, longestStreak: 0 };
570
+ }, b = (i) => {
571
+ const c = d(i, !0);
572
+ if (!c.length) return { cellOverlaps: {}, longestStreak: 0 };
575
573
  const e = {};
576
- let d = [], g = 0;
577
- u.sort((M, P) => M.start - P.start || M.end - M.start - (P.end - P.start));
578
- for (const M of u) {
579
- const P = M._.id;
580
- e[P] || (e[P] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), d = d.filter((t) => t.end > M.start);
581
- let A = d.filter((t) => {
574
+ let f = [], g = 0;
575
+ c.sort(($, P) => $.start - P.start || $.end - $.start - (P.end - P.start));
576
+ for (const $ of c) {
577
+ const P = $._.id;
578
+ e[P] || (e[P] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), f = f.filter((t) => t.end > $.start);
579
+ let A = f.filter((t) => {
582
580
  var F;
583
- return (!((F = r.schedules) != null && F.length) || M.schedule === t.schedule) && t.start < M.end;
581
+ return (!((F = r.schedules) != null && F.length) || $.schedule === t.schedule) && t.start < $.end;
584
582
  }), s = new Set(A.map((t) => {
585
- var V;
586
- return ((V = e[t._.id]) == null ? void 0 : V.position) ?? 0;
583
+ var C;
584
+ return ((C = e[t._.id]) == null ? void 0 : C.position) ?? 0;
587
585
  })), l = 0;
588
586
  for (; s.has(l); ) l++;
589
- e[P].position = l, d.push(M);
587
+ e[P].position = l, f.push($);
590
588
  let _ = Math.max(1, ...A.map((t) => {
591
- var V;
592
- return ((V = e[t._.id]) == null ? void 0 : V.maxConcurrent) ?? 1;
589
+ var C;
590
+ return ((C = e[t._.id]) == null ? void 0 : C.maxConcurrent) ?? 1;
593
591
  }));
594
592
  e[P].maxConcurrent = Math.max(A.length + 1, _);
595
593
  for (const t of A)
596
594
  e[t._.id].overlaps.add(P), e[P].overlaps.add(t._.id), e[t._.id].maxConcurrent = e[P].maxConcurrent;
597
595
  g = Math.max(g, e[P].maxConcurrent);
598
596
  }
599
- for (const M in e) e[M].overlaps = [...e[M].overlaps];
597
+ for (const $ in e) e[$].overlaps = [...e[$].overlaps];
600
598
  return { cellOverlaps: e, longestStreak: g };
601
- }, W = (o = [], { start: u, end: e }, { excludeIds: d = [], schedule: g = null }) => {
599
+ }, N = (i = [], { start: c, end: e }, { excludeIds: f = [], schedule: g = null }) => {
602
600
  var A;
603
- const M = new Set(d), P = [];
604
- for (const s of o)
605
- !M.has((A = s._) == null ? void 0 : A.id) && (g === null || g === s.schedule) && U(s, u, e) && P.push(s);
601
+ const $ = new Set(f), P = [];
602
+ for (const s of i)
603
+ !$.has((A = s._) == null ? void 0 : A.id) && (g === null || g === s.schedule) && R(s, c, e) && P.push(s);
606
604
  return P;
607
- }, U = (o, u, e) => {
608
- const d = o.allDay || !r.time, g = d ? new Date(o.start).setHours(0, 0, 0, 0) : o.start.getTime(), M = d ? new Date(o.end).setHours(23, 59, 59, 999) : o.end.getTime(), P = d ? new Date(u).setHours(0, 0, 0, 0) : u.getTime(), A = d ? new Date(e).setHours(23, 59, 59, 999) : e.getTime();
609
- return M > P && g < A;
605
+ }, R = (i, c, e) => {
606
+ const f = i.allDay || !r.time, g = f ? new Date(i.start).setHours(0, 0, 0, 0) : i.start.getTime(), $ = f ? new Date(i.end).setHours(23, 59, 59, 999) : i.end.getTime(), P = f ? new Date(c).setHours(0, 0, 0, 0) : c.getTime(), A = f ? new Date(e).setHours(23, 59, 59, 999) : e.getTime();
607
+ return $ > P && g < A;
610
608
  };
611
609
  return {
612
610
  events: p,
613
- getEvent: H,
614
- getEventsByDate: v,
615
- getViewEvents: C,
616
- getCellOverlappingEvents: Y,
617
- getEventsInRange: W,
618
- createEvent: i,
619
- deleteEvent: f,
620
- isEventInRange: U
611
+ getEvent: L,
612
+ getEventsByDate: d,
613
+ getViewEvents: j,
614
+ getCellOverlappingEvents: b,
615
+ getEventsInRange: N,
616
+ createEvent: u,
617
+ deleteEvent: m,
618
+ isEventInRange: R
621
619
  };
622
- }, St = ({ config: D, dateUtils: n, emit: r, texts: h, eventsManager: p }, b) => {
623
- const { availableViews: H } = D, v = ie(D.view && H[D.view] ? D.view : D.defaultView), C = ie(D.selectedDate || null), i = ie(/* @__PURE__ */ new Date()), f = ie(new Date(D.viewDate || i.value));
624
- f.value.setHours(0, 0, 0, 0);
625
- const Y = ie(new Date(f));
626
- let W = null;
627
- const U = T(() => v.value === "month" ? Y.value : l.value), o = T(() => v.value === "month" ? new Date(Y.value.getFullYear(), Y.value.getMonth() + 1, 0, 23, 59, 59, 999) : t.value), u = T(() => v.value === "week" ? n.getPreviousFirstDayOfWeek(l.value, D.startWeekOnSunday) : v.value === "month" ? l.value : U.value), e = T(() => {
628
- if (v.value === "week") {
629
- const m = n.addDays(u.value, 7);
630
- return m.setMilliseconds(-1), m;
620
+ }, Ct = ({ config: D, dateUtils: n, emit: r, texts: h, eventsManager: p }, k) => {
621
+ const { availableViews: L } = D, d = oe(D.view && L[D.view] ? D.view : D.defaultView), j = oe(D.selectedDate || null), u = oe(/* @__PURE__ */ new Date()), m = oe(new Date(D.viewDate || u.value));
622
+ m.value.setHours(0, 0, 0, 0);
623
+ const b = oe(new Date(m));
624
+ let N = null;
625
+ const R = M(() => d.value === "month" ? b.value : l.value), i = M(() => d.value === "month" ? new Date(b.value.getFullYear(), b.value.getMonth() + 1, 0, 23, 59, 59, 999) : t.value), c = M(() => d.value === "week" ? n.getPreviousFirstDayOfWeek(l.value, D.startWeekOnSunday) : d.value === "month" ? l.value : R.value), e = M(() => {
626
+ if (d.value === "week") {
627
+ const v = n.addDays(c.value, 7);
628
+ return v.setMilliseconds(-1), v;
631
629
  }
632
- return v.value === "month" ? t.value : o.value;
633
- }), d = T(() => {
634
- const m = i.value.getTime();
635
- if (v.value === "week")
636
- return u.value.getTime() <= m && m <= e.value.getTime();
637
- const z = l.value.getTime(), X = t.value.getTime();
638
- return z <= m && m <= X;
630
+ return d.value === "month" ? t.value : i.value;
631
+ }), f = M(() => {
632
+ const v = u.value.getTime();
633
+ if (d.value === "week")
634
+ return c.value.getTime() <= v && v <= e.value.getTime();
635
+ const H = l.value.getTime(), U = t.value.getTime();
636
+ return H <= v && v <= U;
639
637
  });
640
638
  function g() {
641
- i.value = /* @__PURE__ */ new Date(), W = setTimeout(g, 60 * 1e3);
639
+ u.value = /* @__PURE__ */ new Date(), N = setTimeout(g, 60 * 1e3);
642
640
  }
643
- function M() {
644
- W = setTimeout(g, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), g();
641
+ function $() {
642
+ N = setTimeout(g, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), g();
645
643
  }
646
- const P = T(() => {
647
- if (!D.availableViews[v.value]) return 1;
648
- let m = D.availableViews[v.value].cols;
649
- return D.hasHiddenDays && ["week", "month"].includes(v.value) && (m -= D.hasHiddenDays), m;
650
- }), A = T(() => {
651
- var m;
652
- return ((m = D.availableViews[v.value]) == null ? void 0 : m.rows) || 1;
653
- }), s = T(() => P.value * A.value), l = T(() => {
654
- if (v.value === "month") {
655
- let m = Y.value.getDay() || 7;
656
- return D.startWeekOnSunday && !D.hideWeekdays[7] && (m += 1), D.viewDayOffset && (m -= D.viewDayOffset), n.subtractDays(Y.value, m - 1);
644
+ const P = M(() => {
645
+ if (!D.availableViews[d.value]) return 1;
646
+ let v = D.availableViews[d.value].cols;
647
+ return D.hasHiddenDays && ["week", "month"].includes(d.value) && (v -= D.hasHiddenDays), v;
648
+ }), A = M(() => {
649
+ var v;
650
+ return ((v = D.availableViews[d.value]) == null ? void 0 : v.rows) || 1;
651
+ }), s = M(() => P.value * A.value), l = M(() => {
652
+ if (d.value === "month") {
653
+ let v = b.value.getDay() || 7;
654
+ return D.startWeekOnSunday && !D.hideWeekdays[7] && (v += 1), D.viewDayOffset && (v -= D.viewDayOffset), n.subtractDays(b.value, v - 1);
657
655
  }
658
- if (v.value === "week") {
659
- const m = "1234567".split("").filter((X) => !Object.keys(D.hideWeekdays).includes(X));
660
- let z = Math.min(...m);
661
- return D.startWeekOnSunday && !D.hideWeekdays[7] && (z = 1), D.viewDayOffset && (z += D.viewDayOffset), n.addDays(Y.value, z - 1);
656
+ if (d.value === "week") {
657
+ const v = "1234567".split("").filter((U) => !Object.keys(D.hideWeekdays).includes(U));
658
+ let H = Math.min(...v);
659
+ return D.startWeekOnSunday && !D.hideWeekdays[7] && (H = 1), D.viewDayOffset && (H += D.viewDayOffset), n.addDays(b.value, H - 1);
662
660
  }
663
- return Y.value;
664
- }), _ = T(() => {
665
- const m = [], z = ["days", "week", "month"].includes(v.value);
666
- let X = 0;
667
- for (let I = 0; I < s.value + X; I++)
668
- switch (v.value) {
661
+ return b.value;
662
+ }), _ = M(() => {
663
+ const v = [], H = ["days", "week", "month"].includes(d.value);
664
+ let U = 0;
665
+ for (let X = 0; X < s.value + U; X++)
666
+ switch (d.value) {
669
667
  case "day":
670
668
  case "days":
671
669
  case "week":
672
670
  case "month": {
673
- const ve = n.addDays(l.value, I), Ne = ve.getDay() || 7;
674
- if (z && D.hasHiddenDays && D.hideWeekdays[Ne]) {
675
- X++;
671
+ const ce = n.addDays(l.value, X), We = ce.getDay() || 7;
672
+ if (H && D.hasHiddenDays && D.hideWeekdays[We]) {
673
+ U++;
676
674
  continue;
677
675
  }
678
- const Se = new Date(ve);
679
- Se.setHours(23, 59, 59, 999), m.push({ start: ve, startFormatted: n.formatDate(ve), end: Se });
676
+ const Se = new Date(ce);
677
+ Se.setHours(23, 59, 59, 999), v.push({ start: ce, startFormatted: n.formatDate(ce), end: Se });
680
678
  break;
681
679
  }
682
680
  case "year":
683
- m.push({
684
- start: new Date(l.value.getFullYear(), I, 1, 0, 0, 0, 0),
685
- end: new Date(l.value.getFullYear(), I + 1, 0, 23, 59, 59, 999)
681
+ v.push({
682
+ start: new Date(l.value.getFullYear(), X, 1, 0, 0, 0, 0),
683
+ end: new Date(l.value.getFullYear(), X + 1, 0, 23, 59, 59, 999)
686
684
  });
687
685
  break;
688
686
  case "years":
689
- m.push({
690
- start: new Date(l.value.getFullYear() + I, 0, 1, 0, 0, 0, 0),
691
- end: new Date(l.value.getFullYear() + I + 1, 0, 0, 23, 59, 59, 999)
687
+ v.push({
688
+ start: new Date(l.value.getFullYear() + X, 0, 1, 0, 0, 0, 0),
689
+ end: new Date(l.value.getFullYear() + X + 1, 0, 0, 23, 59, 59, 999)
692
690
  });
693
691
  break;
694
692
  }
695
- return m;
696
- }), t = T(() => _.value[_.value.length - 1].end), V = ie("right"), F = T(() => {
697
- const m = Object.keys(D.availableViews);
698
- return m[m.indexOf(v.value) + 1];
699
- }), J = T(() => {
700
- const m = Object.keys(D.availableViews);
701
- return m[m.indexOf(v.value) - 1];
693
+ return v;
694
+ }), t = M(() => _.value[_.value.length - 1].end), C = oe("right"), F = M(() => {
695
+ const v = Object.keys(D.availableViews);
696
+ return v[v.indexOf(d.value) + 1];
697
+ }), J = M(() => {
698
+ const v = Object.keys(D.availableViews);
699
+ return v[v.indexOf(d.value) - 1];
702
700
  });
703
- function K(m, z, X = !1) {
704
- if (!z || !z[m]) return m + 1;
705
- const I = z[m];
706
- return X && typeof I == "string" ? I.substring(0, 3) : I;
701
+ function K(v, H, U = !1) {
702
+ if (!H || !H[v]) return v + 1;
703
+ const X = H[v];
704
+ return U && typeof X == "string" ? X.substring(0, 3) : X;
707
705
  }
708
- function ue(m, z, X) {
709
- const { monthsArray: I, monthBeforeDay: ve, canTruncate: Ne, xs: Se } = X, Me = m.getMonth(), $e = m.getFullYear(), Ye = z.getMonth(), Pe = z.getFullYear(), We = Me !== Ye, Dt = $e !== Pe, _e = Ne && (Se || We), Fe = m.getDate(), ze = z.getDate();
710
- return Dt ? ve ? `${K(Me, I, _e)} ${Fe}, ${$e} - ${K(Ye, I, _e)} ${ze}, ${Pe}` : `${Fe} ${K(Me, I, _e)} ${$e} - ${ze} ${K(Ye, I, _e)} ${Pe}` : We ? ve ? `${K(Me, I, _e)} ${Fe} - ${K(Ye, I, _e)} ${ze}, ${$e}` : `${Fe} ${K(Me, I, _e)} - ${ze} ${K(Ye, I, _e)} ${$e}` : ve ? `${K(Me, I, _e)} ${Fe}-${ze}, ${$e}` : `${Fe}-${ze} ${K(Me, I, _e)} ${$e}`;
706
+ function ie(v, H, U) {
707
+ const { monthsArray: X, monthBeforeDay: ce, canTruncate: We, xs: Se } = U, Me = v.getMonth(), $e = v.getFullYear(), Ye = H.getMonth(), Fe = H.getFullYear(), Ae = Me !== Ye, pt = $e !== Fe, ke = We && (Se || Ae), Le = v.getDate(), He = H.getDate();
708
+ return pt ? ce ? `${K(Me, X, ke)} ${Le}, ${$e} - ${K(Ye, X, ke)} ${He}, ${Fe}` : `${Le} ${K(Me, X, ke)} ${$e} - ${He} ${K(Ye, X, ke)} ${Fe}` : Ae ? ce ? `${K(Me, X, ke)} ${Le} - ${K(Ye, X, ke)} ${He}, ${$e}` : `${Le} ${K(Me, X, ke)} - ${He} ${K(Ye, X, ke)} ${$e}` : ce ? `${K(Me, X, ke)} ${Le}-${He}, ${$e}` : `${Le}-${He} ${K(Me, X, ke)} ${$e}`;
711
709
  }
712
- const ae = T(() => {
713
- const { dateFormat: m, months: z, monthsGenitive: X, week: I, truncations: ve } = h, Ne = D.locale, Se = ve !== !1, Me = m.indexOf("M") < m.indexOf("D"), $e = X && Ne === "el" ? X : z;
714
- switch (v.value) {
710
+ const ae = M(() => {
711
+ const { dateFormat: v, months: H, monthsGenitive: U, week: X, truncations: ce } = h, We = D.locale, Se = ce !== !1, Me = v.indexOf("M") < v.indexOf("D"), $e = U && We === "el" ? U : H;
712
+ switch (d.value) {
715
713
  case "day":
716
- return n.formatDate(l.value, m);
714
+ return n.formatDate(l.value, v);
717
715
  case "days":
718
716
  case "week": {
719
717
  const Ye = {
@@ -722,160 +720,163 @@ const nt = (D, n) => {
722
720
  canTruncate: Se,
723
721
  xs: D.xs
724
722
  };
725
- let Pe = ue(l.value, t.value, Ye);
726
- if (v.value === "week") {
727
- const We = n.getWeek(
723
+ let Fe = ie(l.value, t.value, Ye);
724
+ if (d.value === "week") {
725
+ const Ae = n.getWeek(
728
726
  l.value,
729
727
  D.startWeekOnSunday && !D.hideWeekdays[7]
730
728
  );
731
- Pe += ` <small>${I} ${We}</small>`;
729
+ Fe += ` <small>${X} ${Ae}</small>`;
732
730
  }
733
- return Pe;
731
+ return Fe;
734
732
  }
735
733
  case "month": {
736
734
  const Ye = `${D.xs && Se ? "MMM" : "MMMM"} YYYY`;
737
- return n.formatDate(U.value, Ye);
735
+ return n.formatDate(R.value, Ye);
738
736
  }
739
737
  case "year":
740
738
  return l.value.getFullYear();
741
739
  case "years":
742
- return `${l.value.getFullYear()} - ${o.value.getFullYear()}`;
740
+ return `${l.value.getFullYear()} - ${i.value.getFullYear()}`;
743
741
  }
744
742
  });
745
- function ne() {
746
- switch (console.log("👨‍👩‍👧", "updateView!!!!"), Y.value = new Date(f.value || i.value), Y.value.setHours(0, 0, 0, 0), v.value) {
743
+ function re() {
744
+ switch (b.value = new Date(m.value || u.value), b.value.setHours(0, 0, 0, 0), d.value) {
747
745
  case "day":
748
746
  break;
749
747
  case "days":
750
748
  break;
751
749
  case "week":
752
- Y.value = n.getPreviousFirstDayOfWeek(Y.value, D.startWeekOnSunday && !D.hideWeekdays[7]);
750
+ b.value = n.getPreviousFirstDayOfWeek(b.value, D.startWeekOnSunday && !D.hideWeekdays[7]);
753
751
  break;
754
752
  case "month":
755
- Y.value = new Date(Y.value.getFullYear(), Y.value.getMonth(), 1, 0, 0, 0, 0);
753
+ b.value = new Date(b.value.getFullYear(), b.value.getMonth(), 1, 0, 0, 0, 0);
756
754
  break;
757
755
  case "year":
758
- Y.value = new Date(Y.value.getFullYear(), 0, 1, 0, 0, 0, 0);
756
+ b.value = new Date(b.value.getFullYear(), 0, 1, 0, 0, 0, 0);
759
757
  break;
760
758
  case "years":
761
- Y.value = new Date(Y.value.getFullYear() - Y.value.getFullYear() % s.value, 0, 1, 0, 0, 0, 0);
759
+ b.value = new Date(b.value.getFullYear() - b.value.getFullYear() % s.value, 0, 1, 0, 0, 0, 0);
762
760
  break;
763
761
  }
764
762
  D.ready && r("view-change", {
765
- id: v.value,
763
+ id: d.value,
766
764
  title: ae.value,
767
- start: U.value,
768
- end: o.value,
769
- extendedStart: u.value,
765
+ start: R.value,
766
+ end: i.value,
767
+ extendedStart: c.value,
770
768
  extendedEnd: e.value,
771
769
  cellDates: _.value,
772
- containsToday: d.value,
770
+ containsToday: f.value,
773
771
  events: B.value
774
- }), i.value = /* @__PURE__ */ new Date();
772
+ }), u.value = /* @__PURE__ */ new Date();
775
773
  }
776
- function ge(m) {
777
- const z = v.value, X = D.availableViews[z];
778
- m[z] && JSON.stringify(m[z]) === JSON.stringify(X) || ne();
774
+ function fe(v) {
775
+ const H = d.value, U = D.availableViews[H];
776
+ v[H] && JSON.stringify(v[H]) === JSON.stringify(U) || re();
779
777
  }
780
- function G(m, z = !0) {
781
- const X = Object.keys(D.availableViews);
782
- v.value !== m && (X.includes(m) ? (V.value = X.indexOf(m) < X.indexOf(v.value) ? "left" : "right", v.value = m, r("update:view", m), ne()) : console.warn(`Vue Cal: the \`${m}\` view is not available.`));
778
+ function G(v, H = !0) {
779
+ const U = Object.keys(D.availableViews);
780
+ d.value !== v && (U.includes(v) ? (C.value = U.indexOf(v) < U.indexOf(d.value) ? "left" : "right", d.value = v, r("update:view", v), re()) : console.warn(`Vue Cal: the \`${v}\` view is not available.`));
783
781
  }
784
- function ce() {
782
+ function Pe() {
785
783
  F.value ? G(F.value) : console.warn("Vue Cal: no broader view is available.");
786
784
  }
787
- function x() {
785
+ function Q() {
788
786
  J.value ? G(J.value) : console.warn("Vue Cal: no narrower view is available.");
789
787
  }
790
- function oe() {
791
- k(!1);
788
+ function ue() {
789
+ w(!1);
792
790
  }
793
791
  function a() {
794
- k(!0);
792
+ w(!0);
795
793
  }
796
- function k(m = !0) {
797
- let z = new Date(f.value);
798
- switch (v.value) {
794
+ function w(v = !0) {
795
+ let H = new Date(m.value);
796
+ switch (d.value) {
799
797
  case "day":
800
798
  case "days":
801
- m ? z = n.addDays(t.value, 1) : z = n.subtractDays(l.value, s.value);
799
+ v ? H = n.addDays(t.value, 1) : H = n.subtractDays(l.value, s.value);
802
800
  break;
803
801
  case "week": {
804
- m ? (z = n.addDays(e.value, 1), z.setHours(0, 0, 0, 0)) : z = n.subtractDays(u.value, s.value);
802
+ v ? (H = n.addDays(e.value, 1), H.setHours(0, 0, 0, 0)) : H = n.subtractDays(c.value, s.value);
805
803
  break;
806
804
  }
807
805
  case "month": {
808
- const X = m ? 1 : -1;
809
- z = new Date(z.getFullYear(), z.getMonth() + X, 1, 0, 0, 0, 0);
806
+ const U = v ? 1 : -1;
807
+ H = new Date(H.getFullYear(), H.getMonth() + U, 1, 0, 0, 0, 0);
810
808
  break;
811
809
  }
812
810
  case "year": {
813
- const X = m ? 1 : -1;
814
- z = new Date(z.getFullYear() + X, 1, 1, 0, 0, 0, 0);
811
+ const U = v ? 1 : -1;
812
+ H = new Date(H.getFullYear() + U, 1, 1, 0, 0, 0, 0);
815
813
  break;
816
814
  }
817
815
  case "years": {
818
- const X = m ? s.value : -s.value;
819
- z = new Date(z.getFullYear() + X, 1, 1, 0, 0, 0, 0);
816
+ const U = v ? s.value : -s.value;
817
+ H = new Date(H.getFullYear() + U, 1, 1, 0, 0, 0, 0);
820
818
  break;
821
819
  }
822
820
  }
823
- R(z);
821
+ I(H);
824
822
  }
825
823
  function y() {
826
- const m = /* @__PURE__ */ new Date();
827
- m.setHours(0, 0, 0, 0), R(m);
824
+ const v = /* @__PURE__ */ new Date();
825
+ v.setHours(0, 0, 0, 0), I(v);
828
826
  }
829
- function R(m, z = !0, X = !1) {
830
- if (!n.isValid(m)) return console.warn("Vue Cal: can't navigate to the given date: invalid date provided to `updateViewDate(date)`.");
831
- let [I, ve] = [l.value, t.value];
832
- v.value === "month" && ([I, ve] = [U.value, o.value]), (!n.isInRange(m, I, ve) || X) && (m.setHours(0, 0, 0, 0), V.value = m.getTime() < I.getTime() ? "left" : "right", f.value = m, z && r("update:viewDate", m), ne());
827
+ function I(v, H = !0, U = !1) {
828
+ if (!n.isValid(v)) return console.warn("Vue Cal: can't navigate to the given date: invalid date provided to `updateViewDate(date)`.");
829
+ let [X, ce] = [l.value, t.value];
830
+ d.value === "month" && ([X, ce] = [R.value, i.value]), (!n.isInRange(v, X, ce) || U) && (v.setHours(0, 0, 0, 0), C.value = v.getTime() < X.getTime() ? "left" : "right", m.value = v, H && r("update:viewDate", v), re());
833
831
  }
834
- function Q(m, z = !0) {
835
- if (!n.isValid(m)) return console.warn("Vue Cal: can't update the selected date: invalid date provided to `updateSelectedDate(date)`.");
836
- const { isValid: X, isSameDate: I } = n;
837
- (!C.value || !X(C.value) || !I(m, C.value)) && (m.setHours(0, 0, 0, 0), C.value = m, z && r("update:selectedDate", m));
832
+ function x(v, H = !0) {
833
+ if (!n.isValid(v)) return console.warn("Vue Cal: can't update the selected date: invalid date provided to `updateSelectedDate(date)`.");
834
+ const { isValid: U, isSameDate: X } = n;
835
+ (!j.value || !U(j.value) || !X(v, j.value)) && (v.setHours(0, 0, 0, 0), j.value = v, H && r("update:selectedDate", v));
838
836
  }
839
- function c(m) {
840
- !m && !Y.value.getDay() ? R(n.addDays(Y.value, 1), !0, !0) : (V.value = "left", ne());
837
+ function ge(v) {
838
+ !v && !b.value.getDay() ? I(n.addDays(b.value, 1), !0, !0) : (C.value = "left", re());
841
839
  }
842
- function w() {
843
- ne();
840
+ function o(v) {
841
+ v && D.startWeekOnSunday && !b.value.getDay() ? I(n.addDays(b.value, 1), !0, !0) : !v && D.startWeekOnSunday && b.value.getDay() === 1 && I(n.subtractDays(b.value, 1), !0, !0);
844
842
  }
845
- function S(m) {
846
- var I;
847
- const z = (I = b.value) == null ? void 0 : I.querySelector(".vuecal__scrollable"), X = m ? m * D.timeCellHeight / D.timeStep : 0;
848
- z == null || z.scrollTo({ top: X, behavior: "smooth" });
843
+ function T() {
844
+ console.log("toggling weekdays", D.hideWeekdays);
849
845
  }
850
- function $() {
851
- const m = /* @__PURE__ */ new Date();
852
- S(m.getHours() * 60 + m.getMinutes());
846
+ function S(v) {
847
+ var X;
848
+ const H = (X = k.value) == null ? void 0 : X.querySelector(".vuecal__scrollable"), U = v ? v * D.timeCellHeight / D.timeStep : 0;
849
+ H == null || H.scrollTo({ top: U, behavior: "smooth" });
853
850
  }
854
- function N() {
851
+ function Y() {
852
+ const v = /* @__PURE__ */ new Date();
853
+ S(v.getHours() * 60 + v.getMinutes());
854
+ }
855
+ function W() {
855
856
  S(0);
856
857
  }
857
- const B = T(() => p.getViewEvents(_.value)), ee = p.createEvent, de = p.deleteEvent;
858
- return he(() => D.view, (m) => G(m, !1)), he(() => D.availableViews, ge), he(() => D.datePicker, () => G("month", !1)), he(() => D.viewDate, (m) => R(m, !1)), he(() => D.selectedDate, (m) => Q(m, !1)), he(() => D.startWeekOnSunday, (m) => c(m)), he(() => D.hideWeekdays, w), he(() => s.value, () => {
858
+ const B = M(() => p.getViewEvents(_.value)), ee = p.createEvent, ye = p.deleteEvent;
859
+ return de(() => D.view, (v) => G(v, !1)), de(() => D.availableViews, fe), de(() => D.datePicker, () => G("month", !1)), de(() => D.viewDate, (v) => I(v, !1)), de(() => D.selectedDate, (v) => x(v, !1)), de(() => D.startWeekOnSunday, (v) => ge(v)), de(() => D.hideWeekends, (v) => o(v)), de(() => D.hideWeekdays, T), de(() => s.value, () => {
859
860
  s.value > 90 && console.warn("Vue Cal: high cell count detected. Performance may degrade when interactions are enabled.");
860
- }), he(() => D.watchRealTime, (m) => {
861
- m && D.time ? M() : W = clearTimeout(W);
862
- }), ne(), D.time && D.watchRealTime && M(), Re(() => W = clearTimeout(W)), {
863
- now: i,
864
- id: v,
861
+ }), de(() => D.watchRealTime, (v) => {
862
+ v && D.time ? $() : N = clearTimeout(N);
863
+ }), re(), D.time && D.watchRealTime && $(), Xe(() => N = clearTimeout(N)), {
864
+ now: u,
865
+ id: d,
865
866
  broaderView: F,
866
867
  narrowerView: J,
867
868
  title: ae,
868
- viewDate: f,
869
- start: U,
870
- end: o,
871
- extendedStart: u,
869
+ viewDate: m,
870
+ start: R,
871
+ end: i,
872
+ extendedStart: c,
872
873
  // Full range, including out of scope month days, and hidden leading/trailing days.
873
874
  extendedEnd: e,
874
875
  // Full range, including out of scope month days, and hidden leading/trailing days.
875
876
  firstCellDate: l,
876
877
  lastCellDate: t,
877
- containsToday: d,
878
- selectedDate: C,
878
+ containsToday: f,
879
+ selectedDate: j,
879
880
  cellDates: _,
880
881
  cols: P,
881
882
  rows: A,
@@ -883,89 +884,89 @@ const nt = (D, n) => {
883
884
  // The following events array is only a subset of visible ones, plus any potential recurring
884
885
  // and multi-day events.
885
886
  events: B,
886
- transitionDirection: V,
887
+ transitionDirection: C,
887
888
  switch: G,
888
- broader: ce,
889
- narrower: x,
890
- previous: oe,
889
+ broader: Pe,
890
+ narrower: Q,
891
+ previous: ue,
891
892
  next: a,
892
- navigate: k,
893
+ navigate: w,
893
894
  goToToday: y,
894
- updateViewDate: R,
895
- updateSelectedDate: Q,
896
- scrollToCurrentTime: $,
895
+ updateViewDate: I,
896
+ updateSelectedDate: x,
897
+ scrollToCurrentTime: Y,
897
898
  scrollToTime: S,
898
- scrollTop: N,
899
+ scrollTop: W,
899
900
  createEvent: ee,
900
- deleteEvent: de,
901
+ deleteEvent: ye,
901
902
  // Getters.
902
903
  get isDay() {
903
- return v.value === "day";
904
+ return d.value === "day";
904
905
  },
905
906
  get isDays() {
906
- return v.value === "days";
907
+ return d.value === "days";
907
908
  },
908
909
  get isWeek() {
909
- return v.value === "week";
910
+ return d.value === "week";
910
911
  },
911
912
  get isMonth() {
912
- return v.value === "month";
913
+ return d.value === "month";
913
914
  },
914
915
  get isYear() {
915
- return v.value === "year";
916
+ return d.value === "year";
916
917
  },
917
918
  get isYears() {
918
- return v.value === "years";
919
+ return d.value === "years";
919
920
  }
920
921
  };
921
- }, st = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], lt = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], rt = "Years", ot = "Year", it = "Month", ut = "Week", ct = "Days", dt = "Day", vt = "Today", mt = "No Event", ft = "All day", gt = "Delete", ht = "Create an event", yt = "dddd, MMMM D, YYYY", Ze = {
922
- weekDays: st,
923
- months: lt,
924
- years: rt,
925
- year: ot,
926
- month: it,
927
- week: ut,
928
- days: ct,
929
- day: dt,
930
- today: vt,
931
- noEvent: mt,
932
- allDay: ft,
933
- deleteEvent: gt,
934
- createEvent: ht,
935
- dateFormat: yt
936
- }, Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
922
+ }, lt = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], rt = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], ot = "Years", it = "Year", ut = "Month", ct = "Week", dt = "Days", vt = "Day", mt = "Today", ft = "No Event", gt = "All day", ht = "Delete", yt = "Create an event", Dt = "dddd, MMMM D, YYYY", Ke = {
923
+ weekDays: lt,
924
+ months: rt,
925
+ years: ot,
926
+ year: it,
927
+ month: ut,
928
+ week: ct,
929
+ days: dt,
930
+ day: vt,
931
+ today: mt,
932
+ noEvent: ft,
933
+ allDay: gt,
934
+ deleteEvent: ht,
935
+ createEvent: yt,
936
+ dateFormat: Dt
937
+ }, Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
937
938
  __proto__: null,
938
- allDay: ft,
939
- createEvent: ht,
940
- dateFormat: yt,
941
- day: dt,
942
- days: ct,
943
- default: Ze,
944
- deleteEvent: gt,
945
- month: it,
946
- months: lt,
947
- noEvent: mt,
948
- today: vt,
949
- week: ut,
950
- weekDays: st,
951
- year: ot,
952
- years: rt
953
- }, Symbol.toStringTag, { value: "Module" })), He = Te({
954
- texts: { ...me.texts },
939
+ allDay: gt,
940
+ createEvent: yt,
941
+ dateFormat: Dt,
942
+ day: vt,
943
+ days: dt,
944
+ default: Ke,
945
+ deleteEvent: ht,
946
+ month: ut,
947
+ months: rt,
948
+ noEvent: ft,
949
+ today: mt,
950
+ week: ct,
951
+ weekDays: lt,
952
+ year: it,
953
+ years: ot
954
+ }, Symbol.toStringTag, { value: "Module" })), ze = Te({
955
+ texts: { ...ve.texts },
955
956
  // Make texts reactive before a locale is loaded.
956
- dateUtils: nt(me.texts, Ze)
957
+ dateUtils: st(ve.texts, Ke)
957
958
  // Some Date utils functions need localized texts.
958
- }), Vt = ({ props: D, emit: n, attrs: r, vuecalEl: h, uid: p }) => {
959
- const b = Te({
959
+ }), Ot = ({ props: D, emit: n, attrs: r, vuecalEl: h, uid: p }) => {
960
+ const k = Te({
960
961
  uid: p,
961
962
  // The Vuecal instance unique ID, used for dnd source-target identification.
962
963
  emit: n,
963
- texts: { ...He.texts },
964
+ texts: { ...ze.texts },
964
965
  // Make texts reactive before a locale is loaded.
965
966
  // The date utils composable.
966
967
  // A class/composable is needed in order to access the user locale in all the methods, and
967
968
  // independently of other potential Vue Cal instances on the same page.
968
- dateUtils: { ...He.dateUtils },
969
+ dateUtils: { ...ze.dateUtils },
969
970
  now: /* @__PURE__ */ new Date(),
970
971
  config: {},
971
972
  eventsManager: {},
@@ -980,8 +981,8 @@ const nt = (D, n) => {
980
981
  isResizingEvent: !1
981
982
  }
982
983
  });
983
- return b.dateUtils = nt(Object.assign(me.texts, b.texts), Ze), b.config = $t(b, D, r), b.eventsManager = Et(b), b.view = St(b, h), b.dnd = Yt(b), b;
984
- }, Ot = 24 * 60, jt = {
984
+ return k.dateUtils = st(Object.assign(ve.texts, k.texts), Ke), k.config = Yt(k, D, r), k.eventsManager = St(k), k.view = Ct(k, h), k.dnd = Et(k), k;
985
+ }, jt = 24 * 60, Pt = {
985
986
  allDayEvents: { type: [Boolean, String], default: !1 },
986
987
  // Coming soon.
987
988
  // avoidEventOverlap: { type: Boolean, default: undefined }, // Coming soon.
@@ -1045,7 +1046,7 @@ const nt = (D, n) => {
1045
1046
  // Start time of the time column, in minutes.
1046
1047
  timeStep: { type: Number, default: 60 },
1047
1048
  // Step amount for the time in the time column, in minutes.
1048
- timeTo: { type: Number, default: Ot },
1049
+ timeTo: { type: Number, default: jt },
1049
1050
  // End time of the time column, in minutes.
1050
1051
  titleBar: { type: Boolean, default: !0 },
1051
1052
  // Show or hide the header title bar.
@@ -1077,206 +1078,209 @@ const nt = (D, n) => {
1077
1078
  // minScheduleWidth: { type: Number, default: 0 },
1078
1079
  // overlapsPerTimeStep: { type: Boolean, default: false },
1079
1080
  // resizeX: { type: Boolean, default: false },
1080
- }, Pt = { class: "vuecal__header" }, Ft = {
1081
+ }, Ft = { class: "vuecal__header" }, Lt = {
1081
1082
  key: 0,
1082
1083
  class: "vuecal__views-bar"
1083
- }, zt = ["onClick", "innerHTML"], Ht = {
1084
+ }, Ht = ["onClick", "innerHTML"], zt = {
1084
1085
  key: 1,
1085
1086
  class: "vuecal__title-bar"
1086
- }, Lt = { class: "vuecal__transition-wrap" }, Nt = ["disabled", "innerHTML"], Wt = {
1087
+ }, Nt = { class: "vuecal__transition-wrap" }, Wt = ["disabled", "innerHTML"], At = {
1087
1088
  __name: "header",
1088
1089
  setup(D) {
1089
- const n = Le("vuecal"), { view: r, config: h } = n, p = () => {
1090
+ const n = Ne("vuecal"), { view: r, config: h } = n, p = () => {
1090
1091
  h.clickToNavigate && r.broader();
1091
- }, b = T(() => h.clickToNavigate ? { click: p } : {});
1092
- return (H, v) => (E(), j("div", Pt, [
1093
- L(H.$slots, "header", {
1094
- view: O(r),
1095
- availableViews: O(h).availableViews,
1096
- vuecal: O(n)
1092
+ }, k = M(() => h.clickToNavigate ? { click: p } : {});
1093
+ return (L, d) => (E(), O("div", Ft, [
1094
+ z(L.$slots, "header", {
1095
+ view: V(r),
1096
+ availableViews: V(h).availableViews,
1097
+ vuecal: V(n)
1097
1098
  }),
1098
- H.$slots.header ? q("", !0) : (E(), j(te, { key: 0 }, [
1099
- O(h).viewsBar ? (E(), j("div", Ft, [
1100
- (E(!0), j(te, null, pe(O(h).availableViews, (C, i) => (E(), j("button", {
1101
- class: we(["vuecal__view-button", { "vuecal__view-button--active": O(r).id === i }]),
1102
- onClick: (f) => O(r).switch(i),
1103
- innerHTML: O(n).texts[i],
1099
+ L.$slots.header ? q("", !0) : (E(), O(te, { key: 0 }, [
1100
+ V(h).viewsBar ? (E(), O("div", Lt, [
1101
+ (E(!0), O(te, null, we(V(h).availableViews, (j, u) => (E(), O("button", {
1102
+ class: _e(["vuecal__view-button", { "vuecal__view-button--active": V(r).id === u }]),
1103
+ onClick: (m) => V(r).switch(u),
1104
+ innerHTML: V(n).texts[u],
1104
1105
  type: "button"
1105
- }, null, 10, zt))), 256))
1106
+ }, null, 10, Ht))), 256))
1106
1107
  ])) : q("", !0),
1107
- O(h).titleBar ? (E(), j("nav", Ht, [
1108
- fe("button", {
1109
- class: we(["vuecal__nav vuecal__nav--prev", { "vuecal__nav--default": !H.$slots["previous-button"] }]),
1110
- onClick: v[0] || (v[0] = (...C) => O(r).previous && O(r).previous(...C)),
1108
+ V(h).titleBar ? (E(), O("nav", zt, [
1109
+ me("button", {
1110
+ class: _e(["vuecal__nav vuecal__nav--prev", { "vuecal__nav--default": !L.$slots["previous-button"] }]),
1111
+ onClick: d[0] || (d[0] = (...j) => V(r).previous && V(r).previous(...j)),
1111
1112
  type: "button"
1112
1113
  }, [
1113
- L(H.$slots, "previous-button")
1114
+ z(L.$slots, "previous-button")
1114
1115
  ], 2),
1115
- fe("div", Lt, [
1116
- Ve(Xe, {
1117
- name: `vuecal-slide-fade--${O(r).transitionDirection}`
1116
+ me("div", Nt, [
1117
+ Ve(Ge, {
1118
+ name: `vuecal-slide-fade--${V(r).transitionDirection}`
1118
1119
  }, {
1119
1120
  default: Z(() => [
1120
- (E(), j("div", {
1121
- key: O(r).id + O(r).start.getTime()
1121
+ (E(), O("div", {
1122
+ key: V(r).id + V(r).start.getTime()
1122
1123
  }, [
1123
- H.$slots.title ? (E(), Ee(Ke(O(h).clickToNavigate && O(r).broaderView ? "button" : "div"), ye({
1124
+ L.$slots.title ? (E(), Ee(Qe(V(h).clickToNavigate && V(r).broaderView ? "button" : "div"), he({
1124
1125
  key: 0,
1125
1126
  class: "vuecal__title"
1126
- }, Be(b.value)), {
1127
+ }, Ie(k.value)), {
1127
1128
  default: Z(() => [
1128
- L(H.$slots, "title", se(le(O(r))))
1129
+ z(L.$slots, "title", ne(se(V(r))))
1129
1130
  ]),
1130
1131
  _: 3
1131
- }, 16)) : (E(), Ee(Ke(O(h).clickToNavigate && O(r).broaderView ? "button" : "div"), ye({
1132
+ }, 16)) : (E(), Ee(Qe(V(h).clickToNavigate && V(r).broaderView ? "button" : "div"), he({
1132
1133
  key: 1,
1133
1134
  class: "vuecal__title"
1134
- }, Be(b.value), {
1135
- innerHTML: O(r).title
1135
+ }, Ie(k.value), {
1136
+ innerHTML: V(r).title
1136
1137
  }), null, 16, ["innerHTML"]))
1137
1138
  ]))
1138
1139
  ]),
1139
1140
  _: 3
1140
1141
  }, 8, ["name"])
1141
1142
  ]),
1142
- O(h).todayButton ? (E(), j(te, { key: 0 }, [
1143
- H.$slots["today-button"] ? L(H.$slots, "today-button", {
1143
+ V(h).todayButton ? (E(), O(te, { key: 0 }, [
1144
+ L.$slots["today-button"] ? z(L.$slots, "today-button", {
1144
1145
  key: 0,
1145
- navigate: () => !O(r).containsToday && O(r).goToToday(),
1146
- active: O(r).containsToday
1147
- }) : (E(), j("button", {
1146
+ navigate: () => !V(r).containsToday && V(r).goToToday(),
1147
+ active: V(r).containsToday
1148
+ }) : (E(), O("button", {
1148
1149
  key: 1,
1149
- class: we(["vuecal__nav vuecal__nav--today vuecal__nav--default", { "vuecal__nav--active": O(r).containsToday }]),
1150
- onClick: v[1] || (v[1] = (C) => !O(r).containsToday && O(r).goToToday()),
1151
- disabled: !!O(r).containsToday,
1150
+ class: _e(["vuecal__nav vuecal__nav--today vuecal__nav--default", { "vuecal__nav--active": V(r).containsToday }]),
1151
+ onClick: d[1] || (d[1] = (j) => !V(r).containsToday && V(r).goToToday()),
1152
+ disabled: !!V(r).containsToday,
1152
1153
  type: "button",
1153
- innerHTML: O(n).texts.today
1154
- }, null, 10, Nt))
1154
+ innerHTML: V(n).texts.today
1155
+ }, null, 10, Wt))
1155
1156
  ], 64)) : q("", !0),
1156
- fe("button", {
1157
- class: we(["vuecal__nav vuecal__nav--next", { "vuecal__nav--default": !H.$slots["next-button"] }]),
1158
- onClick: v[2] || (v[2] = (...C) => O(r).next && O(r).next(...C)),
1157
+ me("button", {
1158
+ class: _e(["vuecal__nav vuecal__nav--next", { "vuecal__nav--default": !L.$slots["next-button"] }]),
1159
+ onClick: d[2] || (d[2] = (...j) => V(r).next && V(r).next(...j)),
1159
1160
  type: "button"
1160
1161
  }, [
1161
- L(H.$slots, "next-button")
1162
+ z(L.$slots, "next-button")
1162
1163
  ], 2)
1163
1164
  ])) : q("", !0)
1164
1165
  ], 64))
1165
1166
  ]));
1166
1167
  }
1167
- }, At = {
1168
+ }, Bt = {
1168
1169
  key: 0,
1169
1170
  class: "vuecal__headings"
1170
- }, Bt = {
1171
+ }, It = {
1171
1172
  key: 0,
1172
1173
  class: "vuecal__weekdays-headings"
1173
- }, It = ["onClick"], Rt = { class: "vuecal__weekday-day" }, Xt = {
1174
+ }, Rt = ["onClick"], Xt = { class: "vuecal__weekday-day" }, Gt = {
1174
1175
  key: 0,
1175
1176
  class: "vuecal__weekday-date"
1176
- }, Ut = {
1177
+ }, Jt = {
1177
1178
  key: 1,
1178
1179
  class: "vuecal__schedules-headings w-flex grow"
1179
- }, Gt = ["innerHTML"], Jt = {
1180
+ }, Ut = ["innerHTML"], qt = {
1180
1181
  __name: "headings-bar",
1181
1182
  setup(D) {
1182
- const n = Le("vuecal"), { view: r, config: h, dateUtils: p } = n, b = T(() => h.xs ? "day-xs" : h.sm || r.isDays || r.isMonth ? "day-sm" : "day"), H = T(() => (r.isDay || r.isDays || r.isWeek || r.isMonth) && !(r.isDay && !h.schedules)), v = T(() => r.cellDates.slice(0, r.cols).map(({ start: i }) => ({
1183
- id: Ie[i.getDay()],
1184
- date: i,
1185
- dateNumber: i.getDate(),
1186
- day: p.formatDate(i, "dddd"),
1187
- "day-sm": p.formatDate(i, "ddd"),
1188
- "day-xs": p.formatDate(i, "dd"),
1189
- isToday: p.isToday(i)
1190
- }))), C = {
1191
- click: (i) => {
1192
- (r.isDays || r.isWeek) && r.updateSelectedDate(i);
1183
+ const n = Ne("vuecal"), { view: r, config: h, dateUtils: p } = n, k = M(() => h.xs ? "day-xs" : h.sm || r.isDays || r.isMonth ? "day-sm" : "day"), L = M(() => (r.isDay || r.isDays || r.isWeek || r.isMonth) && !(r.isDay && !h.schedules)), d = M(() => r.cellDates.slice(0, r.cols).map(({ start: u }) => ({
1184
+ id: Re[u.getDay()],
1185
+ date: u,
1186
+ dateNumber: u.getDate(),
1187
+ day: p.formatDate(u, "dddd"),
1188
+ "day-sm": p.formatDate(u, "ddd"),
1189
+ "day-xs": p.formatDate(u, "dd"),
1190
+ isToday: p.isToday(u)
1191
+ }))), j = {
1192
+ click: (u) => {
1193
+ (r.isDays || r.isWeek) && r.updateSelectedDate(u);
1193
1194
  }
1194
1195
  };
1195
- return (i, f) => H.value ? (E(), j("div", At, [
1196
- O(r).isDay ? q("", !0) : (E(), j("div", Bt, [
1197
- (E(!0), j(te, null, pe(v.value, (Y, W) => (E(), j("div", {
1198
- class: we(["vuecal__weekday", { "vuecal__weekday--today": Y.isToday }]),
1199
- key: W,
1200
- onClick: (U) => C.click(Y.date)
1196
+ return (u, m) => L.value ? (E(), O("div", Bt, [
1197
+ V(r).isDay ? q("", !0) : (E(), O("div", It, [
1198
+ (E(!0), O(te, null, we(d.value, (b, N) => (E(), O("div", {
1199
+ class: _e(["vuecal__weekday", { "vuecal__weekday--today": b.isToday }]),
1200
+ key: N,
1201
+ onClick: (R) => j.click(b.date)
1201
1202
  }, [
1202
- L(i.$slots, "weekday-heading", {
1203
- label: Y[b.value],
1204
- id: Y.id,
1205
- date: Y.date
1203
+ z(u.$slots, "weekday-heading", {
1204
+ label: b[k.value],
1205
+ id: b.id,
1206
+ date: b.date
1206
1207
  }, () => [
1207
- fe("span", Rt, re(Y[b.value]), 1),
1208
- O(r).isMonth ? q("", !0) : (E(), j("strong", Xt, re(Y.dateNumber), 1))
1208
+ me("span", Xt, le(b[k.value]), 1),
1209
+ V(r).isMonth ? q("", !0) : (E(), O("strong", Gt, le(b.dateNumber), 1))
1209
1210
  ])
1210
- ], 10, It))), 128))
1211
+ ], 10, Rt))), 128))
1211
1212
  ])),
1212
- O(h).schedules ? (E(), j("div", Ut, [
1213
- (E(!0), j(te, null, pe(v.value, (Y, W) => (E(), j(te, { key: W }, [
1214
- (E(!0), j(te, null, pe(O(h).schedules, (U, o) => (E(), j(te, { key: o }, [
1215
- i.$slots["schedule-heading"] ? (E(), j("div", {
1213
+ V(h).schedules ? (E(), O("div", Jt, [
1214
+ (E(!0), O(te, null, we(d.value, (b, N) => (E(), O(te, { key: N }, [
1215
+ (E(!0), O(te, null, we(V(h).schedules, (R, i) => (E(), O(te, { key: i }, [
1216
+ u.$slots["schedule-heading"] ? (E(), O("div", {
1216
1217
  key: 0,
1217
- class: we(["vuecal__schedule vuecal__schedule--heading", U.class])
1218
+ class: _e(["vuecal__schedule vuecal__schedule--heading", R.class])
1218
1219
  }, [
1219
- L(i.$slots, "schedule-heading", {
1220
- schedule: U,
1221
- view: O(r)
1220
+ z(u.$slots, "schedule-heading", {
1221
+ schedule: R,
1222
+ view: V(r)
1222
1223
  })
1223
- ], 2)) : (E(), j("div", {
1224
+ ], 2)) : (E(), O("div", {
1224
1225
  key: 1,
1225
- class: we(["vuecal__schedule vuecal__schedule--heading", U.class]),
1226
- innerHTML: U.label
1227
- }, null, 10, Gt))
1226
+ class: _e(["vuecal__schedule vuecal__schedule--heading", R.class]),
1227
+ innerHTML: R.label
1228
+ }, null, 10, Ut))
1228
1229
  ], 64))), 128))
1229
1230
  ], 64))), 128))
1230
1231
  ])) : q("", !0)
1231
1232
  ])) : q("", !0);
1232
1233
  }
1233
- }, qt = { class: "vuecal__time-column" }, Zt = {
1234
+ }, Zt = { class: "vuecal__time-column" }, Kt = {
1234
1235
  __name: "time-column",
1235
1236
  setup(D) {
1236
- const n = Le("vuecal"), { config: r, texts: h } = n, p = T(() => {
1237
- const b = [];
1238
- for (let v = r.timeFrom; v < r.timeTo; v += r.timeStep) {
1239
- const C = ~~(v / 60), i = v % 60, f = h[v < 720 ? "am" : "pm"];
1240
- b.push({
1241
- minutesSum: v,
1237
+ const n = Ne("vuecal"), { config: r, texts: h } = n, p = M(() => {
1238
+ const k = [];
1239
+ for (let d = r.timeFrom; d < r.timeTo; d += r.timeStep) {
1240
+ const j = d + r.timeStep > r.timeTo, u = ~~(d / 60), m = d % 60, b = h[d < 720 ? "am" : "pm"];
1241
+ let N = null;
1242
+ j && (N = `calc(var(--vuecal-time-cell-height) * ${(r.timeTo - d) / r.timeStep})`), k.push({
1243
+ minutesSum: d,
1242
1244
  // The sum of hours + minutes in minutes.
1243
- hours: C,
1244
- minutes: i,
1245
- formatted12: `${C % 12 ? C % 12 : 12}${i ? ":" + i.toString().padStart(2, 0) : ""}${f}`,
1246
- formatted24: `${C.toString().padStart(2, 0)}:${i.toString().padStart(2, 0)}`
1245
+ hours: u,
1246
+ minutes: m,
1247
+ formatted12: `${u % 12 ? u % 12 : 12}${m ? `:${m.toString().padStart(2, 0)}` : ""}${b}`,
1248
+ formatted24: `${u.toString().padStart(2, 0)}:${m.toString().padStart(2, 0)}`,
1249
+ height: N
1247
1250
  });
1248
1251
  }
1249
- return b;
1252
+ return k;
1250
1253
  });
1251
- return (b, H) => (E(), j("div", qt, [
1252
- (E(!0), j(te, null, pe(p.value, (v, C) => (E(), j("div", {
1254
+ return (k, L) => (E(), O("div", Zt, [
1255
+ (E(!0), O(te, null, we(p.value, (d, j) => (E(), O("div", {
1253
1256
  class: "vuecal__time-cell",
1254
- key: C
1257
+ key: j,
1258
+ style: pe({ height: d.height || null })
1255
1259
  }, [
1256
- L(b.$slots, "time-cell", {
1257
- index: C,
1258
- minutes: v.minutes,
1259
- hours: v.hours,
1260
- minutesSum: v.minutesSum,
1261
- format12: v.formatted12,
1262
- format24: v.formatted24
1260
+ z(k.$slots, "time-cell", {
1261
+ index: j,
1262
+ minutes: d.minutes,
1263
+ hours: d.hours,
1264
+ minutesSum: d.minutesSum,
1265
+ format12: d.formatted12,
1266
+ format24: d.formatted24
1263
1267
  }, () => [
1264
- fe("label", null, re(O(r).twelveHour ? v.formatted12 : v.formatted24), 1)
1268
+ me("label", null, le(V(r).twelveHour ? d.formatted12 : d.formatted24), 1)
1265
1269
  ])
1266
- ]))), 128))
1270
+ ], 4))), 128))
1267
1271
  ]));
1268
1272
  }
1269
- }, Kt = ["draggable"], Qt = { class: "vuecal__event-details" }, xt = { class: "vuecal__event-title" }, ea = {
1273
+ }, Qt = ["draggable"], xt = { class: "vuecal__event-details" }, ea = { class: "vuecal__event-title" }, ta = {
1270
1274
  key: 0,
1271
1275
  class: "vuecal__event-time"
1272
- }, ta = ["innerHTML"], at = {
1276
+ }, aa = ["innerHTML"], nt = {
1273
1277
  __name: "event",
1274
1278
  props: {
1275
1279
  event: { type: Object, required: !0 }
1276
1280
  },
1277
1281
  emits: ["event-drag-start", "event-drag-end", "event-resize-start", "event-resize-end"],
1278
1282
  setup(D, { emit: n }) {
1279
- const { config: r, view: h, dnd: p, touch: b, dateUtils: H } = Le("vuecal"), v = D, C = ie(null), i = Te(v.event), f = Te({
1283
+ const { config: r, view: h, dnd: p, touch: k, dateUtils: L } = Ne("vuecal"), d = D, j = oe(null), u = Te(d.event), m = Te({
1280
1284
  dragging: !1,
1281
1285
  resizing: !1,
1282
1286
  fromResizer: !1,
@@ -1310,186 +1314,186 @@ const nt = (D, n) => {
1310
1314
  cellEl: null,
1311
1315
  // Store the cell DOM node for a more efficient resizing calc in mousemove/touchmove.
1312
1316
  schedule: null
1313
- }), Y = T(() => r.editableEvents.drag && i.draggable !== !1 && !i.background), W = T(() => r.time && r.editableEvents.resize && i.resizable !== !1 && !i.background);
1314
- T(() => r.editableEvents.delete && i.deletable !== !1 && !i.background);
1315
- const U = T(() => {
1317
+ }), b = M(() => r.editableEvents.drag && u.draggable !== !1 && !u.background), N = M(() => r.time && r.editableEvents.resize && u.resizable !== !1 && !u.background);
1318
+ M(() => r.editableEvents.delete && u.deletable !== !1 && !u.background);
1319
+ const R = M(() => {
1316
1320
  var s, l, _;
1317
1321
  return {
1318
- [`vuecal__event--${i._.id}`]: !0,
1319
- [i.class]: !!i.class,
1320
- "vuecal__event--recurring": !!i.recurring,
1321
- "vuecal__event--background": !!i.background,
1322
- "vuecal__event--multiday": !!((s = i._) != null && s.multiday),
1323
- "vuecal__event--cut-top": ((l = i._) == null ? void 0 : l.startMinutes) < r.timeFrom,
1324
- "vuecal__event--cut-bottom": ((_ = i._) == null ? void 0 : _.endMinutes) > r.timeTo || i.end.getDate() !== i.start.getDate(),
1322
+ [`vuecal__event--${u._.id}`]: !0,
1323
+ [u.class]: !!u.class,
1324
+ "vuecal__event--recurring": !!u.recurring,
1325
+ "vuecal__event--background": !!u.background,
1326
+ "vuecal__event--multiday": !!((s = u._) != null && s.multiday),
1327
+ "vuecal__event--cut-top": ((l = u._) == null ? void 0 : l.startMinutes) < r.timeFrom,
1328
+ "vuecal__event--cut-bottom": ((_ = u._) == null ? void 0 : _.endMinutes) > r.timeTo || u.end.getDate() !== u.start.getDate(),
1325
1329
  // Only apply the dragging class on the event copy that is being dragged.
1326
- "vuecal__event--dragging": !i._.draggingGhost && i._.dragging,
1330
+ "vuecal__event--dragging": !u._.draggingGhost && u._.dragging,
1327
1331
  // Only apply the dragging-ghost class on the event original that remains fixed while a copy is being
1328
1332
  // dragged. Sometimes when dragging fast the dragging-ghost class would get stuck and events stays
1329
1333
  // invisible, so if dragging is false, disable the dragging-ghost class as well.
1330
1334
  // On event drop, if the new position of the event is approved, only remove the dragging-ghost class
1331
1335
  // after event deletion (event._.dragging is already false) so the event ghost does not flash in before
1332
1336
  // deletion.
1333
- "vuecal__event--dragging-ghost": i._.draggingGhost,
1334
- "vuecal__event--resizing": f.resizing
1337
+ "vuecal__event--dragging-ghost": u._.draggingGhost,
1338
+ "vuecal__event--resizing": m.resizing
1335
1339
  };
1336
- }), o = T(() => {
1340
+ }), i = M(() => {
1337
1341
  const s = (h.isDay || h.isDays || h.isWeek) && r.time;
1338
- if (!s && !i.backgroundColor && !i.color) return !1;
1342
+ if (!s && !u.backgroundColor && !u.color) return !1;
1339
1343
  const l = {
1340
- backgroundColor: i.backgroundColor || null,
1341
- color: i.color || null
1344
+ backgroundColor: u.backgroundColor || null,
1345
+ color: u.color || null
1342
1346
  };
1343
1347
  if (s) {
1344
- const _ = Math.max(r.timeFrom, i._.startMinutes), t = Math.min(r.timeTo, i._.endMinutes), V = Ce(_, r), F = Ce(t, r) - V;
1345
- l.top = `${V}%`, l.height = `${F}%`;
1348
+ const _ = Math.max(r.timeFrom, u._.startMinutes), t = Math.min(r.timeTo, u._.endMinutes), C = Ce(_, r), F = Ce(t, r) - C;
1349
+ l.top = `${C}%`, l.height = `${F}%`;
1346
1350
  }
1347
1351
  return l;
1348
- }), u = T(() => {
1352
+ }), c = M(() => {
1349
1353
  const s = { ...r.eventListeners.event };
1350
- Object.entries(s).forEach(([t, V]) => {
1354
+ Object.entries(s).forEach(([t, C]) => {
1351
1355
  ["resize-end"].includes(t) || (s[t] = (F) => {
1352
- F.type !== "drop" && V(F.type ? { e: F, event: i } : F);
1356
+ F.type !== "drop" && C(F.type ? { e: F, event: u } : F);
1353
1357
  });
1354
1358
  });
1355
1359
  const l = { ...s };
1356
1360
  s.touchstart = (t) => {
1357
- var V;
1358
- t.stopPropagation(), e(t), (V = l.touchstart) == null || V.call(l, { e: t, event: i });
1361
+ var C;
1362
+ t.stopPropagation(), e(t), (C = l.touchstart) == null || C.call(l, { e: t, event: u });
1359
1363
  }, s.mousedown = (t) => {
1360
- var V;
1361
- t.stopPropagation(), e(t), (V = l.mousedown) == null || V.call(l, { e: t, event: i });
1364
+ var C;
1365
+ t.stopPropagation(), e(t), (C = l.mousedown) == null || C.call(l, { e: t, event: u });
1362
1366
  };
1363
1367
  let _ = null;
1364
1368
  return s.click = (t) => {
1365
- var V;
1366
- (V = l.click) == null || V.call(l, { e: t, event: i }), _ ? _ = clearTimeout(_) : _ = setTimeout(() => {
1369
+ var C;
1370
+ (C = l.click) == null || C.call(l, { e: t, event: u }), _ ? _ = clearTimeout(_) : _ = setTimeout(() => {
1367
1371
  var F;
1368
- _ = null, (F = l["delayed-click"]) == null || F.call(l, { e: t, event: i });
1372
+ _ = null, (F = l["delayed-click"]) == null || F.call(l, { e: t, event: u });
1369
1373
  }, 400);
1370
1374
  }, s.dblclick = (t) => {
1371
- l.dblclick ? l.dblclick({ e: t, event: i }) : i.delete(1);
1375
+ l.dblclick ? l.dblclick({ e: t, event: u }) : u.delete(1);
1372
1376
  }, s;
1373
1377
  }), e = (s) => {
1374
- var t, V, F;
1378
+ var t, C, F;
1375
1379
  const l = ((t = s.touches) == null ? void 0 : t[0]) || s;
1376
- f.fromResizer = l.target.matches(".vuecal__event-resizer, .vuecal__event-resizer *");
1377
- const _ = C.value.getBoundingClientRect();
1378
- f.startX = (((V = s.touches) == null ? void 0 : V[0]) || s).clientX - _.left, f.startY = (((F = s.touches) == null ? void 0 : F[0]) || s).clientY - _.top, f.startPercentageX = f.startX * 100 / _.width, f.startPercentageY = f.startY * 100 / _.height, f.cellEl = C.value.closest(".vuecal__cell"), f.resizeStartDate = i.start, A(s.type === "touchstart" ? "touchmove" : "mousemove", d), A(s.type === "touchstart" ? "touchend" : "mouseup", g, { once: !0 }), f.holdTimer = setTimeout(() => {
1380
+ m.fromResizer = l.target.matches(".vuecal__event-resizer, .vuecal__event-resizer *");
1381
+ const _ = j.value.getBoundingClientRect();
1382
+ m.startX = (((C = s.touches) == null ? void 0 : C[0]) || s).clientX - _.left, m.startY = (((F = s.touches) == null ? void 0 : F[0]) || s).clientY - _.top, m.startPercentageX = m.startX * 100 / _.width, m.startPercentageY = m.startY * 100 / _.height, m.cellEl = j.value.closest(".vuecal__cell"), m.resizeStartDate = u.start, A(s.type === "touchstart" ? "touchmove" : "mousemove", f), A(s.type === "touchstart" ? "touchend" : "mouseup", g, { once: !0 }), m.holdTimer = setTimeout(() => {
1379
1383
  var J, K;
1380
- f.holding = !0, (K = (J = u.value).hold) == null || K.call(J, { e: s, event: i });
1384
+ m.holding = !0, (K = (J = c.value).hold) == null || K.call(J, { e: s, event: u });
1381
1385
  }, 1e3);
1382
- }, d = async (s) => {
1383
- var _, t, V, F;
1386
+ }, f = async (s) => {
1387
+ var _, t, C, F;
1384
1388
  const l = ((_ = s.touches) == null ? void 0 : _[0]) || s;
1385
- if (f.fromResizer && !f.resizing && (f.resizing = !0, f.resizingOriginalEvent = { ...i, _: { ...i._ } }, b.isResizingEvent = !0, (V = (t = u.value).resizeStart) == null || V.call(t, { e: s, event: i })), f.holdTimer = clearTimeout(f.holdTimer), f.holding = !1, f.cellEl) {
1386
- const { top: J, left: K, width: ue, height: ae } = f.cellEl.getBoundingClientRect();
1387
- f.moveX = l.clientX - K, f.moveY = l.clientY - J, f.movePercentageX = f.moveX * 100 / ue, f.movePercentageY = f.moveY * 100 / ae;
1389
+ if (m.fromResizer && !m.resizing && (m.resizing = !0, m.resizingOriginalEvent = { ...u, _: { ...u._ } }, k.isResizingEvent = !0, (C = (t = c.value).resizeStart) == null || C.call(t, { e: s, event: u })), m.holdTimer = clearTimeout(m.holdTimer), m.holding = !1, m.cellEl) {
1390
+ const { top: J, left: K, width: ie, height: ae } = m.cellEl.getBoundingClientRect();
1391
+ m.moveX = l.clientX - K, m.moveY = l.clientY - J, m.movePercentageX = m.moveX * 100 / ie, m.movePercentageY = m.moveY * 100 / ae;
1388
1392
  }
1389
- if (f.fromResizer) {
1390
- const { newStart: J, newEnd: K } = M(i);
1391
- let ue = !0;
1393
+ if (m.fromResizer) {
1394
+ const { newStart: J, newEnd: K } = $(u);
1395
+ let ie = !0;
1392
1396
  const { resize: ae } = (F = r.eventListeners) == null ? void 0 : F.event;
1393
- ae && (ue = await ae({
1397
+ ae && (ie = await ae({
1394
1398
  e: s,
1395
- event: { ...i, start: J, end: K },
1396
- overlaps: i.getOverlappingEvents({ start: J, end: K })
1397
- })), ue !== !1 ? (i.start = J, i.end = K, f.resizingLastAcceptedEvent && (f.resizingLastAcceptedEvent = null)) : ae && (f.resizingLastAcceptedEvent = { ...i, _: { ...i._ } });
1399
+ event: { ...u, start: J, end: K },
1400
+ overlaps: u.getOverlappingEvents({ start: J, end: K })
1401
+ })), ie !== !1 ? (u.start = J, u.end = K, m.resizingLastAcceptedEvent && (m.resizingLastAcceptedEvent = null)) : ae && (m.resizingLastAcceptedEvent = { ...u, _: { ...u._ } });
1398
1402
  }
1399
1403
  }, g = async (s) => {
1400
1404
  var l, _;
1401
- if (f.holdTimer = clearTimeout(f.holdTimer), f.holding = !1, f.resizing) {
1402
- const { newStart: t, newEnd: V } = M(i);
1405
+ if (m.holdTimer = clearTimeout(m.holdTimer), m.holding = !1, m.resizing) {
1406
+ const { newStart: t, newEnd: C } = $(u);
1403
1407
  let F = !0;
1404
- const J = u.value["resize-end"];
1408
+ const J = c.value["resize-end"];
1405
1409
  J && (F = await J({
1406
1410
  e: s,
1407
- event: i,
1408
- original: f.resizingOriginalEvent,
1411
+ event: u,
1412
+ original: m.resizingOriginalEvent,
1409
1413
  // Original event details before resizing.
1410
- overlaps: i.getOverlappingEvents({ start: t, end: V })
1411
- })), i.start = F === !1 ? (f.resizingLastAcceptedEvent || f.resizingOriginalEvent).start : ((l = f.resizingLastAcceptedEvent) == null ? void 0 : l.start) || t, i.end = F === !1 ? (f.resizingLastAcceptedEvent || f.resizingOriginalEvent).end : ((_ = f.resizingLastAcceptedEvent) == null ? void 0 : _.end) || V, i._.duration < 1 && (i.start = f.resizingOriginalEvent.start, i.end = f.resizingOriginalEvent.end), b.isResizingEvent = !1;
1414
+ overlaps: u.getOverlappingEvents({ start: t, end: C })
1415
+ })), u.start = F === !1 ? (m.resizingLastAcceptedEvent || m.resizingOriginalEvent).start : ((l = m.resizingLastAcceptedEvent) == null ? void 0 : l.start) || t, u.end = F === !1 ? (m.resizingLastAcceptedEvent || m.resizingOriginalEvent).end : ((_ = m.resizingLastAcceptedEvent) == null ? void 0 : _.end) || C, u._.duration < 1 && (u.start = m.resizingOriginalEvent.start, u.end = m.resizingOriginalEvent.end), k.isResizingEvent = !1;
1412
1416
  }
1413
- document.removeEventListener(s.type === "touchend" ? "touchmove" : "mousemove", d), f.resizing = !1, f.fromResizer = !1, f.dragging = !1, f.startX = 0, f.startY = 0, f.moveX = 0, f.moveY = 0, f.startPercentageX = 0, f.startPercentageY = 0, f.movePercentageX = 0, f.movePercentageY = 0, f.cellEl = null, f.resizeStartDate = null, f.resizingOriginalEvent = null, f.resizingLastAcceptedEvent = null, f.schedule = null;
1414
- }, M = (s) => {
1417
+ document.removeEventListener(s.type === "touchend" ? "touchmove" : "mousemove", f), 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;
1418
+ }, $ = (s) => {
1415
1419
  const l = new Date(s.start.getFullYear(), s.start.getMonth(), s.start.getDate());
1416
1420
  new Date(l).setDate(l.getDate() + 1);
1417
- let t = je(f.movePercentageY, r);
1421
+ let t = je(m.movePercentageY, r);
1418
1422
  if (t = Math.max(0, Math.min(t, 24 * 60)), r.snapToInterval) {
1419
1423
  const J = t + r.snapToInterval / 2;
1420
1424
  t = J - J % r.snapToInterval;
1421
1425
  }
1422
- let V = s.start, F = new Date(l.getTime() + t * 6e4);
1423
- return F < f.resizeStartDate && (V = F, F = f.resizeStartDate), { newStart: V, newEnd: F };
1426
+ let C = s.start, F = new Date(l.getTime() + t * 6e4);
1427
+ return F < m.resizeStartDate && (C = F, F = m.resizeStartDate), { newStart: C, newEnd: F };
1424
1428
  };
1425
- Je(() => i._.register(C.value));
1429
+ qe(() => u._.register(j.value));
1426
1430
  const P = [], A = (s, l, _) => {
1427
1431
  document.addEventListener(s, l, _), P.push({ event: s, handler: l, options: _ });
1428
1432
  };
1429
- return Re(() => {
1430
- i._.unregister(), P.forEach(({ event: s, handler: l, options: _ }) => {
1433
+ return Xe(() => {
1434
+ u._.unregister(), P.forEach(({ event: s, handler: l, options: _ }) => {
1431
1435
  document.removeEventListener(s, l, _);
1432
1436
  });
1433
- }), (s, l) => (E(), j("div", ye({ class: "vuecal__event" }, Be(u.value, !0), {
1437
+ }), (s, l) => (E(), O("div", he({ class: "vuecal__event" }, Ie(c.value, !0), {
1434
1438
  ref_key: "eventEl",
1435
- ref: C,
1436
- class: U.value,
1437
- style: o.value,
1438
- draggable: Y.value ? "true" : void 0,
1439
- onDragstart: l[2] || (l[2] = (_) => Y.value && O(p).eventDragStart(_, i)),
1440
- onDragend: l[3] || (l[3] = (_) => Y.value && O(p).eventDragEnd(_, i))
1439
+ ref: j,
1440
+ class: R.value,
1441
+ style: i.value,
1442
+ draggable: b.value ? "true" : void 0,
1443
+ onDragstart: l[2] || (l[2] = (_) => b.value && V(p).eventDragStart(_, u)),
1444
+ onDragend: l[3] || (l[3] = (_) => b.value && V(p).eventDragEnd(_, u))
1441
1445
  }), [
1442
- fe("div", Qt, [
1443
- L(s.$slots, "event", { event: i }, () => [
1444
- fe("div", xt, re(i.title), 1),
1445
- O(r).time ? (E(), j("div", ea, re(i._[`startTimeFormatted${O(r).twelveHour ? 12 : 24}`]) + `
1446
- - ` + re(i._[`endTimeFormatted${O(r).twelveHour ? 12 : 24}`]), 1)) : q("", !0),
1447
- fe("div", {
1446
+ me("div", xt, [
1447
+ z(s.$slots, "event", { event: u }, () => [
1448
+ me("div", ea, le(u.title), 1),
1449
+ V(r).time ? (E(), O("div", ta, le(u._[`startTimeFormatted${V(r).twelveHour ? 12 : 24}`]) + `
1450
+ - ` + le(u._[`endTimeFormatted${V(r).twelveHour ? 12 : 24}`]), 1)) : q("", !0),
1451
+ me("div", {
1448
1452
  class: "vuecal__event-content",
1449
- innerHTML: i.content
1450
- }, null, 8, ta)
1453
+ innerHTML: u.content
1454
+ }, null, 8, aa)
1451
1455
  ])
1452
1456
  ]),
1453
- W.value ? (E(), j("div", {
1457
+ N.value ? (E(), O("div", {
1454
1458
  key: 0,
1455
1459
  class: "vuecal__event-resizer",
1456
- onDragstart: l[0] || (l[0] = Qe(() => {
1460
+ onDragstart: l[0] || (l[0] = xe(() => {
1457
1461
  }, ["prevent", "stop"]))
1458
1462
  }, null, 32)) : q("", !0),
1459
- Ve(Xe, { name: "vuecal-delete-btn" }, {
1463
+ Ve(Ge, { name: "vuecal-delete-btn" }, {
1460
1464
  default: Z(() => [
1461
- i._.deleting ? (E(), j("div", {
1465
+ u._.deleting ? (E(), O("div", {
1462
1466
  key: 0,
1463
1467
  class: "vuecal__event-delete",
1464
- onClick: l[1] || (l[1] = Qe((_) => i.delete(3), ["stop"]))
1468
+ onClick: l[1] || (l[1] = xe((_) => u.delete(3), ["stop"]))
1465
1469
  }, "Delete")) : q("", !0)
1466
1470
  ]),
1467
1471
  _: 1
1468
1472
  })
1469
- ], 16, Kt));
1473
+ ], 16, Qt));
1470
1474
  }
1471
- }, aa = ["innerHTML"], na = ["data-schedule"], sa = {
1475
+ }, na = ["innerHTML"], sa = ["data-schedule"], la = {
1472
1476
  key: 1,
1473
1477
  class: "vuecal__cell-date"
1474
- }, la = {
1478
+ }, ra = {
1475
1479
  key: 2,
1476
1480
  class: "vuecal__cell-content"
1477
- }, ra = {
1481
+ }, oa = {
1478
1482
  key: 3,
1479
1483
  class: "vuecal__cell-events"
1480
- }, oa = {
1484
+ }, ia = {
1481
1485
  key: 1,
1482
1486
  class: "vuecal__cell-date"
1483
- }, ia = {
1487
+ }, ua = {
1484
1488
  key: 2,
1485
1489
  class: "vuecal__cell-content"
1486
- }, ua = {
1490
+ }, ca = {
1487
1491
  key: 3,
1488
1492
  class: "vuecal__cell-events"
1489
- }, ca = {
1493
+ }, da = {
1490
1494
  key: 5,
1491
1495
  class: "vuecal__cell-events-count"
1492
- }, da = ["title"], va = {
1496
+ }, va = ["title"], ma = {
1493
1497
  __name: "cell",
1494
1498
  props: {
1495
1499
  // Even with time=false, the date of the cell will still be provided in order to attach
@@ -1499,9 +1503,9 @@ const nt = (D, n) => {
1499
1503
  index: { type: Number, required: !0 }
1500
1504
  },
1501
1505
  setup(D) {
1502
- const n = D, r = Le("vuecal"), { view: h, config: p, dateUtils: b, eventsManager: H, dnd: v, touch: C } = r, i = T(() => b.isToday(n.start)), f = ie(null), Y = ie([]), W = ie(!1), U = (c) => {
1503
- Y.value.push(c.detail), W.value = !0;
1504
- }, o = () => setTimeout(() => W.value = !1, 300), u = Te({
1506
+ const n = D, r = Ne("vuecal"), { view: h, config: p, dateUtils: k, eventsManager: L, dnd: d, touch: j } = r, u = M(() => k.isToday(n.start)), m = oe(null), b = oe([]), N = oe(!1), R = (o) => {
1507
+ b.value.push(o.detail), N.value = !0;
1508
+ }, i = () => setTimeout(() => N.value = !1, 300), c = Te({
1505
1509
  dragging: !1,
1506
1510
  holding: !1,
1507
1511
  // When the cell is clicked and hold for a certain amount of time.
@@ -1522,248 +1526,247 @@ const nt = (D, n) => {
1522
1526
  movePercentageX: 0,
1523
1527
  movePercentageY: 0,
1524
1528
  schedule: null
1525
- }), e = ie(!1), d = ie({ cellOverlaps: {}, longestStreak: 0 }), g = T(() => {
1526
- let c = Math.min(u.startPercentageY, u.movePercentageY), w = Math.max(u.startPercentageY, u.movePercentageY), S = je(c, p), $ = je(w, p);
1527
- return p.snapToInterval && (S = b.snapToInterval(S, p.snapToInterval), $ = b.snapToInterval($, p.snapToInterval), c = Ce(S, p), w = Ce($, p)), {
1529
+ }), e = oe(!1), f = oe({ cellOverlaps: {}, longestStreak: 0 }), g = M(() => {
1530
+ let o = Math.min(c.startPercentageY, c.movePercentageY), T = Math.max(c.startPercentageY, c.movePercentageY), S = je(o, p), Y = je(T, p);
1531
+ return p.snapToInterval && (S = k.snapToInterval(S, p.snapToInterval), Y = k.snapToInterval(Y, p.snapToInterval), o = Ce(S, p), T = Ce(Y, p)), {
1528
1532
  style: {
1529
- top: c + "%",
1530
- height: Math.abs(w - c) + "%"
1533
+ top: `${o}%`,
1534
+ height: `${Math.abs(T - o)}%`
1531
1535
  },
1532
1536
  startMinutes: S,
1533
- endMinutes: $,
1534
- start: b.formatMinutes(S),
1535
- end: b.formatMinutes($),
1536
- ...u.schedule ? { schedule: u.schedule } : {}
1537
+ endMinutes: Y,
1538
+ start: k.formatMinutes(S),
1539
+ end: k.formatMinutes(Y),
1540
+ ...c.schedule ? { schedule: c.schedule } : {}
1537
1541
  };
1538
- }), M = T(() => {
1539
- const c = p.editableEvents.create && (u.dragging || e.value), w = p.eventCreateMinDrag && u.thresholdPassed || !p.eventCreateMinDrag;
1540
- return c && w;
1541
- }), P = T(() => {
1542
+ }), $ = M(() => {
1543
+ const o = p.editableEvents.create && (c.dragging || e.value), T = p.eventCreateMinDrag && c.thresholdPassed || !p.eventCreateMinDrag;
1544
+ return o && T;
1545
+ }), P = M(() => {
1542
1546
  var ee;
1543
- const c = /* @__PURE__ */ new Date(), w = h.start.getFullYear(), S = h.start.getMonth(), $ = n.start.getFullYear(), N = n.start.getMonth();
1547
+ const o = /* @__PURE__ */ new Date(), T = h.start.getFullYear(), S = h.start.getMonth(), Y = n.start.getFullYear(), W = n.start.getMonth();
1544
1548
  return {
1545
- [`vuecal__cell--${Ie[n.start.getDay()]}`]: h.isDay || h.isDays || h.isWeek || h.isMonth,
1546
- [`vuecal__cell--${Tt[N]}`]: h.isYear,
1547
- [`vuecal__cell--${$}`]: h.isYears,
1548
- "vuecal__cell--today": i.value,
1549
- "vuecal__cell--current-month": h.isYear && $ === c.getFullYear() && N === c.getMonth(),
1550
- "vuecal__cell--current-year": h.isYears && $ === c.getFullYear(),
1551
- "vuecal__cell--out-of-range": h.isMonth && ($ !== w || N !== S),
1549
+ [`vuecal__cell--${Re[n.start.getDay()]}`]: h.isDay || h.isDays || h.isWeek || h.isMonth,
1550
+ [`vuecal__cell--${Mt[W]}`]: h.isYear,
1551
+ [`vuecal__cell--${Y}`]: h.isYears,
1552
+ "vuecal__cell--today": u.value,
1553
+ "vuecal__cell--current-month": h.isYear && Y === o.getFullYear() && W === o.getMonth(),
1554
+ "vuecal__cell--current-year": h.isYears && Y === o.getFullYear(),
1555
+ "vuecal__cell--out-of-range": h.isMonth && (Y !== T || W !== S),
1552
1556
  "vuecal__cell--before-min": ae.value && K.value,
1553
- "vuecal__cell--after-max": ae.value && ue.value,
1557
+ "vuecal__cell--after-max": ae.value && ie.value,
1554
1558
  "vuecal__cell--disabled": ae.value,
1555
1559
  "vuecal__cell--selected": h.selectedDate && h.selectedDate.getTime() >= n.start.getTime() && h.selectedDate.getTime() <= n.end.getTime(),
1556
1560
  "vuecal__cell--has-schedules": (ee = p.schedules) == null ? void 0 : ee.length,
1557
- "vuecal__cell--dragging": u.dragging,
1561
+ "vuecal__cell--dragging": c.dragging,
1558
1562
  "vuecal__cell--has-events": l.value.length
1559
1563
  };
1560
- }), A = T(() => b.formatDate(n.start)), s = T(() => {
1564
+ }), A = M(() => k.formatDate(n.start)), s = M(() => {
1561
1565
  switch (h.id) {
1562
1566
  case "day":
1563
1567
  return "";
1564
1568
  case "days":
1565
- return p.availableViews.days.rows > 1 && b.formatDate(n.start, "D"), "";
1569
+ return p.availableViews.days.rows > 1 && k.formatDate(n.start, "D"), "";
1566
1570
  case "week":
1567
1571
  return "";
1568
1572
  case "month":
1569
- return b.formatDate(n.start, "D");
1573
+ return k.formatDate(n.start, "D");
1570
1574
  case "year":
1571
- return b.formatDate(n.start, p.xs ? "MMM" : "MMMM");
1575
+ return k.formatDate(n.start, p.xs ? "MMM" : "MMMM");
1572
1576
  case "years":
1573
- return b.formatDate(n.start, "YYYY");
1577
+ return k.formatDate(n.start, "YYYY");
1574
1578
  }
1575
- }), l = T(() => p.datePicker ? [] : H.getEventsByDate(A.value, !0, !0).filter((c) => !Y.value.includes(c._.id))), _ = T(() => l.value.filter((c) => !c.background)), t = T(() => {
1576
- var c;
1577
- return (c = p.schedules) == null ? void 0 : c.reduce((w, S) => (w[S.id] = l.value.filter(($) => $.schedule === S.id), w), {});
1578
- }), V = T(() => {
1579
- const c = {};
1580
- for (const w of l.value) {
1581
- const S = w._.id, { maxConcurrent: $ = 1, position: N = 0 } = d.value.cellOverlaps[S] || {};
1582
- c[S] = {
1583
- width: `${100 / $}%`,
1584
- left: `${100 / $ * N}%`
1579
+ }), l = M(() => p.datePicker ? [] : L.getEventsByDate(A.value, !0, !0).filter((o) => !b.value.includes(o._.id))), _ = M(() => l.value.filter((o) => !o.background)), t = M(() => {
1580
+ var o;
1581
+ return (o = p.schedules) == null ? void 0 : o.reduce((T, S) => (T[S.id] = l.value.filter((Y) => Y.schedule === S.id), T), {});
1582
+ }), C = M(() => {
1583
+ const o = {};
1584
+ for (const T of l.value) {
1585
+ const S = T._.id, { maxConcurrent: Y = 1, position: W = 0 } = f.value.cellOverlaps[S] || {};
1586
+ o[S] = {
1587
+ width: `${100 / Y}%`,
1588
+ left: `${100 / Y * W}%`
1585
1589
  };
1586
1590
  }
1587
- return c;
1588
- }), F = T(() => h.isMonth && p.eventCount && !p.eventsOnMonthView && _.value.length), J = T(() => {
1591
+ return o;
1592
+ }), F = M(() => h.isMonth && p.eventCount && !p.eventsOnMonthView && _.value.length), J = M(() => {
1589
1593
  var S;
1590
1594
  if (!p.specialHours || h.isMonth || h.isYear || h.isYears) return;
1591
- const c = Ie[n.start.getDay()];
1592
- let w = (S = p.specialHours) == null ? void 0 : S[c];
1593
- if (w)
1594
- return Array.isArray(w) || (w = [w]), w.map(($) => {
1595
- let { from: N, to: B, class: ee, label: de } = $;
1596
- if (isNaN(N) || isNaN(B) || p.timeFrom >= B || p.timeTo <= N) return;
1597
- N = Math.max(p.timeFrom, N), B = Math.min(p.timeTo, B);
1598
- const m = Ce(N, p), z = Ce(B, p) - m;
1595
+ const o = Re[n.start.getDay()];
1596
+ let T = (S = p.specialHours) == null ? void 0 : S[o];
1597
+ if (T)
1598
+ return Array.isArray(T) || (T = [T]), T.map((Y) => {
1599
+ let { from: W, to: B, class: ee, label: ye } = Y;
1600
+ if (isNaN(W) || isNaN(B) || p.timeFrom >= B || p.timeTo <= W) return;
1601
+ W = Math.max(p.timeFrom, W), B = Math.min(p.timeTo, B);
1602
+ const v = Ce(W, p), H = Ce(B, p) - v;
1599
1603
  return {
1600
- style: { top: `${m}%`, height: `${z}%` },
1601
- label: de,
1604
+ style: { top: `${v}%`, height: `${H}%` },
1605
+ label: ye,
1602
1606
  class: ee
1603
1607
  };
1604
- }).filter(($) => !!$);
1605
- }), K = T(() => p.minTimestamp !== null && p.minTimestamp > n.end.getTime()), ue = T(() => p.maxTimestamp && p.maxTimestamp < n.start.getTime()), ae = T(() => {
1606
- const { disableDays: c } = p, w = h.isYear || h.isYears;
1607
- return c.length && c.includes(b.formatDate(n.start)) && !w ? !0 : K.value || ue.value;
1608
- }), ne = Te({
1609
- show: T(() => {
1610
- if (!(!h.isDay && !h.isDays && !h.isWeek) && !(!i.value || !p.time) && !(p.timeFrom > b.dateToMinutes(h.now)) && !(b.dateToMinutes(h.now) > p.timeTo))
1608
+ }).filter((Y) => !!Y);
1609
+ }), K = M(() => p.minTimestamp !== null && p.minTimestamp > n.end.getTime()), ie = M(() => p.maxTimestamp && p.maxTimestamp < n.start.getTime()), ae = M(() => {
1610
+ const { disableDays: o } = p, T = h.isYear || h.isYears;
1611
+ return o.length && o.includes(k.formatDate(n.start)) && !T ? !0 : K.value || ie.value;
1612
+ }), re = Te({
1613
+ show: M(() => {
1614
+ if (!(!h.isDay && !h.isDays && !h.isWeek) && !(!u.value || !p.time) && !(p.timeFrom > k.dateToMinutes(h.now)) && !(k.dateToMinutes(h.now) > p.timeTo))
1611
1615
  return !0;
1612
1616
  }),
1613
- nowInMinutes: T(() => b.dateToMinutes(h.now)),
1614
- todaysTimePosition: T(() => Ce(ne.nowInMinutes, p)),
1615
- style: T(() => `top: ${ne.todaysTimePosition}%`),
1616
- currentTime: T(() => b.formatTime(h.now))
1617
- }), ge = T(() => {
1617
+ nowInMinutes: M(() => k.dateToMinutes(h.now)),
1618
+ todaysTimePosition: M(() => Ce(re.nowInMinutes, p)),
1619
+ style: M(() => `top: ${re.todaysTimePosition}%`),
1620
+ currentTime: M(() => k.formatTime(h.now))
1621
+ }), fe = M(() => {
1618
1622
  if (ae.value) return {};
1619
- const c = { ...p.eventListeners.cell };
1620
- Object.entries(c).forEach(([$, N]) => {
1621
- c[$] = (B) => {
1622
- var ee, de, m;
1623
- (m = (de = B.target || ((ee = B.e) == null ? void 0 : ee.target)).closest) != null && m.call(de, ".vuecal__event") || N(B.type ? { e: B, cell: G.value, cursor: ce.value } : B);
1623
+ const o = { ...p.eventListeners.cell };
1624
+ for (const [Y, W] of Object.entries(o))
1625
+ o[Y] = (B) => {
1626
+ var ee, ye, v;
1627
+ (v = (ye = B.target || ((ee = B.e) == null ? void 0 : ee.target)).closest) != null && v.call(ye, ".vuecal__event") || W(B.type ? { e: B, cell: G.value, cursor: Q.value } : B);
1624
1628
  };
1625
- });
1626
- const w = { ...c };
1629
+ const T = { ...o };
1627
1630
  let S = null;
1628
- return c.click = ($) => {
1629
- var N;
1630
- x(), (N = w.click) == null || N.call(w, { e: $, cell: G.value, cursor: ce.value }), S ? S = clearTimeout(S) : S = setTimeout(() => {
1631
- var B;
1632
- S = null, (B = w["delayed-click"]) == null || B.call(w, { e: $, cell: G.value, cursor: ce.value });
1631
+ return o.click = (Y) => {
1632
+ var B;
1633
+ ue();
1634
+ const W = Pe(Y);
1635
+ (B = T.click) == null || B.call(T, { e: Y, cell: G.value, cursor: W }), S ? S = clearTimeout(S) : S = setTimeout(() => {
1636
+ var ee;
1637
+ S = null, (ee = T["delayed-click"]) == null || ee.call(T, { e: Y, cell: G.value, cursor: W });
1633
1638
  }, 400);
1634
- }, (p.time && h.isDay || h.isDays || h.isWeek) && (c.touchstart = ($) => {
1635
- var N;
1636
- oe($.e || $), (N = w.touchstart) == null || N.call(w, { e: $, cell: G.value, cursor: ce.value });
1637
- }, c.mousedown = ($) => {
1638
- var N;
1639
- oe($.e || $), (N = w.mousedown) == null || N.call(w, { e: $, cell: G.value, cursor: ce.value });
1640
- }), w.dblclick && (c.dblclick = ($) => {
1641
- var X, I;
1642
- const N = (((X = $.touches) == null ? void 0 : X[0]) || $).clientY, { top: B } = f.value.getBoundingClientRect(), ee = qe(N - B, f.value), de = je(ee, p), m = new Date(n.start);
1643
- m.setMinutes(de);
1644
- const z = {
1645
- y: ee,
1646
- date: m
1647
- };
1648
- (I = w.dblclick) == null || I.call(w, { e: $, cell: G.value, cursor: z });
1649
- }), p.editableEvents.drag && (c.dragenter = ($) => v.cellDragEnter($, G.value), c.dragover = ($) => {
1650
- $.preventDefault(), v.cellDragOver($, G.value);
1651
- }, c.dragleave = ($) => v.cellDragLeave($, G.value), c.drop = ($) => v.cellDragDrop($, G.value)), c;
1652
- }), G = T(() => ({
1639
+ }, (p.time && h.isDay || h.isDays || h.isWeek) && (o.touchstart = (Y) => {
1640
+ var W;
1641
+ a(Y.e || Y), (W = T.touchstart) == null || W.call(T, { e: Y, cell: G.value, cursor: Q.value });
1642
+ }, o.mousedown = (Y) => {
1643
+ var W;
1644
+ a(Y.e || Y), (W = T.mousedown) == null || W.call(T, { e: Y, cell: G.value, cursor: Q.value });
1645
+ }), T.dblclick && (o.dblclick = (Y) => {
1646
+ var W;
1647
+ (W = T.dblclick) == null || W.call(T, { e: Y, cell: G.value, cursor: Pe(Y) });
1648
+ }), p.editableEvents.drag && (o.dragenter = (Y) => d.cellDragEnter(Y, G.value), o.dragover = (Y) => {
1649
+ Y.preventDefault(), d.cellDragOver(Y, G.value);
1650
+ }, o.dragleave = (Y) => d.cellDragLeave(Y, G.value), o.drop = (Y) => d.cellDragDrop(Y, G.value)), o;
1651
+ }), G = M(() => ({
1653
1652
  start: n.start,
1654
1653
  end: n.end,
1655
1654
  events: l,
1656
- ...u.schedule ? { schedule: u.schedule } : {},
1655
+ ...c.schedule ? { schedule: c.schedule } : {},
1657
1656
  goNarrower: () => h.narrower(),
1658
1657
  goBroader: () => h.broader(),
1659
1658
  broader: h.broaderView,
1660
1659
  narrower: h.narrowerView
1661
- })), ce = T(() => {
1662
- const c = je(u.movePercentageY || u.startPercentageY, p), w = new Date(n.start);
1663
- return w.setMinutes(c), {
1664
- x: u.movePercentageX || u.startPercentageX,
1665
- y: u.movePercentageY || u.startPercentageY,
1666
- date: w
1660
+ })), Pe = (o) => {
1661
+ var B;
1662
+ const T = (((B = o.touches) == null ? void 0 : B[0]) || o).clientY, { top: S } = m.value.getBoundingClientRect(), Y = Ze(T - S, m.value), W = new Date(n.start);
1663
+ return W.setMinutes(je(Y, p)), { y: Y, date: W };
1664
+ }, Q = M(() => {
1665
+ const o = je(c.movePercentageY || c.startPercentageY, p), T = new Date(n.start);
1666
+ return T.setMinutes(o), {
1667
+ x: c.movePercentageX || c.startPercentageX,
1668
+ y: c.movePercentageY || c.startPercentageY,
1669
+ date: T
1667
1670
  };
1668
- }), x = () => {
1671
+ }), ue = () => {
1669
1672
  h.updateSelectedDate(n.start), p.clickToNavigate && ((h.isMonth || h.isDays || h.isWeek) && p.availableViews.day ? h.switch("day") : h.isYear && p.availableViews.month ? h.switch("month") : h.isYears && p.availableViews.year && h.switch("year")), h.updateViewDate(n.start);
1670
- }, oe = (c) => {
1671
- var S, $;
1672
- u.schedule = ~~c.target.dataset.schedule;
1673
- const w = f.value.getBoundingClientRect();
1674
- u.startX = (((S = c.touches) == null ? void 0 : S[0]) || c).clientX - w.left, u.startY = ((($ = c.touches) == null ? void 0 : $[0]) || c).clientY - w.top, u.startPercentageX = u.startX * 100 / w.width, u.startPercentageY = u.startY * 100 / w.height, u.thresholdPassed = !1, document.addEventListener(c.type === "touchstart" ? "touchmove" : "mousemove", a), document.addEventListener(c.type === "touchstart" ? "touchend" : "mouseup", k, { once: !0 }), u.holdTimer = setTimeout(() => {
1675
- var N, B;
1676
- u.holding = !0, (B = (N = ge.value).hold) == null || B.call(N, { e: c, cell: G.value, cursor: ce.value });
1673
+ }, a = (o) => {
1674
+ var S, Y;
1675
+ c.schedule = ~~o.target.dataset.schedule;
1676
+ const T = m.value.getBoundingClientRect();
1677
+ c.startX = (((S = o.touches) == null ? void 0 : S[0]) || o).clientX - T.left, c.startY = (((Y = o.touches) == null ? void 0 : Y[0]) || o).clientY - T.top, c.startPercentageX = c.startX * 100 / T.width, c.startPercentageY = c.startY * 100 / T.height, c.thresholdPassed = !1, document.addEventListener(o.type === "touchstart" ? "touchmove" : "mousemove", w), document.addEventListener(o.type === "touchstart" ? "touchend" : "mouseup", y, { once: !0 }), c.holdTimer = setTimeout(() => {
1678
+ var W, B;
1679
+ c.holding = !0, (B = (W = fe.value).hold) == null || B.call(W, { e: o, cell: G.value, cursor: Q.value });
1677
1680
  }, 1e3);
1678
- }, a = (c) => {
1679
- var S, $, N, B, ee, de;
1680
- u.dragging || (C.isDraggingCell = !0, ($ = (S = ge.value).dragStart) == null || $.call(S, { e: c, cell: G.value, cursor: ce.value })), u.dragging = !0, u.holdTimer = clearTimeout(u.holdTimer), u.holding = !1;
1681
- const w = f.value.getBoundingClientRect();
1682
- u.moveX = (((N = c.touches) == null ? void 0 : N[0]) || c).clientX - w.left, u.moveY = (((B = c.touches) == null ? void 0 : B[0]) || c).clientY - w.top, u.movePercentageX = u.moveX * 100 / w.width, u.movePercentageY = u.moveY * 100 / w.height, p.eventCreateMinDrag && Math.abs(u.startY - u.moveY) > p.eventCreateMinDrag && (u.thresholdPassed = !0), (de = (ee = ge.value).drag) == null || de.call(ee, { e: c, cell: G.value, cursor: ce.value });
1683
- }, k = async (c) => {
1684
- var w, S;
1685
- document.removeEventListener(c.type === "touchend" ? "touchmove" : "mousemove", a, { passive: !1 }), u.dragging && ((S = (w = ge.value).dragEnd) == null || S.call(w, { e: c, cell: G.value, cursor: ce.value }), C.isDraggingCell = !1, p.editableEvents.create && (e.value = !0, await y(c), e.value = !1)), u.holdTimer = clearTimeout(u.holdTimer), u.holding = !1, u.dragging = !1, u.startX = 0, u.startY = 0, u.moveX = 0, u.moveY = 0, u.startPercentageX = 0, u.startPercentageY = 0, u.movePercentageX = 0, u.movePercentageY = 0, u.thresholdPassed = !1, u.schedule = null;
1686
- }, y = async (c) => {
1687
- if (!M.value) return;
1688
- let { start: w, end: S, startMinutes: $, endMinutes: N } = g.value;
1689
- w = new Date(n.start), w.setMinutes($), S = new Date(n.start), S.setMinutes(N);
1690
- let B = { ...g.value, start: w, end: S };
1681
+ }, w = (o) => {
1682
+ var S, Y, W, B, ee, ye;
1683
+ c.dragging || (j.isDraggingCell = !0, (Y = (S = fe.value).dragStart) == null || Y.call(S, { e: o, cell: G.value, cursor: Q.value })), c.dragging = !0, c.holdTimer = clearTimeout(c.holdTimer), c.holding = !1;
1684
+ const T = m.value.getBoundingClientRect();
1685
+ c.moveX = (((W = o.touches) == null ? void 0 : W[0]) || o).clientX - T.left, c.moveY = (((B = o.touches) == null ? void 0 : B[0]) || o).clientY - T.top, c.movePercentageX = c.moveX * 100 / T.width, c.movePercentageY = c.moveY * 100 / T.height, p.eventCreateMinDrag && Math.abs(c.startY - c.moveY) > p.eventCreateMinDrag && (c.thresholdPassed = !0), (ye = (ee = fe.value).drag) == null || ye.call(ee, { e: o, cell: G.value, cursor: Q.value });
1686
+ }, y = async (o) => {
1687
+ var T, S;
1688
+ document.removeEventListener(o.type === "touchend" ? "touchmove" : "mousemove", w, { passive: !1 }), c.dragging && ((S = (T = fe.value).dragEnd) == null || S.call(T, { e: o, cell: G.value, cursor: Q.value }), j.isDraggingCell = !1, p.editableEvents.create && (e.value = !0, await I(o), e.value = !1)), c.holdTimer = clearTimeout(c.holdTimer), c.holding = !1, c.dragging = !1, c.startX = 0, c.startY = 0, c.moveX = 0, c.moveY = 0, c.startPercentageX = 0, c.startPercentageY = 0, c.movePercentageX = 0, c.movePercentageY = 0, c.thresholdPassed = !1, c.schedule = null;
1689
+ }, I = async (o) => {
1690
+ if (!$.value) return;
1691
+ let { start: T, end: S, startMinutes: Y, endMinutes: W } = g.value;
1692
+ T = new Date(n.start), T.setMinutes(Y), S = new Date(n.start), S.setMinutes(W);
1693
+ let B = { ...g.value, start: T, end: S };
1691
1694
  const { create: ee } = p.eventListeners.event;
1692
1695
  if (typeof ee == "function") {
1693
- const de = B;
1694
- B = await new Promise((m) => ee({ e: c, event: B, cell: G.value, resolve: m, cursor: ce.value })), B && typeof B == "object" && h.createEvent(B), B && typeof B == "boolean" && h.createEvent(de);
1696
+ const ye = B;
1697
+ B = await new Promise((v) => ee({ e: o, event: B, cell: G.value, resolve: v, cursor: Q.value })), B && typeof B == "object" && h.createEvent(B), B && typeof B == "boolean" && h.createEvent(ye);
1695
1698
  } else h.createEvent(B);
1696
- }, R = () => {
1697
- Object.keys(ge.value).forEach((c) => {
1698
- var w;
1699
- (w = f.value) == null || w.removeEventListener(c, ge.value[c]);
1700
- });
1701
- }, Q = () => {
1702
- d.value = H.getCellOverlappingEvents(A.value);
1699
+ }, x = () => {
1700
+ var o;
1701
+ for (const T of Object.keys(fe.value))
1702
+ (o = m.value) == null || o.removeEventListener(T, fe.value[T]);
1703
+ }, ge = () => {
1704
+ f.value = L.getCellOverlappingEvents(A.value);
1703
1705
  };
1704
- return he(
1706
+ return de(
1705
1707
  // Watch event IDs and start/end dates (only) to detect event resizing/dnd.
1706
- () => _.value.map((c) => `${c._.id}${c.start.getTime()}${c.end.getTime()}`).join(),
1708
+ () => _.value.map((o) => `${o._.id}${o.start.getTime()}${o.end.getTime()}`).join(),
1707
1709
  async () => {
1708
- await Ge(), Q();
1710
+ await Ue(), ge();
1709
1711
  },
1710
1712
  { immediate: !0, flush: "post" }
1711
1713
  // Use flush: 'post' to prevent infinite updates.
1712
- ), Re(async () => {
1713
- Y.value.forEach((c) => H.deleteEvent(c, 3)), R(), await Ge();
1714
- }), (c, w) => (E(), j("div", ye({
1714
+ ), Xe(async () => {
1715
+ for (const o of b.value) L.deleteEvent(o, 3);
1716
+ x(), await Ue();
1717
+ }), (o, T) => (E(), O("div", he({
1715
1718
  class: ["vuecal__cell", P.value],
1716
1719
  ref_key: "cellEl",
1717
- ref: f
1718
- }, Be(ge.value, !0)), [
1719
- c.$slots.cell ? L(c.$slots, "cell", {
1720
+ ref: m
1721
+ }, Ie(fe.value, !0)), [
1722
+ o.$slots.cell ? z(o.$slots, "cell", {
1720
1723
  key: 0,
1721
1724
  cell: G.value
1722
1725
  }) : q("", !0),
1723
- J.value ? (E(!0), j(te, { key: 1 }, pe(J.value, (S, $) => (E(), j("div", {
1724
- class: we(["vuecal__special-hours", S.class]),
1725
- style: be(S.style),
1726
+ J.value ? (E(!0), O(te, { key: 1 }, we(J.value, (S, Y) => (E(), O("div", {
1727
+ class: _e(["vuecal__special-hours", S.class]),
1728
+ style: pe(S.style),
1726
1729
  innerHTML: S.label || ""
1727
- }, null, 14, aa))), 256)) : q("", !0),
1728
- !c.$slots.cell && O(p).schedules ? (E(!0), j(te, { key: 2 }, pe(O(p).schedules, (S) => (E(), j("div", {
1729
- class: we(["vuecal__schedule vuecal__schedule--cell", S.class]),
1730
+ }, null, 14, na))), 256)) : q("", !0),
1731
+ !o.$slots.cell && V(p).schedules ? (E(!0), O(te, { key: 2 }, we(V(p).schedules, (S) => (E(), O("div", {
1732
+ class: _e(["vuecal__schedule vuecal__schedule--cell", S.class]),
1730
1733
  key: S.id,
1731
- style: be(S.style || null),
1734
+ style: pe(S.style || null),
1732
1735
  "data-schedule": S.id
1733
1736
  }, [
1734
- c.$slots["cell-events"] ? L(c.$slots, "cell-events", {
1737
+ o.$slots["cell-events"] ? z(o.$slots, "cell-events", {
1735
1738
  key: 0,
1736
1739
  cell: G.value
1737
1740
  }) : q("", !0),
1738
- s.value || c.$slots["cell-date"] ? (E(), j("div", sa, [
1739
- L(c.$slots, "cell-date", { cell: G.value }, () => [
1740
- xe(re(s.value), 1)
1741
+ s.value || o.$slots["cell-date"] ? (E(), O("div", la, [
1742
+ z(o.$slots, "cell-date", { cell: G.value }, () => [
1743
+ et(le(s.value), 1)
1741
1744
  ])
1742
1745
  ])) : q("", !0),
1743
- c.$slots["cell-content"] ? (E(), j("div", la, [
1744
- L(c.$slots, "cell-content", { cell: G.value })
1746
+ o.$slots["cell-content"] ? (E(), O("div", ra, [
1747
+ z(o.$slots, "cell-content", { cell: G.value })
1745
1748
  ])) : q("", !0),
1746
- c.$slots["cell-events"] && l.value.length ? (E(), j("div", ra, [
1747
- L(c.$slots, "cell-events", { cell: G.value })
1748
- ])) : l.value.length || W.value ? (E(), Ee(et, {
1749
+ o.$slots["cell-events"] && l.value.length ? (E(), O("div", oa, [
1750
+ z(o.$slots, "cell-events", { cell: G.value })
1751
+ ])) : l.value.length || N.value ? (E(), Ee(tt, {
1749
1752
  key: 4,
1750
1753
  class: "vuecal__cell-events",
1751
1754
  name: "vuecal-event-delete",
1752
- onBeforeLeave: w[0] || (w[0] = ($) => W.value = !0),
1753
- onAfterLeave: o,
1755
+ onBeforeLeave: T[0] || (T[0] = (Y) => N.value = !0),
1756
+ onAfterLeave: i,
1754
1757
  tag: "div"
1755
1758
  }, {
1756
1759
  default: Z(() => [
1757
- (E(!0), j(te, null, pe(t.value[S.id], ($) => (E(), Ee(at, {
1758
- key: $._.id,
1759
- event: $,
1760
- onEventDeleted: U,
1761
- style: be(V.value[$._.id])
1760
+ (E(!0), O(te, null, we(t.value[S.id], (Y) => (E(), Ee(nt, {
1761
+ key: Y._.id,
1762
+ event: Y,
1763
+ onEventDeleted: R,
1764
+ style: pe(C.value[Y._.id])
1762
1765
  }, Oe({ _: 2 }, [
1763
- c.$slots.event ? {
1766
+ o.$slots.event ? {
1764
1767
  name: "event",
1765
- fn: Z((N) => [
1766
- L(c.$slots, "event", ye({ ref_for: !0 }, N))
1768
+ fn: Z((W) => [
1769
+ z(o.$slots, "event", he({ ref_for: !0 }, W))
1767
1770
  ]),
1768
1771
  key: "0"
1769
1772
  } : void 0
@@ -1771,46 +1774,46 @@ const nt = (D, n) => {
1771
1774
  ]),
1772
1775
  _: 2
1773
1776
  }, 1024)) : q("", !0),
1774
- M.value && u.schedule === S.id ? (E(), j("div", {
1777
+ $.value && c.schedule === S.id ? (E(), O("div", {
1775
1778
  key: 5,
1776
1779
  class: "vuecal__event-placeholder",
1777
- style: be(g.value.style)
1778
- }, re(g.value.start) + " - " + re(g.value.end), 5)) : q("", !0)
1779
- ], 14, na))), 128)) : q("", !0),
1780
- !c.$slots.cell && !O(p).schedules ? (E(), j(te, { key: 3 }, [
1781
- c.$slots["cell-events"] ? L(c.$slots, "cell-events", {
1780
+ style: pe(g.value.style)
1781
+ }, le(g.value.start) + " - " + le(g.value.end), 5)) : q("", !0)
1782
+ ], 14, sa))), 128)) : q("", !0),
1783
+ !o.$slots.cell && !V(p).schedules ? (E(), O(te, { key: 3 }, [
1784
+ o.$slots["cell-events"] ? z(o.$slots, "cell-events", {
1782
1785
  key: 0,
1783
1786
  cell: G.value
1784
1787
  }) : q("", !0),
1785
- s.value || c.$slots["cell-date"] ? (E(), j("div", oa, [
1786
- L(c.$slots, "cell-date", { cell: G.value }, () => [
1787
- xe(re(s.value), 1)
1788
+ s.value || o.$slots["cell-date"] ? (E(), O("div", ia, [
1789
+ z(o.$slots, "cell-date", { cell: G.value }, () => [
1790
+ et(le(s.value), 1)
1788
1791
  ])
1789
1792
  ])) : q("", !0),
1790
- c.$slots["cell-content"] ? (E(), j("div", ia, [
1791
- L(c.$slots, "cell-content", { cell: G.value })
1793
+ o.$slots["cell-content"] ? (E(), O("div", ua, [
1794
+ z(o.$slots, "cell-content", { cell: G.value })
1792
1795
  ])) : q("", !0),
1793
- c.$slots["cell-events"] && l.value.length ? (E(), j("div", ua, [
1794
- L(c.$slots, "cell-events", { cell: G.value })
1795
- ])) : (l.value.length || W.value) && !(O(h).isMonth && !O(p).eventsOnMonthView) ? (E(), Ee(et, {
1796
+ o.$slots["cell-events"] && l.value.length ? (E(), O("div", ca, [
1797
+ z(o.$slots, "cell-events", { cell: G.value })
1798
+ ])) : (l.value.length || N.value) && !(V(h).isMonth && !V(p).eventsOnMonthView) ? (E(), Ee(tt, {
1796
1799
  key: 4,
1797
1800
  class: "vuecal__cell-events",
1798
1801
  name: "vuecal-event-delete",
1799
- onBeforeLeave: w[1] || (w[1] = (S) => W.value = !0),
1800
- onAfterLeave: o,
1802
+ onBeforeLeave: T[1] || (T[1] = (S) => N.value = !0),
1803
+ onAfterLeave: i,
1801
1804
  tag: "div"
1802
1805
  }, {
1803
1806
  default: Z(() => [
1804
- (E(!0), j(te, null, pe(l.value, (S) => (E(), Ee(at, {
1807
+ (E(!0), O(te, null, we(l.value, (S) => (E(), Ee(nt, {
1805
1808
  key: S._.id,
1806
1809
  event: S,
1807
- onEventDeleted: U,
1808
- style: be(V.value[S._.id])
1810
+ onEventDeleted: R,
1811
+ style: pe(C.value[S._.id])
1809
1812
  }, Oe({ _: 2 }, [
1810
- c.$slots.event ? {
1813
+ o.$slots.event ? {
1811
1814
  name: "event",
1812
- fn: Z(($) => [
1813
- L(c.$slots, "event", ye({ ref_for: !0 }, $))
1815
+ fn: Z((Y) => [
1816
+ z(o.$slots, "event", he({ ref_for: !0 }, Y))
1814
1817
  ]),
1815
1818
  key: "0"
1816
1819
  } : void 0
@@ -1818,123 +1821,123 @@ const nt = (D, n) => {
1818
1821
  ]),
1819
1822
  _: 3
1820
1823
  })) : q("", !0),
1821
- M.value ? (E(), j("div", {
1824
+ $.value ? (E(), O("div", {
1822
1825
  key: 5,
1823
1826
  class: "vuecal__event-placeholder",
1824
- style: be(g.value.style)
1825
- }, re(g.value.start) + " - " + re(g.value.end), 5)) : q("", !0)
1827
+ style: pe(g.value.style)
1828
+ }, le(g.value.start) + " - " + le(g.value.end), 5)) : q("", !0)
1826
1829
  ], 64)) : q("", !0),
1827
- c.$slots["event-count"] ? L(c.$slots, "event-count", {
1830
+ o.$slots["event-count"] ? z(o.$slots, "event-count", {
1828
1831
  key: 4,
1829
1832
  events: _.value
1830
- }) : F.value ? (E(), j("div", ca, re(_.value.length), 1)) : q("", !0),
1831
- ne.show ? (E(), j("div", {
1833
+ }) : F.value ? (E(), O("div", da, le(_.value.length), 1)) : q("", !0),
1834
+ re.show ? (E(), O("div", {
1832
1835
  key: 6,
1833
1836
  class: "vuecal__now-line",
1834
- style: be(ne.style),
1835
- title: ne.currentTime
1837
+ style: pe(re.style),
1838
+ title: re.currentTime
1836
1839
  }, [
1837
- fe("span", null, re(ne.currentTime), 1)
1838
- ], 12, da)) : q("", !0)
1840
+ me("span", null, le(re.currentTime), 1)
1841
+ ], 12, va)) : q("", !0)
1839
1842
  ], 16));
1840
1843
  }
1841
- }, ma = {
1844
+ }, fa = {
1842
1845
  __name: "body",
1843
1846
  setup(D) {
1844
- const n = Le("vuecal"), { view: r, config: h, dateUtils: p } = n, b = ie(null), H = ie(null), v = T(() => ({
1847
+ const n = Ne("vuecal"), { view: r, config: h, dateUtils: p } = n, k = oe(null), L = oe(null), d = M(() => ({
1845
1848
  "--vuecal-grid-columns": r.cols,
1846
1849
  "--vuecal-grid-rows": r.rows
1847
- })), C = T(() => {
1848
- const Y = p.formatTime(je(H.value, h));
1850
+ })), j = M(() => {
1851
+ const b = p.formatTime(je(L.value, h));
1849
1852
  return {
1850
- style: { top: `${H.value}%` },
1851
- time: Y
1853
+ style: { top: `${L.value}%` },
1854
+ time: b
1852
1855
  };
1853
- }), i = (Y) => {
1854
- var o;
1856
+ }), u = (b) => {
1857
+ var i;
1855
1858
  if (r.isMonth || r.isYear || r.isYears) return;
1856
- const W = (((o = Y.touches) == null ? void 0 : o[0]) || Y).clientY, { top: U } = b.value.getBoundingClientRect();
1857
- H.value = qe(W - U, b.value);
1858
- }, f = () => {
1859
- H.value = null;
1859
+ const N = (((i = b.touches) == null ? void 0 : i[0]) || b).clientY, { top: R } = k.value.getBoundingClientRect();
1860
+ L.value = Ze(N - R, k.value);
1861
+ }, m = () => {
1862
+ L.value = null;
1860
1863
  };
1861
- return Je(() => {
1862
- b.value.addEventListener("mousemove", i), b.value.addEventListener("touchmove", i), b.value.addEventListener("mouseleave", f), b.value.addEventListener("touchend", f);
1863
- }), Re(() => {
1864
- b.value && (b.value.removeEventListener("mousemove", i), b.value.removeEventListener("touchmove", i), b.value.removeEventListener("mouseleave", f), b.value.removeEventListener("touchend", f));
1865
- }), (Y, W) => (E(), j("div", {
1864
+ return qe(() => {
1865
+ k.value.addEventListener("mousemove", u), k.value.addEventListener("touchmove", u), k.value.addEventListener("mouseleave", m), k.value.addEventListener("touchend", m);
1866
+ }), Xe(() => {
1867
+ k.value && (k.value.removeEventListener("mousemove", u), k.value.removeEventListener("touchmove", u), k.value.removeEventListener("mouseleave", m), k.value.removeEventListener("touchend", m));
1868
+ }), (b, N) => (E(), O("div", {
1866
1869
  class: "vuecal__body",
1867
1870
  ref_key: "bodyEl",
1868
- ref: b,
1869
- style: be(v.value)
1871
+ ref: k,
1872
+ style: pe(d.value)
1870
1873
  }, [
1871
- Ve(Xe, { name: "vuecal-shrink" }, {
1874
+ Ve(Ge, { name: "vuecal-shrink" }, {
1872
1875
  default: Z(() => [
1873
- O(h).timeAtCursor && H.value !== null ? (E(), j("div", {
1876
+ V(h).timeAtCursor && L.value !== null ? (E(), O("div", {
1874
1877
  key: 0,
1875
1878
  class: "vuecal__time-at-cursor",
1876
- style: be(C.value.style)
1879
+ style: pe(j.value.style)
1877
1880
  }, [
1878
- fe("label", null, re(C.value.time), 1)
1881
+ me("label", null, le(j.value.time), 1)
1879
1882
  ], 4)) : q("", !0)
1880
1883
  ]),
1881
1884
  _: 1
1882
1885
  }),
1883
- (E(!0), j(te, null, pe(O(r).cellDates, (U, o) => (E(), Ee(va, {
1884
- key: o,
1885
- start: U.start,
1886
- end: U.end,
1887
- index: o
1886
+ (E(!0), O(te, null, we(V(r).cellDates, (R, i) => (E(), Ee(ma, {
1887
+ key: i,
1888
+ start: R.start,
1889
+ end: R.end,
1890
+ index: i
1888
1891
  }, Oe({ _: 2 }, [
1889
- Y.$slots.cell ? {
1892
+ b.$slots.cell ? {
1890
1893
  name: "cell",
1891
- fn: Z((u) => [
1892
- L(Y.$slots, "cell", ye({ ref_for: !0 }, u))
1894
+ fn: Z((c) => [
1895
+ z(b.$slots, "cell", he({ ref_for: !0 }, c))
1893
1896
  ]),
1894
1897
  key: "0"
1895
1898
  } : void 0,
1896
- Y.$slots["cell-date"] ? {
1899
+ b.$slots["cell-date"] ? {
1897
1900
  name: "cell-date",
1898
- fn: Z((u) => [
1899
- L(Y.$slots, "cell-date", ye({ ref_for: !0 }, u))
1901
+ fn: Z((c) => [
1902
+ z(b.$slots, "cell-date", he({ ref_for: !0 }, c))
1900
1903
  ]),
1901
1904
  key: "1"
1902
1905
  } : void 0,
1903
- Y.$slots["cell-content"] ? {
1906
+ b.$slots["cell-content"] ? {
1904
1907
  name: "cell-content",
1905
- fn: Z((u) => [
1906
- L(Y.$slots, "cell-content", ye({ ref_for: !0 }, u))
1908
+ fn: Z((c) => [
1909
+ z(b.$slots, "cell-content", he({ ref_for: !0 }, c))
1907
1910
  ]),
1908
1911
  key: "2"
1909
1912
  } : void 0,
1910
- Y.$slots["cell-events"] ? {
1913
+ b.$slots["cell-events"] ? {
1911
1914
  name: "cell-events",
1912
- fn: Z((u) => [
1913
- L(Y.$slots, "cell-events", ye({ ref_for: !0 }, u))
1915
+ fn: Z((c) => [
1916
+ z(b.$slots, "cell-events", he({ ref_for: !0 }, c))
1914
1917
  ]),
1915
1918
  key: "3"
1916
- } : Y.$slots.event ? {
1919
+ } : b.$slots.event ? {
1917
1920
  name: "event",
1918
- fn: Z((u) => [
1919
- L(Y.$slots, "event", ye({ ref_for: !0 }, u))
1921
+ fn: Z((c) => [
1922
+ z(b.$slots, "event", he({ ref_for: !0 }, c))
1920
1923
  ]),
1921
1924
  key: "4"
1922
- } : Y.$slots["event-count"] ? {
1925
+ } : b.$slots["event-count"] ? {
1923
1926
  name: "event-count",
1924
- fn: Z((u) => [
1925
- L(Y.$slots, "event-count", ye({ ref_for: !0 }, u))
1927
+ fn: Z((c) => [
1928
+ z(b.$slots, "event-count", he({ ref_for: !0 }, c))
1926
1929
  ]),
1927
1930
  key: "5"
1928
1931
  } : void 0
1929
1932
  ]), 1032, ["start", "end", "index"]))), 128))
1930
1933
  ], 4));
1931
1934
  }
1932
- }, fa = ["data-locale"], ga = { class: "vuecal__scrollable-wrap" }, ha = {
1935
+ }, ga = ["data-locale"], ha = { class: "vuecal__scrollable-wrap" }, ya = {
1933
1936
  key: 1,
1934
1937
  class: "vuecal__week-numbers"
1935
- }, ya = { class: "vuecal__week-number" }, Da = { class: "vuecal__body-wrap" }, wa = {
1938
+ }, Da = { class: "vuecal__week-number" }, pa = { class: "vuecal__body-wrap" }, _a = {
1936
1939
  __name: "index",
1937
- props: jt,
1940
+ props: Pt,
1938
1941
  emits: [
1939
1942
  "ready",
1940
1943
  "view-change",
@@ -1947,173 +1950,173 @@ const nt = (D, n) => {
1947
1950
  "event-dropped"
1948
1951
  ],
1949
1952
  setup(D, { expose: n, emit: r }) {
1950
- const h = D, p = r, b = wt("vuecal-el"), H = Vt({ props: h, emit: p, attrs: kt(), vuecalEl: b, uid: _t() }), { config: v, view: C, dateUtils: i, touch: f } = H, Y = T(() => v.time && (C.isDay || C.isDays || C.isWeek)), W = T(() => Array(C.rows).fill().map((e, d) => i.getWeek(i.addDays(C.firstCellDate, 7 * d)))), U = T(() => {
1953
+ const h = D, p = r, k = _t("vuecal-el"), L = Ot({ props: h, emit: p, attrs: bt(), vuecalEl: k, uid: kt() }), { config: d, view: j, dateUtils: u, touch: m } = L, b = M(() => d.time && (j.isDay || j.isDays || j.isWeek)), N = M(() => Array(j.rows).fill().map((e, f) => u.getWeek(u.addDays(j.firstCellDate, 7 * f)))), R = M(() => {
1951
1954
  var e;
1952
1955
  return {
1953
- "vuecal--ready": v.ready,
1954
- [`vuecal--${v.theme}-theme`]: v.theme,
1955
- [`vuecal--${v.size}`]: !0,
1956
- "vuecal--date-picker": v.datePicker,
1957
- "vuecal--dark": v.dark,
1958
- "vuecal--light": !v.dark,
1959
- [`vuecal--${C.id}-view`]: !0,
1960
- "vuecal--view-has-time": Y.value,
1961
- "vuecal--timeless": !v.time,
1962
- "vuecal--dragging-cell": f.isDraggingCell,
1963
- "vuecal--dragging-event": f.isDraggingEvent,
1964
- "vuecal--resizing-event": f.isResizingEvent,
1965
- "vuecal--has-schedules": (e = v.schedules) == null ? void 0 : e.length
1956
+ "vuecal--ready": d.ready,
1957
+ [`vuecal--${d.theme}-theme`]: d.theme,
1958
+ [`vuecal--${d.size}`]: !0,
1959
+ "vuecal--date-picker": d.datePicker,
1960
+ "vuecal--dark": d.dark,
1961
+ "vuecal--light": !d.dark,
1962
+ [`vuecal--${j.id}-view`]: !0,
1963
+ "vuecal--view-has-time": b.value,
1964
+ "vuecal--timeless": !d.time,
1965
+ "vuecal--dragging-cell": m.isDraggingCell,
1966
+ "vuecal--dragging-event": m.isDraggingEvent,
1967
+ "vuecal--resizing-event": m.isResizingEvent,
1968
+ "vuecal--has-schedules": (e = d.schedules) == null ? void 0 : e.length
1966
1969
  };
1967
- }), o = T(() => ({
1968
- "--vuecal-time-cell-height": v.timeCellHeight && `${v.timeCellHeight}px`
1969
- })), u = T(() => {
1970
- var e, d;
1970
+ }), i = M(() => ({
1971
+ "--vuecal-time-cell-height": d.timeCellHeight && `${d.timeCellHeight}px`
1972
+ })), c = M(() => {
1973
+ var e, f;
1971
1974
  return {
1972
- "vuecal__scrollable--row": Y.value || v.weekNumbers && C.isMonth,
1975
+ "vuecal__scrollable--row": b.value || d.weekNumbers && j.isMonth,
1973
1976
  // Keep the states inside the Vue transition wrapper for smooth CSS transitions.
1974
- [`vuecal__scrollable--${C.id}-view`]: !0,
1975
- "vuecal__scrollable--has-schedules": (e = v.schedules) == null ? void 0 : e.length,
1976
- "vuecal__scrollable--no-schedules": !((d = v.schedules) != null && d.length)
1977
+ [`vuecal__scrollable--${j.id}-view`]: !0,
1978
+ "vuecal__scrollable--has-schedules": (e = d.schedules) == null ? void 0 : e.length,
1979
+ "vuecal__scrollable--no-schedules": !((f = d.schedules) != null && f.length)
1977
1980
  };
1978
1981
  });
1979
- return Je(async () => {
1980
- await Ge(), v.ready = !0, p("ready", { config: v, view: C });
1981
- }), bt("vuecal", H), n({ view: H.view }), (e, d) => (E(), j("div", {
1982
- class: we(["vuecal", U.value]),
1982
+ return qe(async () => {
1983
+ await Ue(), d.ready = !0, p("ready", { config: d, view: j });
1984
+ }), Tt("vuecal", L), n({ view: L.view }), (e, f) => (E(), O("div", {
1985
+ class: _e(["vuecal", R.value]),
1983
1986
  ref: "vuecal-el",
1984
1987
  "data-locale": e.locale,
1985
- style: be(o.value)
1988
+ style: pe(i.value)
1986
1989
  }, [
1987
- e.$slots.diy ? L(e.$slots, "diy", {
1990
+ e.$slots.diy ? z(e.$slots, "diy", {
1988
1991
  key: 0,
1989
- vuecal: O(H)
1990
- }) : (E(), j(te, { key: 1 }, [
1991
- Ve(Wt, null, Oe({ _: 2 }, [
1992
+ vuecal: V(L)
1993
+ }) : (E(), O(te, { key: 1 }, [
1994
+ Ve(At, null, Oe({ _: 2 }, [
1992
1995
  e.$slots.header ? {
1993
1996
  name: "header",
1994
1997
  fn: Z((g) => [
1995
- L(e.$slots, "header", se(le(g)))
1998
+ z(e.$slots, "header", ne(se(g)))
1996
1999
  ]),
1997
2000
  key: "0"
1998
2001
  } : void 0,
1999
2002
  !e.$slots.header && e.$slots["previous-button"] ? {
2000
2003
  name: "previous-button",
2001
2004
  fn: Z((g) => [
2002
- L(e.$slots, "previous-button", se(le(g)))
2005
+ z(e.$slots, "previous-button", ne(se(g)))
2003
2006
  ]),
2004
2007
  key: "1"
2005
2008
  } : void 0,
2006
2009
  !e.$slots.header && e.$slots["next-button"] ? {
2007
2010
  name: "next-button",
2008
2011
  fn: Z((g) => [
2009
- L(e.$slots, "next-button", se(le(g)))
2012
+ z(e.$slots, "next-button", ne(se(g)))
2010
2013
  ]),
2011
2014
  key: "2"
2012
2015
  } : void 0,
2013
2016
  !e.$slots.header && e.$slots["today-button"] ? {
2014
2017
  name: "today-button",
2015
2018
  fn: Z((g) => [
2016
- L(e.$slots, "today-button", se(le(g)))
2019
+ z(e.$slots, "today-button", ne(se(g)))
2017
2020
  ]),
2018
2021
  key: "3"
2019
2022
  } : void 0,
2020
2023
  !e.$slots.header && e.$slots.title ? {
2021
2024
  name: "title",
2022
2025
  fn: Z((g) => [
2023
- L(e.$slots, "title", se(le(g)))
2026
+ z(e.$slots, "title", ne(se(g)))
2024
2027
  ]),
2025
2028
  key: "4"
2026
2029
  } : void 0,
2027
2030
  !e.$slots.header && e.$slots["schedule-heading"] ? {
2028
2031
  name: "schedule-heading",
2029
2032
  fn: Z((g) => [
2030
- L(e.$slots, "schedule-heading", se(le(g)))
2033
+ z(e.$slots, "schedule-heading", ne(se(g)))
2031
2034
  ]),
2032
2035
  key: "5"
2033
2036
  } : void 0
2034
2037
  ]), 1024),
2035
- fe("div", ga, [
2036
- Ve(Xe, {
2037
- name: `vuecal-slide-fade--${O(C).transitionDirection}`
2038
+ me("div", ha, [
2039
+ Ve(Ge, {
2040
+ name: `vuecal-slide-fade--${V(j).transitionDirection}`
2038
2041
  }, {
2039
2042
  default: Z(() => [
2040
- (E(), j("div", {
2041
- class: we(["vuecal__scrollable", u.value]),
2042
- key: O(C).id + O(C).start.getTime()
2043
+ (E(), O("div", {
2044
+ class: _e(["vuecal__scrollable", c.value]),
2045
+ key: V(j).id + V(j).start.getTime()
2043
2046
  }, [
2044
- Y.value ? (E(), Ee(Zt, { key: 0 }, Oe({ _: 2 }, [
2047
+ b.value ? (E(), Ee(Kt, { key: 0 }, Oe({ _: 2 }, [
2045
2048
  e.$slots["time-cell"] ? {
2046
2049
  name: "time-cell",
2047
2050
  fn: Z((g) => [
2048
- L(e.$slots, "time-cell", se(le(g)))
2051
+ z(e.$slots, "time-cell", ne(se(g)))
2049
2052
  ]),
2050
2053
  key: "0"
2051
2054
  } : void 0
2052
2055
  ]), 1024)) : q("", !0),
2053
- O(v).weekNumbers && O(C).isMonth ? (E(), j("div", ha, [
2054
- (E(!0), j(te, null, pe(W.value, (g) => (E(), j("div", ya, [
2055
- L(e.$slots, "week-number", {}, () => [
2056
- fe("small", null, re(g), 1)
2056
+ V(d).weekNumbers && V(j).isMonth ? (E(), O("div", ya, [
2057
+ (E(!0), O(te, null, we(N.value, (g) => (E(), O("div", Da, [
2058
+ z(e.$slots, "week-number", {}, () => [
2059
+ me("small", null, le(g), 1)
2057
2060
  ])
2058
2061
  ]))), 256))
2059
2062
  ])) : q("", !0),
2060
- fe("div", Da, [
2061
- Ve(Jt, null, Oe({ _: 2 }, [
2063
+ me("div", pa, [
2064
+ Ve(qt, null, Oe({ _: 2 }, [
2062
2065
  e.$slots["weekday-heading"] ? {
2063
2066
  name: "weekday-heading",
2064
2067
  fn: Z((g) => [
2065
- L(e.$slots, "weekday-heading", se(le(g)))
2068
+ z(e.$slots, "weekday-heading", ne(se(g)))
2066
2069
  ]),
2067
2070
  key: "0"
2068
2071
  } : void 0,
2069
2072
  e.$slots["schedule-heading"] ? {
2070
2073
  name: "schedule-heading",
2071
2074
  fn: Z((g) => [
2072
- L(e.$slots, "schedule-heading", se(le(g)))
2075
+ z(e.$slots, "schedule-heading", ne(se(g)))
2073
2076
  ]),
2074
2077
  key: "1"
2075
2078
  } : void 0
2076
2079
  ]), 1024),
2077
- Ve(ma, null, Oe({ _: 2 }, [
2080
+ Ve(fa, null, Oe({ _: 2 }, [
2078
2081
  e.$slots.cell ? {
2079
2082
  name: "cell",
2080
2083
  fn: Z((g) => [
2081
- L(e.$slots, "cell", se(le(g)))
2084
+ z(e.$slots, "cell", ne(se(g)))
2082
2085
  ]),
2083
2086
  key: "0"
2084
2087
  } : void 0,
2085
2088
  !e.$slots.cell && e.$slots["cell-date"] ? {
2086
2089
  name: "cell-date",
2087
2090
  fn: Z((g) => [
2088
- L(e.$slots, "cell-date", se(le(g)))
2091
+ z(e.$slots, "cell-date", ne(se(g)))
2089
2092
  ]),
2090
2093
  key: "1"
2091
2094
  } : void 0,
2092
2095
  !e.$slots.cell && e.$slots["cell-content"] ? {
2093
2096
  name: "cell-content",
2094
2097
  fn: Z((g) => [
2095
- L(e.$slots, "cell-content", se(le(g)))
2098
+ z(e.$slots, "cell-content", ne(se(g)))
2096
2099
  ]),
2097
2100
  key: "2"
2098
2101
  } : void 0,
2099
2102
  !e.$slots.cell && e.$slots["cell-events"] ? {
2100
2103
  name: "cell-events",
2101
2104
  fn: Z((g) => [
2102
- L(e.$slots, "cell-events", se(le(g)))
2105
+ z(e.$slots, "cell-events", ne(se(g)))
2103
2106
  ]),
2104
2107
  key: "3"
2105
2108
  } : void 0,
2106
2109
  !e.$slots.cell && e.$slots.event ? {
2107
2110
  name: "event",
2108
2111
  fn: Z((g) => [
2109
- L(e.$slots, "event", se(le(g)))
2112
+ z(e.$slots, "event", ne(se(g)))
2110
2113
  ]),
2111
2114
  key: "4"
2112
2115
  } : void 0,
2113
2116
  !e.$slots.cell && e.$slots["event-count"] ? {
2114
2117
  name: "event-count",
2115
2118
  fn: Z((g) => [
2116
- L(e.$slots, "event-count", se(le(g)))
2119
+ z(e.$slots, "event-count", ne(se(g)))
2117
2120
  ]),
2118
2121
  key: "5"
2119
2122
  } : void 0
@@ -2125,63 +2128,63 @@ const nt = (D, n) => {
2125
2128
  }, 8, ["name"])
2126
2129
  ])
2127
2130
  ], 64))
2128
- ], 14, fa));
2131
+ ], 14, ga));
2129
2132
  }
2130
- }, _a = (D) => {
2131
- He.texts = { ...me.texts, ...D }, He.dateUtils.updateTexts(He.texts);
2133
+ }, ka = (D) => {
2134
+ ze.texts = { ...ve.texts, ...D }, ze.dateUtils.updateTexts(ze.texts);
2132
2135
  }, {
2133
- addDatePrototypes: ka,
2134
- removeDatePrototypes: ba,
2135
- updateTexts: Ta,
2136
- addDays: Ma,
2137
- subtractDays: $a,
2138
- addHours: Ya,
2139
- subtractHours: Ea,
2140
- addMinutes: Sa,
2141
- subtractMinutes: Ca,
2142
- getWeek: Va,
2143
- isToday: Oa,
2144
- isSameDate: ja,
2145
- isInRange: Pa,
2146
- isLeapYear: Fa,
2147
- getPreviousFirstDayOfWeek: za,
2148
- stringToDate: Ha,
2149
- dateToMinutes: La,
2150
- countDays: Na,
2151
- datesInSameTimeStep: Wa,
2152
- isValid: Aa,
2153
- formatDate: Ba,
2154
- formatDateLite: Ia,
2155
- formatTime: Ra,
2156
- formatTimeLite: Xa,
2157
- formatMinutes: Ua
2158
- } = He.dateUtils;
2136
+ addDatePrototypes: ba,
2137
+ removeDatePrototypes: Ta,
2138
+ updateTexts: Ma,
2139
+ addDays: $a,
2140
+ subtractDays: Ya,
2141
+ addHours: Ea,
2142
+ subtractHours: Sa,
2143
+ addMinutes: Ca,
2144
+ subtractMinutes: Va,
2145
+ getWeek: Oa,
2146
+ isToday: ja,
2147
+ isSameDate: Pa,
2148
+ isInRange: Fa,
2149
+ isLeapYear: La,
2150
+ getPreviousFirstDayOfWeek: Ha,
2151
+ stringToDate: za,
2152
+ dateToMinutes: Na,
2153
+ countDays: Wa,
2154
+ datesInSameTimeStep: Aa,
2155
+ isValid: Ba,
2156
+ formatDate: Ia,
2157
+ formatDateLite: Ra,
2158
+ formatTime: Xa,
2159
+ formatTimeLite: Ga,
2160
+ formatMinutes: Ja
2161
+ } = ze.dateUtils;
2159
2162
  export {
2160
- wa as VueCal,
2161
- ka as addDatePrototypes,
2162
- Ma as addDays,
2163
- Ya as addHours,
2164
- Sa as addMinutes,
2165
- Na as countDays,
2166
- La as dateToMinutes,
2167
- Wa as datesInSameTimeStep,
2168
- Ba as formatDate,
2169
- Ia as formatDateLite,
2170
- Ua as formatMinutes,
2171
- Ra as formatTime,
2172
- Xa as formatTimeLite,
2173
- za as getPreviousFirstDayOfWeek,
2174
- Va as getWeek,
2175
- Pa as isInRange,
2176
- Fa as isLeapYear,
2177
- ja as isSameDate,
2178
- Oa as isToday,
2179
- Aa as isValidDate,
2180
- ba as removeDatePrototypes,
2181
- Ha as stringToDate,
2182
- $a as subtractDays,
2183
- Ea as subtractHours,
2184
- Ca as subtractMinutes,
2185
- Ta as updateTexts,
2186
- _a as useLocale
2163
+ _a as VueCal,
2164
+ ba as addDatePrototypes,
2165
+ $a as addDays,
2166
+ Ea as addHours,
2167
+ Ca as addMinutes,
2168
+ Wa as countDays,
2169
+ Na as dateToMinutes,
2170
+ Aa as datesInSameTimeStep,
2171
+ Ia as formatDate,
2172
+ Ra as formatDateLite,
2173
+ Ja as formatMinutes,
2174
+ Xa as formatTime,
2175
+ Ga as formatTimeLite,
2176
+ Ha as getPreviousFirstDayOfWeek,
2177
+ Oa as getWeek,
2178
+ Fa as isInRange,
2179
+ La as isLeapYear,
2180
+ Pa as isSameDate,
2181
+ ja as isToday,
2182
+ Ba as isValidDate,
2183
+ Ta as removeDatePrototypes,
2184
+ za as stringToDate,
2185
+ Ya as subtractDays,
2186
+ Sa as subtractHours,
2187
+ Va as subtractMinutes,
2188
+ Ma as updateTexts,
2189
+ ka as useLocale
2187
2190
  };