vue-cal 3.10.5 → 3.11.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/README.md +3 -3
  2. package/dist/drag-and-drop.amd.js +5 -0
  3. package/dist/drag-and-drop.cjs.js +5 -0
  4. package/dist/drag-and-drop.es.js +93 -0
  5. package/dist/i18n/ar.amd.js +5 -0
  6. package/dist/i18n/ar.cjs.js +5 -0
  7. package/dist/i18n/ar.es.js +22 -0
  8. package/dist/i18n/bg.amd.js +5 -0
  9. package/dist/i18n/bg.cjs.js +5 -0
  10. package/dist/i18n/bg.es.js +22 -0
  11. package/dist/i18n/bn.amd.js +5 -0
  12. package/dist/i18n/bn.cjs.js +5 -0
  13. package/dist/i18n/bn.es.js +22 -0
  14. package/dist/i18n/bs.amd.js +5 -0
  15. package/dist/i18n/bs.cjs.js +5 -0
  16. package/dist/i18n/bs.es.js +22 -0
  17. package/dist/i18n/ca.amd.js +5 -0
  18. package/dist/i18n/ca.cjs.js +5 -0
  19. package/dist/i18n/ca.es.js +23 -0
  20. package/dist/i18n/cs.amd.js +5 -0
  21. package/dist/i18n/cs.cjs.js +5 -0
  22. package/dist/i18n/cs.es.js +22 -0
  23. package/dist/i18n/da.amd.js +5 -0
  24. package/dist/i18n/da.cjs.js +5 -0
  25. package/dist/i18n/da.es.js +22 -0
  26. package/dist/i18n/de.amd.js +5 -0
  27. package/dist/i18n/de.cjs.js +5 -0
  28. package/dist/i18n/de.es.js +22 -0
  29. package/dist/i18n/el.amd.js +5 -0
  30. package/dist/i18n/el.cjs.js +5 -0
  31. package/dist/i18n/el.es.js +25 -0
  32. package/dist/i18n/en.amd.js +5 -0
  33. package/dist/i18n/en.cjs.js +5 -0
  34. package/dist/i18n/en.es.js +22 -0
  35. package/dist/i18n/es.amd.js +5 -0
  36. package/dist/i18n/es.cjs.js +5 -0
  37. package/dist/i18n/es.es.js +22 -0
  38. package/dist/i18n/fa.amd.js +5 -0
  39. package/dist/i18n/fa.cjs.js +5 -0
  40. package/dist/i18n/fa.es.js +22 -0
  41. package/dist/i18n/fr.amd.js +5 -0
  42. package/dist/i18n/fr.cjs.js +5 -0
  43. package/dist/i18n/fr.es.js +22 -0
  44. package/dist/i18n/he.amd.js +5 -0
  45. package/dist/i18n/he.cjs.js +5 -0
  46. package/dist/i18n/he.es.js +22 -0
  47. package/dist/i18n/hr.amd.js +5 -0
  48. package/dist/i18n/hr.cjs.js +5 -0
  49. package/dist/i18n/hr.es.js +22 -0
  50. package/dist/i18n/hu.amd.js +5 -0
  51. package/dist/i18n/hu.cjs.js +5 -0
  52. package/dist/i18n/hu.es.js +22 -0
  53. package/dist/i18n/id.amd.js +5 -0
  54. package/dist/i18n/id.cjs.js +5 -0
  55. package/dist/i18n/id.es.js +22 -0
  56. package/dist/i18n/is.amd.js +5 -0
  57. package/dist/i18n/is.cjs.js +5 -0
  58. package/dist/i18n/is.es.js +22 -0
  59. package/dist/i18n/it.amd.js +5 -0
  60. package/dist/i18n/it.cjs.js +5 -0
  61. package/dist/i18n/it.es.js +22 -0
  62. package/dist/i18n/ja.amd.js +5 -0
  63. package/dist/i18n/ja.cjs.js +5 -0
  64. package/dist/i18n/ja.es.js +22 -0
  65. package/dist/i18n/ka.amd.js +5 -0
  66. package/dist/i18n/ka.cjs.js +5 -0
  67. package/dist/i18n/ka.es.js +22 -0
  68. package/dist/i18n/ko.amd.js +5 -0
  69. package/dist/i18n/ko.cjs.js +5 -0
  70. package/dist/i18n/ko.es.js +22 -0
  71. package/dist/i18n/lt.amd.js +5 -0
  72. package/dist/i18n/lt.cjs.js +5 -0
  73. package/dist/i18n/lt.es.js +22 -0
  74. package/dist/i18n/mn.amd.js +5 -0
  75. package/dist/i18n/mn.cjs.js +5 -0
  76. package/dist/i18n/mn.es.js +22 -0
  77. package/dist/i18n/nl.amd.js +5 -0
  78. package/dist/i18n/nl.cjs.js +5 -0
  79. package/dist/i18n/nl.es.js +22 -0
  80. package/dist/i18n/no.amd.js +5 -0
  81. package/dist/i18n/no.cjs.js +5 -0
  82. package/dist/i18n/no.es.js +22 -0
  83. package/dist/i18n/pl.amd.js +5 -0
  84. package/dist/i18n/pl.cjs.js +5 -0
  85. package/dist/i18n/pl.es.js +22 -0
  86. package/dist/i18n/pt-br.amd.js +5 -0
  87. package/dist/i18n/pt-br.cjs.js +5 -0
  88. package/dist/i18n/pt-br.es.js +22 -0
  89. package/dist/i18n/ro.amd.js +5 -0
  90. package/dist/i18n/ro.cjs.js +5 -0
  91. package/dist/i18n/ro.es.js +22 -0
  92. package/dist/i18n/ru.amd.js +5 -0
  93. package/dist/i18n/ru.cjs.js +5 -0
  94. package/dist/i18n/ru.es.js +23 -0
  95. package/dist/i18n/sk.amd.js +5 -0
  96. package/dist/i18n/sk.cjs.js +5 -0
  97. package/dist/i18n/sk.es.js +22 -0
  98. package/dist/i18n/sl.amd.js +5 -0
  99. package/dist/i18n/sl.cjs.js +5 -0
  100. package/dist/i18n/sl.es.js +22 -0
  101. package/dist/i18n/sq.amd.js +5 -0
  102. package/dist/i18n/sq.cjs.js +5 -0
  103. package/dist/i18n/sq.es.js +23 -0
  104. package/dist/i18n/sr.amd.js +5 -0
  105. package/dist/i18n/sr.cjs.js +5 -0
  106. package/dist/i18n/sr.es.js +22 -0
  107. package/dist/i18n/sv.amd.js +5 -0
  108. package/dist/i18n/sv.cjs.js +5 -0
  109. package/dist/i18n/sv.es.js +22 -0
  110. package/dist/i18n/tr.amd.js +5 -0
  111. package/dist/i18n/tr.cjs.js +5 -0
  112. package/dist/i18n/tr.es.js +22 -0
  113. package/dist/i18n/uk.amd.js +5 -0
  114. package/dist/i18n/uk.cjs.js +5 -0
  115. package/dist/i18n/uk.es.js +23 -0
  116. package/dist/i18n/vi.amd.js +5 -0
  117. package/dist/i18n/vi.cjs.js +5 -0
  118. package/dist/i18n/vi.es.js +23 -0
  119. package/dist/i18n/zh-cn.amd.js +5 -0
  120. package/dist/i18n/zh-cn.cjs.js +5 -0
  121. package/dist/i18n/zh-cn.es.js +23 -0
  122. package/dist/i18n/zh-hk.amd.js +5 -0
  123. package/dist/i18n/zh-hk.cjs.js +5 -0
  124. package/dist/i18n/zh-hk.es.js +23 -0
  125. package/dist/vue-cal.amd.js +7 -0
  126. package/dist/vue-cal.cjs.js +7 -0
  127. package/dist/vue-cal.es.js +1149 -0
  128. package/dist/vue-cal.iife.js +3 -0
  129. package/dist/vuecal.css +1 -1
  130. package/package.json +45 -29
  131. package/dist/drag-and-drop.js +0 -1
  132. package/dist/i18n/ar.js +0 -1
  133. package/dist/i18n/bg.js +0 -1
  134. package/dist/i18n/bn.js +0 -1
  135. package/dist/i18n/bs.js +0 -1
  136. package/dist/i18n/ca.js +0 -1
  137. package/dist/i18n/cs.js +0 -1
  138. package/dist/i18n/da.js +0 -1
  139. package/dist/i18n/de.js +0 -1
  140. package/dist/i18n/el.js +0 -1
  141. package/dist/i18n/es.js +0 -1
  142. package/dist/i18n/fa.js +0 -1
  143. package/dist/i18n/fr.js +0 -1
  144. package/dist/i18n/he.js +0 -1
  145. package/dist/i18n/hr.js +0 -1
  146. package/dist/i18n/hu.js +0 -1
  147. package/dist/i18n/id.js +0 -1
  148. package/dist/i18n/is.js +0 -1
  149. package/dist/i18n/it.js +0 -1
  150. package/dist/i18n/ja.js +0 -1
  151. package/dist/i18n/ka.js +0 -1
  152. package/dist/i18n/ko.js +0 -1
  153. package/dist/i18n/lt.js +0 -1
  154. package/dist/i18n/mn.js +0 -1
  155. package/dist/i18n/nl.js +0 -1
  156. package/dist/i18n/no.js +0 -1
  157. package/dist/i18n/pl.js +0 -1
  158. package/dist/i18n/pt-br.js +0 -1
  159. package/dist/i18n/ro.js +0 -1
  160. package/dist/i18n/ru.js +0 -1
  161. package/dist/i18n/sk.js +0 -1
  162. package/dist/i18n/sl.js +0 -1
  163. package/dist/i18n/sq.js +0 -1
  164. package/dist/i18n/sr.js +0 -1
  165. package/dist/i18n/sv.js +0 -1
  166. package/dist/i18n/tr.js +0 -1
  167. package/dist/i18n/uk.js +0 -1
  168. package/dist/i18n/vi.js +0 -1
  169. package/dist/i18n/zh-cn.js +0 -1
  170. package/dist/i18n/zh-hk.js +0 -1
  171. package/dist/vuecal.common.js +0 -13558
  172. package/dist/vuecal.umd.js +0 -13568
  173. package/dist/vuecal.umd.min.js +0 -1
