vue-cal 4.0.1 → 4.3.0

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.
Files changed (173) hide show
  1. package/dist/drag-and-drop.amd.js +5 -0
  2. package/dist/drag-and-drop.cjs.js +5 -0
  3. package/dist/drag-and-drop.es.js +123 -0
  4. package/dist/i18n/ar.amd.js +5 -0
  5. package/dist/i18n/ar.cjs.js +5 -0
  6. package/dist/i18n/ar.es.js +8 -0
  7. package/dist/i18n/bg.amd.js +5 -0
  8. package/dist/i18n/bg.cjs.js +5 -0
  9. package/dist/i18n/bg.es.js +8 -0
  10. package/dist/i18n/bn.amd.js +5 -0
  11. package/dist/i18n/bn.cjs.js +5 -0
  12. package/dist/i18n/bn.es.js +8 -0
  13. package/dist/i18n/bs.amd.js +5 -0
  14. package/dist/i18n/bs.cjs.js +5 -0
  15. package/dist/i18n/bs.es.js +8 -0
  16. package/dist/i18n/ca.amd.js +5 -0
  17. package/dist/i18n/ca.cjs.js +5 -0
  18. package/dist/i18n/ca.es.js +8 -0
  19. package/dist/i18n/cs.amd.js +5 -0
  20. package/dist/i18n/cs.cjs.js +5 -0
  21. package/dist/i18n/cs.es.js +8 -0
  22. package/dist/i18n/da.amd.js +5 -0
  23. package/dist/i18n/da.cjs.js +5 -0
  24. package/dist/i18n/da.es.js +8 -0
  25. package/dist/i18n/de.amd.js +5 -0
  26. package/dist/i18n/de.cjs.js +5 -0
  27. package/dist/i18n/de.es.js +8 -0
  28. package/dist/i18n/el.amd.js +5 -0
  29. package/dist/i18n/el.cjs.js +5 -0
  30. package/dist/i18n/el.es.js +8 -0
  31. package/dist/i18n/en.amd.js +5 -0
  32. package/dist/i18n/en.cjs.js +5 -0
  33. package/dist/i18n/en.es.js +8 -0
  34. package/dist/i18n/es.amd.js +5 -0
  35. package/dist/i18n/es.cjs.js +5 -0
  36. package/dist/i18n/es.es.js +8 -0
  37. package/dist/i18n/fa.amd.js +5 -0
  38. package/dist/i18n/fa.cjs.js +5 -0
  39. package/dist/i18n/fa.es.js +8 -0
  40. package/dist/i18n/fr.amd.js +5 -0
  41. package/dist/i18n/fr.cjs.js +5 -0
  42. package/dist/i18n/fr.es.js +8 -0
  43. package/dist/i18n/he.amd.js +5 -0
  44. package/dist/i18n/he.cjs.js +5 -0
  45. package/dist/i18n/he.es.js +8 -0
  46. package/dist/i18n/hr.amd.js +5 -0
  47. package/dist/i18n/hr.cjs.js +5 -0
  48. package/dist/i18n/hr.es.js +8 -0
  49. package/dist/i18n/hu.amd.js +5 -0
  50. package/dist/i18n/hu.cjs.js +5 -0
  51. package/dist/i18n/hu.es.js +8 -0
  52. package/dist/i18n/id.amd.js +5 -0
  53. package/dist/i18n/id.cjs.js +5 -0
  54. package/dist/i18n/id.es.js +8 -0
  55. package/dist/i18n/is.amd.js +5 -0
  56. package/dist/i18n/is.cjs.js +5 -0
  57. package/dist/i18n/is.es.js +8 -0
  58. package/dist/i18n/it.amd.js +5 -0
  59. package/dist/i18n/it.cjs.js +5 -0
  60. package/dist/i18n/it.es.js +8 -0
  61. package/dist/i18n/ja.amd.js +5 -0
  62. package/dist/i18n/ja.cjs.js +5 -0
  63. package/dist/i18n/ja.es.js +8 -0
  64. package/dist/i18n/ka.amd.js +5 -0
  65. package/dist/i18n/ka.cjs.js +5 -0
  66. package/dist/i18n/ka.es.js +8 -0
  67. package/dist/i18n/ko.amd.js +5 -0
  68. package/dist/i18n/ko.cjs.js +5 -0
  69. package/dist/i18n/ko.es.js +8 -0
  70. package/dist/i18n/lt.amd.js +5 -0
  71. package/dist/i18n/lt.cjs.js +5 -0
  72. package/dist/i18n/lt.es.js +8 -0
  73. package/dist/i18n/mn.amd.js +5 -0
  74. package/dist/i18n/mn.cjs.js +5 -0
  75. package/dist/i18n/mn.es.js +8 -0
  76. package/dist/i18n/nl.amd.js +5 -0
  77. package/dist/i18n/nl.cjs.js +5 -0
  78. package/dist/i18n/nl.es.js +8 -0
  79. package/dist/i18n/no.amd.js +5 -0
  80. package/dist/i18n/no.cjs.js +5 -0
  81. package/dist/i18n/no.es.js +8 -0
  82. package/dist/i18n/pl.amd.js +5 -0
  83. package/dist/i18n/pl.cjs.js +5 -0
  84. package/dist/i18n/pl.es.js +8 -0
  85. package/dist/i18n/pt-br.amd.js +5 -0
  86. package/dist/i18n/pt-br.cjs.js +5 -0
  87. package/dist/i18n/pt-br.es.js +8 -0
  88. package/dist/i18n/ro.amd.js +5 -0
  89. package/dist/i18n/ro.cjs.js +5 -0
  90. package/dist/i18n/ro.es.js +8 -0
  91. package/dist/i18n/ru.amd.js +5 -0
  92. package/dist/i18n/ru.cjs.js +5 -0
  93. package/dist/i18n/ru.es.js +8 -0
  94. package/dist/i18n/sk.amd.js +5 -0
  95. package/dist/i18n/sk.cjs.js +5 -0
  96. package/dist/i18n/sk.es.js +8 -0
  97. package/dist/i18n/sl.amd.js +5 -0
  98. package/dist/i18n/sl.cjs.js +5 -0
  99. package/dist/i18n/sl.es.js +8 -0
  100. package/dist/i18n/sq.amd.js +5 -0
  101. package/dist/i18n/sq.cjs.js +5 -0
  102. package/dist/i18n/sq.es.js +8 -0
  103. package/dist/i18n/sr.amd.js +5 -0
  104. package/dist/i18n/sr.cjs.js +5 -0
  105. package/dist/i18n/sr.es.js +8 -0
  106. package/dist/i18n/sv.amd.js +5 -0
  107. package/dist/i18n/sv.cjs.js +5 -0
  108. package/dist/i18n/sv.es.js +8 -0
  109. package/dist/i18n/tr.amd.js +5 -0
  110. package/dist/i18n/tr.cjs.js +5 -0
  111. package/dist/i18n/tr.es.js +8 -0
  112. package/dist/i18n/uk.amd.js +5 -0
  113. package/dist/i18n/uk.cjs.js +5 -0
  114. package/dist/i18n/uk.es.js +8 -0
  115. package/dist/i18n/vi.amd.js +5 -0
  116. package/dist/i18n/vi.cjs.js +5 -0
  117. package/dist/i18n/vi.es.js +8 -0
  118. package/dist/i18n/zh-cn.amd.js +5 -0
  119. package/dist/i18n/zh-cn.cjs.js +5 -0
  120. package/dist/i18n/zh-cn.es.js +8 -0
  121. package/dist/i18n/zh-hk.amd.js +5 -0
  122. package/dist/i18n/zh-hk.cjs.js +5 -0
  123. package/dist/i18n/zh-hk.es.js +8 -0
  124. package/dist/vue-cal.amd.js +6 -0
  125. package/dist/vue-cal.cjs.js +6 -0
  126. package/dist/vue-cal.css +1 -0
  127. package/dist/vue-cal.es.js +1075 -0
  128. package/dist/vue-cal.iife.js +6 -0
  129. package/package.json +37 -37
  130. package/dist/drag-and-drop.js +0 -1
  131. package/dist/i18n/ar.js +0 -1
  132. package/dist/i18n/bg.js +0 -1
  133. package/dist/i18n/bn.js +0 -1
  134. package/dist/i18n/bs.js +0 -1
  135. package/dist/i18n/ca.js +0 -1
  136. package/dist/i18n/cs.js +0 -1
  137. package/dist/i18n/da.js +0 -1
  138. package/dist/i18n/de.js +0 -1
  139. package/dist/i18n/el.js +0 -1
  140. package/dist/i18n/es.js +0 -1
  141. package/dist/i18n/fa.js +0 -1
  142. package/dist/i18n/fr.js +0 -1
  143. package/dist/i18n/he.js +0 -1
  144. package/dist/i18n/hr.js +0 -1
  145. package/dist/i18n/hu.js +0 -1
  146. package/dist/i18n/id.js +0 -1
  147. package/dist/i18n/is.js +0 -1
  148. package/dist/i18n/it.js +0 -1
  149. package/dist/i18n/ja.js +0 -1
  150. package/dist/i18n/ka.js +0 -1
  151. package/dist/i18n/ko.js +0 -1
  152. package/dist/i18n/lt.js +0 -1
  153. package/dist/i18n/mn.js +0 -1
  154. package/dist/i18n/nl.js +0 -1
  155. package/dist/i18n/no.js +0 -1
  156. package/dist/i18n/pl.js +0 -1
  157. package/dist/i18n/pt-br.js +0 -1
  158. package/dist/i18n/ro.js +0 -1
  159. package/dist/i18n/ru.js +0 -1
  160. package/dist/i18n/sk.js +0 -1
  161. package/dist/i18n/sl.js +0 -1
  162. package/dist/i18n/sq.js +0 -1
  163. package/dist/i18n/sr.js +0 -1
  164. package/dist/i18n/sv.js +0 -1
  165. package/dist/i18n/tr.js +0 -1
  166. package/dist/i18n/uk.js +0 -1
  167. package/dist/i18n/vi.js +0 -1
  168. package/dist/i18n/zh-cn.js +0 -1
  169. package/dist/i18n/zh-hk.js +0 -1
  170. package/dist/vuecal.common.js +0 -11575
  171. package/dist/vuecal.css +0 -1
  172. package/dist/vuecal.umd.js +0 -11585
  173. package/dist/vuecal.umd.min.js +0 -1