@@ -0,0 +1,5 @@
1
+ "use strict";/**
2
+ * vue-cal v3.11.0
3
+ * (c) 2022 Antoni Andre <antoniandre.web@gmail.com>
4
+ * @license MIT
5
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=["\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D","\u661F\u671F\u65E5"],t=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u65E5"],o=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],a="\u5E74",n="\u672C\u5E74",s="\u6708",y="\u5468",c="\u65E5",d="\u4ECA\u65E5",r="\u6682\u65E0\u6D3B\u52A8",l="\u6574\u5929",h="\u5220\u9664",m="\u65B0\u5EFA\u6D3B\u52A8",v="YYYY MMMM D dddd",D={weekDays:e,weekDaysShort:t,months:o,years:a,year:n,month:s,week:y,day:c,today:d,noEvent:r,allDay:l,deleteEvent:h,createEvent:m,dateFormat:v};exports.allDay=l;exports.createEvent=m;exports.dateFormat=v;exports.day=c;exports.default=D;exports.deleteEvent=h;exports.month=s;exports.months=o;exports.noEvent=r;exports.today=d;exports.week=y;exports.weekDays=e;exports.weekDaysShort=t;exports.year=n;exports.years=a;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * vue-cal v3.11.0
3
+ * (c) 2022 Antoni Andre <antoniandre.web@gmail.com>
4
+ * @license MIT
5
+ */
6
+ const a = ["\u661F\u671F\u4E00", "\u661F\u671F\u4E8C", "\u661F\u671F\u4E09", "\u661F\u671F\u56DB", "\u661F\u671F\u4E94", "\u661F\u671F\u516D", "\u661F\u671F\u65E5"], e = ["\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D", "\u65E5"], t = ["\u4E00\u6708", "\u4E8C\u6708", "\u4E09\u6708", "\u56DB\u6708", "\u4E94\u6708", "\u516D\u6708", "\u4E03\u6708", "\u516B\u6708", "\u4E5D\u6708", "\u5341\u6708", "\u5341\u4E00\u6708", "\u5341\u4E8C\u6708"], s = "\u5E74", d = "\u672C\u5E74", o = "\u6708", y = "\u5468", n = "\u65E5", r = "\u4ECA\u65E5", D = "\u6682\u65E0\u6D3B\u52A8", M = "\u6574\u5929", Y = "\u5220\u9664", l = "\u65B0\u5EFA\u6D3B\u52A8", h = "YYYY MMMM D dddd", k = { weekDays: a, weekDaysShort: e, months: t, years: "\u5E74", year: "\u672C\u5E74", month: "\u6708", week: "\u5468", day: "\u65E5", today: "\u4ECA\u65E5", noEvent: "\u6682\u65E0\u6D3B\u52A8", allDay: "\u6574\u5929", deleteEvent: "\u5220\u9664", createEvent: "\u65B0\u5EFA\u6D3B\u52A8", dateFormat: "YYYY MMMM D dddd" };
7
+ export {
8
+ M as allDay,
9
+ l as createEvent,
10
+ h as dateFormat,
11
+ n as day,
12
+ k as default,
13
+ Y as deleteEvent,
14
+ o as month,
15
+ t as months,
16
+ D as noEvent,
17
+ r as today,
18
+ y as week,
19
+ a as weekDays,
20
+ e as weekDaysShort,
21
+ d as year,
22
+ s as years
23
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * vue-cal v3.11.0
3
+ * (c) 2022 Antoni Andre <antoniandre.web@gmail.com>
4
+ * @license MIT
5
+ */define(["exports"],function(e){"use strict";const t=["\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D","\u661F\u671F\u65E5"],n=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u65E5"],a=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],o="\u5E74",y="\u672C\u5E74",c="\u6708",d="\u5468",s="\u65E5",l="\u4ECA\u65E5",h="\u66AB\u7121\u6D3B\u52D5",k="\u6574\u5929",m="\u522A\u9664",v="\u65B0\u5EFA\u6D3B\u52D5",D="YYYY MMMM D dddd",w={weekDays:t,weekDaysShort:n,months:a,years:o,year:y,month:c,week:d,day:s,today:l,noEvent:h,allDay:k,deleteEvent:m,createEvent:v,dateFormat:D};e.allDay=k,e.createEvent=v,e.dateFormat=D,e.day=s,e.default=w,e.deleteEvent=m,e.month=c,e.months=a,e.noEvent=h,e.today=l,e.week=d,e.weekDays=t,e.weekDaysShort=n,e.year=y,e.years=o,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,5 @@
1
+ "use strict";/**
2
+ * vue-cal v3.11.0
3
+ * (c) 2022 Antoni Andre <antoniandre.web@gmail.com>
4
+ * @license MIT
5
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=["\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D","\u661F\u671F\u65E5"],t=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u65E5"],o=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],a="\u5E74",n="\u672C\u5E74",s="\u6708",y="\u5468",c="\u65E5",d="\u4ECA\u65E5",r="\u66AB\u7121\u6D3B\u52D5",l="\u6574\u5929",h="\u522A\u9664",k="\u65B0\u5EFA\u6D3B\u52D5",m="YYYY MMMM D dddd",v={weekDays:e,weekDaysShort:t,months:o,years:a,year:n,month:s,week:y,day:c,today:d,noEvent:r,allDay:l,deleteEvent:h,createEvent:k,dateFormat:m};exports.allDay=l;exports.createEvent=k;exports.dateFormat=m;exports.day=c;exports.default=v;exports.deleteEvent=h;exports.month=s;exports.months=o;exports.noEvent=r;exports.today=d;exports.week=y;exports.weekDays=e;exports.weekDaysShort=t;exports.year=n;exports.years=a;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * vue-cal v3.11.0
3
+ * (c) 2022 Antoni Andre <antoniandre.web@gmail.com>
4
+ * @license MIT
5
+ */
6
+ const a = ["\u661F\u671F\u4E00", "\u661F\u671F\u4E8C", "\u661F\u671F\u4E09", "\u661F\u671F\u56DB", "\u661F\u671F\u4E94", "\u661F\u671F\u516D", "\u661F\u671F\u65E5"], e = ["\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D", "\u65E5"], t = ["\u4E00\u6708", "\u4E8C\u6708", "\u4E09\u6708", "\u56DB\u6708", "\u4E94\u6708", "\u516D\u6708", "\u4E03\u6708", "\u516B\u6708", "\u4E5D\u6708", "\u5341\u6708", "\u5341\u4E00\u6708", "\u5341\u4E8C\u6708"], s = "\u5E74", d = "\u672C\u5E74", o = "\u6708", y = "\u5468", n = "\u65E5", r = "\u4ECA\u65E5", D = "\u66AB\u7121\u6D3B\u52D5", M = "\u6574\u5929", Y = "\u522A\u9664", l = "\u65B0\u5EFA\u6D3B\u52D5", h = "YYYY MMMM D dddd", k = { weekDays: a, weekDaysShort: e, months: t, years: "\u5E74", year: "\u672C\u5E74", month: "\u6708", week: "\u5468", day: "\u65E5", today: "\u4ECA\u65E5", noEvent: "\u66AB\u7121\u6D3B\u52D5", allDay: "\u6574\u5929", deleteEvent: "\u522A\u9664", createEvent: "\u65B0\u5EFA\u6D3B\u52D5", dateFormat: "YYYY MMMM D dddd" };
7
+ export {
8
+ M as allDay,
9
+ l as createEvent,
10
+ h as dateFormat,
11
+ n as day,
12
+ k as default,
13
+ Y as deleteEvent,
14
+ o as month,
15
+ t as months,
16
+ D as noEvent,
17
+ r as today,
18
+ y as week,
19
+ a as weekDays,
20
+ e as weekDaysShort,
21
+ d as year,
22
+ s as years
23
+ };
@@ -0,0 +1,7 @@
1
+ var ye=Object.defineProperty;var we=(u,g,E)=>g in u?ye(u,g,{enumerable:!0,configurable:!0,writable:!0,value:E}):u[g]=E;var D=(u,g,E)=>(we(u,typeof g!="symbol"?g+"":g,E),E);/**
2
+ * vue-cal v3.11.0
3
+ * (c) 2022 Antoni Andre <antoniandre.web@gmail.com>
4
+ * @license MIT
5
+ */define(["require","vue"],function(u,g){"use strict";const C=(i=>i&&typeof i=="object"&&"default"in i?i:{default:i})(g),N=(i,e)=>{const t=i[e];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((s,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+e)))})};let W,j,Y,w,$={},M={};class z{constructor(e,t=!1){D(this,"texts",{});D(this,"dateToMinutes",e=>e.getHours()*60+e.getMinutes());w=this,this._texts=e,!t&&Date&&!Date.prototype.addDays&&this._initDatePrototypes()}_initDatePrototypes(){Date.prototype.addDays=function(e){return w.addDays(this,e)},Date.prototype.subtractDays=function(e){return w.subtractDays(this,e)},Date.prototype.addHours=function(e){return w.addHours(this,e)},Date.prototype.subtractHours=function(e){return w.subtractHours(this,e)},Date.prototype.addMinutes=function(e){return w.addMinutes(this,e)},Date.prototype.subtractMinutes=function(e){return w.subtractMinutes(this,e)},Date.prototype.getWeek=function(){return w.getWeek(this)},Date.prototype.isToday=function(){return w.isToday(this)},Date.prototype.isLeapYear=function(){return w.isLeapYear(this)},Date.prototype.format=function(e="YYYY-MM-DD"){return w.formatDate(this,e)},Date.prototype.formatTime=function(e="HH:mm"){return w.formatTime(this,e)}}removePrototypes(){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}updateTexts(e){this._texts=e}_todayFormatted(){return j!==new Date().getDate()&&(W=new Date,j=W.getDate(),Y=`${W.getFullYear()}-${W.getMonth()}-${W.getDate()}`),Y}addDays(e,t){const s=new Date(e.valueOf());return s.setDate(s.getDate()+t),s}subtractDays(e,t){const s=new Date(e.valueOf());return s.setDate(s.getDate()-t),s}addHours(e,t){const s=new Date(e.valueOf());return s.setHours(s.getHours()+t),s}subtractHours(e,t){const s=new Date(e.valueOf());return s.setHours(s.getHours()-t),s}addMinutes(e,t){const s=new Date(e.valueOf());return s.setMinutes(s.getMinutes()+t),s}subtractMinutes(e,t){const s=new Date(e.valueOf());return s.setMinutes(s.getMinutes()-t),s}getWeek(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),s=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-s);const a=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t-a)/864e5+1)/7)}isToday(e){return`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`===this._todayFormatted()}isLeapYear(e){const t=e.getFullYear();return!(t%400)||t%100&&!(t%4)}getPreviousFirstDayOfWeek(e=null,t){const s=e&&new Date(e.valueOf())||new Date,a=t?7:6;return s.setDate(s.getDate()-(s.getDay()+a)%7),s}stringToDate(e){return e instanceof Date?e:(e.length===10&&(e+=" 00:00"),new Date(e.replace(/-/g,"/")))}countDays(e,t){typeof e=="string"&&(e=e.replace(/-/g,"/")),typeof t=="string"&&(t=t.replace(/-/g,"/")),e=new Date(e).setHours(0,0,0,0),t=new Date(t).setHours(0,0,1,0);const s=(new Date(t).getTimezoneOffset()-new Date(e).getTimezoneOffset())*60*1e3;return Math.ceil((t-e-s)/(24*3600*1e3))}datesInSameTimeStep(e,t,s){return Math.abs(e.getTime()-t.getTime())<=s*60*1e3}formatDate(e,t="YYYY-MM-DD",s=null){if(s||(s=this._texts),t||(t="YYYY-MM-DD"),t==="YYYY-MM-DD")return this.formatDateLite(e);$={},M={};const a={YYYY:()=>this._hydrateDateObject(e,s).YYYY,YY:()=>this._hydrateDateObject(e,s).YY(),M:()=>this._hydrateDateObject(e,s).M,MM:()=>this._hydrateDateObject(e,s).MM(),MMM:()=>this._hydrateDateObject(e,s).MMM(),MMMM:()=>this._hydrateDateObject(e,s).MMMM(),MMMMG:()=>this._hydrateDateObject(e,s).MMMMG(),D:()=>this._hydrateDateObject(e,s).D,DD:()=>this._hydrateDateObject(e,s).DD(),S:()=>this._hydrateDateObject(e,s).S(),d:()=>this._hydrateDateObject(e,s).d,dd:()=>this._hydrateDateObject(e,s).dd(),ddd:()=>this._hydrateDateObject(e,s).ddd(),dddd:()=>this._hydrateDateObject(e,s).dddd(),HH:()=>this._hydrateTimeObject(e,s).HH,H:()=>this._hydrateTimeObject(e,s).H,hh:()=>this._hydrateTimeObject(e,s).hh,h:()=>this._hydrateTimeObject(e,s).h,am:()=>this._hydrateTimeObject(e,s).am,AM:()=>this._hydrateTimeObject(e,s).AM,mm:()=>this._hydrateTimeObject(e,s).mm,m:()=>this._hydrateTimeObject(e,s).m};return t.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g,(n,r)=>{const l=a[r.replace(/\{|\}/g,"")];return l!==void 0?l():r})}formatDateLite(e){const t=e.getMonth()+1,s=e.getDate();return`${e.getFullYear()}-${t<10?"0":""}${t}-${s<10?"0":""}${s}`}formatTime(e,t="HH:mm",s=null,a=!1){let n=!1;if(a){const[o,d,c]=[e.getHours(),e.getMinutes(),e.getSeconds()];o+d+c===23+59+59&&(n=!0)}if(e instanceof Date&&t==="HH:mm")return n?"24:00":this.formatTimeLite(e);M={},s||(s=this._texts);const r=this._hydrateTimeObject(e,s),l=t.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g,(o,d)=>{const c=r[d.replace(/\{|\}/g,"")];return c!==void 0?c:d});return n?l.replace("23:59","24:00"):l}formatTimeLite(e){const t=e.getHours(),s=e.getMinutes();return`${(t<10?"0":"")+t}:${(s<10?"0":"")+s}`}_nth(e){if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}_hydrateDateObject(e,t){if($.D)return $;const s=e.getFullYear(),a=e.getMonth()+1,n=e.getDate(),l=(e.getDay()-1+7)%7;return $={YYYY:s,YY:()=>s.toString().substring(2),M:a,MM:()=>(a<10?"0":"")+a,MMM:()=>t.months[a-1].substring(0,3),MMMM:()=>t.months[a-1],MMMMG:()=>(t.monthsGenitive||t.months)[a-1],D:n,DD:()=>(n<10?"0":"")+n,S:()=>this._nth(n),d:l+1,dd:()=>t.weekDays[l][0],ddd:()=>t.weekDays[l].substr(0,3),dddd:()=>t.weekDays[l]},$}_hydrateTimeObject(e,t){if(M.am)return M;let s,a;e instanceof Date?(s=e.getHours(),a=e.getMinutes()):(s=Math.floor(e/60),a=Math.floor(e%60));const n=s%12?s%12:12,r=(t||{am:"am",pm:"pm"})[s===24||s<12?"am":"pm"];return M={H:s,h:n,HH:(s<10?"0":"")+s,hh:(n<10?"0":"")+n,am:r,AM:r.toUpperCase(),m:a,mm:(a<10?"0":"")+a},M}}const R=24*60;class U{constructor(e){D(this,"_vuecal",null);D(this,"selectCell",(e=!1,t,s)=>{this._vuecal.$emit("cell-click",s?{date:t,split:s}:t),this._vuecal.clickToNavigate||e?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",s?{date:t,split:s}:t)))});D(this,"keyPressEnterCell",(e,t)=>{this._vuecal.$emit("cell-keypress-enter",t?{date:e,split:t}:e),this._vuecal.switchToNarrowerView()});D(this,"getPosition",e=>{const{left:t,top:s}=this._vuecal.$refs.cells.getBoundingClientRect(),{clientX:a,clientY:n}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:a-t,y:n-s}});D(this,"minutesAtCursor",e=>{let t=0,s={x:0,y:0};const{timeStep:a,timeCellHeight:n,timeFrom:r}=this._vuecal.$props;return typeof e=="number"?t=e:typeof e=="object"&&(s=this.getPosition(e),t=Math.round(s.y*a/parseInt(n)+r)),{minutes:Math.max(Math.min(t,R),0),cursorCoords:s}});this._vuecal=e}}const X=2,H=24*60;let v,m,x;class G{constructor(e,t){D(this,"_vuecal",null);D(this,"eventDefaults",{_eid:null,start:"",startTimeMinutes:0,end:"",endTimeMinutes:0,title:"",content:"",background:!1,allDay:!1,segments:null,repeat:null,daysCount:1,deletable:!0,deleting:!1,titleEditable:!0,resizable:!0,resizing:!1,draggable:!0,dragging:!1,draggingStatic:!1,focused:!1,class:""});this._vuecal=e,v=t}createAnEvent(e,t,s){if(typeof e=="string"&&(e=v.stringToDate(e)),!(e instanceof Date))return!1;const a=v.dateToMinutes(e);t=t*1||X*60;const n=a+t,r=v.addMinutes(new Date(e),t);s.end&&(typeof s.end=="string"&&(s.end=v.stringToDate(s.end)),s.endTimeMinutes=v.dateToMinutes(s.end));const l={...this.eventDefaults,_eid:`${this._vuecal._uid}_${this._vuecal.eventIdIncrement++}`,start:e,startTimeMinutes:a,end:r,endTimeMinutes:n,segments:null,...s};if(!(typeof this._vuecal.onEventCreate=="function"&&!this._vuecal.onEventCreate(l,()=>this.deleteAnEvent(l))))return l.startDateF!==l.endDateF&&(l.daysCount=v.countDays(l.start,l.end)),this._vuecal.mutableEvents.push(l),this._vuecal.addEventsToView([l]),this._vuecal.emitWithEvent("event-create",l),this._vuecal.$emit("event-change",{event:this._vuecal.cleanupEvent(l),originalEvent:null}),l}addEventSegment(e){e.segments||(C.default.set(e,"segments",{}),C.default.set(e.segments,v.formatDateLite(e.start),{start:e.start,startTimeMinutes:e.startTimeMinutes,endTimeMinutes:H,isFirstDay:!0,isLastDay:!1}));const t=e.segments[v.formatDateLite(e.end)];t&&(t.isLastDay=!1,t.endTimeMinutes=H);const s=v.addDays(e.end,1),a=v.formatDateLite(s);return s.setHours(0,0,0,0),C.default.set(e.segments,a,{start:s,startTimeMinutes:0,endTimeMinutes:e.endTimeMinutes,isFirstDay:!1,isLastDay:!0}),e.end=v.addMinutes(s,e.endTimeMinutes),e.daysCount=Object.keys(e.segments).length,a}removeEventSegment(e){let t=Object.keys(e.segments).length;if(t<=1)return v.formatDateLite(e.end);C.default.delete(e.segments,v.formatDateLite(e.end)),t--;const s=v.subtractDays(e.end,1),a=v.formatDateLite(s),n=e.segments[a];return t?n&&(n.isLastDay=!0,n.endTimeMinutes=e.endTimeMinutes):e.segments=null,e.daysCount=t||1,e.end=s,a}createEventSegments(e,t,s){const a=t.getTime(),n=s.getTime();let r=e.start.getTime(),l=e.end.getTime(),o=!1,d,c,h;for(!e.end.getHours()&&!e.end.getMinutes()&&(l-=1e3),C.default.set(e,"segments",{}),e.repeat?(d=a,c=Math.min(n,e.repeat.until?v.stringToDate(e.repeat.until).getTime():n)):(d=Math.max(a,r),c=Math.min(n,l));d<=c;){let f=!1;const b=v.addDays(new Date(d),1).setHours(0,0,0,0);let p,_,k,y;if(e.repeat){const O=new Date(d),T=v.formatDateLite(O);(o||e.occurrences&&e.occurrences[T])&&(o||(r=e.occurrences[T].start,h=new Date(r).setHours(0,0,0,0),l=e.occurrences[T].end),o=!0,f=!0),p=d===h,_=T===v.formatDateLite(new Date(l)),k=new Date(p?r:d),y=v.formatDateLite(k),_&&(o=!1)}else f=!0,p=d===r,_=c===l&&b>c,k=p?e.start:new Date(d),y=v.formatDateLite(p?e.start:k);f&&C.default.set(e.segments,y,{start:k,startTimeMinutes:p?e.startTimeMinutes:0,endTimeMinutes:_?e.endTimeMinutes:H,isFirstDay:p,isLastDay:_}),d=b}return e}deleteAnEvent(e){this._vuecal.emitWithEvent("event-delete",e),this._vuecal.mutableEvents=this._vuecal.mutableEvents.filter(t=>t._eid!==e._eid),this._vuecal.view.events=this._vuecal.view.events.filter(t=>t._eid!==e._eid)}checkCellOverlappingEvents(e,t){x=e.slice(0),m={},e.forEach(a=>{x.shift(),m[a._eid]||C.default.set(m,a._eid,{overlaps:[],start:a.start,position:0}),m[a._eid].position=0,x.forEach(n=>{m[n._eid]||C.default.set(m,n._eid,{overlaps:[],start:n.start,position:0});const r=this.eventInRange(n,a.start,a.end),l=t.overlapsPerTimeStep?v.datesInSameTimeStep(a.start,n.start,t.timeStep):1;if(!a.background&&!a.allDay&&!n.background&&!n.allDay&&r&&l)m[a._eid].overlaps.push(n._eid),m[a._eid].overlaps=[...new Set(m[a._eid].overlaps)],m[n._eid].overlaps.push(a._eid),m[n._eid].overlaps=[...new Set(m[n._eid].overlaps)],m[n._eid].position++;else{let o,d;(o=(m[a._eid]||{overlaps:[]}).overlaps.indexOf(n._eid))>-1&&m[a._eid].overlaps.splice(o,1),(d=(m[n._eid]||{overlaps:[]}).overlaps.indexOf(a._eid))>-1&&m[n._eid].overlaps.splice(d,1),m[n._eid].position--}})});let s=0;for(const a in m){const n=m[a],r=n.overlaps.map(l=>({id:l,start:m[l].start}));r.push({id:a,start:n.start}),r.sort((l,o)=>l.start<o.start?-1:l.start>o.start?1:l.id>o.id?-1:1),n.position=r.findIndex(l=>l.id===a),s=Math.max(this.getOverlapsStreak(n,m),s)}return[m,s]}getOverlapsStreak(e,t={}){let s=e.overlaps.length+1,a=[];return e.overlaps.forEach(n=>{a.includes(n)||e.overlaps.filter(l=>l!==n).forEach(l=>{t[l].overlaps.includes(n)||a.push(l)})}),a=[...new Set(a)],s-=a.length,s}eventInRange(e,t,s){if(e.allDay||!this._vuecal.time){const r=new Date(e.start).setHours(0,0,0,0);return new Date(e.end).setHours(23,59,0,0)>=new Date(t).setHours(0,0,0,0)&&r<=new Date(s).setHours(0,0,0,0)}const a=e.start.getTime(),n=e.end.getTime();return a<s.getTime()&&n>t.getTime()}}var K=function(){var e=this,t=e._self._c;return t("div",{staticClass:"vuecal__flex vuecal__weekdays-headings"},[e._l(e.headings,function(s,a){return[s.hide?e._e():t("div",{key:a,staticClass:"vuecal__flex vuecal__heading",class:{today:s.today,clickable:e.cellHeadingsClickable},style:e.weekdayCellStyles,on:{click:function(n){e.view.id==="week"&&e.selectCell(s.date,n)},dblclick:function(n){e.view.id==="week"&&e.vuecal.dblclickToNavigate&&e.switchToNarrowerView()}}},[t("transition",{attrs:{name:`slide-fade--${e.transitionDirection}`,appear:e.vuecal.transitions}},[t("div",{key:e.vuecal.transitions?`${a}-${s.dayOfMonth}`:!1,staticClass:"vuecal__flex",attrs:{column:""}},[t("div",{staticClass:"vuecal__flex weekday-label",attrs:{grow:""}},[e._t("weekday-heading",function(){return[t("span",{staticClass:"full"},[e._v(e._s(s.full))]),t("span",{staticClass:"small"},[e._v(e._s(s.small))]),t("span",{staticClass:"xsmall"},[e._v(e._s(s.xsmall))]),s.dayOfMonth?t("span",[e._v("\xA0"+e._s(s.dayOfMonth))]):e._e()]},{heading:e.cleanupHeading(s),view:e.view})],2),e.vuecal.hasSplits&&e.vuecal.stickySplitLabels?t("div",{staticClass:"vuecal__flex vuecal__split-days-headers",attrs:{grow:""}},e._l(e.vuecal.daySplits,function(n,r){return t("div",{key:r,staticClass:"day-split-header",class:n.class||!1},[e._t("split-label",function(){return[e._v(e._s(n.label))]},{split:n,view:e.view})],2)}),0):e._e()])])],1)]})],2)},Z=[];const _e="";function S(i,e,t,s,a,n,r,l){var o=typeof i=="function"?i.options:i;e&&(o.render=e,o.staticRenderFns=t,o._compiled=!0),s&&(o.functional=!0),n&&(o._scopeId="data-v-"+n);var d;if(r?(d=function(f){f=f||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!f&&typeof __VUE_SSR_CONTEXT__<"u"&&(f=__VUE_SSR_CONTEXT__),a&&a.call(this,f),f&&f._registeredComponents&&f._registeredComponents.add(r)},o._ssrRegister=d):a&&(d=l?function(){a.call(this,(o.functional?this.parent:this).$root.$options.shadowRoot)}:a),d)if(o.functional){o._injectStyles=d;var c=o.render;o.render=function(b,p){return d.call(p),c(b,p)}}else{var h=o.beforeCreate;o.beforeCreate=h?[].concat(h,d):[d]}return{exports:i,options:o}}var J=S({inject:["vuecal","utils","view"],props:{transitionDirection:{type:String,default:"right"},weekDays:{type:Array,default:()=>[]},switchToNarrowerView:{type:Function,default:()=>{}}},methods:{selectCell(i,e){i.getTime()!==this.view.selectedDate.getTime()&&(this.view.selectedDate=i),this.utils.cell.selectCell(!1,i,e)},cleanupHeading:i=>({label:i.full,date:i.date,...i.today?{today:i.today}:{}})},computed:{headings(){if(!["month","week"].includes(this.view.id))return[];let i=!1;return this.weekDays.map((t,s)=>{const a=this.utils.date.addDays(this.view.startDate,this.vuecal.startWeekOnSunday?s-1:s);return{hide:t.hide,full:t.label,small:t.short||t.label.substr(0,3),xsmall:t.short||t.label.substr(0,1),...this.view.id==="week"?{dayOfMonth:a.getDate(),date:a,today:!i&&this.utils.date.isToday(a)&&!i++}:{}}})},cellWidth(){return 100/(7-this.weekDays.reduce((i,e)=>i+e.hide,0))},weekdayCellStyles(){return{...this.vuecal.hideWeekdays.length?{width:`${this.cellWidth}%`}:{}}},cellHeadingsClickable(){return this.view.id==="week"&&(this.vuecal.clickToNavigate||this.vuecal.dblclickToNavigate)}}},K,Z,!1,null,null,null,null);const P=J.exports;var Q=function(){var e=this,t=e._self._c;return t("div",{staticClass:"vuecal__header"},[e.options.hideViewSelector?e._e():t("div",{staticClass:"vuecal__flex vuecal__menu",attrs:{role:"tablist","aria-label":"Calendar views navigation"}},[e._l(e.viewProps.views,function(s,a){return[s.enabled?t("button",{key:a,staticClass:"vuecal__view-btn",class:{"vuecal__view-btn--active":e.view.id===a,"vuecal__view-btn--highlighted":e.highlightedControl===a},attrs:{type:"button","aria-label":`${s.label} view`},on:{dragenter:function(n){e.editEvents.drag&&e.dnd&&e.dnd.viewSelectorDragEnter(n,a,e.$data)},dragleave:function(n){e.editEvents.drag&&e.dnd&&e.dnd.viewSelectorDragLeave(n,a,e.$data)},click:function(n){return e.switchView(a,null,!0)}}},[e._v(e._s(s.label))]):e._e()]})],2),e.options.hideTitleBar?e._e():t("div",{staticClass:"vuecal__title-bar"},[t("button",{staticClass:"vuecal__arrow vuecal__arrow--prev",class:{"vuecal__arrow--highlighted":e.highlightedControl==="previous"},attrs:{type:"button","aria-label":`Previous ${e.view.id}`},on:{click:e.previous,dragenter:function(s){e.editEvents.drag&&e.dnd&&e.dnd.viewSelectorDragEnter(s,"previous",e.$data)},dragleave:function(s){e.editEvents.drag&&e.dnd&&e.dnd.viewSelectorDragLeave(s,"previous",e.$data)}}},[e._t("arrow-prev")],2),t("div",{staticClass:"vuecal__flex vuecal__title",attrs:{grow:""}},[t("transition",{attrs:{name:e.options.transitions?`slide-fade--${e.transitionDirection}`:""}},[t(e.broaderView?"button":"span",{key:`${e.view.id}${e.view.startDate.toString()}`,tag:"component",attrs:{type:!!e.broaderView&&"button","aria-label":!!e.broaderView&&`Go to ${e.broaderView} view`},on:{click:function(s){e.broaderView&&e.switchToBroaderView()}}},[e._t("title")],2)],1)],1),e.options.todayButton?t("button",{staticClass:"vuecal__today-btn",class:{"vuecal__today-btn--highlighted":e.highlightedControl==="today"},attrs:{type:"button","aria-label":"Today"},on:{click:e.goToToday,dragenter:function(s){e.editEvents.drag&&e.dnd&&e.dnd.viewSelectorDragEnter(s,"today",e.$data)},dragleave:function(s){e.editEvents.drag&&e.dnd&&e.dnd.viewSelectorDragLeave(s,"today",e.$data)}}},[e._t("today-button")],2):e._e(),t("button",{staticClass:"vuecal__arrow vuecal__arrow--next",class:{"vuecal__arrow--highlighted":e.highlightedControl==="next"},attrs:{type:"button","aria-label":`Next ${e.view.id}`},on:{click:e.next,dragenter:function(s){e.editEvents.drag&&e.dnd&&e.dnd.viewSelectorDragEnter(s,"next",e.$data)},dragleave:function(s){e.editEvents.drag&&e.dnd&&e.dnd.viewSelectorDragLeave(s,"next",e.$data)}}},[e._t("arrow-next")],2)]),e.viewProps.weekDaysInHeader?t("weekdays-headings",{attrs:{"week-days":e.weekDays,"transition-direction":e.transitionDirection,"switch-to-narrower-view":e.switchToNarrowerView},scopedSlots:e._u([e.$scopedSlots["weekday-heading"]?{key:"weekday-heading",fn:function({heading:s,view:a}){return[e._t("weekday-heading",null,{heading:s,view:a})]}}:null,e.$scopedSlots["split-label"]?{key:"split-label",fn:function({split:s}){return[e._t("split-label",null,{split:s,view:e.view})]}}:null],null,!0)}):e._e(),t("transition",{attrs:{name:`slide-fade--${e.transitionDirection}`}},[e.showDaySplits?t("div",{staticClass:"vuecal__flex vuecal__split-days-headers"},e._l(e.daySplits,function(s,a){return t("div",{key:a,staticClass:"day-split-header",class:s.class||!1},[e._t("split-label",function(){return[e._v(e._s(s.label))]},{split:s,view:e.view.id})],2)}),0):e._e()])],1)},q=[];const ge="";var ee=S({inject:["vuecal","previous","next","switchView","updateSelectedDate","modules","view"],components:{WeekdaysHeadings:P},props:{options:{type:Object,default:()=>({})},editEvents:{type:Object,required:!0},hasSplits:{type:[Boolean,Number],default:!1},daySplits:{type:Array,default:()=>[]},viewProps:{type:Object,default:()=>({})},weekDays:{type:Array,default:()=>[]},switchToNarrowerView:{type:Function,default:()=>{}}},data:()=>({highlightedControl:null}),methods:{goToToday(){this.updateSelectedDate(new Date(new Date().setHours(0,0,0,0)))},switchToBroaderView(){this.transitionDirection="left",this.broaderView&&this.switchView(this.broaderView)}},computed:{transitionDirection:{get(){return this.vuecal.transitionDirection},set(i){this.vuecal.transitionDirection=i}},broaderView(){const{enabledViews:i}=this.vuecal;return i[i.indexOf(this.view.id)-1]},showDaySplits(){return this.view.id==="day"&&this.hasSplits&&this.options.stickySplitLabels&&!this.options.minSplitWidth},dnd(){return this.modules.dnd}}},Q,q,!1,null,null,null,null);const te=ee.exports;var se=function(){var e=this,t=e._self._c;return t("div",{staticClass:"vuecal__event",class:e.eventClasses,style:e.eventStyles,attrs:{tabindex:"0",draggable:e.draggable},on:{focus:e.focusEvent,keypress:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:(s.stopPropagation(),e.onEnterKeypress.apply(null,arguments))},mouseenter:e.onMouseEnter,mouseleave:e.onMouseLeave,touchstart:function(s){return s.stopPropagation(),e.onTouchStart.apply(null,arguments)},mousedown:function(s){e.onMouseDown(s)},mouseup:e.onMouseUp,touchend:e.onMouseUp,touchmove:e.onTouchMove,dblclick:e.onDblClick,dragstart:function(s){e.draggable&&e.onDragStart(s)},dragend:function(s){e.draggable&&e.onDragEnd()}}},[e.vuecal.editEvents.delete&&e.event.deletable?t("div",{staticClass:"vuecal__event-delete",on:{click:function(s){return s.stopPropagation(),e.deleteEvent.apply(null,arguments)},touchstart:function(s){return s.stopPropagation(),e.touchDeleteEvent.apply(null,arguments)}}},[e._v(e._s(e.vuecal.texts.deleteEvent))]):e._e(),e._t("event",null,{event:e.event,view:e.view.id}),e.resizable?t("div",{staticClass:"vuecal__event-resize-handle",attrs:{contenteditable:"false"},on:{mousedown:function(s){return s.stopPropagation(),s.preventDefault(),e.onResizeHandleMouseDown.apply(null,arguments)},touchstart:function(s){return s.stopPropagation(),s.preventDefault(),e.onResizeHandleMouseDown.apply(null,arguments)}}}):e._e()],2)},ie=[];const Ce="";var ne=S({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:!1}},data:()=>({touch:{dragThreshold:30,startX:0,startY:0,dragged:!1}}),methods:{onMouseDown(i,e=!1){if("ontouchstart"in window&&!e)return!1;const{clickHoldAnEvent:t,focusAnEvent:s,resizeAnEvent:a,dragAnEvent:n}=this.domEvents;if(s._eid===this.event._eid&&t._eid===this.event._eid)return!0;this.focusEvent(),t._eid=null,this.vuecal.editEvents.delete&&this.event.deletable&&(t.timeoutId=setTimeout(()=>{!a._eid&&!n._eid&&(t._eid=this.event._eid,this.event.deleting=!0)},t.timeout))},onMouseUp(i){this.domEvents.focusAnEvent._eid===this.event._eid&&!this.touch.dragged&&(this.domEvents.focusAnEvent.mousedUp=!0),this.touch.dragged=!1},onMouseEnter(i){i.preventDefault(),this.vuecal.emitWithEvent("event-mouse-enter",this.event)},onMouseLeave(i){i.preventDefault(),this.vuecal.emitWithEvent("event-mouse-leave",this.event)},onTouchMove(i){if(typeof this.vuecal.onEventClick!="function")return;const{clientX:e,clientY:t}=i.touches[0],{startX:s,startY:a,dragThreshold:n}=this.touch;(Math.abs(e-s)>n||Math.abs(t-a)>n)&&(this.touch.dragged=!0)},onTouchStart(i){this.touch.startX=i.touches[0].clientX,this.touch.startY=i.touches[0].clientY,this.onMouseDown(i,!0)},onEnterKeypress(i){if(typeof this.vuecal.onEventClick=="function")return this.vuecal.onEventClick(this.event,i)},onDblClick(i){if(typeof this.vuecal.onEventDblclick=="function")return this.vuecal.onEventDblclick(this.event,i)},onDragStart(i){this.dnd&&this.dnd.eventDragStart(i,this.event)},onDragEnd(){this.dnd&&this.dnd.eventDragEnd(this.event)},onResizeHandleMouseDown(){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=!0},deleteEvent(i=!1){if("ontouchstart"in window&&!i)return!1;this.utils.event.deleteAnEvent(this.event)},touchDeleteEvent(i){this.deleteEvent(!0)},cancelDeleteEvent(){this.event.deleting=!1},focusEvent(){const{focusAnEvent:i}=this.domEvents,e=i._eid;if(e!==this.event._eid){if(e){const t=this.view.events.find(s=>s._eid===e);t&&(t.focused=!1)}this.vuecal.cancelDelete(),this.vuecal.emitWithEvent("event-focus",this.event),i._eid=this.event._eid,this.event.focused=!0}}},computed:{eventDimensions(){const{startTimeMinutes:i,endTimeMinutes:e}=this.segment||this.event;let t=i-this.vuecal.timeFrom;const s=Math.max(Math.round(t*this.vuecal.timeCellHeight/this.vuecal.timeStep),0);t=Math.min(e,this.vuecal.timeTo)-this.vuecal.timeFrom;const a=Math.round(t*this.vuecal.timeCellHeight/this.vuecal.timeStep),n=Math.max(a-s,5);return{top:s,height:n}},eventStyles(){if(this.event.allDay||!this.vuecal.time||!this.event.endTimeMinutes||this.view.id==="month"||this.allDay)return{};let i=100/Math.min(this.overlaps.length+1,this.overlapsStreak),e=100/(this.overlaps.length+1)*this.eventPosition;this.vuecal.minEventWidth&&i<this.vuecal.minEventWidth&&(i=this.vuecal.minEventWidth,e=(100-this.vuecal.minEventWidth)/this.overlaps.length*this.eventPosition);const{top:t,height:s}=this.eventDimensions;return{top:`${t}px`,height:`${s}px`,width:`${i}%`,left:this.event.left&&`${this.event.left}px`||`${e}%`}},eventClasses(){const{isFirstDay:i,isLastDay:e}=this.segment||{};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&&i&&!e,"event-middle":this.segment&&!i&&!e,"event-end":this.segment&&e&&!i}},segment(){return this.event.segments&&this.event.segments[this.cellFormattedDate]||null},draggable(){const{draggable:i,background:e,daysCount:t}=this.event;return this.vuecal.editEvents.drag&&i&&!e&&t===1},resizable(){const{editEvents:i,time:e}=this.vuecal;return i.resize&&this.event.resizable&&e&&!this.allDay&&(!this.segment||this.segment&&this.segment.isLastDay)&&this.view.id!=="month"},dnd(){return this.modules.dnd}}},se,ie,!1,null,null,null,null);const ae=ne.exports;var le=function(){var e=this,t=e._self._c;return t("transition-group",{staticClass:"vuecal__cell",class:e.cellClasses,style:e.cellStyles,attrs:{name:`slide-fade--${e.transitionDirection}`,tag:"div",appear:e.options.transitions}},[e._l(e.splitsCount?e.splits:1,function(s,a){return t("div",{key:e.options.transitions?`${e.view.id}-${e.data.content}-${a}`:a,staticClass:"vuecal__flex vuecal__cell-content",class:e.splitsCount&&e.splitClasses(s),attrs:{"data-split":e.splitsCount?s.id:!1,column:"",tabindex:"0","aria-label":e.data.content},on:{focus:function(n){return e.onCellFocus(n)},keypress:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.onCellkeyPressEnter(n)},touchstart:function(n){!e.isDisabled&&e.onCellTouchStart(n,e.splitsCount?s.id:null)},mousedown:function(n){!e.isDisabled&&e.onCellMouseDown(n,e.splitsCount?s.id:null)},click:function(n){!e.isDisabled&&e.onCellClick(n)},dblclick:function(n){!e.isDisabled&&e.onCellDblClick(n)},contextmenu:function(n){!e.isDisabled&&e.options.cellContextmenu&&e.onCellContextMenu(n)},dragenter:function(n){!e.isDisabled&&e.editEvents.drag&&e.dnd&&e.dnd.cellDragEnter(n,e.$data,e.data.startDate)},dragover:function(n){!e.isDisabled&&e.editEvents.drag&&e.dnd&&e.dnd.cellDragOver(n,e.$data,e.data.startDate,e.splitsCount?s.id:null)},dragleave:function(n){!e.isDisabled&&e.editEvents.drag&&e.dnd&&e.dnd.cellDragLeave(n,e.$data,e.data.startDate)},drop:function(n){!e.isDisabled&&e.editEvents.drag&&e.dnd&&e.dnd.cellDragDrop(n,e.$data,e.data.startDate,e.splitsCount?s.id:null)}}},[e.options.showTimeInCells&&e.options.time&&e.isWeekOrDayView&&!e.allDay?t("div",{staticClass:"cell-time-labels"},e._l(e.vuecal.timeCells,function(n,r){return t("span",{key:r,staticClass:"cell-time-label"},[e._v(e._s(n.label)+`
6
+ `)])}),0):e._e(),e.isWeekOrDayView&&!e.allDay&&e.specialHours.length?e._l(e.specialHours,function(n,r){return t("div",{staticClass:"vuecal__special-hours",class:`vuecal__special-hours--day${n.day} ${n.class}`,style:`height: ${n.height}px;top: ${n.top}px`},[n.label?t("div",{staticClass:"special-hours-label",domProps:{innerHTML:e._s(n.label)}}):e._e()])}):e._e(),e._t("cell-content",null,{events:e.events,selectCell:n=>e.selectCell(n,!0),split:e.splitsCount?s:!1}),e.eventsCount&&(e.isWeekOrDayView||e.view.id==="month"&&e.options.eventsOnMonthView)?t("div",{staticClass:"vuecal__cell-events"},e._l(e.splitsCount?s.events:e.events,function(n,r){return t("event",{key:r,attrs:{"cell-formatted-date":e.data.formattedDate,event:n,"all-day":e.allDay,"cell-events":e.splitsCount?s.events:e.events,overlaps:((e.splitsCount?s.overlaps[n._eid]:e.cellOverlaps[n._eid])||[]).overlaps,"event-position":((e.splitsCount?s.overlaps[n._eid]:e.cellOverlaps[n._eid])||[]).position,"overlaps-streak":e.splitsCount?s.overlapsStreak:e.cellOverlapsStreak},scopedSlots:e._u([{key:"event",fn:function({event:l,view:o}){return[e._t("event",null,{view:o,event:l})]}}],null,!0)})}),1):e._e()],2)}),e.timelineVisible?t("div",{key:e.options.transitions?`${e.view.id}-now-line`:"now-line",staticClass:"vuecal__now-line",style:`top: ${e.todaysTimePosition}px`,attrs:{title:e.utils.date.formatTime(e.vuecal.now)}}):e._e()],2)},re=[];const Te="";var oe=S({inject:["vuecal","utils","modules","view","domEvents"],components:{Event:ae},props:{options:{type:Object,default:()=>({})},editEvents:{type:Object,required:!0},data:{type:Object,required:!0},cellSplits:{type:Array,default:()=>[]},minTimestamp:{type:[Number,null],default:null},maxTimestamp:{type:[Number,null],default:null},cellWidth:{type:[Number,Boolean],default:!1},allDay:{type:Boolean,default:!1}},data:()=>({cellOverlaps:{},cellOverlapsStreak:1,timeAtCursor:null,highlighted:!1,highlightedSplit:null}),methods:{getSplitAtCursor({target:i}){let t=i.classList.contains("vuecal__cell-split")?i:this.vuecal.findAncestor(i,"vuecal__cell-split");return t&&(t=t.attributes["data-split"].value,parseInt(t).toString()===t.toString()&&(t=parseInt(t))),t||null},splitClasses(i){return{"vuecal__cell-split":!0,"vuecal__cell-split--highlighted":this.highlightedSplit===i.id,[i.class]:!!i.class}},checkCellOverlappingEvents(){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))},isDOMElementAnEvent(i){return this.vuecal.isDOMElementAnEvent(i)},selectCell(i,e=!1){const t=this.splitsCount?this.getSplitAtCursor(i):null;this.utils.cell.selectCell(e,this.timeAtCursor,t),this.timeAtCursor=null},onCellkeyPressEnter(i){this.isSelected||this.onCellFocus(i);const e=this.splitsCount?this.getSplitAtCursor(i):null;this.utils.cell.keyPressEnterCell(this.timeAtCursor,e),this.timeAtCursor=null},onCellFocus(i){if(!this.isSelected&&!this.isDisabled){this.isSelected=this.data.startDate;const e=this.splitsCount?this.getSplitAtCursor(i):null,t=this.timeAtCursor||this.data.startDate;this.vuecal.$emit("cell-focus",e?{date:t,split:e}:t)}},onCellMouseDown(i,e=null,t=!1){if("ontouchstart"in window&&!t)return!1;this.isSelected||this.onCellFocus(i);const{clickHoldACell:s,focusAnEvent:a}=this.domEvents;this.domEvents.cancelClickEventCreation=!1,s.eventCreated=!1,this.timeAtCursor=new Date(this.data.startDate);const{minutes:n,cursorCoords:{y:r}}=this.vuecal.minutesAtCursor(i);this.timeAtCursor.setMinutes(n);const l=this.isDOMElementAnEvent(i.target);!l&&a._eid&&((this.view.events.find(o=>o._eid===a._eid)||{}).focused=!1),this.editEvents.create&&!l&&this.setUpEventCreation(i,r)},setUpEventCreation(i,e){if(this.options.dragToCreateEvent&&["week","day"].includes(this.view.id)){const{dragCreateAnEvent:t}=this.domEvents;if(t.startCursorY=e,t.split=this.splitsCount?this.getSplitAtCursor(i):null,t.start=this.timeAtCursor,this.options.snapToTime){let s=this.timeAtCursor.getHours()*60+this.timeAtCursor.getMinutes();const a=s+this.options.snapToTime/2;s=a-a%this.options.snapToTime,t.start.setHours(0,s,0,0)}}else this.options.cellClickHold&&["month","week","day"].includes(this.view.id)&&this.setUpCellHoldTimer(i)},setUpCellHoldTimer(i){const{clickHoldACell:e}=this.domEvents;e.cellId=`${this.vuecal._uid}_${this.data.formattedDate}`,e.split=this.splitsCount?this.getSplitAtCursor(i):null,e.timeoutId=setTimeout(()=>{if(e.cellId&&!this.domEvents.cancelClickEventCreation){const{_eid:t}=this.utils.event.createAnEvent(this.timeAtCursor,null,e.split?{split:e.split}:{});e.eventCreated=t}},e.timeout)},onCellTouchStart(i,e=null){this.onCellMouseDown(i,e,!0)},onCellClick(i){this.isDOMElementAnEvent(i.target)||this.selectCell(i)},onCellDblClick(i){const e=new Date(this.data.startDate);e.setMinutes(this.vuecal.minutesAtCursor(i).minutes);const t=this.splitsCount?this.getSplitAtCursor(i):null;this.vuecal.$emit("cell-dblclick",t?{date:e,split:t}:e),this.options.dblclickToNavigate&&this.vuecal.switchToNarrowerView()},onCellContextMenu(i){i.stopPropagation(),i.preventDefault();const e=new Date(this.data.startDate),{cursorCoords:t,minutes:s}=this.vuecal.minutesAtCursor(i);e.setMinutes(s);const a=this.splitsCount?this.getSplitAtCursor(i):null;this.vuecal.$emit("cell-contextmenu",{date:e,...t,...a||{},e:i})}},computed:{dnd(){return this.modules.dnd},nowInMinutes(){return this.utils.date.dateToMinutes(this.vuecal.now)},isBeforeMinDate(){return this.minTimestamp!==null&&this.minTimestamp>this.data.endDate.getTime()},isAfterMaxDate(){return this.maxTimestamp&&this.maxTimestamp<this.data.startDate.getTime()},isDisabled(){const{disableDays:i}=this.options,{isYearsOrYearView:e}=this.vuecal;return i.length&&i.includes(this.data.formattedDate)&&!e?!0:this.isBeforeMinDate||this.isAfterMaxDate},isSelected:{get(){let i=!1;const{selectedDate:e}=this.view;return this.view.id==="years"?i=e.getFullYear()===this.data.startDate.getFullYear():this.view.id==="year"?i=e.getFullYear()===this.data.startDate.getFullYear()&&e.getMonth()===this.data.startDate.getMonth():i=e.getTime()===this.data.startDate.getTime(),i},set(i){this.view.selectedDate=i,this.vuecal.$emit("update:selected-date",this.view.selectedDate)}},isWeekOrDayView(){return["week","day"].includes(this.view.id)},transitionDirection(){return this.vuecal.transitionDirection},specialHours(){return this.data.specialHours.map(i=>{let{from:e,to:t}=i;return e=Math.max(e,this.options.timeFrom),t=Math.min(t,this.options.timeTo),{...i,height:(t-e)*this.timeScale,top:(e-this.options.timeFrom)*this.timeScale}})},events(){const{startDate:i,endDate:e}=this.data;let t=[];if(!(["years","year"].includes(this.view.id)&&!this.options.eventsCountOnYearView)){if(t=this.view.events.slice(0),this.view.id==="month"&&t.push(...this.view.outOfScopeEvents),t=t.filter(s=>this.utils.event.eventInRange(s,i,e)),this.options.showAllDayEvents&&this.view.id!=="month"&&(t=t.filter(s=>!!s.allDay===this.allDay)),this.options.time&&this.isWeekOrDayView&&!this.allDay){const{timeFrom:s,timeTo:a}=this.options;t=t.filter(n=>{const r=n.daysCount>1&&n.segments[this.data.formattedDate]||{},l=n.daysCount===1&&n.startTimeMinutes<a&&n.endTimeMinutes>s,o=n.daysCount>1&&r.startTimeMinutes<a&&r.endTimeMinutes>s,d=!1;return n.allDay||l||o||d})}this.options.time&&this.isWeekOrDayView&&!(this.options.showAllDayEvents&&this.allDay)&&t.sort((s,a)=>s.start<a.start?-1:1),this.cellSplits.length||this.$nextTick(this.checkCellOverlappingEvents)}return t},eventsCount(){return this.events.length},splits(){return this.cellSplits.map((i,e)=>{const t=this.events.filter(n=>n.split===i.id),[s,a]=this.utils.event.checkCellOverlappingEvents(t.filter(n=>!n.background&&!n.allDay),this.options);return{...i,overlaps:s,overlapsStreak:a,events:t}})},splitsCount(){return this.splits.length},cellClasses(){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}},cellStyles(){return{...this.cellWidth?{width:`${this.cellWidth}%`}:{}}},timelineVisible(){const{time:i,timeTo:e}=this.options;return this.data.today&&this.isWeekOrDayView&&i&&!this.allDay&&this.nowInMinutes<=e},todaysTimePosition(){if(!this.data.today||!this.options.time)return;const i=this.nowInMinutes-this.options.timeFrom;return Math.round(i*this.timeScale)},timeScale(){return this.options.timeCellHeight/this.options.timeStep}}},le,re,!1,null,null,null,null);const F=oe.exports;var de=function(){var e=this,t=e._self._c;return t("div",{staticClass:"vuecal__flex vuecal__all-day",style:e.cellOrSplitMinWidth&&{height:e.height}},[e.cellOrSplitMinWidth?e._e():t("div",{staticClass:"vuecal__all-day-text",staticStyle:{width:"3em"}},[t("span",[e._v(e._s(e.label))])]),t("div",{staticClass:"vuecal__flex vuecal__cells",class:`${e.view.id}-view`,style:e.cellOrSplitMinWidth?`min-width: ${e.cellOrSplitMinWidth}px`:"",attrs:{grow:""}},e._l(e.cells,function(s,a){return t("vuecal-cell",{key:a,attrs:{options:e.options,"edit-events":e.editEvents,data:s,"all-day":!0,"cell-width":e.options.hideWeekdays.length&&(e.vuecal.isWeekView||e.vuecal.isMonthView)&&e.vuecal.cellWidth,"min-timestamp":e.options.minTimestamp,"max-timestamp":e.options.maxTimestamp,"cell-splits":e.daySplits},scopedSlots:e._u([{key:"event",fn:function({event:n,view:r}){return[e._t("event",null,{view:r,event:n})]}}],null,!0)})}),1)])},ue=[],ce=S({inject:["vuecal","view","editEvents"],components:{"vuecal-cell":F},props:{options:{type:Object,required:!0},cells:{type:Array,required:!0},label:{type:String,required:!0},daySplits:{type:Array,default:()=>[]},shortEvents:{type:Boolean,default:!0},height:{type:String,default:""},cellOrSplitMinWidth:{type:Number,default:null}},computed:{hasCellOrSplitWidth(){return!!(this.options.minCellWidth||this.daySplits.length&&this.options.minSplitWidth)}}},de,ue,!1,null,null,null,null);const he=ce.exports,Se="";var ve=function(){var e=this,t=e._self._c;return t("div",{ref:"vuecal",staticClass:"vuecal__flex vuecal",class:e.cssClasses,attrs:{column:"",lang:e.locale}},[t("vuecal-header",{attrs:{options:e.$props,"edit-events":e.editEvents,"view-props":{views:e.views,weekDaysInHeader:e.weekDaysInHeader},"week-days":e.weekDays,"has-splits":e.hasSplits,"day-splits":e.daySplits,"switch-to-narrower-view":e.switchToNarrowerView},scopedSlots:e._u([{key:"arrow-prev",fn:function(){return[e._t("arrow-prev",function(){return[e._v("\xA0"),t("i",{staticClass:"angle"}),e._v("\xA0")]})]},proxy:!0},{key:"arrow-next",fn:function(){return[e._t("arrow-next",function(){return[e._v("\xA0"),t("i",{staticClass:"angle"}),e._v("\xA0")]})]},proxy:!0},{key:"today-button",fn:function(){return[e._t("today-button",function(){return[t("span",{staticClass:"default"},[e._v(e._s(e.texts.today))])]})]},proxy:!0},{key:"title",fn:function(){return[e._t("title",function(){return[e._v(e._s(e.viewTitle))]},{title:e.viewTitle,view:e.view})]},proxy:!0},e.$scopedSlots["weekday-heading"]?{key:"weekday-heading",fn:function({heading:s,view:a}){return[e._t("weekday-heading",null,{heading:s,view:a})]}}:null,e.$scopedSlots["split-label"]?{key:"split-label",fn:function({split:s}){return[e._t("split-label",null,{split:s,view:e.view.id})]}}:null],null,!0)}),e.hideBody?e._e():t("div",{staticClass:"vuecal__flex vuecal__body",attrs:{grow:""}},[t("transition",{attrs:{name:`slide-fade--${e.transitionDirection}`,appear:e.transitions}},[t("div",{key:e.transitions?e.view.id:!1,staticClass:"vuecal__flex",staticStyle:{"min-width":"100%"},attrs:{column:""}},[e.showAllDayEvents&&e.hasTimeColumn&&(!e.cellOrSplitMinWidth||e.isDayView&&!e.minSplitWidth)?t("all-day-bar",e._b({scopedSlots:e._u([{key:"event",fn:function({event:s,view:a}){return[e._t("event",function(){return[e.editEvents.title&&s.titleEditable?t("div",{staticClass:"vuecal__event-title vuecal__event-title--edit",attrs:{contenteditable:""},domProps:{innerHTML:e._s(s.title)},on:{blur:function(n){return e.onEventTitleBlur(n,s)}}}):s.title?t("div",{staticClass:"vuecal__event-title",domProps:{innerHTML:e._s(s.title)}}):e._e(),s.content&&!e.hasShortEvents&&!e.isShortMonthView?t("div",{staticClass:"vuecal__event-content",domProps:{innerHTML:e._s(s.content)}}):e._e()]},{view:a,event:s})]}}],null,!0)},"all-day-bar",e.allDayBar,!1)):e._e(),t("div",{staticClass:"vuecal__bg",class:{vuecal__flex:!e.hasTimeColumn},attrs:{column:""}},[t("div",{staticClass:"vuecal__flex",attrs:{row:"",grow:""}},[e.hasTimeColumn?t("div",{staticClass:"vuecal__time-column"},[e.showAllDayEvents&&e.cellOrSplitMinWidth&&!(e.isDayView&&!e.minSplitWidth)?t("div",{staticClass:"vuecal__all-day-text",style:{height:e.allDayBar.height}},[t("span",[e._v(e._s(e.texts.allDay))])]):e._e(),e._l(e.timeCells,function(s,a){return t("div",{key:a,staticClass:"vuecal__time-cell",style:`height: ${e.timeCellHeight}px`},[e._t("time-cell",function(){return[t("span",{staticClass:"vuecal__time-cell-line"}),t("span",{staticClass:"vuecal__time-cell-label"},[e._v(e._s(s.label))])]},{hours:s.hours,minutes:s.minutes})],2)})],2):e._e(),e.showWeekNumbers&&e.isMonthView?t("div",{staticClass:"vuecal__flex vuecal__week-numbers",attrs:{column:""}},e._l(6,function(s){return t("div",{key:s,staticClass:"vuecal__flex vuecal__week-number-cell",attrs:{grow:""}},[e._t("week-number-cell",function(){return[e._v(e._s(e.getWeekNumber(s-1)))]},{week:e.getWeekNumber(s-1)})],2)}),0):e._e(),t("div",{staticClass:"vuecal__flex vuecal__cells",class:`${e.view.id}-view`,attrs:{grow:"",wrap:!e.cellOrSplitMinWidth||!e.isWeekView,column:!!e.cellOrSplitMinWidth}},[e.cellOrSplitMinWidth&&e.isWeekView?t("weekdays-headings",{style:e.cellOrSplitMinWidth?`min-width: ${e.cellOrSplitMinWidth}px`:"",attrs:{"transition-direction":e.transitionDirection,"week-days":e.weekDays,"switch-to-narrower-view":e.switchToNarrowerView},scopedSlots:e._u([e.$scopedSlots["weekday-heading"]?{key:"weekday-heading",fn:function({heading:s,view:a}){return[e._t("weekday-heading",null,{heading:s,view:a})]}}:null,e.$scopedSlots["split-label"]?{key:"split-label",fn:function({split:s}){return[e._t("split-label",null,{split:s,view:e.view.id})]}}:null],null,!0)}):e.hasSplits&&e.stickySplitLabels&&e.minSplitWidth?t("div",{staticClass:"vuecal__flex vuecal__split-days-headers",style:e.cellOrSplitMinWidth?`min-width: ${e.cellOrSplitMinWidth}px`:""},e._l(e.daySplits,function(s,a){return t("div",{key:a,staticClass:"day-split-header",class:s.class||!1},[e._t("split-label",function(){return[e._v(e._s(s.label))]},{split:s,view:e.view.id})],2)}),0):e._e(),e.showAllDayEvents&&e.hasTimeColumn&&(e.isWeekView&&e.cellOrSplitMinWidth||e.isDayView&&e.hasSplits&&e.minSplitWidth)?t("all-day-bar",e._b({scopedSlots:e._u([{key:"event",fn:function({event:s,view:a}){return[e._t("event",function(){return[e.editEvents.title&&s.titleEditable?t("div",{staticClass:"vuecal__event-title vuecal__event-title--edit",attrs:{contenteditable:""},domProps:{innerHTML:e._s(s.title)},on:{blur:function(n){return e.onEventTitleBlur(n,s)}}}):s.title?t("div",{staticClass:"vuecal__event-title",domProps:{innerHTML:e._s(s.title)}}):e._e(),s.content&&!e.hasShortEvents&&!e.isShortMonthView?t("div",{staticClass:"vuecal__event-content",domProps:{innerHTML:e._s(s.content)}}):e._e()]},{view:a,event:s})]}}],null,!0)},"all-day-bar",e.allDayBar,!1)):e._e(),t("div",{ref:"cells",staticClass:"vuecal__flex",style:e.cellOrSplitMinWidth?`min-width: ${e.cellOrSplitMinWidth}px`:"",attrs:{grow:"",wrap:!e.cellOrSplitMinWidth||!e.isWeekView}},e._l(e.viewCells,function(s,a){return t("vuecal-cell",{key:a,attrs:{options:e.$props,"edit-events":e.editEvents,data:s,"cell-width":e.hideWeekdays.length&&(e.isWeekView||e.isMonthView)&&e.cellWidth,"min-timestamp":e.minTimestamp,"max-timestamp":e.maxTimestamp,"cell-splits":e.hasSplits&&e.daySplits||[]},scopedSlots:e._u([{key:"cell-content",fn:function({events:n,split:r,selectCell:l}){return[e._t("cell-content",function(){return[r&&!e.stickySplitLabels?t("div",{staticClass:"split-label",domProps:{innerHTML:e._s(r.label)}}):e._e(),s.content?t("div",{staticClass:"vuecal__cell-date",domProps:{innerHTML:e._s(s.content)}}):e._e(),(e.isMonthView&&!e.eventsOnMonthView||e.isYearsOrYearView&&e.eventsCountOnYearView)&&n.length?t("div",{staticClass:"vuecal__cell-events-count"},[e._t("events-count",function(){return[e._v(e._s(n.length))]},{view:e.view,events:n})],2):e._e(),!e.cellOrSplitHasEvents(n,r)&&e.isWeekOrDayView?t("div",{staticClass:"vuecal__no-event"},[e._t("no-event",function(){return[e._v(e._s(e.texts.noEvent))]})],2):e._e()]},{cell:s,view:e.view,goNarrower:l,events:n})]}},{key:"event",fn:function({event:n,view:r}){return[e._t("event",function(){return[e.editEvents.title&&n.titleEditable?t("div",{staticClass:"vuecal__event-title vuecal__event-title--edit",attrs:{contenteditable:""},domProps:{innerHTML:e._s(n.title)},on:{blur:function(l){return e.onEventTitleBlur(l,n)}}}):n.title?t("div",{staticClass:"vuecal__event-title",domProps:{innerHTML:e._s(n.title)}}):e._e(),e.time&&!n.allDay&&!(e.isMonthView&&(n.allDay||e.showAllDayEvents==="short"))&&!e.isShortMonthView?t("div",{staticClass:"vuecal__event-time"},[e._v(e._s(e.utils.date.formatTime(n.start,e.TimeFormat))),n.endTimeMinutes?t("span",[e._v("\xA0- "+e._s(e.utils.date.formatTime(n.end,e.TimeFormat,null,!0)))]):e._e(),n.daysCount>1&&(n.segments[s.formattedDate]||{}).isFirstDay?t("small",{staticClass:"days-to-end"},[e._v("\xA0+"+e._s(n.daysCount-1)+e._s((e.texts.day[0]||"").toLowerCase()))]):e._e()]):e._e(),n.content&&!(e.isMonthView&&n.allDay&&e.showAllDayEvents==="short")&&!e.isShortMonthView?t("div",{staticClass:"vuecal__event-content",domProps:{innerHTML:e._s(n.content)}}):e._e()]},{view:r,event:n})]}},{key:"no-event",fn:function(){return[e._t("no-event",function(){return[e._v(e._s(e.texts.noEvent))]})]},proxy:!0}],null,!0)})}),1)],1)])])],1)]),e.ready?e._e():t("div",{staticClass:"vuecal__scrollbar-check"},[t("div")])],1)],1)},me=[];const A=24*60,V={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"},L=["years","year","month","week","day"],I=new z(V);var pe=S({name:"vue-cal",components:{"vuecal-cell":F,"vuecal-header":te,WeekdaysHeadings:P,AllDayBar:he},provide(){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}},props:{activeView:{type:String,default:"week"},allDayBarHeight:{type:[String,Number],default:"25px"},cellClickHold:{type:Boolean,default:!0},cellContextmenu:{type:Boolean,default:!1},clickToNavigate:{type:Boolean,default:!1},dblclickToNavigate:{type:Boolean,default:!0},disableDatePrototypes:{type:Boolean,default:!1},disableDays:{type:Array,default:()=>[]},disableViews:{type:Array,default:()=>[]},dragToCreateEvent:{type:Boolean,default:!0},dragToCreateThreshold:{type:Number,default:15},editableEvents:{type:[Boolean,Object],default:!1},events:{type:Array,default:()=>[]},eventsCountOnYearView:{type:Boolean,default:!1},eventsOnMonthView:{type:[Boolean,String],default:!1},hideBody:{type:Boolean,default:!1},hideTitleBar:{type:Boolean,default:!1},hideViewSelector:{type:Boolean,default:!1},hideWeekdays:{type:Array,default:()=>[]},hideWeekends:{type:Boolean,default:!1},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:!1},resizeX:{type:Boolean,default:!1},selectedDate:{type:[String,Date],default:""},showAllDayEvents:{type:[Boolean,String],default:!1},showTimeInCells:{type:Boolean,default:!1},showWeekNumbers:{type:[Boolean,String],default:!1},snapToTime:{type:Number,default:0},small:{type:Boolean,default:!1},specialHours:{type:Object,default:()=>({})},splitDays:{type:Array,default:()=>[]},startWeekOnSunday:{type:Boolean,default:!1},stickySplitLabels:{type:Boolean,default:!1},time:{type:Boolean,default:!0},timeCellHeight:{type:Number,default:40},timeFormat:{type:String,default:""},timeFrom:{type:Number,default:0},timeStep:{type:Number,default:60},timeTo:{type:Number,default:A},todayButton:{type:Boolean,default:!1},transitions:{type:Boolean,default:!0},twelveHour:{type:Boolean,default:!1},watchRealTime:{type:Boolean,default:!1},xsmall:{type:Boolean,default:!1}},data(){return{ready:!1,texts:{...V},utils:{date:(this.disableDatePrototypes?I.removePrototypes():!1)||I,cell:null,event:null},modules:{dnd: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:!1},clickHoldAnEvent:{_eid:null,timeout:1200,timeoutId:null},dblTapACell:{taps:0,timeout:500},clickHoldACell:{cellId:null,split:null,timeout:1200,timeoutId:null,eventCreated:!1},cancelClickEventCreation:!1},mutableEvents:[],transitionDirection:"right"}},methods:{async loadLocale(i){if(typeof this.locale=="object"){this.texts=Object.assign({},V,i),this.utils.date.updateTexts(this.texts);return}if(this.locale==="en"){const e=await new Promise((t,s)=>u(["./i18n/en.amd"],t,s));this.texts=Object.assign({},V,e)}else N(Object.assign({"./i18n/ar.json":()=>new Promise((e,t)=>u(["./i18n/ar.amd"],e,t)),"./i18n/bg.json":()=>new Promise((e,t)=>u(["./i18n/bg.amd"],e,t)),"./i18n/bn.json":()=>new Promise((e,t)=>u(["./i18n/bn.amd"],e,t)),"./i18n/bs.json":()=>new Promise((e,t)=>u(["./i18n/bs.amd"],e,t)),"./i18n/ca.json":()=>new Promise((e,t)=>u(["./i18n/ca.amd"],e,t)),"./i18n/cs.json":()=>new Promise((e,t)=>u(["./i18n/cs.amd"],e,t)),"./i18n/da.json":()=>new Promise((e,t)=>u(["./i18n/da.amd"],e,t)),"./i18n/de.json":()=>new Promise((e,t)=>u(["./i18n/de.amd"],e,t)),"./i18n/el.json":()=>new Promise((e,t)=>u(["./i18n/el.amd"],e,t)),"./i18n/en.json":()=>new Promise((e,t)=>u(["./i18n/en.amd"],e,t)),"./i18n/es.json":()=>new Promise((e,t)=>u(["./i18n/es.amd"],e,t)),"./i18n/fa.json":()=>new Promise((e,t)=>u(["./i18n/fa.amd"],e,t)),"./i18n/fr.json":()=>new Promise((e,t)=>u(["./i18n/fr.amd"],e,t)),"./i18n/he.json":()=>new Promise((e,t)=>u(["./i18n/he.amd"],e,t)),"./i18n/hr.json":()=>new Promise((e,t)=>u(["./i18n/hr.amd"],e,t)),"./i18n/hu.json":()=>new Promise((e,t)=>u(["./i18n/hu.amd"],e,t)),"./i18n/id.json":()=>new Promise((e,t)=>u(["./i18n/id.amd"],e,t)),"./i18n/is.json":()=>new Promise((e,t)=>u(["./i18n/is.amd"],e,t)),"./i18n/it.json":()=>new Promise((e,t)=>u(["./i18n/it.amd"],e,t)),"./i18n/ja.json":()=>new Promise((e,t)=>u(["./i18n/ja.amd"],e,t)),"./i18n/ka.json":()=>new Promise((e,t)=>u(["./i18n/ka.amd"],e,t)),"./i18n/ko.json":()=>new Promise((e,t)=>u(["./i18n/ko.amd"],e,t)),"./i18n/lt.json":()=>new Promise((e,t)=>u(["./i18n/lt.amd"],e,t)),"./i18n/mn.json":()=>new Promise((e,t)=>u(["./i18n/mn.amd"],e,t)),"./i18n/nl.json":()=>new Promise((e,t)=>u(["./i18n/nl.amd"],e,t)),"./i18n/no.json":()=>new Promise((e,t)=>u(["./i18n/no.amd"],e,t)),"./i18n/pl.json":()=>new Promise((e,t)=>u(["./i18n/pl.amd"],e,t)),"./i18n/pt-br.json":()=>new Promise((e,t)=>u(["./i18n/pt-br.amd"],e,t)),"./i18n/ro.json":()=>new Promise((e,t)=>u(["./i18n/ro.amd"],e,t)),"./i18n/ru.json":()=>new Promise((e,t)=>u(["./i18n/ru.amd"],e,t)),"./i18n/sk.json":()=>new Promise((e,t)=>u(["./i18n/sk.amd"],e,t)),"./i18n/sl.json":()=>new Promise((e,t)=>u(["./i18n/sl.amd"],e,t)),"./i18n/sq.json":()=>new Promise((e,t)=>u(["./i18n/sq.amd"],e,t)),"./i18n/sr.json":()=>new Promise((e,t)=>u(["./i18n/sr.amd"],e,t)),"./i18n/sv.json":()=>new Promise((e,t)=>u(["./i18n/sv.amd"],e,t)),"./i18n/tr.json":()=>new Promise((e,t)=>u(["./i18n/tr.amd"],e,t)),"./i18n/uk.json":()=>new Promise((e,t)=>u(["./i18n/uk.amd"],e,t)),"./i18n/vi.json":()=>new Promise((e,t)=>u(["./i18n/vi.amd"],e,t)),"./i18n/zh-cn.json":()=>new Promise((e,t)=>u(["./i18n/zh-cn.amd"],e,t)),"./i18n/zh-hk.json":()=>new Promise((e,t)=>u(["./i18n/zh-hk.amd"],e,t))}),`./i18n/${i}.json`).then(e=>{this.texts=Object.assign({},V,e.default),this.utils.date.updateTexts(this.texts)})},loadDragAndDrop(){new Promise((i,e)=>u(["./drag-and-drop.amd"],i,e)).then(i=>{const{DragAndDrop:e}=i;this.modules.dnd=new e(this)}).catch(()=>console.warn("Vue Cal: Missing drag & drop module."))},validateView(i){return L.includes(i)||(console.error(`Vue Cal: invalid active-view parameter provided: "${i}".
7
+ A valid view must be one of: ${L.join(", ")}.`),i="week"),this.enabledViews.includes(i)||(console.warn(`Vue Cal: the provided active-view "${i}" is disabled. Using the "${this.enabledViews[0]}" view instead.`),i=this.enabledViews[0]),i},switchToNarrowerView(i=null){this.transitionDirection="right";const e=this.enabledViews[this.enabledViews.indexOf(this.view.id)+1];e&&this.switchView(e,i)},switchView(i,e=null,t=!1){i=this.validateView(i);const s=this.utils.date,a=this.view.startDate&&this.view.startDate.getTime();if(this.transitions&&t){if(this.view.id===i)return;const l=this.enabledViews;this.transitionDirection=l.indexOf(this.view.id)>l.indexOf(i)?"left":"right"}const n=this.view.id;switch(this.view.events=[],this.view.id=i,this.view.firstCellDate=null,this.view.lastCellDate=null,e||(e=this.view.selectedDate||this.view.startDate),i){case"years":{this.view.startDate=new Date(Math.floor(e.getFullYear()/25)*25||2e3,0,1),this.view.endDate=new Date(this.view.startDate.getFullYear()+25,0,1),this.view.endDate.setSeconds(-1);break}case"year":{this.view.startDate=new Date(e.getFullYear(),0,1),this.view.endDate=new Date(e.getFullYear()+1,0,1),this.view.endDate.setSeconds(-1);break}case"month":{this.view.startDate=new Date(e.getFullYear(),e.getMonth(),1),this.view.endDate=new Date(e.getFullYear(),e.getMonth()+1,1),this.view.endDate.setSeconds(-1);let l=new Date(this.view.startDate);if(l.getDay()!==(this.startWeekOnSunday?0:1)&&(l=s.getPreviousFirstDayOfWeek(l,this.startWeekOnSunday)),this.view.firstCellDate=l,this.view.lastCellDate=s.addDays(l,41),this.view.lastCellDate.setHours(23,59,59,0),this.hideWeekends){if([0,6].includes(this.view.firstCellDate.getDay())){const o=this.view.firstCellDate.getDay()===6&&!this.startWeekOnSunday?2:1;this.view.firstCellDate=s.addDays(this.view.firstCellDate,o)}if([0,6].includes(this.view.startDate.getDay())){const o=this.view.startDate.getDay()===6?2:1;this.view.startDate=s.addDays(this.view.startDate,o)}if([0,6].includes(this.view.lastCellDate.getDay())){const o=this.view.lastCellDate.getDay()===0&&!this.startWeekOnSunday?2:1;this.view.lastCellDate=s.subtractDays(this.view.lastCellDate,o)}if([0,6].includes(this.view.endDate.getDay())){const o=this.view.endDate.getDay()===0?2:1;this.view.endDate=s.subtractDays(this.view.endDate,o)}}break}case"week":{e=s.getPreviousFirstDayOfWeek(e,this.startWeekOnSunday);const l=this.hideWeekends?5:7;this.view.startDate=this.hideWeekends&&this.startWeekOnSunday?s.addDays(e,1):e,this.view.startDate.setHours(0,0,0,0),this.view.endDate=s.addDays(e,l),this.view.endDate.setSeconds(-1);break}case"day":{this.view.startDate=e,this.view.startDate.setHours(0,0,0,0),this.view.endDate=new Date(e),this.view.endDate.setHours(23,59,59,0);break}}this.addEventsToView();const r=this.view.startDate&&this.view.startDate.getTime();if(!(n===i&&r===a)&&(this.$emit("update:activeView",i),this.ready)){const l=this.view.startDate,o={view:i,startDate:l,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:s.getWeek(this.startWeekOnSunday?s.addDays(l,1):l)}:{}};this.$emit("view-change",o)}},previous(){this.previousNext(!1)},next(){this.previousNext()},previousNext(i=!0){const e=this.utils.date;this.transitionDirection=i?"right":"left";const t=i?1:-1;let s=null;const{startDate:a,id:n}=this.view;switch(n){case"years":s=new Date(a.getFullYear()+25*t,0,1);break;case"year":s=new Date(a.getFullYear()+1*t,1,1);break;case"month":s=new Date(a.getFullYear(),a.getMonth()+1*t,1);break;case"week":s=e[i?"addDays":"subtractDays"](e.getPreviousFirstDayOfWeek(a,this.startWeekOnSunday),7);break;case"day":s=e[i?"addDays":"subtractDays"](a,1);const r=s.getDay(),l=this.startWeekOnSunday?r:(r||7)-1;if(this.weekDays[l].hide){const d=this.weekDays.map((h,f)=>({...h,i:f}));let c=0;i?([...d.slice(l),...d].find(h=>(c++,!h.hide)).i,c--):[...d,...d.slice(0,l)].reverse().find(h=>(c++,!h.hide)).i,s=e[i?"addDays":"subtractDays"](s,c)}break}s&&this.switchView(n,s)},addEventsToView(i=[]){const e=this.utils.event,{startDate:t,endDate:s,firstCellDate:a,lastCellDate:n}=this.view;if(i.length||(this.view.events=[]),i=i.length?i:[...this.mutableEvents],!i||this.isYearsOrYearView&&!this.eventsCountOnYearView)return;let r=i.filter(l=>e.eventInRange(l,t,s));!this.isYearsOrYearView&&!(this.isMonthView&&!this.eventsOnMonthView)&&(r=r.map(l=>l.daysCount>1?e.createEventSegments(l,a||t,n||s):l)),this.view.events.push(...r),this.isMonthView&&(this.view.outOfScopeEvents=[],i.forEach(l=>{(e.eventInRange(l,a,t)||e.eventInRange(l,s,n))&&(this.view.events.some(o=>o._eid===l._eid)||this.view.outOfScopeEvents.push(l))}))},findAncestor(i,e){for(;(i=i.parentElement)&&!i.classList.contains(e););return i},isDOMElementAnEvent(i){return i.classList.contains("vuecal__event")||this.findAncestor(i,"vuecal__event")},onMouseMove(i){const{resizeAnEvent:e,dragAnEvent:t,dragCreateAnEvent:s}=this.domEvents;e._eid===null&&t._eid===null&&!s.start||(i.preventDefault(),e._eid?this.eventResizing(i):this.dragToCreateEvent&&s.start&&this.eventDragCreation(i))},onMouseUp(i){const{focusAnEvent:e,resizeAnEvent:t,clickHoldAnEvent:s,clickHoldACell:a,dragCreateAnEvent:n}=this.domEvents,{_eid:r}=s,{_eid:l}=t;let o=!1;const{event:d,start:c}=n,h=this.isDOMElementAnEvent(i.target),f=e.mousedUp;if(e.mousedUp=!1,h&&(this.domEvents.cancelClickEventCreation=!0),a.eventCreated)return;if(l){const{originalEnd:p,originalEndTimeMinutes:_,endTimeMinutes:k}=t,y=this.view.events.find(O=>O._eid===t._eid);if(o=k&&k!==_,y&&y.end.getTime()!==p.getTime()){const O=this.mutableEvents.find(fe=>fe._eid===t._eid);O.endTimeMinutes=y.endTimeMinutes,O.end=y.end;const T=this.cleanupEvent(y),B={...this.cleanupEvent(y),end:p,endTimeMinutes:y.originalEndTimeMinutes};this.$emit("event-duration-change",{event:T,oldDate:t.originalEnd,originalEvent:B}),this.$emit("event-change",{event:T,originalEvent:B})}y&&(y.resizing=!1),t._eid=null,t.start=null,t.split=null,t.segment=null,t.originalEndTimeMinutes=null,t.originalEnd=null,t.endTimeMinutes=null,t.startCell=null,t.endCell=null}else c&&(d&&(this.emitWithEvent("event-drag-create",d),n.event.resizing=!1),n.start=null,n.split=null,n.event=null);!h&&!l&&this.unfocusEvent(),s.timeoutId&&!r&&(clearTimeout(s.timeoutId),s.timeoutId=null),a.timeoutId&&(clearTimeout(a.timeoutId),a.timeoutId=null);const b=typeof this.onEventClick=="function";if(f&&!o&&!r&&!d&&b){let p=this.view.events.find(_=>_._eid===e._eid);return!p&&this.isMonthView&&(p=this.view.outOfScopeEvents.find(_=>_._eid===e._eid)),p&&this.onEventClick(p,i)}},onKeyUp(i){i.keyCode===27&&this.cancelDelete()},eventResizing(i){const{resizeAnEvent:e}=this.domEvents,t=this.view.events.find(d=>d._eid===e._eid)||{segments:{}},{minutes:s,cursorCoords:a}=this.minutesAtCursor(i),n=t.segments&&t.segments[e.segment],{date:r,event:l}=this.utils,o=Math.max(s,this.timeFrom+1,(n||t).startTimeMinutes+1);if(t.endTimeMinutes=e.endTimeMinutes=o,this.snapToTime){const d=t.endTimeMinutes+this.snapToTime/2;t.endTimeMinutes=d-d%this.snapToTime}if(n&&(n.endTimeMinutes=t.endTimeMinutes),t.end.setHours(0,t.endTimeMinutes,t.endTimeMinutes===A?-1:0,0),this.resizeX&&this.isWeekView){t.daysCount=r.countDays(t.start,t.end);const d=this.$refs.cells,c=d.offsetWidth/d.childElementCount,h=Math.floor(a.x/c);if(e.startCell===null&&(e.startCell=h-(t.daysCount-1)),e.endCell!==h){e.endCell=h;const f=r.addDays(t.start,h-e.startCell),b=Math.max(r.countDays(t.start,f),1);if(b!==t.daysCount){let p=null;b>t.daysCount?p=l.addEventSegment(t):p=l.removeEventSegment(t),e.segment=p,t.endTimeMinutes+=.001}}}this.$emit("event-resizing",{_eid:t._eid,end:t.end,endTimeMinutes:t.endTimeMinutes})},eventDragCreation(i){const{dragCreateAnEvent:e}=this.domEvents,{start:t,startCursorY:s,split:a}=e,n=new Date(t),{minutes:r,cursorCoords:{y:l}}=this.minutesAtCursor(i);if(!(!e.event&&Math.abs(s-l)<this.dragToCreateThreshold))if(e.event){if(n.setHours(0,r,r===A?-1:0,0),this.snapToTime){let c=n.getHours()*60+n.getMinutes();const h=c+this.snapToTime/2;c=h-h%this.snapToTime,n.setHours(0,c,0,0)}const o=t<n,{event:d}=e;d.start=o?t:n,d.end=o?n:t,d.startTimeMinutes=d.start.getHours()*60+d.start.getMinutes(),d.endTimeMinutes=d.end.getHours()*60+d.end.getMinutes()}else{if(e.event=this.utils.event.createAnEvent(t,1,{split:a}),!e.event){e.start=null,e.split=null,e.event=null;return}e.event.resizing=!0}},unfocusEvent(){const{focusAnEvent:i,clickHoldAnEvent:e}=this.domEvents,t=this.view.events.find(s=>s._eid===(i._eid||e._eid));i._eid=null,e._eid=null,t&&(t.focused=!1,t.deleting=!1)},cancelDelete(){const{clickHoldAnEvent:i}=this.domEvents;if(i._eid){const e=this.view.events.find(t=>t._eid===i._eid);e&&(e.deleting=!1),i._eid=null,i.timeoutId=null}},onEventTitleBlur(i,e){if(e.title===i.target.innerHTML)return;const t=e.title;e.title=i.target.innerHTML;const s=this.cleanupEvent(e);this.$emit("event-title-change",{event:s,oldTitle:t}),this.$emit("event-change",{event:s,originalEvent:{...s,title:t}})},updateMutableEvents(){const i=this.utils.date;this.mutableEvents=[],this.events.forEach(e=>{const t=typeof e.start=="string"?i.stringToDate(e.start):e.start,s=i.formatDateLite(t),a=i.dateToMinutes(t);let n=null;typeof e.end=="string"&&e.end.includes("24:00")?(n=new Date(e.end.replace(" 24:00","")),n.setHours(23,59,59,0)):n=typeof e.end=="string"?i.stringToDate(e.end):e.end;let r=i.formatDateLite(n),l=i.dateToMinutes(n);(!l||l===A)&&(!this.time||typeof e.end=="string"&&e.end.length===10?n.setHours(23,59,59,0):n.setSeconds(n.getSeconds()-1),r=i.formatDateLite(n),l=A);const o=s!==r;e=Object.assign({...this.utils.event.eventDefaults},e,{_eid:`${this.uid}_${this.eventIdIncrement++}`,segments:o?{}:null,start:t,startTimeMinutes:a,end:n,endTimeMinutes:l,daysCount:o?i.countDays(t,n):1,class:e.class}),this.mutableEvents.push(e)})},minutesAtCursor(i){return this.utils.cell.minutesAtCursor(i)},createEvent(i,e,t={}){return this.utils.event.createAnEvent(i,e,t)},cleanupEvent(i){return i={...i},["segments","deletable","deleting","titleEditable","resizable","resizing","draggable","dragging","draggingStatic","focused"].forEach(t=>{t in i&&delete i[t]}),i.repeat||delete i.repeat,i},emitWithEvent(i,e){this.$emit(i,this.cleanupEvent(e))},updateSelectedDate(i){if(i&&typeof i=="string"?i=this.utils.date.stringToDate(i):i=new Date(i),i&&i instanceof Date){const{selectedDate:e}=this.view;e&&(this.transitionDirection=e.getTime()>i.getTime()?"left":"right"),i.setHours(0,0,0,0),(!e||e.getTime()!==i.getTime())&&(this.view.selectedDate=i),this.switchView(this.view.id)}this.$emit("update:selected-date",this.view.selectedDate)},getWeekNumber(i){const e=this.utils.date,s=this.firstCellDateWeekNumber+i,a=this.startWeekOnSunday?1:0;return s>52?e.getWeek(e.addDays(this.view.firstCellDate,7*i+a)):s},timeTick(){this.now=new Date,this.timeTickerIds[1]=setTimeout(this.timeTick,60*1e3)},updateDateTexts(){this.utils.date.updateTexts(this.texts)},alignWithScrollbar(){if(document.getElementById("vuecal-align-with-scrollbar"))return;const i=this.$refs.vuecal.getElementsByClassName("vuecal__scrollbar-check")[0],e=i.offsetWidth-i.children[0].offsetWidth;if(e){const t=document.createElement("style");t.id="vuecal-align-with-scrollbar",t.type="text/css",t.innerHTML=`.vuecal--view-with-time .vuecal__weekdays-headings,.vuecal--view-with-time .vuecal__all-day {padding-right: ${e}px}`,document.head.appendChild(t)}},cellOrSplitHasEvents(i,e=null){return i.length&&(!e&&i.length||e&&i.some(t=>t.split===e.id))}},created(){this.utils.cell=new U(this),this.utils.event=new G(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,(60-this.now.getSeconds())*1e3))},mounted(){const i=this.utils.date,e="ontouchstart"in window,{resize:t,drag:s,create:a,delete:n,title:r}=this.editEvents,l=this.onEventClick&&typeof this.onEventClick=="function";(t||s||a||n||r||l)&&window.addEventListener(e?"touchend":"mouseup",this.onMouseUp),(t||s||a&&this.dragToCreateEvent)&&window.addEventListener(e?"touchmove":"mousemove",this.onMouseMove,{passive:!1}),r&&window.addEventListener("keyup",this.onKeyUp),e&&(this.$refs.vuecal.oncontextmenu=function(c){c.preventDefault(),c.stopPropagation()}),this.hideBody||this.alignWithScrollbar();const o=this.view.startDate,d={view:this.view.id,startDate:o,endDate:this.view.endDate,...this.isMonthView?{firstCellDate:this.view.firstCellDate,lastCellDate:this.view.lastCellDate}:{},events:this.view.events.map(this.cleanupEvent),...this.isWeekView?{week:i.getWeek(this.startWeekOnSunday?i.addDays(o,1):o)}:{}};this.$emit("ready",d),this.ready=!0},beforeDestroy(){const i="ontouchstart"in window;window.removeEventListener(i?"touchmove":"mousemove",this.onMouseMove,{passive:!1}),window.removeEventListener(i?"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]},computed:{editEvents(){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}},views(){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")}}},currentView(){return this.validateView(this.activeView)},enabledViews(){return Object.keys(this.views).filter(i=>this.views[i].enabled)},hasTimeColumn(){return this.time&&this.isWeekOrDayView},isShortMonthView(){return this.isMonthView&&this.eventsOnMonthView==="short"},firstCellDateWeekNumber(){const i=this.utils.date,e=this.view.firstCellDate;return i.getWeek(this.startWeekOnSunday?i.addDays(e,1):e)},timeCells(){const i=[];for(let e=this.timeFrom,t=this.timeTo;e<t;e+=this.timeStep)i.push({hours:Math.floor(e/60),minutes:e%60,label:this.utils.date.formatTime(e,this.TimeFormat),value:e});return i},TimeFormat(){return this.timeFormat||(this.twelveHour?"h:mm{am}":"HH:mm")},daySplits(){return(this.splitDays.filter(i=>!i.hide)||[]).map((i,e)=>({...i,id:i.id||e+1}))},hasSplits(){return this.daySplits.length&&this.isWeekOrDayView},hasShortEvents(){return this.showAllDayEvents==="short"},cellOrSplitMinWidth(){let i=null;return this.hasSplits&&this.minSplitWidth?i=this.visibleDaysCount*this.minSplitWidth*this.daySplits.length:this.minCellWidth&&this.isWeekView&&(i=this.visibleDaysCount*this.minCellWidth),i},allDayBar(){let i=this.allDayBarHeight||null;return i&&!isNaN(i)&&(i+="px"),{cells:this.viewCells,options:this.$props,label:this.texts.allDay,shortEvents:this.hasShortEvents,daySplits:this.hasSplits&&this.daySplits||[],cellOrSplitMinWidth:this.cellOrSplitMinWidth,height:i}},minTimestamp(){let i=null;return this.minDate&&typeof this.minDate=="string"?i=this.utils.date.stringToDate(this.minDate):this.minDate&&this.minDate instanceof Date&&(i=this.minDate),i?i.getTime():null},maxTimestamp(){let i=null;return this.maxDate&&typeof this.maxDate=="string"?i=this.utils.date.stringToDate(this.maxDate):this.maxDate&&this.minDate instanceof Date&&(i=this.maxDate),i?i.getTime():null},weekDays(){let{weekDays:i,weekDaysShort:e=[]}=this.texts;return i=i.slice(0).map((t,s)=>({label:t,...e.length?{short:e[s]}:{},hide:this.hideWeekends&&s>=5||this.hideWeekdays.length&&this.hideWeekdays.includes(s+1)})),this.startWeekOnSunday&&i.unshift(i.pop()),i},weekDaysInHeader(){return this.isMonthView||this.isWeekView&&!this.minCellWidth&&!(this.hasSplits&&this.minSplitWidth)},months(){return this.texts.months.map(i=>({label:i}))},specialDayHours(){return!this.specialHours||!Object.keys(this.specialHours).length?{}:Array(7).fill("").map((i,e)=>{let t=this.specialHours[e+1]||[];return Array.isArray(t)||(t=[t]),i=[],t.forEach(({from:s,to:a,class:n,label:r},l)=>{i[l]={day:e+1,from:[null,void 0].includes(s)?null:s*1,to:[null,void 0].includes(a)?null:a*1,class:n||"",label:r||""}}),i})},viewTitle(){const i=this.utils.date;let e="";const t=this.view.startDate,s=t.getFullYear(),a=t.getMonth();switch(this.view.id){case"years":{e=this.texts.years;break}case"year":{e=s;break}case"month":{e=`${this.months[a].label} ${s}`;break}case"week":{const n=this.view.endDate,r=t.getFullYear();let l=this.texts.months[t.getMonth()];this.xsmall&&(l=l.substring(0,3));let o=`${l} ${r}`;if(n.getMonth()!==t.getMonth()){const d=n.getFullYear();let c=this.texts.months[n.getMonth()];this.xsmall&&(c=c.substring(0,3)),r===d?o=`${l} - ${c} ${r}`:this.small?o=`${l.substring(0,3)} ${r} - ${c.substring(0,3)} ${d}`:o=`${l} ${r} - ${c} ${d}`}e=`${this.texts.week} ${i.getWeek(this.startWeekOnSunday?i.addDays(t,1):t)} (${o})`;break}case"day":{e=this.utils.date.formatDate(t,this.texts.dateFormat,this.texts);break}}return e},viewCells(){const i=this.utils.date;let e=[],t=null,s=!1;this.watchRealTime||(this.now=new Date);const a=this.now;switch(this.view.id){case"years":{t=this.view.startDate.getFullYear(),e=Array.apply(null,Array(25)).map((n,r)=>{const l=new Date(t+r,0,1),o=new Date(t+r+1,0,1);return o.setSeconds(-1),{startDate:l,formattedDate:i.formatDateLite(l),endDate:o,content:t+r,current:t+r===a.getFullYear()}});break}case"year":{t=this.view.startDate.getFullYear(),e=Array.apply(null,Array(12)).map((n,r)=>{const l=new Date(t,r,1),o=new Date(t,r+1,1);return o.setSeconds(-1),{startDate:l,formattedDate:i.formatDateLite(l),endDate:o,content:this.xsmall?this.months[r].label.substr(0,3):this.months[r].label,current:r===a.getMonth()&&t===a.getFullYear()}});break}case"month":{const n=this.view.startDate.getMonth(),r=new Date(this.view.firstCellDate);s=!1,e=Array.apply(null,Array(42)).map((l,o)=>{const d=i.addDays(r,o),c=new Date(d);c.setHours(23,59,59,0);const h=!s&&i.isToday(d)&&!s++;return{startDate:d,formattedDate:i.formatDateLite(d),endDate:c,content:d.getDate(),today:h,outOfScope:d.getMonth()!==n,class:`vuecal__cell--day${d.getDay()||7}`}}),(this.hideWeekends||this.hideWeekdays.length)&&(e=e.filter(l=>{const o=l.startDate.getDay()||7;return!(this.hideWeekends&&o>=6||this.hideWeekdays.length&&this.hideWeekdays.includes(o))}));break}case"week":{s=!1;const n=this.view.startDate,r=this.weekDays;e=r.map((l,o)=>{const d=i.addDays(n,this.startWeekOnSunday?o-1:o),c=new Date(d);c.setHours(23,59,59,0);const h=(d.getDay()||7)-1;return{startDate:d,formattedDate:i.formatDateLite(d),endDate:c,today:!s&&i.isToday(d)&&!s++,specialHours:this.specialDayHours[h]||[]}}).filter((l,o)=>!r[o].hide);break}case"day":{const n=this.view.startDate,r=new Date(this.view.startDate);r.setHours(23,59,59,0);const l=(n.getDay()||7)-1;e=[{startDate:n,formattedDate:i.formatDateLite(n),endDate:r,today:i.isToday(n),specialHours:this.specialDayHours[l]||[]}];break}}return e},visibleDaysCount(){return this.isDayView?1:7-this.weekDays.reduce((i,e)=>i+e.hide,0)},cellWidth(){return 100/this.visibleDaysCount},cssClasses(){const{resizeAnEvent:i,dragAnEvent:e,dragCreateAnEvent:t}=this.domEvents;return{[`vuecal--${this.view.id}-view`]:!0,[`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":i._eid,"vuecal--drag-creating-event":t.event,"vuecal--dragging-event":e._eid,"vuecal--events-on-month-view":this.eventsOnMonthView,"vuecal--short-events":this.isMonthView&&this.eventsOnMonthView==="short","vuecal--has-touch":typeof window<"u"&&"ontouchstart"in window}},isYearsOrYearView(){return["years","year"].includes(this.view.id)},isYearsView(){return this.view.id==="years"},isYearView(){return this.view.id==="year"},isMonthView(){return this.view.id==="month"},isWeekOrDayView(){return["week","day"].includes(this.view.id)},isWeekView(){return this.view.id==="week"},isDayView(){return this.view.id==="day"}},watch:{events:{handler(i,e){this.updateMutableEvents(i),this.addEventsToView()},deep:!0},locale(i){this.loadLocale(i)},selectedDate(i){this.updateSelectedDate(i)},activeView(i){this.switchView(i)}}},ve,me,!1,null,null,null,null);return pe.exports});
@@ -0,0 +1,7 @@
1
+ "use strict";var I=Object.defineProperty;var B=(i,e,t)=>e in i?I(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var _=(i,e,t)=>(B(i,typeof e!="symbol"?e+"":e,t),t);/**
2
+ * vue-cal v3.11.0
3
+ * (c) 2022 Antoni Andre <antoniandre.web@gmail.com>
4
+ * @license MIT
5
+ */const N=require("vue"),q=i=>i&&typeof i=="object"&&"default"in i?i:{default:i},b=q(N),z=(i,e)=>{const t=i[e];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((s,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+e)))})};let M,V,H,y,S={},T={};class R{constructor(e,t=!1){_(this,"texts",{});_(this,"dateToMinutes",e=>e.getHours()*60+e.getMinutes());y=this,this._texts=e,!t&&Date&&!Date.prototype.addDays&&this._initDatePrototypes()}_initDatePrototypes(){Date.prototype.addDays=function(e){return y.addDays(this,e)},Date.prototype.subtractDays=function(e){return y.subtractDays(this,e)},Date.prototype.addHours=function(e){return y.addHours(this,e)},Date.prototype.subtractHours=function(e){return y.subtractHours(this,e)},Date.prototype.addMinutes=function(e){return y.addMinutes(this,e)},Date.prototype.subtractMinutes=function(e){return y.subtractMinutes(this,e)},Date.prototype.getWeek=function(){return y.getWeek(this)},Date.prototype.isToday=function(){return y.isToday(this)},Date.prototype.isLeapYear=function(){return y.isLeapYear(this)},Date.prototype.format=function(e="YYYY-MM-DD"){return y.formatDate(this,e)},Date.prototype.formatTime=function(e="HH:mm"){return y.formatTime(this,e)}}removePrototypes(){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}updateTexts(e){this._texts=e}_todayFormatted(){return V!==new Date().getDate()&&(M=new Date,V=M.getDate(),H=`${M.getFullYear()}-${M.getMonth()}-${M.getDate()}`),H}addDays(e,t){const s=new Date(e.valueOf());return s.setDate(s.getDate()+t),s}subtractDays(e,t){const s=new Date(e.valueOf());return s.setDate(s.getDate()-t),s}addHours(e,t){const s=new Date(e.valueOf());return s.setHours(s.getHours()+t),s}subtractHours(e,t){const s=new Date(e.valueOf());return s.setHours(s.getHours()-t),s}addMinutes(e,t){const s=new Date(e.valueOf());return s.setMinutes(s.getMinutes()+t),s}subtractMinutes(e,t){const s=new Date(e.valueOf());return s.setMinutes(s.getMinutes()-t),s}getWeek(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),s=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-s);const a=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t-a)/864e5+1)/7)}isToday(e){return`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`===this._todayFormatted()}isLeapYear(e){const t=e.getFullYear();return!(t%400)||t%100&&!(t%4)}getPreviousFirstDayOfWeek(e=null,t){const s=e&&new Date(e.valueOf())||new Date,a=t?7:6;return s.setDate(s.getDate()-(s.getDay()+a)%7),s}stringToDate(e){return e instanceof Date?e:(e.length===10&&(e+=" 00:00"),new Date(e.replace(/-/g,"/")))}countDays(e,t){typeof e=="string"&&(e=e.replace(/-/g,"/")),typeof t=="string"&&(t=t.replace(/-/g,"/")),e=new Date(e).setHours(0,0,0,0),t=new Date(t).setHours(0,0,1,0);const s=(new Date(t).getTimezoneOffset()-new Date(e).getTimezoneOffset())*60*1e3;return Math.ceil((t-e-s)/(24*3600*1e3))}datesInSameTimeStep(e,t,s){return Math.abs(e.getTime()-t.getTime())<=s*60*1e3}formatDate(e,t="YYYY-MM-DD",s=null){if(s||(s=this._texts),t||(t="YYYY-MM-DD"),t==="YYYY-MM-DD")return this.formatDateLite(e);S={},T={};const a={YYYY:()=>this._hydrateDateObject(e,s).YYYY,YY:()=>this._hydrateDateObject(e,s).YY(),M:()=>this._hydrateDateObject(e,s).M,MM:()=>this._hydrateDateObject(e,s).MM(),MMM:()=>this._hydrateDateObject(e,s).MMM(),MMMM:()=>this._hydrateDateObject(e,s).MMMM(),MMMMG:()=>this._hydrateDateObject(e,s).MMMMG(),D:()=>this._hydrateDateObject(e,s).D,DD:()=>this._hydrateDateObject(e,s).DD(),S:()=>this._hydrateDateObject(e,s).S(),d:()=>this._hydrateDateObject(e,s).d,dd:()=>this._hydrateDateObject(e,s).dd(),ddd:()=>this._hydrateDateObject(e,s).ddd(),dddd:()=>this._hydrateDateObject(e,s).dddd(),HH:()=>this._hydrateTimeObject(e,s).HH,H:()=>this._hydrateTimeObject(e,s).H,hh:()=>this._hydrateTimeObject(e,s).hh,h:()=>this._hydrateTimeObject(e,s).h,am:()=>this._hydrateTimeObject(e,s).am,AM:()=>this._hydrateTimeObject(e,s).AM,mm:()=>this._hydrateTimeObject(e,s).mm,m:()=>this._hydrateTimeObject(e,s).m};return t.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g,(n,r)=>{const l=a[r.replace(/\{|\}/g,"")];return l!==void 0?l():r})}formatDateLite(e){const t=e.getMonth()+1,s=e.getDate();return`${e.getFullYear()}-${t<10?"0":""}${t}-${s<10?"0":""}${s}`}formatTime(e,t="HH:mm",s=null,a=!1){let n=!1;if(a){const[o,u,d]=[e.getHours(),e.getMinutes(),e.getSeconds()];o+u+d===23+59+59&&(n=!0)}if(e instanceof Date&&t==="HH:mm")return n?"24:00":this.formatTimeLite(e);T={},s||(s=this._texts);const r=this._hydrateTimeObject(e,s),l=t.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g,(o,u)=>{const d=r[u.replace(/\{|\}/g,"")];return d!==void 0?d:u});return n?l.replace("23:59","24:00"):l}formatTimeLite(e){const t=e.getHours(),s=e.getMinutes();return`${(t<10?"0":"")+t}:${(s<10?"0":"")+s}`}_nth(e){if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}_hydrateDateObject(e,t){if(S.D)return S;const s=e.getFullYear(),a=e.getMonth()+1,n=e.getDate(),l=(e.getDay()-1+7)%7;return S={YYYY:s,YY:()=>s.toString().substring(2),M:a,MM:()=>(a<10?"0":"")+a,MMM:()=>t.months[a-1].substring(0,3),MMMM:()=>t.months[a-1],MMMMG:()=>(t.monthsGenitive||t.months)[a-1],D:n,DD:()=>(n<10?"0":"")+n,S:()=>this._nth(n),d:l+1,dd:()=>t.weekDays[l][0],ddd:()=>t.weekDays[l].substr(0,3),dddd:()=>t.weekDays[l]},S}_hydrateTimeObject(e,t){if(T.am)return T;let s,a;e instanceof Date?(s=e.getHours(),a=e.getMinutes()):(s=Math.floor(e/60),a=Math.floor(e%60));const n=s%12?s%12:12,r=(t||{am:"am",pm:"pm"})[s===24||s<12?"am":"pm"];return T={H:s,h:n,HH:(s<10?"0":"")+s,hh:(n<10?"0":"")+n,am:r,AM:r.toUpperCase(),m:a,mm:(a<10?"0":"")+a},T}}const U=24*60;class X{constructor(e){_(this,"_vuecal",null);_(this,"selectCell",(e=!1,t,s)=>{this._vuecal.$emit("cell-click",s?{date:t,split:s}:t),this._vuecal.clickToNavigate||e?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",s?{date:t,split:s}:t)))});_(this,"keyPressEnterCell",(e,t)=>{this._vuecal.$emit("cell-keypress-enter",t?{date:e,split:t}:e),this._vuecal.switchToNarrowerView()});_(this,"getPosition",e=>{const{left:t,top:s}=this._vuecal.$refs.cells.getBoundingClientRect(),{clientX:a,clientY:n}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:a-t,y:n-s}});_(this,"minutesAtCursor",e=>{let t=0,s={x:0,y:0};const{timeStep:a,timeCellHeight:n,timeFrom:r}=this._vuecal.$props;return typeof e=="number"?t=e:typeof e=="object"&&(s=this.getPosition(e),t=Math.round(s.y*a/parseInt(n)+r)),{minutes:Math.max(Math.min(t,U),0),cursorCoords:s}});this._vuecal=e}}const G=2,W=24*60;let h,v,$;class K{constructor(e,t){_(this,"_vuecal",null);_(this,"eventDefaults",{_eid:null,start:"",startTimeMinutes:0,end:"",endTimeMinutes:0,title:"",content:"",background:!1,allDay:!1,segments:null,repeat:null,daysCount:1,deletable:!0,deleting:!1,titleEditable:!0,resizable:!0,resizing:!1,draggable:!0,dragging:!1,draggingStatic:!1,focused:!1,class:""});this._vuecal=e,h=t}createAnEvent(e,t,s){if(typeof e=="string"&&(e=h.stringToDate(e)),!(e instanceof Date))return!1;const a=h.dateToMinutes(e);t=t*1||G*60;const n=a+t,r=h.addMinutes(new Date(e),t);s.end&&(typeof s.end=="string"&&(s.end=h.stringToDate(s.end)),s.endTimeMinutes=h.dateToMinutes(s.end));const l={...this.eventDefaults,_eid:`${this._vuecal._uid}_${this._vuecal.eventIdIncrement++}`,start:e,startTimeMinutes:a,end:r,endTimeMinutes:n,segments:null,...s};if(!(typeof this._vuecal.onEventCreate=="function"&&!this._vuecal.onEventCreate(l,()=>this.deleteAnEvent(l))))return l.startDateF!==l.endDateF&&(l.daysCount=h.countDays(l.start,l.end)),this._vuecal.mutableEvents.push(l),this._vuecal.addEventsToView([l]),this._vuecal.emitWithEvent("event-create",l),this._vuecal.$emit("event-change",{event:this._vuecal.cleanupEvent(l),originalEvent:null}),l}addEventSegment(e){e.segments||(b.default.set(e,"segments",{}),b.default.set(e.segments,h.formatDateLite(e.start),{start:e.start,startTimeMinutes:e.startTimeMinutes,endTimeMinutes:W,isFirstDay:!0,isLastDay:!1}));const t=e.segments[h.formatDateLite(e.end)];t&&(t.isLastDay=!1,t.endTimeMinutes=W);const s=h.addDays(e.end,1),a=h.formatDateLite(s);return s.setHours(0,0,0,0),b.default.set(e.segments,a,{start:s,startTimeMinutes:0,endTimeMinutes:e.endTimeMinutes,isFirstDay:!1,isLastDay:!0}),e.end=h.addMinutes(s,e.endTimeMinutes),e.daysCount=Object.keys(e.segments).length,a}removeEventSegment(e){let t=Object.keys(e.segments).length;if(t<=1)return h.formatDateLite(e.end);b.default.delete(e.segments,h.formatDateLite(e.end)),t--;const s=h.subtractDays(e.end,1),a=h.formatDateLite(s),n=e.segments[a];return t?n&&(n.isLastDay=!0,n.endTimeMinutes=e.endTimeMinutes):e.segments=null,e.daysCount=t||1,e.end=s,a}createEventSegments(e,t,s){const a=t.getTime(),n=s.getTime();let r=e.start.getTime(),l=e.end.getTime(),o=!1,u,d,c;for(!e.end.getHours()&&!e.end.getMinutes()&&(l-=1e3),b.default.set(e,"segments",{}),e.repeat?(u=a,d=Math.min(n,e.repeat.until?h.stringToDate(e.repeat.until).getTime():n)):(u=Math.max(a,r),d=Math.min(n,l));u<=d;){let p=!1;const D=h.addDays(new Date(u),1).setHours(0,0,0,0);let m,w,g,f;if(e.repeat){const k=new Date(u),C=h.formatDateLite(k);(o||e.occurrences&&e.occurrences[C])&&(o||(r=e.occurrences[C].start,c=new Date(r).setHours(0,0,0,0),l=e.occurrences[C].end),o=!0,p=!0),m=u===c,w=C===h.formatDateLite(new Date(l)),g=new Date(m?r:u),f=h.formatDateLite(g),w&&(o=!1)}else p=!0,m=u===r,w=d===l&&D>d,g=m?e.start:new Date(u),f=h.formatDateLite(m?e.start:g);p&&b.default.set(e.segments,f,{start:g,startTimeMinutes:m?e.startTimeMinutes:0,endTimeMinutes:w?e.endTimeMinutes:W,isFirstDay:m,isLastDay:w}),u=D}return e}deleteAnEvent(e){this._vuecal.emitWithEvent("event-delete",e),this._vuecal.mutableEvents=this._vuecal.mutableEvents.filter(t=>t._eid!==e._eid),this._vuecal.view.events=this._vuecal.view.events.filter(t=>t._eid!==e._eid)}checkCellOverlappingEvents(e,t){$=e.slice(0),v={},e.forEach(a=>{$.shift(),v[a._eid]||b.default.set(v,a._eid,{overlaps:[],start:a.start,position:0}),v[a._eid].position=0,$.forEach(n=>{v[n._eid]||b.default.set(v,n._eid,{overlaps:[],start:n.start,position:0});const r=this.eventInRange(n,a.start,a.end),l=t.overlapsPerTimeStep?h.datesInSameTimeStep(a.start,n.start,t.timeStep):1;if(!a.background&&!a.allDay&&!n.background&&!n.allDay&&r&&l)v[a._eid].overlaps.push(n._eid),v[a._eid].overlaps=[...new Set(v[a._eid].overlaps)],v[n._eid].overlaps.push(a._eid),v[n._eid].overlaps=[...new Set(v[n._eid].overlaps)],v[n._eid].position++;else{let o,u;(o=(v[a._eid]||{overlaps:[]}).overlaps.indexOf(n._eid))>-1&&v[a._eid].overlaps.splice(o,1),(u=(v[n._eid]||{overlaps:[]}).overlaps.indexOf(a._eid))>-1&&v[n._eid].overlaps.splice(u,1),v[n._eid].position--}})});let s=0;for(const a in v){const n=v[a],r=n.overlaps.map(l=>({id:l,start:v[l].start}));r.push({id:a,start:n.start}),r.sort((l,o)=>l.start<o.start?-1:l.start>o.start?1:l.id>o.id?-1:1),n.position=r.findIndex(l=>l.id===a),s=Math.max(this.getOverlapsStreak(n,v),s)}return[v,s]}getOverlapsStreak(e,t={}){let s=e.overlaps.length+1,a=[];return e.overlaps.forEach(n=>{a.includes(n)||e.overlaps.filter(l=>l!==n).forEach(l=>{t[l].overlaps.includes(n)||a.push(l)})}),a=[...new Set(a)],s-=a.length,s}eventInRange(e,t,s){if(e.allDay||!this._vuecal.time){const r=new Date(e.start).setHours(0,0,0,0);return new Date(e.end).setHours(23,59,0,0)>=new Date(t).setHours(0,0,0,0)&&r<=new Date(s).setHours(0,0,0,0)}const a=e.start.getTime(),n=e.end.getTime();return a<s.getTime()&&n>t.getTime()}}var Z=function(){var e=this,t=e._self._c;return t("div",{staticClass:"vuecal__flex vuecal__weekdays-headings"},[e._l(e.headings,function(s,a){return[s.hide?e._e():t("div",{key:a,staticClass:"vuecal__flex vuecal__heading",class:{today:s.today,clickable:e.cellHeadingsClickable},style:e.weekdayCellStyles,on:{click:function(n){e.view.id==="week"&&e.selectCell(s.date,n)},dblclick:function(n){e.view.id==="week"&&e.vuecal.dblclickToNavigate&&e.switchToNarrowerView()}}},[t("transition",{attrs:{name:`slide-fade--${e.transitionDirection}`,appear:e.vuecal.transitions}},[t("div",{key:e.vuecal.transitions?`${a}-${s.dayOfMonth}`:!1,staticClass:"vuecal__flex",attrs:{column:""}},[t("div",{staticClass:"vuecal__flex weekday-label",attrs:{grow:""}},[e._t("weekday-heading",function(){return[t("span",{staticClass:"full"},[e._v(e._s(s.full))]),t("span",{staticClass:"small"},[e._v(e._s(s.small))]),t("span",{staticClass:"xsmall"},[e._v(e._s(s.xsmall))]),s.dayOfMonth?t("span",[e._v("\xA0"+e._s(s.dayOfMonth))]):e._e()]},{heading:e.cleanupHeading(s),view:e.view})],2),e.vuecal.hasSplits&&e.vuecal.stickySplitLabels?t("div",{staticClass:"vuecal__flex vuecal__split-days-headers",attrs:{grow:""}},e._l(e.vuecal.daySplits,function(n,r){return t("div",{key:r,staticClass:"day-split-header",class:n.class||!1},[e._t("split-label",function(){return[e._v(e._s(n.label))]},{split:n,view:e.view})],2)}),0):e._e()])])],1)]})],2)},J=[];function E(i,e,t,s,a,n,r,l){var o=typeof i=="function"?i.options:i;e&&(o.render=e,o.staticRenderFns=t,o._compiled=!0),s&&(o.functional=!0),n&&(o._scopeId="data-v-"+n);var u;if(r?(u=function(p){p=p||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!p&&typeof __VUE_SSR_CONTEXT__<"u"&&(p=__VUE_SSR_CONTEXT__),a&&a.call(this,p),p&&p._registeredComponents&&p._registeredComponents.add(r)},o._ssrRegister=u):a&&(u=l?function(){a.call(this,(o.functional?this.parent:this).$root.$options.shadowRoot)}:a),u)if(o.functional){o._injectStyles=u;var d=o.render;o.render=function(D,m){return u.call(m),d(D,m)}}else{var c=o.beforeCreate;o.beforeCreate=c?[].concat(c,u):[u]}return{exports:i,options:o}}const Q={inject:["vuecal","utils","view"],props:{transitionDirection:{type:String,default:"right"},weekDays:{type:Array,default:()=>[]},switchToNarrowerView:{type:Function,default:()=>{}}},methods:{selectCell(i,e){i.getTime()!==this.view.selectedDate.getTime()&&(this.view.selectedDate=i),this.utils.cell.selectCell(!1,i,e)},cleanupHeading:i=>({label:i.full,date:i.date,...i.today?{today:i.today}:{}})},computed:{headings(){if(!["month","week"].includes(this.view.id))return[];let i=!1;return this.weekDays.map((t,s)=>{const a=this.utils.date.addDays(this.view.startDate,this.vuecal.startWeekOnSunday?s-1:s);return{hide:t.hide,full:t.label,small:t.short||t.label.substr(0,3),xsmall:t.short||t.label.substr(0,1),...this.view.id==="week"?{dayOfMonth:a.getDate(),date:a,today:!i&&this.utils.date.isToday(a)&&!i++}:{}}})},cellWidth(){return 100/(7-this.weekDays.reduce((i,e)=>i+e.hide,0))},weekdayCellStyles(){return{...this.vuecal.hideWeekdays.length?{width:`${this.cellWidth}%`}:{}}},cellHeadingsClickable(){return this.view.id==="week"&&(this.vuecal.clickToNavigate||this.vuecal.dblclickToNavigate)}}};var ee=E(Q,Z,J,!1,null,null,null,null);const P=ee.exports;var te=function(){var e=this,t=e._self._c;return t("div",{staticClass:"vuecal__header"},[e.options.hideViewSelector?e._e():t("div",{staticClass:"vuecal__flex vuecal__menu",attrs:{role:"tablist","aria-label":"Calendar views navigation"}},[e._l(e.viewProps.views,function(s,a){return[s.enabled?t("button",{key:a,staticClass:"vuecal__view-btn",class:{"vuecal__view-btn--active":e.view.id===a,"vuecal__view-btn--highlighted":e.highlightedControl===a},attrs:{type:"button","aria-label":`${s.label} view`},on:{dragenter:function(n){e.editEvents.drag&&e.dnd&&e.dnd.viewSelectorDragEnter(n,a,e.$data)},dragleave:function(n){e.editEvents.drag&&e.dnd&&e.dnd.viewSelectorDragLeave(n,a,e.$data)},click:function(n){return e.switchView(a,null,!0)}}},[e._v(e._s(s.label))]):e._e()]})],2),e.options.hideTitleBar?e._e():t("div",{staticClass:"vuecal__title-bar"},[t("button",{staticClass:"vuecal__arrow vuecal__arrow--prev",class:{"vuecal__arrow--highlighted":e.highlightedControl==="previous"},attrs:{type:"button","aria-label":`Previous ${e.view.id}`},on:{click:e.previous,dragenter:function(s){e.editEvents.drag&&e.dnd&&e.dnd.viewSelectorDragEnter(s,"previous",e.$data)},dragleave:function(s){e.editEvents.drag&&e.dnd&&e.dnd.viewSelectorDragLeave(s,"previous",e.$data)}}},[e._t("arrow-prev")],2),t("div",{staticClass:"vuecal__flex vuecal__title",attrs:{grow:""}},[t("transition",{attrs:{name:e.options.transitions?`slide-fade--${e.transitionDirection}`:""}},[t(e.broaderView?"button":"span",{key:`${e.view.id}${e.view.startDate.toString()}`,tag:"component",attrs:{type:!!e.broaderView&&"button","aria-label":!!e.broaderView&&`Go to ${e.broaderView} view`},on:{click:function(s){e.broaderView&&e.switchToBroaderView()}}},[e._t("title")],2)],1)],1),e.options.todayButton?t("button",{staticClass:"vuecal__today-btn",class:{"vuecal__today-btn--highlighted":e.highlightedControl==="today"},attrs:{type:"button","aria-label":"Today"},on:{click:e.goToToday,dragenter:function(s){e.editEvents.drag&&e.dnd&&e.dnd.viewSelectorDragEnter(s,"today",e.$data)},dragleave:function(s){e.editEvents.drag&&e.dnd&&e.dnd.viewSelectorDragLeave(s,"today",e.$data)}}},[e._t("today-button")],2):e._e(),t("button",{staticClass:"vuecal__arrow vuecal__arrow--next",class:{"vuecal__arrow--highlighted":e.highlightedControl==="next"},attrs:{type:"button","aria-label":`Next ${e.view.id}`},on:{click:e.next,dragenter:function(s){e.editEvents.drag&&e.dnd&&e.dnd.viewSelectorDragEnter(s,"next",e.$data)},dragleave:function(s){e.editEvents.drag&&e.dnd&&e.dnd.viewSelectorDragLeave(s,"next",e.$data)}}},[e._t("arrow-next")],2)]),e.viewProps.weekDaysInHeader?t("weekdays-headings",{attrs:{"week-days":e.weekDays,"transition-direction":e.transitionDirection,"switch-to-narrower-view":e.switchToNarrowerView},scopedSlots:e._u([e.$scopedSlots["weekday-heading"]?{key:"weekday-heading",fn:function({heading:s,view:a}){return[e._t("weekday-heading",null,{heading:s,view:a})]}}:null,e.$scopedSlots["split-label"]?{key:"split-label",fn:function({split:s}){return[e._t("split-label",null,{split:s,view:e.view})]}}:null],null,!0)}):e._e(),t("transition",{attrs:{name:`slide-fade--${e.transitionDirection}`}},[e.showDaySplits?t("div",{staticClass:"vuecal__flex vuecal__split-days-headers"},e._l(e.daySplits,function(s,a){return t("div",{key:a,staticClass:"day-split-header",class:s.class||!1},[e._t("split-label",function(){return[e._v(e._s(s.label))]},{split:s,view:e.view.id})],2)}),0):e._e()])],1)},se=[];const ie={inject:["vuecal","previous","next","switchView","updateSelectedDate","modules","view"],components:{WeekdaysHeadings:P},props:{options:{type:Object,default:()=>({})},editEvents:{type:Object,required:!0},hasSplits:{type:[Boolean,Number],default:!1},daySplits:{type:Array,default:()=>[]},viewProps:{type:Object,default:()=>({})},weekDays:{type:Array,default:()=>[]},switchToNarrowerView:{type:Function,default:()=>{}}},data:()=>({highlightedControl:null}),methods:{goToToday(){this.updateSelectedDate(new Date(new Date().setHours(0,0,0,0)))},switchToBroaderView(){this.transitionDirection="left",this.broaderView&&this.switchView(this.broaderView)}},computed:{transitionDirection:{get(){return this.vuecal.transitionDirection},set(i){this.vuecal.transitionDirection=i}},broaderView(){const{enabledViews:i}=this.vuecal;return i[i.indexOf(this.view.id)-1]},showDaySplits(){return this.view.id==="day"&&this.hasSplits&&this.options.stickySplitLabels&&!this.options.minSplitWidth},dnd(){return this.modules.dnd}}};var ne=E(ie,te,se,!1,null,null,null,null);const ae=ne.exports;var le=function(){var e=this,t=e._self._c;return t("div",{staticClass:"vuecal__event",class:e.eventClasses,style:e.eventStyles,attrs:{tabindex:"0",draggable:e.draggable},on:{focus:e.focusEvent,keypress:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:(s.stopPropagation(),e.onEnterKeypress.apply(null,arguments))},mouseenter:e.onMouseEnter,mouseleave:e.onMouseLeave,touchstart:function(s){return s.stopPropagation(),e.onTouchStart.apply(null,arguments)},mousedown:function(s){e.onMouseDown(s)},mouseup:e.onMouseUp,touchend:e.onMouseUp,touchmove:e.onTouchMove,dblclick:e.onDblClick,dragstart:function(s){e.draggable&&e.onDragStart(s)},dragend:function(s){e.draggable&&e.onDragEnd()}}},[e.vuecal.editEvents.delete&&e.event.deletable?t("div",{staticClass:"vuecal__event-delete",on:{click:function(s){return s.stopPropagation(),e.deleteEvent.apply(null,arguments)},touchstart:function(s){return s.stopPropagation(),e.touchDeleteEvent.apply(null,arguments)}}},[e._v(e._s(e.vuecal.texts.deleteEvent))]):e._e(),e._t("event",null,{event:e.event,view:e.view.id}),e.resizable?t("div",{staticClass:"vuecal__event-resize-handle",attrs:{contenteditable:"false"},on:{mousedown:function(s){return s.stopPropagation(),s.preventDefault(),e.onResizeHandleMouseDown.apply(null,arguments)},touchstart:function(s){return s.stopPropagation(),s.preventDefault(),e.onResizeHandleMouseDown.apply(null,arguments)}}}):e._e()],2)},re=[];const oe={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:!1}},data:()=>({touch:{dragThreshold:30,startX:0,startY:0,dragged:!1}}),methods:{onMouseDown(i,e=!1){if("ontouchstart"in window&&!e)return!1;const{clickHoldAnEvent:t,focusAnEvent:s,resizeAnEvent:a,dragAnEvent:n}=this.domEvents;if(s._eid===this.event._eid&&t._eid===this.event._eid)return!0;this.focusEvent(),t._eid=null,this.vuecal.editEvents.delete&&this.event.deletable&&(t.timeoutId=setTimeout(()=>{!a._eid&&!n._eid&&(t._eid=this.event._eid,this.event.deleting=!0)},t.timeout))},onMouseUp(i){this.domEvents.focusAnEvent._eid===this.event._eid&&!this.touch.dragged&&(this.domEvents.focusAnEvent.mousedUp=!0),this.touch.dragged=!1},onMouseEnter(i){i.preventDefault(),this.vuecal.emitWithEvent("event-mouse-enter",this.event)},onMouseLeave(i){i.preventDefault(),this.vuecal.emitWithEvent("event-mouse-leave",this.event)},onTouchMove(i){if(typeof this.vuecal.onEventClick!="function")return;const{clientX:e,clientY:t}=i.touches[0],{startX:s,startY:a,dragThreshold:n}=this.touch;(Math.abs(e-s)>n||Math.abs(t-a)>n)&&(this.touch.dragged=!0)},onTouchStart(i){this.touch.startX=i.touches[0].clientX,this.touch.startY=i.touches[0].clientY,this.onMouseDown(i,!0)},onEnterKeypress(i){if(typeof this.vuecal.onEventClick=="function")return this.vuecal.onEventClick(this.event,i)},onDblClick(i){if(typeof this.vuecal.onEventDblclick=="function")return this.vuecal.onEventDblclick(this.event,i)},onDragStart(i){this.dnd&&this.dnd.eventDragStart(i,this.event)},onDragEnd(){this.dnd&&this.dnd.eventDragEnd(this.event)},onResizeHandleMouseDown(){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=!0},deleteEvent(i=!1){if("ontouchstart"in window&&!i)return!1;this.utils.event.deleteAnEvent(this.event)},touchDeleteEvent(i){this.deleteEvent(!0)},cancelDeleteEvent(){this.event.deleting=!1},focusEvent(){const{focusAnEvent:i}=this.domEvents,e=i._eid;if(e!==this.event._eid){if(e){const t=this.view.events.find(s=>s._eid===e);t&&(t.focused=!1)}this.vuecal.cancelDelete(),this.vuecal.emitWithEvent("event-focus",this.event),i._eid=this.event._eid,this.event.focused=!0}}},computed:{eventDimensions(){const{startTimeMinutes:i,endTimeMinutes:e}=this.segment||this.event;let t=i-this.vuecal.timeFrom;const s=Math.max(Math.round(t*this.vuecal.timeCellHeight/this.vuecal.timeStep),0);t=Math.min(e,this.vuecal.timeTo)-this.vuecal.timeFrom;const a=Math.round(t*this.vuecal.timeCellHeight/this.vuecal.timeStep),n=Math.max(a-s,5);return{top:s,height:n}},eventStyles(){if(this.event.allDay||!this.vuecal.time||!this.event.endTimeMinutes||this.view.id==="month"||this.allDay)return{};let i=100/Math.min(this.overlaps.length+1,this.overlapsStreak),e=100/(this.overlaps.length+1)*this.eventPosition;this.vuecal.minEventWidth&&i<this.vuecal.minEventWidth&&(i=this.vuecal.minEventWidth,e=(100-this.vuecal.minEventWidth)/this.overlaps.length*this.eventPosition);const{top:t,height:s}=this.eventDimensions;return{top:`${t}px`,height:`${s}px`,width:`${i}%`,left:this.event.left&&`${this.event.left}px`||`${e}%`}},eventClasses(){const{isFirstDay:i,isLastDay:e}=this.segment||{};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&&i&&!e,"event-middle":this.segment&&!i&&!e,"event-end":this.segment&&e&&!i}},segment(){return this.event.segments&&this.event.segments[this.cellFormattedDate]||null},draggable(){const{draggable:i,background:e,daysCount:t}=this.event;return this.vuecal.editEvents.drag&&i&&!e&&t===1},resizable(){const{editEvents:i,time:e}=this.vuecal;return i.resize&&this.event.resizable&&e&&!this.allDay&&(!this.segment||this.segment&&this.segment.isLastDay)&&this.view.id!=="month"},dnd(){return this.modules.dnd}}};var ue=E(oe,le,re,!1,null,null,null,null);const de=ue.exports;var ce=function(){var e=this,t=e._self._c;return t("transition-group",{staticClass:"vuecal__cell",class:e.cellClasses,style:e.cellStyles,attrs:{name:`slide-fade--${e.transitionDirection}`,tag:"div",appear:e.options.transitions}},[e._l(e.splitsCount?e.splits:1,function(s,a){return t("div",{key:e.options.transitions?`${e.view.id}-${e.data.content}-${a}`:a,staticClass:"vuecal__flex vuecal__cell-content",class:e.splitsCount&&e.splitClasses(s),attrs:{"data-split":e.splitsCount?s.id:!1,column:"",tabindex:"0","aria-label":e.data.content},on:{focus:function(n){return e.onCellFocus(n)},keypress:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.onCellkeyPressEnter(n)},touchstart:function(n){!e.isDisabled&&e.onCellTouchStart(n,e.splitsCount?s.id:null)},mousedown:function(n){!e.isDisabled&&e.onCellMouseDown(n,e.splitsCount?s.id:null)},click:function(n){!e.isDisabled&&e.onCellClick(n)},dblclick:function(n){!e.isDisabled&&e.onCellDblClick(n)},contextmenu:function(n){!e.isDisabled&&e.options.cellContextmenu&&e.onCellContextMenu(n)},dragenter:function(n){!e.isDisabled&&e.editEvents.drag&&e.dnd&&e.dnd.cellDragEnter(n,e.$data,e.data.startDate)},dragover:function(n){!e.isDisabled&&e.editEvents.drag&&e.dnd&&e.dnd.cellDragOver(n,e.$data,e.data.startDate,e.splitsCount?s.id:null)},dragleave:function(n){!e.isDisabled&&e.editEvents.drag&&e.dnd&&e.dnd.cellDragLeave(n,e.$data,e.data.startDate)},drop:function(n){!e.isDisabled&&e.editEvents.drag&&e.dnd&&e.dnd.cellDragDrop(n,e.$data,e.data.startDate,e.splitsCount?s.id:null)}}},[e.options.showTimeInCells&&e.options.time&&e.isWeekOrDayView&&!e.allDay?t("div",{staticClass:"cell-time-labels"},e._l(e.vuecal.timeCells,function(n,r){return t("span",{key:r,staticClass:"cell-time-label"},[e._v(e._s(n.label)+`
6
+ `)])}),0):e._e(),e.isWeekOrDayView&&!e.allDay&&e.specialHours.length?e._l(e.specialHours,function(n,r){return t("div",{staticClass:"vuecal__special-hours",class:`vuecal__special-hours--day${n.day} ${n.class}`,style:`height: ${n.height}px;top: ${n.top}px`},[n.label?t("div",{staticClass:"special-hours-label",domProps:{innerHTML:e._s(n.label)}}):e._e()])}):e._e(),e._t("cell-content",null,{events:e.events,selectCell:n=>e.selectCell(n,!0),split:e.splitsCount?s:!1}),e.eventsCount&&(e.isWeekOrDayView||e.view.id==="month"&&e.options.eventsOnMonthView)?t("div",{staticClass:"vuecal__cell-events"},e._l(e.splitsCount?s.events:e.events,function(n,r){return t("event",{key:r,attrs:{"cell-formatted-date":e.data.formattedDate,event:n,"all-day":e.allDay,"cell-events":e.splitsCount?s.events:e.events,overlaps:((e.splitsCount?s.overlaps[n._eid]:e.cellOverlaps[n._eid])||[]).overlaps,"event-position":((e.splitsCount?s.overlaps[n._eid]:e.cellOverlaps[n._eid])||[]).position,"overlaps-streak":e.splitsCount?s.overlapsStreak:e.cellOverlapsStreak},scopedSlots:e._u([{key:"event",fn:function({event:l,view:o}){return[e._t("event",null,{view:o,event:l})]}}],null,!0)})}),1):e._e()],2)}),e.timelineVisible?t("div",{key:e.options.transitions?`${e.view.id}-now-line`:"now-line",staticClass:"vuecal__now-line",style:`top: ${e.todaysTimePosition}px`,attrs:{title:e.utils.date.formatTime(e.vuecal.now)}}):e._e()],2)},he=[];const ve={inject:["vuecal","utils","modules","view","domEvents"],components:{Event:de},props:{options:{type:Object,default:()=>({})},editEvents:{type:Object,required:!0},data:{type:Object,required:!0},cellSplits:{type:Array,default:()=>[]},minTimestamp:{type:[Number,null],default:null},maxTimestamp:{type:[Number,null],default:null},cellWidth:{type:[Number,Boolean],default:!1},allDay:{type:Boolean,default:!1}},data:()=>({cellOverlaps:{},cellOverlapsStreak:1,timeAtCursor:null,highlighted:!1,highlightedSplit:null}),methods:{getSplitAtCursor({target:i}){let t=i.classList.contains("vuecal__cell-split")?i:this.vuecal.findAncestor(i,"vuecal__cell-split");return t&&(t=t.attributes["data-split"].value,parseInt(t).toString()===t.toString()&&(t=parseInt(t))),t||null},splitClasses(i){return{"vuecal__cell-split":!0,"vuecal__cell-split--highlighted":this.highlightedSplit===i.id,[i.class]:!!i.class}},checkCellOverlappingEvents(){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))},isDOMElementAnEvent(i){return this.vuecal.isDOMElementAnEvent(i)},selectCell(i,e=!1){const t=this.splitsCount?this.getSplitAtCursor(i):null;this.utils.cell.selectCell(e,this.timeAtCursor,t),this.timeAtCursor=null},onCellkeyPressEnter(i){this.isSelected||this.onCellFocus(i);const e=this.splitsCount?this.getSplitAtCursor(i):null;this.utils.cell.keyPressEnterCell(this.timeAtCursor,e),this.timeAtCursor=null},onCellFocus(i){if(!this.isSelected&&!this.isDisabled){this.isSelected=this.data.startDate;const e=this.splitsCount?this.getSplitAtCursor(i):null,t=this.timeAtCursor||this.data.startDate;this.vuecal.$emit("cell-focus",e?{date:t,split:e}:t)}},onCellMouseDown(i,e=null,t=!1){if("ontouchstart"in window&&!t)return!1;this.isSelected||this.onCellFocus(i);const{clickHoldACell:s,focusAnEvent:a}=this.domEvents;this.domEvents.cancelClickEventCreation=!1,s.eventCreated=!1,this.timeAtCursor=new Date(this.data.startDate);const{minutes:n,cursorCoords:{y:r}}=this.vuecal.minutesAtCursor(i);this.timeAtCursor.setMinutes(n);const l=this.isDOMElementAnEvent(i.target);!l&&a._eid&&((this.view.events.find(o=>o._eid===a._eid)||{}).focused=!1),this.editEvents.create&&!l&&this.setUpEventCreation(i,r)},setUpEventCreation(i,e){if(this.options.dragToCreateEvent&&["week","day"].includes(this.view.id)){const{dragCreateAnEvent:t}=this.domEvents;if(t.startCursorY=e,t.split=this.splitsCount?this.getSplitAtCursor(i):null,t.start=this.timeAtCursor,this.options.snapToTime){let s=this.timeAtCursor.getHours()*60+this.timeAtCursor.getMinutes();const a=s+this.options.snapToTime/2;s=a-a%this.options.snapToTime,t.start.setHours(0,s,0,0)}}else this.options.cellClickHold&&["month","week","day"].includes(this.view.id)&&this.setUpCellHoldTimer(i)},setUpCellHoldTimer(i){const{clickHoldACell:e}=this.domEvents;e.cellId=`${this.vuecal._uid}_${this.data.formattedDate}`,e.split=this.splitsCount?this.getSplitAtCursor(i):null,e.timeoutId=setTimeout(()=>{if(e.cellId&&!this.domEvents.cancelClickEventCreation){const{_eid:t}=this.utils.event.createAnEvent(this.timeAtCursor,null,e.split?{split:e.split}:{});e.eventCreated=t}},e.timeout)},onCellTouchStart(i,e=null){this.onCellMouseDown(i,e,!0)},onCellClick(i){this.isDOMElementAnEvent(i.target)||this.selectCell(i)},onCellDblClick(i){const e=new Date(this.data.startDate);e.setMinutes(this.vuecal.minutesAtCursor(i).minutes);const t=this.splitsCount?this.getSplitAtCursor(i):null;this.vuecal.$emit("cell-dblclick",t?{date:e,split:t}:e),this.options.dblclickToNavigate&&this.vuecal.switchToNarrowerView()},onCellContextMenu(i){i.stopPropagation(),i.preventDefault();const e=new Date(this.data.startDate),{cursorCoords:t,minutes:s}=this.vuecal.minutesAtCursor(i);e.setMinutes(s);const a=this.splitsCount?this.getSplitAtCursor(i):null;this.vuecal.$emit("cell-contextmenu",{date:e,...t,...a||{},e:i})}},computed:{dnd(){return this.modules.dnd},nowInMinutes(){return this.utils.date.dateToMinutes(this.vuecal.now)},isBeforeMinDate(){return this.minTimestamp!==null&&this.minTimestamp>this.data.endDate.getTime()},isAfterMaxDate(){return this.maxTimestamp&&this.maxTimestamp<this.data.startDate.getTime()},isDisabled(){const{disableDays:i}=this.options,{isYearsOrYearView:e}=this.vuecal;return i.length&&i.includes(this.data.formattedDate)&&!e?!0:this.isBeforeMinDate||this.isAfterMaxDate},isSelected:{get(){let i=!1;const{selectedDate:e}=this.view;return this.view.id==="years"?i=e.getFullYear()===this.data.startDate.getFullYear():this.view.id==="year"?i=e.getFullYear()===this.data.startDate.getFullYear()&&e.getMonth()===this.data.startDate.getMonth():i=e.getTime()===this.data.startDate.getTime(),i},set(i){this.view.selectedDate=i,this.vuecal.$emit("update:selected-date",this.view.selectedDate)}},isWeekOrDayView(){return["week","day"].includes(this.view.id)},transitionDirection(){return this.vuecal.transitionDirection},specialHours(){return this.data.specialHours.map(i=>{let{from:e,to:t}=i;return e=Math.max(e,this.options.timeFrom),t=Math.min(t,this.options.timeTo),{...i,height:(t-e)*this.timeScale,top:(e-this.options.timeFrom)*this.timeScale}})},events(){const{startDate:i,endDate:e}=this.data;let t=[];if(!(["years","year"].includes(this.view.id)&&!this.options.eventsCountOnYearView)){if(t=this.view.events.slice(0),this.view.id==="month"&&t.push(...this.view.outOfScopeEvents),t=t.filter(s=>this.utils.event.eventInRange(s,i,e)),this.options.showAllDayEvents&&this.view.id!=="month"&&(t=t.filter(s=>!!s.allDay===this.allDay)),this.options.time&&this.isWeekOrDayView&&!this.allDay){const{timeFrom:s,timeTo:a}=this.options;t=t.filter(n=>{const r=n.daysCount>1&&n.segments[this.data.formattedDate]||{},l=n.daysCount===1&&n.startTimeMinutes<a&&n.endTimeMinutes>s,o=n.daysCount>1&&r.startTimeMinutes<a&&r.endTimeMinutes>s,u=!1;return n.allDay||l||o||u})}this.options.time&&this.isWeekOrDayView&&!(this.options.showAllDayEvents&&this.allDay)&&t.sort((s,a)=>s.start<a.start?-1:1),this.cellSplits.length||this.$nextTick(this.checkCellOverlappingEvents)}return t},eventsCount(){return this.events.length},splits(){return this.cellSplits.map((i,e)=>{const t=this.events.filter(n=>n.split===i.id),[s,a]=this.utils.event.checkCellOverlappingEvents(t.filter(n=>!n.background&&!n.allDay),this.options);return{...i,overlaps:s,overlapsStreak:a,events:t}})},splitsCount(){return this.splits.length},cellClasses(){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}},cellStyles(){return{...this.cellWidth?{width:`${this.cellWidth}%`}:{}}},timelineVisible(){const{time:i,timeTo:e}=this.options;return this.data.today&&this.isWeekOrDayView&&i&&!this.allDay&&this.nowInMinutes<=e},todaysTimePosition(){if(!this.data.today||!this.options.time)return;const i=this.nowInMinutes-this.options.timeFrom;return Math.round(i*this.timeScale)},timeScale(){return this.options.timeCellHeight/this.options.timeStep}}};var me=E(ve,ce,he,!1,null,null,null,null);const F=me.exports;var pe=function(){var e=this,t=e._self._c;return t("div",{staticClass:"vuecal__flex vuecal__all-day",style:e.cellOrSplitMinWidth&&{height:e.height}},[e.cellOrSplitMinWidth?e._e():t("div",{staticClass:"vuecal__all-day-text",staticStyle:{width:"3em"}},[t("span",[e._v(e._s(e.label))])]),t("div",{staticClass:"vuecal__flex vuecal__cells",class:`${e.view.id}-view`,style:e.cellOrSplitMinWidth?`min-width: ${e.cellOrSplitMinWidth}px`:"",attrs:{grow:""}},e._l(e.cells,function(s,a){return t("vuecal-cell",{key:a,attrs:{options:e.options,"edit-events":e.editEvents,data:s,"all-day":!0,"cell-width":e.options.hideWeekdays.length&&(e.vuecal.isWeekView||e.vuecal.isMonthView)&&e.vuecal.cellWidth,"min-timestamp":e.options.minTimestamp,"max-timestamp":e.options.maxTimestamp,"cell-splits":e.daySplits},scopedSlots:e._u([{key:"event",fn:function({event:n,view:r}){return[e._t("event",null,{view:r,event:n})]}}],null,!0)})}),1)])},fe=[];const ye={inject:["vuecal","view","editEvents"],components:{"vuecal-cell":F},props:{options:{type:Object,required:!0},cells:{type:Array,required:!0},label:{type:String,required:!0},daySplits:{type:Array,default:()=>[]},shortEvents:{type:Boolean,default:!0},height:{type:String,default:""},cellOrSplitMinWidth:{type:Number,default:null}},computed:{hasCellOrSplitWidth(){return!!(this.options.minCellWidth||this.daySplits.length&&this.options.minSplitWidth)}}};var we=E(ye,pe,fe,!1,null,null,null,null);const _e=we.exports;var De=function(){var e=this,t=e._self._c;return t("div",{ref:"vuecal",staticClass:"vuecal__flex vuecal",class:e.cssClasses,attrs:{column:"",lang:e.locale}},[t("vuecal-header",{attrs:{options:e.$props,"edit-events":e.editEvents,"view-props":{views:e.views,weekDaysInHeader:e.weekDaysInHeader},"week-days":e.weekDays,"has-splits":e.hasSplits,"day-splits":e.daySplits,"switch-to-narrower-view":e.switchToNarrowerView},scopedSlots:e._u([{key:"arrow-prev",fn:function(){return[e._t("arrow-prev",function(){return[e._v("\xA0"),t("i",{staticClass:"angle"}),e._v("\xA0")]})]},proxy:!0},{key:"arrow-next",fn:function(){return[e._t("arrow-next",function(){return[e._v("\xA0"),t("i",{staticClass:"angle"}),e._v("\xA0")]})]},proxy:!0},{key:"today-button",fn:function(){return[e._t("today-button",function(){return[t("span",{staticClass:"default"},[e._v(e._s(e.texts.today))])]})]},proxy:!0},{key:"title",fn:function(){return[e._t("title",function(){return[e._v(e._s(e.viewTitle))]},{title:e.viewTitle,view:e.view})]},proxy:!0},e.$scopedSlots["weekday-heading"]?{key:"weekday-heading",fn:function({heading:s,view:a}){return[e._t("weekday-heading",null,{heading:s,view:a})]}}:null,e.$scopedSlots["split-label"]?{key:"split-label",fn:function({split:s}){return[e._t("split-label",null,{split:s,view:e.view.id})]}}:null],null,!0)}),e.hideBody?e._e():t("div",{staticClass:"vuecal__flex vuecal__body",attrs:{grow:""}},[t("transition",{attrs:{name:`slide-fade--${e.transitionDirection}`,appear:e.transitions}},[t("div",{key:e.transitions?e.view.id:!1,staticClass:"vuecal__flex",staticStyle:{"min-width":"100%"},attrs:{column:""}},[e.showAllDayEvents&&e.hasTimeColumn&&(!e.cellOrSplitMinWidth||e.isDayView&&!e.minSplitWidth)?t("all-day-bar",e._b({scopedSlots:e._u([{key:"event",fn:function({event:s,view:a}){return[e._t("event",function(){return[e.editEvents.title&&s.titleEditable?t("div",{staticClass:"vuecal__event-title vuecal__event-title--edit",attrs:{contenteditable:""},domProps:{innerHTML:e._s(s.title)},on:{blur:function(n){return e.onEventTitleBlur(n,s)}}}):s.title?t("div",{staticClass:"vuecal__event-title",domProps:{innerHTML:e._s(s.title)}}):e._e(),s.content&&!e.hasShortEvents&&!e.isShortMonthView?t("div",{staticClass:"vuecal__event-content",domProps:{innerHTML:e._s(s.content)}}):e._e()]},{view:a,event:s})]}}],null,!0)},"all-day-bar",e.allDayBar,!1)):e._e(),t("div",{staticClass:"vuecal__bg",class:{vuecal__flex:!e.hasTimeColumn},attrs:{column:""}},[t("div",{staticClass:"vuecal__flex",attrs:{row:"",grow:""}},[e.hasTimeColumn?t("div",{staticClass:"vuecal__time-column"},[e.showAllDayEvents&&e.cellOrSplitMinWidth&&!(e.isDayView&&!e.minSplitWidth)?t("div",{staticClass:"vuecal__all-day-text",style:{height:e.allDayBar.height}},[t("span",[e._v(e._s(e.texts.allDay))])]):e._e(),e._l(e.timeCells,function(s,a){return t("div",{key:a,staticClass:"vuecal__time-cell",style:`height: ${e.timeCellHeight}px`},[e._t("time-cell",function(){return[t("span",{staticClass:"vuecal__time-cell-line"}),t("span",{staticClass:"vuecal__time-cell-label"},[e._v(e._s(s.label))])]},{hours:s.hours,minutes:s.minutes})],2)})],2):e._e(),e.showWeekNumbers&&e.isMonthView?t("div",{staticClass:"vuecal__flex vuecal__week-numbers",attrs:{column:""}},e._l(6,function(s){return t("div",{key:s,staticClass:"vuecal__flex vuecal__week-number-cell",attrs:{grow:""}},[e._t("week-number-cell",function(){return[e._v(e._s(e.getWeekNumber(s-1)))]},{week:e.getWeekNumber(s-1)})],2)}),0):e._e(),t("div",{staticClass:"vuecal__flex vuecal__cells",class:`${e.view.id}-view`,attrs:{grow:"",wrap:!e.cellOrSplitMinWidth||!e.isWeekView,column:!!e.cellOrSplitMinWidth}},[e.cellOrSplitMinWidth&&e.isWeekView?t("weekdays-headings",{style:e.cellOrSplitMinWidth?`min-width: ${e.cellOrSplitMinWidth}px`:"",attrs:{"transition-direction":e.transitionDirection,"week-days":e.weekDays,"switch-to-narrower-view":e.switchToNarrowerView},scopedSlots:e._u([e.$scopedSlots["weekday-heading"]?{key:"weekday-heading",fn:function({heading:s,view:a}){return[e._t("weekday-heading",null,{heading:s,view:a})]}}:null,e.$scopedSlots["split-label"]?{key:"split-label",fn:function({split:s}){return[e._t("split-label",null,{split:s,view:e.view.id})]}}:null],null,!0)}):e.hasSplits&&e.stickySplitLabels&&e.minSplitWidth?t("div",{staticClass:"vuecal__flex vuecal__split-days-headers",style:e.cellOrSplitMinWidth?`min-width: ${e.cellOrSplitMinWidth}px`:""},e._l(e.daySplits,function(s,a){return t("div",{key:a,staticClass:"day-split-header",class:s.class||!1},[e._t("split-label",function(){return[e._v(e._s(s.label))]},{split:s,view:e.view.id})],2)}),0):e._e(),e.showAllDayEvents&&e.hasTimeColumn&&(e.isWeekView&&e.cellOrSplitMinWidth||e.isDayView&&e.hasSplits&&e.minSplitWidth)?t("all-day-bar",e._b({scopedSlots:e._u([{key:"event",fn:function({event:s,view:a}){return[e._t("event",function(){return[e.editEvents.title&&s.titleEditable?t("div",{staticClass:"vuecal__event-title vuecal__event-title--edit",attrs:{contenteditable:""},domProps:{innerHTML:e._s(s.title)},on:{blur:function(n){return e.onEventTitleBlur(n,s)}}}):s.title?t("div",{staticClass:"vuecal__event-title",domProps:{innerHTML:e._s(s.title)}}):e._e(),s.content&&!e.hasShortEvents&&!e.isShortMonthView?t("div",{staticClass:"vuecal__event-content",domProps:{innerHTML:e._s(s.content)}}):e._e()]},{view:a,event:s})]}}],null,!0)},"all-day-bar",e.allDayBar,!1)):e._e(),t("div",{ref:"cells",staticClass:"vuecal__flex",style:e.cellOrSplitMinWidth?`min-width: ${e.cellOrSplitMinWidth}px`:"",attrs:{grow:"",wrap:!e.cellOrSplitMinWidth||!e.isWeekView}},e._l(e.viewCells,function(s,a){return t("vuecal-cell",{key:a,attrs:{options:e.$props,"edit-events":e.editEvents,data:s,"cell-width":e.hideWeekdays.length&&(e.isWeekView||e.isMonthView)&&e.cellWidth,"min-timestamp":e.minTimestamp,"max-timestamp":e.maxTimestamp,"cell-splits":e.hasSplits&&e.daySplits||[]},scopedSlots:e._u([{key:"cell-content",fn:function({events:n,split:r,selectCell:l}){return[e._t("cell-content",function(){return[r&&!e.stickySplitLabels?t("div",{staticClass:"split-label",domProps:{innerHTML:e._s(r.label)}}):e._e(),s.content?t("div",{staticClass:"vuecal__cell-date",domProps:{innerHTML:e._s(s.content)}}):e._e(),(e.isMonthView&&!e.eventsOnMonthView||e.isYearsOrYearView&&e.eventsCountOnYearView)&&n.length?t("div",{staticClass:"vuecal__cell-events-count"},[e._t("events-count",function(){return[e._v(e._s(n.length))]},{view:e.view,events:n})],2):e._e(),!e.cellOrSplitHasEvents(n,r)&&e.isWeekOrDayView?t("div",{staticClass:"vuecal__no-event"},[e._t("no-event",function(){return[e._v(e._s(e.texts.noEvent))]})],2):e._e()]},{cell:s,view:e.view,goNarrower:l,events:n})]}},{key:"event",fn:function({event:n,view:r}){return[e._t("event",function(){return[e.editEvents.title&&n.titleEditable?t("div",{staticClass:"vuecal__event-title vuecal__event-title--edit",attrs:{contenteditable:""},domProps:{innerHTML:e._s(n.title)},on:{blur:function(l){return e.onEventTitleBlur(l,n)}}}):n.title?t("div",{staticClass:"vuecal__event-title",domProps:{innerHTML:e._s(n.title)}}):e._e(),e.time&&!n.allDay&&!(e.isMonthView&&(n.allDay||e.showAllDayEvents==="short"))&&!e.isShortMonthView?t("div",{staticClass:"vuecal__event-time"},[e._v(e._s(e.utils.date.formatTime(n.start,e.TimeFormat))),n.endTimeMinutes?t("span",[e._v("\xA0- "+e._s(e.utils.date.formatTime(n.end,e.TimeFormat,null,!0)))]):e._e(),n.daysCount>1&&(n.segments[s.formattedDate]||{}).isFirstDay?t("small",{staticClass:"days-to-end"},[e._v("\xA0+"+e._s(n.daysCount-1)+e._s((e.texts.day[0]||"").toLowerCase()))]):e._e()]):e._e(),n.content&&!(e.isMonthView&&n.allDay&&e.showAllDayEvents==="short")&&!e.isShortMonthView?t("div",{staticClass:"vuecal__event-content",domProps:{innerHTML:e._s(n.content)}}):e._e()]},{view:r,event:n})]}},{key:"no-event",fn:function(){return[e._t("no-event",function(){return[e._v(e._s(e.texts.noEvent))]})]},proxy:!0}],null,!0)})}),1)],1)])])],1)]),e.ready?e._e():t("div",{staticClass:"vuecal__scrollbar-check"},[t("div")])],1)],1)},ge=[];const j=24*60,O={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"},x=["years","year","month","week","day"],Y=new R(O),be={name:"vue-cal",components:{"vuecal-cell":F,"vuecal-header":ae,WeekdaysHeadings:P,AllDayBar:_e},provide(){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}},props:{activeView:{type:String,default:"week"},allDayBarHeight:{type:[String,Number],default:"25px"},cellClickHold:{type:Boolean,default:!0},cellContextmenu:{type:Boolean,default:!1},clickToNavigate:{type:Boolean,default:!1},dblclickToNavigate:{type:Boolean,default:!0},disableDatePrototypes:{type:Boolean,default:!1},disableDays:{type:Array,default:()=>[]},disableViews:{type:Array,default:()=>[]},dragToCreateEvent:{type:Boolean,default:!0},dragToCreateThreshold:{type:Number,default:15},editableEvents:{type:[Boolean,Object],default:!1},events:{type:Array,default:()=>[]},eventsCountOnYearView:{type:Boolean,default:!1},eventsOnMonthView:{type:[Boolean,String],default:!1},hideBody:{type:Boolean,default:!1},hideTitleBar:{type:Boolean,default:!1},hideViewSelector:{type:Boolean,default:!1},hideWeekdays:{type:Array,default:()=>[]},hideWeekends:{type:Boolean,default:!1},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:!1},resizeX:{type:Boolean,default:!1},selectedDate:{type:[String,Date],default:""},showAllDayEvents:{type:[Boolean,String],default:!1},showTimeInCells:{type:Boolean,default:!1},showWeekNumbers:{type:[Boolean,String],default:!1},snapToTime:{type:Number,default:0},small:{type:Boolean,default:!1},specialHours:{type:Object,default:()=>({})},splitDays:{type:Array,default:()=>[]},startWeekOnSunday:{type:Boolean,default:!1},stickySplitLabels:{type:Boolean,default:!1},time:{type:Boolean,default:!0},timeCellHeight:{type:Number,default:40},timeFormat:{type:String,default:""},timeFrom:{type:Number,default:0},timeStep:{type:Number,default:60},timeTo:{type:Number,default:j},todayButton:{type:Boolean,default:!1},transitions:{type:Boolean,default:!0},twelveHour:{type:Boolean,default:!1},watchRealTime:{type:Boolean,default:!1},xsmall:{type:Boolean,default:!1}},data(){return{ready:!1,texts:{...O},utils:{date:(this.disableDatePrototypes?Y.removePrototypes():!1)||Y,cell:null,event:null},modules:{dnd: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:!1},clickHoldAnEvent:{_eid:null,timeout:1200,timeoutId:null},dblTapACell:{taps:0,timeout:500},clickHoldACell:{cellId:null,split:null,timeout:1200,timeoutId:null,eventCreated:!1},cancelClickEventCreation:!1},mutableEvents:[],transitionDirection:"right"}},methods:{async loadLocale(i){if(typeof this.locale=="object"){this.texts=Object.assign({},O,i),this.utils.date.updateTexts(this.texts);return}if(this.locale==="en"){const e=await Promise.resolve().then(()=>require("./i18n/en.cjs.js"));this.texts=Object.assign({},O,e)}else z(Object.assign({"./i18n/ar.json":()=>Promise.resolve().then(()=>require("./i18n/ar.cjs.js")),"./i18n/bg.json":()=>Promise.resolve().then(()=>require("./i18n/bg.cjs.js")),"./i18n/bn.json":()=>Promise.resolve().then(()=>require("./i18n/bn.cjs.js")),"./i18n/bs.json":()=>Promise.resolve().then(()=>require("./i18n/bs.cjs.js")),"./i18n/ca.json":()=>Promise.resolve().then(()=>require("./i18n/ca.cjs.js")),"./i18n/cs.json":()=>Promise.resolve().then(()=>require("./i18n/cs.cjs.js")),"./i18n/da.json":()=>Promise.resolve().then(()=>require("./i18n/da.cjs.js")),"./i18n/de.json":()=>Promise.resolve().then(()=>require("./i18n/de.cjs.js")),"./i18n/el.json":()=>Promise.resolve().then(()=>require("./i18n/el.cjs.js")),"./i18n/en.json":()=>Promise.resolve().then(()=>require("./i18n/en.cjs.js")),"./i18n/es.json":()=>Promise.resolve().then(()=>require("./i18n/es.cjs.js")),"./i18n/fa.json":()=>Promise.resolve().then(()=>require("./i18n/fa.cjs.js")),"./i18n/fr.json":()=>Promise.resolve().then(()=>require("./i18n/fr.cjs.js")),"./i18n/he.json":()=>Promise.resolve().then(()=>require("./i18n/he.cjs.js")),"./i18n/hr.json":()=>Promise.resolve().then(()=>require("./i18n/hr.cjs.js")),"./i18n/hu.json":()=>Promise.resolve().then(()=>require("./i18n/hu.cjs.js")),"./i18n/id.json":()=>Promise.resolve().then(()=>require("./i18n/id.cjs.js")),"./i18n/is.json":()=>Promise.resolve().then(()=>require("./i18n/is.cjs.js")),"./i18n/it.json":()=>Promise.resolve().then(()=>require("./i18n/it.cjs.js")),"./i18n/ja.json":()=>Promise.resolve().then(()=>require("./i18n/ja.cjs.js")),"./i18n/ka.json":()=>Promise.resolve().then(()=>require("./i18n/ka.cjs.js")),"./i18n/ko.json":()=>Promise.resolve().then(()=>require("./i18n/ko.cjs.js")),"./i18n/lt.json":()=>Promise.resolve().then(()=>require("./i18n/lt.cjs.js")),"./i18n/mn.json":()=>Promise.resolve().then(()=>require("./i18n/mn.cjs.js")),"./i18n/nl.json":()=>Promise.resolve().then(()=>require("./i18n/nl.cjs.js")),"./i18n/no.json":()=>Promise.resolve().then(()=>require("./i18n/no.cjs.js")),"./i18n/pl.json":()=>Promise.resolve().then(()=>require("./i18n/pl.cjs.js")),"./i18n/pt-br.json":()=>Promise.resolve().then(()=>require("./i18n/pt-br.cjs.js")),"./i18n/ro.json":()=>Promise.resolve().then(()=>require("./i18n/ro.cjs.js")),"./i18n/ru.json":()=>Promise.resolve().then(()=>require("./i18n/ru.cjs.js")),"./i18n/sk.json":()=>Promise.resolve().then(()=>require("./i18n/sk.cjs.js")),"./i18n/sl.json":()=>Promise.resolve().then(()=>require("./i18n/sl.cjs.js")),"./i18n/sq.json":()=>Promise.resolve().then(()=>require("./i18n/sq.cjs.js")),"./i18n/sr.json":()=>Promise.resolve().then(()=>require("./i18n/sr.cjs.js")),"./i18n/sv.json":()=>Promise.resolve().then(()=>require("./i18n/sv.cjs.js")),"./i18n/tr.json":()=>Promise.resolve().then(()=>require("./i18n/tr.cjs.js")),"./i18n/uk.json":()=>Promise.resolve().then(()=>require("./i18n/uk.cjs.js")),"./i18n/vi.json":()=>Promise.resolve().then(()=>require("./i18n/vi.cjs.js")),"./i18n/zh-cn.json":()=>Promise.resolve().then(()=>require("./i18n/zh-cn.cjs.js")),"./i18n/zh-hk.json":()=>Promise.resolve().then(()=>require("./i18n/zh-hk.cjs.js"))}),`./i18n/${i}.json`).then(e=>{this.texts=Object.assign({},O,e.default),this.utils.date.updateTexts(this.texts)})},loadDragAndDrop(){Promise.resolve().then(()=>require("./drag-and-drop.cjs.js")).then(i=>{const{DragAndDrop:e}=i;this.modules.dnd=new e(this)}).catch(()=>console.warn("Vue Cal: Missing drag & drop module."))},validateView(i){return x.includes(i)||(console.error(`Vue Cal: invalid active-view parameter provided: "${i}".
7
+ A valid view must be one of: ${x.join(", ")}.`),i="week"),this.enabledViews.includes(i)||(console.warn(`Vue Cal: the provided active-view "${i}" is disabled. Using the "${this.enabledViews[0]}" view instead.`),i=this.enabledViews[0]),i},switchToNarrowerView(i=null){this.transitionDirection="right";const e=this.enabledViews[this.enabledViews.indexOf(this.view.id)+1];e&&this.switchView(e,i)},switchView(i,e=null,t=!1){i=this.validateView(i);const s=this.utils.date,a=this.view.startDate&&this.view.startDate.getTime();if(this.transitions&&t){if(this.view.id===i)return;const l=this.enabledViews;this.transitionDirection=l.indexOf(this.view.id)>l.indexOf(i)?"left":"right"}const n=this.view.id;switch(this.view.events=[],this.view.id=i,this.view.firstCellDate=null,this.view.lastCellDate=null,e||(e=this.view.selectedDate||this.view.startDate),i){case"years":{this.view.startDate=new Date(Math.floor(e.getFullYear()/25)*25||2e3,0,1),this.view.endDate=new Date(this.view.startDate.getFullYear()+25,0,1),this.view.endDate.setSeconds(-1);break}case"year":{this.view.startDate=new Date(e.getFullYear(),0,1),this.view.endDate=new Date(e.getFullYear()+1,0,1),this.view.endDate.setSeconds(-1);break}case"month":{this.view.startDate=new Date(e.getFullYear(),e.getMonth(),1),this.view.endDate=new Date(e.getFullYear(),e.getMonth()+1,1),this.view.endDate.setSeconds(-1);let l=new Date(this.view.startDate);if(l.getDay()!==(this.startWeekOnSunday?0:1)&&(l=s.getPreviousFirstDayOfWeek(l,this.startWeekOnSunday)),this.view.firstCellDate=l,this.view.lastCellDate=s.addDays(l,41),this.view.lastCellDate.setHours(23,59,59,0),this.hideWeekends){if([0,6].includes(this.view.firstCellDate.getDay())){const o=this.view.firstCellDate.getDay()===6&&!this.startWeekOnSunday?2:1;this.view.firstCellDate=s.addDays(this.view.firstCellDate,o)}if([0,6].includes(this.view.startDate.getDay())){const o=this.view.startDate.getDay()===6?2:1;this.view.startDate=s.addDays(this.view.startDate,o)}if([0,6].includes(this.view.lastCellDate.getDay())){const o=this.view.lastCellDate.getDay()===0&&!this.startWeekOnSunday?2:1;this.view.lastCellDate=s.subtractDays(this.view.lastCellDate,o)}if([0,6].includes(this.view.endDate.getDay())){const o=this.view.endDate.getDay()===0?2:1;this.view.endDate=s.subtractDays(this.view.endDate,o)}}break}case"week":{e=s.getPreviousFirstDayOfWeek(e,this.startWeekOnSunday);const l=this.hideWeekends?5:7;this.view.startDate=this.hideWeekends&&this.startWeekOnSunday?s.addDays(e,1):e,this.view.startDate.setHours(0,0,0,0),this.view.endDate=s.addDays(e,l),this.view.endDate.setSeconds(-1);break}case"day":{this.view.startDate=e,this.view.startDate.setHours(0,0,0,0),this.view.endDate=new Date(e),this.view.endDate.setHours(23,59,59,0);break}}this.addEventsToView();const r=this.view.startDate&&this.view.startDate.getTime();if(!(n===i&&r===a)&&(this.$emit("update:activeView",i),this.ready)){const l=this.view.startDate,o={view:i,startDate:l,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:s.getWeek(this.startWeekOnSunday?s.addDays(l,1):l)}:{}};this.$emit("view-change",o)}},previous(){this.previousNext(!1)},next(){this.previousNext()},previousNext(i=!0){const e=this.utils.date;this.transitionDirection=i?"right":"left";const t=i?1:-1;let s=null;const{startDate:a,id:n}=this.view;switch(n){case"years":s=new Date(a.getFullYear()+25*t,0,1);break;case"year":s=new Date(a.getFullYear()+1*t,1,1);break;case"month":s=new Date(a.getFullYear(),a.getMonth()+1*t,1);break;case"week":s=e[i?"addDays":"subtractDays"](e.getPreviousFirstDayOfWeek(a,this.startWeekOnSunday),7);break;case"day":s=e[i?"addDays":"subtractDays"](a,1);const r=s.getDay(),l=this.startWeekOnSunday?r:(r||7)-1;if(this.weekDays[l].hide){const u=this.weekDays.map((c,p)=>({...c,i:p}));let d=0;i?([...u.slice(l),...u].find(c=>(d++,!c.hide)).i,d--):[...u,...u.slice(0,l)].reverse().find(c=>(d++,!c.hide)).i,s=e[i?"addDays":"subtractDays"](s,d)}break}s&&this.switchView(n,s)},addEventsToView(i=[]){const e=this.utils.event,{startDate:t,endDate:s,firstCellDate:a,lastCellDate:n}=this.view;if(i.length||(this.view.events=[]),i=i.length?i:[...this.mutableEvents],!i||this.isYearsOrYearView&&!this.eventsCountOnYearView)return;let r=i.filter(l=>e.eventInRange(l,t,s));!this.isYearsOrYearView&&!(this.isMonthView&&!this.eventsOnMonthView)&&(r=r.map(l=>l.daysCount>1?e.createEventSegments(l,a||t,n||s):l)),this.view.events.push(...r),this.isMonthView&&(this.view.outOfScopeEvents=[],i.forEach(l=>{(e.eventInRange(l,a,t)||e.eventInRange(l,s,n))&&(this.view.events.some(o=>o._eid===l._eid)||this.view.outOfScopeEvents.push(l))}))},findAncestor(i,e){for(;(i=i.parentElement)&&!i.classList.contains(e););return i},isDOMElementAnEvent(i){return i.classList.contains("vuecal__event")||this.findAncestor(i,"vuecal__event")},onMouseMove(i){const{resizeAnEvent:e,dragAnEvent:t,dragCreateAnEvent:s}=this.domEvents;e._eid===null&&t._eid===null&&!s.start||(i.preventDefault(),e._eid?this.eventResizing(i):this.dragToCreateEvent&&s.start&&this.eventDragCreation(i))},onMouseUp(i){const{focusAnEvent:e,resizeAnEvent:t,clickHoldAnEvent:s,clickHoldACell:a,dragCreateAnEvent:n}=this.domEvents,{_eid:r}=s,{_eid:l}=t;let o=!1;const{event:u,start:d}=n,c=this.isDOMElementAnEvent(i.target),p=e.mousedUp;if(e.mousedUp=!1,c&&(this.domEvents.cancelClickEventCreation=!0),a.eventCreated)return;if(l){const{originalEnd:m,originalEndTimeMinutes:w,endTimeMinutes:g}=t,f=this.view.events.find(k=>k._eid===t._eid);if(o=g&&g!==w,f&&f.end.getTime()!==m.getTime()){const k=this.mutableEvents.find(L=>L._eid===t._eid);k.endTimeMinutes=f.endTimeMinutes,k.end=f.end;const C=this.cleanupEvent(f),A={...this.cleanupEvent(f),end:m,endTimeMinutes:f.originalEndTimeMinutes};this.$emit("event-duration-change",{event:C,oldDate:t.originalEnd,originalEvent:A}),this.$emit("event-change",{event:C,originalEvent:A})}f&&(f.resizing=!1),t._eid=null,t.start=null,t.split=null,t.segment=null,t.originalEndTimeMinutes=null,t.originalEnd=null,t.endTimeMinutes=null,t.startCell=null,t.endCell=null}else d&&(u&&(this.emitWithEvent("event-drag-create",u),n.event.resizing=!1),n.start=null,n.split=null,n.event=null);!c&&!l&&this.unfocusEvent(),s.timeoutId&&!r&&(clearTimeout(s.timeoutId),s.timeoutId=null),a.timeoutId&&(clearTimeout(a.timeoutId),a.timeoutId=null);const D=typeof this.onEventClick=="function";if(p&&!o&&!r&&!u&&D){let m=this.view.events.find(w=>w._eid===e._eid);return!m&&this.isMonthView&&(m=this.view.outOfScopeEvents.find(w=>w._eid===e._eid)),m&&this.onEventClick(m,i)}},onKeyUp(i){i.keyCode===27&&this.cancelDelete()},eventResizing(i){const{resizeAnEvent:e}=this.domEvents,t=this.view.events.find(u=>u._eid===e._eid)||{segments:{}},{minutes:s,cursorCoords:a}=this.minutesAtCursor(i),n=t.segments&&t.segments[e.segment],{date:r,event:l}=this.utils,o=Math.max(s,this.timeFrom+1,(n||t).startTimeMinutes+1);if(t.endTimeMinutes=e.endTimeMinutes=o,this.snapToTime){const u=t.endTimeMinutes+this.snapToTime/2;t.endTimeMinutes=u-u%this.snapToTime}if(n&&(n.endTimeMinutes=t.endTimeMinutes),t.end.setHours(0,t.endTimeMinutes,t.endTimeMinutes===j?-1:0,0),this.resizeX&&this.isWeekView){t.daysCount=r.countDays(t.start,t.end);const u=this.$refs.cells,d=u.offsetWidth/u.childElementCount,c=Math.floor(a.x/d);if(e.startCell===null&&(e.startCell=c-(t.daysCount-1)),e.endCell!==c){e.endCell=c;const p=r.addDays(t.start,c-e.startCell),D=Math.max(r.countDays(t.start,p),1);if(D!==t.daysCount){let m=null;D>t.daysCount?m=l.addEventSegment(t):m=l.removeEventSegment(t),e.segment=m,t.endTimeMinutes+=.001}}}this.$emit("event-resizing",{_eid:t._eid,end:t.end,endTimeMinutes:t.endTimeMinutes})},eventDragCreation(i){const{dragCreateAnEvent:e}=this.domEvents,{start:t,startCursorY:s,split:a}=e,n=new Date(t),{minutes:r,cursorCoords:{y:l}}=this.minutesAtCursor(i);if(!(!e.event&&Math.abs(s-l)<this.dragToCreateThreshold))if(e.event){if(n.setHours(0,r,r===j?-1:0,0),this.snapToTime){let d=n.getHours()*60+n.getMinutes();const c=d+this.snapToTime/2;d=c-c%this.snapToTime,n.setHours(0,d,0,0)}const o=t<n,{event:u}=e;u.start=o?t:n,u.end=o?n:t,u.startTimeMinutes=u.start.getHours()*60+u.start.getMinutes(),u.endTimeMinutes=u.end.getHours()*60+u.end.getMinutes()}else{if(e.event=this.utils.event.createAnEvent(t,1,{split:a}),!e.event){e.start=null,e.split=null,e.event=null;return}e.event.resizing=!0}},unfocusEvent(){const{focusAnEvent:i,clickHoldAnEvent:e}=this.domEvents,t=this.view.events.find(s=>s._eid===(i._eid||e._eid));i._eid=null,e._eid=null,t&&(t.focused=!1,t.deleting=!1)},cancelDelete(){const{clickHoldAnEvent:i}=this.domEvents;if(i._eid){const e=this.view.events.find(t=>t._eid===i._eid);e&&(e.deleting=!1),i._eid=null,i.timeoutId=null}},onEventTitleBlur(i,e){if(e.title===i.target.innerHTML)return;const t=e.title;e.title=i.target.innerHTML;const s=this.cleanupEvent(e);this.$emit("event-title-change",{event:s,oldTitle:t}),this.$emit("event-change",{event:s,originalEvent:{...s,title:t}})},updateMutableEvents(){const i=this.utils.date;this.mutableEvents=[],this.events.forEach(e=>{const t=typeof e.start=="string"?i.stringToDate(e.start):e.start,s=i.formatDateLite(t),a=i.dateToMinutes(t);let n=null;typeof e.end=="string"&&e.end.includes("24:00")?(n=new Date(e.end.replace(" 24:00","")),n.setHours(23,59,59,0)):n=typeof e.end=="string"?i.stringToDate(e.end):e.end;let r=i.formatDateLite(n),l=i.dateToMinutes(n);(!l||l===j)&&(!this.time||typeof e.end=="string"&&e.end.length===10?n.setHours(23,59,59,0):n.setSeconds(n.getSeconds()-1),r=i.formatDateLite(n),l=j);const o=s!==r;e=Object.assign({...this.utils.event.eventDefaults},e,{_eid:`${this.uid}_${this.eventIdIncrement++}`,segments:o?{}:null,start:t,startTimeMinutes:a,end:n,endTimeMinutes:l,daysCount:o?i.countDays(t,n):1,class:e.class}),this.mutableEvents.push(e)})},minutesAtCursor(i){return this.utils.cell.minutesAtCursor(i)},createEvent(i,e,t={}){return this.utils.event.createAnEvent(i,e,t)},cleanupEvent(i){return i={...i},["segments","deletable","deleting","titleEditable","resizable","resizing","draggable","dragging","draggingStatic","focused"].forEach(t=>{t in i&&delete i[t]}),i.repeat||delete i.repeat,i},emitWithEvent(i,e){this.$emit(i,this.cleanupEvent(e))},updateSelectedDate(i){if(i&&typeof i=="string"?i=this.utils.date.stringToDate(i):i=new Date(i),i&&i instanceof Date){const{selectedDate:e}=this.view;e&&(this.transitionDirection=e.getTime()>i.getTime()?"left":"right"),i.setHours(0,0,0,0),(!e||e.getTime()!==i.getTime())&&(this.view.selectedDate=i),this.switchView(this.view.id)}this.$emit("update:selected-date",this.view.selectedDate)},getWeekNumber(i){const e=this.utils.date,s=this.firstCellDateWeekNumber+i,a=this.startWeekOnSunday?1:0;return s>52?e.getWeek(e.addDays(this.view.firstCellDate,7*i+a)):s},timeTick(){this.now=new Date,this.timeTickerIds[1]=setTimeout(this.timeTick,60*1e3)},updateDateTexts(){this.utils.date.updateTexts(this.texts)},alignWithScrollbar(){if(document.getElementById("vuecal-align-with-scrollbar"))return;const i=this.$refs.vuecal.getElementsByClassName("vuecal__scrollbar-check")[0],e=i.offsetWidth-i.children[0].offsetWidth;if(e){const t=document.createElement("style");t.id="vuecal-align-with-scrollbar",t.type="text/css",t.innerHTML=`.vuecal--view-with-time .vuecal__weekdays-headings,.vuecal--view-with-time .vuecal__all-day {padding-right: ${e}px}`,document.head.appendChild(t)}},cellOrSplitHasEvents(i,e=null){return i.length&&(!e&&i.length||e&&i.some(t=>t.split===e.id))}},created(){this.utils.cell=new X(this),this.utils.event=new K(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,(60-this.now.getSeconds())*1e3))},mounted(){const i=this.utils.date,e="ontouchstart"in window,{resize:t,drag:s,create:a,delete:n,title:r}=this.editEvents,l=this.onEventClick&&typeof this.onEventClick=="function";(t||s||a||n||r||l)&&window.addEventListener(e?"touchend":"mouseup",this.onMouseUp),(t||s||a&&this.dragToCreateEvent)&&window.addEventListener(e?"touchmove":"mousemove",this.onMouseMove,{passive:!1}),r&&window.addEventListener("keyup",this.onKeyUp),e&&(this.$refs.vuecal.oncontextmenu=function(d){d.preventDefault(),d.stopPropagation()}),this.hideBody||this.alignWithScrollbar();const o=this.view.startDate,u={view:this.view.id,startDate:o,endDate:this.view.endDate,...this.isMonthView?{firstCellDate:this.view.firstCellDate,lastCellDate:this.view.lastCellDate}:{},events:this.view.events.map(this.cleanupEvent),...this.isWeekView?{week:i.getWeek(this.startWeekOnSunday?i.addDays(o,1):o)}:{}};this.$emit("ready",u),this.ready=!0},beforeDestroy(){const i="ontouchstart"in window;window.removeEventListener(i?"touchmove":"mousemove",this.onMouseMove,{passive:!1}),window.removeEventListener(i?"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]},computed:{editEvents(){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}},views(){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")}}},currentView(){return this.validateView(this.activeView)},enabledViews(){return Object.keys(this.views).filter(i=>this.views[i].enabled)},hasTimeColumn(){return this.time&&this.isWeekOrDayView},isShortMonthView(){return this.isMonthView&&this.eventsOnMonthView==="short"},firstCellDateWeekNumber(){const i=this.utils.date,e=this.view.firstCellDate;return i.getWeek(this.startWeekOnSunday?i.addDays(e,1):e)},timeCells(){const i=[];for(let e=this.timeFrom,t=this.timeTo;e<t;e+=this.timeStep)i.push({hours:Math.floor(e/60),minutes:e%60,label:this.utils.date.formatTime(e,this.TimeFormat),value:e});return i},TimeFormat(){return this.timeFormat||(this.twelveHour?"h:mm{am}":"HH:mm")},daySplits(){return(this.splitDays.filter(i=>!i.hide)||[]).map((i,e)=>({...i,id:i.id||e+1}))},hasSplits(){return this.daySplits.length&&this.isWeekOrDayView},hasShortEvents(){return this.showAllDayEvents==="short"},cellOrSplitMinWidth(){let i=null;return this.hasSplits&&this.minSplitWidth?i=this.visibleDaysCount*this.minSplitWidth*this.daySplits.length:this.minCellWidth&&this.isWeekView&&(i=this.visibleDaysCount*this.minCellWidth),i},allDayBar(){let i=this.allDayBarHeight||null;return i&&!isNaN(i)&&(i+="px"),{cells:this.viewCells,options:this.$props,label:this.texts.allDay,shortEvents:this.hasShortEvents,daySplits:this.hasSplits&&this.daySplits||[],cellOrSplitMinWidth:this.cellOrSplitMinWidth,height:i}},minTimestamp(){let i=null;return this.minDate&&typeof this.minDate=="string"?i=this.utils.date.stringToDate(this.minDate):this.minDate&&this.minDate instanceof Date&&(i=this.minDate),i?i.getTime():null},maxTimestamp(){let i=null;return this.maxDate&&typeof this.maxDate=="string"?i=this.utils.date.stringToDate(this.maxDate):this.maxDate&&this.minDate instanceof Date&&(i=this.maxDate),i?i.getTime():null},weekDays(){let{weekDays:i,weekDaysShort:e=[]}=this.texts;return i=i.slice(0).map((t,s)=>({label:t,...e.length?{short:e[s]}:{},hide:this.hideWeekends&&s>=5||this.hideWeekdays.length&&this.hideWeekdays.includes(s+1)})),this.startWeekOnSunday&&i.unshift(i.pop()),i},weekDaysInHeader(){return this.isMonthView||this.isWeekView&&!this.minCellWidth&&!(this.hasSplits&&this.minSplitWidth)},months(){return this.texts.months.map(i=>({label:i}))},specialDayHours(){return!this.specialHours||!Object.keys(this.specialHours).length?{}:Array(7).fill("").map((i,e)=>{let t=this.specialHours[e+1]||[];return Array.isArray(t)||(t=[t]),i=[],t.forEach(({from:s,to:a,class:n,label:r},l)=>{i[l]={day:e+1,from:[null,void 0].includes(s)?null:s*1,to:[null,void 0].includes(a)?null:a*1,class:n||"",label:r||""}}),i})},viewTitle(){const i=this.utils.date;let e="";const t=this.view.startDate,s=t.getFullYear(),a=t.getMonth();switch(this.view.id){case"years":{e=this.texts.years;break}case"year":{e=s;break}case"month":{e=`${this.months[a].label} ${s}`;break}case"week":{const n=this.view.endDate,r=t.getFullYear();let l=this.texts.months[t.getMonth()];this.xsmall&&(l=l.substring(0,3));let o=`${l} ${r}`;if(n.getMonth()!==t.getMonth()){const u=n.getFullYear();let d=this.texts.months[n.getMonth()];this.xsmall&&(d=d.substring(0,3)),r===u?o=`${l} - ${d} ${r}`:this.small?o=`${l.substring(0,3)} ${r} - ${d.substring(0,3)} ${u}`:o=`${l} ${r} - ${d} ${u}`}e=`${this.texts.week} ${i.getWeek(this.startWeekOnSunday?i.addDays(t,1):t)} (${o})`;break}case"day":{e=this.utils.date.formatDate(t,this.texts.dateFormat,this.texts);break}}return e},viewCells(){const i=this.utils.date;let e=[],t=null,s=!1;this.watchRealTime||(this.now=new Date);const a=this.now;switch(this.view.id){case"years":{t=this.view.startDate.getFullYear(),e=Array.apply(null,Array(25)).map((n,r)=>{const l=new Date(t+r,0,1),o=new Date(t+r+1,0,1);return o.setSeconds(-1),{startDate:l,formattedDate:i.formatDateLite(l),endDate:o,content:t+r,current:t+r===a.getFullYear()}});break}case"year":{t=this.view.startDate.getFullYear(),e=Array.apply(null,Array(12)).map((n,r)=>{const l=new Date(t,r,1),o=new Date(t,r+1,1);return o.setSeconds(-1),{startDate:l,formattedDate:i.formatDateLite(l),endDate:o,content:this.xsmall?this.months[r].label.substr(0,3):this.months[r].label,current:r===a.getMonth()&&t===a.getFullYear()}});break}case"month":{const n=this.view.startDate.getMonth(),r=new Date(this.view.firstCellDate);s=!1,e=Array.apply(null,Array(42)).map((l,o)=>{const u=i.addDays(r,o),d=new Date(u);d.setHours(23,59,59,0);const c=!s&&i.isToday(u)&&!s++;return{startDate:u,formattedDate:i.formatDateLite(u),endDate:d,content:u.getDate(),today:c,outOfScope:u.getMonth()!==n,class:`vuecal__cell--day${u.getDay()||7}`}}),(this.hideWeekends||this.hideWeekdays.length)&&(e=e.filter(l=>{const o=l.startDate.getDay()||7;return!(this.hideWeekends&&o>=6||this.hideWeekdays.length&&this.hideWeekdays.includes(o))}));break}case"week":{s=!1;const n=this.view.startDate,r=this.weekDays;e=r.map((l,o)=>{const u=i.addDays(n,this.startWeekOnSunday?o-1:o),d=new Date(u);d.setHours(23,59,59,0);const c=(u.getDay()||7)-1;return{startDate:u,formattedDate:i.formatDateLite(u),endDate:d,today:!s&&i.isToday(u)&&!s++,specialHours:this.specialDayHours[c]||[]}}).filter((l,o)=>!r[o].hide);break}case"day":{const n=this.view.startDate,r=new Date(this.view.startDate);r.setHours(23,59,59,0);const l=(n.getDay()||7)-1;e=[{startDate:n,formattedDate:i.formatDateLite(n),endDate:r,today:i.isToday(n),specialHours:this.specialDayHours[l]||[]}];break}}return e},visibleDaysCount(){return this.isDayView?1:7-this.weekDays.reduce((i,e)=>i+e.hide,0)},cellWidth(){return 100/this.visibleDaysCount},cssClasses(){const{resizeAnEvent:i,dragAnEvent:e,dragCreateAnEvent:t}=this.domEvents;return{[`vuecal--${this.view.id}-view`]:!0,[`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":i._eid,"vuecal--drag-creating-event":t.event,"vuecal--dragging-event":e._eid,"vuecal--events-on-month-view":this.eventsOnMonthView,"vuecal--short-events":this.isMonthView&&this.eventsOnMonthView==="short","vuecal--has-touch":typeof window<"u"&&"ontouchstart"in window}},isYearsOrYearView(){return["years","year"].includes(this.view.id)},isYearsView(){return this.view.id==="years"},isYearView(){return this.view.id==="year"},isMonthView(){return this.view.id==="month"},isWeekOrDayView(){return["week","day"].includes(this.view.id)},isWeekView(){return this.view.id==="week"},isDayView(){return this.view.id==="day"}},watch:{events:{handler(i,e){this.updateMutableEvents(i),this.addEventsToView()},deep:!0},locale(i){this.loadLocale(i)},selectedDate(i){this.updateSelectedDate(i)},activeView(i){this.switchView(i)}}};var Ce=E(be,De,ge,!1,null,null,null,null);const ke=Ce.exports;module.exports=ke;