@@ -0,0 +1,1075 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a2, b2) => {
9
+ for (var prop in b2 || (b2 = {}))
10
+ if (__hasOwnProp.call(b2, prop))
11
+ __defNormalProp(a2, prop, b2[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b2)) {
14
+ if (__propIsEnum.call(b2, prop))
15
+ __defNormalProp(a2, prop, b2[prop]);
16
+ }
17
+ return a2;
18
+ };
19
+ var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
20
+ var __publicField = (obj, key, value) => {
21
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
22
+ return value;
23
+ };
24
+ /*!
25
+ * vue-cal v4.3.0
26
+ * (c) 2022 Antoni Andre <antoniandre.web@gmail.com>
27
+ * @license MIT
28
+ */
29
+ import { openBlock as e, createElementBlock as t, Fragment as s, renderList as i, normalizeClass as n, normalizeStyle as a, createVNode as l, Transition as r, withCtx as o, createElementVNode as d, renderSlot as u, toDisplayString as h, createCommentVNode as c, createTextVNode as v, resolveComponent as p, createBlock as m, resolveDynamicComponent as w, createSlots as y, withKeys as D, withModifiers as g, TransitionGroup as f, normalizeProps as _, mergeProps as b } from "vue";
30
+ let k, M, T, E, C = {}, S = {};
31
+ class O {
32
+ constructor(e2) {
33
+ __publicField(this, "_vuecal", null);
34
+ __publicField(this, "selectCell", (e2 = false, t2, s2) => {
35
+ this._vuecal.$emit("cell-click", s2 ? { date: t2, split: s2 } : t2), this._vuecal.clickToNavigate || e2 ? this._vuecal.switchToNarrowerView() : this._vuecal.dblclickToNavigate && "ontouchstart" in window && (this._vuecal.domEvents.dblTapACell.taps++, setTimeout(() => this._vuecal.domEvents.dblTapACell.taps = 0, this._vuecal.domEvents.dblTapACell.timeout), this._vuecal.domEvents.dblTapACell.taps >= 2 && (this._vuecal.domEvents.dblTapACell.taps = 0, this._vuecal.switchToNarrowerView(), this._vuecal.$emit("cell-dblclick", s2 ? { date: t2, split: s2 } : t2)));
36
+ });
37
+ __publicField(this, "keyPressEnterCell", (e2, t2) => {
38
+ this._vuecal.$emit("cell-keypress-enter", t2 ? { date: e2, split: t2 } : e2), this._vuecal.switchToNarrowerView();
39
+ });
40
+ __publicField(this, "getPosition", (e2) => {
41
+ const { left: t2, top: s2 } = this._vuecal.cellsEl.getBoundingClientRect(), { clientX: i2, clientY: n2 } = "ontouchstart" in window && e2.touches ? e2.touches[0] : e2;
42
+ return { x: i2 - t2, y: n2 - s2 };
43
+ });
44
+ __publicField(this, "minutesAtCursor", (e2) => {
45
+ let t2 = 0, s2 = { x: 0, y: 0 };
46
+ const { timeStep: i2, timeCellHeight: n2, timeFrom: a2 } = this._vuecal.$props;
47
+ return typeof e2 == "number" ? t2 = e2 : typeof e2 == "object" && (s2 = this.getPosition(e2), t2 = Math.round(s2.y * i2 / parseInt(n2) + a2)), { minutes: Math.max(Math.min(t2, 1440), 0), cursorCoords: s2 };
48
+ });
49
+ this._vuecal = e2;
50
+ }
51
+ }
52
+ let $, x, H;
53
+ class W {
54
+ constructor(e2, t2) {
55
+ __publicField(this, "_vuecal", null);
56
+ __publicField(this, "eventDefaults", { _eid: null, start: "", startTimeMinutes: 0, end: "", endTimeMinutes: 0, title: "", content: "", background: false, allDay: false, segments: null, repeat: null, daysCount: 1, deletable: true, deleting: false, titleEditable: true, resizable: true, resizing: false, draggable: true, dragging: false, draggingStatic: false, focused: false, class: "" });
57
+ this._vuecal = e2, $ = t2;
58
+ }
59
+ createAnEvent(e2, t2, s2) {
60
+ if (typeof e2 == "string" && (e2 = $.stringToDate(e2)), !(e2 instanceof Date))
61
+ return false;
62
+ const i2 = $.dateToMinutes(e2), n2 = i2 + (t2 = 1 * t2 || 120), a2 = $.addMinutes(new Date(e2), t2);
63
+ s2.end && (typeof s2.end == "string" && (s2.end = $.stringToDate(s2.end)), s2.endTimeMinutes = $.dateToMinutes(s2.end));
64
+ const l2 = __spreadValues(__spreadProps(__spreadValues({}, this.eventDefaults), { _eid: `${this._vuecal._.uid}_${this._vuecal.eventIdIncrement++}`, start: e2, startTimeMinutes: i2, end: a2, endTimeMinutes: n2, segments: null }), s2);
65
+ return typeof this._vuecal.onEventCreate != "function" || this._vuecal.onEventCreate(l2, () => this.deleteAnEvent(l2)) ? (l2.startDateF !== l2.endDateF && (l2.daysCount = $.countDays(l2.start, l2.end)), this._vuecal.mutableEvents.push(l2), this._vuecal.addEventsToView([l2]), this._vuecal.emitWithEvent("event-create", l2), this._vuecal.$emit("event-change", { event: this._vuecal.cleanupEvent(l2), originalEvent: null }), l2) : void 0;
66
+ }
67
+ addEventSegment(e2) {
68
+ e2.segments || (e2.segments = {}, e2.segments[$.formatDateLite(e2.start)] = { start: e2.start, startTimeMinutes: e2.startTimeMinutes, endTimeMinutes: 1440, isFirstDay: true, isLastDay: false });
69
+ const t2 = e2.segments[$.formatDateLite(e2.end)];
70
+ t2 && (t2.isLastDay = false, t2.endTimeMinutes = 1440);
71
+ const s2 = $.addDays(e2.end, 1), i2 = $.formatDateLite(s2);
72
+ return s2.setHours(0, 0, 0, 0), e2.segments[i2] = { start: s2, startTimeMinutes: 0, endTimeMinutes: e2.endTimeMinutes, isFirstDay: false, isLastDay: true }, e2.end = $.addMinutes(s2, e2.endTimeMinutes), e2.daysCount = Object.keys(e2.segments).length, i2;
73
+ }
74
+ removeEventSegment(e2) {
75
+ let t2 = Object.keys(e2.segments).length;
76
+ if (t2 <= 1)
77
+ return $.formatDateLite(e2.end);
78
+ delete e2.segments[$.formatDateLite(e2.end)], t2--;
79
+ const s2 = $.subtractDays(e2.end, 1), i2 = $.formatDateLite(s2), n2 = e2.segments[i2];
80
+ return t2 ? n2 && (n2.isLastDay = true, n2.endTimeMinutes = e2.endTimeMinutes) : e2.segments = null, e2.daysCount = t2 || 1, e2.end = s2, i2;
81
+ }
82
+ createEventSegments(e2, t2, s2) {
83
+ const i2 = t2.getTime(), n2 = s2.getTime();
84
+ let a2, l2, r2, o2 = e2.start.getTime(), d2 = e2.end.getTime(), u2 = false;
85
+ for (e2.end.getHours() || e2.end.getMinutes() || (d2 -= 1e3), e2.segments = {}, e2.repeat ? (a2 = i2, l2 = Math.min(n2, e2.repeat.until ? $.stringToDate(e2.repeat.until).getTime() : n2)) : (a2 = Math.max(i2, o2), l2 = Math.min(n2, d2)); a2 <= l2; ) {
86
+ let t3 = false;
87
+ const s3 = $.addDays(new Date(a2), 1).setHours(0, 0, 0, 0);
88
+ let i3, n3, h2, c2;
89
+ if (e2.repeat) {
90
+ const s4 = new Date(a2), l3 = $.formatDateLite(s4);
91
+ (u2 || e2.occurrences && e2.occurrences[l3]) && (u2 || (o2 = e2.occurrences[l3].start, r2 = new Date(o2).setHours(0, 0, 0, 0), d2 = e2.occurrences[l3].end), u2 = true, t3 = true), i3 = a2 === r2, n3 = l3 === $.formatDateLite(new Date(d2)), h2 = new Date(i3 ? o2 : a2), c2 = $.formatDateLite(h2), n3 && (u2 = false);
92
+ } else
93
+ t3 = true, i3 = a2 === o2, n3 = l2 === d2 && s3 > l2, h2 = i3 ? e2.start : new Date(a2), c2 = $.formatDateLite(i3 ? e2.start : h2);
94
+ t3 && (e2.segments[c2] = { start: h2, startTimeMinutes: i3 ? e2.startTimeMinutes : 0, endTimeMinutes: n3 ? e2.endTimeMinutes : 1440, isFirstDay: i3, isLastDay: n3 }), a2 = s3;
95
+ }
96
+ return e2;
97
+ }
98
+ deleteAnEvent(e2) {
99
+ this._vuecal.emitWithEvent("event-delete", e2), this._vuecal.mutableEvents = this._vuecal.mutableEvents.filter((t2) => t2._eid !== e2._eid), this._vuecal.view.events = this._vuecal.view.events.filter((t2) => t2._eid !== e2._eid);
100
+ }
101
+ checkCellOverlappingEvents(e2, t2) {
102
+ H = e2.slice(0), x = {}, e2.forEach((e3) => {
103
+ H.shift(), x[e3._eid] || (x[e3._eid] = { overlaps: [], start: e3.start, position: 0 }), x[e3._eid].position = 0, H.forEach((s3) => {
104
+ x[s3._eid] || (x[s3._eid] = { overlaps: [], start: s3.start, position: 0 });
105
+ const i2 = this.eventInRange(s3, e3.start, e3.end), n2 = t2.overlapsPerTimeStep ? $.datesInSameTimeStep(e3.start, s3.start, t2.timeStep) : 1;
106
+ if (e3.background || e3.allDay || s3.background || s3.allDay || !i2 || !n2) {
107
+ let t3, i3;
108
+ (t3 = (x[e3._eid] || { overlaps: [] }).overlaps.indexOf(s3._eid)) > -1 && x[e3._eid].overlaps.splice(t3, 1), (i3 = (x[s3._eid] || { overlaps: [] }).overlaps.indexOf(e3._eid)) > -1 && x[s3._eid].overlaps.splice(i3, 1), x[s3._eid].position--;
109
+ } else
110
+ x[e3._eid].overlaps.push(s3._eid), x[e3._eid].overlaps = [...new Set(x[e3._eid].overlaps)], x[s3._eid].overlaps.push(e3._eid), x[s3._eid].overlaps = [...new Set(x[s3._eid].overlaps)], x[s3._eid].position++;
111
+ });
112
+ });
113
+ let s2 = 0;
114
+ for (const e3 in x) {
115
+ const t3 = x[e3], i2 = t3.overlaps.map((e4) => ({ id: e4, start: x[e4].start }));
116
+ i2.push({ id: e3, start: t3.start }), i2.sort((e4, t4) => e4.start < t4.start ? -1 : e4.start > t4.start ? 1 : e4.id > t4.id ? -1 : 1), t3.position = i2.findIndex((t4) => t4.id === e3), s2 = Math.max(this.getOverlapsStreak(t3, x), s2);
117
+ }
118
+ return [x, s2];
119
+ }
120
+ getOverlapsStreak(e2, t2 = {}) {
121
+ let s2 = e2.overlaps.length + 1, i2 = [];
122
+ return e2.overlaps.forEach((s3) => {
123
+ if (!i2.includes(s3)) {
124
+ e2.overlaps.filter((e3) => e3 !== s3).forEach((e3) => {
125
+ t2[e3].overlaps.includes(s3) || i2.push(e3);
126
+ });
127
+ }
128
+ }), i2 = [...new Set(i2)], s2 -= i2.length, s2;
129
+ }
130
+ eventInRange(e2, t2, s2) {
131
+ if (e2.allDay || !this._vuecal.time) {
132
+ const i3 = new Date(e2.start).setHours(0, 0, 0, 0);
133
+ return new Date(e2.end).setHours(23, 59, 0, 0) >= new Date(t2).setHours(0, 0, 0, 0) && i3 <= new Date(s2).setHours(0, 0, 0, 0);
134
+ }
135
+ const i2 = e2.start.getTime(), n2 = e2.end.getTime();
136
+ return i2 < s2.getTime() && n2 > t2.getTime();
137
+ }
138
+ }
139
+ const j = { class: "vuecal__flex vuecal__weekdays-headings" }, A = ["onClick"], V = { class: "vuecal__flex weekday-label", grow: "" }, Y = { class: "full" }, L = { class: "small" }, F = { class: "xsmall" }, B = { key: 0 }, N = { key: 0, class: "vuecal__flex vuecal__split-days-headers", grow: "" };
140
+ var z = (e2, t2) => {
141
+ const s2 = e2.__vccOpts || e2;
142
+ for (const [e3, i2] of t2)
143
+ s2[e3] = i2;
144
+ return s2;
145
+ };
146
+ var I = z({ inject: ["vuecal", "utils", "view"], props: { transitionDirection: { type: String, default: "right" }, weekDays: { type: Array, default: () => [] }, switchToNarrowerView: { type: Function, default: () => {
147
+ } } }, methods: { selectCell(e2, t2) {
148
+ e2.getTime() !== this.view.selectedDate.getTime() && (this.view.selectedDate = e2), this.utils.cell.selectCell(false, e2, t2);
149
+ }, cleanupHeading: (e2) => __spreadValues({ label: e2.full, date: e2.date }, e2.today ? { today: e2.today } : {}) }, computed: { headings() {
150
+ if (!["month", "week"].includes(this.view.id))
151
+ return [];
152
+ let e2 = false;
153
+ return this.weekDays.map((t2, s2) => {
154
+ const i2 = this.utils.date.addDays(this.view.startDate, s2);
155
+ return __spreadValues({ hide: t2.hide, full: t2.label, small: t2.short || t2.label.substr(0, 3), xsmall: t2.short || t2.label.substr(0, 1) }, this.view.id === "week" ? { dayOfMonth: i2.getDate(), date: i2, today: !e2 && this.utils.date.isToday(i2) && !e2++ } : {});
156
+ });
157
+ }, cellWidth() {
158
+ return 100 / (7 - this.weekDays.reduce((e2, t2) => e2 + t2.hide, 0));
159
+ }, weekdayCellStyles() {
160
+ return __spreadValues({}, this.vuecal.hideWeekdays.length ? { width: `${this.cellWidth}%` } : {});
161
+ }, cellHeadingsClickable() {
162
+ return this.view.id === "week" && (this.vuecal.clickToNavigate || this.vuecal.dblclickToNavigate);
163
+ } } }, [["render", function(p2, m2, w2, y2, D2, g2) {
164
+ return e(), t("div", j, [(e(true), t(s, null, i(g2.headings, (y3, D3) => (e(), t(s, { key: D3 }, [y3.hide ? c("", true) : (e(), t("div", { key: 0, class: n(["vuecal__flex vuecal__heading", { today: y3.today, clickable: g2.cellHeadingsClickable }]), style: a(g2.weekdayCellStyles), onClick: (e2) => g2.view.id === "week" && g2.selectCell(y3.date, e2), onDblclick: m2[0] || (m2[0] = (e2) => g2.view.id === "week" && g2.vuecal.dblclickToNavigate && w2.switchToNarrowerView()) }, [l(r, { name: `slide-fade--${w2.transitionDirection}`, appear: g2.vuecal.transitions }, { default: o(() => [(e(), t("div", { class: "vuecal__flex", column: "", key: !!g2.vuecal.transitions && `${D3}-${y3.dayOfMonth}` }, [d("div", V, [u(p2.$slots, "weekday-heading", { heading: g2.cleanupHeading(y3), view: g2.view }, () => [d("span", Y, h(y3.full), 1), d("span", L, h(y3.small), 1), d("span", F, h(y3.xsmall), 1), y3.dayOfMonth ? (e(), t("span", B, "\xA0" + h(y3.dayOfMonth), 1)) : c("", true)])]), g2.vuecal.hasSplits && g2.vuecal.stickySplitLabels ? (e(), t("div", N, [(e(true), t(s, null, i(g2.vuecal.daySplits, (s2, i2) => (e(), t("div", { class: n(["day-split-header", s2.class || false]), key: i2 }, [u(p2.$slots, "split-label", { split: s2, view: g2.view }, () => [v(h(s2.label), 1)])], 2))), 128))])) : c("", true)]))]), _: 2 }, 1032, ["name", "appear"])], 46, A))], 64))), 128))]);
165
+ }]]);
166
+ const P = { class: "vuecal__header" }, U = { key: 0, class: "vuecal__flex vuecal__menu", role: "tablist", "aria-label": "Calendar views navigation" }, R = ["onDragenter", "onDragleave", "onClick", "aria-label"], q = { key: 1, class: "vuecal__title-bar" }, K = ["aria-label"], X = { class: "vuecal__flex vuecal__title", grow: "" }, G = ["aria-label"], Z = { key: 0, class: "vuecal__flex vuecal__split-days-headers" };
167
+ var J = z({ inject: ["vuecal", "previous", "next", "switchView", "updateSelectedDate", "modules", "view"], components: { WeekdaysHeadings: I }, props: { options: { type: Object, default: () => ({}) }, editEvents: { type: Object, required: true }, hasSplits: { type: [Boolean, Number], default: false }, daySplits: { type: Array, default: () => [] }, viewProps: { type: Object, default: () => ({}) }, weekDays: { type: Array, default: () => [] }, switchToNarrowerView: { type: Function, default: () => {
168
+ } } }, data: () => ({ highlightedControl: null }), methods: { goToToday() {
169
+ this.updateSelectedDate(new Date(new Date().setHours(0, 0, 0, 0)));
170
+ }, switchToBroaderView() {
171
+ this.transitionDirection = "left", this.broaderView && this.switchView(this.broaderView);
172
+ } }, computed: { transitionDirection: { get() {
173
+ return this.vuecal.transitionDirection;
174
+ }, set(e2) {
175
+ this.vuecal.transitionDirection = e2;
176
+ } }, broaderView() {
177
+ const { enabledViews: e2 } = this.vuecal;
178
+ return e2[e2.indexOf(this.view.id) - 1];
179
+ }, showDaySplits() {
180
+ return this.view.id === "day" && this.hasSplits && this.options.stickySplitLabels && !this.options.minSplitWidth;
181
+ }, dnd() {
182
+ return this.modules.dnd;
183
+ } } }, [["render", function(a2, D2, g2, f2, _2, b2) {
184
+ const k2 = p("weekdays-headings");
185
+ return e(), t("div", P, [g2.options.hideViewSelector ? c("", true) : (e(), t("div", U, [(e(true), t(s, null, i(g2.viewProps.views, (i2, l2) => (e(), t(s, { key: l2 }, [i2.enabled ? (e(), t("button", { key: 0, class: n(["vuecal__view-btn", { "vuecal__view-btn--active": b2.view.id === l2, "vuecal__view-btn--highlighted": a2.highlightedControl === l2 }]), type: "button", onDragenter: (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragEnter(e2, l2, a2.$data), onDragleave: (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragLeave(e2, l2, a2.$data), onClick: (e2) => b2.switchView(l2, null, true), "aria-label": `${i2.label} view` }, h(i2.label), 43, R)) : c("", true)], 64))), 128))])), g2.options.hideTitleBar ? c("", true) : (e(), t("div", q, [d("button", { class: n(["vuecal__arrow vuecal__arrow--prev", { "vuecal__arrow--highlighted": a2.highlightedControl === "previous" }]), type: "button", onClick: D2[0] || (D2[0] = (...e2) => b2.previous && b2.previous(...e2)), onDragenter: D2[1] || (D2[1] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragEnter(e2, "previous", a2.$data)), onDragleave: D2[2] || (D2[2] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragLeave(e2, "previous", a2.$data)), "aria-label": `Previous ${b2.view.id}` }, [u(a2.$slots, "arrow-prev")], 42, K), d("div", X, [l(r, { name: g2.options.transitions ? `slide-fade--${b2.transitionDirection}` : "" }, { default: o(() => [(e(), m(w(b2.broaderView ? "button" : "span"), { type: !!b2.broaderView && "button", key: `${b2.view.id}${b2.view.startDate.toString()}`, onClick: D2[3] || (D2[3] = (e2) => !!b2.broaderView && b2.switchToBroaderView()), "aria-label": !!b2.broaderView && `Go to ${b2.broaderView} view` }, { default: o(() => [u(a2.$slots, "title")]), _: 3 }, 8, ["type", "aria-label"]))]), _: 3 }, 8, ["name"])]), g2.options.todayButton ? (e(), t("button", { key: 0, class: n(["vuecal__today-btn", { "vuecal__today-btn--highlighted": a2.highlightedControl === "today" }]), type: "button", onClick: D2[4] || (D2[4] = (...e2) => b2.goToToday && b2.goToToday(...e2)), onDragenter: D2[5] || (D2[5] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragEnter(e2, "today", a2.$data)), onDragleave: D2[6] || (D2[6] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragLeave(e2, "today", a2.$data)), "aria-label": "Today" }, [u(a2.$slots, "today-button")], 34)) : c("", true), d("button", { class: n(["vuecal__arrow vuecal__arrow--next", { "vuecal__arrow--highlighted": a2.highlightedControl === "next" }]), type: "button", onClick: D2[7] || (D2[7] = (...e2) => b2.next && b2.next(...e2)), onDragenter: D2[8] || (D2[8] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragEnter(e2, "next", a2.$data)), onDragleave: D2[9] || (D2[9] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragLeave(e2, "next", a2.$data)), "aria-label": `Next ${b2.view.id}` }, [u(a2.$slots, "arrow-next")], 42, G)])), g2.viewProps.weekDaysInHeader ? (e(), m(k2, { key: 2, "week-days": g2.weekDays, "transition-direction": b2.transitionDirection, "switch-to-narrower-view": g2.switchToNarrowerView }, y({ _: 2 }, [a2.$slots["weekday-heading"] ? { name: "weekday-heading", fn: o(({ heading: e2, view: t2 }) => [u(a2.$slots, "weekday-heading", { heading: e2, view: t2 })]) } : void 0, a2.$slots["split-label"] ? { name: "split-label", fn: o(({ split: e2 }) => [u(a2.$slots, "split-label", { split: e2, view: b2.view })]) } : void 0]), 1032, ["week-days", "transition-direction", "switch-to-narrower-view"])) : c("", true), l(r, { name: `slide-fade--${b2.transitionDirection}` }, { default: o(() => [b2.showDaySplits ? (e(), t("div", Z, [(e(true), t(s, null, i(g2.daySplits, (s2, i2) => (e(), t("div", { class: n(["day-split-header", s2.class || false]), key: i2 }, [u(a2.$slots, "split-label", { split: s2, view: b2.view.id }, () => [v(h(s2.label), 1)])], 2))), 128))])) : c("", true)]), _: 3 }, 8, ["name"])]);
186
+ }]]);
187
+ const Q = ["draggable"];
188
+ const ee = { inject: ["vuecal", "utils", "modules", "view", "domEvents", "editEvents"], props: { cellFormattedDate: { type: String, default: "" }, event: { type: Object, default: () => ({}) }, cellEvents: { type: Array, default: () => [] }, overlaps: { type: Array, default: () => [] }, eventPosition: { type: Number, default: 0 }, overlapsStreak: { type: Number, default: 0 }, allDay: { type: Boolean, default: false } }, data: () => ({ touch: { dragThreshold: 30, startX: 0, startY: 0, dragged: false } }), methods: { onMouseDown(e2, t2 = false) {
189
+ if ("ontouchstart" in window && !t2)
190
+ return false;
191
+ const { clickHoldAnEvent: s2, focusAnEvent: i2, resizeAnEvent: n2, dragAnEvent: a2 } = this.domEvents;
192
+ if (i2._eid === this.event._eid && s2._eid === this.event._eid)
193
+ return true;
194
+ this.focusEvent(), s2._eid = null, this.vuecal.editEvents.delete && this.event.deletable && (s2.timeoutId = setTimeout(() => {
195
+ n2._eid || a2._eid || (s2._eid = this.event._eid, this.event.deleting = true);
196
+ }, s2.timeout));
197
+ }, onMouseUp(e2) {
198
+ this.domEvents.focusAnEvent._eid !== this.event._eid || this.touch.dragged || (this.domEvents.focusAnEvent.mousedUp = true), this.touch.dragged = false;
199
+ }, onMouseEnter(e2) {
200
+ e2.preventDefault(), this.vuecal.emitWithEvent("event-mouse-enter", this.event);
201
+ }, onMouseLeave(e2) {
202
+ e2.preventDefault(), this.vuecal.emitWithEvent("event-mouse-leave", this.event);
203
+ }, onTouchMove(e2) {
204
+ if (typeof this.vuecal.onEventClick != "function")
205
+ return;
206
+ const { clientX: t2, clientY: s2 } = e2.touches[0], { startX: i2, startY: n2, dragThreshold: a2 } = this.touch;
207
+ (Math.abs(t2 - i2) > a2 || Math.abs(s2 - n2) > a2) && (this.touch.dragged = true);
208
+ }, onTouchStart(e2) {
209
+ this.touch.startX = e2.touches[0].clientX, this.touch.startY = e2.touches[0].clientY, this.onMouseDown(e2, true);
210
+ }, onEnterKeypress(e2) {
211
+ if (typeof this.vuecal.onEventClick == "function")
212
+ return this.vuecal.onEventClick(this.event, e2);
213
+ }, onDblClick(e2) {
214
+ if (typeof this.vuecal.onEventDblclick == "function")
215
+ return this.vuecal.onEventDblclick(this.event, e2);
216
+ }, onDragStart(e2) {
217
+ this.dnd && this.dnd.eventDragStart(e2, this.event);
218
+ }, onDragEnd() {
219
+ this.dnd && this.dnd.eventDragEnd(this.event);
220
+ }, onResizeHandleMouseDown() {
221
+ this.focusEvent(), this.domEvents.dragAnEvent._eid = null, this.domEvents.resizeAnEvent = Object.assign(this.domEvents.resizeAnEvent, { _eid: this.event._eid, start: (this.segment || this.event).start, split: this.event.split || null, segment: !!this.segment && this.utils.date.formatDateLite(this.segment.start), originalEnd: new Date((this.segment || this.event).end), originalEndTimeMinutes: this.event.endTimeMinutes }), this.event.resizing = true;
222
+ }, deleteEvent(e2 = false) {
223
+ if ("ontouchstart" in window && !e2)
224
+ return false;
225
+ this.utils.event.deleteAnEvent(this.event);
226
+ }, touchDeleteEvent(e2) {
227
+ this.deleteEvent(true);
228
+ }, cancelDeleteEvent() {
229
+ this.event.deleting = false;
230
+ }, focusEvent() {
231
+ const { focusAnEvent: e2 } = this.domEvents, t2 = e2._eid;
232
+ if (t2 !== this.event._eid) {
233
+ if (t2) {
234
+ const e3 = this.view.events.find((e4) => e4._eid === t2);
235
+ e3 && (e3.focused = false);
236
+ }
237
+ this.vuecal.cancelDelete(), this.vuecal.emitWithEvent("event-focus", this.event), e2._eid = this.event._eid, this.event.focused = true;
238
+ }
239
+ } }, computed: { eventDimensions() {
240
+ const { startTimeMinutes: e2, endTimeMinutes: t2 } = this.segment || this.event;
241
+ let s2 = e2 - this.vuecal.timeFrom;
242
+ const i2 = Math.max(Math.round(s2 * this.vuecal.timeCellHeight / this.vuecal.timeStep), 0);
243
+ s2 = Math.min(t2, this.vuecal.timeTo) - this.vuecal.timeFrom;
244
+ const n2 = Math.round(s2 * this.vuecal.timeCellHeight / this.vuecal.timeStep);
245
+ return { top: i2, height: Math.max(n2 - i2, 5) };
246
+ }, eventStyles() {
247
+ if (this.event.allDay || !this.vuecal.time || !this.event.endTimeMinutes || this.view.id === "month" || this.allDay)
248
+ return {};
249
+ let e2 = 100 / Math.min(this.overlaps.length + 1, this.overlapsStreak), t2 = 100 / (this.overlaps.length + 1) * this.eventPosition;
250
+ this.vuecal.minEventWidth && e2 < this.vuecal.minEventWidth && (e2 = this.vuecal.minEventWidth, t2 = (100 - this.vuecal.minEventWidth) / this.overlaps.length * this.eventPosition);
251
+ const { top: s2, height: i2 } = this.eventDimensions;
252
+ return { top: `${s2}px`, height: `${i2}px`, width: `${e2}%`, left: this.event.left && `${this.event.left}px` || `${t2}%` };
253
+ }, eventClasses() {
254
+ const { isFirstDay: e2, isLastDay: t2 } = this.segment || {};
255
+ return { [this.event.class]: !!this.event.class, "vuecal__event--focus": this.event.focused, "vuecal__event--resizing": this.event.resizing, "vuecal__event--background": this.event.background, "vuecal__event--deletable": this.event.deleting, "vuecal__event--all-day": this.event.allDay, "vuecal__event--dragging": !this.event.draggingStatic && this.event.dragging, "vuecal__event--static": this.event.dragging && this.event.draggingStatic, "vuecal__event--multiple-days": !!this.segment, "event-start": this.segment && e2 && !t2, "event-middle": this.segment && !e2 && !t2, "event-end": this.segment && t2 && !e2 };
256
+ }, segment() {
257
+ return this.event.segments && this.event.segments[this.cellFormattedDate] || null;
258
+ }, draggable() {
259
+ const { draggable: e2, background: t2, daysCount: s2 } = this.event;
260
+ return this.vuecal.editEvents.drag && e2 && !t2 && s2 === 1;
261
+ }, resizable() {
262
+ const { editEvents: e2, time: t2 } = this.vuecal;
263
+ return e2.resize && this.event.resizable && t2 && !this.allDay && (!this.segment || this.segment && this.segment.isLastDay) && this.view.id !== "month";
264
+ }, dnd() {
265
+ return this.modules.dnd;
266
+ } } };
267
+ const te = ["data-split", "aria-label", "onTouchstart", "onMousedown", "onDragover", "onDrop"], se = { key: 1, class: "vuecal__cell-events" }, ie = ["title"];
268
+ var ne = z({ inject: ["vuecal", "utils", "modules", "view", "domEvents"], components: { Event: z(ee, [["render", function(s2, i2, l2, r2, o2, d2) {
269
+ return e(), t("div", { class: n(["vuecal__event", d2.eventClasses]), style: a(d2.eventStyles), tabindex: "0", onFocus: i2[4] || (i2[4] = (...e2) => d2.focusEvent && d2.focusEvent(...e2)), onKeypress: i2[5] || (i2[5] = D(g((...e2) => d2.onEnterKeypress && d2.onEnterKeypress(...e2), ["stop"]), ["enter"])), onMouseenter: i2[6] || (i2[6] = (...e2) => d2.onMouseEnter && d2.onMouseEnter(...e2)), onMouseleave: i2[7] || (i2[7] = (...e2) => d2.onMouseLeave && d2.onMouseLeave(...e2)), onTouchstart: i2[8] || (i2[8] = g((...e2) => d2.onTouchStart && d2.onTouchStart(...e2), ["stop"])), onMousedown: i2[9] || (i2[9] = (e2) => d2.onMouseDown(e2)), onMouseup: i2[10] || (i2[10] = (...e2) => d2.onMouseUp && d2.onMouseUp(...e2)), onTouchend: i2[11] || (i2[11] = (...e2) => d2.onMouseUp && d2.onMouseUp(...e2)), onTouchmove: i2[12] || (i2[12] = (...e2) => d2.onTouchMove && d2.onTouchMove(...e2)), onDblclick: i2[13] || (i2[13] = (...e2) => d2.onDblClick && d2.onDblClick(...e2)), draggable: d2.draggable, onDragstart: i2[14] || (i2[14] = (e2) => d2.draggable && d2.onDragStart(e2)), onDragend: i2[15] || (i2[15] = (e2) => d2.draggable && d2.onDragEnd()) }, [d2.vuecal.editEvents.delete && l2.event.deletable ? (e(), t("div", { key: 0, class: "vuecal__event-delete", onClick: i2[0] || (i2[0] = g((...e2) => d2.deleteEvent && d2.deleteEvent(...e2), ["stop"])), onTouchstart: i2[1] || (i2[1] = g((...e2) => d2.touchDeleteEvent && d2.touchDeleteEvent(...e2), ["stop"])) }, h(d2.vuecal.texts.deleteEvent), 33)) : c("", true), u(s2.$slots, "event", { event: l2.event, view: d2.view.id }), d2.resizable ? (e(), t("div", { key: 1, class: "vuecal__event-resize-handle", contenteditable: "false", onMousedown: i2[2] || (i2[2] = g((...e2) => d2.onResizeHandleMouseDown && d2.onResizeHandleMouseDown(...e2), ["stop", "prevent"])), onTouchstart: i2[3] || (i2[3] = g((...e2) => d2.onResizeHandleMouseDown && d2.onResizeHandleMouseDown(...e2), ["stop", "prevent"])) }, null, 32)) : c("", true)], 46, Q);
270
+ }]]) }, props: { options: { type: Object, default: () => ({}) }, editEvents: { type: Object, required: true }, data: { type: Object, required: true }, cellSplits: { type: Array, default: () => [] }, minTimestamp: { type: [Number, null], default: null }, maxTimestamp: { type: [Number, null], default: null }, cellWidth: { type: [Number, Boolean], default: false }, allDay: { type: Boolean, default: false } }, data: () => ({ cellOverlaps: {}, cellOverlapsStreak: 1, timeAtCursor: null, highlighted: false, highlightedSplit: null }), methods: { getSplitAtCursor({ target: e2 }) {
271
+ let t2 = e2.classList.contains("vuecal__cell-split") ? e2 : this.vuecal.findAncestor(e2, "vuecal__cell-split");
272
+ return t2 && (t2 = t2.attributes["data-split"].value, parseInt(t2).toString() === t2.toString() && (t2 = parseInt(t2))), t2 || null;
273
+ }, splitClasses(e2) {
274
+ return { "vuecal__cell-split": true, "vuecal__cell-split--highlighted": this.highlightedSplit === e2.id, [e2.class]: !!e2.class };
275
+ }, checkCellOverlappingEvents() {
276
+ this.options.time && this.eventsCount && !this.splitsCount && (this.eventsCount === 1 ? (this.cellOverlaps = [], this.cellOverlapsStreak = 1) : [this.cellOverlaps, this.cellOverlapsStreak] = this.utils.event.checkCellOverlappingEvents(this.events, this.options));
277
+ }, isDOMElementAnEvent(e2) {
278
+ return this.vuecal.isDOMElementAnEvent(e2);
279
+ }, selectCell(e2, t2 = false) {
280
+ const s2 = this.splitsCount ? this.getSplitAtCursor(e2) : null;
281
+ this.utils.cell.selectCell(t2, this.timeAtCursor, s2), this.timeAtCursor = null;
282
+ }, onCellkeyPressEnter(e2) {
283
+ this.isSelected || this.onCellFocus(e2);
284
+ const t2 = this.splitsCount ? this.getSplitAtCursor(e2) : null;
285
+ this.utils.cell.keyPressEnterCell(this.timeAtCursor, t2), this.timeAtCursor = null;
286
+ }, onCellFocus(e2) {
287
+ if (!this.isSelected && !this.isDisabled) {
288
+ this.isSelected = this.data.startDate;
289
+ const t2 = this.splitsCount ? this.getSplitAtCursor(e2) : null, s2 = this.timeAtCursor || this.data.startDate;
290
+ this.vuecal.$emit("cell-focus", t2 ? { date: s2, split: t2 } : s2);
291
+ }
292
+ }, onCellMouseDown(e2, t2 = null, s2 = false) {
293
+ if ("ontouchstart" in window && !s2)
294
+ return false;
295
+ this.isSelected || this.onCellFocus(e2);
296
+ const { clickHoldACell: i2, focusAnEvent: n2 } = this.domEvents;
297
+ this.domEvents.cancelClickEventCreation = false, i2.eventCreated = false, this.timeAtCursor = new Date(this.data.startDate);
298
+ const { minutes: a2, cursorCoords: { y: l2 } } = this.vuecal.minutesAtCursor(e2);
299
+ this.timeAtCursor.setMinutes(a2);
300
+ const r2 = this.isDOMElementAnEvent(e2.target);
301
+ !r2 && n2._eid && ((this.view.events.find((e3) => e3._eid === n2._eid) || {}).focused = false), this.editEvents.create && !r2 && this.setUpEventCreation(e2, l2);
302
+ }, setUpEventCreation(e2, t2) {
303
+ if (this.options.dragToCreateEvent && ["week", "day"].includes(this.view.id)) {
304
+ const { dragCreateAnEvent: s2 } = this.domEvents;
305
+ if (s2.startCursorY = t2, s2.split = this.splitsCount ? this.getSplitAtCursor(e2) : null, s2.start = this.timeAtCursor, this.options.snapToTime) {
306
+ let e3 = 60 * this.timeAtCursor.getHours() + this.timeAtCursor.getMinutes();
307
+ const t3 = e3 + this.options.snapToTime / 2;
308
+ e3 = t3 - t3 % this.options.snapToTime, s2.start.setHours(0, e3, 0, 0);
309
+ }
310
+ } else
311
+ this.options.cellClickHold && ["month", "week", "day"].includes(this.view.id) && this.setUpCellHoldTimer(e2);
312
+ }, setUpCellHoldTimer(e2) {
313
+ const { clickHoldACell: t2 } = this.domEvents;
314
+ t2.cellId = `${this.vuecal._.uid}_${this.data.formattedDate}`, t2.split = this.splitsCount ? this.getSplitAtCursor(e2) : null, t2.timeoutId = setTimeout(() => {
315
+ if (t2.cellId && !this.domEvents.cancelClickEventCreation) {
316
+ const { _eid: e3 } = this.utils.event.createAnEvent(this.timeAtCursor, null, t2.split ? { split: t2.split } : {});
317
+ t2.eventCreated = e3;
318
+ }
319
+ }, t2.timeout);
320
+ }, onCellTouchStart(e2, t2 = null) {
321
+ this.onCellMouseDown(e2, t2, true);
322
+ }, onCellClick(e2) {
323
+ this.isDOMElementAnEvent(e2.target) || this.selectCell(e2);
324
+ }, onCellDblClick(e2) {
325
+ const t2 = new Date(this.data.startDate);
326
+ t2.setMinutes(this.vuecal.minutesAtCursor(e2).minutes);
327
+ const s2 = this.splitsCount ? this.getSplitAtCursor(e2) : null;
328
+ this.vuecal.$emit("cell-dblclick", s2 ? { date: t2, split: s2 } : t2), this.options.dblclickToNavigate && this.vuecal.switchToNarrowerView();
329
+ }, onCellContextMenu(e2) {
330
+ e2.stopPropagation(), e2.preventDefault();
331
+ const t2 = new Date(this.data.startDate), { cursorCoords: s2, minutes: i2 } = this.vuecal.minutesAtCursor(e2);
332
+ t2.setMinutes(i2);
333
+ const n2 = this.splitsCount ? this.getSplitAtCursor(e2) : null;
334
+ this.vuecal.$emit("cell-contextmenu", __spreadProps(__spreadValues(__spreadValues({ date: t2 }, s2), n2 || {}), { e: e2 }));
335
+ } }, computed: { dnd() {
336
+ return this.modules.dnd;
337
+ }, nowInMinutes() {
338
+ return this.utils.date.dateToMinutes(this.vuecal.now);
339
+ }, isBeforeMinDate() {
340
+ return this.minTimestamp !== null && this.minTimestamp > this.data.endDate.getTime();
341
+ }, isAfterMaxDate() {
342
+ return this.maxTimestamp && this.maxTimestamp < this.data.startDate.getTime();
343
+ }, isDisabled() {
344
+ const { disableDays: e2 } = this.options, { isYearsOrYearView: t2 } = this.vuecal;
345
+ return !(!e2.length || !e2.includes(this.data.formattedDate) || t2) || (this.isBeforeMinDate || this.isAfterMaxDate);
346
+ }, isSelected: { get() {
347
+ let e2 = false;
348
+ const { selectedDate: t2 } = this.view;
349
+ return e2 = this.view.id === "years" ? t2.getFullYear() === this.data.startDate.getFullYear() : this.view.id === "year" ? t2.getFullYear() === this.data.startDate.getFullYear() && t2.getMonth() === this.data.startDate.getMonth() : t2.getTime() === this.data.startDate.getTime(), e2;
350
+ }, set(e2) {
351
+ this.view.selectedDate = e2;
352
+ } }, isWeekOrDayView() {
353
+ return ["week", "day"].includes(this.view.id);
354
+ }, transitionDirection() {
355
+ return this.vuecal.transitionDirection;
356
+ }, specialHours() {
357
+ return this.data.specialHours.map((e2) => {
358
+ let { from: t2, to: s2 } = e2;
359
+ return t2 = Math.max(t2, this.options.timeFrom), s2 = Math.min(s2, this.options.timeTo), __spreadProps(__spreadValues({}, e2), { height: (s2 - t2) * this.timeScale, top: (t2 - this.options.timeFrom) * this.timeScale });
360
+ });
361
+ }, events() {
362
+ const { startDate: e2, endDate: t2 } = this.data;
363
+ let s2 = [];
364
+ if (!["years", "year"].includes(this.view.id) || this.options.eventsCountOnYearView) {
365
+ if (s2 = this.view.events.slice(0), this.view.id === "month" && s2.push(...this.view.outOfScopeEvents), s2 = s2.filter((s3) => this.utils.event.eventInRange(s3, e2, t2)), this.options.showAllDayEvents && this.view.id !== "month" && (s2 = s2.filter((e3) => !!e3.allDay === this.allDay)), this.options.time && this.isWeekOrDayView && !this.allDay) {
366
+ const { timeFrom: e3, timeTo: t3 } = this.options;
367
+ s2 = s2.filter((s3) => {
368
+ const i2 = s3.daysCount > 1 && s3.segments[this.data.formattedDate] || {}, n2 = s3.daysCount === 1 && s3.startTimeMinutes < t3 && s3.endTimeMinutes > e3, a2 = s3.daysCount > 1 && i2.startTimeMinutes < t3 && i2.endTimeMinutes > e3;
369
+ return s3.allDay || n2 || a2 || false;
370
+ });
371
+ }
372
+ !this.options.time || !this.isWeekOrDayView || this.options.showAllDayEvents && this.allDay || s2.sort((e3, t3) => e3.start < t3.start ? -1 : 1), this.cellSplits.length || this.$nextTick(this.checkCellOverlappingEvents);
373
+ }
374
+ return s2;
375
+ }, eventsCount() {
376
+ return this.events.length;
377
+ }, splits() {
378
+ return this.cellSplits.map((e2, t2) => {
379
+ const s2 = this.events.filter((t3) => t3.split === e2.id), [i2, n2] = this.utils.event.checkCellOverlappingEvents(s2.filter((e3) => !e3.background && !e3.allDay), this.options);
380
+ return __spreadProps(__spreadValues({}, e2), { overlaps: i2, overlapsStreak: n2, events: s2 });
381
+ });
382
+ }, splitsCount() {
383
+ return this.splits.length;
384
+ }, cellClasses() {
385
+ return { [this.data.class]: !!this.data.class, "vuecal__cell--current": this.data.current, "vuecal__cell--today": this.data.today, "vuecal__cell--out-of-scope": this.data.outOfScope, "vuecal__cell--before-min": this.isDisabled && this.isBeforeMinDate, "vuecal__cell--after-max": this.isDisabled && this.isAfterMaxDate, "vuecal__cell--disabled": this.isDisabled, "vuecal__cell--selected": this.isSelected, "vuecal__cell--highlighted": this.highlighted, "vuecal__cell--has-splits": this.splitsCount, "vuecal__cell--has-events": this.eventsCount };
386
+ }, cellStyles() {
387
+ return __spreadValues({}, this.cellWidth ? { width: `${this.cellWidth}%` } : {});
388
+ }, timelineVisible() {
389
+ const { time: e2, timeTo: t2 } = this.options;
390
+ return this.data.today && this.isWeekOrDayView && e2 && !this.allDay && this.nowInMinutes <= t2;
391
+ }, todaysTimePosition() {
392
+ if (!this.data.today || !this.options.time)
393
+ return;
394
+ const e2 = this.nowInMinutes - this.options.timeFrom;
395
+ return Math.round(e2 * this.timeScale);
396
+ }, timeScale() {
397
+ return this.options.timeCellHeight / this.options.timeStep;
398
+ } } }, [["render", function(l2, r2, d2, h2, v2, w2) {
399
+ const y2 = p("event");
400
+ return e(), m(f, { class: n(["vuecal__cell", w2.cellClasses]), name: `slide-fade--${w2.transitionDirection}`, tag: "div", appear: d2.options.transitions, style: a(w2.cellStyles) }, { default: o(() => [(e(true), t(s, null, i(w2.splitsCount ? w2.splits : 1, (h3, v3) => (e(), t("div", { class: n(["vuecal__flex vuecal__cell-content", w2.splitsCount && w2.splitClasses(h3)]), key: d2.options.transitions ? `${w2.view.id}-${d2.data.content}-${v3}` : v3, "data-split": !!w2.splitsCount && h3.id, column: "", tabindex: "0", "aria-label": d2.data.content, onFocus: r2[0] || (r2[0] = (e2) => w2.onCellFocus(e2)), onKeypress: r2[1] || (r2[1] = D((e2) => w2.onCellkeyPressEnter(e2), ["enter"])), onTouchstart: (e2) => !w2.isDisabled && w2.onCellTouchStart(e2, w2.splitsCount ? h3.id : null), onMousedown: (e2) => !w2.isDisabled && w2.onCellMouseDown(e2, w2.splitsCount ? h3.id : null), onClick: r2[2] || (r2[2] = (e2) => !w2.isDisabled && w2.onCellClick(e2)), onDblclick: r2[3] || (r2[3] = (e2) => !w2.isDisabled && w2.onCellDblClick(e2)), onContextmenu: r2[4] || (r2[4] = (e2) => !w2.isDisabled && d2.options.cellContextmenu && w2.onCellContextMenu(e2)), onDragenter: r2[5] || (r2[5] = (e2) => !w2.isDisabled && d2.editEvents.drag && w2.dnd && w2.dnd.cellDragEnter(e2, l2.$data, d2.data.startDate)), onDragover: (e2) => !w2.isDisabled && d2.editEvents.drag && w2.dnd && w2.dnd.cellDragOver(e2, l2.$data, d2.data.startDate, w2.splitsCount ? h3.id : null), onDragleave: r2[6] || (r2[6] = (e2) => !w2.isDisabled && d2.editEvents.drag && w2.dnd && w2.dnd.cellDragLeave(e2, l2.$data, d2.data.startDate)), onDrop: (e2) => !w2.isDisabled && d2.editEvents.drag && w2.dnd && w2.dnd.cellDragDrop(e2, l2.$data, d2.data.startDate, w2.splitsCount ? h3.id : null) }, [w2.isWeekOrDayView && !d2.allDay && w2.specialHours.length ? (e(true), t(s, { key: 0 }, i(w2.specialHours, (s2, i2) => (e(), t("div", { class: n(["vuecal__special-hours", `vuecal__special-hours--day${s2.day} ${s2.class}`]), style: a(`height: ${s2.height}px;top: ${s2.top}px`) }, null, 6))), 256)) : c("", true), u(l2.$slots, "cell-content", { events: w2.events, selectCell: (e2) => w2.selectCell(e2, true), split: !!w2.splitsCount && h3 }), w2.eventsCount && (w2.isWeekOrDayView || w2.view.id === "month" && d2.options.eventsOnMonthView) ? (e(), t("div", se, [(e(true), t(s, null, i(w2.splitsCount ? h3.events : w2.events, (t2, s2) => (e(), m(y2, { key: s2, "cell-formatted-date": d2.data.formattedDate, event: t2, "all-day": d2.allDay, "cell-events": w2.splitsCount ? h3.events : w2.events, overlaps: ((w2.splitsCount ? h3.overlaps[t2._eid] : l2.cellOverlaps[t2._eid]) || []).overlaps, "event-position": ((w2.splitsCount ? h3.overlaps[t2._eid] : l2.cellOverlaps[t2._eid]) || []).position, "overlaps-streak": w2.splitsCount ? h3.overlapsStreak : l2.cellOverlapsStreak }, { event: o(({ event: e2, view: t3 }) => [u(l2.$slots, "event", { view: t3, event: e2 })]), _: 2 }, 1032, ["cell-formatted-date", "event", "all-day", "cell-events", "overlaps", "event-position", "overlaps-streak"]))), 128))])) : c("", true)], 42, te))), 128)), w2.timelineVisible ? (e(), t("div", { class: "vuecal__now-line", style: a(`top: ${w2.todaysTimePosition}px`), key: d2.options.transitions ? `${w2.view.id}-now-line` : "now-line", title: w2.utils.date.formatTime(w2.vuecal.now) }, null, 12, ie)) : c("", true)]), _: 3 }, 8, ["class", "name", "appear", "style"]);
401
+ }]]);
402
+ const ae = { key: 0, class: "vuecal__all-day-text", style: { width: "3em" } };
403
+ var le = z({ inject: ["vuecal", "view", "editEvents"], components: { "vuecal-cell": ne }, props: { options: { type: Object, required: true }, cells: { type: Array, required: true }, label: { type: String, required: true }, daySplits: { type: Array, default: () => [] }, shortEvents: { type: Boolean, default: true }, height: { type: String, default: "" }, cellOrSplitMinWidth: { type: Number, default: null } }, computed: { hasCellOrSplitWidth() {
404
+ return !!(this.options.minCellWidth || this.daySplits.length && this.options.minSplitWidth);
405
+ } } }, [["render", function(l2, r2, v2, w2, y2, D2) {
406
+ const g2 = p("vuecal-cell");
407
+ return e(), t("div", { class: "vuecal__flex vuecal__all-day", style: a(v2.cellOrSplitMinWidth && { height: v2.height }) }, [v2.cellOrSplitMinWidth ? c("", true) : (e(), t("div", ae, [d("span", null, h(v2.label), 1)])), d("div", { class: n(["vuecal__flex vuecal__cells", `${D2.view.id}-view`]), grow: "", style: a(v2.cellOrSplitMinWidth ? `min-width: ${v2.cellOrSplitMinWidth}px` : "") }, [(e(true), t(s, null, i(v2.cells, (t2, s2) => (e(), m(g2, { key: s2, options: v2.options, "edit-events": D2.editEvents, data: t2, "all-day": true, "cell-width": v2.options.hideWeekdays.length && (D2.vuecal.isWeekView || D2.vuecal.isMonthView) && D2.vuecal.cellWidth, "min-timestamp": v2.options.minTimestamp, "max-timestamp": v2.options.maxTimestamp, "cell-splits": v2.daySplits }, { event: o(({ event: e2, view: t3 }) => [u(l2.$slots, "event", { view: t3, event: e2 })]), _: 2 }, 1032, ["options", "edit-events", "data", "cell-width", "min-timestamp", "max-timestamp", "cell-splits"]))), 128))], 6)], 4);
408
+ }]]);
409
+ const re = ["lang"], oe = v("\xA0"), de = d("i", { class: "angle" }, null, -1), ue = v("\xA0"), he = v("\xA0"), ce = d("i", { class: "angle" }, null, -1), ve = v("\xA0"), pe = { class: "default" }, me = { key: 0, class: "vuecal__flex vuecal__body", grow: "" }, we = ["onBlur", "innerHTML"], ye = ["innerHTML"], De = ["innerHTML"], ge = { class: "vuecal__flex", row: "", grow: "" }, fe = { key: 0, class: "vuecal__time-column" }, _e = d("span", { class: "vuecal__time-cell-line" }, null, -1), be = { class: "vuecal__time-cell-label" }, ke = { key: 1, class: "vuecal__flex vuecal__week-numbers", column: "" }, Me = ["wrap", "column"], Te = ["onBlur", "innerHTML"], Ee = ["innerHTML"], Ce = ["innerHTML"], Se = ["wrap"], Oe = ["innerHTML"], $e = ["innerHTML"], xe = { key: 2, class: "vuecal__cell-events-count" }, He = { key: 3, class: "vuecal__no-event" }, We = ["onBlur", "innerHTML"], je = ["innerHTML"], Ae = { key: 2, class: "vuecal__event-time" }, Ve = { key: 0 }, Ye = { key: 1, class: "days-to-end" }, Le = ["innerHTML"], Fe = { key: 0, class: "vuecal__scrollbar-check" }, Be = [d("div", null, null, -1)];
410
+ const Ne = { weekDays: Array(7).fill(""), weekDaysShort: [], months: Array(12).fill(""), years: "", year: "", month: "", week: "", day: "", today: "", noEvent: "", allDay: "", deleteEvent: "", createEvent: "", dateFormat: "dddd MMMM D, YYYY", am: "am", pm: "pm" }, ze = ["years", "year", "month", "week", "day"], Ie = new class {
411
+ constructor(e2, t2 = false) {
412
+ __publicField(this, "texts", {});
413
+ __publicField(this, "dateToMinutes", (e2) => 60 * e2.getHours() + e2.getMinutes());
414
+ E = this, this._texts = e2, t2 || !Date || Date.prototype.addDays || this._initDatePrototypes();
415
+ }
416
+ _initDatePrototypes() {
417
+ Date.prototype.addDays = function(e2) {
418
+ return E.addDays(this, e2);
419
+ }, Date.prototype.subtractDays = function(e2) {
420
+ return E.subtractDays(this, e2);
421
+ }, Date.prototype.addHours = function(e2) {
422
+ return E.addHours(this, e2);
423
+ }, Date.prototype.subtractHours = function(e2) {
424
+ return E.subtractHours(this, e2);
425
+ }, Date.prototype.addMinutes = function(e2) {
426
+ return E.addMinutes(this, e2);
427
+ }, Date.prototype.subtractMinutes = function(e2) {
428
+ return E.subtractMinutes(this, e2);
429
+ }, Date.prototype.getWeek = function() {
430
+ return E.getWeek(this);
431
+ }, Date.prototype.isToday = function() {
432
+ return E.isToday(this);
433
+ }, Date.prototype.isLeapYear = function() {
434
+ return E.isLeapYear(this);
435
+ }, Date.prototype.format = function(e2 = "YYYY-MM-DD") {
436
+ return E.formatDate(this, e2);
437
+ }, Date.prototype.formatTime = function(e2 = "HH:mm") {
438
+ return E.formatTime(this, e2);
439
+ };
440
+ }
441
+ removePrototypes() {
442
+ 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;
443
+ }
444
+ updateTexts(e2) {
445
+ this._texts = e2;
446
+ }
447
+ _todayFormatted() {
448
+ return M !== new Date().getDate() && (k = new Date(), M = k.getDate(), T = `${k.getFullYear()}-${k.getMonth()}-${k.getDate()}`), T;
449
+ }
450
+ addDays(e2, t2) {
451
+ const s2 = new Date(e2.valueOf());
452
+ return s2.setDate(s2.getDate() + t2), s2;
453
+ }
454
+ subtractDays(e2, t2) {
455
+ const s2 = new Date(e2.valueOf());
456
+ return s2.setDate(s2.getDate() - t2), s2;
457
+ }
458
+ addHours(e2, t2) {
459
+ const s2 = new Date(e2.valueOf());
460
+ return s2.setHours(s2.getHours() + t2), s2;
461
+ }
462
+ subtractHours(e2, t2) {
463
+ const s2 = new Date(e2.valueOf());
464
+ return s2.setHours(s2.getHours() - t2), s2;
465
+ }
466
+ addMinutes(e2, t2) {
467
+ const s2 = new Date(e2.valueOf());
468
+ return s2.setMinutes(s2.getMinutes() + t2), s2;
469
+ }
470
+ subtractMinutes(e2, t2) {
471
+ const s2 = new Date(e2.valueOf());
472
+ return s2.setMinutes(s2.getMinutes() - t2), s2;
473
+ }
474
+ getWeek(e2) {
475
+ const t2 = new Date(Date.UTC(e2.getFullYear(), e2.getMonth(), e2.getDate())), s2 = t2.getUTCDay() || 7;
476
+ t2.setUTCDate(t2.getUTCDate() + 4 - s2);
477
+ const i2 = new Date(Date.UTC(t2.getUTCFullYear(), 0, 1));
478
+ return Math.ceil(((t2 - i2) / 864e5 + 1) / 7);
479
+ }
480
+ isToday(e2) {
481
+ return `${e2.getFullYear()}-${e2.getMonth()}-${e2.getDate()}` === this._todayFormatted();
482
+ }
483
+ isLeapYear(e2) {
484
+ const t2 = e2.getFullYear();
485
+ return !(t2 % 400) || t2 % 100 && !(t2 % 4);
486
+ }
487
+ getPreviousFirstDayOfWeek(e2 = null, t2) {
488
+ const s2 = e2 && new Date(e2.valueOf()) || new Date(), i2 = t2 ? 7 : 6;
489
+ return s2.setDate(s2.getDate() - (s2.getDay() + i2) % 7), s2;
490
+ }
491
+ stringToDate(e2) {
492
+ return e2 instanceof Date ? e2 : (e2.length === 10 && (e2 += " 00:00"), new Date(e2.replace(/-/g, "/")));
493
+ }
494
+ countDays(e2, t2) {
495
+ typeof e2 == "string" && (e2 = e2.replace(/-/g, "/")), typeof t2 == "string" && (t2 = t2.replace(/-/g, "/")), e2 = new Date(e2).setHours(0, 0, 0, 0), t2 = new Date(t2).setHours(0, 0, 1, 0);
496
+ const s2 = 60 * (new Date(t2).getTimezoneOffset() - new Date(e2).getTimezoneOffset()) * 1e3;
497
+ return Math.ceil((t2 - e2 - s2) / 864e5);
498
+ }
499
+ datesInSameTimeStep(e2, t2, s2) {
500
+ return Math.abs(e2.getTime() - t2.getTime()) <= 60 * s2 * 1e3;
501
+ }
502
+ formatDate(e2, t2 = "YYYY-MM-DD", s2 = null) {
503
+ if (s2 || (s2 = this._texts), t2 || (t2 = "YYYY-MM-DD"), t2 === "YYYY-MM-DD")
504
+ return this.formatDateLite(e2);
505
+ C = {}, S = {};
506
+ const i2 = { YYYY: () => this._hydrateDateObject(e2, s2).YYYY, YY: () => this._hydrateDateObject(e2, s2).YY(), M: () => this._hydrateDateObject(e2, s2).M, MM: () => this._hydrateDateObject(e2, s2).MM(), MMM: () => this._hydrateDateObject(e2, s2).MMM(), MMMM: () => this._hydrateDateObject(e2, s2).MMMM(), MMMMG: () => this._hydrateDateObject(e2, s2).MMMMG(), D: () => this._hydrateDateObject(e2, s2).D, DD: () => this._hydrateDateObject(e2, s2).DD(), S: () => this._hydrateDateObject(e2, s2).S(), d: () => this._hydrateDateObject(e2, s2).d, dd: () => this._hydrateDateObject(e2, s2).dd(), ddd: () => this._hydrateDateObject(e2, s2).ddd(), dddd: () => this._hydrateDateObject(e2, s2).dddd(), HH: () => this._hydrateTimeObject(e2, s2).HH, H: () => this._hydrateTimeObject(e2, s2).H, hh: () => this._hydrateTimeObject(e2, s2).hh, h: () => this._hydrateTimeObject(e2, s2).h, am: () => this._hydrateTimeObject(e2, s2).am, AM: () => this._hydrateTimeObject(e2, s2).AM, mm: () => this._hydrateTimeObject(e2, s2).mm, m: () => this._hydrateTimeObject(e2, s2).m };
507
+ return t2.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (e3, t3) => {
508
+ const s3 = i2[t3.replace(/\{|\}/g, "")];
509
+ return s3 !== void 0 ? s3() : t3;
510
+ });
511
+ }
512
+ formatDateLite(e2) {
513
+ const t2 = e2.getMonth() + 1, s2 = e2.getDate();
514
+ return `${e2.getFullYear()}-${t2 < 10 ? "0" : ""}${t2}-${s2 < 10 ? "0" : ""}${s2}`;
515
+ }
516
+ formatTime(e2, t2 = "HH:mm", s2 = null, i2 = false) {
517
+ let n2 = false;
518
+ if (i2) {
519
+ const [t3, s3, i3] = [e2.getHours(), e2.getMinutes(), e2.getSeconds()];
520
+ t3 + s3 + i3 === 141 && (n2 = true);
521
+ }
522
+ if (e2 instanceof Date && t2 === "HH:mm")
523
+ return n2 ? "24:00" : this.formatTimeLite(e2);
524
+ S = {}, s2 || (s2 = this._texts);
525
+ const a2 = this._hydrateTimeObject(e2, s2), l2 = t2.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (e3, t3) => {
526
+ const s3 = a2[t3.replace(/\{|\}/g, "")];
527
+ return s3 !== void 0 ? s3 : t3;
528
+ });
529
+ return n2 ? l2.replace("23:59", "24:00") : l2;
530
+ }
531
+ formatTimeLite(e2) {
532
+ const t2 = e2.getHours(), s2 = e2.getMinutes();
533
+ return `${(t2 < 10 ? "0" : "") + t2}:${(s2 < 10 ? "0" : "") + s2}`;
534
+ }
535
+ _nth(e2) {
536
+ if (e2 > 3 && e2 < 21)
537
+ return "th";
538
+ switch (e2 % 10) {
539
+ case 1:
540
+ return "st";
541
+ case 2:
542
+ return "nd";
543
+ case 3:
544
+ return "rd";
545
+ default:
546
+ return "th";
547
+ }
548
+ }
549
+ _hydrateDateObject(e2, t2) {
550
+ if (C.D)
551
+ return C;
552
+ const s2 = e2.getFullYear(), i2 = e2.getMonth() + 1, n2 = e2.getDate(), a2 = (e2.getDay() - 1 + 7) % 7;
553
+ return C = { YYYY: s2, YY: () => s2.toString().substring(2), M: i2, MM: () => (i2 < 10 ? "0" : "") + i2, MMM: () => t2.months[i2 - 1].substring(0, 3), MMMM: () => t2.months[i2 - 1], MMMMG: () => (t2.monthsGenitive || t2.months)[i2 - 1], D: n2, DD: () => (n2 < 10 ? "0" : "") + n2, S: () => this._nth(n2), d: a2 + 1, dd: () => t2.weekDays[a2][0], ddd: () => t2.weekDays[a2].substr(0, 3), dddd: () => t2.weekDays[a2] }, C;
554
+ }
555
+ _hydrateTimeObject(e2, t2) {
556
+ if (S.am)
557
+ return S;
558
+ let s2, i2;
559
+ e2 instanceof Date ? (s2 = e2.getHours(), i2 = e2.getMinutes()) : (s2 = Math.floor(e2 / 60), i2 = Math.floor(e2 % 60));
560
+ const n2 = s2 % 12 ? s2 % 12 : 12, a2 = (t2 || { am: "am", pm: "pm" })[s2 === 24 || s2 < 12 ? "am" : "pm"];
561
+ return S = { H: s2, h: n2, HH: (s2 < 10 ? "0" : "") + s2, hh: (n2 < 10 ? "0" : "") + n2, am: a2, AM: a2.toUpperCase(), m: i2, mm: (i2 < 10 ? "0" : "") + i2 }, S;
562
+ }
563
+ }(Ne), Pe = { name: "vue-cal", components: { "vuecal-cell": ne, "vuecal-header": J, WeekdaysHeadings: I, AllDayBar: le }, provide() {
564
+ return { vuecal: this, utils: this.utils, modules: this.modules, previous: this.previous, next: this.next, switchView: this.switchView, updateSelectedDate: this.updateSelectedDate, editEvents: this.editEvents, view: this.view, domEvents: this.domEvents };
565
+ }, props: { activeView: { type: String, default: "week" }, allDayBarHeight: { type: [String, Number], default: "25px" }, cellClickHold: { type: Boolean, default: true }, cellContextmenu: { type: Boolean, default: false }, clickToNavigate: { type: Boolean, default: false }, dblclickToNavigate: { type: Boolean, default: true }, disableDatePrototypes: { type: Boolean, default: false }, disableDays: { type: Array, default: () => [] }, disableViews: { type: Array, default: () => [] }, dragToCreateEvent: { type: Boolean, default: true }, dragToCreateThreshold: { type: Number, default: 15 }, editableEvents: { type: [Boolean, Object], default: false }, events: { type: Array, default: () => [] }, eventsCountOnYearView: { type: Boolean, default: false }, eventsOnMonthView: { type: [Boolean, String], default: false }, hideBody: { type: Boolean, default: false }, hideTitleBar: { type: Boolean, default: false }, hideViewSelector: { type: Boolean, default: false }, hideWeekdays: { type: Array, default: () => [] }, hideWeekends: { type: Boolean, default: false }, locale: { type: [String, Object], default: "en" }, maxDate: { type: [String, Date], default: "" }, minCellWidth: { type: Number, default: 0 }, minDate: { type: [String, Date], default: "" }, minEventWidth: { type: Number, default: 0 }, minSplitWidth: { type: Number, default: 0 }, onEventClick: { type: [Function, null], default: null }, onEventCreate: { type: [Function, null], default: null }, onEventDblclick: { type: [Function, null], default: null }, overlapsPerTimeStep: { type: Boolean, default: false }, resizeX: { type: Boolean, default: false }, selectedDate: { type: [String, Date], default: "" }, showAllDayEvents: { type: [Boolean, String], default: false }, showWeekNumbers: { type: [Boolean, String], default: false }, snapToTime: { type: Number, default: 0 }, small: { type: Boolean, default: false }, specialHours: { type: Object, default: () => ({}) }, splitDays: { type: Array, default: () => [] }, startWeekOnSunday: { type: Boolean, default: false }, stickySplitLabels: { type: Boolean, default: false }, time: { type: Boolean, default: true }, timeCellHeight: { type: Number, default: 40 }, timeFormat: { type: String, default: "" }, timeFrom: { type: Number, default: 0 }, timeStep: { type: Number, default: 60 }, timeTo: { type: Number, default: 1440 }, todayButton: { type: Boolean, default: false }, transitions: { type: Boolean, default: true }, twelveHour: { type: Boolean, default: false }, watchRealTime: { type: Boolean, default: false }, xsmall: { type: Boolean, default: false } }, data() {
566
+ return { ready: false, texts: __spreadValues({}, Ne), utils: { date: !!this.disableDatePrototypes && Ie.removePrototypes() || Ie, cell: null, event: null }, modules: { dnd: null }, cellsEl: null, view: { id: "", title: "", startDate: null, endDate: null, firstCellDate: null, lastCellDate: null, selectedDate: null, events: [] }, eventIdIncrement: 1, now: new Date(), timeTickerIds: [null, null], domEvents: { resizeAnEvent: { _eid: null, start: null, split: null, segment: null, originalEndTimeMinutes: 0, originalEnd: null, end: null, startCell: null, endCell: null }, dragAnEvent: { _eid: null }, dragCreateAnEvent: { startCursorY: null, start: null, split: null, event: null }, focusAnEvent: { _eid: null, mousedUp: false }, clickHoldAnEvent: { _eid: null, timeout: 1200, timeoutId: null }, dblTapACell: { taps: 0, timeout: 500 }, clickHoldACell: { cellId: null, split: null, timeout: 1200, timeoutId: null, eventCreated: false }, cancelClickEventCreation: false }, mutableEvents: [], transitionDirection: "right" };
567
+ }, methods: { async loadLocale(e2) {
568
+ if (typeof this.locale == "object")
569
+ return this.texts = Object.assign({}, Ne, e2), void this.utils.date.updateTexts(this.texts);
570
+ if (this.locale === "en") {
571
+ const e3 = await import("./i18n/en.es.js");
572
+ this.texts = Object.assign({}, Ne, e3);
573
+ } else
574
+ (function(e3) {
575
+ switch (e3) {
576
+ case "./i18n/ar.json":
577
+ return import("./i18n/ar.es.js");
578
+ case "./i18n/bg.json":
579
+ return import("./i18n/bg.es.js");
580
+ case "./i18n/bn.json":
581
+ return import("./i18n/bn.es.js");
582
+ case "./i18n/bs.json":
583
+ return import("./i18n/bs.es.js");
584
+ case "./i18n/ca.json":
585
+ return import("./i18n/ca.es.js");
586
+ case "./i18n/cs.json":
587
+ return import("./i18n/cs.es.js");
588
+ case "./i18n/da.json":
589
+ return import("./i18n/da.es.js");
590
+ case "./i18n/de.json":
591
+ return import("./i18n/de.es.js");
592
+ case "./i18n/el.json":
593
+ return import("./i18n/el.es.js");
594
+ case "./i18n/en.json":
595
+ return import("./i18n/en.es.js");
596
+ case "./i18n/es.json":
597
+ return import("./i18n/es.es.js");
598
+ case "./i18n/fa.json":
599
+ return import("./i18n/fa.es.js");
600
+ case "./i18n/fr.json":
601
+ return import("./i18n/fr.es.js");
602
+ case "./i18n/he.json":
603
+ return import("./i18n/he.es.js");
604
+ case "./i18n/hr.json":
605
+ return import("./i18n/hr.es.js");
606
+ case "./i18n/hu.json":
607
+ return import("./i18n/hu.es.js");
608
+ case "./i18n/id.json":
609
+ return import("./i18n/id.es.js");
610
+ case "./i18n/is.json":
611
+ return import("./i18n/is.es.js");
612
+ case "./i18n/it.json":
613
+ return import("./i18n/it.es.js");
614
+ case "./i18n/ja.json":
615
+ return import("./i18n/ja.es.js");
616
+ case "./i18n/ka.json":
617
+ return import("./i18n/ka.es.js");
618
+ case "./i18n/ko.json":
619
+ return import("./i18n/ko.es.js");
620
+ case "./i18n/lt.json":
621
+ return import("./i18n/lt.es.js");
622
+ case "./i18n/mn.json":
623
+ return import("./i18n/mn.es.js");
624
+ case "./i18n/nl.json":
625
+ return import("./i18n/nl.es.js");
626
+ case "./i18n/no.json":
627
+ return import("./i18n/no.es.js");
628
+ case "./i18n/pl.json":
629
+ return import("./i18n/pl.es.js");
630
+ case "./i18n/pt-br.json":
631
+ return import("./i18n/pt-br.es.js");
632
+ case "./i18n/ro.json":
633
+ return import("./i18n/ro.es.js");
634
+ case "./i18n/ru.json":
635
+ return import("./i18n/ru.es.js");
636
+ case "./i18n/sk.json":
637
+ return import("./i18n/sk.es.js");
638
+ case "./i18n/sl.json":
639
+ return import("./i18n/sl.es.js");
640
+ case "./i18n/sq.json":
641
+ return import("./i18n/sq.es.js");
642
+ case "./i18n/sr.json":
643
+ return import("./i18n/sr.es.js");
644
+ case "./i18n/sv.json":
645
+ return import("./i18n/sv.es.js");
646
+ case "./i18n/tr.json":
647
+ return import("./i18n/tr.es.js");
648
+ case "./i18n/uk.json":
649
+ return import("./i18n/uk.es.js");
650
+ case "./i18n/vi.json":
651
+ return import("./i18n/vi.es.js");
652
+ case "./i18n/zh-cn.json":
653
+ return import("./i18n/zh-cn.es.js");
654
+ case "./i18n/zh-hk.json":
655
+ return import("./i18n/zh-hk.es.js");
656
+ default:
657
+ return new Promise(function(t2, s2) {
658
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(s2.bind(null, new Error("Unknown variable dynamic import: " + e3)));
659
+ });
660
+ }
661
+ })(`./i18n/${e2}.json`).then((e3) => {
662
+ this.texts = Object.assign({}, Ne, e3.default), this.utils.date.updateTexts(this.texts);
663
+ });
664
+ }, loadDragAndDrop() {
665
+ import("./drag-and-drop.es.js").then((e2) => {
666
+ const { DragAndDrop: t2 } = e2;
667
+ this.modules.dnd = new t2(this);
668
+ }).catch(() => console.warn("Vue Cal: Missing drag & drop module."));
669
+ }, validateView(e2) {
670
+ return ze.includes(e2) || (console.error(`Vue Cal: invalid active-view parameter provided: "${e2}".
671
+ A valid view must be one of: ${ze.join(", ")}.`), e2 = "week"), this.enabledViews.includes(e2) || (console.warn(`Vue Cal: the provided active-view "${e2}" is disabled. Using the "${this.enabledViews[0]}" view instead.`), e2 = this.enabledViews[0]), e2;
672
+ }, switchToNarrowerView(e2 = null) {
673
+ this.transitionDirection = "right";
674
+ const t2 = this.enabledViews[this.enabledViews.indexOf(this.view.id) + 1];
675
+ t2 && this.switchView(t2, e2);
676
+ }, switchView(e2, t2 = null, s2 = false) {
677
+ e2 = this.validateView(e2);
678
+ const i2 = this.utils.date, n2 = this.view.startDate && this.view.startDate.getTime();
679
+ if (this.transitions && s2) {
680
+ if (this.view.id === e2)
681
+ return;
682
+ const t3 = this.enabledViews;
683
+ this.transitionDirection = t3.indexOf(this.view.id) > t3.indexOf(e2) ? "left" : "right";
684
+ }
685
+ const a2 = this.view.id;
686
+ switch (this.view.events = [], this.view.id = e2, this.view.firstCellDate = null, this.view.lastCellDate = null, t2 || (t2 = this.view.selectedDate || this.view.startDate), e2) {
687
+ case "years":
688
+ this.view.startDate = new Date(25 * Math.floor(t2.getFullYear() / 25) || 2e3, 0, 1), this.view.endDate = new Date(this.view.startDate.getFullYear() + 25, 0, 1), this.view.endDate.setSeconds(-1);
689
+ break;
690
+ case "year":
691
+ this.view.startDate = new Date(t2.getFullYear(), 0, 1), this.view.endDate = new Date(t2.getFullYear() + 1, 0, 1), this.view.endDate.setSeconds(-1);
692
+ break;
693
+ case "month": {
694
+ this.view.startDate = new Date(t2.getFullYear(), t2.getMonth(), 1), this.view.endDate = new Date(t2.getFullYear(), t2.getMonth() + 1, 1), this.view.endDate.setSeconds(-1);
695
+ let e3 = new Date(this.view.startDate);
696
+ if (e3.getDay() !== (this.startWeekOnSunday ? 0 : 1) && (e3 = i2.getPreviousFirstDayOfWeek(e3, this.startWeekOnSunday)), this.view.firstCellDate = e3, this.view.lastCellDate = i2.addDays(e3, 41), this.view.lastCellDate.setHours(23, 59, 59, 0), this.hideWeekends) {
697
+ if ([0, 6].includes(this.view.firstCellDate.getDay())) {
698
+ const e4 = this.view.firstCellDate.getDay() !== 6 || this.startWeekOnSunday ? 1 : 2;
699
+ this.view.firstCellDate = i2.addDays(this.view.firstCellDate, e4);
700
+ }
701
+ if ([0, 6].includes(this.view.startDate.getDay())) {
702
+ const e4 = this.view.startDate.getDay() === 6 ? 2 : 1;
703
+ this.view.startDate = i2.addDays(this.view.startDate, e4);
704
+ }
705
+ if ([0, 6].includes(this.view.lastCellDate.getDay())) {
706
+ const e4 = this.view.lastCellDate.getDay() !== 0 || this.startWeekOnSunday ? 1 : 2;
707
+ this.view.lastCellDate = i2.subtractDays(this.view.lastCellDate, e4);
708
+ }
709
+ if ([0, 6].includes(this.view.endDate.getDay())) {
710
+ const e4 = this.view.endDate.getDay() === 0 ? 2 : 1;
711
+ this.view.endDate = i2.subtractDays(this.view.endDate, e4);
712
+ }
713
+ }
714
+ break;
715
+ }
716
+ case "week": {
717
+ t2 = i2.getPreviousFirstDayOfWeek(t2, this.startWeekOnSunday);
718
+ const e3 = this.hideWeekends ? 5 : 7;
719
+ this.view.startDate = this.hideWeekends && this.startWeekOnSunday ? i2.addDays(t2, 1) : t2, this.view.startDate.setHours(0, 0, 0, 0), this.view.endDate = i2.addDays(t2, e3), this.view.endDate.setSeconds(-1);
720
+ break;
721
+ }
722
+ case "day":
723
+ this.view.startDate = t2, this.view.startDate.setHours(0, 0, 0, 0), this.view.endDate = new Date(t2), this.view.endDate.setHours(23, 59, 59, 0);
724
+ }
725
+ this.addEventsToView();
726
+ const l2 = this.view.startDate && this.view.startDate.getTime();
727
+ if ((a2 !== e2 || l2 !== n2) && (this.$emit("update:activeView", e2), this.ready)) {
728
+ const t3 = this.view.startDate, s3 = __spreadValues(__spreadProps(__spreadValues({ view: e2, startDate: t3, endDate: this.view.endDate }, this.isMonthView ? { firstCellDate: this.view.firstCellDate, lastCellDate: this.view.lastCellDate, outOfScopeEvents: this.view.outOfScopeEvents.map(this.cleanupEvent) } : {}), { events: this.view.events.map(this.cleanupEvent) }), this.isWeekView ? { week: i2.getWeek(this.startWeekOnSunday ? i2.addDays(t3, 1) : t3) } : {});
729
+ this.$emit("view-change", s3);
730
+ }
731
+ }, previous() {
732
+ this.previousNext(false);
733
+ }, next() {
734
+ this.previousNext();
735
+ }, previousNext(e2 = true) {
736
+ const t2 = this.utils.date;
737
+ this.transitionDirection = e2 ? "right" : "left";
738
+ const s2 = e2 ? 1 : -1;
739
+ let i2 = null;
740
+ const { startDate: n2, id: a2 } = this.view;
741
+ switch (a2) {
742
+ case "years":
743
+ i2 = new Date(n2.getFullYear() + 25 * s2, 0, 1);
744
+ break;
745
+ case "year":
746
+ i2 = new Date(n2.getFullYear() + 1 * s2, 1, 1);
747
+ break;
748
+ case "month":
749
+ i2 = new Date(n2.getFullYear(), n2.getMonth() + 1 * s2, 1);
750
+ break;
751
+ case "week":
752
+ i2 = t2[e2 ? "addDays" : "subtractDays"](t2.getPreviousFirstDayOfWeek(n2, this.startWeekOnSunday), 7);
753
+ break;
754
+ case "day":
755
+ i2 = t2[e2 ? "addDays" : "subtractDays"](n2, 1);
756
+ }
757
+ i2 && this.switchView(a2, i2);
758
+ }, addEventsToView(e2 = []) {
759
+ const t2 = this.utils.event, { startDate: s2, endDate: i2, firstCellDate: n2, lastCellDate: a2 } = this.view;
760
+ if (e2.length || (this.view.events = []), !(e2 = e2.length ? e2 : [...this.mutableEvents]) || this.isYearsOrYearView && !this.eventsCountOnYearView)
761
+ return;
762
+ let l2 = e2.filter((e3) => t2.eventInRange(e3, s2, i2));
763
+ this.isYearsOrYearView || this.isMonthView && !this.eventsOnMonthView || (l2 = l2.map((e3) => e3.daysCount > 1 ? t2.createEventSegments(e3, n2 || s2, a2 || i2) : e3)), this.view.events.push(...l2), this.isMonthView && (this.view.outOfScopeEvents = [], e2.forEach((e3) => {
764
+ (t2.eventInRange(e3, n2, s2) || t2.eventInRange(e3, i2, a2)) && (this.view.events.some((t3) => t3._eid === e3._eid) || this.view.outOfScopeEvents.push(e3));
765
+ }));
766
+ }, findAncestor(e2, t2) {
767
+ for (; (e2 = e2.parentElement) && !e2.classList.contains(t2); )
768
+ ;
769
+ return e2;
770
+ }, isDOMElementAnEvent(e2) {
771
+ return e2.classList.contains("vuecal__event") || this.findAncestor(e2, "vuecal__event");
772
+ }, onMouseMove(e2) {
773
+ const { resizeAnEvent: t2, dragAnEvent: s2, dragCreateAnEvent: i2 } = this.domEvents;
774
+ (t2._eid !== null || s2._eid !== null || i2.start) && (e2.preventDefault(), t2._eid ? this.eventResizing(e2) : this.dragToCreateEvent && i2.start && this.eventDragCreation(e2));
775
+ }, onMouseUp(e2) {
776
+ const { focusAnEvent: t2, resizeAnEvent: s2, clickHoldAnEvent: i2, clickHoldACell: n2, dragCreateAnEvent: a2 } = this.domEvents, { _eid: l2 } = i2, { _eid: r2 } = s2;
777
+ let o2 = false;
778
+ const { event: d2, start: u2 } = a2, h2 = this.isDOMElementAnEvent(e2.target), c2 = t2.mousedUp;
779
+ if (t2.mousedUp = false, h2 && (this.domEvents.cancelClickEventCreation = true), n2.eventCreated)
780
+ return;
781
+ if (r2) {
782
+ const { originalEnd: e3, originalEndTimeMinutes: t3, endTimeMinutes: i3 } = s2, n3 = this.view.events.find((e4) => e4._eid === s2._eid);
783
+ if (o2 = i3 && i3 !== t3, n3 && n3.end.getTime() !== e3.getTime()) {
784
+ const t4 = this.mutableEvents.find((e4) => e4._eid === s2._eid);
785
+ t4.endTimeMinutes = n3.endTimeMinutes, t4.end = n3.end;
786
+ const i4 = this.cleanupEvent(n3), a3 = __spreadProps(__spreadValues({}, this.cleanupEvent(n3)), { end: e3, endTimeMinutes: n3.originalEndTimeMinutes });
787
+ this.$emit("event-duration-change", { event: i4, oldDate: s2.originalEnd, originalEvent: a3 }), this.$emit("event-change", { event: i4, originalEvent: a3 });
788
+ }
789
+ n3 && (n3.resizing = false), s2._eid = null, s2.start = null, s2.split = null, s2.segment = null, s2.originalEndTimeMinutes = null, s2.originalEnd = null, s2.endTimeMinutes = null, s2.startCell = null, s2.endCell = null;
790
+ } else
791
+ u2 && (d2 && (this.emitWithEvent("event-drag-create", d2), a2.event.resizing = false), a2.start = null, a2.split = null, a2.event = null);
792
+ h2 || r2 || this.unfocusEvent(), i2.timeoutId && !l2 && (clearTimeout(i2.timeoutId), i2.timeoutId = null), n2.timeoutId && (clearTimeout(n2.timeoutId), n2.timeoutId = null);
793
+ const v2 = typeof this.onEventClick == "function";
794
+ if (c2 && !o2 && !l2 && !d2 && v2) {
795
+ let s3 = this.view.events.find((e3) => e3._eid === t2._eid);
796
+ return !s3 && this.isMonthView && (s3 = this.view.outOfScopeEvents.find((e3) => e3._eid === t2._eid)), s3 && this.onEventClick(s3, e2);
797
+ }
798
+ }, onKeyUp(e2) {
799
+ e2.keyCode === 27 && this.cancelDelete();
800
+ }, eventResizing(e2) {
801
+ const { resizeAnEvent: t2 } = this.domEvents, s2 = this.view.events.find((e3) => e3._eid === t2._eid) || { segments: {} }, { minutes: i2, cursorCoords: n2 } = this.minutesAtCursor(e2), a2 = s2.segments && s2.segments[t2.segment], { date: l2, event: r2 } = this.utils, o2 = Math.max(i2, this.timeFrom + 1, (a2 || s2).startTimeMinutes + 1);
802
+ if (s2.endTimeMinutes = t2.endTimeMinutes = o2, this.snapToTime) {
803
+ const e3 = s2.endTimeMinutes + this.snapToTime / 2;
804
+ s2.endTimeMinutes = e3 - e3 % this.snapToTime;
805
+ }
806
+ if (a2 && (a2.endTimeMinutes = s2.endTimeMinutes), s2.end.setHours(0, s2.endTimeMinutes, s2.endTimeMinutes === 1440 ? -1 : 0, 0), this.resizeX && this.isWeekView) {
807
+ s2.daysCount = l2.countDays(s2.start, s2.end);
808
+ const e3 = this.cellsEl, i3 = e3.offsetWidth / e3.childElementCount, a3 = Math.floor(n2.x / i3);
809
+ if (t2.startCell === null && (t2.startCell = a3 - (s2.daysCount - 1)), t2.endCell !== a3) {
810
+ t2.endCell = a3;
811
+ const e4 = l2.addDays(s2.start, a3 - t2.startCell), i4 = Math.max(l2.countDays(s2.start, e4), 1);
812
+ if (i4 !== s2.daysCount) {
813
+ let e5 = null;
814
+ e5 = i4 > s2.daysCount ? r2.addEventSegment(s2) : r2.removeEventSegment(s2), t2.segment = e5, s2.endTimeMinutes += 1e-3;
815
+ }
816
+ }
817
+ }
818
+ this.$emit("event-resizing", { _eid: s2._eid, end: s2.end, endTimeMinutes: s2.endTimeMinutes });
819
+ }, eventDragCreation(e2) {
820
+ const { dragCreateAnEvent: t2 } = this.domEvents, { start: s2, startCursorY: i2, split: n2 } = t2, a2 = new Date(s2), { minutes: l2, cursorCoords: { y: r2 } } = this.minutesAtCursor(e2);
821
+ if (t2.event || !(Math.abs(i2 - r2) < this.dragToCreateThreshold))
822
+ if (t2.event) {
823
+ if (a2.setHours(0, l2, l2 === 1440 ? -1 : 0, 0), this.snapToTime) {
824
+ let e4 = 60 * a2.getHours() + a2.getMinutes();
825
+ const t3 = e4 + this.snapToTime / 2;
826
+ e4 = t3 - t3 % this.snapToTime, a2.setHours(0, e4, 0, 0);
827
+ }
828
+ const e3 = s2 < a2, { event: i3 } = t2;
829
+ i3.start = e3 ? s2 : a2, i3.end = e3 ? a2 : s2, i3.startTimeMinutes = 60 * i3.start.getHours() + i3.start.getMinutes(), i3.endTimeMinutes = 60 * i3.end.getHours() + i3.end.getMinutes();
830
+ } else {
831
+ if (t2.event = this.utils.event.createAnEvent(s2, 1, { split: n2 }), !t2.event)
832
+ return t2.start = null, t2.split = null, void (t2.event = null);
833
+ t2.event.resizing = true;
834
+ }
835
+ }, unfocusEvent() {
836
+ const { focusAnEvent: e2, clickHoldAnEvent: t2 } = this.domEvents, s2 = this.view.events.find((s3) => s3._eid === (e2._eid || t2._eid));
837
+ e2._eid = null, t2._eid = null, s2 && (s2.focused = false, s2.deleting = false);
838
+ }, cancelDelete() {
839
+ const { clickHoldAnEvent: e2 } = this.domEvents;
840
+ if (e2._eid) {
841
+ const t2 = this.view.events.find((t3) => t3._eid === e2._eid);
842
+ t2 && (t2.deleting = false), e2._eid = null, e2.timeoutId = null;
843
+ }
844
+ }, onEventTitleBlur(e2, t2) {
845
+ if (t2.title === e2.target.innerHTML)
846
+ return;
847
+ const s2 = t2.title;
848
+ t2.title = e2.target.innerHTML;
849
+ const i2 = this.cleanupEvent(t2);
850
+ this.$emit("event-title-change", { event: i2, oldTitle: s2 }), this.$emit("event-change", { event: i2, originalEvent: __spreadProps(__spreadValues({}, i2), { title: s2 }) });
851
+ }, updateMutableEvents() {
852
+ const e2 = this.utils.date;
853
+ this.mutableEvents = [], this.events.forEach((t2) => {
854
+ const s2 = typeof t2.start == "string" ? e2.stringToDate(t2.start) : t2.start, i2 = e2.formatDateLite(s2), n2 = e2.dateToMinutes(s2);
855
+ let a2 = null;
856
+ typeof t2.end == "string" && t2.end.includes("24:00") ? (a2 = new Date(t2.end.replace(" 24:00", "")), a2.setHours(23, 59, 59, 0)) : a2 = typeof t2.end == "string" ? e2.stringToDate(t2.end) : t2.end;
857
+ let l2 = e2.formatDateLite(a2), r2 = e2.dateToMinutes(a2);
858
+ r2 && r2 !== 1440 || (!this.time || typeof t2.end == "string" && t2.end.length === 10 ? a2.setHours(23, 59, 59, 0) : a2.setSeconds(a2.getSeconds() - 1), l2 = e2.formatDateLite(a2), r2 = 1440);
859
+ const o2 = i2 !== l2;
860
+ t2 = Object.assign(__spreadValues({}, this.utils.event.eventDefaults), t2, { _eid: `${this._.uid}_${this.eventIdIncrement++}`, segments: o2 ? {} : null, start: s2, startTimeMinutes: n2, end: a2, endTimeMinutes: r2, daysCount: o2 ? e2.countDays(s2, a2) : 1, class: t2.class }), this.mutableEvents.push(t2);
861
+ });
862
+ }, minutesAtCursor(e2) {
863
+ return this.utils.cell.minutesAtCursor(e2);
864
+ }, createEvent(e2, t2, s2 = {}) {
865
+ return this.utils.event.createAnEvent(e2, t2, s2);
866
+ }, cleanupEvent(e2) {
867
+ e2 = __spreadValues({}, e2);
868
+ return ["segments", "deletable", "deleting", "titleEditable", "resizable", "resizing", "draggable", "dragging", "draggingStatic", "focused"].forEach((t2) => {
869
+ t2 in e2 && delete e2[t2];
870
+ }), e2.repeat || delete e2.repeat, e2;
871
+ }, emitWithEvent(e2, t2) {
872
+ this.$emit(e2, this.cleanupEvent(t2));
873
+ }, updateSelectedDate(e2) {
874
+ if ((e2 = e2 && typeof e2 == "string" ? this.utils.date.stringToDate(e2) : new Date(e2)) && e2 instanceof Date) {
875
+ const { selectedDate: t2 } = this.view;
876
+ t2 && (this.transitionDirection = t2.getTime() > e2.getTime() ? "left" : "right"), e2.setHours(0, 0, 0, 0), t2 && t2.getTime() === e2.getTime() || (this.view.selectedDate = e2), this.switchView(this.view.id);
877
+ }
878
+ }, getWeekNumber(e2) {
879
+ const t2 = this.utils.date, s2 = this.firstCellDateWeekNumber + e2, i2 = this.startWeekOnSunday ? 1 : 0;
880
+ return s2 > 52 ? t2.getWeek(t2.addDays(this.view.firstCellDate, 7 * e2 + i2)) : s2;
881
+ }, timeTick() {
882
+ this.now = new Date(), this.timeTickerIds[1] = setTimeout(this.timeTick, 6e4);
883
+ }, updateDateTexts() {
884
+ this.utils.date.updateTexts(this.texts);
885
+ }, alignWithScrollbar() {
886
+ if (document.getElementById("vuecal-align-with-scrollbar"))
887
+ return;
888
+ const e2 = this.$refs.vuecal.getElementsByClassName("vuecal__scrollbar-check")[0], t2 = e2.offsetWidth - e2.children[0].offsetWidth;
889
+ if (t2) {
890
+ const e3 = document.createElement("style");
891
+ e3.id = "vuecal-align-with-scrollbar", e3.type = "text/css", e3.innerHTML = `.vuecal__weekdays-headings,.vuecal__all-day {padding-right: ${t2}px}`, document.head.appendChild(e3);
892
+ }
893
+ }, cellOrSplitHasEvents: (e2, t2 = null) => e2.length && (!t2 && e2.length || t2 && e2.some((e3) => e3.split === t2.id)) }, created() {
894
+ this.utils.cell = new O(this), this.utils.event = new W(this, this.utils.date), this.loadLocale(this.locale), this.editEvents.drag && this.loadDragAndDrop(), this.updateMutableEvents(this.events), this.view.id = this.currentView, this.selectedDate ? this.updateSelectedDate(this.selectedDate) : (this.view.selectedDate = new Date(), this.switchView(this.currentView)), this.time && this.watchRealTime && (this.timeTickerIds[0] = setTimeout(this.timeTick, 1e3 * (60 - this.now.getSeconds())));
895
+ }, mounted() {
896
+ const e2 = this.utils.date, t2 = "ontouchstart" in window, { resize: s2, drag: i2, create: n2, delete: a2, title: l2 } = this.editEvents, r2 = this.onEventClick && typeof this.onEventClick == "function";
897
+ (s2 || i2 || n2 || a2 || l2 || r2) && window.addEventListener(t2 ? "touchend" : "mouseup", this.onMouseUp), (s2 || i2 || n2 && this.dragToCreateEvent) && window.addEventListener(t2 ? "touchmove" : "mousemove", this.onMouseMove, { passive: false }), l2 && window.addEventListener("keyup", this.onKeyUp), t2 && (this.$refs.vuecal.oncontextmenu = function(e3) {
898
+ e3.preventDefault(), e3.stopPropagation();
899
+ }), this.hideBody || this.alignWithScrollbar();
900
+ const o2 = this.view.startDate, d2 = __spreadValues(__spreadProps(__spreadValues({ view: this.view.id, startDate: o2, endDate: this.view.endDate }, this.isMonthView ? { firstCellDate: this.view.firstCellDate, lastCellDate: this.view.lastCellDate } : {}), { events: this.view.events.map(this.cleanupEvent) }), this.isWeekView ? { week: e2.getWeek(this.startWeekOnSunday ? e2.addDays(o2, 1) : o2) } : {});
901
+ this.$emit("ready", d2), this.ready = true;
902
+ }, beforeUnmount() {
903
+ const e2 = "ontouchstart" in window;
904
+ window.removeEventListener(e2 ? "touchmove" : "mousemove", this.onMouseMove, { passive: false }), window.removeEventListener(e2 ? "touchend" : "mouseup", this.onMouseUp), window.removeEventListener("keyup", this.onKeyUp), this.timeTickerIds[0] && clearTimeout(this.timeTickerIds[0]), this.timeTickerIds[1] && clearTimeout(this.timeTickerIds[1]), this.timeTickerIds = [null, null];
905
+ }, computed: { editEvents() {
906
+ return this.editableEvents && typeof this.editableEvents == "object" ? { title: !!this.editableEvents.title, drag: !!this.editableEvents.drag, resize: !!this.editableEvents.resize, create: !!this.editableEvents.create, delete: !!this.editableEvents.delete } : { title: !!this.editableEvents, drag: !!this.editableEvents, resize: !!this.editableEvents, create: !!this.editableEvents, delete: !!this.editableEvents };
907
+ }, views() {
908
+ return { years: { label: this.texts.years, enabled: !this.disableViews.includes("years") }, year: { label: this.texts.year, enabled: !this.disableViews.includes("year") }, month: { label: this.texts.month, enabled: !this.disableViews.includes("month") }, week: { label: this.texts.week, enabled: !this.disableViews.includes("week") }, day: { label: this.texts.day, enabled: !this.disableViews.includes("day") } };
909
+ }, currentView() {
910
+ return this.validateView(this.activeView);
911
+ }, enabledViews() {
912
+ return Object.keys(this.views).filter((e2) => this.views[e2].enabled);
913
+ }, hasTimeColumn() {
914
+ return this.time && this.isWeekOrDayView;
915
+ }, isShortMonthView() {
916
+ return this.isMonthView && this.eventsOnMonthView === "short";
917
+ }, firstCellDateWeekNumber() {
918
+ const e2 = this.utils.date, t2 = this.view.firstCellDate;
919
+ return e2.getWeek(this.startWeekOnSunday ? e2.addDays(t2, 1) : t2);
920
+ }, timeCells() {
921
+ const e2 = [];
922
+ for (let t2 = this.timeFrom, s2 = this.timeTo; t2 < s2; t2 += this.timeStep)
923
+ e2.push({ hours: Math.floor(t2 / 60), minutes: t2 % 60, label: this.utils.date.formatTime(t2, this.TimeFormat), value: t2 });
924
+ return e2;
925
+ }, TimeFormat() {
926
+ return this.timeFormat || (this.twelveHour ? "h:mm{am}" : "HH:mm");
927
+ }, daySplits() {
928
+ return (this.splitDays.filter((e2) => !e2.hide) || []).map((e2, t2) => __spreadProps(__spreadValues({}, e2), { id: e2.id || t2 + 1 }));
929
+ }, hasSplits() {
930
+ return this.daySplits.length && this.isWeekOrDayView;
931
+ }, hasShortEvents() {
932
+ return this.showAllDayEvents === "short";
933
+ }, cellOrSplitMinWidth() {
934
+ let e2 = null;
935
+ return this.hasSplits && this.minSplitWidth ? e2 = this.visibleDaysCount * this.minSplitWidth * this.daySplits.length : this.minCellWidth && this.isWeekView && (e2 = this.visibleDaysCount * this.minCellWidth), e2;
936
+ }, allDayBar() {
937
+ let e2 = this.allDayBarHeight || null;
938
+ return e2 && !isNaN(e2) && (e2 += "px"), { cells: this.viewCells, options: this.$props, label: this.texts.allDay, shortEvents: this.hasShortEvents, daySplits: this.hasSplits && this.daySplits || [], cellOrSplitMinWidth: this.cellOrSplitMinWidth, height: e2 };
939
+ }, minTimestamp() {
940
+ let e2 = null;
941
+ return this.minDate && typeof this.minDate == "string" ? e2 = this.utils.date.stringToDate(this.minDate) : this.minDate && this.minDate instanceof Date && (e2 = this.minDate), e2 ? e2.getTime() : null;
942
+ }, maxTimestamp() {
943
+ let e2 = null;
944
+ return this.maxDate && typeof this.maxDate == "string" ? e2 = this.utils.date.stringToDate(this.maxDate) : this.maxDate && this.minDate instanceof Date && (e2 = this.maxDate), e2 ? e2.getTime() : null;
945
+ }, weekDays() {
946
+ let { weekDays: e2, weekDaysShort: t2 = [] } = this.texts;
947
+ return e2 = e2.slice(0).map((e3, s2) => __spreadProps(__spreadValues({ label: e3 }, t2.length ? { short: t2[s2] } : {}), { hide: this.hideWeekends && s2 >= 5 || this.hideWeekdays.length && this.hideWeekdays.includes(s2 + 1) })), this.startWeekOnSunday && e2.unshift(e2.pop()), e2;
948
+ }, weekDaysInHeader() {
949
+ return this.isMonthView || this.isWeekView && !this.minCellWidth && !(this.hasSplits && this.minSplitWidth);
950
+ }, months() {
951
+ return this.texts.months.map((e2) => ({ label: e2 }));
952
+ }, specialDayHours() {
953
+ return this.specialHours && Object.keys(this.specialHours).length ? Array(7).fill("").map((e2, t2) => {
954
+ let s2 = this.specialHours[t2 + 1] || [];
955
+ return Array.isArray(s2) || (s2 = [s2]), e2 = [], s2.forEach(({ from: s3, to: i2, class: n2 }, a2) => {
956
+ e2[a2] = { day: t2 + 1, from: [null, void 0].includes(s3) ? null : 1 * s3, to: [null, void 0].includes(i2) ? null : 1 * i2, class: n2 || "" };
957
+ }), e2;
958
+ }) : {};
959
+ }, viewTitle() {
960
+ const e2 = this.utils.date;
961
+ let t2 = "";
962
+ const s2 = this.view.startDate, i2 = s2.getFullYear(), n2 = s2.getMonth();
963
+ switch (this.view.id) {
964
+ case "years":
965
+ t2 = this.texts.years;
966
+ break;
967
+ case "year":
968
+ t2 = i2;
969
+ break;
970
+ case "month":
971
+ t2 = `${this.months[n2].label} ${i2}`;
972
+ break;
973
+ case "week": {
974
+ const i3 = this.view.endDate, n3 = s2.getFullYear();
975
+ let a2 = this.texts.months[s2.getMonth()];
976
+ this.xsmall && (a2 = a2.substring(0, 3));
977
+ let l2 = `${a2} ${n3}`;
978
+ if (i3.getMonth() !== s2.getMonth()) {
979
+ const e3 = i3.getFullYear();
980
+ let t3 = this.texts.months[i3.getMonth()];
981
+ this.xsmall && (t3 = t3.substring(0, 3)), l2 = n3 === e3 ? `${a2} - ${t3} ${n3}` : this.small ? `${a2.substring(0, 3)} ${n3} - ${t3.substring(0, 3)} ${e3}` : `${a2} ${n3} - ${t3} ${e3}`;
982
+ }
983
+ t2 = `${this.texts.week} ${e2.getWeek(this.startWeekOnSunday ? e2.addDays(s2, 1) : s2)} (${l2})`;
984
+ break;
985
+ }
986
+ case "day":
987
+ t2 = this.utils.date.formatDate(s2, this.texts.dateFormat, this.texts);
988
+ }
989
+ return t2;
990
+ }, viewCells() {
991
+ const e2 = this.utils.date;
992
+ let t2 = [], s2 = null, i2 = false;
993
+ this.watchRealTime || (this.now = new Date());
994
+ const n2 = this.now;
995
+ switch (this.view.id) {
996
+ case "years":
997
+ s2 = this.view.startDate.getFullYear(), t2 = Array.apply(null, Array(25)).map((t3, i3) => {
998
+ const a2 = new Date(s2 + i3, 0, 1), l2 = new Date(s2 + i3 + 1, 0, 1);
999
+ return l2.setSeconds(-1), { startDate: a2, formattedDate: e2.formatDateLite(a2), endDate: l2, content: s2 + i3, current: s2 + i3 === n2.getFullYear() };
1000
+ });
1001
+ break;
1002
+ case "year":
1003
+ s2 = this.view.startDate.getFullYear(), t2 = Array.apply(null, Array(12)).map((t3, i3) => {
1004
+ const a2 = new Date(s2, i3, 1), l2 = new Date(s2, i3 + 1, 1);
1005
+ return l2.setSeconds(-1), { startDate: a2, formattedDate: e2.formatDateLite(a2), endDate: l2, content: this.xsmall ? this.months[i3].label.substr(0, 3) : this.months[i3].label, current: i3 === n2.getMonth() && s2 === n2.getFullYear() };
1006
+ });
1007
+ break;
1008
+ case "month": {
1009
+ const s3 = this.view.startDate.getMonth(), n3 = new Date(this.view.firstCellDate);
1010
+ i2 = false, t2 = Array.apply(null, Array(42)).map((t3, a2) => {
1011
+ const l2 = e2.addDays(n3, a2), r2 = new Date(l2);
1012
+ r2.setHours(23, 59, 59, 0);
1013
+ const o2 = !i2 && e2.isToday(l2) && !i2++;
1014
+ return { startDate: l2, formattedDate: e2.formatDateLite(l2), endDate: r2, content: l2.getDate(), today: o2, outOfScope: l2.getMonth() !== s3, class: `vuecal__cell--day${l2.getDay() || 7}` };
1015
+ }), (this.hideWeekends || this.hideWeekdays.length) && (t2 = t2.filter((e3) => {
1016
+ const t3 = e3.startDate.getDay() || 7;
1017
+ return !(this.hideWeekends && t3 >= 6 || this.hideWeekdays.length && this.hideWeekdays.includes(t3));
1018
+ }));
1019
+ break;
1020
+ }
1021
+ case "week": {
1022
+ i2 = false;
1023
+ const s3 = this.view.startDate, n3 = this.weekDays;
1024
+ t2 = n3.map((t3, n4) => {
1025
+ const a2 = e2.addDays(s3, n4), l2 = new Date(a2);
1026
+ l2.setHours(23, 59, 59, 0);
1027
+ const r2 = (a2.getDay() || 7) - 1;
1028
+ return { startDate: a2, formattedDate: e2.formatDateLite(a2), endDate: l2, today: !i2 && e2.isToday(a2) && !i2++, specialHours: this.specialDayHours[r2] || [] };
1029
+ }).filter((e3, t3) => !n3[t3].hide);
1030
+ break;
1031
+ }
1032
+ case "day": {
1033
+ const s3 = this.view.startDate, i3 = new Date(this.view.startDate);
1034
+ i3.setHours(23, 59, 59, 0);
1035
+ const n3 = (s3.getDay() || 7) - 1;
1036
+ t2 = [{ startDate: s3, formattedDate: e2.formatDateLite(s3), endDate: i3, today: e2.isToday(s3), specialHours: this.specialDayHours[n3] || [] }];
1037
+ break;
1038
+ }
1039
+ }
1040
+ return t2;
1041
+ }, visibleDaysCount() {
1042
+ return this.isDayView ? 1 : 7 - this.weekDays.reduce((e2, t2) => e2 + t2.hide, 0);
1043
+ }, cellWidth() {
1044
+ return 100 / this.visibleDaysCount;
1045
+ }, cssClasses() {
1046
+ const { resizeAnEvent: e2, dragAnEvent: t2, dragCreateAnEvent: s2 } = this.domEvents;
1047
+ return { [`vuecal--${this.view.id}-view`]: true, [`vuecal--${this.locale}`]: this.locale, "vuecal--no-time": !this.time, "vuecal--view-with-time": this.hasTimeColumn, "vuecal--week-numbers": this.showWeekNumbers && this.isMonthView, "vuecal--twelve-hour": this.twelveHour, "vuecal--click-to-navigate": this.clickToNavigate, "vuecal--hide-weekends": this.hideWeekends, "vuecal--split-days": this.hasSplits, "vuecal--sticky-split-labels": this.hasSplits && this.stickySplitLabels, "vuecal--overflow-x": this.minCellWidth && this.isWeekView || this.hasSplits && this.minSplitWidth, "vuecal--small": this.small, "vuecal--xsmall": this.xsmall, "vuecal--resizing-event": e2._eid, "vuecal--drag-creating-event": s2.event, "vuecal--dragging-event": t2._eid, "vuecal--events-on-month-view": this.eventsOnMonthView, "vuecal--short-events": this.isMonthView && this.eventsOnMonthView === "short", "vuecal--has-touch": typeof window != "undefined" && "ontouchstart" in window };
1048
+ }, isYearsOrYearView() {
1049
+ return ["years", "year"].includes(this.view.id);
1050
+ }, isYearsView() {
1051
+ return this.view.id === "years";
1052
+ }, isYearView() {
1053
+ return this.view.id === "year";
1054
+ }, isMonthView() {
1055
+ return this.view.id === "month";
1056
+ }, isWeekOrDayView() {
1057
+ return ["week", "day"].includes(this.view.id);
1058
+ }, isWeekView() {
1059
+ return this.view.id === "week";
1060
+ }, isDayView() {
1061
+ return this.view.id === "day";
1062
+ } }, watch: { events: { handler(e2, t2) {
1063
+ this.updateMutableEvents(e2), this.addEventsToView();
1064
+ }, deep: true }, locale(e2) {
1065
+ this.loadLocale(e2);
1066
+ }, selectedDate(e2) {
1067
+ this.updateSelectedDate(e2);
1068
+ }, activeView(e2) {
1069
+ this.switchView(e2);
1070
+ } } };
1071
+ var Ue = z(Pe, [["render", function(w2, D2, g2, f2, k2, M2) {
1072
+ const T2 = p("vuecal-header"), E2 = p("all-day-bar"), C2 = p("weekdays-headings"), S2 = p("vuecal-cell");
1073
+ return e(), t("div", { class: n(["vuecal__flex vuecal", M2.cssClasses]), column: "", ref: "vuecal", lang: g2.locale }, [l(T2, { options: w2.$props, "edit-events": M2.editEvents, "view-props": { views: M2.views, weekDaysInHeader: M2.weekDaysInHeader }, "week-days": M2.weekDays, "has-splits": M2.hasSplits, "day-splits": M2.daySplits, "switch-to-narrower-view": M2.switchToNarrowerView }, y({ "arrow-prev": o(() => [u(w2.$slots, "arrow-prev", {}, () => [oe, de, ue])]), "arrow-next": o(() => [u(w2.$slots, "arrow-next", {}, () => [he, ce, ve])]), "today-button": o(() => [u(w2.$slots, "today-button", {}, () => [d("span", pe, h(k2.texts.today), 1)])]), title: o(() => [u(w2.$slots, "title", { title: M2.viewTitle, view: k2.view }, () => [v(h(M2.viewTitle), 1)])]), _: 2 }, [w2.$slots["weekday-heading"] ? { name: "weekday-heading", fn: o(({ heading: e2, view: t2 }) => [u(w2.$slots, "weekday-heading", { heading: e2, view: t2 })]) } : void 0, w2.$slots["split-label"] ? { name: "split-label", fn: o(({ split: e2 }) => [u(w2.$slots, "split-label", { split: e2, view: k2.view.id })]) } : void 0]), 1032, ["options", "edit-events", "view-props", "week-days", "has-splits", "day-splits", "switch-to-narrower-view"]), g2.hideBody ? c("", true) : (e(), t("div", me, [l(r, { name: `slide-fade--${k2.transitionDirection}`, appear: g2.transitions }, { default: o(() => [(e(), t("div", { class: "vuecal__flex", style: { "min-width": "100%" }, key: !!g2.transitions && k2.view.id, column: "" }, [g2.showAllDayEvents && M2.hasTimeColumn && (!M2.cellOrSplitMinWidth || M2.isDayView && !g2.minSplitWidth) ? (e(), m(E2, _(b({ key: 0 }, M2.allDayBar)), { event: o(({ event: s2, view: i2 }) => [u(w2.$slots, "event", { view: i2, event: s2 }, () => [M2.editEvents.title && s2.titleEditable ? (e(), t("div", { key: 0, class: "vuecal__event-title vuecal__event-title--edit", contenteditable: "", onBlur: (e2) => M2.onEventTitleBlur(e2, s2), innerHTML: s2.title }, null, 40, we)) : s2.title ? (e(), t("div", { key: 1, class: "vuecal__event-title", innerHTML: s2.title }, null, 8, ye)) : c("", true), !s2.content || M2.hasShortEvents || M2.isShortMonthView ? c("", true) : (e(), t("div", { key: 2, class: "vuecal__event-content", innerHTML: s2.content }, null, 8, De))])]), _: 3 }, 16)) : c("", true), d("div", { class: n(["vuecal__bg", { vuecal__flex: !M2.hasTimeColumn }]), column: "" }, [d("div", ge, [M2.hasTimeColumn ? (e(), t("div", fe, [g2.showAllDayEvents && M2.cellOrSplitMinWidth && (!M2.isDayView || g2.minSplitWidth) ? (e(), t("div", { key: 0, class: "vuecal__all-day-text", style: a({ height: M2.allDayBar.height }) }, [d("span", null, h(k2.texts.allDay), 1)], 4)) : c("", true), (e(true), t(s, null, i(M2.timeCells, (s2, i2) => (e(), t("div", { class: "vuecal__time-cell", key: i2, style: a(`height: ${g2.timeCellHeight}px`) }, [u(w2.$slots, "time-cell", { hours: s2.hours, minutes: s2.minutes }, () => [_e, d("span", be, h(s2.label), 1)])], 4))), 128))])) : c("", true), g2.showWeekNumbers && M2.isMonthView ? (e(), t("div", ke, [(e(), t(s, null, i(6, (e2) => d("div", { class: "vuecal__flex vuecal__week-number-cell", key: e2, grow: "" }, [u(w2.$slots, "week-number-cell", { week: M2.getWeekNumber(e2 - 1) }, () => [v(h(M2.getWeekNumber(e2 - 1)), 1)])])), 64))])) : c("", true), d("div", { class: n(["vuecal__flex vuecal__cells", `${k2.view.id}-view`]), grow: "", wrap: !M2.cellOrSplitMinWidth || !M2.isWeekView, column: !!M2.cellOrSplitMinWidth }, [M2.cellOrSplitMinWidth && M2.isWeekView ? (e(), m(C2, { key: 0, "transition-direction": k2.transitionDirection, "week-days": M2.weekDays, "switch-to-narrower-view": M2.switchToNarrowerView, style: a(M2.cellOrSplitMinWidth ? `min-width: ${M2.cellOrSplitMinWidth}px` : "") }, y({ _: 2 }, [w2.$slots["weekday-heading"] ? { name: "weekday-heading", fn: o(({ heading: e2, view: t2 }) => [u(w2.$slots, "weekday-heading", { heading: e2, view: t2 })]) } : void 0, w2.$slots["split-label"] ? { name: "split-label", fn: o(({ split: e2 }) => [u(w2.$slots, "split-label", { split: e2, view: k2.view.id })]) } : void 0]), 1032, ["transition-direction", "week-days", "switch-to-narrower-view", "style"])) : M2.hasSplits && g2.stickySplitLabels && g2.minSplitWidth ? (e(), t("div", { key: 1, class: "vuecal__flex vuecal__split-days-headers", style: a(M2.cellOrSplitMinWidth ? `min-width: ${M2.cellOrSplitMinWidth}px` : "") }, [(e(true), t(s, null, i(M2.daySplits, (s2, i2) => (e(), t("div", { class: n(["day-split-header", s2.class || false]), key: i2 }, [u(w2.$slots, "split-label", { split: s2, view: k2.view.id }, () => [v(h(s2.label), 1)])], 2))), 128))], 4)) : c("", true), g2.showAllDayEvents && M2.hasTimeColumn && (M2.isWeekView && M2.cellOrSplitMinWidth || M2.isDayView && M2.hasSplits && g2.minSplitWidth) ? (e(), m(E2, _(b({ key: 2 }, M2.allDayBar)), { event: o(({ event: s2, view: i2 }) => [u(w2.$slots, "event", { view: i2, event: s2 }, () => [M2.editEvents.title && s2.titleEditable ? (e(), t("div", { key: 0, class: "vuecal__event-title vuecal__event-title--edit", contenteditable: "", onBlur: (e2) => M2.onEventTitleBlur(e2, s2), innerHTML: s2.title }, null, 40, Te)) : s2.title ? (e(), t("div", { key: 1, class: "vuecal__event-title", innerHTML: s2.title }, null, 8, Ee)) : c("", true), !s2.content || M2.hasShortEvents || M2.isShortMonthView ? c("", true) : (e(), t("div", { key: 2, class: "vuecal__event-content", innerHTML: s2.content }, null, 8, Ce))])]), _: 3 }, 16)) : c("", true), d("div", { class: "vuecal__flex", ref: (e2) => k2.cellsEl = e2, grow: "", wrap: !M2.cellOrSplitMinWidth || !M2.isWeekView, style: a(M2.cellOrSplitMinWidth ? `min-width: ${M2.cellOrSplitMinWidth}px` : "") }, [(e(true), t(s, null, i(M2.viewCells, (s2, i2) => (e(), m(S2, { key: i2, options: w2.$props, "edit-events": M2.editEvents, data: s2, "cell-width": g2.hideWeekdays.length && (M2.isWeekView || M2.isMonthView) && M2.cellWidth, "min-timestamp": M2.minTimestamp, "max-timestamp": M2.maxTimestamp, "cell-splits": M2.hasSplits && M2.daySplits || [] }, { "cell-content": o(({ events: i3, split: n2, selectCell: a2 }) => [u(w2.$slots, "cell-content", { cell: s2, view: k2.view, goNarrower: a2, events: i3 }, () => [n2 && !g2.stickySplitLabels ? (e(), t("div", { key: 0, class: "split-label", innerHTML: n2.label }, null, 8, Oe)) : c("", true), s2.content ? (e(), t("div", { key: 1, class: "vuecal__cell-date", innerHTML: s2.content }, null, 8, $e)) : c("", true), (M2.isMonthView && !g2.eventsOnMonthView || M2.isYearsOrYearView && g2.eventsCountOnYearView) && i3.length ? (e(), t("div", xe, [u(w2.$slots, "events-count", { view: k2.view, events: i3 }, () => [v(h(i3.length), 1)])])) : c("", true), !M2.cellOrSplitHasEvents(i3, n2) && M2.isWeekOrDayView ? (e(), t("div", He, [u(w2.$slots, "no-event", {}, () => [v(h(k2.texts.noEvent), 1)])])) : c("", true)])]), event: o(({ event: i3, view: n2 }) => [u(w2.$slots, "event", { view: n2, event: i3 }, () => [M2.editEvents.title && i3.titleEditable ? (e(), t("div", { key: 0, class: "vuecal__event-title vuecal__event-title--edit", contenteditable: "", onBlur: (e2) => M2.onEventTitleBlur(e2, i3), innerHTML: i3.title }, null, 40, We)) : i3.title ? (e(), t("div", { key: 1, class: "vuecal__event-title", innerHTML: i3.title }, null, 8, je)) : c("", true), !g2.time || i3.allDay || M2.isMonthView && (i3.allDay || g2.showAllDayEvents === "short") || M2.isShortMonthView ? c("", true) : (e(), t("div", Ae, [v(h(k2.utils.date.formatTime(i3.start, M2.TimeFormat)), 1), i3.endTimeMinutes ? (e(), t("span", Ve, "\xA0- " + h(k2.utils.date.formatTime(i3.end, M2.TimeFormat, null, true)), 1)) : c("", true), i3.daysCount > 1 && (i3.segments[s2.formattedDate] || {}).isFirstDay ? (e(), t("small", Ye, "\xA0+" + h(i3.daysCount - 1) + h((k2.texts.day[0] || "").toLowerCase()), 1)) : c("", true)])), !i3.content || M2.isMonthView && i3.allDay && g2.showAllDayEvents === "short" || M2.isShortMonthView ? c("", true) : (e(), t("div", { key: 3, class: "vuecal__event-content", innerHTML: i3.content }, null, 8, Le))])]), "no-event": o(() => [u(w2.$slots, "no-event", {}, () => [v(h(k2.texts.noEvent), 1)])]), _: 2 }, 1032, ["options", "edit-events", "data", "cell-width", "min-timestamp", "max-timestamp", "cell-splits"]))), 128))], 12, Se)], 10, Me)])], 2)]))]), _: 3 }, 8, ["name", "appear"]), k2.ready ? c("", true) : (e(), t("div", Fe, Be))]))], 10, re);
1074
+ }]]);
1075
+ export { Ue as default };