@syncfusion/ej2-schedule 25.2.7 → 26.1.38

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 (174) hide show
  1. package/.eslintrc.json +3 -2
  2. package/dist/ej2-schedule.min.js +2 -2
  3. package/dist/ej2-schedule.umd.min.js +2 -2
  4. package/dist/ej2-schedule.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-schedule.es2015.js +436 -376
  6. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  7. package/dist/es6/ej2-schedule.es5.js +496 -450
  8. package/dist/es6/ej2-schedule.es5.js.map +1 -1
  9. package/dist/global/ej2-schedule.min.js +2 -2
  10. package/dist/global/ej2-schedule.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +17 -16
  13. package/src/recurrence-editor/date-generator.js +1 -0
  14. package/src/recurrence-editor/recurrence-editor.d.ts +8 -8
  15. package/src/recurrence-editor/recurrence-editor.js +1 -2
  16. package/src/schedule/actions/crud.js +3 -1
  17. package/src/schedule/actions/drag.js +2 -1
  18. package/src/schedule/actions/keyboard.js +1 -1
  19. package/src/schedule/actions/resize.js +5 -0
  20. package/src/schedule/actions/virtual-scroll.js +2 -1
  21. package/src/schedule/base/interface.js +0 -1
  22. package/src/schedule/base/schedule-model.d.ts +11 -11
  23. package/src/schedule/base/schedule.d.ts +11 -11
  24. package/src/schedule/base/schedule.js +28 -12
  25. package/src/schedule/base/util.js +1 -1
  26. package/src/schedule/event-renderer/agenda-base.js +2 -2
  27. package/src/schedule/event-renderer/event-base.js +6 -4
  28. package/src/schedule/event-renderer/month.js +2 -1
  29. package/src/schedule/event-renderer/timeline-view.js +10 -3
  30. package/src/schedule/event-renderer/vertical-view.js +4 -4
  31. package/src/schedule/event-renderer/year.js +3 -2
  32. package/src/schedule/exports/calendar-import.js +1 -2
  33. package/src/schedule/exports/print.js +10 -7
  34. package/src/schedule/models/toolbar-model.d.ts +2 -2
  35. package/src/schedule/popups/event-window.js +1 -1
  36. package/src/schedule/popups/quick-popups.js +1 -1
  37. package/src/schedule/renderer/header-renderer.js +7 -5
  38. package/src/schedule/renderer/month.js +5 -4
  39. package/src/schedule/renderer/renderer.js +8 -2
  40. package/src/schedule/renderer/timeline-year.js +3 -3
  41. package/src/schedule/renderer/vertical-view.d.ts +1 -0
  42. package/src/schedule/renderer/vertical-view.js +24 -9
  43. package/src/schedule/renderer/view-base.d.ts +1 -0
  44. package/src/schedule/renderer/view-base.js +33 -6
  45. package/src/schedule/renderer/year.js +1 -1
  46. package/styles/bootstrap-dark.css +236 -147
  47. package/styles/bootstrap-dark.scss +19 -2
  48. package/styles/bootstrap.css +237 -148
  49. package/styles/bootstrap.scss +19 -2
  50. package/styles/bootstrap4.css +239 -153
  51. package/styles/bootstrap4.scss +19 -2
  52. package/styles/bootstrap5-dark.css +229 -144
  53. package/styles/bootstrap5-dark.scss +19 -2
  54. package/styles/bootstrap5.css +229 -144
  55. package/styles/bootstrap5.scss +19 -2
  56. package/styles/fabric-dark.css +234 -146
  57. package/styles/fabric-dark.scss +19 -2
  58. package/styles/fabric.css +234 -146
  59. package/styles/fabric.scss +19 -2
  60. package/styles/fluent-dark.css +229 -142
  61. package/styles/fluent-dark.scss +19 -2
  62. package/styles/fluent.css +229 -142
  63. package/styles/fluent.scss +19 -2
  64. package/styles/fluent2.css +5947 -0
  65. package/styles/fluent2.scss +19 -0
  66. package/styles/highcontrast-light.css +229 -138
  67. package/styles/highcontrast-light.scss +19 -2
  68. package/styles/highcontrast.css +229 -138
  69. package/styles/highcontrast.scss +19 -2
  70. package/styles/material-dark.css +273 -155
  71. package/styles/material-dark.scss +19 -2
  72. package/styles/material.css +285 -156
  73. package/styles/material.scss +19 -2
  74. package/styles/material3-dark.css +278 -154
  75. package/styles/material3-dark.scss +19 -2
  76. package/styles/material3.css +278 -154
  77. package/styles/material3.scss +19 -2
  78. package/styles/recurrence-editor/_bds-definition.scss +0 -1
  79. package/styles/recurrence-editor/_bootstrap-dark-definition.scss +0 -1
  80. package/styles/recurrence-editor/_bootstrap-definition.scss +0 -1
  81. package/styles/recurrence-editor/_bootstrap4-definition.scss +0 -1
  82. package/styles/recurrence-editor/_bootstrap5-definition.scss +0 -1
  83. package/styles/recurrence-editor/_bootstrap5.3-definition.scss +14 -0
  84. package/styles/recurrence-editor/_fabric-dark-definition.scss +0 -1
  85. package/styles/recurrence-editor/_fabric-definition.scss +0 -1
  86. package/styles/recurrence-editor/_fluent-definition.scss +0 -1
  87. package/styles/recurrence-editor/_fluent2-definition.scss +14 -0
  88. package/styles/recurrence-editor/_fusionnew-definition.scss +0 -1
  89. package/styles/recurrence-editor/_highcontrast-definition.scss +0 -1
  90. package/styles/recurrence-editor/_highcontrast-light-definition.scss +0 -1
  91. package/styles/recurrence-editor/_layout.scss +1 -17
  92. package/styles/recurrence-editor/_material-dark-definition.scss +0 -1
  93. package/styles/recurrence-editor/_material-definition.scss +0 -1
  94. package/styles/recurrence-editor/_material3-definition.scss +0 -1
  95. package/styles/recurrence-editor/_tailwind-definition.scss +0 -1
  96. package/styles/recurrence-editor/bootstrap-dark.css +21 -23
  97. package/styles/recurrence-editor/bootstrap.css +21 -23
  98. package/styles/recurrence-editor/bootstrap4.css +22 -23
  99. package/styles/recurrence-editor/bootstrap5-dark.css +22 -23
  100. package/styles/recurrence-editor/bootstrap5.css +22 -23
  101. package/styles/recurrence-editor/fabric-dark.css +19 -22
  102. package/styles/recurrence-editor/fabric.css +19 -22
  103. package/styles/recurrence-editor/fluent-dark.css +22 -23
  104. package/styles/recurrence-editor/fluent.css +22 -23
  105. package/styles/recurrence-editor/fluent2.css +1534 -0
  106. package/styles/recurrence-editor/fluent2.scss +8 -0
  107. package/styles/recurrence-editor/highcontrast-light.css +19 -22
  108. package/styles/recurrence-editor/highcontrast.css +19 -22
  109. package/styles/recurrence-editor/material-dark.css +32 -26
  110. package/styles/recurrence-editor/material.css +32 -26
  111. package/styles/recurrence-editor/material3-dark.css +33 -27
  112. package/styles/recurrence-editor/material3.css +33 -27
  113. package/styles/recurrence-editor/tailwind-dark.css +32 -26
  114. package/styles/recurrence-editor/tailwind.css +32 -26
  115. package/styles/schedule/_bds-definition.scss +0 -15
  116. package/styles/schedule/_bootstrap-dark-definition.scss +4 -19
  117. package/styles/schedule/_bootstrap-definition.scss +4 -19
  118. package/styles/schedule/_bootstrap4-definition.scss +3 -18
  119. package/styles/schedule/_bootstrap5-definition.scss +1 -22
  120. package/styles/schedule/_bootstrap5.3-definition.scss +273 -0
  121. package/styles/schedule/_fabric-dark-definition.scss +4 -17
  122. package/styles/schedule/_fabric-definition.scss +4 -19
  123. package/styles/schedule/_fluent-definition.scss +0 -14
  124. package/styles/schedule/_fluent2-definition.scss +273 -0
  125. package/styles/schedule/_fusionnew-definition.scss +0 -21
  126. package/styles/schedule/_highcontrast-definition.scss +1 -16
  127. package/styles/schedule/_highcontrast-light-definition.scss +1 -16
  128. package/styles/schedule/_layout.scss +83 -130
  129. package/styles/schedule/_material-dark-definition.scss +5 -20
  130. package/styles/schedule/_material-definition.scss +4 -19
  131. package/styles/schedule/_material3-definition.scss +1 -23
  132. package/styles/schedule/_tailwind-definition.scss +0 -16
  133. package/styles/schedule/_theme.scss +18 -2
  134. package/styles/schedule/bootstrap-dark.css +220 -126
  135. package/styles/schedule/bootstrap.css +221 -127
  136. package/styles/schedule/bootstrap4.css +223 -132
  137. package/styles/schedule/bootstrap5-dark.css +213 -123
  138. package/styles/schedule/bootstrap5.css +213 -123
  139. package/styles/schedule/fabric-dark.css +218 -125
  140. package/styles/schedule/fabric.css +218 -125
  141. package/styles/schedule/fluent-dark.css +213 -121
  142. package/styles/schedule/fluent.css +213 -121
  143. package/styles/schedule/fluent2.css +5551 -0
  144. package/styles/schedule/fluent2.scss +16 -0
  145. package/styles/schedule/highcontrast-light.css +213 -117
  146. package/styles/schedule/highcontrast.css +213 -117
  147. package/styles/schedule/icons/_bds.scss +6 -21
  148. package/styles/schedule/icons/_bootstrap-dark.scss +4 -16
  149. package/styles/schedule/icons/_bootstrap.scss +4 -16
  150. package/styles/schedule/icons/_bootstrap4.scss +8 -26
  151. package/styles/schedule/icons/_bootstrap5.3.scss +220 -0
  152. package/styles/schedule/icons/_bootstrap5.scss +7 -22
  153. package/styles/schedule/icons/_fabric-dark.scss +5 -17
  154. package/styles/schedule/icons/_fabric.scss +5 -17
  155. package/styles/schedule/icons/_fluent.scss +7 -22
  156. package/styles/schedule/icons/_fluent2.scss +220 -0
  157. package/styles/schedule/icons/_fusionnew.scss +7 -22
  158. package/styles/schedule/icons/_highcontrast-light.scss +5 -17
  159. package/styles/schedule/icons/_highcontrast.scss +5 -17
  160. package/styles/schedule/icons/_material-dark.scss +5 -17
  161. package/styles/schedule/icons/_material.scss +5 -17
  162. package/styles/schedule/icons/_material3.scss +7 -22
  163. package/styles/schedule/icons/_tailwind.scss +7 -22
  164. package/styles/schedule/material-dark.css +257 -134
  165. package/styles/schedule/material.css +269 -135
  166. package/styles/schedule/material3-dark.css +262 -133
  167. package/styles/schedule/material3.css +262 -133
  168. package/styles/schedule/tailwind-dark.css +223 -124
  169. package/styles/schedule/tailwind.css +223 -124
  170. package/styles/tailwind-dark.css +239 -145
  171. package/styles/tailwind-dark.scss +19 -2
  172. package/styles/tailwind.css +239 -145
  173. package/styles/tailwind.scss +19 -2
  174. package/CHANGELOG.md +0 -1932
@@ -1,10 +1,10 @@
1
1
  /*!
2
2
  * filename: ej2-schedule.min.js
3
- * version : 25.2.7
3
+ * version : 26.1.38
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
7
7
  * licensing@syncfusion.com. Any infringement will be prosecuted under
8
8
  * applicable laws.
9
9
  */
10
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionData"),require("SyncfusionInputs"),require("SyncfusionButtons"),require("SyncfusionCalendars"),require("SyncfusionDropdowns"),require("SyncfusionNavigations"),require("SyncfusionExcelExport"),require("SyncfusionLists")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionPopups","SyncfusionData","SyncfusionInputs","SyncfusionButtons","SyncfusionCalendars","SyncfusionDropdowns","SyncfusionNavigations","SyncfusionExcelExport","SyncfusionLists"],t):"object"==typeof exports?exports.SyncfusionSchedule=t(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionData"),require("SyncfusionInputs"),require("SyncfusionButtons"),require("SyncfusionCalendars"),require("SyncfusionDropdowns"),require("SyncfusionNavigations"),require("SyncfusionExcelExport"),require("SyncfusionLists")):e.SyncfusionSchedule=t(e.SyncfusionBase,e.SyncfusionPopups,e.SyncfusionData,e.SyncfusionInputs,e.SyncfusionButtons,e.SyncfusionCalendars,e.SyncfusionDropdowns,e.SyncfusionNavigations,e.SyncfusionExcelExport,e.SyncfusionLists)}(this,function(e,t,i,n,r,a,s,o,l,c){return function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=43)}([function(t,i){t.exports=e},function(e,t,i){"use strict";function n(e,t){var n=0,r=i.i(j.createElement)("div",{className:t}).cloneNode();return r.style.visibility="hidden",r.style.position="absolute",e.appendChild(r),n=_(r),i.i(j.remove)(r),n}function r(e,t){var n=0,r=i.i(j.createElement)("div",{className:t}).cloneNode();return r.style.visibility="hidden",r.style.position="absolute",e.appendChild(r),n=H(r),i.i(j.remove)(r),n}function a(e){var t=getComputedStyle(e);return window.WebKitCSSMatrix?new WebKitCSSMatrix(t.webkitTransform).m42:0}function s(e){var t=getComputedStyle(e);return window.WebKitCSSMatrix?new WebKitCSSMatrix(t.webkitTransform).m41:0}function o(e,t){var i=new Date(e.getTime());return t=(t-i.getDay()-7)%7,new Date(i.setDate(i.getDate()+t))}function l(e,t){var i=o(e,t),n=new Date(i.getFullYear(),i.getMonth(),i.getDate()+6);return new Date(n.getTime())}function c(e){return new Date(e.getFullYear(),e.getMonth(),1)}function p(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function d(e){var t=new Date(e.getFullYear(),0,1).valueOf(),i=new Date(e.getFullYear(),e.getMonth(),e.getDate()).valueOf(),n=(i-t+q)/q;return Math.ceil(n/7)}function h(e,t){return new Date(t.valueOf()-(t.valueOf()-e.valueOf())/2)}function u(e,t){var i=e.getTimezoneOffset(),n=new Date(e.getTime()+t),r=n.getTimezoneOffset()-i;return e.setTime(n.getTime()+r*F),e}function g(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function v(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0).getTimezoneOffset(),i=e.getTimezoneOffset(),n=i-t;return e.getTime()-new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0).getTime()-60*n*1e3}function f(e,t){return Math.ceil((t.getTime()-e.getTime())/q)}function m(e,t){return e=new Date(""+e),new Date(e.setDate(e.getDate()+t))}function y(e,t){e=new Date(""+e);var i=e.getDate();return e.setDate(1),e.setMonth(e.getMonth()+t),e.setDate(Math.min(i,D(e))),e}function T(e,t){e=new Date(""+e);var i=e.getDate();return e.setDate(1),e.setFullYear(e.getFullYear()+t),e.setDate(Math.min(i,D(e))),e}function w(e,t,i){var n=new Date(e.getTime());n.setHours(t.getHours()),n.setMinutes(t.getMinutes()),n.setSeconds(t.getSeconds());var r=new Date(e.getTime());return 0===i.getHours()?r=m(r,1):(r.setHours(i.getHours()),r.setMinutes(i.getMinutes()),r.setSeconds(i.getSeconds())),{startHour:n,endHour:r}}function D(e){return p(e).getDate()}function b(e,t){var i=g(new Date(e)),n=g(new Date(t));return Math.round((n.getTime()-i.getTime())/q)}function S(e){return-1!==e.indexOf("Date")?new Date(parseInt(e.match(/\d+/g).toString(),10)):-1!==e.indexOf("T")?new Date(e):new Date(e.replace(/-/g,"/"))}function C(){if(null!==U)return U;null===B&&(B=window.devicePixelRatio||window.screen.availWidth/document.documentElement.clientWidth);var e=i.i(j.createElement)("div"),t=0;e.style.cssText="width:100px;height: 100px;overflow: scroll;position: absolute;top: -9999px;",document.body.appendChild(e);var n=devicePixelRatio?"1.10"===devicePixelRatio.toFixed(2)||devicePixelRatio<=1?Math.ceil(devicePixelRatio%1):Math.floor(devicePixelRatio%1):0;return t=e.offsetWidth-e.clientWidth-n|0,document.body.removeChild(e),U=t}function O(){var e=window.devicePixelRatio||window.screen.availWidth/document.documentElement.clientWidth;B&&B!==e&&(U=null,B=e)}function E(e,t,i,n,r){for(var a=0,s=e.length;a<s;a++)if(e[parseInt(a.toString(),10)][""+t]===i){if(!n)return a;var o=r.slice(-2)[0].field,l=n[""+o]instanceof Array?n[""+o]:[n[""+o]],c=l.join(",");if(c.includes(e[parseInt(a.toString(),10)][r.slice(-1)[0].groupIDField]))return a}return-1}function x(e){var t=getComputedStyle(e);return e.offsetHeight+(parseInt(t.marginTop,10)||0)+(parseInt(t.marginBottom,10)||0)}function A(e){for(var t=[].slice.call(e.children),i=0,n=t;i<n.length;i++){var r=n[i];e.removeChild(r)}}function V(e){var t=new Date(e.getFullYear(),0,1),i=new Date(e.getFullYear(),6,1);return e.getTimezoneOffset()<Math.max(t.getTimezoneOffset(),i.getTimezoneOffset())}function I(e){var t=e.getFullYear(),i=e.getMonth(),n=e.getDate(),r=e.getHours(),a=e.getMinutes(),s=e.getSeconds(),o=e.getMilliseconds();return Date.UTC(t,i,n,r,a,s,o)}function M(){return window.navigator.userAgent.toLowerCase().indexOf("mobi")>-1}function k(){return window.navigator.userAgent.toLowerCase().indexOf("ipad")>-1}function R(e,t){if("multiple"===t)e=e.split(" ").map(function(e){return e.charAt(0).toLocaleUpperCase()+e.substring(1)}).join(" ");else if("single"===t){if(e[0]>="0"&&e[0]<="9"){var n=e.match(/[a-zA-Z]/);e=i.i(j.isNullOrUndefined)(n)?e:e.slice(0,n.index)+e[n.index].toLocaleUpperCase()+e.slice(n.index+1)}e=e[0].toLocaleUpperCase()+e.slice(1)}return e}function H(e){return document.body.style.transform.includes("scale")?e.offsetWidth:e.getBoundingClientRect().width}function _(e){return document.body.style.transform.includes("scale")?e.offsetHeight:e.getBoundingClientRect().height}function P(e){return document.body.style.transform.includes("scale")?e.offsetTop:e.getBoundingClientRect().top}i.d(t,"e",function(){return L}),i.d(t,"f",function(){return N}),i.d(t,"c",function(){return q}),i.d(t,"g",function(){return F}),t.h=n,t.i=r,t.j=a,t.k=s,t.l=o,t.m=l,t.n=c,t.o=p,t.p=d,t.q=h,t.r=u,t.b=g,t.s=v,t.t=f,t.d=m,t.u=y,t.v=T,t.w=w,t.x=D,t.y=b,t.z=S,t.A=C,t.B=O,t.C=E,t.D=x,t.E=A,t.F=V,t.G=I,t.H=M,t.I=k,t.a=R,t.J=H,t.K=_,t.L=P;var j=i(0),L=(i.n(j),7),N=6,q=864e5,F=6e4,U=null,B=null},function(e,t,i){"use strict";i.d(t,"a",function(){return n}),i.d(t,"b",function(){return r}),i.d(t,"c",function(){return a}),i.d(t,"d",function(){return s}),i.d(t,"e",function(){return o}),i.d(t,"f",function(){return l}),i.d(t,"g",function(){return c}),i.d(t,"h",function(){return p}),i.d(t,"i",function(){return d}),i.d(t,"j",function(){return h}),i.d(t,"k",function(){return u}),i.d(t,"l",function(){return g}),i.d(t,"m",function(){return v}),i.d(t,"n",function(){return f}),i.d(t,"o",function(){return m}),i.d(t,"p",function(){return y}),i.d(t,"q",function(){return T}),i.d(t,"r",function(){return w}),i.d(t,"s",function(){return D}),i.d(t,"t",function(){return b}),i.d(t,"u",function(){return S}),i.d(t,"v",function(){return C}),i.d(t,"w",function(){return O}),i.d(t,"x",function(){return E}),i.d(t,"y",function(){return x}),i.d(t,"z",function(){return A}),i.d(t,"A",function(){return V}),i.d(t,"B",function(){return I}),i.d(t,"C",function(){return M}),i.d(t,"D",function(){return k}),i.d(t,"E",function(){return R}),i.d(t,"F",function(){return H}),i.d(t,"G",function(){return _}),i.d(t,"H",function(){return P}),i.d(t,"I",function(){return j}),i.d(t,"J",function(){return L}),i.d(t,"K",function(){return N}),i.d(t,"L",function(){return q}),i.d(t,"M",function(){return F});var n="cellClick",r="cellDoubleClick",a="moreEventsClick",s="select",o="hover",l="actionBegin",c="actionComplete",p="actionFailure",d="navigating",h="renderCell",u="eventClick",g="eventDoubleClick",v="eventRendered",f="dataBinding",m="dataBound",y="popupOpen",T="popupClose",w="dragStart",D="drag",b="dragStop",S="resizeStart",C="resizing",O="resizeStop",E="inlineClick",x="cellSelect",A="virtualScrollStart",V="virtualScrollStop",I="initial-load",M="initial-end",k="print",R="data-ready",H="events-loaded",_="content-ready",P="scroll",j="virtual-scroll",L="scroll-ui-update",N="ui-update",q="document-click",F="cell-mouse-down"},function(e,t,i){"use strict";i.d(t,"_79",function(){return n}),i.d(t,"_83",function(){return r}),i.d(t,"_84",function(){return a}),i.d(t,"_85",function(){return s}),i.d(t,"_86",function(){return o}),i.d(t,"N",function(){return l}),i.d(t,"_169",function(){return c}),i.d(t,"J",function(){return p}),i.d(t,"_55",function(){return d}),i.d(t,"j",function(){return h}),i.d(t,"U",function(){return u}),i.d(t,"_73",function(){return g}),i.d(t,"_74",function(){return v}),i.d(t,"_28",function(){return f}),i.d(t,"h",function(){return m}),i.d(t,"n",function(){return y}),i.d(t,"_17",function(){return T}),i.d(t,"T",function(){return w}),i.d(t,"_89",function(){return D}),i.d(t,"d",function(){return b}),i.d(t,"c",function(){return S}),i.d(t,"e",function(){return C}),i.d(t,"_65",function(){return O}),i.d(t,"_66",function(){return E}),i.d(t,"_67",function(){return x}),i.d(t,"q",function(){return A}),i.d(t,"t",function(){return V}),i.d(t,"s",function(){return I}),i.d(t,"_58",function(){return M}),i.d(t,"_148",function(){return k}),i.d(t,"_63",function(){return R}),i.d(t,"_147",function(){return H}),i.d(t,"_75",function(){return _}),i.d(t,"_76",function(){return P}),i.d(t,"_146",function(){return j}),i.d(t,"a",function(){return L}),i.d(t,"b",function(){return N}),i.d(t,"i",function(){return q}),i.d(t,"_171",function(){return F}),i.d(t,"v",function(){return U}),i.d(t,"_62",function(){return B}),i.d(t,"x",function(){return W}),i.d(t,"y",function(){return z}),i.d(t,"_172",function(){return Y}),i.d(t,"u",function(){return G}),i.d(t,"_60",function(){return X}),i.d(t,"_61",function(){return J}),i.d(t,"_68",function(){return K}),i.d(t,"_59",function(){return Q}),i.d(t,"_29",function(){return Z}),i.d(t,"_13",function(){return $}),i.d(t,"_12",function(){return ee}),i.d(t,"_16",function(){return te}),i.d(t,"_15",function(){return ie}),i.d(t,"_14",function(){return ne}),i.d(t,"_18",function(){return re}),i.d(t,"_19",function(){return ae}),i.d(t,"w",function(){return se}),i.d(t,"_8",function(){return oe}),i.d(t,"D",function(){return le}),i.d(t,"_6",function(){return ce}),i.d(t,"_9",function(){return pe}),i.d(t,"_70",function(){return de}),i.d(t,"_25",function(){return he}),i.d(t,"_71",function(){return ue}),i.d(t,"_39",function(){return ge}),i.d(t,"_38",function(){return ve}),i.d(t,"F",function(){return fe}),i.d(t,"E",function(){return me}),i.d(t,"_37",function(){return ye}),i.d(t,"_36",function(){return Te}),i.d(t,"l",function(){return we}),i.d(t,"A",function(){return De}),i.d(t,"B",function(){return be}),i.d(t,"C",function(){return Se}),i.d(t,"R",function(){return Ce}),i.d(t,"G",function(){return Oe}),i.d(t,"_44",function(){return Ee}),i.d(t,"_46",function(){return xe}),i.d(t,"I",function(){return Ae}),i.d(t,"_20",function(){return Ve}),i.d(t,"_24",function(){return Ie}),i.d(t,"g",function(){return Me}),i.d(t,"_173",function(){return ke}),i.d(t,"_47",function(){return Re}),i.d(t,"_49",function(){return He}),i.d(t,"S",function(){return _e}),i.d(t,"m",function(){return Pe}),i.d(t,"_53",function(){return je}),i.d(t,"_51",function(){return Le}),i.d(t,"_48",function(){return Ne}),i.d(t,"p",function(){return qe}),i.d(t,"o",function(){return Fe}),i.d(t,"_43",function(){return Ue}),i.d(t,"_52",function(){return Be}),i.d(t,"_50",function(){return We}),i.d(t,"_45",function(){return ze}),i.d(t,"_133",function(){return Ye}),i.d(t,"_54",function(){return Ge}),i.d(t,"_41",function(){return Xe}),i.d(t,"_40",function(){return Je}),i.d(t,"O",function(){return Ke}),i.d(t,"_10",function(){return Qe}),i.d(t,"_11",function(){return Ze}),i.d(t,"P",function(){return $e}),i.d(t,"Q",function(){return et}),i.d(t,"_78",function(){return tt}),i.d(t,"_87",function(){return it}),i.d(t,"_80",function(){return nt}),i.d(t,"_82",function(){return rt}),i.d(t,"_81",function(){return at}),i.d(t,"_0",function(){return st}),i.d(t,"V",function(){return ot}),i.d(t,"_1",function(){return lt}),i.d(t,"X",function(){return ct}),i.d(t,"W",function(){return pt}),i.d(t,"Y",function(){return dt}),i.d(t,"Z",function(){return ht}),i.d(t,"L",function(){return ut}),i.d(t,"M",function(){return gt}),i.d(t,"_4",function(){return vt}),i.d(t,"_7",function(){return ft}),i.d(t,"_31",function(){return mt}),i.d(t,"_34",function(){return yt}),i.d(t,"_30",function(){return Tt}),i.d(t,"_26",function(){return wt}),i.d(t,"_27",function(){return Dt}),i.d(t,"_35",function(){return bt}),i.d(t,"z",function(){return St}),i.d(t,"_119",function(){return Ct}),i.d(t,"_123",function(){return Ot}),i.d(t,"_112",function(){return Et}),i.d(t,"_113",function(){return xt}),i.d(t,"_125",function(){return At}),i.d(t,"_126",function(){return Vt}),i.d(t,"_143",function(){return It}),i.d(t,"_129",function(){return Mt}),i.d(t,"_134",function(){return kt}),i.d(t,"_120",function(){return Rt}),i.d(t,"_121",function(){return Ht}),i.d(t,"_122",function(){return _t}),i.d(t,"_124",function(){return Pt}),i.d(t,"_64",function(){return jt}),i.d(t,"_96",function(){return Lt}),i.d(t,"_77",function(){return Nt}),i.d(t,"_91",function(){return qt}),i.d(t,"_93",function(){return Ft}),i.d(t,"_94",function(){return Ut}),i.d(t,"_95",function(){return Bt}),i.d(t,"_92",function(){return Wt}),i.d(t,"_110",function(){return zt}),i.d(t,"_111",function(){return Yt}),i.d(t,"_98",function(){return Gt}),i.d(t,"_101",function(){return Xt}),i.d(t,"_102",function(){return Jt}),i.d(t,"_108",function(){return Kt}),i.d(t,"_107",function(){return Qt}),i.d(t,"_103",function(){return Zt}),i.d(t,"_104",function(){return $t}),i.d(t,"_99",function(){return ei}),i.d(t,"_100",function(){return ti}),i.d(t,"_106",function(){return ii}),i.d(t,"_105",function(){return ni}),i.d(t,"_149",function(){return ri}),i.d(t,"_155",function(){return ai}),i.d(t,"_109",function(){return si}),i.d(t,"_159",function(){return oi}),i.d(t,"_160",function(){return li}),i.d(t,"_137",function(){return ci}),i.d(t,"_138",function(){return pi}),i.d(t,"_139",function(){return di}),i.d(t,"_164",function(){return hi}),i.d(t,"_165",function(){return ui}),i.d(t,"_157",function(){return gi}),i.d(t,"H",function(){return vi}),i.d(t,"K",function(){return fi}),i.d(t,"_135",function(){return mi}),i.d(t,"_136",function(){return yi}),i.d(t,"_158",function(){return Ti}),i.d(t,"_153",function(){return wi}),i.d(t,"_154",function(){return Di}),i.d(t,"_166",function(){return bi}),i.d(t,"_140",function(){return Si}),i.d(t,"_141",function(){return Ci}),i.d(t,"_142",function(){return Oi}),i.d(t,"_161",function(){return Ei}),i.d(t,"_162",function(){return xi}),i.d(t,"_163",function(){return Ai}),i.d(t,"_151",function(){return Vi}),i.d(t,"_152",function(){return Ii}),i.d(t,"_144",function(){return Mi}),i.d(t,"_150",function(){return ki}),i.d(t,"_156",function(){return Ri}),i.d(t,"_167",function(){return Hi}),i.d(t,"_168",function(){return _i}),i.d(t,"_115",function(){return Pi}),i.d(t,"_117",function(){return ji}),i.d(t,"_116",function(){return Li}),i.d(t,"_118",function(){return Ni}),i.d(t,"_114",function(){return qi});i.d(t,"_97",function(){return Fi}),i.d(t,"_145",function(){return Ui}),i.d(t,"_88",function(){return Bi}),i.d(t,"_32",function(){return Wi}),i.d(t,"_21",function(){return zi}),i.d(t,"_57",function(){return Yi}),i.d(t,"_72",function(){return Gi}),i.d(t,"r",function(){return Xi}),i.d(t,"_90",function(){return Ji}),i.d(t,"_127",function(){return Ki}),i.d(t,"_174",function(){return Qi}),i.d(t,"_175",function(){return Zi}),i.d(t,"_176",function(){return $i}),i.d(t,"_179",function(){return en}),i.d(t,"_177",function(){return tn}),i.d(t,"_178",function(){return nn}),i.d(t,"_130",function(){return rn}),i.d(t,"_131",function(){return an}),i.d(t,"_132",function(){return sn}),i.d(t,"_128",function(){return on}),i.d(t,"_22",function(){return ln}),i.d(t,"_170",function(){return cn}),i.d(t,"k",function(){return pn}),i.d(t,"_23",function(){return dn}),i.d(t,"_42",function(){return hn}),i.d(t,"_56",function(){return un}),i.d(t,"f",function(){return gn}),i.d(t,"_2",function(){return vn}),i.d(t,"_3",function(){return fn}),i.d(t,"_69",function(){return mn}),i.d(t,"_5",function(){return yn}),i.d(t,"_33",function(){return Tn});var n="e-schedule",r="e-rtl",a="e-device",s="e-adaptive",o="e-multi-drag",l="e-icons",c="e-enable",p="e-disable",d="e-table-container",h="e-schedule-table",u="e-all-day-cells",g="e-header-popup",v="e-header-calendar",f="e-all-day-row",m="e-content-table",y="e-work-cells",T="e-work-hours",w="e-popup-open",D="e-popup-close",b="e-date-header-wrap",S="e-date-header-container",C="e-header-cells",O="e-header-week-cell",E="e-header-month-cell",x="e-header-year-cell",A="e-work-days",V="e-other-month",I="e-current-day",M="e-current-date",k="e-current-panel",R="e-previous-panel",H="e-next-panel",_="e-prev",P="e-next",j="e-translate",L="e-left-indent",N="e-left-indent-wrap",q="e-event-table",F="e-resource-left-td",U="e-resource-group-cells",B="e-resource-text",W="e-resource-column-wrap",z="e-resource-column-table",Y="e-child-node",G="e-parent-node",X="e-resource-expand",J="e-resource-collapse",K="e-resource-tree-icon",Q="e-resource-cells",Z="e-time-cells-wrap",$="e-time-cells",ee="e-time-slots",te="e-alternate-cells",ie="e-current-time",ne="e-current-timeline",re="e-previous-timeline",ae="e-hide-childs",se="e-scroll-container",oe="e-timeline-wrapper",le="e-appointment-wrapper",ce="e-appointment-wrapper-hidden",pe="e-day-wrapper",de="e-schedule-toolbar-container",he="e-schedule-resource-toolbar-container",ue="e-schedule-toolbar",ge="e-schedule-resource-toolbar",ve="e-selected-cell",fe="e-week-number-wrapper",me="e-week-number",ye="e-appointment-wrap",Te="e-wrapper-container",we="e-appointment-container",De="e-appointment",be="e-block-appointment",Se="e-block-indicator",Ce="e-appointment-border",Oe="e-appointment-details",Ee="e-subject-wrap",xe="e-resource-name",Ae="e-time",Ve="e-table-wrap",Ie="e-outer-table",Me="e-content-wrap",ke="e-virtual-track",Re="e-agenda-cells",He="e-current-day",_e="e-active-appointment-agenda",Pe="e-month-header",je="e-day-date-header",Le="e-resource-column",Ne="e-date-column",qe="e-navigate",Fe="e-date-header",Ue="e-day-border",Be="e-date-border",We="e-day-padding",ze="e-date-time",Ye="e-date-time-wrapper",Ge="e-empty-event",Xe="e-no-event",Je="e-appointment-indicator",Ke="e-indicator",Qe="e-up-icon",Ze="e-down-icon",$e="e-left-icon",et="e-right-icon",tt="e-event-action",it="e-new-event",nt="e-schedule-event-clone",rt="e-month-event",at="e-clone-time-indicator",st="e-drag-clone",ot="e-event-resize",lt="e-resize-clone",ct="e-left-handler",pt="e-right-handler",dt="e-top-handler",ht="e-bottom-handler",ut="e-recurrence-icon",gt="e-recurrence-edit-icon",vt="e-header-row",ft="e-all-day-appointment-wrapper",mt="e-all-day-appointment",yt="e-appointment-hide",Tt="e-row-count-wrapper",wt="e-all-day-appointment-section",Dt="e-appointment-expand",bt="e-appointment-collapse",St="e-more-indicator",Ct="e-cell-popup",Ot="e-event-popup",Et="e-multiple-event-popup",xt="e-popup-header",At="e-header-icon-wrapper",Vt="e-popup-content",It="e-popup-footer",Mt="e-date-time-details",kt="e-recurrence-summary",Rt="e-event-details",Ht="e-event-create",_t="e-event-edit",Pt="e-event-delete",jt="e-text-ellipsis",Lt="e-more-popup-wrapper",Nt="e-more-event-popup",qt="e-more-event-header",Ft="e-more-event-date-header",Ut="e-header-day",Bt="e-header-date",Wt="e-more-event-close",zt="e-more-event-content",Yt="e-more-appointment-wrapper",Gt="e-quick-dialog",Xt="e-quick-dialog-occurrence-event",Jt="e-quick-dialog-series-event",Kt="e-quick-dialog-following-events",Qt="e-following-events-dialog",Zt="e-quick-dialog-delete",$t="e-quick-dialog-cancel",ei="e-quick-alertok",ti="e-quick-alertcancel",ii="e-quick-alertfollowing",ni="e-quick-dialog-alert-btn",ri="e-schedule-dialog",ai="e-form-container",si="e-schedule-form",oi="e-all-day-time-zone-row",li="e-all-day",ci="e-time-zone",pi="e-time-zone-icon",di="e-time-zone-details",hi="e-repeat-parent-row",ui="e-repeat",gi="e-title-location-row",vi="e-subject",fi="e-location",mi="e-location-icon",yi="e-location-details",Ti="e-start-end-row",wi="e-start",Di="e-end",bi="e-resources-row",Si="e-description",Ci="e-description-icon",Oi="e-description-details",Ei="e-time-zone-row",xi="e-start-time-zone",Ai="e-end-time-zone",Vi="e-back-icon",Ii="e-save-icon",Mi="e-event-cancel",ki="e-event-save",Ri="e-dialog-parent",Hi="e-title-text",_i="e-icon-disable",Pi="e-edit",ji="e-edit-icon",Li="e-delete",Ni="e-delete-icon",qi="e-close",Fi="e-close-icon",Ui="e-schedule-error",Bi="e-schedule-event-tooltip",Wi="e-animate",zi="e-timescale-disable",Yi="e-disable-date",Gi="e-hidden",Xi="e-disable-dates",Ji="e-quick-popup-wrapper",Ki="e-popup-table",Qi="e-resource-menu",Zi="e-icon-menu",$i="e-resource-level-title",en="e-resource-tree",tn="e-resource-tree-popup-overlay",nn="e-resource-tree-popup",rn="e-resource",an="e-resource-icon",sn="e-resource-details",on="e-date-time-icon",ln="e-virtual-scroll",cn="e-icon-disable",pn="e-auto-height",dn="e-ignore-whitespace",hn="e-template",un="e-read-only",gn="e-month-header-wrapper",vn="e-inline-subject",fn="e-inline-appointment",mn="e-scroll-hidden",yn="e-all-day-scroll",Tn="e-all-day-auto"},function(e,t,i){"use strict";function n(e,t,n,a){void 0===a&&(a="Gregorian");var s,o,l=L(e),c=t.getConstant(he)+" ",p=a.toLowerCase();if("en"===n||"en-US"===n){var d="months.stand-alone.abbreviated",h="days.stand-alone.abbreviated";o=i.i(te.getValue)(d,i.i(te.getDefaultDateObject)(p)),s=i.i(te.getValue)(h,i.i(te.getDefaultDateObject)(p))}else{var d="main."+n+".dates.calendars."+p+".months.stand-alone.abbreviated",h="main."+n+".dates.calendars."+p+".days.stand-alone.abbreviated";o=i.i(te.getValue)(d,te.cldrData),s=i.i(te.getValue)(h,te.cldrData)}switch(l.interval>1&&(c+=l.interval+" "),l.freq){case"DAILY":c+=t.getConstant(ge);break;case"WEEKLY":c+=t.getConstant(ve)+" "+t.getConstant(de)+" ",l.day.forEach(function(e,t){c+=i.i(ie.a)(i.i(te.getValue)(ye[""+e],s),"single"),c+=l.day.length-1===t?"":", "});break;case"MONTHLY":c+=t.getConstant(fe)+" "+t.getConstant(de)+" ",c+=r(l,s,t);break;case"YEARLY":c+=t.getConstant(me)+" "+t.getConstant(de)+" ",c+=i.i(ie.a)(i.i(te.getValue)(l.month[0].toString(),o),"single")+" ",c+=r(l,s,t)}if(l.count)c+=", "+l.count+" "+t.getConstant(pe);else if(l.until){var u=l.until;c+=", "+t.getConstant(ue)+" "+u.getDate()+" "+i.i(ie.a)(i.i(te.getValue)((u.getMonth()+1).toString(),o),"single")+" "+u.getFullYear()}return c}function r(e,t,n){var r="";if(e.monthDay.length)r+=e.monthDay[0];else if(e.day){var a=e.setPosition-1;r+=n.getConstant(ce[a>-1?a:ce.length-1])+" "+i.i(ie.a)(i.i(te.getValue)(ye[e.day[0]],t),"single")}return r}function a(e,t,n,r,a,o,l,u){void 0===a&&(a=le),void 0===o&&(o=null),void 0===l&&(l="Gregorian"),void 0===u&&(u=null);var g,v=L(t);ee=X(l);var f=[],m=new Date(e.getTime());Q=[];var y=i.i(te.isNullOrUndefined)(n)?[]:n.split(","),T=new re.a;if(y.forEach(function(e){var t=s(e);u&&(t=T.add(new Date(t.getTime()),u)),Q.push(new Date(t.getTime()).setHours(0,0,0,0))}),v.recExceptionCount=i.i(te.isNullOrUndefined)(v.count)?0:Q.length,$=o&&o>e&&!v.count?new Date(new Date(o.getTime()).setHours(0,0,0)):null,!v.until&&$&&(g=new Date($.getTime()),g.setDate($.getDate()+a*v.interval),v.until=g),v.until&&e>v.until)return f;if(Z=a,Y(oe[parseInt(r.toString(),10)]),v.until){var w=i.i(ie.b)(v.until);v.until=new Date(w.getFullYear(),w.getMonth(),w.getDate(),23,59,59)}switch(v.freq){case"DAILY":c(m,v.until,f,v);break;case"WEEKLY":p(m,v.until,f,v);break;case"MONTHLY":d(m,v.until,f,v);break;case"YEARLY":h(m,v.until,f,v)}return f}function s(e){return new Date(e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,5)+":"+e.substr(11,2)+":"+e.substr(13))}function o(e,t){var i=new Date(t).setHours(0,0,0,0);-1===Q.indexOf(i)&&(!$||i>=$.getTime())&&e.push(t)}function l(e,t){var i=Z;return t.count?i=t.count:t.until&&("DAILY"===t.freq||"WEEKLY"===t.freq?i=Math.floor((t.until.getTime()-e.getTime())/ie.c)+1:"MONTHLY"!==t.freq&&"YEARLY"!==t.freq||(i=Math.floor((t.until.getMonth()+12*t.until.getFullYear()-(e.getMonth()+12*e.getFullYear()))/t.interval)+(t.day.length>1?Math.floor((t.until.getTime()-e.getTime())/ie.c)+1:1),"YEARLY"===t.freq&&(i=t.month.length>1?i*t.month.length:i))),i}function c(e,t,i,n){for(var r=new Date(e.getTime()),a=n.interval,s=l(e,n),c=n.day;H(r,t)&&(!0,!(G(r,n)&&(c.indexOf(oe[r.getDay()])>-1||0===c.length)&&(o(i,r.getTime()),s&&i.length+n.recExceptionCount>=s)));)r.setDate(r.getDate()+a),r.getHours()!==e.getHours()&&r.setHours(e.getHours())}function p(e,t,n,r){var a=new Date(e.getTime());r.day.length||r.day.push(oe[e.getDay()]);var s,c=r.interval,p=r.day,d=l(e,r),h=!0,u=[];if(p.length>1)for((i.i(te.isNullOrUndefined)(r.wkst)||""===r.wkst)&&(r.wkst=se[0]),s=oe.indexOf(r.wkst);H(a,t);){var g=oe.indexOf(oe[a.getDay()])-s;g=-1===g?6:g;var v=i.i(ie.d)(a,-g),f=i.i(ie.d)(v,6),m=new Date(a.getTime());for(f=i.i(ie.b)(f),m=i.i(ie.b)(m);f>=m&&(p.indexOf(oe[a.getDay()])>-1&&u.push([a.getTime()]),!(d&&n.length+r.recExceptionCount>=d));)a.setDate(a.getDate()+1),a.getHours()!==e.getHours()&&a.setHours(e.getHours()),m=new Date(a.getTime()),m=i.i(ie.b)(m);if(a.setDate(a.getDate()-1),d&&n.length+r.recExceptionCount>=d)break;a.setDate(a.getDate()+1+7*(c-1)),E(u,h,e,t,n,r),u=[]}else{for(a=j(e,r.day);H(a,t)&&(h=G(a,r),h&&p.indexOf(oe[a.getDay()])>-1&&o(n,a.getTime()),!(d&&n.length+r.recExceptionCount>=d));)a.setDate(a.getDate()+7*c);E(u,h,e,t,n,r),u=[]}}function d(e,t,i,n){switch(n.month.length||n.day.length||n.monthDay.length?n.month.length>0&&!n.day.length&&!n.monthDay.length&&n.monthDay.push(e.getDate()):(n.monthDay.push(e.getDate()),"YEARLY"===n.freq&&n.month.push(e.getMonth()+1)),W(n)){case"day":switch(n.freq){case"MONTHLY":b(e,t,i,n);break;case"YEARLY":S(e,t,i,n)}break;case"both":case"date":switch(n.freq){case"MONTHLY":y(e,t,i,n);break;case"YEARLY":m(e,t,i,n)}}}function h(e,t,i,n){switch(v(n)){case"MONTH":d(e,t,i,n);break;case"WEEKNO":u(e,t,i,n);break;case"YEARDAY":g(e,t,i,n)}}function u(e,t,n,r){for(var a,s,o,c,p,d,h=ee.getYearLastDate(e,0),u=l(e,r),g=r.weekNo,v=[],f=r.day;H(h,t);){s=se.indexOf(oe[h.getDay()]),o=6-s+1;for(var m=0;m<g.length;m++)for(c=g[parseInt(m.toString(),10)],c=c>0?c:53+c+1,p=1===c?o:o+7*(c-1),d=1===c?o-7:o+7*(c-2);d<p;)a=new Date(h.getTime()+ie.c*d),(0===f.length||f.indexOf(oe[a.getDay()])>-1)&&(i.i(te.isNullOrUndefined)(r.setPosition)?I(void 0,e,t,n,r,a.getTime()):v.push([a.getTime()])),d++;if(i.i(te.isNullOrUndefined)(r.setPosition)||R(v,void 0,e,t,n,r),u&&n.length+r.recExceptionCount>=u)return;h=ee.getYearLastDate(a,r.interval),v=[]}}function g(e,t,n,r){for(var a,s,o=ee.getYearLastDate(e,0),c=l(e,r),p=[],d=r.day;H(o,t);){for(var h=0;h<r.yearDay.length;h++)s=r.yearDay[parseInt(h.toString(),10)],a=new Date(o.getTime()),s!==ee.getLeapYearDaysCount()&&s!==-ee.getLeapYearDaysCount()||ee.isLeapYear(ee.getFullYear(a),1)?(a.setDate(a.getDate()+(s<0?ee.getYearDaysCount(a,1)+1+s:s)),(0===d.length||d.indexOf(oe[a.getDay()])>-1)&&(null==r.setPosition?I(void 0,e,t,n,r,a.getTime()):p.push([a.getTime()]))):a.setDate(a.getDate()+1);if(i.i(te.isNullOrUndefined)(r.setPosition)||R(p,void 0,e,t,n,r),c&&n.length+r.recExceptionCount>=c)return;o=ee.getYearLastDate(a,r.interval),p=[]}}function v(e){return e.yearDay.length?"YEARDAY":e.weekNo.length?"WEEKNO":"MONTH"}function f(e,t){var i={monthCollection:[],index:0,tempDate:new Date(e.getTime()),mainDate:new Date(e.getTime()),expectedCount:l(e,t),monthInit:0,dateCollection:[]};return t.month.length&&ee.setMonth(i.tempDate,t.month[0],i.tempDate.getDate()),i}function m(e,t,i,n){if(n.month.length)return void y(e,t,i,n);var r,a=f(e,n);for(a.tempDate=a.mainDate=ee.getMonthStartDate(a.tempDate);H(a.tempDate,t);){for(r=new Date(a.tempDate.getTime());ee.isSameYear(r,a.tempDate)&&a.expectedCount&&i.length+n.recExceptionCount<=a.expectedCount;){if(!(0===n.month.length||n.month.length>0&&!ee.checkMonth(a.tempDate,n.month))){ee.setValidDate(a.tempDate,1,1),a.tempDate=j(a.tempDate,n.day);break}T(n,a,t,!1),a.beginDate=new Date(a.tempDate.getTime()),a.monthInit=w(a.tempDate,n,a.monthInit,a.beginDate)}if(a.tempDate.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),E(a.dateCollection,a.state,e,t,i,n),ee.isLastMonth(a.tempDate)&&(ee.setValidDate(a.tempDate,1,1),a.tempDate=j(a.tempDate,n.day)),a.expectedCount&&i.length+n.recExceptionCount>=a.expectedCount)return;a.tempDate.setFullYear(a.tempDate.getFullYear()+n.interval-1),a.tempDate=j(a.tempDate,n.day),a.monthInit=w(a.tempDate,n,a.monthInit,a.beginDate),a.dateCollection=[]}}function y(e,t,n,r){var a=f(e,r);if(a.tempDate=a.mainDate=ee.getMonthStartDate(a.tempDate),!(("MONTHLY"===r.freq&&12===r.interval||"YEARLY"===r.freq)&&ee.getMonthDaysCount(e)<r.monthDay[0]))for(;H(a.tempDate,t);){if(a.beginDate=new Date(a.tempDate.getTime()),T(r,a,t,!0,e,n),i.i(te.isNullOrUndefined)(r.setPosition)||R(a.dateCollection,a.state,e,t,n,r),a.expectedCount&&n.length+r.recExceptionCount>=a.expectedCount)return;a.monthInit=w(a.tempDate,r,a.monthInit,a.beginDate),a.dateCollection=[]}}function T(e,t,n,r,a,s){for(var o=0;o<e.monthDay.length;o++){t.date=e.monthDay[parseInt(o.toString(),10)],t.tempDate=ee.getMonthStartDate(t.tempDate);var l=ee.getMonthDaysCount(t.tempDate);if(t.date=t.date>0?t.date:l+t.date+1,N(t.tempDate,t.date,t.mainDate)&&t.date>0){if(ee.setDate(t.tempDate,t.date),n&&t.tempDate>n)return;(0===e.day.length||e.day.indexOf(oe[t.tempDate.getDay()])>-1)&&(r&&i.i(te.isNullOrUndefined)(e.setPosition)&&t.expectedCount&&s.length+e.recExceptionCount<t.expectedCount?I(t.state,a,n,s,e,t.tempDate.getTime()):t.dateCollection.push([t.tempDate.getTime()]))}}}function w(e,t,n,r,a){void 0===r&&(r=null);var s=r?r.getMonth():0,o=ee.getMonthStartDate(e);return a=i.i(te.isNullOrUndefined)(a)?t.interval:a,e.setFullYear(o.getFullYear()),e.setMonth(o.getMonth()),e.setDate(o.getDate()),t.month.length?(n++,n%=t.month.length,ee.setMonth(e,t.month[parseInt(n.toString(),10)],1),0===n&&ee.addYears(e,a,t.month[0])):(r&&r.getFullYear()<e.getFullYear()&&(s=e.getMonth()-1),ee.setValidDate(e,a,1,s,r)),n}function D(e,t,n,r){var a=r.day,s=new Date(e.getTime());s=ee.getMonthStartDate(s);var o,c,p=[],d=[],h=[],u=l(e,r),g=0;for(r.month.length&&ee.setMonth(s,r.month[0],1),s=j(s,r.day);H(s,t)&&u&&n.length+r.recExceptionCount<u;){var v=new Date(s.getTime());if(a.map(function(e){return Te.test(e)}).indexOf(!0)>-1){for(var f=0;f<=a.length-1;f++){var m=a[parseInt(f.toString(),10)].match(De),y=parseInt(m[0],10);for(s=new Date(s.getTime()),s=ee.getMonthStartDate(s),s=j(s,a),v.setFullYear(s.getFullYear(),s.getMonth(),s.getDate());ee.isSameYear(v,s)&&ee.isSameMonth(v,s);)m[m.length-1]===oe[v.getDay()]&&p.push([v.getTime()]),v.setDate(v.getDate()+1);if(v.setDate(v.getDate()-1),o=m[0].indexOf("-")>-1?p.length- -1*y:y-1,o=isNaN(o)?0:o,p.length>0&&(i.i(te.isNullOrUndefined)(r.setPosition)?R(p,void 0,e,t,n,r,o):d=[V(p,o,h)]),u&&n.length+r.recExceptionCount>=u)return;p=[]}i.i(te.isNullOrUndefined)(r.setPosition)||(k(d,void 0,e,t,n,r),h=[]),g=w(s,r,g,c),s=j(s,r.day),p=[]}else{var T=[],D=q(a);v.setFullYear(s.getFullYear(),s.getMonth(),s.getDate());var b=new Date(s.getTime());for(c=new Date(s.getTime());ee.isSameMonth(b,s);)T.push(s.getTime()),a.indexOf(oe[s.getDay()])>-1&&(p.push(T),T=[]),s.setDate(s.getDate()+D[oe[s.getDay()]]);if(o=r.setPosition<1?p.length+r.setPosition:r.setPosition-1,i.i(te.isNullOrUndefined)(r.setPosition)){o=0;for(var S=[],C=0;C<p.length;C++)for(var O=0;O<p[parseInt(C.toString(),10)].length;O++)S.push(p[parseInt(C.toString(),10)][parseInt(O.toString(),10)]);p=[S]}if(p.length>0&&R(p,void 0,e,t,n,r,o),u&&n.length+r.recExceptionCount>=u)return;g=w(s,r,g,c),s=j(s,r.day),p=[]}}}function b(e,t,i,n){if(n.day.length>1)return void D(e,t,i,n);var r,a=new Date(e.getTime()),s=l(e,n),o=[],c=0;for(a=ee.getMonthStartDate(a),n.month.length&&ee.setMonth(a,n.month[0],1),a=j(a,n.day);H(a,t)&&s&&i.length+n.recExceptionCount<s;){r=new Date(a.getTime());for(var p=new Date(a.getTime());ee.isSameMonth(a,p);)o.push([p.getTime()]),p.setDate(p.getDate()+7);A(o,e,t,i,n),c=w(a,n,c,r),a=j(a,n.day),o=[]}}function S(e,t,n,r){var a=r.day,s=a.map(function(e){return Te.test(e)});if(a.length>1&&s.indexOf(!0)>-1)return void C(e,t,n,r);if(r.month.length&&1===a.length&&s.indexOf(!0)>-1)return void b(e,t,n,r);var o,c=new Date(e.getTime()),p=l(e,r),d=r.interval,h=[];for(r.month.length&&ee.setMonth(c,r.month[0],c.getDate()),i.i(te.isNullOrUndefined)(r.setPosition)&&0===r.month.length&&0===r.weekNo.length&&c.setFullYear(e.getFullYear(),0,1),c=ee.getMonthStartDate(c),c=j(c,r.day);H(c,t);){for(o=new Date(c.getTime());ee.isSameYear(o,c)&&p&&n.length+r.recExceptionCount<=p;)for(o=new Date(c.getTime());ee.isSameYear(o,c);){if(!(0===r.month.length||r.month.length>0&&!ee.checkMonth(c,r.month))){ee.setValidDate(c,1,1),c=j(c,r.day);break}if(a.length>1){if(ee.compareMonth(o,c)){ee.setValidDate(c,1,1),c=j(c,r.day);break}a.indexOf(oe[o.getDay()])>-1&&h.push([o.getTime()]),o.setDate(o.getDate()+1)}else{if(o.getFullYear()>c.getFullYear()){ee.setValidDate(c,1,1),c=j(c,r.day);break}var u=_(a[0]);oe[o.getDay()]===u&&new Date(o.getFullYear(),o.getMonth(),0)>new Date(e.getFullYear())&&h.push([o.getTime()]),o.setDate(o.getDate()+7)}}if(c.setFullYear(o.getFullYear(),o.getMonth(),o.getDate()),A(h,e,t,n,r),ee.isLastMonth(c)&&(ee.setValidDate(c,1,1),c=j(c,r.day)),c.setFullYear(c.getFullYear()+d-1),p&&n.length+r.recExceptionCount>=p)return;c=j(c,r.day),h=[]}}function C(e,t,n,r){var a,s,o,c=r.day,p=l(e,r),d=new Date(e.getTime()),h=r.interval,u=[],g=[],v=0;d=ee.getMonthStartDate(d);var f=[];for(r.month.length&&ee.setMonth(d,r.month[0],1),d=j(d,r.day);H(d,t);){s=new Date(d.getTime());for(var m=0;m<=r.month.length;m++)for(var y=0;y<=c.length-1;y++){for(d=ee.getMonthStartDate(d),d=j(d,r.day),u=[];ee.isSameYear(s,d)&&p&&n.length+r.recExceptionCount<=p;)for(;ee.isSameYear(s,d);){if(s=new Date(d.getTime()),0===r.month.length||r.month.length>0&&r.month[parseInt(m.toString(),10)]===ee.getMonth(s)){var T=c[parseInt(y.toString(),10)].match(De),D=parseInt(T[0],10);for(o=new Date(d.getTime());ee.isSameYear(o,d)&&ee.isSameMonth(o,d);)T[T.length-1]===oe[o.getDay()]&&u.push([o.getTime()]),o.setDate(o.getDate()+1);o.setDate(o.getDate()-1),a=T[0].indexOf("-")>-1?u.length- -1*D:D-1,a=isNaN(a)?0:a}v=w(d,r,v,void 0,1),d=j(d,r.day)}if(d=0===y&&o?new Date(o.getTime()):new Date(s.getTime()),u.length>0&&(i.i(te.isNullOrUndefined)(r.setPosition)?R(u,void 0,e,t,n,r,a):g=[V(u,a,f)]),p&&n.length+r.recExceptionCount>=p)return}i.i(te.isNullOrUndefined)(r.setPosition)||(k(g,void 0,e,t,n,r),f=[]),ee.isLastMonth(d)?(ee.setValidDate(d,1,1),d.setFullYear(d.getFullYear()+h-1)):d.setFullYear(d.getFullYear()+h),d=j(d,r.day),r.month.length&&ee.setMonth(d,r.month[0],d.getDate())}}function O(e,t){var i,n={monthCollection:[],index:0};if(1===t.length){var r=t[0].match(De),a=void 0;r.length>1?(a=parseInt(r[0],10),i=a<1?e.length+a:a-1):(i=0,e=x(e))}else i=0,e=x(e);return n.monthCollection=e,n.index=i,n}function E(e,t,n,r,a,s){var o=s.setPosition<1?e.length+s.setPosition:s.setPosition-1;i.i(te.isNullOrUndefined)(s.setPosition)&&(o=0,e=x(e)),e.length>0&&R(e,t,n,r,a,s,o)}function x(e){for(var t=[],i=0;i<e.length;i++)for(var n=0;n<e[parseInt(i.toString(),10)].length;n++)t.push(new Date(e[parseInt(i.toString(),10)][parseInt(n.toString(),10)]).getTime());return e=t.length>0?[t]:[]}function A(e,t,i,n,r){var a=r.day,s=[],o=[],l=O(e,a);e=l.monthCollection;var c=l.index;null!=r.setPosition?(o=[V(e,c,s)],k(o,void 0,t,i,n,r)):e.length>0&&R(e,void 0,t,i,n,r,c),s=[]}function V(e,t,i){for(var n=0;n<e[parseInt(t.toString(),10)].length;n++)i.push(e[parseInt(t.toString(),10)][parseInt(n.toString(),10)]);return i}function I(e,t,i,n,r,a){var s=l(t,r),c=new Date(a);e=G(c,r),c>=t&&H(c,i)&&e&&s&&n.length+r.recExceptionCount<s&&o(n,a)}function M(e,t,i,n,r){var a=t||0,s=new Date(e,r.month[0]-1,1),o=new Date(e,r.month[0],0),l=o.getDate(),c=(s.getDay()-a+7)%7,p=c+l,d=Math.ceil(p/7)-1,h=i[parseInt(n.toString(),10)][parseInt(d.toString(),10)];return G(new Date(h),r)?d:d-1}function k(e,t,i,n,r,a){if(e.length>0)for(var s=0;s<e.length;s++){e[parseInt(s.toString(),10)].sort();var o=a.day,l=o.map(function(e){return Te.test(e)}),c="YEARLY"===a.freq&&a.validRules.indexOf("BYMONTH")>-1&&!(l.indexOf(!0)>-1)?M(new Date(e[0][0]).getFullYear(),0,e,s,a):e[parseInt(s.toString(),10)].length+a.setPosition,p=a.setPosition<1?c:a.setPosition-1,d=e[parseInt(s.toString(),10)][parseInt(p.toString(),10)];I(t,i,n,r,a,d)}}function R(e,t,n,r,a,s,o){if(e.length>0){o=i.i(te.isNullOrUndefined)(o)?s.setPosition<1?e.length+s.setPosition:s.setPosition-1:o,e[parseInt(o.toString(),10)].sort();for(var l=0;l<e[parseInt(o.toString(),10)].length;l++){I(t,n,r,a,s,e[parseInt(o.toString(),10)][parseInt(l.toString(),10)])}}}function H(e,t){return!t||e<=t}function _(e){return e.replace(we,"")}function P(e,t){var i=[];return t.forEach(function(e){var t=e.match(De);2===t.length?i.push(t[1]):i.push(t[0])}),-1===i.indexOf(oe[parseInt(e.toString(),10)])}function j(e,t){var i,n=new Date(e.getTime());if(t.length>0){for(var r=[],a=0;a<=t.length-1;a++)i=_(t[parseInt(a.toString(),10)]),r.push(i);if(-1===r.indexOf(oe[n.getDay()]))do{n.setDate(n.getDate()+1)}while(-1===r.indexOf(oe[n.getDay()]))}return n}function L(e){var t,i={freq:null,interval:1,count:null,until:null,day:[],wkst:null,month:[],weekNo:[],monthDay:[],yearDay:[],setPosition:null,validRules:[]},n=e.split(";"),r=[];if(n.forEach(function(e){switch(r=e.split("="),r[0]){case"UNTIL":t=r[1],i.until=s(t);break;case"BYDAY":i.day=r[1].split(","),i.validRules.push(r[0]);break;case"BYMONTHDAY":i.monthDay=r[1].split(",").map(Number),i.validRules.push(r[0]);break;case"BYMONTH":i.month=r[1].split(",").map(Number),i.validRules.push(r[0]);break;case"BYYEARDAY":i.yearDay=r[1].split(",").map(Number),i.validRules.push(r[0]);break;case"BYWEEKNO":i.weekNo=r[1].split(",").map(Number),i.validRules.push(r[0]);break;case"INTERVAL":i.interval=parseInt(r[1],10);break;case"COUNT":i.count=parseInt(r[1],10);break;case"BYSETPOS":i.setPosition=parseInt(r[1],10)>4?-1:parseInt(r[1],10);break;case"FREQ":i.freq=r[1];break;case"WKST":i.wkst=r[1]}}),"MONTHLY"===i.freq&&0===i.monthDay.length){var a=i.validRules.indexOf("BYDAY");i.validRules.splice(a,1)}return i}function N(e,t,i){return t<=ee.getMonthDaysCount(e)&&e>=i}function q(e){var t={};return e.forEach(function(i,n){if(n===e.length-1){for(var r=se.indexOf(i),a=r;a%7!==se.indexOf(e[0]);)a++;t[""+i]=a-r}else t[""+i]=se.indexOf(e[n+1])-se.indexOf(i)}),t}function F(e,t){var i,n=t.slice(0),r=ee.getMonthDaysCount(e);for(i=n.shift();i;){if(i<0&&(i=i+r+1),i===e.getDate())return!1;i=n.shift()}return!0}function U(e,t){var i,n=t.slice(0),r=B(e);for(i=n.shift();i;){if(i<0&&(i=i+ee.getYearDaysCount(e,0)+1),i===r)return!1;i=n.shift()}return!0}function B(e){ae[ee.getFullYear(e)]||(ae[ee.getFullYear(e)]=ee.getYearLastDate(e,0));var t=ae[ee.getFullYear(e)],i=e.getTime()-t.getTime();return Math.ceil(i/ie.c)}function W(e){return e.monthDay.length&&!e.day.length?"date":!e.monthDay.length&&e.day.length?"day":"both"}function z(e){var t=e.shift();e.push(t)}function Y(e){for(;se[0]!==e;)z(se)}function G(e,t){var i=!0,n=t.day,r=t.month,a=ee.getExpectedDays(e,t.monthDay),s=t.yearDay;return t.validRules.forEach(function(t){switch(t){case"BYDAY":P(e.getDay(),n)&&(i=!1);break;case"BYMONTH":ee.checkMonth(e,r)&&(i=!1);break;case"BYMONTHDAY":F(e,a)&&(i=!1);break;case"BYYEARDAY":U(e,s)&&(i=!1)}}),i}function X(e){return"Islamic"===e?new ne.b:new ne.a}function J(e){return[e.getUTCFullYear(),K(e.getUTCMonth()+1),K(e.getUTCDate()),"T",K(e.getUTCHours()),K(e.getUTCMinutes()),K(e.getUTCSeconds()),"Z"].join("")}function K(e){return("0"+e).slice(-2)}t.a=n,t.b=a,t.c=s,t.d=L,t.e=X,t.f=J;var Q,Z,$,ee,te=i(0),ie=(i.n(te),i(1)),ne=i(13),re=i(17),ae={},se=["SU","MO","TU","WE","TH","FR","SA"],oe=["SU","MO","TU","WE","TH","FR","SA"],le=43,ce=["first","second","third","fourth","last"],pe="summaryTimes",de="summaryOn",he="every",ue="summaryUntil",ge="summaryDay",ve="summaryWeek",fe="summaryMonth",me="summaryYear",ye={SU:"sun",MO:"mon",TU:"tue",WE:"wed",TH:"thu",FR:"fri",SA:"sat"},Te=/\d/,we=/[^A-Z]+/,De=/[a-z]+|[^a-z]+/gi},function(e,t,i){"use strict";i.d(t,"a",function(){return c});var n=i(0),r=(i.n(n),i(14)),a=i(3),s=i(2),o=i(1),l=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),c=function(e){function t(t){var i=e.call(this,t)||this;return i.renderedEvents=[],i.monthHeaderHeight=0,i.moreIndicatorHeight=19,i.renderType="day",i.element=i.parent.activeView.getPanel(),i.fields=i.parent.eventFields,i.maxHeight=i.parent.eventSettings.enableMaxHeight&&!i.parent.eventSettings.enableIndicator&&!i.parent.rowAutoHeight,i.withIndicator=i.parent.eventSettings.enableMaxHeight&&i.parent.eventSettings.enableIndicator&&!i.parent.rowAutoHeight,i.maxOrIndicator=i.maxHeight||i.withIndicator,i.moreIndicatorHeight=i.parent.rowAutoHeight&&i.parent.eventSettings.ignoreWhitespace?0:i.moreIndicatorHeight,i.addEventListener(),i}return l(t,e),t.prototype.removeEventWrapper=function(e){if(e.length>0){e="Month"===this.parent.currentView||!this.parent.activeView.isTimelineView()&&!this.parent.activeViewOptions.timeScale.enable?e:[e[0]];for(var t=0,r=e;t<r.length;t++){var a=r[t];a.parentElement&&a.parentElement.parentNode&&i.i(n.remove)(a.parentElement)}}},t.prototype.renderAppointments=function(){this.parent.dragAndDropModule&&this.parent.dragAndDropModule.setDragArea(),this.isResourceEventTemplate=this.parent.isSpecificResourceEvents();var e=this.parent.element.querySelector("."+a.g);this.parent.rowAutoHeight&&(this.parent.uiStateValues.top=e.scrollTop,this.parent.uiStateValues.left=e.scrollLeft);var t=[].slice.call(this.element.querySelectorAll("."+a.D));if(this.parent.crudModule&&this.parent.crudModule.crudObj.isCrudAction)for(var r=0,l=this.parent.crudModule.crudObj.sourceEvent.length;r<l;r++){var c=[].slice.call(this.element.querySelectorAll('.e-appointment-wrapper [data-group-index="'+this.parent.crudModule.crudObj.sourceEvent[parseInt(r.toString(),10)].groupIndex+'"]'));if(this.removeEventWrapper(c),this.parent.crudModule.crudObj.targetEvent[parseInt(r.toString(),10)]&&this.parent.crudModule.crudObj.sourceEvent[parseInt(r.toString(),10)].groupIndex!==this.parent.crudModule.crudObj.targetEvent[parseInt(r.toString(),10)].groupIndex){var p=[].slice.call(this.element.querySelectorAll('.e-appointment-wrapper [data-group-index="'+this.parent.crudModule.crudObj.targetEvent[parseInt(r.toString(),10)].groupIndex+'"]'));this.removeEventWrapper(p)}}else for(var d=0,h=t;d<h.length;d++){var u=h[d];i.i(n.remove)(u)}if(this.removeHeightProperty(a.h),this.element.querySelector("."+a.n)){if("Month"===this.parent.currentView){var g=i.i(n.createElement)("div",{className:a.D}),v=this.parent.element.querySelector("."+a.n);v.appendChild(g),this.monthHeaderHeight=g.offsetTop-v.offsetTop,v.removeChild(g)}this.eventHeight=o.h(this.element,a.A);var f="."+a.h+" tbody tr";this.addCellHeight(f,this.eventHeight,"Month"===this.parent.currentView?0:2,this.monthHeaderHeight,this.moreIndicatorHeight);var m=e.scrollTop;if(this.parent.rowAutoHeight&&this.parent.virtualScrollModule&&!this.parent.virtualScrollModule.isHorizontalScroll&&!i.i(n.isNullOrUndefined)(this.parent.currentAction)&&(e.scrollTop=e.scrollTop-1),this.parent.activeViewOptions.group.resources.length>0?(this.renderResourceEvents(),this.parent.virtualScrollModule&&this.parent.virtualScrollModule.updateFocusedWorkCell()):this.renderEventsHandler(this.parent.activeView.renderDates,this.parent.activeViewOptions.workDays),this.parent.rowAutoHeight){this.updateBlockElements();var y={cssProperties:this.parent.getCssProperties(),module:this.parent.getModuleName(),isPreventScrollUpdate:!0,scrollPosition:{left:this.parent.uiStateValues.left,top:this.parent.uiStateValues.top}};if(this.parent.virtualScrollModule&&!this.parent.virtualScrollModule.isHorizontalScroll&&(this.parent.currentAction?(e.scrollTop=m,this.parent.currentAction=null):this.parent.virtualScrollModule.updateVirtualScrollHeight()),this.parent.enablePersistence||this.parent.notify(s.G,{}),this.parent.notify(s.J,y),"Month"===this.parent.currentView&&this.parent.showWeekNumber){var T=[].slice.call(this.parent.element.querySelectorAll(".e-content-wrap table tr td:first-child"));[].slice.call(this.parent.element.querySelectorAll("."+a.E)).forEach(function(e,t){var r=T[parseInt(t.toString(),10)].offsetHeight;i.i(n.setStyleAttribute)(e,{height:r+"px"})}),this.parent.element.querySelector("."+a.F).scrollTop=this.parent.element.querySelector("."+a.g).scrollTop}}this.parent.renderTemplates()}},t.prototype.renderEventsHandler=function(e,t,r){this.renderedEvents=[];var s,l,c=0;if(r?(c=r.groupIndex,this.cssClass=r.cssClass,this.groupOrder=r.groupOrder,s=this.parent.eventBase.filterEventsByResource(r,this.parent.eventsProcessed),l=this.parent.eventBase.filterEventsByResource(r,this.parent.blockProcessed),this.workCells=[].slice.call(this.element.querySelectorAll("."+a.n+'[data-group-index="'+c+'"]'))):(s=this.parent.eventsProcessed,l=this.parent.blockProcessed,this.workCells=[].slice.call(this.element.querySelectorAll("."+a.n))),this.sortByDateTime(s),this.sortByDateTime(l),"Month"===this.parent.currentView&&this.parent.rowAutoHeight&&0===this.parent.activeViewOptions.group.resources.length){var p=[].slice.call(this.parent.element.querySelectorAll(".e-content-wrap table tr td:first-child")),d=this.parent.element.querySelector("."+a.h).clientHeight/p.length;p.forEach(function(e){i.i(n.setStyleAttribute)(e,{height:d+"px"})})}var h=this.workCells[this.parent.activeView.isTimelineView()?0:this.workCells.length-1];this.cellWidth=o.J(h),this.cellHeight=o.K(h),this.dateRender=e;var u=this.getRenderedDates(e);this.getSlotDates(t||this.parent.activeViewOptions.workDays),this.processBlockEvents(l,c,r);for(var g=[],v=0,f=s;v<f.length;v++){var m=f[v];this.parent.resourceBase&&!r&&(this.cssClass=this.parent.resourceBase.getCssClass(m)),g=g.concat(this.splitEvent(m,u||this.dateRender))}for(var y=0;y<this.slots.length;y++){this.renderedEvents=[];for(var T=this.slots[parseInt(y.toString(),10)],w=o.d(new Date(T[T.length-1]),1),D=this.filterEvents(new Date(T[0]),w,g),b=0,S=D;b<S.length;b++){var C=S[b];if(this.maxHeight){var O="Month"===this.parent.currentView?C[this.fields.startTime]:this.getStartTime(C,C.data);if(this.getIndex(O)>0)continue}this.updateIndicatorIcon(C),this.renderEvents(C,c,s)}}this.cssClass=null,this.groupOrder=null},t.prototype.processBlockEvents=function(e,t,r){for(var a=0,s=e;a<s.length;a++){var l=s[a];this.parent.resourceBase&&!r&&(this.cssClass=this.parent.resourceBase.getCssClass(l));var c=[];if("day"!==this.renderType||l[this.fields.isAllDay])c.push(l);else{var p=i.i(n.extend)({},l,null,!0),d=this.isSameDate(p[this.fields.startTime],p[this.fields.endTime]);if(p.isBlockIcon=d,!d&&o.s(p[this.fields.startTime])>0){var h=i.i(n.extend)({},l,null,!0);h[this.fields.endTime]=o.d(o.b(new Date(l[this.fields.startTime]+"")),1),h.isBlockIcon=!0,p[this.fields.startTime]=h[this.fields.endTime],c.push(h)}if(!(d=this.isSameDate(p[this.fields.startTime],p[this.fields.endTime]))&&o.s(p[this.fields.endTime])>0){var h=i.i(n.extend)({},l,null,!0);h[this.fields.startTime]=o.b(new Date(l[this.fields.endTime]+"")),h.isBlockIcon=!0,c.push(h),p[this.fields.endTime]=h[this.fields.startTime]}c.push(p)}for(var u=0,g=c;u<g.length;u++)for(var v=g[u],f=this.splitEvent(v,this.dateRender),m=0,y=f;m<y.length;m++){var T=y[m];this.renderBlockEvents(T,t,!!v.isBlockIcon)}}},t.prototype.isSameDate=function(e,t){return new Date(+e).setHours(0,0,0,0)===new Date(+t).setHours(0,0,0,0)},t.prototype.renderBlockEvents=function(e,t,r){var a=e.data,s=this.getStartTime(e,a),l=this.getEndTime(e,a),c=this.parent.getIndexOfDate(this.dateRender,o.b(new Date(s.getTime())));if(!(c<0||s>l)){var p=this.getCellTd(c),d=this.getPosition(s,l,e[this.fields.isAllDay],c);if(r)this.renderBlockIndicator(p,d,t);else{var h=a.count,u=this.getEventWidth(s,l,e[this.fields.isAllDay],h);u=u<=0?this.cellWidth:u;var g=this.parent.enableRtl?0:d,v=this.parent.enableRtl?d:0,f=this.cellHeight-this.monthHeaderHeight,m=this.getRowTop(t),y=this.createBlockAppointmentElement(e,t,this.isResourceEventTemplate);i.i(n.setStyleAttribute)(y,{width:u+"px",height:f+"px",left:g+"px",right:v+"px",top:m+"px"}),this.renderEventElement(e,y,p)}}},t.prototype.renderBlockIndicator=function(e,t,r){var s=i.i(n.createElement)("div",{className:"e-icons "+a.C});i.i(n.isNullOrUndefined)(e.querySelector("."+a.C))&&e.appendChild(s)},t.prototype.getStartTime=function(e,t){return e[this.fields.startTime]},t.prototype.getEndTime=function(e,t){return e[this.fields.endTime]},t.prototype.getCellTd=function(e){return this.workCells[parseInt(e.toString(),10)]},t.prototype.getEventWidth=function(e,t,i,n){return n*this.cellWidth-1},t.prototype.getPosition=function(e,t,i,n){return 0},t.prototype.getRowTop=function(e){return 0},t.prototype.updateIndicatorIcon=function(e){if(-1!==this.parent.currentView.indexOf("Timeline")&&"TimelineMonth"!==this.parent.currentView&&!e[this.fields.isAllDay]){var t=e.data,i=this.parent.activeView.getStartHour(),n=this.parent.activeView.getEndHour(),r=o.w(e[this.fields.startTime],i,n),a=o.w(e[this.fields.endTime],i,n),s=t[this.fields.startTime],l=t[this.fields.endTime];if(t.isLeft=t.isLeft||s.getTime()<r.startHour.getTime(),t.isRight=t.isRight||l.getTime()>a.endHour.getTime(),o.b(s).getTime()!==o.b(l).getTime()){var c=r.startHour,p=a.endHour,d=new Date(o.b(s));if(d.setHours(p.getHours(),p.getMinutes(),p.getSeconds()),t.isLeft=t.isLeft||s.getTime()>=(c.getDate()===r.endHour.getDate()?d.getTime():o.d(d,1).getTime()),l.getTime()!==o.b(l).getTime()){var h=new Date(o.b(l));t.isRight=t.isRight||l.getTime()<=h.setHours(c.getHours(),c.getMinutes(),c.getSeconds())}}}},t.prototype.renderResourceEvents=function(){var e=this.parent.uiStateValues.isGroupAdaptive?[this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]]:this.parent.resourceBase.renderedResources;if(this.parent.crudModule&&this.parent.crudModule.crudObj.isCrudAction){for(var t=0,i=this.parent.crudModule.crudObj.sourceEvent.length;t<i;t++){var n=this.parent.crudModule.crudObj.sourceEvent[parseInt(t.toString(),10)];if(this.renderEventsHandler(n.renderDates,n.workDays,n),this.parent.crudModule.crudObj.sourceEvent[parseInt(t.toString(),10)].groupIndex!==this.parent.crudModule.crudObj.targetEvent[parseInt(t.toString(),10)].groupIndex){var r=this.parent.crudModule.crudObj.targetEvent[parseInt(t.toString(),10)];this.renderEventsHandler(r.renderDates,r.workDays,r)}}this.parent.crudModule.crudObj.isCrudAction=!1}else for(var a=0,s=e;a<s.length;a++){var o=s[a];this.renderEventsHandler(o.renderDates,o.workDays,o)}},t.prototype.getSlotDates=function(e){this.slots=[];for(var t=this.dateRender.map(function(e){return+e}),i=!this.parent.activeViewOptions.showWeekend||this.parent.activeViewOptions.group.byDate&&this.parent.activeViewOptions.group.hideNonWorkingDays?e.length:o.e;t.length>0;)this.slots.push(t.splice(0,i))},t.prototype.createAppointmentElement=function(e,t,r){void 0===r&&(r=!1);var s=e[this.fields.subject]||this.parent.eventSettings.fields.subject.default||this.parent.localeObj.getConstant("addTitle"),o=i.i(n.extend)({},e,e.data,!0),l={"data-id":"Appointment_"+e[this.fields.id],role:"button",tabindex:"0","aria-disabled":this.parent.eventBase.getReadonlyAttribute(e),"aria-label":this.parent.getAnnouncementString(o,s)};r||(l["data-guid"]=e.Guid),this.parent.activeViewOptions.group.resources.length>0&&(l["data-group-index"]=t.toString());var c=i.i(n.createElement)("div",{className:a.A,attrs:l});i.i(n.isNullOrUndefined)(this.cssClass)||i.i(n.addClass)([c],this.cssClass),e[this.fields.isReadonly]&&i.i(n.addClass)([c],"e-read-only");var p=i.i(n.createElement)("div",{className:a.G});c.appendChild(p);var d,h=e.data,u=this.getEventData(e);if(i.i(n.isNullOrUndefined)(this.parent.activeViewOptions.eventTemplate)){var g=e[this.fields.location]||this.parent.eventSettings.fields.location.default||"",v=i.i(n.createElement)("div",{className:a.H});this.parent.sanitize(s+(g?"; "+g:""),v);var f=i.i(n.createElement)("div",{className:a.I+(this.parent.isAdaptive?" "+a.J:""),innerHTML:this.parent.getTimeString(h[this.fields.startTime])}),m=i.i(n.createElement)("div",{className:a.I+(this.parent.isAdaptive?" "+a.J:""),innerHTML:this.parent.getTimeString(h[this.fields.endTime])});if("Month"===this.parent.currentView)e[this.fields.isAllDay]?(d=[v],i.i(n.addClass)([v],"e-text-center")):h.count<=1&&!h.isLeft&&!h.isRight?d=[f,v]:(d=[],i.i(n.addClass)([v],"e-text-center"),h.isLeft||d.push(f),d.push(v),h.isRight||d.push(m));else{var y=void 0;if(e[this.fields.isAllDay]){y=[v,i.i(n.createElement)("div",{className:a.I,innerHTML:this.parent.localeObj.getConstant("allDay")})]}else{var T=this.parent.getTimeString(h[this.fields.startTime])+" - "+this.parent.getTimeString(h[this.fields.endTime]),w=i.i(n.createElement)("div",{className:a.I+(this.parent.isAdaptive?" "+a.J:""),innerHTML:T}),D=i.i(n.createElement)("div",{className:a.K});this.parent.sanitize(g,D),y=[v,w,D]}var b=i.i(n.createElement)("div",{className:"e-inner-wrap"});i.i(n.append)(y,b),d=[b]}}else{var S=this.parent.element.id+"_",C=this.parent.activeViewOptions.eventTemplateName,O=S+C+"eventTemplate",E=this.isResourceEventTemplate?this.parent.getEventTemplateName(t):"eventTemplate";d=this.parent.getAppointmentTemplate()(u,this.parent,E,O,!1)}return i.i(n.append)(d,p),this.appendEventIcons(e,p),this.renderResizeHandler(c,e.data,e[this.fields.isReadonly]),c},t.prototype.appendEventIcons=function(e,t){var r=e.data;if(!i.i(n.isNullOrUndefined)(e[this.fields.recurrenceRule])||!i.i(n.isNullOrUndefined)(e[this.fields.recurrenceID])){var s=e[this.fields.id]===e[this.fields.recurrenceID]?a.L:a.M;t.appendChild(i.i(n.createElement)("div",{className:a.N+" "+s+(this.parent.isAdaptive?" "+a.J:"")}))}if(r.isLeft){var o=i.i(n.createElement)("div",{className:a.O+" "+a.N+" "+a.P});i.i(n.prepend)([o],t)}if(r.isRight){var l=i.i(n.createElement)("div",{className:a.O+" "+a.N+" "+a.Q});i.i(n.append)([l],t)}},t.prototype.renderEvents=function(e,t,r){var s=e[this.fields.startTime],l=e[this.fields.endTime],c=this.parent.getIndexOfDate(this.dateRender,o.b(s));if(!(c<0||s.getTime()<this.parent.minDate.getTime()||l.getTime()>this.parent.maxDate.getTime())){var p=this.parent.rowAutoHeight?1:this.parent.activeViewOptions.maxEventsPerRow,d=this.getIndex(s);e.Index=d;var h=e.data.count;if(s.getTime()<=l.getTime()){var u=h*this.cellWidth-5,g=this.workCells[parseInt(c.toString(),10)],v=d*(this.eventHeight+0),f=this.monthHeaderHeight+(d+1)*(this.eventHeight+0)+this.moreIndicatorHeight,m=!this.parent.activeViewOptions.maxEventsPerRow||this.parent.rowAutoHeight||this.parent.eventSettings.enableIndicator?this.maxOrIndicator?d<1:this.cellHeight>f:d<p;if(this.parent.rowAutoHeight||m){this.renderedEvents.push(i.i(n.extend)({},e,null,!0));var y=void 0;if(y=this.inlineValue?this.parent.inlineModule.createInlineAppointmentElement():this.createAppointmentElement(e,t),this.applyResourceColor(y,e,"backgroundColor",this.groupOrder),this.wireAppointmentEvents(y,e),i.i(n.setStyleAttribute)(y,{width:u+"px",top:v+"px"}),this.renderEventElement(e,y,g),this.parent.rowAutoHeight){var T=g.parentElement.firstElementChild;this.updateCellHeight(T,f)}}else for(var w=0;w<h;w++)if(this.workCells[c+w]){var D=this.workCells[c+w].querySelector("."+a.z);if(D){var b=parseInt(D.getAttribute("data-count"),10)+1;D.setAttribute("data-count",b.toString()),D.innerHTML=this.getMoreIndicatorText(b)}else{var S=new Date(this.dateRender[c+w].getTime()),C=o.d(this.dateRender[c+w],1),O=this.workCells[c+w].getAttribute("data-group-index"),E=this.getMoreIndicatorElement(1,S,C);i.i(n.isNullOrUndefined)(O)||E.setAttribute("data-group-index",O),E.style.top=this.cellHeight-this.monthHeaderHeight-this.moreIndicatorHeight+"px",E.style.width=this.cellWidth-2+"px",this.renderElement(this.workCells[c+w],E),n.EventHandler.add(E,"click",this.moreIndicatorClick,this)}}}}},t.prototype.updateCellHeight=function(e,t){t>e.offsetHeight&&i.i(n.setStyleAttribute)(e,{height:t+"px"})},t.prototype.updateBlockElements=function(){for(var e=[].slice.call(this.element.querySelectorAll("."+a.B)),t=0,r=e;t<r.length;t++){var s=r[t],o=i.i(n.closest)(s,"tr");this.monthHeaderHeight=s.offsetParent.offsetTop-o.offsetTop,s.style.height=o.offsetHeight-1-this.monthHeaderHeight+"px";var l=o.firstElementChild,c=Math.round(s.offsetWidth/l.offsetWidth);s.style.width=l.offsetWidth*c+"px"}},t.prototype.getFilteredEvents=function(e,t,r,a){var s;if(i.i(n.isNullOrUndefined)(r))s=this.filterEvents(e,t);else{var o=this.parent.resourceBase.lastResourceLevel[parseInt(r,10)];s=this.filterEvents(e,t,i.i(n.isNullOrUndefined)(a)?void 0:a,o)}return s},t.prototype.getOverlapEvents=function(e,t){for(var i=[],n=o.b(e).getTime(),r=0,a=t;r<a.length;r++){var s=a[r];o.b(s[this.fields.startTime]).getTime()<=n&&o.b(s[this.fields.endTime]).getTime()>=n&&i.push(s)}return i},t.prototype.getIndex=function(e){var t=-1,i=this.renderedEvents;if(i.length>0){var n=this.getOverlapEvents(e,i),r=n.map(function(e){return e.Index});t=r.length>0?this.getSmallestMissingNumber(r):0}return-1===t?0:t},t.prototype.moreIndicatorClick=function(e){var t=this,r=i.i(n.closest)(e.target,"."+a.z),o=new Date(parseInt(r.getAttribute("data-start-date"),10)),l=new Date(parseInt(r.getAttribute("data-end-date"),10)),c=r.getAttribute("data-group-index"),p={cancel:!1,event:e,element:r,isPopupOpen:!0,startTime:o,endTime:l,viewName:this.parent.getNavigateView()};c&&(p.groupIndex=parseInt(c,10)),this.parent.trigger(s.c,p,function(i){if(!i.cancel)if(i.isPopupOpen){var n=t.getFilteredEvents(o,l,c),r={date:o,event:n,element:e.target};t.parent.quickPopup.moreEventClick(r,l,c)}else t.parent.setProperties({selectedDate:o},!0),t.parent.changeView(i.viewName,e)})},t.prototype.renderEventElement=function(e,t,i){var n=this,r=t.classList.contains(a.B)?"blockEvent":"event",o=t.classList.contains(a.A),l=this.getEventData(e),c={data:l,element:t,cancel:!1,type:r};this.parent.trigger(s.m,c,function(e){e.cancel?n.renderedEvents.pop():n.renderElement(i,t,o)})},t.prototype.getEventData=function(e){var t=i.i(n.extend)({},e,null,!0);return t[this.fields.startTime]=e.data[this.fields.startTime],t[this.fields.endTime]=e.data[this.fields.endTime],t},t.prototype.renderElement=function(e,t,r){void 0===r&&(r=!1),this.maxOrIndicator&&r&&this.setMaxEventHeight(t,e);var s=e.querySelector("."+a.D);if(s)s.appendChild(t);else{var o=i.i(n.createElement)("div",{className:a.D});o.appendChild(t),e.appendChild(o)}},t.prototype.getMoreIndicatorElement=function(e,t,r){return i.i(n.createElement)("div",{className:a.z,innerHTML:this.getMoreIndicatorText(e),attrs:{role:"button",tabindex:"0","aria-label":this.parent.globalize.formatNumber(e)+" "+this.parent.localeObj.getConstant("moreEvents"),"data-count":e.toString(),"data-start-date":t.getTime().toString(),"data-end-date":r.getTime().toString()}})},t.prototype.getMoreIndicatorText=function(e){return"+"+this.parent.globalize.formatNumber(e)+"&nbsp;"+(this.parent.isAdaptive?"":this.parent.localeObj.getConstant("more"))},t.prototype.removeHeightProperty=function(e){for(var t=[].slice.call(this.element.querySelectorAll("."+e+" tbody tr")),i=0,n=t;i<n.length;i++){n[i].firstElementChild.style.height=""}},t.prototype.setMaxEventHeight=function(e,t){var r=o.D(t.querySelector("."+a.o)),s=t.offsetHeight-r-(this.maxHeight?0:this.moreIndicatorHeight);i.i(n.setStyleAttribute)(e,{height:s+"px","align-items":"center"})},t.prototype.destroy=function(){this.element=null,this.fields=null,this.maxHeight=null,this.withIndicator=null,this.maxOrIndicator=null,this.moreIndicatorHeight=null,this.removeEventListener(),e.prototype.destroy.call(this)},t}(r.a)},function(e,i){e.exports=t},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var n=i(0),r=(i.n(n),i(3)),a=i(1),s=i(5),o=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),l=function(e){function t(t,i){var n=e.call(this,t)||this;n.startHour=n.parent.activeView.getStartHour(),n.endHour=n.parent.activeView.getEndHour(),n.slotCount=n.parent.activeViewOptions.timeScale.slotCount,n.interval=n.parent.activeViewOptions.timeScale.interval,n.day=0,n.rowIndex=0,n.cellTops=[],n.renderType=i,n.eventContainers=[].slice.call(n.element.querySelectorAll("."+r.l));var a=[].slice.call(n.element.querySelectorAll("."+r.h+" tbody tr"));return n.dayLength=0===a.length?0:a[0].children.length,n.content=n.parent.element.querySelector("."+r.j+"."+r.h),n}return o(t,e),t.prototype.getSlotDates=function(){if(this.slots=[],this.slots.push(this.parent.activeView.renderDates.map(function(e){return+e})),this.parent.activeViewOptions.headerRows.length>0&&"Hour"!==this.parent.activeViewOptions.headerRows.slice(-1)[0].option){this.renderType="day";var e=this.content.querySelector("."+r.n);this.cellWidth=a.J(e)/+(e.getAttribute("colspan")||1),this.slotsPerDay=1}else this.slotsPerDay=this.dayLength/this.dateRender.length},t.prototype.getOverlapEvents=function(e,t){var i=[];if("day"===this.renderType)for(var n=0,r=t;n<r.length;n++){var s=r[n];a.b(s[this.fields.startTime]).getTime()<=a.b(new Date(e.getTime())).getTime()&&a.b(s[this.fields.endTime]).getTime()>=a.b(new Date(e.getTime())).getTime()&&i.push(s)}else for(var o=0,l=t;o<l.length;o++){var s=l[o],c=s.data;c.trimStartTime.getTime()<=e.getTime()&&c.trimEndTime.getTime()>e.getTime()&&i.push(s)}return i},t.prototype.getSortComparerIndex=function(e,t){var i=-1,n=this.renderedEvents;if(n.length>0){var r=this.getOverlapSortComparerEvents(e,t,n),a=r.map(function(e){return e.Index});i=a.length>0?this.getSmallestMissingNumber(a):0}return-1===i?0:i},t.prototype.getOverlapSortComparerEvents=function(e,t,i){for(var n=[],r=this,s=0,o=i;s<o.length;s++){var l=o[s];!function(i){if("day"===r.renderType){var s=a.b(e).getTime(),o=a.b(t).getTime(),l=a.b(i[r.fields.startTime]).getTime(),c=a.b(i[r.fields.endTime]).getTime();(l<=s&&c>=s||function(){var e=o-(a.s(t)<=0?a.c:0);return e=s>e?s:e,c>=e&&l<=e}()||l>s&&c<o)&&n.push(i)}else{var p=i.data;(p.trimStartTime.getTime()<=e.getTime()&&e.getTime()<p.trimEndTime.getTime()||e.getTime()<=p.trimStartTime.getTime()&&p.trimStartTime.getTime()<t.getTime())&&n.push(i)}}(l)}return n},t.prototype.renderResourceEvents=function(){this.removeHeightProperty(r.y);var e="."+r.y+" tbody tr";this.addCellHeight(e,this.eventHeight,2,this.moreIndicatorHeight,0,!1);var t=this.parent.uiStateValues.isGroupAdaptive?[this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]]:this.parent.resourceBase.renderedResources;if(this.parent.crudModule&&this.parent.crudModule.crudObj.isCrudAction){for(var i=0,n=this.parent.crudModule.crudObj.sourceEvent.length;i<n;i++){var a=this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(),10)];if(this.rowIndex=a.groupIndex,this.renderEventsHandler(this.parent.activeView.renderDates,this.parent.activeViewOptions.workDays,a),this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(),10)]&&this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(),10)].groupIndex!==this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(),10)].groupIndex){var s=this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(),10)];this.rowIndex=s.groupIndex,this.renderEventsHandler(this.parent.activeView.renderDates,this.parent.activeViewOptions.workDays,s)}}this.parent.crudModule.crudObj.isCrudAction=!1}else for(var i=0;i<t.length;i++)this.rowIndex=i,this.renderEventsHandler(this.parent.activeView.renderDates,this.parent.activeViewOptions.workDays,t[parseInt(i.toString(),10)])},t.prototype.renderEvents=function(e,t,s){var o=e[this.fields.startTime],l=e[this.fields.endTime];if(!(o.getTime()<this.parent.minDate.getTime()||l.getTime()>this.parent.maxDate.getTime())){var c=e.data;o=this.getStartTime(e,c),l=this.getEndTime(e,c);var p=a.w(e[this.fields.startTime],this.startHour,this.endHour),d=this.updateEventMinimumDuration(p,o,l);if(o=d.startDate,l=d.endDate,this.day=this.parent.getIndexOfDate(this.dateRender,a.b(new Date(o.getTime()))),!(this.day<0)){var h=this.getCellTd(),u=this.parent.rowAutoHeight?1:this.parent.activeViewOptions.maxEventsPerRow,g=i.i(n.isNullOrUndefined)(this.parent.eventSettings.sortComparer)?this.getIndex(o):this.getSortComparerIndex(o,l);e.Index=g;var v=this.eventHeight,f=c.count,m=i.i(n.extend)({},e,null,!0);m[this.fields.startTime]=c[this.fields.startTime],m[this.fields.endTime]=c[this.fields.endTime];var y=a.b(new Date(this.dateRender[this.day].getTime())),T=a.w(y,this.startHour,this.endHour),w=!0;if(w=!(!this.isDayProcess()&&!m[this.fields.isAllDay])||this.isValidEvent(m,o,l,T),o<=l&&w){var D=this.getEventWidth(o,l,e[this.fields.isAllDay],f);D="day"===this.renderType?D-2:D;var b=0,S=0,C=this.getPosition(o,l,e[this.fields.isAllDay],this.day);D=D<=0?this.cellWidth:D,this.renderedEvents.push(i.i(n.extend)({},e,null,!0)),i.i(n.isNullOrUndefined)(this.cellTops[parseInt(t.toString(),10)])&&(this.cellTops[parseInt(t.toString(),10)]=this.getRowTop(t));var O=this.cellTops[parseInt(t.toString(),10)],E=O+(this.maxHeight?0:2)+g*(v+2);b=this.parent.enableRtl?0:C,S=this.parent.enableRtl?C:0;var x=(g+1)*(v+2)+this.moreIndicatorHeight,A=!this.parent.activeViewOptions.maxEventsPerRow||this.parent.rowAutoHeight||this.parent.eventSettings.enableIndicator?this.maxOrIndicator?g<1:this.cellHeight>x:g<u;if(this.parent.rowAutoHeight||A){var V=void 0;if(V=i.i(n.isNullOrUndefined)(this.inlineValue)?this.createAppointmentElement(e,t):this.parent.inlineModule.createInlineAppointmentElement(),this.applyResourceColor(V,e,"backgroundColor",this.groupOrder),i.i(n.setStyleAttribute)(V,{width:D+"px",left:b+"px",right:S+"px",top:E+"px"}),this.wireAppointmentEvents(V,e),this.parent.rowAutoHeight){var I=this.parent.element.querySelector("."+r.g),M=a.J(I),k=I.offsetHeight===I.clientHeight&&I.offsetWidth===I.clientWidth;this.renderEventElement(e,V,h);var R=this.getFirstChild(t);this.updateCellHeight(R,x),k&&(I.offsetWidth>I.clientWidth||M!==a.J(I))&&this.adjustAppointments(M)}else this.renderEventElement(e,V,h)}else for(var H=0;H<f;H++){var _=h.querySelector("."+r.z),P=this.parent.enableRtl?S:b;P=Math.floor(P/this.cellWidth)*this.cellWidth;var j=this.interval/this.slotCount,L="TimelineMonth"===this.parent.activeViewOptions.option||"day"===this.renderType||0!==H?new Date(this.dateRender[this.day+H].getTime()):new Date(o),N=a.d(this.dateRender[this.day+H],1);if("TimelineMonth"===this.parent.activeViewOptions.option||"day"===this.renderType){var q=this.getPosition(L,N,e[this.fields.isAllDay],this.day+H);this.renderTimelineMoreIndicator(o,L,N,v,j,t,s,O,b,S,h,_,P,q)}else for(var F=(a.G(l)-a.G(o))/a.g*this.slotCount/this.interval,U=0;U<F&&(L=0===U?new Date(L.getTime()):new Date(L.getTime()+6e4*j),F<1&&(L=this.adjustToNearestTimeSlot(L,j)),N=new Date(L.getTime()+6e4*j),!(F>=1&&N.getTime()>l.getTime()));U++){var B=this.getPosition(L,N,!1,this.day+H);if(P>B)break;P=B,this.renderTimelineMoreIndicator(o,L,N,v,j,t,s,O,b,S,h,_,P,B)}}}this.parent.renderTemplates()}}},t.prototype.adjustToNearestTimeSlot=function(e,t){var i=new Date(e),n=60*i.getHours()*60*1e3+60*i.getMinutes()*1e3,r=Math.floor(n/(60*t*1e3))*(60*t*1e3),a=new Date(i.getTime());return a.setHours(r/36e5%24),a.setMinutes(r%36e5/6e4),a},t.prototype.renderTimelineMoreIndicator=function(e,t,r,a,s,o,l,c,p,d,h,u,g,v){if(p=this.parent.enableRtl?d=v:v,g=this.parent.enableRtl?d:p,g=Math.floor(g/this.cellWidth)*this.cellWidth,h&&i.i(n.isNullOrUndefined)(u)||!this.isAlreadyAvail(g,h)){var f="TimelineMonth"===this.parent.activeViewOptions.option||"day"===this.renderType?new Date(+e):t,m=new Date(f.setMinutes(Math.floor(f.getMinutes()/s)*s)),y=new Date(m.getTime()+6e4*s),T=void 0;this.parent.activeViewOptions.group.resources.length>0&&!i.i(n.isNullOrUndefined)(o)&&(T=o.toString());var w=this.getFilterEvents(t,r,m,y,T,l),D=this.cellHeight-this.moreIndicatorHeight;a=this.withIndicator?D-2:a;var b=Math.floor(D/(a+2)),S=this.parent.activeViewOptions.maxEventsPerRow&&!this.parent.eventSettings.enableIndicator?w.length-this.parent.activeViewOptions.maxEventsPerRow:w.length-b<=0?1:w.length-b,C=void 0;C="day"===this.renderType?this.getMoreIndicatorElement(S,t,r):this.getMoreIndicatorElement(S,m,y),i.i(n.isNullOrUndefined)(T)||C.setAttribute("data-group-index",T),C.style.top=c+D+"px",C.style.width=this.cellWidth+"px",C.style.left=Math.floor(p/this.cellWidth)*this.cellWidth+"px",C.style.right=Math.floor(d/this.cellWidth)*this.cellWidth+"px",this.renderElement(h,C),n.EventHandler.add(C,"click",this.moreIndicatorClick,this)}},t.prototype.updateCellHeight=function(e,t){if(t>(""===e.style.height?this.cellHeight:parseInt(e.style.height,10))){if(i.i(n.setStyleAttribute)(e,{height:t+"px"}),this.parent.activeViewOptions.group.resources.length>0){var a=this.parent.element.querySelector("."+r.y+' tbody td[data-group-index="'+e.getAttribute("data-group-index")+'"]');a&&i.i(n.setStyleAttribute)(a,{height:t+"px"})}var s=this.parent.element.querySelector(".e-month-header-wrapper table tr:nth-child("+(e.parentElement.rowIndex+1)+") td");s&&i.i(n.setStyleAttribute)(s,{height:t+"px"})}},t.prototype.adjustAppointments=function(e){var t=this,i=this.parent.element.querySelector("."+r.h+" tbody tr"),n=a.J(this.workCells[0]);this.cellWidth=n/+(this.workCells[0].getAttribute("colspan")||1);var s=n*i.children.length/(e/100);[].slice.call(this.parent.element.querySelectorAll("."+r.A)).forEach(function(e){t.parent.enableRtl&&"0px"!==e.style.right?e.style.right=parseFloat(e.style.right)/100*s+"px":"0px"!==e.style.left&&(e.style.left=parseFloat(e.style.left)/100*s+"px"),e.style.width=parseFloat(e.style.width)/100*s+"px"})},t.prototype.getFirstChild=function(e){var t="."+r.h+" tbody td",i="";return this.parent.activeViewOptions.group.resources.length>0&&(i='[data-group-index="'+e.toString()+'"]'),this.parent.element.querySelector(t+i)},t.prototype.updateBlockElements=function(){for(var e=[].slice.call(this.element.querySelectorAll("."+r.B)),t=0,i=e;t<i.length;t++){var n=i[t],a=parseInt(n.getAttribute("data-group-index"),10),s=this.getFirstChild(a);n.style.height=s.offsetHeight+"px";var o=n.offsetWidth/s.offsetWidth;n.style.width=s.offsetWidth*o+"px"}for(var l=[].slice.call(this.element.querySelectorAll("."+r.C)),c=0,p=l;c<p.length;c++){var n=p[c],a=parseInt(n.getAttribute("data-group-index"),10);n.style.top=this.getRowTop(a)+this.getFirstChild(a).offsetHeight-18+"px"}},t.prototype.getStartTime=function(e,t){var i=e[this.fields.startTime],n=a.w(i,this.startHour,this.endHour);return i=this.isDayProcess()?e[this.fields.startTime]:n.startHour.getTime()>=t[this.fields.startTime]?n.startHour:n.endHour.getTime()<=t[this.fields.startTime]?this.getNextDay(n.startHour,t):t[this.fields.startTime],t.trimStartTime=e[this.fields.isAllDay]?n.startHour:t[this.fields.startTime],i},t.prototype.getNextDay=function(e,t){for(var i,n=1;n<=this.dateRender.length;n++)if(i=a.d(e,n),-1!==this.parent.getIndexOfDate(this.dateRender,a.b(new Date(e.getTime()))))return t.count=t.count-1,i;return i},t.prototype.getEndTime=function(e,t){var i=e[this.fields.endTime],n=a.w(i,this.startHour,this.endHour);return this.isDayProcess()?i=t[this.fields.endTime]:(i=t[this.fields.endTime],(n.endHour.getTime()<=t[this.fields.endTime]||e[this.fields.isAllDay])&&(i=n.endHour),n.startHour.getTime()>=t[this.fields.endTime].getTime()&&!e[this.fields.isAllDay]&&(i=this.getPreviousDay(n.startHour,n.endHour,t))),t.trimEndTime=e[this.fields.isAllDay]?n.endHour:t[this.fields.endTime],i},t.prototype.getPreviousDay=function(e,t,i){for(var n=1;n<=this.dateRender.length;n++){var r=a.d(t,-n);if(-1!==this.parent.getIndexOfDate(this.dateRender,a.b(new Date(e.getTime())))){r=a.b(new Date(r.getTime())),r.setHours(t.getHours(),t.getMinutes(),t.getSeconds());var s=i.count,o=i[this.fields.endTime];return i.count=0!==o.getHours()||0!==o.getMinutes()?s-1:s,r}}return i[this.fields.endTime]},t.prototype.getEventWidth=function(e,t,i,n){return"day"===this.renderType||i?n*this.slotsPerDay*this.cellWidth:this.isSameDay(e,t)?this.getSameDayEventsWidth(e,t):this.getSpannedEventsWidth(e,t,n)},t.prototype.getSameDayEventsWidth=function(e,t){return(a.G(t)-a.G(e))/a.g*(this.cellWidth*this.slotCount)/this.interval},t.prototype.getSpannedEventsWidth=function(e,t,i){var n,r=i*this.slotsPerDay*this.cellWidth,s=a.w(a.b(new Date(e.getTime())),this.startHour,this.endHour),o=this.getSameDayEventsWidth(s.startHour,e);if(-1===this.parent.getIndexOfDate(this.dateRender,a.b(new Date(t.getTime()))))n=0;else{var l=a.w(a.b(new Date(t.getTime())),this.startHour,this.endHour);n=this.getSameDayEventsWidth(t,l.endHour),n=this.slotsPerDay*this.cellWidth===n?0:n}var c=o+n;return r>c?r-c:r-o},t.prototype.isSameDay=function(e,t){return this.parent.getIndexOfDate(this.dateRender,a.b(new Date(e.getTime())))===this.parent.getIndexOfDate(this.dateRender,a.b(new Date(t.getTime())))},t.prototype.getAppointmentLeft=function(e,t,i){var n=this.isSameDay(t,e.startHour)?(a.G(t)-a.G(e.startHour))/(a.g*this.interval)*this.slotCount:0;return 0===i?n:Math.round((a.G(e.endHour)-a.G(e.startHour))/a.g/this.interval*this.slotCount)*i+n},t.prototype.getPosition=function(e,t,i,n){if("day"===this.renderType||i)return n*this.slotsPerDay*this.cellWidth;var r=a.b(new Date(this.dateRender[parseInt(n.toString(),10)].getTime())),s=a.w(r,this.startHour,this.endHour);return(s.endHour.getTime()<=t.getTime()&&s.startHour.getTime()>=e.getTime()?this.getAppointmentLeft(s,s.startHour,n):s.endHour.getTime()<=t.getTime()?this.getAppointmentLeft(s,e,n):s.startHour.getTime()>=e.getTime()?this.getAppointmentLeft(s,s.startHour,n):this.getAppointmentLeft(s,e,n))*this.cellWidth},t.prototype.getFilterEvents=function(e,t,i,n,r,a){return"day"===this.renderType?this.getFilteredEvents(e,t,r,a):this.getFilteredEvents(i,n,r,a)},t.prototype.isAlreadyAvail=function(e,t){for(var i=[].slice.call(t.querySelectorAll("."+r.z)),n=0;n<i.length;n++){var a=void 0;if(i&&(a=this.parent.enableRtl?i[parseInt(n.toString(),10)].style.right:i[parseInt(n.toString(),10)].style.left),parseInt(a,10)===Math.floor(e))return!0}return!1},t.prototype.getRowTop=function(e){return this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?this.parent.element.querySelector("."+r.g+' tbody td[data-group-index="'+e.toString()+'"]').offsetTop:0},t.prototype.getCellTd=function(){var e=this.parent.uiStateValues.isGroupAdaptive?0:this.rowIndex;return this.eventContainers[parseInt(e.toString(),10)]},t.prototype.renderBlockIndicator=function(e,t,a){if(!(this.parent.headerRows.length>0&&("Hour"!==this.parent.headerRows[this.parent.headerRows.length-1].option||"Date"!==this.parent.headerRows[this.parent.headerRows.length-1].option)||(t=Math.floor(t/this.cellWidth)*this.cellWidth+this.cellWidth-22,this.isAlreadyAvail(t,e)))){var s=i.i(n.createElement)("div",{className:"e-icons "+r.C});this.parent.activeViewOptions.group.resources.length>0&&s.setAttribute("data-group-index",a.toString()),this.parent.enableRtl?s.style.right=t+"px":s.style.left=t+"px",s.style.top=this.getRowTop(a)+this.cellHeight-18+"px",this.renderElement(e,s)}},t.prototype.setMaxEventHeight=function(e,t){i.i(n.setStyleAttribute)(e,{height:this.cellHeight-(this.maxHeight?0:2)-(this.maxHeight?0:this.moreIndicatorHeight)+"px"})},t.prototype.isDayProcess=function(){return"TimelineMonth"===this.parent.currentView||!this.parent.activeViewOptions.timeScale.enable||this.parent.activeViewOptions.headerRows.length>0&&"Hour"!==this.parent.activeViewOptions.headerRows.slice(-1)[0].option},t.prototype.destroy=function(){this.renderType=null,this.eventContainers=null,this.dayLength=null,this.content=null,e.prototype.destroy.call(this),this.parent=null},t}(s.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(0),r=(i.n(n),i(3)),a=i(2),s=i(1),o=function(){function e(e){this.previousNextAction="next",this.parent=e}return e.prototype.isTimelineView=function(){return-1!==this.parent.currentView.indexOf("Timeline")},e.prototype.getContentRows=function(){return[]},e.prototype.refreshHeader=function(){},e.prototype.refreshResourceHeader=function(){var e=this.element.querySelector("."+r.y),t=Array.from(e.querySelectorAll("."+r._59));if(t.forEach(function(e){Array.from(e.children).forEach(function(e){e.classList.contains(r._60)||e.classList.contains(r._61)||i.i(n.remove)(e)})}),!i.i(n.isNullOrUndefined)(this.parent.resourceBase.renderedResources)&&this.parent.resourceBase.renderedResources.length>0)for(var s=0;s<t.length;s++){var o=t[parseInt(s.toString(),10)],l=this.parent.resourceBase.renderedResources[parseInt(s.toString(),10)];!this.parent.activeView||i.i(n.isNullOrUndefined)(o)||i.i(n.isNullOrUndefined)(l)||parseInt(o.getAttribute("data-group-index"),10)!==l.groupIndex||this.parent.activeView.setResourceHeaderContent(o,l,r._62)}this.parent.renderTemplates(),this.parent.notify(a.G,{})},e.prototype.getDayName=function(e){return this.parent.getDayNames("abbreviated")[e.getDay()]},e.prototype.getDate=function(e){return this.parent.globalize.formatDate(e,{format:"d",calendar:this.parent.getCalendarMode()})},e.prototype.getTime=function(e){return this.parent.isAdaptive?"HH:mm"===this.parent.activeViewOptions.timeFormat||"HH.mm"===this.parent.activeViewOptions.timeFormat?this.parent.globalize.formatDate(e,{format:"H",calendar:this.parent.getCalendarMode()}):this.parent.globalize.formatDate(e,{skeleton:"h",calendar:this.parent.getCalendarMode()}):this.parent.getTimeString(e)},e.prototype.getTimelineDate=function(e){var t=this.parent.globalize.formatDate(e,{skeleton:"MMMd",calendar:this.parent.getCalendarMode()})+", "+this.parent.getDayNames("wide")[e.getDay()];return s.a(t,"multiple")},e.prototype.createEventTable=function(e){var t=i.i(n.createElement)("div",{className:r.i});return i.i(n.append)(this.getEventRows(e),t),t},e.prototype.getEventRows=function(e){for(var t,a=[],s=0;s<e;s++)t=i.i(n.createElement)("div",{className:r.l}),this.parent.resourceBase&&!this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.renderedResources&&t.setAttribute("data-group-index",this.parent.resourceBase.renderedResources[parseInt(s.toString(),10)].groupIndex.toString()),a.push(t);return a},e.prototype.collapseRows=function(e){this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(this.parent.resourceBase.hideResourceRows(e.querySelector("tbody")),this.parent.resourceBase.hideResourceRows(e.querySelector("."+r.i)))},e.prototype.createTableLayout=function(e){var t=e||"",a=i.i(n.createElement)("table",{className:r.j+" "+t}),s=i.i(n.createElement)("tbody");return a.appendChild(s),a},e.prototype.setAriaAttributes=function(e){e.setAttribute("role","grid"),e.setAttribute("aria-label",this.getLabelText(this.parent.currentView))},e.prototype.createColGroup=function(e,t){var r=t.length;t[0]&&t[0].colSpan&&(r=t.map(function(e){return e.colSpan}).reduce(function(e,t){return e+t}));for(var a=i.i(n.createElement)("colgroup"),s=0;s<r;s++)a.appendChild(i.i(n.createElement)("col"));i.i(n.prepend)([a],e)},e.prototype.getScrollXIndent=function(e){return e.offsetHeight-e.clientHeight>0?s.A():0},e.prototype.scrollTopPanel=function(e){this.getDatesHeaderElement().firstElementChild.scrollLeft=e.scrollLeft},e.prototype.scrollHeaderLabels=function(e){for(var t=this.element.querySelector(".e-date-header-wrap table"),r=t.offsetWidth/t.querySelectorAll("colgroup col").length,a=[".e-header-year-cell",".e-header-month-cell",".e-header-week-cell",".e-header-cells"],s=0,o=a;s<o.length;s++){var l=o[s],c=[].slice.call(this.element.querySelectorAll(l));if(c.length>0){for(var p=0,d=c;p<d.length;p++){d[p].children[0].style[this.parent.enableRtl?"right":"left"]=""}!function(t,a){for(var s,o=0,l=0,c=a?-e.scrollLeft:e.scrollLeft,p=0,d=t;p<d.length;p++){var h=d[p];if((l+=parseInt(h.getAttribute("colSpan"),10))>Math.floor(c/r)){s=h;break}o+=h.offsetWidth}i.i(n.isNullOrUndefined)(s)||(s.children[0].style[a?"right":"left"]=c-o+"px")}(c,this.parent.enableRtl)}}},e.prototype.addAttributes=function(e,t){e.template&&i.i(n.append)(e.template,t),e.colSpan&&t.setAttribute("colspan",e.colSpan.toString()),e.className&&i.i(n.addClass)([t],e.className)},e.prototype.getHeaderBarHeight=function(){var e=2;if(this.parent.headerModule&&(e+=s.D(this.parent.headerModule.getHeaderElement())),this.parent.uiStateValues.isGroupAdaptive){var t=this.parent.element.querySelector("."+r._39);t&&(e+=t.offsetHeight)}return e},e.prototype.renderPanel=function(e){e===r._63?i.i(n.prepend)([this.element],this.parent.element.querySelector("."+r._55)):this.parent.element.querySelector("."+r._55).appendChild(this.element)},e.prototype.setPanel=function(e){this.element=e},e.prototype.getPanel=function(){return this.element},e.prototype.getDatesHeaderElement=function(){return this.element.querySelector("."+r.c)},e.prototype.getDateSlots=function(e,t){return[]},e.prototype.generateColumnLevels=function(){return[]},e.prototype.getColumnLevels=function(){return this.colLevels},e.prototype.highlightCurrentTime=function(){},e.prototype.getStartDate=function(){return this.renderDates[0]},e.prototype.getEndDate=function(){return this.renderDates[this.renderDates.length-1]},e.prototype.startDate=function(){return this.renderDates[0]},e.prototype.endDate=function(){return s.d(this.renderDates[this.renderDates.length-1],1)},e.prototype.getStartHour=function(){var e=this.parent.getStartEndTime(this.parent.activeViewOptions.startHour);return i.i(n.isNullOrUndefined)(e)&&(e=new Date(2e3,0,0,0)),e},e.prototype.getEndHour=function(){var e=this.parent.getStartEndTime(this.parent.activeViewOptions.endHour);return i.i(n.isNullOrUndefined)(e)&&(e=new Date(2e3,0,0,0)),e},e.prototype.isCurrentDate=function(e){return e.setHours(0,0,0,0)===new Date(this.parent.currentTimezoneDate).setHours(0,0,0,0)},e.prototype.isCurrentMonth=function(e){return this.parent.activeViewOptions.displayDate||this.parent.activeViewOptions.numberOfWeeks>0?this.parent.activeView.getStartDate().getTime()<=this.parent.getCurrentTime().getTime()&&this.parent.activeView.getEndDate().getTime()>=this.parent.getCurrentTime().getTime():e.getFullYear()===this.parent.getCurrentTime().getFullYear()&&e.getMonth()===this.parent.getCurrentTime().getMonth()},e.prototype.isWorkDay=function(e,t){return void 0===t&&(t=this.parent.activeViewOptions.workDays),t.indexOf(e.getDay())>=0},e.prototype.isWorkHour=function(e,t,r,a){return!i.i(n.isNullOrUndefined)(t)&&!i.i(n.isNullOrUndefined)(r)&&(t.setMilliseconds(0),r.setMilliseconds(0),!(s.s(e)<s.s(t)||s.s(e)>=s.s(r)||!this.isWorkDay(e,a)))},e.prototype.getRenderDates=function(e){var t=[];if("Week"===this.parent.currentView||"TimelineWeek"===this.parent.currentView)for(var i=s.b(this.parent.selectedDate),n=s.l(i,this.parent.activeViewOptions.firstDayOfWeek),r=0,a=s.e*this.parent.activeViewOptions.interval;r<a;r++)this.parent.activeViewOptions.showWeekend?t.push(n):this.isWorkDay(n,e)&&t.push(n),n=s.d(n,1);else if("WorkWeek"===this.parent.currentView||"TimelineWorkWeek"===this.parent.currentView)for(var n=s.l(s.b(this.parent.selectedDate),this.parent.activeViewOptions.firstDayOfWeek),r=0,o=s.e*this.parent.activeViewOptions.interval;r<o;r++)this.isWorkDay(n,e)&&t.push(n),n=s.d(n,1);else{var l="Agenda"===this.parent.currentView?this.parent.agendaDaysCount:this.parent.activeViewOptions.interval,n=s.b(this.parent.selectedDate);do{this.parent.activeViewOptions.showWeekend?t.push(n):this.isWorkDay(n,e)&&t.push(n),n=s.d(n,1)}while(l!==t.length)}return e||(this.renderDates=t),this.parent.headerModule&&this.parent.headerModule.previousNextIconHandler(),t},e.prototype.getNextPreviousDate=function(e){if(this.previousNextAction=e,"Day"===this.parent.currentView||"TimelineDay"===this.parent.currentView){if(this.parent.activeViewOptions.showWeekend){var t=this.parent.activeViewOptions.interval;return s.d(this.parent.selectedDate,"next"===e?t:-t)}var i=void 0;if("next"===e)for(i=s.d(this.renderDates.slice(-1)[0],1);!this.isWorkDay(i);)i=s.d(i,1);else{i=s.d(this.renderDates[0],-1);var n=0;do{this.isWorkDay(i)&&(n+=1),this.parent.activeViewOptions.interval!==n&&(i=s.d(i,-1))}while(this.parent.activeViewOptions.interval!==n)}return i}var r="next"===e?s.e:-s.e;return s.d(this.parent.selectedDate,r*this.parent.activeViewOptions.interval)},e.prototype.getLabelText=function(e){var t=e.charAt(0).toLowerCase()+e.substring(1);return this.parent.localeObj.getConstant(t)+" of "+s.a(this.parent.globalize.formatDate(this.parent.selectedDate,{skeleton:"long",calendar:this.parent.getCalendarMode()}),"single")},e.prototype.getDateRangeText=function(){if(this.parent.isAdaptive){var e=this.parent.activeViewOptions.dateFormat?this.parent.activeViewOptions.dateFormat:"MMMM y";return s.a(this.parent.globalize.formatDate(this.parent.selectedDate,{format:e,calendar:this.parent.getCalendarMode()}),"single")}return this.formatDateRange(this.renderDates[0],this.renderDates[this.renderDates.length-1])},e.prototype.formatDateRange=function(e,t){var r=this.parent.globalize,a=this.parent.getCalendarMode();if(e===t&&(t=null),!i.i(n.isNullOrUndefined)(this.parent.activeViewOptions.dateFormat)){var o="";return t?(o=r.formatDate(e,{format:this.parent.activeViewOptions.dateFormat,calendar:a})+" - "+r.formatDate(t,{format:this.parent.activeViewOptions.dateFormat,calendar:a}),s.a(o,"multiple")):(o=r.formatDate(e,{format:this.parent.activeViewOptions.dateFormat,calendar:a}),s.a(o,"multiple"))}var l,c;if(c="en"===this.parent.locale||"en-US"===this.parent.locale?i.i(n.getValue)("dateFormats.long",i.i(n.getDefaultDateObject)(a)):i.i(n.getValue)("main."+this.parent.locale+".dates.calendars."+a+".dateFormats.long",n.cldrData),!t)return s.a(r.formatDate(e,{format:c,calendar:a}),"single");var p=c.trim().toLocaleLowerCase();return l="d"===p.substr(0,1)?e.getFullYear()===t.getFullYear()?e.getMonth()===t.getMonth()?r.formatDate(e,{format:"dd",calendar:a})+" - "+r.formatDate(t,{format:"dd MMMM yyyy",calendar:a}):r.formatDate(e,{format:"dd MMM",calendar:a})+" - "+r.formatDate(t,{format:"dd MMM yyyy",calendar:a}):r.formatDate(e,{format:"dd MMM yyyy",calendar:a})+" - "+r.formatDate(t,{format:"dd MMM yyyy",calendar:a}):"m"===p.substr(0,1)?e.getFullYear()===t.getFullYear()?e.getMonth()===t.getMonth()?r.formatDate(e,{format:"MMMM dd",calendar:a})+" - "+r.formatDate(t,{format:"dd, yyyy",calendar:a}):r.formatDate(e,{format:"MMM dd",calendar:a})+" - "+r.formatDate(t,{format:"MMM dd, yyyy",calendar:a}):r.formatDate(e,{format:"MMM dd, yyyy",calendar:a})+" - "+r.formatDate(t,{format:"MMM dd, yyyy",calendar:a}):r.formatDate(e,{format:c,calendar:a})+" - "+r.formatDate(t,{format:c,calendar:a}),s.a(l,"multiple")},e.prototype.getMobileDateElement=function(e,t){return i.i(n.createElement)("div",{className:t,innerHTML:'<div class="e-m-date">'+this.parent.globalize.formatDate(e,{format:"d",calendar:this.parent.getCalendarMode()})+'</div><div class="e-m-day">'+s.a(this.parent.globalize.formatDate(e,{format:"E",calendar:this.parent.getCalendarMode()}),"single")+"</div>"})},e.prototype.setResourceHeaderContent=function(e,t,a){if(void 0===a&&(a=r._64),this.parent.activeViewOptions.resourceHeaderTemplate){var s={resource:t.resource,resourceData:t.resourceData},o=this.parent.element.id+"_",l=this.parent.activeViewOptions.resourceHeaderTemplateName,c=o+l+"resourceHeaderTemplate",p=[].slice.call(this.parent.getResourceHeaderTemplate()(s,this.parent,"resourceHeaderTemplate",c,!1));i.i(n.append)(p,e)}else{var d=i.i(n.createElement)("div",{className:a});this.parent.sanitize(t.resourceData[t.resource.textField],d),e.appendChild(d)}},e.prototype.renderResourceMobileLayout=function(){this.parent.resourceBase.lastResourceLevel&&this.parent.resourceBase.lastResourceLevel.length<=0||(this.parent.resourceBase.renderResourceHeader(),this.parent.resourceBase.renderResourceTree())},e.prototype.addAutoHeightClass=function(e){!this.parent.uiStateValues.isGroupAdaptive&&this.parent.rowAutoHeight&&this.isTimelineView()&&this.parent.activeViewOptions.group.resources.length>0&&i.i(n.addClass)([e],r.k)},e.prototype.getColElements=function(){return[].slice.call(this.element.querySelectorAll("."+r.g+" col, ."+r.d+" col"))},e.prototype.setColWidth=function(e){if(this.isTimelineView()){var t=this.getColElements(),a=this.element.querySelector("."+r.h+" tbody"),o=s.J(a)/(t.length/2);if(e.offsetHeight!==e.clientHeight){var l=this.parent.element.querySelector("."+r.x);i.i(n.isNullOrUndefined)(l)||l.offsetHeight===e.clientHeight||i.i(n.setStyleAttribute)(l,{height:i.i(n.formatUnit)(e.clientHeight)})}var c="."+r.e+",."+r._12+",."+r._65+",."+r._66+",."+r._67;[].slice.call(this.element.querySelectorAll(c)).forEach(function(e){var t=i.i(n.isNullOrUndefined)(e.getAttribute("colspan"))?"1":e.getAttribute("colspan"),r=parseInt(t,10);i.i(n.setStyleAttribute)(e,{width:i.i(n.formatUnit)(o*r)})})}},e.prototype.resetColWidth=function(){for(var e=this.getColElements(),t=0,i=e;t<i.length;t++){i[t].style.width=""}},e.prototype.getContentAreaElement=function(){return this.element.querySelector("."+r.g)},e.prototype.wireExpandCollapseIconEvents=function(){if(this.parent.resourceBase&&this.parent.resourceBase.resourceCollection.length>1)for(var e=[].slice.call(this.element.querySelectorAll("."+r._68)),t=0,i=e;t<i.length;t++){var a=i[t];n.EventHandler.clearEvents(a),n.EventHandler.add(a,"click",this.parent.resourceBase.onTreeIconClick,this.parent.resourceBase)}},e.prototype.scrollToDate=function(e){if(-1!==["Month","TimelineMonth"].indexOf(this.parent.currentView)&&!i.i(n.isNullOrUndefined)(e)){var t=this.getContentAreaElement(),a=new Date(s.b(new Date(+e)).getTime()).getTime(),o=t.querySelector("."+r.n+'[data-date="'+a+'"]');"Month"===this.parent.currentView&&o&&(t.scrollWidth>t.clientWidth&&(this.parent.enableRtl?t.scrollLeft=-(this.parent.getContentTable().offsetWidth-o.offsetLeft-o.offsetWidth):t.scrollLeft=o.offsetLeft),t.scrollTop=o.offsetTop),"TimelineMonth"===this.parent.currentView&&o&&(this.parent.enableRtl?t.scrollLeft=-(this.parent.getContentTable().offsetWidth-o.offsetLeft-o.offsetWidth):t.scrollLeft=o.offsetLeft)}},e.prototype.setPersistence=function(){if(this.parent.enablePersistence){var e=this.element.querySelector(".e-content-wrap");i.i(n.isNullOrUndefined)(e)||(this.parent.scrollLeft=e.scrollLeft,this.parent.scrollTop=e.scrollTop)}},e.prototype.retainScrollPosition=function(){if(this.parent.enablePersistence){var e=this.parent.element.querySelector(".e-content-wrap");i.i(n.isNullOrUndefined)(e)||i.i(n.isNullOrUndefined)(this.parent.scrollLeft)||i.i(n.isNullOrUndefined)(this.parent.scrollTop)||(e.scrollTop=this.parent.scrollTop,e.scrollLeft=this.parent.scrollLeft)}},e.prototype.getViewStartDate=function(){var e=this.renderDates[0];return this.parent.activeViewOptions.group.resources.length>0&&this.parent.resourceBase.lastResourceLevel.length>0&&(e=this.parent.resourceBase.getResourceRenderDates()[0]),e},e.prototype.getViewEndDate=function(){var e=s.d(this.renderDates[this.renderDates.length-1],1);return this.parent.activeViewOptions.group.resources.length>0&&this.parent.resourceBase.lastResourceLevel.length>0&&(e=s.d(this.parent.resourceBase.getResourceRenderDates().slice(-1)[0],1)),e},e.prototype.getAdjustedDate=function(e){return!this.parent.activeViewOptions.timeScale.enable||"Month"===this.parent.currentView||"TimelineYear"===this.parent.currentView&&0===this.parent.activeViewOptions.group.resources.length?new Date(e.setHours(0,0,0,0)):"TimelineYear"===this.parent.currentView&&this.parent.activeViewOptions.group.resources.length>0?(e.setHours(0,0,0,0),new Date(e.setDate(1))):null},e.prototype.resetColLevels=function(){this.parent.resourceBase.expandedResources=[];for(var e=this.parent.virtualScrollModule.getRenderedCount(),t=this.parent.activeViewOptions.group.byDate?this.colLevels[0]:this.parent.resourceBase.renderedResources,i=0,n=0;n<t.length&&!(i>=e);n++)i+=t[parseInt(n.toString(),10)].colSpan,this.parent.resourceBase.expandedResources.push(t[parseInt(n.toString(),10)]);this.parent.activeViewOptions.group.byDate?(this.colLevels[0]=this.parent.resourceBase.expandedResources,this.parent.virtualScrollModule.setRenderedDates(this.parent.resourceBase.expandedResources)):(this.colLevels[this.colLevels.length-2]=this.parent.resourceBase.expandedResources,this.parent.resourceBase.renderedResources=this.parent.resourceBase.expandedResources),"Month"!==this.parent.currentView&&(this.colLevels[this.colLevels.length-1]=this.colLevels[this.colLevels.length-1].slice(0,i),this.parent.resourceBase.expandedResources=this.colLevels[this.colLevels.length-1])},e.prototype.destroy=function(){this.element&&this.element.parentNode&&i.i(n.remove)(this.element),this.element=null,this.renderDates=null,this.colLevels=null},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return p});var n=i(0),r=(i.n(n),i(8)),a=i(5),s=i(1),o=i(2),l=i(3),c=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),p=function(e){function t(t){var i=e.call(this,t)||this;return i.dayNameFormat="wide",i.viewClass="e-month-view",i.isInverseTableSelect=!1,i.monthEvent=null,i.monthDates={},i}return c(t,e),t.prototype.addEventListener=function(){this.parent.on(o.J,this.onScrollUIUpdate,this),this.parent.on(o.E,this.onDataReady,this),this.parent.on(o.a,this.onCellClick,this)},t.prototype.removeEventListener=function(){this.parent&&(this.parent.off(o.J,this.onScrollUIUpdate),this.parent.off(o.E,this.onDataReady),this.parent.off(o.a,this.onCellClick))},t.prototype.onDataReady=function(e){this.monthEvent=new a.a(this.parent),this.monthEvent.renderAppointments(),this.parent.notify(o.F,{})},t.prototype.onCellClick=function(e){},t.prototype.onContentScroll=function(e){this.parent.removeNewEventElement(),this.parent.notify(o.I,e),this.scrollTopPanel(e.target),this.scrollLeftPanel(e.target),this.parent.uiStateValues.top=e.target.scrollTop,this.parent.uiStateValues.left=e.target.scrollLeft,this.setPersistence()},t.prototype.scrollLeftPanel=function(e){var t=this.getLeftPanelElement();t&&(t.scrollTop=e.scrollTop)},t.prototype.getLeftPanelElement=function(){return this.element.querySelector("."+l.F)},t.prototype.onScrollUIUpdate=function(e){var t=this.getHeaderBarHeight(),i=this.getDatesHeaderElement(),n=this.getContentAreaElement(),r=this.parent.element.offsetHeight-t-i.offsetHeight,a=this.getLeftPanelElement();"auto"!==this.parent.height&&this.setContentHeight(n,a,r);var o=s.A();if(i.firstElementChild.style[e.cssProperties.rtlBorder]="",i.style[e.cssProperties.rtlPadding]="",n.offsetWidth-n.clientWidth>0?(i.firstElementChild.style[e.cssProperties.border]=o>0?"1px":"0px",i.style[e.cssProperties.padding]=o>0?o-1+"px":"0px"):(i.firstElementChild.style[e.cssProperties.border]="",i.style[e.cssProperties.padding]=""),this.setColWidth(n),e.scrollPosition||!e.isPreventScrollUpdate&&"TimelineMonth"===this.parent.currentView){var l="TimelineMonth"===this.parent.currentView?this.parent.uiStateValues.top:e.scrollPosition.top;a&&(a.scrollTop=l),n.scrollTop=l,this.parent.uiStateValues.isInitial?(this.scrollToSelectedDate(),this.parent.uiStateValues.isInitial=!1):n.scrollLeft="TimelineMonth"===this.parent.currentView?this.parent.uiStateValues.left:e.scrollPosition.left}else this.scrollToSelectedDate();this.retainScrollPosition()},t.prototype.scrollToSelectedDate=function(){var e=this.element.querySelector("."+l.e+'[data-date="'+this.parent.selectedDate.getTime().toString()+'"]'),t=this.getContentAreaElement();i.i(n.isNullOrUndefined)(e)?t.scrollLeft=0:t.scrollLeft=this.parent.enableRtl?-(this.parent.getContentTable().offsetWidth-e.offsetLeft-e.offsetWidth):e.offsetLeft,0===t.scrollLeft&&this.parent.uiStateValues.isInitial&&(this.parent.uiStateValues.left=0)},t.prototype.setContentHeight=function(e,t,r){e.style.height="auto","Month"===this.parent.currentView&&(e.style.height=i.i(n.formatUnit)(r)),t&&("MonthAgenda"===this.parent.currentView&&(r=this.parent.activeViewOptions.interval>1?this.getContentAreaElement().firstElementChild.offsetHeight:this.element.querySelector("."+l.h).offsetHeight),t.style.height="auto",t.style.height=i.i(n.formatUnit)(r-this.getScrollXIndent(e)))},t.prototype.generateColumnLevels=function(){var e=[],t=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays);if(this.parent.activeViewOptions.group.resources.length>0){if(e=this.parent.resourceBase.generateResourceLevels(t),"MonthAgenda"===this.parent.currentView&&(e=[t]),this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.lastResourceLevel.length>0){var i=this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex],n=this.getDateSlots(i.renderDates,i.workDays);if(this.parent.activeViewOptions.group.byDate&&this.parent.activeViewOptions.group.hideNonWorkingDays){var r=n.findIndex(function(e,t){return 0!==t&&e.date.getDay()===n[0].date.getDay()});n=r>-1?n.slice(0,r):n}e=[n]}}else e.push(t);return this.colLevels=e,e},t.prototype.getDateSlots=function(e,t){for(var i=this.parent.activeViewOptions.showWeekend?s.e:t.length,n=[],r=this.isCurrentMonth(this.parent.selectedDate),a=0;a<i;a++){var o=[l.e],c=e.slice(0,i).map(function(e){return e.getDay()});r&&c.indexOf(this.parent.currentTimezoneDate.getDay())===a&&o.push(l.s),n.push({date:e[parseInt(a.toString(),10)],type:"monthDay",className:o,colSpan:1,workDays:t})}return n},t.prototype.getDayNameFormat=function(){return this.parent.isAdaptive||this.parent.activeViewOptions.group.resources.length>0?"abbreviated":"wide"},t.prototype.renderLayout=function(e){this.dayNameFormat=this.getDayNameFormat(),this.setPanel(i.i(n.createElement)("div",{className:l._20}));var t=[this.viewClass];t.push(e),this.parent.activeViewOptions.group.byDate&&(t.push("e-by-date"),"Month"!==this.parent.currentView&&(this.parent.activeViewOptions.group.hideNonWorkingDays=!1)),this.parent.activeViewOptions.allowVirtualScrolling&&!this.parent.uiStateValues.isGroupAdaptive&&t.push(l._22),this.parent.rowAutoHeight&&this.parent.eventSettings.ignoreWhitespace&&t.push(l._23),i.i(n.addClass)([this.element],t),this.renderPanel(e),this.element.appendChild(this.createTableLayout(l._24)),this.element.querySelector("table").setAttribute("role","presentation"),this.colLevels=this.generateColumnLevels(),this.renderHeader(),this.renderContent();var r="MonthAgenda"===this.parent.currentView?this.parent.activeView.getPanel():this.parent.element;this.parent.uiStateValues.isGroupAdaptive&&!r.querySelector("."+l._25)&&this.renderResourceMobileLayout(),this.parent.notify(o.G,{}),this.parent.uiStateValues.isCustomMonth&&(this.parent.uiStateValues.isCustomMonth=!1)},t.prototype.refreshHeader=function(){i.i(n.remove)(this.element.querySelector("tbody tr")),this.renderHeader(),this.parent.notify(o.G,{});var e=this.element.querySelector("."+l.d),t=this.element.querySelector("."+l.g);e&&(e.scrollLeft=this.parent.uiStateValues.left),t&&(t.scrollLeft=this.parent.uiStateValues.left)},t.prototype.wireCellEvents=function(e){n.EventHandler.add(e,"mousedown",this.parent.workCellAction.cellMouseDown,this.parent.workCellAction),n.EventHandler.add(e,"click",this.parent.workCellAction.cellClick,this.parent.workCellAction),this.parent.isAdaptive||n.EventHandler.add(e,"dblclick",this.parent.workCellAction.cellDblClick,this.parent.workCellAction)},t.prototype.renderHeader=function(){var e=i.i(n.createElement)("tr");this.renderLeftIndent(e);var t=i.i(n.createElement)("td");t.appendChild(this.renderDatesHeader()),e.appendChild(t),i.i(n.prepend)([e],this.element.querySelector("tbody"))},t.prototype.renderLeftIndent=function(e){this.parent.activeViewOptions.showWeekNumber&&e.appendChild(i.i(n.createElement)("td",{className:"e-left-indent"}))},t.prototype.renderContent=function(){this.parent.activeViewOptions.group.resources.length>0&&(this.parent.resourceBase.renderedResources=i.i(n.extend)([],this.parent.resourceBase.lastResourceLevel,null,!0));var e=i.i(n.createElement)("tr");this.parent.activeViewOptions.showWeekNumber&&e.appendChild(this.renderWeekNumberContent());var t=i.i(n.createElement)("td"),r=this.colLevels.slice(0);this.parent.virtualScrollModule&&this.resetColLevels();var a=i.i(n.createElement)("div",{className:l.g}),s=this.renderContentArea();if("Month"===this.parent.currentView)a.appendChild(s);else{var o=i.i(n.createElement)("div",{className:l._55});o.appendChild(s),a.appendChild(o)}n.EventHandler.add(a,"scroll",this.onContentScroll,this),t.appendChild(a),e.appendChild(t),this.parent.virtualScrollModule&&(this.colLevels=r,this.parent.virtualScrollModule.renderVirtualTrack(a)),this.element.querySelector("tbody").appendChild(e),this.renderAppointmentContainer()},t.prototype.renderWeekNumberContent=function(){var e=this.renderDates.map(function(e){return new Date(+e)}),t=i.i(n.createElement)("td"),r=i.i(n.createElement)("div",{className:l.F});t.appendChild(r);var a=this.createTableLayout();r.appendChild(a);for(var o=this.parent.activeViewOptions.showWeekend?s.e:this.parent.activeViewOptions.workDays.length,c=0,p=this.renderDates.length/o;c<p;c++){var d=e.splice(0,o),h=this.parent.getWeekNumberContent(d);a.querySelector("tbody").appendChild(this.createWeekNumberElement(h))}return t},t.prototype.renderAppointmentContainer=function(){},t.prototype.renderDatesHeader=function(){var e=i.i(n.createElement)("div",{className:l.c}),t=i.i(n.createElement)("div",{className:l.d});e.appendChild(t);var r=this.createTableLayout();if("Month"===this.parent.currentView){var a=i.i(n.createElement)("thead");a.appendChild(i.i(n.createElement)("tr")),i.i(n.prepend)([a],r)}this.createColGroup(r,this.colLevels[this.colLevels.length-1]);for(var s=i.i(n.createElement)("tr"),o=0;o<this.colLevels.length;o++){for(var c=this.colLevels[parseInt(o.toString(),10)],p=s.cloneNode(),d=0;d<c.length;d++){var h=c[parseInt(d.toString(),10)];p.appendChild(this.createHeaderCell(h))}r.querySelector("tbody").appendChild(p)}return t.appendChild(r),e},t.prototype.createHeaderCell=function(e){var t=i.i(n.createElement)("td");if(this.addAttributes(e,t),"monthDay"===e.type){var r=i.i(n.createElement)("span",{innerHTML:s.a(this.parent.getDayNames(this.dayNameFormat)[e.date.getDay()],"single")});t.appendChild(r)}if("resourceHeader"===e.type&&this.setResourceHeaderContent(t,e),"dateHeader"===e.type){if(i.i(n.addClass)([t],l.o),t.setAttribute("data-date",e.date.getTime().toString()),this.parent.activeViewOptions.dateHeaderTemplate){var a={date:e.date,type:e.type},c=this.parent.element.id+"_",p=this.parent.activeViewOptions.dateHeaderTemplateName,d=c+p+"dateHeaderTemplate",h=[].slice.call(this.parent.getDateHeaderTemplate()(a,this.parent,"dateHeaderTemplate",d,!1));h&&h.length&&i.i(n.append)(h,t)}else{var r=i.i(n.createElement)("span",{className:l.p}),u=this.parent.globalize.formatDate(e.date,{skeleton:"full",calendar:this.parent.getCalendarMode()});r.setAttribute("title",s.a(u,"multiple"));var g=!this.parent.calendarUtil.isMonthStart(e.date)||this.isCurrentDate(e.date)||this.parent.isAdaptive?this.parent.globalize.formatDate(e.date,{skeleton:"d",calendar:this.parent.getCalendarMode()}):this.parent.globalize.formatDate(e.date,{format:"MMM d",calendar:this.parent.getCalendarMode()});r.innerHTML=s.a(g,"single"),t.appendChild(r)}this.wireCellEvents(t)}var v={elementType:e.type,element:t,date:e.date,groupIndex:e.groupIndex};return this.parent.trigger(o.j,v),t},t.prototype.getContentSlots=function(){if(!this.colLevels[this.colLevels.length-1]||!this.colLevels[this.colLevels.length-1][0])return[];var e=[],t=function(t,i,n,r){var a={date:new Date(+i),groupIndex:n.groupIndex,workDays:n.workDays,type:"monthCells",className:r||[l.n]};e[parseInt(t.toString(),10)]||(e[parseInt(t.toString(),10)]=[]),e[parseInt(t.toString(),10)].push(a)},i="MonthAgenda"!==this.parent.currentView&&this.parent.activeViewOptions.group.resources.length>0;if(!i||this.parent.uiStateValues.isGroupAdaptive||this.parent.activeViewOptions.group.byDate)for(var n=this.renderDates.map(function(e){return new Date(+e)}),r=this.parent.activeViewOptions.showWeekend?s.e:this.parent.activeViewOptions.workDays.length,a=this.colLevels.slice(0,1)[0],o=this.renderDates.map(Number).indexOf(+a[0].date),c=0;c<this.renderDates.length/r;c++)for(var p,d=n.splice(0,r),h=o,u=this,g=o;g<this.colLevels[0].length+o&&g<d.length;g++)!function(e){var n=d[parseInt(h.toString(),10)];if(h++,i){var a=u.colLevels[u.colLevels.length-1],s=a.length/r,o=a.slice(0,s);if(u.parent.activeViewOptions.group.hideNonWorkingDays&&(o=a.filter(function(e){return e.date.getDay()===n.getDay()}),0===o.length))return e-=1,p=e,"continue";for(var g=0;g<o.length;g++){var v=void 0;0!==g&&(v=[l.n,l._57]),t(c,n,o[parseInt(g.toString(),10)],v)}}else t(c,n,u.colLevels[u.colLevels.length-1][0]);p=e}(g),g=p;else for(var v=0,f=this.colLevels[this.colLevels.length-2];v<f.length;v++)for(var m=f[v],n=m.renderDates.map(function(e){return new Date(+e)}),r=this.parent.activeViewOptions.showWeekend?s.e:m.workDays.length,c=0;c<m.renderDates.length/r;c++)for(var d=n.splice(0,r),y=0,T=d;y<T.length;y++){var w=T[y];t(c,w,m)}return e},t.prototype.updateClassList=function(e){!this.isCustomMonth()&&this.isOtherMonth(e.date)&&e.className.push(l.t),this.parent.isMinMaxDate(e.date)||e.className.push(l.r),this.updateSelectedCellClass(e)},t.prototype.updateSelectedCellClass=function(e){},t.prototype.isOtherMonth=function(e){return e.getTime()<this.monthDates.start.getTime()||e.getTime()>this.monthDates.end.getTime()},t.prototype.renderContentArea=function(){var e=this.createTableLayout(l.h);this.setAriaAttributes(e),this.addAutoHeightClass(e),"TimelineMonth"===this.parent.currentView&&this.createColGroup(e,this.colLevels[this.colLevels.length-1]);var t=new Date(this.parent.selectedDate.getTime());this.monthDates={start:this.parent.calendarUtil.firstDateOfMonth(t),end:this.parent.calendarUtil.lastDateOfMonth(s.u(t,this.parent.activeViewOptions.interval-1))};var r=e.querySelector("tbody");return i.i(n.append)(this.getContentRows(),r),this.wireCellEvents(r),e},t.prototype.getContentRows=function(){for(var e=[],t=i.i(n.createElement)("tr"),r=i.i(n.createElement)("td",{attrs:{"aria-selected":"false"}}),a=this.getContentSlots(),s=0;s<a.length;s++){for(var o=t.cloneNode(),l=0;l<a[parseInt(s.toString(),10)].length;l++){var c=this.createContentTd(a[parseInt(s.toString(),10)][parseInt(l.toString(),10)],r);o.appendChild(c)}e.push(o)}return e},t.prototype.createContentTd=function(e,t){var r=t.cloneNode();e.colSpan&&r.setAttribute("colspan",e.colSpan.toString()),this.updateClassList(e);var a=e.type;if(-1!==e.className.indexOf(l.u)&&(e.className.push(l.v),a="resourceGroupCells"),this.parent.workHours.highlight&&this.isWorkDay(e.date,e.workDays)&&e.className.push(l.q),this.isCurrentDate(e.date)&&e.className.push(l._58),i.i(n.addClass)([r],e.className),r.setAttribute("data-date",e.date.getTime().toString()),!i.i(n.isNullOrUndefined)(e.groupIndex)||this.parent.uiStateValues.isGroupAdaptive){var s=this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:e.groupIndex;r.setAttribute("data-group-index",""+s)}if(this.renderDateHeaderElement(e,r),this.parent.activeViewOptions.cellTemplate){var c={date:e.date,type:a,groupIndex:e.groupIndex},p=this.parent.element.id+"_",d=this.parent.activeViewOptions.cellTemplateName,h=p+d+"cellTemplate",u=[].slice.call(this.parent.getCellTemplate()(c,this.parent,"cellTemplate",h,!1));i.i(n.append)(u,r)}var g={elementType:a,element:r,date:e.date,groupIndex:e.groupIndex};return this.parent.trigger(o.j,g),r},t.prototype.renderDateHeaderElement=function(e,t){if("TimelineMonth"!==this.parent.currentView){var r=i.i(n.createElement)("div",{className:l.o});if(this.parent.activeViewOptions.cellHeaderTemplate){var a={date:e.date,type:e.type,groupIndex:e.groupIndex},o=this.parent.element.id+"_",c=this.parent.activeViewOptions.cellHeaderTemplateName,p=o+c+"cellHeaderTemplate",d=[].slice.call(this.parent.getCellHeaderTemplate()(a,this.parent,"cellHeaderTemplate",p,!1));i.i(n.append)(d,r)}else{var h=!this.parent.calendarUtil.isMonthStart(e.date)||this.isCurrentDate(e.date)||this.parent.isAdaptive?this.parent.globalize.formatDate(e.date,{skeleton:"d",calendar:this.parent.getCalendarMode()}):this.parent.globalize.formatDate(e.date,{format:"MMM d",calendar:this.parent.getCalendarMode()});r.innerHTML=s.a(h,"single")}if(t.appendChild(r),"month"===this.getModuleName()){i.i(n.addClass)([r],l.p);var u=this.parent.globalize.formatDate(e.date,{skeleton:"full",calendar:this.parent.getCalendarMode()});t.setAttribute("aria-label",u)}}},t.prototype.getMonthStart=function(e){var t="Month"===this.parent.currentView&&!i.i(n.isNullOrUndefined)(this.parent.activeViewOptions.displayDate)&&(this.parent.uiStateValues.isCustomMonth||this.isCustomRange()),r=t?this.parent.activeViewOptions.displayDate:this.parent.uiStateValues.isCustomMonth||this.isCustomRange()||!this.isCustomMonth()?this.parent.calendarUtil.firstDateOfMonth(e):e,a=s.l(r,this.parent.activeViewOptions.firstDayOfWeek);return new Date(a.getFullYear(),a.getMonth(),a.getDate())},t.prototype.getMonthEnd=function(e){if(this.isCustomMonth()){var t=this.getMonthStart(e),i=s.e*(this.parent.activeViewOptions.numberOfWeeks>0?this.parent.activeViewOptions.numberOfWeeks:s.f);return s.d(t,i-1)}var n=s.u(e,this.parent.activeViewOptions.interval-1),r=s.l(this.parent.calendarUtil.lastDateOfMonth(n),this.parent.activeViewOptions.firstDayOfWeek);return s.d(r,s.e-1)},t.prototype.isCustomRange=function(){var e=this.parent.getCurrentViewDates();if(e&&e.length>0){var t=s.b(this.parent.selectedDate).getTime(),i=s.l(e[e.length-1],this.parent.activeViewOptions.firstDayOfWeek);return!(t>=s.l(e[0],this.parent.activeViewOptions.firstDayOfWeek).getTime()&&t<=s.d(i,6).getTime())}return!1},t.prototype.getRenderDates=function(e){var t=[],i=s.b(this.parent.selectedDate),n=this.getMonthStart(i),r=this.getMonthEnd(i);do{this.parent.activeViewOptions.showWeekend?t.push(n):this.isWorkDay(n,e)&&t.push(n),n=s.d(n,1),n.getHours()>0&&(n=s.b(n))}while(n.getTime()<=r.getTime());return e||(this.renderDates=t),this.parent.headerModule&&this.parent.headerModule.previousNextIconHandler(),t},t.prototype.getNextPreviousDate=function(e){if(this.isCustomMonth()){var t=this.parent.getCurrentViewDates(),i=s.l("next"===e?t[t.length-1]:t[0],this.parent.activeViewOptions.firstDayOfWeek);return s.d(i,"next"===e?s.e:-(this.parent.activeViewOptions.numberOfWeeks>0?this.parent.activeViewOptions.numberOfWeeks:s.f)*s.e)}return s.u(this.parent.selectedDate,("next"===e?1:-1)*this.parent.activeViewOptions.interval)},t.prototype.getStartDate=function(){return this.getMonthStart(this.parent.selectedDate)},t.prototype.getEndDate=function(){return this.getMonthEnd(this.parent.selectedDate)},t.prototype.getEndDateFromStartDate=function(e){return s.d(new Date(e.getTime()),1)},t.prototype.getDateRangeText=function(){if(this.parent.isAdaptive||i.i(n.isNullOrUndefined)(this.parent.activeViewOptions.dateFormat)){var e=this.parent.selectedDate,t=void 0,r=!1;if(this.isCustomMonth()){var a=this.parent.getCurrentViewDates();r=a[0].getMonth()!==a[a.length-1].getMonth()||a[0].getFullYear()!==a[a.length-1].getFullYear(),r&&(e=a[0],t=a[a.length-1])}var o="Month"!==this.parent.currentView||!this.isCustomMonth();if(this.parent.activeViewOptions.interval>1&&o||r){if(t=t||s.u(s.o(e),this.parent.activeViewOptions.interval-1),e.getFullYear()===t.getFullYear()){var l=this.parent.globalize.formatDate(e,{format:"MMMM",calendar:this.parent.getCalendarMode()})+" - "+this.parent.globalize.formatDate(t,{format:"MMMM ",calendar:this.parent.getCalendarMode()})+this.parent.globalize.formatDate(t,{skeleton:"y",calendar:this.parent.getCalendarMode()});return s.a(l,"single")}var c=this.parent.globalize.formatDate(e,{format:"MMMM",calendar:this.parent.getCalendarMode()})+" "+e.getFullYear()+" - "+this.parent.globalize.formatDate(t,{format:"MMMM ",calendar:this.parent.getCalendarMode()})+this.parent.globalize.formatDate(t,{skeleton:"y",calendar:this.parent.getCalendarMode()});return s.a(c,"single")}var p=this.parent.activeViewOptions.dateFormat?this.parent.activeViewOptions.dateFormat:"MMMM y";return s.a(this.parent.globalize.formatDate(e,{format:p,calendar:this.parent.getCalendarMode()}),"single")}return this.formatDateRange(this.parent.selectedDate)},t.prototype.getLabelText=function(e){return this.parent.localeObj.getConstant(e)+" of "+s.a(this.parent.globalize.formatDate(this.parent.selectedDate,{format:"MMMM y",calendar:this.parent.getCalendarMode()}),"single")},t.prototype.createWeekNumberElement=function(e){var t=i.i(n.createElement)("tr"),r=i.i(n.createElement)("td",{className:l.E,attrs:{title:e?this.parent.localeObj.getConstant("week")+" "+e:""},innerHTML:e||""});t.appendChild(r);var a={elementType:"weekNumberCell",element:r};return this.parent.trigger(o.j,a),t},t.prototype.unWireEvents=function(){var e=this.element.querySelector("."+l.g);e&&n.EventHandler.remove(e,"scroll",this.onContentScroll)},t.prototype.isCustomMonth=function(){return"Month"===this.parent.currentView&&(!i.i(n.isNullOrUndefined)(this.parent.activeViewOptions.displayDate)||this.parent.activeViewOptions.numberOfWeeks>0)},t.prototype.getModuleName=function(){return"month"},t.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed||this.element&&(this.monthEvent&&(this.monthEvent.destroy(),this.monthEvent=null),this.unWireEvents(),this.parent.resourceBase&&this.parent.resourceBase.destroy(),this.parent.scheduleTouchModule&&this.parent.scheduleTouchModule.resetValues(),e.prototype.destroy.call(this))},t}(r.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var n=i(0),r=(i.n(n),i(8)),a=i(15),s=i(5),o=i(1),l=i(2),c=i(3),p=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),d=function(e){function t(t){var i=e.call(this,t)||this;return i.viewClass="e-day-view",i.isInverseTableSelect=!0,i.baseCssClass="e-vertical-view",i.appointment=null,i}return p(t,e),t.prototype.getModuleName=function(){return"verticalView"},t.prototype.addEventListener=function(){this.parent.on(l.J,this.scrollUiUpdate,this),this.parent.on(l.E,this.renderEvents,this)},t.prototype.removeEventListener=function(){this.parent&&(this.parent.off(l.J,this.scrollUiUpdate),this.parent.off(l.E,this.renderEvents))},t.prototype.renderEvents=function(){this.appointment=this.parent.activeViewOptions.timeScale.enable?new a.a(this.parent):new s.a(this.parent),this.appointment.renderAppointments(),this.parent.notify(l.F,{})},t.prototype.onContentScroll=function(e){this.parent.removeNewEventElement();var t=e.target;this.parent.notify(l.I,e),this.scrollLeftPanel(t),this.scrollTopPanel(t),this.parent.isAdaptive||(this.parent.uiStateValues.top=t.scrollTop),this.parent.uiStateValues.left=t.scrollLeft,i.i(n.isNullOrUndefined)(this.parent.quickPopup)||this.parent.uiStateValues.isTapHold||this.parent.quickPopup.quickPopupHide(),this.setPersistence()},t.prototype.onAdaptiveMove=function(e){this.parent.uiStateValues.action&&e.preventDefault()},t.prototype.onAdaptiveScroll=function(e){this.parent&&!this.parent.isDestroyed&&(this.parent.removeNewEventElement(),this.parent.uiStateValues.top=e.target.scrollTop)},t.prototype.scrollLeftPanel=function(e){var t=this.getLeftPanelElement();i.i(n.isNullOrUndefined)(t)||(t.scrollTop=e.scrollTop)},t.prototype.scrollUiUpdate=function(e){if(this.parent){var t=this.parent.element.querySelector("."+c.d),i=this.getHeaderBarHeight(),n=this.getLeftPanelElement(),r=this.getScrollableElement(),a=this.getDatesHeaderElement(),s=this.parent.element.offsetHeight-i-a.offsetHeight;this.setContentHeight(r,n,s),this.setColWidth(r);var l=o.A();a.firstElementChild.style[e.cssProperties.rtlBorder]="",a.style[e.cssProperties.rtlPadding]="";var p=!this.parent.enableAllDayScroll||!(r.offsetWidth-r.clientWidth<=t.offsetWidth-t.clientWidth&&t.classList.contains("e-all-day-scroll"));r.offsetWidth-r.clientWidth>0&&p?(a.firstElementChild.style[e.cssProperties.border]=l>0?"1px":"0px",a.style[e.cssProperties.padding]=l>0?l-1+"px":"0px"):(a.firstElementChild.style[e.cssProperties.border]="",a.style[e.cssProperties.padding]=""),e.isPreventScrollUpdate||(this.parent.uiStateValues.isInitial?(this.parent.currentView.indexOf("Timeline")>-1&&(r.scrollTop=this.parent.uiStateValues.top),this.scrollToWorkHour(),this.parent.uiStateValues.isInitial=!1):(n&&(n.scrollTop=this.parent.uiStateValues.top),r.scrollTop=this.parent.uiStateValues.top,r.scrollLeft=this.parent.uiStateValues.left)),this.parent.activeViewOptions.timeScale.enable&&this.highlightCurrentTime(),this.retainScrollPosition()}},t.prototype.setContentHeight=function(e,t,r){this.parent.isAdaptive&&!this.isTimelineView()?e.style.height="auto"===this.parent.height?"auto":i.i(n.formatUnit)(r):(i.i(n.isNullOrUndefined)(t)||(t.style.height="auto"===this.parent.height?"auto":i.i(n.formatUnit)(r-this.getScrollXIndent(e))),e.style.height="auto"===this.parent.height?"auto":i.i(n.formatUnit)(r))},t.prototype.scrollToWorkHour=function(){if(this.parent.workHours.highlight){var e=this.element.querySelector("."+c._17);e&&(this.getScrollableElement().scrollTop=e.offsetTop,this.parent.uiStateValues.top=e.offsetTop,this.parent.uiStateValues.left=0)}},t.prototype.scrollToHour=function(e,t){var r=this.parent.getStartEndTime(e);if(!i.i(n.isNullOrUndefined)(t)){var a=this.element.querySelector("."+c.e+'[data-date="'+new Date(o.b(t)).getTime()+'"]');if(a)if(this.parent.enableRtl){var s=this.element.querySelector("."+c.h);this.getScrollableElement().scrollLeft=-(s.offsetWidth-a.offsetLeft-a.offsetWidth)}else this.getScrollableElement().scrollLeft=a.offsetLeft}i.i(n.isNullOrUndefined)(r)||(this.getScrollableElement().scrollTop=this.getTopFromDateTime(r))},t.prototype.scrollToDate=function(e){this.scrollToHour(null,e)},t.prototype.generateColumnLevels=function(){var e=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays),t=[];if(this.parent.activeViewOptions.group.resources.length>0){if(t=this.parent.resourceBase.generateResourceLevels(e),this.parent.activeViewOptions.group.hideNonWorkingDays)for(;0===t[0].length;)this.parent.setProperties({selectedDate:this.parent.activeView.getNextPreviousDate(this.previousNextAction)},!0),this.parent.activeView.getRenderDates(),this.parent.headerModule&&(this.parent.headerModule.setCalendarDate(this.parent.selectedDate),this.parent.headerModule.updateDateRange()),e=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays),t=this.parent.resourceBase.generateResourceLevels(e);if(this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.lastResourceLevel.length>0){var i=this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex],n=i.resourceData[i.resource.startHourField],r=i.resourceData[i.resource.endHourField];t=[this.getDateSlots(i.renderDates,i.workDays,n,r)]}}else t.push(e);return this.colLevels=t,t},t.prototype.getDateSlots=function(e,t,i,n){void 0===i&&(i=this.parent.workHours.start),void 0===n&&(n=this.parent.workHours.end);for(var r=[],a=this.parent.getStartEndTime(i),s=this.parent.getStartEndTime(n),o=0,l=e;o<l.length;o++){var p=l[o],d=[c.e];this.isCurrentDate(p)&&d.push(c.s),r.push({date:p,type:"dateHeader",className:d,colSpan:1,workDays:t,startHour:new Date(+a),endHour:new Date(+s)})}return r},t.prototype.isWorkHourRange=function(e){return this.getStartHour().getTime()<=e.getTime()&&this.getEndHour().getTime()>=e.getTime()},t.prototype.highlightCurrentTime=function(){var e=this;if(!(this.parent.activeViewOptions.headerRows.length>0&&"Hour"!==this.parent.activeViewOptions.headerRows.slice(-1)[0].option)){var t=this.parent.getCurrentTime();if(this.parent.showTimeIndicator&&this.isWorkHourRange(t)){if(this.getCurrentTimeIndicatorIndex().length>0){if([].slice.call(this.element.querySelectorAll("."+c.n)).length>0&&this.changeCurrentTimePosition(),i.i(n.isNullOrUndefined)(this.currentTimeIndicatorTimer)){var r=o.g-(1e3*t.getSeconds()+t.getMilliseconds());r<=o.g-1e3&&window.setTimeout(function(){i.i(n.isNullOrUndefined)(e.currentTimeIndicatorTimer)||(e.clearCurrentTimeIndicatorTimer(),e.changeCurrentTimePosition(),e.updateCurrentTimeIndicatorTimer())},r),this.updateCurrentTimeIndicatorTimer()}}else this.clearCurrentTimeIndicatorTimer()}else this.clearCurrentTimeIndicatorTimer()}},t.prototype.getCurrentTimeIndicatorIndex=function(){var e=[];if(!i.i(n.isNullOrUndefined)(this.parent.resourceBase)&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var t=0,r=o.b(this.parent.getCurrentTime());if(this.parent.virtualScrollModule&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.activeViewOptions.group.byDate)for(var a=0,s=this.parent.resourceBase.expandedResources;a<s.length;a++){var l=s[a];o.b(l.date).getTime()===r.getTime()&&e.push(t),t+=1}else for(var c=0,p=this.parent.resourceBase.renderedResources;c<p.length;c++){var l=p[c],d=this.parent.getIndexOfDate(l.renderDates,r);if(d>=0){var h=this.parent.activeViewOptions.group.byDate?this.parent.resourceBase.lastResourceLevel.length*d+t:t+d;e.push(h)}t+=this.parent.activeViewOptions.group.byDate?1:l.renderDates.length}}else{var u=this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.lastResourceLevel.length>0?this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex].renderDates:this.renderDates,d=this.parent.getIndexOfDate(u,o.b(this.parent.getCurrentTime()));d>=0&&e.push(d)}return e},t.prototype.clearCurrentTimeIndicatorTimer=function(){i.i(n.isNullOrUndefined)(this.currentTimeIndicatorTimer)||(window.clearInterval(this.currentTimeIndicatorTimer),this.currentTimeIndicatorTimer=null,this.removeCurrentTimeIndicatorElements())},t.prototype.updateCurrentTimeIndicatorTimer=function(){var e=this;this.currentTimeIndicatorTimer=window.setInterval(function(){e.changeCurrentTimePosition()},o.g)},t.prototype.removeCurrentTimeIndicatorElements=function(){for(var e="."+c._18+",."+c._14+",."+c._15,t=[].slice.call(this.element.querySelectorAll(e)),r=0,a=t;r<a.length;r++){var s=a[r];i.i(n.remove)(s)}},t.prototype.changeCurrentTimePosition=function(){if(!(!this.parent||this.parent&&this.parent.isDestroyed)){this.removeCurrentTimeIndicatorElements();var e=this.getCurrentTimeIndicatorIndex(),t=this.parent.getContentTable().rows[0],r=this.getTopFromDateTime(this.parent.getCurrentTime()),a=i.i(n.formatUnit)(r),s=Math.floor(r/t.cells[0].offsetHeight),o=this.getLeftPanelElement(),l=[].slice.call(o.querySelectorAll("tr"));if(!i.i(n.isNullOrUndefined)(s)&&!isNaN(s)&&s!==l.length){for(var p=[].slice.call(this.element.querySelectorAll("."+c._8)),d=0,h=e[0];d<h;d++)p[parseInt(d.toString(),10)].appendChild(i.i(n.createElement)("div",{className:c._18,styles:"top:"+a}));for(var u=0,g=e;u<g.length;u++){var v=g[u];p[parseInt(v.toString(),10)].appendChild(i.i(n.createElement)("div",{className:c._14,styles:"top:"+a}))}var f=i.i(n.createElement)("div",{innerHTML:this.parent.getTimeString(this.parent.getCurrentTime()),className:c._15,styles:"top:"+a});s<=l.length&&(i.i(n.removeClass)(o.querySelectorAll("."+c._19),c._19),l[parseInt(s.toString(),10)]&&i.i(n.addClass)([l[parseInt(s.toString(),10)].lastElementChild],c._19),i.i(n.prepend)([f],o),f.style.top=i.i(n.formatUnit)(f.offsetTop-f.offsetHeight/2))}}},t.prototype.getTopFromDateTime=function(e){var t=this.getStartHour();return(60*(e.getHours()-t.getHours())+(e.getMinutes()-t.getMinutes()))*this.getWorkCellHeight()*this.parent.activeViewOptions.timeScale.slotCount/this.parent.activeViewOptions.timeScale.interval},t.prototype.getWorkCellHeight=function(){return parseFloat(o.K(this.element.querySelector("."+c.n)).toFixed(2))},t.prototype.getTdContent=function(e,t,r){var a,s=i.i(n.createElement)("div"),l="",c=this.parent.element.id+"_";switch(t){case"dateHeader":if(this.parent.activeViewOptions.dateHeaderTemplate){l="dateHeaderTemplate";var p={date:e,type:t},d=this.parent.activeViewOptions.dateHeaderTemplateName;a=[].slice.call(this.parent.getDateHeaderTemplate()(p,this.parent,l,c+d+l,!1))}else s.innerHTML=this.parent.activeView.isTimelineView()?'<span class="e-header-date e-navigate">'+this.getTimelineDate(e)+"</span>":'<div class="e-header-day">'+o.a(this.getDayName(e),"single")+'</div><div class="e-header-date e-navigate" role="link">'+this.getDate(e)+"</div>",a=[].slice.call(s.childNodes);break;case"majorSlot":if(this.parent.activeViewOptions.timeScale.majorSlotTemplate){l="majorSlotTemplate";var p={date:e,type:t};a=[].slice.call(this.parent.getMajorSlotTemplate()(p,this.parent,l,c+l,!1))}else s.innerHTML="<span>"+this.getTime(e)+"</span>",a=[].slice.call(s.childNodes);break;case"minorSlot":if(this.parent.activeViewOptions.timeScale.minorSlotTemplate){l="minorSlotTemplate";var p={date:e,type:t};a=[].slice.call(this.parent.getMinorSlotTemplate()(p,this.parent,l,c+l,!1))}else a=[].slice.call(s.childNodes);break;case"alldayCells":if(this.parent.activeViewOptions.cellTemplate){var d=this.parent.activeViewOptions.cellTemplateName;l="cellTemplate";var p={date:e,type:t,groupIndex:r};a=[].slice.call(this.parent.getCellTemplate()(p,this.parent,l,c+d+l,!1))}}return a},t.prototype.refreshHeader=function(){i.i(n.remove)(this.element.querySelector("tbody tr")),this.renderHeader(),this.parent.notify(l.G,{});var e=this.element.querySelector("."+c.d);e&&(e.scrollLeft=this.parent.uiStateValues.left)},t.prototype.renderLayout=function(e){this.setPanel(i.i(n.createElement)("div",{className:c._20}));var t=[this.baseCssClass,this.viewClass];t.push(e),this.parent.activeViewOptions.group.byDate&&t.push("e-by-date"),this.parent.activeViewOptions.timeScale.enable||i.i(n.addClass)([this.element],[c._21,this.viewClass]),this.parent.activeViewOptions.allowVirtualScrolling&&!this.parent.uiStateValues.isGroupAdaptive&&t.push(c._22),this.parent.rowAutoHeight&&this.parent.eventSettings.ignoreWhitespace&&t.push(c._23),this.renderPanel(e),i.i(n.addClass)([this.element],t),this.element.appendChild(this.createTableLayout(c._24)),this.element.querySelector("table").setAttribute("role","presentation"),this.colLevels=this.generateColumnLevels(),this.renderHeader(),this.renderContent(),this.parent.uiStateValues.isGroupAdaptive&&!this.parent.element.querySelector("."+c._25)&&this.renderResourceMobileLayout(),this.parent.notify(l.G,{})},t.prototype.renderHeader=function(){var e=i.i(n.createElement)("tr"),t=i.i(n.createElement)("td");if(t.appendChild(this.renderDatesHeader()),this.parent.activeViewOptions.timeScale.enable){var r=i.i(n.createElement)("td",{className:c.a});r.appendChild(this.renderLeftIndent()),e.appendChild(r)}e.appendChild(t),i.i(n.prepend)([e],this.element.querySelector("tbody"))},t.prototype.renderContent=function(){this.parent.activeViewOptions.group.resources.length>0&&(this.parent.resourceBase.renderedResources=i.i(n.extend)([],this.parent.resourceBase.lastResourceLevel,null,!0));var e=i.i(n.createElement)("tr"),t=i.i(n.createElement)("td");if(this.parent.isAdaptive){t.setAttribute("colspan",this.parent.activeViewOptions.timeScale.enable?"2":"1");var r=i.i(n.createElement)("div",{className:c.w});this.parent.activeViewOptions.timeScale.enable&&r.appendChild(this.renderTimeCells()),r.appendChild(this.renderContentArea()),t.appendChild(r),n.EventHandler.add(r,"scroll",this.onAdaptiveScroll,this),n.EventHandler.add(r,n.Browser.touchMoveEvent,this.onAdaptiveMove,this),e.appendChild(t)}else{var a=this.colLevels.slice(0);this.parent.virtualScrollModule&&this.resetColLevels();var s=this.renderContentArea();if(t.appendChild(s),this.parent.activeViewOptions.timeScale.enable){var o=i.i(n.createElement)("td");o.appendChild(this.renderTimeCells()),e.appendChild(o)}e.appendChild(t),this.parent.virtualScrollModule&&(this.colLevels=a,this.parent.virtualScrollModule.renderVirtualTrack(s))}this.element.querySelector("tbody").appendChild(e)},t.prototype.renderLeftIndent=function(){for(var e,t=i.i(n.createElement)("div",{className:c.b}),r=this.createTableLayout(),a=i.i(n.createElement)("tr"),s=this.colLevels.length,o=0;o<s;o++){var l=a.cloneNode(),p={className:[this.colLevels[parseInt(o.toString(),10)][0]&&this.colLevels[parseInt(o.toString(),10)][0].className[0]],type:"emptyCells"};if(this.parent.activeViewOptions.showWeekNumber&&-1!==p.className.indexOf(c.e)){p.className.push(c.E);var d=this.parent.getWeekNumberContent(this.renderDates);p.template=[i.i(n.createElement)("span",{innerHTML:""+d,attrs:{title:this.parent.localeObj.getConstant("week")+" "+d}})]}e=this.createTd(p),this.parent.renderHeaderIndentTemplate(p,e),l.appendChild(e),r.querySelector("tbody").appendChild(l)}var h=a.cloneNode(),u=i.i(n.createElement)("div",{attrs:{tabindex:"0",role:"list",title:this.parent.localeObj.getConstant("expandAllDaySection"),"aria-disabled":"false","aria-label":"Expand section"},className:c._26+" "+c._27+" "+c.N+" "+c.J}),g={className:[c.U],type:"emptyCells"};return e=this.createTd(g),e.appendChild(u),this.parent.renderHeaderIndentTemplate(g,e),h.appendChild(e),r.querySelector("tbody").appendChild(h),t.appendChild(r),t},t.prototype.renderDatesHeader=function(){var e=i.i(n.createElement)("div",{className:c.c}),t=i.i(n.createElement)("div",{className:c.d});e.appendChild(t);for(var r=this.createTableLayout(),a=i.i(n.createElement)("tr",{className:c._4}),s=this.colLevels.length,o=this.colLevels[s-1],l=0;l<s;l++){for(var p=a.cloneNode(),d=this.colLevels[parseInt(l.toString(),10)],h=0;h<d.length;h++)p.appendChild(this.createTd(d[parseInt(h.toString(),10)]));r.querySelector("tbody").appendChild(p)}return this.createAllDayRow(r,o),this.createColGroup(r,o),t.appendChild(r),e},t.prototype.createAllDayRow=function(e,t){for(var r=i.i(n.createElement)("tr",{className:c._28}),a=0;a<t.length;a++){var s=i.i(n.extend)({},t[parseInt(a.toString(),10)]);s.className=[c.U],s.type="alldayCells";var o=this.createTd(s);o.setAttribute("data-date",s.date.getTime().toString()),i.i(n.isNullOrUndefined)(s.groupIndex)?this.parent.uiStateValues.isGroupAdaptive&&o.setAttribute("data-group-index",""+this.parent.uiStateValues.groupIndex):o.setAttribute("data-group-index",""+s.groupIndex),this.wireCellEvents(o),r.appendChild(o)}e.querySelector("tbody").appendChild(r);var l=i.i(n.createElement)("thead");l.appendChild(this.parent.eventBase.createEventWrapper("allDay")),i.i(n.prepend)([l],e)},t.prototype.createTd=function(e){var t=i.i(n.createElement)("td");if(this.addAttributes(e,t),e.date&&e.type){var r=this.getTdContent(e.date,e.type,e.groupIndex);r&&r.length&&i.i(n.append)(r,t)}this.parent.isMinMaxDate(o.b(new Date(""+e.date)))||i.i(n.addClass)([t],c.r),"resourceHeader"===e.type&&this.setResourceHeaderContent(t,e),"dateHeader"===e.type&&e.className.indexOf(c.e)>=0&&(t.setAttribute("data-date",e.date.getTime().toString()),i.i(n.isNullOrUndefined)(e.groupIndex)||t.setAttribute("data-group-index",""+e.groupIndex),this.wireMouseEvents(t));var a={elementType:e.type,element:t,date:e.date,groupIndex:e.groupIndex};return this.parent.trigger(l.j,a),t},t.prototype.wireCellEvents=function(e){n.EventHandler.add(e,"mousedown",this.parent.workCellAction.cellMouseDown,this.parent.workCellAction),this.wireMouseEvents(e)},t.prototype.wireMouseEvents=function(e){n.EventHandler.add(e,"click",this.parent.workCellAction.cellClick,this.parent.workCellAction),this.parent.isAdaptive||n.EventHandler.add(e,"dblclick",this.parent.workCellAction.cellDblClick,this.parent.workCellAction)},t.prototype.renderTimeCells=function(){var e=this,t=i.i(n.createElement)("div",{className:c._29}),r=this.createTableLayout(),a=i.i(n.createElement)("tr"),s=function(t){t.type=t.first?"majorSlot":"minorSlot",t.className=t.last?[c._13,c._12]:[c._12];var i=a.cloneNode(),n={date:t.date,type:t.type,className:t.className};return i.appendChild(e.createTd(n)),r.querySelector("tbody").appendChild(i),t};return this.getTimeSlotRows(s),t.appendChild(r),t},t.prototype.renderContentArea=function(){var e=i.i(n.createElement)("div",{className:c.g}),t=this.createTableLayout(c.h);return this.setAriaAttributes(t),this.addAutoHeightClass(t),this.renderContentTable(t),this.createColGroup(t,this.colLevels.slice(-1)[0]),e.appendChild(t),this.wireCellEvents(t.querySelector("tbody")),n.EventHandler.add(e,"scroll",this.onContentScroll,this),n.EventHandler.add(e,n.Browser.touchMoveEvent,this.onAdaptiveMove,this),e},t.prototype.renderContentTable=function(e){var t=e.querySelector("tbody");i.i(n.append)(this.getContentRows(),t),this.renderContentTableHeader(e)},t.prototype.getContentRows=function(){var e=this,t=[],r=i.i(n.createElement)("tr"),a=i.i(n.createElement)("td",{attrs:{"aria-selected":"false"}}),s=function(i){for(var n=r.cloneNode(),s=0,o=e.colLevels[e.colLevels.length-1];s<o.length;s++){var l=o[s],c=e.createContentTd(l,i,a);n.appendChild(c)}return t.push(n),i};return this.getTimeSlotRows(s),t},t.prototype.createContentTd=function(e,t,r){var a=r.cloneNode();e.colSpan&&a.setAttribute("colspan",e.colSpan.toString());var s=this.getContentTdClass(t),p=o.b(e.date);this.parent.isMinMaxDate(p)||s.push(c.r),o.r(p,o.s(t.date));var d="workCells";if(-1!==e.className.indexOf(c.u)&&(s.push(c.v),d="resourceGroupCells"),this.parent.workHours.highlight&&(this.parent.activeViewOptions.timeScale.enable&&this.isWorkHour(p,e.startHour,e.endHour,e.workDays)||!this.parent.activeViewOptions.timeScale.enable&&this.isWorkDay(p,e.workDays))&&s.push(c._17),i.i(n.addClass)([a],s),this.parent.activeViewOptions.cellTemplate){var h={date:p,type:d,groupIndex:e.groupIndex},u=this.parent.element.id+"_",g=this.parent.activeViewOptions.cellTemplateName,v=u+g+"cellTemplate",f=[].slice.call(this.parent.getCellTemplate()(h,this.parent,"cellTemplate",v,!1));i.i(n.append)(f,a)}a.setAttribute("data-date",p.getTime().toString());if(this.parent.activeViewOptions.timeScale.enable){var m=this.parent.globalize.formatDate(p,{type:"dateTime",skeleton:"full",calendar:this.parent.getCalendarMode()}),y=this.parent.globalize.formatDate(this.getEndDateFromStartDate(p),{type:"dateTime",skeleton:"full",calendar:this.parent.getCalendarMode()});a.setAttribute("aria-label",m+" "+this.parent.localeObj.getConstant("endAt")+" "+y)}else{var T=this.parent.globalize.formatDate(e.date,{skeleton:"full",calendar:this.parent.getCalendarMode()});a.setAttribute("aria-label",T)}if(!i.i(n.isNullOrUndefined)(e.groupIndex)||this.parent.uiStateValues.isGroupAdaptive){var w=this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:e.groupIndex;a.setAttribute("data-group-index",""+w)}var D={elementType:d,element:a,date:p,groupIndex:e.groupIndex};return this.parent.trigger(l.j,D),a},t.prototype.getContentTdClass=function(e){return e.last?[c.n]:[c.n,c._16]},t.prototype.renderContentTableHeader=function(e){var t=i.i(n.createElement)("thead");t.appendChild(this.parent.eventBase.createEventWrapper()),this.parent.activeViewOptions.timeScale.enable&&t.appendChild(this.parent.eventBase.createEventWrapper("timeIndicator")),i.i(n.prepend)([t],e)},t.prototype.getScrollableElement=function(){return this.parent.isAdaptive&&!this.isTimelineView()?this.element.querySelector("."+c.w):this.getContentAreaElement()},t.prototype.getLeftPanelElement=function(){return this.element.querySelector("."+c._29)},t.prototype.getEndDateFromStartDate=function(e){var t=this.parent.activeViewOptions.timeScale.interval*o.g,i=t/this.parent.activeViewOptions.timeScale.slotCount,n=new Date(e.getTime());return n.setMilliseconds(n.getMilliseconds()+i),n},t.prototype.getTimeSlotRows=function(e){var t=[],i=this.getStartHour(),n=this.getEndHour(),r=this.parent.activeViewOptions.timeScale.interval*o.g,a=r/this.parent.activeViewOptions.timeScale.slotCount,s=Math.round(o.c/a),l=i.getTime(),c=n.getTime();if(l!==c){var p=i.getTimezoneOffset()!==n.getTimezoneOffset()?c-l-36e5:c-l;s=Math.round(p/a)}this.parent.activeViewOptions.timeScale.enable||(s=1);for(var d=this.parent.getStartEndTime(this.parent.workHours.start),h=this.parent.getStartEndTime(this.parent.workHours.end),u=0;u<s;u++){var g=new Date(l+a*u);if(o.F(g)||new Date(l).getTimezoneOffset()!==g.getTimezoneOffset()){var v=new Date(l).getTimezoneOffset()-g.getTimezoneOffset();g=new Date(g.getTime()-6e4*v)}var f=u%(r/a),m={date:new Date(""+g),startHour:d,endHour:h,first:0===f,middle:f<this.parent.activeViewOptions.timeScale.slotCount-1,last:f===this.parent.activeViewOptions.timeScale.slotCount-1,type:""};e&&e(m),t.push(m)}return t},t.prototype.getAdjustedDate=function(e){if(!this.parent.activeViewOptions.timeScale.enable)return new Date(e.setHours(0,0,0,0));for(var t=this.getTimeSlotRows(),i=new Date(new Date(t[0].date.getTime()).setHours(e.getHours(),e.getMinutes(),e.getMilliseconds())),n=0;n<t.length;n++)if(t[parseInt(n.toString(),10)].date.getTime()>i.getTime())return e.setHours(t[n-1].date.getHours(),t[n-1].date.getMinutes(),t[n-1].date.getMilliseconds()),new Date(e);return null},t.prototype.destroy=function(){if(!(!this.parent||this.parent&&this.parent.isDestroyed)&&(this.clearCurrentTimeIndicatorTimer(),this.element)){this.appointment&&(this.appointment.destroy(),this.appointment=null);var t=this.getContentAreaElement();t&&(n.EventHandler.remove(t,"scroll",this.onContentScroll),n.EventHandler.remove(t,n.Browser.touchMoveEvent,this.onAdaptiveMove)),this.parent.resourceBase&&this.parent.resourceBase.destroy(),this.parent.scheduleTouchModule&&this.parent.scheduleTouchModule.resetValues(),e.prototype.destroy.call(this)}},t}(r.a)},function(e,t){e.exports=i},function(e,t){e.exports=n},function(e,t,i){"use strict";i.d(t,"a",function(){return r}),i.d(t,"b",function(){return a});var n=i(0),r=(i.n(n),function(){function e(){}return e.prototype.firstDateOfMonth=function(e){return new Date(e.getFullYear(),e.getMonth())},e.prototype.lastDateOfMonth=function(e){return new Date(e.getFullYear(),e.getMonth()+1,0)},e.prototype.isMonthStart=function(e){return 1===e.getDate()},e.prototype.getLeapYearDaysCount=function(){return 366},e.prototype.getYearDaysCount=function(e,t){return(e.getFullYear()+t)%4==0?366:365},e.prototype.getDate=function(e){return e.getDate()},e.prototype.getMonth=function(e){return e.getMonth()+1},e.prototype.getFullYear=function(e){return e.getFullYear()},e.prototype.getYearLastDate=function(e,t){return new Date(e.getFullYear()+t,0,0)},e.prototype.getMonthDaysCount=function(e){return this.lastDateOfMonth(e).getDate()},e.prototype.getMonthStartDate=function(e){return new Date(e.getFullYear(),e.getMonth(),1,e.getHours(),e.getMinutes())},e.prototype.getMonthEndDate=function(e){return e.setDate(1),new Date(e.setMonth(e.getMonth()+1))},e.prototype.getExpectedDays=function(e,t){return t},e.prototype.setDate=function(e,t){e.setDate(t)},e.prototype.setValidDate=function(e,t,r,a,s){i.i(n.isNullOrUndefined)(s)?e.setMonth(e.getMonth()+t,r):e.setMonth((s?a:e.getMonth())+t)},e.prototype.setMonth=function(e,t,i){e.setDate(1),e.setFullYear(e.getFullYear()),e.setMonth(t-1);var n=new Date(e.getFullYear(),e.getMonth()+1,0).getDate();e.setDate(Math.min(i,n))},e.prototype.addYears=function(e,t){e.setFullYear(e.getFullYear()+t)},e.prototype.isSameMonth=function(e,t){return e.getMonth()===t.getMonth()},e.prototype.checkMonth=function(e,t){return-1===t.indexOf(e.getMonth()+1)},e.prototype.compareMonth=function(e,t){return e.getMonth()>t.getMonth()},e.prototype.isSameYear=function(e,t){return e.getFullYear()===t.getFullYear()},e.prototype.isLastMonth=function(e){return 11===e.getMonth()},e.prototype.isLeapYear=function(e,t){return(e+t)%4==0},e}()),a=function(){function e(){}return e.prototype.firstDateOfMonth=function(e){var t=this.getHijriDate(e);return n.HijriParser.toGregorian(t.year,t.month,1)},e.prototype.lastDateOfMonth=function(e){var t=this.getHijriDate(e),i=this.getDaysInMonth(t.month,t.year),r=n.HijriParser.toGregorian(t.year,t.month,i),a=new Date(r.getTime());a=new Date(a.setDate(a.getDate()+1));var s=this.getHijriDate(a);return t.month===s.month?a:(s=this.getHijriDate(r),t.month===s.month?r:new Date(r.setDate(r.getDate()-1)))},e.prototype.isMonthStart=function(e){return 1===this.getHijriDate(e).date},e.prototype.getLeapYearDaysCount=function(){return 355},e.prototype.getYearDaysCount=function(e,t){var i=this.getHijriDate(e);return this.isLeapYear(i.year,t)?355:354},e.prototype.getDate=function(e){return this.getHijriDate(e).date},e.prototype.getMonth=function(e){return this.getHijriDate(e).month},e.prototype.getFullYear=function(e){return this.getHijriDate(e).year},e.prototype.getYearLastDate=function(e,t){var i=this.getHijriDate(e);return n.HijriParser.toGregorian(i.year+t,1,0)},e.prototype.getMonthDaysCount=function(e){var t=this.lastDateOfMonth(e);return this.getHijriDate(t).date},e.prototype.getMonthStartDate=function(e){var t=this.firstDateOfMonth(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),e.getHours(),e.getMinutes())},e.prototype.getMonthEndDate=function(e){var t=this.lastDateOfMonth(e);return t.setDate(t.getDate()+1),new Date(t.setMonth(t.getMonth()))},e.prototype.getExpectedDays=function(e,t){for(var i=this.getHijriDate(e),r=[],a=0;a<t.length;a++){var s=n.HijriParser.toGregorian(i.year,i.month,t[parseInt(a.toString(),10)]);r.push(s.getDate())}return r},e.prototype.setDate=function(e,t){var i=this.getHijriDate(e),r=n.HijriParser.toGregorian(i.year,i.month,t);this.updateDateObj(e,r)},e.prototype.setValidDate=function(e,t,r,a,s){var o=i.i(n.isNullOrUndefined)(s)?e:this.firstDateOfMonth(s),l=this.getHijriDate(o),c=n.HijriParser.toGregorian(l.year,l.month+t,r);this.updateDateObj(e,c)},e.prototype.setMonth=function(e,t,i){var r=this.getHijriDate(e),a=n.HijriParser.toGregorian(r.year,t,i);this.updateDateObj(e,a)},e.prototype.addYears=function(e,t,i){var r=this.getHijriDate(e),a=n.HijriParser.toGregorian(r.year+t,i,1);this.updateDateObj(e,a)},e.prototype.isSameMonth=function(e,t){var i=this.getHijriDate(e),n=this.getHijriDate(t);return i.month===n.month},e.prototype.checkMonth=function(e,t){var i=this.getHijriDate(e);return-1===t.indexOf(i.month)},e.prototype.compareMonth=function(e,t){var i=this.getHijriDate(e),n=this.getHijriDate(t);return i.month>n.month},e.prototype.isSameYear=function(e,t){var i=this.getHijriDate(e),n=this.getHijriDate(t);return i.year===n.year},e.prototype.isLastMonth=function(e){return 12===this.getHijriDate(e).month},e.prototype.updateDateObj=function(e,t){e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate())},e.prototype.isLeapYear=function(e,t){return(14+11*(e+t))%30<11},e.prototype.getDaysInMonth=function(e,t){var i=0;return i=29+(e+1)%2,11===e&&this.isLeapYear(t,0)&&i++,i},e.prototype.getHijriDate=function(e){return n.HijriParser.getHijriDate(e)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return c});var n=i(0),r=(i.n(n),i(11)),a=(i.n(r),i(4)),s=i(1),o=i(3),l=i(2),c=function(){function e(e){this.slots=[],this.isDoubleTapped=!1,this.parent=e}return e.prototype.processData=function(e,t,r){var a=this,o=this.parent.activeView.startDate(),l=this.parent.activeView.endDate(),c=this.parent.eventFields,p=[],d=1,h=!1,u=this.parent.resourceBase?this.parent.resourceBase.resourceCollection:[];e.length>0&&i.i(n.isNullOrUndefined)(e[0][c.id])&&(h=!0);for(var g=this,v=0,f=e;v<f.length;v++){var m=f[v];!function(e){h&&(e[c.id]=d++),e=g.updateEventDateTime(e),t?g.processTimezoneChange(e,r):g.parent.isPrinting||g.parent.uiStateValues.isPreventTimezone||(e=g.processTimezone(e));for(var s=0;s<u.length;s++)null!==e[u[parseInt(s.toString(),10)].field]&&0!==e[u[parseInt(s.toString(),10)].field]||(e[u[parseInt(s.toString(),10)].field]=void 0);if(i.i(n.isNullOrUndefined)(e[c.recurrenceRule])||""!==e[c.recurrenceRule]||(e[c.recurrenceRule]=null),i.i(n.isNullOrUndefined)(e[c.recurrenceRule])||!i.i(n.isNullOrUndefined)(e[c.recurrenceID])||g.parent.crudModule&&g.parent.crudModule.crudObj.isCrudAction)if(g.parent.crudModule&&g.parent.crudModule.crudObj.isCrudAction)if(!i.i(n.isNullOrUndefined)(e[c.recurrenceRule])&&i.i(n.isNullOrUndefined)(e[c.recurrenceID]))for(var o=g.generateOccurrence(e,null,!0),l=0,v=o;l<v.length;l++){var f=v[l];!function(e){var t=g.parent.eventsProcessed.filter(function(t){return t[c.startTime].getTime()-e[c.startTime].getTime()==0&&t[c.id]===e[c.id]});e.Guid=t.length>0?t[0].Guid:g.generateGuid(),p.push(e)}(f)}else{var m=g.parent.eventsProcessed.filter(function(t){return t[a.parent.eventFields.id]===e[a.parent.eventFields.id]});e.Guid=m.length>0?m[0].Guid:g.generateGuid(),p.push(e)}else e.Guid=g.generateGuid(),p.push(e);else p=p.concat(g.generateOccurrence(e,null,!0))}(m)}this.parent.eventsProcessed=[];var y=p.filter(function(e){return!e[a.parent.eventFields.isBlock]});this.parent.eventsProcessed=this.filterEvents(o,l,y);for(var T=p.filter(function(e){return e[a.parent.eventFields.isBlock]}),w=0,D=T;w<D.length;w++){var b=D[w];if(b[c.isAllDay]){s.b(new Date(b[c.startTime].getTime()))<s.b(new Date(b[c.endTime].getTime()))||(b[c.startTime]=s.b(b[c.startTime]),b[c.endTime]=s.d(s.b(b[c.endTime]),1))}}return this.parent.blockProcessed=T,y},e.prototype.updateEventDateTime=function(e){return"string"==typeof e[this.parent.eventFields.startTime]&&(e[this.parent.eventFields.startTime]=s.z(e[this.parent.eventFields.startTime])),"string"==typeof e[this.parent.eventFields.endTime]&&(e[this.parent.eventFields.endTime]=s.z(e[this.parent.eventFields.endTime])),e},e.prototype.getProcessedEvents=function(e){void 0===e&&(e=this.parent.eventsData);for(var t=[],r=0,a=e;r<a.length;r++){var s=a[r];!i.i(n.isNullOrUndefined)(s[this.parent.eventFields.recurrenceRule])&&i.i(n.isNullOrUndefined)(s[this.parent.eventFields.recurrenceID])?t=t.concat(this.generateOccurrence(s)):t.push(s)}return t},e.prototype.timezonePropertyChange=function(e){var t=this.parent.eventsData.concat(this.parent.blockData),i=this.processData(t,!0,e);this.parent.notify(l.E,{processedData:i})},e.prototype.timezoneConvert=function(e){var t=this.parent.eventFields;if(e[t.startTimezone]=e[t.startTimezone]||e[t.endTimezone],e[t.endTimezone]=e[t.endTimezone]||e[t.startTimezone],this.parent.timezone){var i=e[t.startTimezone],n=e[t.endTimezone];e[t.startTime]=this.parent.tzModule.convert(e[t.startTime],this.parent.timezone,i),e[t.endTime]=this.parent.tzModule.convert(e[t.endTime],this.parent.timezone,n)}},e.prototype.processTimezoneChange=function(e,t){var i=this.parent.eventFields;e[i.isAllDay]||(t&&this.parent.timezone?(e[i.startTime]=this.parent.tzModule.convert(e[i.startTime],t,this.parent.timezone),e[i.endTime]=this.parent.tzModule.convert(e[i.endTime],t,this.parent.timezone)):!t&&this.parent.timezone?(e[i.startTime]=this.parent.tzModule.add(e[i.startTime],this.parent.timezone),e[i.endTime]=this.parent.tzModule.add(e[i.endTime],this.parent.timezone)):t&&!this.parent.timezone&&(e[i.startTime]=this.parent.tzModule.remove(e[i.startTime],t),e[i.endTime]=this.parent.tzModule.remove(e[i.endTime],t)))},e.prototype.processTimezone=function(e,t){void 0===t&&(t=!1);var i=this.parent.eventFields;if(e[i.isAllDay])return e;if(e[i.startTimezone]||e[i.endTimezone]){var n=e[i.startTimezone]||e[i.endTimezone],r=e[i.endTimezone]||e[i.startTimezone];t?this.parent.timezone?(e[i.startTime]=this.parent.tzModule.convert(e[i.startTime],n,this.parent.timezone),e[i.endTime]=this.parent.tzModule.convert(e[i.endTime],r,this.parent.timezone),e[i.startTime]=this.parent.tzModule.remove(e[i.startTime],this.parent.timezone),e[i.endTime]=this.parent.tzModule.remove(e[i.endTime],this.parent.timezone)):(e[i.startTime]=this.parent.tzModule.remove(e[i.startTime],n),e[i.endTime]=this.parent.tzModule.remove(e[i.endTime],r)):(e[i.startTime]=this.parent.tzModule.add(e[i.startTime],n),e[i.endTime]=this.parent.tzModule.add(e[i.endTime],r),this.parent.timezone&&(e[i.startTime]=this.parent.tzModule.convert(e[i.startTime],n,this.parent.timezone),e[i.endTime]=this.parent.tzModule.convert(e[i.endTime],r,this.parent.timezone)))}else this.parent.timezone&&(t?(e[i.startTime]=this.parent.tzModule.remove(e[i.startTime],this.parent.timezone),e[i.endTime]=this.parent.tzModule.remove(e[i.endTime],this.parent.timezone)):(e[i.startTime]=this.parent.tzModule.add(e[i.startTime],this.parent.timezone),e[i.endTime]=this.parent.tzModule.add(e[i.endTime],this.parent.timezone)));return e},e.prototype.filterBlockEvents=function(e){var t,r=this.parent.eventFields,a=e[r.startTime],o=e[r.endTime];if(this.parent.activeViewOptions.group.resources.length>0){var l=this.getGroupIndexFromEvent(e);t=this.parent.resourceBase.lastResourceLevel[parseInt(l.toString(),10)]}for(var c=i.i(n.extend)([],this.parent.blockProcessed,null,!0),p=0,d=c;p<d.length;p++){var h=d[p];if(h[r.isAllDay]){h[r.endTime].getTime()>s.b(new Date(h[r.endTime].getTime())).getTime()&&(h[r.startTime]=s.b(h[r.startTime]),h[r.endTime]=s.d(s.b(h[r.endTime]),1))}}return this.filterEvents(a,o,c,t)},e.prototype.filterEvents=function(e,t,i,n){void 0===i&&(i=this.parent.eventsProcessed);var a=this.parent.dataModule.getStartEndQuery(e,t),s=new r.DataManager({json:i}).executeLocal((new r.Query).where(a));return n&&(s=this.filterEventsByResource(n,s)),this.sortByTime(s)},e.prototype.filterEventsByRange=function(e,t,i){var n=this,r=[];return r=t&&i?this.filterEvents(t,i,e):t&&!i?e.filter(function(e){return e[n.parent.eventFields.startTime]>=t}):!t&&i?e.filter(function(e){return e[n.parent.eventFields.endTime]<=i}):e,this.sortByTime(r)},e.prototype.filterEventsByResource=function(e,t){void 0===t&&(t=this.parent.eventsProcessed);for(var i={},n=this.parent.resourceBase.resourceCollection,r=0;r<n.length;r++)i[n[parseInt(r.toString(),10)].field]=e.groupOrder[parseInt(r.toString(),10)];var a=Object.keys(i);return t.filter(function(e){return a.every(function(t){return e[""+t]instanceof Array?e[""+t].indexOf(i[""+t])>-1:e[""+t]===i[""+t]})})},e.prototype.sortByTime=function(e){if(!this.parent.eventSettings.sortComparer||"function"!=typeof this.parent.eventSettings.sortComparer&&"string"!=typeof this.parent.eventSettings.sortComparer){var t=this.parent.eventFields;e.sort(function(e,i){var n=e[t.startTime],r=i[t.startTime];return n.getTime()-r.getTime()})}else e=this.customSorting(e);return e},e.prototype.sortByDateTime=function(e){if(!this.parent.eventSettings.sortComparer||"function"!=typeof this.parent.eventSettings.sortComparer&&"string"!=typeof this.parent.eventSettings.sortComparer){var t=this.parent.eventFields;e.sort(function(e,i){var n=e[t.startTime],r=i[t.startTime],a=e[t.endTime],s=i[t.endTime],o=a.getTime()-n.getTime(),l=s.getTime()-r.getTime();return n.getTime()-r.getTime()||l-o})}else e=this.customSorting(e);return e},e.prototype.customSorting=function(e){if("function"==typeof this.parent.eventSettings.sortComparer)return this.parent.eventSettings.sortComparer.call(this.parent,e);if("string"==typeof this.parent.eventSettings.sortComparer){var t=this.parent.eventSettings.sortComparer.split("."),r=void 0;if(i.i(n.isNullOrUndefined)(window)||(r=window[t[t.length-1]]),r)return r(e)}return e},e.prototype.getSmallestMissingNumber=function(e){for(var t=Math.max.apply(Math,e),i=0;i<t;i++)if(-1===e.indexOf(i))return i;return t+1},e.prototype.splitEventByDay=function(e){var t=this.parent.eventFields,r=[],a=e[t.startTime],o=e[t.endTime];if(s.b(new Date(a.getTime()))<s.b(new Date(o.getTime())))for(var l=new Date(a.getTime()),c=s.d(s.b(new Date(a.getTime())),1),p=0===o.getHours()&&0===o.getMinutes()?o:s.d(o,1),d=1,h=s.y(a.getTime(),p.getTime());c<=o&&l.getTime()!==c.getTime();){var u=i.i(n.extend)({},e);u[t.startTime]=l,u[t.endTime]=c,u.data={index:d,count:h},u.Guid=this.generateGuid(),u.isSpanned=!0,r.push(u),l=c,s.b(new Date(l.getTime())).getTime()===s.b(new Date(o.getTime())).getTime()&&c.getTime()!==o.getTime()?(c=new Date(l.getTime()),c=new Date(c.setHours(o.getHours(),o.getMinutes(),o.getSeconds()))):c=s.d(s.b(new Date(l.getTime())),1),d++}else r.push(e);return r},e.prototype.splitEvent=function(e,t){var r=this.parent.eventFields,a=s.b(e[r.startTime]).getTime(),o=s.b(e[r.endTime]).getTime();if(s.s(e[r.endTime])<=0){var l=s.d(s.b(e[r.endTime]),-1).getTime();o=a>l?a:l}var c=a,p=o,d=[];if(a!==o){a<t[0].getTime()&&(a=t[0].getTime()),o>t[t.length-1].getTime()&&(o=t[t.length-1].getTime());for(var h=a,u=0;u<this.slots.length;u++){var g=this.slots[parseInt(u.toString(),10)];if("WorkWeek"===this.parent.currentView||"TimelineWorkWeek"===this.parent.currentView||this.parent.activeViewOptions.group.byDate||this.parent.activeViewOptions.showWeekend){for(var v=[],f=0,m=g;f<m.length;f++){var y=m[f];v.push(new Date(y))}var T=this.getRenderedDates(v);if(!i.i(n.isNullOrUndefined)(T)&&T.length>0){g=[];for(var w=0,D=T;w<D.length;w++){var b=D[w];g.push(b.getTime())}}}if("number"==typeof g){var l=g;g=[],g.push(l)}var S=g[0];if((h=h<=S&&o>=S?S:h)>o||S>o)break;if(!this.parent.activeViewOptions.group.byDate&&this.parent.activeViewOptions.showWeekend&&"WorkWeek"!==this.parent.currentView&&"TimelineWorkWeek"!==this.parent.currentView){var C=g.indexOf(h);if(-1!==C){var O=g.indexOf(o),E=-1!==O;O=E?O:g.length-1;var x=O-C+1,A=g[parseInt(C.toString(),10)]!==c,V=g[parseInt(O.toString(),10)]!==p;if(d.push(this.cloneEventObject(e,g[parseInt(C.toString(),10)],g[parseInt(O.toString(),10)],x,A,V)),E)break}}else if(this.dateInRange(h,g[0],g[g.length-1])){for(var I=[],M=0;M<g.length;M++)this.dateInRange(g[parseInt(M.toString(),10)],c,p)&&I.push(g[parseInt(M.toString(),10)]);if(I.length>0)if(this.parent.activeViewOptions.group.byDate)for(var k=0,R=I;k<R.length;k++){var H=R[k];d.push(this.cloneEventObject(e,H,H,1,H!==c,H!==p))}else{var A=I[0]!==c,V=I[I.length-1]!==p;d.push(this.cloneEventObject(e,I[0],I[I.length-1],I.length,A,V))}}}}else d.push(this.cloneEventObject(e,a,o,1,!1,!1));return d},e.prototype.cloneEventObject=function(e,t,r,a,s,o){var l=this.parent.eventFields,c=i.i(n.extend)({},e,null,!0),p={count:a,isLeft:s,isRight:o};return p[l.startTime]=e[l.startTime],p[l.endTime]=e[l.endTime],c.data=p,c[l.startTime]=new Date(t),c[l.endTime]=new Date(r),c},e.prototype.dateInRange=function(e,t,i){return t<=e&&e<=i},e.prototype.getSelectedEventElements=function(e){if(this.removeSelectedAppointmentClass(),this.parent.selectedElements.length<=0)this.parent.selectedElements.push(e);else{if(this.parent.selectedElements.filter(function(t){return t.getAttribute("data-guid")===e.getAttribute("data-guid")}).length<=0)for(var t='div[data-guid="'+e.getAttribute("data-guid")+'"]',i=[].slice.call(this.parent.element.querySelectorAll(t)),n=0,r=i;n<r.length;n++){var a=r[n];this.parent.selectedElements.push(a)}else{var s=this.parent.selectedElements.filter(function(t){return t.getAttribute("data-guid")!==e.getAttribute("data-guid")});this.parent.selectedElements=s}}return e&&this.parent.selectedElements.length>0&&this.addSelectedAppointments(this.parent.selectedElements,!1),this.parent.selectedElements},e.prototype.getSelectedEvents=function(){var e=this,t=[],i=[];return[].slice.call(this.parent.element.querySelectorAll("."+o.R)).filter(function(n){0===t.filter(function(e){return e.Guid===n.getAttribute("data-guid")}).length&&t.push(e.getEventByGuid(n.getAttribute("data-guid"))),i.push(n)}),{event:t.length>1?t:t[0],element:i.length>1?i:i[0]}},e.prototype.removeSelectedAppointmentClass=function(){var e=this.getSelectedAppointments();i.i(n.removeClass)(e,o.R),"Agenda"!==this.parent.currentView&&"MonthAgenda"!==this.parent.currentView||i.i(n.removeClass)(e,o.S)},e.prototype.addSelectedAppointments=function(e,t){"MonthAgenda"!==this.parent.currentView&&this.parent.removeSelectedClass(),i.i(n.addClass)(e,o.R),e.length>0&&!t&&e[e.length-1].focus()},e.prototype.getSelectedAppointments=function(){return[].slice.call(this.parent.element.querySelectorAll("."+o.R+",."+o.A+":focus"))},e.prototype.focusElement=function(e){if(!this.parent.eventWindow.dialogObject||!this.parent.eventWindow.dialogObject.visible){var t=document.activeElement,r=this.parent.getSelectedCells();if(!(r.length>0&&(t&&(this.parent.element.contains(t)||-1!==r.indexOf(t))||e))){var a=this.getSelectedAppointments();return a.length>0?this.parent.activeEventData&&this.parent.activeEventData.element&&a.indexOf(this.parent.activeEventData.element)>-1?void this.parent.activeEventData.element.focus():void a[a.length-1].focus():void 0}if(this.parent.keyboardInteractionModule){var s=!i.i(n.isNullOrUndefined)(this.parent.activeCellsData)&&this.parent.activeCellsData.element||r[r.length-1];this.parent.keyboardInteractionModule.selectCells(s instanceof Array,s)}}},e.prototype.selectWorkCellByTime=function(e){var t;if("Agenda"===this.parent.currentView||"MonthAgenda"===this.parent.currentView)return t;if(e.length>0){var i=e[e.length-1],n=i[this.parent.eventFields.startTime],r=new Date(+n).setMinutes(0,0,0),a=this.isAllDayAppointment(i);("Month"===this.parent.currentView||a)&&(r=new Date(+n).setHours(0,0,0,0));var s=void 0;s=a&&-1!==["Day","Week","WorkWeek"].indexOf(this.parent.currentView)?this.parent.getAllDayRow():this.parent.getContentTable();var o='[data-date="'+new Date(r).getTime()+'"]';if(this.parent.activeViewOptions.group.resources.length>0&&(o+='[data-group-index="'+this.getGroupIndexFromEvent(i)+'"]'),t=s.querySelector(o))return this.parent.activeCellsData=this.parent.getCellDetails(t),this.parent.keyboardInteractionModule&&this.parent.keyboardInteractionModule.selectCells(!1,t),t}return t},e.prototype.getGroupIndexFromEvent=function(e){for(var t,r,a,s,o=this.parent.resourceBase.resourceCollection.length-1;o>=0;o--){var l=e[this.parent.resourceBase.resourceCollection[parseInt(o.toString(),10)].field];if(!i.i(n.isNullOrUndefined)(l)){r=this.parent.resourceBase.resourceCollection[parseInt(o.toString(),10)],t=o,a=r.name,s=r.field;break}}i.i(n.isNullOrUndefined)(a)&&i.i(n.isNullOrUndefined)(t)&&(a=this.parent.resourceCollection.slice(-1)[0].name,t=this.parent.resourceCollection.length-1,s=this.parent.resourceCollection.slice(-1)[0].field,r=this.parent.resourceCollection.filter(function(e,i){return e.name===a?(t=i,e):null})[0]);var c=e[""+s]instanceof Array?e[""+s][0]:e[""+s];if(t>0){var p=this.parent.resourceCollection[t-1].field;return this.parent.resourceBase.getIndexFromResourceId(c,a,r,e,p)}return this.parent.resourceBase.getIndexFromResourceId(c,a,r)},e.prototype.isAllDayAppointment=function(e){var t=this.parent.eventFields,i=e[t.isAllDay],n=(s.G(e[t.endTime])-s.G(e[t.startTime]))/s.c>=1;return!!(i||"TimeSlot"!==this.parent.eventSettings.spannedEventPlacement&&n)},e.prototype.addEventListener=function(){this.parent.on(l.L,this.appointmentBorderRemove,this)},e.prototype.removeEventListener=function(){this.parent.off(l.L,this.appointmentBorderRemove)},e.prototype.appointmentBorderRemove=function(e){var t=e.event.target;if(i.i(n.closest)(t,"."+o.A))"MonthAgenda"!==this.parent.currentView&&this.parent.removeSelectedClass();else if(!i.i(n.closest)(t,"."+o.T)){if(this.parent.uiStateValues.isTapHold&&i.i(n.closest)(t,"."+o.n+",."+o.U))return;this.parent.uiStateValues.isTapHold=!1,this.removeSelectedAppointmentClass(),this.parent.selectedElements=[]}},e.prototype.wireAppointmentEvents=function(e,t,r){void 0===r&&(r=!1);var a=!i.i(n.isNullOrUndefined)(t)&&t[this.parent.eventFields.isReadonly];n.EventHandler.add(e,"click",this.eventClick,this),this.parent.isAdaptive||this.parent.activeViewOptions.readonly||a||(n.EventHandler.add(e,"touchend",this.eventTouchClick,this),n.EventHandler.add(e,"dblclick",this.eventDoubleClick,this)),this.parent.activeViewOptions.readonly||a||r||(this.parent.resizeModule&&this.parent.resizeModule.wireResizeEvent(e),this.parent.dragAndDropModule&&this.parent.dragAndDropModule.wireDragEvent(e))},e.prototype.eventTouchClick=function(e){var t=this;if(this.parent.uiStateValues.isTouchScroll||this.parent.uiStateValues.isTapHold||this.parent.uiStateValues.action)return void(this.parent.uiStateValues.isTouchScroll=this.parent.uiStateValues.isTapHold=!1);setTimeout(function(){return t.isDoubleTapped=!1},250),e.preventDefault(),this.isDoubleTapped?this.eventDoubleClick(e):this.isDoubleTapped||(this.isDoubleTapped=!0,this.eventClick(e))},e.prototype.renderResizeHandler=function(e,t,r){if(this.parent.resizeModule&&this.parent.allowResizing&&!this.parent.activeViewOptions.readonly&&!r)for(var a=0,s=Object.keys(t);a<s.length;a++){var l=s[a],c=i.i(n.createElement)("div",{className:o.V});switch(l){case"isLeft":t.isLeft||(c.appendChild(i.i(n.createElement)("div",{className:"e-left-right-resize"})),i.i(n.addClass)([c],this.parent.enableRtl?o.W:o.X),i.i(n.prepend)([c],e));break;case"isRight":t.isRight||(c.appendChild(i.i(n.createElement)("div",{className:"e-left-right-resize"})),i.i(n.addClass)([c],this.parent.enableRtl?o.X:o.W),i.i(n.append)([c],e));break;case"isTop":t.isTop||(c.appendChild(i.i(n.createElement)("div",{className:"e-top-bottom-resize"})),i.i(n.addClass)([c],o.Y),i.i(n.prepend)([c],e));break;case"isBottom":t.isBottom||(c.appendChild(i.i(n.createElement)("div",{className:"e-top-bottom-resize"})),i.i(n.addClass)([c],o.Z),i.i(n.append)([c],e))}}},e.prototype.eventClick=function(e){var t=this,r=e.target;if(!(r.classList.contains(o._0)||r.classList.contains(o._1)||r.classList.contains(o._2)))if((e.ctrlKey||e.metaKey)&&1===e.which&&this.parent.keyboardInteractionModule){this.parent.quickPopup.quickPopup.hide(),this.parent.selectedElements=[].slice.call(this.parent.element.querySelectorAll("."+o.R));var a=i.i(n.closest)(e.target,"."+o.A);this.getSelectedEventElements(a),this.activeEventData(e,!1);var s={data:this.parent.activeEventData.event,element:this.parent.activeEventData.element,event:e,requestType:"eventSelect"};this.parent.trigger(l.d,s);var c=i.i(n.extend)(this.parent.activeEventData,{cancel:!1,originalEvent:e});this.parent.trigger(l.k,c)}else{this.removeSelectedAppointmentClass(),this.activeEventData(e,!0);var p={data:this.parent.activeEventData.event,element:this.parent.activeEventData.element,event:e,requestType:"eventSelect"};this.parent.trigger(l.d,p);var c=i.i(n.extend)(this.parent.activeEventData,{cancel:!1,originalEvent:e});this.parent.trigger(l.k,c,function(e){if(e.cancel)t.removeSelectedAppointmentClass(),t.parent.selectedElements=[],t.parent.quickPopup&&t.parent.quickPopup.quickPopupHide();else if("Agenda"!==t.parent.currentView&&"MonthAgenda"!==t.parent.currentView||i.i(n.addClass)([t.parent.activeEventData.element],o.S),t.parent.allowInline){var r={data:e.event,element:e.element,type:"Event"};t.parent.notify(l.x,r)}else t.parent.notify(l.k,e)})}},e.prototype.eventDoubleClick=function(e){var t=this;if(this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(!0),"touchend"===e.type&&this.activeEventData(e,!0),this.removeSelectedAppointmentClass(),this.parent.selectedElements=[],!this.parent.activeEventData.element.classList.contains(o._3)&&!this.parent.activeEventData.element.querySelector("."+o._2)){var r=i.i(n.extend)(this.parent.activeEventData,{cancel:!1,originalEvent:e});this.parent.trigger(l.l,r,function(e){e.cancel||(!i.i(n.isNullOrUndefined)(t.parent.activeEventData.event)&&i.i(n.isNullOrUndefined)(t.parent.activeEventData.event[t.parent.eventFields.recurrenceID])?t.parent.eventWindow.openEditor(t.parent.activeEventData.event,"Save"):(t.parent.currentAction="EditOccurrence",t.parent.quickPopup.openRecurrenceAlert()))})}},e.prototype.getEventByGuid=function(e){return this.parent.eventsProcessed.filter(function(t){return t.Guid===e})[0]},e.prototype.getEventById=function(e){var t=this;return this.parent.eventsData.filter(function(i){return i[t.parent.eventFields.id]===e})[0]},e.prototype.generateGuid=function(){return"xyxxxxyx-xxxy-yxxx-xyxx-xxyxxxxyyxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e.prototype.getEventIDType=function(){return 0!==this.parent.eventsData.length?typeof this.parent.eventsData[0][this.parent.eventFields.id]:0!==this.parent.blockData.length?typeof this.parent.blockData[0][this.parent.eventFields.id]:"string"},e.prototype.getEventMaxID=function(e){var t=this;if(this.parent.eventsData.length<1&&this.parent.blockData.length<1)return 1;var r,a=this.getEventIDType();if("string"===a&&(r=this.generateGuid()),"number"===a){var s=this.parent.eventsData.concat(this.parent.blockData),o=s.map(function(e){return e[t.parent.eventFields.id]}),l=o.reduce(function(e,t){return Math.max(e,t)});l=i.i(n.isNullOrUndefined)(e)?l:l+e,r=l+1}return r},e.prototype.activeEventData=function(e,t){var r=this,a=i.i(n.closest)(e.target,"."+o.A),s=a.getAttribute("data-guid");t&&(this.addSelectedAppointments([].slice.call(this.parent.element.querySelectorAll('div[data-guid="'+s+'"]')),!0),a.focus());var l=this.getEventByGuid(s);l&&l.isSpanned&&(l=this.parent.eventsData.filter(function(e){return e[r.parent.eventFields.id]===l[r.parent.eventFields.id]})[0]),this.parent.activeEventData={event:l,element:a}},e.prototype.generateOccurrence=function(e,t,r){var o=e[this.parent.eventFields.startTime],l=e[this.parent.eventFields.endTime],c=e[this.parent.eventFields.recurrenceRule],p=l.getTimezoneOffset()-o.getTimezoneOffset(),d=l.getTime()-o.getTime()-6e4*p;t=new Date((t||this.parent.activeView.startDate()).getTime()-d);var h,u=e[this.parent.eventFields.recurrenceException];"Agenda"!==this.parent.currentView&&r&&(h=s.t(t,this.parent.activeView.endDate())+1);var g=this.parent.timezone||this.parent.tzModule.getLocalTimezoneName(),v=this.parent.activeViewOptions.firstDayOfWeek,f=this.parent.calendarMode,m=i.i(a.b)(o,c,u,v,h,t,f,g);"Agenda"===this.parent.currentView&&-1===c.indexOf("COUNT")&&-1===c.indexOf("UNTIL")&&(i.i(n.isNullOrUndefined)(e.generatedDates)?e.generatedDates={start:new Date(m[0]),end:new Date(m[m.length-1])}:(m[0]<e.generatedDates.start.getTime()&&(e.generatedDates.start=new Date(m[0])),m[m.length-1]>e.generatedDates.end.getTime()&&(e.generatedDates.end=new Date(m[m.length-1]))));for(var y=[],T=0,w=m;T<w.length;T++){var D=w[T],b=i.i(n.extend)({},e,null,!0);D=this.getDSTAdjustedTime(D,b),b[this.parent.eventFields.startTime]=new Date(D),b[this.parent.eventFields.endTime]=new Date(new Date(D).setMilliseconds(d)),b[this.parent.eventFields.recurrenceID]=b[this.parent.eventFields.id],delete b[this.parent.eventFields.recurrenceException],delete b[this.parent.eventFields.followingID],b.Guid=this.generateGuid(),y.push(b)}return y},e.prototype.getDSTAdjustedTime=function(e,t){var i=e;if(this.parent.timezone&&(t[this.parent.eventFields.startTimezone]||t[this.parent.eventFields.endTimezone])){var n=this.getDSTDiff(t[this.parent.eventFields.startTime],new Date(e),t[this.parent.eventFields.startTimezone]),r=this.getDSTDiff(t[this.parent.eventFields.startTime],new Date(e),this.parent.timezone);i=new Date(e).getTime()-6e4*(n-r)}return i},e.prototype.getDSTDiff=function(e,t,i){return this.parent.tzModule.offset(new Date(e),i)-this.parent.tzModule.offset(new Date(t),i)},e.prototype.getParentEvent=function(e,t){void 0===t&&(t=!1);var r;do{(e=this.getFollowingEvent(e))&&(r=i.i(n.extend)({},e,null,!0))}while(e&&t);if(t&&r){var a=this.getEventCollections(r),s=a.follow.slice(-1)[0];a.occurrence.length>0&&!r[this.parent.eventFields.recurrenceException]&&(s=a.occurrence.slice(-1)[0]),s&&(r[this.parent.eventFields.recurrenceRule]=s[this.parent.eventFields.recurrenceRule])}return r},e.prototype.getEventCollections=function(e,t){var i=[],n=[],r=e;do{r=this.getFollowingEvent(r,!0),r&&i.push(r),n=n.concat(this.getOccurrenceEvent(r||e))}while(r);var a={};if(t){var s=this.parent.eventFields;a={follow:i.filter(function(e){return e[s.startTime]>=t[s.startTime]}),occurrence:n.filter(function(e){return e[s.startTime]>=t[s.startTime]})}}else a={follow:i,occurrence:n};return a},e.prototype.getFollowingEvent=function(e,t){var i,n=this.parent.eventFields;return i=t?e[n.id]:e[n.recurrenceID]||e[n.followingID],this.parent.eventsData.filter(function(e){return e[t?n.followingID:n.id]===i}).shift()},e.prototype.isFollowingEvent=function(e,t){var i=e[this.parent.eventFields.startTime],n=t[this.parent.eventFields.startTime];return i.getHours()===n.getHours()&&i.getMinutes()===n.getMinutes()&&i.getSeconds()===n.getSeconds()},e.prototype.getOccurrenceEvent=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var n=t?"Guid":i?this.parent.eventFields.followingID:this.parent.eventFields.recurrenceID,r=t?"Guid":this.parent.eventFields.id;return(t?this.parent.eventsProcessed:this.parent.eventsData).filter(function(t){return t[""+n]===e[""+r]})},e.prototype.getOccurrencesByID=function(e){for(var t=this.parent.eventFields,r=[],a=this.parent.eventsData.filter(function(i){return i[t.id]===e}),s=0,o=a;s<o.length;s++){var l=o[s];i.i(n.isNullOrUndefined)(l[t.recurrenceRule])||(r=r.concat(this.generateOccurrence(l)))}return r},e.prototype.getOccurrencesByRange=function(e,t){for(var r=this.parent.eventFields,a=[],s=0,o=this.parent.eventsData;s<o.length;s++){var l=o[s];i.i(n.isNullOrUndefined)(l[r.recurrenceRule])||(a=a.concat(this.generateOccurrence(l)))}return a.filter(function(a){return a[r.startTime]>=e&&a[r.endTime]<=t&&!i.i(n.isNullOrUndefined)(a[r.recurrenceID])})},e.prototype.getDeletedOccurrences=function(e){var t,r=this.parent.eventFields,s=[];if(t="string"==typeof e||"number"==typeof e?this.parent.eventsData.filter(function(t){return t[r.id]===e})[0]:i.i(n.extend)({},e,null,!0),t[r.recurrenceException])for(var o=t[r.recurrenceException].split(","),l=this,c=0,p=o.length;c<p;c++)!function(c,p){if(0===l.parent.eventsData.filter(function(e){return e[r.recurrenceID]===t[r.id]&&e[r.recurrenceException]===o[parseInt(c.toString(),10)]}).length){var d=i.i(a.c)(o[parseInt(c.toString(),10)]),h=i.i(n.extend)({},e,null,!0);h[r.recurrenceID]=t[r.id],delete h[r.followingID],h[r.recurrenceException]=o[parseInt(c.toString(),10)];var u=new Date(d.getTime()),g=t[r.endTime].getTime()-t[r.startTime].getTime(),v=new Date(u.getTime());v.setMilliseconds(g),h[r.startTime]=new Date(u.getTime()),h[r.endTime]=new Date(v.getTime()),s.push(h)}}(c);return s},e.prototype.applyResourceColor=function(e,t,r,a,s){if(this.parent.resourceBase){var o=this.parent.resourceBase.getResourceColor(t,a);o&&(e.style[r]=i.i(n.isNullOrUndefined)(s)?o:function(e,t){return e=e.replace("#",""),"rgba("+parseInt(e.substring(0,e.length/3),16)+", "+parseInt(e.substring(e.length/3,2*e.length/3),16)+", "+parseInt(e.substring(2*e.length/3,3*e.length/3),16)+", "+t+")"}(o,s))}},e.prototype.createBlockAppointmentElement=function(e,t,r){var a,s=e[this.parent.eventFields.subject]||this.parent.eventSettings.fields.subject.default,l=i.i(n.createElement)("div",{className:o.B,attrs:{"data-id":"Appointment_"+e[this.parent.eventFields.id],"aria-disabled":"true"}});if(i.i(n.isNullOrUndefined)(this.parent.activeViewOptions.eventTemplate)){var c=i.i(n.createElement)("div",{className:o.H});this.parent.sanitize(s,c),a=[c]}else{var p=this.parent.element.id+"_",d=this.parent.activeViewOptions.eventTemplateName,h=p+d+"eventTemplate",u=r&&-1===this.parent.currentView.indexOf("Year")?this.parent.getEventTemplateName(t):"eventTemplate";a=this.parent.getAppointmentTemplate()(e,this.parent,u,h,!1)}return i.i(n.append)(a,l),this.setWrapperAttributes(l,t),l},e.prototype.setWrapperAttributes=function(e,t){i.i(n.isNullOrUndefined)(this.cssClass)||i.i(n.addClass)([e],this.cssClass),this.parent.activeViewOptions.group.resources.length>0&&e.setAttribute("data-group-index",t.toString())},e.prototype.getReadonlyAttribute=function(e){return(e[this.parent.eventFields.isReadonly]||this.parent.readonly).toString()},e.prototype.isBlockRange=function(e){for(var t=e instanceof Array?e:[e],r=!1,a=this.parent.eventFields,s=0,o=t;s<o.length;s++){var l=o[s],c=[];i.i(n.isNullOrUndefined)(l[a.recurrenceRule])||!i.i(n.isNullOrUndefined)(l[a.recurrenceID])&&l[a.id]!==l[a.recurrenceID]?c.push(l):c=this.generateOccurrence(l);for(var p=0,d=c;p<d.length;p++){var h=d[p];if(this.filterBlockEvents(h).length>0){r=!0;break}}}return this.parent.uiStateValues.isBlock=r,r},e.prototype.getFilterEventsList=function(e,t){return new r.DataManager(e).executeLocal((new r.Query).where(t))},e.prototype.getSeriesEvents=function(e,t){var a=this.parent.eventFields;t=i.i(n.isNullOrUndefined)(t)?e[a.startTime]:t;var s,o,l,c=[],p=e[a.id],d=e[a.followingID],h="EditSeries"===this.parent.currentAction?"greaterthan":"greaterthanorequal";do{l=new r.Predicate(a.followingID,"equal",p).and(new r.Predicate(a.startTime,h,t)),o=this.getFilterEventsList(this.parent.eventsData,l),s=o.slice(-1)[0],i.i(n.isNullOrUndefined)(s)||s[a.id]===d?d=null:(c.push(s),p=s[a.id],d=s[a.followingID])}while(1===o.length&&!i.i(n.isNullOrUndefined)(s[a.followingID]));return c},e.prototype.getEditedOccurrences=function(e,t){for(var i,n=this.parent.eventFields,a=[],s=0,o=e;s<o.length;s++){var l=o[s],c=new r.Predicate(n.recurrenceID,"equal",l[n.id]).or(new r.Predicate(n.recurrenceID,"equal",l[n.followingID]).and(new r.Predicate(n.recurrenceID,"notequal",void 0)).and(new r.Predicate(n.recurrenceID,"notequal",null)));"EditFollowingEvents"!==this.parent.currentAction&&"DeleteFollowingEvents"!==this.parent.currentAction||(c=c.and(new r.Predicate(n.startTime,"greaterthanorequal",t))),i=this.getFilterEventsList(this.parent.eventsData,c),a=a.concat(i)}return a},e.prototype.getRenderedDates=function(e){var t,i=0,n=e.length;if(e[0]<this.parent.minDate&&e[e.length-1]>this.parent.maxDate){for(var r=0;r<e.length;r++)s.b(e[parseInt(r.toString(),10)]).getTime()===s.b(new Date(this.parent.minDate)).getTime()&&(i=r),s.b(e[parseInt(r.toString(),10)]).getTime()===s.b(new Date(this.parent.maxDate)).getTime()&&(n=r);t=e.filter(function(t){return t>=e[parseInt(i.toString(),10)]&&t<=e[parseInt(n.toString(),10)]})}return t},e.prototype.isValidEvent=function(e,t,i,n){var r=i.getTime()>n.startHour.getTime()&&t.getTime()<n.endHour.getTime(),a=n.startHour.getTime()<=t.getTime()&&e[this.parent.eventFields.startTime].getTime()>=n.startHour.getTime()&&e[this.parent.eventFields.endTime].getTime()<n.endHour.getTime()&&t.getTime()===i.getTime();return r||a},e.prototype.allDayExpandScroll=function(e){var t=0;[].slice.call(this.parent.element.querySelectorAll("."+o._4)).forEach(function(e){[].slice.call(e.children).forEach(function(e){e.style.top=t+"px"}),t+=e.offsetHeight}),t=e.offsetHeight-t,this.parent.element.querySelector("."+o.U).style.height=t/12+"em",this.parent.uiStateValues.expand?i.i(n.addClass)([e],o._5):i.i(n.removeClass)([e],o._5)},e.prototype.updateEventMinimumDuration=function(e,t,i){if(t.getTime()<i.getTime()){if((s.G(i)-s.G(t))/s.g<this.parent.eventSettings.minimumEventDuration){var n=new Date(t);if(n.setMinutes(n.getMinutes()+this.parent.eventSettings.minimumEventDuration),i=n,i.getTime()>e.endHour.getTime()){var r=new Date(e.endHour.getTime());r.setMinutes(r.getMinutes()-this.parent.eventSettings.minimumEventDuration),t=r,i=e.endHour}}}return{startDate:t,endDate:i}},e.prototype.createEventWrapper=function(e,t){void 0===e&&(e=""),void 0===t&&(t=0);for(var r=i.i(n.createElement)("tr"),a=this.parent.activeView.colLevels.slice(-1)[0],s=this.parent.isReact&&this.parent.activeViewOptions.eventTemplate?" "+o._6:"",l=0,c=a.length;l<c;l++){var p=a[parseInt(l.toString(),10)],d=i.i(n.createElement)("td",{className:"allDay"===e?o._7+s:"timeIndicator"===e?o._8:o._9+s,attrs:{"data-date":p.date.getTime().toString()}});if(i.i(n.isNullOrUndefined)(p.groupIndex)||d.setAttribute("data-group-index",p.groupIndex.toString()),""===e){var h=i.i(n.createElement)("div",{id:o.D+"-"+t.toString(),className:o.D});d.appendChild(h)}r.appendChild(d),t+=1}return r},e.prototype.getPageCoordinates=function(e){if(i.i(n.isNullOrUndefined)(e))return e;var t=e.event;return t&&t.changedTouches?t.changedTouches[0]:e.changedTouches?e.changedTouches[0]:t||e},e.prototype.renderSpannedIcon=function(e,t){var r=i.i(n.createElement)("div",{className:o.O+" "+o.N});if(t.isLeft){var a=r.cloneNode();i.i(n.addClass)([a],o.P),i.i(n.prepend)([a],e)}if(t.isRight){var s=r.cloneNode();i.i(n.addClass)([s],o.Q),i.i(n.append)([s],e)}if(t.isTop){var l=r.cloneNode();i.i(n.addClass)([l],o._10),i.i(n.prepend)([l],e)}if(t.isBottom){var c=r.cloneNode();i.i(n.addClass)([c],o._11),i.i(n.append)([c],e)}},e.prototype.addCellHeight=function(e,t,r,a,s,c){if(void 0===c&&(c=!0),this.parent.activeViewOptions.maxEventsPerRow&&!this.parent.rowAutoHeight){for(var p=[].slice.call(this.parent.element.querySelectorAll(e)),d=this.parent.showWeekNumber?[].slice.call(this.parent.element.querySelectorAll("."+o.F+" tbody tr")):[],h=0,u=p;h<u.length;h++){var g=u[h],v=this.parent.activeViewOptions.maxEventsPerRow*(t+("Month"===this.parent.currentView?r:2))+a+s;d.length>0&&i.i(n.setStyleAttribute)(d[p.indexOf(g)].firstElementChild,{height:v+"px"}),i.i(n.setStyleAttribute)(g.firstElementChild,{height:v+"px"})}this.parent.enablePersistence||this.parent.activeViewOptions.allowVirtualScrolling||!c||this.parent.notify(l.G,{})}},e.prototype.unWireEvents=function(){for(var e=[].slice.call(this.parent.element.querySelectorAll("."+o.A)),t=0,i=e;t<i.length;t++){var r=i[t];n.EventHandler.clearEvents(r)}},e.prototype.destroy=function(){this.unWireEvents(),this.parent=null},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return c});var n=i(0),r=(i.n(n),i(14)),a=i(1),s=i(2),o=i(3),l=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),c=function(e){function t(t){var i=e.call(this,t)||this;return i.dateRender=[],i.renderedEvents=[],i.renderedAllDayEvents=[],i.overlapEvents=[],i.moreEvents=[],i.overlapList=[],i.allDayEvents=[],i.slotCount=i.parent.activeViewOptions.timeScale.slotCount,i.interval=i.parent.activeViewOptions.timeScale.interval,i.allDayLevel=0,i.startHour=i.parent.activeView.getStartHour(),i.endHour=i.parent.activeView.getEndHour(),i.element=i.parent.activeView.getPanel(),i.fields=i.parent.eventFields,i.animation=new n.Animation({progress:i.animationUiUpdate.bind(i)}),i.addEventListener(),i}return l(t,e),t.prototype.renderAppointments=function(){var e=this;if(!i.i(n.isNullOrUndefined)(this.parent)){this.parent.dragAndDropModule&&this.parent.dragAndDropModule.setDragArea(),this.isResourceEventTemplate=this.parent.isSpecificResourceEvents();for(var t=[].slice.call(this.parent.element.querySelectorAll("."+o.B+",."+o.A+",."+o._30)),r=!(!this.parent.crudModule||!this.parent.crudModule.crudObj.isCrudAction),a=function(t){if(e.parent.isReact&&!i.i(n.isNullOrUndefined)(e.parent.activeViewOptions.eventTemplate)){var r=i.i(n.closest)(t,"."+o._9+",."+o._7);r&&!r.classList.contains(o._6)&&i.i(n.addClass)([r],o._6)}},l=0,c=t;l<c.length;l++){var p=c[l];if(!r||p.classList.contains(o._31)||p.classList.contains(o._30))a(p),i.i(n.remove)(p);else for(var d=parseInt(p.getAttribute("data-group-index"),10),h=0,u=this.parent.crudModule.crudObj.sourceEvent.length;h<u;h++)d!==this.parent.crudModule.crudObj.sourceEvent[parseInt(h.toString(),10)].groupIndex&&d!==this.parent.crudModule.crudObj.targetEvent[parseInt(h.toString(),10)].groupIndex||(a(p),i.i(n.remove)(p))}if(this.element.querySelector("."+o.n)&&(this.parent.virtualScrollModule&&this.parent.virtualScrollModule.updateFocusedWorkCell(),this.allDayElement=[].slice.call(this.element.querySelectorAll("."+o.U)),this.setAllDayRowHeight(0),0!==this.parent.eventsProcessed.length||0!==this.parent.blockProcessed.length)){var g=this.element.querySelector("."+o._26);n.EventHandler.remove(g,"click",this.rowExpandCollapse),n.EventHandler.add(g,"click",this.rowExpandCollapse,this),this.renderedEvents=[],this.renderedAllDayEvents=[],this.initializeValues(),this.processBlockEvents(),this.renderEvents("normalEvents"),this.allDayEvents.length>0&&(this.allDayEvents=this.allDayEvents.filter(function(e,t,i){return t===i.map(function(e){return e.Guid}).indexOf(e.Guid)}),i.i(n.removeClass)(this.allDayElement,o._32),this.slots.push(this.parent.activeView.renderDates.map(function(e){return+e})),this.renderEvents("allDayEvents"),this.animation.animate(this.allDayElement[0])),this.parent.notify(s.G,{}),i.i(n.addClass)(this.allDayElement,o._32),r&&(this.parent.crudModule.crudObj.isCrudAction=!1),this.parent.renderTemplates(function(){if(e.parent.isReact&&e.parent.activeViewOptions.eventTemplate){var t=[].slice.call(e.parent.element.querySelectorAll("."+o._6));i.i(n.removeClass)(t,o._6)}})}}},t.prototype.initializeValues=function(){if(this.resources=this.parent.activeViewOptions.group.resources.length>0?this.parent.uiStateValues.isGroupAdaptive?[this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]]:this.parent.resourceBase.lastResourceLevel:[],this.resources.length>0&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.virtualScrollModule&&(this.resources=this.parent.resourceBase.renderedResources),this.cellHeight=parseFloat(a.K(this.parent.element.querySelector(".e-content-wrap tbody tr")).toFixed(2)),this.dateRender[0]=this.parent.activeView.renderDates,this.parent.activeViewOptions.group.resources.length>0)for(var e=0,t=this.resources.length;e<t;e++)this.dateRender[parseInt(e.toString(),10)]=this.resources[parseInt(e.toString(),10)].renderDates},t.prototype.getHeight=function(e,t){var i=(a.G(t)-a.G(e))/a.g*(this.cellHeight*this.slotCount)/this.interval;return i=i<=0?this.cellHeight:i},t.prototype.appendEvent=function(e,t,r,a){var l=this.element.querySelector("."+o.D+'[id="'+o.D+"-"+r+'"]');this.parent.enableRtl?i.i(n.setStyleAttribute)(t,{right:a}):i.i(n.setStyleAttribute)(t,{left:a});var c=t.classList.contains(o.B)?"blockEvent":"event",p={data:i.i(n.extend)({},e,null,!0),element:t,cancel:!1,type:c};this.parent.trigger(s.m,p,function(e){e.cancel||l.appendChild(t)})},t.prototype.processBlockEvents=function(){for(var e=this.getResourceList(),t=this.getStartCount(),i=0,n=e;i<n.length;i++)for(var r=n[i],s=this.dateRender[parseInt(r.toString(),10)],o=0,l=s.length;o<l;o++){for(var c=new Date(s[parseInt(o.toString(),10)].getTime()),p=a.d(s[parseInt(o.toString(),10)],1),d=this.filterEvents(c,p,this.parent.blockProcessed,this.resources[parseInt(r.toString(),10)]),h=0,u=d;h<u.length;h++){var g=u[h];this.parent.resourceBase&&this.setValues(g,r),this.renderBlockEvents(g,o,r,t),this.cssClass=null,this.groupOrder=null}t+=1}},t.prototype.renderBlockEvents=function(e,t,r,s){var l=this.isSpannedEvent(e,t,r),c=l[this.fields.startTime],p=l[this.fields.endTime],d=a.b(new Date(this.dateRender[parseInt(r.toString(),10)][parseInt(t.toString(),10)].getTime())),h=a.w(d,this.startHour,this.endHour);if(c<=p&&this.isValidEvent(e,c,p,h)&&this.isWorkDayAvailable(r,c)){var u=void 0,g=void 0;if(l[this.fields.isAllDay]){var v=this.parent.element.querySelector("."+o.g+" table");g=i.i(n.formatUnit)(v.offsetHeight),u=i.i(n.formatUnit)(0)}else g=i.i(n.formatUnit)(this.getHeight(c,p)),u=i.i(n.formatUnit)(this.getTopValue(c,t,r));var f=this.createBlockAppointmentElement(e,r,this.isResourceEventTemplate);i.i(n.setStyleAttribute)(f,{width:"100%",height:g,top:u});var m=this.getDayIndex(t,r,s);this.appendEvent(e,f,m,"0px")}},t.prototype.renderEvents=function(e){i.i(n.removeClass)(this.allDayElement,o._32);for(var t,r="allDayEvents"===e?this.sortByDateTime(this.allDayEvents):void 0,s=this.getResourceList(),l=this.getStartCount(),c="allDayEvents"===e?a.h(this.element.querySelector("."+o._7),o.A):0,p="allDayEvents"===e&&this.allDayElement.length>0?this.allDayElement[0].offsetTop:0,d=this,h=0,u=s;h<u.length;h++){var g=u[h];!function(s){t=!0,d.parent.crudModule&&d.parent.crudModule.crudObj.isCrudAction&&"allDayEvents"!==e&&!d.parent.uiStateValues.isGroupAdaptive&&0===d.parent.crudModule.crudObj.sourceEvent.filter(function(e){return e.groupIndex===s}).length&&0===d.parent.crudModule.crudObj.targetEvent.filter(function(e){return e.groupIndex===s}).length&&(t=!1),d.slots=[];var o=d.dateRender[parseInt(s.toString(),10)],h=d.getRenderedDates(o)||o;d.slots.push(o.map(function(e){return+e}));for(var u=0,g=o.length;u<g&&o[parseInt(u.toString(),10)]<=h[h.length-1];u++){d.renderedEvents=[];var v=new Date(o[parseInt(u.toString(),10)].getTime()),f=a.d(o[parseInt(u.toString(),10)],1),m=d.filterEvents(v,f,r,d.resources[parseInt(s.toString(),10)]);if(t)for(var y=0,T=m;y<T.length;y++){var w=T[y];if(d.parent.resourceBase&&d.setValues(w,s),"allDayEvents"===e)d.renderAllDayEvents(w,u,s,l,!1,p,c);else if(d.isAllDayAppointment(w))d.allDayEvents.push(i.i(n.extend)({},w,null,!0));else{if(d.parent.eventSettings.enableMaxHeight&&d.getOverlapIndex(w,u,!1,s)>0)continue;d.renderNormalEvents(w,u,s,l)}d.cssClass=null,d.groupOrder=null}else for(var D=0,b=m;D<b.length;D++){var S=b[D];d.isAllDayAppointment(S)&&d.allDayEvents.push(i.i(n.extend)({},S,null,!0))}l+=1}}(g)}},t.prototype.getStartCount=function(){return this.parent.virtualScrollModule&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.timeScale.enable?parseInt(this.element.querySelector("."+o.D).getAttribute("id").split("-").slice(-1)[0],10):0},t.prototype.getDayIndex=function(e,t,i){var n=this;if(!this.parent.activeViewOptions.group.byDate)return i;if(this.parent.activeViewOptions.group.byDate&&!this.parent.activeViewOptions.group.hideNonWorkingDays){var r=this.parent.resourceBase.lastResourceLevel[0].renderDates.indexOf(this.dateRender[parseInt(t.toString(),10)][parseInt(e.toString(),10)]);return this.resources.length*r+t}for(var a=0,s=this.parent.activeView.colLevels[0],o=this.dateRender[parseInt(t.toString(),10)][parseInt(e.toString(),10)].getTime(),l=[],c=0;c<s.length&&(l=this.parent.resourceBase.resourceDateTree[parseInt(c.toString(),10)],o!==s[parseInt(c.toString(),10)].date.getTime());c++)a+=s[parseInt(c.toString(),10)].colSpan;var p=l.findIndex(function(e){return e.groupOrder.toString()===n.resources[parseInt(t.toString(),10)].groupOrder.toString()});return p<0?a:a+p},t.prototype.setValues=function(e,t){this.parent.activeViewOptions.group.resources.length>0?(this.cssClass=this.resources[parseInt(t.toString(),10)].cssClass,this.groupOrder=this.resources[parseInt(t.toString(),10)].groupOrder):this.cssClass=this.parent.resourceBase.getCssClass(e)},t.prototype.getResourceList=function(){return Array.apply(null,{length:this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?this.resources.length:1}).map(function(e,t){return t})},t.prototype.createAppointmentElement=function(e,t,r,a){var s=this.parent.eventFields,l=e[s.subject]||this.parent.eventSettings.fields.subject.default||this.parent.localeObj.getConstant("addTitle"),c=i.i(n.createElement)("div",{className:o.A,attrs:{"data-id":"Appointment_"+e[s.id],"data-guid":e.Guid,role:"button",tabindex:"0","aria-disabled":this.parent.eventBase.getReadonlyAttribute(e),"aria-label":this.parent.getAnnouncementString(e)}});e[this.fields.isReadonly]&&i.i(n.addClass)([c],"e-read-only");var p=i.i(n.createElement)("div",{className:o.G});if(c.appendChild(p),this.parent.activeViewOptions.group.resources.length>0){var d=this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:a;c.setAttribute("data-group-index",d.toString())}var h,u=r;if(i.i(n.isNullOrUndefined)(this.parent.activeViewOptions.eventTemplate)){var g=i.i(n.createElement)("div",{className:o.H});if(this.parent.sanitize(l,g),t)if(e[s.isAllDay])h=[g];else{h=[];var v=i.i(n.createElement)("div",{className:o.I+(this.parent.isAdaptive?" "+o.J:""),innerHTML:this.parent.getTimeString(e[s.startTime])}),f=i.i(n.createElement)("div",{className:o.I+(this.parent.isAdaptive?" "+o.J:""),innerHTML:this.parent.getTimeString(e[s.endTime])});i.i(n.addClass)([g],"e-text-center"),u.isLeft||h.push(v),h.push(g),u.isRight||h.push(f)}else{var m=this.parent.getTimeString(e[s.startTime])+" - "+this.parent.getTimeString(e[s.endTime]),y=i.i(n.createElement)("div",{className:o.I+(this.parent.isAdaptive?" "+o.J:""),innerHTML:m}),T=i.i(n.createElement)("div",{className:o.K});this.parent.sanitize(e[s.location]||this.parent.eventSettings.fields.location.default||"",T),h=[g,y,T]}}else{var w=this.parent.element.id+"_",D=this.parent.activeViewOptions.eventTemplateName,b=w+D+"eventTemplate",S=this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:a,C=this.isResourceEventTemplate?this.parent.getEventTemplateName(S):"eventTemplate";h=this.parent.getAppointmentTemplate()(e,this.parent,C,b,!1)}if(i.i(n.append)(h,p),!(this.parent.isAdaptive||i.i(n.isNullOrUndefined)(e[s.recurrenceRule])&&i.i(n.isNullOrUndefined)(e[s.recurrenceID]))){var O=e[s.id]===e[s.recurrenceID]?o.L:o.M,E=i.i(n.createElement)("div",{className:o.N+" "+O});t?p.appendChild(E):c.appendChild(E)}return this.parent.eventBase.renderSpannedIcon(t?p:c,u),i.i(n.isNullOrUndefined)(this.cssClass)||i.i(n.addClass)([c],this.cssClass),this.applyResourceColor(c,e,"backgroundColor",this.groupOrder),this.renderResizeHandler(c,u,e[this.fields.isReadonly]),c},t.prototype.createMoreIndicator=function(e,t,r){var a=r+t,s=e[parseInt(a.toString(),10)];if(s.childElementCount<=0){var l=i.i(n.createElement)("div",{className:o._30,id:o._30+"-"+a.toString()}),c=i.i(n.createElement)("div",{className:o.z,attrs:{tabindex:"0","data-index":a.toString(),"data-count":"1"},innerHTML:"+1&nbsp;"+(this.parent.isAdaptive?"":this.parent.localeObj.getConstant("more"))});l.appendChild(c),s.appendChild(l),n.EventHandler.add(c,"click",this.rowExpandCollapse,this)}else{var p=s.querySelector("."+o.z),d=parseInt(p.getAttribute("data-count"),10)+1;p.setAttribute("data-count",d.toString()),p.innerHTML="+"+this.parent.globalize.formatNumber(d)+"&nbsp;"+(this.parent.isAdaptive?"":this.parent.localeObj.getConstant("more"))}},t.prototype.isSpannedEvent=function(e,t,r){var s=a.b(this.dateRender[parseInt(r.toString(),10)][parseInt(t.toString(),10)]),o=this.getRenderedDates(this.dateRender[parseInt(r.toString(),10)])||[s];0===o.filter(function(e){return e.getDay()===t}).length&&(s=a.b(o[0]));var l=this.parent.eventFields,c=a.w(s,this.startHour,this.endHour),p=i.i(n.extend)({},e,null,!0);p.isSpanned={isBottom:!1,isTop:!1},e[l.startTime].getTime()<c.startHour.getTime()&&(p[l.startTime]=c.startHour,p.isSpanned.isTop=!0),e[l.endTime].getTime()>c.endHour.getTime()&&(p[l.endTime]=c.endHour,p.isSpanned.isBottom=!0);var d=this.updateEventMinimumDuration(c,p[l.startTime],p[l.endTime]);return p[l.startTime]=d.startDate,p[l.endTime]=d.endDate,p},t.prototype.isWorkDayAvailable=function(e,t){if(this.parent.activeViewOptions.group.hideNonWorkingDays&&this.resources.length>0){var i=this.resources[parseInt(e.toString(),10)].resourceData[this.resources[parseInt(e.toString(),10)].resource.workDaysField]||this.parent.activeViewOptions.workDays;return i&&i.indexOf(t.getDay())>=0}return!0},t.prototype.renderAllDayEvents=function(e,t,r,l,c,p,d){var h=this,u=this.getRenderedDates(this.dateRender[parseInt(r.toString(),10)])||this.dateRender[parseInt(r.toString(),10)];this.parent.activeViewOptions.group.byDate&&(this.slots[0]=[this.dateRender[parseInt(r.toString(),10)][parseInt(t.toString(),10)].getTime()],u=[this.dateRender[parseInt(r.toString(),10)][parseInt(t.toString(),10)]]);var g=this.splitEvent(e,u)[0],v=new Date(g[this.parent.eventFields.startTime].getTime()),f=new Date(g[this.parent.eventFields.endTime].getTime()),m=0,y=1,T=u[0].getTime()<=v.getTime()&&a.d(u.slice(-1)[0],1).getTime()>=v.getTime();if(v<=f&&T&&this.isWorkDayAvailable(r,v)){var w=[];if(this.renderedAllDayEvents[parseInt(r.toString(),10)]&&(w=this.renderedAllDayEvents[parseInt(r.toString(),10)].filter(function(t){return t.Guid===e.Guid}),this.parent.activeViewOptions.group.byDate&&(w=w.filter(function(e){return e[h.parent.eventFields.startTime]>=u[parseInt(t.toString(),10)]&&e[h.parent.eventFields.endTime]<=a.d(new Date(+u[parseInt(t.toString(),10)]),1)}))),0===w.length){var D=g.data.count,b=this.getOverlapIndex(g,t,!0,r);g.Index=b,this.allDayLevel=this.allDayLevel<b?b:this.allDayLevel;var S=g.data.isRight?0:"Day"===this.parent.currentView?4:7;D>=0&&(m=100*D-S),i.i(n.isNullOrUndefined)(this.renderedAllDayEvents[parseInt(r.toString(),10)])&&(this.renderedAllDayEvents[parseInt(r.toString(),10)]=[]),this.renderedAllDayEvents[parseInt(r.toString(),10)].push(i.i(n.extend)({},g,null,!0));var C,O=[].slice.call(this.element.querySelector("."+o._28).children),E=this.getDayIndex(t,r,l),x=this.element.querySelector("."+o._7+":nth-child("+(E+1)+")");C=c?this.parent.inlineModule.createInlineAppointmentElement(e):this.createAppointmentElement(e,!0,g.data,r),i.i(n.addClass)([C],o._31);var A=i.i(n.extend)({},g.data,null,!0);e.data=A;var V={data:e,element:C,cancel:!1};this.parent.trigger(s.m,V,function(t){if(!t.cancel){if(x.appendChild(C),y+=(0===b?p:p+b*d)+1,i.i(n.setStyleAttribute)(C,{width:m+"%",top:i.i(n.formatUnit)(y)}),b>1){h.moreEvents.push(C);for(var r=0,a=D;r<a;r++)h.createMoreIndicator(O,r,E)}h.allDayElement[0].setAttribute("data-count",h.allDayLevel.toString());var s=4+(!h.parent.uiStateValues.expand&&h.allDayLevel>2?3*d:(h.allDayLevel+1)*d);h.setAllDayRowHeight(s),h.addOrRemoveClass(),h.wireAppointmentEvents(C,e)}})}}},t.prototype.renderNormalEvents=function(e,t,r,s,l){var c=this.isSpannedEvent(e,t,r),p=c[this.fields.startTime],d=c[this.fields.endTime],h="0%",u=0,g=a.b(new Date(this.dateRender[parseInt(r.toString(),10)][parseInt(t.toString(),10)].getTime())),v=a.w(g,this.startHour,this.endHour),f=this.isValidEvent(e,p,d,v);if(!(p.getTime()<this.parent.minDate.getTime()||d.getTime()>this.parent.maxDate.getTime())&&p<=d&&f&&this.isWorkDayAvailable(r,p)){var m=this.getHeight(p,d);p.getTime()>v.startHour.getTime()&&(u=this.getTopValue(p,t,r));var y=this.getOverlapIndex(c,t,!1,r);c.Index=y,this.overlapList.push(c),this.overlapList.length>1?(i.i(n.isNullOrUndefined)(this.overlapEvents[parseInt(y.toString(),10)])&&(this.overlapEvents[parseInt(y.toString(),10)]=[]),this.overlapEvents[parseInt(y.toString(),10)].push(c)):(this.overlapEvents=[],this.overlapEvents.push([c])),h=this.getEventWidth();var T={index:y,left:"0%",width:h,day:s,dayIndex:t,record:c,resource:r},w=this.adjustOverlapElements(T);h=w.appWidth,i.i(n.isNullOrUndefined)(this.renderedEvents[parseInt(r.toString(),10)])&&(this.renderedEvents[parseInt(r.toString(),10)]=[]),this.renderedEvents[parseInt(r.toString(),10)].push(i.i(n.extend)({},c,null,!0));var D=void 0;D=l?this.parent.inlineModule.createInlineAppointmentElement(e):this.createAppointmentElement(e,!1,c.isSpanned,r),i.i(n.setStyleAttribute)(D,{width:this.parent.eventSettings.enableMaxHeight?"100%":w.appWidth,height:m+"px",top:u+"px"});var b=15*D.querySelectorAll("."+o.O).length,S=m-40-b,C=D.querySelector("."+o.H);!this.parent.isAdaptive&&C&&(C.style.maxHeight=i.i(n.formatUnit)(S));var O=this.getDayIndex(t,r,s),E={};E[this.fields.startTime]=e[this.fields.startTime],E[this.fields.endTime]=e[this.fields.endTime],c.data=E,this.appendEvent(c,D,O,w.appLeft),this.wireAppointmentEvents(D,e)}},t.prototype.getEventWidth=function(){var e="Day"===this.parent.currentView?97:94,t=(e-this.overlapEvents.length)/this.overlapEvents.length;return(t<0?0:t)+"%"},t.prototype.getEventLeft=function(e,t){var i=(parseFloat(e)+1)*t;return(i>99?99:i)+"%"},t.prototype.getTopValue=function(e,t,i){var n=a.b(this.dateRender[parseInt(i.toString(),10)][parseInt(t.toString(),10)]),r=a.w(n,this.startHour,this.endHour),s=r.startHour,o=a.F(n)&&s.getHours()!==this.startHour.getHours()?this.startHour.getHours():s.getHours(),l=60*(e.getHours()-o)+(e.getMinutes()-s.getMinutes());return this.parent.activeViewOptions.timeScale.enable?l*this.cellHeight*this.slotCount/this.interval:0},t.prototype.getOverlapIndex=function(e,t,r,s){var o=this,l=this.parent.eventFields,c=[],p=-1;if(this.overlapEvents=[],r){if(!i.i(n.isNullOrUndefined)(this.renderedAllDayEvents[parseInt(s.toString(),10)])){var d=a.b(new Date(this.dateRender[parseInt(s.toString(),10)][parseInt(t.toString(),10)].getTime()));c=this.renderedAllDayEvents[parseInt(s.toString(),10)].filter(function(e){return a.b(e[l.startTime]).getTime()<=d.getTime()&&a.b(e[l.endTime]).getTime()>=d.getTime()}),this.parent.activeViewOptions.group.resources.length>0&&(c=this.filterEventsByResource(this.resources[parseInt(s.toString(),10)],c))}}else{var h=i.i(n.isNullOrUndefined)(this.renderedEvents[parseInt(s.toString(),10)])?[]:this.renderedEvents[parseInt(s.toString(),10)],u=[],g=e[l.startTime],v=e[l.endTime];this.overlapList=h.filter(function(e){return e[l.endTime]>g&&e[l.startTime]<=v||e[l.startTime]>=v&&e[l.endTime]<=g||e[l.endTime].getTime()===e[l.startTime].getTime()&&e[l.startTime].getTime()===g.getTime()&&e[l.endTime]<v}),this.parent.activeViewOptions.group.resources.length>0&&(this.overlapList=this.filterEventsByResource(this.resources[parseInt(s.toString(),10)],this.overlapList)),this.overlapList.forEach(function(e){var t=h.filter(function(t){return t[l.endTime]>e[l.startTime]&&t[l.startTime]<=e[l.endTime]});o.parent.activeViewOptions.group.resources.length>0&&(t=o.filterEventsByResource(o.resources[parseInt(s.toString(),10)],t));var i=t.filter(function(e){return-1===o.overlapList.indexOf(e)});i.length>0&&(u=u.concat(i))});for(var f=0;f<u.length-1;f++)for(var m=f+1;m<u.length;m++)u[parseInt(f.toString(),10)][l.id]===u[parseInt(m.toString(),10)][l.id]&&(u.splice(m,1),m--);this.overlapList=this.overlapList.concat(u),c=this.overlapList;for(var y=0,T=c;y<T.length;y++){var w=T[y],D=w,b=D.Index;i.i(n.isNullOrUndefined)(this.overlapEvents[parseInt(b.toString(),10)])?this.overlapEvents[parseInt(b.toString(),10)]=[w]:this.overlapEvents[parseInt(b.toString(),10)].push(w)}}if(r||(c=c.filter(function(t){return t[l.startTime]===e[l.startTime]&&t[l.endTime]>e[l.endTime]||t[l.endTime]>e[l.startTime]&&t[l.startTime]<e[l.endTime]||t[l.endTime]===e[l.startTime]&&t[l.startTime]===e[l.endTime]||t[l.startTime].getTime()===e[l.startTime].getTime()&&t[l.endTime].getTime()===e[l.endTime].getTime()||t[l.startTime].getTime()===e[l.startTime].getTime()&&t[l.endTime].getTime()<e[l.endTime].getTime()||t[l.endTime].getTime()>e[l.endTime].getTime()})),c.length>0){var S=c.map(function(e){return e.Index});p=S.length>0?this.getSmallestMissingNumber(S):0}return-1===p?0:p},t.prototype.adjustOverlapElements=function(e){for(var t={appWidth:e.width,appLeft:e.left},r=0,a=this.overlapEvents.length;r<a;r++)if(!i.i(n.isNullOrUndefined)(this.overlapEvents[parseInt(r.toString(),10)]))for(var s=0,o=this.overlapEvents[parseInt(r.toString(),10)].length;s<o;s++){var l=this.getDayIndex(e.dayIndex,e.resource,e.day),c=this.element.querySelector("#e-appointment-wrapper-"+l);if(c&&c.childElementCount>0){var p=this.overlapEvents[parseInt(r.toString(),10)][parseInt(s.toString(),10)].Guid;if(c.querySelectorAll('div[data-guid="'+p+'"]').length>0&&p!==e.record.Guid){var d=c.querySelector('div[data-guid="'+p+'"]');parseFloat(e.width)<=parseFloat(d.style.width)?(this.parent.enableRtl?d.style.right=this.getEventLeft(e.width,r):d.style.left=this.getEventLeft(e.width,r),d.style.width=parseFloat(e.width)+"%",t.appWidth=d.style.width):t.appWidth=d.style.width}else{var h=e.width;i.i(n.isNullOrUndefined)(this.overlapEvents[r-1])&&(h=this.getEventWidth()),t.appWidth=h,t.appLeft=this.getEventLeft(h,e.index)}}}return t},t.prototype.setAllDayRowHeight=function(e){var t=this.parent.element.querySelector("."+o.d);"auto"!==this.parent.height&&this.parent.enableAllDayScroll||i.i(n.addClass)([t],o._33);var r=this.parent.element.querySelector("."+o._28);if(r.style.height="",this.parent.uiStateValues.expand&&"auto"!==this.parent.height&&this.parent.enableAllDayScroll)r.style.height=e/12+"em",this.parent.eventBase.allDayExpandScroll(t);else{for(var a=0,s=this.allDayElement;a<s.length;a++){s[a].style.height=e/12+"em"}i.i(n.removeClass)([t],o._5)}},t.prototype.addOrRemoveClass=function(){var e=this;this.moreEvents.filter(function(t){!e.parent.uiStateValues.expand&&e.allDayLevel>2?(i.i(n.addClass)([t],o._34),t.setAttribute("tabindex","-1")):(i.i(n.removeClass)([t],o._34),t.setAttribute("tabindex","0"))});var t=this.element.querySelector("."+o._26);this.parent.uiStateValues.expand?(i.i(n.removeClass)([t],o._27),i.i(n.addClass)([t],o._35)):(i.i(n.removeClass)([t],o._35),i.i(n.addClass)([t],o._27)),this.allDayLevel>2?i.i(n.removeClass)([t],o.J):i.i(n.addClass)([t],o.J),[].slice.call(this.element.querySelectorAll("."+o._30)).forEach(function(t){!e.parent.uiStateValues.expand&&e.allDayLevel>2?i.i(n.removeClass)([t],o.J):i.i(n.addClass)([t],o.J)})},t.prototype.getEventHeight=function(){var e=i.i(n.createElement)("div",{className:o.A,styles:"visibility:hidden"});this.element.querySelector("."+o._7+":first-child").appendChild(e);var t=e.offsetHeight;return i.i(n.remove)(e),t},t.prototype.rowExpandCollapse=function(){var e=this.element.querySelector("."+o._26);this.parent.uiStateValues.expand=e.classList.contains(o._27);var t;this.parent.uiStateValues.expand?(e.setAttribute("title",this.parent.localeObj.getConstant("collapseAllDaySection")),e.setAttribute("aria-label","Collapse section"),t=(this.allDayLevel+1)*this.getEventHeight()+4):(e.setAttribute("title",this.parent.localeObj.getConstant("expandAllDaySection")),e.setAttribute("aria-label","Expand section"),t=3*this.getEventHeight()+4,this.parent.element.querySelector("."+o.d).scrollTop=0),this.setAllDayRowHeight(t),this.animation.animate(this.allDayElement[0]),this.addOrRemoveClass(),this.animation.animate(e)},t.prototype.animationUiUpdate=function(){this.parent.notify(s.G,{})},t.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed||(this.removeEventListener(),this.allDayElement=null,this.renderedAllDayEvents=null,this.renderedEvents=null,this.slotCount=null,this.interval=null,this.startHour=null,this.endHour=null,this.element=null,this.fields=null,this.animation=null,e.prototype.destroy.call(this))},t}(r.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return p});var n=i(0),r=(i.n(n),i(8)),a=i(25),s=i(1),o=i(2),l=i(3),c=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),p=function(e){function t(t){var i=e.call(this,t)||this;return i.viewClass="e-year-view",i.isInverseTableSelect=!1,i.yearEventModule=null,i}return c(t,e),t.prototype.getModuleName=function(){return"year"},t.prototype.renderLayout=function(e){this.parent.resourceBase&&this.parent.resourceBase.generateResourceLevels([{renderDates:this.parent.activeView.renderDates}]),this.setPanel(i.i(n.createElement)("div",{className:l._20}));var t="Horizontal"===this.parent.activeViewOptions.orientation?"e-horizontal":"e-vertical";i.i(n.addClass)([this.element],[this.viewClass,t,e]),this.renderPanel(e),this.parent.activeViewOptions.allowVirtualScrolling&&i.i(n.addClass)([this.element],[l._22]);var r=this.createTableLayout(l._24);this.element.appendChild(r),this.element.querySelector("table").setAttribute("role","presentation");var a=r.querySelector("tbody");this.rowCount=this.getRowColumnCount("row"),this.columnCount=this.getRowColumnCount("column"),this.renderHeader(a),this.renderContent(a),"Year"!==this.parent.currentView&&this.parent.uiStateValues.isGroupAdaptive&&(this.generateColumnLevels(),this.renderResourceMobileLayout()),n.EventHandler.add(this.element.querySelector("."+l.g),"scroll",this.onContentScroll,this),this.parent.notify(o.G,{})},t.prototype.renderHeader=function(e){},t.prototype.renderContent=function(e){var t=i.i(n.createElement)("tr");e.appendChild(t);var r=i.i(n.createElement)("td");t.appendChild(r),this.element.querySelector("tbody").appendChild(t);var a=i.i(n.createElement)("div",{className:l.g});r.appendChild(a);var s=this.createTableLayout("e-calendar-table");a.appendChild(s);var o=i.i(n.createElement)("tr");s.querySelector("tbody").appendChild(o);var c=i.i(n.createElement)("td");o.appendChild(c);var p=i.i(n.createElement)("div",{className:"e-calendar-wrapper"});c.appendChild(p);for(var d=this.getMonths(),h=0,u=d;h<u.length;h++){var g=u[h],v=new Date(this.parent.selectedDate.getFullYear(),g,1),f=i.i(n.createElement)("div",{className:"e-month-calendar e-calendar",attrs:{"data-role":"calendar"}});f.appendChild(this.renderCalendarHeader(v)),f.appendChild(this.renderCalendarContent(v)),p.appendChild(f)}this.renderDates.splice(0,1)},t.prototype.renderCalendarHeader=function(e){var t=i.i(n.createElement)("div",{className:"e-header e-month"}),r=i.i(n.createElement)("div",{className:"e-day e-title"});if(this.parent.activeViewOptions.monthHeaderTemplate){var a={date:e,type:"monthHeader"};this.renderTemplates(this.parent.getMonthHeaderTemplate(),a,"monthHeaderTemplate",this.parent.activeViewOptions.monthHeaderTemplateName,r)}else r.innerHTML=this.getMonthName(e);return t.appendChild(r),this.parent.trigger(o.j,{elementType:"headerCells",element:r,date:e}),t},t.prototype.renderCalendarContent=function(e){var t=this.getMonthDates(e),r=i.i(n.createElement)("div",{className:"e-content e-month"}),a=this.createTableLayout("e-calendar-table "+l.h);r.appendChild(a),this.setAriaAttributes(a);var c=i.i(n.createElement)("thead",{className:"e-week-header"}),p=i.i(n.createElement)("tr"),d=s.l(s.n(e),this.parent.firstDayOfWeek);this.parent.activeViewOptions.showWeekNumber&&p.appendChild(i.i(n.createElement)("th"));for(var h=0;h<s.e;h++){if(this.parent.activeViewOptions.dayHeaderTemplate){var u=i.i(n.createElement)("th"),g={date:d,type:"dayHeader"};this.renderTemplates(this.parent.getDayHeaderTemplate(),g,"dayHeaderTemplate",this.parent.activeViewOptions.dayHeaderTemplateName,u),p.appendChild(u)}else p.appendChild(i.i(n.createElement)("th",{innerHTML:this.parent.getDayNames("narrow")[d.getDay()]}));var v=new Date(d.getTime()+s.c);d=v.getDate()===d.getDate()?s.d(v,1):v}c.appendChild(p),i.i(n.prepend)([c],a);for(var f=a.querySelector("tbody");t.length>0;){var m=t.splice(0,s.e),y=i.i(n.createElement)("tr");if(this.parent.activeViewOptions.showWeekNumber){var T=this.parent.getWeekNumberContent(m),w=i.i(n.createElement)("td",{className:"e-week-number",attrs:{title:this.parent.localeObj.getConstant("week")+" "+T},innerHTML:T});y.appendChild(w),this.parent.trigger(o.j,{elementType:"weekNumberCells",element:w})}for(var D=0,b=m;D<b.length;D++){var S=b[D],w=i.i(n.createElement)("td",{className:"e-cell "+l.n,attrs:{"data-date":S.getTime().toString()}});if(this.parent.activeViewOptions.cellHeaderTemplate){var g={date:S,type:"monthCells"};this.renderTemplates(this.parent.getCellHeaderTemplate(),g,"cellHeaderTemplate",this.parent.activeViewOptions.cellHeaderTemplateName,w)}else{var C=i.i(n.createElement)("span",{className:"e-day",innerHTML:this.parent.globalize.formatDate(S,{skeleton:"d",calendar:this.parent.getCalendarMode()}),attrs:{title:this.parent.globalize.formatDate(S,{type:"date",skeleton:"full"})}});w.appendChild(C)}if(this.parent.activeViewOptions.cellTemplate){var g={date:S,type:"monthCells"};this.renderTemplates(this.parent.getCellTemplate(),g,"cellTemplate",this.parent.activeViewOptions.cellTemplateName,w)}var O=[];e.getMonth()!==S.getMonth()&&(O.push(l.t),w.firstElementChild&&!this.parent.activeViewOptions.cellTemplate&&w.firstElementChild.setAttribute("aria-disabled","true")),this.isCurrentDate(S)&&e.getMonth()===S.getMonth()&&(O=O.concat(["e-today","e-selected"])),O.length>0&&i.i(n.addClass)([w],O),y.appendChild(w),e.getMonth()===S.getMonth()&&this.renderDates.push(new Date(S)),this.parent.isMinMaxDate(S)?(n.EventHandler.add(w,"click",this.onCellClick,this),this.parent.isAdaptive||n.EventHandler.add(w,"dblclick",this.parent.workCellAction.cellDblClick,this.parent.workCellAction)):i.i(n.addClass)([w],l.r),this.parent.trigger(o.j,{elementType:"workCells",element:w,date:S})}f.appendChild(y)}return r},t.prototype.createTableColGroup=function(e){for(var t=i.i(n.createElement)("colgroup"),r=0;r<e;r++)t.appendChild(i.i(n.createElement)("col"));return t},t.prototype.getMonthName=function(e){var t=this.parent.globalize.formatDate(e,{format:this.parent.activeViewOptions.dateFormat||"MMMM y",calendar:this.parent.getCalendarMode()});return s.a(t,"multiple")},t.prototype.generateColumnLevels=function(){var e=[],t=this.getDateSlots([this.parent.selectedDate],this.parent.activeViewOptions.workDays);if(this.parent.activeViewOptions.group.resources.length>0){if(e=this.parent.resourceBase.generateResourceLevels(t),this.parent.uiStateValues.isGroupAdaptive){var i=this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex];e=[this.getDateSlots([this.parent.selectedDate],i.workDays)]}}else e.push(t);return e.pop(),this.colLevels=e,e},t.prototype.getDateSlots=function(e,t,i,n){return void 0===i&&(i=this.parent.workHours.start),void 0===n&&(n=this.parent.workHours.end),[{date:e[0],type:"dateHeader",className:[l.e],colSpan:1,workDays:t,startHour:new Date(+this.parent.globalize.parseDate(i,{skeleton:"Hm"})),endHour:new Date(+this.parent.globalize.parseDate(n,{skeleton:"Hm"}))}]},t.prototype.getMonthDates=function(e){for(var t=s.l(s.n(e),this.parent.firstDayOfWeek),i=s.d(new Date(+t),6*s.e),n=[],r=t;r.getTime()<i.getTime();r=s.d(r,1))n.push(s.b(new Date(r)));return n},t.prototype.getRowColumnCount=function(e){for(var t=this.getMonths(),i=this.parent.selectedDate.getFullYear(),n=[],r=0,a=t;r<a.length;r++){var s=a[r];n.push(new Date(i,s,1).getDay()+new Date(i,s+1,0).getDate())}var o=Math.max.apply(Math,n);return"row"===e?"Horizontal"===this.parent.activeViewOptions.orientation?t.length:o:"Horizontal"===this.parent.activeViewOptions.orientation?o:t.length},t.prototype.isCurrentDate=function(e){return s.b(new Date).getTime()===s.b(new Date(e.getTime())).getTime()},t.prototype.getMonths=function(){var e=this;return Array.apply(null,{length:this.parent.activeViewOptions.monthsCount}).map(function(t,i){return e.parent.firstMonthOfYear+i})},t.prototype.renderTemplates=function(e,t,r,a,s){var o=this.parent.element.id+"_"+a+r,l=[].slice.call(e(t,this.parent,r,o,!1));i.i(n.append)(l,s)},t.prototype.onCellClick=function(e){var t=i.i(n.closest)(e.target,"."+l.n),r=this.parent.getDateFromElement(t);this.parent.activeCellsData=this.parent.getCellDetails(t);var a=r.getTime()<this.getStartDate().getTime();if(a||r.getTime()>this.getEndDate().getTime()){this.parent.changeDate(this.parent.activeView.getNextPreviousDate(a?"previous":"next"),e);var c=this.parent.activeCellsData.startTime.getTime(),p=c>=this.getStartDate().getTime()&&c<=this.getEndDate().getTime(),d=p?c:(a?this.getEndDate():this.getStartDate()).getTime(),h=this.parent.element.querySelector(":not(."+l.t+')[data-date="'+d+'"]');this.parent.selectCell(h),this.parent.activeCellsData=this.parent.getCellDetails(h)}else{var u=s.d(new Date(r.getTime()),1),g=this.parent.eventBase.filterEvents(r,u),v={date:r,event:g,element:e.target};t.classList.contains(l.t)&&(t=this.parent.element.querySelector(":not(."+l.t+')[data-date="'+t.getAttribute("data-date")+'"]')),this.parent.activeCellsData=this.parent.getCellDetails(t);var f=i.i(n.extend)(this.parent.activeCellsData,{cancel:!1,event:e,name:"cellClick"});this.parent.trigger(o.a,f),this.parent.quickPopup.moreEventClick(v,u)}},t.prototype.onContentScroll=function(e){var t=e.target,i=this.getDatesHeaderElement();this.parent.notify(o.I,e),i&&(i.firstElementChild.scrollLeft=t.scrollLeft);var n="."+l.f+",."+l.x,r=this.element.querySelector(n);r&&(r.scrollTop=t.scrollTop),this.parent.isAdaptive||(this.parent.uiStateValues.top=e.target.scrollTop),this.parent.uiStateValues.left=e.target.scrollLeft,this.setPersistence()},t.prototype.onScrollUiUpdate=function(e){var t=this.parent.element.offsetHeight-this.getHeaderBarHeight(),r=this.element.querySelector("."+l.c);r&&(t-=r.offsetHeight);var a=this.element.querySelector("."+l.g);if(a&&(a.style.height=i.i(n.formatUnit)(t)),!this.parent.isAdaptive&&r){var o=s.A();a.offsetWidth-a.clientWidth>0?(r.firstElementChild.style[e.cssProperties.border]=o>0?"1px":"0px",r.style[e.cssProperties.padding]=o>0?o-1+"px":"0px"):(r.firstElementChild.style[e.cssProperties.border]="",r.style[e.cssProperties.padding]="")}this.setColWidth(this.getContentAreaElement());var c="."+l.f+",."+l.x,p=this.element.querySelector(c);if(p){var d=a.scrollWidth>a.clientWidth;p.style.height=i.i(n.formatUnit)(t-(d?17:0))}e.isPreventScrollUpdate||(this.parent.uiStateValues.isInitial?(this.parent.uiStateValues.isInitial=!1,this.parent.uiStateValues.top=this.parent.uiStateValues.left=0):(p&&(p.scrollTop=this.parent.uiStateValues.top),a.scrollTop=this.parent.uiStateValues.top,a.scrollLeft=this.parent.uiStateValues.left)),this.retainScrollPosition()},t.prototype.getStartDate=function(){return new Date(this.parent.selectedDate.getFullYear(),this.parent.firstMonthOfYear%12,1)},t.prototype.getEndDate=function(){return s.d(s.u(this.getStartDate(),this.parent.monthsCount),-1)},t.prototype.startDate=function(){return"Year"===this.parent.currentView?s.l(this.getStartDate(),this.parent.firstDayOfWeek):this.getStartDate()},t.prototype.endDate=function(){return"Year"===this.parent.currentView?s.d(s.m(this.getEndDate(),this.parent.firstDayOfWeek),1):s.d(this.getEndDate(),1)},t.prototype.getEndDateFromStartDate=function(e){var t=new Date(e.getTime());return this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(t=s.o(t)),s.d(new Date(t.getTime()),1)},t.prototype.getNextPreviousDate=function(e){return s.v(this.parent.selectedDate,"next"===e?1:-1)},t.prototype.getDateRangeText=function(){var e=this.getStartDate(),t=this.getEndDate();return e.getFullYear()!==t.getFullYear()?this.parent.globalize.formatDate(e,{skeleton:"yMMM"})+" - "+this.parent.globalize.formatDate(t,{skeleton:"yMMM"}):this.parent.globalize.formatDate(this.parent.selectedDate,{skeleton:"y"})},t.prototype.addEventListener=function(){this.parent.on(o.J,this.onScrollUiUpdate,this),this.parent.on(o.E,this.onDataReady,this)},t.prototype.removeEventListener=function(){this.parent&&(this.parent.off(o.J,this.onScrollUiUpdate),this.parent.off(o.E,this.onDataReady))},t.prototype.onDataReady=function(e){this.yearEventModule=new a.a(this.parent),this.yearEventModule.renderAppointments(),this.parent.notify(o.F,e)},t.prototype.scrollToDate=function(e){var t=+new Date(s.b(e)),r=this.element.querySelector("."+l.n+":not(."+l.t+')[data-date="'+t+'"]');r&&(r=i.i(n.closest)(r,".e-month-calendar"),this.getContentAreaElement().scrollTop=r.offsetTop)},t.prototype.destroy=function(){if(!(!this.parent||this.parent&&this.parent.isDestroyed)&&this.element){var t=this.element.querySelector("."+l.g);t&&n.EventHandler.remove(t,"scroll",this.onContentScroll),this.yearEventModule&&(this.yearEventModule.destroy(),this.yearEventModule=null),this.parent.resourceBase&&this.parent.resourceBase.destroy(),e.prototype.destroy.call(this)}},t}(r.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return n}),i.d(t,"b",function(){return r});var n=function(){function e(){this.timezoneData=[],this.timezoneData=this.getTimezoneData()}return e.prototype.offset=function(e,t){var i=e.getTimezoneOffset();try{var n=new Date(e.toLocaleString("en-US",{timeZone:t}));return isNaN(n.getTime())?0:(e.getTime()-n.getTime())/6e4+i}catch(e){return 0}},e.prototype.convert=function(e,t,i){"string"==typeof t&&(t=this.offset(e,t)),"string"==typeof i&&(i=this.offset(e,i));var n=e.getTimezoneOffset();e=new Date(e.getTime()+6e4*(t-i));var r=e.getTimezoneOffset();return new Date(e.getTime()+6e4*(r-n))},e.prototype.add=function(e,t){return this.convert(e,e.getTimezoneOffset(),t)},e.prototype.remove=function(e,t){return this.convert(e,t,e.getTimezoneOffset())},e.prototype.removeLocalOffset=function(e){return new Date(e.getTime()-6e4*e.getTimezoneOffset())},e.prototype.getLocalTimezoneName=function(){return window.Intl?Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC":"UTC"},e.prototype.getTimezoneData=function(){return r},e}(),r=[{Value:"Pacific/Niue",Text:"(UTC-11:00) Niue"},{Value:"Pacific/Pago_Pago",Text:"(UTC-11:00) Pago Pago"},{Value:"Pacific/Honolulu",Text:"(UTC-10:00) Hawaii Time"},{Value:"Pacific/Rarotonga",Text:"(UTC-10:00) Rarotonga"},{Value:"Pacific/Tahiti",Text:"(UTC-10:00) Tahiti"},{Value:"Pacific/Marquesas",Text:"(UTC-09:30) Marquesas"},{Value:"America/Anchorage",Text:"(UTC-09:00) Alaska Time"},{Value:"Pacific/Gambier",Text:"(UTC-09:00) Gambier"},{Value:"America/Los_Angeles",Text:"(UTC-08:00) Pacific Time"},{Value:"America/Tijuana",Text:"(UTC-08:00) Pacific Time - Tijuana"},{Value:"America/Vancouver",Text:"(UTC-08:00) Pacific Time - Vancouver"},{Value:"America/Whitehorse",Text:"(UTC-08:00) Pacific Time - Whitehorse"},{Value:"Pacific/Pitcairn",Text:"(UTC-08:00) Pitcairn"},{Value:"America/Denver",Text:"(UTC-07:00) Mountain Time"},{Value:"America/Phoenix",Text:"(UTC-07:00) Mountain Time - Arizona"},{Value:"America/Mazatlan",Text:"(UTC-07:00) Mountain Time - Chihuahua, Mazatlan"},{Value:"America/Dawson_Creek",Text:"(UTC-07:00) Mountain Time - Dawson Creek"},{Value:"America/Edmonton",Text:"(UTC-07:00) Mountain Time - Edmonton"},{Value:"America/Hermosillo",Text:"(UTC-07:00) Mountain Time - Hermosillo"},{Value:"America/Yellowknife",Text:"(UTC-07:00) Mountain Time - Yellowknife"},{Value:"America/Belize",Text:"(UTC-06:00) Belize"},{Value:"America/Chicago",Text:"(UTC-06:00) Central Time"},{Value:"America/Mexico_City",Text:"(UTC-06:00) Central Time - Mexico City"},{Value:"America/Regina",Text:"(UTC-06:00) Central Time - Regina"},{Value:"America/Tegucigalpa",Text:"(UTC-06:00) Central Time - Tegucigalpa"},{Value:"America/Winnipeg",Text:"(UTC-06:00) Central Time - Winnipeg"},{Value:"America/Costa_Rica",Text:"(UTC-06:00) Costa Rica"},{Value:"America/El_Salvador",Text:"(UTC-06:00) El Salvador"},{Value:"Pacific/Galapagos",Text:"(UTC-06:00) Galapagos"},{Value:"America/Guatemala",Text:"(UTC-06:00) Guatemala"},{Value:"America/Managua",Text:"(UTC-06:00) Managua"},{Value:"America/Cancun",Text:"(UTC-05:00) America Cancun"},{Value:"America/Bogota",Text:"(UTC-05:00) Bogota"},{Value:"Pacific/Easter",Text:"(UTC-05:00) Easter Island"},{Value:"America/New_York",Text:"(UTC-05:00) Eastern Time"},{Value:"America/Iqaluit",Text:"(UTC-05:00) Eastern Time - Iqaluit"},{Value:"America/Toronto",Text:"(UTC-05:00) Eastern Time - Toronto"},{Value:"America/Guayaquil",Text:"(UTC-05:00) Guayaquil"},{Value:"America/Havana",Text:"(UTC-05:00) Havana"},{Value:"America/Jamaica",Text:"(UTC-05:00) Jamaica"},{Value:"America/Lima",Text:"(UTC-05:00) Lima"},{Value:"America/Nassau",Text:"(UTC-05:00) Nassau"},{Value:"America/Panama",Text:"(UTC-05:00) Panama"},{Value:"America/Port-au-Prince",Text:"(UTC-05:00) Port-au-Prince"},{Value:"America/Rio_Branco",Text:"(UTC-05:00) Rio Branco"},{Value:"America/Halifax",Text:"(UTC-04:00) Atlantic Time - Halifax"},{Value:"America/Barbados",Text:"(UTC-04:00) Barbados"},{Value:"Atlantic/Bermuda",Text:"(UTC-04:00) Bermuda"},{Value:"America/Boa_Vista",Text:"(UTC-04:00) Boa Vista"},{Value:"America/Caracas",Text:"(UTC-04:00) Caracas"},{Value:"America/Curacao",Text:"(UTC-04:00) Curacao"},{Value:"America/Grand_Turk",Text:"(UTC-04:00) Grand Turk"},{Value:"America/Guyana",Text:"(UTC-04:00) Guyana"},{Value:"America/La_Paz",Text:"(UTC-04:00) La Paz"},{Value:"America/Manaus",Text:"(UTC-04:00) Manaus"},{Value:"America/Martinique",Text:"(UTC-04:00) Martinique"},{Value:"America/Port_of_Spain",Text:"(UTC-04:00) Port of Spain"},{Value:"America/Porto_Velho",Text:"(UTC-04:00) Porto Velho"},{Value:"America/Puerto_Rico",Text:"(UTC-04:00) Puerto Rico"},{Value:"America/Santo_Domingo",Text:"(UTC-04:00) Santo Domingo"},{Value:"America/Thule",Text:"(UTC-04:00) Thule"},{Value:"America/St_Johns",Text:"(UTC-03:30) Newfoundland Time - St. Johns"},{Value:"America/Araguaina",Text:"(UTC-03:00) Araguaina"},{Value:"America/Asuncion",Text:"(UTC-03:00) Asuncion"},{Value:"America/Belem",Text:"(UTC-03:00) Belem"},{Value:"America/Argentina/Buenos_Aires",Text:"(UTC-03:00) Buenos Aires"},{Value:"America/Campo_Grande",Text:"(UTC-03:00) Campo Grande"},{Value:"America/Cayenne",Text:"(UTC-03:00) Cayenne"},{Value:"America/Cuiaba",Text:"(UTC-03:00) Cuiaba"},{Value:"America/Fortaleza",Text:"(UTC-03:00) Fortaleza"},{Value:"America/Godthab",Text:"(UTC-03:00) Godthab"},{Value:"America/Maceio",Text:"(UTC-03:00) Maceio"},{Value:"America/Miquelon",Text:"(UTC-03:00) Miquelon"},{Value:"America/Montevideo",Text:"(UTC-03:00) Montevideo"},{Value:"Antarctica/Palmer",Text:"(UTC-03:00) Palmer"},{Value:"America/Paramaribo",Text:"(UTC-03:00) Paramaribo"},{Value:"America/Punta_Arenas",Text:"(UTC-03:00) Punta Arenas"},{Value:"America/Recife",Text:"(UTC-03:00) Recife"},{Value:"Antarctica/Rothera",Text:"(UTC-03:00) Rothera"},{Value:"America/Bahia",Text:"(UTC-03:00) Salvador"},{Value:"America/Santiago",Text:"(UTC-03:00) Santiago"},{Value:"Atlantic/Stanley",Text:"(UTC-03:00) Stanley"},{Value:"America/Noronha",Text:"(UTC-02:00) Noronha"},{Value:"America/Sao_Paulo",Text:"(UTC-02:00) Sao Paulo"},{Value:"Atlantic/South_Georgia",Text:"(UTC-02:00) South Georgia"},{Value:"Atlantic/Azores",Text:"(UTC-01:00) Azores"},{Value:"Atlantic/Cape_Verde",Text:"(UTC-01:00) Cape Verde"},{Value:"America/Scoresbysund",Text:"(UTC-01:00) Scoresbysund"},{Value:"Africa/Abidjan",Text:"(UTC+00:00) Abidjan"},{Value:"Africa/Accra",Text:"(UTC+00:00) Accra"},{Value:"Africa/Bissau",Text:"(UTC+00:00) Bissau"},{Value:"Atlantic/Canary",Text:"(UTC+00:00) Canary Islands"},{Value:"Africa/Casablanca",Text:"(UTC+00:00) Casablanca"},{Value:"America/Danmarkshavn",Text:"(UTC+00:00) Danmarkshavn"},{Value:"Europe/Dublin",Text:"(UTC+00:00) Dublin"},{Value:"Africa/El_Aaiun",Text:"(UTC+00:00) El Aaiun"},{Value:"Atlantic/Faroe",Text:"(UTC+00:00) Faeroe"},{Value:"Etc/UTC",Text:"(UTC+00:00) UTC (no daylight saving)"},{Value:"Europe/Lisbon",Text:"(UTC+00:00) Lisbon"},{Value:"Europe/London",Text:"(UTC+00:00) London"},{Value:"Africa/Monrovia",Text:"(UTC+00:00) Monrovia"},{Value:"Atlantic/Reykjavik",Text:"(UTC+00:00) Reykjavik"},{Value:"UTC",Text:"UTC"},{Value:"Africa/Algiers",Text:"(UTC+01:00) Algiers"},{Value:"Europe/Amsterdam",Text:"(UTC+01:00) Amsterdam"},{Value:"Europe/Andorra",Text:"(UTC+01:00) Andorra"},{Value:"Europe/Berlin",Text:"(UTC+01:00) Berlin"},{Value:"Europe/Brussels",Text:"(UTC+01:00) Brussels"},{Value:"Europe/Budapest",Text:"(UTC+01:00) Budapest"},{Value:"Europe/Belgrade",Text:"(UTC+01:00) Central European Time - Belgrade"},{Value:"Europe/Prague",Text:"(UTC+01:00) Central European Time - Prague"},{Value:"Africa/Ceuta",Text:"(UTC+01:00) Ceuta"},{Value:"Europe/Copenhagen",Text:"(UTC+01:00) Copenhagen"},{Value:"Europe/Gibraltar",Text:"(UTC+01:00) Gibraltar"},{Value:"Africa/Lagos",Text:"(UTC+01:00) Lagos"},{Value:"Europe/Luxembourg",Text:"(UTC+01:00) Luxembourg"},{Value:"Europe/Madrid",Text:"(UTC+01:00) Madrid"},{Value:"Europe/Malta",Text:"(UTC+01:00) Malta"},{Value:"Europe/Monaco",Text:"(UTC+01:00) Monaco"},{Value:"Africa/Ndjamena",Text:"(UTC+01:00) Ndjamena"},{Value:"Europe/Oslo",Text:"(UTC+01:00) Oslo"},{Value:"Europe/Paris",Text:"(UTC+01:00) Paris"},{Value:"Europe/Rome",Text:"(UTC+01:00) Rome"},{Value:"Europe/Stockholm",Text:"(UTC+01:00) Stockholm"},{Value:"Europe/Tirane",Text:"(UTC+01:00) Tirane"},{Value:"Africa/Tunis",Text:"(UTC+01:00) Tunis"},{Value:"Europe/Vienna",Text:"(UTC+01:00) Vienna"},{Value:"Europe/Warsaw",Text:"(UTC+01:00) Warsaw"},{Value:"Europe/Zurich",Text:"(UTC+01:00) Zurich"},{Value:"Asia/Amman",Text:"(UTC+02:00) Amman"},{Value:"Europe/Athens",Text:"(UTC+02:00) Athens"},{Value:"Asia/Beirut",Text:"(UTC+02:00) Beirut"},{Value:"Europe/Bucharest",Text:"(UTC+02:00) Bucharest"},{Value:"Africa/Cairo",Text:"(UTC+02:00) Cairo"},{Value:"Europe/Chisinau",Text:"(UTC+02:00) Chisinau"},{Value:"Asia/Damascus",Text:"(UTC+02:00) Damascus"},{Value:"Asia/Gaza",Text:"(UTC+02:00) Gaza"},{Value:"Europe/Helsinki",Text:"(UTC+02:00) Helsinki"},{Value:"Asia/Jerusalem",Text:"(UTC+02:00) Jerusalem"},{Value:"Africa/Johannesburg",Text:"(UTC+02:00) Johannesburg"},{Value:"Africa/Khartoum",Text:"(UTC+02:00) Khartoum"},{Value:"Europe/Kiev",Text:"(UTC+02:00) Kiev"},{Value:"Africa/Maputo",Text:"(UTC+02:00) Maputo"},{Value:"Europe/Kaliningrad",Text:"(UTC+02:00) Moscow-01 - Kaliningrad"},{Value:"Asia/Nicosia",Text:"(UTC+02:00) Nicosia"},{Value:"Europe/Riga",Text:"(UTC+02:00) Riga"},{Value:"Europe/Sofia",Text:"(UTC+02:00) Sofia"},{Value:"Europe/Tallinn",Text:"(UTC+02:00) Tallinn"},{Value:"Africa/Tripoli",Text:"(UTC+02:00) Tripoli"},{Value:"Europe/Vilnius",Text:"(UTC+02:00) Vilnius"},{Value:"Africa/Windhoek",Text:"(UTC+02:00) Windhoek"},{Value:"Asia/Baghdad",Text:"(UTC+03:00) Baghdad"},{Value:"Europe/Istanbul",Text:"(UTC+03:00) Istanbul"},{Value:"Europe/Minsk",Text:"(UTC+03:00) Minsk"},{Value:"Europe/Moscow",Text:"(UTC+03:00) Moscow+00 - Moscow"},{Value:"Africa/Nairobi",Text:"(UTC+03:00) Nairobi"},{Value:"Asia/Qatar",Text:"(UTC+03:00) Qatar"},{Value:"Asia/Riyadh",Text:"(UTC+03:00) Riyadh"},{Value:"Antarctica/Syowa",Text:"(UTC+03:00) Syowa"},{Value:"Asia/Tehran",Text:"(UTC+03:30) Tehran"},{Value:"Asia/Baku",Text:"(UTC+04:00) Baku"},{Value:"Asia/Dubai",Text:"(UTC+04:00) Dubai"},{Value:"Indian/Mahe",Text:"(UTC+04:00) Mahe"},{Value:"Indian/Mauritius",Text:"(UTC+04:00) Mauritius"},{Value:"Europe/Samara",Text:"(UTC+04:00) Moscow+01 - Samara"},{Value:"Indian/Reunion",Text:"(UTC+04:00) Reunion"},{Value:"Asia/Tbilisi",Text:"(UTC+04:00) Tbilisi"},{Value:"Asia/Yerevan",Text:"(UTC+04:00) Yerevan"},{Value:"Asia/Kabul",Text:"(UTC+04:30) Kabul"},{Value:"Asia/Aqtau",Text:"(UTC+05:00) Aqtau"},{Value:"Asia/Aqtobe",Text:"(UTC+05:00) Aqtobe"},{Value:"Asia/Ashgabat",Text:"(UTC+05:00) Ashgabat"},{Value:"Asia/Dushanbe",Text:"(UTC+05:00) Dushanbe"},{Value:"Asia/Karachi",Text:"(UTC+05:00) Karachi"},{Value:"Indian/Kerguelen",Text:"(UTC+05:00) Kerguelen"},{Value:"Indian/Maldives",Text:"(UTC+05:00) Maldives"},{Value:"Antarctica/Mawson",Text:"(UTC+05:00) Mawson"},{Value:"Asia/Yekaterinburg",Text:"(UTC+05:00) Moscow+02 - Yekaterinburg"},{Value:"Asia/Tashkent",Text:"(UTC+05:00) Tashkent"},{Value:"Asia/Colombo",Text:"(UTC+05:30) Colombo"},{Value:"Asia/Kolkata",Text:"(UTC+05:30) India Standard Time"},{Value:"Asia/Katmandu",Text:"(UTC+05:45) Katmandu"},{Value:"Asia/Almaty",Text:"(UTC+06:00) Almaty"},{Value:"Asia/Bishkek",Text:"(UTC+06:00) Bishkek"},{Value:"Indian/Chagos",Text:"(UTC+06:00) Chagos"},{Value:"Asia/Dhaka",Text:"(UTC+06:00) Dhaka"},{Value:"Asia/Omsk",Text:"(UTC+06:00) Moscow+03 - Omsk"},{Value:"Asia/Thimphu",Text:"(UTC+06:00) Thimphu"},{Value:"Antarctica/Vostok",Text:"(UTC+06:00) Vostok"},{Value:"Indian/Cocos",Text:"(UTC+06:30) Cocos"},{Value:"Asia/Yangon",Text:"(UTC+06:30) Rangoon"},{Value:"Asia/Bangkok",Text:"(UTC+07:00) Bangkok"},{Value:"Indian/Christmas",Text:"(UTC+07:00) Christmas"},{Value:"Antarctica/Davis",Text:"(UTC+07:00) Davis"},{Value:"Asia/Saigon",Text:"(UTC+07:00) Hanoi"},{Value:"Asia/Hovd",Text:"(UTC+07:00) Hovd"},{Value:"Asia/Jakarta",Text:"(UTC+07:00) Jakarta"},{Value:"Asia/Krasnoyarsk",Text:"(UTC+07:00) Moscow+04 - Krasnoyarsk"},{Value:"Asia/Brunei",Text:"(UTC+08:00) Brunei"},{Value:"Asia/Shanghai",Text:"(UTC+08:00) China Time - Beijing"},{Value:"Asia/Choibalsan",Text:"(UTC+08:00) Choibalsan"},{Value:"Asia/Hong_Kong",Text:"(UTC+08:00) Hong Kong"},{Value:"Asia/Kuala_Lumpur",Text:"(UTC+08:00) Kuala Lumpur"},{Value:"Asia/Macau",Text:"(UTC+08:00) Macau"},{Value:"Asia/Makassar",Text:"(UTC+08:00) Makassar"},{Value:"Asia/Manila",Text:"(UTC+08:00) Manila"},{Value:"Asia/Irkutsk",Text:"(UTC+08:00) Moscow+05 - Irkutsk"},{Value:"Asia/Singapore",Text:"(UTC+08:00) Singapore"},{Value:"Asia/Taipei",Text:"(UTC+08:00) Taipei"},{Value:"Asia/Ulaanbaatar",Text:"(UTC+08:00) Ulaanbaatar"},{Value:"Australia/Perth",Text:"(UTC+08:00) Western Time - Perth"},{Value:"Asia/Pyongyang",Text:"(UTC+08:30) Pyongyang"},{Value:"Asia/Dili",Text:"(UTC+09:00) Dili"},{Value:"Asia/Jayapura",Text:"(UTC+09:00) Jayapura"},{Value:"Asia/Yakutsk",Text:"(UTC+09:00) Moscow+06 - Yakutsk"},{Value:"Pacific/Palau",Text:"(UTC+09:00) Palau"},{Value:"Asia/Seoul",Text:"(UTC+09:00) Seoul"},{Value:"Asia/Tokyo",Text:"(UTC+09:00) Tokyo"},{Value:"Australia/Darwin",Text:"(UTC+09:30) Central Time - Darwin"},{Value:"Antarctica/DumontDUrville",Text:'(UTC+10:00) Dumont D"Urville'},{Value:"Australia/Brisbane",Text:"(UTC+10:00) Eastern Time - Brisbane"},{Value:"Pacific/Guam",Text:"(UTC+10:00) Guam"},{Value:"Asia/Vladivostok",Text:"(UTC+10:00) Moscow+07 - Vladivostok"},{Value:"Pacific/Port_Moresby",Text:"(UTC+10:00) Port Moresby"},{Value:"Pacific / Chuuk",Text:"(UTC+10:00) Truk"},{Value:"Australia/Adelaide",Text:"(UTC+10:30) Central Time - Adelaide"},{Value:"Antarctica/Casey",Text:"(UTC+11:00) Casey"},{Value:"Australia/Hobart",Text:"(UTC+11:00) Eastern Time - Hobart"},{Value:"Australia/Sydney",Text:"(UTC+11:00) Eastern Time - Melbourne, Sydney"},{Value:"Pacific/Efate",Text:"(UTC+11:00) Efate"},{Value:"Pacific/Guadalcanal",Text:"(UTC+11:00) Guadalcanal"},{Value:"Pacific/Kosrae",Text:"(UTC+11:00) Kosrae"},{Value:"Asia/Magadan",Text:"(UTC+11:00) Moscow+08 - Magadan"},{Value:"Pacific / Norfolk",Text:"(UTC+11:00) Norfolk"},{Value:"Pacific/Noumea",Text:"(UTC+11:00) Noumea"},{Value:"Pacific/Pohnpei",Text:"(UTC+11:00) Ponape"},{Value:"Pacific/Funafuti",Text:"(UTC+12:00) Funafuti"},{Value:"Pacific/Kwajalein",Text:"(UTC+12:00) Kwajalein"},{Value:"Pacific/Majuro",Text:"(UTC+12:00) Majuro"},{Value:"Asia/Kamchatka",Text:"(UTC+12:00) Moscow+09 - Petropavlovsk - Kamchatskiy"},{Value:"Pacific / Nauru",Text:"(UTC+12:00) Nauru"},{Value:"Pacific/Tarawa",Text:"(UTC+12:00) Tarawa"},{Value:"Pacific/Wake",Text:"(UTC+12:00) Wake"},{Value:"Pacific/Wallis",Text:"(UTC+12:00) Wallis"},{Value:"Pacific/Auckland",Text:"(UTC+13:00) Auckland"},{Value:"Pacific/Enderbury",Text:"(UTC+13:00) Enderbury"},{Value:"Pacific/Fakaofo",Text:"(UTC+13:00) Fakaofo"},{Value:"Pacific/Fiji",Text:"(UTC+13:00) Fiji"},{Value:"Pacific/Tongatapu",Text:"(UTC+13:00) Tongatapu"},{Value:"Pacific/Apia",Text:"(UTC+14:00) Apia"},{Value:"Pacific/Kiritimati",Text:"(UTC+14:00) Kiritimati"}]},function(e,t){e.exports=r},function(e,t){e.exports=a},function(e,t,i){"use strict";i.d(t,"a",function(){return A});var n=i(0),r=(i.n(n),i(38)),a=(i.n(r),i(12)),s=(i.n(a),i(19)),o=(i.n(s),i(18)),l=(i.n(o),i(4)),c=i(1),p=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),d=this&&this.__decorate||function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},h="e-input-wrapper",u="e-repeat-element",g="e-form-left",v="e-recurrence-count",f="e-hide-recurrence-element",m="e-primary",y={none:"",daily:"days",weekly:"weeks",monthly:"months",yearly:"years"},T={sun:"SU",mon:"MO",tue:"TU",wed:"WE",thu:"TH",fri:"FR",sat:"SA"},w=["e-days","e-non-week","e-end-on","e-interval","e-year-expander","e-month-expander"],D=["e-non-week"],b=["e-days","e-year-expander"],S=["e-days"],C=["e-days","e-non-week","e-year-expander","e-month-expander"],O=["e-end-on-date","e-end-on-count"],E=["e-end-on-date"],x=["e-end-on-count"],A=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.defaultLocale={none:"None",daily:"Daily",weekly:"Weekly",monthly:"Monthly",month:"Month",yearly:"Yearly",never:"Never",until:"Until",count:"Count",first:"First",second:"Second",third:"Third",fourth:"Fourth",last:"Last",repeat:"Repeat",repeatEvery:"Repeat every",on:"Repeat On",end:"End",onDay:"Day",days:"Day(s)",weeks:"Week(s)",months:"Month(s)",years:"Year(s)",every:"every",summaryTimes:"time(s)",summaryOn:"on",summaryUntil:"until",summaryRepeat:"Repeats",summaryDay:"day(s)",summaryWeek:"week(s)",summaryMonth:"month(s)",summaryYear:"year(s)",monthWeek:"Month Week",monthPosition:"Month Position",monthExpander:"Month Expander",yearExpander:"Year Expander",repeatInterval:"Repeat Interval"},n.renderStatus=!1,n.dayButtons=[],n.monthButtons=[],n}return p(t,e),t.prototype.startState=function(e,t,i){this.showFormElement(),this.updateForm(e),this.freshOnEndForm(),this.updateEndOnForm(t),this.selectMonthDay(i),this.updateUntilDate(i),this.onMonthDay.setProperties({checked:!0})},t.prototype.preRender=function(){this.localeObj=new n.L10n(this.getModuleName(),this.defaultLocale,this.locale),this.calendarUtil=i.i(l.e)(this.calendarMode)},t.prototype.applyCustomClass=function(e){e&&i.i(n.addClass)([this.element],e.split(" "))},t.prototype.initialize=function(){i.i(n.addClass)([this.element],"e-"+this.getModuleName()),this.renderComponent(),i.i(n.isNullOrUndefined)(this.value)||""===this.value?(i.i(n.isNullOrUndefined)(this.repeatType.value)||(this.startState(this.repeatType.value.toString().toUpperCase(),this.endTypes[0],this.startDate),this.updateForm(this.repeatType.value.toString())),this.selectedType>0&&this.setProperties({value:this.getRecurrenceRule()},!1)):this.setRecurrenceRule(this.value),this.applyCustomClass(this.cssClass)},t.prototype.triggerChangeEvent=function(){var e=this;if(this.renderStatus){var t=this.getRecurrenceRule();this.trigger("change",{value:t},function(t){return e.setProperties({value:t.value},!1)})}},t.prototype.resetDayButton=function(){[].slice.call(this.element.querySelectorAll(".e-days button")).forEach(function(e){return i.i(n.removeClass)([e],["e-active",m])})},t.prototype.daySelection=function(e){this.resetDayButton();var t=[0,1,2,3,4,5,6];this.rotateArray(t,this.firstDayOfWeek);var r=this.element.querySelector('.e-days button[data-index="'+t.indexOf(e)+'"]');r&&i.i(n.addClass)([r],["e-active",m])},t.prototype.rtlClass=function(e){e?i.i(n.addClass)([this.element],"e-rtl"):i.i(n.removeClass)([this.element],"e-rtl")},t.prototype.updateUntilDate=function(e){var t=new Date(e.getTime());t.setDate(t.getDate()+60),this.untilDateObj.setProperties({value:t})},t.prototype.selectMonthDay=function(e){var t=["sun","mon","tue","wed","thu","fri","sat"];this.monthDate.setProperties({value:this.calendarUtil.getDate(e)}),this.monthWeekDays.setProperties({value:T[t[e.getDay()]]}),this.monthValue.setProperties({value:""+this.calendarUtil.getMonth(e)}),this.monthWeekPos.setProperties({value:this.getDayPosition(e)}),this.daySelection(e.getDay())},t.prototype.updateForm=function(e){var t=this;this.repeatType.setProperties({value:e});var r=this.element.querySelector(".e-end-on");switch("daily"===e?i.i(n.classList)(r,[g],["e-form-right"]):i.i(n.classList)(r,["e-form-right"],[g]),e){case"none":w.forEach(function(e){return i.i(n.addClass)([t.element.querySelector("."+e)],f)});break;case"weekly":D.forEach(function(e){return i.i(n.addClass)([t.element.querySelector("."+e)],f)});break;case"monthly":b.forEach(function(e){return i.i(n.addClass)([t.element.querySelector("."+e)],f)});break;case"yearly":S.forEach(function(e){return i.i(n.addClass)([t.element.querySelector("."+e)],f)});break;case"daily":C.forEach(function(e){return i.i(n.addClass)([t.element.querySelector("."+e)],f)})}},t.prototype.updateEndOnForm=function(e){var t=this;switch(this.endType.setProperties({value:e}),e){case"never":O.forEach(function(e){return i.i(n.addClass)([t.element.querySelector("."+e)],f)});break;case"until":x.forEach(function(e){return i.i(n.addClass)([t.element.querySelector("."+e)],f)});break;case"count":E.forEach(function(e){return i.i(n.addClass)([t.element.querySelector("."+e)],f)})}},t.prototype.freshOnEndForm=function(){var e=this;O.forEach(function(t){var r=e.element.querySelector("."+t);r&&i.i(n.removeClass)([r],f)})},t.prototype.showFormElement=function(){var e=this;w.forEach(function(t){var r=e.element.querySelector("."+t);r&&i.i(n.removeClass)([r],f)})},t.prototype.renderDropdowns=function(){var e=this,t=this;this.repeatType=new r.DropDownList({dataSource:this.getRepeatData(),floatLabelType:"Always",enableRtl:this.enableRtl,index:this.selectedType,fields:{text:"text",value:"value"},placeholder:this.localeObj.getConstant("repeat"),htmlAttributes:{title:this.localeObj.getConstant("repeat")},change:function(i){t.setProperties({selectedType:e.frequencies.indexOf(i.value)},!1),t.element.querySelector(".e-repeat-content").innerHTML=t.localeObj.getConstant(y[i.value]),t.showFormElement(),t.updateForm(i.value),t.resetFormValues(),t.triggerChangeEvent()}}),this.repeatType.appendTo(this.element.querySelector("."+u)),this.endType=new r.DropDownList({dataSource:this.getEndData(),popupWidth:this.getPopupWidth(),floatLabelType:"Always",placeholder:this.localeObj.getConstant("end"),enableRtl:this.enableRtl,index:1,fields:{text:"text",value:"value"},change:function(e){t.freshOnEndForm(),t.updateEndOnForm(e.value),t.resetFormValues(),t.triggerChangeEvent()}}),this.endType.appendTo(this.element.querySelector(".e-end-on-element"));var i=function(i){return new r.DropDownList({dataSource:i,popupWidth:e.getPopupWidth(),enableRtl:e.enableRtl,fields:{text:"text",value:"value"},index:1,change:function(e){t.onWeekDay.setProperties({checked:!0}),t.resetFormValues(),t.triggerChangeEvent()}})};this.monthWeekPos=i(this.getMonthPosData()),this.monthWeekPos.appendTo(this.element.querySelector(".e-month-pos")),this.monthWeekDays=i(this.getDayData("wide")),this.monthWeekDays.appendTo(this.element.querySelector(".e-month-week")),this.monthValue=new r.DropDownList({dataSource:this.getMonthData(),fields:{text:"text",value:"value"},enableRtl:this.enableRtl,index:7,change:function(e){t.resetFormValues(),t.triggerChangeEvent()}}),this.monthValue.appendTo(this.element.querySelector(".e-year-expander-element"))},t.prototype.setDefaultValue=function(){for(var e=[].slice.call(this.element.querySelectorAll(".e-control .e-numerictextbox")),t=0,i=e;t<i.length;t++){var n=i[t],r=n.ej2_instances[0];r.element.classList.contains("e-repeat-interval")?(r.value=1,r.dataBind()):r.element.classList.contains(v)&&(r.value=10,r.dataBind())}},t.prototype.resetFormValues=function(){for(var e=[].slice.call(this.element.querySelectorAll('.e-control [type="text"]')),t=0,i=e;t<i.length;t++){var n=i[t],r=void 0;if(n.classList.contains("e-datepicker"))r=n.ej2_instances[0],r.value?(r.value=r.value,r.dataBind()):this.updateUntilDate(this.startDate);else if(n.classList.contains("e-dropdownlist"))r=n.ej2_instances[0],r.index=r.index||0,r.dataBind();else if(n.classList.contains("e-numerictextbox")){r=n.ej2_instances[0];var a=void 0;a=r.element.classList.contains("e-repeat-interval")?1:r.element.classList.contains(v)?10:this.startDate.getDate(),r.value=r.value||a,r.dataBind()}}},t.prototype.getPopupWidth=function(){return n.Browser.isDevice?"100%":"auto"},t.prototype.renderDatePickers=function(){var e=this;this.untilDateObj=new s.DatePicker({firstDayOfWeek:this.firstDayOfWeek,enableRtl:this.enableRtl,locale:this.locale,min:this.minDate,max:this.maxDate,format:i.i(n.isNullOrUndefined)(this.dateFormat)?this.getFormat("dateFormats"):this.dateFormat,change:function(t){t.value&&e.triggerChangeEvent()}}),this.untilDateObj.appendTo(this.element.querySelector(".e-until-date"))},t.prototype.getFormat=function(e){return"en"===this.locale||"en-US"===this.locale?i.i(n.getValue)(e+".short",i.i(n.getDefaultDateObject)(this.getCalendarMode())):i.i(n.getValue)("main."+this.locale+".dates.calendars."+this.getCalendarMode()+"."+e+".short",n.cldrData)},t.prototype.dayButtonRender=function(){for(var e=this,t=[].slice.call(this.element.querySelectorAll(".e-days button")),r=this,a=0,s=t;a<s.length;a++){var l=s[a],c=new o.Button({isToggle:!0,enableRtl:this.enableRtl},l);this.dayButtons.push(c),n.EventHandler.add(l,"click",function(t){var a=[].slice.call(e.element.querySelectorAll(".e-days button."+m)),s=t.target;s.classList.contains(m)?a.length>1&&(i.i(n.removeClass)([s],m),r.triggerChangeEvent()):(i.i(n.addClass)([s],m),r.triggerChangeEvent())})}},t.prototype.radioButtonRender=function(){var e=this;this.onMonthDay=new o.RadioButton({label:this.localeObj.getConstant("onDay"),enableRtl:this.enableRtl,name:"monthType",value:"day",change:function(){e.resetFormValues(),e.triggerChangeEvent()}}),this.onMonthDay.appendTo(this.element.querySelector(".e-month-expander-element")),this.monthButtons.push(this.onMonthDay),this.onWeekDay=new o.RadioButton({label:this.localeObj.getConstant("monthExpander"),cssClass:"e-month-type",name:"monthType",enableRtl:this.enableRtl,value:"daypos",change:function(){e.resetFormValues(),e.triggerChangeEvent()}}),this.onWeekDay.appendTo(this.element.querySelector(".e-month-expander-wrapper")),this.monthButtons.push(this.onWeekDay)},t.prototype.numericTextboxRender=function(){var e=this;this.recurrenceCount=new a.NumericTextBox({value:10,format:"#",enableRtl:this.enableRtl,min:1,max:999,change:function(){e.triggerChangeEvent()}}),this.recurrenceCount.appendTo(this.element.querySelector("."+v)),this.monthDate=new a.NumericTextBox({value:1,format:"#",enableRtl:this.enableRtl,min:1,max:31,change:function(){e.onMonthDay.setProperties({checked:!0}),e.triggerChangeEvent()}}),this.monthDate.appendTo(this.element.querySelector(".e-month-day")),this.repeatInterval=new a.NumericTextBox({value:1,format:"#",min:1,max:999,enableRtl:this.enableRtl,floatLabelType:"Always",placeholder:this.localeObj.getConstant("repeatEvery"),change:function(){e.triggerChangeEvent()}}),this.repeatInterval.appendTo(this.element.querySelector(".e-repeat-interval"))},t.prototype.renderComponent=function(){this.setTemplate(),this.renderDropdowns(),this.renderDatePickers(),this.dayButtonRender(),this.radioButtonRender(),this.numericTextboxRender()},t.prototype.rotateArray=function(e,t){for(var i,n=0;n<t;n++)i=e.shift(),e.push(i)},t.prototype.getEndData=function(){var e=this,t=[];return this.endTypes.forEach(function(i){t.push({text:e.localeObj.getConstant(i),value:i})}),t},t.prototype.getDayPosition=function(e){var t=new Date(e.getTime()),i=new Date(e.getTime()),n=e.getDay(),r=[];for(t=this.calendarUtil.getMonthStartDate(t),i=this.calendarUtil.getMonthEndDate(i);t<i;)t.getDay()===n&&r.push(t.getTime()),t.setDate(t.getDate()+1);return r.indexOf(e.getTime())===r.length-1?-1:r.indexOf(e.getTime())+1},t.prototype.getRepeatData=function(){var e=[],t=this;return this.frequencies.forEach(function(i){var n="none"===i?"never":i;e.push({text:t.localeObj.getConstant(n),value:i})}),e},t.prototype.getMonthPosData=function(){var e=["first","second","third","fourth","last"],t={first:1,second:2,third:3,fourth:4,last:-1},i=this,n=[];return e.forEach(function(e){n.push({text:i.localeObj.getConstant(e),value:t[""+e]})}),n},t.prototype.getDayData=function(e){var t,r=["sun","mon","tue","wed","thu","fri","sat"],a=[];if(this.rotateArray(r,this.firstDayOfWeek),"en"===this.locale||"en-US"===this.locale){var s="days.stand-alone.";t=i.i(n.getValue)(s+e,i.i(n.getDefaultDateObject)(this.getCalendarMode()))}else{var s="main."+this.locale+".dates.calendars."+this.getCalendarMode()+".days.stand-alone."+e;t=i.i(n.getValue)(s,n.cldrData)}for(var o=0,l=r;o<l.length;o++){var p=l[o],d=i.i(n.getValue)(p,t);a.push({text:"narrow"===e?d:i.i(c.a)(d,"single"),value:T[""+p]})}return a},t.prototype.getMonthData=function(){var e,t=[];if("en"===this.locale||"en-US"===this.locale){var r="months.stand-alone.wide";e=i.i(n.getValue)(r,i.i(n.getDefaultDateObject)(this.getCalendarMode()))}else{var r="main."+this.locale+".dates.calendars."+this.getCalendarMode()+".months.stand-alone.wide";e=i.i(n.getValue)(r,n.cldrData)}for(var a=0,s=Object.keys(e);a<s.length;a++){var o=s[a];t.push({text:i.i(c.a)(i.i(n.getValue)(o,e),"single"),value:o})}return t},t.prototype.setTemplate=function(){var e=this.getDayData("narrow"),t=this.getDayData("wide");this.element.innerHTML='<div class="e-editor"><div class="e-input-wrapper e-form-left"><input type="text" tabindex="0" class="'+u+'"label="'+u.substr(2)+'" /></div><div class="'+h+' e-interval e-form-right"><table class="e-recurrence-table e-repeat-content-wrapper" role="none"><tr><td><input type="text" tabindex="0" id="'+this.element.id+'_e-repeat-interval" class="e-repeat-interval"title="'+this.localeObj.getConstant("repeatEvery")+'" /></td><td><span class="e-repeat-content"></span></td></tr></table></div><div class="e-input-wrapper-side e-days '+g+'"><div class=e-week-expander-label>'+this.localeObj.getConstant("on")+'</div><button type="button" class="e-round" data-index="0" title="'+t[0].text+'">'+e[0].text+'</button><button type="button" class="e-round" data-index="1" title="'+t[1].text+'">'+e[1].text+'</button><button type="button" class="e-round" data-index="2" title="'+t[2].text+'">'+e[2].text+'</button><button type="button" class="e-round" data-index="3" title="'+t[3].text+'">'+e[3].text+'</button><button type="button" class="e-round" data-index="4" title="'+t[4].text+'">'+e[4].text+'</button><button type="button" class="e-round" data-index="5" title="'+t[5].text+'">'+e[5].text+'</button><button type="button" class="e-round" data-index="6" title="'+t[6].text+'">'+e[6].text+'</button></div><div class="e-input-wrapper-side e-non-week '+g+'"><div class=e-month-expander-label>'+this.localeObj.getConstant("on")+'</div><div class="e-year-expander"><input class="e-year-expander-element" type="text" tabindex="0" title="'+this.localeObj.getConstant("yearExpander")+'"/></div><div class="e-month-expander"><table class="e-recurrence-table e-month-expand-wrapper" role="none"><tr><td><div class="'+h+' e-month-expander-checkbox-wrapper"><input class="e-month-expander-element"title="'+this.localeObj.getConstant("monthExpander")+'" type="radio"></div></td><td colspan="2"><div class="'+h+' e-monthday-element"><input type="text" tabindex="0" id="'+this.element.id+'_e-month-day" class="e-month-day"title="'+this.localeObj.getConstant("on")+'" /></div></td></tr><tr><td><div class="'+h+' e-month-expander-checkbox-wrapper" style="min-width: 30px;margin-bottom:18px;"><input class="e-month-expander-wrapper"title="'+this.localeObj.getConstant("monthExpander")+'" type="radio"></div></td><td><div class="'+h+' e-week-position" ><input type="text" tabindex="0" class="e-month-pos"title="'+this.localeObj.getConstant("monthPosition")+'" /></div></td><td><div class="'+h+' e-day-position"><input type="text" tabindex="0" class="e-month-week"title="'+this.localeObj.getConstant("monthWeek")+'" /></div></td></tr></table></div></div><div class="e-input-wrapper-side e-end-on e-form-right"><div class="'+h+' e-end-on-left"><input type="text" tabindex="0" class="e-end-on-element"title="'+this.localeObj.getConstant("end")+'" /></div><div class="'+h+' e-end-on-date" ><input type="text" tabindex="0" class="e-until-date"title="'+this.localeObj.getConstant("until")+'" /></div><div class="'+h+' e-end-on-count"><input type="text" tabindex="0" id="'+this.element.id+"_"+v+'" class="'+v+'"title="'+this.localeObj.getConstant("count")+'" /></div></div></div></div>'},t.prototype.getSelectedDaysData=function(){var e="BYDAY=",t=[].slice.call(this.element.querySelectorAll(".e-days button."+m)),i=["SU","MO","TU","WE","TH","FR","SA"];this.rotateArray(i,this.firstDayOfWeek);for(var n=0;n<t.length;n++)e+=i[parseInt(t[parseInt(n.toString(),10)].getAttribute("data-index"),10)]+(n===t.length-1?"":",");return e+";"},t.prototype.getSelectedMonthData=function(){return this.onWeekDay.checked?"BYDAY="+this.monthWeekDays.value+";BYSETPOS="+this.monthWeekPos.value+";":"BYMONTHDAY="+this.monthDate.value+";"},t.prototype.getIntervalData=function(){return"INTERVAL="+this.repeatInterval.value+";"},t.prototype.getEndOnCount=function(){return"COUNT="+this.recurrenceCount.value+";"},t.prototype.getYearMonthRuleData=function(){return"BYMONTH="+this.monthValue.value+";"},t.prototype.updateWeekButton=function(e){var t=["SU","MO","TU","WE","TH","FR","SA"];this.rotateArray(t,this.firstDayOfWeek);for(var i=0,n=this.dayButtons;i<n.length;i++){var r=n[i],a=parseInt(r.element.getAttribute("data-index"),10);-1!==e.indexOf(t[parseInt(a.toString(),10)])?r.setProperties({isPrimary:!0}):r.setProperties({isPrimary:!1})}},t.prototype.updateMonthUI=function(){if(this.ruleObject.monthDay.length)this.monthDate.setProperties({value:this.ruleObject.monthDay[0]}),this.onMonthDay.setProperties({checked:!0});else{this.onWeekDay.setProperties({checked:!0}),this.monthWeekPos.setProperties({value:this.ruleObject.setPosition});for(var e=0,t=Object.keys(T);e<t.length;e++){var i=t[e];if(T[""+i]===this.ruleObject.day[0]){this.monthWeekDays.setProperties({value:this.ruleObject.day[0]});break}}}},t.prototype.updateUI=function(e,t){switch(this.repeatInterval.setProperties({value:this.ruleObject.interval}),t){case"until":this.untilDateObj.setProperties({value:this.ruleObject.until});break;case"count":this.recurrenceCount.setProperties({value:this.ruleObject.count})}switch(e){case"weekly":this.updateWeekButton(this.ruleObject.day);break;case"yearly":this.monthValue.setProperties({index:this.ruleObject.month[0]-1}),this.updateMonthUI();break;case"monthly":this.updateMonthUI()}},t.prototype.getUntilData=function(){return this.untilDateObj.value?"UNTIL="+i.i(l.f)(this.untilDateObj.value)+";":""},t.prototype.destroyComponents=function(){this.recurrenceCount.isDestroyed||(this.recurrenceCount.destroy(),this.recurrenceCount=null),this.monthDate.isDestroyed||(this.monthDate.destroy(),this.monthDate=null),this.repeatInterval.isDestroyed||(this.repeatInterval.destroy(),this.repeatInterval=null),this.untilDateObj.isDestroyed||(this.untilDateObj.destroy(),this.untilDateObj=null),this.repeatType.isDestroyed||(this.repeatType.destroy(),this.repeatType=null),this.endType.isDestroyed||(this.endType.destroy(),this.endType=null),this.monthWeekPos.isDestroyed||(this.monthWeekPos.destroy(),this.monthWeekPos=null),this.monthWeekDays.isDestroyed||(this.monthWeekDays.destroy(),this.monthWeekDays=null),this.monthValue.isDestroyed||(this.monthValue.destroy(),this.monthValue=null),this.onMonthDay.isDestroyed||(this.onMonthDay.destroy(),this.onMonthDay=null),this.onWeekDay.isDestroyed||(this.onWeekDay.destroy(),this.onWeekDay=null),this.dayButtons.forEach(function(e){e.isDestroyed||e.destroy()}),this.dayButtons=[],this.monthButtons.forEach(function(e){e.isDestroyed||e.destroy()}),this.monthButtons=[]},t.prototype.resetFields=function(){this.startState("none",this.endTypes[0],this.startDate),this.setDefaultValue()},t.prototype.updateRuleUntilDate=function(e){if(this.untilDateObj.value&&e){var t=this.untilDateObj.value,i=new Date(t.getFullYear(),t.getMonth(),t.getDate(),e.getHours(),e.getMinutes(),e.getMilliseconds());this.untilDateObj.setProperties({value:i})}},t.prototype.getCalendarMode=function(){return this.calendarMode.toLowerCase()},t.prototype.getRuleSummary=function(e){return void 0===e&&(e=this.getRecurrenceRule()),i.i(l.a)(e,this.localeObj,this.locale,this.calendarMode)},t.prototype.getRecurrenceDates=function(e,t,r,a,s){return s=i.i(n.isNullOrUndefined)(s)?this.startDate:s,i.i(l.b)(e,t,r,this.firstDayOfWeek,a,s,this.calendarMode)},t.prototype.getRecurrenceRule=function(){var e="FREQ=";switch(this.repeatType.value){case"daily":e+="DAILY;";break;case"weekly":e+="WEEKLY;"+this.getSelectedDaysData();break;case"monthly":e+="MONTHLY;"+this.getSelectedMonthData();break;case"yearly":e+="YEARLY;"+this.getSelectedMonthData()+this.getYearMonthRuleData();break;case"none":return""}switch(e+=this.getIntervalData(),this.endType.value){case"until":e+=this.getUntilData();break;case"count":e+=this.getEndOnCount()}return e},t.prototype.setRecurrenceRule=function(e,t){if(void 0===t&&(t=this.startDate),!e)return void this.repeatType.setProperties({value:"none"});this.renderStatus=!1,this.ruleObject=i.i(l.d)(e);var n=this.ruleObject.count?"count":this.ruleObject.until?"until":"never";switch(this.ruleObject.freq){case"DAILY":this.startState("daily",n,t),this.updateUI("daily",n);break;case"WEEKLY":this.startState("weekly",n,t),this.updateUI("weekly",n);break;case"MONTHLY":this.startState("monthly",n,t),this.updateUI("monthly",n);break;case"YEARLY":this.startState("yearly",n,t),this.updateUI("yearly",n)}this.renderStatus=!0,this.triggerChangeEvent()},t.prototype.detachInputs=function(){for(var e=[].slice.call(this.element.querySelectorAll("input")),t=0,r=e;t<r.length;t++){var a=r[t];i.i(n.detach)(a)}},t.prototype.destroy=function(){if(!this.isDestroyed){this.destroyComponents(),e.prototype.destroy.call(this);var t=["e-"+this.getModuleName()];for(this.cssClass&&(t=t.concat(this.cssClass.split(" "))),i.i(n.removeClass)([this.element],t),this.detachInputs();this.element.firstElementChild;)this.element.removeChild(this.element.firstElementChild)}},t.prototype.getModuleName=function(){return"recurrenceeditor"},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.render=function(){this.initialize(),this.rtlClass(this.enableRtl),this.renderStatus=!0,this.renderComplete()},t.prototype.onPropertyChanged=function(e,t){for(var r=0,a=Object.keys(e);r<a.length;r++){switch(a[r]){case"startDate":this.selectMonthDay(e.startDate),this.updateUntilDate(e.startDate),this.endType.setProperties({index:0});break;case"enableRtl":this.rtlClass(e.enableRtl);break;case"cssClass":t.cssClass&&i.i(n.removeClass)([this.element],t.cssClass.split(" ")),e.cssClass&&i.i(n.addClass)([this.element],e.cssClass.split(" "));break;case"selectedType":this.repeatType.setProperties({index:this.selectedType});break;case"minDate":this.untilDateObj.setProperties({minDate:this.minDate});break;case"maxDate":this.untilDateObj.setProperties({maxDate:this.maxDate});break;case"value":this.getRecurrenceRule()!==this.value&&this.setRecurrenceRule(this.value);break;case"calendarMode":this.calendarMode=e.calendarMode,this.calendarUtil=i.i(l.e)(e.calendarMode);break;case"locale":case"frequencies":case"firstDayOfWeek":case"endTypes":this.refresh();break;case"dateFormat":this.untilDateObj.setProperties({format:e.dateFormat})}}},d([i.i(n.Property)(["none","daily","weekly","monthly","yearly"])],t.prototype,"frequencies",void 0),d([i.i(n.Property)(["never","until","count"])],t.prototype,"endTypes",void 0),d([i.i(n.Property)(0)],t.prototype,"firstDayOfWeek",void 0),d([i.i(n.Property)(new Date)],t.prototype,"startDate",void 0),d([i.i(n.Property)()],t.prototype,"dateFormat",void 0),d([i.i(n.Property)("Gregorian")],t.prototype,"calendarMode",void 0),d([i.i(n.Property)()],t.prototype,"cssClass",void 0),d([i.i(n.Property)()],t.prototype,"value",void 0),d([i.i(n.Property)(new Date(1900,0,1))],t.prototype,"minDate",void 0),d([i.i(n.Property)(new Date(2099,11,31))],t.prototype,"maxDate",void 0),d([i.i(n.Property)(0)],t.prototype,"selectedType",void 0),d([i.i(n.Event)()],t.prototype,"change",void 0),t=d([n.NotifyPropertyChanges],t)}(n.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(0),r=(i.n(n),i(3)),a=i(1),s=function(){function e(e){this.daysVariation=0,this.parent=e,this.actionObj={X:0,Y:0,groupIndex:0,cellWidth:0,cellHeight:0,slotInterval:0,interval:0,actionIndex:0,cloneElement:[],originalElement:[],action:null,isAllDay:null,excludeSelectors:null,index:0,navigationInterval:null,scrollInterval:null},this.scrollArgs={element:null,width:0,height:0},this.resizeEdges={left:!1,right:!1,top:!1,bottom:!1},this.scrollEdges={left:!1,right:!1,top:!1,bottom:!1}}return e.prototype.getChangedData=function(e){var t=this,r=i.i(n.extend)({},this.actionObj.event,null,!0);if(r[this.parent.eventFields.startTime]=this.actionObj.start,r[this.parent.eventFields.endTime]=this.actionObj.end,i.i(n.isNullOrUndefined)(this.actionObj.isAllDay)||(r[this.parent.eventFields.isAllDay]=this.actionObj.isAllDay),this.parent.activeViewOptions.group.resources.length>0){var a=this.getOriginalElement(this.actionObj.element);if(a){var s=a.map(function(e){return parseInt(e.getAttribute("data-group-index"),10)});if(-1===s.indexOf(this.actionObj.groupIndex)||!i.i(n.isNullOrUndefined)(e)&&e.length>0){var o=parseInt(this.actionObj.clone.getAttribute("data-group-index"),10);s=s.filter(function(e){return e!==o}),s.push(this.actionObj.groupIndex),e&&e.length>0?e.forEach(function(e){t.parent.resourceBase.getResourceData(e,t.actionObj.groupIndex,s)}):this.parent.resourceBase.getResourceData(r,this.actionObj.groupIndex,s)}}}return r},e.prototype.saveChangedData=function(e,t){void 0===t&&(t=!1),this.parent.activeEventData.event=this.actionObj.event,this.parent.currentAction="Save";var i,n=[e.data];t&&(n=e.selectedData);for(var r=0,a=n;r<a.length;r++){var s=a[r],o=!(this.parent.activeViewOptions.group.resources.length>0)||parseInt(this.actionObj.element.getAttribute("data-group-index"),10)===this.actionObj.groupIndex;if(+s[this.parent.eventFields.startTime]==+this.actionObj.event[this.parent.eventFields.startTime]&&+s[this.parent.eventFields.endTime]==+this.actionObj.event[this.parent.eventFields.endTime]&&o)return void(this.parent.crudModule.crudObj.isCrudAction=!1);if(s[this.parent.eventFields.recurrenceRule]){var l=s[this.parent.eventFields.recurrenceID]||s[this.parent.eventFields.id];if(s[this.parent.eventFields.id]===s[this.parent.eventFields.recurrenceID]&&(s[this.parent.eventFields.id]=this.parent.eventBase.getEventMaxID(),i="EditOccurrence"),this.parent.enableRecurrenceValidation&&this.parent.eventWindow.editOccurrenceValidation(l,s,this.actionObj.event))return}else i=null;(s[this.parent.eventFields.startTimezone]||s[this.parent.eventFields.endTimezone])&&this.parent.eventBase.timezoneConvert(s),this.parent.crudModule.saveEvent(s,i)}},e.prototype.calculateIntervalTime=function(e){var t=new Date(+e);return t.setMinutes(Math.floor(t.getMinutes()/this.actionObj.interval)*this.actionObj.interval),t},e.prototype.getContentAreaDimension=function(){var e=this.parent.element.querySelector("."+r.g),t=[].slice.call(e.querySelector("tr").children);this.parent.activeView.isTimelineView()||!(this.parent.activeViewOptions.group.resources.length>0)||this.parent.isAdaptive||this.parent.enableAdaptiveUI||this.parent.virtualScrollModule||(t=this.getResourceElements(t));var i=t[0].getBoundingClientRect(),n=t.slice(-1)[0].getBoundingClientRect();return{bottom:e.scrollHeight-5,left:this.parent.enableRtl?n.left:i.left,right:this.parent.enableRtl?i.right:n.right,top:0,leftOffset:this.parent.enableRtl?n.right:i.right,rightOffset:this.parent.enableRtl?i.left:n.left}},e.prototype.getIndex=function(e){var t=[].slice.call(this.parent.getContentTable().querySelector("tr").children),i={minIndex:0,maxIndex:t.length-1};if("resize"===this.actionObj.action&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&!this.parent.activeView.isTimelineView()){var n=this.getResourceElements(t);i.minIndex=n[0].cellIndex,i.maxIndex=n.slice(-1)[0].cellIndex}return e<i.minIndex&&(e=i.minIndex),e>i.maxIndex&&(e=i.maxIndex),e},e.prototype.updateTimePosition=function(e,t){for(var a=0,s=0,o=this.actionObj.cloneElement;s<o.length;s++){var l=o[s],c=l.querySelector("."+r.I);if(c){var p=this.actionObj.start,d=this.actionObj.end;t&&t.length>0&&(p=t[parseInt(a.toString(),10)][this.parent.eventFields.startTime],d=t[parseInt(a.toString(),10)][this.parent.eventFields.endTime]),c.innerHTML=this.parent.getTimeString(p)+" - "+this.parent.getTimeString(d)}a++}if(this.parent.activeViewOptions.timeScale.enable&&this.parent.isAdaptive&&"Month"!==this.parent.currentView&&"TimelineMonth"!==this.parent.currentView){var h=this.parent.element.querySelector("."+r._81);if(!h){h=i.i(n.createElement)("div",{className:r._81});var u=this.parent.activeView.isTimelineView()?r.d:r._29;this.parent.element.querySelector("."+u).appendChild(h)}h.innerHTML=this.parent.getTimeString(e);var g=0;if(this.parent.activeView.isTimelineView())if(this.parent.enableRtl){var v=parseInt(this.actionObj.clone.style.right,10);g="drag"===this.actionObj.action||this.resizeEdges.left?v+this.actionObj.clone.offsetWidth:v,h.style.right=i.i(n.formatUnit)(g)}else{var f=parseInt(this.actionObj.clone.style.left,10);g="drag"===this.actionObj.action||this.resizeEdges.left?f:f+this.actionObj.clone.offsetWidth,h.style.left=i.i(n.formatUnit)(g)}else g="drag"===this.actionObj.action||this.resizeEdges.top?this.actionObj.clone.offsetTop:this.actionObj.clone.offsetTop+this.actionObj.clone.offsetHeight,h.style.top=i.i(n.formatUnit)(g)}},e.prototype.getResourceElements=function(e){var t=this;return e.filter(function(e){return parseInt(e.getAttribute("data-group-index"),10)===t.actionObj.groupIndex})},e.prototype.getOriginalElement=function(e){var t,a=e.getAttribute("data-guid");if(e.offsetParent&&e.offsetParent.classList.contains(r._77)||this.parent.activeView.isTimelineView()||"resize"!==this.actionObj.action&&this.parent.virtualScrollModule)t=[].slice.call(this.parent.element.querySelectorAll('[data-guid="'+a+'"]'));else{var s=i.i(n.closest)(e,"tr");s&&(t=[].slice.call(s.querySelectorAll('[data-guid="'+a+'"]')))}return t},e.prototype.createCloneElement=function(e){var t=i.i(n.createElement)("div",{innerHTML:e.outerHTML}),a=t.children[0],s=[r._80];s.push("drag"===this.actionObj.action?r._0:r._1),"Month"!==this.parent.currentView&&"TimelineMonth"!==this.parent.currentView||s.push(r._82),i.i(n.addClass)([a],s),i.i(n.addClass)([e],r._78),i.i(n.isNullOrUndefined)(e.parentElement)||e.parentElement.appendChild(a),a.style.width=i.i(n.formatUnit)(a.offsetWidth-2);var o=document.querySelector(this.parent.eventDragArea);return this.parent.eventDragArea&&"drag"===this.actionObj.action&&o&&o.appendChild(a),i.i(n.setStyleAttribute)(a,{border:"0px"}),a},e.prototype.removeCloneElementClasses=function(){var e=this.actionObj.originalElement;"Month"!==this.parent.currentView&&"TimelineYear"!==this.parent.currentView&&"Day"!==this.parent.currentView&&"Week"!==this.parent.currentView&&"WorkWeek"!==this.parent.currentView||(e=[].slice.call(this.parent.element.querySelectorAll("."+r._78))),i.i(n.removeClass)(e,r._78)},e.prototype.removeCloneElement=function(){this.actionObj.originalElement=[];for(var e=[].slice.call(this.parent.element.querySelectorAll(".e-dynamic-clone")),t=0,a=e;t<a.length;t++){var s=a[t];i.i(n.remove)(s)}for(var o=0,l=this.actionObj.cloneElement;o<l.length;o++){var c=l[o];i.i(n.isNullOrUndefined)(c.parentNode)||i.i(n.remove)(c)}this.actionObj.cloneElement=[];var p=this.parent.element.querySelector("."+r._81);p&&i.i(n.remove)(p)},e.prototype.getCursorElement=function(e){var t=this.parent.eventBase.getPageCoordinates(e);return document.elementFromPoint(t.clientX,t.clientY)},e.prototype.autoScroll=function(){var e=this.parent.element.querySelector("."+r.g),t=e.offsetHeight<=e.scrollHeight,i=e.offsetWidth<=e.scrollWidth,n=t&&e.scrollTop>=0&&e.scrollTop+e.offsetHeight<=e.scrollHeight,a=i&&e.scrollLeft>=0&&e.scrollLeft+e.offsetWidth<=e.scrollWidth;if("resize"===this.actionObj.action&&this.scrollEdges.right&&e.scrollLeft+e.offsetWidth>e.scrollWidth){var s=[].slice.call(this.parent.getContentTable().querySelector("tr").children).length-1;a=Math.ceil((this.actionObj.clone.offsetLeft+this.actionObj.clone.offsetWidth)/this.actionObj.cellWidth)===s}n&&(this.scrollEdges.top||this.scrollEdges.bottom)&&(e.scrollTop+=this.scrollEdges.top?-this.actionObj.scroll.scrollBy:this.actionObj.scroll.scrollBy,"resize"===this.actionObj.action&&e.scrollHeight!==e.offsetHeight+e.scrollTop&&e.scrollTop>0&&(this.actionObj.Y+=this.scrollEdges.top?this.actionObj.scroll.scrollBy:-this.actionObj.scroll.scrollBy)),a&&(this.scrollEdges.left||this.scrollEdges.right)&&(e.scrollLeft+=this.scrollEdges.left?-this.actionObj.scroll.scrollBy:this.actionObj.scroll.scrollBy,"resize"===this.actionObj.action&&e.scrollWidth!==e.offsetWidth+e.scrollLeft&&e.scrollLeft>0&&(this.actionObj.X+=this.scrollEdges.left?this.actionObj.scroll.scrollBy:-this.actionObj.scroll.scrollBy))},e.prototype.autoScrollValidation=function(){if(!this.actionObj.scroll.enable)return!1;var e=this.parent.boundaryValidation(this.actionObj.pageY,this.actionObj.pageX);return this.scrollEdges=e,e.bottom||e.top||e.left||e.right},e.prototype.actionClass=function(e){"addClass"===e?i.i(n.addClass)([this.parent.element],r._78):i.i(n.removeClass)([this.parent.element],r._78)},e.prototype.updateScrollPosition=function(e){var t=this;this.scrollEventArgs=e,this.actionObj.scroll.enable&&i.i(n.isNullOrUndefined)(this.actionObj.scrollInterval)&&(this.actionObj.scrollInterval=window.setInterval(function(){if(t.autoScrollValidation()&&!t.actionObj.clone.classList.contains(r._31)){if(t.parent.activeView.isTimelineView()&&t.parent.activeViewOptions.group.resources.length>0&&t.actionObj.groupIndex<0)return;t.autoScroll(),"drag"===t.actionObj.action?t.parent.dragAndDropModule.updateDraggingDateTime(t.scrollEventArgs):t.parent.resizeModule.updateResizingDirection(t.scrollEventArgs)}},this.actionObj.scroll.timeDelay))},e.prototype.updateOriginalElement=function(e){var t='[data-id="'+e.getAttribute("data-id")+'"]';this.parent.activeViewOptions.group.resources.length>0&&(t=t.concat('[data-group-index = "'+e.getAttribute("data-group-index")+'"]'));var a=[].slice.call(this.parent.element.querySelectorAll(t));i.i(n.addClass)(a,r._78);var s=[].slice.call(this.parent.element.querySelectorAll("."+r._80));i.i(n.removeClass)(s,r._78)},e.prototype.getUpdatedEvent=function(e,t,i){var n=JSON.parse(JSON.stringify(i));return n[this.parent.eventFields.startTime]=e,n[this.parent.eventFields.endTime]=t,n},e.prototype.dynamicYearlyEventsRendering=function(e,t){if(void 0===t&&(t=!1),i.i(n.isNullOrUndefined)(this.parent.eventDragArea)){var s=this.actionObj.cellWidth-7;if(t&&(this.resizeEdges.left||this.resizeEdges.right)&&(s=this.actionObj.cellWidth*e.count),!t&&"Horizontal"===this.parent.activeViewOptions.orientation&&0===this.parent.activeViewOptions.group.resources.length){var o=this.yearEvent.isSpannedEvent(e,e[this.parent.eventFields.startTime]);o[this.parent.eventFields.startTime].getTime()===o[this.parent.eventFields.endTime].getTime()&&(o.isSpanned.count=1),s=o.isSpanned.count*this.actionObj.cellWidth}if(!t&&"Vertical"===this.parent.activeViewOptions.orientation&&0!==this.parent.activeViewOptions.group.resources.length){var o=this.yearEvent.isSpannedEvent(e,e[this.parent.eventFields.startTime]);s=o.isSpanned.count*this.actionObj.cellWidth}var l=this.createAppointmentElement(this.actionObj.groupIndex,e[this.parent.eventFields.subject]);l.setAttribute("drag","true"),i.i(n.addClass)([l],r._80),i.i(n.setStyleAttribute)(l,{width:s+"px",border:"0px","pointer-events":"none",position:"absolute",overflow:"hidden",padding:"3px"}),""!==this.actionObj.clone.style.backgroundColor&&i.i(n.setStyleAttribute)(l,{backgroundColor:this.actionObj.clone.style.backgroundColor});var c=a.b(e[this.parent.eventFields.startTime]).getTime(),p="."+r.n+'[data-date="'+c+'"]';this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(p="."+r.n+'[data-date="'+c+'"][data-group-index="'+this.actionObj.groupIndex+'"]');var d=this.parent.element.querySelector(p);if(!i.i(n.isNullOrUndefined)(d)){if(t){var h=d.querySelector("."+r.o),u=this.actionObj.cellHeight*e.count-(h?h.offsetHeight:0)-7;(this.resizeEdges.right||this.resizeEdges.left)&&(u=parseInt(this.actionObj.clone.style.height,10)),i.i(n.setStyleAttribute)(l,{height:u+"px"})}this.renderDynamicElement(d,l,!0),this.actionObj.cloneElement.push(l)}}},e.prototype.renderDynamicElement=function(e,t,a){if(void 0===a&&(a=!1),e.querySelector("."+r.D))e.querySelector("."+r.D).appendChild(t);else{var s=i.i(n.createElement)("div",{className:r.D});s.appendChild(t),e.appendChild(s)}},e.prototype.createAppointmentElement=function(e,t){var a=i.i(n.createElement)("div",{className:r.A,innerHTML:t});return this.parent.activeViewOptions.group.resources.length>0&&a.setAttribute("data-group-index",e.toString()),a},e.prototype.dynamicEventsRendering=function(e){var t=this;if(i.i(n.isNullOrUndefined)(this.parent.eventDragArea)){var s,o=this.parent.activeView.renderDates,l=[].slice.call(this.parent.element.querySelectorAll("."+r.n)),c=this.parent.activeViewOptions.workDays;if(this.parent.activeViewOptions.group.resources.length>0){var p=this.parent.virtualScrollModule&&this.parent.virtualScrollModule.isHorizontalScroll?this.parent.resourceBase.renderedResources:this.parent.resourceBase.lastResourceLevel,d=p.filter(function(e){return e.groupIndex===t.actionObj.groupIndex});o=d[0].renderDates;var h="."+r.n+'[data-group-index="'+this.actionObj.groupIndex+'"]';l=[].slice.call(this.parent.element.querySelectorAll(h)),c=d[0].workDays,s=d[0].groupOrder}if(this.monthEvent.dateRender=o,this.monthEvent.getSlotDates(c),this.resizeEdges.left||this.resizeEdges.right)for(var u=[].slice.call(this.parent.element.querySelectorAll("."+r._80)),g=0,v=u;g<v.length;g++){var f=v[g];i.i(n.remove)(f)}for(var m=this.monthEvent.splitEvent(e,o),y=0,T=m;y<T.length;y++){var w=T[y],D=this.parent.getIndexOfDate(o,a.b(w[this.monthEvent.fields.startTime])),b=w.data.count,S=b*this.actionObj.cellWidth-7,C=this.monthEvent.createAppointmentElement(w,this.actionObj.groupIndex,!0);C.setAttribute("drag","true"),i.i(n.addClass)([C],r._80),this.monthEvent.applyResourceColor(C,w,"backgroundColor",s),i.i(n.setStyleAttribute)(C,{width:S+"px",border:"0px","pointer-events":"none"});var O=l[parseInt(D.toString(),10)];O&&(this.monthEvent.renderElement(O,C,!0),this.actionObj.cloneElement.push(C))}}},e.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed||(this.actionObj={},this.scrollArgs={},this.resizeEdges={left:!1,right:!1,top:!1,bottom:!1},this.scrollEdges={left:!1,right:!1,top:!1,bottom:!1})},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var n=i(11),r=(i.n(n),i(0)),a=(i.n(r),function(){function e(e,t,i){this.parent=e,this.initDataManager(t,i)}return e.prototype.initDataManager=function(e,t){this.dataManager=e instanceof n.DataManager?e:new n.DataManager(e),this.query=t instanceof n.Query?t:new n.Query},e.prototype.generateQuery=function(e,t){var a=this.query.clone();if(this.parent&&e&&t){if(this.parent.activeViewOptions&&this.parent.activeViewOptions.enableLazyLoading&&!i.i(r.isNullOrUndefined)(this.parent.activeViewOptions.group.resources)&&this.parent.activeViewOptions.group.resources.length>0&&this.parent.resourceBase&&this.parent.resourceBase.resourceCollection.length>0&&this.parent.resourceBase.renderedResources.length>0){var s=[];this.parent.resourceBase.resourceCollection.forEach(function(){return s.push([])}),this.parent.resourceBase.renderedResources.forEach(function(e){s.forEach(function(t,i){var n=e.groupOrder[parseInt(i.toString(),10)];n&&t.indexOf(n)<0&&t.push(n)})}),this.parent.resourceBase.resourceCollection.forEach(function(e,t){a.addParams(e.field,s[parseInt(t.toString(),10)].toString())})}if(this.parent.timezone&&(e=this.parent.tzModule.remove(new Date(+e.getTime()),this.parent.timezone),t=this.parent.tzModule.remove(new Date(+t.getTime()),this.parent.timezone)),this.parent.eventSettings.includeFiltersInQuery){var o=this.getStartEndQuery(e,t),l=new n.Predicate(this.parent.eventFields.recurrenceRule,"notequal",null).and(new n.Predicate(this.parent.eventFields.recurrenceRule,"notequal",""));return a.where(o.or(l))}a.addParams("StartDate",e.toISOString()),a.addParams("EndDate",t.toISOString())}return a},e.prototype.getStartEndQuery=function(e,t){var i=this.parent.eventFields;return new n.Predicate(i.startTime,"greaterthanorequal",e).and(new n.Predicate(i.endTime,"greaterthanorequal",e)).and(new n.Predicate(i.startTime,"lessthan",t)).or(new n.Predicate(i.startTime,"lessthanorequal",e).and(new n.Predicate(i.endTime,"greaterthan",e)))},e.prototype.getData=function(e){return this.dataManager.executeQuery(e)},e.prototype.destroy=function(){this.dataManager=null,this.query=null},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return H});var n=i(0),r=(i.n(n),i(6)),a=(i.n(r),i(30)),s=i(48),o=i(49),l=i(46),c=i(22),p=i(14),d=i(53),h=i(70),u=i(26),g=i(69),v=i(71),f=i(68),m=i(66),y=i(64),T=i(63),w=i(44),D=i(51),b=i(59),S=i(62),C=i(65),O=i(13),E=i(52),x=i(17),A=i(2),V=i(3),I=i(1),M=i(67),k=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),R=this&&this.__decorate||function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},H=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.adaptiveGroupIndex=0,n}return k(t,e),t.prototype.render=function(){var e=[],t=[];if(e.push(V._79),this.enableRtl?e.push(V._83):t.push(V._83),this.isAdaptive?e.push(V._84):t.push(V._84),this.enableAdaptiveUI?e.push(V._85):t.push(V._85),this.allowMultiDrag?e.push(V._86):t.push(V._86),this.cssClass)for(var a=this.cssClass.split(" "),o=0,c=a;o<c.length;o++){var h=c[o];e.push(h)}i.i(n.classList)(this.element,e,t),this.validateDate(),i.i(r.createSpinner)({target:this.element}),this.scrollModule=new s.a(this),this.scrollModule.setWidth(),this.scrollModule.setHeight(),this.renderModule=new v.a(this),this.eventBase=new p.a(this),this.workCellAction=new D.a(this),this.allowKeyboardInteraction&&(this.keyboardInteractionModule=new l.a(this)),this.inlineModule=new d.a(this),this.initializeDataModule(),this.renderTableContainer(),this.activeViewOptions=this.getActiveViewOptions(),this.initializeResources(),this.wireEvents()},t.prototype.renderTableContainer=function(){this.element.querySelector("."+V._55)||this.element.appendChild(this.createElement("div",{className:V._55}))},t.prototype.getEventTemplateName=function(e){var t="eventTemplate_"+e;return this.activeEventTemplates.indexOf(t)<0&&this.activeEventTemplates.push(t),t},t.prototype.renderTemplates=function(e){this.isReact?this.renderReactTemplates(e):e&&e()},t.prototype.resetTemplates=function(e){(this.isAngular||this.isReact)&&this.clearTemplate(e)},t.prototype.sanitize=function(e,t){this.enableHtmlSanitizer?t.innerText=n.SanitizeHtmlHelper.sanitize(e):t.innerHTML=e},t.prototype.initializeResources=function(e){void 0===e&&(e=!1),this.resources.length>0?(this.resourceBase=new E.a(this),this.resourceBase.bindResourcesData(e)):(this.resourceBase=null,this.resourceCollection=[],this.renderElements(e))},t.prototype.destroyEditorWindow=function(){this.eventWindow&&(this.eventWindow.destroy(),this.eventWindow=null),this.eventWindow=new g.a(this)},t.prototype.renderElements=function(e){if(e)return this.initializeView(this.currentView),void this.eventWindow.refresh();this.destroyHeaderModule(),this.showHeaderBar&&(this.headerModule=new a.a(this)),this.renderTableContainer(),(n.Browser.isDevice||n.Browser.isTouch)&&(this.scheduleTouchModule=new o.a(this)),this.initializeView(this.currentView),this.destroyPopups(),this.isPrinting||this.initializePopups()},t.prototype.validateDate=function(e){void 0===e&&(e=this.selectedDate);var t=e instanceof Date?new Date(e.getTime()):new Date(e),i=this.minDate instanceof Date?new Date(this.minDate.getTime()):new Date(this.minDate),n=this.maxDate instanceof Date?new Date(this.maxDate.getTime()):new Date(this.maxDate);if(!(i<=n))throw Error("minDate should be equal or less than maxDate");t<i&&(t=i),t>n&&(t=n),this.setProperties({selectedDate:new Date(""+t),minDate:new Date(""+i),maxDate:new Date(""+n)},!0),this.eventWindow&&this.eventWindow.updateMinMaxDateToEditor()},t.prototype.getViewIndex=function(e){for(var t=0;t<this.viewCollections.length;t++){if(this.viewCollections[parseInt(t.toString(),10)].option===e)return t}return-1},t.prototype.setViewOptions=function(e){void 0===e&&(e=!1),this.viewOptions={},this.viewCollections=[];var t,r,a=this.viewIndex,s=0;this.viewIndex=-1;for(var o=0,l=this.views;o<l.length;o++){var c=l[o],p="string"!=typeof c;"string"==typeof c?(t=c,this.currentView===t&&(r=t,this.viewIndex=s)):(t=c.option,c.isSelected&&(r=t,this.viewIndex=s));var d=i.i(n.extend)({option:t},p?c:{}),h=t.charAt(0).toLowerCase()+t.slice(1);d.cellHeaderTemplateName=d.cellHeaderTemplate?d.option:"",d.dateHeaderTemplateName=d.dateHeaderTemplate?d.option:"",d.dateRangeTemplateName=d.dateRangeTemplate?d.option:"",d.cellTemplateName=d.cellTemplate?d.option:"",d.dayHeaderTemplateName=d.dayHeaderTemplate?d.option:"",d.monthHeaderTemplateName=d.monthHeaderTemplate?d.option:"",d.resourceHeaderTemplateName=d.resourceHeaderTemplate?d.option:"",d.headerIndentTemplateName=d.headerIndentTemplate?d.option:"",d.eventTemplateName=d.eventTemplate?d.option:"",i.i(n.isNullOrUndefined)(d.firstDayOfWeek)||0!==d.firstDayOfWeek||delete d.firstDayOfWeek,i.i(n.isNullOrUndefined)(d.interval)||1!==d.interval||delete d.interval,this.viewCollections.push(d),i.i(n.isNullOrUndefined)(this.viewOptions[""+h])?this.viewOptions[""+h]=[d]:this.viewOptions[""+h].push(d),s++}if(!e&&r&&this.setProperties({currentView:r},!0),-1===this.viewIndex){var u=this.getViewIndex(this.currentView);this.viewIndex="string"==typeof this.views[0]||i.i(n.isNullOrUndefined)(a)||-1===a?-1===u?0:u:a}},t.prototype.getActiveViewOptions=function(){var e={enable:this.timeScale.enable,interval:this.timeScale.interval,slotCount:this.timeScale.slotCount,majorSlotTemplate:this.timeScale.majorSlotTemplate,minorSlotTemplate:this.timeScale.minorSlotTemplate},t=this.viewCollections[this.viewIndex].option.indexOf("Year")>-1,r={byDate:!t&&this.group.byDate,byGroupID:this.group.byGroupID,allowGroupEdit:this.group.allowGroupEdit,resources:this.group.resources,headerTooltipTemplate:this.group.headerTooltipTemplate,enableCompactView:this.group.enableCompactView,hideNonWorkingDays:["Day","Week","WorkWeek","Month"].indexOf(this.currentView)>-1&&this.group.hideNonWorkingDays},a=this.viewCollections[this.viewIndex].workDays?[]:this.workDays,s={dateFormat:this.dateFormat,endHour:this.endHour,isSelected:!1,option:null,readonly:this.readonly,startHour:this.startHour,allowVirtualScrolling:!1,cellHeaderTemplate:this.cellHeaderTemplate,dayHeaderTemplate:this.dayHeaderTemplate,monthHeaderTemplate:this.monthHeaderTemplate,cellTemplate:this.cellTemplate,eventTemplate:this.eventSettings.template,dateHeaderTemplate:this.dateHeaderTemplate,dateRangeTemplate:this.dateRangeTemplate,resourceHeaderTemplate:this.resourceHeaderTemplate,headerIndentTemplate:this.headerIndentTemplate,firstMonthOfYear:this.firstMonthOfYear,firstDayOfWeek:this.firstDayOfWeek,workDays:a,monthsCount:this.monthsCount,showWeekend:this.showWeekend,showWeekNumber:this.showWeekNumber,displayName:null,interval:1,timeScale:e,timeFormat:this.internalTimeFormat,group:r,headerRows:this.headerRows,orientation:"Horizontal",numberOfWeeks:0,displayDate:null,enableLazyLoading:!1},o=this.viewCollections[this.viewIndex],l=i.i(n.extend)(s,o,void 0,!0);return 0!==this.firstDayOfWeek&&o.firstDayOfWeek&&this.firstDayOfWeek!==o.firstDayOfWeek&&(l.firstDayOfWeek=this.firstDayOfWeek),l.displayDate&&(l.displayDate=l.displayDate instanceof Date?new Date(l.displayDate.getTime()):new Date(l.displayDate)),l.enableLazyLoading&&!i.i(n.isNullOrUndefined)(l.group.resources)&&l.group.resources.length>0&&(-1===["Agenda","MonthAgenda","Year","TimelineYear"].indexOf(l.option)||"TimelineYear"===l.option&&"Vertical"===l.orientation)&&(l.allowVirtualScrolling=!0),l},t.prototype.initializeDataModule=function(){this.eventFields={id:this.eventSettings.fields.id,isBlock:this.eventSettings.fields.isBlock,subject:this.eventSettings.fields.subject.name,startTime:this.eventSettings.fields.startTime.name,endTime:this.eventSettings.fields.endTime.name,startTimezone:this.eventSettings.fields.startTimezone.name,endTimezone:this.eventSettings.fields.endTimezone.name,location:this.eventSettings.fields.location.name,description:this.eventSettings.fields.description.name,isAllDay:this.eventSettings.fields.isAllDay.name,recurrenceID:this.eventSettings.fields.recurrenceID.name,recurrenceRule:this.eventSettings.fields.recurrenceRule.name,recurrenceException:this.eventSettings.fields.recurrenceException.name,isReadonly:this.eventSettings.fields.isReadonly,followingID:this.eventSettings.fields.followingID},this.setEditorTitles(),this.dataModule=new c.a(this,this.eventSettings.dataSource,this.eventSettings.query),this.crudModule=new w.a(this)},t.prototype.setEditorTitles=function(){this.editorTitles={subject:this.eventSettings.fields.subject.title||this.localeObj.getConstant("title"),startTime:this.eventSettings.fields.startTime.title||this.localeObj.getConstant("start"),endTime:this.eventSettings.fields.endTime.title||this.localeObj.getConstant("end"),isAllDay:this.eventSettings.fields.isAllDay.title||this.localeObj.getConstant("allDay"),startTimezone:this.eventSettings.fields.startTimezone.title||this.localeObj.getConstant("startTimezone"),endTimezone:this.eventSettings.fields.endTimezone.title||this.localeObj.getConstant("endTimezone"),location:this.eventSettings.fields.location.title||this.localeObj.getConstant("location"),description:this.eventSettings.fields.description.title||this.localeObj.getConstant("description"),recurrenceRule:this.eventSettings.fields.recurrenceRule.title||this.localeObj.getConstant("repeat")}},t.prototype.initializeView=function(e){this.showSpinner(),this.activeViewOptions=this.getActiveViewOptions(),this.resourceBase&&this.resourceBase.setResourceCollection(),this.initializeTemplates(),this.renderModule.render(e)},t.prototype.initializeTemplates=function(){this.cellHeaderTemplateFn=this.templateParser(this.activeViewOptions.cellHeaderTemplate),this.dayHeaderTemplateFn=this.templateParser(this.activeViewOptions.dayHeaderTemplate),this.monthHeaderTemplateFn=this.templateParser(this.activeViewOptions.monthHeaderTemplate),this.cellTemplateFn=this.templateParser(this.activeViewOptions.cellTemplate),this.dateHeaderTemplateFn=this.templateParser(this.activeViewOptions.dateHeaderTemplate),this.dateRangeTemplateFn=this.templateParser(this.activeViewOptions.dateRangeTemplate),this.majorSlotTemplateFn=this.templateParser(this.activeViewOptions.timeScale.majorSlotTemplate),this.minorSlotTemplateFn=this.templateParser(this.activeViewOptions.timeScale.minorSlotTemplate),this.appointmentTemplateFn=this.templateParser(this.activeViewOptions.eventTemplate),this.resourceHeaderTemplateFn=this.templateParser(this.activeViewOptions.resourceHeaderTemplate),this.headerIndentTemplateFn=this.templateParser(this.activeViewOptions.headerIndentTemplate),this.headerTooltipTemplateFn=this.templateParser(this.activeViewOptions.group.headerTooltipTemplate),this.eventTooltipTemplateFn=this.templateParser(this.eventSettings.tooltipTemplate),this.editorTemplateFn=this.templateParser(this.editorTemplate),this.editorHeaderTemplateFn=this.templateParser(this.editorHeaderTemplate),this.editorFooterTemplateFn=this.templateParser(this.editorFooterTemplate),this.quickInfoTemplatesHeaderFn=this.templateParser(this.quickInfoTemplates.header),this.quickInfoTemplatesContentFn=this.templateParser(this.quickInfoTemplates.content),this.quickInfoTemplatesFooterFn=this.templateParser(this.quickInfoTemplates.footer)},t.prototype.initializePopups=function(){this.eventWindow=new g.a(this),this.quickPopup=new h.a(this)},t.prototype.getDayNames=function(e){var t,r=[],a="";"en"===this.locale||"en-US"===this.locale?(a="days.stand-alone.",t=i.i(n.getValue)(a+e,i.i(n.getDefaultDateObject)(this.getCalendarMode()))):(a="main."+this.locale+".dates.calendars."+this.getCalendarMode()+".days.format."+e,t=i.i(n.getValue)(a,n.cldrData));for(var s=0,o=Object.keys(t);s<o.length;s++){var l=o[s];r.push(i.i(n.getValue)(l,t))}return r},t.prototype.setCldrTimeFormat=function(){if(!i.i(n.isNullOrUndefined)(this.timeFormat))return void(this.internalTimeFormat=this.timeFormat);"en"===this.locale||"en-US"===this.locale?this.internalTimeFormat=i.i(n.getValue)("timeFormats.short",i.i(n.getDefaultDateObject)(this.getCalendarMode())):this.internalTimeFormat=i.i(n.getValue)("main."+this.locale+".dates.calendars."+this.getCalendarMode()+".timeFormats.short",n.cldrData)},t.prototype.getCalendarMode=function(){return this.calendarMode.toLowerCase()},t.prototype.getTimeString=function(e){return this.globalize.formatDate(e,{format:this.activeViewOptions.timeFormat,type:"time",calendar:this.getCalendarMode()}).toLocaleUpperCase()},t.prototype.getDateTime=function(e){return e instanceof Date?new Date(e.getTime()):new Date(e)},t.prototype.setCalendarMode=function(){"Islamic"===this.calendarMode?this.calendarUtil=new O.b:this.calendarUtil=new O.a},t.prototype.changeView=function(e,t,r,a){var s=this;if(i.i(n.isNullOrUndefined)(a)&&(a=this.getViewIndex(e)),!(!r&&a===this.viewIndex&&this.currentView===e||a<0)){var o=this.activeViewOptions?this.activeViewOptions.option:this.currentView,l={requestType:"viewNavigate",cancel:!1,event:t};this.trigger(A.f,l,function(i){if(i.cancel)s.currentView=o;else{var n={action:"view",cancel:!1,currentDate:s.selectedDate,previousView:o,currentView:e,viewIndex:a};s.trigger(A.i,n,function(i){if(i.cancel)s.currentView=o;else{var n=["Day","Week","WorkWeek"].indexOf(e)>-1&&["Day","Week","WorkWeek"].indexOf(o)<0;s.uiStateValues.isInitial=n||e.indexOf("Timeline")>-1||e.indexOf("Year")>-1,s.uiStateValues.top=e.indexOf("Timeline")>-1&&o.indexOf("Timeline")<0?0:s.uiStateValues.top,s.viewIndex=i.viewIndex,s.setProperties({currentView:e},!0),s.headerModule&&(s.headerModule.updateActiveView(),s.headerModule.setCalendarDate(s.selectedDate),s.headerModule.setCalendarView()),s.initializeView(s.currentView),s.animateLayout(),l={requestType:"viewNavigate",cancel:!1,event:t},s.trigger(A.g,l)}})}})}},t.prototype.changeDate=function(e,t){var i=this,n={requestType:"dateNavigate",cancel:!1,event:t};this.trigger(A.f,n,function(r){if(!r.cancel){var a={action:"date",cancel:!1,previousDate:i.selectedDate,currentDate:e};i.trigger(A.i,a,function(e){e.cancel||(i.uiStateValues.isInitial=i.activeView.isTimelineView()&&"TimelineYear"!==i.currentView,i.validateDate(e.currentDate),i.headerModule&&i.headerModule.setCalendarDate(e.currentDate),"MonthAgenda"===i.currentView&&i.monthAgendaModule&&(i.monthAgendaModule.monthAgendaDate=new Date(""+i.selectedDate)),i.initializeView(i.currentView),i.animateLayout(),n={requestType:"dateNavigate",cancel:!1,event:t},i.trigger(A.g,n))})}})},t.prototype.isMinMaxDate=function(e){return void 0===e&&(e=this.selectedDate),e.getTime()>=this.minDate.getTime()&&e.getTime()<=this.maxDate.getTime()},t.prototype.isSelectedDate=function(e){return e.setHours(0,0,0,0)===new Date(""+this.selectedDate).setHours(0,0,0,0)},t.prototype.getCurrentTime=function(e){return void 0===e&&(e=new Date),this.timezone?this.tzModule.convert(e,this.tzModule.getLocalTimezoneName(),this.timezone):e},t.prototype.getNavigateView=function(){return this.activeView.isTimelineView()?"TimelineMonth"===this.currentView||"TimelineYear"===this.currentView?"TimelineDay":"Agenda":"Day"},t.prototype.animateLayout=function(){this.activeView.element&&new n.Animation({duration:600,name:"FadeIn",timingFunction:"easeIn"}).animate(this.activeView.element)},t.prototype.requiredModules=function(){var e=[];this.setViewOptions(!0);for(var t=0,i=Object.keys(this.viewOptions);t<i.length;t++){var n=i[t];n="timelineDay"===n||"timelineWeek"===n||"timelineWorkWeek"===n?"timelineViews":n,e.push({member:n,args:[this]})}return this.allowDragAndDrop&&e.push({member:"dragAndDrop",args:[this]}),this.allowResizing&&e.push({member:"resize",args:[this]}),e.push({member:"excelExport",args:[this]}),e.push({member:"iCalendarExport",args:[this]}),e.push({member:"iCalendarImport",args:[this]}),e.push({member:"print",args:[this]}),e},t.prototype.preRender=function(){this.isAdaptive=n.Browser.isDevice||I.I(),this.globalize=new n.Internationalization(this.locale),this.tzModule=new x.a,(this&&i.i(n.isNullOrUndefined)(this.uiStateValues)||!this.enablePersistence)&&(this.uiStateValues={expand:!1,isInitial:!0,left:0,top:0,isGroupAdaptive:!1,isIgnoreOccurrence:!1,groupIndex:this.adaptiveGroupIndex,action:!1,isBlock:!1,isCustomMonth:!0,isPreventTimezone:!1}),this.currentTimezoneDate=this.getCurrentTime(),this.activeCellsData={startTime:new Date(this.currentTimezoneDate),endTime:new Date(this.currentTimezoneDate),isAllDay:!1},this.activeEventData={event:void 0,element:void 0},this.getDefaultLocale(),this.localeObj=new n.L10n(this.getModuleName(),this.defaultLocale,this.locale),this.setCldrTimeFormat(),this.setCalendarMode(),this.eventsData=[],this.eventsProcessed=[],this.blockData=[],this.blockProcessed=[],this.resourceCollection=[],this.currentAction=null,this.selectedElements=[],this.activeEventTemplates=[],this.setViewOptions()},t.prototype.getDefaultLocale=function(){this.defaultLocale={day:"Day",week:"Week",workWeek:"Work Week",month:"Month",year:"Year",agenda:"Agenda",weekAgenda:"Week Agenda",workWeekAgenda:"Work Week Agenda",monthAgenda:"Month Agenda",today:"Today",noEvents:"No events",emptyContainer:"There are no events scheduled on this day.",allDay:"All day",start:"Start",end:"End",more:"more",close:"Close",cancel:"Cancel",noTitle:"(No Title)",delete:"Delete",deleteEvent:"Delete Event",deleteMultipleEvent:"Delete Multiple Events",selectedItems:"Items selected",deleteSeries:"Entire Series",edit:"Edit",editSeries:"Entire Series",editEvent:"Edit Event",createEvent:"Create",subject:"Subject",addTitle:"Add title",moreDetails:"More Details",save:"Save",editContent:"How would you like to change the appointment in the series?",deleteContent:"Are you sure you want to delete this event?",deleteMultipleContent:"Are you sure you want to delete the selected events?",newEvent:"New Event",title:"Title",location:"Location",description:"Description",timezone:"Timezone",startTimezone:"Start Timezone",endTimezone:"End Timezone",repeat:"Repeat",saveButton:"Save",cancelButton:"Cancel",deleteButton:"Delete",recurrence:"Recurrence",wrongPattern:"The recurrence pattern is not valid.",seriesChangeAlert:"Do you want to cancel the changes made to specific instances of this series and match it to the whole series again?",createError:"The duration of the event must be shorter than how frequently it occurs. Shorten the duration, or change the recurrence pattern in the recurrence event editor.",sameDayAlert:"Two occurrences of the same event cannot occur on the same day.",occurenceAlert:"Cannot reschedule an occurrence of the recurring appointment if it skips over a later occurrence of the same appointment.",editRecurrence:"Edit Recurrence",recurringEvent:"Recurring Event",repeats:"Repeats",alert:"Alert",startEndError:"The selected end date occurs before the start date.",invalidDateError:"The entered date value is invalid.",blockAlert:"Events cannot be scheduled within the blocked time range.",ok:"Ok",yes:"Yes",no:"No",occurrence:"Occurrence",series:"Series",previous:"Previous",next:"Next",timelineDay:"Timeline Day",timelineWeek:"Timeline Week",timelineWorkWeek:"Timeline Work Week",timelineMonth:"Timeline Month",timelineYear:"Timeline Year",editFollowingEvent:"Following Events",deleteTitle:"Delete Event",editTitle:"Edit Event",beginFrom:"Begin From",endAt:"Ends At",expandAllDaySection:"Expand-all-day-section",collapseAllDaySection:"Collapse-all-day-section",searchTimezone:"Search Timezone",noRecords:"No records found"}},t.prototype.wireEvents=function(){n.EventHandler.add(window,"resize",this.onScheduleResize,this),n.EventHandler.add(window,"orientationchange",this.onScheduleResize,this),n.EventHandler.add(document,n.Browser.touchStartEvent,this.onDocumentClick,this)},t.prototype.removeSelectedClass=function(){for(var e=this.getSelectedCells(),t=0,r=e;t<r.length;t++){var a=r[t];"Year"!==this.currentView&&a.setAttribute("aria-selected","false"),a.removeAttribute("tabindex")}i.i(n.removeClass)(e,V._38),this.keyboardInteractionModule&&this.keyboardInteractionModule.selectedCells.length>0&&(this.keyboardInteractionModule.selectedCells=[])},t.prototype.addSelectedClass=function(e,t,r){if("Year"!==this.currentView)for(var a=0,s=e;a<s.length;a++){var o=s[a];o.setAttribute("aria-selected","true")}i.i(n.addClass)(e,V._38),t&&(t.setAttribute("tabindex","0"),t.focus({preventScroll:r||!1}))},t.prototype.selectCell=function(e){this.removeSelectedClass(),this.addSelectedClass([e],e)},t.prototype.getAllDayRow=function(){return this.element.querySelector("."+V._28)},t.prototype.getContentTable=function(){return this.activeView.element.querySelector("."+V.h+" tbody")},t.prototype.getTableRows=function(){return[].slice.call(this.element.querySelectorAll("."+V.h+" tbody tr:not(."+V._72+")"))},t.prototype.getWorkCellElements=function(){return[].slice.call(this.element.querySelectorAll("."+V.n))},t.prototype.getIndexOfDate=function(e,t){return e.map(Number).indexOf(+t)},t.prototype.isAllDayCell=function(e){return!(!(["Month","TimelineMonth","TimelineYear","MonthAgenda"].indexOf(this.currentView)>-1||e.classList.contains(V.U)||e.classList.contains(V.e))&&this.activeViewOptions.timeScale.enable)||!!(this.activeView.isTimelineView()&&this.activeViewOptions.headerRows.length>0&&"Hour"!==this.activeViewOptions.headerRows.slice(-1)[0].option)},t.prototype.getDateFromElement=function(e){var t;if(i.i(n.isNullOrUndefined)(e)||(t=e.getAttribute("data-date")),!i.i(n.isNullOrUndefined)(t)){var r=parseInt(t,10);return new Date(r)}},t.prototype.getTargetElement=function(e,t,i){var n,r=document.elementFromPoint(t,i);return r&&(n=r.closest(e)),n?[n]:null},t.prototype.getCellHeaderTemplate=function(){return this.cellHeaderTemplateFn},t.prototype.getDayHeaderTemplate=function(){return this.dayHeaderTemplateFn},t.prototype.getMonthHeaderTemplate=function(){return this.monthHeaderTemplateFn},t.prototype.getCellTemplate=function(){return this.cellTemplateFn},t.prototype.getDateHeaderTemplate=function(){return this.dateHeaderTemplateFn},t.prototype.getDateRangeTemplate=function(){return this.dateRangeTemplateFn},t.prototype.getMajorSlotTemplate=function(){return this.majorSlotTemplateFn},t.prototype.getMinorSlotTemplate=function(){return this.minorSlotTemplateFn},t.prototype.getAppointmentTemplate=function(){return this.appointmentTemplateFn},t.prototype.getEventTooltipTemplate=function(){return this.eventTooltipTemplateFn},t.prototype.getHeaderTooltipTemplate=function(){return this.headerTooltipTemplateFn},t.prototype.getEditorTemplate=function(){return this.editorTemplateFn},t.prototype.getEditorHeaderTemplate=function(){return this.editorHeaderTemplateFn},t.prototype.getEditorFooterTemplate=function(){return this.editorFooterTemplateFn},t.prototype.getQuickInfoTemplatesHeader=function(){return this.quickInfoTemplatesHeaderFn},t.prototype.getQuickInfoTemplatesContent=function(){return this.quickInfoTemplatesContentFn},t.prototype.getQuickInfoTemplatesFooter=function(){return this.quickInfoTemplatesFooterFn},t.prototype.getResourceHeaderTemplate=function(){return this.resourceHeaderTemplateFn},t.prototype.getHeaderIndentTemplate=function(){return this.headerIndentTemplateFn},t.prototype.getCssProperties=function(){return{border:this.enableRtl?"borderLeftWidth":"borderRightWidth",padding:this.enableRtl?"paddingLeft":"paddingRight",rtlBorder:this.enableRtl?"borderRightWidth":"borderLeftWidth",rtlPadding:this.enableRtl?"paddingRight":"paddingLeft"}},t.prototype.removeNewEventElement=function(){var e=this.element.querySelector("."+V._87);i.i(n.isNullOrUndefined)(e)||i.i(n.remove)(e)},t.prototype.getStartEndTime=function(e){if(!i.i(n.isNullOrUndefined)(e)&&""!==e){var t=I.b(new Date(this.currentTimezoneDate)||this.getCurrentTime()),r=e.split(":");return 2===r.length&&t.setHours(parseInt(r[0],10),parseInt(r[1],10),0),t}return null},t.prototype.onDocumentClick=function(e){this.notify(A.L,{event:e})},t.prototype.onScheduleResize=function(){if(!(i.i(n.isNullOrUndefined)(this.activeView)||(this.isAdaptive||I.H())&&document.activeElement&&document.activeElement.classList.contains(V.H)||this.uiStateValues.isTapHold))if(this.virtualScrollModule&&this.activeView.isTimelineView()&&this.virtualScrollModule.refreshLayout(),this.activeViewOptions.timeScale.enable&&this.activeView&&this.activeView.highlightCurrentTime(),this.quickPopup&&this.quickPopup.onClosePopup(),I.B(),"Month"===this.currentView||"Agenda"!==this.currentView&&"MonthAgenda"!==this.currentView&&!this.activeViewOptions.timeScale.enable||this.activeView.isTimelineView()){this.activeView.resetColWidth(),this.notify(A.J,{cssProperties:this.getCssProperties(),isPreventScrollUpdate:!0});var e=!1;this.activeViewOptions.enableLazyLoading&&this.virtualScrollModule&&this.virtualScrollModule.isRemoteRefresh&&(e=this.virtualScrollModule.isRemoteRefresh,this.virtualScrollModule.isRemoteRefresh=!1),this.refreshEvents(e)}else this.notify(A.G,{})},t.prototype.templateParser=function(e){if(e)try{return"function"==typeof e?i.i(n.compile)(e):document.querySelectorAll(e).length?i.i(n.compile)(document.querySelector(e).innerHTML.trim()):i.i(n.compile)(e)}catch(t){return i.i(n.compile)(e)}},t.prototype.getSelectedCells=function(){return[].slice.call(this.element.querySelectorAll("."+V._38))},t.prototype.getAnnouncementString=function(e,t){var i;if(this.quickPopup&&this.activeViewOptions.group.resources.length>0){i=this.quickPopup.getResourceText({event:e},"event")+'"s event - '}var n=t||e[this.eventFields.subject]||this.eventSettings.fields.subject.default,r=e[this.eventFields.location]||this.eventSettings.fields.location.default,a=this.globalize.formatDate(e[this.eventFields.startTime],{type:"dateTime",skeleton:"full",calendar:this.getCalendarMode()}),s=this.globalize.formatDate(e[this.eventFields.endTime],{type:"dateTime",skeleton:"full",calendar:this.getCalendarMode()}),o=n+" "+this.localeObj.getConstant("beginFrom")+" "+a+" "+this.localeObj.getConstant("endAt")+" "+s;return i&&(o=i+" "+o),r&&""!==r&&(o=o+" "+this.localeObj.getConstant("location")+" "+r),e[this.eventFields.recurrenceRule]&&""!==e[this.eventFields.recurrenceRule]&&e[this.eventFields.id]===e[this.eventFields.recurrenceID]&&(o=o+" "+this.localeObj.getConstant("recurringEvent")),o},t.prototype.boundaryValidation=function(e,t){var i={left:!1,right:!1,top:!1,bottom:!1},n=this.element.querySelector("."+V.g).getBoundingClientRect();return e<n.top+30+window.pageYOffset&&e>n.top+window.pageYOffset&&(i.top=!0),e>n.bottom-30+window.pageYOffset&&e<n.bottom+window.pageYOffset&&(i.bottom=!0),t<n.left+30+window.pageXOffset&&t>n.left+window.pageXOffset&&(i.left=!0),t>n.right-30+window.pageXOffset&&t<n.right+window.pageXOffset&&(i.right=!0),i},t.prototype.getWeekNumberContent=function(e){var t;if("FirstDay"===this.weekRule){var i=I.m(e.slice(-1)[0],this.firstDayOfWeek);t=this.globalize.formatNumber(I.p(i))}else if("FirstFourDayWeek"===this.weekRule){var n=I.l(e.slice(-1)[0],this.firstDayOfWeek),r=I.m(e.slice(-1)[0],this.firstDayOfWeek),a=I.q(n,r);t=this.globalize.formatNumber(I.p(a))}else if("FirstFullWeek"===this.weekRule){var n=I.l(e.slice(-1)[0],this.firstDayOfWeek);t=this.globalize.formatNumber(I.p(n))}return t},t.prototype.renderHeaderIndentTemplate=function(e,t){if(this.activeViewOptions.headerIndentTemplate){var r=this.element.id+"_",a=this.activeViewOptions.headerIndentTemplateName,s=r+a+"headerIndentTemplate",o=[].slice.call(this.getHeaderIndentTemplate()(e,this,"headerIndentTemplate",s,!1));i.i(n.append)(o,t)}},t.prototype.isSpecificResourceEvents=function(){return this.activeViewOptions.group.resources.length>0&&!this.activeViewOptions.group.allowGroupEdit&&!this.rowAutoHeight&&!this.virtualScrollModule&&this.activeViewOptions.group.byGroupID},t.prototype.unWireEvents=function(){n.EventHandler.remove(window,"resize",this.onScheduleResize),n.EventHandler.remove(window,"orientationchange",this.onScheduleResize),n.EventHandler.remove(document,n.Browser.touchStartEvent,this.onDocumentClick)},t.prototype.getModuleName=function(){return"schedule"},t.prototype.getPersistData=function(){return this.addOnPersist(["currentView","selectedDate","scrollTop","scrollLeft","adaptiveGroupIndex"])},t.prototype.onPropertyChanged=function(e,t){if(!this.isReact||!i.i(n.isNullOrUndefined)(this.activeView)){for(var r={isRefresh:!1,isResource:!1,isDate:!1,isView:!1,isLayout:!1,isDataManager:!1},s=0,o=Object.keys(e);s<o.length;s++){var l=o[s];switch(l){case"views":this.setViewOptions(),this.headerModule&&this.headerModule.updateItems(),r.isView=!0;break;case"currentView":r.isView=!0;break;case"minDate":case"maxDate":case"selectedDate":r.isDate=!0;break;case"dateFormat":this.activeViewOptions=this.getActiveViewOptions(),this.headerModule&&this.headerModule.updateDateRange();break;case"showHeaderBar":case"toolbarItems":this.destroyHeaderModule(),e.showHeaderBar&&(this.headerModule=new a.a(this),this.headerModule.updateDateRange()),this.notify(A.J,{cssProperties:this.getCssProperties()}),this.activeView.isTimelineView()&&this.refreshEvents(!1);break;case"workDays":JSON.stringify(t.workDays)!==JSON.stringify(e.workDays)&&(r.isLayout=!0);break;case"showWeekend":case"startHour":case"endHour":case"workHours":case"readonly":case"headerRows":case"showWeekNumber":case"rowAutoHeight":r.isLayout=!0;break;case"locale":case"calendarMode":this.globalize=new n.Internationalization(this.locale),this.localeObj=new n.L10n(this.getModuleName(),this.defaultLocale,this.locale),this.setCldrTimeFormat(),this.setCalendarMode(),r.isRefresh=!0;break;case"firstDayOfWeek":this.activeViewOptions.firstDayOfWeek=e.firstDayOfWeek,this.eventWindow&&this.eventWindow.refreshRecurrenceEditor(),r.isLayout=!0;break;case"showTimeIndicator":this.activeViewOptions.timeScale.enable&&this.activeView&&this.activeView.highlightCurrentTime();break;case"cellHeaderTemplate":this.activeViewOptions.cellHeaderTemplate=e.cellHeaderTemplate,this.cellHeaderTemplateFn=this.templateParser(this.activeViewOptions.cellHeaderTemplate),r.isLayout=!0;break;case"cellTemplate":this.activeViewOptions.cellTemplate=e.cellTemplate,this.cellTemplateFn=this.templateParser(this.activeViewOptions.cellTemplate),r.isLayout=!0;break;case"dateHeaderTemplate":this.activeViewOptions.dateHeaderTemplate=e.dateHeaderTemplate,this.dateHeaderTemplateFn=this.templateParser(this.activeViewOptions.dateHeaderTemplate),r.isLayout=!0;break;case"dateRangeTemplate":this.activeViewOptions.dateRangeTemplate=e.dateRangeTemplate,this.dateRangeTemplateFn=this.templateParser(this.activeViewOptions.dateRangeTemplate),this.headerModule&&this.headerModule.updateDateRange();break;case"dayHeaderTemplate":this.activeViewOptions.dayHeaderTemplate=e.dayHeaderTemplate,this.dayHeaderTemplateFn=this.templateParser(this.activeViewOptions.dayHeaderTemplate),r.isLayout=!0;break;case"monthHeaderTemplate":this.activeViewOptions.monthHeaderTemplate=e.monthHeaderTemplate,this.monthHeaderTemplateFn=this.templateParser(this.activeViewOptions.monthHeaderTemplate),r.isLayout=!0;break;case"resourceHeaderTemplate":this.activeViewOptions.resourceHeaderTemplate=e.resourceHeaderTemplate,this.resourceHeaderTemplateFn=this.templateParser(this.activeViewOptions.resourceHeaderTemplate),r.isLayout=!0;break;case"timezone":this.eventBase.timezonePropertyChange(t.timezone),this.headerModule.setCalendarTimezone();break;case"enableRtl":this.setRtlClass(),r.isRefresh=!0;break;default:this.extendedPropertyChange(l,e,t,r)}}this.propertyChangeAction(r)}},t.prototype.propertyChangeAction=function(e){e.isRefresh?this.refresh():e.isResource?this.initializeResources(!0):e.isView?this.changeView(this.currentView,null,!0):e.isDate?this.changeDate(this.selectedDate):e.isLayout?(this.activeCellsData=null,this.initializeView(this.currentView)):e.isDataManager&&this.crudModule&&(this.dragAndDropModule&&(this.dragAndDropModule.actionObj.action="",i.i(n.removeClass)([this.element],V._78)),this.crudModule.refreshDataManager())},t.prototype.allDayRowScrollUpdate=function(){var e=this.element.querySelector("."+V.d),t=this.element.querySelector("."+V._28);if("auto"!==this.height&&this.enableAllDayScroll)e.classList.contains(V._33)&&i.i(n.removeClass)([e],V._33),this.eventBase.allDayExpandScroll(e);else if(i.i(n.addClass)([e],V._33),e.classList.contains(V._5)&&i.i(n.removeClass)([e],V._5),this.uiStateValues.expand){var r=[].slice.call(this.element.querySelectorAll("."+V.U));r[0].style.height=t.style.height?t.style.height:r[1].style.height}this.uiStateValues.expand||(t.style.height="")},t.prototype.extendedPropertyChange=function(e,t,r,s){switch(e){case"width":case"height":case"enableAllDayScroll":["Day","Week","WorkWeek"].indexOf(this.currentView)>-1&&this.allDayRowScrollUpdate(),this.notify(A.K,{module:"scroll",properties:{width:t.width,height:t.height}});break;case"cssClass":r.cssClass&&i.i(n.removeClass)([this.element],r.cssClass.split(" ")),t.cssClass&&i.i(n.addClass)([this.element],t.cssClass.split(" "));break;case"hideEmptyAgendaDays":case"agendaDaysCount":this.activeViewOptions=this.getActiveViewOptions(),s.isView=!0;break;case"eventSettings":this.onEventSettingsPropertyChanged(t.eventSettings,r.eventSettings,s);break;case"allowKeyboardInteraction":this.keyboardInteractionModule&&(this.keyboardInteractionModule.destroy(),this.keyboardInteractionModule=null),t.allowKeyboardInteraction&&(this.keyboardInteractionModule=new l.a(this));break;case"timezoneDataSource":this.eventWindow&&this.eventWindow.refresh();break;case"editorTemplate":i.i(n.isNullOrUndefined)(this.editorTemplate)||(this.editorTemplateFn=this.templateParser(this.editorTemplate)),this.eventWindow&&this.eventWindow.setDialogContent();break;case"editorHeaderTemplate":i.i(n.isNullOrUndefined)(this.editorHeaderTemplate)||(this.editorHeaderTemplateFn=this.templateParser(this.editorHeaderTemplate)),this.eventWindow&&this.eventWindow.setDialogHeader();break;case"editorFooterTemplate":i.i(n.isNullOrUndefined)(this.editorFooterTemplate)||(this.editorFooterTemplateFn=this.templateParser(this.editorFooterTemplate)),this.eventWindow&&this.eventWindow.setDialogFooter();break;case"quickInfoTemplates":this.quickInfoTemplates.header&&(this.quickInfoTemplatesHeaderFn=this.templateParser(this.quickInfoTemplates.header)),this.quickInfoTemplates.content&&(this.quickInfoTemplatesContentFn=this.templateParser(this.quickInfoTemplates.content)),this.quickInfoTemplates.footer&&(this.quickInfoTemplatesFooterFn=this.templateParser(this.quickInfoTemplates.footer));break;case"group":this.onGroupSettingsPropertyChanged(t.group,r.group,s);break;case"resources":s.isResource=!0;break;case"timeScale":this.activeViewOptions.timeScale.interval=t.timeScale.interval||this.activeViewOptions.timeScale.interval,this.activeViewOptions.timeScale.slotCount=t.timeScale.slotCount||this.activeViewOptions.timeScale.slotCount,this.eventWindow&&this.eventWindow.refreshDateTimePicker(),s.isLayout=!0;break;case"allowDragAndDrop":case"allowResizing":case"eventDragArea":this.refreshEvents(!1);break;case"weekRule":s.isLayout=!0;break;case"firstMonthOfYear":this.activeViewOptions.firstMonthOfYear=t.firstMonthOfYear,this.viewIndex=this.activeView.viewIndex,s.isLayout=!0;break;case"monthsCount":this.activeViewOptions.monthsCount=t.monthsCount,this.viewIndex=this.activeView.viewIndex,s.isLayout=!0;break;case"timeFormat":this.internalTimeFormat=t.timeFormat||this.activeViewOptions.timeFormat,this.eventWindow&&this.eventWindow.refreshDateTimePicker(),s.isLayout=!0;break;case"enableAdaptiveUI":this.showHeaderBar&&this.headerModule&&(this.destroyHeaderModule(),this.headerModule=new a.a(this),this.headerModule.updateDateRange()),s.isLayout=!0;break;case"headerIndentTemplate":this.activeViewOptions.headerIndentTemplate=t.headerIndentTemplate,this.headerIndentTemplateFn=this.templateParser(this.activeViewOptions.headerIndentTemplate),s.isLayout=!0}},t.prototype.setRtlClass=function(){this.enableRtl?i.i(n.addClass)([this.element],"e-rtl"):i.i(n.removeClass)([this.element],"e-rtl")},t.prototype.onGroupSettingsPropertyChanged=function(e,t,i){for(var n=0,r=Object.keys(e);n<r.length;n++){"headerTooltipTemplate"===r[n]?this.headerTooltipTemplateFn=this.templateParser(e.headerTooltipTemplate):(i.isLayout=!0,this.eventWindow&&this.eventWindow.refresh())}},t.prototype.onEventSettingsPropertyChanged=function(e,t,i){for(var n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"dataSource":case"query":case"fields":case"includeFiltersInQuery":this.initializeDataModule(),i.isDataManager=!0;break;case"template":this.activeViewOptions.eventTemplate=e.template,this.appointmentTemplateFn=this.templateParser(this.activeViewOptions.eventTemplate),i.isDataManager=!0;break;case"enableTooltip":this.eventTooltip&&(this.eventTooltip.destroy(),this.eventTooltip=null),e.enableTooltip&&(this.eventTooltip=new u.a(this));break;case"tooltipTemplate":this.eventTooltipTemplateFn=this.templateParser(this.eventSettings.tooltipTemplate);break;case"resourceColorField":this.resourceBase&&this.resourceBase.setResourceCollection(),i.isDataManager=!0;break;case"editFollowingEvents":this.quickPopup&&this.quickPopup.refreshQuickDialog();break;case"allowAdding":case"allowEditing":case"allowDeleting":this.showHeaderBar&&this.headerModule&&this.headerModule.updateAddIcon(),this.eventWindow&&this.eventWindow.refresh();break;case"spannedEventPlacement":case"minimumEventDuration":case"enableMaxHeight":case"enableIndicator":this.refreshEvents(!1);break;case"ignoreWhitespace":i.isLayout=!0}}},t.prototype.destroyHeaderModule=function(){this.headerModule&&(this.headerModule.destroy(),this.headerModule=null)},t.prototype.destroyPopups=function(){this.quickPopup&&(this.quickPopup.destroy(),this.quickPopup=null),this.eventWindow&&(this.eventWindow.destroy(),this.eventWindow=null)},t.prototype.showSpinner=function(){i.i(r.showSpinner)(this.element)},t.prototype.hideSpinner=function(){i.i(r.hideSpinner)(this.element)},t.prototype.setWorkHours=function(e,t,r,a){var s=[];s=this.getWorkHourCells(e,t,r,a),i.i(n.addClass)(s,V._17)},t.prototype.resetWorkHours=function(e,t,r,a){if(void 0===e&&(e=this.activeView.renderDates),e&&t&&r){var s=this.getWorkHourCells(e,t,r,a);i.i(n.removeClass)(s,V._17)}else{var o=[].slice.call(this.element.querySelectorAll("."+V._17));i.i(n.removeClass)(o,V._17)}},t.prototype.getWorkHourCells=function(e,t,r,a){if(["Agenda","MonthAgenda","Month","TimelineMonth"].indexOf(this.currentView)>-1)return[];var s=this.getStartEndTime(t),o=this.getStartEndTime(r),l=this.getContentTable();if(i.i(n.isNullOrUndefined)(s)||i.i(n.isNullOrUndefined)(o)||!l)return[];s.setMilliseconds(0),o.setMilliseconds(0);var c=this.activeView.getStartHour();s<c&&(s=c);var p=this.activeView.getEndHour();o>p&&(o=p);for(var d=this.activeViewOptions.timeScale.interval*I.g,h=d/this.activeViewOptions.timeScale.slotCount,u=Math.round((s.getTime()-c.getTime())/h),g=Math.ceil((o.getTime()-c.getTime())/h),v=u,f=g,m=[],y=0,T=e;y<T.length;y++){var w=T[y];w=this.getDateTime(w),I.b(w);var D=this.activeView.renderDates;i.i(n.isNullOrUndefined)(a)||!this.resourceBase||this.activeView.isTimelineView()||(D=this.resourceBase.lastResourceLevel[parseInt(a.toString(),10)].renderDates);var b=this.getIndexOfDate(D,w);if(b>=0){if(this.activeView.isTimelineView()){var S=Math.round((p.getTime()-c.getTime())/h);u=v+b*S,g=f+b*S}for(var C=u;C<g;C++)if(this.activeView.isTimelineView()){var O=i.i(n.isNullOrUndefined)(a)?0:a;m.push(l.rows[parseInt(O.toString(),10)].cells[parseInt(C.toString(),10)])}else if(i.i(n.isNullOrUndefined)(a))m.push(l.rows[parseInt(C.toString(),10)].cells[parseInt(b.toString(),10)]);else{var E="."+V.n+'[data-group-index="'+a+'"]',x=[].slice.call(l.rows[parseInt(C.toString(),10)].querySelectorAll(E));m.push(x[parseInt(b.toString(),10)])}}}return m},t.prototype.getCellDetails=function(e){var t=e instanceof Array?e:[e],r=i.i(n.getElement)(t[0]),a=i.i(n.getElement)(t.slice(-1)[0]),s=this.getDateFromElement(r),o=this.getDateFromElement(a);if(!i.i(n.isNullOrUndefined)(s)&&!i.i(n.isNullOrUndefined)(o)){var l=this.activeView.isTimelineView()&&!i.i(n.isNullOrUndefined)(a.getAttribute("colSpan"))&&this.headerRows.length>0,c=l?parseInt(a.getAttribute("colSpan"),10):1;o=!this.activeViewOptions.timeScale.enable||l||a.classList.contains(V.U)||a.classList.contains(V.e)?I.d(new Date(o.getTime()),c):this.activeView.getEndDateFromStartDate(o);var p={startTime:s,endTime:o,isAllDay:this.isAllDayCell(r),element:e},d=r.getAttribute("data-group-index");return i.i(n.isNullOrUndefined)(d)||(p.groupIndex=parseInt(d,10)),p}},t.prototype.getSelectedElements=function(){return this.keyboardInteractionModule&&this.keyboardInteractionModule.selectedCells.length>0?this.keyboardInteractionModule.selectedCells:this.getSelectedCells()},t.prototype.getResourceCollections=function(){return this.resourceCollection},t.prototype.setResourceCollections=function(e,t){void 0===t&&(t=!0),!t&&this.uiStateValues&&(this.uiStateValues.isPreventEventRefresh=!0),this.setProperties({resources:e},!1)},t.prototype.changeCurrentView=function(e,t){var i=this.getViewIndex(e),n=e.charAt(0).toLowerCase()+e.slice(1),r=this.viewOptions[""+n];r&&(i=this.viewCollections.indexOf(r[t||0])),-1!==i&&i!==this.viewIndex&&this.changeView(e,null,null,i)},t.prototype.getCurrentViewIndex=function(){return this.viewIndex},t.prototype.getResourcesByIndex=function(e){if(this.resourceBase&&this.resourceBase.lastResourceLevel){if(e<0||e>=this.resourceBase.lastResourceLevel.length)return;var t=this.resourceBase.lastResourceLevel[parseInt(e.toString(),10)],i={};return this.resourceBase.setResourceValues(i,e),{resource:t.resource,resourceData:t.resourceData,groupData:i}}},t.prototype.expandResource=function(e,t){this.activeView.isTimelineView()&&this.resourceBase&&this.resourceCollection.length>1&&this.resourceBase.resourceExpand(e,t,!1)},t.prototype.collapseResource=function(e,t){this.activeView.isTimelineView()&&this.resourceBase&&this.resourceCollection.length>1&&this.resourceBase.resourceExpand(e,t,!0)},t.prototype.scrollTo=function(e,t){this.activeView.scrollToDate&&i.i(n.isNullOrUndefined)(e)&&t?this.activeView.scrollToDate(t):this.activeView.scrollToHour&&this.activeView.scrollToHour(e,t)},t.prototype.scrollToResource=function(e,t){this.resourceBase&&this.resourceBase.lastResourceLevel&&this.resourceBase.resourceScroll(e,t)},t.prototype.exportToICalendar=function(e,t){if(!this.iCalendarExportModule)throw console.warn('[WARNING] :: Module "ICalendarExport" is not available in Schedule component! You either misspelled the module name or forgot to load it.'),Error("Inject ICalendarExport module");this.iCalendarExportModule.initializeCalendarExport(e,t)},t.prototype.importICalendar=function(e){if(!this.iCalendarImportModule)throw console.warn('[WARNING] :: Module "ICalendarImport" is not available in Schedule component! You either misspelled the module name or forgot to load it.'),Error("Inject ICalendarImport module");this.iCalendarImportModule.initializeCalendarImport(e)},t.prototype.addEvent=function(e){this.crudModule.addEvent(e)},t.prototype.generateEventOccurrences=function(e,t){return this.eventBase?this.eventBase.generateOccurrence(e,t):[]},t.prototype.exportToExcel=function(e){if(!this.excelExportModule)throw console.warn('[WARNING] :: Module "ExcelExport" is not available in Schedule component! You either misspelled the module name or forgot to load it.'),Error("Inject ExcelExport module");this.excelExportModule.initializeExcelExport(e)},t.prototype.print=function(e){if(!this.printModule)throw console.warn('[WARNING] :: Module "Print" is not available in Schedule component! You either misspelled the module name or forgot to load it.'),Error("Inject Print module");this.printModule.print(e)},t.prototype.saveEvent=function(e,t){this.crudModule.saveEvent(e,t)},t.prototype.deleteEvent=function(e,t){this.crudModule.deleteEvent(e,t)},t.prototype.getEvents=function(e,t,i){var n=[];return n=i?this.eventBase.getProcessedEvents():this.eventsData,e&&(e=this.getDateTime(e)),t&&(t=this.getDateTime(t)),n=this.eventBase.filterEventsByRange(n,e,t)},t.prototype.getBlockEvents=function(e,t,i){var n=[];return n=i?this.eventBase.getProcessedEvents(this.blockData):this.blockData,e&&(e=this.getDateTime(e)),t&&(t=this.getDateTime(t)),n=this.eventBase.filterEventsByRange(n,e,t)},t.prototype.getOccurrencesByID=function(e){return this.eventBase.getOccurrencesByID(e)},t.prototype.getOccurrencesByRange=function(e,t){return e=this.getDateTime(e),t=this.getDateTime(t),this.eventBase.getOccurrencesByRange(e,t)},t.prototype.getCurrentViewDates=function(){return this.activeView?this.activeView.renderDates:[]},t.prototype.setRecurrenceEditor=function(e){this.eventWindow.setRecurrenceEditor(e)},t.prototype.getEventMaxID=function(){return this.eventBase.getEventMaxID()},t.prototype.getDeletedOccurrences=function(e){return this.eventBase.getDeletedOccurrences(e)},t.prototype.getCurrentViewEvents=function(){return this.eventsProcessed},t.prototype.refreshEvents=function(e){void 0===e&&(e=!0),e?(this.dragAndDropModule&&(this.dragAndDropModule.actionObj.action="",i.i(n.removeClass)([this.element],V._78)),this.crudModule.refreshDataManager()):(this.uiStateValues&&(this.uiStateValues.isPreventTimezone=!0),this.crudModule&&this.crudModule.refreshProcessedData(),this.uiStateValues&&(this.uiStateValues.isPreventTimezone=!1))},t.prototype.refreshTemplates=function(e){switch(e?this.resetTemplates([e]):this.resetTemplates(),e){case"eventTemplate":this.appointmentTemplateFn=this.templateParser(this.activeViewOptions.eventTemplate),this.refreshEvents(!1);break;case"dateHeaderTemplate":this.dateHeaderTemplateFn=this.templateParser(this.activeViewOptions.dateHeaderTemplate),this.activeView.refreshHeader();break;case"dateRangeTemplate":this.dateRangeTemplateFn=this.templateParser(this.activeViewOptions.dateRangeTemplate),this.headerModule&&this.headerModule.refresh();break;case"resourceHeaderTemplate":this.resourceHeaderTemplateFn=this.templateParser(this.activeViewOptions.resourceHeaderTemplate),this.activeView.isTimelineView()?this.activeView.refreshResourceHeader():this.activeView.refreshHeader();break;case"quickInfoTemplates":this.quickPopup&&(this.quickPopup.destroy(),this.quickPopup=null),this.quickPopup=new h.a(this),this.quickInfoTemplatesHeaderFn=this.templateParser(this.quickInfoTemplates.header),this.quickInfoTemplatesContentFn=this.templateParser(this.quickInfoTemplates.content),this.quickInfoTemplatesFooterFn=this.templateParser(this.quickInfoTemplates.footer);break;case"editorTemplate":this.destroyEditorWindow(),this.editorTemplateFn=this.templateParser(this.editorTemplate);break;case"editorHeaderTemplate":this.destroyEditorWindow(),this.editorHeaderTemplateFn=this.templateParser(this.editorHeaderTemplate);break;case"editorFooterTemplate":this.destroyEditorWindow(),this.editorFooterTemplateFn=this.templateParser(this.editorFooterTemplate);break;case"tooltipTemplate":case"headerTooltipTemplate":this.eventTooltip&&(this.eventTooltip.destroy(),this.eventTooltip=null),this.eventTooltip=new u.a(this),this.eventTooltipTemplateFn=this.templateParser(this.eventSettings.tooltipTemplate),this.headerTooltipTemplateFn=this.templateParser(this.activeViewOptions.group.headerTooltipTemplate);break;default:this.initializeView(this.currentView)}},t.prototype.refreshLayout=function(){this.onScheduleResize(),this.headerModule&&this.headerModule.refresh(),this.eventWindow&&this.eventWindow.refresh()},t.prototype.getEventDetails=function(e){e=i.i(n.getElement)(e);var t=e.getAttribute("data-guid");return t?this.eventBase.getEventByGuid(t):{}},t.prototype.isSlotAvailable=function(e,t,r){var a,s,o=this,l=this.activeEventData.event;if(e instanceof Date||"string"==typeof e?(a=e,s=t):(l=e,a=e[this.eventFields.startTime],s=e[this.eventFields.endTime],this.resourceBase&&(r=this.eventBase.getGroupIndexFromEvent(e))),i.i(n.isNullOrUndefined)(a)||i.i(n.isNullOrUndefined)(s))return!0;a=this.getDateTime(a),s=this.getDateTime(s);var c=this.eventBase.filterEvents(a,s);return!i.i(n.isNullOrUndefined)(r)&&this.resourceBase&&this.resourceBase.lastResourceLevel.length>0&&(c=this.eventBase.filterEventsByResource(this.resourceBase.lastResourceLevel[parseInt(r.toString(),10)],c)),l&&(c=l.Guid?c.filter(function(e){return e.Guid!==l.Guid}):c.filter(function(e){return e[o.eventFields.id]!==l[o.eventFields.id]})),!(c.length>0)},t.prototype.openEditor=function(e,t,r,a){"Add"!==t||r?(e[this.eventFields.startTime]=this.getDateTime(e[this.eventFields.startTime]),e[this.eventFields.endTime]=this.getDateTime(e[this.eventFields.endTime])):(e.startTime=this.getDateTime(e.startTime),e.endTime=this.getDateTime(e.endTime),i.i(n.isNullOrUndefined)(e.element)||(e.element=i.i(n.getElement)(e.element))),this.currentAction=t,"Add"!==t&&(this.activeEventData.event=e),this.eventWindow.openEditor(e,t,r,a)},t.prototype.closeEditor=function(){this.eventWindow&&this.eventWindow.dialogClose()},t.prototype.openQuickInfoPopup=function(e){var t=this;if("Year"!==this.currentView&&!i.i(n.isNullOrUndefined)(e))if(i.i(n.isNullOrUndefined)(e[this.eventFields.id])){if("Agenda"===this.currentView||"MonthAgenda"===this.currentView||i.i(n.isNullOrUndefined)(this.activeView))return;var r={startTime:this.activeCellsData.startTime=this.getDateTime(e[this.eventFields.startTime]),endTime:this.activeCellsData.endTime=this.getDateTime(e[this.eventFields.endTime]),isAllDay:this.activeCellsData.isAllDay=!i.i(n.isNullOrUndefined)(e[this.eventFields.isAllDay])&&e[this.eventFields.isAllDay]},a=this.activeView.getAdjustedDate(new Date(r.startTime));if(a){var s="."+V.n+'[data-date="'+a.getTime()+'"]';this.activeViewOptions.group.resources.length>0&&!this.uiStateValues.isGroupAdaptive&&this.resourceBase&&this.eventBase&&(r.groupIndex=this.eventBase.getGroupIndexFromEvent(e),s="."+V.n+'[data-date="'+a.getTime()+'"][data-group-index="'+r.groupIndex+'"]');var o=this.element.querySelector(s);o&&(o.focus(),r.element=o,this.notify(A.a,r))}}else{var l=this.getCurrentViewEvents().filter(function(i){return e[t.eventFields.id]===i[t.eventFields.id]});if(l.length<=0)return;var c=l[0];if(e[this.eventFields.recurrenceRule]){var p=l.filter(function(i){return i[t.eventFields.startTime].getTime()===e[t.eventFields.startTime].getTime()});p.length>0&&(c=p[0])}var d=this.element.querySelector('div[data-guid="'+c.Guid+'"]');d&&(this.eventBase.removeSelectedAppointmentClass(),this.eventBase.addSelectedAppointments([d],!1),this.activeEventData={event:c,element:d},"Agenda"!==this.currentView&&"MonthAgenda"!==this.currentView||i.i(n.addClass)([this.activeEventData.element],V.S),this.notify(A.k,this.activeEventData))}},t.prototype.closeQuickInfoPopup=function(){this.quickPopup&&this.quickPopup.quickPopupHide(!0)},t.prototype.closeTooltip=function(){this.eventTooltip&&this.eventTooltip.close()},t.prototype.selectResourceByIndex=function(e){this.resourceBase&&this.uiStateValues.isGroupAdaptive&&this.resourceBase.selectResourceByIndex(e)},t.prototype.getIndexFromResourceId=function(e,t){return this.resourceBase?this.resourceBase.getIndexFromResourceId(e,t):null},t.prototype.addResource=function(e,t,i){this.resourceBase.addResource(e,t,i)},t.prototype.removeResource=function(e,t){this.resourceBase.removeResource(e,t)},t.prototype.destroy=function(){this.eventTooltip&&(this.eventTooltip.destroy(),this.eventTooltip=null),this.destroyPopups(),this.hideSpinner(),this.unWireEvents(),this.destroyHeaderModule(),this.eventBase&&(this.eventBase.destroy(),this.eventBase=null),this.workCellAction&&(this.workCellAction.destroy(),this.workCellAction=null),this.inlineModule&&(this.inlineModule.destroy(),this.inlineModule=null),this.keyboardInteractionModule&&(this.keyboardInteractionModule.destroy(),this.keyboardInteractionModule=null),this.scrollModule&&(this.scrollModule.destroy(),this.scrollModule=null),this.printModule&&this.printModule.destroy(),this.activeView&&(this.resetTemplates(),this.activeView.removeEventListener(),this.activeView.destroy(),this.activeView=null),this.scheduleTouchModule&&(this.scheduleTouchModule.destroy(),this.scheduleTouchModule=null),this.crudModule&&(this.crudModule.destroy(),this.crudModule=null),this.dataModule&&(this.dataModule.destroy(),this.dataModule=null),e.prototype.destroy.call(this);for(var t=["dayModule","weekModule","workWeekModule","monthModule","monthAgendaModule","yearModule","agendaModule","timelineViewsModule","timelineMonthModule","timelineYearModule","resizeModule","dragAndDropModule","excelExportModule","printModule","iCalendarExportModule","iCalendarImportModule","tzModule","eventsData","eventsProcessed","blockData","blockProcessed","uiStateValues","viewCollections","viewOptions","defaultLocale","localeObj","selectedElements","resourceCollection","editorTitles","eventFields","activeViewOptions","activeEventData","activeCellsData","renderModule"],r=0,a=t;r<a.length;r++){this[""+a[r]]=null}I.E(this.element);var s=[V._79,V._83,V._84,V._86];this.cssClass&&(s=s.concat(this.cssClass.split(" "))),i.i(n.removeClass)([this.element],s)},R([i.i(n.Property)("auto")],t.prototype,"width",void 0),R([i.i(n.Property)("auto")],t.prototype,"height",void 0),R([i.i(n.Property)(!0)],t.prototype,"showHeaderBar",void 0),R([i.i(n.Property)(!0)],t.prototype,"showTimeIndicator",void 0),R([i.i(n.Property)(!0)],t.prototype,"allowSwiping",void 0),R([i.i(n.Collection)([],M.a)],t.prototype,"toolbarItems",void 0),R([i.i(n.Property)("Week")],t.prototype,"currentView",void 0),R([i.i(n.Property)(["Day","Week","WorkWeek","Month","Agenda"])],t.prototype,"views",void 0),R([i.i(n.Property)(new Date)],t.prototype,"selectedDate",void 0),R([i.i(n.Property)(new Date(1900,0,1))],t.prototype,"minDate",void 0),R([i.i(n.Property)(new Date(2099,11,31))],t.prototype,"maxDate",void 0),R([i.i(n.Property)()],t.prototype,"dateFormat",void 0),R([i.i(n.Property)("Gregorian")],t.prototype,"calendarMode",void 0),R([i.i(n.Property)(!0)],t.prototype,"showWeekend",void 0),R([i.i(n.Property)(0)],t.prototype,"firstDayOfWeek",void 0),R([i.i(n.Property)("FirstDay")],t.prototype,"weekRule",void 0),R([i.i(n.Property)([1,2,3,4,5])],t.prototype,"workDays",void 0),R([i.i(n.Property)(12)],t.prototype,"monthsCount",void 0),R([i.i(n.Property)("00:00")],t.prototype,"startHour",void 0),R([i.i(n.Property)("24:00")],t.prototype,"endHour",void 0),R([i.i(n.Property)(null)],t.prototype,"timeFormat",void 0),R([i.i(n.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),R([i.i(n.Property)(!1)],t.prototype,"enableAllDayScroll",void 0),R([i.i(n.Property)(!1)],t.prototype,"enableAdaptiveUI",void 0),R([i.i(n.Property)(!0)],t.prototype,"allowResizing",void 0),R([i.i(n.Complex)({},f.a)],t.prototype,"workHours",void 0),R([i.i(n.Complex)({},m.a)],t.prototype,"timeScale",void 0),R([i.i(n.Property)(!0)],t.prototype,"allowKeyboardInteraction",void 0),R([i.i(n.Property)(!0)],t.prototype,"allowDragAndDrop",void 0),R([i.i(n.Property)()],t.prototype,"dateHeaderTemplate",void 0),R([i.i(n.Property)()],t.prototype,"dateRangeTemplate",void 0),R([i.i(n.Property)()],t.prototype,"cellHeaderTemplate",void 0),R([i.i(n.Property)()],t.prototype,"dayHeaderTemplate",void 0),R([i.i(n.Property)()],t.prototype,"monthHeaderTemplate",void 0),R([i.i(n.Property)()],t.prototype,"cellTemplate",void 0),R([i.i(n.Property)(!1)],t.prototype,"readonly",void 0),R([i.i(n.Property)(!0)],t.prototype,"showQuickInfo",void 0),R([i.i(n.Property)(!1)],t.prototype,"allowInline",void 0),R([i.i(n.Property)(!0)],t.prototype,"allowMultiCellSelection",void 0),R([i.i(n.Property)(!0)],t.prototype,"allowMultiRowSelection",void 0),R([i.i(n.Property)(!1)],t.prototype,"quickInfoOnSelectionEnd",void 0),R([i.i(n.Property)(!1)],t.prototype,"showWeekNumber",void 0),R([i.i(n.Property)(!1)],t.prototype,"rowAutoHeight",void 0),R([i.i(n.Property)(!1)],t.prototype,"allowMultiDrag",void 0),R([i.i(n.Property)(0)],t.prototype,"firstMonthOfYear",void 0),R([i.i(n.Property)()],t.prototype,"editorTemplate",void 0),R([i.i(n.Property)()],t.prototype,"editorHeaderTemplate",void 0),R([i.i(n.Property)()],t.prototype,"editorFooterTemplate",void 0),R([i.i(n.Complex)({},y.a)],t.prototype,"quickInfoTemplates",void 0),R([i.i(n.Property)(7)],t.prototype,"agendaDaysCount",void 0),R([i.i(n.Property)(!0)],t.prototype,"hideEmptyAgendaDays",void 0),R([i.i(n.Property)(!0)],t.prototype,"enableRecurrenceValidation",void 0),R([i.i(n.Property)()],t.prototype,"timezone",void 0),R([i.i(n.Complex)({},b.a)],t.prototype,"eventSettings",void 0),R([i.i(n.Property)(x.b)],t.prototype,"timezoneDataSource",void 0),R([i.i(n.Property)()],t.prototype,"resourceHeaderTemplate",void 0),R([i.i(n.Property)()],t.prototype,"headerIndentTemplate",void 0),R([i.i(n.Complex)({},S.a)],t.prototype,"group",void 0),R([i.i(n.Collection)([],C.a)],t.prototype,"resources",void 0),R([i.i(n.Collection)([],T.a)],t.prototype,"headerRows",void 0),R([i.i(n.Property)()],t.prototype,"cssClass",void 0),R([i.i(n.Property)()],t.prototype,"eventDragArea",void 0),R([i.i(n.Event)()],t.prototype,"created",void 0),R([i.i(n.Event)()],t.prototype,"destroyed",void 0),R([i.i(n.Event)()],t.prototype,"cellClick",void 0),R([i.i(n.Event)()],t.prototype,"cellDoubleClick",void 0),R([i.i(n.Event)()],t.prototype,"moreEventsClick",void 0),R([i.i(n.Event)()],t.prototype,"hover",void 0),R([i.i(n.Event)()],t.prototype,"select",void 0),R([i.i(n.Event)()],t.prototype,"actionBegin",void 0),R([i.i(n.Event)()],t.prototype,"actionComplete",void 0),R([i.i(n.Event)()],t.prototype,"actionFailure",void 0),R([i.i(n.Event)()],t.prototype,"navigating",void 0),R([i.i(n.Event)()],t.prototype,"renderCell",void 0),R([i.i(n.Event)()],t.prototype,"eventClick",void 0),R([i.i(n.Event)()],t.prototype,"eventDoubleClick",void 0),R([i.i(n.Event)()],t.prototype,"eventRendered",void 0),R([i.i(n.Event)()],t.prototype,"dataBinding",void 0),R([i.i(n.Event)()],t.prototype,"popupOpen",void 0),R([i.i(n.Event)()],t.prototype,"popupClose",void 0),R([i.i(n.Event)()],t.prototype,"dragStart",void 0),R([i.i(n.Event)()],t.prototype,"drag",void 0),R([i.i(n.Event)()],t.prototype,"dragStop",void 0),R([i.i(n.Event)()],t.prototype,"resizeStart",void 0),R([i.i(n.Event)()],t.prototype,"resizing",void 0),R([i.i(n.Event)()],t.prototype,"resizeStop",void 0),R([i.i(n.Event)()],t.prototype,"virtualScrollStart",void 0),R([i.i(n.Event)()],t.prototype,"virtualScrollStop",void 0),R([i.i(n.Event)()],t.prototype,"dataBound",void 0),t=R([n.NotifyPropertyChanges],t)}(n.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return p});var n=i(0),r=(i.n(n),i(73)),a=(i.n(r),i(8)),s=i(1),o=i(3),l=i(2),c=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),p=function(e){function t(t){return e.call(this,t)||this}return c(t,e),t.prototype.createAgendaContentElement=function(e,t,a,c,p){var d,h=this,u=this.parent.eventFields;if("noEvents"===e){var g=[{subject:this.parent.localeObj.getConstant("noEvents")}];d=r.ListBase.createList(this.parent.createElement,g,{moduleName:"agenda",listClass:this.parent.activeView.viewClass,itemClass:this.parent.activeView.viewClass,template:'<div class="'+o._41+'">'+this.parent.localeObj.getConstant("noEvents")+"</div>"}),0===d.querySelector(".e-agenda-item").children.length&&d.firstElementChild.appendChild(i.i(n.createElement)("div",{className:o._41,innerHTML:this.parent.localeObj.getConstant("noEvents")}))}else{d=r.ListBase.createList(this.parent.createElement,t,{moduleName:"agenda",listClass:this.parent.activeView.viewClass,itemClass:this.parent.activeView.viewClass});[].slice.call(d.children).forEach(function(e,r){var a=i.i(n.createElement)("div",{className:o.A,attrs:{"data-id":"Appointment_"+t[parseInt(r.toString(),10)][""+h.parent.eventFields.id],"data-guid":t[parseInt(r.toString(),10)].Guid,role:"button",tabindex:"0","aria-disabled":h.parent.eventBase.getReadonlyAttribute(t[parseInt(r.toString(),10)]),"aria-label":h.parent.getAnnouncementString(t[parseInt(r.toString(),10)])}});i.i(n.isNullOrUndefined)(p)||a.setAttribute("data-group-index",p.toString()),h.parent.eventBase.applyResourceColor(a,t[parseInt(r.toString(),10)],"borderColor",c);var d;if(i.i(n.isNullOrUndefined)(h.parent.activeViewOptions.eventTemplate))d=h.createAppointment(t[parseInt(r.toString(),10)]);else{i.i(n.addClass)([a],o._42);var g=h.parent.element.id+"_",v=h.parent.activeViewOptions.eventTemplateName,f=g+v+"eventTemplate";if(d=h.parent.getAppointmentTemplate()(t[parseInt(r.toString(),10)],h.parent,"eventTemplate",f,!1),!i.i(n.isNullOrUndefined)(t[parseInt(r.toString(),10)][u.recurrenceRule])){var m=t[parseInt(r.toString(),10)][u.id]===t[parseInt(r.toString(),10)][u.recurrenceID]?o.L:o.M;a.appendChild(i.i(n.createElement)("div",{className:o.N+" "+m}))}}i.i(n.append)([].slice.call(d),a),s.E(e),e.appendChild(a);var y={data:i.i(n.extend)({},t[parseInt(r.toString(),10)],null,!0),element:e,cancel:!1};h.parent.trigger(l.m,y,function(t){t.cancel&&i.i(n.remove)(e)})})}return a.appendChild(d),("MonthAgenda"===this.parent.currentView&&this.parent.activeViewOptions.group.resources.length>0||"Agenda"===this.parent.currentView)&&i.i(n.addClass)([a],o._43),this.parent.renderTemplates(),a},t.prototype.createAppointment=function(e){var t=this.parent.eventFields,r=e[t.subject]||this.parent.eventSettings.fields.subject.default||this.parent.localeObj.getConstant("addTitle"),a=e[t.location]||this.parent.eventSettings.fields.location.default,l=i.i(n.createElement)("div",{className:o._44});i.i(n.isNullOrUndefined)(a)||""===a||(r+=",");var c=i.i(n.createElement)("div",{className:o.H});if(this.parent.sanitize(r,c),l.appendChild(c),!i.i(n.isNullOrUndefined)(a)&&""!==a){var p=i.i(n.createElement)("div",{className:o.K});this.parent.sanitize(a,p),l.appendChild(p)}if(!i.i(n.isNullOrUndefined)(e[t.recurrenceRule])){var d=e[t.id]===e[t.recurrenceID]?o.L:o.M;l.appendChild(i.i(n.createElement)("div",{className:o.N+" "+d}))}var h=e[t.startTime],u=e[t.endTime],g=e[t.isAllDay],v=this.parent.localeObj.getConstant("allDay"),f=this.parent.getTimeString(h)+" - "+this.parent.getTimeString(u);if(!i.i(n.isNullOrUndefined)(e.data)){v=((u.getTimezoneOffset()!==h.getTimezoneOffset()?u.getTime()-h.getTime()+36e5:u.getTime()-h.getTime())/s.c>=1?v:f)+" ("+this.parent.localeObj.getConstant("day")+" "+e.data.index+"/"+e.data.count+")"}var m=!i.i(n.isNullOrUndefined)(e.data)||g?v:f;return[l,i.i(n.createElement)("div",{className:o._45,innerHTML:m})]},t.prototype.processAgendaEvents=function(e){var t=[];if(i.i(n.isNullOrUndefined)(e))return t;for(var r=0,a=e;r<a.length;r++){var s=a[r],o=this.parent.eventBase.splitEventByDay(s);t=t.concat(o.length>1?o:s)}return t},t.prototype.wireEventActions=function(){for(var e=[].slice.call(this.parent.element.querySelectorAll("."+o.A)),t=0,i=e;t<i.length;t++){var r=i[t];this.parent.eventBase.wireAppointmentEvents(r,this.parent.getEventDetails(r),!0)}for(var a=[].slice.call(this.parent.element.querySelectorAll(".e-m-date")),s=0,l=a;s<l.length;s++){var r=l[s];n.EventHandler.add(r,"click",this.parent.agendaModule.dayNavigationClick,this)}},t.prototype.calculateResourceTableElement=function(e,t,r,a){if(void 0===a&&(a=null),i.i(n.isNullOrUndefined)(this.parent.resourceBase.lastResourceLevel)){var l=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays);this.parent.resourceBase.generateResourceLevels(l)}for(var c=s.d(new Date(r.getTime()),t),p=this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView?t:1,d=this.parent.resourceBase.resourceCollection,h=this.parent.resourceBase.lastResourceLevel,u=r,g=r,v=this.parent.activeViewOptions.showWeekend,f=0;f<p;f++){var m=[],y=[],T=0,w=void 0,D=void 0,b=s.d(g,f);if("Agenda"===this.parent.currentView&&this.parent.activeViewOptions.group.byDate&&this.parent.activeViewOptions.allowVirtualScrolling&&!v&&!this.isWorkDay(b)){do{if((b=s.d(b,1))>=a)break}while(!this.isWorkDay(b)||this.parent.eventBase.filterEvents(b,s.d(b,1)).length<1);if(b>=a)break;g=s.d(b,-f),c=s.d(b,1)}var S=this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView?s.d(b,1):c,C=this.parent.eventBase.filterEvents(b,S);if(C.length>0||!this.parent.hideEmptyAgendaDays||"MonthAgenda"===this.parent.currentView){for(var O=0;O<h.length;O++){t=this.parent.activeViewOptions.group.byDate&&"MonthAgenda"!==this.parent.currentView?1:t;var E=[];r=b;var x=this.parent.eventBase.filterEvents(r,c,C,h[parseInt(O.toString(),10)]);if(x.length>0||!this.parent.hideEmptyAgendaDays||"MonthAgenda"===this.parent.currentView)for(var A=0;A<t;A++){var V=this.parent.eventBase.filterEvents(r,s.d(r,1),x,void 0);if(((v||!v&&(this.parent.group.byDate?this.isWorkDay(r):this.isWorkDay(r,h[parseInt(O.toString(),10)].workDays)))&&(V.length>0||!this.parent.hideEmptyAgendaDays)||"MonthAgenda"===this.parent.currentView)&&(E.push(V[0]),w={rowSpan:1,type:"eventColumn",resource:d[d.length-1],groupIndex:h[parseInt(O.toString(),10)].groupIndex,groupOrder:h[parseInt(O.toString(),10)].groupOrder,resourceData:h[parseInt(O.toString(),10)].resourceData,eventData:V,date:r},D={rowSpan:1,type:"dateColumn",resource:d[parseInt((d.length-1).toString(),10)],groupOrder:h[parseInt(O.toString(),10)].groupOrder,resourceData:h[parseInt(O.toString(),10)].resourceData,date:r},m[parseInt(T.toString(),10)]||(m[parseInt(T.toString(),10)]=[]),m[parseInt(T.toString(),10)].push(w),m[parseInt(T.toString(),10)].push(D),T++),r=s.d(r,1),r.getTime()>=c.getTime()||this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView){if(E.length>0){m[m.length-1][1].cssClass=o._43;var I={rowSpan:E.length,type:"resourceColumn",resource:d[parseInt((d.length-1).toString(),10)],groupOrder:h[parseInt(O.toString(),10)].groupOrder.slice(0,-1),resourceData:h[parseInt(O.toString(),10)].resourceData,groupIndex:m.length-E.length,className:[o._46],date:r};m[parseInt((m.length-E.length).toString(),10)].push(I),y.push(i.i(n.extend)({},I,null,!0))}break}}}for(var M=d.slice(0,-1),k=[],R=0,H=0;H<M.length;H++)for(var E=M[M.length-(H+1)].dataSource,_=0;_<E.length;_++)for(var P=0,j=0;j<y.length;j++)y[parseInt(j.toString(),10)].groupOrder[M.length-(H+1)]===E[parseInt(_.toString(),10)][M[M.length-(H+1)].idField]&&(R+=y[parseInt(j.toString(),10)].rowSpan,k.push(i.i(n.extend)({},y[parseInt(j.toString(),10)],null,!0))),++P===y.length&&k.length>0&&(k[0].rowSpan=R,k[0].type="parentColumnLevel_"+(H+1),k[0].resource=M[M.length-(H+1)],k[0].resourceData=E[parseInt(_.toString(),10)],k[0].date=r,m[k[0].groupIndex].push(k[0]),k=[],R=0);this.createResourceTableRow(m,e)}}0===this.parent.eventBase.filterEvents(u,c).length&&!this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.hideEmptyAgendaDays&&this.renderEmptyContent(e,u)},t.prototype.createResourceTableRow=function(e,t){var r,a,l,c=i.i(n.createElement)("tr"),p=i.i(n.createElement)("td"),d=0;if(this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView){for(var h=[],u=this.parent.resourceBase.resourceCollection.slice(0,-1),g=0;g<e.length;g++)h=h.concat(e[parseInt(g.toString(),10)]);l=u.length>0?"parentColumnLevel_"+u.length:"resourceColumn";for(var v=h.filter(function(e){return e.type===l}),f=0;f<v.length;f++)d+=v[parseInt(f.toString(),10)].rowSpan}for(var m=0;m<e.length;m++){r=c.cloneNode();for(var y=e[parseInt(m.toString(),10)].length-1;y>=0;y--){var T=e[parseInt(m.toString(),10)][parseInt(y.toString(),10)],w=p.cloneNode();if("dateColumn"===T.type){if(this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView){a=e[parseInt(m.toString(),10)][parseInt(y.toString(),10)];continue}w.setAttribute("data-date",T.date.getTime().toString()),w.appendChild(this.createDateHeaderElement(T.date));var D=[o._47,o._48];T.cssClass&&D.push(T.cssClass),i.i(n.addClass)([w],D),this.isCurrentDate(new Date(T.date.getTime()))&&i.i(n.addClass)(w.childNodes,o._49),r.appendChild(w)}else if("eventColumn"===T.type){var b=0===T.eventData.length?"noEvents":"data";w=this.createAgendaContentElement(b,T.eventData,w,T.groupOrder,T.groupIndex),w.setAttribute("data-date",T.date.getTime().toString()),(this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView)&&i.i(n.addClass)([w],[o._47,o._50]),r.appendChild(w)}else w.setAttribute("rowspan",T.rowSpan.toString()),i.i(n.addClass)([w],o._51),this.setResourceHeaderContent(w,T,T.className[0]),r.appendChild(w)}if(this.parent.activeViewOptions.group.byDate&&0===m&&"MonthAgenda"!==this.parent.currentView){var w=p.cloneNode();w.setAttribute("data-date",a.date.getTime().toString()),w.setAttribute("rowspan",d.toString()),w.appendChild(this.createDateHeaderElement(a.date)),i.i(n.addClass)([w],[o._47,o._48,o._52]);var S=s.y(this.parent.selectedDate.getTime(),a.date.getTime());if(r.setAttribute("data-row-index",S.toString()),this.parent.element.querySelector('.e-agenda-view tr[data-row-index="'+S+'"]'))break;r.insertBefore(w,r.childNodes[0])}t.appendChild(r)}},t.prototype.createDateHeaderElement=function(e){var t;if(this.parent.activeViewOptions.dateHeaderTemplate){t=i.i(n.createElement)("div",{className:o._53});var r={date:e,type:"dateHeader"},a=this.parent.element.id+"_",s=this.parent.activeViewOptions.dateHeaderTemplateName,l=a+s+"dateHeaderTemplate",c=[].slice.call(this.parent.getDateHeaderTemplate()(r,this.parent,"dateHeaderTemplate",l,!1));i.i(n.append)(c,t)}else t=this.getMobileDateElement(e,o._53);return t},t.prototype.renderEmptyContent=function(e,t){var r=this.createTableRowElement(t,"noEvents"),a=r.children[0],s=i.i(n.createElement)("div",{className:o._54,innerHTML:this.parent.localeObj.getConstant("noEvents")});a.appendChild(s),e.appendChild(r)},t.prototype.createTableRowElement=function(e,t){var r=s.y(this.parent.selectedDate.getTime(),e.getTime()),a=i.i(n.createElement)("tr",{attrs:{"data-row-index":r.toString()}}),l=i.i(n.createElement)("td",{attrs:{class:"monthHeader"===t?o.m:o._47,"aria-selected":"false","data-column-index":r.toString(),"data-date":e.getTime().toString()}}),c=l.cloneNode(),p=l.cloneNode();return a.appendChild(c),"noEvents"!==t&&a.appendChild(p),a},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(a.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return c});var n=i(0),r=(i.n(n),i(7)),a=i(1),s=i(2),o=i(3),l=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),c=function(e){function t(t){var i=e.call(this,t,"day")||this;return i.isResource=!1,i}return l(t,e),t.prototype.renderAppointments=function(){this.parent.dragAndDropModule&&this.parent.dragAndDropModule.setDragArea(),this.fields=this.parent.eventFields;for(var e="Year"===this.parent.currentView?"."+o.A:"."+o.D+",."+o.z,t=[].slice.call(this.parent.element.querySelectorAll(e)),r=0,a=t;r<a.length;r++){var l=a[r];i.i(n.remove)(l)}this.renderedEvents=[],"Year"===this.parent.currentView?this.yearViewEvents():(this.removeCellHeight(),this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?(this.isResource=!0,this.timelineResourceEvents()):this.timelineYearViewEvents()),this.parent.renderTemplates(),this.parent.notify(s.G,{})},t.prototype.yearViewEvents=function(){for(var e=this.getMonths(),t=0,r=e;t<r.length;t++)for(var s=r[t],l=".e-month-calendar:nth-child("+(e.indexOf(s)+1)+") td.e-work-cells",c=[].slice.call(this.parent.element.querySelectorAll(l)),p=new Date(this.parent.selectedDate.getFullYear(),s,1),d=this.parent.calendarUtil.getMonthStartDate(new Date(p.getTime())),h=this.parent.calendarUtil.getMonthEndDate(new Date(p.getTime())),u=a.l(d,this.parent.firstDayOfWeek),g=a.d(a.m(h,this.parent.firstDayOfWeek),1),v=0;u.getTime()<g.getTime();v++){var f=a.b(new Date(u.getTime())),m=a.d(new Date(f.getTime()),1);if(u=a.d(new Date(u.getTime()),1),this.parent.isMinMaxDate(f)){var y=this.parent.eventBase.filterEvents(f,m);if(y.length>0){var T=c[parseInt(v.toString(),10)];T&&T.appendChild(i.i(n.createElement)("div",{className:o.A}))}}}},t.prototype.timelineYearViewEvents=function(){var e=this,t=this.parent.element.querySelector("."+o.n+":not(."+o.t+")");this.cellWidth=a.J(t),this.cellHeader=a.D(t.querySelector("."+o.o));var r=this.parent.element.querySelector("."+o.i);this.eventHeight=a.h(r,o.A);var s="."+o.f+" tbody tr,."+o.y+" tbody tr,."+o.h+" tbody tr";this.addCellHeight(s,this.eventHeight,2,this.cellHeader,this.moreIndicatorHeight);for(var l=[].slice.call(this.parent.element.querySelectorAll("."+o.l)),c=this.getMonths(),p=this.parent.activeViewOptions.group.resources.length>0&&this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:void 0,d=0;d<c.length;d++){var h=l[parseInt(d.toString(),10)],u=d+1,g=i.i(n.createElement)("div",{className:o.D});h.appendChild(g);var v=new Date(this.parent.selectedDate.getFullYear(),c[parseInt(d.toString(),10)],1),f=new Date(v.getFullYear(),v.getMonth()+1,0),m=v.getDay(),y=[];for("Horizontal"===this.parent.activeViewOptions.orientation&&(this.renderedEvents=[]);v.getTime()<=f.getTime();){var T=void 0,w=void 0;if("Vertical"===this.parent.activeViewOptions.orientation){var D=l[parseInt(m.toString(),10)];u=m+1,g=D.querySelector("."+o.D),g||(g=i.i(n.createElement)("div",{className:o.D}),D.appendChild(g)),this.parent.enableRtl?w=d*this.cellWidth:T=d*this.cellWidth}else this.parent.enableRtl?w=(m+v.getDate()-1)*this.cellWidth:T=(m+v.getDate()-1)*this.cellWidth;var b=this.parent.element.querySelector(".e-content-wrap tr:nth-child("+u+") td");this.cellHeight=b.offsetHeight;var S=a.b(new Date(v.getTime())),C=a.d(new Date(S.getTime()),1),O=void 0;this.parent.uiStateValues.isGroupAdaptive&&(O=this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]);var E=this.parent.eventBase.filterEvents(S,C,void 0,O);E=this.parent.eventBase.sortByDateTime(E);for(var x=this,A=0,V=E.length;A<V;A++)!function(e,t){var r=i.i(n.extend)({},E[parseInt(e.toString(),10)],null,!0);x.updateSpannedEvents(r,S,C);var a=x.getIndex(S);r.Index=a;var s=x.cellHeader+x.eventHeight*(a+1)+2+x.moreIndicatorHeight,o=x.cellHeight-x.cellHeader-x.moreIndicatorHeight,l=Math.floor(o/(x.eventHeight+2)),c=x.parent.rowAutoHeight?1:x.parent.activeViewOptions.maxEventsPerRow,h=x.parent.activeViewOptions.maxEventsPerRow?t-c:t-l<=0?1:t-l;if("Horizontal"===x.parent.activeViewOptions.orientation){var u=x.renderedEvents.filter(function(e){return e.Guid===r.Guid}),f=y.filter(function(e){return e.Guid===r.Guid});if(u.length>0&&u[0].MoreIndicator||f.length>0&&f[0].MoreIndicator){var D="Horizontal"===x.parent.activeViewOptions.orientation?d:m;return x.renderMoreIndicator(g,h,S,D,T,w,p),"continue"}if(u.length>0||f.length>0)return"continue"}var O=x.maxOrIndicator||a<c||x.cellHeight>s;if(x.parent.rowAutoHeight||O||x.cellHeight>s)x.renderEvent(g,r,d,T,w,v,m),(x.parent.rowAutoHeight||x.cellHeight>s)&&x.updateCellHeight(b,s),y.push(r);else{var D="Horizontal"===x.parent.activeViewOptions.orientation?d:m;x.renderMoreIndicator(g,h,S,D,T,w,p),"Horizontal"===x.parent.activeViewOptions.orientation&&(r.MoreIndicator=!0,x.renderedEvents.push(r),y.push(r))}}(A,V);v=a.d(new Date(v.getTime()),1),"Vertical"===this.parent.activeViewOptions.orientation&&(m++,this.renderedEvents=[])}}if(this.parent.rowAutoHeight&&"Vertical"===this.parent.activeViewOptions.orientation){var I=[].slice.call(this.parent.element.querySelectorAll("."+o.l)),M=[].slice.call(this.parent.element.querySelectorAll("."+o.h+" tbody tr"));I.forEach(function(t,i){var n=[].slice.call(t.querySelectorAll("."+o.A)),r=M[parseInt(i.toString(),10)].offsetTop+e.cellHeader+2;n.forEach(function(t){var i=parseInt(t.getAttribute("data-index"),10);t.style.top=r+i*e.eventHeight+"px",t.removeAttribute("data-index")})})}},t.prototype.updateSpannedEvents=function(e,t,i){var n=this.isResource&&"Vertical"===this.parent.activeViewOptions.orientation||!this.isResource&&"Horizontal"===this.parent.activeViewOptions.orientation,r={isLeft:!0,isRight:!0,isBottom:!0,isTop:!0};t.getTime()<=e[this.fields.startTime].getTime()&&(n?r.isLeft=!1:r.isTop=!1),(i.getTime()>=e[this.fields.endTime].getTime()||n&&!this.isResource&&a.d(i,-1).getMonth()===e[this.fields.endTime].getMonth()||n&&this.isResource&&i.getTime()<=e[this.fields.endTime].getTime())&&(n?r.isRight=!1:r.isBottom=!1),e.data=r},t.prototype.timelineResourceEvents=function(){var e=this,t=this.parent.element.querySelector("."+o.g),i=t.offsetWidth>t.clientWidth,n=this.parent.element.querySelector("."+o.n);this.cellWidth=a.J(n),this.cellHeader=0;var r=this.parent.element.querySelector("."+o.i);this.eventHeight=a.h(r,o.A);var s="."+o.f+" tbody tr,."+o.y+" tbody tr,."+o.h+" tbody tr";this.addCellHeight(s,this.eventHeight,2,this.cellHeader,this.moreIndicatorHeight);var l=[].slice.call(this.parent.element.querySelectorAll("."+o.l)),c=this.parent.uiStateValues.isGroupAdaptive?[this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]]:this.parent.activeViewOptions.allowVirtualScrolling?this.parent.resourceBase.renderedResources:this.parent.resourceBase.lastResourceLevel,p=this.getMonths();if("Horizontal"===this.parent.activeViewOptions.orientation)for(var d=0;d<p.length;d++)for(var h=new Date(this.parent.selectedDate.getFullYear(),p[parseInt(d.toString(),10)],1),u=0,g=c.length;u<g;u++)this.renderedEvents=[],this.renderResourceEvent(l[parseInt(d.toString(),10)],c[parseInt(u.toString(),10)],d,u,h);else for(var u=0,g=c.length;u<g;u++){this.renderedEvents=[];for(var d=0;d<p.length;d++){var h=new Date(this.parent.selectedDate.getFullYear(),p[parseInt(d.toString(),10)],1);this.renderResourceEvent(l[parseInt(u.toString(),10)],c[parseInt(u.toString(),10)],d,u,h)}}if(this.parent.rowAutoHeight&&!i&&t.offsetWidth>t.clientWidth){[].slice.call(this.parent.element.querySelectorAll("."+o.A)).forEach(function(e){e.style.removeProperty("left"),e.style.removeProperty("right")});var v=[].slice.call(this.parent.element.querySelectorAll("."+o.l)),f=this.parent.element.querySelector("."+o.h),m=[].slice.call(f.querySelectorAll("tbody tr"));v.forEach(function(t,i){var n=[].slice.call(t.children),r=m[parseInt(i.toString(),10)];n.forEach(function(t,i){var n=r.querySelector("td:nth-child("+(i+1)+")"),s=[].slice.call(t.children),o=a.J(n),l=n.offsetLeft;if(e.parent.enableRtl){var c=f.offsetWidth-l-n.offsetWidth;s.forEach(function(e){e.style.width=Math.floor(parseInt(e.style.width,10)/o)*o+"px",e.style.right=c+"px"})}else s.forEach(function(e){e.style.width=Math.floor(parseInt(e.style.width,10)/o)*o+"px",e.style.left=l+"px"})})})}},t.prototype.renderResourceEvent=function(e,t,r,s,l){var c=i.i(n.createElement)("div",{className:o.D});e.appendChild(c);var p=a.d(a.o(new Date(l.getTime())),1),d=this.parent.eventBase.filterEvents(l,p,void 0,t),h="Vertical"===this.parent.activeViewOptions.orientation?s:r,u=this.parent.element.querySelector(".e-content-wrap tr:nth-child("+(h+1)+") td");this.cellHeight=u.offsetHeight,this.groupOrder=t.groupOrder;for(var g=[],v=this,f=0;f<d.length;f++){var m=function(e){var t=d[parseInt(e.toString(),10)],a=void 0,o=i.i(n.extend)({},t,null,!0);if(v.parent.activeViewOptions.group.resources.length>0){var p=v.isSpannedEvent(o,l);a=v.getIndex(p[v.fields.startTime]),o.Index=a}else a=v.getIndex(o[v.fields.startTime]),o.Index=a;var h=v.cellHeader+v.eventHeight*(e+1)+2+v.moreIndicatorHeight,f="Vertical"===v.parent.activeViewOptions.orientation?r*v.cellWidth:s*v.cellWidth;if(!v.parent.isMinMaxDate(o[v.fields.startTime]))return{value:void 0};if("Vertical"===v.parent.activeViewOptions.orientation&&v.parent.activeViewOptions.group.resources.length>0){var m=v.renderedEvents.filter(function(e){return e.Guid===o.Guid}),y=g.filter(function(e){return e.Guid===o.Guid});if(m.length>0||y.length>0)return"continue"}if(!(v.parent.rowAutoHeight||v.cellHeight>h)){var T="Horizontal"===v.parent.activeViewOptions.orientation?r:s;if(v.renderMoreIndicator(c,d.length-e,l,T,f,f,s),"Horizontal"===v.parent.activeViewOptions.orientation)for(var w=s;w<d.length;w++)v.renderedEvents.push(i.i(n.extend)({},d[parseInt(w.toString(),10)],{Index:a+w},!0));return"break"}v.renderEvent(c,o,r,f,f,l,s),v.updateCellHeight(u,h),g.push(o)}(f);if("object"==typeof m)return m.value;if("break"===m)break}},t.prototype.renderEvent=function(e,t,r,o,l,c,p){var d,h,u=this,g=this.isSpannedEvent(t,c),v=this.createEventElement(g);if(1===g.isSpanned.count){var f=a.d(g[this.fields.endTime],-1);g[this.fields.endTime]=f>g[this.fields.startTime]?f:g[this.fields.endTime]}if(!(g[this.fields.startTime]>g[this.fields.endTime])){"Horizontal"===this.parent.activeViewOptions.orientation?(h=r+1,g[this.fields.startTime].getTime()===g[this.fields.endTime].getTime()&&(g.isSpanned.count=1),d=g.isSpanned.count*this.cellWidth):(h=p+1,d=this.isResource?g.isSpanned.count*this.cellWidth:this.cellWidth);var m=this.parent.element.querySelector(".e-content-wrap tr:nth-child("+h+") td"),y=m.offsetTop+this.cellHeader+this.eventHeight*g.Index+2;i.i(n.setStyleAttribute)(v,{width:d+"px",height:this.eventHeight+"px",left:o+"px",right:l+"px",top:y+"px"}),!this.isResource&&this.parent.rowAutoHeight&&"Vertical"===this.parent.activeViewOptions.orientation&&v.setAttribute("data-index",g.Index.toString());var T={data:g,element:v,cancel:!1,type:"event"};this.parent.trigger(s.m,T,function(t){t.cancel||(e.appendChild(v),u.wireAppointmentEvents(v,g),u.parent.activeViewOptions.group.resources.length>0?u.renderedEvents.push(i.i(n.extend)({},g,null,!0)):"Vertical"===u.parent.activeViewOptions.orientation?u.renderedEvents.push(i.i(n.extend)({},g,null,!0)):((g.isSpanned.isRight||g.isSpanned.isLeft)&&"Horizontal"===u.parent.activeViewOptions.orientation||!g.isSpanned.isRight)&&u.renderedEvents.push(i.i(n.extend)({},g,null,!0)))})}},t.prototype.renderMoreIndicator=function(e,t,r,s,o,l,c){if(0!==this.parent.activeViewOptions.group.resources.length||!e.querySelector('[data-start-date="'+r.getTime()+'"]')){var p;p=this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?a.d(a.o(new Date(r.getTime())),1):a.d(new Date(r.getTime()),1);var d=this.getMoreIndicatorElement(t,r,p),h=this.parent.element.querySelector(".e-content-wrap tr:nth-child("+(s+1)+")"),u=h.offsetTop+(this.cellHeight-this.moreIndicatorHeight);o=Math.floor(o/this.cellWidth)*this.cellWidth,l=Math.floor(l/this.cellWidth)*this.cellWidth,i.i(n.setStyleAttribute)(d,{width:this.cellWidth+"px",left:o+"px",right:l+"px",top:u+"px"}),i.i(n.isNullOrUndefined)(c)||d.setAttribute("data-group-index",c.toString()),e.appendChild(d),n.EventHandler.add(d,"click",this.moreIndicatorClick,this)}},t.prototype.createEventElement=function(e){var t=e[this.fields.subject]||this.parent.eventSettings.fields.subject.default||this.parent.localeObj.getConstant("addTitle"),r=i.i(n.createElement)("div",{className:o.A,attrs:{"data-id":"Appointment_"+e[this.fields.id],"data-guid":e.Guid,role:"button",tabindex:"0","aria-disabled":this.parent.eventBase.getReadonlyAttribute(e),"aria-label":this.parent.getAnnouncementString(e)}});if(this.cssClass&&i.i(n.addClass)([r],this.cssClass),e[this.fields.isReadonly]&&i.i(n.addClass)([r],o._56),this.parent.activeViewOptions.group.resources.length>0){var a=this.getGroupIndexFromEvent(e);r.setAttribute("data-group-index",a.toString())}var s=[],l=i.i(n.extend)({},e,null,!0);if(this.parent.activeViewOptions.eventTemplate){var c=this.parent.element.id+"_"+this.parent.activeViewOptions.eventTemplateName+"eventTemplate";s=this.parent.getAppointmentTemplate()(l,this.parent,"eventTemplate",c,!1)}else{var p=e[this.fields.location]||this.parent.eventSettings.fields.location.default||"",d=i.i(n.createElement)("div",{className:o.H,innerHTML:t+(p?";&nbsp"+p:"")}),h=i.i(n.createElement)("div",{className:o.I+(this.parent.isAdaptive?" "+o.J:""),innerHTML:this.parent.getTimeString(l[this.fields.startTime])}),u=i.i(n.createElement)("div",{className:o.I+(this.parent.isAdaptive?" "+o.J:""),innerHTML:this.parent.getTimeString(l[this.fields.endTime])});i.i(n.addClass)([d],"e-text-center"),e[this.fields.isAllDay]?s=[d]:l.isLeft||l.isRight?(l.isLeft||s.push(h),s.push(d),l.isRight||s.push(u)):s=[h,d,u]}var g=i.i(n.createElement)("div",{className:o.G});return i.i(n.append)(s,g),r.appendChild(g),this.parent.eventBase.renderSpannedIcon(r,e.isSpanned),this.renderResizeHandler(r,e.data,e[this.fields.isReadonly]),this.applyResourceColor(r,l,"backgroundColor",this.groupOrder),r},t.prototype.isSpannedEvent=function(e,t){var r=new Date(t.getFullYear(),t.getMonth(),1),s=a.d(new Date(t.getFullYear(),t.getMonth()+1,0),1),o=i.i(n.extend)({},e,null,!0),l=o[this.fields.startTime],c=o[this.fields.endTime],p={isLeft:!1,isRight:!1,count:1},d=new Date(this.parent.selectedDate.getFullYear(),this.parent.firstMonthOfYear,1),h=a.u(d,this.parent.monthsCount);if(this.isResource&&this.updateSpannedEvents(e,r,s),"Vertical"===this.parent.activeViewOptions.orientation&&this.parent.activeViewOptions.group.resources.length>0){this.updateSpannedEventDetails(l,c,d,h,o,p);var u=o[this.fields.startTime],g=new Date(o[this.fields.endTime]-1);p.count=g.getMonth()-u.getMonth()+this.parent.monthsCount*(g.getFullYear()-u.getFullYear())+1}else if(this.updateSpannedEventDetails(l,c,r,s,o,p),0===this.parent.activeViewOptions.group.resources.length||this.parent.uiStateValues.isGroupAdaptive){var v=a.b(o[this.fields.endTime]).getTime(),f=a.b(o[this.fields.startTime]).getTime();(e[this.fields.isAllDay]&&v===e[this.fields.endTime].getTime()||p.isRight)&&(v=a.d(new Date(v),-1).getTime()),p.count=Math.ceil((v-f)/a.c)+1}return o.isSpanned=p,a.b(l).getTime()<a.b(this.parent.minDate).getTime()&&(o[this.fields.startTime]=this.parent.minDate),a.b(c).getTime()>a.b(this.parent.maxDate).getTime()&&(o[this.fields.endTime]=this.parent.maxDate),o},t.prototype.updateSpannedEventDetails=function(e,t,i,n,r,a){e.getTime()<i.getTime()&&(r[this.fields.startTime]=i,a.isLeft=!0),t.getTime()>n.getTime()&&(r[this.fields.endTime]=n,a.isRight=!0)},t.prototype.getOverlapEvents=function(e,t){var i,n,r=[];if(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var s=this.parent.calendarUtil.getMonthStartDate(new Date(e.getTime())),o=a.d(this.parent.calendarUtil.getMonthEndDate(new Date(e.getTime())),-1);i=a.b(new Date(s.getTime())).getTime(),n=a.b(new Date(o.getTime())).getTime()}else this.parent.rowAutoHeight?(i=a.b(new Date(e.getTime())).getTime(),n=a.d(a.b(new Date(e.getTime())),1).getTime()):i=n=a.b(new Date(e.getTime())).getTime();for(var l=0,c=t;l<c.length;l++){var p=c[l],d=new Date(p[this.fields.startTime].getTime()),h=new Date(p[this.fields.endTime].getTime()),u=p[this.fields.isAllDay]?a.b(h).getTime()>i:a.b(h).getTime()>=i;a.b(d).getTime()<=i&&u||a.b(d).getTime()>=i&&a.b(h).getTime()<=n?r.push(p):"Vertical"===this.parent.activeViewOptions.orientation&&a.b(d).getTime()>=i&&a.b(h).getTime()>=n&&r.push(p)}return r},t.prototype.getMonths=function(){var e=this;return Array.apply(null,{length:this.parent.monthsCount}).map(function(t,i){return e.parent.firstMonthOfYear+i})},t.prototype.removeCellHeight=function(){for(var e="."+o.f+" tbody tr,."+o.y+" tbody tr,."+o.h+" tbody tr",t=[].slice.call(this.element.querySelectorAll(e)),i=0,n=t;i<n.length;i++){n[i].firstElementChild.style.height=""}},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.parent=null},t}(r.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(0),r=(i.n(n),i(6)),a=(i.n(r),i(3)),s=i(1),o=function(){function e(e){this.parent=e,this.tooltipObj=new r.Tooltip({animation:{close:{effect:"FadeOut"}},content:"No title",position:"BottomRight",offsetY:10,mouseTrail:!this.parent.isAdaptive,showTipPointer:!1,cssClass:this.parent.cssClass+" "+a._88,target:this.getTargets(),beforeRender:this.onBeforeRender.bind(this),beforeClose:this.onTooltipClose.bind(this),enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer}),this.tooltipObj.appendTo(this.parent.element)}return e.prototype.getTargets=function(){var e=[];return this.parent.activeViewOptions.group.headerTooltipTemplate&&e.push("."+a._59),this.parent.eventSettings.enableTooltip&&e.push("."+a.A),e.join(",")},e.prototype.onBeforeRender=function(e){if(i.i(n.isNullOrUndefined)(e.target.getAttribute("data-tooltip-id"))){if(e.target.classList.contains(a._59)&&this.parent.activeViewOptions.group.resources.length>0){var t=void 0;if(this.parent.activeView.isTimelineView()){var r=parseInt(e.target.getAttribute("data-group-index"),10);t=this.parent.resourceBase.lastResourceLevel[parseInt(r.toString(),10)]}else{var o=e.target.parentNode.sectionRowIndex,l=e.target.cellIndex;t=this.parent.activeView.getColumnLevels()[parseInt(o.toString(),10)][parseInt(l.toString(),10)]}var c={resource:t.resource,resourceData:t.resourceData},p=i.i(n.createElement)("div"),d=this.parent.element.id+"_headerTooltipTemplate",h=[].slice.call(this.parent.getHeaderTooltipTemplate()(c,this.parent,"headerTooltipTemplate",d,!1));return i.i(n.append)(h,p),this.setContent(p),void this.parent.renderTemplates()}var u=this.parent.eventBase.getEventByGuid(e.target.getAttribute("data-guid"));if(!i.i(n.isNullOrUndefined)(u)){if(i.i(n.isNullOrUndefined)(this.parent.eventSettings.tooltipTemplate)){var g=this.parent.globalize,v=this.parent.eventFields,f=new Date(""+u[v.startTime]),m=new Date(""+u[v.endTime]);m=0===m.getHours()&&0===m.getMinutes()?new Date(m.setMilliseconds(-1e3)):m;var y=s.b(new Date(""+f)),T=s.b(new Date(""+m)),w=u[v.subject]||this.parent.eventSettings.fields.subject.default||this.parent.localeObj.getConstant("addTitle"),D=i.i(n.isNullOrUndefined)(u[v.location])?"":u[v.location],b="",S="",C="";b=g.formatDate(f,{type:"date",skeleton:"MMMd",calendar:this.parent.getCalendarMode()}),S=g.formatDate(f,{type:"date",skeleton:"medium",calendar:this.parent.getCalendarMode()}),C=g.formatDate(m,{type:"date",skeleton:"medium",calendar:this.parent.getCalendarMode()}),b=s.a(b,"single"),S=s.a(S,"single"),C=s.a(C,"single");var O=this.parent.getTimeString(f),E=this.parent.getTimeString(m),x=void 0;y.getTime()===T.getTime()?(x=g.formatDate(f,{type:"date",skeleton:"long",calendar:this.parent.getCalendarMode()}),x=s.a(x,"single")):x=y.getFullYear()===T.getFullYear()?b+" - "+C:S+" - "+C;var A=u[v.isAllDay]?this.parent.localeObj.getConstant("allDay"):O+" - "+E,V='<div><div class="e-subject">'+w+'</div><div class="e-location">'+D+'</div><div class="e-details">'+x+'</div><div class="e-all-day">'+A+"</div></div>",I=function(){return V};this.setContent(i.i(n.initializeCSPTemplate)(I))}else{var p=i.i(n.createElement)("div"),d=this.parent.element.id+"_tooltipTemplate",h=[].slice.call(this.parent.getEventTooltipTemplate()(u,this.parent,"tooltipTemplate",d,!1));i.i(n.append)(h,p),this.setContent(p)}this.parent.renderTemplates()}}},e.prototype.onTooltipClose=function(e){e.element&&(i.i(n.removeClass)([e.element],a.T),i.i(n.addClass)([e.element],a._89)),this.parent.resetTemplates(["tooltipTemplate","headerTooltipTemplate"])},e.prototype.setContent=function(e){this.tooltipObj.setProperties({content:e},!0)},e.prototype.close=function(){this.tooltipObj.close()},e.prototype.destroy=function(){this.tooltipObj.destroy(),i.i(n.addClass)([this.parent.element],"e-control"),this.tooltipObj=null,this.parent=null},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(0),r=(i.n(n),i(12)),a=(i.n(r),i(3)),s=function(){function e(){}return e.prototype.renderFormValidator=function(e,t,i,n){var a=this;this.element=i,this.formObj=new r.FormValidator(e,{locale:n,customPlacement:function(e,t){a.errorPlacement(e,t)},rules:t,validationComplete:function(e){a.validationComplete(e)},focusout:function(e){a.focusOut(e)}})},e.prototype.focusOut=function(e){var t=e.relatedTarget;t&&(t.classList.contains("e-dlg-closeicon-btn")||t.classList.contains("e-close")||t.classList.contains(a.U)||t.classList.contains(a.e)||t.classList.contains(a._120)||t.classList.contains(a.n)||t.classList.contains(a._144))?this.ignoreError=!0:this.ignoreError=!1},e.prototype.validationComplete=function(e){var t=this.element.querySelector("#"+e.inputName+"_Error");t&&(t.style.display="failure"===e.status?"":"none")},e.prototype.errorPlacement=function(e,t){var r=t.getAttribute("for"),a=this.element.querySelector("#"+r+"_Error");a||this.ignoreError||this.createTooltip(e,t,r,""),i.i(n.isNullOrUndefined)(a)||(a.querySelector(".e-error").innerHTML=t.innerHTML)},e.prototype.createTooltip=function(e,t,r,s){var o,l,c=e.getBoundingClientRect();this.element.classList.contains(a._90)?(o=this.element,l=this.element.getBoundingClientRect()):(o=this.element.querySelector(".e-schedule-dialog .e-dlg-content"),l=o.getBoundingClientRect());var p=i.i(n.createElement)("div",{className:"e-tooltip-wrap e-popup "+a._145,id:r+"_Error",styles:"display:"+s+";top:"+(c.bottom-l.top+o.scrollTop+9)+"px;left:"+(c.left-l.left+o.scrollLeft+c.width/2)+"px;"}),d=i.i(n.createElement)("div",{className:"e-tip-content"});d.appendChild(t);var h=i.i(n.createElement)("div",{className:"e-arrow-tip e-tip-top"});h.appendChild(i.i(n.createElement)("div",{className:"e-arrow-tip-outer e-tip-top"})),h.appendChild(i.i(n.createElement)("div",{className:"e-arrow-tip-inner e-tip-top"})),p.appendChild(d),p.appendChild(h),o.appendChild(p),p.style.left=parseInt(p.style.left,10)-p.offsetWidth/2+"px"},e.prototype.destroyToolTip=function(){if(this.element)for(var e=[].slice.call(this.element.querySelectorAll("."+a._145)),t=0,r=e;t<r.length;t++){var s=r[t];i.i(n.remove)(s)}this.formObj&&this.formObj.element&&this.formObj.reset()},e.prototype.destroy=function(){this.formObj&&this.formObj.element&&!this.formObj.isDestroyed&&this.formObj.destroy(),this.formObj=null,this.element=null},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return c});var n=i(0),r=(i.n(n),i(24)),a=i(1),s=i(2),o=i(3),l=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),c=function(e){function t(t){var i=e.call(this,t)||this;return i.viewClass="e-agenda-view",i.isInverseTableSelect=!1,i.agendaDates={},i.virtualScrollTop=1,i}return l(t,e),t.prototype.getModuleName=function(){return"agenda"},t.prototype.renderLayout=function(){this.agendaDates={},this.element=i.i(n.createElement)("div",{className:o._20}),i.i(n.addClass)([this.element],this.viewClass),this.element.appendChild(this.createTableLayout(o._24)),this.element.querySelector("table").setAttribute("role","presentation"),this.parent.element.querySelector("."+o._55).appendChild(this.element);var e=i.i(n.createElement)("tr");this.element.querySelector("tbody").appendChild(e);var t=i.i(n.createElement)("td");e.appendChild(t);var r=i.i(n.createElement)("div",{className:o.g});t.appendChild(r);var l=this.createTableLayout(o.h);this.setAriaAttributes(l),r.appendChild(l);var c=l.querySelector("tbody"),p=a.b(this.parent.selectedDate);this.renderEmptyContent(c,p),this.wireEvents(),this.parent.resourceBase&&this.parent.resourceBase.generateResourceLevels([{renderDates:this.parent.activeView.renderDates}]),this.parent.uiStateValues.isGroupAdaptive&&!this.parent.element.querySelector("."+o._25)&&this.renderResourceMobileLayout(),this.parent.notify(s.G,{})},t.prototype.eventLoad=function(e){this.dataSource=i.i(n.extend)([],this.parent.eventsData,null,!0);for(var t=0,r=this.parent.eventsData;t<r.length;t++){delete r[t].generatedDates}var l=this.parent.activeViewOptions.allowVirtualScrolling?e.processedData:this.parent.eventsProcessed;if(this.parent.uiStateValues.isGroupAdaptive){var c=this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex];this.dataSource=this.parent.eventBase.filterEventsByResource(c,this.dataSource),l=this.parent.eventBase.filterEventsByResource(c,l)}this.parent.eventsProcessed=this.processAgendaEvents(l);var p=a.b(this.parent.selectedDate),d=this.element.querySelector("."+o.h+" tbody");a.E(d),this.renderInitialContent(d,p),this.wireEventActions(),i.i(n.closest)(d,"."+o.g).scrollTop=1,this.parent.notify(s.F,{}),this.parent.activeViewOptions.allowVirtualScrolling||this.retainScrollPosition()},t.prototype.refreshEvent=function(e){for(var t=[],r=this.parent.eventFields,a=0,s=this.dataSource;a<s.length;a++){var o=s[a];i.i(n.isNullOrUndefined)(o[r.recurrenceID])&&!i.i(n.isNullOrUndefined)(o[r.recurrenceRule])&&!i.i(n.isNullOrUndefined)(o.generatedDates)&&e>=o.generatedDates.end&&(t=t.concat(this.parent.eventBase.generateOccurrence(o,e)))}this.parent.eventsProcessed=this.parent.eventsProcessed.concat(this.processAgendaEvents(t))},t.prototype.refreshHeader=function(){var e=this.element.querySelector("."+o.h+" tbody");this.parent.activeViewOptions.group.byDate?a.E(e):i.i(n.remove)(e.firstElementChild);var t=a.b(this.parent.selectedDate),r=i.i(n.createElement)("tbody"),s=new Date(t.getTime()),l=this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.hideEmptyAgendaDays?this.getEndDateFromStartDate(s):a.d(s,this.parent.agendaDaysCount);this.renderContent(r,s,l),i.i(n.append)([].slice.call(r.childNodes),e)},t.prototype.renderInitialContent=function(e,t){var r=i.i(n.createElement)("tbody"),s=new Date(t.getTime()),o=this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.hideEmptyAgendaDays?this.getEndDateFromStartDate(s):a.d(s,this.parent.agendaDaysCount);if(this.renderContent(r,s,o),i.i(n.append)([].slice.call(r.childNodes),e),this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.hideEmptyAgendaDays&&this.parent.eventsData.length>0)for(var l=this.getContentAreaElement(),c=l.querySelector(".e-content-table");l.offsetWidth<=l.clientWidth&&!(this.parent.isAdaptive&&c.offsetHeight>=l.clientHeight);){var p=i.i(n.createElement)("tbody");if(o=s,s=a.d(o,-this.parent.agendaDaysCount),this.renderContent(p,s,o),i.i(n.prepend)([].slice.call(p.childNodes),e),s<=this.parent.minDate)break}e.childNodes.length<=0&&this.renderEmptyContent(e,t)},t.prototype.renderContent=function(e,t,r){var s=this.parent.eventFields,l=new Date(t.getTime()),c=this.appointmentFiltering(l,r);if(c.length>0&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.hideEmptyAgendaDays)if(this.parent.activeViewOptions.showWeekend||this.isAgendaWorkDay(c[0][s.startTime]))t=new Date(new Date(c[0][s.startTime].getTime()).setHours(0,0,0,0)),this.updateHeaderText(c[0][s.startTime]);else for(var p=0,d=c;p<d.length;p++){var h=d[p];if(this.isAgendaWorkDay(h[s.startTime])){t=new Date(new Date(h[s.startTime].getTime()).setHours(0,0,0,0)),this.updateHeaderText(h[s.startTime]);break}}var u;if(!this.parent.hideEmptyAgendaDays||this.parent.agendaDaysCount>0&&c.length>0){if(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var g=t;this.parent.activeViewOptions.group.byDate||(this.parent.activeViewOptions.allowVirtualScrolling=!1,g=l,this.parent.headerModule&&(this.parent.headerModule.updateDateRange(),this.parent.headerModule.updateHeaderItems("remove"))),this.calculateResourceTableElement(e,this.parent.agendaDaysCount,g,r)}else for(var v=0;v<this.parent.agendaDaysCount;v++){var f=this.createTableRowElement(t,"data"),m=this.element.querySelector('tr[data-row-index="'+ +f.dataset.rowIndex+'"]');if(m||!this.parent.activeViewOptions.showWeekend&&!this.isAgendaWorkDay(t)){if(t=a.d(t,1),!m&&this.parent.activeViewOptions.allowVirtualScrolling&&v--,t.getTime()>r.getTime())break}else{var y=f.children[0],T=f.children[1],w=this.appointmentFiltering(t);if(w.length>0||!this.parent.hideEmptyAgendaDays&&0===w.length){var D=this.parent.hideEmptyAgendaDays||0!==w.length?"data":"noEvents";y.appendChild(this.createDateHeaderElement(t)),f.appendChild(y);var b=this.createAgendaContentElement(D,w,T);f.appendChild(b),b.querySelectorAll("li").length>0&&e.appendChild(f)}else this.parent.activeViewOptions.allowVirtualScrolling&&v--;if(this.isCurrentDate(new Date(t.getTime()))&&i.i(n.addClass)(y.childNodes,o._49),t=a.d(t,1),t.getTime()>r.getTime())break}}u=new Date(t.getTime()-a.c)}this.agendaDates={start:l,end:u}},t.prototype.isAgendaWorkDay=function(e){return this.parent.uiStateValues.isGroupAdaptive&&!this.parent.group.byDate?this.isWorkDay(e,this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex].workDays):this.isWorkDay(e)},t.prototype.agendaScrolling=function(e){this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(),this.parent.activeViewOptions.allowVirtualScrolling&&this.virtualScrolling(e),this.parent.activeViewOptions.allowVirtualScrolling||this.setPersistence()},t.prototype.virtualScrolling=function(e){var t,r,s=e.target,o=s.scrollTop,l=s.scrollHeight,c=s.clientHeight,p=o+c,d=this.virtualScrollTop<o?"next":"previous",h=s.querySelector("tbody"),u=i.i(n.createElement)("tbody"),g=this.getElementFromScrollerPosition(e),v=this.parent.getDateFromElement(g);if(0===o){if(t=this.getPreviousNextDate(a.d(v,-1),d),r=this.appointmentFiltering(t.start,t.end),r.length>0||!this.parent.hideEmptyAgendaDays){this.renderContent(u,t.start,t.end),i.i(n.prepend)([].slice.call(u.childNodes),h),this.wireEventActions();for(var f=0,m=h.children;f<m.length;f++)if(m[parseInt(f.toString(),10)].getAttribute("data-row-index")===g.getAttribute("data-column-index")){var y=m[parseInt(f.toString(),10)].offsetTop-this.element.querySelector(".e-agenda-item").offsetHeight;s.scrollTop=y;break}this.updateHeaderText(v)}}else p>=l-5?(t=this.getPreviousNextDate(a.d(v,1),d),r=this.appointmentFiltering(t.start,t.end),(r.length>0||!this.parent.hideEmptyAgendaDays)&&(this.renderContent(u,t.start,t.end),i.i(n.append)([].slice.call(u.childNodes),h),this.wireEventActions(),this.updateHeaderText(v))):this.updateHeaderText(v);this.virtualScrollTop=o;var T=this.parent.eventBase.getSelectedAppointments();T.length>0&&T[T.length-1].focus()},t.prototype.getElementFromScrollerPosition=function(e){var t,r,a,s=e.target,l=s.scrollTop,c=s.scrollHeight,p=s.clientHeight,d=l+p,h=[].slice.call(s.querySelectorAll(".e-agenda-item"));if(h.length>0)if(0===l)r=h[0],t=i.i(n.closest)(r,"."+o._47);else if(d===c)r=h[h.length-1],t=i.i(n.closest)(r,"."+o._47);else for(var u=0,g=h.length;u<g;u++)if(r=h[parseInt(u.toString(),10)],a=r.getBoundingClientRect(),a.top>=0){t=i.i(n.closest)(r,"."+o._47);break}return t},t.prototype.updateHeaderText=function(e){this.parent.showHeaderBar&&this.parent.headerModule.updateDateRange(e)},t.prototype.getPreviousNextDate=function(e,t){var i=new Date(e.getTime()),n=this.getStartDateFromEndDate(e),r=this.getEndDateFromStartDate(e),s=0;do{if(this.parent.activeViewOptions.showWeekend||!this.parent.activeViewOptions.showWeekend&&this.isAgendaWorkDay(i)){(this.appointmentFiltering(i).length>0||!this.parent.hideEmptyAgendaDays)&&s++}if((i=a.d(i,"next"===t?1:-1))<n||i>r)break}while(s!==this.parent.agendaDaysCount);var o=a.d(i,"next"===t?-1:1);return"next"===t?{start:e,end:a.d(o,1)}:{start:o,end:a.d(e,1)}},t.prototype.appointmentFiltering=function(e,t){var r,s;!i.i(n.isNullOrUndefined)(e)&&i.i(n.isNullOrUndefined)(t)?(r=a.b(new Date(e.getTime())),s=a.r(new Date(r.getTime()),a.c)):(r=new Date(e.getTime()),s=new Date(t.getTime()));var o=this.parent.eventBase.filterEvents(r,s);return 0===o.length&&(this.refreshEvent(e),o=this.parent.eventBase.filterEvents(r,s)),o},t.prototype.getStartDateFromEndDate=function(e){var t,i=this.parent.eventFields;if(this.parent.eventsProcessed.length>0){var n=Math.min.apply(Math,this.parent.eventsProcessed.map(function(e){return e[i.startTime].getTime()}));t=this.parent.hideEmptyAgendaDays?new Date(n):this.parent.minDate}else t=this.parent.hideEmptyAgendaDays?a.u(e,-1):this.parent.minDate;return a.b(t)},t.prototype.getEndDateFromStartDate=function(e){var t,i=this.parent.eventFields;if(this.parent.eventsProcessed.length>0){var n=Math.max.apply(Math,this.parent.eventsProcessed.map(function(e){return e[i.endTime].getTime()}));t=this.parent.hideEmptyAgendaDays?new Date(n):this.parent.maxDate}else t=this.parent.hideEmptyAgendaDays?a.u(e,1):this.parent.maxDate;return a.b(a.d(t,1))},t.prototype.getNextPreviousDate=function(e){var t="next"===e?1:-1;return a.d(this.parent.selectedDate,t)},t.prototype.startDate=function(){return a.b(this.parent.selectedDate)},t.prototype.endDate=function(){return this.parent.activeViewOptions.allowVirtualScrolling?this.getEndDateFromStartDate(this.startDate()):a.d(this.startDate(),this.parent.agendaDaysCount)},t.prototype.getDateRangeText=function(e){var t=this.parent.activeViewOptions.dateFormat?this.parent.activeViewOptions.dateFormat:"MMMM y";if(this.parent.activeViewOptions.allowVirtualScrolling||this.parent.isAdaptive){var r=i.i(n.isNullOrUndefined)(e)?this.parent.selectedDate:e;return a.a(this.parent.globalize.formatDate(r,{format:t,calendar:this.parent.getCalendarMode()}),"multiple")}var s=this.parent.selectedDate,o=a.d(s,this.parent.agendaDaysCount-1);return this.formatDateRange(s,o)},t.prototype.dayNavigationClick=function(e){var t=i.i(n.closest)(e.currentTarget,"."+o._47),r=this.parent.getDateFromElement(t);i.i(n.isNullOrUndefined)(r)||this.parent.isAdaptive||!this.parent.isMinMaxDate(r)||(this.parent.setProperties({selectedDate:r},!0),this.parent.changeView("Day",e))},t.prototype.wireEvents=function(){n.EventHandler.add(this.element.querySelector("."+o.g),s.H,this.agendaScrolling,this)},t.prototype.unWireEvents=function(){n.EventHandler.remove(this.element.querySelector("."+o.g),s.H,this.agendaScrolling);for(var e=[].slice.call(this.element.querySelectorAll(".e-m-date")),t=0,i=e;t<i.length;t++){var r=i[t];n.EventHandler.remove(r,"click",this.dayNavigationClick)}},t.prototype.addEventListener=function(){this.parent.on(s.J,this.onAgendaScrollUiUpdate,this),this.parent.on(s.E,this.eventLoad,this)},t.prototype.removeEventListener=function(){this.parent&&(this.parent.off(s.J,this.onAgendaScrollUiUpdate),this.parent.off(s.E,this.eventLoad))},t.prototype.onAgendaScrollUiUpdate=function(){var e=this.getHeaderBarHeight();this.parent.headerModule&&(this.parent.activeViewOptions.allowVirtualScrolling?this.parent.headerModule.updateHeaderItems("add"):this.parent.headerModule.updateHeaderItems("remove"));var t=this.element.querySelector("."+o.g);"auto"!==this.parent.height&&(t.style.height=i.i(n.formatUnit)(this.parent.element.offsetHeight-e))},t.prototype.scrollToDate=function(e){var t=new Date(+a.b(e));if(this.parent.activeViewOptions.allowVirtualScrolling)(!this.parent.hideEmptyAgendaDays||this.parent.getEvents(t,a.d(t,1),!0).length>0)&&this.parent.changeDate(t);else{var i=this.element.querySelector("."+o._47+'[data-date="'+t.getTime()+'"]');i&&(this.getContentAreaElement().scrollTop=i.offsetTop)}},t.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed||this.element&&(this.unWireEvents(),this.parent.resourceBase&&this.parent.resourceBase.destroy(),this.parent.headerModule&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.headerModule.updateHeaderItems("remove"),e.prototype.destroy.call(this))},t}(r.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var n=i(10),r=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),a=function(e){function t(t){var i=e.call(this,t)||this;return i.viewClass="e-day-view",i}return r(t,e),t.prototype.getModuleName=function(){return"day"},t}(n.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var n=i(0),r=(i.n(n),i(39)),a=(i.n(r),i(19)),s=(i.n(a),i(6)),o=(i.n(s),i(2)),l=i(1),c=i(3),p=this&&this.__assign||function(){return p=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},p.apply(this,arguments)},d=function(){function e(e){this.parent=e,this.l10n=this.parent.localeObj,this.renderHeader(),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(o.L,this.closeHeaderPopup,this)},e.prototype.removeEventListener=function(){this.parent.off(o.L,this.closeHeaderPopup)},e.prototype.closeHeaderPopup=function(e){var t=i.i(n.closest)(e.event.target,".e-date-range,.e-header-popup,.e-day,.e-selected"),r=i.i(n.closest)(e.event.target,".e-hor-nav,.e-toolbar-pop"),a=this.parent.element.querySelector("."+c.g);if(this.parent.isAdaptive)if(i.i(n.isNullOrUndefined)(r)||!r.classList.contains("e-toolbar-pop")&&!r.classList.contains("e-hor-nav")||r.classList.contains("e-hor-nav")&&this.element.querySelector(".e-toolbar-pop").classList.contains(c.T)){i.i(n.removeClass)([a],c._69);var s=this.element.querySelector(".e-toolbar-pop");if(!i.i(n.isNullOrUndefined)(s)){var o=s.ej2_instances[0];!o||!i.i(n.isNullOrUndefined)(r)&&r.classList.contains("e-hor-nav")&&s.classList.contains(c.T)||o.hide()}}else i.i(n.addClass)([a],c._69);i.i(n.isNullOrUndefined)(t)&&this.hideHeaderPopup()},e.prototype.hideHeaderPopup=function(){this.headerPopup&&this.headerPopup.hide()},e.prototype.renderHeader=function(){this.element=i.i(n.createElement)("div",{className:c._70});var e=i.i(n.createElement)("div",{className:c._71});this.element.appendChild(e),this.parent.element.insertBefore(this.element,this.parent.element.firstElementChild),this.renderToolbar()},e.prototype.renderToolbar=function(){var e=this,t=this.parent.toolbarItems&&this.parent.toolbarItems.length>0?this.getToolbarItems():this.getItems();this.parent.trigger(o.f,{requestType:"toolbarItemRendering",items:t},function(t){e.toolbarObj=new r.Toolbar({items:t.items,overflowMode:"Popup",clicked:e.toolbarClickHandler.bind(e),enableRtl:e.parent.enableRtl,enableHtmlSanitizer:e.parent.enableHtmlSanitizer,locale:e.parent.locale}),e.toolbarObj.root=e.parent.root?e.parent.root:e.parent,e.toolbarObj.appendTo(e.parent.element.querySelector("."+c._71)),e.toolbarObj.element.setAttribute("aria-label","Scheduler");var i=e.toolbarObj.element.querySelector(".e-prev");i&&i.firstElementChild.setAttribute("title",e.l10n.getConstant("previous"));var n=e.toolbarObj.element.querySelector(".e-next");n&&n.firstElementChild.setAttribute("title",e.l10n.getConstant("next")),e.updateAddIcon(),e.updateActiveView(),e.parent.trigger(o.g,{requestType:"toolBarItemRendered",items:e.toolbarObj.items})})},e.prototype.updateItems=function(){var e=this;if(this.toolbarObj){var t=this.getItems();this.parent.trigger(o.f,{requestType:"toolbarItemRendering",items:t},function(t){e.toolbarObj.items=t.items,e.toolbarObj.dataBind(),e.parent.trigger(o.g,{requestType:"toolBarItemRendered",items:e.toolbarObj.items})})}},e.prototype.getPopUpRelativeElement=function(){return this.parent.isAdaptive?this.toolbarObj.element:this.element.querySelector(".e-date-range")},e.prototype.setDayOfWeek=function(e){this.headerCalendar&&(this.headerCalendar.firstDayOfWeek=e,this.headerCalendar.dataBind())},e.prototype.setCalendarDate=function(e){this.headerCalendar&&(this.headerCalendar.value=e,this.headerCalendar.dataBind())},e.prototype.setCalendarMinMaxDate=function(){this.headerCalendar&&(this.headerCalendar.min=this.parent.minDate,this.headerCalendar.max=this.parent.maxDate,this.headerCalendar.dataBind())},e.prototype.getCalendarView=function(){return["Month","MonthAgenda","TimelineMonth"].indexOf(this.parent.currentView)>-1?"Year":["Year","TimelineYear"].indexOf(this.parent.currentView)>-1?"Decade":"Month"},e.prototype.setCalendarView=function(){if(this.headerCalendar){var e=this.getCalendarView();this.headerCalendar.depth=e,this.headerCalendar.start=e,this.headerCalendar.refresh()}},e.prototype.updateActiveView=function(){var e=[].slice.call(this.toolbarObj.element.querySelectorAll(".e-views"));i.i(n.removeClass)(e,["e-active-view"]),e.length>0&&e[this.parent.viewIndex]&&i.i(n.addClass)([e[this.parent.viewIndex]],["e-active-view"])},e.prototype.updateDateRange=function(e){var t=this.toolbarObj.element.querySelector(".e-date-range");if(t){var r=t.querySelector(".e-tbar-btn-text");if(this.parent.activeViewOptions.dateRangeTemplate){r.textContent="";var a={startDate:this.parent.activeView.getStartDate(),endDate:this.parent.activeView.getEndDate(),currentView:this.parent.currentView},s=this.parent.activeViewOptions.dateRangeTemplateName,o=this.parent.element.id+"_"+s+"dateRangeTemplate",l=[].slice.call(this.parent.getDateRangeTemplate()(a,this.parent,"dateRangeTemplate",o,!1));i.i(n.append)(l,r)}else{var c=this.parent.activeView.getDateRangeText(e);t.firstElementChild.setAttribute("aria-label",c),r.textContent=c}this.refresh()}},e.prototype.refresh=function(){this.toolbarObj&&this.toolbarObj.refreshOverflow()},e.prototype.updateAddIcon=function(){var e=this.toolbarObj.element.querySelector(".e-add");e&&(this.parent.eventSettings.allowAdding?i.i(n.removeClass)([e],c._72):i.i(n.addClass)([e],c._72))},e.prototype.getDateRangeText=function(){var e=this.parent.globalize.formatDate(this.parent.selectedDate,{format:"MMMM y",calendar:this.parent.getCalendarMode()});return l.a(e,"single")},e.prototype.getItemModel=function(e){var t={};return e.id&&(t.id=e.id),e.text&&(t.text=e.text),e.tooltipText&&(t.tooltipText=e.tooltipText),e.prefixIcon&&(t.prefixIcon=e.prefixIcon),e.cssClass&&(t.cssClass=e.cssClass),"Both"!==e.showTextOn&&(t.showTextOn=e.showTextOn),e.template&&(t.template=e.template),e.disabled&&(t.disabled=e.disabled),"auto"!==e.width&&(t.width=e.width),e.suffixIcon&&(t.suffixIcon=e.suffixIcon),"Left"!==e.align&&(t.align=e.align),"None"!==e.overflow&&(t.overflow=e.overflow),e.htmlAttributes&&(t.htmlAttributes=e.htmlAttributes),"Button"!==e.type&&(t.type=e.type),!0!==e.visible&&(t.visible=e.visible),e.showAlwaysInPopup&&(t.showAlwaysInPopup=e.showAlwaysInPopup),-1!==e.tabIndex&&(t.tabIndex=e.tabIndex),t},e.prototype.getToolbarItems=function(){for(var e,t=[],i=0,n=this.parent.toolbarItems;i<n.length;i++){var r=n[i];e=this.getItemModel(r);var a=void 0;if(r.name)switch(r.name){case"Today":a={showAlwaysInPopup:this.parent.isAdaptive||this.parent.enableAdaptiveUI,prefixIcon:"e-icon-today",text:this.l10n.getConstant("today"),cssClass:"e-today",overflow:"Show"},a.align=e.align?e.align:r.align,t.push(p({},a,e));break;case"Previous":a={prefixIcon:"e-icon-prev",tooltipText:"Previous",overflow:"Show",cssClass:"e-prev",htmlAttributes:{role:"navigation"}},a.align=e.align?e.align:r.align,t.push(p({},a,e));break;case"Next":a={prefixIcon:"e-icon-next",tooltipText:"Next",overflow:"Show",cssClass:"e-next",htmlAttributes:{role:"navigation"}},a.align=e.align?e.align:r.align,t.push(p({},a,e));break;case"DateRangeText":a={text:this.getDateRangeText(),suffixIcon:"e-icon-down-arrow",cssClass:"e-date-range",overflow:"Show",htmlAttributes:{"aria-atomic":"true","aria-live":"assertive",role:"navigation"}},a.align=e.align?e.align:r.align,t.push(p({},a,e));break;case"NewEvent":a={showAlwaysInPopup:this.parent.isAdaptive||this.parent.enableAdaptiveUI,prefixIcon:"e-icon-add",text:this.l10n.getConstant("newEvent"),cssClass:"e-add",overflow:"Show"},a.align=e.align?e.align:r.align,t.push(p({},a,e));break;case"Views":if(this.parent.views.length>1)for(var s=0,o=this.parent.views;s<o.length;s++){var l=o[s];a=this.getItemObject(l),a.align=e.align?e.align:r.align,t.push(p({},a,e))}break;case"Custom":t.push(r)}else t.push(r)}return t},e.prototype.getItems=function(){var e=[];if(e.push({align:"Left",prefixIcon:"e-icon-prev",tooltipText:"Previous",overflow:"Show",cssClass:"e-prev"}),e.push({align:"Left",prefixIcon:"e-icon-next",tooltipText:"Next",overflow:"Show",cssClass:"e-next"}),e.push({align:"Left",text:this.getDateRangeText(),suffixIcon:"e-icon-down-arrow",cssClass:"e-date-range",overflow:"Show",htmlAttributes:{"aria-atomic":"true","aria-live":"assertive"}}),this.parent.isAdaptive||this.parent.enableAdaptiveUI?(e.push({align:"Right",showAlwaysInPopup:this.parent.isAdaptive||this.parent.enableAdaptiveUI,prefixIcon:"e-icon-add",text:this.l10n.getConstant("newEvent"),cssClass:"e-add",overflow:"Show"}),e.push({align:"Right",showAlwaysInPopup:this.parent.isAdaptive||this.parent.enableAdaptiveUI,prefixIcon:"e-icon-today",text:this.l10n.getConstant("today"),cssClass:"e-today",overflow:"Show"})):(e.push({align:"Right",showAlwaysInPopup:this.parent.isAdaptive||this.parent.enableAdaptiveUI,prefixIcon:"e-icon-today",text:this.l10n.getConstant("today"),cssClass:"e-today",overflow:"Show"}),this.parent.views.length>1&&e.push({align:"Right",type:"Separator",cssClass:"e-schedule-seperator"})),this.parent.views.length>1)for(var t=0,i=this.parent.views;t<i.length;t++){var n=i[t];e.push(this.getItemObject(n))}return e},e.prototype.getItemObject=function(e){var t,i;"string"==typeof e?(t=e.toLowerCase(),i=null):(t=e.option.toLowerCase(),i=e.displayName);var n,r,a=this.parent.isAdaptive||this.parent.enableAdaptiveUI;switch(t){case"day":n={align:"Right",showAlwaysInPopup:a,prefixIcon:"e-icon-day",text:i||this.l10n.getConstant("day"),cssClass:"e-views e-day"};break;case"week":n={align:"Right",showAlwaysInPopup:a,prefixIcon:"e-icon-week",text:i||this.l10n.getConstant("week"),cssClass:"e-views e-week"};break;case"workweek":n={align:"Right",showAlwaysInPopup:a,prefixIcon:"e-icon-workweek",text:i||this.l10n.getConstant("workWeek"),cssClass:"e-views e-work-week"};break;case"month":n={align:"Right",showAlwaysInPopup:a,prefixIcon:"e-icon-month",text:i||this.l10n.getConstant("month"),cssClass:"e-views e-month"};break;case"year":n={align:"Right",showAlwaysInPopup:a,prefixIcon:"e-icon-year",text:i||this.l10n.getConstant("year"),cssClass:"e-views e-year"};break;case"agenda":n={align:"Right",showAlwaysInPopup:a,prefixIcon:"e-icon-agenda",text:i||this.l10n.getConstant("agenda"),cssClass:"e-views e-agenda"};break;case"monthagenda":n={align:"Right",showAlwaysInPopup:a,prefixIcon:"e-icon-month-agenda",text:i||this.l10n.getConstant("monthAgenda"),cssClass:"e-views e-month-agenda"};break;case"timelineday":n={align:"Right",showAlwaysInPopup:a,prefixIcon:"e-icon-timeline-day",text:i||this.l10n.getConstant("timelineDay"),cssClass:"e-views e-timeline-day"};break;case"timelineweek":n={align:"Right",showAlwaysInPopup:a,prefixIcon:"e-icon-timeline-week",text:i||this.l10n.getConstant("timelineWeek"),cssClass:"e-views e-timeline-week"};break;case"timelineworkweek":n={align:"Right",showAlwaysInPopup:a,prefixIcon:"e-icon-timeline-workweek",text:i||this.l10n.getConstant("timelineWorkWeek"),cssClass:"e-views e-timeline-work-week"};break;case"timelinemonth":n={align:"Right",showAlwaysInPopup:a,prefixIcon:"e-icon-timeline-month",text:i||this.l10n.getConstant("timelineMonth"),cssClass:"e-views e-timeline-month"};break;case"timelineyear":r="Vertical"===e.orientation?"vertical":"horizontal",n={align:"Right",showAlwaysInPopup:a,prefixIcon:"e-icon-timeline-year-"+r,text:i||this.l10n.getConstant("timelineYear"),cssClass:"e-views e-timeline-year"}}return n},e.prototype.renderHeaderPopup=function(){var e=i.i(n.createElement)("div",{className:c._73}),t=i.i(n.createElement)("div",{className:c._74});e.appendChild(t),this.element.appendChild(e),this.headerPopup=new s.Popup(e,{actionOnScroll:"hide",targetType:"relative",relateTo:this.getPopUpRelativeElement(),position:{X:"left",Y:"bottom"},enableRtl:this.parent.enableRtl});var r=this.getCalendarView(),o="Month"===this.parent.currentView&&!i.i(n.isNullOrUndefined)(this.parent.activeViewOptions.displayDate)&&!this.hasSelectedDate();this.headerCalendar=new a.Calendar({value:o?this.parent.activeViewOptions.displayDate:this.parent.selectedDate,min:this.parent.minDate,max:this.parent.maxDate,firstDayOfWeek:this.parent.activeViewOptions.firstDayOfWeek,enableRtl:this.parent.enableRtl,locale:this.parent.locale,depth:r,start:r,calendarMode:this.parent.calendarMode,change:this.calendarChange.bind(this)}),this.setCalendarTimezone(),this.headerCalendar.appendTo(t),this.headerPopup.hide()},e.prototype.calendarChange=function(e){if(e.value.getTime()!==this.parent.selectedDate.getTime()){var t=l.b(new Date(e.value));this.parent.changeDate(t)}this.headerPopup.hide()},e.prototype.setCalendarTimezone=function(){this.headerCalendar&&(this.headerCalendar.timezone=this.parent.timezone||this.parent.tzModule.getLocalTimezoneName())},e.prototype.calculateViewIndex=function(e){var t=i.i(n.closest)(e.originalEvent.target,".e-views");return[].slice.call(this.element.querySelectorAll(".e-views")).indexOf(t)},e.prototype.toolbarClickHandler=function(e){if(e.item){var t,r,a,s=e.item.cssClass.replace("e-views ","");switch(s){case"e-date-range":this.headerPopup||this.renderHeaderPopup(),this.headerPopup.element.classList.contains(c.T)?this.headerPopup.hide():this.headerPopup.show();break;case"e-day":this.parent.changeView("Day",e.originalEvent,void 0,this.calculateViewIndex(e));break;case"e-week":this.parent.changeView("Week",e.originalEvent,void 0,this.calculateViewIndex(e));break;case"e-work-week":this.parent.changeView("WorkWeek",e.originalEvent,void 0,this.calculateViewIndex(e));break;case"e-month":this.parent.changeView("Month",e.originalEvent,void 0,this.calculateViewIndex(e));break;case"e-year":this.parent.changeView("Year",e.originalEvent,void 0,this.calculateViewIndex(e));break;case"e-agenda":this.parent.changeView("Agenda",e.originalEvent,void 0,this.calculateViewIndex(e));break;case"e-month-agenda":this.parent.changeView("MonthAgenda",e.originalEvent,void 0,this.calculateViewIndex(e));break;case"e-timeline-day":this.parent.changeView("TimelineDay",e.originalEvent,void 0,this.calculateViewIndex(e));break;case"e-timeline-week":this.parent.changeView("TimelineWeek",e.originalEvent,void 0,this.calculateViewIndex(e));break;case"e-timeline-work-week":this.parent.changeView("TimelineWorkWeek",e.originalEvent,void 0,this.calculateViewIndex(e));break;case"e-timeline-month":this.parent.changeView("TimelineMonth",e.originalEvent,void 0,this.calculateViewIndex(e));break;case"e-timeline-year":this.parent.changeView("TimelineYear",e.originalEvent,void 0,this.calculateViewIndex(e));break;case"e-today":a=l.b(this.parent.getCurrentTime()),("Agenda"===this.parent.currentView||"MonthAgenda"===this.parent.currentView||!this.parent.isSelectedDate(a)||"Month"===this.parent.currentView&&this.parent.activeViewOptions.displayDate&&!this.hasSelectedDate()&&l.b(this.parent.activeViewOptions.displayDate)!==a||"Month"===this.parent.currentView&&this.parent.activeViewOptions.numberOfWeeks>0&&!this.hasSelectedDate()&&l.b(l.n(this.parent.selectedDate))!==a)&&this.parent.changeDate(a,e.originalEvent);break;case"e-prev":this.parent.changeDate(this.parent.activeView.getNextPreviousDate("previous"),e.originalEvent);break;case"e-next":this.parent.changeDate(this.parent.activeView.getNextPreviousDate("next"),e.originalEvent);break;case"e-add":if(r=this.parent.activeCellsData.startTime.getTime()===this.parent.activeCellsData.endTime.getTime(),this.parent.activeCellsData&&!r)t=this.parent.activeCellsData;else{var o=this.parent.activeViewOptions.timeScale.interval,p=this.parent.activeViewOptions.timeScale.slotCount,d=o*l.g/p,h=new Date(this.parent.selectedDate.getTime()),u=this.parent.getCurrentTime();h.setHours(u.getHours(),Math.round(h.getMinutes()/d)*d,0);t={startTime:h,endTime:new Date(new Date(h.getTime()).setMilliseconds(h.getMilliseconds()+d)),isAllDay:!1}}this.parent.eventWindow.openEditor(i.i(n.extend)(t,{cancel:!1,event:e.originalEvent}),"Add")}if(!i.i(n.isNullOrUndefined)(this.toolbarObj)){var g=this.toolbarObj.element.querySelector(".e-toolbar-pop");g&&"Input"!==e.item.type&&g.ej2_instances[0].hide({name:"SlideUp",duration:100})}}},e.prototype.hasSelectedDate=function(){var e=l.b(this.parent.selectedDate).getTime();return e>=this.parent.activeView.getStartDate().getTime()&&e<=this.parent.activeView.getEndDate().getTime()},e.prototype.getHeaderElement=function(){return this.toolbarObj.element},e.prototype.updateHeaderItems=function(e){var t=this.toolbarObj.element.querySelector(".e-prev"),r=this.toolbarObj.element.querySelector(".e-next"),a=this.toolbarObj.element.querySelector(".e-date-range");t&&("add"===e?i.i(n.addClass)([t],c._72):i.i(n.removeClass)([t],c._72)),r&&("add"===e?i.i(n.addClass)([r],c._72):i.i(n.removeClass)([r],c._72)),a&&("add"===e?i.i(n.addClass)([a],c._64):i.i(n.removeClass)([a],c._64))},e.prototype.previousNextIconHandler=function(){var e="Agenda"===this.parent.currentView?[this.parent.getCurrentViewDates()[0]]:this.parent.getCurrentViewDates(),t=this.toolbarObj.element.querySelector("."+c._75),r=this.toolbarObj.element.querySelector("."+c._76),a=new Date(e[0].getTime()),s=new Date(e[e.length-1].getTime());if("WorkWeek"===this.parent.currentView||"TimelineWorkWeek"===this.parent.currentView)a=l.l(l.b(this.parent.selectedDate),this.parent.firstDayOfWeek),s=l.d(a,7*this.parent.activeViewOptions.interval);else if("Month"===this.parent.currentView){var o=!i.i(n.isNullOrUndefined)(this.parent.activeViewOptions.displayDate)||this.parent.activeViewOptions.numberOfWeeks>0;a=o?this.parent.activeView.getStartDate():l.n(this.parent.selectedDate),s=o?this.parent.activeView.getEndDate():l.o(l.u(a,this.parent.activeViewOptions.interval-1))}i.i(n.isNullOrUndefined)(t)||this.toolbarObj.enableItems(t,a>l.b(this.parent.minDate)),i.i(n.isNullOrUndefined)(r)||this.toolbarObj.enableItems(r,s<l.b(this.parent.maxDate)),this.setCalendarMinMaxDate()},e.prototype.getModuleName=function(){return"headerbar"},e.prototype.destroy=function(){this.headerPopup&&!this.headerPopup.isDestroyed&&(this.headerPopup.destroy(),this.headerPopup=null),this.headerCalendar&&!this.headerCalendar.isDestroyed&&(this.headerCalendar.destroy(),this.headerCalendar=null),this.toolbarObj&&!this.toolbarObj.isDestroyed&&(this.toolbarObj.destroy(),this.removeEventListener(),i.i(n.remove)(this.element),this.toolbarObj=null),this.element=null,this.parent=null,this.l10n=null},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return p});var n=i(0),r=(i.n(n),i(24)),a=i(9),s=i(1),o=i(2),l=i(3),c=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),p=function(e){function t(t){var i=e.call(this,t)||this;return i.dayNameFormat="narrow",i.viewClass="e-month-agenda-view",i.monthAgendaDate=new Date(""+t.selectedDate),i}return c(t,e),t.prototype.getModuleName=function(){return"monthAgenda"},t.prototype.renderAppointmentContainer=function(){var e=this.getContentAreaElement(),t=i.i(n.createElement)("div",{className:l._36});e.appendChild(t);var r=i.i(n.createElement)("div",{className:l._37});t.appendChild(r),this.appendAppContainer(r),this.setEventWrapperHeight()},t.prototype.getDayNameFormat=function(){return this.parent.isAdaptive?"narrow":"abbreviated"},t.prototype.updateSelectedCellClass=function(e){s.b(e.date).getTime()===s.b(this.monthAgendaDate).getTime()&&e.className.push(l._38)},t.prototype.setEventWrapperHeight=function(){var e=(this.parent.headerModule?this.parent.headerModule.getHeaderElement().offsetHeight:0)+2,t=this.parent.element.querySelector("."+l._39);t&&(e+=t.offsetHeight);var r=this.getContentAreaElement().firstElementChild,a=this.element.querySelector("."+l.d),s=this.parent.element.offsetHeight-e-a.offsetHeight,o=this.parent.activeViewOptions.interval>1?Math.round(.8*s):r.offsetHeight,c=s-o,p=this.element.querySelector("."+l._36),d=this.element.querySelector("."+l._37);"auto"!==this.parent.height&&(this.parent.activeViewOptions.interval>1&&(r.style.height=i.i(n.formatUnit)(o),n.EventHandler.add(r,"scroll",this.onContentScroll,this)),p.style.height=d.style.height=i.i(n.formatUnit)(c))},t.prototype.onDataReady=function(e){this.setEventWrapperHeight(),this.clearElements();var t=e.processedData;if(this.parent.uiStateValues.isGroupAdaptive){var r=this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex];t=this.parent.eventBase.filterEventsByResource(r,t)}this.agendaBase=this.getAgendaBase(),this.parent.eventsProcessed=this.agendaBase.processAgendaEvents(t);for(var a=0,c=0,p=this.renderDates;c<p.length;c++){var d=p[c],h=this.appointmentFiltering(d),u=this.element.querySelectorAll("."+l.n)[parseInt(a.toString(),10)];h.length>0&&(u.querySelector("."+l._40)||u.appendChild(i.i(n.createElement)("div",{className:l._40})),d.getTime()===s.b(new Date(this.monthAgendaDate.getTime())).getTime()&&this.onEventRender(h,d)),a++}this.parent.notify(o.F,{})},t.prototype.onCellClick=function(e){this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide();var t=this.appointmentFiltering(e.startTime);this.onEventRender(t,e.startTime),this.parent.notify(o.F,{}),this.monthAgendaDate=new Date(""+e.startTime)},t.prototype.onEventRender=function(e,t){this.agendaBase=this.getAgendaBase();var r=this.element.querySelector("."+l._37);if(s.E(r),0===this.parent.activeViewOptions.group.resources.length||this.parent.uiStateValues.isGroupAdaptive)if(e.length>0){var a=i.i(n.createElement)("div",{className:l.l});r.appendChild(this.agendaBase.createAgendaContentElement("data",e,a))}else this.appendAppContainer(r);else if(e.length>0){var o=this.createTableLayout(),c=o.querySelector("tbody");this.agendaBase.calculateResourceTableElement(c,1,t),o.appendChild(c),r.appendChild(o)}else this.appendAppContainer(r);this.agendaBase.wireEventActions()},t.prototype.appointmentFiltering=function(e){var t=s.b(new Date(e.getTime())),i=s.r(new Date(t.getTime()),s.c);return this.parent.eventBase.filterEvents(t,i)},t.prototype.clearElements=function(){for(var e=[].slice.call(this.element.querySelectorAll("."+l._40)),t=0,r=e;t<r.length;t++){var a=r[t];i.i(n.remove)(a)}this.appendAppContainer(this.element.querySelector("."+l._37))},t.prototype.appendAppContainer=function(e){var t=i.i(n.createElement)("div",{className:l.l});i.i(n.addClass)([t],l._41),t.innerHTML=this.parent.localeObj.getConstant("noEvents"),s.E(e),e.appendChild(t)},t.prototype.getNextPreviousDate=function(e){var t=this.parent.selectedDate,i="next"===e?this.parent.activeViewOptions.interval:-this.parent.activeViewOptions.interval,n=s.u(this.parent.selectedDate,i),r="next"===e?2:0,a=new Date(t.getFullYear(),t.getMonth()+r,0).getDate(),o=a>=this.monthAgendaDate.getDate()?this.monthAgendaDate.getDate():a;return this.monthAgendaDate=new Date(n.getFullYear(),n.getMonth(),o),this.monthAgendaDate},t.prototype.getAgendaBase=function(){return this.agendaBase||new r.a(this.parent)},t.prototype.destroy=function(){this.agendaBase&&(this.agendaBase.destroy(),this.agendaBase=null),e.prototype.destroy.call(this)},t}(a.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var n=i(0),r=(i.n(n),i(1)),a=function(){function e(e,t){this.parent=e,this.renderDates=t}return e.prototype.groupByYear=function(e){for(var t={},i=0,n=e;i<n.length;i++){var r=n[i],a=r.getFullYear();t[parseInt(a.toString(),10)]=t[parseInt(a.toString(),10)]||[],t[parseInt(a.toString(),10)].push(r)}return t},e.prototype.groupByMonth=function(e){for(var t={},i=0,n=e;i<n.length;i++){var r=n[i],a=12*(r.getFullYear()-1970)+r.getMonth();t[parseInt(a.toString(),10)]=t[parseInt(a.toString(),10)]||[],t[parseInt(a.toString(),10)].push(r)}return t},e.prototype.groupByWeek=function(e){for(var t={},i=0,n=e;i<n.length;i++){var a=n[i],s=+new Date(1970,0,1),o=a.getTimezoneOffset()-new Date(1970,0,1).getTimezoneOffset(),l=Math.ceil(((+a-s-60*o*1e3)/r.c+new Date(s).getDay()+1)/7);this.parent.firstDayOfWeek&&this.parent.firstDayOfWeek>new Date(+a).getDay()&&(l-=1),t[parseInt(l.toString(),10)]=t[parseInt(l.toString(),10)]||[],t[parseInt(l.toString(),10)].push(a)}return t},e.prototype.generateSlots=function(e,t,a,s,o){for(var l=this,c=function(e,t){return l.parent.globalize.formatDate(e,{format:t,calendar:l.parent.getCalendarMode()})},p=[],d=Object.keys(e),h=0;h<d.length;h++){var u=e[d[parseInt(h.toString(),10)]],g=void 0;if(a.template){var v={date:u[0],type:o},f=this.parent.element.id+"_headerRowTemplate";g=[].slice.call(this.parent.templateParser(a.template)(v,this.parent,"template",f,!1))}else{var m=void 0;switch(a.option){case"Year":m='<span class="e-header-year">'+c(u[0],"y")+"</span>";break;case"Month":m='<span class="e-header-month">'+i.i(r.a)(c(u[0],"MMMM"),"single")+"</span>";break;case"Week":m='<span class="e-header-week">'+this.parent.getWeekNumberContent(u)+"</span>"}var y=i.i(n.createElement)("div",{innerHTML:m});g=[].slice.call(y.childNodes)}p.push({date:u[0],type:o,className:[s],colSpan:u.length*t,template:g})}return p},e.prototype.generateColumnLevels=function(e,t){var i=[],n=this.parent.activeViewOptions.headerRows,r=1;"Hour"===n[n.length-1].option&&t.length>0&&(r=t.length/e.length);for(var a,s,o,l=[],c=0,p=n;c<p.length;c++){var d=p[c];switch(d.option){case"Year":a=this.groupByYear(this.renderDates),l=this.generateSlots(a,r,d,"e-header-year-cell","yearHeader"),i.push(l);break;case"Month":s=this.groupByMonth(this.renderDates),l=this.generateSlots(s,r,d,"e-header-month-cell","monthHeader"),i.push(l);break;case"Week":o=this.groupByWeek(this.renderDates),l=this.generateSlots(o,r,d,"e-header-week-cell","weekHeader"),i.push(l);break;case"Date":l=e,l=l.map(function(e){return e.colSpan=r,e}),i.push(l);break;case"Hour":t.length>0&&i.push(t)}}return i},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var n=i(0),r=(i.n(n),i(9)),a=i(7),s=i(32),o=i(1),l=i(2),c=i(3),p=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),d=function(e){function t(t){var i=e.call(this,t)||this;return i.viewClass="e-timeline-month-view",i.isInverseTableSelect=!0,i.appointment=null,i}return p(t,e),t.prototype.getModuleName=function(){return"timelineMonth"},t.prototype.onDataReady=function(){this.appointment=new a.a(this.parent,"day"),this.appointment.renderAppointments(),this.parent.notify(l.F,{})},t.prototype.getLeftPanelElement=function(){return this.element.querySelector("."+c.x)},t.prototype.scrollTopPanel=function(t){e.prototype.scrollTopPanel.call(this,t),this.scrollHeaderLabels(t)},t.prototype.setContentHeight=function(e,t,r){t&&(t.style.height=i.i(n.formatUnit)(r-this.getScrollXIndent(e))),e.style.height=i.i(n.formatUnit)(r)},t.prototype.getDateSlots=function(e,t){for(var i=[],n=0,r=e;n<r.length;n++){var a=r[n],s=[c.e];this.isCurrentDate(a)&&s.push(c.s),i.push({date:a,type:"dateHeader",className:s,colSpan:1,workDays:t})}return i},t.prototype.renderLeftIndent=function(e){this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.renderResourceHeaderIndent(e)},t.prototype.renderContent=function(){var e=i.i(n.createElement)("tr");if(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var t=i.i(n.createElement)("td");t.appendChild(this.parent.resourceBase.createResourceColumn()),e.appendChild(t)}var r=i.i(n.createElement)("td");this.element.querySelector("tbody").appendChild(e);var a=i.i(n.createElement)("div",{className:c.g});a.appendChild(this.renderContentArea()),a.appendChild(this.createEventTable(this.getRowCount())),this.collapseRows(a),n.EventHandler.add(a,"scroll",this.onContentScroll,this),r.appendChild(a),this.parent.virtualScrollModule&&this.parent.virtualScrollModule.renderVirtualTrack(a),e.appendChild(r)},t.prototype.getRowCount=function(){return this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?this.parent.resourceBase.renderedResources.length:1},t.prototype.getContentSlots=function(){for(var e=[],t=0;t<this.getRowCount();t++)for(var i=0,n=this.colLevels[this.colLevels.length-1];i<n.length;i++){var r=n[i];if(r.className=[c.n],this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var a=this.parent.resourceBase.renderedResources[parseInt(t.toString(),10)];r.workDays=a.resourceData[a.resource.workDaysField]||this.parent.workDays,r.className=r.className.concat(a.className),r.groupIndex=a.groupIndex,r.groupOrder=a.groupOrder}var s={date:new Date(+r.date),colSpan:r.colSpan,groupIndex:r.groupIndex,workDays:r.workDays,type:"monthCells",className:r.className};e[parseInt(t.toString(),10)]||(e[parseInt(t.toString(),10)]=[]),e[parseInt(t.toString(),10)].push(s)}return e},t.prototype.updateClassList=function(e){this.parent.isMinMaxDate(e.date)||e.className.push(c.r)},t.prototype.unWireEvents=function(){n.EventHandler.remove(this.getContentAreaElement(),"scroll",this.onContentScroll)},t.prototype.getMonthStart=function(e){var t=this.parent.calendarUtil.firstDateOfMonth(o.b(e));return new Date(t.getFullYear(),t.getMonth(),t.getDate())},t.prototype.getMonthEnd=function(e){var t=this.parent.calendarUtil.firstDateOfMonth(o.b(e));return this.parent.calendarUtil.lastDateOfMonth(o.u(new Date(+t),this.parent.activeViewOptions.interval-1))},t.prototype.generateColumnLevels=function(){var e=[],t=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays);e.push(t),this.parent.activeViewOptions.group.resources.length>0&&this.parent.resourceBase.generateResourceLevels(t,!this.parent.uiStateValues.isGroupAdaptive);var i=[];if(this.parent.activeViewOptions.headerRows.length>0){e=new s.a(this.parent,this.renderDates).generateColumnLevels(t,i)}return this.colLevels=e,e},t.prototype.getAdjustedDate=function(e){for(var t=this.colLevels[this.colLevels.length-1],i=0;i<t.length;i++)if(t[parseInt(i.toString(),10)].date.getTime()>e.getTime())return t[i-1].date;return null},t.prototype.destroy=function(){if(!(!this.parent||this.parent&&this.parent.isDestroyed)){if(this.element){var t=this.element.querySelector("."+c.g);t&&n.EventHandler.remove(t,"scroll",this.onContentScroll)}this.appointment&&(this.appointment.destroy(),this.appointment=null),e.prototype.destroy.call(this)}},t}(r.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var n=i(0),r=(i.n(n),i(10)),a=i(7),s=i(32),o=i(2),l=i(3),c=i(1),p=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),d=function(e){function t(t){var i=e.call(this,t)||this;return i.timelineAppointment=null,i.baseCssClass="e-timeline-view",i}return p(t,e),t.prototype.getModuleName=function(){return"timelineViews"},t.prototype.getLeftPanelElement=function(){return this.element.querySelector("."+l.x)},t.prototype.scrollTopPanel=function(t){e.prototype.scrollTopPanel.call(this,t),this.scrollHeaderLabels(t)},t.prototype.scrollToWorkHour=function(){var e=this.parent.getStartEndTime(this.parent.workHours.start),t=this.isWorkDay(this.parent.selectedDate)&&this.parent.workHours.highlight&&!i.i(n.isNullOrUndefined)(e)?new Date(+this.parent.selectedDate).setHours(e.getHours(),e.getMinutes(),0,0):new Date(+this.parent.selectedDate).setHours(0,0,0,0),r='[data-date="'+new Date(t).getTime().toString()+'"]',a=this.element.querySelector(r);a&&(this.getContentAreaElement().scrollLeft=this.parent.enableRtl?-(this.parent.getContentTable().offsetWidth-a.offsetLeft-a.offsetWidth):a.offsetLeft)},t.prototype.scrollToHour=function(e,t){var r,a;if(t&&(a=this.parent.getIndexOfDate(this.renderDates,c.b(t)))>=0&&(r=t,!i.i(n.isNullOrUndefined)(e))){var s=e.split(":");2===s.length&&(r=new Date(t.setHours(parseInt(s[0],10),parseInt(s[1],10),0)))}if(r=i.i(n.isNullOrUndefined)(t)?this.parent.getStartEndTime(e):r,!i.i(n.isNullOrUndefined)(r)){var o;o=i.i(n.isNullOrUndefined)(e)||!this.parent.activeViewOptions.timeScale.enable?a*c.J(this.element.querySelector(".e-work-cells")):i.i(n.isNullOrUndefined)(t)?this.getLeftFromDateTime(null,r):this.getLeftFromDateTime([a],r),this.getScrollableElement().scrollLeft=this.parent.enableRtl?-o:o}},t.prototype.generateColumnLevels=function(){var e=[],t=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays);e.push(t),this.parent.activeViewOptions.group.resources.length>0&&this.parent.resourceBase.generateResourceLevels(t,!this.parent.uiStateValues.isGroupAdaptive);var i=[];if(this.parent.activeViewOptions.timeScale.enable&&(i=this.generateTimeSlots(e[e.length-1]),e.push(i)),this.parent.activeViewOptions.headerRows.length>0){e=new s.a(this.parent,this.renderDates).generateColumnLevels(t,i)}return e},t.prototype.generateTimeSlots=function(e){for(var t=this,r=function(e){return e.type=e.first?"majorSlot":"minorSlot",e.className=e.first?[l._12]:[l._12,l._13],e.workDays=t.parent.activeViewOptions.workDays,e},a=this.getTimeSlotRows(r),s=[],o=0,p=e;o<p.length;o++){var d=p[o];d.colSpan=a.length;for(var h=i.i(n.extend)([],a,null,!0),u=0,g=h;u<g.length;u++){var v=g[u],f=c.b(new Date(""+d.date));v.date=c.r(f,c.s(v.date)),s.push(v)}}return s},t.prototype.changeCurrentTimePosition=function(){if(!(!this.parent||this.parent&&this.parent.isDestroyed)){this.removeCurrentTimeIndicatorElements();var e=this.getCurrentTimeIndicatorIndex(),t=this.getLeftFromDateTime(e,this.parent.getCurrentTime()),r=this.element.querySelector("."+l.h).offsetHeight,a=this.element.querySelector("."+l.d);if(this.element.querySelector("."+l.g).appendChild(i.i(n.createElement)("div",{className:l._14,styles:(this.parent.enableRtl?"right":"left")+":"+i.i(n.formatUnit)(t)+"; height:"+i.i(n.formatUnit)(r)})),this.parent.virtualScrollModule){var s=this.parent.element.querySelector("."+l._14),o=this.parent.element.querySelector("."+l.g+" table");i.i(n.setStyleAttribute)(s,{transform:o.style.transform})}var c=i.i(n.createElement)("div",{innerHTML:this.parent.getTimeString(this.parent.getCurrentTime()),className:l._15});a.appendChild(c),c.style[this.parent.enableRtl?"right":"left"]=i.i(n.formatUnit)(t-c.offsetWidth/2)}},t.prototype.getLeftFromDateTime=function(e,t){var r=this.getStartHour(),a=0,s=60*(t.getHours()-r.getHours())+(t.getMinutes()-r.getMinutes());if(!i.i(n.isNullOrUndefined)(e)&&0!==e[0]){var o=this.parent.activeView.colLevels.findIndex(function(e){return"dateHeader"===e[0].type});if(this.parent.activeView.colLevels[parseInt(o.toString(),10)]&&this.parent.activeView.colLevels[parseInt(o.toString(),10)][0].colSpan)a=e[0]*this.parent.activeView.colLevels[parseInt(o.toString(),10)][0].colSpan*c.J(this.element.querySelector(".e-work-cells"));else{var l=this.getEndHour(),p=0===l.getHours()?24:l.getHours();s+=e[0]*(60*(p-r.getHours())+(l.getMinutes()-r.getMinutes()))}}return a+s*c.J(this.element.querySelector(".e-work-cells"))*this.parent.activeViewOptions.timeScale.slotCount/this.parent.activeViewOptions.timeScale.interval},t.prototype.renderHeader=function(){var e=i.i(n.createElement)("tr");this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.renderResourceHeaderIndent(e);var t=i.i(n.createElement)("td");t.appendChild(this.renderDatesHeader()),e.appendChild(t),i.i(n.prepend)([e],this.element.querySelector("tbody"))},t.prototype.createAllDayRow=function(e,t){},t.prototype.getCurrentTimeIndicatorIndex=function(){var e=[],t=this.parent.getIndexOfDate(this.renderDates,c.b(this.parent.getCurrentTime()));return t>=0&&e.push(t),e},t.prototype.renderContent=function(){var e=i.i(n.createElement)("tr");if(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var t=i.i(n.createElement)("td");t.appendChild(this.parent.resourceBase.createResourceColumn()),e.appendChild(t)}var r=i.i(n.createElement)("td"),a=this.renderContentArea();a.appendChild(this.createEventTable(this.getRowCount())),this.collapseRows(a),r.appendChild(a),e.appendChild(r),this.parent.virtualScrollModule&&this.parent.virtualScrollModule.renderVirtualTrack(a),this.element.querySelector("tbody").appendChild(e)},t.prototype.getRowCount=function(){return this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?this.parent.resourceBase.renderedResources.length:1},t.prototype.getResourceTdData=function(e,t){var i=this.parent.resourceBase.renderedResources[parseInt(e.toString(),10)],n=i.resourceData[i.resource.startHourField]||this.parent.workHours.start,r=i.resourceData[i.resource.endHourField]||this.parent.workHours.end;return t.startHour=this.parent.getStartEndTime(n),t.endHour=this.parent.getStartEndTime(r),t.workDays=i.resourceData[i.resource.workDaysField]||this.parent.workDays,t.className=i.className,t.groupIndex=i.groupIndex,t.groupOrder=i.groupOrder,t},t.prototype.renderContentTable=function(e){var t=e.querySelector("tbody");i.i(n.append)(this.getContentRows(),t)},t.prototype.getContentRows=function(){for(var e=[],t=i.i(n.createElement)("tr"),r=i.i(n.createElement)("td",{attrs:{"aria-selected":"false"}}),a=this.getRowCount(),s=0;s<a;s++){for(var o=t.cloneNode(),l=0,c=this.colLevels[this.colLevels.length-1];l<c.length;l++){var p=c[l];this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(p=this.getResourceTdData(s,p));var d=this.createContentTd(p,p,r);o.appendChild(d)}e.push(o)}return e},t.prototype.getContentTdClass=function(e){return e.first||!this.parent.activeViewOptions.timeScale.enable?[l.n]:[l.n,l._16]},t.prototype.renderEvents=function(){this.timelineAppointment=new a.a(this.parent,this.parent.activeViewOptions.timeScale.enable?"hour":"day"),this.timelineAppointment.renderAppointments(),this.parent.notify(o.F,{})},t.prototype.getAdjustedDate=function(e){if(!this.parent.activeViewOptions.timeScale.enable)return new Date(e.setHours(0,0,0,0));for(var t=this.colLevels[this.colLevels.length-1],i=0;i<t.length;i++)if(t[parseInt(i.toString(),10)].date.getTime()>e.getTime())return t[i-1].date;return null},t.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed||(this.timelineAppointment&&(this.timelineAppointment.destroy(),this.timelineAppointment=null),e.prototype.destroy.call(this))},t}(r.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return c});var n=i(0),r=(i.n(n),i(16)),a=i(2),s=i(3),o=i(1),l=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),c=function(e){function t(t){var i=e.call(this,t)||this;return i.viewClass="e-timeline-year-view",i.isInverseTableSelect=!0,i}return l(t,e),t.prototype.getModuleName=function(){return"timelineYear"},t.prototype.renderHeader=function(e){var t=i.i(n.createElement)("tr");if(e.appendChild(t),"Vertical"===this.parent.activeViewOptions.orientation&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive)this.parent.resourceBase.renderResourceHeaderIndent(t);else{var r=i.i(n.createElement)("td",{className:s.a});t.appendChild(r),r.appendChild(this.renderResourceHeader(s.b))}var o="Horizontal"===this.parent.activeViewOptions.orientation,l=this.parent.activeViewOptions.group.resources.length>0;this.isInverseTableSelect=!(o&&!l);var c=i.i(n.createElement)("td");t.appendChild(c);var p=i.i(n.createElement)("div",{className:s.c});if(c.appendChild(p),"Horizontal"===this.parent.activeViewOptions.orientation&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive)p.appendChild(this.renderResourceHeader(s.d)),this.columnCount=this.colLevels.slice(-1)[0].length;else{var d=i.i(n.createElement)("div",{className:s.d});p.appendChild(d);var h=this.createTableLayout();d.appendChild(h),h.appendChild(this.createTableColGroup(this.columnCount));var u=i.i(n.createElement)("tr");h.querySelector("tbody").appendChild(u);for(var g=this.getMonths(),v=this.getMonthDates(new Date(this.parent.selectedDate.getFullYear(),g[0],1)),f=0;f<this.columnCount;f++){var m=new Date(this.parent.selectedDate.getFullYear(),g[parseInt(f.toString(),10)],1),y=i.i(n.createElement)("td",{className:s.e});"Horizontal"===this.parent.activeViewOptions.orientation?this.parent.dayHeaderTemplate?i.i(n.append)(this.renderDayMonthHeaderTemplate(v[parseInt(f.toString(),10)],f,"dayHeaderTemplate"),y):y.innerHTML="<span>"+this.parent.getDayNames("abbreviated")[f%7]+"</span>":(this.parent.monthHeaderTemplate?i.i(n.append)(this.renderDayMonthHeaderTemplate(m,g[parseInt(f.toString(),10)],"monthHeaderTemplate"),y):y.innerHTML="<span>"+this.getMonthName(m)+"</span>",y.setAttribute("data-date",m.getTime().toString())),u.appendChild(y),this.parent.trigger(a.j,{elementType:"headerCells",element:y})}}},t.prototype.renderResourceHeader=function(e){var t=i.i(n.createElement)("div",{className:e}),r=this.createTableLayout();t.appendChild(r);var o=i.i(n.createElement)("tr");if(this.parent.activeViewOptions.group.resources.length>0)this.colLevels=this.generateColumnLevels();else{var l=[{className:[s.e],type:"headerCell"}];this.colLevels=[l]}for(var c=0,p=this.colLevels;c<p.length;c++){for(var d=p[c],h=o.cloneNode(),u=e===s.d?d:[d[0]],g=0,v=u;g<v.length;g++){var f=v[g],m=i.i(n.createElement)("td");f.className&&i.i(n.addClass)([m],f.className),e===s.d&&(f.template&&i.i(n.append)(f.template,m),f.colSpan&&m.setAttribute("colspan",f.colSpan.toString()),f.groupIndex>-1&&m.setAttribute("data-group-index",f.groupIndex.toString()),this.setResourceHeaderContent(m,f)),e===s.b&&this.parent.renderHeaderIndentTemplate(f,m);var y={elementType:f.type,element:m,date:f.date,groupIndex:f.groupIndex};this.parent.trigger(a.j,y),h.appendChild(m)}r.querySelector("tbody").appendChild(h)}return e===s.d&&r.appendChild(this.createTableColGroup(this.colLevels.slice(-1)[0].length)),t},t.prototype.renderContent=function(e){var t=i.i(n.createElement)("tr");e.appendChild(t);var r,a=i.i(n.createElement)("td"),o=i.i(n.createElement)("td"),l=[];if("Vertical"===this.parent.activeViewOptions.orientation&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive)l.push(a),a.appendChild(this.parent.resourceBase.createResourceColumn()),this.rowCount=this.parent.resourceBase.renderedResources.length;else{l.push(a);var c=i.i(n.createElement)("div",{className:s.f});a.appendChild(c),c.appendChild(this.createTableLayout()),r=c.querySelector("tbody")}l.push(o),i.i(n.append)(l,t);var p=i.i(n.createElement)("div",{className:s.g});o.appendChild(p);var d=this.createTableLayout(s.h);this.setAriaAttributes(d),p.appendChild(d);var h=i.i(n.createElement)("div",{className:s.i});p.appendChild(h),this.parent.virtualScrollModule&&this.parent.virtualScrollModule.renderVirtualTrack(p);var u=d.querySelector("tbody");if(this.parent.rowAutoHeight){var g=[d],v=this.parent.element.querySelector("."+s.f+" ."+s.j);v&&g.push(v),i.i(n.addClass)(g,s.k)}if(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var f="Horizontal"===this.parent.activeViewOptions.orientation?this.colLevels.slice(-1)[0].length:this.columnCount;d.appendChild(this.createTableColGroup(f)),this.renderResourceContent(h,r,u)}else d.appendChild(this.createTableColGroup(this.columnCount)),this.renderDefaultContent(h,r,u)},t.prototype.renderDefaultContent=function(e,t,r){for(var l=this.getMonths(),c=this.getMonthDates(new Date(this.parent.selectedDate.getFullYear(),l[0],1)),p=0;p<this.rowCount;p++){e.appendChild(i.i(n.createElement)("div",{className:s.l}));var d=new Date(this.parent.selectedDate.getFullYear(),l[parseInt(p.toString(),10)],1),h=this.parent.calendarUtil.getMonthStartDate(new Date(d.getTime())),u=this.parent.calendarUtil.getMonthEndDate(new Date(d.getTime())),g=i.i(n.createElement)("tr"),v=g.cloneNode();t.appendChild(v);var f=g.cloneNode();r.appendChild(f);var m=i.i(n.createElement)("td",{className:s.m});"Horizontal"===this.parent.activeViewOptions.orientation?(this.parent.monthHeaderTemplate?i.i(n.append)(this.renderDayMonthHeaderTemplate(h,p,"monthHeaderTemplate"),m):m.innerHTML="<span>"+this.getMonthName(d)+"</span>",m.setAttribute("data-date",d.getTime().toString())):this.parent.dayHeaderTemplate?i.i(n.append)(this.renderDayMonthHeaderTemplate(c[parseInt(p.toString(),10)],p,"dayHeaderTemplate"),m):m.innerHTML="<span>"+this.parent.getDayNames("abbreviated")[p%7]+"</span>",v.appendChild(m),this.parent.trigger(a.j,{elementType:"leftHeaderCells",element:m});for(var y=new Date(h.getTime()),T=0;T<this.columnCount;T++){var w=void 0;if("Vertical"===this.parent.activeViewOptions.orientation){d=new Date(this.parent.selectedDate.getFullYear(),l[parseInt(T.toString(),10)],1),h=this.parent.calendarUtil.getMonthStartDate(new Date(d.getTime())),u=this.parent.calendarUtil.getMonthEndDate(new Date(d.getTime()));var D=p-h.getDay()+1;y=new Date(this.parent.selectedDate.getFullYear(),l[parseInt(T.toString(),10)],D),w=D>0&&y.getTime()<u.getTime()}else w=T>=h.getDay()&&y.getTime()<u.getTime();var b=this.parent.globalize.formatDate(y,{skeleton:"full",calendar:this.parent.getCalendarMode()}),S=i.i(n.createElement)("td",{className:s.n,attrs:{"aria-selected":"false","aria-label":b}});f.appendChild(S);var C=i.i(n.createElement)("div",{className:s.o+" "+s.p,innerHTML:w?this.parent.globalize.formatDate(y,{skeleton:"d",calendar:this.parent.getCalendarMode()}):""});if(w){var O=[S],E=[];this.parent.activeViewOptions.workDays.indexOf(y.getDay())>-1&&E.push(s.q),this.parent.isMinMaxDate(y)||i.i(n.addClass)([S],s.r),this.isCurrentDate(y)&&(E.push(s.s),"Horizontal"===this.parent.activeViewOptions.orientation?O.push(this.element.querySelector("."+s.e+":nth-child("+(T+1)+")")):O.push(this.element.querySelectorAll("."+s.m).item(p))),E.length>0&&i.i(n.addClass)(O,E)}else i.i(n.addClass)([S],s.t),this.parent.isMinMaxDate(y)||i.i(n.addClass)([S],s.r);S.classList.contains(s.t)||(this.renderDates.push(new Date(y)),S.appendChild(C),w&&(S.setAttribute("data-date",y.getTime().toString()),this.wireEvents(S)),this.renderCellTemplate({date:y,type:"workCells"},S),this.parent.trigger(a.j,{elementType:"workCells",element:S,date:y}),w&&"Horizontal"===this.parent.activeViewOptions.orientation&&(y=o.d(new Date(y.getTime()),1)))}}this.renderDates.splice(0,1)},t.prototype.getContentRows=function(){for(var e=[],t=this.getMonths(),r=0;r<this.parent.resourceBase.renderedResources.length;r++){var o=i.i(n.createElement)("tr");e.push(o);var l=void 0;this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(l=this.parent.resourceBase.renderedResources[parseInt(r.toString(),10)]);for(var c=new Date(this.parent.selectedDate.getFullYear(),t[parseInt(r.toString(),10)],1),p=this.parent.calendarUtil.getMonthStartDate(new Date(c.getTime())),d=0;d<this.columnCount;d++){var h=[],u=l.groupIndex;h=h.concat(l.className),h.indexOf(s.u)>-1?h.push(s.v):h.push(s.q),c=new Date(this.parent.selectedDate.getFullYear(),t[parseInt(d.toString(),10)],1),p=this.parent.calendarUtil.getMonthStartDate(new Date(c.getTime()));var g=i.i(n.createElement)("td",{className:s.n,attrs:{"aria-selected":"false","data-date":p.getTime().toString()}});i.i(n.addClass)([g],h),g.setAttribute("data-group-index",u.toString()),this.renderCellTemplate({date:p,type:"resourceGroupCells",groupIndex:u},g),this.wireEvents(g),this.parent.trigger(a.j,{elementType:"resourceGroupCells",element:g,date:p}),o.appendChild(g)}}return e},t.prototype.renderResourceContent=function(e,t,r){for(var o=this.getMonths(),l=0;l<this.rowCount;l++){e.appendChild(i.i(n.createElement)("div",{className:s.l}));var c=i.i(n.createElement)("tr");r.appendChild(c);var p=void 0;"Vertical"===this.parent.activeViewOptions.orientation&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(p=this.parent.resourceBase.renderedResources[parseInt(l.toString(),10)]);var d=new Date(this.parent.selectedDate.getFullYear(),o[parseInt(l.toString(),10)],1),h=this.parent.calendarUtil.getMonthStartDate(new Date(d.getTime()));if("Horizontal"===this.parent.activeViewOptions.orientation){var u=c.cloneNode();t.appendChild(u);var g=i.i(n.createElement)("td",{className:s.m,attrs:{"data-date":h.getTime().toString()}});this.parent.monthHeaderTemplate?i.i(n.append)(this.renderDayMonthHeaderTemplate(d,l,"monthHeaderTemplate"),g):g.innerHTML="<span>"+this.getMonthName(d)+"</span>",u.appendChild(g)}for(var v=0;v<this.columnCount;v++){var f=[],m=void 0;"Vertical"===this.parent.activeViewOptions.orientation?(m=p.groupIndex,f=f.concat(p.className),f.indexOf(s.u)>-1?f.push(s.v):f.push(s.q),d=new Date(this.parent.selectedDate.getFullYear(),o[parseInt(v.toString(),10)],1),h=this.parent.calendarUtil.getMonthStartDate(new Date(d.getTime()))):(m=this.colLevels.slice(-1)[0][parseInt(v.toString(),10)].groupIndex,f.push(s.q));var y=this.parent.globalize.formatDate(h,{type:"dateTime",skeleton:"full",calendar:this.parent.getCalendarMode()}),T=this.parent.globalize.formatDate(this.parent.calendarUtil.getMonthEndDate(new Date(d.getTime())),{type:"dateTime",skeleton:"full",calendar:this.parent.getCalendarMode()}),w=i.i(n.createElement)("td",{className:s.n,attrs:{"aria-selected":"false","data-date":h.getTime().toString(),"aria-label":y+" "+this.parent.localeObj.getConstant("endAt")+" "+T}});i.i(n.addClass)([w],f),w.setAttribute("data-group-index",m.toString()),this.renderCellTemplate({date:h,type:"resourceGroupCells",groupIndex:m},w),this.wireEvents(w),c.appendChild(w),this.parent.trigger(a.j,{elementType:"resourceGroupCells",element:w,date:h})}}"Vertical"===this.parent.activeViewOptions.orientation&&this.collapseRows(this.parent.element.querySelector("."+s.g))},t.prototype.renderDayMonthHeaderTemplate=function(e,t,i){var n={date:e,type:"dayHeaderTemplate"===i?"dayHeader":"monthHeader"},r="schedule_"+this.parent.activeViewOptions.dayHeaderTemplateName+"dayHeaderTemplate",a="schedule_"+this.parent.activeViewOptions.dayHeaderTemplateName+"monthHeaderTemplate";return"dayHeaderTemplate"===i?(n.day=this.parent.getDayNames("wide")[t%7],[].slice.call(this.parent.getDayHeaderTemplate()(n,this.parent,"dayHeaderTemplate",r,!1))):[].slice.call(this.parent.getMonthHeaderTemplate()(n,this.parent,"monthHeaderTemplate",a,!1))},t.prototype.renderCellTemplate=function(e,t){if(this.parent.activeViewOptions.cellTemplate&&!t.classList.contains(s.t)){var r={date:e.date,type:e.type};e.groupIndex&&(r.groupIndex=e.groupIndex);var a=this.parent.element.id+"_",o=this.parent.activeViewOptions.cellTemplateName,l=a+o+"cellTemplate",c=[].slice.call(this.parent.getCellTemplate()(r,this.parent,"cellTemplate",l,!1));i.i(n.append)(c,t)}},t.prototype.scrollToDate=function(e){var t;t=null!==this.parent.activeViewOptions.group.resources&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?+new Date(o.b(o.n(e))):+new Date(o.b(e));var i=this.element.querySelector('[data-date="'+t+'"]');if(i){var n=this.getScrollableElement();if(this.parent.enableRtl){var r=this.element.querySelector("."+s.h);n.scrollLeft=-(r.offsetWidth-i.offsetLeft-i.offsetWidth)}else n.scrollLeft=i.offsetLeft;n.scrollTop=i.offsetTop}},t.prototype.getScrollableElement=function(){return this.parent.isAdaptive&&!this.isTimelineView()?this.element.querySelector("."+s.w):this.getContentAreaElement()},t.prototype.wireEvents=function(e){n.EventHandler.add(e,"mousedown",this.parent.workCellAction.cellMouseDown,this.parent.workCellAction),n.EventHandler.add(e,"click",this.parent.workCellAction.cellClick,this.parent.workCellAction),this.parent.isAdaptive||n.EventHandler.add(e,"dblclick",this.parent.workCellAction.cellDblClick,this.parent.workCellAction)},t}(r.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var n=i(10),r=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),a=function(e){function t(t){var i=e.call(this,t)||this;return i.viewClass="e-week-view",i}return r(t,e),t.prototype.startDate=function(){return this.getViewStartDate()},t.prototype.endDate=function(){return this.getViewEndDate()},t.prototype.getModuleName=function(){return"week"},t}(n.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var n=i(10),r=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),a=function(e){function t(t){var i=e.call(this,t)||this;return i.viewClass="e-work-week-view",i}return r(t,e),t.prototype.startDate=function(){return this.getViewStartDate()},t.prototype.endDate=function(){return this.getViewEndDate()},t.prototype.getModuleName=function(){return"workWeek"},t}(n.a)},function(e,t){e.exports=s},function(e,t){e.exports=o},function(e,t,i){"use strict";var n=i(13);i.d(t,"a",function(){return n.a}),i.d(t,"b",function(){return n.b})},function(e,t,i){"use strict";var n=i(20);i.d(t,"a",function(){return n.a});var r=i(4);i.d(t,"b",function(){return r.a}),i.d(t,"c",function(){return r.b}),i.d(t,"d",function(){return r.c}),i.d(t,"e",function(){return r.d}),i.d(t,"f",function(){return r.e}),i.d(t,"g",function(){return r.f})},function(e,t,i){"use strict";var n=i(23);i.d(t,"a",function(){return n.a});var r=i(2);i.d(t,"b",function(){return r.a}),i.d(t,"c",function(){return r.b}),i.d(t,"d",function(){return r.c}),i.d(t,"e",function(){return r.d}),i.d(t,"f",function(){return r.e}),i.d(t,"g",function(){return r.f}),i.d(t,"h",function(){return r.g}),i.d(t,"i",function(){return r.h}),i.d(t,"j",function(){return r.i}),i.d(t,"k",function(){return r.j}),i.d(t,"l",function(){return r.k}),i.d(t,"m",function(){return r.l}),i.d(t,"n",function(){return r.m}),i.d(t,"o",function(){return r.n}),i.d(t,"p",function(){return r.o}),i.d(t,"q",function(){return r.p}),i.d(t,"r",function(){return r.q}),i.d(t,"s",function(){return r.r}),i.d(t,"t",function(){return r.s}),i.d(t,"u",function(){return r.t}),i.d(t,"v",function(){return r.u}),i.d(t,"w",function(){return r.v}),i.d(t,"x",function(){return r.w}),i.d(t,"y",function(){return r.x}),i.d(t,"z",function(){return r.y}),i.d(t,"A",function(){return r.z}),i.d(t,"B",function(){return r.A}),i.d(t,"C",function(){return r.B}),i.d(t,"D",function(){return r.C}),i.d(t,"E",function(){return r.D}),i.d(t,"F",function(){return r.E}),i.d(t,"G",function(){return r.F}),i.d(t,"H",function(){return r.G}),i.d(t,"I",function(){return r.H}),i.d(t,"J",function(){return r.I}),i.d(t,"K",function(){return r.J}),i.d(t,"L",function(){return r.K}),i.d(t,"M",function(){return r.L}),i.d(t,"N",function(){return r.M});var a=i(1);i.d(t,"O",function(){return a.e}),i.d(t,"P",function(){return a.f}),i.d(t,"Q",function(){return a.c}),i.d(t,"R",function(){return a.g}),i.d(t,"S",function(){return a.h}),i.d(t,"T",function(){return a.i}),i.d(t,"U",function(){return a.j}),i.d(t,"V",function(){return a.k}),i.d(t,"W",function(){return a.l}),i.d(t,"X",function(){return a.m}),i.d(t,"Y",function(){return a.n}),i.d(t,"Z",function(){return a.o}),i.d(t,"_0",function(){return a.p}),i.d(t,"_1",function(){return a.q}),i.d(t,"_2",function(){return a.r}),i.d(t,"_3",function(){return a.b}),i.d(t,"_4",function(){return a.s}),i.d(t,"_5",function(){return a.t}),i.d(t,"_6",function(){return a.d}),i.d(t,"_7",function(){return a.u}),i.d(t,"_8",function(){return a.v}),i.d(t,"_9",function(){return a.w}),i.d(t,"_10",function(){return a.x}),i.d(t,"_11",function(){return a.y}),i.d(t,"_12",function(){return a.z}),i.d(t,"_13",function(){return a.A}),i.d(t,"_14",function(){return a.B}),i.d(t,"_15",function(){return a.C}),i.d(t,"_16",function(){return a.D}),i.d(t,"_17",function(){return a.E}),i.d(t,"_18",function(){return a.F}),i.d(t,"_19",function(){return a.G}),i.d(t,"_20",function(){return a.H}),i.d(t,"_21",function(){return a.I}),i.d(t,"_22",function(){return a.a}),i.d(t,"_23",function(){return a.J}),i.d(t,"_24",function(){return a.K}),i.d(t,"_25",function(){return a.L});var s=i(47);i.d(t,"_26",function(){return s.a});var o=i(45);i.d(t,"_27",function(){return o.a});var l=i(30);i.d(t,"_28",function(){return l.a});var c=i(8);i.d(t,"_29",function(){return c.a});var p=i(29);i.d(t,"_30",function(){return p.a});var d=i(36);i.d(t,"_31",function(){return d.a});var h=i(37);i.d(t,"_32",function(){return h.a});var u=i(9);i.d(t,"_33",function(){return u.a});var g=i(16);i.d(t,"_34",function(){return g.a});var v=i(28);i.d(t,"_35",function(){return v.a});var f=i(31);i.d(t,"_36",function(){return f.a});var m=i(34);i.d(t,"_37",function(){return m.a});var y=i(33);i.d(t,"_38",function(){return y.a});var T=i(35);i.d(t,"_39",function(){return T.a});var w=i(17);i.d(t,"_40",function(){return w.a}),i.d(t,"_41",function(){return w.b});var D=i(57);i.d(t,"_42",function(){return D.a}),i.d(t,"_43",function(){return D.b}),i.d(t,"_44",function(){return D.c}),i.d(t,"_45",function(){return D.d})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(42);i.d(t,"Schedule",function(){return n.a}),i.d(t,"cellClick",function(){return n.b}),i.d(t,"cellDoubleClick",function(){return n.c}),i.d(t,"moreEventsClick",function(){return n.d}),i.d(t,"select",function(){return n.e}),i.d(t,"hover",function(){return n.f}),i.d(t,"actionBegin",function(){return n.g}),i.d(t,"actionComplete",function(){return n.h}),i.d(t,"actionFailure",function(){return n.i}),i.d(t,"navigating",function(){return n.j}),i.d(t,"renderCell",function(){return n.k}),i.d(t,"eventClick",function(){return n.l}),i.d(t,"eventDoubleClick",function(){return n.m}),i.d(t,"eventRendered",function(){return n.n}),i.d(t,"dataBinding",function(){return n.o}),i.d(t,"dataBound",function(){return n.p}),i.d(t,"popupOpen",function(){return n.q}),i.d(t,"popupClose",function(){return n.r}),i.d(t,"dragStart",function(){return n.s}),i.d(t,"drag",function(){return n.t}),i.d(t,"dragStop",function(){return n.u}),i.d(t,"resizeStart",function(){return n.v}),i.d(t,"resizing",function(){return n.w}),i.d(t,"resizeStop",function(){return n.x}),i.d(t,"inlineClick",function(){return n.y}),i.d(t,"cellSelect",function(){return n.z}),i.d(t,"virtualScrollStart",function(){return n.A}),i.d(t,"virtualScrollStop",function(){return n.B}),i.d(t,"initialLoad",function(){return n.C}),i.d(t,"initialEnd",function(){return n.D}),i.d(t,"print",function(){return n.E}),i.d(t,"dataReady",function(){return n.F}),i.d(t,"eventsLoaded",function(){return n.G}),i.d(t,"contentReady",function(){return n.H}),i.d(t,"scroll",function(){return n.I}),i.d(t,"virtualScroll",function(){return n.J}),i.d(t,"scrollUiUpdate",function(){return n.K}),i.d(t,"uiUpdate",function(){return n.L}),i.d(t,"documentClick",function(){return n.M}),i.d(t,"cellMouseDown",function(){return n.N}),i.d(t,"WEEK_LENGTH",function(){return n.O}),i.d(t,"DEFAULT_WEEKS",function(){return n.P}),i.d(t,"MS_PER_DAY",function(){return n.Q}),i.d(t,"MS_PER_MINUTE",function(){return n.R}),i.d(t,"getElementHeightFromClass",function(){return n.S}),i.d(t,"getElementWidthFromClass",function(){return n.T}),i.d(t,"getTranslateY",function(){return n.U}),i.d(t,"getTranslateX",function(){return n.V}),i.d(t,"getWeekFirstDate",function(){return n.W}),i.d(t,"getWeekLastDate",function(){return n.X}),i.d(t,"firstDateOfMonth",function(){return n.Y}),i.d(t,"lastDateOfMonth",function(){return n.Z}),i.d(t,"getWeekNumber",function(){return n._0}),i.d(t,"getWeekMiddleDate",function(){return n._1}),i.d(t,"setTime",function(){return n._2}),i.d(t,"resetTime",function(){return n._3}),i.d(t,"getDateInMs",function(){return n._4}),i.d(t,"getDateCount",function(){return n._5}),i.d(t,"addDays",function(){return n._6}),i.d(t,"addMonths",function(){return n._7}),i.d(t,"addYears",function(){return n._8}),i.d(t,"getStartEndHours",function(){return n._9}),i.d(t,"getMaxDays",function(){return n._10}),i.d(t,"getDaysCount",function(){return n._11}),i.d(t,"getDateFromString",function(){return n._12}),i.d(t,"getScrollBarWidth",function(){return n._13}),i.d(t,"resetScrollbarWidth",function(){return n._14}),i.d(t,"findIndexInData",function(){return n._15}),i.d(t,"getOuterHeight",function(){return n._16}),i.d(t,"removeChildren",function(){return n._17}),i.d(t,"isDaylightSavingTime",function(){return n._18}),i.d(t,"getUniversalTime",function(){return n._19}),i.d(t,"isMobile",function(){return n._20}),i.d(t,"isIPadDevice",function(){return n._21}),i.d(t,"capitalizeFirstWord",function(){return n._22}),i.d(t,"getElementWidth",function(){return n._23}),i.d(t,"getElementHeight",function(){return n._24}),i.d(t,"getElementTop",function(){return n._25}),i.d(t,"Resize",function(){return n._26}),i.d(t,"DragAndDrop",function(){return n._27}),i.d(t,"HeaderRenderer",function(){return n._28}),i.d(t,"ViewBase",function(){return n._29}),i.d(t,"Day",function(){return n._30}),i.d(t,"Week",function(){return n._31}),i.d(t,"WorkWeek",function(){return n._32}),i.d(t,"Month",function(){return n._33}),i.d(t,"Year",function(){return n._34}),i.d(t,"Agenda",function(){return n._35}),i.d(t,"MonthAgenda",function(){return n._36}),i.d(t,"TimelineViews",function(){return n._37}),i.d(t,"TimelineMonth",function(){return n._38}),i.d(t,"TimelineYear",function(){return n._39}),i.d(t,"Timezone",function(){return n._40}),i.d(t,"timezoneData",function(){return n._41}),i.d(t,"ICalendarExport",function(){return n._42}),i.d(t,"ICalendarImport",function(){return n._43}),i.d(t,"ExcelExport",function(){return n._44}),i.d(t,"Print",function(){return n._45});var r=i(41);i.d(t,"RecurrenceEditor",function(){return r.a}),i.d(t,"generateSummary",function(){return r.b}),i.d(t,"generate",function(){return r.c}),i.d(t,"getDateFromRecurrenceDateString",function(){return r.d}),i.d(t,"extractObjectFromRule",function(){return r.e}),i.d(t,"getCalendarUtil",function(){return r.f}),i.d(t,"getRecurrenceStringFromDate",function(){return r.g});var a=i(40);i.d(t,"Gregorian",function(){return a.a}),i.d(t,"Islamic",function(){return a.b})},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(0),r=(i.n(n),i(4)),a=i(2),s=i(1),o=function(){function e(e){this.parent=e,this.crudObj={sourceEvent:null,targetEvent:null,isCrudAction:!1}}return e.prototype.getQuery=function(){var e=this.parent.activeView.startDate(),t=this.parent.activeView.endDate();return this.parent.dataModule.generateQuery(e,t)},e.prototype.getTable=function(){if(this.parent.eventSettings.query){return this.parent.eventSettings.query.clone().fromTable}return null},e.prototype.refreshDataManager=function(){var e=this;if(this.parent.activeView){if(this.parent.uiStateValues&&this.parent.uiStateValues.isPreventEventRefresh)return this.parent.uiStateValues.isPreventEventRefresh=!1,this.parent.refreshEvents(!1),void this.parent.hideSpinner();var t=this.parent.activeView.startDate(),i=this.parent.activeView.endDate();this.parent.dataModule.getData(this.parent.dataModule.generateQuery(t,i)).then(function(t){return e.dataManagerSuccess(t)}).catch(function(t){return e.dataManagerFailure(t)})}},e.prototype.dataManagerSuccess=function(e){var t=this;!this.parent||this.parent&&this.parent.isDestroyed||this.parent.trigger(a.n,e,function(e){if(!e.cancel){var r=i.i(n.extend)([],e.result,null,!0);t.parent.eventsData=r.filter(function(e){return!e[t.parent.eventFields.isBlock]}),t.parent.blockData=r.filter(function(e){return e[t.parent.eventFields.isBlock]}),t.refreshProcessedData(),t.parent.dragAndDropModule&&"drag"===t.parent.dragAndDropModule.actionObj.action&&t.parent.dragAndDropModule.navigationWrapper(),t.parent.trigger(a.o,null,function(){t.parent.hideSpinner(),t.parent.isPrinting&&t.parent.notify(a.D,{})})}})},e.prototype.dataManagerFailure=function(e){var t=this;!this.parent||this.parent&&this.parent.isDestroyed||this.parent.trigger(a.h,{error:e},function(){return t.parent.hideSpinner()})},e.prototype.refreshProcessedData=function(e,t){if(void 0===e&&(e=!1),this.parent.dragAndDropModule&&(this.parent.dragAndDropModule.actionObj.action="",i.i(n.removeClass)([this.parent.element],"e-event-action")),this.parent.activeViewOptions&&this.parent.activeViewOptions.eventTemplate){var r=["eventTemplate"];if(this.crudObj.isCrudAction&&-1===["Agenda","MonthAgenda","Year","TimelineYear"].indexOf(this.parent.currentView)){r=[];for(var s=0,o=this.crudObj.sourceEvent.length;s<o;s++)r.push("eventTemplate_"+this.crudObj.sourceEvent[parseInt(s.toString(),10)].groupIndex),this.crudObj.targetEvent[parseInt(s.toString(),10)]&&this.crudObj.sourceEvent[parseInt(s.toString(),10)].groupIndex!==this.crudObj.targetEvent[parseInt(s.toString(),10)].groupIndex&&r.push("eventTemplate_"+this.crudObj.targetEvent[parseInt(s.toString(),10)].groupIndex)}r.length>0&&this.parent.resetTemplates(r)}if(e)return void this.parent.notify(a.E,{processedData:t?this.parent.eventBase.processData(t):this.parent.eventsProcessed});var l=this.parent.eventsData||[],c=this.parent.blockData||[],p=l.concat(c);this.parent.notify(a.E,{processedData:this.parent.eventBase?this.parent.eventBase.processData(p):[]})},e.prototype.refreshData=function(e){var t=this,r={requestType:e.requestType,cancel:!1,data:e.data,addedRecords:e.editParams.addedRecords,changedRecords:e.editParams.changedRecords,deletedRecords:e.editParams.deletedRecords};if(this.parent.dragAndDropModule&&this.parent.dragAndDropModule.actionObj&&this.parent.dragAndDropModule.actionObj.element&&(this.parent.dragAndDropModule.actionObj.element.style.display="none"),this.parent.resizeModule&&this.parent.resizeModule.actionObj&&this.parent.resizeModule.actionObj.element&&(this.parent.resizeModule.actionObj.element.style.display="none"),this.parent.isSpecificResourceEvents()&&("eventCreated"===e.requestType||"eventRemoved"===e.requestType)){this.crudObj.isCrudAction=!0,this.crudObj.sourceEvent=[];for(var s=e.data instanceof Array?0===e.data.length&&"eventRemoved"===e.requestType?e.editParams.deletedRecords:e.data:"string"!=typeof e.data&&"number"!=typeof e.data||"eventRemoved"!==e.requestType?[e.data]:e.editParams.deletedRecords,o=this,l=0,c=s;l<c.length;l++){var p=c[l];!function(t){o.crudObj.isCrudAction=!("eventRemoved"===e.requestType&&!i.i(n.isNullOrUndefined)(t.parent));var r=o.parent.eventBase.getGroupIndexFromEvent(t);r>-1&&0===o.parent.crudModule.crudObj.sourceEvent.filter(function(e){return e.groupIndex===r}).length&&o.crudObj.isCrudAction&&o.crudObj.sourceEvent.push(o.parent.resourceBase.lastResourceLevel[parseInt(r.toString(),10)])}(p)}this.crudObj.targetEvent=this.crudObj.sourceEvent}this.parent.dataModule.dataManager.dataSource.offline?this.parent.trigger(a.g,r,function(e){e.cancel||t.refreshDataManager()}):e.promise.then(function(){!t.parent||t.parent&&t.parent.isDestroyed||t.parent.trigger(a.g,r,function(e){e.cancel||t.refreshDataManager()})}).catch(function(e){!t.parent||t.parent&&t.parent.isDestroyed||t.parent.trigger(a.h,{error:e})})},e.prototype.addEvent=function(e){var t=this;if(this.parent.eventSettings.allowAdding&&!this.parent.activeViewOptions.readonly){if(!this.isBlockEvent(e)&&this.parent.eventBase.isBlockRange(e))return void this.parent.quickPopup.openValidationError("blockAlert",e);var r=e instanceof Array?e:[e];if(0===r.length)return;var s={requestType:"eventCreate",cancel:!1,data:r,addedRecords:r,changedRecords:[],deletedRecords:[]};this.parent.trigger(a.f,s,function(e){if(!e.cancel){var r=t.parent.eventFields,a={addedRecords:[],changedRecords:[],deletedRecords:[]},s=void 0;if(e.addedRecords instanceof Array){for(var o=0,l=e.addedRecords;o<l.length;o++){var c=l[o];c=t.parent.eventBase.updateEventDateTime(c);var p=i.i(n.extend)({},t.parent.eventBase.processTimezone(c,!0),null,!0);a.addedRecords.push(p)}s=t.parent.dataModule.dataManager.saveChanges(a,r.id,t.getTable(),t.getQuery())}else{var d=t.parent.eventBase.processTimezone(e.addedRecords,!0);a.addedRecords.push(d),s=t.parent.dataModule.dataManager.insert(d,t.getTable(),t.getQuery())}var h={requestType:"eventCreated",cancel:!1,data:e.addedRecords,promise:s,editParams:a};t.refreshData(h)}})}},e.prototype.saveEvent=function(e,t){var r=this;if(this.parent.eventSettings.allowEditing&&!this.parent.activeViewOptions.readonly){if("EditFollowingEvents"!==this.parent.currentAction&&!this.isBlockEvent(e)&&this.parent.eventBase.isBlockRange(e))return this.parent.quickPopup.openValidationError("blockAlert",e),void(this.parent.crudModule.crudObj.isCrudAction=!1);var s=e instanceof Array?e:[e];if(0===s.length)return;if(this.parent.currentAction=t,t)switch(t){case"Save":this.processSave(e);break;case"EditOccurrence":this.processOccurrences(e,t);break;case"EditFollowingEvents":this.processFollowSeries(e,t);break;case"EditSeries":this.processEntireSeries(e,t)}else{var o={requestType:"eventChange",cancel:!1,data:e,addedRecords:[],changedRecords:s,deletedRecords:[]};this.parent.trigger(a.f,o,function(e){if(!e.cancel){var t=void 0,a=r.parent.eventFields,s={addedRecords:[],changedRecords:[],deletedRecords:[]};if(e.changedRecords instanceof Array){for(var o=0,l=e.changedRecords;o<l.length;o++){var c=l[o];c=r.parent.eventBase.updateEventDateTime(c);var p=i.i(n.extend)({},r.parent.eventBase.processTimezone(c,!0),null,!0);s.changedRecords.push(p)}t=r.parent.dataModule.dataManager.saveChanges(s,a.id,r.getTable(),r.getQuery())}else{var d=r.parent.eventBase.processTimezone(e.changedRecords,!0);s.changedRecords.push(d),t=r.parent.dataModule.dataManager.update(a.id,d,r.getTable(),r.getQuery())}var h=i.i(n.extend)({},e.changedRecords[e.changedRecords.length-1],null,!0);r.parent.eventBase.selectWorkCellByTime([r.parent.eventBase.processTimezone(h)]);var u={requestType:"eventChanged",cancel:!1,data:e.changedRecords,promise:t,editParams:s};r.refreshData(u)}})}}},e.prototype.deleteEvent=function(e,t){var i=this;if(this.parent.eventSettings.allowDeleting&&!this.parent.activeViewOptions.readonly){this.parent.currentAction=t;var n=[];if(n="string"==typeof e||"number"==typeof e?this.parent.eventsData.filter(function(t){return t[i.parent.eventFields.id]===e}):e instanceof Array?e:[e],0===n.length)return;if(t)switch(t){case"Delete":this.processDelete(n);break;case"DeleteOccurrence":this.processOccurrences(n,t);break;case"DeleteFollowingEvents":this.processFollowSeries(n,t);break;case"DeleteSeries":this.processEntireSeries(n,t)}else{var r={requestType:"eventRemove",cancel:!1,data:e,addedRecords:[],changedRecords:[],deletedRecords:n};this.parent.trigger(a.f,r,function(e){if(!e.cancel){var t=void 0,n=i.parent.eventFields,r={addedRecords:[],changedRecords:[],deletedRecords:[]};e.deletedRecords.length>1?(r.deletedRecords=r.deletedRecords.concat(e.deletedRecords),t=i.parent.dataModule.dataManager.saveChanges(r,n.id,i.getTable(),i.getQuery())):(r.deletedRecords.push(e.deletedRecords[0]),t=i.parent.dataModule.dataManager.remove(n.id,e.deletedRecords[0],i.getTable(),i.getQuery())),i.parent.eventBase.selectWorkCellByTime(e.deletedRecords);var a={requestType:"eventRemoved",cancel:!1,data:e.deletedRecords,promise:t,editParams:r};i.refreshData(a)}})}}},e.prototype.processOccurrences=function(e,t){var s=this,o=[],l=!1;if(e instanceof Array)for(var c=0,p=e;c<p.length;c++){var d=p[c];o.push({occurrence:d,parent:this.getParentEvent(d)})}else o={occurrence:e,parent:this.getParentEvent(e)};var h=e instanceof Array?e:[e],u={requestType:"EditOccurrence"===t?"eventChange":"eventRemove",cancel:!1,addedRecords:[],changedRecords:h,deletedRecords:[]};u.data=o,this.parent.trigger(a.f,u,function(e){if(!e.cancel){for(var a=s.parent.eventFields,c={addedRecords:[],changedRecords:[],deletedRecords:[]},p=o instanceof Array?o:[o],d=0,h=e.changedRecords.length;d<h;d++)!function(n,o){var d=e.changedRecords[parseInt(n.toString(),10)],h=p[parseInt(n.toString(),10)].parent,u=h[a.recurrenceException],g=void 0,v=void 0;switch(t){case"EditOccurrence":g=s.parent.eventsProcessed.filter(function(e){return e.Guid===d.Guid})[0],v=s.excludeDateCheck(g[a.startTime],u),v!==h[a.recurrenceException]?(h[a.recurrenceException]=v,d[a.recurrenceException]=i.i(r.f)(g[a.startTime]),d[a.recurrenceID]=h[a.id],d[a.followingID]=null,c.changedRecords.push(s.parent.eventBase.processTimezone(h,!0)),c.addedRecords.push(s.parent.eventBase.processTimezone(d,!0))):c.changedRecords.push(s.parent.eventBase.processTimezone(d,!0));break;case"DeleteOccurrence":d[a.recurrenceException]||(h[a.recurrenceException]=s.excludeDateCheck(d[a.startTime],u),c.changedRecords.push(s.parent.eventBase.processTimezone(h,!0))),d[a.id]!==h[a.id]&&(c.deletedRecords.push(d),l=!0)}}(d);var u=s.parent.dataModule.dataManager.saveChanges(c,a.id,s.getTable(),s.getQuery()),g=i.i(n.extend)({},e.changedRecords[e.changedRecords.length-1],null,!0);s.parent.eventBase.selectWorkCellByTime("EditOccurrence"===t?[s.parent.eventBase.processTimezone(g)]:[g]);var v={requestType:"EditOccurrence"===t?"eventChanged":"eventRemoved",cancel:!1,data:l?e.deletedRecords:e.changedRecords,promise:u,editParams:c};s.refreshData(v)}})},e.prototype.processFollowSeries=function(e,t){var r=this,s=[];if(e instanceof Array)for(var o=0,l=e;o<l.length;o++){var c=l[o];s.push({occurrence:c,parent:this.getParentEvent(c)})}else s={occurrence:e,parent:this.getParentEvent(e)};var p=e instanceof Array?e:[e],d={requestType:"EditFollowingEvents"===t?"eventChange":"eventRemove",cancel:!1,addedRecords:[],changedRecords:p,deletedRecords:[]};d.data=s,this.parent.trigger(a.f,d,function(e){if(!e.cancel){for(var a=r.parent.eventFields,o={addedRecords:[],changedRecords:[],deletedRecords:[]},l=s instanceof Array?s:[s],c=0,p=e.changedRecords.length;c<p;c++)!function(i,n){var s=e.changedRecords[parseInt(i.toString(),10)],c=l[parseInt(i.toString(),10)].parent,p=r.parent.eventBase.getEventCollections(c,s),d=void 0;switch(t){case"EditFollowingEvents":if(r.processRecurrenceRule(c,s),d=!r.parent.eventBase.isFollowingEvent(c,s),s[a.followingID]=d?null:c[a.id],s[a.recurrenceID]=null,o.addedRecords.push(r.parent.eventBase.processTimezone(s,!0)),o.changedRecords.push(r.parent.eventBase.processTimezone(c,!0)),!r.parent.uiStateValues.isIgnoreOccurrence){if(s[a.recurrenceException]=null,p.occurrence.length>0){var h=p.occurrence.slice(-1)[0][a.recurrenceRule];-1===h.indexOf("COUNT")&&(s[a.recurrenceRule]=h)}p.follow.length>0&&(s[a.recurrenceRule]=p.follow.slice(-1)[0][a.recurrenceRule],o.deletedRecords=o.deletedRecords.concat(p.follow)),d&&(p.occurrence=p.occurrence.filter(function(e){return e[a.recurrenceID]===c[a.id]})),o.deletedRecords=o.deletedRecords.concat(p.occurrence)}break;case"DeleteFollowingEvents":r.processRecurrenceRule(c,s[a.startTime]),o.changedRecords.push(r.parent.eventBase.processTimezone(c,!0)),o.deletedRecords=o.deletedRecords.concat(p.occurrence).concat(p.follow)}}(c);var d=r.parent.dataModule.dataManager.saveChanges(o,a.id,r.getTable(),r.getQuery()),h=i.i(n.extend)({},e.changedRecords[e.changedRecords.length-1],null,!0);r.parent.eventBase.selectWorkCellByTime("EditFollowingEvents"===t?[r.parent.eventBase.processTimezone(h)]:[h]);var u={requestType:"EditFollowingEvents"===t?"eventChanged":"eventRemoved",cancel:!1,data:e.changedRecords,promise:d,editParams:o};r.refreshData(u)}})},e.prototype.processEntireSeries=function(e,t){var r=this,s=[],o=!1;if(e instanceof Array)for(var l=0,c=e;l<c.length;l++){var p=c[l];s.push(this.getParentEvent(p,!0))}else s=this.getParentEvent(e,!0);var d=e instanceof Array?e:[e],h={requestType:"EditSeries"===t?"eventChange":"eventRemove",cancel:!1,addedRecords:[],changedRecords:d,deletedRecords:[]};h.data=s,this.parent.trigger(a.f,h,function(e){if(!e.cancel){for(var a=r.parent.eventFields,l={addedRecords:[],changedRecords:[],deletedRecords:[]},c=s instanceof Array?s:[s],p=0,d=e.changedRecords.length;p<d;p++)!function(i,n){var s=e.changedRecords[parseInt(i.toString(),10)],p=c[parseInt(i.toString(),10)],d=r.parent.eventBase.getEventCollections(p),h=d.follow.concat(d.occurrence);switch(t){case"EditSeries":if(s[a.id]=p[a.id],s[a.recurrenceID]=null,s[a.followingID]=null,r.parent.uiStateValues.isIgnoreOccurrence&&s[a.recurrenceException]){var u=r.parent.eventsData.filter(function(e){return e[a.id]===s[a.id]});u.length>0&&(s[a.recurrenceRule]=u[0][a.recurrenceRule])}else s[a.recurrenceException]=null,l.deletedRecords=l.deletedRecords.concat(h);l.changedRecords.push(r.parent.eventBase.processTimezone(s,!0)),r.parent.uiStateValues.isIgnoreOccurrence=!1;break;case"DeleteSeries":l.deletedRecords=l.deletedRecords.concat(h.concat(p)),o=!0}}(p);var h=r.parent.dataModule.dataManager.saveChanges(l,a.id,r.getTable(),r.getQuery()),u=i.i(n.extend)({},e.changedRecords[e.changedRecords.length-1],null,!0);r.parent.eventBase.selectWorkCellByTime("EditSeries"===t?[r.parent.eventBase.processTimezone(u)]:[u]);var g={requestType:"EditSeries"===t?"eventChanged":"eventRemoved",cancel:!1,data:o?e.deletedRecords:e.changedRecords,promise:h,editParams:l};r.refreshData(g)}})},e.prototype.processDelete=function(e){for(var t=this,r=[],s=0,o=e;s<o.length;s++){var l=o[s];l[this.parent.eventFields.recurrenceRule]?r.push({occurrence:l,parent:this.getParentEvent(l)}):r.push(l)}var c={requestType:"eventRemove",cancel:!1,addedRecords:[],changedRecords:[],deletedRecords:e};c.data=r,this.parent.trigger(a.f,c,function(e){if(!e.cancel){for(var a=t.parent.eventFields,s={addedRecords:[],changedRecords:[],deletedRecords:[]},o=0,l=e.deletedRecords.length;o<l;o++)!function(o,l){var c=i.i(n.isNullOrUndefined)(e.deletedRecords[parseInt(o.toString(),10)][t.parent.eventFields.recurrenceRule]);if(!c){var p=r[parseInt(o.toString(),10)].parent,d=s.changedRecords.filter(function(e){return e[a.id]===p[a.id]}),h=e.deletedRecords[parseInt(o.toString(),10)][a.startTime];if(d.length>0){var u=d[0];u[a.recurrenceException]=t.excludeDateCheck(h,u[a.recurrenceException])}else p[a.recurrenceException]=t.excludeDateCheck(h,p[a.recurrenceException]);0===d.length&&s.changedRecords.push(t.parent.eventBase.processTimezone(p,!0)),c=e.deletedRecords[parseInt(o.toString(),10)][a.id]!==p[a.id]}c&&s.deletedRecords.push(e.deletedRecords[parseInt(o.toString(),10)])}(o);var c=t.parent.dataModule.dataManager.saveChanges(s,a.id,t.getTable(),t.getQuery());t.parent.eventBase.selectWorkCellByTime(e.deletedRecords);var p={requestType:"eventRemoved",cancel:!1,data:e.deletedRecords,promise:c,editParams:s};t.refreshData(p)}})},e.prototype.processSave=function(e){for(var t=this,s=e instanceof Array?e:[e],o=[],l=0,c=s;l<c.length;l++){var p=c[l];p[this.parent.eventFields.recurrenceRule]?o.push({occurrence:p,parent:this.getParentEvent(p)}):o.push(p)}var d={requestType:"eventChange",cancel:!1,addedRecords:[],changedRecords:s,deletedRecords:[]};d.data=o,this.parent.trigger(a.f,d,function(e){if(!e.cancel){for(var a=t.parent.eventFields,s={addedRecords:[],changedRecords:[],deletedRecords:[]},o=0,l=e.changedRecords;o<l.length;o++){var c=l[o];if(!i.i(n.isNullOrUndefined)(c[a.recurrenceRule])&&i.i(n.isNullOrUndefined)(c[a.recurrenceException])){var p=i.i(r.f)(c[a.startTime]),d=t.getParentEvent(c);d[a.recurrenceException]=i.i(n.isNullOrUndefined)(d[a.recurrenceException])?p:d[a.recurrenceException].concat(","+p),c[a.id]=t.parent.getEventMaxID(),c[a.recurrenceException]=p,s.addedRecords.push(t.parent.eventBase.processTimezone(c,!0)),s.changedRecords.push(t.parent.eventBase.processTimezone(d,!0))}else s.changedRecords.push(t.parent.eventBase.processTimezone(c,!0))}var h=t.parent.dataModule.dataManager.saveChanges(s,a.id,t.getTable(),t.getQuery()),u=i.i(n.extend)({},e.changedRecords[e.changedRecords.length-1],null,!0);t.parent.eventBase.selectWorkCellByTime([t.parent.eventBase.processTimezone(u)]);var g={requestType:"eventChanged",cancel:!1,data:e.changedRecords,promise:h,editParams:s};t.refreshData(g)}})},e.prototype.getParentEvent=function(e,t){void 0===t&&(t=!1);var i=this.parent.eventBase.getParentEvent(e,t)||e;return(i[this.parent.eventFields.startTimezone]||i[this.parent.eventFields.endTimezone])&&this.parent.eventBase.timezoneConvert(i),i},e.prototype.excludeDateCheck=function(e,t){var a=this.parent.timezone||this.parent.tzModule.getLocalTimezoneName();a&&(e=this.parent.tzModule.remove(new Date(+e.getTime()),a));var s=i.i(r.f)(e);return i.i(n.isNullOrUndefined)(t)?t=s:-1===t.indexOf(s)&&(t=i.i(n.isNullOrUndefined)(t)?s:t+","+s),t},e.prototype.processRecurrenceRule=function(e,t){var n,a=this.parent.eventFields,o=e[a.recurrenceRule];if(t instanceof Date)n=new Date(+t);else{n=new Date(+t[a.startTime]);var l=t[a.recurrenceRule];if(l){var c=e[a.startTime],p="DeleteFollowingEvents"===this.parent.currentAction?t[a.recurrenceException]:null,d=i.i(r.b)(c,l,p,this.parent.activeViewOptions.firstDayOfWeek),h=new Date(d.slice(-1)[0]);h.setHours(n.getHours(),n.getMinutes(),n.getSeconds()),n.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),t[a.recurrenceRule]=this.getUpdatedRecurrenceRule(l,new Date(+h),!1)}}e[a.recurrenceRule]=this.getUpdatedRecurrenceRule(o,s.d(new Date(n.getTime()),-1),!0)},e.prototype.getUpdatedRecurrenceRule=function(e,t,n){for(var a=e.split(";"),s="",o=0,l=a;o<l.length;o++){var c=l[o];if(""!==c){var p=c.split("=")[0],d=c.split("=")[1];"COUNT"!==p&&"UNTIL"!==p||(d=i.i(r.f)(t),c=c.replace(c,"UNTIL="+d)),s+=c+";"}}return n&&-1===s.indexOf("UNTIL")&&(s+="UNTIL="+i.i(r.f)(t)),s},e.prototype.isBlockEvent=function(e){for(var t=e instanceof Array?e:[e],i=!1,n=0,r=t;n<r.length;n++){i=r[n][this.parent.eventFields.isBlock]||!1}return i},e.prototype.destroy=function(){this.crudObj=null,this.parent=null},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return u});var n=i(0),r=(i.n(n),i(21)),a=i(5),s=i(7),o=i(25),l=i(15),c=i(3),p=i(2),d=i(1),h=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.widthUptoCursorPoint=0,t.heightUptoCursorPoint=0,t.cursorPointIndex=0,t.isHeaderRows=!1,t.isTimelineDayProcess=!1,t.widthPerMinute=0,t.heightPerMinute=0,t.minDiff=0,t.isStepDragging=!1,t.isMorePopupOpened=!1,t.isAllDayDrag=!1,t.isMultiSelect=!1,t.multiData=[],t.updatedData=[],t.swagData=[],t.startTime=0,t.isAllDayTarget=!1,t.targetTd=null,t.isCursorAhead=!1,t}return h(t,e),t.prototype.wireDragEvent=function(e){new n.Draggable(e,{abort:"."+c.V,clone:!0,isDragScroll:!0,enableTailMode:!!this.parent.eventDragArea,cursorAt:this.parent.eventDragArea?{left:-20,top:-20}:{left:0,top:0},dragArea:this.dragArea,dragStart:this.dragStart.bind(this),drag:this.drag.bind(this),dragStop:this.dragStop.bind(this),enableAutoScroll:!1,helper:this.dragHelper.bind(this),queryPositionInfo:this.dragPosition.bind(this)})},t.prototype.setDragArea=function(){var e=document.querySelector(this.parent.eventDragArea);this.dragArea=this.parent.eventDragArea&&e?e:this.parent.element.querySelector("."+c.h)},t.prototype.dragHelper=function(e){var t=this;if(e.sender&&"touchmove"===e.sender.type&&(!this.parent.uiStateValues.isTapHold||!e.element.classList.contains(c.R)))return null;this.setDragActionDefaultValues(),this.actionObj.element=e.element,this.actionObj.action="drag";var r=[];return!this.parent.allowMultiDrag||i.i(n.isNullOrUndefined)(this.parent.selectedElements)||0===this.parent.selectedElements.length||this.parent.selectedElements.length>0&&-1===this.parent.selectedElements.indexOf(this.actionObj.element)?r=[e.element]:(r=this.parent.selectedElements,this.isMultiSelect=!0),r.forEach(function(e){var r=t.createCloneElement(e);e.getAttribute("data-guid")===t.actionObj.element.getAttribute("data-guid")&&(t.actionObj.clone=r,t.parent.eventDragArea||"Month"===t.parent.currentView||!t.parent.activeViewOptions.timeScale.enable||t.parent.activeView.isTimelineView()||t.actionObj.element.classList.contains(c._31)||i.i(n.setStyleAttribute)(t.actionObj.clone,{cursor:"move",left:"0%",right:"0%",width:"100%"}),t.actionObj.clone.style.top=i.i(n.formatUnit)(t.actionObj.element.offsetTop)),t.actionObj.cloneElement.push(r),t.actionObj.originalElement.push(e)}),this.actionObj.clone},t.prototype.dragPosition=function(e){if(this.parent.eventDragArea)return{left:e.left,top:e.top};var t=this.actionObj.cellHeight/this.actionObj.slotInterval*this.actionObj.interval,r=i.i(n.formatUnit)(0);"Month"===this.parent.currentView&&(r=e.left);var a;a=this.isStepDragging?Math.ceil(this.actionObj.clone.getBoundingClientRect().right)+this.actionObj.interval:this.actionObj.clone.getBoundingClientRect().right;var s=this.parent.element.querySelector("."+c.g),o=s.getBoundingClientRect().right;!(this.parent.activeView.isTimelineView()&&"TimelineYear"!==this.parent.currentView&&!this.parent.enableRtl&&this.actionObj.pageX>a)||this.isMorePopupOpened||this.actionObj.pageX>o||(this.isCursorAhead=!0),this.parent.activeView.isTimelineView()&&(r=i.i(n.formatUnit)(this.actionObj.clone.offsetLeft));var l;if(this.parent.activeView.isTimelineView()||!this.parent.timeScale.enable||!i.i(n.isNullOrUndefined)(this.actionObj.clone.offsetParent)&&this.actionObj.clone.offsetParent.classList.contains(c._77))l=i.i(n.formatUnit)(this.actionObj.clone.offsetTop);else if("Month"===this.parent.currentView)l=i.i(n.formatUnit)(0);else if(this.actionObj.clone.classList.contains(c._31))l=i.i(n.formatUnit)(this.parent.element.querySelector("."+c._28).offsetTop),i.i(n.setStyleAttribute)(this.actionObj.clone,{width:i.i(n.formatUnit)(Math.ceil(this.actionObj.clone.offsetWidth/this.actionObj.cellWidth)*this.actionObj.cellWidth),right:this.parent.enableRtl&&i.i(n.formatUnit)(0)});else{this.actionObj.element.classList.contains(c._31)&&!this.actionObj.clone.classList.contains(c._31)&&i.i(n.setStyleAttribute)(this.actionObj.clone,{height:i.i(n.formatUnit)(this.actionObj.cellHeight),width:i.i(n.formatUnit)(this.actionObj.cellWidth-1),pointerEvents:"none"});var p=parseInt(e.top,10);p=p<0?0:p,l=i.i(n.formatUnit)(Math.ceil(p/t)*t);var d=this.parent.element.querySelector(".e-content-wrap").scrollHeight,h=parseInt(l,10)+this.actionObj.clone.offsetHeight;h>d&&(l=parseInt(l,10)-(h-d)+"px")}return{left:r,top:l}},t.prototype.setDragActionDefaultValues=function(){this.actionObj.action="drag",this.actionObj.isAllDay=null,this.actionObj.slotInterval=this.parent.activeViewOptions.timeScale.interval/this.parent.activeViewOptions.timeScale.slotCount,this.actionObj.interval=this.actionObj.slotInterval;var e=this.parent.element.querySelector("."+c.n);this.actionObj.cellWidth=e.offsetWidth,this.actionObj.cellHeight=e.offsetHeight},t.prototype.dragStart=function(e){var t=this,r=this.actionObj.element.getAttribute("data-guid");this.actionObj.event=this.parent.eventBase.getEventByGuid(r);var h=i.i(n.extend)({},this.actionObj.event,null,!0);i.i(n.isNullOrUndefined)(h)||(this.startTime=h[this.parent.eventFields.startTime].getTime());var u={cancel:!1,data:h,selectedData:this.getSelectedData(),event:e,excludeSelectors:null,element:this.actionObj.element,interval:this.actionObj.interval,navigation:{enable:!1,timeDelay:2e3},scroll:{enable:!0,scrollBy:30,timeDelay:100}};this.parent.trigger(p.r,u,function(r){if(r.cancel||!i.i(n.isNullOrUndefined)(t.actionObj.element)&&i.i(n.isNullOrUndefined)(t.actionObj.element.parentElement)){var p=t.actionObj.element.ej2_instances[0];return i.i(n.isNullOrUndefined)(p)||p.intDestroy(e.event),t.actionObj.action="",t.removeCloneElementClasses(),void t.removeCloneElement()}t.actionClass("addClass"),t.parent.uiStateValues.action=!0,t.actionObj.start=h[t.parent.eventFields.startTime],t.actionObj.end=h[t.parent.eventFields.endTime],t.actionObj.groupIndex=parseInt(t.actionObj.element.getAttribute("data-group-index")||"0",10),t.actionObj.interval=r.interval,t.actionObj.navigation=r.navigation,t.actionObj.scroll=r.scroll,t.actionObj.excludeSelectors=r.excludeSelectors;var u=t.parent.element.querySelector("."+c.g);if(t.scrollArgs={element:u,width:u.scrollWidth,height:u.scrollHeight},t.widthPerMinute=t.actionObj.cellWidth/t.actionObj.slotInterval*t.actionObj.interval,t.heightPerMinute=t.actionObj.cellHeight/t.actionObj.slotInterval*t.actionObj.interval,t.widthUptoCursorPoint=0,t.heightUptoCursorPoint=0,t.cursorPointIndex=-1,t.isHeaderRows=!1,t.isTimelineDayProcess=!1,t.minDiff=0,t.isMorePopupOpened=!1,t.daysVariation=-1,t.isAllDayTarget=t.actionObj.clone.classList.contains(c._31),(t.parent.activeView.isTimelineView()||!t.parent.timeScale.enable)&&"TimelineYear"!==t.parent.currentView){!i.i(n.isNullOrUndefined)(t.actionObj.clone.offsetParent)&&t.actionObj.clone.offsetParent.classList.contains(c._77)&&(t.isMorePopupOpened=!0),t.actionObj.pageX=e.event.pageX;var g=t.parent.activeViewOptions.headerRows;t.isHeaderRows=g.length>0&&"Hour"!==g[g.length-1].option&&"Date"!==g[g.length-1].option,t.isTimelineDayProcess=!t.parent.activeViewOptions.timeScale.enable||t.isHeaderRows||"TimelineMonth"===t.parent.currentView||g.length>0&&"Date"===g[g.length-1].option,t.isStepDragging=!t.isTimelineDayProcess&&t.actionObj.slotInterval!==t.actionObj.interval,t.isTimelineDayProcess?t.timelineEventModule=new s.a(t.parent,"day"):t.timelineEventModule=new s.a(t.parent,"hour")}if("TimelineYear"===t.parent.currentView&&(t.yearEvent=new o.a(t.parent)),"Month"===t.parent.currentView&&(t.startTime=d.b(new Date(t.startTime)).getTime(),t.updateOriginalElement(t.actionObj.clone),t.monthEvent=new a.a(t.parent)),"Day"===t.parent.currentView||"Week"===t.parent.currentView||"WorkWeek"===t.parent.currentView){t.verticalEvent=new l.a(t.parent),t.verticalEvent.initializeValues();t.splitEvent(t.actionObj.event).forEach(function(e){var r='.e-day-wrapper[data-date="'+d.b(e[t.parent.eventFields.startTime]).getTime()+'"]';t.parent.activeViewOptions.group.resources.length>0&&(r=r.concat('[data-group-index = "'+t.actionObj.groupIndex+'"]'));var a=t.parent.element.querySelector(r);if(a){var s=a.querySelector('[data-id="'+t.actionObj.clone.getAttribute("data-id")+'"]');s&&i.i(n.addClass)([s],c._78)}})}})},t.prototype.getSelectedData=function(){if(this.isMultiSelect&&0===this.multiData.length&&this.parent.selectedElements.length>0)for(var e=0,t=this.parent.selectedElements;e<t.length;e++){var r=t[e],a=r.getAttribute("data-guid"),s=this.parent.eventBase.getEventByGuid(a);this.multiData.push(i.i(n.extend)({},s,null,!0))}return this.multiData},t.prototype.drag=function(e){if(e.event&&"touchmove"===e.event.type&&e.event.preventDefault(),this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(!0),i.i(n.isNullOrUndefined)(e.target)||!e.target.classList||!e.target.classList.contains(c.r)){var t=i.i(n.extend)({},this.actionObj.event,null,!0),r=this.parent.eventBase.getPageCoordinates(e);if(this.actionObj.Y=this.actionObj.pageY=r.pageY,this.actionObj.X=this.actionObj.pageX=r.pageX,this.actionObj.target=e.target,this.widthUptoCursorPoint=0===this.widthUptoCursorPoint?Math.ceil(Math.abs(this.actionObj.clone.getBoundingClientRect().left-this.actionObj.X)/this.widthPerMinute)*this.widthPerMinute:this.widthUptoCursorPoint,this.widthUptoCursorPoint=this.isMorePopupOpened?this.actionObj.cellWidth:this.widthUptoCursorPoint,this.heightUptoCursorPoint=0===this.heightUptoCursorPoint?Math.ceil(Math.abs(this.actionObj.clone.getBoundingClientRect().top-this.actionObj.Y)/this.heightPerMinute)*this.heightPerMinute:this.heightUptoCursorPoint,this.isAllDayDrag=this.parent.activeViewOptions.timeScale.enable?this.actionObj.clone.classList.contains(c._31):this.actionObj.event[this.parent.eventFields.isAllDay],this.isStepDragging&&0===this.minDiff&&this.calculateMinutesDiff(t),("Month"===this.parent.currentView||this.isAllDayDrag)&&this.daysVariation<0){var a=this.parent.getDateFromElement(this.actionObj.target);if(i.i(n.isNullOrUndefined)(a))this.daysVariation=0;else{var s=d.b(a),o=d.b(new Date(t[this.parent.eventFields.startTime].getTime()));this.daysVariation=(s.getTime()-o.getTime())/d.c}}else this.daysVariation=0;if(this.parent.eventDragArea){var l=r.target;this.actionObj.clone.style.top=i.i(n.formatUnit)(l.offsetTop),this.actionObj.clone.style.left=i.i(n.formatUnit)(l.offsetLeft);i.i(n.closest)(l,"."+c._79)?"Week"!==this.parent.currentView&&"WorkWeek"!==this.parent.currentView&&"Day"!==this.parent.currentView&&(this.actionObj.clone.style.width=i.i(n.formatUnit)(this.actionObj.element.offsetWidth)):(this.actionObj.clone.style.height="",this.actionObj.clone.style.width="")}this.updateScrollPosition(e),this.updateNavigatingPosition(e),this.updateDraggingDateTime(e);var h={data:t,event:e,element:this.actionObj.element,startTime:this.actionObj.start,endTime:this.actionObj.end,selectedData:this.updatedData};this.parent.group.resources.length>0&&(h.groupIndex=this.actionObj.groupIndex),this.parent.trigger(p.s,h)}},t.prototype.calculateMinutesDiff=function(e){this.parent.enableRtl?this.minDiff=(this.actionObj.clone.offsetWidth-this.widthUptoCursorPoint)/this.widthPerMinute*this.actionObj.interval:this.minDiff=this.widthUptoCursorPoint/this.widthPerMinute*this.actionObj.interval;var t=e[this.parent.eventFields.startTime],i=this.parent.activeView.renderDates[0],n=d.w(i,this.parent.activeView.getStartHour(),this.parent.activeView.getEndHour());n.startHour.getTime()>t.getTime()&&(this.minDiff=this.minDiff+(n.startHour.getTime()-t.getTime())/d.g)},t.prototype.dragStop=function(e){var t=this;if(this.isCursorAhead=!1,this.removeCloneElementClasses(),this.removeCloneElement(),clearInterval(this.actionObj.navigationInterval),this.actionObj.navigationInterval=null,clearInterval(this.actionObj.scrollInterval),this.actionObj.scrollInterval=null,this.actionClass("removeClass"),this.parent.uiStateValues.action=this.parent.uiStateValues.isTapHold=!1,!this.isAllowDrop(e)){var r=e.target.classList&&!e.target.classList.contains("e-work-cells")&&this.parent.cellTemplate?i.i(n.closest)(e.target,".e-work-cells"):e.target,a={cancel:!1,data:this.getChangedData(this.updatedData),selectedData:this.updatedData,event:e,element:this.actionObj.element,target:r};this.actionObj.action=null,this.parent.trigger(p.t,a,function(e){if(!e.cancel){if(t.parent.isSpecificResourceEvents()){t.parent.crudModule.crudObj.isCrudAction=!0,t.parent.crudModule.crudObj.sourceEvent=[t.parent.resourceBase.lastResourceLevel[parseInt(a.element.getAttribute("data-group-index"),10)]];var i=parseInt(a.target.getAttribute("data-group-index"),10)||t.actionObj.groupIndex;t.parent.crudModule.crudObj.targetEvent=[t.parent.resourceBase.lastResourceLevel[parseInt(i.toString(),10)]]}t.saveChangedData(e,t.isMultiSelect)}}),this.updatedData=[],this.multiData=[],this.isMultiSelect=!1,this.parent.selectedElements=[]}},t.prototype.updateNavigatingPosition=function(e){var t=this;if(this.actionObj.navigation.enable){var r=this.parent.getCurrentTime();i.i(n.isNullOrUndefined)(this.actionObj.navigationInterval)&&(this.actionObj.navigationInterval=window.setInterval(function(){if(r){var i=t.parent.getCurrentTime(),n=i.getSeconds(),a=r.getSeconds()+t.actionObj.navigation.timeDelay/1e3;a=a>=60?a-60:a,a===n&&(r=t.parent.getCurrentTime(),t.viewNavigation(e),t.updateDraggingDateTime(e))}},this.actionObj.navigation.timeDelay))}},t.prototype.updateDraggingDateTime=function(e){!i.i(n.isNullOrUndefined)(this.actionObj.clone.offsetParent)&&this.actionObj.clone.offsetParent.classList.contains(c._77)?this.morePopupEventDragging(e):this.parent.activeView.isTimelineView()&&"TimelineYear"!==this.parent.currentView?(this.timelineEventModule.dateRender=this.parent.activeView.renderDates,this.timelineEventModule.cellWidth=this.actionObj.cellWidth,this.timelineEventModule.getSlotDates(),this.actionObj.cellWidth=this.isHeaderRows?this.timelineEventModule.cellWidth:d.J(this.parent.element.querySelector("."+c.n)),this.calculateTimelineTime(e)):"Month"===this.parent.currentView||"TimelineYear"===this.parent.currentView?this.calculateVerticalDate(e):this.calculateVerticalTime(e)},t.prototype.navigationWrapper=function(){if(this.parent.activeView.isTimelineView()){var e=void 0;if(e=this.parent.activeViewOptions.group.resources.length>0?this.parent.element.querySelectorAll(".e-appointment-container:not(.e-hidden)").item(this.actionObj.index):this.parent.element.querySelector("."+c.l),!i.i(n.isNullOrUndefined)(e)){var t=e.querySelector("."+c.D);t||(t=i.i(n.createElement)("div",{className:c.D}),e.appendChild(t)),this.actionObj.cloneElement.forEach(function(e){t.appendChild(e)})}}else if("Month"!==this.parent.currentView&&this.parent.timeScale.enable){var r=this.actionObj.clone.classList.contains(c._31)?"."+c._7:"."+c.D;if(this.parent.element.querySelectorAll(r).item(this.actionObj.index).appendChild(this.actionObj.clone),r==="."+c._7){var a=this.getAllDayEventHeight(),s=[].slice.call(this.parent.element.querySelectorAll("."+c.U+":first-child"));if(s[0].offsetHeight<a)for(var o=0,l=s;o<l.length;o++){var p=l[o];p.style.height=(a+2)/12+"em"}this.actionObj.clone.style.height=i.i(n.formatUnit)(a)}this.actionObj.height=parseInt(this.actionObj.clone.style.height,10)}else{var d=[].slice.call(this.parent.element.querySelectorAll("."+c.n));this.actionObj.index=this.parent.activeView.renderDates.length<this.actionObj.index?this.parent.activeView.renderDates.length-1:this.actionObj.index;var h=d[this.actionObj.index].querySelector("."+c.D);h||(h=i.i(n.createElement)("div",{className:c.D}),d[this.actionObj.index].appendChild(h)),h.appendChild(this.actionObj.clone)}},t.prototype.viewNavigation=function(e){var t,r=this.parent.element.querySelector("."+c.g);r&&(!this.scrollEdges.top&&!this.scrollEdges.bottom||i.i(n.closest)(this.actionObj.clone,"."+c._7))&&(0===r.scrollLeft&&Math.round(this.actionObj.X)<=Math.round(r.getBoundingClientRect().left+this.actionObj.cellWidth+window.pageXOffset)?t=this.parent.enableRtl?"next":"previous":Math.round(r.scrollLeft)+r.clientWidth===r.scrollWidth&&Math.round(this.actionObj.X)>=Math.round(r.getBoundingClientRect().right-this.actionObj.cellWidth+window.pageXOffset)&&(t=this.parent.enableRtl?"previous":"next"),t&&this.parent.changeDate(this.parent.activeView.getNextPreviousDate(t)))},t.prototype.morePopupEventDragging=function(e){if(!(i.i(n.isNullOrUndefined)(e.target)||e.target&&i.i(n.isNullOrUndefined)(i.i(n.closest)(e.target,"td")))){var t=i.i(n.extend)({},this.actionObj.event,null,!0),r=t[this.parent.eventFields.endTime].getTime()-t[this.parent.eventFields.startTime].getTime(),a=i.i(n.closest)(e.target,"td");if("TimelineYear"!==this.parent.currentView||a.classList.contains(c.n)&&!a.classList.contains(c.t)){var s=this.parent.getDateFromElement(a),o=new Date(s.getTime());o.setMilliseconds(r),this.parent.activeViewOptions.group.resources.length>0&&(this.actionObj.groupIndex=parseInt(a.getAttribute("data-group-index"),10)),this.actionObj.start=new Date(s.getTime()),this.actionObj.end=new Date(o.getTime()),this.actionObj.clone.style.top=i.i(n.formatUnit)(a.offsetParent.offsetTop),this.actionObj.clone.style.left=i.i(n.formatUnit)(a.offsetLeft),this.actionObj.clone.style.width=i.i(n.formatUnit)(a.offsetWidth);var l,p=a;if(this.parent.activeView.isTimelineView()){var d=i.i(n.closest)(a,"tr").rowIndex;p=this.parent.element.querySelectorAll(".e-appointment-container").item(d)}l=p.querySelector("."+c.D),l||(l=i.i(n.createElement)("div",{className:c.D}),p.appendChild(l)),this.appendCloneElement(l)}}},t.prototype.calculateVerticalTime=function(e){var t=this;if(!(i.i(n.isNullOrUndefined)(this.actionObj.target)||this.actionObj.target&&i.i(n.isNullOrUndefined)(i.i(n.closest)(this.actionObj.target,"tr")))&&(i.i(n.isNullOrUndefined)(i.i(n.closest)(this.actionObj.target,"td"))||i.i(n.closest)(this.actionObj.target,"td").classList.contains(c.n)||i.i(n.closest)(this.actionObj.target,"td").classList.contains(c.U))){this.parent.activeViewOptions.timeScale.enable&&this.swapDragging(e);var r=this.parent.element.querySelector("."+c.g),a=i.i(n.extend)({},this.actionObj.event,null,!0),s=a[this.parent.eventFields.startTime],o=a[this.parent.eventFields.endTime],l=d.G(o)-d.G(s),p=Math.floor(parseInt(this.actionObj.clone.style.top,10)/this.actionObj.cellHeight)*this.actionObj.cellHeight;p=p<0?0:p,(this.scrollEdges.top||this.scrollEdges.bottom)&&(p=this.scrollEdges.top?r.scrollTop-this.heightUptoCursorPoint+this.actionObj.cellHeight+window.pageYOffset:r.scrollTop+r.offsetHeight-this.actionObj.clone.offsetHeight+window.pageYOffset+(this.actionObj.clone.offsetHeight-this.heightUptoCursorPoint),p=Math.round(p/this.actionObj.cellHeight)*this.actionObj.cellHeight,r.scrollTop>0&&(this.actionObj.clone.style.top=i.i(n.formatUnit)(p)));var h,u=this.parent.activeViewOptions.timeScale.enable?p/this.actionObj.cellHeight:0,g=this.actionObj.cellHeight/this.actionObj.slotInterval,v=parseInt(this.actionObj.clone.style.top,10)-p;if(this.isAllDayDrag)h=this.parent.element.querySelector("."+c._28);else{h=[].slice.call(this.parent.getContentTable().querySelectorAll("tr"))[parseInt(u.toString(),10)]}var f;i.i(n.isNullOrUndefined)(i.i(n.closest)(this.actionObj.target,"td"))||!i.i(n.closest)(this.actionObj.target,"td").classList.contains(c.n)&&!i.i(n.closest)(this.actionObj.target,"td").classList.contains(c.U)||(f=i.i(n.closest)(this.actionObj.target,"td").cellIndex);var m=i.i(n.isNullOrUndefined)(f)?i.i(n.closest)(this.actionObj.clone,"td").cellIndex:f;if(this.actionObj.index=m,!i.i(n.isNullOrUndefined)(h)){var y=h.children[parseInt(m.toString(),10)];this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(this.actionObj.groupIndex=parseInt(y.getAttribute("data-group-index"),10));var T,w;if(this.parent.activeViewOptions.timeScale.enable&&!this.isAllDayDrag)this.appendCloneElement(this.getEventWrapper(m)),T=this.parent.getDateFromElement(y),T.setMinutes(T.getMinutes()+v/g),w=new Date(T.getTime()),this.actionObj.element.classList.contains(c._31)?w.setMinutes(w.getMinutes()+this.actionObj.slotInterval):w.setMilliseconds(l);else{T=this.parent.getDateFromElement(y),T.setDate(T.getDate()-this.daysVariation),T.setHours(s.getHours(),s.getMinutes(),s.getSeconds()),w=new Date(T.getTime()),w.setMilliseconds(l),!this.actionObj.element.classList.contains(c._31)&&this.actionObj.clone.classList.contains(c._31)&&(w=d.d(d.b(w),1));var D=this.parent.activeViewOptions.group.byDate||this.parent.virtualScrollModule&&!this.parent.activeViewOptions.timeScale.enable?m:void 0;this.updateAllDayEvents(T,w,D)}this.actionObj.start=new Date(+T),this.actionObj.end=new Date(+w);for(var b=this.getUpdatedEvent(this.actionObj.start,this.actionObj.end,this.actionObj.event),S=[].slice.call(this.parent.element.querySelectorAll(".e-dynamic-clone")),C=0,O=S;C<O.length;C++){var E=O[C];i.i(n.remove)(E)}if(this.multiData.length>0){if(this.isAllDayTarget&&this.isAllDayDrag&&!i.i(n.isNullOrUndefined)(this.actionObj.isAllDay)&&!this.actionObj.isAllDay){var x=parseInt(i.i(n.closest)(this.actionObj.target,"td").getAttribute("data-date"),10);this.multiData.forEach(function(e){if(t.swagData.push(i.i(n.extend)({},e,null,!0)),e[t.parent.eventFields.isAllDay]){e[t.parent.eventFields.startTime]=new Date(e[t.parent.eventFields.startTime].getTime()+(x-t.startTime));var r=new Date(e[t.parent.eventFields.startTime]),a=new Date(r.setMinutes(r.getMinutes()+t.actionObj.slotInterval));e[t.parent.eventFields.endTime]=a,e[t.parent.eventFields.isAllDay]=!1}}),this.startTime=x}if(this.isAllDayTarget&&this.isAllDayDrag&&!i.i(n.isNullOrUndefined)(this.actionObj.isAllDay)&&this.actionObj.isAllDay&&this.swagData.length>0){this.multiData=this.swagData,this.swagData=[];var A=i.i(n.extend)({},this.actionObj.event,null,!0);this.startTime=A[this.parent.eventFields.startTime].getTime()}for(var V=b[this.parent.eventFields.startTime].getTime()-this.startTime,I=0;I<this.multiData.length;I++){this.updatedData[parseInt(I.toString(),10)]=this.updateMultipleData(this.multiData[parseInt(I.toString(),10)],V);var M=this.getDayIndex(this.updatedData[parseInt(I.toString(),10)]);if(M>=0){var E=this.getEventWrapper(M,this.updatedData[parseInt(I.toString(),10)][this.parent.eventFields.isAllDay]);this.appendCloneElement(E,this.actionObj.cloneElement[parseInt(I.toString(),10)]),this.updateEventHeight(this.updatedData[parseInt(I.toString(),10)],I,M)}else i.i(n.isNullOrUndefined)(this.actionObj.cloneElement[parseInt(I.toString(),10)].parentNode)||i.i(n.remove)(this.actionObj.cloneElement[parseInt(I.toString(),10)])}}else this.updateEventHeight(b);this.updateTimePosition(this.actionObj.start,this.updatedData)}}},t.prototype.splitEvent=function(e){var t=this.parent.eventFields,r=[],a=e[t.startTime],s=e[t.endTime];if(d.b(new Date(a.getTime()))<d.b(new Date(s.getTime()))){for(var o=d.b(new Date(a.getTime())),l=new Date(o.getTime()),c=0;o<new Date(s.getTime());c++){l=new Date(l.setDate(o.getDate()+1));var p=i.i(n.extend)({},e,null,!0);p[t.startTime]=new Date(o),p[t.endTime]=new Date(l),o=new Date(o.setDate(o.getDate()+1)),r.push(p)}var h=r.length-1;r[0][t.startTime]=a,r[parseInt(h.toString(),10)][t.endTime]=s}else r.push(e);return r},t.prototype.updateMultipleData=function(e,t){var r=i.i(n.extend)({},e,null,!0);!i.i(n.isNullOrUndefined)(this.actionObj.isAllDay)&&this.parent.activeViewOptions.timeScale.enable&&(this.isAllDayTarget&&r[this.parent.eventFields.isAllDay]||!this.isAllDayTarget&&!r[this.parent.eventFields.isAllDay])&&(r[this.parent.eventFields.isAllDay]=this.actionObj.isAllDay);var a=r[this.parent.eventFields.endTime].getTime()-r[this.parent.eventFields.startTime].getTime();if(r[this.parent.eventFields.isAllDay]){var s=Math.ceil(t/864e5),o=Math.ceil(a/864e5),l=new Date(r[this.parent.eventFields.startTime]);r[this.parent.eventFields.startTime]=d.b(new Date(l.setDate(l.getDate()+s))),r[this.parent.eventFields.endTime]=d.d(r[this.parent.eventFields.startTime],o)}else r[this.parent.eventFields.startTime]=new Date(r[this.parent.eventFields.startTime].getTime()+t),r[this.parent.eventFields.endTime]=new Date(r[this.parent.eventFields.startTime].getTime()+a);return r},t.prototype.getDayIndex=function(e){var t=i.i(n.extend)({},e,null,!0),r=d.b(t[this.parent.eventFields.startTime]);if(this.parent.activeViewOptions.timeScale.enable&&!t[this.parent.eventFields.isAllDay]){var a=this.parent.activeView.getStartHour();r.setMilliseconds(a.getTime()-d.b(a).getTime())}var s=r.getTime(),o="",l=c._9;return l=this.parent.activeViewOptions.timeScale.enable&&t[this.parent.eventFields.isAllDay]?c._7:c.n,o="."+l+'[data-date="'+s+'"]',this.parent.activeViewOptions.group.resources.length>0&&(o=o+'[data-group-index="'+this.actionObj.groupIndex+'"]'),this.targetTd=this.parent.element.querySelector(o),i.i(n.isNullOrUndefined)(this.targetTd)?-1:this.targetTd.cellIndex},t.prototype.updateEventHeight=function(e,t,r){this.verticalEvent.initializeValues();var a=this.verticalEvent.getStartCount();if(!this.parent.uiStateValues.isGroupAdaptive)for(var s=0;s<this.actionObj.groupIndex;s++)this.verticalEvent.dateRender[parseInt(s.toString(),10)]&&(a+=this.verticalEvent.dateRender[parseInt(s.toString(),10)].length);var o=this.parent.uiStateValues.isGroupAdaptive?a:this.actionObj.groupIndex;if(!(!this.parent.activeViewOptions.group.byDate||i.i(n.isNullOrUndefined)(this.parent.getDateFromElement(this.actionObj.target)))||!this.parent.activeViewOptions.group.byDate)for(var l=-1,p=this.parent.activeViewOptions.group.byDate?this.parent.getIndexOfDate(this.verticalEvent.dateRender[parseInt(o.toString(),10)],d.b(this.parent.getDateFromElement(i.i(n.isNullOrUndefined)(t)?this.actionObj.target:this.targetTd))):i.i(n.isNullOrUndefined)(t)?this.actionObj.index-a:r-a,h=this.splitEvent(e),u=this.parent.eventBase.isAllDayAppointment(e)||h.length>2||"TimeSlot"!==this.parent.eventSettings.spannedEventPlacement?[e]:h,s=0;s<u.length;s++){if(s>0){var g='.e-day-wrapper[data-date="'+d.b(u[parseInt(s.toString(),10)][this.parent.eventFields.startTime]).getTime()+'"]';this.parent.activeViewOptions.group.resources.length>0&&(g=g.concat('[data-group-index = "'+this.actionObj.groupIndex+'"]'));var v=this.parent.element.querySelector(g);v?(p+=1,l=v.cellIndex):p=-1}if(p>=0){var f=this.verticalEvent.isSpannedEvent(u[parseInt(s.toString(),10)],p,o),m=f[this.verticalEvent.fields.startTime],y=f[this.verticalEvent.fields.endTime],T=this.parent.activeViewOptions.timeScale.enable?this.verticalEvent.getHeight(m,y):this.actionObj.element.offsetHeight,w=this.parent.activeViewOptions.timeScale.enable?this.verticalEvent.getTopValue(m,p,o):this.actionObj.element.offsetTop;if(i.i(n.isNullOrUndefined)(t))0===s?(this.actionObj.clone.style.top=i.i(n.formatUnit)(w),this.actionObj.clone.style.height=i.i(n.formatUnit)(T)):this.renderSpannedEvents(f,l,w,T);else{var D=this.actionObj.cellWidth;if(e[this.parent.eventFields.isAllDay]){w=this.parent.element.querySelector("."+c._28).offsetTop,T=this.getAllDayEventHeight();var b=e[this.parent.eventFields.endTime].getTime()-e[this.parent.eventFields.startTime].getTime(),S=Math.ceil(b/864e5);S>=0&&(D=S*this.actionObj.cellWidth)}this.actionObj.cloneElement[parseInt(t.toString(),10)]&&(0===s?(this.actionObj.cloneElement[parseInt(t.toString(),10)].style.top=i.i(n.formatUnit)(w),this.actionObj.cloneElement[parseInt(t.toString(),10)].style.height=i.i(n.formatUnit)(T),this.actionObj.cloneElement[parseInt(t.toString(),10)].style.width=i.i(n.formatUnit)(D),this.actionObj.cloneElement[parseInt(t.toString(),10)].style.left=i.i(n.formatUnit)(0)):this.renderSpannedEvents(f,l,w,T))}}}},t.prototype.renderSpannedEvents=function(e,t,r,a){if(e[this.parent.eventFields.startTime].getTime()!==e[this.parent.eventFields.endTime].getTime()){var s=this.verticalEvent.createAppointmentElement(e,!1,e.isSpanned,this.actionObj.groupIndex);i.i(n.addClass)([s],[c._80,"e-dynamic-clone"]),i.i(n.setStyleAttribute)(s,{width:"100%",height:a+"px",top:r+"px",border:"0px"}),[].slice.call(this.parent.element.querySelectorAll("."+c.D))[parseInt(t.toString(),10)].appendChild(s)}},t.prototype.getRenderedDates=function(){var e,t,i=this,n=this.parent.activeView.renderDates;if((e=this.parent.eventBase.slots).push.apply(e,this.parent.activeView.renderDates.map(function(e){return+e})),this.parent.activeViewOptions.group.resources.length>0){this.parent.eventBase.slots=[];n=this.parent.resourceBase.lastResourceLevel.filter(function(e){return e.groupIndex===i.actionObj.groupIndex})[0].renderDates,(t=this.parent.eventBase.slots).push.apply(t,n.map(function(e){return+e}))}return n},t.prototype.updateAllDayEvents=function(e,t,r){this.parent.eventBase.slots=[];var a=this.getUpdatedEvent(e,t,this.actionObj.event),s=this.getRenderedDates(),o=this.parent.eventBase.splitEvent(a,s),l='.e-all-day-cells[data-date="'+o[0][this.parent.eventFields.startTime].getTime()+'"]';this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(l=l.concat('[data-group-index = "'+this.actionObj.groupIndex+'"]'));var c=[].slice.call(this.parent.element.querySelectorAll(l));if(c.length>0||!i.i(n.isNullOrUndefined)(r)){var p=i.i(n.isNullOrUndefined)(r)?c[0].cellIndex:r;this.appendCloneElement(this.getEventWrapper(p)),this.actionObj.clone.style.width=i.i(n.formatUnit)(o[0].data.count*this.actionObj.cellWidth)}},t.prototype.swapDragging=function(e){var t=!i.i(n.isNullOrUndefined)(i.i(n.closest)(this.actionObj.target,"td"))&&i.i(n.closest)(this.actionObj.target,"td").cellIndex;if(i.i(n.closest)(this.actionObj.target,"."+c.d)&&!i.i(n.closest)(this.actionObj.clone,"."+c._7)){i.i(n.addClass)([this.actionObj.clone],c._31),this.appendCloneElement(this.getEventWrapper(t)),this.actionObj.isAllDay=!0;var r=this.getAllDayEventHeight(),a=[].slice.call(this.parent.element.querySelectorAll("."+c.U+":first-child"));if(a[0].offsetHeight<r)for(var s=0,o=a;s<o.length;s++){var l=o[s];l.style.height=(r+2)/12+"em"}i.i(n.setStyleAttribute)(this.actionObj.clone,{width:i.i(n.formatUnit)(this.actionObj.cellWidth),height:i.i(n.formatUnit)(r),top:i.i(n.formatUnit)(this.parent.element.querySelector("."+c._28).offsetTop)})}if(i.i(n.closest)(this.actionObj.target,"."+c.n)&&!i.i(n.closest)(this.actionObj.clone,"."+c._9)){i.i(n.removeClass)([this.actionObj.clone],c._31),this.appendCloneElement(this.getEventWrapper(t)),this.actionObj.isAllDay=!1;var p=0===this.actionObj.element.offsetHeight?this.actionObj.height:this.actionObj.element.offsetHeight;i.i(n.setStyleAttribute)(this.actionObj.clone,{left:i.i(n.formatUnit)(0),height:i.i(n.formatUnit)(p),width:i.i(n.formatUnit)(this.actionObj.cellWidth)})}},t.prototype.calculateVerticalDate=function(e){if(!(i.i(n.isNullOrUndefined)(e.target)||e.target&&i.i(n.isNullOrUndefined)(i.i(n.closest)(e.target,"tr"))||e.target&&"DIV"===e.target.tagName)){var t=i.i(n.extend)({},this.actionObj.event,null,!0);i.i(n.isNullOrUndefined)(this.parent.eventDragArea)&&this.removeCloneElement();var r=d.G(t[this.parent.eventFields.endTime])-d.G(t[this.parent.eventFields.startTime]),a=i.i(n.closest)(this.actionObj.target,"td");if(!i.i(n.isNullOrUndefined)(a)){var s=a.parentElement;this.actionObj.index=s.rowIndex*s.children.length+a.cellIndex;a=[].slice.call(this.parent.element.querySelectorAll("."+c.n))[this.actionObj.index];var o=this.parent.getDateFromElement(a);if(!i.i(n.isNullOrUndefined)(o)){this.parent.activeViewOptions.group.resources.length>0&&(this.actionObj.groupIndex=parseInt(a.getAttribute("data-group-index"),10));var l=new Date(o.setDate(o.getDate()-this.daysVariation)),p=new Date(l.getTime()),h=d.G(t[this.parent.eventFields.startTime])-d.G(d.b(new Date(+t[this.parent.eventFields.startTime])));p.setMilliseconds(h);var u=new Date(p.getTime());u.setMilliseconds(r),this.actionObj.start=new Date(p.getTime()),this.actionObj.end=new Date(u.getTime())}}var g=this.getUpdatedEvent(this.actionObj.start,this.actionObj.end,this.actionObj.event);if(i.i(n.isNullOrUndefined)(this.parent.eventDragArea))for(var v=[].slice.call(this.parent.element.querySelectorAll("."+c._80)),f=0,m=v;f<m.length;f++){var y=m[f];i.i(n.remove)(y)}if(this.multiData&&this.multiData.length>0){var T=d.b(new Date(g[this.parent.eventFields.startTime])),h=T.getTime()-this.startTime;"TimelineYear"===this.parent.currentView&&this.parent.group.resources.length>0&&(h=12*(T.getFullYear()-new Date(this.startTime).getFullYear()),h-=new Date(this.startTime).getMonth(),h+=T.getMonth());for(var w=0;w<this.multiData.length;w++)this.updatedData[parseInt(w.toString(),10)]=this.updateMultipleVerticalDate(this.multiData[parseInt(w.toString(),10)],h),"TimelineYear"===this.parent.currentView?this.dynamicYearlyEventsRendering(this.updatedData[parseInt(w.toString(),10)]):this.dynamicEventsRendering(this.updatedData[parseInt(w.toString(),10)])}else"TimelineYear"===this.parent.currentView?this.dynamicYearlyEventsRendering(g):this.dynamicEventsRendering(g)}},t.prototype.updateMultipleVerticalDate=function(e,t){var r=i.i(n.extend)({},e,null,!0),a=r[this.parent.eventFields.endTime].getTime()-r[this.parent.eventFields.startTime].getTime(),s=new Date(r[this.parent.eventFields.startTime]);if("TimelineYear"===this.parent.currentView&&this.parent.group.resources.length>0)r[this.parent.eventFields.startTime]=new Date(s.setMonth(s.getMonth()+t));else{var o=Math.ceil(t/d.c);r[this.parent.eventFields.startTime]=new Date(s.setDate(s.getDate()+o))}return r[this.parent.eventFields.endTime]=new Date(r[this.parent.eventFields.startTime].getTime()+a),r},t.prototype.calculateTimelineTime=function(e){var t=i.i(n.extend)({},this.actionObj.event,null,!0),r=d.G(t[this.parent.eventFields.endTime])-d.G(t[this.parent.eventFields.startTime]),a=this.parent.enableRtl?Math.abs(this.actionObj.clone.offsetLeft)-this.actionObj.clone.offsetWidth:parseInt(this.actionObj.clone.style.left,10);a=Math.floor(a/Math.trunc(this.actionObj.cellWidth))*this.actionObj.cellWidth;var s;this.parent.enableRtl&&(s=Math.abs(parseInt(this.actionObj.clone.style.right,10)),this.actionObj.clone.style.right=i.i(n.formatUnit)(s)),a=this.getOffsetValue(a,s);var o=this.getColumnIndex(a),l=this.parent.element.querySelector("."+c.g),p=l.getBoundingClientRect().right,h=this.parent.activeView.isTimelineView()&&!this.parent.enableRtl&&this.actionObj.pageX>this.actionObj.clone.getBoundingClientRect().right&&!this.isMorePopupOpened&&!(this.actionObj.pageX>p),u=this.parent.eventDragArea?l.scrollLeft-l.offsetLeft:0;!this.isCursorAhead&&!h||this.isStepDragging||(this.isCursorAhead=!0);var g=Math.floor((this.actionObj.pageX-this.actionObj.clone.getBoundingClientRect().left+u)/this.actionObj.cellWidth);this.parent.enableRtl&&(g=Math.abs(Math.floor((this.actionObj.pageX-this.actionObj.clone.getBoundingClientRect().right)/this.actionObj.cellWidth))-1),this.cursorPointIndex<0&&this.cursorIndex(e,t,a,g);var v=this.parent.getContentTable().querySelector("tr"),f=this.getCursorCurrentIndex(o,g,v);f=f<0?0:f;var m=this.isHeaderRows?new Date(this.timelineEventModule.dateRender[parseInt(f.toString(),10)].getTime()):this.parent.getDateFromElement(v.children[parseInt(f.toString(),10)]);if(this.isStepDragging){var y=this.getWidthDiff(v,f);if(0!==y){var T=Math.ceil(y/this.widthPerMinute);if(m.setMinutes(m.getMinutes()+T*this.actionObj.interval),this.isCursorAhead||h)m.setMilliseconds(-r);else{m.setMinutes(m.getMinutes()-this.minDiff);var w=this.actionObj.interval*d.g;T=Math.abs(m.getTime()-this.actionObj.start.getTime())/w;var D=Math.trunc(T);D!==T&&(T=D*w*(m>this.actionObj.start?1:-1),m=new Date(this.actionObj.start.getTime()+T))}}else m=this.actionObj.start}else if(this.isCursorAhead||h){var b=this.isTimelineDayProcess?1440:this.actionObj.slotInterval;m.setMinutes(m.getMinutes()+b),m.setMilliseconds(-r),m.getTime()===d.b(m).getTime()&&0===m.getMinutes()&&0===r&&m.setMinutes(-b)}else m.setMinutes(m.getMinutes()-this.cursorPointIndex*(this.isTimelineDayProcess?1440:this.actionObj.slotInterval));if(this.isStepDragging||(m=this.calculateIntervalTime(m)),this.isTimelineDayProcess){var S=t[this.parent.eventFields.startTime];m.setHours(S.getHours(),S.getMinutes(),S.getSeconds())}if(this.parent.eventDragArea){var C=this.parent.getDateFromElement(e.target);if(!i.i(n.isNullOrUndefined)(C))if(this.parent.activeViewOptions.timeScale.enable&&"TimelineMonth"!==this.parent.currentView)m=C;else{var S=t[this.parent.eventFields.startTime];m=new Date(C.setHours(S.getHours(),S.getMinutes(),S.getSeconds()))}}var O=new Date(m.getTime());O.setMilliseconds(r);var E=[this.getUpdatedEvent(m,O,this.actionObj.event)];if(this.multiData.length>0){for(var x=E[0][this.parent.eventFields.startTime].getTime()-this.startTime,A=0;A<this.multiData.length;A++)this.updatedData[parseInt(A.toString(),10)]=this.updateMultipleData(this.multiData[parseInt(A.toString(),10)],x);E=this.updatedData}for(var V=0;V<E.length;V++){var I=this.multiData.length>0?this.actionObj.cloneElement[parseInt(V.toString(),10)]:this.actionObj.clone;if(i.i(n.isNullOrUndefined)(this.parent.eventDragArea)){var M=this.timelineEventModule.splitEvent(E[parseInt(V.toString(),10)],this.timelineEventModule.dateRender),k=M[0].data,R=this.timelineEventModule.getStartTime(M[0],k),H=this.timelineEventModule.getEndTime(M[0],k),_=this.timelineEventModule.getEventWidth(R,H,t[this.parent.eventFields.isAllDay],k.count),P=this.parent.getIndexOfDate(this.timelineEventModule.dateRender,d.b(new Date(R.getTime())));P=P<0?0:P;var j=this.timelineEventModule.getPosition(R,H,t[this.parent.eventFields.isAllDay],P);this.parent.enableRtl?I.style.right=i.i(n.formatUnit)(j):I.style.left=i.i(n.formatUnit)(j),this.isMorePopupOpened||(I.style.width=i.i(n.formatUnit)(_))}this.parent.activeViewOptions.group.resources.length>0&&this.calculateResourceGroupingPosition(e,I),this.actionObj.start=new Date(m.getTime()),this.actionObj.end=new Date(O.getTime()),this.updateTimePosition(this.actionObj.start,this.updatedData)}},t.prototype.getOffsetValue=function(e,t){if(this.scrollEdges.left||this.scrollEdges.right){var r=this.parent.element.querySelector("."+c.g);this.parent.enableRtl?(t=r.offsetWidth-r.scrollLeft,this.scrollEdges.right?t=t-r.offsetWidth+this.actionObj.clone.offsetWidth-(this.actionObj.clone.offsetWidth-this.widthUptoCursorPoint):(t+=this.widthUptoCursorPoint)-this.widthUptoCursorPoint>=r.scrollWidth&&(this.actionObj.clone.style.width=i.i(n.formatUnit)(this.actionObj.clone.offsetWidth-this.widthUptoCursorPoint+this.actionObj.cellWidth),t=r.scrollLeft-r.scrollWidth),i.i(n.isNullOrUndefined)(this.parent.eventDragArea)&&(this.actionObj.clone.style.left=i.i(n.formatUnit)(t))):(this.scrollEdges.left?(e=r.scrollLeft-this.widthUptoCursorPoint+this.actionObj.cellWidth,r.scrollLeft+r.offsetWidth>=r.offsetWidth?r.scrollLeft=r.scrollLeft-1:0===this.actionObj.clone.offsetLeft&&(e=r.scrollLeft)):e=r.scrollLeft+r.offsetWidth-this.actionObj.clone.offsetWidth+(this.actionObj.clone.offsetWidth-this.widthUptoCursorPoint),e=e<0?0:e,i.i(n.isNullOrUndefined)(this.parent.eventDragArea)&&(this.actionObj.clone.style.left=i.i(n.formatUnit)(e)))}return e},t.prototype.getWidthDiff=function(e,t){var i=this.scrollArgs.element.getBoundingClientRect();if(i.left<=this.actionObj.pageX&&i.right>=this.actionObj.pageX){var n=e.children[parseInt(t.toString(),10)].offsetLeft,r=this.actionObj.pageX-i.left;return this.parent.enableRtl?n+this.actionObj.cellWidth-(this.scrollArgs.element.scrollLeft+r):this.scrollArgs.element.scrollLeft+r-n}return 0},t.prototype.getColumnIndex=function(e){var t=Math.floor(e/Math.trunc(this.actionObj.cellWidth));return this.isHeaderRows?t:this.getIndex(t)},t.prototype.getCursorCurrentIndex=function(e,t,i){var n=e+t;if(this.isHeaderRows){var r=Math.floor(i.offsetWidth/this.actionObj.cellWidth);return n>r-1?r-1:n}return n>i.children.length-1?i.children.length-1:n},t.prototype.cursorIndex=function(e,t,r,a){var s=i.i(n.closest)(e.target,".e-work-cells");if(i.i(n.isNullOrUndefined)(s)||this.isMorePopupOpened)this.cursorPointIndex=0;else{var o=this.parent.getDateFromElement(s);if(this.isHeaderRows){var l=Math.floor(r/this.actionObj.cellWidth);o=new Date(this.timelineEventModule.dateRender[l+a].getTime())}var c=o.getTime()-t[this.parent.eventFields.startTime].getTime();if(this.isTimelineDayProcess)this.cursorPointIndex=Math.abs(Math.ceil(c/d.c));else{var p=Math.floor(c/d.g/(this.actionObj.slotInterval/this.actionObj.cellWidth));this.cursorPointIndex=Math.floor(p/this.actionObj.cellWidth),this.cursorPointIndex=this.cursorPointIndex<0?0:this.cursorPointIndex}}},t.prototype.calculateResourceGroupingPosition=function(e,t){var r=this.parent.element.querySelector("."+c.g),a=[].slice.call(this.parent.element.querySelectorAll(".e-content-wrap .e-content-table tr:not(.e-hidden)")),s=d.j(r.querySelector("table"));s=i.i(n.isNullOrUndefined)(s)?0:s;var o=this.parent.rowAutoHeight?~~(r.querySelector("table").offsetHeight/a.length):this.actionObj.cellHeight,l=Math.floor(Math.floor(this.actionObj.Y+(r.scrollTop-s-(window.scrollY||window.pageYOffset))-d.L(r))/o);l=l<0?0:l>a.length-1?a.length-1:l,this.actionObj.index=l;var p=this.parent.element.querySelectorAll(".e-appointment-container:not(.e-hidden)").item(l),h=p.querySelector("."+c.D);h||(h=i.i(n.createElement)("div",{className:c.D}),p.appendChild(h)),this.appendCloneElement(h,t);var u=i.i(n.closest)(this.actionObj.target,"td");if(this.actionObj.groupIndex=u&&!isNaN(parseInt(u.getAttribute("data-group-index"),10))?parseInt(u.getAttribute("data-group-index"),10):this.actionObj.groupIndex,i.i(n.isNullOrUndefined)(this.parent.eventDragArea)){var g=d.K(a[parseInt(l.toString(),10)])*l;if(this.parent.rowAutoHeight){var v=this.getCursorElement(e);v&&(g=v.classList.contains(c.n)?v.offsetTop:v.offsetParent&&v.offsetParent.classList.contains(c.A)?v.offsetParent.offsetTop:g)}t.style.top=i.i(n.formatUnit)(g)}},t.prototype.appendCloneElement=function(e,t){void 0===t&&(t=null),t=i.i(n.isNullOrUndefined)(t)?this.actionObj.clone:t;var r=document.querySelector(this.parent.eventDragArea);this.parent.eventDragArea&&r?r.appendChild(t):e.appendChild(t)},t.prototype.getEventWrapper=function(e,t){var r;if(i.i(n.isNullOrUndefined)(t)&&(t=this.actionObj.clone.classList.contains(c._31)),this.parent.activeViewOptions.timeScale.enable){var a=t?"."+c._7:"."+c.D;r=this.parent.element.querySelectorAll(a).item(e)}else{var s=this.parent.element.querySelectorAll("."+c.n).item(e);r=s.querySelector("."+c.D),r||(r=i.i(n.createElement)("div",{className:c.D}),s.appendChild(r))}return r},t.prototype.getAllDayEventHeight=function(){var e=i.i(n.createElement)("div",{className:c.A});this.parent.element.querySelector("."+c._7).appendChild(e);var t=e.offsetHeight;return i.i(n.remove)(e),t},t.prototype.isAllowDrop=function(e){if(!this.actionObj.excludeSelectors)return!1;for(var t=this.actionObj.excludeSelectors.split(","),i=!1,n=0,r=t;n<r.length;n++){var a=r[n];if(e.target.classList.contains(a)){i=!0;break}}return i},t.prototype.getModuleName=function(){return"dragAndDrop"},t}(r.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(0),r=(i.n(n),i(2)),a=i(1),s=i(3),o=function(){function e(e){this.selectedCells=[],this.keyConfigs={downArrow:"downarrow",upArrow:"uparrow",rightArrow:"rightarrow",leftArrow:"leftarrow",shiftDownArrow:"shift+downarrow",shiftUpArrow:"shift+uparrow",shiftRightArrow:"shift+rightarrow",shiftLeftArrow:"shift+leftarrow",ctrlLeftArrow:"ctrl+leftarrow",ctrlRightArrow:"ctrl+rightarrow",altOne:"alt+1",altTwo:"alt+2",altThree:"alt+3",altFour:"alt+4",altFive:"alt+5",altSix:"alt+6",altSeven:"alt+7",altEight:"alt+8",altNine:"alt+9",enter:"enter",escape:"escape",delete:"delete",backspace:"backspace",home:"home",pageUp:"pageup",pageDown:"pagedown",tab:"tab",shiftTab:"shift+tab",ctrlShiftUpArrow:"ctrl+shift+uparrow",ctrlShiftDownArrow:"ctrl+shift+downarrow",ctrlShiftLeftArrow:"ctrl+shift+leftarrow",ctrlShiftRightArrow:"ctrl+shift+rightarrow"},this.parent=e,this.parent.element.tabIndex=-1===this.parent.element.tabIndex?0:this.parent.element.tabIndex,this.keyboardModule=new n.KeyboardEvents(this.parent.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.addEventListener()}return e.prototype.keyActionHandler=function(e){switch(e.action){case"downArrow":case"shiftDownArrow":this.processDown(e,e.shiftKey);break;case"upArrow":case"shiftUpArrow":this.processUp(e,e.shiftKey);break;case"leftArrow":case"shiftLeftArrow":this.processLeft(e,e.shiftKey);break;case"rightArrow":case"shiftRightArrow":this.processRight(e,e.shiftKey);break;case"ctrlLeftArrow":this.parent.changeDate(this.parent.activeView.getNextPreviousDate("previous"),e),this.parent.headerModule&&this.parent.headerModule.element.querySelector(".e-prev button").focus();break;case"ctrlRightArrow":this.parent.changeDate(this.parent.activeView.getNextPreviousDate("next"),e),this.parent.headerModule&&this.parent.headerModule.element.querySelector(".e-next button").focus();break;case"altOne":case"altTwo":case"altThree":case"altFour":case"altFive":case"altSix":case"altSeven":case"altEight":case"altNine":this.processViewNavigation(e);break;case"enter":this.processEnter(e);break;case"home":this.focusFirstCell();break;case"tab":case"shiftTab":this.processTab(e,e.shiftKey);break;case"delete":case"backspace":this.processDelete(e);break;case"ctrlShiftUpArrow":case"ctrlShiftDownArrow":case"ctrlShiftLeftArrow":case"ctrlShiftRightArrow":this.processCtrlShiftNavigationArrows(e);break;case"escape":this.processEscape(e);break;case"fTwelve":this.parent.allowInline&&this.parent.inlineModule&&(e.preventDefault(),this.processFTwelve(e))}},e.prototype.processFTwelve=function(e){var t=e.target;if(t.classList.contains(s.n)||t.classList.contains(s.U)){this.parent.activeCellsData=this.getSelectedElements(t);var a=i.i(n.extend)(this.parent.activeCellsData,{cancel:!1,event:e}),o={element:a.element,groupIndex:a.groupIndex,type:"Cell"};this.parent.notify(r.x,o)}if(t.classList.contains(s.A))return void t.click()},e.prototype.addEventListener=function(){this.parent.on(r.M,this.onCellMouseDown,this)},e.prototype.removeEventListener=function(){this.parent.off(r.M,this.onCellMouseDown)},e.prototype.onCellMouseDown=function(e){if(!e.event.shiftKey&&(this.initialTarget=this.getClosestCell(e.event),!this.parent.activeViewOptions.readonly&&"MonthAgenda"!==this.parent.currentView&&this.initialTarget&&(e.event.target.classList.contains(s.n)&&3!==e.event.which&&(this.parent.removeSelectedClass(),n.EventHandler.add(this.parent.getContentTable(),"mousemove",this.onMouseSelection,this),n.EventHandler.add(this.parent.getContentTable(),"mouseup",this.onMoveUp,this)),e.event.target.classList.contains(s.U)&&3!==e.event.which))){this.parent.removeSelectedClass();var t=this.parent.getAllDayRow();n.EventHandler.add(t,"mousemove",this.onMouseSelection,this),n.EventHandler.add(t,"mouseup",this.onMoveUp,this)}},e.prototype.onMouseSelection=function(e){var t=[].slice.call(this.parent.element.querySelectorAll("."+s.A));i.i(n.addClass)(t,"e-allow-select");var r=this.parent.boundaryValidation(e.pageY,e.pageX);if(r.bottom||r.top||r.left||r.right){var a=this.parent.element.querySelector("."+s.g),o=a.offsetHeight<=a.scrollHeight&&a.scrollTop>=0&&a.scrollTop+a.offsetHeight<=a.scrollHeight,l=a.offsetWidth<=a.scrollWidth&&a.scrollLeft>=0&&a.scrollLeft+a.offsetWidth<=a.scrollWidth;o&&(r.top||r.bottom)&&(a.scrollTop+=r.top?-e.target.offsetHeight:e.target.offsetHeight),l&&(r.left||r.right)&&(a.scrollLeft+=r.left?-e.target.offsetWidth:e.target.offsetWidth)}var c=this.getClosestCell(e);c&&this.selectCells(!0,c)},e.prototype.getClosestCell=function(e){return i.i(n.closest)(e.target,"."+s.n+",."+s.U)},e.prototype.onMoveUp=function(e){var t=this,a=[].slice.call(this.parent.element.querySelectorAll("."+s.A));if(i.i(n.removeClass)(a,"e-allow-select"),e.target.classList.contains(s.n)&&(n.EventHandler.remove(this.parent.getContentTable(),"mousemove",this.onMouseSelection),n.EventHandler.remove(this.parent.getContentTable(),"mouseup",this.onMoveUp)),e.target.classList.contains(s.U)){var o=this.parent.getAllDayRow();n.EventHandler.remove(o,"mousemove",this.onMouseSelection),n.EventHandler.remove(o,"mouseup",this.onMoveUp)}if(!this.isPreventAction(e)){var l="."+s.n+",."+s.U+",."+s.e,c=i.i(n.closest)(e.target,l),p=this.parent.getSelectedCells();if(p.length>0&&-1===p.indexOf(c)&&(c=p[p.length-1]),"TimelineYear"!==this.parent.currentView||!c.classList.contains(s.t)){this.parent.activeCellsData=this.getSelectedElements(c);var d={};this.parent.eventWindow&&this.parent.eventWindow.convertToEventData(this.parent.activeCellsData,d);var h={data:d,element:this.parent.activeCellsData.element,event:e,requestType:r.y,showQuickPopup:!1};this.parent.trigger(r.d,h,function(a){if((a.showQuickPopup||t.parent.quickInfoOnSelectionEnd)&&p.length>1){var s=i.i(n.extend)(t.parent.activeCellsData,{cancel:!1,event:e,name:"cellClick"});t.parent.notify(r.a,s)}})}}},e.prototype.processEnter=function(e){if(!(this.parent.activeViewOptions.readonly&&!e.target.classList.contains(s.A)||this.isPreventAction(e)||"TimelineYear"===this.parent.currentView&&e.target.classList.contains(s.t))){var t=e.target;if(i.i(n.closest)(t,"."+s._90))return void(t.classList.contains(s._120)||t.classList.contains(s._121)||t.classList.contains(s._122)||t.classList.contains(s._124)||t.classList.contains(s._114)?(t.click(),e.preventDefault()):t.classList.contains(s.H)&&(this.parent.element.querySelector("."+s._121).click(),e.preventDefault()));if(t.classList.contains(s._59)&&t.classList.contains(s.u)){var a=t.querySelector("."+s._68);return void(a&&a.click())}if(!t.classList.contains(s.n)&&!t.classList.contains(s.U))return t.classList.contains(s._2)&&this.parent.inlineModule?void this.parent.inlineModule.inlineCrudActions(t):t.classList.contains(s.A)||t.classList.contains(s._92)||t.classList.contains(s._26)||t.classList.contains(s.z)?void t.click():t.classList.contains(s._95)?(this.parent.setProperties({selectedDate:this.parent.getDateFromElement(t)},!0),this.parent.changeView(this.parent.getNavigateView(),e),void this.processEscape(e)):void 0;this.parent.activeCellsData=this.getSelectedElements(t);var o=i.i(n.extend)(this.parent.activeCellsData,{cancel:!1,event:e});if(this.parent.allowInline){var l={element:o.element,groupIndex:o.groupIndex,type:"Cell"};this.parent.notify(r.x,l)}else"Year"===this.parent.currentView?t.click():this.parent.notify(r.a,o)}},e.prototype.getSelectedElements=function(e){var t;if(this.selectedCells.length>1&&e.classList.contains(s._38)){var i=this.parent.getCellDetails(this.selectedCells[0]),n=this.parent.getCellDetails(this.selectedCells.slice(-1)[0]);i.endTime=n.endTime,i.element=e,t=i}else t=this.parent.getCellDetails(e);return t},e.prototype.getCells=function(e,t,i){var n=this.parent.getContentTable(),r="TimelineYear"===this.parent.currentView,a=r&&!e?"."+s.n+":not(."+s.t+")":"td",o=[].slice.call(n.querySelectorAll(a)),l=n.rows.length,c=n.rows[0].cells.length;if(t&&t.classList.contains(s.U)){var p=this.parent.getAllDayRow();o=[].slice.call(p.cells),l=1,c=p.cells.length}var d=o.indexOf(t),h=o.indexOf(i),u=[];if(e){for(var g=0;g<c;g++)for(var v=0;v<l;v++){var f=o[c*v+g];r&&f.classList.contains(s.t)||u.push(f)}d=u.indexOf(t),h=u.indexOf(i)}if(d>h){var m=d;d=h,h=m}return(e?u:o).slice(d,h+1)},e.prototype.focusFirstCell=function(){if("Agenda"===this.parent.currentView){var e=this.parent.getContentTable().querySelector("."+s._47);return e.setAttribute("tabindex","0"),void e.focus()}if(this.parent.eventBase.removeSelectedAppointmentClass(),this.parent.activeView.isTimelineView()&&"TimelineYear"!==this.parent.currentView){var t=this.parent.element.querySelector("."+s.h+" tr:not(."+s._72+") ."+s.n+":not(."+s.v+")");this.selectCells(!1,t)}else if(this.parent.currentView.indexOf("Year")>-1){var i="."+s.n+":not(."+s.t+"):not(."+s.v+")",n="TimelineYear"===this.parent.currentView&&"Vertical"===this.parent.activeViewOptions.orientation;i+=n?'[data-date="'+this.parent.activeView.startDate().getTime()+'"]':"",this.selectCells(!1,this.parent.element.querySelector(i))}else this.selectCells(!1,this.parent.getWorkCellElements()[0])},e.prototype.isInverseTableSelect=function(){return this.parent.activeView.isInverseTableSelect},e.prototype.selectCells=function(e,t){var i=this;this.parent.removeSelectedClass();var n=t instanceof Array?t.slice(-1)[0]:t;if(e){var a,o=["Day","Week","WorkWeek","TimelineDay","TimelineWeek","TimelineWorkWeek","TimelineMonth","TimelineYear"],l={element:t,requestType:"mousemove",allowMultipleRow:!0};this.parent.inlineModule.removeInlineAppointmentElement(),this.parent.trigger(r.d,l,function(e){if(!e.allowMultipleRow||!i.parent.allowMultiRowSelection){var t="TimelineYear"===i.parent.currentView;if(t&&"Horizontal"===i.parent.activeViewOptions.orientation||"Month"===i.parent.currentView){var r=t&&i.parent.activeViewOptions.group.resources.length>0;n=r?i.initialTarget:i.initialTarget.parentElement.children[n.cellIndex]}else o.indexOf(i.parent.currentView)>-1&&(n=n.parentElement.children[i.initialTarget.cellIndex])}var l=i.getCells(i.isInverseTableSelect(),i.initialTarget,n);if(i.parent.activeViewOptions.group.resources.length>0){a=i.initialTarget.getAttribute("data-group-index");for(var c=[],p=0,d=l;p<d.length;p++){var h=d[p];h.getAttribute("data-group-index")===a&&c.push(h)}l=c}if(i.parent.allowMultiCellSelection||(l=[i.initialTarget]),i.selectedCells=l,l.length>2&&!n.classList.contains(s.U)){var u=i.getAllDayCells(l);if(i.parent.activeViewOptions.group.resources.length>0){for(var g=[],v=0,f=u;v<f.length;v++){var h=f[v];h.getAttribute("data-group-index")===a&&g.push(h)}u=g}l=l.concat(u)}n.getAttribute("data-group-index")!==a&&i.parent.activeViewOptions.group.resources.length>0&&(n=i.selectedCells[i.selectedCells.length-1]),i.parent.addSelectedClass(l,n)})}else{var l={element:n,requestType:r.y};this.parent.trigger(r.d,l,function(){i.initialTarget=n,i.selectedCells=[n],i.parent.addSelectedClass([n],n)})}},e.prototype.selectAppointment=function(e,t){var r=this.getAppointmentElements();if(!(r.length<0)){this.parent.eventBase.removeSelectedAppointmentClass();var a;if(t.classList.contains(s.A)){var o=r.indexOf(t);a=r[e?o-1:o+1]}else a=e?r[r.length-1]:r[0];a&&(this.parent.eventBase.addSelectedAppointments([a],!0),a.focus(),i.i(n.addClass)([a],s.S))}},e.prototype.selectAppointmentElementFromWorkCell=function(e,t){var i=this;if(this.parent.eventBase.removeSelectedAppointmentClass(),this.parent.removeSelectedClass(),t.classList.contains(s.n)||t.classList.contains(s.U)){var n=this.getUniqueAppointmentElements(),r=[],a=this.parent.getDateFromElement(t).getTime();if(this.parent.eventsProcessed.filter(function(t){return e?t[i.parent.eventFields.startTime].getTime()<=a:t[i.parent.eventFields.startTime].getTime()>=a}).filter(function(e){n.filter(function(t){JSON.stringify(e.Guid)===JSON.stringify(t.getAttribute("data-guid"))&&r.push(t)})}),r.length>0){var o=e?r[r.length-1]:r[0],l=this.getAppointmentElementsByGuid(o.getAttribute("data-guid"));this.parent.eventBase.addSelectedAppointments(l,!0),l[l.length-1].focus()}}},e.prototype.getAllDayCells=function(e){var t=this.parent.getAllDayRow();if(!t)return[];var i=e[0],n=e[e.length-1],r=this.parent.getCellDetails(i);if(this.parent.getCellDetails(n).endTime.getTime()-r.startTime.getTime()>=a.c)return[].slice.call(t.cells).slice(i.cellIndex,n.cellIndex+1);return[]},e.prototype.getAppointmentElements=function(){return[].slice.call(this.parent.element.querySelectorAll("."+s.A))},e.prototype.getAppointmentElementsByGuid=function(e){return[].slice.call(this.parent.element.querySelectorAll('div[data-guid="'+e+'"]'))},e.prototype.getUniqueAppointmentElements=function(){var e=this.getAppointmentElements(),t=[];return e.map(function(e){return e.getAttribute("data-guid")}).filter(function(i,n,r){r.indexOf(i)===n&&t.push(e[parseInt(n.toString(),10)])}),t},e.prototype.getWorkCellFromAppointmentElement=function(e){var t=this.parent.eventBase.getEventByGuid(e.getAttribute("data-guid"));return this.parent.eventBase.selectWorkCellByTime([t])},e.prototype.processViewNavigation=function(e){var t=parseInt(e.key,10)-1;if(t<this.parent.views.length){var i=this.parent.viewCollections[parseInt(t.toString(),10)].option;this.parent.changeView(i,e,void 0,t),this.parent.headerModule&&this.parent.headerModule.element.querySelector(".e-active-view button").focus()}},e.prototype.isCalendarTarget=function(e){var t=e.currentTarget||e.target;return!(!t||i.i(n.isNullOrUndefined)(t.querySelector(".e-header-popup.e-popup-open")))},e.prototype.cancelUpDownAction=function(e){var t=e&&"Vertical"===this.parent.activeViewOptions.orientation,i=this.parent.activeViewOptions.group.resources.length>0;return!!(t&&i||e&&this.initialTarget.classList.contains(s.t))||!((!this.parent.activeView.isTimelineView()||e)&&"MonthAgenda"!==this.parent.currentView)},e.prototype.processUp=function(e,t){var i="TimelineYear"===this.parent.currentView;if(!(t&&this.cancelUpDownAction(i)||this.isCalendarTarget(e))){var n=e.target,r=this.parent.getSelectedCells(),a=this.parent.eventBase.getSelectedAppointments(),o=this.parent.element.querySelector("."+s._96),l=this.getQuickPopupElement();if(r.length>0&&!e.target.classList.contains(s.n)&&(n=r[r.length-1]),a.length>0&&!o.classList.contains(s.T)&&!l.classList.contains(s.T)&&-1!==["Day","Week","WorkWeek","Month"].indexOf(this.parent.currentView)&&(n=this.getWorkCellFromAppointmentElement(a[a.length-1]),this.parent.eventBase.removeSelectedAppointmentClass()),n)if(n.classList.contains(s.n)&&!this.parent.element.querySelector("."+s.T)){var c=this.parent.getTableRows(),p=c.indexOf(n.parentElement),d=void 0;if(i&&t&&0===this.parent.activeViewOptions.group.resources.length&&(d=this.isInverseTableSelect()?this.getVerticalUpDownCell(c,n,p,!0):this.getHorizontalUpDownCell(c,n,p,!0)),(p>0||d)&&p<c.length){if(d=d||c[p-1].cells[n.cellIndex],"Year"===this.parent.currentView&&d.classList.contains(s.t)){if(!(this.parent.activeView.getStartDate().getTime()<+d.getAttribute("data-date")))return;d=this.getYearUpDownCell(c,p-1,n.cellIndex,!0)}e.preventDefault(),this.selectCells(t,d)}}else"Agenda"!==this.parent.currentView&&"MonthAgenda"!==this.parent.currentView||this.selectAppointment(!0,n)}},e.prototype.processDown=function(e,t){var i="TimelineYear"===this.parent.currentView;if(!(t&&this.cancelUpDownAction(i)||this.isCalendarTarget(e))){var n=e.target,r=this.parent.getSelectedCells(),a=this.parent.eventBase.getSelectedAppointments(),o=this.parent.element.querySelector("."+s._96),l=this.getQuickPopupElement();r.length>0&&!e.target.classList.contains(s.n)&&(n=r[r.length-1]),a.length>0&&!o.classList.contains(s.T)&&!l.classList.contains(s.T)&&-1!==["Day","Week","WorkWeek","Month"].indexOf(this.parent.currentView)&&(n=this.getWorkCellFromAppointmentElement(a[a.length-1]),this.parent.eventBase.removeSelectedAppointmentClass());var c=this.parent.getTableRows();if(n)if(n.classList.contains(s.n)&&!this.parent.element.querySelector("."+s.T)){var p=c.indexOf(n.parentElement),d=void 0;if(i&&t&&0===this.parent.activeViewOptions.group.resources.length&&(d=this.isInverseTableSelect()?this.getVerticalUpDownCell(c,n,p,!1):this.getHorizontalUpDownCell(c,n,p,!1)),p>=0&&(p<c.length-1||d)){if(d=d||c[p+1].cells[n.cellIndex],"Year"===this.parent.currentView&&d.classList.contains(s.t)){if(!(this.parent.activeView.getEndDate().getTime()>+d.getAttribute("data-date")))return;d=this.getYearUpDownCell(c,p+1,n.cellIndex,!1)}e.preventDefault(),this.selectCells(t,d)}}else"Agenda"!==this.parent.currentView&&"MonthAgenda"!==this.parent.currentView||this.selectAppointment(!1,n)}},e.prototype.getYearUpDownCell=function(e,t,i,n){for(;e[parseInt(t.toString(),10)]&&e[parseInt(t.toString(),10)].cells[parseInt(i.toString(),10)].classList.contains(s.t);)t+=n?-1:1;return e[parseInt(t.toString(),10)].cells[parseInt(i.toString(),10)]},e.prototype.getHorizontalUpDownCell=function(e,t,i,n){var r=e[i+(n?-1:1)],a=r?r.cells[t.cellIndex]:t;if(a.classList.contains(s.t)){var o=r.querySelector("."+s.n+":not(."+s.t+")"),l=new Date(+o.getAttribute("data-date")),c='[data-date="'+new Date(l.getFullYear(),l.getMonth()+1,0).getTime()+'"]';a=a.cellIndex<o.cellIndex?o:r.querySelector(c)}return a},e.prototype.getVerticalUpDownCell=function(e,t,i,n){var r=n&&i>0||!n&&i<e.length-1,o=r?e[i+(n?-1:1)].cells[t.cellIndex]:void 0;if(!o||o.classList.contains(s.t)){if(e[parseInt(i.toString(),10)].cells[t.cellIndex-(n?1:-1)]){var l=+t.getAttribute("data-date")-(n?a.c:-a.c);return this.parent.getContentTable().querySelector("."+s.n+'[data-date="'+l+'"]')}o=t}return o},e.prototype.processLeftRight=function(e){var t="Year"===this.parent.currentView?e.closest("tbody"):this.parent.getContentTable(),i=e.parentNode.sectionRowIndex;return{element:t,rowIndex:i,columnIndex:e.cellIndex,maxIndex:t.rows[parseInt(i.toString(),10)].cells.length}},e.prototype.getQuickPopupElement=function(){return(this.parent.isAdaptive?document.body:this.parent.element).querySelector("."+s._90)},e.prototype.isCancelLeftRightAction=function(e,t,i){var n="MonthAgenda"===this.parent.currentView||i&&this.initialTarget.classList.contains(s.t);if("Agenda"===this.parent.currentView||t&&n)return!0;if(this.isPreventAction(e)&&t)return!0;var r=this.parent.element.querySelector("."+s._96),a=this.getQuickPopupElement();return!(!r.classList.contains(s.T)&&!a.classList.contains(s.T))},e.prototype.processRight=function(e,t){var r="TimelineYear"===this.parent.currentView;if(!this.isCancelLeftRightAction(e,t,r)&&!this.isCalendarTarget(e)){var o,l=this.parent.getSelectedCells(),c=this.parent.eventBase.getSelectedAppointments(),p=e.target;if(l.length>0&&!p.classList.contains(s.n)&&!p.classList.contains(s.U)&&(p=l[l.length-1]),!(c.length>0)||(p=this.getWorkCellFromAppointmentElement(c[c.length-1]),this.parent.eventBase.removeSelectedAppointmentClass(),p))if(p.classList.contains(s.n)&&e.target.classList.contains(s.n)){var d=this.processLeftRight(p),h=new Date(+p.getAttribute("data-date")),u="Year"===this.parent.currentView&&h.getTime()===a.o(h).getTime();if(d.columnIndex>=0&&d.columnIndex<d.maxIndex-1&&!u)o=this.calculateNextPrevDate(p,d.element.rows[d.rowIndex].cells[p.cellIndex+1],"right"),r&&t&&o.classList.contains(s.t)&&(o=this.getTimelineYearTargetCell(d,p,!0)),i.i(n.isNullOrUndefined)(o)||this.selectCells(t,o);else if(d.columnIndex===d.maxIndex-1||u)if(!this.isInverseTableSelect()&&d.rowIndex<d.element.rows.length-1&&!u){o=this.calculateNextPrevDate(p,d.element.rows[d.rowIndex+1].cells[0],"right");var g=r&&t&&o.classList.contains(s.t);o=g?this.getHorizontalLeftRightCell(d,p,!0):o,i.i(n.isNullOrUndefined)(o)||this.selectCells(t,o)}else if(!t){if(u&&h.getTime()!==this.parent.activeView.getEndDate().getTime())return void this.selectCells(t,this.parent.element.querySelector(":not(."+s.t+')[data-date="'+(h.getTime()+a.c)+'"]'));var v=this.isInverseTableSelect()?d.rowIndex:0;this.parent.changeDate(this.parent.activeView.getNextPreviousDate("next"),e);var f=this.parent.getContentTable(),m=u?f.rows[parseInt(v.toString(),10)].querySelector("."+s.n+":not(."+s.t+")"):f.rows[parseInt(v.toString(),10)].cells[0];this.selectCells(!1,m)}}else if(p.classList.contains(s.U)){var y=p.cellIndex,T=this.parent.getAllDayRow(),w=T.cells.length;if(y>=0&&y<w-1)this.selectCells(t,T.cells[y+1]);else if(y===w-1&&!t){this.parent.changeDate(this.parent.activeView.getNextPreviousDate("next"),e);var D=this.parent.getAllDayRow();this.selectCells(!1,D.cells[0])}}}},e.prototype.processLeft=function(e,t){var r="TimelineYear"===this.parent.currentView;if(!this.isCancelLeftRightAction(e,t,r)&&!this.isCalendarTarget(e)){var o,l=e.target,c=this.parent.getSelectedCells();c.length>0&&!l.classList.contains(s.n)&&!l.classList.contains(s.U)&&(l=c[c.length-1]);var p=this.parent.eventBase.getSelectedAppointments();if(!(p.length>0)||(l=this.getWorkCellFromAppointmentElement(p[p.length-1]),this.parent.eventBase.removeSelectedAppointmentClass(),l))if(e.target.classList.contains(s.n)&&l.classList.contains(s.n)){var d=this.processLeftRight(l),h=new Date(+l.getAttribute("data-date")),u="Year"===this.parent.currentView&&h.getTime()===a.n(h).getTime();if(d.columnIndex>0&&d.columnIndex<d.maxIndex&&!u)o=this.calculateNextPrevDate(l,d.element.rows[d.rowIndex].cells[l.cellIndex-1],"left"),r&&t&&o.classList.contains(s.t)&&(o=this.getTimelineYearTargetCell(d,l,!1)),i.i(n.isNullOrUndefined)(o)||this.selectCells(t,o);else if(0===d.columnIndex||u)if(!this.isInverseTableSelect()&&d.rowIndex>0){o=this.calculateNextPrevDate(l,d.element.rows[d.rowIndex-1].cells[d.maxIndex-1],"left");var g=r&&t&&o.classList.contains(s.t);o=g?this.getHorizontalLeftRightCell(d,l,!1):o,i.i(n.isNullOrUndefined)(o)||this.selectCells(t,o)}else if(!t){if(u&&h.getTime()!==this.parent.activeView.getStartDate().getTime())return void this.selectCells(t,this.parent.element.querySelector('[data-date="'+(h.getTime()-a.c)+'"]'));this.parent.changeDate(this.parent.activeView.getNextPreviousDate("previous"),e);var v=this.parent.getContentTable(),f=this.isInverseTableSelect()?d.rowIndex:v.rows.length-1,m=v.rows[parseInt(f.toString(),10)].cells[d.maxIndex-1];if(u){var y=this.parent.element.querySelectorAll("."+s.h+" tbody");m=y.item(y.length-1).querySelector(":not(."+s.t+')[data-date="'+this.parent.activeView.getEndDate().getTime()+'"]')}this.selectCells(!1,m)}}else if(l.classList.contains(s.U)){var T=l.cellIndex,w=this.parent.getAllDayRow(),D=w.cells.length;if(T>0&&T<D)this.selectCells(t,w.cells[T-1]);else if(0===T&&!t){this.parent.changeDate(this.parent.activeView.getNextPreviousDate("previous"),e);var b=this.parent.getAllDayRow();this.selectCells(!1,b.cells[D-1])}}}},e.prototype.getTimelineYearTargetCell=function(e,t,i){return this.isInverseTableSelect()?this.getVerticalLeftRightCell(t,i):this.getHorizontalLeftRightCell(e,t,i)},e.prototype.getHorizontalLeftRightCell=function(e,t,i){var n=e.element.rows[t.parentNode.sectionRowIndex+(i?1:-1)];if(n){var r=i?"."+s.n+":not(."+s.t+")":'[data-date="'+(+t.getAttribute("data-date")-a.c)+'"]';return n.querySelector(r)}return t},e.prototype.getVerticalLeftRightCell=function(e,t){var i=new Date(+e.getAttribute("data-date")),n=new Date(i.getFullYear(),i.getMonth()+(t?1:-1),1),r=this.parent.getContentTable(),a=r.querySelector('[data-date="'+n.getTime()+'"]');return a.parentNode.sectionRowIndex>e.parentNode.sectionRowIndex?a:r.querySelector('[data-date="'+new Date(n.getFullYear(),n.getMonth()+1,0).getTime()+'"]')},e.prototype.calculateNextPrevDate=function(e,t,i){var n=this.initialTarget.getAttribute("data-group-index");if(this.parent.activeViewOptions.group.resources.length>0&&"Month"===this.parent.currentView&&e&&t&&t.getAttribute("data-group-index")!==n){var r=this.parent.getDateFromElement(e),a="right"===i?new Date(r.setDate(r.getDate()+1)):new Date(r.setDate(r.getDate()-1));t=[].slice.call(this.parent.element.querySelectorAll('td[data-date="'+a.getTime().toString()+'"][data-group-index="'+n+'"]'))[0]}return t},e.prototype.getFocusableElements=function(e){return[].slice.call(e.querySelectorAll('a[href]:not([tabindex="-1"]),input:not([disabled]):not([tabindex="-1"]),textarea:not([disabled]):not([tabindex="-1"]),button:not([disabled]):not([tabindex="-1"]),select:not([disabled]):not([tabindex="-1"]),[tabindex]:not([tabindex="-1"]),[contentEditable=true]:not([tabindex="-1"])'))},e.prototype.processTabOnPopup=function(e,t){var r=this,a=this.getFocusableElements(t);a=a.filter(function(e){var t=r.parent.element.querySelector("."+s._143);return t&&t.offsetParent?!(e.classList.contains(s._115)||e.classList.contains(s._116)):!(e.classList.contains(s._122)||e.classList.contains(s._124))});var o=a[0],l=a[a.length-1];i.i(n.isNullOrUndefined)(l)||document.activeElement!==l||e.shiftKey||(e.preventDefault(),o.focus()),!i.i(n.isNullOrUndefined)(o)&&document.activeElement===o&&e.shiftKey&&(e.preventDefault(),l.focus())},e.prototype.processTab=function(e,t){var r=e.target;if(r.classList.contains(s._2)&&this.parent.inlineModule&&(r=r.closest(".e-appointment"),this.parent.inlineModule.inlineCrudActions(e.target)),"TimelineYear"===this.parent.currentView&&r.classList.contains(s.t))return void(r.classList.contains(s._38)&&this.parent.removeSelectedClass());var a=i.i(n.closest)(r,"."+s._90+",."+s._96);if(a&&a.classList.contains(s.T))return a.classList.contains(s._96)&&this.parent.eventBase.removeSelectedAppointmentClass(),void this.processTabOnPopup(e,a);if(r.classList.contains(s._79))return void this.parent.eventBase.removeSelectedAppointmentClass();if(r.classList.contains(s._59)&&this.parent.activeView.isTimelineView()&&this.parent.activeViewOptions.group.resources.length>0){var o=parseInt(r.getAttribute("data-group-index"),10),l="."+s.A+'[data-group-index="'+(t?o-1:o)+'"]',c=[].slice.call(this.parent.element.querySelectorAll(l));if(c.length>0){this.parent.eventBase.removeSelectedAppointmentClass();var p=t?c.slice(-1)[0]:c[0];this.parent.eventBase.addSelectedAppointments([p],!0),p.focus(),e.preventDefault()}else if(o+1===this.parent.resourceBase.lastResourceLevel.length)this.parent.element.focus(),e.preventDefault();else if(this.parent.virtualScrollModule){var d=this.parent.element.querySelector("."+s._173),h=Math.round(d.offsetHeight/this.parent.resourceBase.expandedResources.length);this.parent.element.querySelector(".e-content-wrap").scrollTop=(t?o-1:o+1)*h,this.parent.virtualScrollModule.virtualScrolling()}else this.setScrollPosition(o)}else{if(r.classList.contains(s.A)){var c=[].slice.call(this.parent.element.querySelectorAll("."+s.A)),u="TimelineYear"===this.parent.currentView;if((this.parent.activeView.isTimelineView()&&!u||u&&"Vertical"===this.parent.activeViewOptions.orientation)&&this.parent.activeViewOptions.group.resources.length>0){var o=parseInt(r.getAttribute("data-group-index"),10);c=[].slice.call(this.parent.element.querySelectorAll("."+s.A+'[data-group-index="'+o+'"]'));var g="."+s._59+'[data-group-index="'+(t?o:o+1)+'"]',v=this.parent.element.querySelector(g);if(v&&(t&&r.getAttribute("data-guid")===c[0].getAttribute("data-guid")||!t&&r.getAttribute("data-guid")===c.slice(-1)[0].getAttribute("data-guid")))return this.parent.eventBase.removeSelectedAppointmentClass(),this.parent.virtualScrollModule?v.focus({preventScroll:!0}):v.focus(),this.parent.activeView.isTimelineView()&&this.parent.activeViewOptions.group.resources.length>0&&i.i(n.isNullOrUndefined)(this.parent.virtualScrollModule)&&this.setScrollPosition(o),void e.preventDefault()}var f=this.parent.eventBase.getSelectedAppointments();if(f.length>0&&(r=f[f.length-1]),this.parent.eventBase.removeSelectedAppointmentClass(),!t&&r.getAttribute("data-guid")===c[c.length-1].getAttribute("data-guid")||t&&r.getAttribute("data-guid")===c[0].getAttribute("data-guid"))return;return void("Agenda"!==this.parent.currentView&&"MonthAgenda"!==this.parent.currentView||(this.selectAppointment(t,r),e.preventDefault()))}var m=this.parent.getSelectedCells();if(m.length>0&&!r.classList.contains(s.A))return r=m[m.length-1],this.selectAppointmentElementFromWorkCell(t,r),void e.preventDefault();r&&!r.classList.contains(s._59)&&this.parent.activeView.isTimelineView()&&this.parent.activeViewOptions.group.resources.length>0&&this.processTabOnResourceCells(r,t)}},e.prototype.processDelete=function(e){var t=document.activeElement;if("MonthAgenda"===this.parent.currentView){var r=this.parent.eventBase.getSelectedEvents().element;t=r&&i.i(n.isNullOrUndefined)(r.length)?r:r[0]}if(t&&t.classList.contains(s.A)){if(i.i(n.addClass)([t],s.R),this.parent.activeEventData=this.parent.eventBase.getSelectedEvents(),this.parent.activeViewOptions.readonly||t.classList.contains(s._56)||!this.parent.eventSettings.allowDeleting)return;this.parent.quickPopup.deleteClick(e)}},e.prototype.processCtrlShiftNavigationArrows=function(e){if(this.parent.activeViewOptions.group.resources.length>0&&document.activeElement.classList.contains(s.A)){var t=parseInt(document.activeElement.getAttribute("data-group-index"),10),i="ctrlShiftLeftArrow"===e.action||"ctrlShiftUpArrow"===e.action?t-1:t+1;i=i<0?0:i>this.parent.resourceBase.lastResourceLevel.length?this.parent.resourceBase.lastResourceLevel.length:i;for(var n=[];0===n.length&&i>=0&&i<=this.parent.resourceBase.lastResourceLevel.length;)n=[].slice.call(this.parent.element.querySelectorAll("."+s.A+'[data-group-index="'+i+'"]')),i="ctrlShiftLeftArrow"===e.action||"ctrlShiftUpArrow"===e.action?i-1:i+1;var r=n[0];r&&(this.parent.eventBase.removeSelectedAppointmentClass(),this.parent.eventBase.addSelectedAppointments([r],!0),r.focus())}else if(this.parent.activeViewOptions.group.resources.length>0&&!document.activeElement.classList.contains(s.A)){var i=this.parent.resourceBase.renderedResources[0].groupIndex,a="."+s.A+'[data-group-index="'+i+'"]',o=[].slice.call(this.parent.element.querySelectorAll(a));if(o.length>0){this.parent.eventBase.removeSelectedAppointmentClass();var l=o[0];this.parent.eventBase.addSelectedAppointments([l],!0),l.focus(),e.preventDefault()}}},e.prototype.processEscape=function(e){this.parent.quickPopup.onClosePopup(e),this.parent.quickPopup.morePopup.hide(),this.parent.headerModule&&this.parent.headerModule.hideHeaderPopup(),this.parent.inlineModule&&this.parent.inlineModule.removeInlineAppointmentElement()},e.prototype.isPreventAction=function(e){var t=i.i(n.closest)(e.target,"."+s.v);return!(!this.parent.activeView.isTimelineView()||i.i(n.isNullOrUndefined)(t))},e.prototype.processTabOnResourceCells=function(e,t){var i=[].slice.call(this.parent.element.querySelectorAll('[tabIndex="0"]')),n=i.indexOf(e),r=t?i[n-1]:i[n+1];if(r&&r.classList.contains(s._59)){var a=parseInt(r.getAttribute("data-group-index"),10);if(this.parent.virtualScrollModule){var o=this.parent.element.querySelector("."+s.x);[].slice.call(this.parent.element.querySelectorAll("."+s._59)).forEach(function(e){e.getBoundingClientRect().top<o.getBoundingClientRect().top&&e.setAttribute("tabindex","-1")})}else this.setScrollPosition(a)}},e.prototype.setScrollPosition=function(e){var t=this.parent.element.querySelector("."+s.n+'[data-group-index="'+e+'"]');t&&(this.parent.element.querySelector("."+s.g).scrollTop=t.offsetTop)},e.prototype.getModuleName=function(){return"keyboard"},e.prototype.destroy=function(){this.removeEventListener(),this.selectedCells=[],this.keyboardModule.destroy()},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return p});var n=i(0),r=(i.n(n),i(21)),a=i(5),s=i(1),o=i(2),l=i(3),c=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.wireResizeEvent=function(e){for(var t=[].slice.call(e.querySelectorAll("."+l.V)),i=0,r=t;i<r.length;i++){var a=r[i];n.EventHandler.add(a,n.Browser.touchStartEvent,this.resizeStart,this)}},t.prototype.resizeHelper=function(){if(this.parent.activeViewOptions.group.resources.length>0&&this.parent.activeViewOptions.group.allowGroupEdit)for(var e=0,t=this.actionObj.originalElement.length;e<t;e++){var i=this.createCloneElement(this.actionObj.originalElement[parseInt(e.toString(),10)]);this.actionObj.cloneElement[parseInt(e.toString(),10)]=i,this.actionObj.element===this.actionObj.originalElement[parseInt(e.toString(),10)]&&(this.actionObj.clone=i)}else this.actionObj.element&&(this.actionObj.clone=this.createCloneElement(this.actionObj.element)),this.actionObj.cloneElement=[this.actionObj.clone],this.actionObj.originalElement=[this.actionObj.element]},t.prototype.resizeStart=function(e){var t=this;if(!e||"touchstart"!==e.type||this.parent.uiStateValues.isTapHold&&i.i(n.closest)(e.target,"."+l.R)){this.actionObj.action="resize",this.actionObj.slotInterval=this.parent.activeViewOptions.timeScale.interval/this.parent.activeViewOptions.timeScale.slotCount,this.actionObj.interval=this.actionObj.slotInterval;var r=i.i(n.closest)(e.target,"."+l.V);this.actionObj.element=i.i(n.closest)(r,"."+l.A),this.actionObj.event=this.parent.eventBase.getEventByGuid(this.actionObj.element.getAttribute("data-guid"));var c=i.i(n.extend)({},this.actionObj.event,null,!0),p={cancel:!1,data:c,element:this.actionObj.element,event:e,interval:this.actionObj.interval,scroll:{enable:!0,scrollBy:30,timeDelay:100}};this.parent.trigger(o.u,p,function(i){if(!i.cancel){t.actionClass("addClass"),t.parent.uiStateValues.action=!0,t.resizeEdges={left:r.classList.contains(l.X),right:r.classList.contains(l.W),top:r.classList.contains(l.Y),bottom:r.classList.contains(l.Z)},t.actionObj.groupIndex=t.parent.uiStateValues.isGroupAdaptive?t.parent.uiStateValues.groupIndex:0;var o=t.parent.element.querySelector("."+l.n);t.actionObj.cellWidth=s.J(o),t.actionObj.cellHeight=s.K(o);var p=t.parent.activeViewOptions.headerRows.map(function(e){return e.option});if(t.parent.activeView.isTimelineView()&&p.length>0&&["Date","Hour"].indexOf(p.slice(-1)[0])<0){for(var d=t.parent.getContentTable().querySelector("tr"),h=0,u=[].slice.call(d.children),g=0,v=u;g<v.length;g++){var f=v[g];h+=parseInt(f.getAttribute("colspan"),10)}var m=d.getBoundingClientRect();t.actionObj.cellWidth=m.width/h,t.actionObj.cellHeight=m.height}var y=t.parent.eventBase.getPageCoordinates(e);t.actionObj.X=y.pageX,t.actionObj.Y=y.pageY,t.actionObj.groupIndex=parseInt(t.actionObj.element.getAttribute("data-group-index")||"0",10),t.actionObj.interval=i.interval,t.actionObj.scroll=i.scroll,t.actionObj.start=new Date(c[t.parent.eventFields.startTime].getTime()),t.actionObj.end=new Date(c[t.parent.eventFields.endTime].getTime()),t.actionObj.originalElement=t.getOriginalElement(t.actionObj.element),"Month"===t.parent.currentView&&(t.daysVariation=-1,t.monthEvent=new a.a(t.parent));var T=t.parent.element.querySelector("."+l.g);t.scrollArgs={element:T,width:T.scrollWidth,height:T.scrollHeight},n.EventHandler.add(document,n.Browser.touchMoveEvent,t.resizing,t),n.EventHandler.add(document,n.Browser.touchEndEvent,t.resizeStop,t)}})}},t.prototype.resizing=function(e){if(e&&"touchmove"===e.type&&e.preventDefault(),this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(),0===this.parent.element.querySelectorAll("."+l._1).length&&this.resizeHelper(),i.i(n.isNullOrUndefined)(e.target)||!e.target.classList.contains(l.r)){var t=this.parent.eventBase.getPageCoordinates(e);if("Month"===this.parent.currentView||"TimelineYear"===this.parent.currentView){var r=document.documentElement,a=(window.pageXOffset||r.scrollLeft)-(r.clientLeft||0),s=(window.pageYOffset||r.scrollTop)-(r.clientTop||0);this.actionObj.pageX=t.pageX-a,this.actionObj.pageY=t.pageY-s}else this.actionObj.pageX=t.pageX,this.actionObj.pageY=t.pageY;this.updateScrollPosition(e),this.updateResizingDirection(e);var c=i.i(n.extend)({},this.actionObj.event,null,!0),p={cancel:!1,data:c,element:this.actionObj.element,event:e,startTime:this.actionObj.start,endTime:this.actionObj.end};this.parent.group.resources.length>0&&(p.groupIndex=this.actionObj.groupIndex),this.parent.trigger(o.v,p)}},t.prototype.updateResizingDirection=function(e){if("Month"===this.parent.currentView||"TimelineYear"===this.parent.currentView)return void this.monthResizing();var t=this.resizeValidation(e);if(this.resizeEdges.left){if(t){var r=this.getLeftRightStyles(e,!0);if(parseInt(r.width,10)<1)return;for(var a=0,s=this.actionObj.cloneElement;a<s.length;a++){var o=s[a];i.i(n.setStyleAttribute)(o,r),i.i(n.addClass)([o],l.X)}}this.horizontalResizing(!this.parent.enableRtl)}if(this.resizeEdges.right){if(t){var c=this.getLeftRightStyles(e,!1);if(parseInt(c.width,10)<1)return;for(var p=0,d=this.actionObj.cloneElement;p<d.length;p++){var o=d[p];i.i(n.setStyleAttribute)(o,c),i.i(n.addClass)([o],l.W)}}this.horizontalResizing(this.parent.enableRtl)}if(this.resizeEdges.top){if(t){var h=this.getTopBottomStyles(e,!0);if(parseInt(h.height,10)<1)return;for(var u=0,g=this.actionObj.cloneElement;u<g.length;u++){var o=g[u];i.i(n.setStyleAttribute)(o,h),i.i(n.addClass)([o],l.Y)}}this.verticalResizing(!0)}if(this.resizeEdges.bottom){if(t){var v=this.getTopBottomStyles(e,!1);if(parseInt(v.height,10)<1)return;for(var f=0,m=this.actionObj.cloneElement;f<m.length;f++){var o=m[f];i.i(n.setStyleAttribute)(o,v),i.i(n.addClass)([o],l.Z)}}this.verticalResizing(!1)}},t.prototype.monthResizing=function(){if(this.removeCloneElement(),!i.i(n.isNullOrUndefined)(this.actionObj.pageX)&&!i.i(n.isNullOrUndefined)(this.actionObj.pageY)){var e=document.elementFromPoint(this.actionObj.pageX,this.actionObj.pageY);if(!i.i(n.isNullOrUndefined)(e)){var t=this.parent.getDateFromElement(e),r=!(this.parent.activeViewOptions.group.resources.length>0)||parseInt(e.getAttribute("data-group-index"),10)===this.actionObj.groupIndex,a=new Date(this.actionObj.event[this.parent.eventFields.startTime].getTime()),o=new Date(this.actionObj.event[this.parent.eventFields.endTime].getTime());if(!this.parent.enableRtl&&this.resizeEdges.left||this.parent.enableRtl&&this.resizeEdges.right||this.resizeEdges.top?a=t:(!this.parent.enableRtl&&this.resizeEdges.right||this.parent.enableRtl&&this.resizeEdges.left||this.resizeEdges.bottom)&&(o=s.d(t,1)),r&&a<o){this.actionObj.start=a,this.actionObj.end=o;var l=this.getUpdatedEvent(this.actionObj.start,this.actionObj.end,this.actionObj.event);"TimelineYear"===this.parent.currentView?this.yearEventsRendering(l):this.dynamicEventsRendering(l),this.updateOriginalElement(this.actionObj.clone)}}}},t.prototype.yearEventsRendering=function(e){for(var t=[].slice.call(this.parent.element.querySelectorAll("."+l._80)),r=0,a=t;r<a.length;r++){var o=a[r];i.i(n.remove)(o)}var c=new Date(e[this.parent.eventFields.endTime]),p=0;0===this.parent.activeViewOptions.group.resources.length&&(p=this.getMonthDiff(e[this.parent.eventFields.startTime],s.d(c,-1)));for(var d=0;d<=p;d++){var h=void 0;0===this.parent.activeViewOptions.group.resources.length?h=this.getEventCount(e,this.actionObj.start.getMonth()+d):(h=i.i(n.extend)({},e,null,!0),c=this.resizeEdges.left||this.resizeEdges.right?s.d(c,-1):c,h.count=this.getMonthDiff(e[this.parent.eventFields.startTime],c)+1),this.dynamicYearlyEventsRendering(h,!0)}},t.prototype.getMonthDiff=function(e,t){var i;return i=12*(t.getFullYear()-e.getFullYear()),i-=e.getMonth(),i+=t.getMonth(),i<=0?0:i},t.prototype.getEventCount=function(e,t){var r=i.i(n.extend)({},e,null,!0),a=r[this.parent.eventFields.startTime],o=r[this.parent.eventFields.endTime],l=new Date(this.parent.selectedDate.getFullYear(),t,1),c=s.d(new Date(this.parent.selectedDate.getFullYear(),t+1,0),1),p=1;return a.getTime()<l.getTime()&&(r[this.parent.eventFields.startTime]=l),o.getTime()>c.getTime()&&(r[this.parent.eventFields.endTime]=c),0===this.parent.activeViewOptions.group.resources.length&&(p=Math.ceil((r[this.parent.eventFields.endTime].getTime()-r[this.parent.eventFields.startTime].getTime())/s.c)),r.count=p,r},t.prototype.resizeStop=function(e){var t=this;n.EventHandler.remove(document,n.Browser.touchMoveEvent,this.resizing),n.EventHandler.remove(document,n.Browser.touchEndEvent,this.resizeStop),clearInterval(this.actionObj.scrollInterval),this.actionObj.scrollInterval=null,this.removeCloneElementClasses(),this.removeCloneElement(),this.actionClass("removeClass"),this.parent.uiStateValues.action=this.parent.uiStateValues.isTapHold=!1;var i={cancel:!1,data:this.getChangedData(),element:this.actionObj.element,event:e};this.parent.trigger(o.w,i,function(e){e.cancel||(t.parent.isSpecificResourceEvents()&&(t.parent.crudModule.crudObj.sourceEvent=[t.parent.resourceBase.lastResourceLevel[parseInt(e.element.getAttribute("data-group-index"),10)]],t.parent.crudModule.crudObj.targetEvent=t.parent.crudModule.crudObj.sourceEvent,t.parent.crudModule.crudObj.isCrudAction=!0),t.saveChangedData(e))})},t.prototype.verticalResizing=function(e){var t=this.actionObj.clone.offsetTop;e||(t+=this.actionObj.clone.offsetHeight);var r=t/this.actionObj.cellHeight*this.actionObj.slotInterval,a=this.actionObj.clone.offsetParent;if(!i.i(n.isNullOrUndefined)(a)){var o=s.b(this.parent.getDateFromElement(a));o.setHours(this.parent.activeView.getStartHour().getHours()),o.setMinutes(r+this.parent.activeView.getStartHour().getMinutes()),e?this.actionObj.start=this.calculateIntervalTime(o):this.actionObj.end=this.calculateIntervalTime(o),this.updateTimePosition(o)}},t.prototype.horizontalResizing=function(e){var t,r=new Date(this.actionObj.event[this.parent.eventFields.startTime].getTime()),a=new Date(this.actionObj.event[this.parent.eventFields.endTime].getTime()),o=!1,l=this.parent.currentView,c=["TimelineDay","TimelineWeek","TimelineWorkWeek"].indexOf(this.parent.currentView)>-1,p="TimelineMonth"===this.parent.currentView,d=p||c&&!this.parent.activeViewOptions.timeScale.enable;if(this.parent.activeView.isTimelineView()){var h=this.parent.getContentTable().querySelector("tr");if(this.parent.activeViewOptions.headerRows.length>0){var u=this.parent.activeViewOptions.headerRows.map(function(e){return e.option});l=u.slice(-1)[0],p&&"Hour"===l&&(l=u.slice(-2)[0]||"Month")}t=e?r:a;var g=0,v=[].slice.call(h.children),f=!1,m=this.actionObj.cellWidth/(this.parent.activeViewOptions.timeScale.interval/this.parent.activeViewOptions.timeScale.slotCount),y=parseFloat(this.parent.enableRtl?this.actionObj.clone.style.right:this.actionObj.clone.style.left);if(y=Math.round(y/m)*m,-1!==["Year","Month","Week","Date"].indexOf(l)){for(var T=0,w=0,D=v;w<D.length;w++){var b=D[w];T+=parseInt(b.getAttribute("colspan"),10)}var S=this.parent.enableRtl?parseInt(this.actionObj.clone.style.right,10):parseInt(this.actionObj.clone.style.left,10);S=Math.round(S/this.actionObj.cellWidth)*this.actionObj.cellWidth,e||(S+=s.J(this.actionObj.clone)-this.actionObj.cellWidth),g=Math.floor(S/Math.floor(s.J(h)/T)),o=c&&"Date"===l,g=e?g:p?g+1:g,f=g===v.length,g=g<0?0:g>=T?T-1:g}else{var C=this.actionObj.cellWidth;if(g=e?Math.floor(y/this.actionObj.cellWidth):Math.ceil((y+(s.J(this.actionObj.clone)-C))/this.actionObj.cellWidth),this.parent.enableRtl){var O=0;"TimelineMonth"!==l&&(this.parent.activeViewOptions.timeScale.enable||p)||(O=this.actionObj.cellWidth);var E=Math.floor(y/this.actionObj.cellWidth)*this.actionObj.cellWidth+(e?0:s.J(this.actionObj.clone)-O);g=Math.floor(E/this.actionObj.cellWidth)}f=g===v.length,g=this.getIndex(g)}var x=void 0;if(x=-1!==["Year","Month","Week","Date"].indexOf(l)?new Date(this.parent.activeView.renderDates[parseInt(g.toString(),10)].getTime()):this.parent.getDateFromElement(h.children[parseInt(g.toString(),10)]),-1===["TimelineMonth","Year","Month","Week","Date"].indexOf(l)&&this.parent.activeViewOptions.timeScale.enable){e||(y+=s.J(this.actionObj.clone));var A=Math.ceil(this.actionObj.slotInterval/this.actionObj.cellWidth*(y-Math.floor(y/this.actionObj.cellWidth)*this.actionObj.cellWidth));A=f||!e&&0===A?this.actionObj.slotInterval:A,t=new Date(x.getTime()),t.setMinutes(t.getMinutes()+A),this.updateTimePosition(t)}else t=new Date(x.setHours(t.getHours(),t.getMinutes(),t.getSeconds()))}else{var V=i.i(n.closest)(this.actionObj.clone,"td").cellIndex,I=Math.ceil((e?s.J(this.actionObj.element):0)/this.actionObj.cellWidth)*this.actionObj.cellWidth,T=Math.ceil((s.J(this.actionObj.clone)-I)/this.actionObj.cellWidth),h=i.i(n.closest)(this.actionObj.clone,"tr"),M=e?V-T:V+T-1;M=this.getIndex(M),t=this.parent.getDateFromElement(h.children[parseInt(M.toString(),10)]),e?t.setHours(r.getHours(),r.getMinutes(),r.getSeconds()):t.setHours(a.getHours(),a.getMinutes(),a.getSeconds())}var k=-1!==["TimelineMonth","Year","Month","Week","Date"].indexOf(l)||!this.parent.activeViewOptions.timeScale.enable;if(e)a.getTime()-t.getTime()<=0&&(t=d?s.b(a):r),this.actionObj.start=k?t:this.calculateIntervalTime(t);else{var R=c&&this.parent.activeViewOptions.timeScale.enable,H=(!R||o||c&&["Week","Month","Year"].indexOf(l)>-1)&&0===t.getHours()&&0===t.getMinutes()?s.d(t,1):t;d&&H.getTime()-r.getTime()<=0&&(H=s.d(s.b(r),1)),this.actionObj.end=k?H:this.calculateIntervalTime(H)}},t.prototype.getTopBottomStyles=function(e,t){var r=this.parent.element.querySelector("."+l.g),a=this.actionObj.cellHeight/this.actionObj.slotInterval*this.actionObj.interval,s=t?this.actionObj.element.offsetHeight+(this.actionObj.Y-this.actionObj.pageY):this.actionObj.element.offsetHeight+(this.actionObj.pageY-this.actionObj.Y),o=t?this.actionObj.element.offsetTop-(this.actionObj.Y-this.actionObj.pageY):this.actionObj.clone.offsetTop;return s=o<0?this.actionObj.clone.offsetHeight:this.actionObj.clone.offsetTop+this.actionObj.clone.offsetHeight>this.scrollArgs.height?this.actionObj.clone.offsetHeight:s,o=o<0?0:o,o=t?Math.floor(o/a)*a:o,s=o+s>=r.scrollHeight?r.scrollHeight-o:Math.ceil(s/a)*a,!t&&this.actionObj.clone.offsetTop+s>=this.parent.getContentTable().offsetHeight&&(s=this.parent.getContentTable().offsetHeight-this.actionObj.clone.offsetTop),{height:i.i(n.formatUnit)(s<this.actionObj.cellHeight?Math.floor(s/a)*a:s),top:i.i(n.formatUnit)(s<this.actionObj.cellHeight&&t?Math.ceil(o/a)*a:o),left:"0px",right:"0px",width:"100%"}},t.prototype.getLeftRightStyles=function(e,t){var r={},a=this.parent.activeView.isTimelineView(),o=["TimelineDay","TimelineWeek","TimelineWorkWeek"].indexOf(this.parent.currentView)>-1&&this.parent.activeViewOptions.timeScale.enable,l=this.actionObj.cellWidth/this.actionObj.slotInterval*this.actionObj.interval,c=t?this.actionObj.X-this.actionObj.pageX:this.actionObj.pageX-this.actionObj.X,p=a?s.J(this.actionObj.element)/this.actionObj.cellWidth*this.actionObj.cellWidth:"Month"===this.parent.currentView?s.J(this.actionObj.element):Math.ceil(s.J(this.actionObj.element)/this.actionObj.cellWidth)*this.actionObj.cellWidth,d=p+Math.ceil(c/this.actionObj.cellWidth)*this.actionObj.cellWidth,h=this.parent.enableRtl?parseInt(this.actionObj.element.style.right,10):this.actionObj.clone.offsetLeft;if(o){if(d=p+Math.ceil(c/l)*l,!t){var u=(+parseFloat(this.actionObj.element.style[this.parent.enableRtl?"right":"left"])).toFixed(1),g=Math.round(p/l)*l;u===h.toFixed(1)&&g===p||(d=Math.round((h+d)/l)*l-h)}this.actionObj.event[this.parent.eventFields.isAllDay]=!1}var v=!t&&d+this.actionObj.clone.offsetLeft>this.scrollArgs.width?s.J(this.actionObj.clone):(this.actionObj.cellWidth,d);if(this.parent.enableRtl){var f=a?parseInt(this.actionObj.element.style.right,10):-(d-this.actionObj.cellWidth);f=a?f:t?0:f>0?0:f,a&&!t&&(f-=Math.ceil((this.actionObj.pageX-this.actionObj.X)/l)*l)<0&&(f=parseInt(this.actionObj.clone.style.right,10),v=parseInt(this.actionObj.clone.style.width,10)),f=f>=this.scrollArgs.width?this.scrollArgs.width-this.actionObj.cellWidth:f,r.right=i.i(n.formatUnit)(f),v=v+f>this.scrollArgs.width?s.J(this.actionObj.clone):v}else{var m=t?this.actionObj.element.offsetLeft-(this.actionObj.X-this.actionObj.pageX):this.parent.enableRtl?this.actionObj.element.offsetLeft:0;a&&(m=t?m:parseInt(this.actionObj.clone.style.left,10),m=this.parent.enableRtl?t?m:this.actionObj.pageX<this.actionObj.X-s.J(this.actionObj.clone)?parseInt(this.actionObj.clone.style.right,10):m:t&&this.actionObj.pageX>this.actionObj.X+s.J(this.actionObj.clone)&&s.J(this.actionObj.clone)===this.actionObj.cellWidth?parseInt(this.actionObj.clone.style.left,10):m);var y=m;m=a?o?t?this.actionObj.element.offsetLeft-Math.ceil((this.actionObj.element.offsetLeft-m)/l)*l:m:Math.floor(m/this.actionObj.cellWidth)*this.actionObj.cellWidth:Math.ceil(Math.abs(m)/this.actionObj.cellWidth)*this.actionObj.cellWidth,m<0&&(a&&t&&m%l?(m=parseInt(this.actionObj.clone.style.left,10),v=parseInt(this.actionObj.clone.style.width,10)):(m=0,v=s.J(this.actionObj.clone)));var T=Math.ceil(s.J(this.actionObj.clone)/this.actionObj.cellWidth)*this.actionObj.cellWidth;t&&(r.left=i.i(n.formatUnit)(a?m:t?y<0?-m:Math.ceil((p-T)/this.actionObj.cellWidth)*this.actionObj.cellWidth:m))}return r.width=i.i(n.formatUnit)(v),r},t.prototype.resizeValidation=function(e){var t=this.parent.eventBase.getPageCoordinates(e),i=this.getContentAreaDimension(),n=this.parent.activeView.isTimelineView()&&this.parent.activeViewOptions.timeScale.enable,r=this.actionObj.cellWidth,a=!1;return this.resizeEdges.left&&(t.pageX<i.leftOffset&&t.pageX>=i.left&&n&&(r=0),a=t.pageX-r>=i.left),this.resizeEdges.right&&(t.pageX>i.rightOffset&&t.pageX<=i.right&&n&&(r=0),a=t.pageX+r<=i.right),this.resizeEdges.top&&(a=this.actionObj.clone.offsetTop>=i.top),this.resizeEdges.bottom&&(a=this.actionObj.clone.offsetTop+this.actionObj.clone.offsetHeight<=this.scrollArgs.height),a},t.prototype.getModuleName=function(){return"resize"},t}(r.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var n=i(0),r=(i.n(n),i(2)),a=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.getModuleName=function(){return"scroll"},e.prototype.setWidth=function(){this.parent.element.style.width=i.i(n.formatUnit)(this.parent.width)},e.prototype.setHeight=function(){this.parent.element.style.height=i.i(n.formatUnit)(this.parent.height)},e.prototype.addEventListener=function(){this.parent.on(r.G,this.setDimensions,this),this.parent.on(r.K,this.onPropertyChanged,this)},e.prototype.removeEventListener=function(){this.parent.off(r.G,this.setDimensions),this.parent.off(r.K,this.onPropertyChanged)},e.prototype.setDimensions=function(){this.setWidth(),this.setHeight();var e={cssProperties:this.parent.getCssProperties(),module:this.getModuleName()};this.parent.notify(r.J,e)},e.prototype.onPropertyChanged=function(){this.setDimensions()},e.prototype.destroy=function(){this.removeEventListener()},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(0),r=(i.n(n),i(2)),a=i(3),s=i(1),o=function(){function e(e){this.parent=e,this.element=this.parent.element.querySelector("."+a._55),this.touchObj=new n.Touch(this.element,{scroll:this.scrollHandler.bind(this),swipe:this.swipeHandler.bind(this),tapHold:this.tapHoldHandler.bind(this),swipeSettings:{swipeThresholdDistance:1}}),n.EventHandler.add(this.element,"transitionend",this.onTransitionEnd,this),this.touchLeftDirection=this.parent.enableRtl?"Right":"Left",this.touchRightDirection=this.parent.enableRtl?"Left":"Right"}return e.prototype.scrollHandler=function(e){var t=!this.parent.isAdaptive&&e.originalEvent&&e.originalEvent.target&&!i.i(n.isNullOrUndefined)(i.i(n.closest)(e.originalEvent.target,"."+a.A));if(this.parent.uiStateValues.isTouchScroll=t&&"touchmove"===e.originalEvent.type&&!this.parent.uiStateValues.action,!t&&"Agenda"!==this.parent.currentView&&!this.parent.uiStateValues.action&&this.parent.allowSwiping&&!this.parent.uiStateValues.isTapHold){if(this.timeStampStart||(this.timeStampStart=Date.now()),this.element.classList.contains(a._146)&&this.onTransitionEnd(),"Left"===e.scrollDirection||"Right"===e.scrollDirection){var s={requestType:"dateNavigate",cancel:!1,event:e.originalEvent};if(this.parent.trigger(r.f,s),s.cancel)return;var o=this.element.querySelector("."+a.g);if(o&&o.scrollWidth>o.clientWidth)return;this.isScrollTriggered=!0,e.originalEvent.preventDefault(),e.originalEvent.stopPropagation()}if(e.scrollDirection===this.touchLeftDirection){this.nextPanel||(this.renderPanel(a._147,"next"),this.nextPanel={element:this.parent.activeView.getPanel(),selectedDate:new Date(this.parent.selectedDate.getTime()),renderDates:this.parent.activeView.renderDates,colLevels:this.parent.activeView.colLevels},this.setDimensions(this.nextPanel.element));var l=this.parent.enableRtl?e.distanceX:-e.distanceX;this.element.style.transform="translatex("+(this.getTranslateX(this.element)+l)+"px)"}else if(e.scrollDirection===this.touchRightDirection){var c=0;this.previousPanel||(this.renderPanel(a._63,"previous"),this.previousPanel={element:this.parent.activeView.getPanel(),selectedDate:new Date(this.parent.selectedDate.getTime()),renderDates:this.parent.activeView.renderDates,colLevels:this.parent.activeView.colLevels},this.setDimensions(this.previousPanel.element),c=this.previousPanel.element.offsetWidth);var l=this.parent.enableRtl?c-e.distanceX:-c+e.distanceX;this.element.style.transform="translatex("+(this.getTranslateX(this.element)+l)+"px)"}}},e.prototype.swipeHandler=function(e){if(this.isScrollTriggered&&!this.parent.uiStateValues.action&&this.parent.allowSwiping&&!this.parent.uiStateValues.isTapHold){this.isScrollTriggered=!1;var t="Left"===e.swipeDirection?this.parent.activeView.renderDates[0]:this.parent.activeView.renderDates.slice(-1)[0];if("Left"===e.swipeDirection&&t<this.parent.maxDate||"Right"===e.swipeDirection&&t>=this.parent.minDate){var i=Date.now()-this.timeStampStart,a=e.distanceX*(n.Browser.isDevice?6:1.66);a>i||e.distanceX>this.parent.element.offsetWidth/2?(this.swapPanels(e.swipeDirection),a>i&&e.distanceX>this.parent.element.offsetWidth/2&&(this.element.style.transitionDuration=(n.Browser.isDevice?e.distanceX:a)/i/10+"s"),this.confirmSwipe(e.swipeDirection)):this.cancelSwipe();var s={requestType:"dateNavigate",cancel:!1,event:e.originalEvent};this.parent.trigger(r.g,s)}else this.cancelSwipe();this.timeStampStart=null}},e.prototype.tapHoldHandler=function(e){var t=i.i(n.closest)(e.originalEvent.target,"."+a.A);i.i(n.isNullOrUndefined)(t)||(this.parent.uiStateValues.isTapHold=!0,this.parent.isAdaptive?(n.Browser.isIos&&n.EventHandler.add(this.element,"touchend",this.preventEventClick,this),this.parent.quickPopup.tapHoldEventPopup(e.originalEvent)):["Agenda","MonthAgenda","Year"].indexOf(this.parent.currentView)<0&&(this.parent.selectedElements=[],this.parent.eventBase.getSelectedEventElements(t),this.parent.resizeModule&&i.i(n.closest)(e.originalEvent.target,"."+a.V)&&this.parent.resizeModule.resizeStart(e.originalEvent)))},e.prototype.preventEventClick=function(e){e.preventDefault(),n.EventHandler.remove(this.element,"touchend",this.preventEventClick)},e.prototype.renderPanel=function(e,t){this.currentPanel?this.parent.setProperties({selectedDate:this.currentPanel.selectedDate},!0):(this.currentPanel={element:this.parent.activeView.getPanel(),selectedDate:new Date(this.parent.selectedDate.getTime()),renderDates:this.parent.activeView.renderDates,colLevels:this.parent.activeView.colLevels},this.setDimensions(this.currentPanel.element)),this.parent.setProperties({selectedDate:this.parent.activeView.getNextPreviousDate(t)},!0),this.parent.headerModule&&this.parent.headerModule.setCalendarDate(this.parent.selectedDate),this.parent.activeView.getRenderDates(),this.parent.activeView.renderLayout(e)},e.prototype.swapPanels=function(e){if(e===this.touchLeftDirection){var t=this.nextPanel;this.nextPanel=this.currentPanel,this.currentPanel=t}else{var t=this.previousPanel;this.previousPanel=this.currentPanel,this.currentPanel=t}},e.prototype.confirmSwipe=function(e){var t=this,s=e===this.touchLeftDirection?this.nextPanel.selectedDate:this.previousPanel.selectedDate,o={action:"date",cancel:!1,previousDate:s,currentDate:this.currentPanel.selectedDate};this.parent.trigger(r.i,o,function(r){if(r.cancel)t.swapPanels(e),t.cancelSwipe();else{t.parent.activeView.setPanel(t.currentPanel.element),t.parent.setProperties({selectedDate:t.currentPanel.selectedDate},!0);var s=void 0;s=t.parent.enableRtl?e===t.touchLeftDirection?t.previousPanel?t.previousPanel.element.offsetLeft:t.currentPanel.element.offsetWidth:0:e===t.touchLeftDirection?-t.currentPanel.element.offsetLeft:0,t.parent.activeView.renderDates=t.currentPanel.renderDates,t.parent.activeView.colLevels=t.currentPanel.colLevels,i.i(n.addClass)([t.element],a._146),t.element.style.transform="translatex("+s+"px)",t.parent.headerModule&&t.parent.headerModule.updateDateRange(),t.parent.renderTemplates(),t.parent.crudModule.refreshDataManager()}})},e.prototype.cancelSwipe=function(){this.parent.activeView.setPanel(this.currentPanel.element),this.parent.setProperties({selectedDate:this.currentPanel.selectedDate},!0),this.parent.activeView.renderDates=this.currentPanel.renderDates,this.parent.activeView.colLevels=this.currentPanel.colLevels,i.i(n.addClass)([this.element],a._146);var e=this.previousPanel?this.previousPanel.element.offsetWidth:0;this.element.style.transform="translatex("+(this.parent.enableRtl?e:-this.currentPanel.element.offsetLeft)+"px)"},e.prototype.onTransitionEnd=function(){i.i(n.removeClass)([this.element],a._146),this.element.style.transitionDuration="",this.element.style.transform="",this.previousPanel&&(i.i(n.remove)(this.previousPanel.element),this.previousPanel=null,i.i(n.removeClass)([this.currentPanel.element],a._63),i.i(n.addClass)([this.currentPanel.element],a._148)),this.nextPanel&&(i.i(n.remove)(this.nextPanel.element),this.nextPanel=null,i.i(n.removeClass)([this.currentPanel.element],a._147),i.i(n.addClass)([this.currentPanel.element],a._148)),this.currentPanel=null,this.parent.activeView.getPanel().style.width=""},e.prototype.getTranslateX=function(e){var t=window.getComputedStyle(e);return new WebKitCSSMatrix(t.webkitTransform).m41},e.prototype.setDimensions=function(e){e.style.width=this.parent.element.clientWidth+"px"},e.prototype.resetValues=function(){this.currentPanel=null,this.previousPanel=null,this.nextPanel=null,this.timeStampStart=null,this.element.style.transform="",this.element.style.transitionDuration="",s.E(this.element),i.i(n.removeClass)([this.element],a._146)},e.prototype.destroy=function(){this.touchObj&&(this.touchObj.destroy(),this.touchObj=null),n.EventHandler.remove(this.element,"transitionend",this.onTransitionEnd),this.resetValues()},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(0),r=(i.n(n),i(2)),a=i(3),s=i(1),o=function(){function e(e){this.translateY=0,this.itemSize=60,this.bufferCount=3,this.renderedLength=0,this.averageRowHeight=0,this.startIndex=0,this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){!this.parent||this.parent&&this.parent.isDestroyed||this.parent.on(r.I,this.virtualScrolling,this)},e.prototype.removeEventListener=function(){!this.parent||this.parent&&this.parent.isDestroyed||this.parent.off(r.I,this.virtualScrolling)},e.prototype.getRenderedCount=function(){this.setItemSize();var e=this.isHorizontalScroll?this.parent.element.clientWidth:this.parent.element.clientHeight;return this.renderedLength=Math.ceil(e/this.itemSize)+this.bufferCount,this.renderedLength},e.prototype.renderVirtualTrack=function(e){var t=i.i(n.createElement)("div",{className:a._173});if(this.isHorizontalScroll){var r=this.parent.activeView.colLevels[this.parent.activeView.colLevels.length-1].length;t.style.width=r*this.itemSize+"px"}else t.style.height=this.parent.resourceBase.expandedResources.length*this.itemSize+"px";e.appendChild(t)},e.prototype.updateVirtualScrollHeight=function(){var e=this.parent.element.querySelector("."+a._173),t=this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1].groupIndex;if(this.parent.resourceBase.renderedResources[this.parent.resourceBase.renderedResources.length-1].groupIndex!==t){var i=this.parent.element.querySelector("."+a.h);this.renderedLength=i.querySelector("tbody").children.length,e.style.height=i.offsetHeight+(this.parent.resourceBase.expandedResources.length-this.renderedLength)*i.offsetHeight/this.renderedLength+"px";var n=this.parent.element.querySelector("."+a.g);n.scrollHeight-n.scrollTop<n.offsetHeight*this.bufferCount&&(e.style.height=parseInt(e.style.height)+n.offsetHeight*this.bufferCount+"px")}else e.style.height="";this.averageRowHeight=e.offsetHeight/this.parent.resourceBase.expandedResources.length},e.prototype.updateVirtualTrackHeight=function(e){var t=this.parent.resourceBase.renderedResources.length;if(t!==this.getRenderedCount()){e.style.height=this.parent.element.querySelector(".e-content-wrap").clientHeight+"px";var i=this.parent.element.querySelector("."+a.x),n=this.parent.element.querySelector("."+a.g),r=this.parent.element.querySelector("."+a.i);this.translateY=0,this.setTranslate(i,n,r)}else{var s=this.parent.resourceBase.renderedResources[t-1].groupIndex,o=this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1].groupIndex,l=t+(o-s);l=l>this.parent.resourceBase.expandedResources.length?this.parent.resourceBase.expandedResources.length:l,e.style.height=l*this.itemSize+"px"}},e.prototype.setItemSize=function(){this.isHorizontalScroll?this.itemSize=s.i(this.parent.activeView.element,a.n)||this.itemSize:this.itemSize=s.h(this.parent.activeView.element,a.n)||this.itemSize},e.prototype.refreshLayout=function(){var e=this.parent.uiStateValues.scheduleHeight;this.parent.uiStateValues.scheduleHeight=this.parent.element.offsetHeight;var t=this.renderedLength;if(this.parent.uiStateValues.scheduleHeight!==e){t<this.getRenderedCount()&&(this.isRemoteRefresh=!0);var i=this.parent.element.querySelector("."+a.x),n=this.parent.element.querySelector("."+a.g),r=this.parent.element.querySelector("."+a.i),s=parseInt(i.querySelector("tbody td").getAttribute("data-group-index"),10),o=s+this.renderedLength;s=o>this.parent.resourceBase.expandedResources.length?this.parent.resourceBase.expandedResources.length-this.renderedLength:s,this.parent.resourceBase.renderedResources=this.parent.resourceBase.expandedResources.slice(s,o),this.parent.resourceBase.renderedResources.length>0&&this.updateContent(i,n,r,this.parent.resourceBase.renderedResources)}},e.prototype.renderEvents=function(){this.setTabIndex();var e=this.triggerScrollEvent(r.A);if(this.parent.activeViewOptions&&this.parent.activeViewOptions.enableLazyLoading&&this.parent.crudModule)return e.length>0?(this.parent.crudModule.refreshProcessedData(!0,e),void this.parent.hideSpinner()):void this.parent.crudModule.refreshDataManager();this.parent.crudModule&&this.parent.crudModule.refreshProcessedData(!0),"Month"!==this.parent.currentView&&this.parent.notify(r.G,{}),this.parent.hideSpinner()},e.prototype.virtualScrolling=function(){var e=this;this.parent.quickPopup&&(this.parent.quickPopup.quickPopupHide(),this.parent.quickPopup.morePopup.hide());var t=this.parent.element.querySelector("."+a.g);if(this.isHorizontalScroll)this.horizontalScrolling(t);else{var s=this.parent.element.querySelector("."+a.x),o=this.parent.element.querySelector("."+a.i),l=this.parent.element.querySelector("."+a._14),c=this.parent.element.querySelector("."+a.h);this.parent.rowAutoHeight||i.i(n.addClass)([t,s],"e-transition"),this.renderedLength=s.querySelector("tbody").children.length;var p=parseInt(s.querySelector("tbody td").getAttribute("data-group-index"),10),d=this.parent.rowAutoHeight?c.offsetHeight-t.offsetHeight:this.bufferCount*this.itemSize,h=[];if(t.scrollTop-this.translateY<0?h=this.upScroll(t,p):t.scrollTop-this.translateY>d&&(h=this.downScroll(t,p)),!i.i(n.isNullOrUndefined)(h)&&h.length>0){this.triggerScrollEvent(r.z);var u=this.parent.getSelectedCells();this.focusedEle=u[u.length-1]||this.focusedEle,this.updateContent(s,t,o,h),this.setTranslate(s,t,o,l),this.parent.dragAndDropModule&&"drag"===this.parent.dragAndDropModule.actionObj.action&&this.parent.dragAndDropModule.navigationWrapper(),window.clearTimeout(this.timeValue),this.timeValue=window.setTimeout(function(){e.renderEvents()},250)}}},e.prototype.horizontalScrolling=function(e){var t=this,a=[],s=this.bufferCount*this.itemSize;if(Math.abs(e.scrollLeft)-Math.abs(this.translateY)<0?a=this.leftScroll(e):Math.abs(e.scrollLeft)-Math.abs(this.translateY)>s&&(a=this.rightScroll(e)),!i.i(n.isNullOrUndefined)(a)&&a.length>0){if(this.parent.resourceBase.expandedResources.length!==a.length||this.parent.resourceBase.expandedResources[0]!==a[0]||this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1]!==a[a.length-1]){this.triggerScrollEvent(r.z);var o=this.parent.activeView.colLevels.slice(0);this.updateHorizontalContent(e,a),i.i(n.setStyleAttribute)(e.querySelector("table"),{transform:"translateX("+this.translateY+"px)"}),this.parent.activeView.colLevels=o,this.parent.dragAndDropModule&&"drag"===this.parent.dragAndDropModule.actionObj.action&&this.parent.dragAndDropModule.navigationWrapper()}window.clearTimeout(this.timeValue),this.timeValue=window.setTimeout(function(){t.renderEvents()},250)}},e.prototype.triggerScrollEvent=function(e){var t=this,a=[];if(!this.parent.activeView)return a;var s={startDate:this.parent.activeView.startDate(),endDate:this.parent.activeView.endDate(),startIndex:this.parent.resourceBase.renderedResources[0].groupIndex,endIndex:this.parent.resourceBase.renderedResources[this.parent.resourceBase.renderedResources.length-1].groupIndex,resourceData:this.parent.resourceBase.renderedResources.map(function(e){return e.resourceData}),name:e};return this.parent.trigger(e,s,function(s){e===r.z?t.parent.showSpinner():e===r.A&&!i.i(n.isNullOrUndefined)(s.eventData)&&s.eventData.length>0&&(a=s.eventData)}),a},e.prototype.upScroll=function(e,t){var i=0;i=~~(e.scrollTop/this.itemSize)+Math.ceil(e.clientHeight/this.itemSize)-this.renderedLength,this.parent.rowAutoHeight&&(i=i>t?t-this.bufferCount:i),i=i>0?i:0;var n=this.getBufferCollection(i,i+this.renderedLength);if(this.parent.resourceBase.renderedResources=n,0===t)this.translateY=e.scrollTop;else{var r=this.parent.rowAutoHeight?this.averageRowHeight:this.itemSize;r=r>0?r:this.itemSize,this.translateY=e.scrollTop-this.bufferCount*r>0?e.scrollTop-this.bufferCount*r:0}return n},e.prototype.downScroll=function(e,t){if(this.parent.resourceBase.renderedResources[this.parent.resourceBase.renderedResources.length-1].groupIndex===this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1].groupIndex)return null;var i=0;i=~~(e.scrollTop/this.itemSize),this.parent.rowAutoHeight&&(i=~~((e.scrollTop-this.translateY)/this.averageRowHeight)+t,i=i>t+this.bufferCount?i:t+this.bufferCount);var n=i+this.renderedLength;n=n>this.parent.resourceBase.expandedResources.length?i+(this.parent.resourceBase.expandedResources.length-i):n;var r=this.getBufferCollection(n-this.renderedLength,n);return this.translateY=e.scrollTop,r},e.prototype.leftScroll=function(e){var t=0;return t=~~(Math.abs(e.scrollLeft)/this.itemSize)+Math.ceil(e.clientWidth/this.itemSize)-this.renderedLength,t=t>0?t:0,this.getCollection(t,t+this.renderedLength)},e.prototype.rightScroll=function(e){var t=this.parent.activeView.colLevels[this.parent.activeView.colLevels.length-1],i=0;i=~~(Math.abs(e.scrollLeft)/this.itemSize);var n=i+this.renderedLength;return n=n>t.length-1?t.length-1:n,this.getCollection(n-this.renderedLength,n)},e.prototype.getCollection=function(e,t){this.translateY=e*this.itemSize;var i=this.getResCollection(e,t);return this.parent.enableRtl&&(this.translateY=-this.translateY),i},e.prototype.getResCollection=function(e,t){var i=this.parent.activeView.colLevels[this.parent.activeView.colLevels.length-1],n=[],r={startIndex:0,endIndex:0};if(this.parent.activeViewOptions.group.byDate){if(i[parseInt(e.toString(),10)].date.getTime()===this.parent.resourceBase.expandedResources[0].date.getTime()&&i[parseInt(t.toString(),10)].date.getTime()===this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1].date.getTime())return this.parent.resourceBase.expandedResources;n=this.getByDateCollection(i[parseInt(e.toString(),10)],i[parseInt(t.toString(),10)],r),this.setRenderedDates(n)}else{if(i[parseInt(e.toString(),10)].groupIndex===this.parent.resourceBase.expandedResources[0].groupIndex&&i[parseInt(t.toString(),10)].groupIndex===this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1].groupIndex)return this.parent.resourceBase.expandedResources;n=this.getByIdCollection(i[parseInt(e.toString(),10)],i[parseInt(t.toString(),10)],r)}return"Month"!==this.parent.currentView&&(this.startIndex=r.startIndex,n=i.slice(r.startIndex,r.endIndex)),this.translateY=r.startIndex*this.itemSize,n},e.prototype.getByDateCollection=function(e,t,i){var n=this.parent.activeView.colLevels[0].filter(function(i){return e.date.getTime()<=i.date.getTime()&&i.date.getTime()<=t.date.getTime()});return this.setStartEndIndex(this.parent.activeView.colLevels[0],n[0],n[n.length-1],i),n},e.prototype.getByIdCollection=function(e,t,i){var n=this.parent.resourceBase.lastResourceLevel.filter(function(i){return e.groupIndex<=i.groupIndex&&i.groupIndex<=t.groupIndex});return this.parent.resourceBase.renderedResources=n,this.setStartEndIndex(this.parent.resourceBase.lastResourceLevel,n[0],n[n.length-1],i),n},e.prototype.setStartEndIndex=function(e,t,i,n){var r=0;e.filter(function(e){t===e?n.startIndex=r:i===e&&(n.endIndex=r+e.colSpan),r+=e.colSpan}),t===i&&(n.endIndex=n.startIndex+i.colSpan)},e.prototype.updateContent=function(e,t,r,s){var o=e.querySelector("tbody").children.length;document.activeElement&&document.activeElement.classList.contains(a._59)&&(this.isResourceCell=!0,this.parent.element.focus());for(var l=0;l<o;l++)i.i(n.remove)(e.querySelector("tbody tr")),i.i(n.remove)(t.querySelector("tbody tr")),i.i(n.remove)(r.querySelector("div"));this.parent.resourceBase.renderedResources=s;var c=this.parent.resourceBase.getContentRows(s,!0),p=this.parent.activeView.getContentRows(),d=this.parent.activeView.getEventRows(s.length);i.i(n.append)(c,e.querySelector("tbody")),i.i(n.append)(p,t.querySelector("tbody")),i.i(n.append)(d,r)},e.prototype.updateHorizontalContent=function(e,t){this.parent.resourceBase.expandedResources=t;var r=this.parent.getSelectedCells();this.focusedEle=r[r.length-1]||this.focusedEle;for(var a=e.querySelectorAll("tbody tr").length,s=0;s<a;s++)i.i(n.remove)(e.querySelector("tbody tr"));if("Month"===this.parent.currentView){this.parent.activeViewOptions.group.byDate?this.parent.activeView.colLevels[0]=t:this.parent.activeView.colLevels[this.parent.activeView.colLevels.length-2]=t;var o=this.parent.activeView.getContentRows();i.i(n.append)(o,e.querySelector("tbody"))}else{for(var l=[].slice.call(e.querySelector("colgroup").children),s=0;s<l.length;s++)i.i(n.remove)(l[parseInt(s.toString(),10)]);this.parent.activeView.colLevels[this.parent.activeView.colLevels.length-1]=t;var o=this.parent.activeView.getContentRows(),c=e.querySelector("table"),p=e.querySelector("thead"),d=e.querySelector("colgroup");t.forEach(function(){d.appendChild(i.i(n.createElement)("col"))}),p.appendChild(this.parent.eventBase.createEventWrapper("",this.startIndex>0?this.startIndex:0)),this.parent.activeViewOptions.timeScale.enable&&p.appendChild(this.parent.eventBase.createEventWrapper("timeIndicator")),i.i(n.prepend)([p],c),i.i(n.append)(o,e.querySelector("tbody"))}},e.prototype.getBufferCollection=function(e,t){return this.parent.resourceBase.expandedResources.slice(e,t)},e.prototype.setTranslate=function(e,t,r,a){i.i(n.setStyleAttribute)(e.querySelector("table"),{transform:"translateY("+this.translateY+"px)"}),i.i(n.setStyleAttribute)(t.querySelector("table"),{transform:"translateY("+this.translateY+"px)"}),i.i(n.setStyleAttribute)(r,{transform:"translateY("+this.translateY+"px)"}),i.i(n.isNullOrUndefined)(a)||i.i(n.setStyleAttribute)(a,{transform:"translateY("+this.translateY+"px)"})},e.prototype.updateFocusedWorkCell=function(){if(this.focusedEle){var e=parseInt(this.focusedEle.getAttribute("data-date"),10),t=parseInt(this.focusedEle.getAttribute("data-group-index"),10),i=this.parent.element.querySelector("."+a.n+'[data-date="'+e+'"][data-group-index="'+t+'"]');i&&this.parent.addSelectedClass([i],i,!0),this.focusedEle=null}},e.prototype.setRenderedDates=function(e){if("Month"!==this.parent.currentView){var t=e.map(function(e){return e.date});this.parent.resourceBase.renderedResources.forEach(function(e){return e.renderDates=t})}else{var i=e.map(function(e){return e.date.getDay()}),n=this.parent.activeView.renderDates.filter(function(e){return i.indexOf(e.getDay())>=0});this.parent.resourceBase.renderedResources.forEach(function(e){return e.renderDates=n})}},e.prototype.setTabIndex=function(){var e=this.parent.element.querySelector("."+a.x),t=[].slice.call(this.parent.element.querySelectorAll("."+a._59));t&&e&&t.forEach(function(t){t.getBoundingClientRect().top>=e.getBoundingClientRect().top&&t.setAttribute("tabindex","0")});var i=this.parent.element.querySelector("."+a._59+'[tabindex="0"]');this.isResourceCell&&i&&(i.focus(),this.isResourceCell=!1)},e.prototype.destroy=function(){this.removeEventListener(),this.focusedEle=null},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(0),r=(i.n(n),i(2)),a=i(3),s=function(){function e(e){this.parent=e,n.EventHandler.add(this.parent.element,"mouseover",this.onHover,this)}return e.prototype.cellMouseDown=function(e){this.isPreventAction(e)||this.parent.notify(r.M,{event:e})},e.prototype.cellClick=function(e){var t=this;if(!this.isPreventAction(e)){var s="."+a.n+",."+a.U+",."+a.e,o=i.i(n.closest)(e.target,s);if(!i.i(n.isNullOrUndefined)(o)){if(!i.i(n.isNullOrUndefined)(i.i(n.closest)(e.target,"."+a._87)))return void this.parent.eventWindow.openEditor(this.parent.activeCellsData,"Add");var l=o.classList.contains(a.n)||o.classList.contains(a.U);this.parent.uiStateValues.isTapHold&&!this.parent.uiStateValues.action&&l&&(this.parent.uiStateValues.isTapHold=!1,this.parent.eventBase.removeSelectedAppointmentClass(),this.parent.selectedElements=[]);var c=i.i(n.closest)(e.target,"."+a.p),p=this.parent.getNavigateView(),d=this.parent.currentView===p;if(i.i(n.isNullOrUndefined)(c)||d||i.i(n.isNullOrUndefined)(this.parent.viewOptions[p.charAt(0).toLowerCase()+p.slice(1)])){if(this.parent.activeViewOptions.readonly&&"MonthAgenda"!==this.parent.currentView)return void(this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide());if(this.parent.isAdaptive&&(e.target.classList.contains(a.z)||i.i(n.closest)(e.target,"."+a.z)))return;if(l&&e.shiftKey&&1===e.which&&this.parent.keyboardInteractionModule)return void this.parent.keyboardInteractionModule.onMouseSelection(e);this.parent.activeCellsData=this.parent.getCellDetails(o);var h=i.i(n.extend)(this.parent.activeCellsData,{cancel:!1,event:e,name:"cellClick"});this.parent.trigger(r.a,h,function(e){if(e.cancel)t.parent.quickPopup&&t.parent.quickPopup.quickPopupHide();else if(l&&t.parent.selectCell(o),t.parent.allowInline){var i={element:e.element,groupIndex:e.groupIndex,type:"Cell"};t.parent.notify(r.x,i)}else t.parent.notify(r.a,e)})}else{var u=this.parent.getDateFromElement(o);!i.i(n.isNullOrUndefined)(u)&&this.parent.isMinMaxDate(u)&&(this.parent.setProperties({selectedDate:u},!0),this.parent.changeView(this.parent.getNavigateView(),e))}}}},e.prototype.cellDblClick=function(e){var t=this,s="."+a.n+",."+a.U+",."+a.e,o=i.i(n.closest)(e.target,s);if(!(this.parent.activeViewOptions.readonly||this.isPreventAction(e)||i.i(n.isNullOrUndefined)(o))){var l=i.i(n.extend)(this.parent.activeCellsData,{cancel:!1,event:e,name:"cellDoubleClick"});this.parent.trigger(r.b,l,function(e){var i=new Date(e.startTime.getTime());t.parent.isMinMaxDate(new Date(i.setHours(0,0,0,0)))&&(e.cancel||t.parent.eventWindow.openEditor(t.parent.activeCellsData,"Add"))})}},e.prototype.onHover=function(e){var t="."+a.n+",."+a._12+",."+a.U+",."+a.e+",."+a._59+",."+a.A+",."+a.E+",."+a.m,s=i.i(n.closest)(e.target,t);if(s){var o={element:s,event:e};this.parent.trigger(r.e,o)}},e.prototype.isPreventAction=function(e){if(i.i(n.closest)(e.target,"."+a.p))return!1;if(i.i(n.closest)(e.target,"."+a.D)&&!i.i(n.closest)(e.target,"."+a.z))return!0;var t=i.i(n.closest)(e.target,"."+a.A+",."+a.v);return!i.i(n.isNullOrUndefined)(t)||(t=i.i(n.closest)(e.target,"."+a.e),!(!this.parent.activeView||!this.parent.activeView.isTimelineView()||i.i(n.isNullOrUndefined)(t)))},e.prototype.destroy=function(){n.EventHandler.remove(this.parent.element,"mouseover",this.onHover)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var n=i(0),r=(i.n(n),i(11)),a=(i.n(r),i(39)),s=(i.n(a),i(6)),o=(i.n(s),i(22)),l=i(3),c=i(2),p=i(1),d=function(){function e(e){this.resourceCollection=[],this.leftPixel=25,this.resourceDateTree=[],this.parent=e}return e.prototype.renderResourceHeaderIndent=function(e){var t=i.i(n.createElement)("td",{className:l._171}),r=i.i(n.createElement)("div",{className:l._62});if(this.parent.activeViewOptions.headerIndentTemplate){var a={className:[t.className],type:"emptyCells"};this.parent.renderHeaderIndentTemplate(a,t)}else t.appendChild(r);var s={elementType:"emptyCells",element:t};this.parent.trigger(c.j,s),e.appendChild(t)},e.prototype.hideResourceRows=function(e){if(!(this.resourceCollection.length<=1||this.parent.virtualScrollModule))for(var t=this.lastResourceLevel.length,r=0;r<t;r++){var a=this.lastResourceLevel[parseInt(r.toString(),10)].resourceData,s=this.lastResourceLevel[parseInt(r.toString(),10)].resource;if(a.ClassName===l.u&&!a[s.expandedField]&&!i.i(n.isNullOrUndefined)(a[s.expandedField])){var o=[].slice.call(e.children),c=o.slice(r+1,r+(parseInt(a.Count,10)+1));i.i(n.addClass)(c,l._72)}}},e.prototype.createResourceColumn=function(){var e=this.resourceCollection,t=i.i(n.createElement)("div",{className:l.x}),r=this.parent.activeView.createTableLayout(l.y);!this.parent.uiStateValues.isGroupAdaptive&&this.parent.rowAutoHeight&&this.parent.activeView.isTimelineView()&&this.parent.activeViewOptions.group.resources.length>0&&i.i(n.addClass)([r],l.k);var a=r.querySelector("tbody"),s=this.generateTreeData(!0);if(this.countCalculation(e.slice(0,-2),e.slice(0,-1)),this.renderedResources=this.lastResourceLevel,this.parent.virtualScrollModule){var o=this.parent.virtualScrollModule.getRenderedCount();this.setExpandedResources(),s=this.expandedResources.slice(0,o),this.renderedResources=s}return i.i(n.append)(this.getContentRows(s),a),this.hideResourceRows(a),r.appendChild(a),t.appendChild(r),t},e.prototype.setRenderedResources=function(){var e=this.resourceCollection;this.generateTreeData(!0);this.countCalculation(e.slice(0,-2),e.slice(0,-1)),this.renderedResources=this.lastResourceLevel},e.prototype.setExpandedResources=function(){for(var e=[],t=0;t<this.lastResourceLevel.length;t++){var r=this.lastResourceLevel[parseInt(t.toString(),10)].resourceData,a=r.Count;e.push(this.lastResourceLevel[parseInt(t.toString(),10)]);var s=r[this.lastResourceLevel[parseInt(t.toString(),10)].resource.expandedField];!i.i(n.isNullOrUndefined)(s)&&!s&&a>0&&(t+=a)}this.expandedResources=e},e.prototype.getContentRows=function(e,t){for(var r,a,s=[],o=this.resourceCollection,d=i.i(n.createElement)("tr"),h=i.i(n.createElement)("td",{attrs:{tabindex:t?"-1":"0"}}),u=0;u<e.length;u++){var g=h.cloneNode();if(a=p.C(o,"name",e[parseInt(u.toString(),10)].resource.name),a===o.length-1?(i.i(n.extend)(e[parseInt(u.toString(),10)].resourceData,{ClassName:l._172}),this.renderedResources[parseInt(u.toString(),10)].className=[l._172]):(i.i(n.extend)(e[parseInt(u.toString(),10)].resourceData,{ClassName:l.u}),this.renderedResources[parseInt(u.toString(),10)].className=[l.u]),r=a*this.leftPixel+"px",e[parseInt(u.toString(),10)].resourceData.ClassName===l.u&&!i.i(n.isNullOrUndefined)(e[parseInt(u.toString(),10)].resourceData.Count)&&e[parseInt(u.toString(),10)].resourceData.Count>0){var v=void 0;v=e[parseInt(u.toString(),10)].resourceData[o[parseInt(a.toString(),10)].expandedField]||i.i(n.isNullOrUndefined)(e[parseInt(u.toString(),10)].resourceData[o[parseInt(a.toString(),10)].expandedField])?l._61:l._60;var f=i.i(n.createElement)("div");i.i(n.addClass)([f],[l._68,v]),this.setMargin(f,r),g.appendChild(f),this.resourceCollection.length>1&&n.EventHandler.add(f,"click",this.onTreeIconClick,this)}this.parent.activeView.setResourceHeaderContent(g,e[parseInt(u.toString(),10)],l._62),g.setAttribute("data-group-index",e[parseInt(u.toString(),10)].groupIndex.toString()),g.setAttribute("aria-label",e[parseInt(u.toString(),10)].resourceData[e[parseInt(u.toString(),10)].resource.textField]+" resource"),this.parent.activeViewOptions.resourceHeaderTemplate||this.setMargin(g.querySelector("."+l._62),r);var m=[l._59,e[parseInt(u.toString(),10)].resourceData.ClassName];i.i(n.addClass)([g],m);var y={elementType:"resourceHeader",element:g,groupIndex:e[parseInt(u.toString(),10)].groupIndex};this.parent.trigger(c.j,y);var T=d.cloneNode();T.appendChild(g),s.push(T)}return s},e.prototype.setMargin=function(e,t){this.parent.enableRtl?e.style.marginRight=t:e.style.marginLeft=t},e.prototype.countCalculation=function(e,t){for(var a,s=0;s<e.length;s++){for(var o=e[e.length-(s+1)].dataSource,l=0;l<o.length;l++){var c=0;if(this.parent.activeViewOptions.group.byGroupID){var p=(new r.Query).where(t[t.length-1].groupIDField,"equal",o[parseInt(l.toString(),10)][e[e.length-(s+1)].idField]);a=new r.DataManager(t[t.length-1].dataSource).executeLocal(p)}else a=t[t.length-1].dataSource;for(var d=0;d<a.length;d++)c+=parseInt(a[parseInt(d.toString(),10)].Count,10);c+=parseInt(o[parseInt(l.toString(),10)].Count,10),i.i(n.extend)(o[parseInt(l.toString(),10)],{Count:c})}t=t.slice(0,-1)}},e.prototype.onTreeIconClick=function(e){var t=this;this.parent.eventTooltip&&this.parent.eventTooltip.close();var r,a=e.target,s=i.i(n.closest)(a,"."+l.u).parentElement,o=parseInt(s.children[0].getAttribute("data-group-index"),10),p={cancel:!1,event:e,groupIndex:o,requestType:a.classList.contains(l._61)?"resourceCollapse":"resourceExpand"};this.parent.trigger(c.f,p,function(s){if(!s.cancel){a.classList.contains(l._61)?(i.i(n.classList)(a,[l._60],[l._61]),r=!0):(i.i(n.classList)(a,[l._61],[l._60]),r=!1);for(var d=[].slice.call(t.parent.element.querySelectorAll("."+l.A+",."+l.z)),h=0,u=d;h<u.length;h++){var g=u[h];i.i(n.remove)(g)}t.parent.virtualScrollModule?t.updateVirtualContent(o,r,e,a):t.updateContent(o,r);var v={cssProperties:t.parent.getCssProperties(),module:"scroll"};t.parent.notify(c.J,v),p={cancel:!1,event:e,groupIndex:o,requestType:a.classList.contains(l._61)?"resourceExpanded":"resourceCollapsed"},t.parent.refreshEvents(!1),t.parent.trigger(c.g,p)}})},e.prototype.updateContent=function(e,t){for(var r,a=[],s=[],o=[],c=this.lastResourceLevel[parseInt(e.toString(),10)].resourceData,p=[].slice.call(this.parent.element.querySelectorAll("."+l.x+" tr")),d=[].slice.call(this.parent.element.querySelectorAll("."+l.g+" tbody tr")),h=[].slice.call(this.parent.element.querySelectorAll("."+l.g+" ."+l.l)),u=0;u<c.Count;u++)a.push(p[e+u+1]),s.push(d[e+u+1]),o.push(h[e+u+1]);for(var g=this.lastResourceLevel,v=0;v<a.length;v++){var f=!0;if(r=a[parseInt(v.toString(),10)].children[0].classList.contains(l.u),g[parseInt(e.toString(),10)].resourceData[g[parseInt(e.toString(),10)].resource.expandedField]=!t,t){if(r){var m=a[parseInt(v.toString(),10)].querySelector("."+l._68);m&&i.i(n.classList)(m,[l._60],[l._61])}a[parseInt(v.toString(),10)].classList.contains(l._72)||i.i(n.addClass)([a[parseInt(v.toString(),10)],s[parseInt(v.toString(),10)],o[parseInt(v.toString(),10)]],l._72)}else{if(r){var y=a[parseInt(v.toString(),10)].rowIndex;if(g[parseInt(y.toString(),10)].resourceData[g[parseInt(y.toString(),10)].resource.expandedField]||i.i(n.isNullOrUndefined)(g[parseInt(y.toString(),10)].resourceData[g[parseInt(y.toString(),10)].resource.expandedField])||(a.splice(v+1,parseInt(g[parseInt(y.toString(),10)].resourceData.Count,10)),s.splice(v+1,parseInt(g[parseInt(y.toString(),10)].resourceData.Count,10)),o.splice(v+1,parseInt(g[parseInt(y.toString(),10)].resourceData.Count,10)),f=!1),f){var m=a[parseInt(v.toString(),10)].querySelector("."+l._68);m&&i.i(n.classList)(m,[l._61],[l._60])}}a[parseInt(v.toString(),10)].classList.contains(l._72)&&i.i(n.removeClass)([a[parseInt(v.toString(),10)],s[parseInt(v.toString(),10)],o[parseInt(v.toString(),10)]],l._72)}}},e.prototype.updateVirtualContent=function(e,t,r,a){this.lastResourceLevel[parseInt(e.toString(),10)].resourceData[this.lastResourceLevel[parseInt(e.toString(),10)].resource.expandedField]=!t,this.setExpandedResources();var s=this.parent.virtualScrollModule.getRenderedCount(),o=this.expandedResources.indexOf(this.renderedResources[0]);if(this.renderedResources=this.expandedResources.slice(o,o+s),this.renderedResources.length<s){var c=this.expandedResources.length-s;c=c>0?c:0,this.renderedResources=this.expandedResources.slice(c,this.expandedResources.length)}var p=this.parent.element.querySelector("."+l._173);this.parent.virtualScrollModule.updateVirtualTrackHeight(p);var d=this.parent.element.querySelector("."+l.x+" table"),h=this.parent.element.querySelector("."+l.g+" table"),u=this.parent.element.querySelector("."+l.i);this.parent.virtualScrollModule.updateContent(d,h,u,this.renderedResources);var g=this.parent.element.querySelector("."+l._14);i.i(n.isNullOrUndefined)(g)||(g.style.height=this.parent.element.querySelector("."+l.h).offsetHeight+"px")},e.prototype.renderResourceHeader=function(){var e=i.i(n.createElement)("div",{className:l._25});if(e.innerHTML='<div class="'+l._39+'"><div class="'+l._174+'"><div class="e-icons '+l._175+'"></div></div><div class="'+l._176+'"></div></div>',"MonthAgenda"===this.parent.currentView){var t=this.parent.activeView.getPanel().querySelector("."+l.g);t.insertBefore(e,t.querySelector("."+l._36))}else this.parent.element.insertBefore(e,this.parent.element.querySelector("."+l._55));this.renderResourceHeaderText(),n.EventHandler.add(e.querySelector("."+l._175),"click",this.menuClick,this)},e.prototype.renderResourceTree=function(){this.popupOverlay=i.i(n.createElement)("div",{className:l._177});var e=i.i(n.createElement)("div",{className:l._178+" e-popup-close"});if("MonthAgenda"===this.parent.currentView){var t=this.parent.activeView.getPanel().querySelector("."+l._36);t.insertBefore(e,t.children[0]),t.appendChild(this.popupOverlay)}else this.parent.element.querySelector("."+l._55).appendChild(e),this.parent.element.querySelector("."+l._55).appendChild(this.popupOverlay);var r=i.i(n.createElement)("div",{className:l._179});e.appendChild(r),this.treeViewObj=new a.TreeView({cssClass:this.parent.cssClass,enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,fields:{dataSource:[].slice.call(this.generateTreeData()),id:"resourceId",text:"resourceName",child:"resourceChild"},nodeTemplate:this.parent.resourceHeaderTemplate,nodeClicked:this.resourceClick.bind(this),created:this.resourceTreeCreated.bind(this)}),this.treeViewObj.root=this.parent.root?this.parent.root:this.parent,this.treeViewObj.appendTo(r),this.treeViewObj.expandAll(),this.treePopup=new s.Popup(e,{targetType:"relative",actionOnScroll:"none",content:this.treeViewObj.element,relateTo:this.parent.element.querySelector("."+l._55),enableRtl:this.parent.enableRtl,hideAnimation:{name:"SlideLeftOut",duration:500},showAnimation:{name:"SlideLeftIn",duration:500},viewPortElement:this.parent.element.querySelector("."+("MonthAgenda"===this.parent.currentView?l._36:l._55))}),this.parent.on(c.L,this.documentClick,this)},e.prototype.resourceTreeCreated=function(){this.parent.activeViewOptions.resourceHeaderTemplate&&this.parent.portals&&this.treeViewObj.portals&&(this.parent.portals=this.parent.portals.concat(this.treeViewObj.portals),this.parent.renderTemplates())},e.prototype.generateTreeData=function(e){for(var t=this,r=[],a=[],s=0,o=this,l=0,c=this.resourceTreeLevel.length;l<c;l++)!function(l,c){var p=function(r,o,l){var c,d,h=t.resourceCollection[parseInt(o.toString(),10)];e?(d={type:"resourceHeader",resource:r.resource,resourceData:r.resourceData,groupIndex:s,groupOrder:r.groupOrder},a.push(d),s++):c={resourceId:l,resourceName:r.resourceData[h.textField],resource:r.resource,resourceData:r.resourceData},r.child.length>0&&!e&&(c.resourceChild=[]);for(var u=1,g=0,v=r.child;g<v.length;g++){var f=v[g];e?p(f,o+1,l+"-"+u):c.resourceChild.push(p(f,o+1,l+"-"+u)),u+=1}return e&&i.i(n.extend)(d.resourceData,{Count:u-1}),c};e?p(o.resourceTreeLevel[parseInt(l.toString(),10)],0,(l+1).toString()):r.push(p(o.resourceTreeLevel[parseInt(l.toString(),10)],0,(l+1).toString()))}(l);return e?(this.lastResourceLevel=a,a):r},e.prototype.renderResourceHeaderText=function(){for(var e=this.lastResourceLevel[this.parent.uiStateValues.groupIndex],t=[],r=this,a=0,s=e.groupOrder.length;a<s;a++)!function(a,s){var o=r.resourceCollection[parseInt(a.toString(),10)],c=o.dataSource.filter(function(t){return t[o.idField]===e.groupOrder[parseInt(a.toString(),10)]}),p=i.i(n.createElement)("div",{className:l._46});r.parent.sanitize(c[0][o.textField],p),t.push(p);var d=i.i(n.createElement)("div",{className:"e-icons e-icon-next"});t.push(d)}(a);t.pop();var o="MonthAgenda"===this.parent.currentView?this.parent.activeView.getPanel():this.parent.element,c=o.querySelector("."+l._176);p.E(c);for(var d=0,h=t;d<h.length;d++){var u=h[d];c.appendChild(u)}1===this.lastResourceLevel.length&&i.i(n.addClass)([this.parent.element.querySelector("."+l._174)],l.J)},e.prototype.menuClick=function(e){if(this.parent.element.querySelector("."+l._178).classList.contains(l.T))this.treePopup.hide(),i.i(n.removeClass)([this.popupOverlay],l._169);else{var t=[].slice.call(this.treeViewObj.element.querySelectorAll(".e-list-item:not(.e-has-child)"));i.i(n.removeClass)(t,"e-active"),i.i(n.addClass)([t[this.parent.uiStateValues.groupIndex]],"e-active"),this.treePopup.show(),i.i(n.addClass)([this.popupOverlay],l._169)}},e.prototype.selectResourceByIndex=function(e){this.lastResourceLevel&&e>-1&&e<this.lastResourceLevel.length&&this.triggerEvents(e)},e.prototype.resourceClick=function(e){if(!e.node.classList.contains("e-has-child")){this.treePopup.hide(),i.i(n.removeClass)([this.popupOverlay],l._169);var t=[].slice.call(this.treeViewObj.element.querySelectorAll(".e-list-item:not(.e-has-child)")),r=t.indexOf(e.node);this.triggerEvents(r,e),e.event.preventDefault()}},e.prototype.triggerEvents=function(e,t){var i=this,n={cancel:!1,event:t?t.event:null,groupIndex:e,requestType:"resourceChange"};this.parent.trigger(c.f,n,function(e){e.cancel||(i.parent.uiStateValues.groupIndex=e.groupIndex,i.parent.renderModule.render(i.parent.currentView),n={cancel:!1,event:t?t.event:null,groupIndex:i.parent.uiStateValues.groupIndex,requestType:"resourceChanged"},i.parent.adaptiveGroupIndex=i.parent.uiStateValues.groupIndex,i.parent.trigger(c.g,n))})},e.prototype.documentClick=function(e){if(!i.i(n.closest)(e.event.target,"."+l._178)){var t=this.parent.element.querySelector("."+l._178);t&&t.classList.contains(l.T)&&(this.treePopup.hide(),i.i(n.removeClass)([this.popupOverlay],l._169))}},e.prototype.bindResourcesData=function(e){var t=this;this.parent.showSpinner();for(var i=[],n=0,r=this.parent.resources;n<r.length;n++){var a=r[n],s=new o.a(this.parent,a.dataSource,a.query);i.push(s.getData(s.generateQuery()))}Promise.all(i).then(function(i){return t.dataManagerSuccess(i,e)}).catch(function(e){return t.parent.crudModule.dataManagerFailure(e)})},e.prototype.dataManagerSuccess=function(e,t){if(!(!this.parent||this.parent&&this.parent.isDestroyed)){this.parent.resourceCollection=[];for(var i=0,n=e.length;i<n;i++){var r=this.parent.resources[parseInt(i.toString(),10)],a=this.getResourceModel(r,e[parseInt(i.toString(),10)].result);this.parent.resourceCollection.push(a)}this.refreshLayout(t)}},e.prototype.getResourceModel=function(e,t){return{field:e.field,title:e.title,name:e.name,allowMultiple:e.allowMultiple,dataSource:t||e.dataSource,idField:e.idField,textField:e.textField,groupIDField:e.groupIDField,colorField:e.colorField,startHourField:e.startHourField,endHourField:e.endHourField,workDaysField:e.workDaysField,expandedField:e.expandedField,cssClassField:e.cssClassField}},e.prototype.refreshLayout=function(e){!i.i(n.isNullOrUndefined)(this.parent.uiStateValues.groupIndex)&&this.parent.enablePersistence||(this.parent.uiStateValues.groupIndex=0),this.parent.renderElements(e)},e.prototype.setResourceCollection=function(){var e=[];if(this.resourceCollection=[],this.colorIndex=null,this.parent.activeViewOptions.group.resources.length>0)for(var t=0,r=this.parent.activeViewOptions.group.resources;t<r.length;t++){var a=r[t],s=p.C(this.parent.resourceCollection,"name",a);s>=0&&e.push(this.parent.resourceCollection[parseInt(s.toString(),10)])}else this.parent.resourceCollection.length>0&&(e=this.parent.resourceCollection);for(var o=0,l=0,c=e;l<c.length;l++){var a=c[l],d=this.getResourceModel(a);a.name===this.parent.eventSettings.resourceColorField&&(this.colorIndex=o),o++,this.resourceCollection.push(d)}i.i(n.isNullOrUndefined)(this.colorIndex)&&(this.colorIndex=this.resourceCollection.length-1)},e.prototype.generateResourceLevels=function(e,t){var i=this,n=this.resourceCollection,r=[],a=[],s=function(t,n,o,l,c){var p=[],d=t[0];if(d){var h=void 0;if(l&&i.parent.activeViewOptions.group.byGroupID){var u=l[o.idField];h=d.dataSource.filter(function(e){return e[d.groupIDField]===u})}else h=d.dataSource;for(var g=0;g<h.length;g++){var v=[];c&&c.length>0&&(v=v.concat(c)),v.push(h[parseInt(g.toString(),10)][d.idField]);var f=s(t.slice(1),n+1,d,h[parseInt(g.toString(),10)],v);if(!(0===n&&0===f.length&&i.resourceCollection.length>1)){var m=[],y=i.parent.activeView.renderDates,T=void 0;if(!i.parent.activeViewOptions.group.byDate&&n+1===i.resourceCollection.length){var w=h[parseInt(g.toString(),10)][d.workDaysField],D=h[parseInt(g.toString(),10)][d.startHourField],b=h[parseInt(g.toString(),10)][d.endHourField];w&&w.length>0?(y=i.parent.activeView.getRenderDates(w),T=w,m=i.parent.activeView.getDateSlots(y,w)):(T=i.parent.activeViewOptions.workDays,m=e);var S=i.generateCustomHours(m,D,b,v);a=a.concat(S)}var C=h[parseInt(g.toString(),10)][d.cssClassField],O={type:"resourceHeader",className:["e-resource-cells"],resourceLevelIndex:n,groupOrder:v,resource:d,resourceData:h[parseInt(g.toString(),10)],colSpan:i.parent.activeViewOptions.group.byDate?1:m.length,renderDates:y,workDays:T,cssClass:C,child:f};p.push(O)}}return r[parseInt(n.toString(),10)]||(r[parseInt(n.toString(),10)]=[]),p.length>0&&r[parseInt(n.toString(),10)].push(p),p}return[]};return this.resourceTreeLevel=s(n,0),t?[]:this.generateHeaderLevels(r,a,e)},e.prototype.generateCustomHours=function(e,t,r,a){for(var s=i.i(n.extend)([],e,null,!0),o=0,l=s;o<l.length;o++){var c=l[o];t&&(c.startHour=this.parent.getStartEndTime(t)),r&&(c.endHour=this.parent.getStartEndTime(r)),a&&(c.groupOrder=a)}return s},e.prototype.generateHeaderLevels=function(e,t,r){for(var a=[],s=e.length-1;s>=0;s--)for(var o=0,l=0,c=e[parseInt(s.toString(),10)];l<c.length;l++)for(var p=c[l],d=0,h=p;d<h.length;d++){var u=h[d];if(e[s+1]&&e[s+1].length>0){var g=e[parseInt((s+1).toString(),10)][parseInt(o.toString(),10)];if(!g)continue;for(var v=0,f=0,m=g;f<m.length;f++){var y=m[f];(!this.parent.activeViewOptions.group.byGroupID||this.parent.activeViewOptions.group.byGroupID&&y.resourceData[y.resource.groupIDField]===u.resourceData[u.resource.idField])&&(v+=y.colSpan)}u.colSpan=v}u.groupIndex=o,o++,a[u.resourceLevelIndex]=a[u.resourceLevelIndex]||[],a[u.resourceLevelIndex].push(u)}if(this.lastResourceLevel=a.slice(-1)[0]||[],!this.parent.activeViewOptions.group.byDate){for(var T=0,w=0,D=this.lastResourceLevel;w<D.length;w++)for(var b=D[w],s=0;s<b.colSpan;s++)t[parseInt(T.toString(),10)].groupIndex=b.groupIndex,T++;return a.push(t),a}var S=[],C=i.i(n.extend)([],a,null,!0),O=[];if(this.parent.activeViewOptions.group.hideNonWorkingDays){for(var E=[],x=0,A=this,V=0,I=r;V<I.length;V++){var M=I[V];!function(e){A.resourceDateTree[parseInt(x.toString(),10)]=[];for(var t=[],r=0;r<A.lastResourceLevel.length;r++)!function(r){var a=A.lastResourceLevel[parseInt(r.toString(),10)].resourceData[A.lastResourceLevel[parseInt(r.toString(),10)].resource.workDaysField];if(a||(a=A.parent.activeViewOptions.workDays),-1!==a.indexOf(e.date.getDay())){var s=i.i(n.extend)({},A.lastResourceLevel[parseInt(r.toString(),10)],null,!0);s.date=e.date,A.lastResourceLevel[parseInt(r.toString(),10)].workDays=a,s.startHour=A.parent.getStartEndTime(s.resourceData[s.resource.startHourField])||e.startHour,s.endHour=A.parent.getStartEndTime(s.resourceData[s.resource.endHourField])||e.endHour,A.resourceDateTree[parseInt(x.toString(),10)].push(s);for(var o=0;o<s.groupOrder.length;o++)!function(a){if(t[parseInt(a.toString(),10)]||(t[parseInt(a.toString(),10)]=[]),a===s.groupOrder.length-1){E[parseInt(r.toString(),10)]||(E[parseInt(r.toString(),10)]=[]);var o=s.renderDates.filter(function(t){return t.getDay()===e.date.getDay()});return E[parseInt(r.toString(),10)]=E[parseInt(r.toString(),10)].concat(o),t[parseInt(a.toString(),10)].push(s),"continue"}var l=C[parseInt(a.toString(),10)],c=l.filter(function(e){return e.resourceData[e.resource.idField]===s.groupOrder[parseInt(a.toString(),10)]});if(c&&c.length>0){var p=t[parseInt(a.toString(),10)].filter(function(e){return e.resourceData[e.resource.idField]===s.groupOrder[parseInt(a.toString(),10)]});if(p&&p.length>0)p[0].colSpan+=1;else{var d=i.i(n.extend)({},c[0],null,!0);d.colSpan=1,t[parseInt(a.toString(),10)].push(d)}}}(o)}}(r);if(t.length>0){for(var a=0;a<C.length;a++)S[parseInt(a.toString(),10)]||(S[parseInt(a.toString(),10)]=[]),S[parseInt(a.toString(),10)]=S[parseInt(a.toString(),10)].concat(t[parseInt(a.toString(),10)]);e.colSpan=t[t.length-1].length,O.push(e)}x++}(M)}return this.resourceDateTree=this.resourceDateTree.filter(function(e){return e.length>0}),this.lastResourceLevel.forEach(function(e,t){E[parseInt(t.toString(),10)]&&(e.renderDates=E[parseInt(t.toString(),10)].sort(function(e,t){return e.getTime()-t.getTime()}))}),S.unshift(O),S}for(var k=0,R=0,H=C[0];R<H.length;R++){k+=H[R].colSpan}for(var _=0,P=r;_<P.length;_++){var M=P[_];M.colSpan=k,O.push(M);for(var j=i.i(n.extend)([],C,null,!0),L=0,N=j.length;L<N;L++){if(L===j.length-1)for(var q=0,F=j[parseInt(L.toString(),10)];q<F.length;q++){var U=F[q];U.date=M.date,U.workDays=M.workDays,U.startHour=this.parent.getStartEndTime(U.resourceData[U.resource.startHourField])||M.startHour,U.endHour=this.parent.getStartEndTime(U.resourceData[U.resource.endHourField])||M.endHour}S[parseInt(L.toString(),10)]||(S[parseInt(L.toString(),10)]=[]),S[parseInt(L.toString(),10)]=S[parseInt(L.toString(),10)].concat(j[parseInt(L.toString(),10)])}}return S.unshift(O),S},e.prototype.setResourceValues=function(e,t){var r=this,a=function(t,i,n){r.resourceCollection[parseInt(t.toString(),10)].allowMultiple&&r.parent.activeViewOptions.group.allowGroupEdit?e[""+i]=[n]:e[""+i]=n};if(void 0===t&&(t=this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:this.parent.activeCellsData.groupIndex),this.parent.activeViewOptions.group.resources.length>0&&!i.i(n.isNullOrUndefined)(t))for(var s=this.lastResourceLevel[parseInt(t.toString(),10)].groupOrder,o=0;o<this.resourceCollection.length;o++)a(o,this.resourceCollection[parseInt(o.toString(),10)].field,s[parseInt(o.toString(),10)]);else if(this.parent.resourceCollection.length>0)for(var o=0;o<this.resourceCollection.length;o++){var l=this.resourceCollection[parseInt(o.toString(),10)].dataSource[0];l&&a(o,this.resourceCollection[parseInt(o.toString(),10)].field,l[this.resourceCollection[parseInt(o.toString(),10)].idField])}},e.prototype.getResourceColor=function(e,t){var r=!i.i(n.isNullOrUndefined)(t)&&this.colorIndex>t.length-1?t.length-1:this.colorIndex,a=this.resourceCollection[parseInt(r.toString(),10)];if(!(i.i(n.isNullOrUndefined)(t)&&this.parent.activeViewOptions.group.allowGroupEdit&&a.allowMultiple)){var s=i.i(n.isNullOrUndefined)(t)?e[a.field]:t[parseInt(r.toString(),10)],o=this.filterData(a.dataSource,a.idField,s);return o.length>0?o[0][a.colorField]:void 0}},e.prototype.getCssClass=function(e){var t=this.resourceCollection.slice(-1)[0];if(!this.parent.activeViewOptions.group.allowGroupEdit||!t.allowMultiple){var i=this.filterData(t.dataSource,t.idField,e[t.field]);return i.length>0?i[0][t.cssClassField]:void 0}},e.prototype.getResourceRenderDates=function(){var e=[].concat.apply([],this.lastResourceLevel.map(function(e){return e.renderDates})),t=e.map(function(e){return e.getTime()}),i=function(e){return e.filter(function(e,i){return t.indexOf(e.getTime())===i})}(e);return i.sort(function(e,t){return e.getTime()-t.getTime()}),i},e.prototype.filterData=function(e,t,i){return e.filter(function(e){return e[""+t]===i})},e.prototype.getResourceData=function(e,t,r){if(this.parent.activeViewOptions.group.allowGroupEdit){for(var a={},s=0,o=r;s<o.length;s++)for(var l=o[s],c=this.lastResourceLevel[parseInt(l.toString(),10)].groupOrder,p=0,d=c.length;p<d;p++){var h=this.resourceCollection[parseInt(p.toString(),10)].field;i.i(n.isNullOrUndefined)(a[""+h])&&(a[""+h]=[]),a[""+h].push(c[parseInt(p.toString(),10)])}e=i.i(n.extend)(e,a)}else for(var p=0,u=this.resourceCollection.length;p<u;p++)this.lastResourceLevel[parseInt(t.toString(),10)]&&(e[this.resourceCollection[parseInt(p.toString(),10)].field]=this.lastResourceLevel[parseInt(t.toString(),10)].groupOrder[parseInt(p.toString(),10)])},e.prototype.addResource=function(e,t,i){for(var n=e instanceof Array?e:[e],a=0,s=this.parent.resourceCollection;a<s.length;a++){var o=s[a];if("break"===function(e){if(e.name===t)return n.forEach(function(t,n){return new r.DataManager({json:e.dataSource}).insert(t,null,null,i+n)}),"break"}(o))break}this.refreshLayout(!0)},e.prototype.removeResource=function(e,t){for(var i=e instanceof Array?e:[e],n=0,a=this.parent.resourceCollection;n<a.length;n++){var s=a[n];if("break"===function(e){if(e.name===t)return i.forEach(function(t){return new r.DataManager({json:e.dataSource}).remove(e.idField,t)}),"break"}(s))break}this.refreshLayout(!0)},e.prototype.getIndexFromResourceId=function(e,t,r,a,s){if(t=t||this.parent.resourceCollection.slice(-1)[0].name,i.i(n.isNullOrUndefined)(r)&&(r=this.resourceCollection.filter(function(e){return e.name===t})[0],i.i(n.isNullOrUndefined)(r)))return null;var o=r.dataSource.filter(function(t){return a&&t[r.idField]===e?t[r.groupIDField]===a[""+s]?t[r.idField]===e:null:t[r.idField]===e})[0];return this.lastResourceLevel.map(function(e){return e.resourceData}).indexOf(o)},e.prototype.resourceExpand=function(e,t,i){var n=this.parent.resourceCollection.filter(function(e){return e.name===t?e:null})[0],r=0,a=n.dataSource.filter(function(t){return t[n.idField]===e})[0];r=this.parent.activeViewOptions.group.byGroupID?this.lastResourceLevel.map(function(e){return e.resourceData}).indexOf(a):this.getIndexFromResourceId(e,t,n);var s=this.parent.element.querySelector("."+l.x+' [data-group-index="'+r+'"] .'+l._68);s&&(s.classList.contains(l._60)&&!i?s.click():s.classList.contains(l._61)&&i&&s.click())},e.prototype.resourceScroll=function(e,t){if(!(this.parent.isAdaptive||["Agenda","MonthAgenda"].indexOf(this.parent.currentView)>-1)){var i=t||this.parent.resourceCollection.slice(-1)[0].name,n=this.parent.resourceCollection.length-1,r=this.parent.resourceCollection.filter(function(e,t){return e.name===i?(n=t,e):null})[0],a=this.parent.element.querySelector("."+l.g),s=0;if(this.parent.activeView.isTimelineView()){if(this.parent.activeViewOptions.group.byGroupID){var o=r.dataSource.filter(function(t){return t[r.idField]===e})[0];s=this.lastResourceLevel.map(function(e){return e.resourceData}).indexOf(o)}else s=this.getIndexFromResourceId(e,i,r);if(this.parent.virtualScrollModule){var c=this.parent.element.querySelector("."+l._173),p=Math.round(c.offsetHeight/this.expandedResources.length);if(this.parent.rowAutoHeight&&(a.scrollTop=0,this.parent.virtualScrollModule.virtualScrolling()),a.scrollTop=s*p-(this.parent.virtualScrollModule.bufferCount-1)*p,this.parent.virtualScrollModule.virtualScrolling(),this.parent.rowAutoHeight){var d=this.parent.element.querySelector("."+l.n+'[data-group-index="'+s+'"]');d&&!d.parentElement.classList.contains(l._72)&&(a.scrollTop=a.scrollTop<d.offsetTop?d.offsetTop:a.scrollTop+d.offsetTop)}else a.scrollTop=s*p}else{var d=this.parent.element.querySelector("."+l.n+'[data-group-index="'+s+'"]');d&&!d.parentElement.classList.contains(l._72)&&(a.scrollTop=d.offsetTop)}}else{s=this.parent.activeViewOptions.group.byGroupID?i===this.parent.resourceCollection.slice(-1)[0].name?this.lastResourceLevel.map(function(e){return e.resourceData[r.idField]}).indexOf(e):r.dataSource.map(function(e){return e[r.idField]}).indexOf(e):this.getIndexFromResourceId(e,i,r);var h="Month"===this.parent.currentView?this.parent.element.querySelector("."+l.d+" tbody tr:nth-child("+(n+1)+")"):this.parent.element.querySelector("."+l._4+":nth-child("+(n+1)+")"),u=[].slice.call(h.children).map(function(e){return e.offsetLeft});a.scrollLeft=u[parseInt(s.toString(),10)]}}},e.prototype.destroy=function(){if(this.parent.off(c.L,this.documentClick),this.treeViewObj){if(this.treeViewObj.portals&&this.treeViewObj.portals.length>0){var e=this.treeViewObj.portals.map(function(e){return e.propName});e.length>0&&this.parent.resetTemplates(e)}this.treeViewObj.destroy(),this.treeViewObj=null}this.treePopup&&(this.treePopup.destroy(),this.treePopup=null,i.i(n.remove)(this.parent.element.querySelector("."+l._178)),i.i(n.remove)(this.parent.element.querySelector("."+l._177)));var t=this.parent.element.querySelector("."+l._25);t&&i.i(n.remove)(t)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return p});var n=i(0),r=(i.n(n),i(15)),a=i(5),s=i(7),o=i(3),l=i(2),c=i(1),p=function(){function e(e){this.parent=e,this.parent.on(l.x,this.inlineEdit,this)}return e.prototype.inlineEdit=function(e){if(this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(),"Cell"===e.type){var t=this.parent.element.querySelector("."+o._96);t&&t.classList.contains(o.T)&&this.parent.quickPopup.morePopup.hide(),this.removeInlineAppointmentElement(),this.cellEdit(e)}else this.parent.element.querySelector("."+o._2)!==e.element.querySelector("."+o._2)&&this.removeInlineAppointmentElement(),this.eventEdit(e)},e.prototype.cellEdit=function(e){var t=this.generateEventData(),i=e.element.cellIndex,n=this.getEventDaysCount(t);n>1&&(n=Math.round(n),n--,i-=n);var r=c.b(new Date(""+t[this.parent.eventFields.startTime])).getTime(),a=c.b(new Date(""+t[this.parent.eventFields.endTime])).getTime(),s=e.groupIndex||0,l="Day"===this.parent.currentView||"Week"===this.parent.currentView||"WorkWeek"===this.parent.currentView;if(this.parent.activeViewOptions.timeScale.enable&&l){var p=t[this.parent.eventFields.startTime].getDay();this.createVerticalViewInline(t,p,s,i)}else"Month"===this.parent.currentView||!this.parent.activeViewOptions.timeScale.enable&&l?this.createMonthViewInline(t,s,r,a):this.createTimelineViewInline(t,r,a,s);var d=this.parent.element.querySelector("."+o._2);d&&d.focus()},e.prototype.eventEdit=function(e){var t,r=e.element.querySelector("."+o._2);if(r)t=r.value;else{var a=e.element.querySelector("."+o.H);if(i.i(n.isNullOrUndefined)(a)?t=e.data[this.parent.eventFields.subject]:(i.i(n.addClass)([a],o.J),t=a.innerText),r=i.i(n.createElement)("input",{className:o._2,attrs:{value:t}}),i.i(n.closest)(e.element,"."+o._96))e.element.insertBefore(r,a);else if(["Agenda","MonthAgenda"].indexOf(this.parent.currentView)>-1){var s=e.element.querySelector("."+o._44);i.i(n.isNullOrUndefined)(s)&&(s=i.i(n.createElement)("div",{className:o._44}),e.element.prepend(s)),s.insertBefore(r,s.firstChild)}else e.element.querySelector(".e-appointment-details").prepend(r);r.focus()}r.setSelectionRange(t.length,t.length)},e.prototype.createVerticalViewInline=function(e,t,i,n){var a,s=this.getEventDaysCount(e),l=new r.a(this.parent);l.initializeValues();var p=l.dateRender[parseInt(i.toString(),10)].map(function(e){return e.getDay()}).indexOf(t);if(s>=1){l.allDayElement=[].slice.call(this.parent.element.querySelectorAll("."+o.U)),(a=l.slots).push.apply(a,this.parent.activeView.renderDates.map(function(e){return+e}));var d=[].slice.call(this.parent.element.querySelectorAll("."+o._31)),h=0;d.length>0&&(h=Math.floor(c.K(this.parent.element.querySelector("."+o._28))/d[0].offsetHeight)-1),l.allDayLevel=h;var u=c.h(this.parent.element.querySelector("."+o._7),o.A),g=l.allDayElement.length>0?l.allDayElement[0].offsetTop:0;l.renderAllDayEvents(e,p,i,n,this.parent.allowInline,g,u)}else l.renderNormalEvents(e,p,i,n,this.parent.allowInline)},e.prototype.createMonthViewInline=function(e,t,i,n){var r=this.getEventDaysCount(e),s=this.parent.eventBase.cloneEventObject(e,i,n,r,!1,!1),l=new a.a(this.parent);l.dateRender=this.parent.activeView.renderDates,l.inlineValue=this.parent.allowInline;var p=this.parent.activeView.renderDates,d=this.parent.activeViewOptions.workDays,h="."+o.n;if(this.parent.activeViewOptions.group.resources.length>0){h+='[data-group-index="'+t+'"]';var u=this.parent.resourceBase.lastResourceLevel[parseInt(t.toString(),10)];p=u.renderDates,d=u.workDays}l.dateRender=p,l.workCells=[].slice.call(this.parent.element.querySelectorAll(h)),l.cellWidth=l.workCells[0].offsetWidth,l.cellHeight=l.workCells[0].offsetHeight,l.eventHeight=c.h(this.parent.monthModule.element||l.element,o.A),l.getSlotDates(d);for(var g=l.getRenderedDates(p),v=l.splitEvent(s,g||p),f=0,m=v;f<m.length;f++){var y=m[f];l.renderEvents(y,t)}this.parent.element.querySelector("."+o._2).focus()},e.prototype.createTimelineViewInline=function(e,t,i,n){var r=this.getEventDaysCount(e),a=this.parent.eventBase.cloneEventObject(e,t,i,r,!1,!1),l=new s.a(this.parent,this.parent.activeViewOptions.timeScale.enable?"hour":"day");l.dateRender=this.parent.activeView.renderDates,l.eventContainers=[].slice.call(this.parent.element.querySelectorAll("."+o.l));var p=this.parent.element.querySelector("."+o.n);l.inlineValue=this.parent.allowInline,l.cellWidth=p.offsetWidth,l.cellHeight=p.offsetHeight;var d=0===this.parent.element.querySelectorAll("."+o.h+" tbody tr").length?0:this.parent.element.querySelectorAll("."+o.h+" tbody tr")[0].children.length;l.slotsPerDay=d/l.dateRender.length,l.eventHeight=c.h(l.element,o.A),l.renderEvents(a,n)},e.prototype.getEventDaysCount=function(e){var t=e[this.parent.eventFields.startTime],i=e[this.parent.eventFields.endTime];return Math.abs(i.getTime()-t.getTime())/c.c},e.prototype.generateEventData=function(e){var t=this.parent.element.querySelector("."+o._2),i=t?t.value:e?e.innerHTML:"",n={};return n[this.parent.eventFields.id]=this.parent.eventBase.getEventMaxID(),n[this.parent.eventFields.subject]=i,n[this.parent.eventFields.startTime]=this.parent.activeCellsData.startTime,n[this.parent.eventFields.endTime]=this.parent.activeCellsData.endTime,n[this.parent.eventFields.isAllDay]=this.parent.activeCellsData.isAllDay,this.parent.eventWindow.setDefaultValueToObject(n),this.parent.resourceBase&&this.parent.resourceBase.setResourceValues(n,this.parent.activeCellsData.groupIndex),n},e.prototype.documentClick=function(){var e=this.parent.element.querySelector("."+o._2);e&&""!==e.value?this.inlineCrudActions(e):this.removeInlineAppointmentElement()},e.prototype.inlineCrudActions=function(e){if(i.i(n.closest)(e,"."+o._3)){var t=this.generateEventData(e);this.parent.addEvent(t)}else{var r=i.i(n.closest)(e,"."+o.A),a=this.parent.getEventDetails(r);a[this.parent.eventFields.subject]=e.value;var s=void 0;a[this.parent.eventFields.id]===a[this.parent.eventFields.recurrenceID]&&(s="EditOccurrence",a[this.parent.eventFields.id]=this.parent.eventBase.getEventMaxID()),this.parent.saveEvent(a,s)}this.removeInlineAppointmentElement()},e.prototype.createInlineAppointmentElement=function(e){var t=i.i(n.createElement)("div",{className:o.A+" "+o._3}),r=i.i(n.createElement)("div",{className:o.G});t.appendChild(r);var a=i.i(n.createElement)("input",{className:o._2});return r.appendChild(a),e&&this.parent.eventBase.applyResourceColor(t,e,"backgroundColor"),t},e.prototype.removeInlineAppointmentElement=function(){var e=[].slice.call(this.parent.element.querySelectorAll("."+o._3));e.length>0&&e.forEach(function(e){return i.i(n.remove)(e)});var t=this.parent.element.querySelector("."+o._2);if(t){var r=i.i(n.closest)(t,"."+o.A),a=r.querySelector("."+o.H);i.i(n.isNullOrUndefined)(a)||i.i(n.removeClass)([a],o.J),i.i(n.remove)(t)}},e.prototype.destroy=function(){this.parent.off(l.x,this.inlineEdit)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var n=i(0),r=(i.n(n),i(4)),a=function(){function e(e){this.parent=e}return e.prototype.initializeCalendarExport=function(e,t){var i=this.getCalendarString(e,t);this.download(i,e)},e.prototype.getCalendarString=function(e,t){var a=this,s=t||i.i(n.extend)([],this.parent.eventsData,null,!0);s=this.parent.eventBase.sortByTime(s);var o=-1!==navigator.appVersion.indexOf("Win")?"\r\n":"\n",l=[],c=[],p=this.parent.timezone||this.parent.tzModule.getLocalTimezoneName(),d=this.parent.eventFields;return s.forEach(function(e){var t=e[d.id]||e.Guid||a.parent.eventBase.generateGuid(),h=[];if(e[d.recurrenceID]){var u=a.filterEvents(c,d.id,e[d.recurrenceID]);t=u.length>0?u[0].UID:t}if(!e[d.recurrenceID]&&e[d.recurrenceRule]&&e[d.recurrenceException]){var g=e[d.recurrenceException].split(",");a.filterEvents(s,d.recurrenceID,e[d.id]).forEach(function(e){h.push(i.i(r.f)(e[d.startTime]))});var v=g.filter(function(e){return-1===h.indexOf(e)});e[d.recurrenceException]=v.length>0?v.join(",")+",":""}var f=e[d.startTimezone]||p,m=e[d.endTimezone]||p,y=!!e[d.isReadonly]&&e[d.isReadonly],T=["BEGIN:VEVENT","LOCATION:"+(e[d.location]||""),"SUMMARY:"+(e[d.subject]||""),"UID:"+t,"DESCRIPTION:"+(e[d.description]||""),"ISREADONLY:"+y,"END:VEVENT"];if(e[d.isAllDay]?(T.splice(4,0,"DTEND;VALUE=DATE:"+a.convertDateToString(e[d.endTime],!0)),T.splice(4,0,"DTSTART;VALUE=DATE:"+a.convertDateToString(e[d.startTime],!0))):e[d.isAllDay]||e[d.recurrenceRule]?(T.splice(4,0,'DTEND;TZID="'+m+'":'+a.convertDateToString(e[d.endTime])),T.splice(4,0,'DTSTART;TZID="'+f+'":'+a.convertDateToString(e[d.startTime]))):(T.splice(4,0,"DTEND:"+a.convertDateToString(e[d.endTime])),T.splice(4,0,"DTSTART:"+a.convertDateToString(e[d.startTime]))),e[d.recurrenceRule]&&T.splice(4,0,"RRULE:"+e[d.recurrenceRule]),e[d.recurrenceException])for(var g=e[d.recurrenceException].split(","),w=0;w<g.length-1;w++)T.splice(5,0,"EXDATE:"+a.convertDateToString(i.i(r.c)(g[parseInt(w.toString(),10)]),e[d.isAllDay]));e[d.recurrenceID]&&T.splice(4,0,'RECURRENCE-ID;TZID="'+f+'":'+a.convertDateToString(e[d.startTime],e[d.isAllDay]));var D=a.customFieldFilter(e,d);D.length>0&&D.forEach(function(t){return T.splice(4,0,t+":"+(e[""+t]||""))});var b=i.i(n.extend)({},e);b.UID=t,c.push(b),l.push(T.join(o))}),["BEGIN:VCALENDAR","PRODID:-//Syncfusion Inc//Scheduler//EN","VERSION:2.0","CALSCALE:GREGORIAN","METHOD:PUBLISH","X-WR-CALNAME:"+(e||"Calendar"),"X-WR-TIMEZONE:"+p].join(o)+o+l.join(o)+o+"END:VCALENDAR"},e.prototype.customFieldFilter=function(e,t){var i=Object.keys(t).map(function(e){return t[""+e]});return Object.keys(e).filter(function(e){return-1===i.indexOf(e)&&"Guid"!==e})},e.prototype.convertDateToString=function(e,t){var i=("0000"+e.getFullYear().toString()).slice(-4),n=("00"+(e.getMonth()+1).toString()).slice(-2),r=("00"+e.getDate().toString()).slice(-2),a=("00"+e.getHours().toString()).slice(-2),s=("00"+e.getMinutes().toString()).slice(-2),o=("00"+e.getSeconds().toString()).slice(-2);return t?i+n+r:i+n+r+"T"+a+s+o},e.prototype.download=function(e,t){var i=new Blob([e],{type:"data:text/calendar;charset=utf8"});if(t=(t||"Calendar")+".ics",navigator.msSaveBlob)navigator.msSaveBlob(i,t);else{var n=document.createElementNS("http://www.w3.org/1999/xhtml","a");n.download=t,n.href=URL.createObjectURL(i);var r=document.createEvent("MouseEvent");r.initEvent("click",!0,!0),n.dispatchEvent(r),setTimeout(function(){URL.revokeObjectURL(n.href),n.href=void 0})}},e.prototype.filterEvents=function(e,t,i){return e.filter(function(e){return e[""+t]===i})},e.prototype.getModuleName=function(){return"iCalendarExport"},e.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed||(this.parent=null)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var n=i(0),r=(i.n(n),i(4)),a=function(){function e(e){this.allDay=!1,this.parent=e}return e.prototype.initializeCalendarImport=function(e){var t=this;if(e&&e instanceof Blob){var i=new FileReader;i.onload=function(){var e=i.result;t.iCalendarParser(e)},i.readAsText(e,"UTF-8")}else e&&"string"==typeof e&&this.iCalendarParser(e)},e.prototype.iCalendarParser=function(e){var t,r,a={isEvent:!1,curEvent:null,id:this.parent.eventBase.getEventMaxID(),count:0,events:[],key:null},s=e.length,o=e.search(/[^ \t]/),l=o;do{l=e.indexOf("\n",o)+1,0===l?(l=s,r=0):r=l>1&&"\r"===e[l-2]?2:1;var c=e[o];" "===c||"\n"===c||"\t"===c?t+=e.slice(o+1,l-r):(t&&(a=this.updateEventData(t,a)),t=e.slice(o,l-r)),o=l}while(l!==s);t=t.trim(),t.length&&(a=this.updateEventData(t,a));var p=i.i(n.extend)([],a.events,null,!0);this.parent.addEvent(this.processOccurrence(p,a.id))},e.prototype.updateEventData=function(e,t){var a=this.parent.eventFields,s=t.id,o=t.events,l=t.isEvent,c=t.count,p=t.curEvent,d=t.key;if(l||"BEGIN:VEVENT"!==e||(l=!0,p={}),l&&"END:VEVENT"===e&&(l=!1,o.push(p),p=null),l){var h=e.indexOf(":"),u=e.substring(0,h).replace(/^\s\s*/,"").replace(/\s\s*$/,""),g=e.substring(h+1,e.length).replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(-1!==e.indexOf("SUMMARY")&&(u="SUMMARY"),-1!==e.indexOf("DTSTART"))p[a.startTime]=this.dateParsing(e),p[a.isAllDay]=this.allDay,this.allDay=!1;else if(-1!==e.indexOf("DTEND"))p[a.endTime]=this.dateParsing(e);else if(-1!==e.indexOf("EXDATE"))g=i.i(r.f)(this.dateParsing(e)),p[a.recurrenceException]=i.i(n.isNullOrUndefined)(p[a.recurrenceException])?g:p[a.recurrenceException]+","+g;else if(-1!==e.indexOf("RECURRENCE-ID"))g=i.i(r.f)(this.dateParsing(e)),p[a.recurrenceException]=g,p[a.recurrenceID]=g;else switch(d=u||d){case"BEGIN":break;case"UID":p[""+u]=g,"number"==typeof s?(p[a.id]=parseInt(g,10),isNaN(p[a.id])&&(p[a.id]=s+c,c++)):p[a.id]=g;break;case"SUMMARY":p[a.subject]=this.getFormattedString(g);break;case"LOCATION":p[a.location]=this.getFormattedString(g);break;case"DESCRIPTION":p[a.description]?p[a.description]=this.getFormattedString(p[a.description]+"\r\n"+g):p[a.description]=this.getFormattedString(g);break;case"ISREADONLY":p[a.isReadonly]=g.indexOf("true")>-1;break;case"RRULE":p[a.recurrenceRule]=g;break;default:if(this.parent.resourceCollection.length>0){var v=this.parent.resourceCollection.filter(function(e){return e.field===u});p[""+u]=v.length>0&&"number"==typeof v[0].dataSource[0][v[0].idField]?parseInt(g,10):g}else p[""+u]=g}}return{isEvent:l,curEvent:p,id:s,count:c,events:o,key:d}},e.prototype.processOccurrence=function(e,t){var r=this,a=[],s=this.parent.eventFields,o=[];return this.parent.eventsData.forEach(function(e){o.push(e[s.id])}),e.forEach(function(l){var c,p;if(l.hasOwnProperty(s.recurrenceID)||(c=l,p=l[s.id]),o.indexOf(l[s.id])<0){var d=e.filter(function(e){return e.UID===l.UID});if(d.length>1&&i.i(n.isNullOrUndefined)(l[s.recurrenceID])){p="number"==typeof t?t++:p;for(var h=0;h<d.length;h++)if(d[parseInt(h.toString(),10)].hasOwnProperty(s.recurrenceID)){var u=d[parseInt(h.toString(),10)][s.recurrenceID];d[parseInt(h.toString(),10)][s.id]="number"==typeof t?t++:r.parent.eventBase.generateGuid(),d[parseInt(h.toString(),10)][s.recurrenceID]=p,d[parseInt(h.toString(),10)][s.recurrenceException]=null,c[s.recurrenceException]=r.getExcludeDateString(c[s.recurrenceException],u),delete d[parseInt(h.toString(),10)].UID,a.push(d[parseInt(h.toString(),10)])}delete c.UID,c[s.id]=p,a.push(c)}else l.hasOwnProperty(s.recurrenceID)||(delete l.UID,l[s.id]="number"==typeof t?t++:p,a.push(l))}}),a},e.prototype.getExcludeDateString=function(e,t){if(i.i(n.isNullOrUndefined)(e))return t;if(i.i(n.isNullOrUndefined)(t))return e;var r=e.split(",").map(function(e){return e.split("T")[0]}),a=t.split(",").map(function(e){return e.split("T")[0]});return r.filter(function(e){return a.indexOf(e)>-1}).length>0?e:e+","+t},e.prototype.getFormattedString=function(e){return e=e||"",e.replace(/\\\,/g,",").replace(/\\\;/g,";").replace(/\\[nN]/g,"\n").replace(/\\\\/g,"\\")},e.prototype.dateParsing=function(e){var t=e.split(":"),i=t[t.length-1],n=new Date(this.getFormattedString(i));if(e&&(e.indexOf("VALUE=DATE")>-1||e.indexOf("RECURRENCE-ID;TZID")>-1)){var r=/^(\d{4})(\d{2})(\d{2})$/.exec(i);null!==r&&(n=new Date(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10))),e.indexOf("DTSTART")>-1&&(this.allDay=!0)}var a=/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})(Z)?$/.exec(i);return null!==a&&(n="Z"===a[7]?new Date(Date.UTC(parseInt(a[1],10),parseInt(a[2],10)-1,parseInt(a[3],10),parseInt(a[4],10),parseInt(a[5],10),parseInt(a[6],10))):new Date(parseInt(a[1],10),parseInt(a[2],10)-1,parseInt(a[3],10),parseInt(a[4],10),parseInt(a[5],10),parseInt(a[6],10))),n},e.prototype.getModuleName=function(){return"iCalendarImport"},e.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var n=i(72),r=(i.n(n),i(0)),a=(i.n(r),function(){function e(e){this.parent=e}return e.prototype.initializeExcelExport=function(e){void 0===e&&(e={});var t,n=this.getExportColumns(e),a=e.fileName||"Schedule",s=e.exportType||"xlsx",o=e.includeOccurrences||!1;i.i(r.isNullOrUndefined)(e.separator)||","===e.separator||(t=e.separator);var l;l=e.customData?o?this.parent.eventBase.getProcessedEvents(e.customData):e.customData:o?this.parent.eventsProcessed:this.parent.eventsData,this.processWorkbook(n,a,s,l,t)},e.prototype.processWorkbook=function(e,t,a,s,o){var l=this,c=[],p=[],d=[];e.forEach(function(e,t){c.push({index:t+1,width:"Id"===e.name?50:150})});var h={fontSize:12,borders:{color:"#E0E0E0"},bold:!0};e.forEach(function(e,t){d.push({index:t+1,value:e.text,style:h})}),p.push({index:1,cells:d}),s.forEach(function(t,n){var a=[];e.forEach(function(e,n){var s={index:n+1,value:t[e.name]||""};if(e.name===l.parent.eventFields.startTime||e.name===l.parent.eventFields.endTime){var o={fontSize:12,numberFormat:"m/d/yyyy h:mm AM/PM"};s=i.i(r.extend)({},s,{style:o},!0)}a.push(s)}),p.push({index:n+2,cells:a})});var u=[{columns:c,rows:p}];new n.Workbook({worksheets:u},a,this.parent.locale,void 0,o).save(t+"."+a)},e.prototype.getExportColumns=function(e){var t=this,i=e.fieldsInfo||[];if(0===i.length){(e.fields||Object.keys(this.parent.eventFields).map(function(e){return t.parent.eventFields[""+e]})).forEach(function(e){i.push({name:e,text:e})})}return i},e.prototype.getModuleName=function(){return"excelExport"},e.prototype.destroy=function(){this.parent=null},e}())},function(e,t,i){"use strict";var n=i(54);i.d(t,"a",function(){return n.a});var r=i(55);i.d(t,"b",function(){return r.a});var a=i(56);i.d(t,"c",function(){return a.a});var s=i(58);i.d(t,"d",function(){return s.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return f});var n=i(0),r=(i.n(n),i(23)),a=i(35),s=i(16),o=i(33),l=i(34),c=i(31),p=i(28),d=i(9),h=i(37),u=i(36),g=i(29),v=i(2),f=function(){function e(e){this.parent=e}return e.prototype.print=function(e){i.i(n.isNullOrUndefined)(e)?this.printScheduler():this.printSchedulerWithModel(e)},e.prototype.printScheduler=function(){var e=this.parent.element.cloneNode(!0);e.id=this.parent.element.id+"_print",document.body.appendChild(e);for(var t="MonthAgenda"===this.parent.currentView?".e-appointment-wrap":".e-content-wrap",r=this.parent.element.querySelector(t),a=[].slice.call(document.getElementsByTagName("head")[0].querySelectorAll("link, style")),s="",o=0,l=a;o<l.length;o++){s+=l[o].outerHTML}var c=i.i(n.createElement)("div");e.style.width=this.parent.element.offsetWidth+"px";var p=100*Math.round(parseInt(e.style.width,10)/100);c.appendChild(e);var d=window.open("","print","height=550,width="+p+",tabbar=no");d.document.write("<!DOCTYPE html><html><head>"+s+"</head><body>"+c.innerHTML+"<script>(function() { window.ready = true; })();<\/script></body></html>"),d.document.close(),d.focus(),setTimeout(function(){if(d.ready&&r){r.scrollLeft=r.scrollLeft,r.scrollTop=r.scrollTop;var e=d.document.querySelector(".e-date-header-wrap");e&&(e.scrollLeft=r.scrollLeft);var i=d.document.querySelector(".e-time-cells-wrap");i&&(i.scrollTop=r.scrollTop);var n=d.document.querySelector(t);n&&(n.scrollLeft=r.scrollLeft,n.scrollTop=r.scrollTop),d.print(),d.close()}},500)},e.prototype.printSchedulerWithModel=function(e){var t=i.i(n.createElement)("div",{id:this.parent.element.id+"_print",className:"e-print-schedule"});document.body.appendChild(t),r.a.Inject(g.a,u.a,h.a,d.a,p.a,c.a,l.a,o.a,s.a,a.a),this.printInstance=new r.a(this.getPrintScheduleModel(e)),this.printInstance.isPrinting=!0,this.printInstance.appendTo(t),this.printInstance.on(v.D,this.contentReady,this),this.printWindow=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),this.printWindow.moveTo(0,0),this.printWindow.resizeTo(screen.availWidth,screen.availHeight)},e.prototype.getPrintScheduleModel=function(e){for(var t,r,a,s,o={},l=["agendaDaysCount","calendarMode","cssClass","currentView","dateFormat","enableRtl","endHour","eventSettings","firstDayOfWeek","firstMonthOfYear","group","height","locale","maxDate","minDate","readonly","resources","rowAutoHeight","selectedDate","showHeaderBar","showTimeIndicator","showWeekNumber","showWeekend","startHour","timeFormat","timeScale","timezone","views","width","workDays","workHours","dateHeaderTemplate","dateRangeTemplate","cellHeaderTemplate","dayHeaderTemplate","monthHeaderTemplate","cellTemplate","resourceHeaderTemplate","headerIndentTemplate","actionBegin","actionComplete","actionFailure","created","dataBinding","dataBound","destroyed","eventRendered","moreEventsClick","navigating","popupOpen","popupClose","renderCell"],c=["cellHeaderTemplate","dayHeaderTemplate","monthHeaderTemplate","cellTemplate","dateHeaderTemplate","dateRangeTemplate","eventTemplate","resourceHeaderTemplate","headerIndentTemplate"],p=["actionBegin","actionComplete","actionFailure","created","dataBinding","dataBound","destroyed","eventRendered","moreEventsClick","navigating","popupOpen","popupClose","renderCell"],d=0,h=l;d<h.length;d++){var u=h[d];switch(u){case"eventSettings":t=Object.assign({},this.parent.eventSettings.properties),t.dataSource=this.parent.eventsData;var g=i.i(n.isNullOrUndefined)(e.eventSettings)||i.i(n.isNullOrUndefined)(e.eventSettings.template)?t.template:e.eventSettings.template;t.template="function"==typeof g?null:g,o.eventSettings=t;break;case"group":r=i.i(n.isNullOrUndefined)(e.group)?this.parent.group:e.group,r.headerTooltipTemplate=null,o.group=r;break;case"timeScale":a=i.i(n.isNullOrUndefined)(e.timeScale)?this.parent.timeScale:e.timeScale,a.majorSlotTemplate="function"==typeof a.majorSlotTemplate?null:a.majorSlotTemplate,a.minorSlotTemplate="function"==typeof a.minorSlotTemplate?null:a.minorSlotTemplate,e.timeScale=a;break;case"views":if((s=i.i(n.isNullOrUndefined)(e.views)?this.parent.views:e.views)&&s.length>0&&"object"==typeof s[0])for(var v=0,f=s;v<f.length;v++){var m=f[v];!function(e){c.forEach(function(t){i.i(n.isNullOrUndefined)(e[""+t])||(e[""+t]="function"==typeof e[""+t]?null:e[""+t])})}(m)}o.views=s;break;default:if(c.indexOf(u)>-1){o[""+u]=i.i(n.isNullOrUndefined)(e[""+u])?"function"==typeof this.parent[""+u]?null:this.parent[""+u]:"function"==typeof e[""+u]?null:e[""+u];break}if(p.indexOf(u)>-1){o[""+u]=e[""+u];break}o[""+u]=i.i(n.isNullOrUndefined)(e[""+u])?this.parent[""+u]:e[""+u]}}return o},e.prototype.contentReady=function(){var e=this;this.printWindow=i.i(n.print)(this.printInstance.element,this.printWindow),this.printWindow.onbeforeunload=function(){e.printInstance.off(v.D,e.contentReady),e.printInstance.element.remove(),e.printInstance.destroy(),e.printInstance=null,e.printWindow=null}},e.prototype.getModuleName=function(){return"print"},e.prototype.destroy=function(){this.parent=null},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(0),r=(i.n(n),i(61)),a=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),s=this&&this.__decorate||function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),s([i.i(n.Property)()],t.prototype,"template",void 0),s([i.i(n.Property)([])],t.prototype,"dataSource",void 0),s([i.i(n.Property)()],t.prototype,"query",void 0),s([i.i(n.Complex)({},r.a)],t.prototype,"fields",void 0),s([i.i(n.Property)(!1)],t.prototype,"enableTooltip",void 0),s([i.i(n.Property)("AllDayRow")],t.prototype,"spannedEventPlacement",void 0),s([i.i(n.Property)(1)],t.prototype,"minimumEventDuration",void 0),s([i.i(n.Property)()],t.prototype,"tooltipTemplate",void 0),s([i.i(n.Property)()],t.prototype,"resourceColorField",void 0),s([i.i(n.Property)(!1)],t.prototype,"editFollowingEvents",void 0),s([i.i(n.Property)(!0)],t.prototype,"allowAdding",void 0),s([i.i(n.Property)(!0)],t.prototype,"allowEditing",void 0),s([i.i(n.Property)(!0)],t.prototype,"allowDeleting",void 0),s([i.i(n.Property)(!1)],t.prototype,"enableMaxHeight",void 0),s([i.i(n.Property)(!1)],t.prototype,"enableIndicator",void 0),s([i.i(n.Property)(!1)],t.prototype,"ignoreWhitespace",void 0),s([i.i(n.Property)()],t.prototype,"sortComparer",void 0),s([i.i(n.Property)()],t.prototype,"includeFiltersInQuery",void 0),t}(n.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(0),r=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}()),a=this&&this.__decorate||function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),a([i.i(n.Property)()],t.prototype,"name",void 0),a([i.i(n.Property)()],t.prototype,"default",void 0),a([i.i(n.Property)()],t.prototype,"title",void 0),a([i.i(n.Property)({})],t.prototype,"validation",void 0),t}(n.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(0),r=(i.n(n),i(60)),a=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),s=this&&this.__decorate||function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),s([i.i(n.Property)("Id")],t.prototype,"id",void 0),s([i.i(n.Property)("IsBlock")],t.prototype,"isBlock",void 0),s([i.i(n.Complex)({name:"Subject"},r.a)],t.prototype,"subject",void 0),s([i.i(n.Complex)({name:"StartTime"},r.a)],t.prototype,"startTime",void 0),s([i.i(n.Complex)({name:"EndTime"},r.a)],t.prototype,"endTime",void 0),s([i.i(n.Complex)({name:"StartTimezone"},r.a)],t.prototype,"startTimezone",void 0),s([i.i(n.Complex)({name:"EndTimezone"},r.a)],t.prototype,"endTimezone",void 0),s([i.i(n.Complex)({name:"Location"},r.a)],t.prototype,"location",void 0),s([i.i(n.Complex)({name:"Description"},r.a)],t.prototype,"description",void 0),s([i.i(n.Complex)({name:"IsAllDay"},r.a)],t.prototype,"isAllDay",void 0),s([i.i(n.Complex)({name:"RecurrenceID"},r.a)],t.prototype,"recurrenceID",void 0),s([i.i(n.Complex)({name:"RecurrenceRule"},r.a)],t.prototype,"recurrenceRule",void 0),s([i.i(n.Complex)({name:"RecurrenceException"},r.a)],t.prototype,"recurrenceException",void 0),s([i.i(n.Property)("IsReadonly")],t.prototype,"isReadonly",void 0),s([i.i(n.Property)("FollowingID")],t.prototype,"followingID",void 0),t}(n.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(0),r=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}()),a=this&&this.__decorate||function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),a([i.i(n.Property)(!1)],t.prototype,"byDate",void 0),a([i.i(n.Property)(!0)],t.prototype,"byGroupID",void 0),a([i.i(n.Property)(!1)],t.prototype,"allowGroupEdit",void 0),a([i.i(n.Property)([])],t.prototype,"resources",void 0),a([i.i(n.Property)(!0)],t.prototype,"enableCompactView",void 0),a([i.i(n.Property)()],t.prototype,"headerTooltipTemplate",void 0),a([i.i(n.Property)(!1)],t.prototype,"hideNonWorkingDays",void 0),t}(n.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(0),r=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}()),a=this&&this.__decorate||function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),a([i.i(n.Property)()],t.prototype,"option",void 0),a([i.i(n.Property)()],t.prototype,"template",void 0),t}(n.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(0),r=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}()),a=this&&this.__decorate||function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),a([i.i(n.Property)("Both")],t.prototype,"templateType",void 0),a([i.i(n.Property)()],t.prototype,"header",void 0),a([i.i(n.Property)()],t.prototype,"content",void 0),a([i.i(n.Property)()],t.prototype,"footer",void 0),t}(n.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(0),r=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}()),a=this&&this.__decorate||function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),a([i.i(n.Property)()],t.prototype,"field",void 0),a([i.i(n.Property)()],t.prototype,"title",void 0),a([i.i(n.Property)()],t.prototype,"name",void 0),a([i.i(n.Property)(!1)],t.prototype,"allowMultiple",void 0),a([i.i(n.Property)([])],t.prototype,"dataSource",void 0),a([i.i(n.Property)()],t.prototype,"query",void 0),a([i.i(n.Property)("Id")],t.prototype,"idField",void 0),a([i.i(n.Property)("Text")],t.prototype,"textField",void 0),a([i.i(n.Property)("Expanded")],t.prototype,"expandedField",void 0),a([i.i(n.Property)("GroupID")],t.prototype,"groupIDField",void 0),a([i.i(n.Property)("Color")],t.prototype,"colorField",void 0),a([i.i(n.Property)("StartHour")],t.prototype,"startHourField",void 0),a([i.i(n.Property)("EndHour")],t.prototype,"endHourField",void 0),a([i.i(n.Property)("WorkDays")],t.prototype,"workDaysField",void 0),a([i.i(n.Property)("CssClass")],t.prototype,"cssClassField",void 0),t}(n.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(0),r=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}()),a=this&&this.__decorate||function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),a([i.i(n.Property)(!0)],t.prototype,"enable",void 0),a([i.i(n.Property)(60)],t.prototype,"interval",void 0),a([i.i(n.Property)(2)],t.prototype,"slotCount",void 0),a([i.i(n.Property)()],t.prototype,"minorSlotTemplate",void 0),a([i.i(n.Property)()],t.prototype,"majorSlotTemplate",void 0),t}(n.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(0),r=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}()),a=this&&this.__decorate||function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),a([i.i(n.Property)("")],t.prototype,"id",void 0),a([i.i(n.Property)("")],t.prototype,"text",void 0),a([i.i(n.Property)("auto")],t.prototype,"width",void 0),a([i.i(n.Property)("")],t.prototype,"cssClass",void 0),a([i.i(n.Property)(!1)],t.prototype,"showAlwaysInPopup",void 0),a([i.i(n.Property)(!1)],t.prototype,"disabled",void 0),a([i.i(n.Property)("")],t.prototype,"prefixIcon",void 0),a([i.i(n.Property)("")],t.prototype,"suffixIcon",void 0),a([i.i(n.Property)(!0)],t.prototype,"visible",void 0),a([i.i(n.Property)("None")],t.prototype,"overflow",void 0),a([i.i(n.Property)("")],t.prototype,"template",void 0),a([i.i(n.Property)("Button")],t.prototype,"type",void 0),a([i.i(n.Property)("Both")],t.prototype,"showTextOn",void 0),a([i.i(n.Property)(null)],t.prototype,"htmlAttributes",void 0),a([i.i(n.Property)("")],t.prototype,"tooltipText",void 0),a([i.i(n.Property)("Left")],t.prototype,"align",void 0),a([i.i(n.Property)(-1)],t.prototype,"tabIndex",void 0),a([i.i(n.Property)("Custom")],t.prototype,"name",void 0),a([i.i(n.Event)()],t.prototype,"click",void 0),t}(n.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(0),r=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}()),a=this&&this.__decorate||function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),a([i.i(n.Property)(!0)],t.prototype,"highlight",void 0),a([i.i(n.Property)("09:00")],t.prototype,"start",void 0),a([i.i(n.Property)("18:00")],t.prototype,"end",void 0),t}(n.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return v});var n=i(0),r=(i.n(n),i(11)),a=(i.n(r),i(18)),s=(i.n(a),i(6)),o=(i.n(s),i(38)),l=(i.n(o),i(12)),c=(i.n(l),i(19)),p=(i.n(c),i(27)),d=i(20),h=i(3),u=i(2),g=i(1),v=function(){function e(e){this.parent=e,this.l10n=this.parent.localeObj,this.fields=this.parent.eventFields,this.eventWindowTime={startTime:new Date,endTime:new Date},this.renderEventWindow()}return e.prototype.renderEventWindow=function(){this.element=i.i(n.createElement)("div",{id:this.parent.element.id+"_dialog_wrapper"}),this.parent.element.appendChild(this.element);var e={animationSettings:{effect:"Zoom"},content:this.getEventWindowContent(),cssClass:h._149,enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,height:this.parent.isAdaptive?"100%":"auto",minHeight:"300px",isModal:!0,showCloseIcon:!this.parent.isAdaptive,target:document.body,visible:!1,width:"500px",beforeOpen:this.onBeforeOpen.bind(this),beforeClose:this.onBeforeClose.bind(this)};this.parent.isAdaptive?(e.cssClass=h._149+" "+h._84,this.parent.editorHeaderTemplate||(e.header='<div class="e-title-header"><div class="e-back-icon e-icons"></div><div class="e-title-text">'+this.l10n.getConstant("newEvent")+'</div><div class="e-save-icon e-icons"></div></div>')):(this.parent.editorFooterTemplate||this.renderDialogButtons(e),this.parent.editorHeaderTemplate||(e.header='<div class="e-title-text">'+this.l10n.getConstant("newEvent")+"</div>")),this.dialogObject=new s.Dialog(e,this.element),this.dialogObject.element.querySelector(".e-dlg-closeicon-btn")&&this.dialogObject.element.querySelector(".e-dlg-closeicon-btn").setAttribute("title",this.l10n.getConstant("close")),this.addEventHandlers(),i.i(n.addClass)([this.element.parentElement],h._149+"-container"),n.EventHandler.add(this.dialogObject.element,"keydown",this.preventEventSave,this),this.applyFormValidation()},e.prototype.renderDialogButtons=function(e){e.buttons=[{buttonModel:{content:this.l10n.getConstant("deleteButton"),cssClass:h._124,disabled:!this.parent.eventSettings.allowDeleting||this.parent.readonly},click:this.eventDelete.bind(this)},{buttonModel:{content:this.l10n.getConstant("saveButton"),cssClass:"e-primary "+h._150,isPrimary:!0,disabled:!this.parent.eventSettings.allowAdding||this.parent.readonly},click:this.eventSave.bind(this)},{buttonModel:{cssClass:h._144,content:this.l10n.getConstant("cancelButton")},click:this.dialogClose.bind(this)}]},e.prototype.addEventHandlers=function(){var e=this.element.querySelector("."+h._151),t=this.element.querySelector("."+h._152);!this.parent.isAdaptive||i.i(n.isNullOrUndefined)(e)||i.i(n.isNullOrUndefined)(t)||(n.EventHandler.add(e,"click",this.dialogClose,this),n.EventHandler.add(t,"click",this.eventSave,this))},e.prototype.refresh=function(){this.destroy(!0),this.renderEventWindow()},e.prototype.refreshRecurrenceEditor=function(){if(this.recurrenceEditor){var e=this.recurrenceEditor.element;this.recurrenceEditor.destroy(),this.createRecurrenceEditor(e)}},e.prototype.setRecurrenceEditor=function(e){this.parent.editorTemplate&&(this.recurrenceEditor=e)},e.prototype.openEditor=function(e,t,r,a){if(this.parent.currentAction=t,this.parent.removeNewEventElement(),this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(!0),this.parent.inlineModule.removeInlineAppointmentElement(),"Add"===t){var s={};this.cellClickAction=!r,this.parent.activeCellsData=e;var o=e;this.cellClickAction?this.convertToEventData(o,s):(this.parent.activeCellsData={startTime:o.startTime||o[this.fields.startTime],endTime:o.endTime||o[this.fields.endTime],isAllDay:o.isAllDay||o[this.fields.isAllDay],element:o.element,groupIndex:o.groupIndex},s=o),e=s}switch(i.i(n.isNullOrUndefined)(this.parent.editorHeaderTemplate)||(this.parent.resetTemplates(["editorHeaderTemplate"]),this.parent.isAdaptive&&!this.parent.editorFooterTemplate?this.dialogObject.header=this.createAdaptiveHeaderElement(e):this.dialogObject.header=this.getDialogHeader(e)),i.i(n.isNullOrUndefined)(this.parent.editorFooterTemplate)||(this.parent.resetTemplates(["editorFooterTemplate"]),this.dialogObject.footerTemplate=this.getDialogFooter(e)),i.i(n.isNullOrUndefined)(this.parent.editorHeaderTemplate)&&i.i(n.isNullOrUndefined)(this.parent.editorFooterTemplate)||(this.dialogObject.dataBind(),this.addEventHandlers()),i.i(n.isNullOrUndefined)(this.parent.editorTemplate)||this.renderFormElements(this.element.querySelector(".e-schedule-form"),e),!this.parent.isAdaptive&&i.i(n.isNullOrUndefined)(this.parent.editorTemplate)&&i.i(n.removeClass)([this.dialogObject.element.querySelector(".e-recurrenceeditor")],h.J),this.recurrenceEditor&&(this.recurrenceEditor.firstDayOfWeek=this.parent.activeViewOptions.firstDayOfWeek),t){case"Add":this.onCellDetailsUpdate(e,a);break;case"Save":case"EditOccurrence":case"EditSeries":case"EditFollowingEvents":"EditOccurrence"===t&&!this.parent.isAdaptive&&i.i(n.isNullOrUndefined)(this.parent.editorTemplate)&&i.i(n.addClass)([this.dialogObject.element.querySelector(".e-recurrenceeditor")],h.J),this.cellClickAction=!1,this.onEventDetailsUpdate(e)}},e.prototype.setDialogContent=function(){this.dialogObject.content=this.getEventWindowContent(),this.dialogObject.dataBind(),this.applyFormValidation()},e.prototype.setDialogHeader=function(){i.i(n.isNullOrUndefined)(this.parent.editorHeaderTemplate)?this.parent.isAdaptive?this.dialogObject.header='<div class="e-title-header"><div class="e-back-icon e-icons"></div><div class="e-title-text">'+this.l10n.getConstant("newEvent")+'</div><div class="e-save-icon e-icons"></div></div>':this.dialogObject.header='<div class="e-title-text">'+this.l10n.getConstant("newEvent")+"</div>":(this.parent.resetTemplates(["editorHeaderTemplate"]),this.parent.isAdaptive&&!this.parent.editorFooterTemplate?this.dialogObject.header=this.createAdaptiveHeaderElement():this.dialogObject.header=this.getDialogHeader()),this.dialogObject.dataBind(),this.addEventHandlers()},e.prototype.setDialogFooter=function(){i.i(n.isNullOrUndefined)(this.parent.editorFooterTemplate)?!this.parent.isAdaptive&&i.i(n.isNullOrUndefined)(this.parent.editorFooterTemplate)?this.renderDialogButtons(this.dialogObject):this.parent.isAdaptive&&i.i(n.isNullOrUndefined)(this.parent.editorFooterTemplate)&&(this.dialogObject.footerTemplate=null):(this.parent.resetTemplates(["editorFooterTemplate"]),this.dialogObject.footerTemplate=this.getDialogFooter()),this.dialogObject.dataBind()},e.prototype.createAdaptiveHeaderElement=function(e){var t=i.i(n.createElement)("div",{className:"e-title-header"}),r=i.i(n.createElement)("div",{className:"e-back-icon e-icons"});t.appendChild(r);var a=this.getDialogHeader(e);t.appendChild(a);var s=i.i(n.createElement)("div",{className:"e-save-icon e-icons"});return t.appendChild(s),t},e.prototype.getDialogHeader=function(e){var t=[],r=this.parent.element.id+"_editorHeaderTemplate",a=document.createElement("div");return t=[].slice.call(this.parent.getEditorHeaderTemplate()(e||{},this.parent,"editorHeaderTemplate",r,!1)),i.i(n.append)(t,a),a},e.prototype.getDialogFooter=function(e){var t=[],r=this.parent.element.id+"_editorFooterTemplate",a=document.createElement("div");return t=[].slice.call(this.parent.getEditorFooterTemplate()(e||{},this.parent,"editorFooterTemplate",r,!1)),i.i(n.append)(t,a),a},e.prototype.preventEventSave=function(e){this.parent&&!this.parent.allowKeyboardInteraction&&"Enter"===e.code&&(this.isEnterKey=!0)},e.prototype.onBeforeOpen=function(e){var t=this,a=this.eventData[this.fields.endTime].getTime(),s={type:"Editor",data:this.eventData,cancel:!1,element:this.element,target:this.cellClickAction?this.parent.activeCellsData.element:this.parent.activeEventData.element};this.cellClickAction&&(s.duration=this.getSlotDuration());var o=this.getInstance(h._150);o&&(o.disabled=!(this.cellClickAction?this.parent.eventSettings.allowAdding:this.parent.eventSettings.allowEditing),o.dataBind());var l=this.getInstance(h._124);l&&(l.disabled=!this.parent.eventSettings.allowDeleting,l.dataBind());var c=new r.Deferred;return this.parent.trigger(u.p,s,function(r){if(e.cancel=r.cancel,t.duration=t.cellClickAction?r.duration:null,t.eventData[t.fields.endTime].getTime()!==a||t.cellClickAction||0!==t.eventData[t.fields.endTime].getHours()||0!==t.eventData[t.fields.endTime].getMinutes()||(t.eventData=i.i(n.extend)({},t.eventData,null,!0),t.trimAllDay(t.eventData)),t.refreshDateTimePicker(t.duration),t.cellClickAction&&r.duration!==t.getSlotDuration()&&i.i(n.isNullOrUndefined)(t.parent.editorTemplate)){var s=t.getInstance(h._153),o=t.getInstance(h._154);o.value=new Date(s.value.getTime()+g.g*r.duration),o.dataBind()}t.parent.editorTemplate&&t.element.querySelector(".e-recurrenceeditor")&&!t.recurrenceEditor&&(t.recurrenceEditor=t.getInstance("e-recurrenceeditor")),c.resolve(e)}),c},e.prototype.onBeforeClose=function(e){var t=this;e.isInteracted&&(this.isCrudAction=!1);var i={type:"Editor",event:e.event||this.dialogEvent,data:this.eventCrudData,cancel:!1,element:this.element,target:this.cellClickAction?this.parent.activeCellsData.element:this.parent.activeEventData.element},n=new r.Deferred;return this.parent.trigger(u.q,i,function(i){e.cancel=i.cancel,i.cancel||(t.isCrudAction&&(e.cancel=t.processCrudActions(i.data),t.isCrudAction=e.cancel),t.isCrudAction||(t.resetForm(),t.parent.eventBase.focusElement(!0),t.eventCrudData=null)),n.resolve(e)}),n},e.prototype.getEventWindowContent=function(){var e=i.i(n.createElement)("div",{className:h._155}),t=i.i(n.createElement)("form",{id:this.parent.element.id+"EditForm",className:h._109,attrs:{onsubmit:"return false;"}});return this.renderFormElements(t),e.appendChild(t),e},e.prototype.renderFormElements=function(e,t){var r=this;if(i.i(n.isNullOrUndefined)(this.parent.editorTemplate))e.appendChild(this.getDefaultEventWindowContent());else{if(t){this.fieldValidator&&(this.fieldValidator.destroy(),this.fieldValidator=null),this.recurrenceEditor&&(this.recurrenceEditor.destroy(),this.recurrenceEditor=null),this.destroyComponents();for(var a=[].slice.call(e.children),s=0,o=a;s<o.length;s++){var l=o[s];i.i(n.remove)(l)}this.parent.resetTemplates(["editorTemplate"])}var c=this.parent.element.id+"_editorTemplate",p=[].slice.call(this.parent.getEditorTemplate()(t||{},this.parent,"editorTemplate",c,!1));i.i(n.append)(p,e),this.parent.renderTemplates(function(){r.element&&(r.applyFormValidation(),r.eventCrudData&&(r.showDetails(r.eventCrudData),r.eventCrudData=null))})}},e.prototype.getDefaultEventWindowContent=function(){var e=this.createDivElement(h._156),t=this.createDivElement(h._157);e.appendChild(t),t.appendChild(this.renderTextBox(h.H)),t.appendChild(this.renderTextBox(h.K));var r=this.createDivElement(h._158);e.appendChild(r),r.appendChild(this.renderDateTimePicker(h._153,this.onTimeChange.bind(this))),r.appendChild(this.renderDateTimePicker(h._154));var s=this.createDivElement(h._159);e.appendChild(s),s.appendChild(this.renderCheckBox(h._160)),s.appendChild(this.renderCheckBox(h._137));var o=this.createDivElement(h._161);e.appendChild(o),o.appendChild(this.renderDropDown(h._162)),o.appendChild(this.renderDropDown(h._163));var l=this.createDivElement(h._164);e.appendChild(l);var c=this.renderCheckBox(h._165),p=i.i(n.createElement)("span",{className:"e-recurrence-container"}),d=i.i(n.createElement)("button",{className:"e-recurrence-edit-button",attrs:{type:"button",title:this.l10n.getConstant("editRecurrence")}});if(this.buttonObj=new a.Button({iconCss:"e-recurrence-edit e-icons",cssClass:"e-medium "+this.parent.cssClass}),p.appendChild(d),this.buttonObj.appendTo(d),c.appendChild(p),l.appendChild(c),this.parent.isAdaptive?n.EventHandler.add(d,"click",this.loadRecurrenceEditor,this):this.createRecurrenceEditor(e),this.parent.resourceCollection.length>0){for(var u=this.createDivElement(h._166),g=0,v=this.parent.resourceBase.resourceCollection;g<v.length;g++){var f=v[g];u.appendChild(this.renderResourceDetails(f))}e.appendChild(u)}var m=this.createDivElement(h._140+"-row");m.appendChild(this.renderTextBox(h._140)),e.appendChild(m);var y=i.i(n.createElement)("button",{attrs:{type:"hidden",title:"submit",style:"display:none"}});return e.appendChild(y),e},e.prototype.createRecurrenceEditor=function(e){var t=i.i(n.createElement)("div",{id:this.parent.element.id+"_recurrence_editor"});e.appendChild(t),this.recurrenceEditor=this.renderRecurrenceEditor(),this.recurrenceEditor.appendTo(t),this.updateMinMaxDateToEditor()},e.prototype.createDivElement=function(e){return i.i(n.createElement)("div",{className:e})},e.prototype.createInputElement=function(e,t,r){return i.i(n.createElement)(r||"input",{className:e,attrs:{type:"text",name:t,value:"",id:t}})},e.prototype.getSlotDuration=function(){return this.parent.activeViewOptions.timeScale.interval/this.parent.activeViewOptions.timeScale.slotCount},e.prototype.renderDateTimePicker=function(e,t){var r=this.createDivElement(e+"-container"),a=this.getFieldName(e),s=this.createInputElement(e+" e-field",a);return r.appendChild(s),new c.DateTimePicker({change:t,firstDayOfWeek:this.parent.activeViewOptions.firstDayOfWeek,calendarMode:this.parent.calendarMode,min:this.parent.minDate,max:new Date(new Date(+this.parent.maxDate).setHours(23,59,59)),cssClass:this.parent.cssClass,enableRtl:this.parent.enableRtl,locale:this.parent.locale,floatLabelType:"Always",strictMode:!0,timeFormat:this.parent.activeViewOptions.timeFormat,format:(i.i(n.isNullOrUndefined)(this.parent.dateFormat)?this.getFormat("dateFormats"):this.parent.dateFormat)+" "+this.parent.activeViewOptions.timeFormat,placeholder:this.getFieldLabel(e),step:this.getSlotDuration(),width:"100%"}).appendTo(s),r},e.prototype.refreshDateTimePicker=function(e){for(var t="."+h._153+",."+h._154,i=[].slice.call(this.element.querySelectorAll(t)),n=0,r=i;n<r.length;n++){var a=r[n],s=a.ej2_instances[0];s.firstDayOfWeek=this.parent.activeViewOptions.firstDayOfWeek,s.timeFormat=this.parent.activeViewOptions.timeFormat,s.step=e||this.getSlotDuration(),s.dataBind()}},e.prototype.onTimeChange=function(){var e=this.getInstance(h._153);if(e.element.parentElement.classList.contains("e-input-focus")){var t=this.getInstance(h._154),r=0;this.cellClickAction?(r=g.g*this.duration,this.eventWindowTime.startTime=e.value):r=this.eventData[this.fields.endTime].getTime()-this.eventData[this.fields.startTime].getTime();var a=i.i(n.isNullOrUndefined)(e.value)?null:new Date(e.value.getTime()+r);this.cellClickAction&&(this.eventWindowTime.endTime=a),t.value=a,t.dataBind()}this.recurrenceEditor&&this.recurrenceEditor.updateRuleUntilDate(this.eventWindowTime.startTime)},e.prototype.renderResourceDetails=function(e){var t=e.field,r="e-"+t,a=e.title,s=this.createDivElement(r+"-container e-resources"),l=this.createInputElement(r+" e-field",t);s.appendChild(l);var c=function(t){return n.SanitizeHtmlHelper.sanitize('<div class="e-resource-template"><div class="e-resource-color" style="background-color:'+t[e.colorField]+'"></div><div class="e-resource-text">'+t[e.textField]+"</div></div>")};if(i.i(n.initializeCSPTemplate)(c,e),e.allowMultiple){new o.MultiSelect({enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,cssClass:this.parent.cssClass||"",dataSource:e.dataSource,change:this.onMultiselectResourceChange.bind(this),itemTemplate:c,fields:{text:e.textField,value:e.idField},htmlAttributes:{name:t},floatLabelType:"Always",placeholder:a,popupHeight:"230px",popupWidth:"447px",mode:"Box"}).appendTo(l)}else{new o.DropDownList({cssClass:this.parent.cssClass||"",change:this.onDropdownResourceChange.bind(this),dataSource:e.dataSource,enableRtl:this.parent.enableRtl,fields:{text:e.textField,value:e.idField},htmlAttributes:{name:t},floatLabelType:"Always",placeholder:a,popupHeight:"230px",popupWidth:"447px",itemTemplate:c}).appendTo(l)}return s},e.prototype.renderDropDown=function(e){var t=this,i=this.getFieldName(e),n=this.createDivElement(e+"-container"),a=this.createInputElement(e+" e-field",i);return n.appendChild(a),new o.DropDownList({allowFiltering:!0,change:this.onTimezoneChange.bind(this),cssClass:this.parent.cssClass||"",dataSource:this.parent.timezoneDataSource,enableRtl:this.parent.enableRtl,fields:{text:"Text",value:"Value"},filterBarPlaceholder:this.parent.localeObj.getConstant("searchTimezone"),noRecordsTemplate:this.parent.localeObj.getConstant("noRecords"),filtering:function(e){var i=new r.Query;i=""!==e.text?i.where("Text","contains",e.text,!0):i,e.updateData(t.parent.timezoneDataSource,i)},htmlAttributes:{title:this.getFieldLabel(e),name:i},floatLabelType:"Always",placeholder:this.getFieldLabel(e),popupHeight:"230px"}).appendTo(a),n},e.prototype.onMultiselectResourceChange=function(e){if(e.value&&this.parent.activeViewOptions.group.byGroupID&&!(this.parent.resourceCollection.length<=1))for(var t=this.parent.resourceBase.resourceCollection,r=e.element.getAttribute("name")||this.getColumnName(e.element),a=0;a<t.length;a++)if(t[parseInt(a.toString(),10)].field===r&&a<t.length-1){for(var s=this.createInstance(a),o=[],l=this,c=0;c<e.value.length;c++)!function(r){var s=t[a+1],c=s.dataSource.filter(function(t){return t[s.groupIDField]===e.value[parseInt(r.toString(),10)]})[0],p=i.i(n.isNullOrUndefined)(c)?null:c[t[a+1].groupIDField],d=l.filterDatasource(a,p);o=o.concat(d)}(c);s.dataSource=o,s.dataBind()}},e.prototype.createInstance=function(e){var t=this.parent.resourceBase.resourceCollection[e+1],i=this.element.querySelector(".e-"+t.field).ej2_instances[0];return i.clear(),i},e.prototype.onDropdownResourceChange=function(e){if(e.value&&!(this.parent.resourceCollection.length<=1)&&this.parent.activeViewOptions.group.byGroupID)for(var t=e.element.getAttribute("name")||this.getColumnName(e.element),i=this.parent.resourceBase.resourceCollection,n=0;n<i.length;n++)if(n<i.length-1&&i[parseInt(n.toString(),10)].field===t){var r=this.createInstance(n),a=e.itemData[i[parseInt(n.toString(),10)].idField];r.dataSource=this.filterDatasource(n,a),r.dataBind();var s=r.dataSource.length>0?r.dataSource[0][i[n+1].idField]:null;r.value=i[n+1].allowMultiple?[s]:s,r.dataBind()}},e.prototype.filterDatasource=function(e,t){var i=this.parent.resourceBase.resourceCollection[e+1];return i.dataSource.filter(function(e){return e[i.groupIDField]===t})},e.prototype.onTimezoneChange=function(e){if((e.element.getAttribute("name")||this.getColumnName(e.element))===this.parent.eventFields.startTimezone){var t=this.getInstance(h._162),i=this.getInstance(h._163);i.value=t.value,i.dataBind()}},e.prototype.renderCheckBox=function(e){var t=this.createDivElement(e+"-container"),i=this.getFieldName(e),n=this.createInputElement(e+" e-field",i);t.appendChild(n);var r=new a.CheckBox({change:this.onChange.bind(this),cssClass:e+" "+this.parent.cssClass,enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,label:this.getFieldLabel(e)});return r.appendTo(n),n.setAttribute("name",i),"Repeat"===i&&(this.repeatStatus=r),t},e.prototype.renderTextBox=function(e){var t=this.createDivElement(e+"-container"),i=this.getFieldName(e),n=e===h._140?"textarea":"input",r=this.createInputElement(e+" e-field",i,n);return t.appendChild(r),l.Input.createInput({element:r,floatLabelType:"Always",properties:{enableRtl:this.parent.enableRtl,placeholder:this.getFieldLabel(e)}}),t},e.prototype.getFieldName=function(e){var t="";switch(e){case h.H:t=this.fields.subject;break;case h.K:t=this.fields.location;break;case h._153:t=this.fields.startTime;break;case h._154:t=this.fields.endTime;break;case h._140:t=this.fields.description;break;case h._160:t=this.fields.isAllDay;break;case h._162:t=this.fields.startTimezone;break;case h._163:t=this.fields.endTimezone;break;case h._137:t="Timezone";break;case h._165:t="Repeat"}return t},e.prototype.getFieldLabel=function(e){var t="";switch(e){case h.H:t=this.parent.editorTitles.subject;break;case h.K:t=this.parent.editorTitles.location;break;case h._140:t=this.parent.editorTitles.description;break;case h._153:t=this.parent.editorTitles.startTime;break;case h._154:t=this.parent.editorTitles.endTime;break;case h._162:t=this.parent.editorTitles.startTimezone;break;case h._163:t=this.parent.editorTitles.endTimezone;break;case h._165:t=this.parent.editorTitles.recurrenceRule;break;case h._160:t=this.parent.editorTitles.isAllDay;break;case h._137:t=this.l10n.getConstant("timezone")}return t},e.prototype.onChange=function(e){if(e.event&&e.event.target){var t="."+h._160+",."+h._137+",."+h._165,r=i.i(n.closest)(e.event.target,t);r.classList.contains(h._160)?this.onAllDayChange(e.checked):r.classList.contains(h._137)?this.timezoneChangeStyle(e.checked):r.classList.contains(h._165)&&this.onRepeatChange(e.checked)}},e.prototype.renderRepeatDialog=function(){var e=i.i(n.createElement)("div");this.repeatDialogObject=new s.Dialog({header:this.l10n.getConstant("recurrence"),visible:!1,content:'<div class="e-rec-editor"></div>',closeOnEscape:!0,width:"90%",buttons:[{click:this.repeatSaveDialog.bind(this),buttonModel:{content:this.l10n.getConstant("save"),cssClass:"e-save",isPrimary:!0}},{click:this.repeatCancelDialog.bind(this),buttonModel:{cssClass:"e-cancel",content:this.l10n.getConstant("cancel")}}],target:this.element,animationSettings:{effect:"Zoom"},enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,isModal:!0,cssClass:"e-recurrence-dialog",open:this.repeatOpenDialog.bind(this)}),this.element.appendChild(e),this.repeatDialogObject.appendTo(e),this.createRecurrenceEditor(this.repeatDialogObject.element.querySelector(".e-rec-editor"))},e.prototype.loadRecurrenceEditor=function(){this.repeatDialogObject.show(),this.recurrenceEditor&&this.repeatRule&&this.recurrenceEditor.setRecurrenceRule(this.repeatRule)},e.prototype.onRepeatChange=function(e){if(e)this.repeatDialogObject||this.renderRepeatDialog(),this.recurrenceEditor.setProperties({startDate:this.repeatStartDate,selectedType:0}),this.loadRecurrenceEditor();else{this.repeatDialogObject&&this.repeatDialogObject.hide(),this.repeatRule="",this.recurrenceEditor&&(this.recurrenceEditor.setRecurrenceRule(this.repeatRule),this.updateRepeatLabel(this.repeatRule));var t=this.element.querySelector(".e-recurrence-container");i.i(n.addClass)([t],"e-hide")}},e.prototype.repeatSaveDialog=function(){this.repeatRule=this.recurrenceEditor.getRecurrenceRule();var e=this.element.querySelector(".e-recurrence-container");this.recurrenceEditor.getRecurrenceRule()?i.i(n.removeClass)([e],"e-hide"):(i.i(n.addClass)([e],"e-hide"),this.repeatStatus.setProperties({checked:!1})),this.updateRepeatLabel(this.repeatRule),this.closeRepeatDialog()},e.prototype.closeRepeatDialog=function(){this.repeatDialogObject.hide()},e.prototype.repeatCancelDialog=function(){this.closeRepeatDialog(),this.recurrenceEditor&&this.recurrenceEditor.setRecurrenceRule(this.repeatTempRule),this.repeatTempRule||this.repeatStatus.setProperties({checked:!1})},e.prototype.repeatOpenDialog=function(){this.repeatTempRule=this.recurrenceEditor.getRecurrenceRule()},e.prototype.onCellDetailsUpdate=function(e,t){if(this.parent.eventSettings.allowAdding){this.parent.isAdaptive&&t&&!this.repeatDialogObject&&this.renderRepeatDialog(),this.element.querySelector("."+h._109).removeAttribute("data-id"),i.i(n.isNullOrUndefined)(this.parent.editorHeaderTemplate)&&(this.element.querySelector("."+h._167).innerHTML=this.l10n.getConstant("newEvent")),e.Timezone=!1,this.repeatStartDate=e[this.fields.startTime],this.repeatRule="",i.i(n.isNullOrUndefined)(this.parent.eventSettings.fields.subject.default)||(e[this.fields.subject]=this.parent.eventSettings.fields.subject.default),i.i(n.isNullOrUndefined)(this.parent.eventSettings.fields.location.default)||(e[this.fields.location]=this.parent.eventSettings.fields.location.default),i.i(n.isNullOrUndefined)(this.parent.eventSettings.fields.description.default)||(e[this.fields.description]=this.parent.eventSettings.fields.description.default),this.showDetails(e),e[this.fields.recurrenceRule]&&this.recurrenceEditor&&(this.recurrenceEditor.setRecurrenceRule(e[this.fields.recurrenceRule],e[this.fields.startTime]),this.repeatRule=e[this.fields.recurrenceRule]);var r=this.element.querySelector("."+h._124);if(r&&i.i(n.addClass)([r],h.J),this.recurrenceEditor&&(this.recurrenceEditor.setProperties({startDate:e[this.fields.startTime],selectedType:i.i(n.isNullOrUndefined)(t)?i.i(n.isNullOrUndefined)(e[this.fields.recurrenceRule])?0:this.recurrenceEditor.selectedType:t}),this.repeatRule=this.recurrenceEditor.value),this.parent.isAdaptive&&i.i(n.isNullOrUndefined)(this.parent.editorTemplate)){var a=this.element.querySelector(".e-recurrence-container");e[this.fields.recurrenceRule]||t?(i.i(n.removeClass)([a],"e-hide"),this.repeatStatus.setProperties({checked:!0})):(i.i(n.addClass)([a],"e-hide"),this.repeatStatus.setProperties({checked:!1})),this.updateRepeatLabel(this.repeatRule)}else{var s=this.element.querySelector("."+h._150);this.disableButton(s,!1)}this.dialogObject.show()}},e.prototype.convertToEventData=function(e,t){e.subject&&(t[this.fields.subject]=e.subject),t[this.fields.startTime]=e.startTime,t[this.fields.endTime]=e.endTime,t[this.fields.isAllDay]=e.isAllDay,e.RecurrenceRule&&(t[this.fields.recurrenceRule]=e.RecurrenceRule),(this.parent.resourceCollection.length>0||this.parent.activeViewOptions.group.resources.length>0)&&this.parent.resourceBase.setResourceValues(t)},e.prototype.applyFormValidation=function(){var e=this.element.querySelector("."+h._109);if(e){var t=function(e){return e&&Object.keys(e).length>0?e:void 0},r={},a=t(this.parent.eventSettings.fields.subject.validation);i.i(n.isNullOrUndefined)(a)||(r[this.parent.eventSettings.fields.subject.name]=a);var s=t(this.parent.eventSettings.fields.location.validation);i.i(n.isNullOrUndefined)(s)||(r[this.parent.eventSettings.fields.location.name]=s);var o=t(this.parent.eventSettings.fields.startTime.validation);i.i(n.isNullOrUndefined)(o)||(r[this.parent.eventSettings.fields.startTime.name]=o);var l=t(this.parent.eventSettings.fields.endTime.validation);i.i(n.isNullOrUndefined)(l)||(r[this.parent.eventSettings.fields.endTime.name]=l);var c=t(this.parent.eventSettings.fields.description.validation);i.i(n.isNullOrUndefined)(c)||(r[this.parent.eventSettings.fields.description.name]=c),this.fieldValidator=new p.a,this.fieldValidator.renderFormValidator(e,r,this.element,this.parent.locale)}},e.prototype.showDetails=function(e){this.eventData=this.eventCrudData?this.eventData:e;var t=i.i(n.extend)({},e,null,!0),r=this.getFormElements(h._149);if(this.parent.isReact&&r.length<1&&!this.cellClickAction)return void(this.eventCrudData=t);this.cellClickAction&&(!this.cellClickAction||i.i(n.isNullOrUndefined)(this.parent.editorTemplate))||0!==t[this.fields.endTime].getHours()||0!==t[this.fields.endTime].getMinutes()||this.trimAllDay(t);for(var a=Object.keys(t),s=0,o=r;s<o.length;s++){var l=o[s],c=l.name||this.getColumnName(l);i.i(n.isNullOrUndefined)(c)||""===c||(-1!==a.indexOf(c)?this.setValueToElement(l,t[""+c]):this.setDefaultValueToElement(l))}if(i.i(n.isNullOrUndefined)(this.parent.editorTemplate)){this.onAllDayChange(t[this.fields.isAllDay]);var p=this.getInstance(h._137+".e-field");i.i(n.isNullOrUndefined)(t[this.fields.startTimezone])&&i.i(n.isNullOrUndefined)(t[this.fields.endTimezone])||(p.checked=!0,p.dataBind()),this.timezoneChangeStyle(p.checked),delete t.Timezone}},e.prototype.getColumnName=function(e){var t=e.getAttribute("data-name")||"";if(""===t){var r=!1,a="";e.classList.contains("e-dropdownlist")?(a="e-ddl",r=!0):e.classList.contains("e-multiselect")?(a="e-multiselect",r=!0):e.classList.contains("e-datetimepicker")?a="e-datetimepicker":e.classList.contains("e-datepicker")?a="e-datepicker":e.classList.contains("e-checkbox")&&(a="e-checkbox");var s=r?"."+a+":not(.e-control)":"."+a,o=i.i(n.closest)(e,s)||e.querySelector("."+a);if(o){var l=o.querySelector("[name]");l&&(t=l.name)}}return t},e.prototype.onAllDayChange=function(e){var t,r=this.getInstance(h._153),a=this.getInstance(h._154),s=this.element.querySelector(".e-time-zone-container");e?(t=i.i(n.isNullOrUndefined)(this.parent.dateFormat)?this.getFormat("dateFormats"):this.parent.dateFormat,i.i(n.addClass)(this.element.querySelectorAll(".e-time-icon"),h._168),i.i(n.addClass)([s],h.J),this.element.querySelector("."+h._161)&&i.i(n.removeClass)([this.element.querySelector("."+h._161)],h._169),r.format=a.format=t):(t=i.i(n.isNullOrUndefined)(this.parent.dateFormat)?this.getFormat("dateFormats")+" "+this.parent.activeViewOptions.timeFormat:this.parent.dateFormat+" "+this.parent.activeViewOptions.timeFormat,i.i(n.removeClass)(this.element.querySelectorAll(".e-time-icon"),h._168),i.i(n.removeClass)([s],h.J),this.element.querySelector(".e-checkbox-wrapper .e-time-zone").checked&&i.i(n.addClass)([this.element.querySelector("."+h._161)],h._169),r.format=a.format=t),this.cellClickAction&&this.updateDateTime(e,r,a),r.dataBind(),a.dataBind(),i.i(n.isNullOrUndefined)(this.recurrenceEditor)||this.recurrenceEditor.updateRuleUntilDate(r.value)},e.prototype.updateDateTime=function(e,t,i){var n,r;if(e)if(n=g.b(new Date(this.eventWindowTime.startTime.getTime())),this.parent.activeCellsData.isAllDay){var a=g.d(new Date(this.eventWindowTime.endTime.getTime()),-1).getTime();r=+this.eventWindowTime.startTime>a?this.eventWindowTime.endTime:new Date(a)}else r=g.b(new Date(this.eventWindowTime.endTime.getTime()));else{var s=this.parent.activeCellsData.startTime;if(n=new Date(this.eventWindowTime.startTime.getTime()),n.setHours(s.getHours(),s.getMinutes(),s.getSeconds()),this.parent.activeCellsData.isAllDay){var o=this.parent.getStartEndTime(this.parent.workHours.start);n.setHours(o.getHours(),o.getMinutes(),o.getSeconds()),r=new Date(n.getTime()),r.setMilliseconds(g.g*this.getSlotDuration())}else r=new Date(n.getTime()),r.setMilliseconds(this.parent.activeCellsData.endTime.getTime()-this.parent.activeCellsData.startTime.getTime())}this.eventWindowTime={startTime:new Date(n.getTime()),endTime:new Date(r.getTime())},t.value=n,i.value=r,t.dataBind(),i.dataBind()},e.prototype.getFormat=function(e){return"en"===this.parent.locale||"en-US"===this.parent.locale?i.i(n.getValue)(e+".short",i.i(n.getDefaultDateObject)(this.parent.getCalendarMode())):i.i(n.getValue)("main."+this.parent.locale+".dates.calendars."+this.parent.getCalendarMode()+"."+e+".short",n.cldrData)},e.prototype.onEventDetailsUpdate=function(e){if(this.parent.eventSettings.allowEditing){if(!this.parent.isAdaptive&&i.i(n.isNullOrUndefined)(this.parent.editorFooterTemplate)&&i.i(n.removeClass)([this.element.querySelector("."+h._124)],h.J),i.i(n.isNullOrUndefined)(this.parent.editorHeaderTemplate)&&(this.element.querySelector("."+h._167).innerHTML=this.l10n.getConstant("editEvent")),this.element.querySelector("."+h._109).setAttribute("data-id",e[this.fields.id].toString()),i.i(n.isNullOrUndefined)(this.parent.editorTemplate)){e=i.i(n.extend)({},e,null,!0);var t=this.getInstance(h._137+".e-field"),r=void 0;e[this.fields.startTimezone]||e[this.fields.endTimezone]?(r=!0,this.parent.eventBase.timezoneConvert(e)):r=!1,e.Timezone=r,t.checked=r,t.dataBind()}if(this.showDetails(e),e[this.fields.recurrenceRule]&&this.recurrenceEditor?this.recurrenceEditor.setRecurrenceRule(e[this.fields.recurrenceRule],e[this.fields.startTime]):!this.parent.isAdaptive&&this.recurrenceEditor&&(this.recurrenceEditor.setProperties({startDate:e[this.fields.startTime]}),this.recurrenceEditor.setRecurrenceRule("")),this.repeatStartDate=e[this.fields.startTime],this.repeatRule="",e[this.fields.recurrenceRule]&&(this.recurrenceEditor&&this.recurrenceEditor.setRecurrenceRule(e[this.fields.recurrenceRule],e[this.fields.startTime]),this.repeatRule=e[this.fields.recurrenceRule]),this.parent.isAdaptive&&i.i(n.isNullOrUndefined)(this.parent.editorTemplate)){var a=this.element.querySelector(".e-recurrence-container");e[this.fields.recurrenceRule]?(i.i(n.removeClass)([a],"e-hide"),this.repeatStatus.setProperties({checked:!0})):(i.i(n.addClass)([a],"e-hide"),this.repeatStatus.setProperties({checked:!1})),this.updateRepeatLabel(this.repeatRule)}var s=this.parent.readonly||e[this.fields.isReadonly];if(this.parent.isAdaptive){var o=this.element.querySelector("."+h._152);o&&(s?i.i(n.addClass)([o],h._170):i.i(n.removeClass)([o],h._170))}else{var l=this.element.querySelector("."+h._150),c=this.element.querySelector("."+h._124);this.disableButton(l,s),this.disableButton(c,s)}this.dialogObject.show()}},e.prototype.disableButton=function(e,t){e&&(e.ej2_instances[0].disabled=t)},e.prototype.renderRecurrenceEditor=function(){return new d.a({calendarMode:this.parent.calendarMode,cssClass:this.parent.cssClass,dateFormat:this.parent.dateFormat,enableRtl:this.parent.enableRtl,firstDayOfWeek:this.parent.activeViewOptions.firstDayOfWeek,locale:this.parent.locale})},e.prototype.updateMinMaxDateToEditor=function(){var e=this.element.querySelector(".e-start"),t=this.element.querySelector(".e-end");if(e&&t){var i=e.ej2_instances[0],n=t.ej2_instances[0];i.min=this.parent.minDate,i.max=this.parent.maxDate,n.min=this.parent.minDate,n.max=this.parent.maxDate,i.dataBind(),n.dataBind()}if(this.recurrenceEditor){var r=this.recurrenceEditor.element.querySelector(".e-until-date");if(r){var a=r.ej2_instances[0];a.min=this.parent.minDate,a.max=this.parent.maxDate,a.dataBind()}}},e.prototype.updateRepeatLabel=function(e){this.parent.isAdaptive&&!this.repeatDialogObject&&this.renderRepeatDialog();var t=e?this.l10n.getConstant("repeats")+" "+this.recurrenceEditor.getRuleSummary(e):this.l10n.getConstant("repeat");this.repeatStatus.setProperties({label:t})},e.prototype.dialogClose=function(e){if(this.isEnterKey)return void(this.isEnterKey=!1);this.dialogEvent=e,this.isCrudAction=!1,this.parent.activeEventData={event:void 0,element:void 0},this.parent.currentAction=null,this.dialogObject.hide()},e.prototype.resetForm=function(){this.fieldValidator.destroyToolTip(),this.resetFormFields(),this.parent.isAdaptive||!this.recurrenceEditor||this.recurrenceEditor.isDestroyed||this.recurrenceEditor.resetFields()},e.prototype.timezoneChangeStyle=function(e){var t=this.element.querySelector("."+h._161),r=this.parent.tzModule.getLocalTimezoneName();if(e){i.i(n.addClass)([t],h._169);var a=this.getInstance(h._162),s=this.getInstance(h._163),o=a.dataSource;if(!a.value||!this.parent.timezone){o.some(function(e){return e.Value===r})||(o.push({Value:r,Text:r}),a.dataSource=o,s.dataSource=o,a.dataBind(),s.dataBind())}a.value=a.value||this.parent.timezone||r,s.value=s.value||this.parent.timezone||r,a.dataBind(),s.dataBind()}else i.i(n.removeClass)([t],h._169)},e.prototype.resetFormFields=function(){for(var e=this.getFormElements(h._149),t=0,r=e;t<r.length;t++){var a=r[t],s=a.name||this.getColumnName(a);i.i(n.isNullOrUndefined)(s)||""===s||this.setDefaultValueToElement(a)}},e.prototype.eventSave=function(e,t){if(this.isEnterKey)return void(this.isEnterKey=!1);var i=this.element.querySelector("."+h._109);if(!i||!i.classList.contains("e-formvalidator")||i.ej2_instances[0].validate()){var n=this.getEventDataFromEditor();this.processEventValidation(n.tempData,t)||(this.eventCrudData=n.eventData,this.dialogEvent=e,this.isCrudAction=!0,this.dialogObject.hide())}},e.prototype.getEventDataFromEditor=function(){var e=i.i(n.extend)({},this.getObjectFromFormData(h._149));e.Timezone||(e[this.fields.startTimezone]=null,e[this.fields.endTimezone]=null),delete e.Timezone,delete e.Repeat,this.setDefaultValueToObject(e),e[this.fields.recurrenceRule]=this.recurrenceEditor?this.recurrenceEditor.getRecurrenceRule()||null:void 0;var t=i.i(n.extend)({},e,null,!0);return e[this.fields.isAllDay]&&(e[this.fields.startTime]=i.i(n.isNullOrUndefined)(e[this.fields.startTime])?null:g.b(new Date(e[this.fields.startTime].getTime())),e[this.fields.endTime]=i.i(n.isNullOrUndefined)(e[this.fields.endTime])?null:g.d(g.b(new Date(e[this.fields.endTime].getTime())),1)),{eventData:e,tempData:t}},e.prototype.processEventValidation=function(e,t){var r;if(i.i(n.isNullOrUndefined)(this.parent.editorTemplate)){if(!e[this.fields.startTime]||!e[this.fields.endTime])return this.parent.quickPopup.openValidationError("invalidDateError"),!0;if(e[this.fields.startTime]>e[this.fields.endTime])return this.parent.quickPopup.openValidationError("startEndError"),!0}if(this.recurrenceEditor&&this.recurrenceEditor.value&&""!==this.recurrenceEditor.value){"EditOccurrence"!==this.parent.currentAction&&(r=this.recurrenceValidation(e[this.fields.startTime],e[this.fields.endTime],t));var a=!0;if("seriesChangeAlert"===r&&this.parent.uiStateValues.isIgnoreOccurrence&&(a=!1),!i.i(n.isNullOrUndefined)(r)&&a&&(!this.parent.enableRecurrenceValidation&&"wrongPattern"===r||this.parent.enableRecurrenceValidation))return this.parent.quickPopup.openRecurrenceValidationAlert(r),!0}return!1},e.prototype.processCrudActions=function(e){var t=this;this.parent.uiStateValues.isBlock=!1;var r=this.getResourceData(e),a=(this.parent.activeViewOptions.group.resources.length>0||this.parent.resourceCollection.length>0)&&!this.parent.activeViewOptions.group.allowGroupEdit&&!i.i(n.isNullOrUndefined)(r),s=this.getEventIdFromForm();if(i.i(n.isNullOrUndefined)(s))this.parent.currentAction="Add",a?this.resourceSaveEvent(e,this.parent.currentAction):(e[this.fields.id]=this.parent.eventBase.getEventMaxID(),this.parent.addEvent(e));else{var o="string"===this.parent.eventBase.getEventIDType()?s:parseInt(s,10),l=this.parent.eventsData.filter(function(e){return e[t.fields.id]===o})[0];if(i.i(n.isNullOrUndefined)(l)&&(l=this.parent.blockData.filter(function(e){return e[t.fields.id]===o})[0]),e=i.i(n.extend)({},l,e),e[this.fields.isReadonly])return!1;var c=void 0;if(!i.i(n.isNullOrUndefined)(l[this.fields.recurrenceRule])){if(c=this.parent.currentAction,e.Guid=this.parent.activeEventData.event.Guid,"EditOccurrence"===this.parent.currentAction&&(e[this.fields.recurrenceID]?(o=e[this.fields.recurrenceID],c=null):(e[this.fields.id]=this.parent.eventBase.getEventMaxID(),e.Guid=this.parent.activeEventData.event.Guid),this.parent.enableRecurrenceValidation&&this.editOccurrenceValidation(o,e)))return!0;"EditSeries"===this.parent.currentAction||e[this.fields.id]!==l[this.fields.id]?e[this.fields.recurrenceID]=l[this.fields.id]:"EditFollowingEvents"===this.parent.currentAction&&(e[this.fields.id]=this.parent.eventBase.getEventMaxID(),e[this.fields.followingID]=l[this.fields.id])}a?this.resourceSaveEvent(e,"Save",c):this.parent.saveEvent(e,c)}return this.parent.uiStateValues.isBlock},e.prototype.getResourceData=function(e){var t=null;if(!i.i(n.isNullOrUndefined)(this.parent.resourceBase)&&!i.i(n.isNullOrUndefined)(this.parent.resourceBase.resourceCollection)&&this.parent.resourceBase.resourceCollection.length>0){t=e[this.parent.resourceBase.resourceCollection.slice(-1)[0].field]}return t},e.prototype.getObjectFromFormData=function(e){for(var t=this.getFormElements(e),r={},a=0,s=t;a<s.length;a++){var o=s[a],l=o.name||this.getColumnName(o);i.i(n.isNullOrUndefined)(l)||""===l||(r[""+l]=this.getValueFromElement(o))}return r},e.prototype.setDefaultValueToObject=function(e){i.i(n.isNullOrUndefined)(e[this.fields.subject])||(e[this.fields.subject]=e[this.fields.subject]||this.parent.eventSettings.fields.subject.default||this.l10n.getConstant("addTitle")),i.i(n.isNullOrUndefined)(e[this.fields.location])||(e[this.fields.location]=e[this.fields.location]||this.parent.eventSettings.fields.location.default),i.i(n.isNullOrUndefined)(e[this.fields.description])||(e[this.fields.description]=e[this.fields.description]||this.parent.eventSettings.fields.description.default)},e.prototype.recurrenceValidation=function(e,t,r){var a,s=this.recurrenceEditor,o=this.getInstance("e-repeat-interval.e-numerictextbox").value;if(r!==this.l10n.getConstant("ok")){var l=this.parent.activeEventData.event,c=[];if(("EditSeries"===this.parent.currentAction||"EditFollowingEvents"===this.parent.currentAction)&&!i.i(n.isNullOrUndefined)(l)){var p=l[this.parent.eventFields.startTime],d=this.parent.eventBase.getSeriesEvents(this.eventData,p);if(d.length>0)c=this.parent.eventBase.getEditedOccurrences(d,p);else{var h=this.parent.eventBase.getEventById(l[this.parent.eventFields.id]);c=this.parent.eventBase.getEditedOccurrences([h],p)}"EditSeries"!==this.parent.currentAction||i.i(n.isNullOrUndefined)(this.eventData[this.parent.eventFields.recurrenceException])||c.push(this.eventData)}if(c.length>0&&(a="seriesChangeAlert"),"until"===this.getInstance("e-end-on-left .e-ddl .e-dropdownlist").value&&this.getInstance("e-end-on-date .e-datepicker").value<e&&(a="wrongPattern"),i.i(n.isNullOrUndefined)(a)){var u=s.value.split(";")[1].split("=")[1].split(","),g={SU:0,MO:1,TU:2,WE:3,TH:4,FR:5,SA:6},v=[],f=[],m=void 0;switch(s.value.split(";")[0].split("=")[1]){case"DAILY":(t.getTime()-e.getTime())/36e5>24*o&&(a="createError");break;case"WEEKLY":u=s.value.split(";")[1].split("=")[1].split(",");for(var y=0;y<u.length*(o+1);y++)v[parseInt(y.toString(),10)]=u.length>y?g[u[parseInt(y.toString(),10)]]:v[y-u.length]+7*o;m=v.sort(function(e,t){return e-t});for(var y=1;y<m.length;y++)f.push(m[parseInt(y.toString(),10)]-m[y-1]);((t.getTime()-e.getTime())/36e5>=24*Math.min.apply(Math,f)||i.i(n.isNullOrUndefined)(o))&&(a="createError");break;case"MONTHLY":t.getTime()>=new Date(+e).setMonth(e.getMonth()+o)&&(a="createError");break;case"YEARLY":t.getTime()>=new Date(+e).setFullYear(e.getFullYear()+o)&&(a="createError")}}}else t.getTime()>=new Date(+e).setMonth(e.getMonth()+o)&&(a="createError"),i.i(n.isNullOrUndefined)(a)&&this.parent.quickPopup.quickDialog.hide();return i.i(n.isNullOrUndefined)(o)&&(a="createError"),a},e.prototype.getRecurrenceIndex=function(e,t){for(var i,n=0;n<e.length;n++)if(t[this.fields.startTime].valueOf()===e[parseInt(n.toString(),10)][this.fields.startTime].valueOf()){i=n;break}return i},e.prototype.trimAllDay=function(e){if(e[this.fields.isAllDay]){var t=g.d(new Date(+e[this.fields.endTime]),-1).getTime();e[this.fields.endTime]=+e[this.fields.startTime]>t?e[this.fields.endTime]:new Date(t)}},e.prototype.editOccurrenceValidation=function(e,t,r){var a=this;void 0===r&&(r=this.eventData);var s=this.parent.getOccurrencesByID(e);this.parent.eventsData.filter(function(t){return t[a.fields.recurrenceID]===e}).map(function(e){return s.push(i.i(n.extend)({},e))}),t=i.i(n.extend)({},t),this.trimAllDay(t);for(var o=0,l=s;o<l.length;o++){var c=l[o];this.trimAllDay(c)}this.parent.eventBase.sortByTime(s);var p=this.getRecurrenceIndex(s,r);if(i.i(n.isNullOrUndefined)(p))return!1;var d,h,u=new Date(+t[this.fields.startTime]),v=new Date(+t[this.fields.endTime]);p!==s.length-1&&(d=new Date(+s[p+1][this.fields.startTime]),h=new Date(+s[p+1][this.fields.endTime]));var f=new Date(+s[s.length-1][this.fields.endTime]);if(0===p){if(!i.i(n.isNullOrUndefined)(s[p+1])){if(!(d.getTime()>=v.getTime())&&g.b(f).getTime()>=g.b(u).getTime()||g.b(f).getTime()<g.b(u).getTime())return this.parent.quickPopup.openRecurrenceValidationAlert("occurrenceAlert"),!0;if(!(g.b(u).getTime()<g.b(d).getTime()))return this.parent.quickPopup.openRecurrenceValidationAlert("sameDayAlert"),!0}return!1}var m=new Date(+s[p-1][this.fields.startTime]),y=new Date(+s[p-1][this.fields.endTime]);if(p===s.length-1){if(g.b(new Date(+s[s.length-1-p][this.fields.startTime])).getTime()>g.b(u).getTime())return this.parent.quickPopup.openRecurrenceValidationAlert("occurrenceAlert"),!0;if(!(y.getTime()<=u.getTime()&&g.b(u).getTime()>g.b(m).getTime()))return this.parent.quickPopup.openRecurrenceValidationAlert("sameDayAlert"),!0}else{if(!(g.b(m).getTime()<g.b(u).getTime()||g.b(new Date(+s[0][this.fields.startTime])).getTime()>g.b(u).getTime())||!(g.b(d).getTime()>g.b(u).getTime()||f.getTime()<u.getTime()))return this.parent.quickPopup.openRecurrenceValidationAlert("sameDayAlert"),!0;if(!(y.getTime()<=u.getTime()&&d.getTime()>=v.getTime())||g.b(h).getTime()<g.b(u).getTime()||g.b(m).getTime()>g.b(v).getTime()||!(g.b(u).getTime()<g.b(d).getTime()))return this.parent.quickPopup.openRecurrenceValidationAlert("occurrenceAlert"),!0}return!1},e.prototype.resourceSaveEvent=function(e,t,r){var a=this,s=this.parent.resourceBase.resourceCollection.slice(-1)[0],o=e[s.field];o=o instanceof Array?o.reverse():[o].reverse();for(var l=this.parent.resourceBase.lastResourceLevel,c=[],p=this,d=0;d<o.length;d++){var h=function(d){var h=i.i(n.extend)({},e,null,!0);h[p.fields.id]=p.parent.eventBase.getEventMaxID();var u=[],v=function(){if("Save"===t&&d===o.length-1)if(u.length>0){u[0][a.fields.id]=e[a.fields.id];for(var i=1;i<u.length;i++)u[parseInt(i.toString(),10)][a.fields.id]=a.parent.eventBase.getEventMaxID(d),c.push(u[parseInt(i.toString(),10)]),a.parent.saveEvent(u[0],r)}else h[a.fields.id]=e[a.fields.id],a.parent.saveEvent(h,r);else if(u.length>0)for(var n=0;n<u.length;n++)u[parseInt(n.toString(),10)][a.fields.id]=a.parent.eventBase.getEventMaxID(n),c.push(u[parseInt(n.toString(),10)]);else h[a.fields.id]=a.parent.eventBase.getEventMaxID(d),c.push(h)};if(p.parent.activeViewOptions.group.byGroupID&&!i.i(n.isNullOrUndefined)(l)){var f=s.dataSource,m=p.parent.resourceCollection,y=void 0;if((y=m.length>1?g.C(f,s.idField,o[parseInt(d.toString(),10)],h,m):g.C(f,s.idField,o[parseInt(d.toString(),10)]))<0)return{value:void 0};for(var T=f[parseInt(y.toString(),10)][s.groupIDField],w=l.filter(function(e){return e.resourceData[s.idField]===o[parseInt(d.toString(),10)]}).filter(function(e){return e.resourceData[s.groupIDField]===T})[0],D=w.groupOrder,b=0;b<p.parent.resourceBase.resourceCollection.length;b++){var S=p.parent.resourceBase.resourceCollection[parseInt(b.toString(),10)].field;h[""+S]=D[parseInt(b.toString(),10)]instanceof Array?D[parseInt(b.toString(),10)][0]:D[parseInt(b.toString(),10)]}v()}else{for(var y=0;y<p.parent.resourceBase.resourceCollection.length-1;y++){var S=p.parent.resourceBase.resourceCollection[parseInt(y.toString(),10)].field;if(h[""+S]instanceof Array&&h[""+S].length>1)for(var C=0;C<h[""+S].length;C++){var O=i.i(n.extend)({},h,null,!0);O[""+S]=e[""+S][parseInt(C.toString(),10)],O[s.field]=o[parseInt(d.toString(),10)],u.push(O)}else if(0===u.length)h[""+S]=e[""+S]instanceof Array?e[""+S][0]:e[""+S],h[s.field]=o[parseInt(d.toString(),10)];else for(var E=0;E<u.length;E++)u[parseInt(E.toString(),10)][""+S]=e[""+S]instanceof Array?e[""+S][0]:e[""+S]}h[s.field]=o[parseInt(d.toString(),10)],v()}}(d);if("object"==typeof h)return h.value}if(c.length>0){for(var u=0,v=c;u<v.length;u++){var f=v[u];f[this.fields.recurrenceException]=null,f[this.fields.recurrenceID]=null}this.parent.addEvent(c)}},e.prototype.getEventIdFromForm=function(){return this.element.querySelector("."+h._109).getAttribute("data-id")},e.prototype.getFormElements=function(e){return e===h._149?[].slice.call(this.element.querySelectorAll(".e-field")):[].slice.call(this.parent.element.querySelectorAll("."+e+" .e-field"))},e.prototype.getValueFromElement=function(e){return e.classList.contains("e-datepicker")?e.ej2_instances[0].value:e.classList.contains("e-datetimepicker")?e.ej2_instances[0].value:e.classList.contains("e-dropdownlist")?e.ej2_instances[0].value:e.classList.contains("e-multiselect")?e.ej2_instances[0].value:e.classList.contains("e-checkbox")?e.ej2_instances[0].checked:"checkbox"===e.type?e.checked:this.parent.enableHtmlSanitizer?n.SanitizeHtmlHelper.sanitize(e.value):e.value},e.prototype.setValueToElement=function(e,t){if(e.classList.contains("e-datepicker")){var i=e.ej2_instances[0];i.value=t,i.dataBind()}else if(e.classList.contains("e-datetimepicker")){var i=e.ej2_instances[0];i.element.classList.contains(h._153)?this.eventWindowTime.startTime=new Date(""+t):this.eventWindowTime.endTime=new Date(""+t),i.value=t,i.dataBind()}else if(e.classList.contains("e-dropdownlist")){var i=e.ej2_instances[0];i.value=t,i.dataBind()}else if(e.classList.contains("e-multiselect")){var i=e.ej2_instances[0];i.value=[],i.value=t instanceof Array?t:[t],i.dataBind()}else if(e.classList.contains("e-checkbox")){var i=e.ej2_instances[0];i.checked=t,i.dataBind()}else"checkbox"!==e.type?e.value=t||"":e.checked=t},e.prototype.setDefaultValueToElement=function(e){if(e.classList.contains("e-datepicker")){var t=e.ej2_instances[0];t.value=this.parent.getCurrentTime(),t.dataBind()}else if(e.classList.contains("e-datetimepicker")){var t=e.ej2_instances[0],i=this.parent.getCurrentTime();this.eventWindowTime={startTime:i,endTime:i},t.value=i,t.dataBind()}else if(e.classList.contains("e-dropdownlist")){var t=e.ej2_instances[0];t.value=null,t.dataBind()}else if(e.classList.contains("e-multiselect")){var t=e.ej2_instances[0];t.value=[],t.dataBind()}else if(e.classList.contains("e-checkbox")){var t=e.ej2_instances[0];t.checked=!1,t.dataBind()}else"checkbox"===e.type?e.checked=!1:e.value=""},e.prototype.getInstance=function(e){var t=this.element.querySelector("."+e);return t?t.ej2_instances[0]:null},e.prototype.eventDelete=function(e){if(this.isEnterKey)return void(this.isEnterKey=!1);switch(this.parent.currentAction){case"EditOccurrence":i.i(n.isNullOrUndefined)(this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule])?this.parent.currentAction="Delete":this.parent.currentAction="DeleteOccurrence";break;case"EditSeries":this.parent.currentAction="DeleteSeries";break;case"Save":this.parent.currentAction="Delete";break;case"EditFollowingEvents":i.i(n.isNullOrUndefined)(this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule])||(this.parent.currentAction="DeleteFollowingEvents")}this.dialogEvent=e,this.isCrudAction=!1,this.dialogObject.hide(),this.parent.quickPopup.openDeleteAlert()},e.prototype.getRecurrenceEditorInstance=function(){return this.parent.isAdaptive&&!this.repeatDialogObject&&this.renderRepeatDialog(),this.recurrenceEditor},e.prototype.destroyComponents=function(){for(var e=this.getFormElements(h._149),t=0,i=e;t<i.length;t++){var n=i[t],r=void 0;n.classList.contains("e-datetimepicker")?r=n.ej2_instances:n.classList.contains("e-datepicker")?r=n.ej2_instances:n.classList.contains("e-checkbox")?r=n.ej2_instances:n.classList.contains("e-dropdownlist")?r=n.ej2_instances:n.classList.contains("e-multiselect")?r=n.ej2_instances:n.classList.contains("e-numerictextbox")&&(r=n.ej2_instances),r&&r[0]&&r[0].destroy()}this.buttonObj&&this.buttonObj.destroy()},e.prototype.detachComponents=function(){for(var e=this.getFormElements(h._149),t=0,r=e;t<r.length;t++){var a=r[t];i.i(n.detach)(a)}},e.prototype.destroy=function(e){if(this.parent&&!this.parent.isDestroyed&&this.parent.resetTemplates(["editorTemplate","editorHeaderTemplate","editorFooterTemplate"]),this.destroyComponents(),this.recurrenceEditor&&(this.recurrenceEditor.destroy(),i.i(n.detach)(this.recurrenceEditor.element),this.recurrenceEditor=null),this.fieldValidator&&(this.fieldValidator.destroy(),this.fieldValidator=null),this.repeatDialogObject&&(this.repeatDialogObject.destroy(),this.repeatDialogObject=null),this.detachComponents(),this.dialogObject){if(this.dialogObject.element){var t=this.dialogObject.element.querySelector("form");g.E(t),i.i(n.detach)(t),n.EventHandler.remove(this.dialogObject.element,"keydown",this.preventEventSave)}this.dialogObject.destroy(),this.dialogObject=null}this.element&&(i.i(n.remove)(this.element),this.element=null),e||(this.l10n=null,this.parent=null,this.fields=null,this.buttonObj=null,this.repeatStatus=null,this.eventWindowTime=null,this.dialogEvent=null)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var n=i(0),r=(i.n(n),i(6)),a=(i.n(r),i(18)),s=(i.n(a),i(12)),o=(i.n(s),i(27)),l=i(2),c=i(3),p=i(1),d=function(){function e(e){this.isMultipleEventSelect=!1,this.isCrudAction=!1,this.parent=e,this.l10n=this.parent.localeObj,this.fieldValidator=new o.a,this.render(),this.addEventListener()}return e.prototype.render=function(){this.renderQuickPopup(),this.renderMorePopup(),this.renderQuickDialog()},e.prototype.renderQuickPopup=function(){var e=i.i(n.createElement)("div",{className:c._90+" e-popup-close",attrs:{role:"dialog"}});this.parent.isAdaptive?(document.body.appendChild(e),i.i(n.addClass)([e],c._84)):this.parent.element.appendChild(e),this.quickPopup=new r.Popup(e,{targetType:this.parent.isAdaptive?"container":"relative",enableRtl:this.parent.enableRtl,open:this.quickPopupOpen.bind(this),close:this.quickPopupClose.bind(this),hideAnimation:this.parent.isAdaptive?{name:"ZoomOut"}:{name:"FadeOut",duration:150},showAnimation:this.parent.isAdaptive?{name:"ZoomIn"}:{name:"FadeIn",duration:150},collision:this.parent.isAdaptive?{X:"fit",Y:"fit"}:this.parent.enableRtl?{X:"flip",Y:"fit"}:{X:"none",Y:"fit"},position:this.parent.isAdaptive||this.parent.enableRtl?{X:"left",Y:"top"}:{X:"right",Y:"top"},viewPortElement:this.parent.isAdaptive?document.body:this.parent.element,zIndex:this.parent.isAdaptive?1004:3})},e.prototype.renderMorePopup=function(){var e='<div class="'+c._77+'"><div class="'+c._91+'"><div class="'+c._92+'" title="'+this.l10n.getConstant("close")+'" tabindex="0" role="button"></div><div class="'+c._93+'"><div class="'+c._94+'" id="'+this.parent.element.id+'_more_popup"></div><div class="'+c._95+" "+c.p+'" tabindex="0" role="link"></div></div></div></div>',t=i.i(n.createElement)("div",{className:c._96+" e-popup-close",innerHTML:e});this.parent.isAdaptive?(document.body.appendChild(t),i.i(n.addClass)([t],c._84)):this.parent.element.appendChild(t),this.morePopup=new r.Popup(t,{targetType:this.parent.isAdaptive?"container":"relative",enableRtl:this.parent.enableRtl,hideAnimation:{name:"ZoomOut",duration:300},showAnimation:{name:"ZoomIn",duration:300},open:this.morePopupOpen.bind(this),close:this.morePopupClose.bind(this),collision:this.parent.isAdaptive?{X:"fit",Y:"fit"}:this.parent.enableRtl?{X:"flip",Y:"fit"}:{X:"flip",Y:"flip"},viewPortElement:this.parent.isAdaptive?document.body:this.parent.element,zIndex:this.parent.isAdaptive?1002:2}),this.morePopup.element.setAttribute("role","dialog"),this.morePopup.element.setAttribute("aria-labelledby",this.parent.element.id+"_more_popup");var a=this.morePopup.element.querySelector("."+c._92);this.renderButton("e-round",c.N+" "+c._97,!1,a,this.closeClick),n.EventHandler.add(this.morePopup.element.querySelector("."+c._95),"click",this.navigationClick,this)},e.prototype.renderQuickDialog=function(){var e=[{buttonModel:{cssClass:"e-quick-alertok e-flat",isPrimary:!0},click:this.dialogButtonClick.bind(this)},{buttonModel:{cssClass:"e-quick-alertcancel e-flat",isPrimary:!1},click:this.dialogButtonClick.bind(this)},{buttonModel:{cssClass:"e-quick-dialog-cancel e-disable e-flat",isPrimary:!1},click:this.dialogButtonClick.bind(this)}];if(this.parent.eventSettings.editFollowingEvents){var t={buttonModel:{cssClass:"e-quick-alertfollowing e-flat",isPrimary:!1},click:this.dialogButtonClick.bind(this)};e.splice(1,0,t)}this.quickDialog=new r.Dialog({animationSettings:{effect:"Zoom"},buttons:e,cssClass:c._98,closeOnEscape:!0,enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeClose:this.beforeQuickDialogClose.bind(this),isModal:!0,position:{X:"center",Y:"center"},showCloseIcon:!0,target:document.body,visible:!1,width:"auto"});var a=i.i(n.createElement)("div",{id:this.parent.element.id+"QuickDialog"});this.parent.element.appendChild(a),this.quickDialog.appendTo(a);var s=this.quickDialog.element.querySelector("."+c._99);s&&(s.setAttribute("aria-label",this.l10n.getConstant("occurrence")),s.setAttribute("aria-label",s.innerHTML));var o=this.quickDialog.element.querySelector("."+c._100);o&&(o.setAttribute("aria-label",this.l10n.getConstant("series")),o.setAttribute("aria-label",o.innerHTML)),this.quickDialog.element.querySelector(".e-dlg-closeicon-btn")&&this.quickDialog.element.querySelector(".e-dlg-closeicon-btn").setAttribute("title",this.l10n.getConstant("close"))},e.prototype.renderButton=function(e,t,r,s,o){new a.Button({cssClass:e,disabled:r,enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,iconCss:t}).appendTo(s),n.EventHandler.add(s,"click",o,this),i.i(n.removeClass)([s],c.N)},e.prototype.quickDialogClass=function(e){var t=[c._101,c._102,c._103,c._104,c._105,c.J],r=this.quickDialog.element.querySelector("."+c._99),a=this.quickDialog.element.querySelector("."+c._100),s=this.quickDialog.element.querySelector("."+c._106);switch(i.i(n.removeClass)([r,a],t),i.i(n.addClass)([this.quickDialog.element.querySelector("."+c._104)],c.J),this.parent.eventSettings.editFollowingEvents&&(i.i(n.addClass)([s],c.J),i.i(n.removeClass)([this.quickDialog.element],c._107)),e){case"Recurrence":i.i(n.addClass)([r],c._101),i.i(n.addClass)([a],c._102),this.parent.eventSettings.editFollowingEvents&&(i.i(n.removeClass)([s],c.J),i.i(n.addClass)([this.quickDialog.element],c._107),i.i(n.addClass)([s],c._108));break;case"Delete":i.i(n.addClass)([r],c._103),i.i(n.addClass)([a],c._104);break;case"Alert":i.i(n.addClass)([r],[c._99,c._105]),i.i(n.addClass)([a],[c._100,c.J])}},e.prototype.applyFormValidation=function(){var e=this.quickPopup.element.querySelector("."+c._109),t={};t[this.parent.eventSettings.fields.subject.name]=this.parent.eventSettings.fields.subject.validation,this.fieldValidator.renderFormValidator(e,t,this.quickPopup.element,this.parent.locale)},e.prototype.openRecurrenceAlert=function(){var e=this.quickDialog.element.querySelector("."+c._99);e&&(e.innerHTML=this.l10n.getConstant("Delete"===this.parent.currentAction?"deleteEvent":"editEvent"),e.setAttribute("aria-label",e.innerHTML));var t=this.quickDialog.element.querySelector("."+c._106);t&&(t.innerHTML=this.l10n.getConstant("editFollowingEvent"),t.setAttribute("aria-label",t.innerHTML));var i=this.quickDialog.element.querySelector("."+c._100);i&&(i.innerHTML=this.l10n.getConstant("Delete"===this.parent.currentAction?"deleteSeries":"editSeries"),i.setAttribute("aria-label",i.innerHTML)),this.quickDialog.content=this.l10n.getConstant("editContent"),this.quickDialog.header=this.l10n.getConstant("Delete"===this.parent.currentAction?"deleteTitle":"editTitle"),this.quickDialogClass("Recurrence"),this.showQuickDialog("RecurrenceAlert")},e.prototype.openRecurrenceValidationAlert=function(e){this.quickDialogClass("Alert");var t=this.quickDialog.element.querySelector("."+c._99);t.innerHTML=this.l10n.getConstant("ok"),t.setAttribute("aria-label",t.innerHTML);var r=this.quickDialog.element.querySelector("."+c._100);r.innerHTML=this.l10n.getConstant("cancel"),r.setAttribute("aria-label",r.innerHTML),this.quickDialog.header=this.l10n.getConstant("alert");var a;switch(e){case"wrongPattern":i.i(n.addClass)([r],c.J),this.quickDialog.content=this.l10n.getConstant("wrongPattern");break;case"createError":i.i(n.addClass)([r],c.J),this.quickDialog.content=this.l10n.getConstant("createError");break;case"sameDayAlert":i.i(n.addClass)([r],c.J),this.quickDialog.content=this.l10n.getConstant("sameDayAlert");break;case"seriesChangeAlert":a=this.quickDialog.element.querySelector("."+c._104),i.i(n.removeClass)([r,a],c.J),this.quickDialog.content=this.l10n.getConstant("seriesChangeAlert"),t.innerHTML=this.l10n.getConstant("yes"),r.innerHTML=this.l10n.getConstant("no"),a.innerHTML=this.l10n.getConstant("cancel");break;case"occurrenceAlert":i.i(n.addClass)([r],c.J),this.quickDialog.content=this.l10n.getConstant("occurenceAlert")}(!this.parent.enableRecurrenceValidation&&"wrongPattern"===e||this.parent.enableRecurrenceValidation)&&this.showQuickDialog("RecurrenceValidationAlert")},e.prototype.openDeleteAlert=function(){if(!this.parent.activeViewOptions.readonly){var e=this.quickDialog.element.querySelector("."+c._99);e&&(e.innerHTML=this.l10n.getConstant("delete"),e.setAttribute("aria-label",e.innerHTML));var t=this.quickDialog.element.querySelector("."+c._100);t&&(t.innerHTML=this.l10n.getConstant("cancel"),t.setAttribute("aria-label",t.innerHTML)),this.quickDialog.content=this.parent.activeEventData.event.length>1?this.l10n.getConstant("deleteMultipleContent"):this.l10n.getConstant("deleteContent"),this.quickDialog.header=this.parent.activeEventData.event.length>1?this.l10n.getConstant("deleteMultipleEvent"):this.l10n.getConstant("deleteEvent"),this.quickDialogClass("Delete"),this.showQuickDialog("DeleteAlert")}},e.prototype.openValidationError=function(e,t){this.quickDialog.header=this.l10n.getConstant("alert"),this.quickDialog.content=this.l10n.getConstant(e);var i=this.quickDialog.element.querySelector("."+c._99);i&&(i.innerHTML=this.l10n.getConstant("ok"),i.setAttribute("aria-label",i.innerHTML));var n=this.quickDialog.element.querySelector("."+c._100);n&&(n.innerHTML=this.l10n.getConstant("cancel"),i.setAttribute("aria-label",n.innerHTML)),this.quickDialogClass("Alert"),this.showQuickDialog("ValidationAlert",t)},e.prototype.showQuickDialog=function(e,t){var r=this;this.quickDialog.dataBind();var a={type:e,cancel:!1,element:this.quickDialog.element,data:i.i(n.extend)({},t||this.parent.activeEventData.event,null,!0)};this.parent.trigger(l.p,a,function(e){e.cancel||r.quickDialog.show()})},e.prototype.createMoreEventList=function(e,t,r){var a=this,s=this.parent.eventFields,o=i.i(n.createElement)("div",{className:c._110}),p=i.i(n.createElement)("div",{className:c._111});if(0===e.length)p=i.i(n.createElement)("div",{className:c._110,innerHTML:this.l10n.getConstant("emptyContainer")});else for(var d=this,h=0,u=e;h<u.length;h++){var g=u[h];!function(e){var o=e[s.subject]||d.parent.eventSettings.fields.subject.default||d.parent.localeObj.getConstant("addTitle"),h=i.i(n.createElement)("div",{className:c.A,attrs:{"data-id":""+e[s.id],"data-guid":e.Guid,role:"button",tabindex:"0","aria-disabled":d.parent.eventBase.getReadonlyAttribute(e),"aria-label":d.parent.getAnnouncementString(e)}});e[s.isReadonly]&&i.i(n.addClass)([h],"e-read-only");var u=void 0;if(i.i(n.isNullOrUndefined)(d.parent.activeViewOptions.eventTemplate))h.appendChild(i.i(n.createElement)("div",{className:c.H})),d.parent.sanitize(o,h.firstElementChild);else{var g=d.parent.element.id+"_"+d.parent.activeViewOptions.eventTemplateName+"eventTemplate";u=d.parent.getAppointmentTemplate()(e,d.parent,"eventTemplate",g,!1),i.i(n.append)(u,h)}if(i.i(n.isNullOrUndefined)(r)||h.setAttribute("data-group-index",r),!i.i(n.isNullOrUndefined)(e[s.recurrenceRule])){var v=e[s.id]===e[s.recurrenceID]?c.L:c.M;h.appendChild(i.i(n.createElement)("div",{className:c.N+" "+v}))}var f={data:i.i(n.extend)({},e,null,!0),element:h,cancel:!1};d.parent.trigger(l.m,f,function(i){if(!i.cancel){p.appendChild(h);var n=a.parent.isAdaptive||"Year"===a.parent.currentView;a.parent.eventBase.wireAppointmentEvents(h,e,n),a.parent.eventBase.applyResourceColor(h,e,"backgroundColor",t)}})}(g)}return o.appendChild(p),o},e.prototype.tapHoldEventPopup=function(e){var t=i.i(n.closest)(e.target,"."+c.A);this.parent.selectedElements=[],this.isMultipleEventSelect=!0,this.parent.eventBase.getSelectedEventElements(t),this.parent.activeEventData=this.parent.eventBase.getSelectedEvents();var r=t.getAttribute("data-guid"),a=this.parent.eventBase.getEventByGuid(r);if(!i.i(n.isNullOrUndefined)(a)){var s=a[this.parent.eventFields.subject]||this.l10n.getConstant("noTitle"),o='<div class="'+c._112+'"><div class="'+c._113+'"><button class="'+c._114+'" title="'+this.l10n.getConstant("close")+'"></button><div class="'+c.H+'">'+s+'</div><button class="'+c._115+'" title="'+this.l10n.getConstant("edit")+'"></button><button class="'+c._116+'" title="'+this.l10n.getConstant("delete")+'"></button></div></div>';this.quickPopup.element.innerHTML=o;var l=this.quickPopup.element.querySelector("."+c._114);this.renderButton("e-flat e-round e-small",c.N+" "+c._97,!1,l,this.closeClick);var p=this.parent.activeViewOptions.readonly||a[this.parent.eventFields.isReadonly],d=!this.parent.eventSettings.allowEditing||p,h=!this.parent.eventSettings.allowDeleting||p,u=this.quickPopup.element.querySelector("."+c._115);u&&this.renderButton("e-flat e-round e-small",c.N+" "+c._117,d,u,this.editClick);var g=this.quickPopup.element.querySelector("."+c._116);g&&this.renderButton("e-flat e-round e-small",c.N+" "+c._118,h,g,this.deleteClick),this.beforeQuickPopupOpen(t,this.parent.eventBase.getPageCoordinates(e))}},e.prototype.isCellBlocked=function(e){var t={};if(t[this.parent.eventFields.startTime]=this.parent.activeCellsData.startTime,t[this.parent.eventFields.endTime]=this.parent.activeCellsData.endTime,t[this.parent.eventFields.isAllDay]=this.parent.activeCellsData.isAllDay,this.parent.activeViewOptions.group.resources.length>0){var i=e.element instanceof Array?e.element[0]:e.element,n=parseInt(i.getAttribute("data-group-index"),10);this.parent.resourceBase.setResourceValues(t,isNaN(n)?null:n)}return this.parent.eventBase.isBlockRange(t)},e.prototype.cellClick=function(e){var t=new Date(e.startTime.getTime());if(!this.parent.showQuickInfo||!this.parent.eventSettings.allowAdding||"MonthAgenda"===this.parent.currentView||this.isCellBlocked(e)||!this.parent.isMinMaxDate(new Date(t.setHours(0,0,0,0))))return void this.quickPopupHide();var r=i.i(n.isNullOrUndefined)(e.event)?e.element:e.event.target;if(this.parent.isAdaptive){this.quickPopupHide();var a=this.parent.element.querySelector("."+c._87);i.i(n.isNullOrUndefined)(a)&&(a=i.i(n.createElement)("div",{className:c._87,innerHTML:'<div class="e-title">+ '+this.l10n.getConstant("newEvent")+"</div>"}));var o=i.i(n.closest)(r,"."+c.n+",."+c.U);return void(o&&o.appendChild(a))}var l=i.i(n.closest)(r,"."+c.n+",."+c.U+",."+c.e);if(!i.i(n.isNullOrUndefined)(l)&&!r.classList.contains(c.z)){if(this.quickPopup.relateTo===l&&this.quickPopup.element.classList.contains(c.T)){var p=this.quickPopup.element.querySelector("."+c.H);return void(p&&p.focus())}this.quickPopup.element&&this.destroyPopupButtons("quickPopup");var d={};d[this.parent.eventFields.startTime]=this.parent.activeCellsData.startTime,d[this.parent.eventFields.endTime]=this.parent.activeCellsData.endTime,d[this.parent.eventFields.isAllDay]=this.parent.activeCellsData.isAllDay;var h=i.i(n.createElement)("div",{className:c._119});h.appendChild(this.getPopupHeader("Cell",d)),h.appendChild(this.getPopupContent("Cell",e,d)),h.appendChild(this.getPopupFooter("Cell",d)),this.quickPopup.element.setAttribute("aria-label",this.l10n.getConstant("newEvent"));var u=h.querySelector("."+c.H);u&&s.Input.createInput({element:u,properties:{placeholder:this.l10n.getConstant("addTitle")}}),i.i(n.isNullOrUndefined)(this.parent.eventSettings.fields.subject.default)||(u.value=this.parent.eventSettings.fields.subject.default);var g=h.querySelector("."+c._114);g&&this.renderButton("e-flat e-round e-small",c.N+" "+c._97,!1,g,this.popupClose);var v=h.querySelector("."+c._120);v&&this.renderButton("e-flat","",!1,v,this.detailsClick);var f=h.querySelector("."+c._121);f&&this.renderButton("e-flat e-primary","",this.parent.activeViewOptions.readonly,f,this.saveClick),this.morePopup&&this.morePopup.hide(),this.quickPopup.content=h,this.quickPopup.relateTo=l,this.quickPopup.dataBind(),this.beforeQuickPopupOpen(l,this.parent.eventBase.getPageCoordinates(e.event))}},e.prototype.isSameEventClick=function(e){if(this.quickPopup.relateTo===i.i(n.closest)(e.element,"."+c.A)&&this.quickPopup.element.classList.contains(c.T)){var t=this.quickPopup.element.querySelector("."+c._115);if(t&&t.focus(),!this.parent.isAdaptive){var r=this.quickPopup.element.querySelector("."+c._122);r&&r.focus()}return!0}return!1},e.prototype.isQuickTemplate=function(e){return"Both"===this.parent.quickInfoTemplates.templateType||this.parent.quickInfoTemplates.templateType===e},e.prototype.eventClick=function(e){if(this.parent.eventTooltip&&this.parent.eventTooltip.close(),this.parent.showQuickInfo)if(this.parent.isAdaptive&&this.isMultipleEventSelect)this.updateTapHoldEventPopup(i.i(n.closest)(e.element,"."+c.A));else{var t=this.isSameEventClick(e);if(this.parent.selectedElements=[],t)return;this.quickPopup.element&&this.destroyPopupButtons("quickPopup");var r=e.event,a=i.i(n.createElement)("div",{className:c._123});a.appendChild(this.getPopupHeader("Event",r)),a.appendChild(this.getPopupContent("Event",e,r)),a.appendChild(this.getPopupFooter("Event",r)),this.quickPopup.element.setAttribute("aria-label",this.l10n.getConstant("editEvent"));var s=this.parent.activeViewOptions.readonly||r[this.parent.eventFields.isReadonly],o=!this.parent.eventSettings.allowEditing||s,l=!this.parent.eventSettings.allowDeleting||s,p=a.querySelector("."+c._115),d="e-flat e-round e-small";p&&this.renderButton(d,c.N+" "+c._117,o,p,this.editClick);var h=a.querySelector("."+c._116);h&&this.renderButton(d,c.N+" "+c._118,l,h,this.deleteClick);var u=a.querySelector("."+c._114);u&&this.renderButton(d,c.N+" "+c._97,!1,u,this.popupClose);var g=a.querySelector("."+c._122);g&&this.renderButton("e-flat e-primary","",o,g,this.editClick);var v=a.querySelector("."+c._124);v&&this.renderButton("e-flat","",l,v,this.deleteClick),this.morePopup&&!i.i(n.closest)(e.element,"."+c._111)&&this.morePopup.hide(),this.quickPopup.content=a,this.quickPopup.relateTo=this.parent.isAdaptive?document.body:i.i(n.closest)(e.element,"."+c.A),this.quickPopup.dataBind(),this.beforeQuickPopupOpen(e.element,this.parent.eventBase.getPageCoordinates(e.originalEvent))}},e.prototype.getPopupHeader=function(e,t){var r=i.i(n.createElement)("div",{className:c._113});if(this.isQuickTemplate(e)&&this.parent.quickInfoTemplates.header){var a=i.i(n.extend)({},t,{elementType:e.toLowerCase()},!0),s=this.parent.element.id,o=[].slice.call(this.parent.getQuickInfoTemplatesHeader()(a,this.parent,"header",s+"_headerTemplate",!1));i.i(n.append)([].slice.call(o),r)}else{var l=void 0,p=void 0;switch(e){case"Cell":l='<div class="'+c._125+'"><button class="'+c._114+'" title="'+this.l10n.getConstant("close")+'"></button></div>';break;case"Event":p=this.getFormattedString(t),l='<div class="'+c._125+'"><button class="'+c._115+" "+c.N+'" title="'+this.l10n.getConstant("edit")+'"></button><button class="'+c._116+" "+c.N+'" title="'+this.l10n.getConstant("delete")+'"></button><button class="'+c._114+'" title="'+this.l10n.getConstant("close")+'"></button></div><div class="'+c._44+'"><div class="'+c.H+" "+c._64+'" title="'+(p.eventSubject?p.eventSubject.replaceAll('"',"'"):p.eventSubject)+'"></div></div >'}var d=i.i(n.createElement)("div",{innerHTML:l});if("Event"===e){var h=d.querySelector("."+c.H);this.parent.sanitize(p.eventSubject,h)}i.i(n.append)([].slice.call(d.childNodes),r)}return r},e.prototype.getPopupContent=function(e,t,r){var a=i.i(n.createElement)("div",{className:c._126});if(this.isQuickTemplate(e)&&this.parent.quickInfoTemplates.content){var s=i.i(n.extend)({},r,{elementType:e.toLowerCase()},!0),o=this.parent.element.id,l=[].slice.call(this.parent.getQuickInfoTemplatesContent()(s,this.parent,"content",o+"_contentTemplate",!1));i.i(n.append)([].slice.call(l),a)}else{var p=void 0,d=void 0,h=void 0,u=this.getResourceText(t,e.toLowerCase());switch(e){case"Cell":d=this.getFormattedString(r),p='<table class="'+c._127+'"><tbody><tr><td><form class="'+c._109+'" onsubmit="return false;"><input class="'+c.H+' e-field" type="text" name="'+this.parent.eventFields.subject+'" /></form></td></tr><tr><td><div class="'+c._45+'"><div class="'+c._128+" "+c.N+'"></div><div class="'+c._129+" "+c._64+'">'+d.details+"</div></div>"+(this.parent.activeViewOptions.group.resources.length>0?'<div class="'+c._130+'"><div class="'+c._131+" "+c.N+' "></div><div class="'+c._132+" "+c._64+'"></div></div>':"")+"</td></tr></tbody></table>";break;case"Event":h=this.getFormattedString(r),p='<div class="'+c._45+'"><div class="'+c._128+" "+c.N+'"></div><div class="'+c._133+" "+c._64+'"><div class="'+c._129+" "+c._64+'">'+h.details+"</div>",r[this.parent.eventFields.recurrenceRule]&&(p+='<div class="'+c._134+" "+c._64+'">'+this.getRecurrenceSummary(r)+"</div>"),p+="</div></div>",r[this.parent.eventFields.location]&&(p+='<div class="'+c.K+'"><div class="'+c._135+" "+c.N+'"></div><div class="'+c._136+" "+c._64+'"></div></div>'),(r[this.parent.eventFields.startTimezone]||r[this.parent.eventFields.endTimezone])&&(p+='<div class="'+c._137+'"><div class="'+c._138+" "+c.N+'"></div><div class="'+c._139+" "+c._64+'">'+this.getTimezone(r)+"</div></div>"),r[this.parent.eventFields.description]&&(p+='<div class="'+c._140+'"><div class="'+c._141+" "+c.N+'"></div><div class="'+c._142+" "+c._64+'"></div></div>'),this.parent.resourceCollection.length>0&&(p+='<div class="'+c._130+'"><div class="'+c._131+" "+c.N+'"></div><div class="'+c._132+" "+c._64+'"></div></div>')}var g=i.i(n.createElement)("div",{innerHTML:p});if(r[this.parent.eventFields.location]){var v=g.querySelector("."+c._136);i.i(n.isNullOrUndefined)(v)||this.parent.sanitize(r[this.parent.eventFields.location],v)}if(r[this.parent.eventFields.description]){var f=g.querySelector("."+c._142);i.i(n.isNullOrUndefined)(f)||this.parent.sanitize(r[this.parent.eventFields.description],f)}if(u){var m=g.querySelector("."+c._132);i.i(n.isNullOrUndefined)(m)||this.parent.sanitize(u,m)}i.i(n.append)([].slice.call(g.childNodes),a)}return a},e.prototype.getPopupFooter=function(e,t){var r=i.i(n.createElement)("div",{className:c._143});if(this.isQuickTemplate(e)&&this.parent.quickInfoTemplates.footer){var a=i.i(n.extend)({},t,{elementType:e.toLowerCase()},!0),s=this.parent.element.id,o=[].slice.call(this.parent.getQuickInfoTemplatesFooter()(a,this.parent,"footer",s+"_footerTemplate",!1));i.i(n.append)([].slice.call(o),r)}else{var l=void 0;switch(e){case"Cell":l='<button class="'+c._120+" "+c._64+'" title="'+this.l10n.getConstant("moreDetails")+'">'+this.l10n.getConstant("moreDetails")+'</button><button class="'+c._121+" "+c._64+'" title="'+this.l10n.getConstant("save")+'">'+this.l10n.getConstant("save")+"</button>";break;case"Event":l=this.parent.isAdaptive?"":'<button class="'+c._122+" "+c._64+'" title="'+this.l10n.getConstant("edit")+'">'+this.l10n.getConstant("edit")+'</button><button class="'+c._124+" "+c._64+'" title="'+this.l10n.getConstant("delete")+'">'+this.l10n.getConstant("delete")+"</button>"}var p=i.i(n.createElement)("div",{innerHTML:l});i.i(n.append)([].slice.call(p.childNodes),r)}return r},e.prototype.getResourceText=function(e,t){if(0===this.parent.resourceCollection.length)return null;var r="";if(0===this.parent.activeViewOptions.group.resources.length){var a=this.parent.resourceBase.resourceCollection.slice(-1)[0],s=a.dataSource;if("event"===t)for(var o=e.event,l=0,c=s;l<c.length;l++){var d=c[l];!function(e){var t=o[a.field];if(t instanceof Array){if(t.indexOf(e[a.idField])>-1){var i=t[t.indexOf(e[a.idField])],n=s.filter(function(e){return e[a.idField]===i})[0];r+=""===r?n[a.textField]:", "+n[a.textField]}}else e[a.idField]===t&&(r=e[a.textField].toString())}(d)}else r=s[0][a.textField].toString()}else if("event"===t){for(var h,o=e.event,s=void 0,u=this.parent.resourceBase.resourceCollection.length-1;u>=0;u--)if(s=o[this.parent.resourceBase.resourceCollection[parseInt(u.toString(),10)].field],!i.i(n.isNullOrUndefined)(s)){h=this.parent.resourceBase.resourceCollection[parseInt(u.toString(),10)];break}Array.isArray(s)||(s=[s]);var g=[],v=h.dataSource;s.forEach(function(e){var t,i=p.C(v,h.idField,e);i>-1&&(t=v[parseInt(i.toString(),10)][h.textField]),t&&g.push(t)}),r=g.join(", ")}else{var f=e,m=i.i(n.isNullOrUndefined)(f.groupIndex)?0:f.groupIndex,y=this.parent.resourceBase.lastResourceLevel[parseInt(m.toString(),10)];r=y.resourceData[y.resource.textField]}return r},e.prototype.getFormattedString=function(e){var t=this.parent.eventFields,i=e[t.subject]||this.l10n.getConstant("noTitle"),n=e[t.startTime],r=e[t.endTime],a=this.getDateFormat(n,"long"),s=e[t.isAllDay]&&0===r.getHours()&&0===r.getMinutes()?this.getDateFormat(p.d(new Date(r.getTime()),-1),"long"):this.getDateFormat(r,"long"),o=this.parent.getTimeString(n),l=this.parent.getTimeString(r),c="",d=r.getDate()!==n.getDate()&&(r.getTime()-n.getTime())/36e5<24?1:0;return e[t.isAllDay]?(c=a+" ("+this.l10n.getConstant("allDay")+")",(p.G(r)-p.G(n))/p.c>1&&(c+="&nbsp;-&nbsp;"+s+" ("+this.l10n.getConstant("allDay")+")")):c=(p.G(r)-p.G(n))/p.c>=1||d>0?a+" ("+o+")&nbsp;-&nbsp;"+s+" ("+l+")":a+" ("+o+"&nbsp;-&nbsp;"+l+")",{eventSubject:i,details:c}},e.prototype.moreEventClick=function(e,t,r){var a=this;this.quickPopupHide(!0);var s=this.morePopup.element.querySelector("."+c._110);s&&i.i(n.remove)(s);var o=e.date.getTime().toString(),d=i.i(n.closest)(e.element,"."+c.z+",."+c.n),h=this.parent.globalize.formatDate(e.date,{format:"E",calendar:this.parent.getCalendarMode()});this.morePopup.element.querySelector("."+c._94).innerHTML=p.a(h,"single");var u=this.morePopup.element.querySelector("."+c._95);u.innerHTML=this.getDateFormat(e.date,"d"),u.setAttribute("data-date",o),u.setAttribute("data-end-date",t.getTime().toString());var g;i.i(n.isNullOrUndefined)(r)||(u.setAttribute("data-group-index",r),g=this.parent.resourceBase.lastResourceLevel[parseInt(r,10)].groupOrder);var v=this.createMoreEventList(e.event,g,r);if(this.morePopup.element.querySelector("."+c._77).appendChild(v),i.i(n.removeClass)(this.morePopup.element.querySelector("."+c._93).childNodes,c._58),p.b(e.date).getTime()===p.b(this.parent.getCurrentTime()).getTime()&&i.i(n.addClass)(this.morePopup.element.querySelector("."+c._93).childNodes,c._58),!this.parent.isAdaptive)if(-1!==this.parent.currentView.indexOf("Timeline")){var f=d.getAttribute("data-group-index"),m=new Date(parseInt(d.getAttribute("data-start-date"),10));m.setHours(m.getHours(),m.getMinutes(),0);var y=m.getTime().toString();if(i.i(n.isNullOrUndefined)(f))this.morePopup.relateTo=this.parent.element.querySelector("."+c.g+' tbody tr td[data-date="'+y+'"]');else if(this.morePopup.relateTo=this.parent.element.querySelector("."+c.g+' tbody tr td[data-group-index="'+f+'"][data-date="'+y+'"]'),i.i(n.isNullOrUndefined)(this.morePopup.relateTo))for(var T=[].slice.call(this.parent.element.querySelectorAll("."+c.g+' tbody tr td[data-group-index="'+f+'"]')),w=0;w<T.length;w++){var D=T[parseInt(w.toString(),10)].getAttribute("data-date");D<y&&(this.morePopup.relateTo=T[parseInt(w.toString(),10)])}}else this.morePopup.relateTo=i.i(n.closest)(d,"."+c.n);this.parent.renderTemplates(function(){var t={type:"EventContainer",cancel:!1,element:a.morePopup.element,data:e};a.parent.trigger(l.p,t,function(e){e.cancel||a.morePopup.show()})})},e.prototype.saveClick=function(e){this.applyFormValidation(),this.dialogEvent=e,this.isCrudAction=!0,this.quickPopupHide()},e.prototype.detailsClick=function(e){var t=this.quickPopup.element.querySelector("."+c.H);t&&""!==t.value&&i.i(n.extend)(this.parent.activeCellsData,{subject:t.value}),this.dialogEvent=e,this.isCrudAction=!1,this.fieldValidator.destroyToolTip(),this.quickPopupHide(),this.parent.eventWindow.openEditor(this.parent.activeCellsData,"Add")},e.prototype.editClick=function(e){this.dialogEvent=e,this.quickPopupHide(!0);var t=this.parent.activeEventData.event;this.parent.currentAction="EditSeries",i.i(n.isNullOrUndefined)(t[this.parent.eventFields.recurrenceRule])?this.parent.eventWindow.openEditor(t,this.parent.currentAction):(this.parent.currentAction="EditOccurrence",this.openRecurrenceAlert())},e.prototype.deleteClick=function(e){this.dialogEvent=e,this.quickPopupHide(!0),this.parent.currentAction="Delete",this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule]?this.openRecurrenceAlert():this.openDeleteAlert()},e.prototype.updateMoreEventContent=function(){if(!this.morePopup.element.classList.contains("e-popup-close")){var e=this.morePopup.element.querySelector("."+c._110);e&&i.i(n.remove)(e);var t,r,a=this.morePopup.element.querySelector("."+c._95),s=new Date(parseInt(a.getAttribute("data-date"),10)),o=new Date(parseInt(a.getAttribute("data-end-date"),10)),l=a.getAttribute("data-group-index");i.i(n.isNullOrUndefined)(l)||(t=this.parent.resourceBase.lastResourceLevel[parseInt(l,10)],r=t.groupOrder);var p=this.parent.eventBase.filterEvents(s,o,this.parent.eventsProcessed,t),d=this.createMoreEventList(p,r,l);this.morePopup.element.querySelector("."+c._77).appendChild(d)}},e.prototype.closeClick=function(e){this.dialogEvent=e,"Year"===this.parent.currentView&&this.parent.activeCellsData&&this.parent.activeCellsData.element&&this.parent.selectCell(this.parent.activeCellsData.element),this.quickPopupHide(),this.morePopup.hide()},e.prototype.dialogButtonClick=function(e){this.dialogEvent=e,this.quickDialog.hide();var t=e.target,i=this.quickDialog.element.querySelector("."+c._100),n=this.parent.activeEventData.event;if(t.classList.contains(c._101))switch(this.parent.currentAction="Delete"===this.parent.currentAction?"DeleteOccurrence":"EditOccurrence",this.parent.currentAction){case"EditOccurrence":this.parent.eventWindow.openEditor(n,this.parent.currentAction);break;case"DeleteOccurrence":this.parent.crudModule.deleteEvent(n,this.parent.currentAction)}else if(t.classList.contains(c._108))switch(this.parent.currentAction="Delete"===this.parent.currentAction?"DeleteFollowingEvents":"EditFollowingEvents",this.parent.currentAction){case"EditFollowingEvents":this.parent.eventWindow.openEditor(n,this.parent.currentAction);break;case"DeleteFollowingEvents":this.parent.crudModule.deleteEvent(n,this.parent.currentAction)}else if(t.classList.contains(c._102))switch(this.parent.currentAction="Delete"===this.parent.currentAction?"DeleteSeries":"EditSeries",this.parent.currentAction){case"EditSeries":this.parent.eventWindow.openEditor(this.parent.eventBase.getParentEvent(n,!0),this.parent.currentAction);break;case"DeleteSeries":this.parent.crudModule.deleteEvent(n,this.parent.currentAction)}else t.classList.contains(c._103)?this.parent.crudModule.deleteEvent(n,this.parent.currentAction):!i.classList.contains(c.J)&&(t.classList.contains(c._99)||t.classList.contains(c._100)&&!i.classList.contains(c._104))&&(this.parent.uiStateValues.isIgnoreOccurrence=t.classList.contains(c._100),this.parent.eventWindow.eventSave(e,this.l10n.getConstant("ok")))},e.prototype.updateTapHoldEventPopup=function(e){var t=this.parent.eventBase.getSelectedEventElements(e);if(this.parent.activeEventData=this.parent.eventBase.getSelectedEvents(),t.length>0){var r=this.parent.eventBase.getEventByGuid(t[0].getAttribute("data-guid")),a=1===t.length?r[this.parent.eventFields.subject]||this.l10n.getConstant("noTitle"):"("+t.length+")&nbsp;"+this.l10n.getConstant("selectedItems");this.quickPopup.element.querySelector("."+c.H).innerHTML=a,t.length>1?i.i(n.addClass)([this.quickPopup.element.querySelector("."+c._117)],c._72):i.i(n.removeClass)([this.quickPopup.element.querySelector("."+c._117)],c._72)}else this.parent.selectedElements=[],this.quickPopupHide()},e.prototype.getTimezone=function(e){var t="";return t+=e[this.parent.eventFields.startTimezone]||"",t+=""===t?"":" - ",t+=e[this.parent.eventFields.endTimezone]||""},e.prototype.getRecurrenceSummary=function(e){var t=this.parent.eventWindow.getRecurrenceEditorInstance();if(t){var i=t.getRuleSummary(e[this.parent.eventFields.recurrenceRule]);return i.charAt(0).toUpperCase()+i.slice(1)}return""},e.prototype.getDateFormat=function(e,t){return p.a(this.parent.globalize.formatDate(e,{skeleton:t,calendar:this.parent.getCalendarMode()}),"single")},e.prototype.getDataFromTarget=function(e){if(e.classList.contains(c.A))return this.parent.activeEventData.event;var t={startTime:this.parent.activeCellsData.startTime,endTime:this.parent.activeCellsData.endTime,isAllDay:this.parent.activeCellsData.isAllDay,groupIndex:this.parent.activeCellsData.groupIndex},i=this.parent.activeCellsData;return this.parent.eventWindow.convertToEventData(i,t),t},e.prototype.beforeQuickDialogClose=function(e){var t=this,r={event:e.event||this.dialogEvent,type:i.i(n.isNullOrUndefined)(this.parent.activeEventData.event)?"ValidationAlert":i.i(n.isNullOrUndefined)(this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule])?"DeleteAlert":"RecurrenceAlert",cancel:!1,data:this.parent.activeEventData.event,element:this.quickDialog.element};this.parent.trigger(l.q,r,function(e){e.cancel||t.parent.eventBase.focusElement(!0)})},e.prototype.beforeQuickPopupOpen=function(e,t){var a=this;this.parent.renderTemplates(function(){var s=a.quickPopup.element.querySelector("."+c._123),o=a.parent.isAdaptive?s?"ViewEventInfo":"EditEventInfo":"QuickInfo",d={type:o,cancel:!1,data:i.i(n.extend)({},a.getDataFromTarget(e),null,!0),target:e,element:a.quickPopup.element};a.parent.trigger(l.p,d,function(l){if(l.cancel)a.quickPopupHide(),a.destroyPopupButtons("quickPopup"),l.element.classList.contains(c.T)&&a.quickPopupClose(),p.E(a.quickPopup.element),a.isMultipleEventSelect=!1;else{var d=a.quickPopup.element.style.display;if(a.quickPopup.element.style.display="block",a.parent.isAdaptive)a.quickPopup.element.removeAttribute("style"),a.quickPopup.element.style.display="block",a.quickPopup.element.style.height=i.i(n.formatUnit)("EditEventInfo"===o?65:window.innerHeight);else{var h=a.parent.virtualScrollModule&&a.parent.virtualScrollModule.isHorizontalScroll&&!i.i(n.isNullOrUndefined)(i.i(n.closest)(e,"."+c.h)),u=a.parent.element.querySelector("."+c.g+" table");a.quickPopup.offsetX=h&&!a.parent.enableRtl?p.k(u)+10:10,a.quickPopup.offsetY=a.parent.virtualScrollModule&&!a.parent.virtualScrollModule.isHorizontalScroll?a.quickPopup.offsetY:0,a.quickPopup.collision={X:a.parent.enableRtl?"flip":"none",Y:"fit"},a.quickPopup.position={X:a.parent.enableRtl?"left":"right",Y:a.parent.enableRtl?"bottom":"top"},a.quickPopup.dataBind(),a.quickPopup.refreshPosition(null,!0);var g=i.i(r.isCollide)(a.quickPopup.element,a.parent.element);if(g.indexOf(a.parent.enableRtl?"left":"right")>-1){a.quickPopup.offsetX=-e.offsetWidth-10-a.quickPopup.element.offsetWidth,h&&!a.parent.enableRtl&&(a.quickPopup.offsetX=p.k(u)+a.quickPopup.offsetX),a.quickPopup.dataBind(),a.quickPopup.refreshPosition(null,!0);i.i(r.isCollide)(a.quickPopup.element,a.parent.element).indexOf("left")>-1&&(a.quickPopup.position={X:"center",Y:"center"},a.quickPopup.collision={X:"fit",Y:"fit"},a.quickPopup.offsetX=-a.quickPopup.element.offsetWidth/2,a.quickPopup.dataBind())}if(a.parent.virtualScrollModule&&!a.parent.virtualScrollModule.isHorizontalScroll&&(g.indexOf("top")>-1||g.indexOf("bottom")>-1)){var v=p.j(u);a.quickPopup.offsetY=v,a.quickPopup.dataBind(),a.quickPopup.refreshPosition(null,!0)}if("center"===a.quickPopup.position.X&&"center"===a.quickPopup.position.Y&&!i.i(n.isNullOrUndefined)(t)&&t.clientX&&t.clientY){var f=t.clientX,m=t.clientY,y=e.getBoundingClientRect(),T=t.offsetY||Math.ceil(m-y.y),w=a.quickPopup.offsetY,D=i.i(r.isCollide)(a.quickPopup.element,e),b=a.quickPopup.element.getBoundingClientRect(),S=document.elementFromPoint(f,m);(D.indexOf("top")>-1||D.indexOf("bottom")>-1||i.i(n.closest)(S,"."+c._90))&&(b.top<=m&&m<=b.top+b.height?(a.quickPopup.offsetY=w-b.height-10,a.quickPopup.dataBind(),D=i.i(r.isCollide)(a.quickPopup.element,a.parent.element),D.indexOf("top")>-1&&(a.quickPopup.offsetY=w+T+10,a.quickPopup.dataBind())):i.i(r.isCollide)(a.quickPopup.element,a.parent.element).indexOf("bottom")>-1&&(a.quickPopup.offsetY=w-T-Math.ceil(b.height)-10,a.quickPopup.dataBind()))}}s&&a.applyEventColor(),a.quickPopup.element.style.display=d,a.quickPopup.dataBind(),a.quickPopup.show()}})})},e.prototype.applyEventColor=function(){var e="";e="Agenda"===this.parent.currentView||"MonthAgenda"===this.parent.currentView?this.parent.enableRtl?"border-right-color":"border-left-color":"background-color";var t=this.parent.activeEventData.element.style[e];if(""!==t){var i=this.quickPopup.element.querySelector("."+c._113),n=this.quickPopup.element.querySelector("."+c._143);n&&n.offsetParent&&(i=this.quickPopup.element.querySelector("."+c.H))&&(i.style.borderLeftColor=t,t="rgba("+t.match(/\d+/g).join()+",0.3)"),i&&(i.style.backgroundColor=t)}},e.prototype.quickPopupOpen=function(){if(this.parent.isAdaptive)return void(this.quickPopup.element.style.top="0px");if(this.quickPopup.element.querySelector("."+c._119)){var e=this.quickPopup.element.querySelector("."+c.H);e&&e.focus()}else{var t=this.quickPopup.element.querySelector("."+c._122);t&&t.focus();var i=this.quickPopup.element.querySelector("."+c._115);i&&i.focus()}},e.prototype.quickPopupClose=function(){this.parent.eventBase.focusElement(),this.quickPopup.relateTo="."+c.n,this.fieldValidator.destroyToolTip(),this.quickPopup.element.querySelectorAll(".e-formvalidator").length&&this.fieldValidator.destroy(),this.destroyPopupButtons("quickPopup"),p.E(this.quickPopup.element)},e.prototype.morePopupOpen=function(){if(this.parent.isAdaptive)return this.morePopup.element.style.top="0px",this.morePopup.element.style.left="0px",void(this.morePopup.element.style.height=i.i(n.formatUnit)(window.innerHeight));this.morePopup.element.querySelector("."+c._95).focus(),this.morePopup.refreshPosition()},e.prototype.morePopupClose=function(){var e=this.parent.element.querySelector("."+c._111);e&&i.i(n.remove)(e)},e.prototype.popupClose=function(e){this.dialogEvent=e,this.isCrudAction=!1,this.quickPopupHide(!0)},e.prototype.quickPopupHide=function(e){var t=this;if(this.quickPopup.element.classList.contains(c.T)){var i,n=this.quickPopup.element.querySelector("."+c._119);if(n){var r=this.quickPopup.element.querySelector(".e-formvalidator");if(this.isCrudAction&&r&&!r.ej2_instances[0].validate())return;var a=this.parent.eventFields,s=this.parent.eventWindow.getObjectFromFormData(c._90);this.parent.eventWindow.setDefaultValueToObject(s),s[a.id]=this.parent.eventBase.getEventMaxID(),s[a.startTime]=this.parent.activeCellsData.startTime,s[a.endTime]=this.parent.activeCellsData.endTime,s[a.isAllDay]=this.parent.activeCellsData.isAllDay,this.parent.resourceBase&&this.parent.resourceBase.setResourceValues(s),i=s}else i=this.parent.activeEventData.event;var o=this.quickPopup.element.querySelector("."+c._123),p={event:this.dialogEvent,type:this.parent.isAdaptive?o?"ViewEventInfo":"EditEventInfo":"QuickInfo",cancel:!1,data:i,element:this.quickPopup.element,target:n?this.parent.activeCellsData.element:this.parent.activeEventData.element};this.parent.trigger(l.q,p,function(i){if(!i.cancel&&t.quickPopup.element.classList.contains("e-popup-open")){if(n&&t.isCrudAction&&(t.parent.currentAction="Add",t.parent.crudModule.addEvent(i.data)),e){var r=t.quickPopup.hideAnimation;t.quickPopup.hideAnimation=null,t.quickPopup.hide(),t.quickPopup.hideAnimation=r}else t.quickPopup.hide();t.isMultipleEventSelect=!1,t.isCrudAction=!1}})}},e.prototype.navigationClick=function(e){var t=i.i(n.closest)(e.target,"."+c.p);if(!i.i(n.isNullOrUndefined)(t)){var r=this.parent.getDateFromElement(e.currentTarget);i.i(n.isNullOrUndefined)(r)||(this.closeClick(e),this.parent.setProperties({selectedDate:r},!0),this.parent.changeView(this.parent.getNavigateView(),e))}},e.prototype.documentClick=function(e){var t=e.event.target,r="."+c._90+",."+c.e+",."+c.U+",."+c.n+",."+c.A+",.e-popup",a=this.parent.element.querySelector("."+c._90);(a&&a.childElementCount>0&&!i.i(n.closest)(t,r)||!i.i(n.closest)(t,r))&&(this.quickPopupHide(),this.parent.removeNewEventElement());var s=this.parent.element.querySelector("."+c._2);s&&s!==t&&this.parent.allowInline&&this.parent.inlineModule.documentClick(),i.i(n.closest)(t,"."+c.A+",."+c.e)&&this.parent.removeNewEventElement(),i.i(n.closest)(t,"."+c._96)||!t.classList||t.classList.contains(c.z)||i.i(n.closest)(t,"."+c.T)||i.i(n.closest)(t,"."+c.n)||this.morePopup.hide()},e.prototype.onClosePopup=function(e){i.i(n.isNullOrUndefined)(e)||(this.dialogEvent=e),this.quickPopupHide(),(i.i(n.isNullOrUndefined)(e)||!i.i(n.isNullOrUndefined)(e)&&"escape"!==e.action||this.parent.inlineModule&&this.parent.element.querySelector("."+c._3))&&this.parent.eventBase.focusElement()},e.prototype.addEventListener=function(){this.parent.on(l.a,this.cellClick,this),this.parent.on(l.k,this.eventClick,this),this.parent.on(l.L,this.documentClick,this),this.parent.on(l.E,this.updateMoreEventContent,this)},e.prototype.removeEventListener=function(){this.parent.off(l.a,this.cellClick),this.parent.off(l.k,this.eventClick),this.parent.off(l.L,this.documentClick),this.parent.off(l.E,this.updateMoreEventContent)},e.prototype.destroyPopupButtons=function(e){for(var t="quickPopup"===e?this.quickPopup:this.morePopup,i=[].slice.call(t.element.querySelectorAll(".e-control.e-btn")),n=0,r=i;n<r.length;n++){var a=r[n],s=a.ej2_instances[0];s&&s.destroy()}if("quickPopup"===e){var o=t.element.querySelector("input."+c.H);o&&o.remove();var l=this.quickPopup.element.querySelector("form."+c._109);l&&(p.E(l),l.remove()),this.parent.resetTemplates(["content","header","footer"])}},e.prototype.refreshQuickDialog=function(){this.destroyQuickDialog(),this.renderQuickDialog()},e.prototype.refreshQuickPopup=function(){this.destroyQuickPopup(),this.renderQuickPopup()},e.prototype.refreshMorePopup=function(){this.destroyMorePopup(),this.renderMorePopup()},e.prototype.destroyQuickDialog=function(){this.quickDialog.element&&(this.quickDialog.destroy(),i.i(n.remove)(this.quickDialog.element),this.quickDialog=null)},e.prototype.destroyQuickPopup=function(){this.quickPopup.element&&(this.destroyPopupButtons("quickPopup"),this.quickPopup.destroy(),i.i(n.remove)(this.quickPopup.element),this.quickPopup=null)},e.prototype.destroyMorePopup=function(){this.morePopup.element&&(this.destroyPopupButtons("morePopup"),this.morePopup.destroy(),i.i(n.remove)(this.morePopup.element),this.morePopup=null)},e.prototype.destroy=function(){this.quickPopup.element.querySelectorAll(".e-formvalidator").length&&this.fieldValidator.destroy(),this.removeEventListener(),this.destroyQuickPopup(),this.destroyMorePopup(),this.destroyQuickDialog(),this.dialogEvent=null,this.parent=null,this.l10n=null,this.isCrudAction=null,this.fieldValidator=null,this.isMultipleEventSelect=null},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(0),r=(i.n(n),i(50)),a=i(26),s=i(3),o=function(){function e(e){this.parent=e}return e.prototype.render=function(e,t){void 0===t&&(t=!0),this.initializeLayout(e),this.parent.activeView&&t&&this.parent.crudModule.refreshDataManager()},e.prototype.initializeLayout=function(e){if(this.parent.activeView){var t=["cellTemplate","tooltipTemplate","majorSlotTemplate","minorSlotTemplate","headerTooltipTemplate","dateHeaderTemplate","dayHeaderTemplate","monthHeaderTemplate","headerIndentTemplate","resourceHeaderTemplate","cellHeaderTemplate","dateRangeTemplate"];this.parent.activeEventTemplates.length>0?(t=t.concat(this.parent.activeEventTemplates),this.parent.activeEventTemplates=[]):t.push("eventTemplate"),this.parent.resetTemplates(t),this.parent.activeView.removeEventListener(),this.parent.activeView.destroy()}switch(e){case"Day":this.parent.activeView=this.parent.dayModule;break;case"Week":this.parent.activeView=this.parent.weekModule;break;case"WorkWeek":this.parent.activeView=this.parent.workWeekModule;break;case"Month":this.parent.activeView=this.parent.monthModule;break;case"Year":this.parent.activeView=this.parent.yearModule;break;case"Agenda":this.parent.activeView=this.parent.agendaModule;break;case"MonthAgenda":this.parent.activeView=this.parent.monthAgendaModule;break;case"TimelineDay":this.parent.activeView=this.parent.timelineViewsModule,i.i(n.isNullOrUndefined)(this.parent.activeView)||(this.parent.activeView.viewClass="e-timeline-day-view");break;case"TimelineWorkWeek":this.parent.activeView=this.parent.timelineViewsModule,i.i(n.isNullOrUndefined)(this.parent.activeView)||(this.parent.activeView.viewClass="e-timeline-work-week-view");break;case"TimelineWeek":this.parent.activeView=this.parent.timelineViewsModule,i.i(n.isNullOrUndefined)(this.parent.activeView)||(this.parent.activeView.viewClass="e-timeline-week-view");break;case"TimelineMonth":this.parent.activeView=this.parent.timelineMonthModule;break;case"TimelineYear":this.parent.activeView=this.parent.timelineYearModule}if(i.i(n.isNullOrUndefined)(this.parent.activeView)){var o=this.parent.viewCollections[0].option;if(o)return this.parent.setProperties({currentView:o},!0),this.parent.headerModule&&(this.parent.headerModule.updateActiveView(),this.parent.headerModule.setCalendarView()),console.warn('[WARNING] :: Module "'+e+'" is not available in Schedule component! You either misspelled the module name or forgot to load it.'),this.initializeLayout(o);throw Error("Inject required modules")}this.parent.uiStateValues.scheduleHeight=this.parent.element.offsetHeight,this.parent.activeView.viewIndex=this.parent.viewIndex,this.updateLabelText(e),this.parent.activeView.addEventListener(),this.parent.activeView.getRenderDates(),this.parent.uiStateValues.isGroupAdaptive=this.parent.activeViewOptions.group.resources.length>0&&(this.parent.enableAdaptiveUI&&!this.parent.isAdaptive||this.parent.isAdaptive&&this.parent.activeViewOptions.group.enableCompactView),this.parent.virtualScrollModule&&(this.parent.virtualScrollModule.destroy(),this.parent.virtualScrollModule=null),(-1===["Agenda","MonthAgenda","Year","TimelineYear"].indexOf(this.parent.currentView)||"TimelineYear"===this.parent.currentView&&"Vertical"===this.parent.activeViewOptions.orientation)&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(this.parent.virtualScrollModule=new r.a(this.parent),this.parent.activeView.isTimelineView()?this.parent.uiStateValues.top=0:(this.parent.virtualScrollModule.isHorizontalScroll=!0,this.parent.uiStateValues.left=0)),this.updateHeader(),this.parent.currentTimezoneDate=this.parent.getCurrentTime(),this.parent.activeView.renderLayout(s._148),this.parent.renderTemplates(),this.parent.eventTooltip&&(this.parent.eventTooltip.destroy(),this.parent.eventTooltip=null),(this.parent.eventSettings.enableTooltip||this.parent.activeViewOptions.group.resources.length>0&&this.parent.activeViewOptions.group.headerTooltipTemplate)&&(this.parent.eventTooltip=new a.a(this.parent))},e.prototype.updateHeader=function(){this.parent.headerModule&&(this.parent.headerModule.setDayOfWeek(this.parent.activeViewOptions.firstDayOfWeek),this.parent.activeViewOptions.readonly?i.i(n.addClass)([this.parent.element],s._56):this.parent.element.classList.contains(s._56)&&i.i(n.removeClass)([this.parent.element],s._56),this.parent.headerModule.updateDateRange(),this.parent.headerModule.updateHeaderItems("remove"))},e.prototype.updateLabelText=function(e){var t=this.parent.activeView.getLabelText(e);this.parent.element.setAttribute("role","application"),this.parent.element.setAttribute("aria-label",t)},e}()},function(e,t){e.exports=l},function(e,t){e.exports=c}])});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionNavigations"),require("SyncfusionCalendars"),require("SyncfusionData"),require("SyncfusionButtons"),require("SyncfusionInputs"),require("SyncfusionDropdowns"),require("SyncfusionLists"),require("SyncfusionExcelExport")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionPopups","SyncfusionNavigations","SyncfusionCalendars","SyncfusionData","SyncfusionButtons","SyncfusionInputs","SyncfusionDropdowns","SyncfusionLists","SyncfusionExcelExport"],t):"object"==typeof exports?exports.SyncfusionSchedule=t(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionNavigations"),require("SyncfusionCalendars"),require("SyncfusionData"),require("SyncfusionButtons"),require("SyncfusionInputs"),require("SyncfusionDropdowns"),require("SyncfusionLists"),require("SyncfusionExcelExport")):e.SyncfusionSchedule=t(e.SyncfusionBase,e.SyncfusionPopups,e.SyncfusionNavigations,e.SyncfusionCalendars,e.SyncfusionData,e.SyncfusionButtons,e.SyncfusionInputs,e.SyncfusionDropdowns,e.SyncfusionLists,e.SyncfusionExcelExport)}(self,((e,t,i,n,r,a,s,o,l,p)=>(()=>{"use strict";var c={766:t=>{t.exports=e},741:e=>{e.exports=a},570:e=>{e.exports=n},74:e=>{e.exports=r},778:e=>{e.exports=o},437:e=>{e.exports=p},323:e=>{e.exports=s},90:e=>{e.exports=l},215:e=>{e.exports=i},197:e=>{e.exports=t}},h={};function d(e){var t=h[e];if(void 0!==t)return t.exports;var i=h[e]={exports:{}};return c[e](i,i.exports,d),i.exports}d.d=(e,t)=>{for(var i in t)d.o(t,i)&&!d.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return(()=>{d.r(u),d.d(u,{Agenda:()=>al,DEFAULT_WEEKS:()=>_,Day:()=>_o,DragAndDrop:()=>Uo,ExcelExport:()=>yl,Gregorian:()=>gr,HeaderRenderer:()=>lr,ICalendarExport:()=>vl,ICalendarImport:()=>ml,Islamic:()=>vr,MS_PER_DAY:()=>G,MS_PER_MINUTE:()=>X,Month:()=>Jo,MonthAgenda:()=>ol,Print:()=>Tl,RecurrenceEditor:()=>Ys,Resize:()=>Lo,Schedule:()=>Ho,TimelineMonth:()=>dl,TimelineViews:()=>cl,TimelineYear:()=>gl,Timezone:()=>mr,ViewBase:()=>Bo,WEEK_LENGTH:()=>Y,Week:()=>Xo,WorkWeek:()=>Ko,Year:()=>el,actionBegin:()=>p,actionComplete:()=>c,actionFailure:()=>h,addDays:()=>pe,addMonths:()=>ce,addYears:()=>he,capitalizeFirstWord:()=>xe,cellClick:()=>r,cellDoubleClick:()=>a,cellMouseDown:()=>z,cellSelect:()=>I,contentReady:()=>N,dataBinding:()=>T,dataBound:()=>w,dataReady:()=>j,documentClick:()=>W,drag:()=>C,dragStart:()=>S,dragStop:()=>O,eventClick:()=>m,eventDoubleClick:()=>f,eventRendered:()=>y,eventsLoaded:()=>L,extractObjectFromRule:()=>Ur,findIndexInData:()=>we,firstDateOfMonth:()=>te,generate:()=>wr,generateSummary:()=>yr,getCalendarUtil:()=>Gr,getDateCount:()=>le,getDateFromRecurrenceDateString:()=>Dr,getDateFromString:()=>ve,getDateInMs:()=>oe,getDaysCount:()=>ge,getElementHeight:()=>Ae,getElementHeightFromClass:()=>Q,getElementTop:()=>Ie,getElementWidth:()=>Ve,getElementWidthFromClass:()=>K,getMaxDays:()=>ue,getOuterHeight:()=>De,getRecurrenceStringFromDate:()=>va,getScrollBarWidth:()=>ye,getStartEndHours:()=>de,getTranslateX:()=>J,getTranslateY:()=>Z,getUniversalTime:()=>Ce,getWeekFirstDate:()=>$,getWeekLastDate:()=>ee,getWeekMiddleDate:()=>re,getWeekNumber:()=>ne,hover:()=>l,initialEnd:()=>H,initialLoad:()=>R,inlineClick:()=>A,isDaylightSavingTime:()=>Se,isIPadDevice:()=>Ee,isMobile:()=>Oe,lastDateOfMonth:()=>ie,moreEventsClick:()=>s,navigating:()=>g,popupClose:()=>b,popupOpen:()=>D,print:()=>P,removeChildren:()=>be,renderCell:()=>v,resetScrollbarWidth:()=>Te,resetTime:()=>se,resizeStart:()=>E,resizeStop:()=>V,resizing:()=>x,scroll:()=>q,scrollUiUpdate:()=>U,select:()=>o,setTime:()=>ae,timezoneData:()=>fr,uiUpdate:()=>B,virtualScroll:()=>F,virtualScrollStart:()=>M,virtualScrollStop:()=>k});var e=d(766),t=d(197),i=d(215),n=d(570),r="cellClick",a="cellDoubleClick",s="moreEventsClick",o="select",l="hover",p="actionBegin",c="actionComplete",h="actionFailure",g="navigating",v="renderCell",m="eventClick",f="eventDoubleClick",y="eventRendered",T="dataBinding",w="dataBound",D="popupOpen",b="popupClose",S="dragStart",C="drag",O="dragStop",E="resizeStart",x="resizing",V="resizeStop",A="inlineClick",I="cellSelect",M="virtualScrollStart",k="virtualScrollStop",R="initial-load",H="initial-end",P="print",j="data-ready",L="events-loaded",N="content-ready",q="scroll",F="virtual-scroll",U="scroll-ui-update",B="ui-update",W="document-click",z="cell-mouse-down",Y=7,_=6,G=864e5,X=6e4;function Q(t,i){var n,r=(0,e.createElement)("div",{className:i}).cloneNode();return r.style.visibility="hidden",r.style.position="absolute",t.appendChild(r),n=Ae(r),(0,e.remove)(r),n}function K(t,i){var n,r=(0,e.createElement)("div",{className:i}).cloneNode();return r.style.visibility="hidden",r.style.position="absolute",t.appendChild(r),n=Ve(r),(0,e.remove)(r),n}function Z(e){var t=getComputedStyle(e);return window.WebKitCSSMatrix?new WebKitCSSMatrix(t.webkitTransform).m42:0}function J(e){var t=getComputedStyle(e);return window.WebKitCSSMatrix?new WebKitCSSMatrix(t.webkitTransform).m41:0}function $(e,t){var i=new Date(e.getTime());return t=(t-i.getDay()-7)%7,new Date(i.setDate(i.getDate()+(isNaN(t)?0:t)))}function ee(e,t){var i=$(e,t),n=new Date(i.getFullYear(),i.getMonth(),i.getDate()+6);return new Date(n.getTime())}function te(e){return new Date(e.getFullYear(),e.getMonth(),1)}function ie(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function ne(e){var t=new Date(e.getFullYear(),0,1).valueOf(),i=(new Date(e.getFullYear(),e.getMonth(),e.getDate()).valueOf()-t+G)/G;return Math.ceil(i/7)}function re(e,t){return new Date(t.valueOf()-(t.valueOf()-e.valueOf())/2)}function ae(e,t){var i=e.getTimezoneOffset(),n=new Date(e.getTime()+t),r=n.getTimezoneOffset()-i;return e.setTime(n.getTime()+r*X),e}function se(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function oe(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0).getTimezoneOffset(),i=e.getTimezoneOffset()-t;return e.getTime()-new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0).getTime()-60*i*1e3}function le(e,t){return Math.ceil((t.getTime()-e.getTime())/G)}function pe(e,t){return e=new Date(""+e),new Date(e.setDate(e.getDate()+t))}function ce(e,t){var i=(e=new Date(""+e)).getDate();return e.setDate(1),e.setMonth(e.getMonth()+t),e.setDate(Math.min(i,ue(e))),e}function he(e,t){var i=(e=new Date(""+e)).getDate();return e.setDate(1),e.setFullYear(e.getFullYear()+t),e.setDate(Math.min(i,ue(e))),e}function de(e,t,i){var n=new Date(e.getTime());n.setHours(t.getHours()),n.setMinutes(t.getMinutes()),n.setSeconds(t.getSeconds());var r=new Date(e.getTime());return 0===i.getHours()?r=pe(r,1):(r.setHours(i.getHours()),r.setMinutes(i.getMinutes()),r.setSeconds(i.getSeconds())),{startHour:n,endHour:r}}function ue(e){return ie(e).getDate()}function ge(e,t){var i=se(new Date(e)),n=se(new Date(t));return Math.round((n.getTime()-i.getTime())/G)}function ve(e){return-1!==e.indexOf("Date")?new Date(parseInt(e.match(/\d+/g).toString(),10)):-1!==e.indexOf("T")?new Date(e):new Date(e.replace(/-/g,"/"))}var me=null,fe=null;function ye(){if(null!==me)return me;null===fe&&(fe=window.devicePixelRatio||window.screen.availWidth/document.documentElement.clientWidth);var t,i=(0,e.createElement)("div");i.style.cssText="width:100px;height: 100px;overflow: scroll;position: absolute;top: -9999px;",document.body.appendChild(i);var n=devicePixelRatio?"1.10"===devicePixelRatio.toFixed(2)||devicePixelRatio<=1?Math.ceil(devicePixelRatio%1):Math.floor(devicePixelRatio%1):0;return t=i.offsetWidth-i.clientWidth-n|0,document.body.removeChild(i),me=t}function Te(){var e=window.devicePixelRatio||window.screen.availWidth/document.documentElement.clientWidth;fe&&fe!==e&&(me=null,fe=e)}function we(e,t,i,n,r){for(var a=0,s=e.length;a<s;a++)if(e[parseInt(a.toString(),10)][""+t]===i){if(!n)return a;var o=r.slice(-2)[0].field;if((n[""+o]instanceof Array?n[""+o]:[n[""+o]]).join(",").includes(e[parseInt(a.toString(),10)][r.slice(-1)[0].groupIDField]))return a}return-1}function De(e){var t=getComputedStyle(e);return e.offsetHeight+(parseInt(t.marginTop,10)||0)+(parseInt(t.marginBottom,10)||0)}function be(e){for(var t=0,i=[].slice.call(e.children);t<i.length;t++){var n=i[t];e.removeChild(n)}}function Se(e){var t=new Date(e.getFullYear(),0,1),i=new Date(e.getFullYear(),6,1);return e.getTimezoneOffset()<Math.max(t.getTimezoneOffset(),i.getTimezoneOffset())}function Ce(e){var t=e.getFullYear(),i=e.getMonth(),n=e.getDate(),r=e.getHours(),a=e.getMinutes(),s=e.getSeconds(),o=e.getMilliseconds();return Date.UTC(t,i,n,r,a,s,o)}function Oe(){return window.navigator.userAgent.toLowerCase().indexOf("mobi")>-1}function Ee(){return window.navigator.userAgent.toLowerCase().indexOf("ipad")>-1}function xe(t,i){if("multiple"===i)t=t.split(" ").map((function(e){return e.charAt(0).toLocaleUpperCase()+e.substring(1)})).join(" ");else if("single"===i){if(t[0]>="0"&&t[0]<="9"){var n=t.match(/[a-zA-Z]/);t=(0,e.isNullOrUndefined)(n)?t:t.slice(0,n.index)+t[n.index].toLocaleUpperCase()+t.slice(n.index+1)}t=t[0].toLocaleUpperCase()+t.slice(1)}return t}function Ve(e){return document.body.style.transform.includes("scale")?e.offsetWidth:e.getBoundingClientRect().width}function Ae(e){return document.body.style.transform.includes("scale")?e.offsetHeight:e.getBoundingClientRect().height}function Ie(e){return document.body.style.transform.includes("scale")?e.offsetTop:e.getBoundingClientRect().top}var Me="e-schedule",ke="e-rtl",Re="e-device",He="e-adaptive",Pe="e-multi-drag",je="e-icons",Le="e-enable",Ne="e-disable",qe="e-table-container",Fe="e-schedule-table",Ue="e-all-day-cells",Be="e-all-day-row",We="e-content-table",ze="e-work-cells",Ye="e-work-hours",_e="e-popup-open",Ge="e-date-header-wrap",Xe="e-date-header-container",Qe="e-header-cells",Ke="e-work-days",Ze="e-other-month",Je="e-current-day",$e="e-current-date",et="e-current-panel",tt="e-previous-panel",it="e-next-panel",nt="e-translate",rt="e-left-indent",at="e-left-indent-wrap",st="e-event-table",ot="e-resource-group-cells",lt="e-resource-text",pt="e-resource-column-wrap",ct="e-resource-column-table",ht="e-child-node",dt="e-parent-node",ut="e-resource-expand",gt="e-resource-collapse",vt="e-resource-tree-icon",mt="e-resource-cells",ft="e-time-cells-wrap",yt="e-time-cells",Tt="e-time-slots",wt="e-alternate-cells",Dt="e-current-time",bt="e-current-timeline",St="e-previous-timeline",Ct="e-hide-childs",Ot="e-scroll-container",Et="e-timeline-wrapper",xt="e-appointment-wrapper",Vt="e-appointment-wrapper-hidden",At="e-day-wrapper",It="e-schedule-resource-toolbar-container",Mt="e-schedule-toolbar",kt="e-schedule-resource-toolbar",Rt="e-selected-cell",Ht="e-week-number-wrapper",Pt="e-week-number",jt="e-appointment-wrap",Lt="e-wrapper-container",Nt="e-appointment-container",qt="e-appointment",Ft="e-block-appointment",Ut="e-block-indicator",Bt="e-appointment-border",Wt="e-appointment-details",zt="e-subject-wrap",Yt="e-resource-name",_t="e-time",Gt="e-table-wrap",Xt="e-outer-table",Qt="e-content-wrap",Kt="e-virtual-track",Zt="e-agenda-cells",Jt="e-current-day",$t="e-active-appointment-agenda",ei="e-month-header",ti="e-day-date-header",ii="e-date-column",ni="e-navigate",ri="e-date-header",ai="e-day-border",si="e-date-time",oi="e-no-event",li="e-appointment-indicator",pi="e-indicator",ci="e-left-icon",hi="e-right-icon",di="e-event-action",ui="e-new-event",gi="e-schedule-event-clone",vi="e-clone-time-indicator",mi="e-drag-clone",fi="e-event-resize",yi="e-resize-clone",Ti="e-left-handler",wi="e-right-handler",Di="e-top-handler",bi="e-bottom-handler",Si="e-recurrence-icon",Ci="e-recurrence-edit-icon",Oi="e-header-row",Ei="e-all-day-appointment-wrapper",xi="e-all-day-appointment",Vi="e-appointment-hide",Ai="e-row-count-wrapper",Ii="e-all-day-appointment-section",Mi="e-appointment-expand",ki="e-appointment-collapse",Ri="e-more-indicator",Hi="e-cell-popup",Pi="e-event-popup",ji="e-popup-header",Li="e-header-icon-wrapper",Ni="e-popup-footer",qi="e-date-time-details",Fi="e-event-details",Ui="e-event-create",Bi="e-event-edit",Wi="e-event-delete",zi="e-text-ellipsis",Yi="e-more-popup-wrapper",_i="e-more-event-popup",Gi="e-more-event-date-header",Xi="e-header-day",Qi="e-header-date",Ki="e-more-event-close",Zi="e-more-event-content",Ji="e-more-appointment-wrapper",$i="e-quick-dialog-occurrence-event",en="e-quick-dialog-series-event",tn="e-quick-dialog-following-events",nn="e-following-events-dialog",rn="e-quick-dialog-delete",an="e-quick-dialog-cancel",sn="e-quick-alertok",on="e-quick-alertcancel",ln="e-quick-alertfollowing",pn="e-quick-dialog-alert-btn",cn="e-schedule-dialog",hn="e-schedule-form",dn="e-all-day",un="e-time-zone",gn="e-repeat",vn="e-subject",mn="e-location",fn="e-location-details",yn="e-start",Tn="e-end",wn="e-description",Dn="e-description-details",bn="e-time-zone-row",Sn="e-start-time-zone",Cn="e-end-time-zone",On="e-save-icon",En="e-event-cancel",xn="e-event-save",Vn="e-title-text",An="e-icon-disable",In="e-edit",Mn="e-edit-icon",kn="e-delete",Rn="e-delete-icon",Hn="e-close",Pn="e-close-icon",jn="e-schedule-error",Ln="e-animate",Nn="e-hidden",qn="e-disable-dates",Fn="e-quick-popup-wrapper",Un="e-resource-menu",Bn="e-icon-menu",Wn="e-resource-level-title",zn="e-resource-tree-popup-overlay",Yn="e-resource-tree-popup",_n="e-resource",Gn="e-resource-icon",Xn="e-resource-details",Qn="e-date-time-icon",Kn="e-virtual-scroll",Zn="e-icon-disable",Jn="e-auto-height",$n="e-ignore-whitespace",er="e-read-only",tr="e-month-header-wrapper",ir="e-inline-subject",nr="e-inline-appointment",rr="e-scroll-hidden",ar="e-all-day-scroll",sr="e-all-day-auto",or=function(){return or=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},or.apply(this,arguments)},lr=function(){function r(e){this.parent=e,this.l10n=this.parent.localeObj,this.renderHeader(),this.addEventListener()}return r.prototype.addEventListener=function(){this.parent.on(W,this.closeHeaderPopup,this)},r.prototype.removeEventListener=function(){this.parent.off(W,this.closeHeaderPopup)},r.prototype.closeHeaderPopup=function(t){var i=(0,e.closest)(t.event.target,".e-date-range,.e-header-popup,.e-day,.e-selected"),n=(0,e.closest)(t.event.target,".e-hor-nav,.e-toolbar-pop"),r=this.parent.element.querySelector("."+Qt);if(this.parent.isAdaptive)if((0,e.isNullOrUndefined)(n)||!n.classList.contains("e-toolbar-pop")&&!n.classList.contains("e-hor-nav")||n.classList.contains("e-hor-nav")&&this.element.querySelector(".e-toolbar-pop").classList.contains(_e)){(0,e.removeClass)([r],rr);var a=this.element.querySelector(".e-toolbar-pop");if(!(0,e.isNullOrUndefined)(a)){var s=a.ej2_instances[0];!s||!(0,e.isNullOrUndefined)(n)&&n.classList.contains("e-hor-nav")&&a.classList.contains(_e)||s.hide()}}else(0,e.addClass)([r],rr);(0,e.isNullOrUndefined)(i)&&this.hideHeaderPopup()},r.prototype.hideHeaderPopup=function(){this.headerPopup&&this.headerPopup.hide()},r.prototype.renderHeader=function(){this.element=(0,e.createElement)("div",{className:"e-schedule-toolbar-container"});var t=(0,e.createElement)("div",{className:Mt});this.element.appendChild(t),this.parent.element.insertBefore(this.element,this.parent.element.firstElementChild),this.renderToolbar()},r.prototype.renderToolbar=function(){var e=this,t=this.parent.toolbarItems&&this.parent.toolbarItems.length>0?this.getToolbarItems():this.getItems();this.parent.trigger(p,{requestType:"toolbarItemRendering",items:t},(function(t){e.toolbarObj=new i.Toolbar({items:t.items,overflowMode:"Popup",clicked:e.toolbarClickHandler.bind(e),enableRtl:e.parent.enableRtl,enableHtmlSanitizer:e.parent.enableHtmlSanitizer,locale:e.parent.locale}),e.toolbarObj.root=e.parent.root?e.parent.root:e.parent,e.toolbarObj.appendTo(e.parent.element.querySelector("."+Mt)),e.toolbarObj.element.setAttribute("aria-label","Scheduler");var n=e.toolbarObj.element.querySelector(".e-prev");n&&n.firstElementChild.setAttribute("title",e.l10n.getConstant("previous"));var r=e.toolbarObj.element.querySelector(".e-next");r&&r.firstElementChild.setAttribute("title",e.l10n.getConstant("next")),e.updateAddIcon(),e.updateActiveView(),e.parent.trigger(c,{requestType:"toolBarItemRendered",items:e.toolbarObj.items})}))},r.prototype.updateItems=function(){var e=this;if(this.toolbarObj){var t=this.getItems();this.parent.trigger(p,{requestType:"toolbarItemRendering",items:t},(function(t){e.toolbarObj.items=t.items,e.toolbarObj.dataBind(),e.parent.trigger(c,{requestType:"toolBarItemRendered",items:e.toolbarObj.items})}))}},r.prototype.getPopUpRelativeElement=function(){return this.parent.isAdaptive?this.toolbarObj.element:this.element.querySelector(".e-date-range")},r.prototype.setDayOfWeek=function(e){this.headerCalendar&&(this.headerCalendar.firstDayOfWeek=e,this.headerCalendar.dataBind())},r.prototype.setCalendarDate=function(e){this.headerCalendar&&(this.headerCalendar.value=e,this.headerCalendar.dataBind())},r.prototype.setCalendarMinMaxDate=function(){this.headerCalendar&&(this.headerCalendar.min=this.parent.minDate,this.headerCalendar.max=this.parent.maxDate,this.headerCalendar.dataBind())},r.prototype.getCalendarView=function(){return["Month","MonthAgenda","TimelineMonth"].indexOf(this.parent.currentView)>-1?"Year":["Year","TimelineYear"].indexOf(this.parent.currentView)>-1?"Decade":"Month"},r.prototype.setCalendarView=function(){if(this.headerCalendar){var e=this.getCalendarView();this.headerCalendar.depth=e,this.headerCalendar.start=e,this.headerCalendar.refresh()}},r.prototype.updateActiveView=function(){var t=[].slice.call(this.toolbarObj.element.querySelectorAll(".e-views"));(0,e.removeClass)(t,["e-active-view"]),t.length>0&&t[this.parent.viewIndex]&&(0,e.addClass)([t[this.parent.viewIndex]],["e-active-view"])},r.prototype.updateDateRange=function(t){var i=this.toolbarObj.element.querySelector(".e-date-range");if(i){i.firstElementChild.setAttribute("aria-haspopup","true");var n=i.querySelector(".e-tbar-btn-text");if(this.parent.activeViewOptions.dateRangeTemplate){n.textContent="";var r={startDate:this.parent.activeView.getStartDate(),endDate:this.parent.activeView.getEndDate(),currentView:this.parent.currentView},a=this.parent.activeViewOptions.dateRangeTemplateName,s=this.parent.element.id+"_"+a+"dateRangeTemplate",o=[].slice.call(this.parent.getDateRangeTemplate()(r,this.parent,"dateRangeTemplate",s,!1,void 0,void 0,this.parent.root));(0,e.append)(o,n)}else{var l=this.parent.activeView.getDateRangeText(t);i.firstElementChild.setAttribute("aria-label",l),n.textContent=l}this.refresh()}},r.prototype.refresh=function(){this.toolbarObj&&this.toolbarObj.refreshOverflow()},r.prototype.updateAddIcon=function(){var t=this.toolbarObj.element.querySelector(".e-add");t&&(this.parent.eventSettings.allowAdding?(0,e.removeClass)([t],Nn):(0,e.addClass)([t],Nn))},r.prototype.getDateRangeText=function(){return xe(this.parent.globalize.formatDate(this.parent.selectedDate,{format:"MMMM y",calendar:this.parent.getCalendarMode()}),"single")},r.prototype.getItemModel=function(e){var t={};return e.id&&(t.id=e.id),e.text&&(t.text=e.text),e.tooltipText&&(t.tooltipText=e.tooltipText),e.prefixIcon&&(t.prefixIcon=e.prefixIcon),e.cssClass&&(t.cssClass=e.cssClass),"Both"!==e.showTextOn&&(t.showTextOn=e.showTextOn),e.template&&(t.template=e.template),e.disabled&&(t.disabled=e.disabled),"auto"!==e.width&&(t.width=e.width),e.suffixIcon&&(t.suffixIcon=e.suffixIcon),"Left"!==e.align&&(t.align=e.align),"None"!==e.overflow&&(t.overflow=e.overflow),e.htmlAttributes&&(t.htmlAttributes=e.htmlAttributes),"Button"!==e.type&&(t.type=e.type),!0!==e.visible&&(t.visible=e.visible),e.showAlwaysInPopup&&(t.showAlwaysInPopup=e.showAlwaysInPopup),-1!==e.tabIndex&&(t.tabIndex=e.tabIndex),t},r.prototype.getToolbarItems=function(){for(var t,i=[],n=0,r=this.parent.toolbarItems;n<r.length;n++){var a=r[n];t=this.getItemModel(a);var s=void 0;if(a.name)switch(a.name){case"Today":(s={showAlwaysInPopup:this.parent.isAdaptive||this.parent.enableAdaptiveUI,prefixIcon:"e-icon-today",text:this.l10n.getConstant("today"),cssClass:"e-today",overflow:"Show"}).align=t.align?t.align:a.align,i.push(or({},s,t));break;case"Previous":(s={prefixIcon:"e-icon-prev",tooltipText:"Previous",overflow:"Show",cssClass:"e-prev",htmlAttributes:{role:"navigation"}}).align=t.align?t.align:a.align,i.push(or({},s,t));break;case"Next":(s={prefixIcon:"e-icon-next",tooltipText:"Next",overflow:"Show",cssClass:"e-next",htmlAttributes:{role:"navigation"}}).align=t.align?t.align:a.align,i.push(or({},s,t));break;case"DateRangeText":(s={text:this.getDateRangeText(),suffixIcon:"e-icon-down-arrow",cssClass:"e-date-range",overflow:"Show",htmlAttributes:{"aria-atomic":"true","aria-live":"assertive",role:"navigation"}}).align=t.align?t.align:a.align,i.push(or({},s,t));break;case"NewEvent":(s={showAlwaysInPopup:this.parent.isAdaptive||this.parent.enableAdaptiveUI,prefixIcon:"e-icon-add",text:this.l10n.getConstant("newEvent"),cssClass:"e-add",overflow:"Show"}).align=t.align?t.align:a.align,i.push(or({},s,t));break;case"Views":if(!(0,e.isNullOrUndefined)(this.parent.views)&&this.parent.views.length>1)for(var o=0,l=this.parent.views;o<l.length;o++){var p=l[o];(s=this.getItemObject(p)).align=t.align?t.align:a.align,i.push(or({},s,t))}break;case"Custom":i.push(a)}else i.push(a)}return i},r.prototype.getItems=function(){var t=[];if(t.push({align:"Left",prefixIcon:"e-icon-prev",tooltipText:"Previous",overflow:"Show",cssClass:"e-prev"}),t.push({align:"Left",prefixIcon:"e-icon-next",tooltipText:"Next",overflow:"Show",cssClass:"e-next"}),t.push({align:"Left",text:this.getDateRangeText(),suffixIcon:"e-icon-down-arrow",cssClass:"e-date-range",overflow:"Show",htmlAttributes:{"aria-atomic":"true","aria-live":"assertive"}}),this.parent.isAdaptive||this.parent.enableAdaptiveUI?(t.push({align:"Right",showAlwaysInPopup:this.parent.isAdaptive||this.parent.enableAdaptiveUI,prefixIcon:"e-icon-add",text:this.l10n.getConstant("newEvent"),cssClass:"e-add",overflow:"Show"}),t.push({align:"Right",showAlwaysInPopup:this.parent.isAdaptive||this.parent.enableAdaptiveUI,prefixIcon:"e-icon-today",text:this.l10n.getConstant("today"),cssClass:"e-today",overflow:"Show"})):(t.push({align:"Right",showAlwaysInPopup:this.parent.isAdaptive||this.parent.enableAdaptiveUI,prefixIcon:"e-icon-today",text:this.l10n.getConstant("today"),cssClass:"e-today",overflow:"Show"}),!(0,e.isNullOrUndefined)(this.parent.views)&&this.parent.views.length>1&&t.push({align:"Right",type:"Separator",cssClass:"e-schedule-seperator"})),!(0,e.isNullOrUndefined)(this.parent.views)&&this.parent.views.length>1)for(var i=0,n=this.parent.views;i<n.length;i++){var r=n[i];t.push(this.getItemObject(r))}return t},r.prototype.getItemObject=function(e){var t,i,n;"string"==typeof e?(t=e.toLowerCase(),i=null):(t=e.option.toLowerCase(),i=e.displayName);var r=this.parent.isAdaptive||this.parent.enableAdaptiveUI;switch(t){case"day":n={align:"Right",showAlwaysInPopup:r,prefixIcon:"e-icon-day",text:i||this.l10n.getConstant("day"),cssClass:"e-views e-day"};break;case"week":n={align:"Right",showAlwaysInPopup:r,prefixIcon:"e-icon-week",text:i||this.l10n.getConstant("week"),cssClass:"e-views e-week"};break;case"workweek":n={align:"Right",showAlwaysInPopup:r,prefixIcon:"e-icon-workweek",text:i||this.l10n.getConstant("workWeek"),cssClass:"e-views e-work-week"};break;case"month":n={align:"Right",showAlwaysInPopup:r,prefixIcon:"e-icon-month",text:i||this.l10n.getConstant("month"),cssClass:"e-views e-month"};break;case"year":n={align:"Right",showAlwaysInPopup:r,prefixIcon:"e-icon-year",text:i||this.l10n.getConstant("year"),cssClass:"e-views e-year"};break;case"agenda":n={align:"Right",showAlwaysInPopup:r,prefixIcon:"e-icon-agenda",text:i||this.l10n.getConstant("agenda"),cssClass:"e-views e-agenda"};break;case"monthagenda":n={align:"Right",showAlwaysInPopup:r,prefixIcon:"e-icon-month-agenda",text:i||this.l10n.getConstant("monthAgenda"),cssClass:"e-views e-month-agenda"};break;case"timelineday":n={align:"Right",showAlwaysInPopup:r,prefixIcon:"e-icon-timeline-day",text:i||this.l10n.getConstant("timelineDay"),cssClass:"e-views e-timeline-day"};break;case"timelineweek":n={align:"Right",showAlwaysInPopup:r,prefixIcon:"e-icon-timeline-week",text:i||this.l10n.getConstant("timelineWeek"),cssClass:"e-views e-timeline-week"};break;case"timelineworkweek":n={align:"Right",showAlwaysInPopup:r,prefixIcon:"e-icon-timeline-workweek",text:i||this.l10n.getConstant("timelineWorkWeek"),cssClass:"e-views e-timeline-work-week"};break;case"timelinemonth":n={align:"Right",showAlwaysInPopup:r,prefixIcon:"e-icon-timeline-month",text:i||this.l10n.getConstant("timelineMonth"),cssClass:"e-views e-timeline-month"};break;case"timelineyear":n={align:"Right",showAlwaysInPopup:r,prefixIcon:"e-icon-timeline-year-"+("Vertical"===e.orientation?"vertical":"horizontal"),text:i||this.l10n.getConstant("timelineYear"),cssClass:"e-views e-timeline-year"}}return n},r.prototype.renderHeaderPopup=function(){var i=(0,e.createElement)("div",{className:"e-header-popup"}),r=(0,e.createElement)("div",{className:"e-header-calendar"});i.appendChild(r),this.element.appendChild(i),this.headerPopup=new t.Popup(i,{actionOnScroll:"hide",targetType:"relative",relateTo:this.getPopUpRelativeElement(),position:{X:"left",Y:"bottom"},enableRtl:this.parent.enableRtl});var a=this.getCalendarView(),s="Month"===this.parent.currentView&&!(0,e.isNullOrUndefined)(this.parent.activeViewOptions.displayDate)&&!this.hasSelectedDate();this.headerCalendar=new n.Calendar({value:s?this.parent.activeViewOptions.displayDate:this.parent.selectedDate,min:this.parent.minDate,max:this.parent.maxDate,firstDayOfWeek:this.parent.activeViewOptions.firstDayOfWeek,enableRtl:this.parent.enableRtl,locale:this.parent.locale,depth:a,start:a,calendarMode:this.parent.calendarMode,change:this.calendarChange.bind(this)}),this.setCalendarTimezone(),this.headerCalendar.appendTo(r),this.headerPopup.hide()},r.prototype.calendarChange=function(e){if(e.value.getTime()!==this.parent.selectedDate.getTime()){var t=se(new Date(e.value));this.parent.changeDate(t)}this.headerPopup.hide()},r.prototype.setCalendarTimezone=function(){this.headerCalendar&&(this.headerCalendar.timezone=this.parent.timezone||this.parent.tzModule.getLocalTimezoneName())},r.prototype.calculateViewIndex=function(t){var i=(0,e.closest)(t.originalEvent.target,".e-views");return[].slice.call(this.element.querySelectorAll(".e-views")).indexOf(i)},r.prototype.toolbarClickHandler=function(t){if(t.item){var i,n,r;switch(t.item.cssClass.replace("e-views ","")){case"e-date-range":this.headerPopup||this.renderHeaderPopup(),this.headerPopup.element.classList.contains(_e)?this.headerPopup.hide():this.headerPopup.show();break;case"e-day":this.parent.changeView("Day",t.originalEvent,void 0,this.calculateViewIndex(t));break;case"e-week":this.parent.changeView("Week",t.originalEvent,void 0,this.calculateViewIndex(t));break;case"e-work-week":this.parent.changeView("WorkWeek",t.originalEvent,void 0,this.calculateViewIndex(t));break;case"e-month":this.parent.changeView("Month",t.originalEvent,void 0,this.calculateViewIndex(t));break;case"e-year":this.parent.changeView("Year",t.originalEvent,void 0,this.calculateViewIndex(t));break;case"e-agenda":this.parent.changeView("Agenda",t.originalEvent,void 0,this.calculateViewIndex(t));break;case"e-month-agenda":this.parent.changeView("MonthAgenda",t.originalEvent,void 0,this.calculateViewIndex(t));break;case"e-timeline-day":this.parent.changeView("TimelineDay",t.originalEvent,void 0,this.calculateViewIndex(t));break;case"e-timeline-week":this.parent.changeView("TimelineWeek",t.originalEvent,void 0,this.calculateViewIndex(t));break;case"e-timeline-work-week":this.parent.changeView("TimelineWorkWeek",t.originalEvent,void 0,this.calculateViewIndex(t));break;case"e-timeline-month":this.parent.changeView("TimelineMonth",t.originalEvent,void 0,this.calculateViewIndex(t));break;case"e-timeline-year":this.parent.changeView("TimelineYear",t.originalEvent,void 0,this.calculateViewIndex(t));break;case"e-today":r=se(this.parent.getCurrentTime()),("Agenda"===this.parent.currentView||"MonthAgenda"===this.parent.currentView||!this.parent.isSelectedDate(r)||"Month"===this.parent.currentView&&this.parent.activeViewOptions.displayDate&&!this.hasSelectedDate()&&se(this.parent.activeViewOptions.displayDate)!==r||"Month"===this.parent.currentView&&this.parent.activeViewOptions.numberOfWeeks>0&&!this.hasSelectedDate()&&se(te(this.parent.selectedDate))!==r)&&this.parent.changeDate(r,t.originalEvent);break;case"e-prev":this.parent.changeDate(this.parent.activeView.getNextPreviousDate("previous"),t.originalEvent);break;case"e-next":this.parent.changeDate(this.parent.activeView.getNextPreviousDate("next"),t.originalEvent);break;case"e-add":if(n=this.parent.activeCellsData.startTime.getTime()===this.parent.activeCellsData.endTime.getTime(),this.parent.activeCellsData&&!n)i=this.parent.activeCellsData;else{var a=this.parent.activeViewOptions.timeScale.interval,s=this.parent.activeViewOptions.timeScale.slotCount,o=a*X/s,l=new Date(this.parent.selectedDate.getTime()),p=this.parent.getCurrentTime();l.setHours(p.getHours(),Math.round(l.getMinutes()/o)*o,0);var c=new Date(new Date(l.getTime()).setMilliseconds(l.getMilliseconds()+o));i={startTime:l,endTime:c,isAllDay:!1}}this.parent.eventWindow.openEditor((0,e.extend)(i,{cancel:!1,event:t.originalEvent}),"Add")}if(!(0,e.isNullOrUndefined)(this.toolbarObj)){var h=this.toolbarObj.element.querySelector(".e-toolbar-pop");h&&"Input"!==t.item.type&&h.ej2_instances[0].hide({name:"SlideUp",duration:100})}}},r.prototype.hasSelectedDate=function(){var e=se(this.parent.selectedDate).getTime();return e>=this.parent.activeView.getStartDate().getTime()&&e<=this.parent.activeView.getEndDate().getTime()},r.prototype.getHeaderElement=function(){return this.toolbarObj.element},r.prototype.updateHeaderItems=function(t){var i=this.toolbarObj.element.querySelector(".e-prev"),n=this.toolbarObj.element.querySelector(".e-next"),r=this.toolbarObj.element.querySelector(".e-date-range");i&&("add"===t?(0,e.addClass)([i],Nn):(0,e.removeClass)([i],Nn)),n&&("add"===t?(0,e.addClass)([n],Nn):(0,e.removeClass)([n],Nn)),r&&("add"===t?(0,e.addClass)([r],zi):(0,e.removeClass)([r],zi))},r.prototype.previousNextIconHandler=function(){var t="Agenda"===this.parent.currentView?[this.parent.getCurrentViewDates()[0]]:this.parent.getCurrentViewDates(),i=this.toolbarObj.element.querySelector(".e-prev"),n=this.toolbarObj.element.querySelector(".e-next"),r=new Date(t[0].getTime()),a=new Date(t[t.length-1].getTime());if("WorkWeek"===this.parent.currentView||"TimelineWorkWeek"===this.parent.currentView)a=pe(r=$(se(this.parent.selectedDate),this.parent.firstDayOfWeek),7*this.parent.activeViewOptions.interval);else if("Month"===this.parent.currentView){var s=!(0,e.isNullOrUndefined)(this.parent.activeViewOptions.displayDate)||this.parent.activeViewOptions.numberOfWeeks>0;r=s?this.parent.activeView.getStartDate():te(this.parent.selectedDate),a=s?this.parent.activeView.getEndDate():ie(ce(r,this.parent.activeViewOptions.interval-1))}(0,e.isNullOrUndefined)(i)||this.toolbarObj.enableItems(i,r>se(this.parent.minDate)),(0,e.isNullOrUndefined)(n)||this.toolbarObj.enableItems(n,a<se(this.parent.maxDate)),this.setCalendarMinMaxDate()},r.prototype.getModuleName=function(){return"headerbar"},r.prototype.destroy=function(){this.headerPopup&&!this.headerPopup.isDestroyed&&(this.headerPopup.destroy(),this.headerPopup=null),this.headerCalendar&&!this.headerCalendar.isDestroyed&&(this.headerCalendar.destroy(),this.headerCalendar=null),this.toolbarObj&&!this.toolbarObj.isDestroyed&&(this.toolbarObj.destroy(),this.removeEventListener(),(0,e.remove)(this.element),this.toolbarObj=null),this.element=null,this.parent=null,this.l10n=null},r}(),pr=function(){function t(e){this.parent=e,this.addEventListener()}return t.prototype.getModuleName=function(){return"scroll"},t.prototype.setWidth=function(){this.parent.element.style.width=(0,e.formatUnit)(this.parent.width)},t.prototype.setHeight=function(){this.parent.element.style.height=(0,e.formatUnit)(this.parent.height)},t.prototype.addEventListener=function(){this.parent.on(N,this.setDimensions,this),this.parent.on(B,this.onPropertyChanged,this)},t.prototype.removeEventListener=function(){this.parent.off(N,this.setDimensions),this.parent.off(B,this.onPropertyChanged)},t.prototype.setDimensions=function(){this.setWidth(),this.setHeight();var e={cssProperties:this.parent.getCssProperties(),module:this.getModuleName()};this.parent.notify(U,e)},t.prototype.onPropertyChanged=function(){this.setDimensions()},t.prototype.destroy=function(){this.removeEventListener()},t}(),cr=function(){function t(t){this.parent=t,this.element=this.parent.element.querySelector("."+qe),this.touchObj=new e.Touch(this.element,{scroll:this.scrollHandler.bind(this),swipe:this.swipeHandler.bind(this),tapHold:this.tapHoldHandler.bind(this),swipeSettings:{swipeThresholdDistance:1}}),e.EventHandler.add(this.element,"transitionend",this.onTransitionEnd,this),this.touchLeftDirection=this.parent.enableRtl?"Right":"Left",this.touchRightDirection=this.parent.enableRtl?"Left":"Right"}return t.prototype.scrollHandler=function(t){var i=!this.parent.isAdaptive&&t.originalEvent&&t.originalEvent.target&&!(0,e.isNullOrUndefined)((0,e.closest)(t.originalEvent.target,"."+qt));if(this.parent.uiStateValues.isTouchScroll=i&&"touchmove"===t.originalEvent.type&&!this.parent.uiStateValues.action,!i&&"Agenda"!==this.parent.currentView&&!this.parent.uiStateValues.action&&this.parent.allowSwiping&&!this.parent.uiStateValues.isTapHold){if(this.timeStampStart||(this.timeStampStart=Date.now()),this.element.classList.contains(nt)&&this.onTransitionEnd(),"Left"===t.scrollDirection||"Right"===t.scrollDirection){var n={requestType:"dateNavigate",cancel:!1,event:t.originalEvent};if(this.parent.trigger(p,n),n.cancel)return;var r=this.element.querySelector("."+Qt);if(r&&r.scrollWidth>r.clientWidth)return;this.isScrollTriggered=!0,t.originalEvent.preventDefault(),t.originalEvent.stopPropagation()}if(t.scrollDirection===this.touchLeftDirection){this.nextPanel||(this.renderPanel(it,"next"),this.nextPanel={element:this.parent.activeView.getPanel(),selectedDate:new Date(this.parent.selectedDate.getTime()),renderDates:this.parent.activeView.renderDates,colLevels:this.parent.activeView.colLevels},this.setDimensions(this.nextPanel.element));var a=this.parent.enableRtl?t.distanceX:-t.distanceX;this.element.style.transform="translatex("+(this.getTranslateX(this.element)+a)+"px)"}else if(t.scrollDirection===this.touchRightDirection){var s=0;this.previousPanel||(this.renderPanel(tt,"previous"),this.previousPanel={element:this.parent.activeView.getPanel(),selectedDate:new Date(this.parent.selectedDate.getTime()),renderDates:this.parent.activeView.renderDates,colLevels:this.parent.activeView.colLevels},this.setDimensions(this.previousPanel.element),s=this.previousPanel.element.offsetWidth);a=this.parent.enableRtl?s-t.distanceX:-s+t.distanceX;this.element.style.transform="translatex("+(this.getTranslateX(this.element)+a)+"px)"}}},t.prototype.swipeHandler=function(t){if(this.isScrollTriggered&&!this.parent.uiStateValues.action&&this.parent.allowSwiping&&!this.parent.uiStateValues.isTapHold){this.isScrollTriggered=!1;var i="Left"===t.swipeDirection?this.parent.activeView.renderDates[0]:this.parent.activeView.renderDates.slice(-1)[0];if("Left"===t.swipeDirection&&i<this.parent.maxDate||"Right"===t.swipeDirection&&i>=this.parent.minDate){var n=Date.now()-this.timeStampStart,r=t.distanceX*(e.Browser.isDevice?6:1.66);r>n||t.distanceX>this.parent.element.offsetWidth/2?(this.swapPanels(t.swipeDirection),r>n&&t.distanceX>this.parent.element.offsetWidth/2&&(this.element.style.transitionDuration=(e.Browser.isDevice?t.distanceX:r)/n/10+"s"),this.confirmSwipe(t.swipeDirection)):this.cancelSwipe();var a={requestType:"dateNavigate",cancel:!1,event:t.originalEvent};this.parent.trigger(c,a)}else this.cancelSwipe();this.timeStampStart=null}},t.prototype.tapHoldHandler=function(t){var i=(0,e.closest)(t.originalEvent.target,"."+qt);(0,e.isNullOrUndefined)(i)||(this.parent.uiStateValues.isTapHold=!0,this.parent.isAdaptive?(e.Browser.isIos&&e.EventHandler.add(this.element,"touchend",this.preventEventClick,this),this.parent.quickPopup.tapHoldEventPopup(t.originalEvent)):["Agenda","MonthAgenda","Year"].indexOf(this.parent.currentView)<0&&(this.parent.selectedElements=[],this.parent.eventBase.getSelectedEventElements(i),this.parent.resizeModule&&(0,e.closest)(t.originalEvent.target,"."+fi)&&this.parent.resizeModule.resizeStart(t.originalEvent)))},t.prototype.preventEventClick=function(t){t.preventDefault(),e.EventHandler.remove(this.element,"touchend",this.preventEventClick)},t.prototype.renderPanel=function(e,t){this.currentPanel?this.parent.setProperties({selectedDate:this.currentPanel.selectedDate},!0):(this.currentPanel={element:this.parent.activeView.getPanel(),selectedDate:new Date(this.parent.selectedDate.getTime()),renderDates:this.parent.activeView.renderDates,colLevels:this.parent.activeView.colLevels},this.setDimensions(this.currentPanel.element)),this.parent.setProperties({selectedDate:this.parent.activeView.getNextPreviousDate(t)},!0),this.parent.headerModule&&this.parent.headerModule.setCalendarDate(this.parent.selectedDate),this.parent.activeView.getRenderDates(),this.parent.activeView.renderLayout(e)},t.prototype.swapPanels=function(e){if(e===this.touchLeftDirection){var t=this.nextPanel;this.nextPanel=this.currentPanel,this.currentPanel=t}else{t=this.previousPanel;this.previousPanel=this.currentPanel,this.currentPanel=t}},t.prototype.confirmSwipe=function(t){var i=this,n={action:"date",cancel:!1,previousDate:t===this.touchLeftDirection?this.nextPanel.selectedDate:this.previousPanel.selectedDate,currentDate:this.currentPanel.selectedDate};this.parent.trigger(g,n,(function(n){if(n.cancel)i.swapPanels(t),i.cancelSwipe();else{i.parent.activeView.setPanel(i.currentPanel.element),i.parent.setProperties({selectedDate:i.currentPanel.selectedDate},!0);var r=void 0;r=i.parent.enableRtl?t===i.touchLeftDirection?i.previousPanel?i.previousPanel.element.offsetLeft:i.currentPanel.element.offsetWidth:0:t===i.touchLeftDirection?-i.currentPanel.element.offsetLeft:0,i.parent.activeView.renderDates=i.currentPanel.renderDates,i.parent.activeView.colLevels=i.currentPanel.colLevels,(0,e.addClass)([i.element],nt),i.element.style.transform="translatex("+r+"px)",i.parent.headerModule&&i.parent.headerModule.updateDateRange(),i.parent.renderTemplates(),i.parent.crudModule.refreshDataManager()}}))},t.prototype.cancelSwipe=function(){this.parent.activeView.setPanel(this.currentPanel.element),this.parent.setProperties({selectedDate:this.currentPanel.selectedDate},!0),this.parent.activeView.renderDates=this.currentPanel.renderDates,this.parent.activeView.colLevels=this.currentPanel.colLevels,(0,e.addClass)([this.element],nt);var t=this.previousPanel?this.previousPanel.element.offsetWidth:0;this.element.style.transform="translatex("+(this.parent.enableRtl?t:-this.currentPanel.element.offsetLeft)+"px)"},t.prototype.onTransitionEnd=function(){(0,e.removeClass)([this.element],nt),this.element.style.transitionDuration="",this.element.style.transform="",this.previousPanel&&((0,e.remove)(this.previousPanel.element),this.previousPanel=null,(0,e.removeClass)([this.currentPanel.element],tt),(0,e.addClass)([this.currentPanel.element],et)),this.nextPanel&&((0,e.remove)(this.nextPanel.element),this.nextPanel=null,(0,e.removeClass)([this.currentPanel.element],it),(0,e.addClass)([this.currentPanel.element],et)),this.currentPanel=null,this.parent.activeView.getPanel().style.width=""},t.prototype.getTranslateX=function(e){var t=window.getComputedStyle(e);return new WebKitCSSMatrix(t.webkitTransform).m41},t.prototype.setDimensions=function(e){e.style.width=this.parent.element.clientWidth+"px"},t.prototype.resetValues=function(){this.currentPanel=null,this.previousPanel=null,this.nextPanel=null,this.timeStampStart=null,this.element.style.transform="",this.element.style.transitionDuration="",be(this.element),(0,e.removeClass)([this.element],nt)},t.prototype.destroy=function(){this.touchObj&&(this.touchObj.destroy(),this.touchObj=null),e.EventHandler.remove(this.element,"transitionend",this.onTransitionEnd),this.resetValues()},t}(),hr=function(){function t(t){this.selectedCells=[],this.keyConfigs={downArrow:"downarrow",upArrow:"uparrow",rightArrow:"rightarrow",leftArrow:"leftarrow",shiftDownArrow:"shift+downarrow",shiftUpArrow:"shift+uparrow",shiftRightArrow:"shift+rightarrow",shiftLeftArrow:"shift+leftarrow",ctrlLeftArrow:"ctrl+leftarrow",ctrlRightArrow:"ctrl+rightarrow",altOne:"alt+1",altTwo:"alt+2",altThree:"alt+3",altFour:"alt+4",altFive:"alt+5",altSix:"alt+6",altSeven:"alt+7",altEight:"alt+8",altNine:"alt+9",enter:"enter",escape:"escape",delete:"delete",backspace:"backspace",home:"home",pageUp:"pageup",pageDown:"pagedown",tab:"tab",shiftTab:"shift+tab",ctrlShiftUpArrow:"ctrl+shift+uparrow",ctrlShiftDownArrow:"ctrl+shift+downarrow",ctrlShiftLeftArrow:"ctrl+shift+leftarrow",ctrlShiftRightArrow:"ctrl+shift+rightarrow"},this.parent=t,this.parent.element.tabIndex=-1===this.parent.element.tabIndex?0:this.parent.element.tabIndex,this.keyboardModule=new e.KeyboardEvents(this.parent.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.addEventListener()}return t.prototype.keyActionHandler=function(e){switch(e.action){case"downArrow":case"shiftDownArrow":this.processDown(e,e.shiftKey);break;case"upArrow":case"shiftUpArrow":this.processUp(e,e.shiftKey);break;case"leftArrow":case"shiftLeftArrow":this.processLeft(e,e.shiftKey);break;case"rightArrow":case"shiftRightArrow":this.processRight(e,e.shiftKey);break;case"ctrlLeftArrow":this.parent.changeDate(this.parent.activeView.getNextPreviousDate("previous"),e),this.parent.headerModule&&this.parent.headerModule.element.querySelector(".e-prev button").focus();break;case"ctrlRightArrow":this.parent.changeDate(this.parent.activeView.getNextPreviousDate("next"),e),this.parent.headerModule&&this.parent.headerModule.element.querySelector(".e-next button").focus();break;case"altOne":case"altTwo":case"altThree":case"altFour":case"altFive":case"altSix":case"altSeven":case"altEight":case"altNine":this.processViewNavigation(e);break;case"enter":this.processEnter(e);break;case"home":this.focusFirstCell();break;case"tab":case"shiftTab":this.processTab(e,e.shiftKey);break;case"delete":case"backspace":this.processDelete(e);break;case"ctrlShiftUpArrow":case"ctrlShiftDownArrow":case"ctrlShiftLeftArrow":case"ctrlShiftRightArrow":this.processCtrlShiftNavigationArrows(e);break;case"escape":this.processEscape(e);break;case"fTwelve":this.parent.allowInline&&this.parent.inlineModule&&(e.preventDefault(),this.processFTwelve(e))}},t.prototype.processFTwelve=function(t){var i=t.target;if(i.classList.contains(ze)||i.classList.contains(Ue)){this.parent.activeCellsData=this.getSelectedElements(i);var n=(0,e.extend)(this.parent.activeCellsData,{cancel:!1,event:t}),r={element:n.element,groupIndex:n.groupIndex,type:"Cell"};this.parent.notify(A,r)}i.classList.contains(qt)&&i.click()},t.prototype.addEventListener=function(){this.parent.on(z,this.onCellMouseDown,this)},t.prototype.removeEventListener=function(){this.parent.off(z,this.onCellMouseDown)},t.prototype.onCellMouseDown=function(t){if(!t.event.shiftKey&&(this.initialTarget=this.getClosestCell(t.event),!this.parent.activeViewOptions.readonly&&"MonthAgenda"!==this.parent.currentView&&this.initialTarget&&(t.event.target.classList.contains(ze)&&3!==t.event.which&&(this.parent.removeSelectedClass(),e.EventHandler.add(this.parent.getContentTable(),"mousemove",this.onMouseSelection,this),e.EventHandler.add(this.parent.getContentTable(),"mouseup",this.onMoveUp,this)),t.event.target.classList.contains(Ue)&&3!==t.event.which))){this.parent.removeSelectedClass();var i=this.parent.getAllDayRow();e.EventHandler.add(i,"mousemove",this.onMouseSelection,this),e.EventHandler.add(i,"mouseup",this.onMoveUp,this)}},t.prototype.onMouseSelection=function(t){var i=[].slice.call(this.parent.element.querySelectorAll("."+qt));(0,e.addClass)(i,"e-allow-select");var n=this.parent.boundaryValidation(t.pageY,t.pageX);if(n.bottom||n.top||n.left||n.right){var r=this.parent.element.querySelector("."+Qt),a=r.offsetHeight<=r.scrollHeight&&r.scrollTop>=0&&r.scrollTop+r.offsetHeight<=r.scrollHeight,s=r.offsetWidth<=r.scrollWidth&&r.scrollLeft>=0&&r.scrollLeft+r.offsetWidth<=r.scrollWidth;a&&(n.top||n.bottom)&&(r.scrollTop+=n.top?-t.target.offsetHeight:t.target.offsetHeight),s&&(n.left||n.right)&&(r.scrollLeft+=n.left?-t.target.offsetWidth:t.target.offsetWidth)}var o=this.getClosestCell(t);o&&this.selectCells(!0,o)},t.prototype.getClosestCell=function(t){return(0,e.closest)(t.target,"."+ze+",."+Ue)},t.prototype.onMoveUp=function(t){var i=this,n=[].slice.call(this.parent.element.querySelectorAll("."+qt));if((0,e.removeClass)(n,"e-allow-select"),t.target.classList.contains(ze)&&(e.EventHandler.remove(this.parent.getContentTable(),"mousemove",this.onMouseSelection),e.EventHandler.remove(this.parent.getContentTable(),"mouseup",this.onMoveUp)),t.target.classList.contains(Ue)){var a=this.parent.getAllDayRow();e.EventHandler.remove(a,"mousemove",this.onMouseSelection),e.EventHandler.remove(a,"mouseup",this.onMoveUp)}if(!this.isPreventAction(t)){var s="."+ze+",."+Ue+",."+Qe,l=(0,e.closest)(t.target,s),p=this.parent.getSelectedCells();if(p.length>0&&-1===p.indexOf(l)&&(l=p[p.length-1]),"TimelineYear"!==this.parent.currentView||!l.classList.contains(Ze)){this.parent.activeCellsData=this.getSelectedElements(l);var c={};this.parent.eventWindow&&this.parent.eventWindow.convertToEventData(this.parent.activeCellsData,c);var h={data:c,element:this.parent.activeCellsData.element,event:t,requestType:I,showQuickPopup:!1};this.parent.trigger(o,h,(function(n){if((n.showQuickPopup||i.parent.quickInfoOnSelectionEnd)&&p.length>1){var a=(0,e.extend)(i.parent.activeCellsData,{cancel:!1,event:t,name:"cellClick"});i.parent.notify(r,a)}}))}}},t.prototype.processEnter=function(t){if(!(this.parent.activeViewOptions.readonly&&!t.target.classList.contains(qt)||this.isPreventAction(t)||"TimelineYear"===this.parent.currentView&&t.target.classList.contains(Ze))){var i=t.target;if((0,e.closest)(i,"."+Fn))i.classList.contains(Fi)||i.classList.contains(Ui)||i.classList.contains(Bi)||i.classList.contains(Wi)||i.classList.contains(Hn)?(i.click(),t.preventDefault()):i.classList.contains(vn)&&(this.parent.element.querySelector("."+Ui).click(),t.preventDefault());else if(i.classList.contains(mt)&&i.classList.contains(dt)){var n=i.querySelector("."+vt);n&&n.click()}else if(i.classList.contains(ze)||i.classList.contains(Ue)){this.parent.activeCellsData=this.getSelectedElements(i);var a=(0,e.extend)(this.parent.activeCellsData,{cancel:!1,event:t});if(this.parent.allowInline){var s={element:a.element,groupIndex:a.groupIndex,type:"Cell"};this.parent.notify(A,s)}else"Year"===this.parent.currentView?i.click():this.parent.notify(r,a)}else if(i.classList.contains(ir)&&this.parent.inlineModule)this.parent.inlineModule.inlineCrudActions(i);else{if(!(i.classList.contains(qt)||i.classList.contains(Ki)||i.classList.contains(Ii)||i.classList.contains(Ri)))return i.classList.contains(Qi)?(this.parent.setProperties({selectedDate:this.parent.getDateFromElement(i)},!0),this.parent.changeView(this.parent.getNavigateView(),t),void this.processEscape(t)):void 0;i.click()}}},t.prototype.getSelectedElements=function(e){var t;if(this.selectedCells.length>1&&e.classList.contains(Rt)){var i=this.parent.getCellDetails(this.selectedCells[0]),n=this.parent.getCellDetails(this.selectedCells.slice(-1)[0]);i.endTime=n.endTime,i.element=e,t=i}else t=this.parent.getCellDetails(e);return t},t.prototype.getCells=function(e,t,i){var n=this.parent.getContentTable(),r="TimelineYear"===this.parent.currentView,a=r&&!e?"."+ze+":not(."+Ze+")":"td",s=[].slice.call(n.querySelectorAll(a)),o=n.rows.length,l=n.rows[0].cells.length;if(t&&t.classList.contains(Ue)){var p=this.parent.getAllDayRow();s=[].slice.call(p.cells),o=1,l=p.cells.length}var c=s.indexOf(t),h=s.indexOf(i),d=[];if(e){for(var u=0;u<l;u++)for(var g=0;g<o;g++){var v=s[l*g+u];r&&v.classList.contains(Ze)||d.push(v)}c=d.indexOf(t),h=d.indexOf(i)}if(c>h){var m=c;c=h,h=m}return(e?d:s).slice(c,h+1)},t.prototype.focusFirstCell=function(){if("Agenda"===this.parent.currentView){var e=this.parent.getContentTable().querySelector("."+Zt);return e.setAttribute("tabindex","0"),void e.focus()}if(this.parent.eventBase.removeSelectedAppointmentClass(),this.parent.activeView.isTimelineView()&&"TimelineYear"!==this.parent.currentView){var t=this.parent.element.querySelector("."+We+" tr:not(."+Nn+") ."+ze+":not(."+ot+")");this.selectCells(!1,t)}else if(this.parent.currentView.indexOf("Year")>-1){var i="."+ze+":not(."+Ze+"):not(."+ot+")";i+="TimelineYear"===this.parent.currentView&&"Vertical"===this.parent.activeViewOptions.orientation?'[data-date="'+this.parent.activeView.startDate().getTime()+'"]':"",this.selectCells(!1,this.parent.element.querySelector(i))}else this.selectCells(!1,this.parent.getWorkCellElements()[0])},t.prototype.isInverseTableSelect=function(){return this.parent.activeView.isInverseTableSelect},t.prototype.selectCells=function(e,t){var i=this;this.parent.removeSelectedClass();var n=t instanceof Array?t.slice(-1)[0]:t;if(e){var r,a=["Day","Week","WorkWeek","TimelineDay","TimelineWeek","TimelineWorkWeek","TimelineMonth","TimelineYear"],s={element:t,requestType:"mousemove",allowMultipleRow:!0};this.parent.inlineModule.removeInlineAppointmentElement(),this.parent.trigger(o,s,(function(e){if(!e.allowMultipleRow||!i.parent.allowMultiRowSelection){var t="TimelineYear"===i.parent.currentView;if(t&&"Horizontal"===i.parent.activeViewOptions.orientation||"Month"===i.parent.currentView){var s=t&&i.parent.activeViewOptions.group.resources.length>0;n=s?i.initialTarget:i.initialTarget.parentElement.children[n.cellIndex]}else a.indexOf(i.parent.currentView)>-1&&(n=n.parentElement.children[i.initialTarget.cellIndex])}var o=i.getCells(i.isInverseTableSelect(),i.initialTarget,n);if(i.parent.activeViewOptions.group.resources.length>0){r=i.initialTarget.getAttribute("data-group-index");for(var l=[],p=0,c=o;p<c.length;p++){(v=c[p]).getAttribute("data-group-index")===r&&l.push(v)}o=l}if(i.parent.allowMultiCellSelection||(o=[i.initialTarget]),i.selectedCells=o,o.length>2&&!n.classList.contains(Ue)){var h=i.getAllDayCells(o);if(i.parent.activeViewOptions.group.resources.length>0){for(var d=[],u=0,g=h;u<g.length;u++){var v;(v=g[u]).getAttribute("data-group-index")===r&&d.push(v)}h=d}o=o.concat(h)}n.getAttribute("data-group-index")!==r&&i.parent.activeViewOptions.group.resources.length>0&&(n=i.selectedCells[i.selectedCells.length-1]),i.parent.addSelectedClass(o,n)}))}else{s={element:n,requestType:I};this.parent.trigger(o,s,(function(){i.initialTarget=n,i.selectedCells=[n],i.parent.addSelectedClass([n],n)}))}},t.prototype.selectAppointment=function(t,i){var n=this.getAppointmentElements();if(!(n.length<0)){var r;if(this.parent.eventBase.removeSelectedAppointmentClass(),i.classList.contains(qt)){var a=n.indexOf(i);r=n[t?a-1:a+1]}else r=t?n[n.length-1]:n[0];r&&(this.parent.eventBase.addSelectedAppointments([r],!0),r.focus(),(0,e.addClass)([r],$t))}},t.prototype.selectAppointmentElementFromWorkCell=function(e,t){var i=this;if(this.parent.eventBase.removeSelectedAppointmentClass(),this.parent.removeSelectedClass(),t.classList.contains(ze)||t.classList.contains(Ue)){var n=this.getUniqueAppointmentElements(),r=[],a=this.parent.getDateFromElement(t).getTime();if(this.parent.eventsProcessed.filter((function(t){return e?t[i.parent.eventFields.startTime].getTime()<=a:t[i.parent.eventFields.startTime].getTime()>=a})).filter((function(e){n.filter((function(t){JSON.stringify(e.Guid)===JSON.stringify(t.getAttribute("data-guid"))&&r.push(t)}))})),r.length>0){var s=e?r[r.length-1]:r[0],o=this.getAppointmentElementsByGuid(s.getAttribute("data-guid"));this.parent.eventBase.addSelectedAppointments(o,!0),o[o.length-1].focus()}}},t.prototype.getAllDayCells=function(e){var t=this.parent.getAllDayRow();if(!t)return[];var i=e[0],n=e[e.length-1],r=this.parent.getCellDetails(i);return this.parent.getCellDetails(n).endTime.getTime()-r.startTime.getTime()>=G?[].slice.call(t.cells).slice(i.cellIndex,n.cellIndex+1):[]},t.prototype.getAppointmentElements=function(){return[].slice.call(this.parent.element.querySelectorAll("."+qt))},t.prototype.getAppointmentElementsByGuid=function(e){return[].slice.call(this.parent.element.querySelectorAll('div[data-guid="'+e+'"]'))},t.prototype.getUniqueAppointmentElements=function(){var e=this.getAppointmentElements(),t=[];return e.map((function(e){return e.getAttribute("data-guid")})).filter((function(i,n,r){r.indexOf(i)===n&&t.push(e[parseInt(n.toString(),10)])})),t},t.prototype.getWorkCellFromAppointmentElement=function(e){var t=this.parent.eventBase.getEventByGuid(e.getAttribute("data-guid"));return this.parent.eventBase.selectWorkCellByTime([t])},t.prototype.processViewNavigation=function(t){var i=parseInt(t.key,10)-1;if(!(0,e.isNullOrUndefined)(this.parent.views)&&i<this.parent.views.length){var n=this.parent.viewCollections[parseInt(i.toString(),10)].option;this.parent.changeView(n,t,void 0,i),this.parent.headerModule&&this.parent.headerModule.element.querySelector(".e-active-view button").focus()}},t.prototype.isCalendarTarget=function(t){var i=t.currentTarget||t.target;return!(!i||(0,e.isNullOrUndefined)(i.querySelector(".e-header-popup.e-popup-open")))},t.prototype.cancelUpDownAction=function(e){var t=e&&"Vertical"===this.parent.activeViewOptions.orientation,i=this.parent.activeViewOptions.group.resources.length>0;return!!(t&&i||e&&this.initialTarget.classList.contains(Ze))||!((!this.parent.activeView.isTimelineView()||e)&&"MonthAgenda"!==this.parent.currentView)},t.prototype.processUp=function(e,t){var i="TimelineYear"===this.parent.currentView;if(!(t&&this.cancelUpDownAction(i)||this.isCalendarTarget(e))){var n=e.target,r=this.parent.getSelectedCells(),a=this.parent.eventBase.getSelectedAppointments(),s=this.parent.element.querySelector("."+Yi),o=this.getQuickPopupElement();if(r.length>0&&!e.target.classList.contains(ze)&&(n=r[r.length-1]),a.length>0&&!s.classList.contains(_e)&&!o.classList.contains(_e)&&-1!==["Day","Week","WorkWeek","Month"].indexOf(this.parent.currentView)&&(n=this.getWorkCellFromAppointmentElement(a[a.length-1]),this.parent.eventBase.removeSelectedAppointmentClass()),n)if(n.classList.contains(ze)&&!this.parent.element.querySelector("."+_e)){var l=this.parent.getTableRows(),p=l.indexOf(n.parentElement),c=void 0;if(i&&t&&0===this.parent.activeViewOptions.group.resources.length&&(c=this.isInverseTableSelect()?this.getVerticalUpDownCell(l,n,p,!0):this.getHorizontalUpDownCell(l,n,p,!0)),(p>0||c)&&p<l.length){if(c=c||l[p-1].cells[n.cellIndex],"Year"===this.parent.currentView&&c.classList.contains(Ze)){if(!(this.parent.activeView.getStartDate().getTime()<+c.getAttribute("data-date")))return;c=this.getYearUpDownCell(l,p-1,n.cellIndex,!0)}e.preventDefault(),this.selectCells(t,c)}}else"Agenda"!==this.parent.currentView&&"MonthAgenda"!==this.parent.currentView||this.selectAppointment(!0,n)}},t.prototype.processDown=function(e,t){var i="TimelineYear"===this.parent.currentView;if(!(t&&this.cancelUpDownAction(i)||this.isCalendarTarget(e))){var n=e.target,r=this.parent.getSelectedCells(),a=this.parent.eventBase.getSelectedAppointments(),s=this.parent.element.querySelector("."+Yi),o=this.getQuickPopupElement();r.length>0&&!e.target.classList.contains(ze)&&(n=r[r.length-1]),a.length>0&&!s.classList.contains(_e)&&!o.classList.contains(_e)&&-1!==["Day","Week","WorkWeek","Month"].indexOf(this.parent.currentView)&&(n=this.getWorkCellFromAppointmentElement(a[a.length-1]),this.parent.eventBase.removeSelectedAppointmentClass());var l=this.parent.getTableRows();if(n)if(n.classList.contains(ze)&&!this.parent.element.querySelector("."+_e)){var p=l.indexOf(n.parentElement),c=void 0;if(i&&t&&0===this.parent.activeViewOptions.group.resources.length&&(c=this.isInverseTableSelect()?this.getVerticalUpDownCell(l,n,p,!1):this.getHorizontalUpDownCell(l,n,p,!1)),p>=0&&(p<l.length-1||c)){if(c=c||l[p+1].cells[n.cellIndex],"Year"===this.parent.currentView&&c.classList.contains(Ze)){if(!(this.parent.activeView.getEndDate().getTime()>+c.getAttribute("data-date")))return;c=this.getYearUpDownCell(l,p+1,n.cellIndex,!1)}e.preventDefault(),this.selectCells(t,c)}}else"Agenda"!==this.parent.currentView&&"MonthAgenda"!==this.parent.currentView||this.selectAppointment(!1,n)}},t.prototype.getYearUpDownCell=function(e,t,i,n){for(;e[parseInt(t.toString(),10)]&&e[parseInt(t.toString(),10)].cells[parseInt(i.toString(),10)].classList.contains(Ze);)t+=n?-1:1;return e[parseInt(t.toString(),10)].cells[parseInt(i.toString(),10)]},t.prototype.getHorizontalUpDownCell=function(e,t,i,n){var r=e[i+(n?-1:1)],a=r?r.cells[t.cellIndex]:t;if(a.classList.contains(Ze)){var s=r.querySelector("."+ze+":not(."+Ze+")"),o=new Date(+s.getAttribute("data-date")),l='[data-date="'+new Date(o.getFullYear(),o.getMonth()+1,0).getTime()+'"]';a=a.cellIndex<s.cellIndex?s:r.querySelector(l)}return a},t.prototype.getVerticalUpDownCell=function(e,t,i,n){var r=n&&i>0||!n&&i<e.length-1?e[i+(n?-1:1)].cells[t.cellIndex]:void 0;if(!r||r.classList.contains(Ze)){if(e[parseInt(i.toString(),10)].cells[t.cellIndex-(n?1:-1)]){var a=+t.getAttribute("data-date")-(n?G:-G);return this.parent.getContentTable().querySelector("."+ze+'[data-date="'+a+'"]')}r=t}return r},t.prototype.processLeftRight=function(e){var t="Year"===this.parent.currentView?e.closest("tbody"):this.parent.getContentTable(),i=e.parentNode.sectionRowIndex;return{element:t,rowIndex:i,columnIndex:e.cellIndex,maxIndex:t.rows[parseInt(i.toString(),10)].cells.length}},t.prototype.getQuickPopupElement=function(){return(this.parent.isAdaptive?document.body:this.parent.element).querySelector("."+Fn)},t.prototype.isCancelLeftRightAction=function(e,t,i){var n="MonthAgenda"===this.parent.currentView||i&&this.initialTarget.classList.contains(Ze);if("Agenda"===this.parent.currentView||t&&n)return!0;if(this.isPreventAction(e)&&t)return!0;var r=this.parent.element.querySelector("."+Yi),a=this.getQuickPopupElement();return!(!r.classList.contains(_e)&&!a.classList.contains(_e))},t.prototype.processRight=function(t,i){var n="TimelineYear"===this.parent.currentView;if(!this.isCancelLeftRightAction(t,i,n)&&!this.isCalendarTarget(t)){var r,a=this.parent.getSelectedCells(),s=this.parent.eventBase.getSelectedAppointments(),o=t.target;if(a.length>0&&!o.classList.contains(ze)&&!o.classList.contains(Ue)&&(o=a[a.length-1]),!(s.length>0)||(o=this.getWorkCellFromAppointmentElement(s[s.length-1]),this.parent.eventBase.removeSelectedAppointmentClass(),o))if(o.classList.contains(ze)&&t.target.classList.contains(ze)){var l=this.processLeftRight(o),p=new Date(+o.getAttribute("data-date")),c="Year"===this.parent.currentView&&p.getTime()===ie(p).getTime();if(l.columnIndex>=0&&l.columnIndex<l.maxIndex-1&&!c)r=this.calculateNextPrevDate(o,l.element.rows[l.rowIndex].cells[o.cellIndex+1],"right"),n&&i&&r.classList.contains(Ze)&&(r=this.getTimelineYearTargetCell(l,o,!0)),(0,e.isNullOrUndefined)(r)||this.selectCells(i,r);else if(l.columnIndex===l.maxIndex-1||c)if(!this.isInverseTableSelect()&&l.rowIndex<l.element.rows.length-1&&!c){r=this.calculateNextPrevDate(o,l.element.rows[l.rowIndex+1].cells[0],"right");var h=n&&i&&r.classList.contains(Ze);r=h?this.getHorizontalLeftRightCell(l,o,!0):r,(0,e.isNullOrUndefined)(r)||this.selectCells(i,r)}else if(!i){if(c&&p.getTime()!==this.parent.activeView.getEndDate().getTime())return void this.selectCells(i,this.parent.element.querySelector(":not(."+Ze+')[data-date="'+(p.getTime()+G)+'"]'));var d=this.isInverseTableSelect()?l.rowIndex:0;this.parent.changeDate(this.parent.activeView.getNextPreviousDate("next"),t);var u=this.parent.getContentTable(),g=c?u.rows[parseInt(d.toString(),10)].querySelector("."+ze+":not(."+Ze+")"):u.rows[parseInt(d.toString(),10)].cells[0];this.selectCells(!1,g)}}else if(o.classList.contains(Ue)){var v=o.cellIndex,m=this.parent.getAllDayRow(),f=m.cells.length;if(v>=0&&v<f-1)this.selectCells(i,m.cells[v+1]);else if(v===f-1&&!i){this.parent.changeDate(this.parent.activeView.getNextPreviousDate("next"),t);var y=this.parent.getAllDayRow();this.selectCells(!1,y.cells[0])}}}},t.prototype.processLeft=function(t,i){var n="TimelineYear"===this.parent.currentView;if(!this.isCancelLeftRightAction(t,i,n)&&!this.isCalendarTarget(t)){var r,a=t.target,s=this.parent.getSelectedCells();s.length>0&&!a.classList.contains(ze)&&!a.classList.contains(Ue)&&(a=s[s.length-1]);var o=this.parent.eventBase.getSelectedAppointments();if(!(o.length>0)||(a=this.getWorkCellFromAppointmentElement(o[o.length-1]),this.parent.eventBase.removeSelectedAppointmentClass(),a))if(t.target.classList.contains(ze)&&a.classList.contains(ze)){var l=this.processLeftRight(a),p=new Date(+a.getAttribute("data-date")),c="Year"===this.parent.currentView&&p.getTime()===te(p).getTime();if(l.columnIndex>0&&l.columnIndex<l.maxIndex&&!c)r=this.calculateNextPrevDate(a,l.element.rows[l.rowIndex].cells[a.cellIndex-1],"left"),n&&i&&r.classList.contains(Ze)&&(r=this.getTimelineYearTargetCell(l,a,!1)),(0,e.isNullOrUndefined)(r)||this.selectCells(i,r);else if(0===l.columnIndex||c)if(!this.isInverseTableSelect()&&l.rowIndex>0){r=this.calculateNextPrevDate(a,l.element.rows[l.rowIndex-1].cells[l.maxIndex-1],"left");var h=n&&i&&r.classList.contains(Ze);r=h?this.getHorizontalLeftRightCell(l,a,!1):r,(0,e.isNullOrUndefined)(r)||this.selectCells(i,r)}else if(!i){if(c&&p.getTime()!==this.parent.activeView.getStartDate().getTime())return void this.selectCells(i,this.parent.element.querySelector('[data-date="'+(p.getTime()-G)+'"]'));this.parent.changeDate(this.parent.activeView.getNextPreviousDate("previous"),t);var d=this.parent.getContentTable(),u=this.isInverseTableSelect()?l.rowIndex:d.rows.length-1,g=d.rows[parseInt(u.toString(),10)].cells[l.maxIndex-1];if(c){var v=this.parent.element.querySelectorAll("."+We+" tbody");g=v.item(v.length-1).querySelector(":not(."+Ze+')[data-date="'+this.parent.activeView.getEndDate().getTime()+'"]')}this.selectCells(!1,g)}}else if(a.classList.contains(Ue)){var m=a.cellIndex,f=this.parent.getAllDayRow(),y=f.cells.length;if(m>0&&m<y)this.selectCells(i,f.cells[m-1]);else if(0===m&&!i){this.parent.changeDate(this.parent.activeView.getNextPreviousDate("previous"),t);var T=this.parent.getAllDayRow();this.selectCells(!1,T.cells[y-1])}}}},t.prototype.getTimelineYearTargetCell=function(e,t,i){return this.isInverseTableSelect()?this.getVerticalLeftRightCell(t,i):this.getHorizontalLeftRightCell(e,t,i)},t.prototype.getHorizontalLeftRightCell=function(e,t,i){var n=e.element.rows[t.parentNode.sectionRowIndex+(i?1:-1)];if(n){var r=i?"."+ze+":not(."+Ze+")":'[data-date="'+(+t.getAttribute("data-date")-G)+'"]';return n.querySelector(r)}return t},t.prototype.getVerticalLeftRightCell=function(e,t){var i=new Date(+e.getAttribute("data-date")),n=new Date(i.getFullYear(),i.getMonth()+(t?1:-1),1),r=this.parent.getContentTable(),a=r.querySelector('[data-date="'+n.getTime()+'"]');return a.parentNode.sectionRowIndex>e.parentNode.sectionRowIndex?a:r.querySelector('[data-date="'+new Date(n.getFullYear(),n.getMonth()+1,0).getTime()+'"]')},t.prototype.calculateNextPrevDate=function(e,t,i){var n=this.initialTarget.getAttribute("data-group-index");if(this.parent.activeViewOptions.group.resources.length>0&&"Month"===this.parent.currentView&&e&&t&&t.getAttribute("data-group-index")!==n){var r=this.parent.getDateFromElement(e),a="right"===i?new Date(r.setDate(r.getDate()+1)):new Date(r.setDate(r.getDate()-1));t=[].slice.call(this.parent.element.querySelectorAll('td[data-date="'+a.getTime().toString()+'"][data-group-index="'+n+'"]'))[0]}return t},t.prototype.getFocusableElements=function(e){return[].slice.call(e.querySelectorAll('a[href]:not([tabindex="-1"]),input:not([disabled]):not([tabindex="-1"]),textarea:not([disabled]):not([tabindex="-1"]),button:not([disabled]):not([tabindex="-1"]),select:not([disabled]):not([tabindex="-1"]),[tabindex]:not([tabindex="-1"]),[contentEditable=true]:not([tabindex="-1"])'))},t.prototype.processTabOnPopup=function(t,i){var n=this,r=this.getFocusableElements(i),a=(r=r.filter((function(e){var t=n.parent.element.querySelector("."+Ni);return t&&t.offsetParent?!(e.classList.contains(In)||e.classList.contains(kn)):!(e.classList.contains(Bi)||e.classList.contains(Wi))})))[0],s=r[r.length-1];(0,e.isNullOrUndefined)(s)||document.activeElement!==s||t.shiftKey||(t.preventDefault(),a.focus()),!(0,e.isNullOrUndefined)(a)&&document.activeElement===a&&t.shiftKey&&(t.preventDefault(),s.focus())},t.prototype.processTab=function(t,i){var n=t.target;if(n.classList.contains(ir)&&this.parent.inlineModule&&(n=n.closest(".e-appointment"),this.parent.inlineModule.inlineCrudActions(t.target)),"TimelineYear"===this.parent.currentView&&n.classList.contains(Ze))n.classList.contains(Rt)&&this.parent.removeSelectedClass();else{var r=(0,e.closest)(n,"."+Fn+",."+Yi);if(r&&r.classList.contains(_e))return r.classList.contains(Yi)&&this.parent.eventBase.removeSelectedAppointmentClass(),void this.processTabOnPopup(t,r);if(n.classList.contains(Me))this.parent.eventBase.removeSelectedAppointmentClass();else if(n.classList.contains(mt)&&this.parent.activeView.isTimelineView()&&this.parent.activeViewOptions.group.resources.length>0){var a=parseInt(n.getAttribute("data-group-index"),10),s="."+qt+'[data-group-index="'+(i?a-1:a)+'"]';if((c=[].slice.call(this.parent.element.querySelectorAll(s))).length>0){this.parent.eventBase.removeSelectedAppointmentClass();var o=i?c.slice(-1)[0]:c[0];this.parent.eventBase.addSelectedAppointments([o],!0),o.focus(),t.preventDefault()}else if(a+1===this.parent.resourceBase.lastResourceLevel.length)this.parent.element.focus(),t.preventDefault();else if(this.parent.virtualScrollModule){var l=this.parent.element.querySelector("."+Kt),p=Math.round(l.offsetHeight/this.parent.resourceBase.expandedResources.length);this.parent.element.querySelector(".e-content-wrap").scrollTop=(i?a-1:a+1)*p,this.parent.virtualScrollModule.virtualScrolling()}else this.setScrollPosition(a)}else if(n.classList.contains(qt)){var c=[].slice.call(this.parent.element.querySelectorAll("."+qt)),h="TimelineYear"===this.parent.currentView;if((this.parent.activeView.isTimelineView()&&!h||h&&"Vertical"===this.parent.activeViewOptions.orientation)&&this.parent.activeViewOptions.group.resources.length>0){a=parseInt(n.getAttribute("data-group-index"),10);c=[].slice.call(this.parent.element.querySelectorAll("."+qt+'[data-group-index="'+a+'"]'));var d="."+mt+'[data-group-index="'+(i?a:a+1)+'"]',u=this.parent.element.querySelector(d);if(u&&(i&&n.getAttribute("data-guid")===c[0].getAttribute("data-guid")||!i&&n.getAttribute("data-guid")===c.slice(-1)[0].getAttribute("data-guid")))return this.parent.eventBase.removeSelectedAppointmentClass(),this.parent.virtualScrollModule?u.focus({preventScroll:!0}):u.focus(),this.parent.activeView.isTimelineView()&&this.parent.activeViewOptions.group.resources.length>0&&(0,e.isNullOrUndefined)(this.parent.virtualScrollModule)&&this.setScrollPosition(a),void t.preventDefault()}var g=this.parent.eventBase.getSelectedAppointments();if(g.length>0&&(n=g[g.length-1]),this.parent.eventBase.removeSelectedAppointmentClass(),!i&&n.getAttribute("data-guid")===c[c.length-1].getAttribute("data-guid")||i&&n.getAttribute("data-guid")===c[0].getAttribute("data-guid"))return;"Agenda"!==this.parent.currentView&&"MonthAgenda"!==this.parent.currentView||(this.selectAppointment(i,n),t.preventDefault())}else{var v=this.parent.getSelectedCells();if(v.length>0&&!n.classList.contains(qt))return n=v[v.length-1],this.selectAppointmentElementFromWorkCell(i,n),void t.preventDefault();n&&!n.classList.contains(mt)&&this.parent.activeView.isTimelineView()&&this.parent.activeViewOptions.group.resources.length>0&&this.processTabOnResourceCells(n,i)}}},t.prototype.processDelete=function(t){var i=document.activeElement;if("MonthAgenda"===this.parent.currentView){var n=this.parent.eventBase.getSelectedEvents().element;i=n&&(0,e.isNullOrUndefined)(n.length)?n:n[0]}if(i&&i.classList.contains(qt)){if((0,e.addClass)([i],Bt),this.parent.activeEventData=this.parent.eventBase.getSelectedEvents(),this.parent.activeViewOptions.readonly||i.classList.contains(er)||!this.parent.eventSettings.allowDeleting)return;this.parent.quickPopup.deleteClick(t)}},t.prototype.processCtrlShiftNavigationArrows=function(e){if(this.parent.activeViewOptions.group.resources.length>0&&document.activeElement.classList.contains(qt)){var t=parseInt(document.activeElement.getAttribute("data-group-index"),10);r=(r="ctrlShiftLeftArrow"===e.action||"ctrlShiftUpArrow"===e.action?t-1:t+1)<0?0:r>this.parent.resourceBase.lastResourceLevel.length?this.parent.resourceBase.lastResourceLevel.length:r;for(var i=[];0===i.length&&r>=0&&r<=this.parent.resourceBase.lastResourceLevel.length;)i=[].slice.call(this.parent.element.querySelectorAll("."+qt+'[data-group-index="'+r+'"]')),r="ctrlShiftLeftArrow"===e.action||"ctrlShiftUpArrow"===e.action?r-1:r+1;var n=i[0];n&&(this.parent.eventBase.removeSelectedAppointmentClass(),this.parent.eventBase.addSelectedAppointments([n],!0),n.focus())}else if(this.parent.activeViewOptions.group.resources.length>0&&!document.activeElement.classList.contains(qt)){var r=this.parent.resourceBase.renderedResources[0].groupIndex,a="."+qt+'[data-group-index="'+r+'"]',s=[].slice.call(this.parent.element.querySelectorAll(a));if(s.length>0){this.parent.eventBase.removeSelectedAppointmentClass();var o=s[0];this.parent.eventBase.addSelectedAppointments([o],!0),o.focus(),e.preventDefault()}}},t.prototype.processEscape=function(e){this.parent.quickPopup.onClosePopup(e),this.parent.quickPopup.morePopup.hide(),this.parent.headerModule&&this.parent.headerModule.hideHeaderPopup(),this.parent.inlineModule&&this.parent.inlineModule.removeInlineAppointmentElement()},t.prototype.isPreventAction=function(t){var i=(0,e.closest)(t.target,"."+ot);return!(!this.parent.activeView.isTimelineView()||(0,e.isNullOrUndefined)(i))},t.prototype.processTabOnResourceCells=function(e,t){var i=[].slice.call(this.parent.element.querySelectorAll('[tabIndex="0"]')),n=i.indexOf(e),r=t?i[n-1]:i[n+1];if(r&&r.classList.contains(mt)){var a=parseInt(r.getAttribute("data-group-index"),10);if(this.parent.virtualScrollModule){var s=this.parent.element.querySelector("."+pt);[].slice.call(this.parent.element.querySelectorAll("."+mt)).forEach((function(e){e.getBoundingClientRect().top<s.getBoundingClientRect().top&&e.setAttribute("tabindex","-1")}))}else this.setScrollPosition(a)}},t.prototype.setScrollPosition=function(e){var t=this.parent.element.querySelector("."+ze+'[data-group-index="'+e+'"]');t&&(this.parent.element.querySelector("."+Qt).scrollTop=t.offsetTop)},t.prototype.getModuleName=function(){return"keyboard"},t.prototype.destroy=function(){this.removeEventListener(),this.selectedCells=[],this.keyboardModule.destroy()},t}(),dr=d(74),ur=function(){function t(e,t,i){this.parent=e,this.initDataManager(t,i)}return t.prototype.initDataManager=function(e,t){this.dataManager=e instanceof dr.DataManager?e:new dr.DataManager(e),this.query=t instanceof dr.Query?t:new dr.Query},t.prototype.generateQuery=function(t,i){var n=this.query.clone();if(this.parent&&t&&i){if(this.parent.activeViewOptions&&this.parent.activeViewOptions.enableLazyLoading&&!(0,e.isNullOrUndefined)(this.parent.activeViewOptions.group.resources)&&this.parent.activeViewOptions.group.resources.length>0&&this.parent.resourceBase&&this.parent.resourceBase.resourceCollection.length>0&&this.parent.resourceBase.renderedResources.length>0){var r=[];this.parent.resourceBase.resourceCollection.forEach((function(){return r.push([])})),this.parent.resourceBase.renderedResources.forEach((function(e){r.forEach((function(t,i){var n=e.groupOrder[parseInt(i.toString(),10)];n&&t.indexOf(n)<0&&t.push(n)}))})),this.parent.resourceBase.resourceCollection.forEach((function(e,t){n.addParams(e.field,r[parseInt(t.toString(),10)].toString())}))}if(this.parent.timezone&&(t=this.parent.tzModule.remove(new Date(+t.getTime()),this.parent.timezone),i=this.parent.tzModule.remove(new Date(+i.getTime()),this.parent.timezone)),this.parent.eventSettings.includeFiltersInQuery){var a=this.getStartEndQuery(t,i),s=new dr.Predicate(this.parent.eventFields.recurrenceRule,"notequal",null).and(new dr.Predicate(this.parent.eventFields.recurrenceRule,"notequal",""));return n.where(a.or(s))}n.addParams("StartDate",t.toISOString()),n.addParams("EndDate",i.toISOString())}return n},t.prototype.getStartEndQuery=function(e,t){var i=this.parent.eventFields;return new dr.Predicate(i.startTime,"greaterthanorequal",e).and(new dr.Predicate(i.endTime,"greaterthanorequal",e)).and(new dr.Predicate(i.startTime,"lessthan",t)).or(new dr.Predicate(i.startTime,"lessthanorequal",e).and(new dr.Predicate(i.endTime,"greaterthan",e)))},t.prototype.getData=function(e){return this.dataManager.executeQuery(e)},t.prototype.destroy=function(){this.dataManager=null,this.query=null},t}(),gr=function(){function t(){}return t.prototype.firstDateOfMonth=function(e){return new Date(e.getFullYear(),e.getMonth())},t.prototype.lastDateOfMonth=function(e){return new Date(e.getFullYear(),e.getMonth()+1,0)},t.prototype.isMonthStart=function(e){return 1===e.getDate()},t.prototype.getLeapYearDaysCount=function(){return 366},t.prototype.getYearDaysCount=function(e,t){return(e.getFullYear()+t)%4==0?366:365},t.prototype.getDate=function(e){return e.getDate()},t.prototype.getMonth=function(e){return e.getMonth()+1},t.prototype.getFullYear=function(e){return e.getFullYear()},t.prototype.getYearLastDate=function(e,t){return new Date(e.getFullYear()+t,0,0)},t.prototype.getMonthDaysCount=function(e){return this.lastDateOfMonth(e).getDate()},t.prototype.getMonthStartDate=function(e){return new Date(e.getFullYear(),e.getMonth(),1,e.getHours(),e.getMinutes())},t.prototype.getMonthEndDate=function(e){return e.setDate(1),new Date(e.setMonth(e.getMonth()+1))},t.prototype.getExpectedDays=function(e,t){return t},t.prototype.setDate=function(e,t){e.setDate(t)},t.prototype.setValidDate=function(t,i,n,r,a){(0,e.isNullOrUndefined)(a)?t.setMonth(t.getMonth()+i,n):t.setMonth((a?r:t.getMonth())+i)},t.prototype.setMonth=function(e,t,i){e.setDate(1),e.setFullYear(e.getFullYear()),e.setMonth(t-1);var n=new Date(e.getFullYear(),e.getMonth()+1,0).getDate();e.setDate(Math.min(i,n))},t.prototype.addYears=function(e,t){e.setFullYear(e.getFullYear()+t)},t.prototype.isSameMonth=function(e,t){return e.getMonth()===t.getMonth()},t.prototype.checkMonth=function(e,t){return-1===t.indexOf(e.getMonth()+1)},t.prototype.compareMonth=function(e,t){return e.getMonth()>t.getMonth()},t.prototype.isSameYear=function(e,t){return e.getFullYear()===t.getFullYear()},t.prototype.isLastMonth=function(e){return 11===e.getMonth()},t.prototype.isLeapYear=function(e,t){return(e+t)%4==0},t}(),vr=function(){function t(){}return t.prototype.firstDateOfMonth=function(t){var i=this.getHijriDate(t);return e.HijriParser.toGregorian(i.year,i.month,1)},t.prototype.lastDateOfMonth=function(t){var i=this.getHijriDate(t),n=this.getDaysInMonth(i.month,i.year),r=e.HijriParser.toGregorian(i.year,i.month,n),a=new Date(r.getTime());a=new Date(a.setDate(a.getDate()+1));var s=this.getHijriDate(a);return i.month===s.month?a:(s=this.getHijriDate(r),i.month===s.month?r:new Date(r.setDate(r.getDate()-1)))},t.prototype.isMonthStart=function(e){return 1===this.getHijriDate(e).date},t.prototype.getLeapYearDaysCount=function(){return 355},t.prototype.getYearDaysCount=function(e,t){var i=this.getHijriDate(e);return this.isLeapYear(i.year,t)?355:354},t.prototype.getDate=function(e){return this.getHijriDate(e).date},t.prototype.getMonth=function(e){return this.getHijriDate(e).month},t.prototype.getFullYear=function(e){return this.getHijriDate(e).year},t.prototype.getYearLastDate=function(t,i){var n=this.getHijriDate(t);return e.HijriParser.toGregorian(n.year+i,1,0)},t.prototype.getMonthDaysCount=function(e){var t=this.lastDateOfMonth(e);return this.getHijriDate(t).date},t.prototype.getMonthStartDate=function(e){var t=this.firstDateOfMonth(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),e.getHours(),e.getMinutes())},t.prototype.getMonthEndDate=function(e){var t=this.lastDateOfMonth(e);return t.setDate(t.getDate()+1),new Date(t.setMonth(t.getMonth()))},t.prototype.getExpectedDays=function(t,i){for(var n=this.getHijriDate(t),r=[],a=0;a<i.length;a++){var s=e.HijriParser.toGregorian(n.year,n.month,i[parseInt(a.toString(),10)]);r.push(s.getDate())}return r},t.prototype.setDate=function(t,i){var n=this.getHijriDate(t),r=e.HijriParser.toGregorian(n.year,n.month,i);this.updateDateObj(t,r)},t.prototype.setValidDate=function(t,i,n,r,a){var s=(0,e.isNullOrUndefined)(a)?t:this.firstDateOfMonth(a),o=this.getHijriDate(s),l=e.HijriParser.toGregorian(o.year,o.month+i,n);this.updateDateObj(t,l)},t.prototype.setMonth=function(t,i,n){var r=this.getHijriDate(t),a=e.HijriParser.toGregorian(r.year,i,n);this.updateDateObj(t,a)},t.prototype.addYears=function(t,i,n){var r=this.getHijriDate(t),a=e.HijriParser.toGregorian(r.year+i,n,1);this.updateDateObj(t,a)},t.prototype.isSameMonth=function(e,t){var i=this.getHijriDate(e),n=this.getHijriDate(t);return i.month===n.month},t.prototype.checkMonth=function(e,t){var i=this.getHijriDate(e);return-1===t.indexOf(i.month)},t.prototype.compareMonth=function(e,t){var i=this.getHijriDate(e),n=this.getHijriDate(t);return i.month>n.month},t.prototype.isSameYear=function(e,t){var i=this.getHijriDate(e),n=this.getHijriDate(t);return i.year===n.year},t.prototype.isLastMonth=function(e){return 12===this.getHijriDate(e).month},t.prototype.updateDateObj=function(e,t){e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate())},t.prototype.isLeapYear=function(e,t){return(14+11*(e+t))%30<11},t.prototype.getDaysInMonth=function(e,t){var i=0;return i=29+(e+1)%2,11===e&&this.isLeapYear(t,0)&&i++,i},t.prototype.getHijriDate=function(t){return e.HijriParser.getHijriDate(t)},t}(),mr=function(){function e(){this.timezoneData=[],this.timezoneData=this.getTimezoneData()}return e.prototype.offset=function(e,t){var i=e.getTimezoneOffset();try{var n=new Date(e.toLocaleString("en-US",{timeZone:t}));return isNaN(n.getTime())?0:(e.getTime()-n.getTime())/6e4+i}catch(e){return 0}},e.prototype.convert=function(e,t,i){"string"==typeof t&&(t=this.offset(e,t)),"string"==typeof i&&(i=this.offset(e,i));var n=e.getTimezoneOffset(),r=(e=new Date(e.getTime()+6e4*(t-i))).getTimezoneOffset();return new Date(e.getTime()+6e4*(r-n))},e.prototype.add=function(e,t){return this.convert(e,e.getTimezoneOffset(),t)},e.prototype.remove=function(e,t){return this.convert(e,t,e.getTimezoneOffset())},e.prototype.removeLocalOffset=function(e){return new Date(e.getTime()-6e4*e.getTimezoneOffset())},e.prototype.getLocalTimezoneName=function(){return window.Intl&&Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"},e.prototype.getTimezoneData=function(){return fr},e}(),fr=[{Value:"Pacific/Niue",Text:"(UTC-11:00) Niue"},{Value:"Pacific/Pago_Pago",Text:"(UTC-11:00) Pago Pago"},{Value:"Pacific/Honolulu",Text:"(UTC-10:00) Hawaii Time"},{Value:"Pacific/Rarotonga",Text:"(UTC-10:00) Rarotonga"},{Value:"Pacific/Tahiti",Text:"(UTC-10:00) Tahiti"},{Value:"Pacific/Marquesas",Text:"(UTC-09:30) Marquesas"},{Value:"America/Anchorage",Text:"(UTC-09:00) Alaska Time"},{Value:"Pacific/Gambier",Text:"(UTC-09:00) Gambier"},{Value:"America/Los_Angeles",Text:"(UTC-08:00) Pacific Time"},{Value:"America/Tijuana",Text:"(UTC-08:00) Pacific Time - Tijuana"},{Value:"America/Vancouver",Text:"(UTC-08:00) Pacific Time - Vancouver"},{Value:"America/Whitehorse",Text:"(UTC-08:00) Pacific Time - Whitehorse"},{Value:"Pacific/Pitcairn",Text:"(UTC-08:00) Pitcairn"},{Value:"America/Denver",Text:"(UTC-07:00) Mountain Time"},{Value:"America/Phoenix",Text:"(UTC-07:00) Mountain Time - Arizona"},{Value:"America/Mazatlan",Text:"(UTC-07:00) Mountain Time - Chihuahua, Mazatlan"},{Value:"America/Dawson_Creek",Text:"(UTC-07:00) Mountain Time - Dawson Creek"},{Value:"America/Edmonton",Text:"(UTC-07:00) Mountain Time - Edmonton"},{Value:"America/Hermosillo",Text:"(UTC-07:00) Mountain Time - Hermosillo"},{Value:"America/Yellowknife",Text:"(UTC-07:00) Mountain Time - Yellowknife"},{Value:"America/Belize",Text:"(UTC-06:00) Belize"},{Value:"America/Chicago",Text:"(UTC-06:00) Central Time"},{Value:"America/Mexico_City",Text:"(UTC-06:00) Central Time - Mexico City"},{Value:"America/Regina",Text:"(UTC-06:00) Central Time - Regina"},{Value:"America/Tegucigalpa",Text:"(UTC-06:00) Central Time - Tegucigalpa"},{Value:"America/Winnipeg",Text:"(UTC-06:00) Central Time - Winnipeg"},{Value:"America/Costa_Rica",Text:"(UTC-06:00) Costa Rica"},{Value:"America/El_Salvador",Text:"(UTC-06:00) El Salvador"},{Value:"Pacific/Galapagos",Text:"(UTC-06:00) Galapagos"},{Value:"America/Guatemala",Text:"(UTC-06:00) Guatemala"},{Value:"America/Managua",Text:"(UTC-06:00) Managua"},{Value:"America/Cancun",Text:"(UTC-05:00) America Cancun"},{Value:"America/Bogota",Text:"(UTC-05:00) Bogota"},{Value:"Pacific/Easter",Text:"(UTC-05:00) Easter Island"},{Value:"America/New_York",Text:"(UTC-05:00) Eastern Time"},{Value:"America/Iqaluit",Text:"(UTC-05:00) Eastern Time - Iqaluit"},{Value:"America/Toronto",Text:"(UTC-05:00) Eastern Time - Toronto"},{Value:"America/Guayaquil",Text:"(UTC-05:00) Guayaquil"},{Value:"America/Havana",Text:"(UTC-05:00) Havana"},{Value:"America/Jamaica",Text:"(UTC-05:00) Jamaica"},{Value:"America/Lima",Text:"(UTC-05:00) Lima"},{Value:"America/Nassau",Text:"(UTC-05:00) Nassau"},{Value:"America/Panama",Text:"(UTC-05:00) Panama"},{Value:"America/Port-au-Prince",Text:"(UTC-05:00) Port-au-Prince"},{Value:"America/Rio_Branco",Text:"(UTC-05:00) Rio Branco"},{Value:"America/Halifax",Text:"(UTC-04:00) Atlantic Time - Halifax"},{Value:"America/Barbados",Text:"(UTC-04:00) Barbados"},{Value:"Atlantic/Bermuda",Text:"(UTC-04:00) Bermuda"},{Value:"America/Boa_Vista",Text:"(UTC-04:00) Boa Vista"},{Value:"America/Caracas",Text:"(UTC-04:00) Caracas"},{Value:"America/Curacao",Text:"(UTC-04:00) Curacao"},{Value:"America/Grand_Turk",Text:"(UTC-04:00) Grand Turk"},{Value:"America/Guyana",Text:"(UTC-04:00) Guyana"},{Value:"America/La_Paz",Text:"(UTC-04:00) La Paz"},{Value:"America/Manaus",Text:"(UTC-04:00) Manaus"},{Value:"America/Martinique",Text:"(UTC-04:00) Martinique"},{Value:"America/Port_of_Spain",Text:"(UTC-04:00) Port of Spain"},{Value:"America/Porto_Velho",Text:"(UTC-04:00) Porto Velho"},{Value:"America/Puerto_Rico",Text:"(UTC-04:00) Puerto Rico"},{Value:"America/Santo_Domingo",Text:"(UTC-04:00) Santo Domingo"},{Value:"America/Thule",Text:"(UTC-04:00) Thule"},{Value:"America/St_Johns",Text:"(UTC-03:30) Newfoundland Time - St. Johns"},{Value:"America/Araguaina",Text:"(UTC-03:00) Araguaina"},{Value:"America/Asuncion",Text:"(UTC-03:00) Asuncion"},{Value:"America/Belem",Text:"(UTC-03:00) Belem"},{Value:"America/Argentina/Buenos_Aires",Text:"(UTC-03:00) Buenos Aires"},{Value:"America/Campo_Grande",Text:"(UTC-03:00) Campo Grande"},{Value:"America/Cayenne",Text:"(UTC-03:00) Cayenne"},{Value:"America/Cuiaba",Text:"(UTC-03:00) Cuiaba"},{Value:"America/Fortaleza",Text:"(UTC-03:00) Fortaleza"},{Value:"America/Godthab",Text:"(UTC-03:00) Godthab"},{Value:"America/Maceio",Text:"(UTC-03:00) Maceio"},{Value:"America/Miquelon",Text:"(UTC-03:00) Miquelon"},{Value:"America/Montevideo",Text:"(UTC-03:00) Montevideo"},{Value:"Antarctica/Palmer",Text:"(UTC-03:00) Palmer"},{Value:"America/Paramaribo",Text:"(UTC-03:00) Paramaribo"},{Value:"America/Punta_Arenas",Text:"(UTC-03:00) Punta Arenas"},{Value:"America/Recife",Text:"(UTC-03:00) Recife"},{Value:"Antarctica/Rothera",Text:"(UTC-03:00) Rothera"},{Value:"America/Bahia",Text:"(UTC-03:00) Salvador"},{Value:"America/Santiago",Text:"(UTC-03:00) Santiago"},{Value:"Atlantic/Stanley",Text:"(UTC-03:00) Stanley"},{Value:"America/Noronha",Text:"(UTC-02:00) Noronha"},{Value:"America/Sao_Paulo",Text:"(UTC-02:00) Sao Paulo"},{Value:"Atlantic/South_Georgia",Text:"(UTC-02:00) South Georgia"},{Value:"Atlantic/Azores",Text:"(UTC-01:00) Azores"},{Value:"Atlantic/Cape_Verde",Text:"(UTC-01:00) Cape Verde"},{Value:"America/Scoresbysund",Text:"(UTC-01:00) Scoresbysund"},{Value:"Africa/Abidjan",Text:"(UTC+00:00) Abidjan"},{Value:"Africa/Accra",Text:"(UTC+00:00) Accra"},{Value:"Africa/Bissau",Text:"(UTC+00:00) Bissau"},{Value:"Atlantic/Canary",Text:"(UTC+00:00) Canary Islands"},{Value:"Africa/Casablanca",Text:"(UTC+00:00) Casablanca"},{Value:"America/Danmarkshavn",Text:"(UTC+00:00) Danmarkshavn"},{Value:"Europe/Dublin",Text:"(UTC+00:00) Dublin"},{Value:"Africa/El_Aaiun",Text:"(UTC+00:00) El Aaiun"},{Value:"Atlantic/Faroe",Text:"(UTC+00:00) Faeroe"},{Value:"Etc/UTC",Text:"(UTC+00:00) UTC (no daylight saving)"},{Value:"Europe/Lisbon",Text:"(UTC+00:00) Lisbon"},{Value:"Europe/London",Text:"(UTC+00:00) London"},{Value:"Africa/Monrovia",Text:"(UTC+00:00) Monrovia"},{Value:"Atlantic/Reykjavik",Text:"(UTC+00:00) Reykjavik"},{Value:"UTC",Text:"UTC"},{Value:"Africa/Algiers",Text:"(UTC+01:00) Algiers"},{Value:"Europe/Amsterdam",Text:"(UTC+01:00) Amsterdam"},{Value:"Europe/Andorra",Text:"(UTC+01:00) Andorra"},{Value:"Europe/Berlin",Text:"(UTC+01:00) Berlin"},{Value:"Europe/Brussels",Text:"(UTC+01:00) Brussels"},{Value:"Europe/Budapest",Text:"(UTC+01:00) Budapest"},{Value:"Europe/Belgrade",Text:"(UTC+01:00) Central European Time - Belgrade"},{Value:"Europe/Prague",Text:"(UTC+01:00) Central European Time - Prague"},{Value:"Africa/Ceuta",Text:"(UTC+01:00) Ceuta"},{Value:"Europe/Copenhagen",Text:"(UTC+01:00) Copenhagen"},{Value:"Europe/Gibraltar",Text:"(UTC+01:00) Gibraltar"},{Value:"Africa/Lagos",Text:"(UTC+01:00) Lagos"},{Value:"Europe/Luxembourg",Text:"(UTC+01:00) Luxembourg"},{Value:"Europe/Madrid",Text:"(UTC+01:00) Madrid"},{Value:"Europe/Malta",Text:"(UTC+01:00) Malta"},{Value:"Europe/Monaco",Text:"(UTC+01:00) Monaco"},{Value:"Africa/Ndjamena",Text:"(UTC+01:00) Ndjamena"},{Value:"Europe/Oslo",Text:"(UTC+01:00) Oslo"},{Value:"Europe/Paris",Text:"(UTC+01:00) Paris"},{Value:"Europe/Rome",Text:"(UTC+01:00) Rome"},{Value:"Europe/Stockholm",Text:"(UTC+01:00) Stockholm"},{Value:"Europe/Tirane",Text:"(UTC+01:00) Tirane"},{Value:"Africa/Tunis",Text:"(UTC+01:00) Tunis"},{Value:"Europe/Vienna",Text:"(UTC+01:00) Vienna"},{Value:"Europe/Warsaw",Text:"(UTC+01:00) Warsaw"},{Value:"Europe/Zurich",Text:"(UTC+01:00) Zurich"},{Value:"Asia/Amman",Text:"(UTC+02:00) Amman"},{Value:"Europe/Athens",Text:"(UTC+02:00) Athens"},{Value:"Asia/Beirut",Text:"(UTC+02:00) Beirut"},{Value:"Europe/Bucharest",Text:"(UTC+02:00) Bucharest"},{Value:"Africa/Cairo",Text:"(UTC+02:00) Cairo"},{Value:"Europe/Chisinau",Text:"(UTC+02:00) Chisinau"},{Value:"Asia/Damascus",Text:"(UTC+02:00) Damascus"},{Value:"Asia/Gaza",Text:"(UTC+02:00) Gaza"},{Value:"Europe/Helsinki",Text:"(UTC+02:00) Helsinki"},{Value:"Asia/Jerusalem",Text:"(UTC+02:00) Jerusalem"},{Value:"Africa/Johannesburg",Text:"(UTC+02:00) Johannesburg"},{Value:"Africa/Khartoum",Text:"(UTC+02:00) Khartoum"},{Value:"Europe/Kiev",Text:"(UTC+02:00) Kiev"},{Value:"Africa/Maputo",Text:"(UTC+02:00) Maputo"},{Value:"Europe/Kaliningrad",Text:"(UTC+02:00) Moscow-01 - Kaliningrad"},{Value:"Asia/Nicosia",Text:"(UTC+02:00) Nicosia"},{Value:"Europe/Riga",Text:"(UTC+02:00) Riga"},{Value:"Europe/Sofia",Text:"(UTC+02:00) Sofia"},{Value:"Europe/Tallinn",Text:"(UTC+02:00) Tallinn"},{Value:"Africa/Tripoli",Text:"(UTC+02:00) Tripoli"},{Value:"Europe/Vilnius",Text:"(UTC+02:00) Vilnius"},{Value:"Africa/Windhoek",Text:"(UTC+02:00) Windhoek"},{Value:"Asia/Baghdad",Text:"(UTC+03:00) Baghdad"},{Value:"Europe/Istanbul",Text:"(UTC+03:00) Istanbul"},{Value:"Europe/Minsk",Text:"(UTC+03:00) Minsk"},{Value:"Europe/Moscow",Text:"(UTC+03:00) Moscow+00 - Moscow"},{Value:"Africa/Nairobi",Text:"(UTC+03:00) Nairobi"},{Value:"Asia/Qatar",Text:"(UTC+03:00) Qatar"},{Value:"Asia/Riyadh",Text:"(UTC+03:00) Riyadh"},{Value:"Antarctica/Syowa",Text:"(UTC+03:00) Syowa"},{Value:"Asia/Tehran",Text:"(UTC+03:30) Tehran"},{Value:"Asia/Baku",Text:"(UTC+04:00) Baku"},{Value:"Asia/Dubai",Text:"(UTC+04:00) Dubai"},{Value:"Indian/Mahe",Text:"(UTC+04:00) Mahe"},{Value:"Indian/Mauritius",Text:"(UTC+04:00) Mauritius"},{Value:"Europe/Samara",Text:"(UTC+04:00) Moscow+01 - Samara"},{Value:"Indian/Reunion",Text:"(UTC+04:00) Reunion"},{Value:"Asia/Tbilisi",Text:"(UTC+04:00) Tbilisi"},{Value:"Asia/Yerevan",Text:"(UTC+04:00) Yerevan"},{Value:"Asia/Kabul",Text:"(UTC+04:30) Kabul"},{Value:"Asia/Aqtau",Text:"(UTC+05:00) Aqtau"},{Value:"Asia/Aqtobe",Text:"(UTC+05:00) Aqtobe"},{Value:"Asia/Ashgabat",Text:"(UTC+05:00) Ashgabat"},{Value:"Asia/Dushanbe",Text:"(UTC+05:00) Dushanbe"},{Value:"Asia/Karachi",Text:"(UTC+05:00) Karachi"},{Value:"Indian/Kerguelen",Text:"(UTC+05:00) Kerguelen"},{Value:"Indian/Maldives",Text:"(UTC+05:00) Maldives"},{Value:"Antarctica/Mawson",Text:"(UTC+05:00) Mawson"},{Value:"Asia/Yekaterinburg",Text:"(UTC+05:00) Moscow+02 - Yekaterinburg"},{Value:"Asia/Tashkent",Text:"(UTC+05:00) Tashkent"},{Value:"Asia/Colombo",Text:"(UTC+05:30) Colombo"},{Value:"Asia/Kolkata",Text:"(UTC+05:30) India Standard Time"},{Value:"Asia/Katmandu",Text:"(UTC+05:45) Katmandu"},{Value:"Asia/Almaty",Text:"(UTC+06:00) Almaty"},{Value:"Asia/Bishkek",Text:"(UTC+06:00) Bishkek"},{Value:"Indian/Chagos",Text:"(UTC+06:00) Chagos"},{Value:"Asia/Dhaka",Text:"(UTC+06:00) Dhaka"},{Value:"Asia/Omsk",Text:"(UTC+06:00) Moscow+03 - Omsk"},{Value:"Asia/Thimphu",Text:"(UTC+06:00) Thimphu"},{Value:"Antarctica/Vostok",Text:"(UTC+06:00) Vostok"},{Value:"Indian/Cocos",Text:"(UTC+06:30) Cocos"},{Value:"Asia/Yangon",Text:"(UTC+06:30) Rangoon"},{Value:"Asia/Bangkok",Text:"(UTC+07:00) Bangkok"},{Value:"Indian/Christmas",Text:"(UTC+07:00) Christmas"},{Value:"Antarctica/Davis",Text:"(UTC+07:00) Davis"},{Value:"Asia/Saigon",Text:"(UTC+07:00) Hanoi"},{Value:"Asia/Hovd",Text:"(UTC+07:00) Hovd"},{Value:"Asia/Jakarta",Text:"(UTC+07:00) Jakarta"},{Value:"Asia/Krasnoyarsk",Text:"(UTC+07:00) Moscow+04 - Krasnoyarsk"},{Value:"Asia/Brunei",Text:"(UTC+08:00) Brunei"},{Value:"Asia/Shanghai",Text:"(UTC+08:00) China Time - Beijing"},{Value:"Asia/Choibalsan",Text:"(UTC+08:00) Choibalsan"},{Value:"Asia/Hong_Kong",Text:"(UTC+08:00) Hong Kong"},{Value:"Asia/Kuala_Lumpur",Text:"(UTC+08:00) Kuala Lumpur"},{Value:"Asia/Macau",Text:"(UTC+08:00) Macau"},{Value:"Asia/Makassar",Text:"(UTC+08:00) Makassar"},{Value:"Asia/Manila",Text:"(UTC+08:00) Manila"},{Value:"Asia/Irkutsk",Text:"(UTC+08:00) Moscow+05 - Irkutsk"},{Value:"Asia/Singapore",Text:"(UTC+08:00) Singapore"},{Value:"Asia/Taipei",Text:"(UTC+08:00) Taipei"},{Value:"Asia/Ulaanbaatar",Text:"(UTC+08:00) Ulaanbaatar"},{Value:"Australia/Perth",Text:"(UTC+08:00) Western Time - Perth"},{Value:"Asia/Pyongyang",Text:"(UTC+08:30) Pyongyang"},{Value:"Asia/Dili",Text:"(UTC+09:00) Dili"},{Value:"Asia/Jayapura",Text:"(UTC+09:00) Jayapura"},{Value:"Asia/Yakutsk",Text:"(UTC+09:00) Moscow+06 - Yakutsk"},{Value:"Pacific/Palau",Text:"(UTC+09:00) Palau"},{Value:"Asia/Seoul",Text:"(UTC+09:00) Seoul"},{Value:"Asia/Tokyo",Text:"(UTC+09:00) Tokyo"},{Value:"Australia/Darwin",Text:"(UTC+09:30) Central Time - Darwin"},{Value:"Antarctica/DumontDUrville",Text:'(UTC+10:00) Dumont D"Urville'},{Value:"Australia/Brisbane",Text:"(UTC+10:00) Eastern Time - Brisbane"},{Value:"Pacific/Guam",Text:"(UTC+10:00) Guam"},{Value:"Asia/Vladivostok",Text:"(UTC+10:00) Moscow+07 - Vladivostok"},{Value:"Pacific/Port_Moresby",Text:"(UTC+10:00) Port Moresby"},{Value:"Pacific / Chuuk",Text:"(UTC+10:00) Truk"},{Value:"Australia/Adelaide",Text:"(UTC+10:30) Central Time - Adelaide"},{Value:"Antarctica/Casey",Text:"(UTC+11:00) Casey"},{Value:"Australia/Hobart",Text:"(UTC+11:00) Eastern Time - Hobart"},{Value:"Australia/Sydney",Text:"(UTC+11:00) Eastern Time - Melbourne, Sydney"},{Value:"Pacific/Efate",Text:"(UTC+11:00) Efate"},{Value:"Pacific/Guadalcanal",Text:"(UTC+11:00) Guadalcanal"},{Value:"Pacific/Kosrae",Text:"(UTC+11:00) Kosrae"},{Value:"Asia/Magadan",Text:"(UTC+11:00) Moscow+08 - Magadan"},{Value:"Pacific / Norfolk",Text:"(UTC+11:00) Norfolk"},{Value:"Pacific/Noumea",Text:"(UTC+11:00) Noumea"},{Value:"Pacific/Pohnpei",Text:"(UTC+11:00) Ponape"},{Value:"Pacific/Funafuti",Text:"(UTC+12:00) Funafuti"},{Value:"Pacific/Kwajalein",Text:"(UTC+12:00) Kwajalein"},{Value:"Pacific/Majuro",Text:"(UTC+12:00) Majuro"},{Value:"Asia/Kamchatka",Text:"(UTC+12:00) Moscow+09 - Petropavlovsk - Kamchatskiy"},{Value:"Pacific / Nauru",Text:"(UTC+12:00) Nauru"},{Value:"Pacific/Tarawa",Text:"(UTC+12:00) Tarawa"},{Value:"Pacific/Wake",Text:"(UTC+12:00) Wake"},{Value:"Pacific/Wallis",Text:"(UTC+12:00) Wallis"},{Value:"Pacific/Auckland",Text:"(UTC+13:00) Auckland"},{Value:"Pacific/Enderbury",Text:"(UTC+13:00) Enderbury"},{Value:"Pacific/Fakaofo",Text:"(UTC+13:00) Fakaofo"},{Value:"Pacific/Fiji",Text:"(UTC+13:00) Fiji"},{Value:"Pacific/Tongatapu",Text:"(UTC+13:00) Tongatapu"},{Value:"Pacific/Apia",Text:"(UTC+14:00) Apia"},{Value:"Pacific/Kiritimati",Text:"(UTC+14:00) Kiritimati"}];function yr(t,i,n,r){void 0===r&&(r="Gregorian");var a,s,o=Ur(t),l=i.getConstant(aa)+" ",p=r.toLowerCase();if("en"===n||"en-US"===n){var c="months.stand-alone.abbreviated",h="days.stand-alone.abbreviated";s=(0,e.getValue)(c,(0,e.getDefaultDateObject)(p)),a=(0,e.getValue)(h,(0,e.getDefaultDateObject)(p))}else{c="main."+n+".dates.calendars."+p+".months.stand-alone.abbreviated",h="main."+n+".dates.calendars."+p+".days.stand-alone.abbreviated";s=(0,e.getValue)(c,e.cldrData),a=(0,e.getValue)(h,e.cldrData)}switch(o.interval>1&&(l+=o.interval+" "),o.freq){case"DAILY":l+=i.getConstant(oa);break;case"WEEKLY":l+=i.getConstant(la)+" "+i.getConstant(ra)+" ",o.day.forEach((function(t,i){l+=xe((0,e.getValue)(ha[""+t],a),"single"),l+=o.day.length-1===i?"":", "}));break;case"MONTHLY":l+=i.getConstant(pa)+" "+i.getConstant(ra)+" ",l+=Tr(o,a,i);break;case"YEARLY":l+=i.getConstant(ca)+" "+i.getConstant(ra)+" ",l+=xe((0,e.getValue)(o.month[0].toString(),s),"single")+" ",l+=Tr(o,a,i)}if(o.count)l+=", "+o.count+" "+i.getConstant(na);else if(o.until){var d=o.until;l+=", "+i.getConstant(sa)+" "+d.getDate()+" "+xe((0,e.getValue)((d.getMonth()+1).toString(),s),"single")+" "+d.getFullYear()}return l}function Tr(t,i,n){var r="";if(t.monthDay.length)r+=t.monthDay[0];else if(t.day){var a=t.setPosition-1;r+=n.getConstant(ia[a>-1?a:ia.length-1])+" "+xe((0,e.getValue)(ha[t.day[0]],i),"single")}return r}function wr(t,i,n,r,a,s,o,l){void 0===a&&(a=ta),void 0===s&&(s=null),void 0===o&&(o="Gregorian"),void 0===l&&(l=null);var p,c=Ur(i);Zr=Gr(o);var h=[],d=new Date(t.getTime());Xr=[];var u=(0,e.isNullOrUndefined)(n)?[]:n.split(","),g=new mr;if(u.forEach((function(e){var t=Dr(e);l&&(t=g.add(new Date(t.getTime()),l)),Xr.push(new Date(t.getTime()).setHours(0,0,0,0))})),c.recExceptionCount=(0,e.isNullOrUndefined)(c.count)?0:Xr.length,Kr=s&&s>t&&!c.count?new Date(new Date(s.getTime()).setHours(0,0,0)):null,!c.until&&Kr&&((p=new Date(Kr.getTime())).setDate(Kr.getDate()+a*c.interval),c.until=p),c.until&&t>c.until)return h;if(Qr=a,r=r||0,function(e){for(;$r[0]!==e;)Yr($r)}(ea[parseInt(r.toString(),10)]),c.until){var v=se(c.until);c.until=new Date(v.getFullYear(),v.getMonth(),v.getDate(),23,59,59)}switch(c.freq){case"DAILY":!function(e,t,i,n){var r=new Date(e.getTime()),a=n.interval,s=Sr(e,n),o=n.day;for(;Nr(r,t)&&!(_r(r,n)&&(o.indexOf(ea[r.getDay()])>-1||0===o.length)&&(br(i,r.getTime()),s&&i.length+n.recExceptionCount>=s));)r.setDate(r.getDate()+a),r.getHours()!==e.getHours()&&r.setHours(e.getHours())}(d,c.until,h,c);break;case"WEEKLY":!function(t,i,n,r){var a=new Date(t.getTime());r.day.length||r.day.push(ea[t.getDay()]);var s,o=r.interval,l=r.day,p=Sr(t,r),c=!0,h=[];if(l.length>1)for(((0,e.isNullOrUndefined)(r.wkst)||""===r.wkst)&&(r.wkst=$r[0]),s=ea.indexOf(r.wkst);Nr(a,i);){var d=ea.indexOf(ea[a.getDay()])-s,u=pe(a,-(d=-1===d?6:d)),g=pe(u,6),v=new Date(a.getTime());for(g=se(g),v=se(v);g>=v&&(l.indexOf(ea[a.getDay()])>-1&&h.push([a.getTime()]),!(p&&n.length+r.recExceptionCount>=p));)a.setDate(a.getDate()+1),a.getHours()!==t.getHours()&&a.setHours(t.getHours()),v=se(v=new Date(a.getTime()));if(a.setDate(a.getDate()-1),p&&n.length+r.recExceptionCount>=p)break;a.setDate(a.getDate()+1+7*(o-1)),Ir(h,c,t,i,n,r),h=[]}else{for(a=Fr(t,r.day);Nr(a,i)&&((c=_r(a,r))&&l.indexOf(ea[a.getDay()])>-1&&br(n,a.getTime()),!(p&&n.length+r.recExceptionCount>=p));)a.setDate(a.getDate()+7*o);Ir(h,c,t,i,n,r),h=[]}}(d,c.until,h,c);break;case"MONTHLY":Cr(d,c.until,h,c);break;case"YEARLY":!function(t,i,n,r){switch(function(e){if(e.yearDay.length)return"YEARDAY";if(e.weekNo.length)return"WEEKNO";return"MONTH"}(r)){case"MONTH":Cr(t,i,n,r);break;case"WEEKNO":!function(t,i,n,r){var a,s,o,l,p,c,h=Zr.getYearLastDate(t,0),d=Sr(t,r),u=r.weekNo,g=[],v=r.day;for(;Nr(h,i);){o=6-$r.indexOf(ea[h.getDay()])+1;for(var m=0;m<u.length;m++)for(p=1===(l=(l=u[parseInt(m.toString(),10)])>0?l:53+l+1)?o:o+7*(l-1),c=1===l?o-7:o+7*(l-2);c<p;)a=new Date(h.getTime()+G*c),(0===v.length||v.indexOf(ea[a.getDay()])>-1)&&((0,e.isNullOrUndefined)(r.setPosition)?Hr(s,t,i,n,r,a.getTime()):g.push([a.getTime()])),c++;if((0,e.isNullOrUndefined)(r.setPosition)||Lr(g,s,t,i,n,r),d&&n.length+r.recExceptionCount>=d)return;h=Zr.getYearLastDate(a,r.interval),g=[]}}(t,i,n,r);break;case"YEARDAY":!function(t,i,n,r){var a,s,o,l=Zr.getYearLastDate(t,0),p=Sr(t,r),c=[],h=r.day;for(;Nr(l,i);){for(var d=0;d<r.yearDay.length;d++)o=r.yearDay[parseInt(d.toString(),10)],a=new Date(l.getTime()),o!==Zr.getLeapYearDaysCount()&&o!==-Zr.getLeapYearDaysCount()||Zr.isLeapYear(Zr.getFullYear(a),1)?(a.setDate(a.getDate()+(o<0?Zr.getYearDaysCount(a,1)+1+o:o)),(0===h.length||h.indexOf(ea[a.getDay()])>-1)&&(null==r.setPosition?Hr(s,t,i,n,r,a.getTime()):c.push([a.getTime()]))):a.setDate(a.getDate()+1);if((0,e.isNullOrUndefined)(r.setPosition)||Lr(c,s,t,i,n,r),p&&n.length+r.recExceptionCount>=p)return;l=Zr.getYearLastDate(a,r.interval),c=[]}}(t,i,n,r)}}(d,c.until,h,c)}return h}function Dr(e){return new Date(e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,5)+":"+e.substr(11,2)+":"+e.substr(13))}function br(e,t){var i=new Date(t).setHours(0,0,0,0);-1===Xr.indexOf(i)&&(!Kr||i>=Kr.getTime())&&e.push(t)}function Sr(e,t){var i=Qr;return t.count?i=t.count:t.until&&("DAILY"===t.freq||"WEEKLY"===t.freq?i=Math.floor((t.until.getTime()-e.getTime())/G)+1:"MONTHLY"!==t.freq&&"YEARLY"!==t.freq||(i=Math.floor((t.until.getMonth()+12*t.until.getFullYear()-(e.getMonth()+12*e.getFullYear()))/t.interval)+(t.day.length>1?Math.floor((t.until.getTime()-e.getTime())/G)+1:1),"YEARLY"===t.freq&&(i=t.month.length>1?i*t.month.length:i))),i}function Cr(t,i,n,r){r.month.length||r.day.length||r.monthDay.length?r.month.length>0&&!r.day.length&&!r.monthDay.length&&r.monthDay.push(t.getDate()):(r.monthDay.push(t.getDate()),"YEARLY"===r.freq&&r.month.push(t.getMonth()+1));var a=function(e){if(e.monthDay.length&&!e.day.length)return"date";if(!e.monthDay.length&&e.day.length)return"day";return"both"}(r);switch(a){case"day":switch(r.freq){case"MONTHLY":Ar(t,i,n,r);break;case"YEARLY":!function(t,i,n,r){var a=r.day,s=a.map((function(e){return da.test(e)}));if(a.length>1&&s.indexOf(!0)>-1)return void function(t,i,n,r){var a,s,o,l,p,c=r.day,h=Sr(t,r),d=new Date(t.getTime()),u=r.interval,g=[],v=[],m=0;d=Zr.getMonthStartDate(d);var f=[];r.month.length&&Zr.setMonth(d,r.month[0],1);d=Fr(d,r.day);for(;Nr(d,i);){o=new Date(d.getTime());for(var y=0;y<=r.month.length;y++)for(var T=0;T<=c.length-1;T++){for(d=Fr(d=Zr.getMonthStartDate(d),r.day),g=[];Zr.isSameYear(o,d)&&h&&n.length+r.recExceptionCount<=h;)for(;Zr.isSameYear(o,d);){if(o=new Date(d.getTime()),0===r.month.length||r.month.length>0&&r.month[parseInt(y.toString(),10)]===Zr.getMonth(o)){var w=c[parseInt(T.toString(),10)].match(ga),D=parseInt(w[0],10);for(l=new Date(d.getTime());Zr.isSameYear(l,d)&&Zr.isSameMonth(l,d);)w[w.length-1]===ea[l.getDay()]&&g.push([l.getTime()]),l.setDate(l.getDate()+1);l.setDate(l.getDate()-1),a=w[0].indexOf("-")>-1?g.length- -1*D:D-1,a=isNaN(a)?0:a}m=Vr(d,r,m,p,1),d=Fr(d,r.day)}if(d=0===T&&l?new Date(l.getTime()):new Date(o.getTime()),g.length>0&&((0,e.isNullOrUndefined)(r.setPosition)?Lr(g,s,t,i,n,r,a):v=[Rr(g,a,f)]),h&&n.length+r.recExceptionCount>=h)return}(0,e.isNullOrUndefined)(r.setPosition)||(jr(v,s,t,i,n,r),f=[]),Zr.isLastMonth(d)?(Zr.setValidDate(d,1,1),d.setFullYear(d.getFullYear()+u-1)):d.setFullYear(d.getFullYear()+u),d=Fr(d,r.day),r.month.length&&Zr.setMonth(d,r.month[0],d.getDate())}}(t,i,n,r);if(r.month.length&&1===a.length&&s.indexOf(!0)>-1)return void Ar(t,i,n,r);var o,l=new Date(t.getTime()),p=Sr(t,r),c=r.interval,h=[];r.month.length&&Zr.setMonth(l,r.month[0],l.getDate());(0,e.isNullOrUndefined)(r.setPosition)&&0===r.month.length&&0===r.weekNo.length&&l.setFullYear(t.getFullYear(),0,1);l=Fr(l=Zr.getMonthStartDate(l),r.day);for(;Nr(l,i);){for(o=new Date(l.getTime());Zr.isSameYear(o,l)&&p&&n.length+r.recExceptionCount<=p;)for(o=new Date(l.getTime());Zr.isSameYear(o,l);){if(!(0===r.month.length||r.month.length>0&&!Zr.checkMonth(l,r.month))){Zr.setValidDate(l,1,1),l=Fr(l,r.day);break}if(a.length>1){if(Zr.compareMonth(o,l)){Zr.setValidDate(l,1,1),l=Fr(l,r.day);break}a.indexOf(ea[o.getDay()])>-1&&h.push([o.getTime()]),o.setDate(o.getDate()+1)}else{if(o.getFullYear()>l.getFullYear()){Zr.setValidDate(l,1,1),l=Fr(l,r.day);break}var d=qr(a[0]);ea[o.getDay()]===d&&new Date(o.getFullYear(),o.getMonth(),0)>new Date(t.getFullYear())&&h.push([o.getTime()]),o.setDate(o.getDate()+7)}}if(l.setFullYear(o.getFullYear(),o.getMonth(),o.getDate()),kr(h,t,i,n,r),Zr.isLastMonth(l)&&(Zr.setValidDate(l,1,1),l=Fr(l,r.day)),l.setFullYear(l.getFullYear()+c-1),p&&n.length+r.recExceptionCount>=p)return;l=Fr(l,r.day),h=[]}}(t,i,n,r)}break;case"both":case"date":switch(r.freq){case"MONTHLY":Er(t,i,n,r);break;case"YEARLY":!function(e,t,i,n){if(n.month.length)return void Er(e,t,i,n);var r,a=Or(e,n);a.tempDate=a.mainDate=Zr.getMonthStartDate(a.tempDate);for(;Nr(a.tempDate,t);){for(r=new Date(a.tempDate.getTime());Zr.isSameYear(r,a.tempDate)&&a.expectedCount&&i.length+n.recExceptionCount<=a.expectedCount;){if(!(0===n.month.length||n.month.length>0&&!Zr.checkMonth(a.tempDate,n.month))){Zr.setValidDate(a.tempDate,1,1),a.tempDate=Fr(a.tempDate,n.day);break}xr(n,a,t,!1),a.beginDate=new Date(a.tempDate.getTime()),a.monthInit=Vr(a.tempDate,n,a.monthInit,a.beginDate)}if(a.tempDate.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),Ir(a.dateCollection,a.state,e,t,i,n),Zr.isLastMonth(a.tempDate)&&(Zr.setValidDate(a.tempDate,1,1),a.tempDate=Fr(a.tempDate,n.day)),a.expectedCount&&i.length+n.recExceptionCount>=a.expectedCount)return;a.tempDate.setFullYear(a.tempDate.getFullYear()+n.interval-1),a.tempDate=Fr(a.tempDate,n.day),a.monthInit=Vr(a.tempDate,n,a.monthInit,a.beginDate),a.dateCollection=[]}}(t,i,n,r)}}}function Or(e,t){var i={monthCollection:[],index:0,tempDate:new Date(e.getTime()),mainDate:new Date(e.getTime()),expectedCount:Sr(e,t),monthInit:0,dateCollection:[]};return t.month.length&&Zr.setMonth(i.tempDate,t.month[0],i.tempDate.getDate()),i}function Er(t,i,n,r){var a=Or(t,r);if(a.tempDate=a.mainDate=Zr.getMonthStartDate(a.tempDate),!(("MONTHLY"===r.freq&&12===r.interval||"YEARLY"===r.freq)&&Zr.getMonthDaysCount(t)<r.monthDay[0]))for(;Nr(a.tempDate,i);){if(a.beginDate=new Date(a.tempDate.getTime()),xr(r,a,i,!0,t,n),(0,e.isNullOrUndefined)(r.setPosition)||Lr(a.dateCollection,a.state,t,i,n,r),a.expectedCount&&n.length+r.recExceptionCount>=a.expectedCount)return;a.monthInit=Vr(a.tempDate,r,a.monthInit,a.beginDate),a.dateCollection=[]}}function xr(t,i,n,r,a,s){for(var o=0;o<t.monthDay.length;o++){i.date=t.monthDay[parseInt(o.toString(),10)],i.tempDate=Zr.getMonthStartDate(i.tempDate);var l=Zr.getMonthDaysCount(i.tempDate);if(i.date=i.date>0?i.date:l+i.date+1,Br(i.tempDate,i.date,i.mainDate)&&i.date>0){if(Zr.setDate(i.tempDate,i.date),n&&i.tempDate>n)return;(0===t.day.length||t.day.indexOf(ea[i.tempDate.getDay()])>-1)&&(r&&(0,e.isNullOrUndefined)(t.setPosition)&&i.expectedCount&&s.length+t.recExceptionCount<i.expectedCount?Hr(i.state,a,n,s,t,i.tempDate.getTime()):i.dateCollection.push([i.tempDate.getTime()]))}}}function Vr(t,i,n,r,a){void 0===r&&(r=null);var s=r?r.getMonth():0,o=Zr.getMonthStartDate(t);return a=(0,e.isNullOrUndefined)(a)?i.interval:a,t.setFullYear(o.getFullYear()),t.setMonth(o.getMonth()),t.setDate(o.getDate()),i.month.length?(n++,n%=i.month.length,Zr.setMonth(t,i.month[parseInt(n.toString(),10)],1),0===n&&Zr.addYears(t,a,i.month[0])):(r&&r.getFullYear()<t.getFullYear()&&(s=t.getMonth()-1),Zr.setValidDate(t,a,1,s,r)),n}function Ar(t,i,n,r){if(r.day.length>1)!function(t,i,n,r){var a=r.day,s=new Date(t.getTime());s=Zr.getMonthStartDate(s);var o,l,p,c=[],h=[],d=[],u=Sr(t,r),g=0;for(r.month.length&&Zr.setMonth(s,r.month[0],1),s=Fr(s,r.day);Nr(s,i)&&u&&n.length+r.recExceptionCount<u;){var v=new Date(s.getTime());if(a.map((function(e){return da.test(e)})).indexOf(!0)>-1){for(var m=0;m<=a.length-1;m++){var f=a[parseInt(m.toString(),10)].match(ga),y=parseInt(f[0],10);for(s=new Date(s.getTime()),s=Fr(s=Zr.getMonthStartDate(s),a),v.setFullYear(s.getFullYear(),s.getMonth(),s.getDate());Zr.isSameYear(v,s)&&Zr.isSameMonth(v,s);)f[f.length-1]===ea[v.getDay()]&&c.push([v.getTime()]),v.setDate(v.getDate()+1);if(v.setDate(v.getDate()-1),o=f[0].indexOf("-")>-1?c.length- -1*y:y-1,o=isNaN(o)?0:o,c.length>0&&((0,e.isNullOrUndefined)(r.setPosition)?Lr(c,l,t,i,n,r,o):h=[Rr(c,o,d)]),u&&n.length+r.recExceptionCount>=u)return;c=[]}(0,e.isNullOrUndefined)(r.setPosition)||(jr(h,l,t,i,n,r),d=[]),g=Vr(s,r,g,p),s=Fr(s,r.day),c=[]}else{var T=[],w=Wr(a);v.setFullYear(s.getFullYear(),s.getMonth(),s.getDate());var D=new Date(s.getTime());for(p=new Date(s.getTime());Zr.isSameMonth(D,s);)T.push(s.getTime()),a.indexOf(ea[s.getDay()])>-1&&(c.push(T),T=[]),s.setDate(s.getDate()+w[ea[s.getDay()]]);if(o=r.setPosition<1?c.length+r.setPosition:r.setPosition-1,(0,e.isNullOrUndefined)(r.setPosition)){o=0;for(var b=[],S=0;S<c.length;S++)for(var C=0;C<c[parseInt(S.toString(),10)].length;C++)b.push(c[parseInt(S.toString(),10)][parseInt(C.toString(),10)]);c=[b]}if(c.length>0&&Lr(c,l,t,i,n,r,o),u&&n.length+r.recExceptionCount>=u)return;g=Vr(s,r,g,p),s=Fr(s,r.day),c=[]}}}(t,i,n,r);else{var a,s=new Date(t.getTime()),o=Sr(t,r),l=[],p=0;for(s=Zr.getMonthStartDate(s),r.month.length&&Zr.setMonth(s,r.month[0],1),s=Fr(s,r.day);Nr(s,i)&&o&&n.length+r.recExceptionCount<o;){a=new Date(s.getTime());for(var c=new Date(s.getTime());Zr.isSameMonth(s,c);)l.push([c.getTime()]),c.setDate(c.getDate()+7);kr(l,t,i,n,r),p=Vr(s,r,p,a),s=Fr(s,r.day),l=[]}}}function Ir(t,i,n,r,a,s){var o=s.setPosition<1?t.length+s.setPosition:s.setPosition-1;(0,e.isNullOrUndefined)(s.setPosition)&&(o=0,t=Mr(t)),t.length>0&&Lr(t,i,n,r,a,s,o)}function Mr(e){for(var t=[],i=0;i<e.length;i++)for(var n=0;n<e[parseInt(i.toString(),10)].length;n++)t.push(new Date(e[parseInt(i.toString(),10)][parseInt(n.toString(),10)]).getTime());return e=t.length>0?[t]:[]}function kr(e,t,i,n,r){var a,s=[],o=function(e,t){var i,n={monthCollection:[],index:0};if(1===t.length){var r=t[0].match(ga),a=void 0;r.length>1?i=(a=parseInt(r[0],10))<1?e.length+a:a-1:(i=0,e=Mr(e))}else i=0,e=Mr(e);return n.monthCollection=e,n.index=i,n}(e,r.day);e=o.monthCollection;var l=o.index;null!=r.setPosition?jr([Rr(e,l,s)],a,t,i,n,r):e.length>0&&Lr(e,a,t,i,n,r,l),s=[]}function Rr(e,t,i){for(var n=0;n<e[parseInt(t.toString(),10)].length;n++)i.push(e[parseInt(t.toString(),10)][parseInt(n.toString(),10)]);return i}function Hr(e,t,i,n,r,a){var s=Sr(t,r),o=new Date(a);e=_r(o,r),o>=t&&Nr(o,i)&&e&&s&&n.length+r.recExceptionCount<s&&br(n,a)}function Pr(e,t,i,n,r){var a=t||0,s=new Date(e,r.month[0]-1,1),o=new Date(e,r.month[0],0).getDate(),l=(s.getDay()-a+7)%7+o,p=Math.ceil(l/7)-1,c=i[parseInt(n.toString(),10)][parseInt(p.toString(),10)];return _r(new Date(c),r)?p:p-1}function jr(e,t,i,n,r,a){if(e.length>0)for(var s=0;s<e.length;s++){e[parseInt(s.toString(),10)].sort();var o=a.day.map((function(e){return da.test(e)})),l="YEARLY"===a.freq&&a.validRules.indexOf("BYMONTH")>-1&&!(o.indexOf(!0)>-1)?Pr(new Date(e[0][0]).getFullYear(),0,e,s,a):e[parseInt(s.toString(),10)].length+a.setPosition,p=a.setPosition<1?l:a.setPosition-1;Hr(t,i,n,r,a,e[parseInt(s.toString(),10)][parseInt(p.toString(),10)])}}function Lr(t,i,n,r,a,s,o){if(t.length>0){o=(0,e.isNullOrUndefined)(o)?s.setPosition<1?t.length+s.setPosition:s.setPosition-1:o,t[parseInt(o.toString(),10)].sort();for(var l=0;l<t[parseInt(o.toString(),10)].length;l++){Hr(i,n,r,a,s,t[parseInt(o.toString(),10)][parseInt(l.toString(),10)])}}}function Nr(e,t){return!t||e<=t}function qr(e){return e.replace(ua,"")}function Fr(e,t){var i,n=new Date(e.getTime());if(t.length>0){for(var r=[],a=0;a<=t.length-1;a++)i=qr(t[parseInt(a.toString(),10)]),r.push(i);if(-1===r.indexOf(ea[n.getDay()]))do{n.setDate(n.getDate()+1)}while(-1===r.indexOf(ea[n.getDay()]))}return n}function Ur(e){var t,i={freq:null,interval:1,count:null,until:null,day:[],wkst:null,month:[],weekNo:[],monthDay:[],yearDay:[],setPosition:null,validRules:[]},n=e.split(";"),r=[];if(n.forEach((function(e){switch((r=e.split("="))[0]){case"UNTIL":t=r[1],i.until=Dr(t);break;case"BYDAY":i.day=r[1].split(","),i.validRules.push(r[0]);break;case"BYMONTHDAY":i.monthDay=r[1].split(",").map(Number),i.validRules.push(r[0]);break;case"BYMONTH":i.month=r[1].split(",").map(Number),i.validRules.push(r[0]);break;case"BYYEARDAY":i.yearDay=r[1].split(",").map(Number),i.validRules.push(r[0]);break;case"BYWEEKNO":i.weekNo=r[1].split(",").map(Number),i.validRules.push(r[0]);break;case"INTERVAL":i.interval=parseInt(r[1],10);break;case"COUNT":i.count=parseInt(r[1],10);break;case"BYSETPOS":i.setPosition=parseInt(r[1],10)>4?-1:parseInt(r[1],10);break;case"FREQ":i.freq=r[1];break;case"WKST":i.wkst=r[1]}})),"MONTHLY"===i.freq&&0===i.monthDay.length){var a=i.validRules.indexOf("BYDAY");i.validRules.splice(a,1)}return i}function Br(e,t,i){return t<=Zr.getMonthDaysCount(e)&&e>=i}function Wr(e){var t={};return e.forEach((function(i,n){if(n===e.length-1){for(var r=$r.indexOf(i),a=r;a%7!==$r.indexOf(e[0]);)a++;t[""+i]=a-r}else t[""+i]=$r.indexOf(e[n+1])-$r.indexOf(i)})),t}function zr(e,t){var i,n=t.slice(0),r=function(e){Jr[Zr.getFullYear(e)]||(Jr[Zr.getFullYear(e)]=Zr.getYearLastDate(e,0));var t=Jr[Zr.getFullYear(e)],i=e.getTime()-t.getTime();return Math.ceil(i/G)}(e);for(i=n.shift();i;){if(i<0&&(i=i+Zr.getYearDaysCount(e,0)+1),i===r)return!1;i=n.shift()}return!0}function Yr(e){var t=e.shift();e.push(t)}function _r(e,t){var i=!0,n=t.day,r=t.month,a=Zr.getExpectedDays(e,t.monthDay),s=t.yearDay;return t.validRules.forEach((function(t){switch(t){case"BYDAY":(function(e,t){var i=[];return t.forEach((function(e){var t=e.match(ga);2===t.length?i.push(t[1]):i.push(t[0])})),-1===i.indexOf(ea[parseInt(e.toString(),10)])})(e.getDay(),n)&&(i=!1);break;case"BYMONTH":Zr.checkMonth(e,r)&&(i=!1);break;case"BYMONTHDAY":(function(e,t){var i,n=t.slice(0),r=Zr.getMonthDaysCount(e);for(i=n.shift();i;){if(i<0&&(i=i+r+1),i===e.getDate())return!1;i=n.shift()}return!0})(e,a)&&(i=!1);break;case"BYYEARDAY":zr(e,s)&&(i=!1)}})),i}function Gr(e){return"Islamic"===e?new vr:new gr}var Xr,Qr,Kr,Zr,Jr={},$r=["SU","MO","TU","WE","TH","FR","SA"],ea=["SU","MO","TU","WE","TH","FR","SA"],ta=43,ia=["first","second","third","fourth","last"],na="summaryTimes",ra="summaryOn",aa="every",sa="summaryUntil",oa="summaryDay",la="summaryWeek",pa="summaryMonth",ca="summaryYear",ha={SU:"sun",MO:"mon",TU:"tue",WE:"wed",TH:"thu",FR:"fri",SA:"sat"},da=/\d/,ua=/[^A-Z]+/,ga=/[a-z]+|[^a-z]+/gi;function va(e){return[e.getUTCFullYear(),ma(e.getUTCMonth()+1),ma(e.getUTCDate()),"T",ma(e.getUTCHours()),ma(e.getUTCMinutes()),ma(e.getUTCSeconds()),"Z"].join("")}function ma(e){return("0"+e).slice(-2)}var fa,ya=function(){function t(e){this.slots=[],this.isDoubleTapped=!1,this.parent=e}return t.prototype.processData=function(t,i,n){var r=this,a=this.parent.activeView.startDate(),s=this.parent.activeView.endDate(),o=this.parent.eventFields,l=[],p=1,c=!1,h=this.parent.resourceBase?this.parent.resourceBase.resourceCollection:[];t.length>0&&(0,e.isNullOrUndefined)(t[0][o.id])&&(c=!0);for(var d=function(t){c&&(t[o.id]=p++),t=u.updateEventDateTime(t),i?u.processTimezoneChange(t,n):u.parent.isPrinting||u.parent.uiStateValues.isPreventTimezone||(t=u.processTimezone(t));for(var a=0;a<h.length;a++)null!==t[h[parseInt(a.toString(),10)].field]&&0!==t[h[parseInt(a.toString(),10)].field]||(t[h[parseInt(a.toString(),10)].field]=void 0);if((0,e.isNullOrUndefined)(t[o.recurrenceRule])||""!==t[o.recurrenceRule]||(t[o.recurrenceRule]=null),(0,e.isNullOrUndefined)(t[o.recurrenceRule])||!(0,e.isNullOrUndefined)(t[o.recurrenceID])||u.parent.crudModule&&u.parent.crudModule.crudObj.isCrudAction)if(u.parent.crudModule&&u.parent.crudModule.crudObj.isCrudAction)if(!(0,e.isNullOrUndefined)(t[o.recurrenceRule])&&(0,e.isNullOrUndefined)(t[o.recurrenceID]))for(var s=function(e){var t=u.parent.eventsProcessed.filter((function(t){return t[o.startTime].getTime()-e[o.startTime].getTime()==0&&t[o.id]===e[o.id]}));e.Guid=t.length>0?t[0].Guid:u.generateGuid(),l.push(e)},d=0,g=u.generateOccurrence(t,null,!0);d<g.length;d++){s(g[d])}else{var v=u.parent.eventsProcessed.filter((function(e){return e[r.parent.eventFields.id]===t[r.parent.eventFields.id]}));t.Guid=v.length>0?v[0].Guid:u.generateGuid(),l.push(t)}else t.Guid=u.generateGuid(),l.push(t);else l=l.concat(u.generateOccurrence(t,null,!0))},u=this,g=0,v=t;g<v.length;g++){d(v[g])}this.parent.eventsProcessed=[];var m=l.filter((function(e){return!e[r.parent.eventFields.isBlock]}));this.parent.eventsProcessed=this.filterEvents(a,s,m);for(var f=l.filter((function(e){return e[r.parent.eventFields.isBlock]})),y=0,T=f;y<T.length;y++){var w=T[y];if(w[o.isAllDay])se(new Date(w[o.startTime].getTime()))<se(new Date(w[o.endTime].getTime()))||(w[o.startTime]=se(w[o.startTime]),w[o.endTime]=pe(se(w[o.endTime]),1))}return this.parent.blockProcessed=f,m},t.prototype.updateEventDateTime=function(e){return"string"==typeof e[this.parent.eventFields.startTime]&&(e[this.parent.eventFields.startTime]=ve(e[this.parent.eventFields.startTime])),"string"==typeof e[this.parent.eventFields.endTime]&&(e[this.parent.eventFields.endTime]=ve(e[this.parent.eventFields.endTime])),e},t.prototype.getProcessedEvents=function(t){void 0===t&&(t=this.parent.eventsData);for(var i=[],n=0,r=t;n<r.length;n++){var a=r[n];!(0,e.isNullOrUndefined)(a[this.parent.eventFields.recurrenceRule])&&(0,e.isNullOrUndefined)(a[this.parent.eventFields.recurrenceID])?i=i.concat(this.generateOccurrence(a)):i.push(a)}return i},t.prototype.timezonePropertyChange=function(e){var t=this.parent.eventsData.concat(this.parent.blockData),i=this.processData(t,!0,e);this.parent.notify(j,{processedData:i})},t.prototype.timezoneConvert=function(e){var t=this.parent.eventFields;if(e[t.startTimezone]=e[t.startTimezone]||e[t.endTimezone],e[t.endTimezone]=e[t.endTimezone]||e[t.startTimezone],this.parent.timezone){var i=e[t.startTimezone],n=e[t.endTimezone];e[t.startTime]=this.parent.tzModule.convert(e[t.startTime],this.parent.timezone,i),e[t.endTime]=this.parent.tzModule.convert(e[t.endTime],this.parent.timezone,n)}},t.prototype.processTimezoneChange=function(e,t){var i=this.parent.eventFields;e[i.isAllDay]||(t&&this.parent.timezone?(e[i.startTime]=this.parent.tzModule.convert(e[i.startTime],t,this.parent.timezone),e[i.endTime]=this.parent.tzModule.convert(e[i.endTime],t,this.parent.timezone)):!t&&this.parent.timezone?(e[i.startTime]=this.parent.tzModule.add(e[i.startTime],this.parent.timezone),e[i.endTime]=this.parent.tzModule.add(e[i.endTime],this.parent.timezone)):t&&!this.parent.timezone&&(e[i.startTime]=this.parent.tzModule.remove(e[i.startTime],t),e[i.endTime]=this.parent.tzModule.remove(e[i.endTime],t)))},t.prototype.processTimezone=function(e,t){void 0===t&&(t=!1);var i=this.parent.eventFields;if(e[i.isAllDay])return e;if(e[i.startTimezone]||e[i.endTimezone]){var n=e[i.startTimezone]||e[i.endTimezone],r=e[i.endTimezone]||e[i.startTimezone];t?this.parent.timezone?(e[i.startTime]=this.parent.tzModule.convert(e[i.startTime],n,this.parent.timezone),e[i.endTime]=this.parent.tzModule.convert(e[i.endTime],r,this.parent.timezone),e[i.startTime]=this.parent.tzModule.remove(e[i.startTime],this.parent.timezone),e[i.endTime]=this.parent.tzModule.remove(e[i.endTime],this.parent.timezone)):(e[i.startTime]=this.parent.tzModule.remove(e[i.startTime],n),e[i.endTime]=this.parent.tzModule.remove(e[i.endTime],r)):(e[i.startTime]=this.parent.tzModule.add(e[i.startTime],n),e[i.endTime]=this.parent.tzModule.add(e[i.endTime],r),this.parent.timezone&&(e[i.startTime]=this.parent.tzModule.convert(e[i.startTime],n,this.parent.timezone),e[i.endTime]=this.parent.tzModule.convert(e[i.endTime],r,this.parent.timezone)))}else this.parent.timezone&&(t?(e[i.startTime]=this.parent.tzModule.remove(e[i.startTime],this.parent.timezone),e[i.endTime]=this.parent.tzModule.remove(e[i.endTime],this.parent.timezone)):(e[i.startTime]=this.parent.tzModule.add(e[i.startTime],this.parent.timezone),e[i.endTime]=this.parent.tzModule.add(e[i.endTime],this.parent.timezone)));return e},t.prototype.filterBlockEvents=function(t){var i,n=this.parent.eventFields,r=t[n.startTime],a=t[n.endTime];if(this.parent.activeViewOptions.group.resources.length>0){var s=this.getGroupIndexFromEvent(t);i=this.parent.resourceBase.lastResourceLevel[parseInt(s.toString(),10)]}for(var o=(0,e.extend)([],this.parent.blockProcessed,null,!0),l=0,p=o;l<p.length;l++){var c=p[l];if(c[n.isAllDay])c[n.endTime].getTime()>se(new Date(c[n.endTime].getTime())).getTime()&&(c[n.startTime]=se(c[n.startTime]),c[n.endTime]=pe(se(c[n.endTime]),1))}return this.filterEvents(r,a,o,i)},t.prototype.filterEvents=function(e,t,i,n){void 0===i&&(i=this.parent.eventsProcessed);var r=this.parent.dataModule.getStartEndQuery(e,t),a=new dr.DataManager({json:i}).executeLocal((new dr.Query).where(r));return n&&(a=this.filterEventsByResource(n,a)),this.sortByTime(a)},t.prototype.filterEventsByRange=function(e,t,i){var n=this,r=[];return r=t&&i?this.filterEvents(t,i,e):t&&!i?e.filter((function(e){return e[n.parent.eventFields.startTime]>=t})):!t&&i?e.filter((function(e){return e[n.parent.eventFields.endTime]<=i})):e,this.sortByTime(r)},t.prototype.filterEventsByResource=function(e,t){void 0===t&&(t=this.parent.eventsProcessed);for(var i={},n=this.parent.resourceBase.resourceCollection,r=0;r<n.length;r++)i[n[parseInt(r.toString(),10)].field]=e.groupOrder[parseInt(r.toString(),10)];var a=Object.keys(i);return t.filter((function(e){return a.every((function(t){return e[""+t]instanceof Array?e[""+t].indexOf(i[""+t])>-1:e[""+t]===i[""+t]}))}))},t.prototype.sortByTime=function(e){if(!this.parent.eventSettings.sortComparer||"function"!=typeof this.parent.eventSettings.sortComparer&&"string"!=typeof this.parent.eventSettings.sortComparer){var t=this.parent.eventFields;e.sort((function(e,i){var n=e[t.startTime],r=i[t.startTime];return n.getTime()-r.getTime()}))}else e=this.customSorting(e);return e},t.prototype.sortByDateTime=function(e){if(!this.parent.eventSettings.sortComparer||"function"!=typeof this.parent.eventSettings.sortComparer&&"string"!=typeof this.parent.eventSettings.sortComparer){var t=this.parent.eventFields;e.sort((function(e,i){var n=e[t.startTime],r=i[t.startTime],a=e[t.endTime],s=i[t.endTime],o=a.getTime()-n.getTime(),l=s.getTime()-r.getTime();return n.getTime()-r.getTime()||l-o}))}else e=this.customSorting(e);return e},t.prototype.customSorting=function(t){if("function"==typeof this.parent.eventSettings.sortComparer)return this.parent.eventSettings.sortComparer.call(this.parent,t);if("string"==typeof this.parent.eventSettings.sortComparer){var i=this.parent.eventSettings.sortComparer.split("."),n=void 0;if((0,e.isNullOrUndefined)(window)||(n=window[i[i.length-1]]),n)return n(t)}return t},t.prototype.getSmallestMissingNumber=function(e){for(var t=Math.max.apply(Math,e),i=0;i<t;i++)if(-1===e.indexOf(i))return i;return t+1},t.prototype.splitEventByDay=function(t){var i=this.parent.eventFields,n=[],r=t[i.startTime],a=t[i.endTime];if(se(new Date(r.getTime()))<se(new Date(a.getTime())))for(var s=new Date(r.getTime()),o=pe(se(new Date(r.getTime())),1),l=0===a.getHours()&&0===a.getMinutes()?a:pe(a,1),p=1,c=ge(r.getTime(),l.getTime());o<=a&&s.getTime()!==o.getTime();){var h=(0,e.extend)({},t);h[i.startTime]=s,h[i.endTime]=o,h.data={index:p,count:c},h.Guid=this.generateGuid(),h.isSpanned=!0,n.push(h),s=o,se(new Date(s.getTime())).getTime()===se(new Date(a.getTime())).getTime()&&o.getTime()!==a.getTime()?(o=new Date(s.getTime()),o=new Date(o.setHours(a.getHours(),a.getMinutes(),a.getSeconds()))):o=pe(se(new Date(s.getTime())),1),p++}else n.push(t);return n},t.prototype.splitEvent=function(t,i){var n=this.parent.eventFields,r=se(t[n.startTime]).getTime(),a=se(t[n.endTime]).getTime();oe(t[n.endTime])<=0&&(a=r>(w=pe(se(t[n.endTime]),-1).getTime())?r:w);var s=r,o=a,l=[];if(r!==a){r<i[0].getTime()&&(r=i[0].getTime()),a>i[i.length-1].getTime()&&(a=i[i.length-1].getTime());for(var p=r,c=0;c<this.slots.length;c++){var h=this.slots[parseInt(c.toString(),10)];if("WorkWeek"===this.parent.currentView||"TimelineWorkWeek"===this.parent.currentView||this.parent.activeViewOptions.group.byDate||this.parent.activeViewOptions.showWeekend){for(var d=[],u=0,g=h;u<g.length;u++){var v=g[u];d.push(new Date(v))}var m=this.getRenderedDates(d);if(!(0,e.isNullOrUndefined)(m)&&m.length>0){h=[];for(var f=0,y=m;f<y.length;f++){var T=y[f];h.push(T.getTime())}}}if("number"==typeof h){var w=h;(h=[]).push(w)}var D=h[0];if((p=p<=D&&a>=D?D:p)>a||D>a)break;if(!this.parent.activeViewOptions.group.byDate&&this.parent.activeViewOptions.showWeekend&&"WorkWeek"!==this.parent.currentView&&"TimelineWorkWeek"!==this.parent.currentView){var b=h.indexOf(p);if(-1!==b){var S=h.indexOf(a),C=-1!==S,O=(S=C?S:h.length-1)-b+1,E=h[parseInt(b.toString(),10)]!==s,x=h[parseInt(S.toString(),10)]!==o;if(l.push(this.cloneEventObject(t,h[parseInt(b.toString(),10)],h[parseInt(S.toString(),10)],O,E,x)),C)break}}else if(this.dateInRange(p,h[0],h[h.length-1])){for(var V=[],A=0;A<h.length;A++)this.dateInRange(h[parseInt(A.toString(),10)],s,o)&&V.push(h[parseInt(A.toString(),10)]);if(V.length>0)if(this.parent.activeViewOptions.group.byDate)for(var I=0,M=V;I<M.length;I++){var k=M[I];l.push(this.cloneEventObject(t,k,k,1,k!==s,k!==o))}else{E=V[0]!==s,x=V[V.length-1]!==o;l.push(this.cloneEventObject(t,V[0],V[V.length-1],V.length,E,x))}}}}else l.push(this.cloneEventObject(t,r,a,1,!1,!1));return l},t.prototype.cloneEventObject=function(t,i,n,r,a,s){var o=this.parent.eventFields,l=(0,e.extend)({},t,null,!0),p={count:r,isLeft:a,isRight:s};return p[o.startTime]=t[o.startTime],p[o.endTime]=t[o.endTime],l.data=p,l[o.startTime]=new Date(i),l[o.endTime]=new Date(n),l},t.prototype.dateInRange=function(e,t,i){return t<=e&&e<=i},t.prototype.getSelectedEventElements=function(e){if(this.removeSelectedAppointmentClass(),this.parent.selectedElements.length<=0)this.parent.selectedElements.push(e);else{var t=this.parent.selectedElements.filter((function(t){return t.getAttribute("data-guid")===e.getAttribute("data-guid")}));if(t.length<=0)for(var i='div[data-guid="'+e.getAttribute("data-guid")+'"]',n=0,r=[].slice.call(this.parent.element.querySelectorAll(i));n<r.length;n++){var a=r[n];this.parent.selectedElements.push(a)}else{var s=this.parent.selectedElements.filter((function(t){return t.getAttribute("data-guid")!==e.getAttribute("data-guid")}));this.parent.selectedElements=s}}return e&&this.parent.selectedElements.length>0&&this.addSelectedAppointments(this.parent.selectedElements,!1),this.parent.selectedElements},t.prototype.getSelectedEvents=function(){var e=this,t=[],i=[];return[].slice.call(this.parent.element.querySelectorAll("."+Bt)).filter((function(n){0===t.filter((function(e){return e.Guid===n.getAttribute("data-guid")})).length&&t.push(e.getEventByGuid(n.getAttribute("data-guid"))),i.push(n)})),{event:t.length>1?t:t[0],element:i.length>1?i:i[0]}},t.prototype.removeSelectedAppointmentClass=function(){var t=this.getSelectedAppointments();(0,e.removeClass)(t,Bt),"Agenda"!==this.parent.currentView&&"MonthAgenda"!==this.parent.currentView||(0,e.removeClass)(t,$t)},t.prototype.addSelectedAppointments=function(t,i){"MonthAgenda"!==this.parent.currentView&&this.parent.removeSelectedClass(),(0,e.addClass)(t,Bt),t.length>0&&!i&&t[t.length-1].focus()},t.prototype.getSelectedAppointments=function(){return[].slice.call(this.parent.element.querySelectorAll("."+Bt+",."+qt+":focus"))},t.prototype.focusElement=function(t){if(!this.parent.eventWindow.dialogObject||!this.parent.eventWindow.dialogObject.visible){var i=document.activeElement,n=this.parent.getSelectedCells();if(!(n.length>0&&(i&&(this.parent.element.contains(i)||-1!==n.indexOf(i))||t))){var r=this.getSelectedAppointments();return r.length>0?this.parent.activeEventData&&this.parent.activeEventData.element&&r.indexOf(this.parent.activeEventData.element)>-1?void this.parent.activeEventData.element.focus():void r[r.length-1].focus():void 0}if(this.parent.keyboardInteractionModule){var a=!(0,e.isNullOrUndefined)(this.parent.activeCellsData)&&this.parent.activeCellsData.element||n[n.length-1];this.parent.keyboardInteractionModule.selectCells(a instanceof Array,a)}}},t.prototype.selectWorkCellByTime=function(e){var t;if("Agenda"===this.parent.currentView||"MonthAgenda"===this.parent.currentView)return t;if(e.length>0){var i=e[e.length-1],n=i[this.parent.eventFields.startTime],r=new Date(+n).setMinutes(0,0,0),a=this.isAllDayAppointment(i);("Month"===this.parent.currentView||a)&&(r=new Date(+n).setHours(0,0,0,0));var s=void 0;s=a&&-1!==["Day","Week","WorkWeek"].indexOf(this.parent.currentView)?this.parent.getAllDayRow():this.parent.getContentTable();var o='[data-date="'+new Date(r).getTime()+'"]';if(this.parent.activeViewOptions.group.resources.length>0&&(o+='[data-group-index="'+this.getGroupIndexFromEvent(i)+'"]'),t=s.querySelector(o))return this.parent.activeCellsData=this.parent.getCellDetails(t),this.parent.keyboardInteractionModule&&this.parent.keyboardInteractionModule.selectCells(!1,t),t}return t},t.prototype.getGroupIndexFromEvent=function(t){for(var i,n,r,a,s=this.parent.resourceBase.resourceCollection.length-1;s>=0;s--){var o=t[this.parent.resourceBase.resourceCollection[parseInt(s.toString(),10)].field];if(!(0,e.isNullOrUndefined)(o)){n=this.parent.resourceBase.resourceCollection[parseInt(s.toString(),10)],i=s,r=n.name,a=n.field;break}}(0,e.isNullOrUndefined)(r)&&(0,e.isNullOrUndefined)(i)&&(r=this.parent.resourceCollection.slice(-1)[0].name,i=this.parent.resourceCollection.length-1,a=this.parent.resourceCollection.slice(-1)[0].field,n=this.parent.resourceCollection.filter((function(e,t){return e.name===r?(i=t,e):null}))[0]);var l=t[""+a]instanceof Array?t[""+a][0]:t[""+a];if(i>0){var p=this.parent.resourceCollection[i-1].field;return this.parent.resourceBase.getIndexFromResourceId(l,r,n,t,p)}return this.parent.resourceBase.getIndexFromResourceId(l,r,n)},t.prototype.isAllDayAppointment=function(e){var t=this.parent.eventFields,i=e[t.isAllDay],n=(Ce(e[t.endTime])-Ce(e[t.startTime]))/G>=1;return!!(i||"TimeSlot"!==this.parent.eventSettings.spannedEventPlacement&&n)},t.prototype.addEventListener=function(){this.parent.on(W,this.appointmentBorderRemove,this)},t.prototype.removeEventListener=function(){this.parent.off(W,this.appointmentBorderRemove)},t.prototype.appointmentBorderRemove=function(t){var i=t.event.target;if((0,e.closest)(i,"."+qt))"MonthAgenda"!==this.parent.currentView&&this.parent.removeSelectedClass();else if(!(0,e.closest)(i,"."+_e)){if(this.parent.uiStateValues.isTapHold&&(0,e.closest)(i,"."+ze+",."+Ue))return;this.parent.uiStateValues.isTapHold=!1,this.removeSelectedAppointmentClass(),this.parent.selectedElements=[]}},t.prototype.wireAppointmentEvents=function(t,i,n){void 0===n&&(n=!1);var r=!(0,e.isNullOrUndefined)(i)&&i[this.parent.eventFields.isReadonly];e.EventHandler.add(t,"click",this.eventClick,this),this.parent.isAdaptive||this.parent.activeViewOptions.readonly||r||(e.EventHandler.add(t,"touchend",this.eventTouchClick,this),e.EventHandler.add(t,"dblclick",this.eventDoubleClick,this)),this.parent.activeViewOptions.readonly||r||n||(this.parent.resizeModule&&this.parent.resizeModule.wireResizeEvent(t),this.parent.dragAndDropModule&&this.parent.dragAndDropModule.wireDragEvent(t))},t.prototype.eventTouchClick=function(e){var t=this;this.parent.uiStateValues.isTouchScroll||this.parent.uiStateValues.isTapHold||this.parent.uiStateValues.action?this.parent.uiStateValues.isTouchScroll=this.parent.uiStateValues.isTapHold=!1:(setTimeout((function(){return t.isDoubleTapped=!1}),250),e.preventDefault(),this.isDoubleTapped?this.eventDoubleClick(e):this.isDoubleTapped||(this.isDoubleTapped=!0,this.eventClick(e)))},t.prototype.renderResizeHandler=function(t,i,n){if(this.parent.resizeModule&&this.parent.allowResizing&&!this.parent.activeViewOptions.readonly&&!n)for(var r=0,a=Object.keys(i);r<a.length;r++){var s=a[r],o=(0,e.createElement)("div",{className:fi});switch(s){case"isLeft":i.isLeft||(o.appendChild((0,e.createElement)("div",{className:"e-left-right-resize"})),(0,e.addClass)([o],this.parent.enableRtl?wi:Ti),(0,e.prepend)([o],t));break;case"isRight":i.isRight||(o.appendChild((0,e.createElement)("div",{className:"e-left-right-resize"})),(0,e.addClass)([o],this.parent.enableRtl?Ti:wi),(0,e.append)([o],t));break;case"isTop":i.isTop||(o.appendChild((0,e.createElement)("div",{className:"e-top-bottom-resize"})),(0,e.addClass)([o],Di),(0,e.prepend)([o],t));break;case"isBottom":i.isBottom||(o.appendChild((0,e.createElement)("div",{className:"e-top-bottom-resize"})),(0,e.addClass)([o],bi),(0,e.append)([o],t))}}},t.prototype.eventClick=function(t){var i=this,n=t.target;if(!(n.classList.contains(mi)||n.classList.contains(yi)||n.classList.contains(ir)))if((t.ctrlKey||t.metaKey)&&1===t.which&&this.parent.keyboardInteractionModule){this.parent.quickPopup.quickPopup.hide(),this.parent.selectedElements=[].slice.call(this.parent.element.querySelectorAll("."+Bt));var r=(0,e.closest)(t.target,"."+qt);this.getSelectedEventElements(r),this.activeEventData(t,!1);var a={data:this.parent.activeEventData.event,element:this.parent.activeEventData.element,event:t,requestType:"eventSelect"};this.parent.trigger(o,a);var s=(0,e.extend)(this.parent.activeEventData,{cancel:!1,originalEvent:t});this.parent.trigger(m,s)}else{this.removeSelectedAppointmentClass(),this.activeEventData(t,!0);var l={data:this.parent.activeEventData.event,element:this.parent.activeEventData.element,event:t,requestType:"eventSelect"};this.parent.trigger(o,l);s=(0,e.extend)(this.parent.activeEventData,{cancel:!1,originalEvent:t});this.parent.trigger(m,s,(function(t){if(t.cancel)i.removeSelectedAppointmentClass(),i.parent.selectedElements=[],i.parent.quickPopup&&i.parent.quickPopup.quickPopupHide();else if("Agenda"!==i.parent.currentView&&"MonthAgenda"!==i.parent.currentView||(0,e.addClass)([i.parent.activeEventData.element],$t),i.parent.allowInline){var n={data:t.event,element:t.element,type:"Event"};i.parent.notify(A,n)}else i.parent.notify(m,t)}))}},t.prototype.eventDoubleClick=function(t){var i=this;if(this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(!0),"touchend"===t.type&&this.activeEventData(t,!0),this.removeSelectedAppointmentClass(),this.parent.selectedElements=[],!this.parent.activeEventData.element.classList.contains(nr)&&!this.parent.activeEventData.element.querySelector("."+ir)){var n=(0,e.extend)(this.parent.activeEventData,{cancel:!1,originalEvent:t});this.parent.trigger(f,n,(function(t){t.cancel||(!(0,e.isNullOrUndefined)(i.parent.activeEventData.event)&&(0,e.isNullOrUndefined)(i.parent.activeEventData.event[i.parent.eventFields.recurrenceID])?i.parent.eventWindow.openEditor(i.parent.activeEventData.event,"Save"):(i.parent.currentAction="EditOccurrence",i.parent.quickPopup.openRecurrenceAlert()))}))}},t.prototype.getEventByGuid=function(e){return this.parent.eventsProcessed.filter((function(t){return t.Guid===e}))[0]},t.prototype.getEventById=function(e){var t=this;return this.parent.eventsData.filter((function(i){return i[t.parent.eventFields.id]===e}))[0]},t.prototype.generateGuid=function(){return"xyxxxxyx-xxxy-yxxx-xyxx-xxyxxxxyyxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},t.prototype.getEventIDType=function(){return 0!==this.parent.eventsData.length?typeof this.parent.eventsData[0][this.parent.eventFields.id]:0!==this.parent.blockData.length?typeof this.parent.blockData[0][this.parent.eventFields.id]:"string"},t.prototype.getEventMaxID=function(t){var i,n=this;if(this.parent.eventsData.length<1&&this.parent.blockData.length<1)return 1;var r=this.getEventIDType();if("string"===r&&(i=this.generateGuid()),"number"===r){var a=this.parent.eventsData.concat(this.parent.blockData).map((function(e){return e[n.parent.eventFields.id]})).reduce((function(e,t){return Math.max(e,t)}));i=(a=(0,e.isNullOrUndefined)(t)?a:a+t)+1}return i},t.prototype.activeEventData=function(t,i){var n=this,r=(0,e.closest)(t.target,"."+qt),a=r.getAttribute("data-guid");i&&(this.addSelectedAppointments([].slice.call(this.parent.element.querySelectorAll('div[data-guid="'+a+'"]')),!0),r.focus());var s=this.getEventByGuid(a);s&&s.isSpanned&&(s=this.parent.eventsData.filter((function(e){return e[n.parent.eventFields.id]===s[n.parent.eventFields.id]}))[0]),this.parent.activeEventData={event:s,element:r}},t.prototype.generateOccurrence=function(t,i,n){var r=t[this.parent.eventFields.startTime],a=t[this.parent.eventFields.endTime],s=t[this.parent.eventFields.recurrenceRule],o=a.getTimezoneOffset()-r.getTimezoneOffset(),l=a.getTime()-r.getTime()-6e4*o;i=new Date((i||this.parent.activeView.startDate()).getTime()-l);var p,c=t[this.parent.eventFields.recurrenceException];"Agenda"!==this.parent.currentView&&n&&(p=le(i,this.parent.activeView.endDate())+1);var h=this.parent.timezone||this.parent.tzModule.getLocalTimezoneName(),d=wr(r,s,c,this.parent.activeViewOptions.firstDayOfWeek,p,i,this.parent.calendarMode,h);"Agenda"===this.parent.currentView&&-1===s.indexOf("COUNT")&&-1===s.indexOf("UNTIL")&&((0,e.isNullOrUndefined)(t.generatedDates)?t.generatedDates={start:new Date(d[0]),end:new Date(d[d.length-1])}:(d[0]<t.generatedDates.start.getTime()&&(t.generatedDates.start=new Date(d[0])),d[d.length-1]>t.generatedDates.end.getTime()&&(t.generatedDates.end=new Date(d[d.length-1]))));for(var u=[],g=0,v=d;g<v.length;g++){var m=v[g],f=(0,e.extend)({},t,null,!0);m=this.getDSTAdjustedTime(m,f),f[this.parent.eventFields.startTime]=new Date(m),f[this.parent.eventFields.endTime]=new Date(new Date(m).setMilliseconds(l)),f[this.parent.eventFields.recurrenceID]=f[this.parent.eventFields.id],delete f[this.parent.eventFields.recurrenceException],delete f[this.parent.eventFields.followingID],f.Guid=this.generateGuid(),u.push(f)}return u},t.prototype.getDSTAdjustedTime=function(e,t){var i=e;if(this.parent.timezone&&(t[this.parent.eventFields.startTimezone]||t[this.parent.eventFields.endTimezone])){var n=this.getDSTDiff(t[this.parent.eventFields.startTime],new Date(e),t[this.parent.eventFields.startTimezone]),r=this.getDSTDiff(t[this.parent.eventFields.startTime],new Date(e),this.parent.timezone);i=new Date(e).getTime()-6e4*(n-r)}return i},t.prototype.getDSTDiff=function(e,t,i){return this.parent.tzModule.offset(new Date(e),i)-this.parent.tzModule.offset(new Date(t),i)},t.prototype.getParentEvent=function(t,i){var n;void 0===i&&(i=!1);do{(t=this.getFollowingEvent(t))&&(n=(0,e.extend)({},t,null,!0))}while(t&&i);if(i&&n){var r=this.getEventCollections(n),a=r.follow.slice(-1)[0];r.occurrence.length>0&&!n[this.parent.eventFields.recurrenceException]&&(a=r.occurrence.slice(-1)[0]),a&&(n[this.parent.eventFields.recurrenceRule]=a[this.parent.eventFields.recurrenceRule])}return n},t.prototype.getEventCollections=function(e,t){var i=[],n=[],r=e;do{(r=this.getFollowingEvent(r,!0))&&i.push(r),n=n.concat(this.getOccurrenceEvent(r||e))}while(r);var a={};if(t){var s=this.parent.eventFields;a={follow:i.filter((function(e){return e[s.startTime]>=t[s.startTime]})),occurrence:n.filter((function(e){return e[s.startTime]>=t[s.startTime]}))}}else a={follow:i,occurrence:n};return a},t.prototype.getFollowingEvent=function(e,t){var i,n=this.parent.eventFields;return i=t?e[n.id]:e[n.recurrenceID]||e[n.followingID],this.parent.eventsData.filter((function(e){return e[t?n.followingID:n.id]===i})).shift()},t.prototype.isFollowingEvent=function(e,t){var i=e[this.parent.eventFields.startTime],n=t[this.parent.eventFields.startTime];return i.getHours()===n.getHours()&&i.getMinutes()===n.getMinutes()&&i.getSeconds()===n.getSeconds()},t.prototype.getOccurrenceEvent=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var n=t?"Guid":i?this.parent.eventFields.followingID:this.parent.eventFields.recurrenceID,r=t?"Guid":this.parent.eventFields.id;return(t?this.parent.eventsProcessed:this.parent.eventsData).filter((function(t){return t[""+n]===e[""+r]}))},t.prototype.getOccurrencesByID=function(t){for(var i=this.parent.eventFields,n=[],r=0,a=this.parent.eventsData.filter((function(e){return e[i.id]===t}));r<a.length;r++){var s=a[r];(0,e.isNullOrUndefined)(s[i.recurrenceRule])||(n=n.concat(this.generateOccurrence(s)))}return n},t.prototype.getOccurrencesByRange=function(t,i){for(var n=this.parent.eventFields,r=[],a=0,s=this.parent.eventsData;a<s.length;a++){var o=s[a];(0,e.isNullOrUndefined)(o[n.recurrenceRule])||(r=r.concat(this.generateOccurrence(o)))}return r.filter((function(r){return r[n.startTime]>=t&&r[n.endTime]<=i&&!(0,e.isNullOrUndefined)(r[n.recurrenceID])}))},t.prototype.getDeletedOccurrences=function(t){var i,n=this.parent.eventFields,r=[];if((i="string"==typeof t||"number"==typeof t?this.parent.eventsData.filter((function(e){return e[n.id]===t}))[0]:(0,e.extend)({},t,null,!0))[n.recurrenceException])for(var a=i[n.recurrenceException].split(","),s=function(s,l){if(0===o.parent.eventsData.filter((function(e){return e[n.recurrenceID]===i[n.id]&&e[n.recurrenceException]===a[parseInt(s.toString(),10)]})).length){var p=Dr(a[parseInt(s.toString(),10)]),c=(0,e.extend)({},t,null,!0);c[n.recurrenceID]=i[n.id],delete c[n.followingID],c[n.recurrenceException]=a[parseInt(s.toString(),10)];var h=new Date(p.getTime()),d=i[n.endTime].getTime()-i[n.startTime].getTime(),u=new Date(h.getTime());u.setMilliseconds(d),c[n.startTime]=new Date(h.getTime()),c[n.endTime]=new Date(u.getTime()),r.push(c)}},o=this,l=0,p=a.length;l<p;l++)s(l);return r},t.prototype.applyResourceColor=function(t,i,n,r,a){if(this.parent.resourceBase){var s=this.parent.resourceBase.getResourceColor(i,r);s&&(t.style[n]=(0,e.isNullOrUndefined)(a)?s:function(e,t){return e=e.replace("#",""),"rgba("+parseInt(e.substring(0,e.length/3),16)+", "+parseInt(e.substring(e.length/3,2*e.length/3),16)+", "+parseInt(e.substring(2*e.length/3,3*e.length/3),16)+", "+t+")"}(s,a))}},t.prototype.createBlockAppointmentElement=function(t,i,n){var r,a=t[this.parent.eventFields.subject]||this.parent.eventSettings.fields.subject.default,s=(0,e.createElement)("div",{className:Ft,attrs:{"data-id":"Appointment_"+t[this.parent.eventFields.id],"aria-disabled":"true"}});if((0,e.isNullOrUndefined)(this.parent.activeViewOptions.eventTemplate)){var o=(0,e.createElement)("div",{className:vn});this.parent.sanitize(a,o),r=[o]}else{var l=this.parent.element.id+"_"+this.parent.activeViewOptions.eventTemplateName+"eventTemplate",p=n&&-1===this.parent.currentView.indexOf("Year")?this.parent.getEventTemplateName(i):"eventTemplate";r=this.parent.getAppointmentTemplate()(t,this.parent,p,l,!1,void 0,void 0,this.parent.root)}return(0,e.append)(r,s),this.setWrapperAttributes(s,i),s},t.prototype.setWrapperAttributes=function(t,i){(0,e.isNullOrUndefined)(this.cssClass)||(0,e.addClass)([t],this.cssClass),this.parent.activeViewOptions.group.resources.length>0&&t.setAttribute("data-group-index",i.toString())},t.prototype.getReadonlyAttribute=function(e){return(e[this.parent.eventFields.isReadonly]||this.parent.readonly).toString()},t.prototype.isBlockRange=function(t){for(var i=t instanceof Array?t:[t],n=!1,r=this.parent.eventFields,a=0,s=i;a<s.length;a++){var o=s[a],l=[];(0,e.isNullOrUndefined)(o[r.recurrenceRule])||!(0,e.isNullOrUndefined)(o[r.recurrenceID])&&o[r.id]!==o[r.recurrenceID]?l.push(o):l=this.generateOccurrence(o);for(var p=0,c=l;p<c.length;p++){var h=c[p];if(this.filterBlockEvents(h).length>0){n=!0;break}}}return this.parent.uiStateValues.isBlock=n,n},t.prototype.getFilterEventsList=function(e,t){return new dr.DataManager(e).executeLocal((new dr.Query).where(t))},t.prototype.getSeriesEvents=function(t,i){var n,r,a=this.parent.eventFields;i=(0,e.isNullOrUndefined)(i)?t[a.startTime]:i;var s,o=[],l=t[a.id],p=t[a.followingID],c="EditSeries"===this.parent.currentAction?"greaterthan":"greaterthanorequal";do{s=new dr.Predicate(a.followingID,"equal",l).and(new dr.Predicate(a.startTime,c,i)),n=(r=this.getFilterEventsList(this.parent.eventsData,s)).slice(-1)[0],(0,e.isNullOrUndefined)(n)||n[a.id]===p?p=null:(o.push(n),l=n[a.id],p=n[a.followingID])}while(1===r.length&&!(0,e.isNullOrUndefined)(n[a.followingID]));return o},t.prototype.getEditedOccurrences=function(e,t){for(var i,n=this.parent.eventFields,r=[],a=0,s=e;a<s.length;a++){var o=s[a],l=new dr.Predicate(n.recurrenceID,"equal",o[n.id]).or(new dr.Predicate(n.recurrenceID,"equal",o[n.followingID]).and(new dr.Predicate(n.recurrenceID,"notequal",void 0)).and(new dr.Predicate(n.recurrenceID,"notequal",null)));"EditFollowingEvents"!==this.parent.currentAction&&"DeleteFollowingEvents"!==this.parent.currentAction||(l=l.and(new dr.Predicate(n.startTime,"greaterthanorequal",t))),i=this.getFilterEventsList(this.parent.eventsData,l),r=r.concat(i)}return r},t.prototype.getRenderedDates=function(t){var i,n=0,r=t.length,a=(0,e.isNullOrUndefined)(this.parent.maxDate)?new Date(2099,11,31):this.parent.maxDate,s=(0,e.isNullOrUndefined)(this.parent.minDate)?new Date(1900,0,1):this.parent.minDate;if(t[0]<s&&t[t.length-1]>a){for(var o=0;o<t.length;o++)se(t[parseInt(o.toString(),10)]).getTime()===se(new Date(s)).getTime()&&(n=o),se(t[parseInt(o.toString(),10)]).getTime()===se(new Date(a)).getTime()&&(r=o);i=t.filter((function(e){return e>=t[parseInt(n.toString(),10)]&&e<=t[parseInt(r.toString(),10)]}))}return i},t.prototype.isValidEvent=function(e,t,i,n){var r=i.getTime()>n.startHour.getTime()&&t.getTime()<n.endHour.getTime(),a=n.startHour.getTime()<=t.getTime()&&e[this.parent.eventFields.startTime].getTime()>=n.startHour.getTime()&&e[this.parent.eventFields.endTime].getTime()<n.endHour.getTime()&&t.getTime()===i.getTime();return r||a},t.prototype.allDayExpandScroll=function(t){var i=0;[].slice.call(this.parent.element.querySelectorAll("."+Oi)).forEach((function(e){[].slice.call(e.children).forEach((function(e){e.style.top=i+"px"})),i+=e.offsetHeight})),i=t.offsetHeight-i,this.parent.element.querySelector("."+Ue).style.height=i/12+"em",this.parent.uiStateValues.expand?(0,e.addClass)([t],ar):(0,e.removeClass)([t],ar)},t.prototype.updateEventMinimumDuration=function(e,t,i){if(t.getTime()<i.getTime()&&(Ce(i)-Ce(t))/X<this.parent.eventSettings.minimumEventDuration){var n=new Date(t);if(n.setMinutes(n.getMinutes()+this.parent.eventSettings.minimumEventDuration),(i=n).getTime()>e.endHour.getTime()){var r=new Date(e.endHour.getTime());r.setMinutes(r.getMinutes()-this.parent.eventSettings.minimumEventDuration),t=r,i=e.endHour}}return{startDate:t,endDate:i}},t.prototype.createEventWrapper=function(t,i){void 0===t&&(t=""),void 0===i&&(i=0);for(var n=(0,e.createElement)("tr"),r=this.parent.activeView.colLevels.slice(-1)[0],a=this.parent.isReact&&this.parent.activeViewOptions.eventTemplate?" "+Vt:"",s=0,o=r.length;s<o;s++){var l=r[parseInt(s.toString(),10)],p=(0,e.createElement)("td",{className:"allDay"===t?Ei+a:"timeIndicator"===t?Et:At+a,attrs:{"data-date":l.date.getTime().toString()}});if((0,e.isNullOrUndefined)(l.groupIndex)||p.setAttribute("data-group-index",l.groupIndex.toString()),""===t){var c=(0,e.createElement)("div",{id:xt+"-"+i.toString(),className:xt});p.appendChild(c)}n.appendChild(p),i+=1}return n},t.prototype.getPageCoordinates=function(t){if((0,e.isNullOrUndefined)(t))return t;var i=t.event;return i&&i.changedTouches?i.changedTouches[0]:t.changedTouches?t.changedTouches[0]:i||t},t.prototype.renderSpannedIcon=function(t,i){var n=(0,e.createElement)("div",{className:pi+" "+je});if(i.isLeft){var r=n.cloneNode();(0,e.addClass)([r],ci),(0,e.prepend)([r],t)}if(i.isRight){var a=n.cloneNode();(0,e.addClass)([a],hi),(0,e.append)([a],t)}if(i.isTop){var s=n.cloneNode();(0,e.addClass)([s],"e-up-icon"),(0,e.prepend)([s],t)}if(i.isBottom){var o=n.cloneNode();(0,e.addClass)([o],"e-down-icon"),(0,e.append)([o],t)}},t.prototype.addCellHeight=function(t,i,n,r,a,s){if(void 0===s&&(s=!0),this.parent.activeViewOptions.maxEventsPerRow&&!this.parent.rowAutoHeight){for(var o=[].slice.call(this.parent.element.querySelectorAll(t)),l=this.parent.showWeekNumber?[].slice.call(this.parent.element.querySelectorAll("."+Ht+" tbody tr")):[],p=0,c=o;p<c.length;p++){var h=c[p],d=this.parent.activeViewOptions.maxEventsPerRow*(i+("Month"===this.parent.currentView?n:2))+r+a;l.length>0&&(0,e.setStyleAttribute)(l[o.indexOf(h)].firstElementChild,{height:d+"px"}),(0,e.setStyleAttribute)(h.firstElementChild,{height:d+"px"})}this.parent.enablePersistence||this.parent.activeViewOptions.allowVirtualScrolling||!s||this.parent.notify(N,{})}},t.prototype.unWireEvents=function(){for(var t=0,i=[].slice.call(this.parent.element.querySelectorAll("."+qt));t<i.length;t++){var n=i[t];e.EventHandler.clearEvents(n)}},t.prototype.destroy=function(){this.unWireEvents(),this.parent=null},t}(),Ta=(fa=function(e,t){return fa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},fa(e,t)},function(e,t){function i(){this.constructor=e}fa(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),wa=function(t){function i(i){var n=t.call(this,i)||this;return n.dateRender=[],n.renderedEvents=[],n.renderedAllDayEvents=[],n.overlapEvents=[],n.moreEvents=[],n.overlapList=[],n.allDayEvents=[],n.slotCount=n.parent.activeViewOptions.timeScale.slotCount,n.interval=n.parent.activeViewOptions.timeScale.interval,n.allDayLevel=0,n.startHour=n.parent.activeView.getStartHour(),n.endHour=n.parent.activeView.getEndHour(),n.element=n.parent.activeView.getPanel(),n.fields=n.parent.eventFields,n.animation=new e.Animation({progress:n.animationUiUpdate.bind(n)}),n.addEventListener(),n}return Ta(i,t),i.prototype.renderAppointments=function(){var t=this;if(!(0,e.isNullOrUndefined)(this.parent)){this.parent.dragAndDropModule&&this.parent.dragAndDropModule.setDragArea(),this.isResourceEventTemplate=this.parent.isSpecificResourceEvents();for(var i=[].slice.call(this.parent.element.querySelectorAll("."+Ft+",."+qt+",."+Ai)),n=!(!this.parent.crudModule||!this.parent.crudModule.crudObj.isCrudAction),r=function(i){if(t.parent.isReact&&!(0,e.isNullOrUndefined)(t.parent.activeViewOptions.eventTemplate)){var n=(0,e.closest)(i,"."+At+",."+Ei);n&&!n.classList.contains(Vt)&&(0,e.addClass)([n],Vt)}},a=0,s=i;a<s.length;a++){var o=s[a];if(!n||o.classList.contains(xi)||o.classList.contains(Ai))r(o),(0,e.remove)(o);else for(var l=parseInt(o.getAttribute("data-group-index"),10),p=0,c=this.parent.crudModule.crudObj.sourceEvent.length;p<c;p++)l!==this.parent.crudModule.crudObj.sourceEvent[parseInt(p.toString(),10)].groupIndex&&l!==this.parent.crudModule.crudObj.targetEvent[parseInt(p.toString(),10)].groupIndex||(r(o),(0,e.remove)(o))}if(this.element.querySelector("."+ze)&&(this.parent.virtualScrollModule&&this.parent.virtualScrollModule.updateFocusedWorkCell(),this.allDayElement=[].slice.call(this.element.querySelectorAll("."+Ue)),this.setAllDayRowHeight(0),0!==this.parent.eventsProcessed.length||0!==this.parent.blockProcessed.length)){var h=this.element.querySelector("."+Ii);e.EventHandler.remove(h,"click",this.rowExpandCollapse),e.EventHandler.add(h,"click",this.rowExpandCollapse,this),this.renderedEvents=[],this.renderedAllDayEvents=[],this.initializeValues(),this.processBlockEvents(),this.renderEvents("normalEvents"),this.allDayEvents.length>0&&(this.allDayEvents=this.allDayEvents.filter((function(e,t,i){return t===i.map((function(e){return e.Guid})).indexOf(e.Guid)})),(0,e.removeClass)(this.allDayElement,Ln),this.slots.push(this.parent.activeView.renderDates.map((function(e){return+e}))),this.renderEvents("allDayEvents"),this.animation.animate(this.allDayElement[0])),this.parent.notify(N,{}),(0,e.addClass)(this.allDayElement,Ln),n&&(this.parent.crudModule.crudObj.isCrudAction=!1),this.parent.renderTemplates((function(){if(t.parent.isReact&&t.parent.activeViewOptions.eventTemplate){var i=[].slice.call(t.parent.element.querySelectorAll("."+Vt));(0,e.removeClass)(i,Vt)}}))}}},i.prototype.initializeValues=function(){if(this.resources=this.parent.activeViewOptions.group.resources.length>0?this.parent.uiStateValues.isGroupAdaptive?[this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]]:this.parent.resourceBase.lastResourceLevel:[],this.resources.length>0&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.virtualScrollModule&&(this.resources=this.parent.resourceBase.renderedResources),this.cellHeight=parseFloat(Ae(this.parent.element.querySelector(".e-content-wrap tbody tr")).toFixed(2)),this.dateRender[0]=this.parent.activeView.renderDates,this.parent.activeViewOptions.group.resources.length>0)for(var e=0,t=this.resources.length;e<t;e++)this.dateRender[parseInt(e.toString(),10)]=this.resources[parseInt(e.toString(),10)].renderDates},i.prototype.getHeight=function(e,t){var i=(Ce(t)-Ce(e))/X*(this.cellHeight*this.slotCount)/this.interval;return i=i<=0?this.cellHeight:i},i.prototype.appendEvent=function(t,i,n,r){var a=this.element.querySelector("."+xt+'[id="'+xt+"-"+n+'"]');this.parent.enableRtl?(0,e.setStyleAttribute)(i,{right:r}):(0,e.setStyleAttribute)(i,{left:r});var s=i.classList.contains(Ft)?"blockEvent":"event",o={data:(0,e.extend)({},t,null,!0),element:i,cancel:!1,type:s};this.parent.trigger(y,o,(function(e){e.cancel||a.appendChild(i)}))},i.prototype.processBlockEvents=function(){for(var e=this.getResourceList(),t=this.getStartCount(),i=0,n=e;i<n.length;i++)for(var r=n[i],a=this.dateRender[parseInt(r.toString(),10)],s=0,o=a.length;s<o;s++){for(var l=new Date(a[parseInt(s.toString(),10)].getTime()),p=pe(a[parseInt(s.toString(),10)],1),c=0,h=this.filterEvents(l,p,this.parent.blockProcessed,this.resources[parseInt(r.toString(),10)]);c<h.length;c++){var d=h[c];this.parent.resourceBase&&this.setValues(d,r),this.renderBlockEvents(d,s,r,t),this.cssClass=null,this.groupOrder=null}t+=1}},i.prototype.renderBlockEvents=function(t,i,n,r){var a=this.isSpannedEvent(t,i,n),s=a[this.fields.startTime],o=a[this.fields.endTime],l=de(se(new Date(this.dateRender[parseInt(n.toString(),10)][parseInt(i.toString(),10)].getTime())),this.startHour,this.endHour);if(s<=o&&this.isValidEvent(t,s,o,l)&&this.isWorkDayAvailable(n,s)){var p=void 0,c=void 0;if(a[this.fields.isAllDay]){var h=this.parent.element.querySelector("."+Qt+" table");c=(0,e.formatUnit)(h.offsetHeight),p=(0,e.formatUnit)(0)}else c=(0,e.formatUnit)(this.getHeight(s,o)),p=(0,e.formatUnit)(this.getTopValue(s,i,n));var d=this.createBlockAppointmentElement(t,n,this.isResourceEventTemplate);(0,e.setStyleAttribute)(d,{width:"100%",height:c,top:p});var u=this.getDayIndex(i,n,r);this.appendEvent(t,d,u,"0px")}},i.prototype.renderEvents=function(t){(0,e.removeClass)(this.allDayElement,Ln);for(var i,n="allDayEvents"===t?this.sortByDateTime(this.allDayEvents):void 0,r=this.getResourceList(),a=this.getStartCount(),s="allDayEvents"===t?Q(this.element.querySelector("."+Ei),qt):0,o="allDayEvents"===t&&this.allDayElement.length>0?this.allDayElement[0].offsetTop:0,l=function(r){i=!0,p.parent.crudModule&&p.parent.crudModule.crudObj.isCrudAction&&"allDayEvents"!==t&&!p.parent.uiStateValues.isGroupAdaptive&&0===p.parent.crudModule.crudObj.sourceEvent.filter((function(e){return e.groupIndex===r})).length&&0===p.parent.crudModule.crudObj.targetEvent.filter((function(e){return e.groupIndex===r})).length&&(i=!1),p.slots=[];var l=p.dateRender[parseInt(r.toString(),10)],c=p.getRenderedDates(l)||l;p.slots.push(l.map((function(e){return+e})));for(var h=0,d=l.length;h<d&&l[parseInt(h.toString(),10)]<=c[c.length-1];h++){p.renderedEvents=[];var u=new Date(l[parseInt(h.toString(),10)].getTime()),g=pe(l[parseInt(h.toString(),10)],1),v=p.filterEvents(u,g,n,p.resources[parseInt(r.toString(),10)]);if(i)for(var m=0,f=v;m<f.length;m++){var y=f[m];if(p.parent.resourceBase&&p.setValues(y,r),"allDayEvents"===t)p.renderAllDayEvents(y,h,r,a,!1,o,s);else if(p.isAllDayAppointment(y))p.allDayEvents.push((0,e.extend)({},y,null,!0));else{if(p.parent.eventSettings.enableMaxHeight&&p.getOverlapIndex(y,h,!1,r)>0)continue;p.renderNormalEvents(y,h,r,a)}p.cssClass=null,p.groupOrder=null}else for(var T=0,w=v;T<w.length;T++){var D=w[T];p.isAllDayAppointment(D)&&p.allDayEvents.push((0,e.extend)({},D,null,!0))}a+=1}},p=this,c=0,h=r;c<h.length;c++){l(h[c])}},i.prototype.getStartCount=function(){return this.parent.virtualScrollModule&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.timeScale.enable?parseInt(this.element.querySelector("."+xt).getAttribute("id").split("-").slice(-1)[0],10):0},i.prototype.getDayIndex=function(e,t,i){var n=this;if(!this.parent.activeViewOptions.group.byDate)return i;if(this.parent.activeViewOptions.group.byDate&&!this.parent.activeViewOptions.group.hideNonWorkingDays){var r=this.parent.resourceBase.lastResourceLevel[0].renderDates.indexOf(this.dateRender[parseInt(t.toString(),10)][parseInt(e.toString(),10)]);return this.resources.length*r+t}for(var a=0,s=this.parent.activeView.colLevels[0],o=this.dateRender[parseInt(t.toString(),10)][parseInt(e.toString(),10)].getTime(),l=[],p=0;p<s.length&&(l=this.parent.resourceBase.resourceDateTree[parseInt(p.toString(),10)],o!==s[parseInt(p.toString(),10)].date.getTime());p++)a+=s[parseInt(p.toString(),10)].colSpan;var c=l.findIndex((function(e){return e.groupOrder.toString()===n.resources[parseInt(t.toString(),10)].groupOrder.toString()}));return c<0?a:a+c},i.prototype.setValues=function(e,t){this.parent.activeViewOptions.group.resources.length>0?(this.cssClass=this.resources[parseInt(t.toString(),10)].cssClass,this.groupOrder=this.resources[parseInt(t.toString(),10)].groupOrder):this.cssClass=this.parent.resourceBase.getCssClass(e)},i.prototype.getResourceList=function(){return Array.apply(null,{length:this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?this.resources.length:1}).map((function(e,t){return t}))},i.prototype.createAppointmentElement=function(t,i,n,r){var a=this.parent.eventFields,s=t[a.subject]||this.parent.eventSettings.fields.subject.default||this.parent.localeObj.getConstant("addTitle"),o=(0,e.createElement)("div",{className:qt,attrs:{"data-id":"Appointment_"+t[a.id],"data-guid":t.Guid,role:"button",tabindex:"0","aria-disabled":this.parent.eventBase.getReadonlyAttribute(t),"aria-label":this.parent.getAnnouncementString(t)}});t[this.fields.isReadonly]&&(0,e.addClass)([o],"e-read-only");var l,p=(0,e.createElement)("div",{className:Wt});if(o.appendChild(p),this.parent.activeViewOptions.group.resources.length>0){var c=this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:r;o.setAttribute("data-group-index",c.toString())}var h=n;if((0,e.isNullOrUndefined)(this.parent.activeViewOptions.eventTemplate)){var d=(0,e.createElement)("div",{className:vn});if(this.parent.sanitize(s,d),i)if(t[a.isAllDay])l=[d];else{l=[];var u=(0,e.createElement)("div",{className:_t+(this.parent.isAdaptive?" "+Ne:""),innerHTML:this.parent.getTimeString(t[a.startTime])}),g=(0,e.createElement)("div",{className:_t+(this.parent.isAdaptive?" "+Ne:""),innerHTML:this.parent.getTimeString(t[a.endTime])});(0,e.addClass)([d],"e-text-center"),h.isLeft||l.push(u),l.push(d),h.isRight||l.push(g)}else{var v=this.parent.getTimeString(t[a.startTime])+" - "+this.parent.getTimeString(t[a.endTime]),m=(0,e.createElement)("div",{className:_t+(this.parent.isAdaptive?" "+Ne:""),innerHTML:v}),f=(0,e.createElement)("div",{className:mn});this.parent.sanitize(t[a.location]||this.parent.eventSettings.fields.location.default||"",f),l=[d,m,f]}}else{var y=this.parent.element.id+"_"+this.parent.activeViewOptions.eventTemplateName+"eventTemplate",T=this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:r,w=this.isResourceEventTemplate?this.parent.getEventTemplateName(T):"eventTemplate";l=this.parent.getAppointmentTemplate()(t,this.parent,w,y,!1,void 0,void 0,this.parent.root)}if((0,e.append)(l,p),!(this.parent.isAdaptive||(0,e.isNullOrUndefined)(t[a.recurrenceRule])&&(0,e.isNullOrUndefined)(t[a.recurrenceID]))){var D=t[a.id]===t[a.recurrenceID]?Si:Ci,b=(0,e.createElement)("div",{className:je+" "+D});i?p.appendChild(b):o.appendChild(b)}return this.parent.eventBase.renderSpannedIcon(i?p:o,h),(0,e.isNullOrUndefined)(this.cssClass)||(0,e.addClass)([o],this.cssClass),this.applyResourceColor(o,t,"backgroundColor",this.groupOrder),this.renderResizeHandler(o,h,t[this.fields.isReadonly]),o},i.prototype.createMoreIndicator=function(t,i,n){var r=n+i,a=t[parseInt(r.toString(),10)];if(a.childElementCount<=0){var s=(0,e.createElement)("div",{className:Ai,id:Ai+"-"+r.toString()}),o=(0,e.createElement)("div",{className:Ri,attrs:{tabindex:"0","data-index":r.toString(),"data-count":"1"},innerHTML:"+1&nbsp;"+(this.parent.isAdaptive?"":this.parent.localeObj.getConstant("more"))});s.appendChild(o),a.appendChild(s),e.EventHandler.add(o,"click",this.rowExpandCollapse,this)}else{var l=a.querySelector("."+Ri),p=parseInt(l.getAttribute("data-count"),10)+1;l.setAttribute("data-count",p.toString()),l.innerHTML="+"+this.parent.globalize.formatNumber(p)+"&nbsp;"+(this.parent.isAdaptive?"":this.parent.localeObj.getConstant("more"))}},i.prototype.isSpannedEvent=function(t,i,n){var r=se(this.dateRender[parseInt(n.toString(),10)][parseInt(i.toString(),10)]),a=this.getRenderedDates(this.dateRender[parseInt(n.toString(),10)])||[r];0===a.filter((function(e){return e.getDay()===i})).length&&(r=se(a[0]));var s=this.parent.eventFields,o=de(r,this.startHour,this.endHour),l=(0,e.extend)({},t,null,!0);l.isSpanned={isBottom:!1,isTop:!1},t[s.startTime].getTime()<o.startHour.getTime()&&(l[s.startTime]=o.startHour,l.isSpanned.isTop=!0),t[s.endTime].getTime()>o.endHour.getTime()&&(l[s.endTime]=o.endHour,l.isSpanned.isBottom=!0);var p=this.updateEventMinimumDuration(o,l[s.startTime],l[s.endTime]);return l[s.startTime]=p.startDate,l[s.endTime]=p.endDate,l},i.prototype.isWorkDayAvailable=function(e,t){if(this.parent.activeViewOptions.group.hideNonWorkingDays&&this.resources.length>0){var i=this.resources[parseInt(e.toString(),10)].resourceData[this.resources[parseInt(e.toString(),10)].resource.workDaysField]||this.parent.activeViewOptions.workDays;return i&&i.indexOf(t.getDay())>=0}return!0},i.prototype.renderAllDayEvents=function(t,i,n,r,a,s,o){var l=this,p=this.getRenderedDates(this.dateRender[parseInt(n.toString(),10)])||this.dateRender[parseInt(n.toString(),10)];this.parent.activeViewOptions.group.byDate&&(this.slots[0]=[this.dateRender[parseInt(n.toString(),10)][parseInt(i.toString(),10)].getTime()],p=[this.dateRender[parseInt(n.toString(),10)][parseInt(i.toString(),10)]]);var c=this.splitEvent(t,p)[0],h=new Date(c[this.parent.eventFields.startTime].getTime()),d=new Date(c[this.parent.eventFields.endTime].getTime()),u=0,g=1,v=p[0].getTime()<=h.getTime()&&pe(p.slice(-1)[0],1).getTime()>=h.getTime();if(h<=d&&v&&this.isWorkDayAvailable(n,h)){var m=[];if(this.renderedAllDayEvents[parseInt(n.toString(),10)]&&(m=this.renderedAllDayEvents[parseInt(n.toString(),10)].filter((function(e){return e.Guid===t.Guid})),this.parent.activeViewOptions.group.byDate&&(m=m.filter((function(e){return e[l.parent.eventFields.startTime]>=p[parseInt(i.toString(),10)]&&e[l.parent.eventFields.endTime]<=pe(new Date(+p[parseInt(i.toString(),10)]),1)})))),0===m.length){var f=c.data.count,T=this.getOverlapIndex(c,i,!0,n);c.Index=T,this.allDayLevel=this.allDayLevel<T?T:this.allDayLevel;var w=c.data.isRight?0:"Day"===this.parent.currentView?4:7;f>=0&&(u=100*f-w),(0,e.isNullOrUndefined)(this.renderedAllDayEvents[parseInt(n.toString(),10)])&&(this.renderedAllDayEvents[parseInt(n.toString(),10)]=[]),this.renderedAllDayEvents[parseInt(n.toString(),10)].push((0,e.extend)({},c,null,!0));var D,b=[].slice.call(this.element.querySelector("."+Be).children),S=this.getDayIndex(i,n,r),C=this.element.querySelector("."+Ei+":nth-child("+(S+1)+")");D=a?this.parent.inlineModule.createInlineAppointmentElement(t):this.createAppointmentElement(t,!0,c.data,n),(0,e.addClass)([D],xi);var O=(0,e.extend)({},c.data,null,!0);t.data=O;var E={data:t,element:D,cancel:!1};this.parent.trigger(y,E,(function(i){if(!i.cancel){if(C.appendChild(D),g+=(0===T?s:s+T*o)+1,(0,e.setStyleAttribute)(D,{width:u+"%",top:(0,e.formatUnit)(g)}),T>1){l.moreEvents.push(D);for(var n=0,r=f;n<r;n++)l.createMoreIndicator(b,n,S)}l.allDayElement[0].setAttribute("data-count",l.allDayLevel.toString());var a=4+(!l.parent.uiStateValues.expand&&l.allDayLevel>2?3*o:(l.allDayLevel+1)*o);l.setAllDayRowHeight(a),l.addOrRemoveClass(),l.wireAppointmentEvents(D,t)}}))}}},i.prototype.renderNormalEvents=function(t,i,n,r,a){var s=this.isSpannedEvent(t,i,n),o=s[this.fields.startTime],l=s[this.fields.endTime],p=0,c=de(se(new Date(this.dateRender[parseInt(n.toString(),10)][parseInt(i.toString(),10)].getTime())),this.startHour,this.endHour),h=this.isValidEvent(t,o,l,c);if(!(o.getTime()<this.parent.minDate.getTime()||l.getTime()>this.parent.maxDate.getTime())&&o<=l&&h&&this.isWorkDayAvailable(n,o)){var d=this.getHeight(o,l);o.getTime()>=c.startHour.getTime()&&(p=this.getTopValue(o,i,n));var u=this.getOverlapIndex(s,i,!1,n);s.Index=u,this.overlapList.push(s),this.overlapList.length>1?((0,e.isNullOrUndefined)(this.overlapEvents[parseInt(u.toString(),10)])&&(this.overlapEvents[parseInt(u.toString(),10)]=[]),this.overlapEvents[parseInt(u.toString(),10)].push(s)):(this.overlapEvents=[],this.overlapEvents.push([s]));var g={index:u,left:"0%",width:this.getEventWidth(),day:r,dayIndex:i,record:s,resource:n},v=this.adjustOverlapElements(g);v.appWidth,(0,e.isNullOrUndefined)(this.renderedEvents[parseInt(n.toString(),10)])&&(this.renderedEvents[parseInt(n.toString(),10)]=[]),this.renderedEvents[parseInt(n.toString(),10)].push((0,e.extend)({},s,null,!0));var m=void 0;m=a?this.parent.inlineModule.createInlineAppointmentElement(t):this.createAppointmentElement(t,!1,s.isSpanned,n),(0,e.setStyleAttribute)(m,{width:this.parent.eventSettings.enableMaxHeight?"100%":v.appWidth,height:d+"px",top:p+"px"});var f=d-40-15*m.querySelectorAll("."+pi).length,y=m.querySelector("."+vn);!this.parent.isAdaptive&&y&&(y.style.maxHeight=(0,e.formatUnit)(f));var T=this.getDayIndex(i,n,r),w={};w[this.fields.startTime]=t[this.fields.startTime],w[this.fields.endTime]=t[this.fields.endTime],s.data=w,this.appendEvent(s,m,T,v.appLeft),this.wireAppointmentEvents(m,t)}},i.prototype.getEventWidth=function(){var e=(("Day"===this.parent.currentView?97:94)-this.overlapEvents.length)/this.overlapEvents.length;return(e<0?0:e)+"%"},i.prototype.getEventLeft=function(e,t){var i=(parseFloat(e)+1)*t;return(i>99?99:i)+"%"},i.prototype.getTopValue=function(e,t,i){var n=se(this.dateRender[parseInt(i.toString(),10)][parseInt(t.toString(),10)]),r=de(n,this.startHour,this.endHour).startHour,a=Se(n)&&r.getHours()!==this.startHour.getHours()?this.startHour.getHours():r.getHours(),s=60*(e.getHours()-a)+(e.getMinutes()-r.getMinutes());return this.parent.activeViewOptions.timeScale.enable?s*this.cellHeight*this.slotCount/this.interval:0},i.prototype.getOverlapIndex=function(t,i,n,r){var a=this,s=this.parent.eventFields,o=[],l=-1;if(this.overlapEvents=[],n){if(!(0,e.isNullOrUndefined)(this.renderedAllDayEvents[parseInt(r.toString(),10)])){var p=se(new Date(this.dateRender[parseInt(r.toString(),10)][parseInt(i.toString(),10)].getTime()));o=this.renderedAllDayEvents[parseInt(r.toString(),10)].filter((function(e){return se(e[s.startTime]).getTime()<=p.getTime()&&se(e[s.endTime]).getTime()>=p.getTime()})),this.parent.activeViewOptions.group.resources.length>0&&(o=this.filterEventsByResource(this.resources[parseInt(r.toString(),10)],o))}}else{var c=(0,e.isNullOrUndefined)(this.renderedEvents[parseInt(r.toString(),10)])?[]:this.renderedEvents[parseInt(r.toString(),10)],h=[],d=t[s.startTime],u=t[s.endTime];this.overlapList=c.filter((function(e){return e[s.endTime]>d&&e[s.startTime]<=u||e[s.startTime]>=u&&e[s.endTime]<=d||e[s.endTime].getTime()===e[s.startTime].getTime()&&e[s.startTime].getTime()===d.getTime()&&e[s.endTime]<u})),this.parent.activeViewOptions.group.resources.length>0&&(this.overlapList=this.filterEventsByResource(this.resources[parseInt(r.toString(),10)],this.overlapList)),this.overlapList.forEach((function(e){var t=c.filter((function(t){return t[s.endTime]>e[s.startTime]&&t[s.startTime]<=e[s.endTime]}));a.parent.activeViewOptions.group.resources.length>0&&(t=a.filterEventsByResource(a.resources[parseInt(r.toString(),10)],t));var i=t.filter((function(e){return-1===a.overlapList.indexOf(e)}));i.length>0&&(h=h.concat(i))}));for(var g=0;g<h.length-1;g++)for(var v=g+1;v<h.length;v++)h[parseInt(g.toString(),10)][s.id]===h[parseInt(v.toString(),10)][s.id]&&(h.splice(v,1),v--);this.overlapList=this.overlapList.concat(h);for(var m=0,f=o=this.overlapList;m<f.length;m++){var y=f[m],T=y.Index;(0,e.isNullOrUndefined)(this.overlapEvents[parseInt(T.toString(),10)])?this.overlapEvents[parseInt(T.toString(),10)]=[y]:this.overlapEvents[parseInt(T.toString(),10)].push(y)}}if(n||(o=o.filter((function(e){return e[s.startTime]===t[s.startTime]&&e[s.endTime]>t[s.endTime]||e[s.endTime]>t[s.startTime]&&e[s.startTime]<t[s.endTime]||e[s.endTime]===t[s.startTime]&&e[s.startTime]===t[s.endTime]||e[s.startTime].getTime()===t[s.startTime].getTime()&&e[s.endTime].getTime()===t[s.endTime].getTime()||e[s.startTime].getTime()===t[s.startTime].getTime()&&e[s.endTime].getTime()<t[s.endTime].getTime()||e[s.endTime].getTime()>t[s.endTime].getTime()}))),o.length>0){var w=o.map((function(e){return e.Index}));l=w.length>0?this.getSmallestMissingNumber(w):0}return-1===l?0:l},i.prototype.adjustOverlapElements=function(t){for(var i={appWidth:t.width,appLeft:t.left},n=0,r=this.overlapEvents.length;n<r;n++)if(!(0,e.isNullOrUndefined)(this.overlapEvents[parseInt(n.toString(),10)]))for(var a=0,s=this.overlapEvents[parseInt(n.toString(),10)].length;a<s;a++){var o=this.getDayIndex(t.dayIndex,t.resource,t.day),l=this.element.querySelector("#e-appointment-wrapper-"+o);if(l&&l.childElementCount>0){var p=this.overlapEvents[parseInt(n.toString(),10)][parseInt(a.toString(),10)].Guid;if(l.querySelectorAll('div[data-guid="'+p+'"]').length>0&&p!==t.record.Guid){var c=l.querySelector('div[data-guid="'+p+'"]');parseFloat(t.width)<=parseFloat(c.style.width)?(this.parent.enableRtl?c.style.right=this.getEventLeft(t.width,n):c.style.left=this.getEventLeft(t.width,n),c.style.width=parseFloat(t.width)+"%",i.appWidth=c.style.width):i.appWidth=c.style.width}else{var h=t.width;(0,e.isNullOrUndefined)(this.overlapEvents[n-1])&&(h=this.getEventWidth()),i.appWidth=h,i.appLeft=this.getEventLeft(h,t.index)}}}return i},i.prototype.setAllDayRowHeight=function(t){var i=this.parent.element.querySelector("."+Ge);"auto"!==this.parent.height&&this.parent.enableAllDayScroll||(0,e.addClass)([i],sr);var n=this.parent.element.querySelector("."+Be);if(n.style.height="",this.parent.uiStateValues.expand&&"auto"!==this.parent.height&&this.parent.enableAllDayScroll)n.style.height=t/12+"em",this.parent.eventBase.allDayExpandScroll(i);else{for(var r=0,a=this.allDayElement;r<a.length;r++){a[r].style.height=t/12+"em"}(0,e.removeClass)([i],ar)}},i.prototype.addOrRemoveClass=function(){var t=this;this.moreEvents.filter((function(i){!t.parent.uiStateValues.expand&&t.allDayLevel>2?((0,e.addClass)([i],Vi),i.setAttribute("tabindex","-1")):((0,e.removeClass)([i],Vi),i.setAttribute("tabindex","0"))}));var i=this.element.querySelector("."+Ii);this.parent.uiStateValues.expand?((0,e.removeClass)([i],Mi),(0,e.addClass)([i],ki)):((0,e.removeClass)([i],ki),(0,e.addClass)([i],Mi)),this.allDayLevel>2?(0,e.removeClass)([i],Ne):(0,e.addClass)([i],Ne),[].slice.call(this.element.querySelectorAll("."+Ai)).forEach((function(i){!t.parent.uiStateValues.expand&&t.allDayLevel>2?(0,e.removeClass)([i],Ne):(0,e.addClass)([i],Ne)}))},i.prototype.getEventHeight=function(){var t=(0,e.createElement)("div",{className:qt,styles:"visibility:hidden"});this.element.querySelector("."+Ei+":first-child").appendChild(t);var i=t.offsetHeight;return(0,e.remove)(t),i},i.prototype.rowExpandCollapse=function(){var e,t=this.element.querySelector("."+Ii);this.parent.uiStateValues.expand=t.classList.contains(Mi),this.parent.uiStateValues.expand?(t.setAttribute("title",this.parent.localeObj.getConstant("collapseAllDaySection")),t.setAttribute("aria-label",this.parent.localeObj.getConstant("collapseAllDaySection")),e=(this.allDayLevel+1)*this.getEventHeight()+4):(t.setAttribute("title",this.parent.localeObj.getConstant("expandAllDaySection")),t.setAttribute("aria-label",this.parent.localeObj.getConstant("expandAllDaySection")),e=3*this.getEventHeight()+4,this.parent.element.querySelector("."+Ge).scrollTop=0),this.setAllDayRowHeight(e),this.animation.animate(this.allDayElement[0]),this.addOrRemoveClass(),this.animation.animate(t)},i.prototype.animationUiUpdate=function(){this.parent.notify(N,{})},i.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed||(this.removeEventListener(),this.allDayElement=null,this.renderedAllDayEvents=null,this.renderedEvents=null,this.slotCount=null,this.interval=null,this.startHour=null,this.endHour=null,this.element=null,this.fields=null,this.animation=null,t.prototype.destroy.call(this))},i}(ya),Da=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ba=function(t){function i(e){var i=t.call(this,e)||this;return i.renderedEvents=[],i.monthHeaderHeight=0,i.moreIndicatorHeight=19,i.renderType="day",i.element=i.parent.activeView.getPanel(),i.fields=i.parent.eventFields,i.maxHeight=i.parent.eventSettings.enableMaxHeight&&!i.parent.eventSettings.enableIndicator&&!i.parent.rowAutoHeight,i.withIndicator=i.parent.eventSettings.enableMaxHeight&&i.parent.eventSettings.enableIndicator&&!i.parent.rowAutoHeight,i.maxOrIndicator=i.maxHeight||i.withIndicator,i.moreIndicatorHeight=i.parent.rowAutoHeight&&i.parent.eventSettings.ignoreWhitespace?0:i.moreIndicatorHeight,i.addEventListener(),i}return Da(i,t),i.prototype.removeEventWrapper=function(t){if(t.length>0)for(var i=0,n=t="Month"===this.parent.currentView||!this.parent.activeView.isTimelineView()&&!this.parent.activeViewOptions.timeScale.enable?t:[t[0]];i<n.length;i++){var r=n[i];r.parentElement&&r.parentElement.parentNode&&(0,e.remove)(r.parentElement)}},i.prototype.renderAppointments=function(){this.parent.dragAndDropModule&&this.parent.dragAndDropModule.setDragArea(),this.isResourceEventTemplate=this.parent.isSpecificResourceEvents();var t=this.parent.element.querySelector("."+Qt);this.parent.rowAutoHeight&&(this.parent.uiStateValues.top=t.scrollTop,this.parent.uiStateValues.left=t.scrollLeft);var i=[].slice.call(this.element.querySelectorAll("."+xt));if(this.parent.crudModule&&this.parent.crudModule.crudObj.isCrudAction)for(var n=0,r=this.parent.crudModule.crudObj.sourceEvent.length;n<r;n++){var a=[].slice.call(this.element.querySelectorAll('.e-appointment-wrapper [data-group-index="'+this.parent.crudModule.crudObj.sourceEvent[parseInt(n.toString(),10)].groupIndex+'"]'));if(this.removeEventWrapper(a),this.parent.crudModule.crudObj.targetEvent[parseInt(n.toString(),10)]&&this.parent.crudModule.crudObj.sourceEvent[parseInt(n.toString(),10)].groupIndex!==this.parent.crudModule.crudObj.targetEvent[parseInt(n.toString(),10)].groupIndex){var s=[].slice.call(this.element.querySelectorAll('.e-appointment-wrapper [data-group-index="'+this.parent.crudModule.crudObj.targetEvent[parseInt(n.toString(),10)].groupIndex+'"]'));this.removeEventWrapper(s)}}else for(var o=0,l=i;o<l.length;o++){var p=l[o];(0,e.remove)(p)}if(this.removeHeightProperty(We),this.element.querySelector("."+ze)){if("Month"===this.parent.currentView){var c=(0,e.createElement)("div",{className:xt}),h=this.parent.element.querySelector("."+ze);h.appendChild(c),this.monthHeaderHeight=c.offsetTop-h.offsetTop,h.removeChild(c)}this.eventHeight=Q(this.element,qt);var d="."+We+" tbody tr";this.addCellHeight(d,this.eventHeight,"Month"===this.parent.currentView?0:2,this.monthHeaderHeight,this.moreIndicatorHeight);var u=t.scrollTop;if(this.parent.rowAutoHeight&&this.parent.virtualScrollModule&&!this.parent.virtualScrollModule.isHorizontalScroll&&!(0,e.isNullOrUndefined)(this.parent.currentAction)&&(t.scrollTop=t.scrollTop-1),this.parent.activeViewOptions.group.resources.length>0?(this.renderResourceEvents(),this.parent.virtualScrollModule&&this.parent.virtualScrollModule.updateFocusedWorkCell()):this.renderEventsHandler(this.parent.activeView.renderDates,this.parent.activeViewOptions.workDays),this.parent.rowAutoHeight){this.updateBlockElements();var g={cssProperties:this.parent.getCssProperties(),module:this.parent.getModuleName(),isPreventScrollUpdate:!0,scrollPosition:{left:this.parent.uiStateValues.left,top:this.parent.uiStateValues.top}};if(this.parent.virtualScrollModule&&!this.parent.virtualScrollModule.isHorizontalScroll&&(this.parent.currentAction?(t.scrollTop=u,this.parent.currentAction=null):this.parent.virtualScrollModule.updateVirtualScrollHeight()),this.parent.enablePersistence||this.parent.notify(N,{}),this.parent.notify(U,g),"Month"===this.parent.currentView&&this.parent.showWeekNumber){var v=[].slice.call(this.parent.element.querySelectorAll(".e-content-wrap table tr td:first-child"));[].slice.call(this.parent.element.querySelectorAll("."+Pt)).forEach((function(t,i){var n=v[parseInt(i.toString(),10)].offsetHeight;(0,e.setStyleAttribute)(t,{height:n+"px"})})),this.parent.element.querySelector("."+Ht).scrollTop=this.parent.element.querySelector("."+Qt).scrollTop}}this.parent.renderTemplates()}},i.prototype.renderEventsHandler=function(t,i,n){var r,a;this.renderedEvents=[];var s=0;if(n?(s=n.groupIndex,this.cssClass=n.cssClass,this.groupOrder=n.groupOrder,r=this.parent.eventBase.filterEventsByResource(n,this.parent.eventsProcessed),a=this.parent.eventBase.filterEventsByResource(n,this.parent.blockProcessed),this.workCells=[].slice.call(this.element.querySelectorAll("."+ze+'[data-group-index="'+s+'"]'))):(r=this.parent.eventsProcessed,a=this.parent.blockProcessed,this.workCells=[].slice.call(this.element.querySelectorAll("."+ze))),this.sortByDateTime(r),this.sortByDateTime(a),"Month"===this.parent.currentView&&this.parent.rowAutoHeight&&0===this.parent.activeViewOptions.group.resources.length){var o=[].slice.call(this.parent.element.querySelectorAll(".e-content-wrap table tr td:first-child")),l=this.parent.element.querySelector("."+We).clientHeight/o.length;o.forEach((function(t){(0,e.setStyleAttribute)(t,{height:l+"px"})}))}var p=this.workCells[this.parent.activeView.isTimelineView()?0:this.workCells.length-1];this.cellWidth=Ve(p),this.cellHeight=Ae(p),this.dateRender=t;var c=this.getRenderedDates(t);this.getSlotDates(i||this.parent.activeViewOptions.workDays),this.processBlockEvents(a,s,n);for(var h=[],d=0,u=r;d<u.length;d++){var g=u[d];this.parent.resourceBase&&!n&&(this.cssClass=this.parent.resourceBase.getCssClass(g)),h=h.concat(this.splitEvent(g,c||this.dateRender))}for(var v=0;v<this.slots.length;v++){this.renderedEvents=[];for(var m=this.slots[parseInt(v.toString(),10)],f=pe(new Date(m[m.length-1]),1),y=0,T=this.filterEvents(new Date(m[0]),f,h);y<T.length;y++){var w=T[y];if(this.maxHeight){var D="Month"===this.parent.currentView?w[this.fields.startTime]:this.getStartTime(w,w.data);if(this.getIndex(D)>0)continue}this.updateIndicatorIcon(w),this.renderEvents(w,s,r)}}this.cssClass=null,this.groupOrder=null},i.prototype.processBlockEvents=function(t,i,n){for(var r=0,a=t;r<a.length;r++){var s=a[r];this.parent.resourceBase&&!n&&(this.cssClass=this.parent.resourceBase.getCssClass(s));var o=[];if("day"!==this.renderType||s[this.fields.isAllDay])o.push(s);else{var l,p=(0,e.extend)({},s,null,!0),c=this.isSameDate(p[this.fields.startTime],p[this.fields.endTime]);if(p.isBlockIcon=c,!c&&oe(p[this.fields.startTime])>0)(l=(0,e.extend)({},s,null,!0))[this.fields.endTime]=pe(se(new Date(s[this.fields.startTime]+"")),1),l.isBlockIcon=!0,p[this.fields.startTime]=l[this.fields.endTime],o.push(l);if(!(c=this.isSameDate(p[this.fields.startTime],p[this.fields.endTime]))&&oe(p[this.fields.endTime])>0)(l=(0,e.extend)({},s,null,!0))[this.fields.startTime]=se(new Date(s[this.fields.endTime]+"")),l.isBlockIcon=!0,o.push(l),p[this.fields.endTime]=l[this.fields.startTime];o.push(p)}for(var h=0,d=o;h<d.length;h++)for(var u=d[h],g=0,v=this.splitEvent(u,this.dateRender);g<v.length;g++){var m=v[g];this.renderBlockEvents(m,i,!!u.isBlockIcon)}}},i.prototype.isSameDate=function(e,t){return new Date(+e).setHours(0,0,0,0)===new Date(+t).setHours(0,0,0,0)},i.prototype.renderBlockEvents=function(t,i,n){var r=t.data,a=this.getStartTime(t,r),s=this.getEndTime(t,r),o=this.parent.getIndexOfDate(this.dateRender,se(new Date(a.getTime())));if(!(o<0||a>s)){var l=this.getCellTd(o),p=this.getPosition(a,s,t[this.fields.isAllDay],o);if(n)this.renderBlockIndicator(l,p,i);else{var c=r.count,h=this.getEventWidth(a,s,t[this.fields.isAllDay],c);h=h<=0?this.cellWidth:h;var d=this.parent.enableRtl?0:p,u=this.parent.enableRtl?p:0,g=this.cellHeight-this.monthHeaderHeight,v=this.getRowTop(i),m=this.createBlockAppointmentElement(t,i,this.isResourceEventTemplate);(0,e.setStyleAttribute)(m,{width:h+"px",height:g+"px",left:d+"px",right:u+"px",top:v+"px"}),this.renderEventElement(t,m,l)}}},i.prototype.renderBlockIndicator=function(t,i,n){var r=(0,e.createElement)("div",{className:"e-icons "+Ut});(0,e.isNullOrUndefined)(t.querySelector("."+Ut))&&t.appendChild(r)},i.prototype.getStartTime=function(e,t){return e[this.fields.startTime]},i.prototype.getEndTime=function(e,t){return e[this.fields.endTime]},i.prototype.getCellTd=function(e){return this.workCells[parseInt(e.toString(),10)]},i.prototype.getEventWidth=function(e,t,i,n){return n*this.cellWidth-1},i.prototype.getPosition=function(e,t,i,n){return 0},i.prototype.getRowTop=function(e){return 0},i.prototype.updateIndicatorIcon=function(e){if(-1!==this.parent.currentView.indexOf("Timeline")&&"TimelineMonth"!==this.parent.currentView&&!e[this.fields.isAllDay]){var t=e.data,i=this.parent.activeView.getStartHour(),n=this.parent.activeView.getEndHour(),r=de(e[this.fields.startTime],i,n),a=de(e[this.fields.endTime],i,n),s=t[this.fields.startTime],o=t[this.fields.endTime];if(t.isLeft=t.isLeft||s.getTime()<r.startHour.getTime(),t.isRight=t.isRight||o.getTime()>a.endHour.getTime(),se(s).getTime()!==se(o).getTime()){var l=r.startHour,p=a.endHour,c=new Date(se(s));if(c.setHours(p.getHours(),p.getMinutes(),p.getSeconds()),t.isLeft=t.isLeft||s.getTime()>=(l.getDate()===r.endHour.getDate()?c.getTime():pe(c,1).getTime()),o.getTime()!==se(o).getTime()){var h=new Date(se(o));t.isRight=t.isRight||o.getTime()<=h.setHours(l.getHours(),l.getMinutes(),l.getSeconds())}}}},i.prototype.renderResourceEvents=function(){var e=this.parent.uiStateValues.isGroupAdaptive?[this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]]:this.parent.resourceBase.renderedResources;if(this.parent.crudModule&&this.parent.crudModule.crudObj.isCrudAction){for(var t=0,i=this.parent.crudModule.crudObj.sourceEvent.length;t<i;t++){var n=this.parent.crudModule.crudObj.sourceEvent[parseInt(t.toString(),10)];if(this.renderEventsHandler(n.renderDates,n.workDays,n),this.parent.crudModule.crudObj.sourceEvent[parseInt(t.toString(),10)].groupIndex!==this.parent.crudModule.crudObj.targetEvent[parseInt(t.toString(),10)].groupIndex){var r=this.parent.crudModule.crudObj.targetEvent[parseInt(t.toString(),10)];this.renderEventsHandler(r.renderDates,r.workDays,r)}}this.parent.crudModule.crudObj.isCrudAction=!1}else for(var a=0,s=e;a<s.length;a++){var o=s[a];this.renderEventsHandler(o.renderDates,o.workDays,o)}},i.prototype.getSlotDates=function(e){this.slots=[];for(var t=this.dateRender.map((function(e){return+e})),i=!this.parent.activeViewOptions.showWeekend||this.parent.activeViewOptions.group.byDate&&this.parent.activeViewOptions.group.hideNonWorkingDays?e.length:Y;t.length>0;)this.slots.push(t.splice(0,i))},i.prototype.createAppointmentElement=function(t,i,n){void 0===n&&(n=!1);var r=t[this.fields.subject]||this.parent.eventSettings.fields.subject.default||this.parent.localeObj.getConstant("addTitle"),a=(0,e.extend)({},t,t.data,!0),s={"data-id":"Appointment_"+t[this.fields.id],role:"button",tabindex:"0","aria-disabled":this.parent.eventBase.getReadonlyAttribute(t),"aria-label":this.parent.getAnnouncementString(a,r)};n||(s["data-guid"]=t.Guid),this.parent.activeViewOptions.group.resources.length>0&&(s["data-group-index"]=i.toString());var o=(0,e.createElement)("div",{className:qt,attrs:s});(0,e.isNullOrUndefined)(this.cssClass)||(0,e.addClass)([o],this.cssClass),t[this.fields.isReadonly]&&(0,e.addClass)([o],"e-read-only");var l,p=(0,e.createElement)("div",{className:Wt});o.appendChild(p);var c=t.data,h=this.getEventData(t);if((0,e.isNullOrUndefined)(this.parent.activeViewOptions.eventTemplate)){var d=t[this.fields.location]||this.parent.eventSettings.fields.location.default||"",u=(0,e.createElement)("div",{className:vn});this.parent.sanitize(r+(d?"; "+d:""),u);var g=(0,e.createElement)("div",{className:_t+(this.parent.isAdaptive?" "+Ne:""),innerHTML:this.parent.getTimeString(c[this.fields.startTime])}),v=(0,e.createElement)("div",{className:_t+(this.parent.isAdaptive?" "+Ne:""),innerHTML:this.parent.getTimeString(c[this.fields.endTime])});if("Month"===this.parent.currentView)t[this.fields.isAllDay]?(l=[u],(0,e.addClass)([u],"e-text-center")):c.count<=1&&!c.isLeft&&!c.isRight?l=[g,u]:(l=[],(0,e.addClass)([u],"e-text-center"),c.isLeft||l.push(g),l.push(u),c.isRight||l.push(v));else{var m=void 0;if(t[this.fields.isAllDay]){m=[u,(0,e.createElement)("div",{className:_t,innerHTML:this.parent.localeObj.getConstant("allDay")})]}else{var f=this.parent.getTimeString(c[this.fields.startTime])+" - "+this.parent.getTimeString(c[this.fields.endTime]),y=(0,e.createElement)("div",{className:_t+(this.parent.isAdaptive?" "+Ne:""),innerHTML:f}),T=(0,e.createElement)("div",{className:mn});this.parent.sanitize(d,T),m=[u,y,T]}var w=(0,e.createElement)("div",{className:"e-inner-wrap"});(0,e.append)(m,w),l=[w]}}else{var D=this.parent.element.id+"_"+this.parent.activeViewOptions.eventTemplateName+"eventTemplate",b=this.isResourceEventTemplate?this.parent.getEventTemplateName(i):"eventTemplate";l=this.parent.getAppointmentTemplate()(h,this.parent,b,D,!1,void 0,void 0,this.parent.root)}return(0,e.append)(l,p),this.appendEventIcons(t,p),this.renderResizeHandler(o,t.data,t[this.fields.isReadonly]),o},i.prototype.appendEventIcons=function(t,i){var n=t.data;if(!(0,e.isNullOrUndefined)(t[this.fields.recurrenceRule])||!(0,e.isNullOrUndefined)(t[this.fields.recurrenceID])){var r=t[this.fields.id]===t[this.fields.recurrenceID]?Si:Ci;i.appendChild((0,e.createElement)("div",{className:je+" "+r+(this.parent.isAdaptive?" "+Ne:"")}))}if(n.isLeft){var a=(0,e.createElement)("div",{className:pi+" "+je+" "+ci});(0,e.prepend)([a],i)}if(n.isRight){var s=(0,e.createElement)("div",{className:pi+" "+je+" "+hi});(0,e.append)([s],i)}},i.prototype.renderEvents=function(t,i,n){var r=t[this.fields.startTime],a=t[this.fields.endTime],s=this.parent.getIndexOfDate(this.dateRender,se(r));if(!(s<0||r.getTime()<this.parent.minDate.getTime()||a.getTime()>this.parent.maxDate.getTime())){var o=this.parent.rowAutoHeight?1:this.parent.activeViewOptions.maxEventsPerRow,l=this.getIndex(r);t.Index=l;var p=t.data.count;if(r.getTime()<=a.getTime()){var c=p*this.cellWidth-5,h=this.workCells[parseInt(s.toString(),10)],d=l*(this.eventHeight+0),u=this.monthHeaderHeight+(l+1)*(this.eventHeight+0)+this.moreIndicatorHeight,g=!this.parent.activeViewOptions.maxEventsPerRow||this.parent.rowAutoHeight||this.parent.eventSettings.enableIndicator?this.maxOrIndicator?l<1:this.cellHeight>u:l<o;if(this.parent.rowAutoHeight||g){this.renderedEvents.push((0,e.extend)({},t,null,!0));var v=void 0;if(v=this.inlineValue?this.parent.inlineModule.createInlineAppointmentElement():this.createAppointmentElement(t,i),this.applyResourceColor(v,t,"backgroundColor",this.groupOrder),this.wireAppointmentEvents(v,t),(0,e.setStyleAttribute)(v,{width:c+"px",top:d+"px"}),this.renderEventElement(t,v,h),this.parent.rowAutoHeight){var m=h.parentElement.firstElementChild;this.updateCellHeight(m,u)}}else for(var f=0;f<p;f++)if(this.workCells[s+f]){var y=this.workCells[s+f].querySelector("."+Ri);if(y){var T=parseInt(y.getAttribute("data-count"),10)+1;y.setAttribute("data-count",T.toString()),y.setAttribute("aria-label",T+" "+this.parent.localeObj.getConstant("moreEvents")),y.innerHTML=this.getMoreIndicatorText(T)}else{var w=new Date(this.dateRender[s+f].getTime()),D=pe(this.dateRender[s+f],1),b=this.workCells[s+f].getAttribute("data-group-index"),S=this.getMoreIndicatorElement(1,w,D);(0,e.isNullOrUndefined)(b)||S.setAttribute("data-group-index",b),S.style.top=this.cellHeight-this.monthHeaderHeight-this.moreIndicatorHeight+"px",S.style.width=this.cellWidth-2+"px",this.renderElement(this.workCells[s+f],S),e.EventHandler.add(S,"click",this.moreIndicatorClick,this)}}}}},i.prototype.updateCellHeight=function(t,i){i>t.offsetHeight&&(0,e.setStyleAttribute)(t,{height:i+"px"})},i.prototype.updateBlockElements=function(){for(var t=0,i=[].slice.call(this.element.querySelectorAll("."+Ft));t<i.length;t++){var n=i[t],r=(0,e.closest)(n,"tr");this.monthHeaderHeight=n.offsetParent.offsetTop-r.offsetTop,n.style.height=r.offsetHeight-1-this.monthHeaderHeight+"px";var a=r.firstElementChild,s=Math.round(n.offsetWidth/a.offsetWidth);n.style.width=a.offsetWidth*s+"px"}},i.prototype.getFilteredEvents=function(t,i,n,r){var a;if((0,e.isNullOrUndefined)(n))a=this.filterEvents(t,i);else{var s=this.parent.resourceBase.lastResourceLevel[parseInt(n,10)];a=this.filterEvents(t,i,(0,e.isNullOrUndefined)(r)?void 0:r,s)}return a},i.prototype.getOverlapEvents=function(e,t){for(var i=[],n=se(e).getTime(),r=0,a=t;r<a.length;r++){var s=a[r];se(s[this.fields.startTime]).getTime()<=n&&se(s[this.fields.endTime]).getTime()>=n&&i.push(s)}return i},i.prototype.getIndex=function(e){var t=-1,i=this.renderedEvents;if(i.length>0){var n=this.getOverlapEvents(e,i).map((function(e){return e.Index}));t=n.length>0?this.getSmallestMissingNumber(n):0}return-1===t?0:t},i.prototype.moreIndicatorClick=function(t){var i=this,n=(0,e.closest)(t.target,"."+Ri),r=new Date(parseInt(n.getAttribute("data-start-date"),10)),a=new Date(parseInt(n.getAttribute("data-end-date"),10)),o=n.getAttribute("data-group-index"),l={cancel:!1,event:t,element:n,isPopupOpen:!0,startTime:r,endTime:a,viewName:this.parent.getNavigateView()};o&&(l.groupIndex=parseInt(o,10)),this.parent.trigger(s,l,(function(e){if(!e.cancel)if(e.isPopupOpen){var n=i.getFilteredEvents(r,a,o),s={date:r,event:n,element:t.target};i.parent.quickPopup.moreEventClick(s,a,o)}else i.parent.setProperties({selectedDate:r},!0),i.parent.changeView(e.viewName,t)}))},i.prototype.renderEventElement=function(e,t,i){var n=this,r=t.classList.contains(Ft)?"blockEvent":"event",a=t.classList.contains(qt),s={data:this.getEventData(e),element:t,cancel:!1,type:r};this.parent.trigger(y,s,(function(e){e.cancel?n.renderedEvents.pop():n.renderElement(i,t,a)}))},i.prototype.getEventData=function(t){var i=(0,e.extend)({},t,null,!0);return i[this.fields.startTime]=t.data[this.fields.startTime],i[this.fields.endTime]=t.data[this.fields.endTime],i},i.prototype.renderElement=function(t,i,n){void 0===n&&(n=!1),this.maxOrIndicator&&n&&this.setMaxEventHeight(i,t);var r=t.querySelector("."+xt);if(r)r.appendChild(i);else{var a=(0,e.createElement)("div",{className:xt});a.appendChild(i),t.appendChild(a)}},i.prototype.getMoreIndicatorElement=function(t,i,n){return(0,e.createElement)("div",{className:Ri,innerHTML:this.getMoreIndicatorText(t),attrs:{role:"button",tabindex:"0","aria-label":this.parent.globalize.formatNumber(t)+" "+this.parent.localeObj.getConstant("moreEvents"),"data-count":t.toString(),"data-start-date":i.getTime().toString(),"data-end-date":n.getTime().toString()}})},i.prototype.getMoreIndicatorText=function(e){return"+"+this.parent.globalize.formatNumber(e)+"&nbsp;"+(this.parent.isAdaptive?"":this.parent.localeObj.getConstant("more"))},i.prototype.removeHeightProperty=function(e){for(var t=0,i=[].slice.call(this.element.querySelectorAll("."+e+" tbody tr"));t<i.length;t++){i[t].firstElementChild.style.height=""}},i.prototype.setMaxEventHeight=function(t,i){var n=De(i.querySelector("."+ri)),r=i.offsetHeight-n-(this.maxHeight?0:this.moreIndicatorHeight);(0,e.setStyleAttribute)(t,{height:r+"px","align-items":"center"})},i.prototype.destroy=function(){this.element=null,this.fields=null,this.maxHeight=null,this.withIndicator=null,this.maxOrIndicator=null,this.moreIndicatorHeight=null,this.removeEventListener(),t.prototype.destroy.call(this)},i}(ya),Sa=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ca=function(t){function i(e,i){var n=t.call(this,e)||this;n.startHour=n.parent.activeView.getStartHour(),n.endHour=n.parent.activeView.getEndHour(),n.slotCount=n.parent.activeViewOptions.timeScale.slotCount,n.interval=n.parent.activeViewOptions.timeScale.interval,n.day=0,n.rowIndex=0,n.cellTops=[],n.renderType=i,n.eventContainers=[].slice.call(n.element.querySelectorAll("."+Nt));var r=[].slice.call(n.element.querySelectorAll("."+We+" tbody tr"));return n.dayLength=0===r.length?0:r[0].children.length,n.content=n.parent.element.querySelector("."+Fe+"."+We),n}return Sa(i,t),i.prototype.getSlotDates=function(){if(this.slots=[],this.slots.push(this.parent.activeView.renderDates.map((function(e){return+e}))),this.parent.activeViewOptions.headerRows.length>0&&"Hour"!==this.parent.activeViewOptions.headerRows.slice(-1)[0].option){this.renderType="day";var e=this.content.querySelector("."+ze);this.cellWidth=Ve(e)/+(e.getAttribute("colspan")||1),this.slotsPerDay=1}else this.slotsPerDay=this.dayLength/this.dateRender.length},i.prototype.getOverlapEvents=function(e,t){var i=[];if("day"===this.renderType)for(var n=0,r=t;n<r.length;n++){se((o=r[n])[this.fields.startTime]).getTime()<=se(new Date(e.getTime())).getTime()&&se(o[this.fields.endTime]).getTime()>=se(new Date(e.getTime())).getTime()&&i.push(o)}else for(var a=0,s=t;a<s.length;a++){var o,l=(o=s[a]).data;(l.trimStartTime.getTime()<=e.getTime()&&l.trimEndTime.getTime()>e.getTime()||l.trimStartTime.getTime()===e.getTime()&&l.trimEndTime.getTime()===e.getTime())&&i.push(o)}return i},i.prototype.getSortComparerIndex=function(e,t){var i=-1,n=this.renderedEvents;if(n.length>0){var r=this.getOverlapSortComparerEvents(e,t,n).map((function(e){return e.Index}));i=r.length>0?this.getSmallestMissingNumber(r):0}return-1===i?0:i},i.prototype.getOverlapSortComparerEvents=function(e,t,i){for(var n=[],r=function(i){if("day"===a.renderType){var r=se(e).getTime(),s=se(t).getTime(),o=se(i[a.fields.startTime]).getTime(),l=se(i[a.fields.endTime]).getTime();(o<=r&&l>=r||(c=s-(oe(t)<=0?G:0),l>=(c=r>c?r:c)&&o<=c)||o>r&&l<s)&&n.push(i)}else{var p=i.data;(p.trimStartTime.getTime()<=e.getTime()&&e.getTime()<p.trimEndTime.getTime()||e.getTime()<=p.trimStartTime.getTime()&&p.trimStartTime.getTime()<t.getTime())&&n.push(i)}var c},a=this,s=0,o=i;s<o.length;s++){r(o[s])}return n},i.prototype.renderResourceEvents=function(){this.removeHeightProperty(ct);var e="."+ct+" tbody tr";this.addCellHeight(e,this.eventHeight,2,this.moreIndicatorHeight,0,!1);var t=this.parent.uiStateValues.isGroupAdaptive?[this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]]:this.parent.resourceBase.renderedResources;if(this.parent.crudModule&&this.parent.crudModule.crudObj.isCrudAction){for(var i=0,n=this.parent.crudModule.crudObj.sourceEvent.length;i<n;i++){var r=this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(),10)];if(this.rowIndex=r.groupIndex,this.renderEventsHandler(this.parent.activeView.renderDates,this.parent.activeViewOptions.workDays,r),this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(),10)]&&this.parent.crudModule.crudObj.sourceEvent[parseInt(i.toString(),10)].groupIndex!==this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(),10)].groupIndex){var a=this.parent.crudModule.crudObj.targetEvent[parseInt(i.toString(),10)];this.rowIndex=a.groupIndex,this.renderEventsHandler(this.parent.activeView.renderDates,this.parent.activeViewOptions.workDays,a)}}this.parent.crudModule.crudObj.isCrudAction=!1}else for(i=0;i<t.length;i++)this.rowIndex=i,this.renderEventsHandler(this.parent.activeView.renderDates,this.parent.activeViewOptions.workDays,t[parseInt(i.toString(),10)])},i.prototype.renderEvents=function(t,i,n){var r=t[this.fields.startTime],a=t[this.fields.endTime];if(!(r.getTime()<this.parent.minDate.getTime()||a.getTime()>this.parent.maxDate.getTime())){var s=t.data;r=this.getStartTime(t,s),a=this.getEndTime(t,s);var o=de(t[this.fields.startTime],this.startHour,this.endHour),l=this.updateEventMinimumDuration(o,r,a);if(r=l.startDate,a=l.endDate,this.day=this.parent.getIndexOfDate(this.dateRender,se(new Date(r.getTime()))),!(this.day<0)){var p=this.getCellTd(),c=this.parent.rowAutoHeight?1:this.parent.activeViewOptions.maxEventsPerRow,h=(0,e.isNullOrUndefined)(this.parent.eventSettings.sortComparer)?this.getIndex(r):this.getSortComparerIndex(r,a);t.Index=h;var d=this.eventHeight,u=s.count,g=(0,e.extend)({},t,null,!0);g[this.fields.startTime]=s[this.fields.startTime],g[this.fields.endTime]=s[this.fields.endTime];var v=de(se(new Date(this.dateRender[this.day].getTime())),this.startHour,this.endHour),m=!0;if(m=!(!this.isDayProcess()&&!g[this.fields.isAllDay])||this.isValidEvent(g,r,a,v),r<=a&&m){var f=this.getEventWidth(r,a,t[this.fields.isAllDay],u);f="day"===this.renderType?f-2:f;var y,T,w=this.getPosition(r,a,t[this.fields.isAllDay],this.day);f=f<=0?this.cellWidth:f,this.renderedEvents.push((0,e.extend)({},t,null,!0)),(0,e.isNullOrUndefined)(this.cellTops[parseInt(i.toString(),10)])&&(this.cellTops[parseInt(i.toString(),10)]=this.getRowTop(i));var D=this.cellTops[parseInt(i.toString(),10)],b=D+(this.maxHeight?0:2)+h*(d+2);y=this.parent.enableRtl?0:w,T=this.parent.enableRtl?w:0;var S=(h+1)*(d+2)+this.moreIndicatorHeight,C=!this.parent.activeViewOptions.maxEventsPerRow||this.parent.rowAutoHeight||this.parent.eventSettings.enableIndicator?this.maxOrIndicator?h<1:this.cellHeight>S:h<c;if(this.parent.rowAutoHeight||C){var O=void 0;if(O=(0,e.isNullOrUndefined)(this.inlineValue)?this.createAppointmentElement(t,i):this.parent.inlineModule.createInlineAppointmentElement(),this.applyResourceColor(O,t,"backgroundColor",this.groupOrder),(0,e.setStyleAttribute)(O,{width:f+"px",left:y+"px",right:T+"px",top:b+"px"}),this.wireAppointmentEvents(O,t),this.parent.rowAutoHeight){var E=this.parent.element.querySelector("."+Qt),x=Ve(E),V=E.offsetHeight===E.clientHeight&&E.offsetWidth===E.clientWidth;this.renderEventElement(t,O,p);var A=this.getFirstChild(i);this.updateCellHeight(A,S),V&&(E.offsetWidth>E.clientWidth||x!==Ve(E))&&this.adjustAppointments(x)}else this.renderEventElement(t,O,p)}else for(var I=0;I<u;I++){var M=p.querySelector("."+Ri),k=this.parent.enableRtl?T:y;k=Math.floor(k/this.cellWidth)*this.cellWidth;var R=this.interval/this.slotCount,H="TimelineMonth"===this.parent.activeViewOptions.option||"day"===this.renderType||0!==I?new Date(this.dateRender[this.day+I].getTime()):new Date(r),P=pe(this.dateRender[this.day+I],1);if("TimelineMonth"===this.parent.activeViewOptions.option||"day"===this.renderType){var j=this.getPosition(H,P,t[this.fields.isAllDay],this.day+I);this.renderTimelineMoreIndicator(r,H,P,d,R,i,n,D,y,T,p,M,k,j)}else for(var L=(Ce(a)-Ce(r))/X*this.slotCount/this.interval,N=0;N<L&&(H=0===N?new Date(H.getTime()):new Date(H.getTime()+6e4*R),L<1&&(H=this.adjustToNearestTimeSlot(H,R)),P=new Date(H.getTime()+6e4*R),!(L>=1&&P.getTime()>a.getTime()));N++){var q=this.getPosition(H,P,!1,this.day+I);if(k>q)break;k=q,this.renderTimelineMoreIndicator(r,H,P,d,R,i,n,D,y,T,p,M,k,q)}}}this.parent.renderTemplates()}}},i.prototype.adjustToNearestTimeSlot=function(e,t){var i=new Date(e),n=60*i.getHours()*60*1e3+60*i.getMinutes()*1e3,r=Math.floor(n/(60*t*1e3))*(60*t*1e3),a=new Date(i.getTime());return a.setHours(r/36e5%24),a.setMinutes(r%36e5/6e4),a},i.prototype.renderTimelineMoreIndicator=function(t,i,n,r,a,s,o,l,p,c,h,d,u,g){if(p=this.parent.enableRtl?c=g:g,u=this.parent.enableRtl?c:p,u=Math.floor(u/this.cellWidth)*this.cellWidth,h&&(0,e.isNullOrUndefined)(d)||!this.isAlreadyAvail(u,h)){var v="TimelineMonth"===this.parent.activeViewOptions.option||"day"===this.renderType?new Date(+t):i,m=new Date(v.setMinutes(Math.floor(v.getMinutes()/a)*a)),f=new Date(m.getTime()+6e4*a),y=void 0;this.parent.activeViewOptions.group.resources.length>0&&!(0,e.isNullOrUndefined)(s)&&(y=s.toString());var T=this.getFilterEvents(i,n,m,f,y,o),w=this.cellHeight-this.moreIndicatorHeight;r=this.withIndicator?w-2:r;var D=Math.floor(w/(r+2)),b=this.parent.activeViewOptions.maxEventsPerRow&&!this.parent.eventSettings.enableIndicator?T.length-this.parent.activeViewOptions.maxEventsPerRow:T.length-D<=0?1:T.length-D,S=void 0;S="day"===this.renderType?this.getMoreIndicatorElement(b,i,n):this.getMoreIndicatorElement(b,m,f),(0,e.isNullOrUndefined)(y)||S.setAttribute("data-group-index",y),S.style.top=l+w+"px",S.style.width=this.cellWidth+"px",S.style.left=Math.floor(p/this.cellWidth)*this.cellWidth+"px",S.style.right=Math.floor(c/this.cellWidth)*this.cellWidth+"px",this.renderElement(h,S),e.EventHandler.add(S,"click",this.moreIndicatorClick,this)}},i.prototype.updateCellHeight=function(t,i){if(i>(""===t.style.height?this.cellHeight:parseInt(t.style.height,10))){if((0,e.setStyleAttribute)(t,{height:i+"px"}),this.parent.activeViewOptions.group.resources.length>0){var n=this.parent.element.querySelector("."+ct+' tbody td[data-group-index="'+t.getAttribute("data-group-index")+'"]');n&&(0,e.setStyleAttribute)(n,{height:i+"px"})}var r=this.parent.element.querySelector(".e-month-header-wrapper table tr:nth-child("+(t.parentElement.rowIndex+1)+") td");r&&(0,e.setStyleAttribute)(r,{height:i+"px"})}},i.prototype.adjustAppointments=function(e){var t=this,i=this.parent.element.querySelector("."+We+" tbody tr"),n=Ve(this.workCells[0]);this.cellWidth=n/+(this.workCells[0].getAttribute("colspan")||1);var r=n*i.children.length/(e/100);[].slice.call(this.parent.element.querySelectorAll("."+qt)).forEach((function(e){t.parent.enableRtl&&"0px"!==e.style.right?e.style.right=parseFloat(e.style.right)/100*r+"px":"0px"!==e.style.left&&(e.style.left=parseFloat(e.style.left)/100*r+"px"),e.style.width=parseFloat(e.style.width)/100*r+"px"}))},i.prototype.getFirstChild=function(e){var t="."+We+" tbody td",i="";return this.parent.activeViewOptions.group.resources.length>0&&(i='[data-group-index="'+e.toString()+'"]'),this.parent.element.querySelector(t+i)},i.prototype.updateBlockElements=function(){for(var e=0,t=[].slice.call(this.element.querySelectorAll("."+Ft));e<t.length;e++){var i=t[e],n=parseInt(i.getAttribute("data-group-index"),10),r=this.getFirstChild(n);i.style.height=r.offsetHeight+"px";var a=i.offsetWidth/r.offsetWidth;i.style.width=r.offsetWidth*a+"px"}for(var s=0,o=[].slice.call(this.element.querySelectorAll("."+Ut));s<o.length;s++){i=o[s],n=parseInt(i.getAttribute("data-group-index"),10);i.style.top=this.getRowTop(n)+this.getFirstChild(n).offsetHeight-18+"px"}},i.prototype.getStartTime=function(e,t){var i=e[this.fields.startTime],n=de(i,this.startHour,this.endHour);return i=this.isDayProcess()?e[this.fields.startTime]:n.startHour.getTime()>=t[this.fields.startTime]?n.startHour:n.endHour.getTime()<=t[this.fields.startTime]?this.getNextDay(n.startHour,t):t[this.fields.startTime],t.trimStartTime=e[this.fields.isAllDay]?n.startHour:t[this.fields.startTime],i},i.prototype.getNextDay=function(e,t){for(var i,n=1;n<=this.dateRender.length;n++)if(i=pe(e,n),-1!==this.parent.getIndexOfDate(this.dateRender,se(new Date(e.getTime()))))return t.count=t.count-1,i;return i},i.prototype.getEndTime=function(e,t){var i=e[this.fields.endTime],n=de(i,this.startHour,this.endHour);return this.isDayProcess()?i=t[this.fields.endTime]:(i=t[this.fields.endTime],(n.endHour.getTime()<=t[this.fields.endTime]||e[this.fields.isAllDay])&&(i=n.endHour),n.startHour.getTime()>=t[this.fields.endTime].getTime()&&!e[this.fields.isAllDay]&&(i=this.getPreviousDay(n.startHour,n.endHour,t))),t.trimEndTime=e[this.fields.isAllDay]?n.endHour:t[this.fields.endTime],i},i.prototype.getPreviousDay=function(e,t,i){for(var n=1;n<=this.dateRender.length;n++){var r=pe(t,-n);if(-1!==this.parent.getIndexOfDate(this.dateRender,se(new Date(e.getTime())))){(r=se(new Date(r.getTime()))).setHours(t.getHours(),t.getMinutes(),t.getSeconds());var a=i.count,s=i[this.fields.endTime];return i.count=0!==s.getHours()||0!==s.getMinutes()?a-1:a,r}}return i[this.fields.endTime]},i.prototype.getEventWidth=function(e,t,i,n){return"day"===this.renderType||i?n*this.slotsPerDay*this.cellWidth:this.isSameDay(e,t)?this.getSameDayEventsWidth(e,t):this.getSpannedEventsWidth(e,t,n)},i.prototype.getSameDayEventsWidth=function(e,t){var i=this.interval;if(1===this.slotsPerDay){var n=de(se(new Date(e.getTime())),this.startHour,this.endHour);i=(n.endHour.getTime()-n.startHour.getTime())/X}return(Ce(t)-Ce(e))/X*(this.cellWidth*this.slotCount)/i},i.prototype.getSpannedEventsWidth=function(e,t,i){var n,r=i*this.slotsPerDay*this.cellWidth,a=de(se(new Date(e.getTime())),this.startHour,this.endHour),s=this.getSameDayEventsWidth(a.startHour,e);if(-1===this.parent.getIndexOfDate(this.dateRender,se(new Date(t.getTime()))))n=0;else{var o=de(se(new Date(t.getTime())),this.startHour,this.endHour);n=this.getSameDayEventsWidth(t,o.endHour),n=this.slotsPerDay*this.cellWidth===n?0:n}var l=s+n;return r>l?r-l:r-s},i.prototype.isSameDay=function(e,t){return this.parent.getIndexOfDate(this.dateRender,se(new Date(e.getTime())))===this.parent.getIndexOfDate(this.dateRender,se(new Date(t.getTime())))},i.prototype.getAppointmentLeft=function(e,t,i){var n=this.isSameDay(t,e.startHour)?(Ce(t)-Ce(e.startHour))/(X*this.interval)*this.slotCount:0;return 0===i?n:Math.round((Ce(e.endHour)-Ce(e.startHour))/X/this.interval*this.slotCount)*i+n},i.prototype.getPosition=function(e,t,i,n){if("day"===this.renderType||i)return n*this.slotsPerDay*this.cellWidth;var r=de(se(new Date(this.dateRender[parseInt(n.toString(),10)].getTime())),this.startHour,this.endHour);return(r.endHour.getTime()<=t.getTime()&&r.startHour.getTime()>=e.getTime()?this.getAppointmentLeft(r,r.startHour,n):r.endHour.getTime()<=t.getTime()?this.getAppointmentLeft(r,e,n):r.startHour.getTime()>=e.getTime()?this.getAppointmentLeft(r,r.startHour,n):this.getAppointmentLeft(r,e,n))*this.cellWidth},i.prototype.getFilterEvents=function(e,t,i,n,r,a){return"day"===this.renderType?this.getFilteredEvents(e,t,r,a):this.getFilteredEvents(i,n,r,a)},i.prototype.isAlreadyAvail=function(e,t){for(var i=[].slice.call(t.querySelectorAll("."+Ri)),n=0;n<i.length;n++){var r=void 0;if(i&&(r=this.parent.enableRtl?i[parseInt(n.toString(),10)].style.right:i[parseInt(n.toString(),10)].style.left),parseInt(r,10)===Math.floor(e))return!0}return!1},i.prototype.getRowTop=function(e){return this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?this.parent.element.querySelector("."+Qt+' tbody td[data-group-index="'+e.toString()+'"]').offsetTop:0},i.prototype.getCellTd=function(){var e=this.parent.uiStateValues.isGroupAdaptive?0:this.rowIndex;return this.eventContainers[parseInt(e.toString(),10)]},i.prototype.renderBlockIndicator=function(t,i,n){if(!(this.parent.headerRows.length>0&&("Hour"!==this.parent.headerRows[this.parent.headerRows.length-1].option||"Date"!==this.parent.headerRows[this.parent.headerRows.length-1].option)||(i=Math.floor(i/this.cellWidth)*this.cellWidth+this.cellWidth-22,this.isAlreadyAvail(i,t)))){var r=(0,e.createElement)("div",{className:"e-icons "+Ut});this.parent.activeViewOptions.group.resources.length>0&&r.setAttribute("data-group-index",n.toString()),this.parent.enableRtl?r.style.right=i+"px":r.style.left=i+"px",r.style.top=this.getRowTop(n)+this.cellHeight-18+"px",this.renderElement(t,r)}},i.prototype.setMaxEventHeight=function(t,i){(0,e.setStyleAttribute)(t,{height:this.cellHeight-(this.maxHeight?0:2)-(this.maxHeight?0:this.moreIndicatorHeight)+"px"})},i.prototype.isDayProcess=function(){return"TimelineMonth"===this.parent.currentView||!this.parent.activeViewOptions.timeScale.enable||this.parent.activeViewOptions.headerRows.length>0&&"Hour"!==this.parent.activeViewOptions.headerRows.slice(-1)[0].option},i.prototype.destroy=function(){this.renderType=null,this.eventContainers=null,this.dayLength=null,this.content=null,t.prototype.destroy.call(this),this.parent=null},i}(ba),Oa=function(){function t(e){this.parent=e,this.parent.on(A,this.inlineEdit,this)}return t.prototype.inlineEdit=function(e){if(this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(),"Cell"===e.type){var t=this.parent.element.querySelector("."+Yi);t&&t.classList.contains(_e)&&this.parent.quickPopup.morePopup.hide(),this.removeInlineAppointmentElement(),this.cellEdit(e)}else this.parent.element.querySelector("."+ir)!==e.element.querySelector("."+ir)&&this.removeInlineAppointmentElement(),this.eventEdit(e)},t.prototype.cellEdit=function(e){var t=this.generateEventData(),i=e.element.cellIndex,n=this.getEventDaysCount(t);n>1&&(n=Math.round(n),i-=--n);var r=se(new Date(""+t[this.parent.eventFields.startTime])).getTime(),a=se(new Date(""+t[this.parent.eventFields.endTime])).getTime(),s=e.groupIndex||0,o="Day"===this.parent.currentView||"Week"===this.parent.currentView||"WorkWeek"===this.parent.currentView;if(this.parent.activeViewOptions.timeScale.enable&&o){var l=t[this.parent.eventFields.startTime].getDay();this.createVerticalViewInline(t,l,s,i)}else"Month"===this.parent.currentView||!this.parent.activeViewOptions.timeScale.enable&&o?this.createMonthViewInline(t,s,r,a):this.createTimelineViewInline(t,r,a,s);var p=this.parent.element.querySelector("."+ir);p&&p.focus()},t.prototype.eventEdit=function(t){var i,n=t.element.querySelector("."+ir);if(n)i=n.value;else{var r=t.element.querySelector("."+vn);if((0,e.isNullOrUndefined)(r)?i=t.data[this.parent.eventFields.subject]:((0,e.addClass)([r],Ne),i=r.innerText),n=(0,e.createElement)("input",{className:ir,attrs:{value:i}}),(0,e.closest)(t.element,"."+Yi))t.element.insertBefore(n,r);else if(["Agenda","MonthAgenda"].indexOf(this.parent.currentView)>-1){var a=t.element.querySelector("."+zt);(0,e.isNullOrUndefined)(a)&&(a=(0,e.createElement)("div",{className:zt}),t.element.prepend(a)),a.insertBefore(n,a.firstChild)}else t.element.querySelector(".e-appointment-details").prepend(n);n.focus()}n.setSelectionRange(i.length,i.length)},t.prototype.createVerticalViewInline=function(e,t,i,n){var r,a=this.getEventDaysCount(e),s=new wa(this.parent);s.initializeValues();var o=s.dateRender[parseInt(i.toString(),10)].map((function(e){return e.getDay()})).indexOf(t);if(a>=1){s.allDayElement=[].slice.call(this.parent.element.querySelectorAll("."+Ue)),(r=s.slots).push.apply(r,this.parent.activeView.renderDates.map((function(e){return+e})));var l=[].slice.call(this.parent.element.querySelectorAll("."+xi)),p=0;l.length>0&&(p=Math.floor(Ae(this.parent.element.querySelector("."+Be))/l[0].offsetHeight)-1),s.allDayLevel=p;var c=Q(this.parent.element.querySelector("."+Ei),qt),h=s.allDayElement.length>0?s.allDayElement[0].offsetTop:0;s.renderAllDayEvents(e,o,i,n,this.parent.allowInline,h,c)}else s.renderNormalEvents(e,o,i,n,this.parent.allowInline)},t.prototype.createMonthViewInline=function(e,t,i,n){var r=this.getEventDaysCount(e),a=this.parent.eventBase.cloneEventObject(e,i,n,r,!1,!1),s=new ba(this.parent);s.dateRender=this.parent.activeView.renderDates,s.inlineValue=this.parent.allowInline;var o=this.parent.activeView.renderDates,l=this.parent.activeViewOptions.workDays,p="."+ze;if(this.parent.activeViewOptions.group.resources.length>0){p+='[data-group-index="'+t+'"]';var c=this.parent.resourceBase.lastResourceLevel[parseInt(t.toString(),10)];o=c.renderDates,l=c.workDays}s.dateRender=o,s.workCells=[].slice.call(this.parent.element.querySelectorAll(p)),s.cellWidth=s.workCells[0].offsetWidth,s.cellHeight=s.workCells[0].offsetHeight,s.eventHeight=Q(this.parent.monthModule.element||s.element,qt),s.getSlotDates(l);for(var h=s.getRenderedDates(o),d=0,u=s.splitEvent(a,h||o);d<u.length;d++){var g=u[d];s.renderEvents(g,t)}this.parent.element.querySelector("."+ir).focus()},t.prototype.createTimelineViewInline=function(e,t,i,n){var r=this.getEventDaysCount(e),a=this.parent.eventBase.cloneEventObject(e,t,i,r,!1,!1),s=new Ca(this.parent,this.parent.activeViewOptions.timeScale.enable?"hour":"day");s.dateRender=this.parent.activeView.renderDates,s.eventContainers=[].slice.call(this.parent.element.querySelectorAll("."+Nt));var o=this.parent.element.querySelector("."+ze);s.inlineValue=this.parent.allowInline,s.cellWidth=o.offsetWidth,s.cellHeight=o.offsetHeight;var l=0===this.parent.element.querySelectorAll("."+We+" tbody tr").length?0:this.parent.element.querySelectorAll("."+We+" tbody tr")[0].children.length;s.slotsPerDay=l/s.dateRender.length,s.eventHeight=Q(s.element,qt),s.renderEvents(a,n)},t.prototype.getEventDaysCount=function(e){var t=e[this.parent.eventFields.startTime],i=e[this.parent.eventFields.endTime];return Math.abs(i.getTime()-t.getTime())/G},t.prototype.generateEventData=function(e){var t=this.parent.element.querySelector("."+ir),i=t?t.value:e?e.innerHTML:"",n={};return n[this.parent.eventFields.id]=this.parent.eventBase.getEventMaxID(),n[this.parent.eventFields.subject]=i,n[this.parent.eventFields.startTime]=this.parent.activeCellsData.startTime,n[this.parent.eventFields.endTime]=this.parent.activeCellsData.endTime,n[this.parent.eventFields.isAllDay]=this.parent.activeCellsData.isAllDay,this.parent.eventWindow.setDefaultValueToObject(n),this.parent.resourceBase&&this.parent.resourceBase.setResourceValues(n,this.parent.activeCellsData.groupIndex),n},t.prototype.documentClick=function(){var e=this.parent.element.querySelector("."+ir);e&&""!==e.value?this.inlineCrudActions(e):this.removeInlineAppointmentElement()},t.prototype.inlineCrudActions=function(t){if((0,e.closest)(t,"."+nr)){var i=this.generateEventData(t);this.parent.addEvent(i)}else{var n=(0,e.closest)(t,"."+qt),r=this.parent.getEventDetails(n);r[this.parent.eventFields.subject]=t.value;var a=void 0;r[this.parent.eventFields.id]===r[this.parent.eventFields.recurrenceID]&&(a="EditOccurrence",r[this.parent.eventFields.id]=this.parent.eventBase.getEventMaxID()),this.parent.saveEvent(r,a)}this.removeInlineAppointmentElement()},t.prototype.createInlineAppointmentElement=function(t){var i=(0,e.createElement)("div",{className:qt+" "+nr}),n=(0,e.createElement)("div",{className:Wt});i.appendChild(n);var r=(0,e.createElement)("input",{className:ir});return n.appendChild(r),t&&this.parent.eventBase.applyResourceColor(i,t,"backgroundColor"),i},t.prototype.removeInlineAppointmentElement=function(){var t=[].slice.call(this.parent.element.querySelectorAll("."+nr));t.length>0&&t.forEach((function(t){return(0,e.remove)(t)}));var i=this.parent.element.querySelector("."+ir);if(i){var n=(0,e.closest)(i,"."+qt).querySelector("."+vn);(0,e.isNullOrUndefined)(n)||(0,e.removeClass)([n],Ne),(0,e.remove)(i)}},t.prototype.destroy=function(){this.parent.off(A,this.inlineEdit)},t}(),Ea=d(741),xa=d(323),Va=function(){function t(){}return t.prototype.renderFormValidator=function(e,t,i,n){var r=this;this.element=i,this.formObj=new xa.FormValidator(e,{locale:n,customPlacement:function(e,t){r.errorPlacement(e,t)},rules:t,validationComplete:function(e){r.validationComplete(e)},focusout:function(e){r.focusOut(e)}})},t.prototype.focusOut=function(e){var t=e.relatedTarget;t&&(t.classList.contains("e-dlg-closeicon-btn")||t.classList.contains("e-close")||t.classList.contains(Ue)||t.classList.contains(Qe)||t.classList.contains(Fi)||t.classList.contains(ze)||t.classList.contains(En))?this.ignoreError=!0:this.ignoreError=!1},t.prototype.validationComplete=function(e){var t=this.element.querySelector("#"+e.inputName+"_Error");t&&(t.style.display="failure"===e.status?"":"none")},t.prototype.errorPlacement=function(t,i){var n=i.getAttribute("for"),r=this.element.querySelector("#"+n+"_Error");r||this.ignoreError||this.createTooltip(t,i,n,""),(0,e.isNullOrUndefined)(r)||(r.querySelector(".e-error").innerHTML=i.innerHTML)},t.prototype.createTooltip=function(t,i,n,r){var a,s,o=t.getBoundingClientRect();this.element.classList.contains(Fn)?(a=this.element,s=this.element.getBoundingClientRect()):s=(a=this.element.querySelector(".e-schedule-dialog .e-dlg-content")).getBoundingClientRect();var l=(0,e.createElement)("div",{className:"e-tooltip-wrap e-popup "+jn,id:n+"_Error",styles:"display:"+r+";top:"+(o.bottom-s.top+a.scrollTop+9)+"px;left:"+(o.left-s.left+a.scrollLeft+o.width/2)+"px;"}),p=(0,e.createElement)("div",{className:"e-tip-content"});p.appendChild(i);var c=(0,e.createElement)("div",{className:"e-arrow-tip e-tip-top"});c.appendChild((0,e.createElement)("div",{className:"e-arrow-tip-outer e-tip-top"})),c.appendChild((0,e.createElement)("div",{className:"e-arrow-tip-inner e-tip-top"})),l.appendChild(p),l.appendChild(c),a.appendChild(l),l.style.left=parseInt(l.style.left,10)-l.offsetWidth/2+"px"},t.prototype.destroyToolTip=function(){if(this.element)for(var t=0,i=[].slice.call(this.element.querySelectorAll("."+jn));t<i.length;t++){var n=i[t];(0,e.remove)(n)}this.formObj&&this.formObj.element&&this.formObj.reset()},t.prototype.destroy=function(){this.formObj&&this.formObj.element&&!this.formObj.isDestroyed&&this.formObj.destroy(),this.formObj=null,this.element=null},t}(),Aa=function(){function i(e){this.isMultipleEventSelect=!1,this.isCrudAction=!1,this.parent=e,this.l10n=this.parent.localeObj,this.fieldValidator=new Va,this.render(),this.addEventListener()}return i.prototype.render=function(){this.renderQuickPopup(),this.renderMorePopup(),this.renderQuickDialog()},i.prototype.renderQuickPopup=function(){var i=(0,e.createElement)("div",{className:Fn+" e-popup-close",attrs:{role:"dialog"}});this.parent.isAdaptive?(document.body.appendChild(i),(0,e.addClass)([i],Re)):this.parent.element.appendChild(i),this.quickPopup=new t.Popup(i,{targetType:this.parent.isAdaptive?"container":"relative",enableRtl:this.parent.enableRtl,open:this.quickPopupOpen.bind(this),close:this.quickPopupClose.bind(this),hideAnimation:this.parent.isAdaptive?{name:"ZoomOut"}:{name:"FadeOut",duration:150},showAnimation:this.parent.isAdaptive?{name:"ZoomIn"}:{name:"FadeIn",duration:150},collision:this.parent.isAdaptive?{X:"fit",Y:"fit"}:this.parent.enableRtl?{X:"flip",Y:"fit"}:{X:"none",Y:"fit"},position:this.parent.isAdaptive||this.parent.enableRtl?{X:"left",Y:"top"}:{X:"right",Y:"top"},viewPortElement:this.parent.isAdaptive?document.body:this.parent.element,zIndex:this.parent.isAdaptive?1004:3})},i.prototype.renderMorePopup=function(){var i='<div class="'+_i+'"><div class="e-more-event-header"><div class="'+Ki+'" title="'+this.l10n.getConstant("close")+'" tabindex="0" role="button"></div><div class="'+Gi+'"><div class="'+Xi+'" id="'+this.parent.element.id+'_more_popup"></div><div class="'+Qi+" "+ni+'" tabindex="0" role="link"></div></div></div></div>',n=(0,e.createElement)("div",{className:Yi+" e-popup-close",innerHTML:i});this.parent.isAdaptive?(document.body.appendChild(n),(0,e.addClass)([n],Re)):this.parent.element.appendChild(n),this.morePopup=new t.Popup(n,{targetType:this.parent.isAdaptive?"container":"relative",enableRtl:this.parent.enableRtl,hideAnimation:{name:"ZoomOut",duration:300},showAnimation:{name:"ZoomIn",duration:300},open:this.morePopupOpen.bind(this),close:this.morePopupClose.bind(this),collision:this.parent.isAdaptive?{X:"fit",Y:"fit"}:this.parent.enableRtl?{X:"flip",Y:"fit"}:{X:"flip",Y:"flip"},viewPortElement:this.parent.isAdaptive?document.body:this.parent.element,zIndex:this.parent.isAdaptive?1002:2}),this.morePopup.element.setAttribute("role","dialog"),this.morePopup.element.setAttribute("aria-labelledby",this.parent.element.id+"_more_popup");var r=this.morePopup.element.querySelector("."+Ki);this.renderButton("e-round",je+" "+Pn,!1,r,this.closeClick),e.EventHandler.add(this.morePopup.element.querySelector("."+Qi),"click",this.navigationClick,this)},i.prototype.renderQuickDialog=function(){var i=[{buttonModel:{cssClass:"e-quick-alertok e-flat",isPrimary:!0},click:this.dialogButtonClick.bind(this)},{buttonModel:{cssClass:"e-quick-alertcancel e-flat",isPrimary:!1},click:this.dialogButtonClick.bind(this)},{buttonModel:{cssClass:"e-quick-dialog-cancel e-disable e-flat",isPrimary:!1},click:this.dialogButtonClick.bind(this)}];if(this.parent.eventSettings.editFollowingEvents){var n={buttonModel:{cssClass:"e-quick-alertfollowing e-flat",isPrimary:!1},click:this.dialogButtonClick.bind(this)};i.splice(1,0,n)}this.quickDialog=new t.Dialog({animationSettings:{effect:"Zoom"},buttons:i,cssClass:"e-quick-dialog",closeOnEscape:!0,enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeClose:this.beforeQuickDialogClose.bind(this),isModal:!0,position:{X:"center",Y:"center"},showCloseIcon:!0,target:document.body,visible:!1,width:"auto"});var r=(0,e.createElement)("div",{id:this.parent.element.id+"QuickDialog"});this.parent.element.appendChild(r),this.quickDialog.appendTo(r);var a=this.quickDialog.element.querySelector("."+sn);a&&(a.setAttribute("aria-label",this.l10n.getConstant("occurrence")),a.setAttribute("aria-label",a.innerHTML));var s=this.quickDialog.element.querySelector("."+on);s&&(s.setAttribute("aria-label",this.l10n.getConstant("series")),s.setAttribute("aria-label",s.innerHTML)),this.quickDialog.element.querySelector(".e-dlg-closeicon-btn")&&this.quickDialog.element.querySelector(".e-dlg-closeicon-btn").setAttribute("title",this.l10n.getConstant("close"))},i.prototype.renderButton=function(t,i,n,r,a){new Ea.Button({cssClass:t,disabled:n,enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,iconCss:i}).appendTo(r),e.EventHandler.add(r,"click",a,this),(0,e.removeClass)([r],je)},i.prototype.quickDialogClass=function(t){var i=[$i,en,rn,an,pn,Ne],n=this.quickDialog.element.querySelector("."+sn),r=this.quickDialog.element.querySelector("."+on),a=this.quickDialog.element.querySelector("."+ln);switch((0,e.removeClass)([n,r],i),(0,e.addClass)([this.quickDialog.element.querySelector("."+an)],Ne),this.parent.eventSettings.editFollowingEvents&&((0,e.addClass)([a],Ne),(0,e.removeClass)([this.quickDialog.element],nn)),t){case"Recurrence":(0,e.addClass)([n],$i),(0,e.addClass)([r],en),this.parent.eventSettings.editFollowingEvents&&((0,e.removeClass)([a],Ne),(0,e.addClass)([this.quickDialog.element],nn),(0,e.addClass)([a],tn));break;case"Delete":(0,e.addClass)([n],rn),(0,e.addClass)([r],an);break;case"Alert":(0,e.addClass)([n],[sn,pn]),(0,e.addClass)([r],[on,Ne])}},i.prototype.applyFormValidation=function(){var e=this.quickPopup.element.querySelector("."+hn),t={};t[this.parent.eventSettings.fields.subject.name]=this.parent.eventSettings.fields.subject.validation,this.fieldValidator.renderFormValidator(e,t,this.quickPopup.element,this.parent.locale)},i.prototype.openRecurrenceAlert=function(){var e=this.quickDialog.element.querySelector("."+sn);e&&(e.innerHTML=this.l10n.getConstant("Delete"===this.parent.currentAction?"deleteEvent":"editEvent"),e.setAttribute("aria-label",e.innerHTML));var t=this.quickDialog.element.querySelector("."+ln);t&&(t.innerHTML=this.l10n.getConstant("editFollowingEvent"),t.setAttribute("aria-label",t.innerHTML));var i=this.quickDialog.element.querySelector("."+on);i&&(i.innerHTML=this.l10n.getConstant("Delete"===this.parent.currentAction?"deleteSeries":"editSeries"),i.setAttribute("aria-label",i.innerHTML)),this.quickDialog.content=this.l10n.getConstant("editContent"),this.quickDialog.header=this.l10n.getConstant("Delete"===this.parent.currentAction?"deleteTitle":"editTitle"),this.quickDialogClass("Recurrence"),this.showQuickDialog("RecurrenceAlert")},i.prototype.openRecurrenceValidationAlert=function(t){this.quickDialogClass("Alert");var i=this.quickDialog.element.querySelector("."+sn);i.innerHTML=this.l10n.getConstant("ok"),i.setAttribute("aria-label",i.innerHTML);var n,r=this.quickDialog.element.querySelector("."+on);switch(r.innerHTML=this.l10n.getConstant("cancel"),r.setAttribute("aria-label",r.innerHTML),this.quickDialog.header=this.l10n.getConstant("alert"),t){case"wrongPattern":(0,e.addClass)([r],Ne),this.quickDialog.content=this.l10n.getConstant("wrongPattern");break;case"createError":(0,e.addClass)([r],Ne),this.quickDialog.content=this.l10n.getConstant("createError");break;case"sameDayAlert":(0,e.addClass)([r],Ne),this.quickDialog.content=this.l10n.getConstant("sameDayAlert");break;case"seriesChangeAlert":n=this.quickDialog.element.querySelector("."+an),(0,e.removeClass)([r,n],Ne),this.quickDialog.content=this.l10n.getConstant("seriesChangeAlert"),i.innerHTML=this.l10n.getConstant("yes"),r.innerHTML=this.l10n.getConstant("no"),n.innerHTML=this.l10n.getConstant("cancel");break;case"occurrenceAlert":(0,e.addClass)([r],Ne),this.quickDialog.content=this.l10n.getConstant("occurenceAlert")}(!this.parent.enableRecurrenceValidation&&"wrongPattern"===t||this.parent.enableRecurrenceValidation)&&this.showQuickDialog("RecurrenceValidationAlert")},i.prototype.openDeleteAlert=function(){if(!this.parent.activeViewOptions.readonly){var e=this.quickDialog.element.querySelector("."+sn);e&&(e.innerHTML=this.l10n.getConstant("delete"),e.setAttribute("aria-label",e.innerHTML));var t=this.quickDialog.element.querySelector("."+on);t&&(t.innerHTML=this.l10n.getConstant("cancel"),t.setAttribute("aria-label",t.innerHTML)),this.quickDialog.content=this.parent.activeEventData.event.length>1?this.l10n.getConstant("deleteMultipleContent"):this.l10n.getConstant("deleteContent"),this.quickDialog.header=this.parent.activeEventData.event.length>1?this.l10n.getConstant("deleteMultipleEvent"):this.l10n.getConstant("deleteEvent"),this.quickDialogClass("Delete"),this.showQuickDialog("DeleteAlert")}},i.prototype.openValidationError=function(e,t){this.quickDialog.header=this.l10n.getConstant("alert"),this.quickDialog.content=this.l10n.getConstant(e);var i=this.quickDialog.element.querySelector("."+sn);i&&(i.innerHTML=this.l10n.getConstant("ok"),i.setAttribute("aria-label",i.innerHTML));var n=this.quickDialog.element.querySelector("."+on);n&&(n.innerHTML=this.l10n.getConstant("cancel"),i.setAttribute("aria-label",n.innerHTML)),this.quickDialogClass("Alert"),this.showQuickDialog("ValidationAlert",t)},i.prototype.showQuickDialog=function(t,i){var n=this;this.quickDialog.dataBind();var r={type:t,cancel:!1,element:this.quickDialog.element,data:(0,e.extend)({},i||this.parent.activeEventData.event,null,!0)};this.parent.trigger(D,r,(function(e){e.cancel||n.quickDialog.show()}))},i.prototype.createMoreEventList=function(t,i,n){var r=this,a=this.parent.eventFields,s=(0,e.createElement)("div",{className:Zi}),o=(0,e.createElement)("div",{className:Ji});if(0===t.length)o=(0,e.createElement)("div",{className:Zi,innerHTML:this.l10n.getConstant("emptyContainer")});else for(var l=function(t){var s=t[a.subject]||p.parent.eventSettings.fields.subject.default||p.parent.localeObj.getConstant("addTitle"),l=(0,e.createElement)("div",{className:qt,attrs:{"data-id":""+t[a.id],"data-guid":t.Guid,role:"button",tabindex:"0","aria-disabled":p.parent.eventBase.getReadonlyAttribute(t),"aria-label":p.parent.getAnnouncementString(t)}});t[a.isReadonly]&&(0,e.addClass)([l],"e-read-only");var c=void 0;if((0,e.isNullOrUndefined)(p.parent.activeViewOptions.eventTemplate))l.appendChild((0,e.createElement)("div",{className:vn})),p.parent.sanitize(s,l.firstElementChild);else{var h=p.parent.element.id+"_"+p.parent.activeViewOptions.eventTemplateName+"eventTemplate";c=p.parent.getAppointmentTemplate()(t,p.parent,"eventTemplate",h,!1,void 0,void 0,p.parent.root),(0,e.append)(c,l)}if((0,e.isNullOrUndefined)(n)||l.setAttribute("data-group-index",n),!(0,e.isNullOrUndefined)(t[a.recurrenceRule])){var d=t[a.id]===t[a.recurrenceID]?Si:Ci;l.appendChild((0,e.createElement)("div",{className:je+" "+d}))}var u={data:(0,e.extend)({},t,null,!0),element:l,cancel:!1};p.parent.trigger(y,u,(function(e){if(!e.cancel){o.appendChild(l);var n=r.parent.isAdaptive||"Year"===r.parent.currentView;r.parent.eventBase.wireAppointmentEvents(l,t,n),r.parent.eventBase.applyResourceColor(l,t,"backgroundColor",i)}}))},p=this,c=0,h=t;c<h.length;c++){l(h[c])}return s.appendChild(o),s},i.prototype.tapHoldEventPopup=function(t){var i=(0,e.closest)(t.target,"."+qt);this.parent.selectedElements=[],this.isMultipleEventSelect=!0,this.parent.eventBase.getSelectedEventElements(i),this.parent.activeEventData=this.parent.eventBase.getSelectedEvents();var n=i.getAttribute("data-guid"),r=this.parent.eventBase.getEventByGuid(n);if(!(0,e.isNullOrUndefined)(r)){var a=r[this.parent.eventFields.subject]||this.l10n.getConstant("noTitle"),s='<div class="e-multiple-event-popup"><div class="'+ji+'"><button class="'+Hn+'" title="'+this.l10n.getConstant("close")+'"></button><div class="'+vn+'">'+a+'</div><button class="'+In+'" title="'+this.l10n.getConstant("edit")+'"></button><button class="'+kn+'" title="'+this.l10n.getConstant("delete")+'"></button></div></div>';this.quickPopup.element.innerHTML=s;var o=this.quickPopup.element.querySelector("."+Hn);this.renderButton("e-flat e-round e-small",je+" "+Pn,!1,o,this.closeClick);var l=this.parent.activeViewOptions.readonly||r[this.parent.eventFields.isReadonly],p=!this.parent.eventSettings.allowEditing||l,c=!this.parent.eventSettings.allowDeleting||l,h=this.quickPopup.element.querySelector("."+In);h&&this.renderButton("e-flat e-round e-small",je+" "+Mn,p,h,this.editClick);var d=this.quickPopup.element.querySelector("."+kn);d&&this.renderButton("e-flat e-round e-small",je+" "+Rn,c,d,this.deleteClick),this.beforeQuickPopupOpen(i,this.parent.eventBase.getPageCoordinates(t))}},i.prototype.isCellBlocked=function(e){var t={};if(t[this.parent.eventFields.startTime]=this.parent.activeCellsData.startTime,t[this.parent.eventFields.endTime]=this.parent.activeCellsData.endTime,t[this.parent.eventFields.isAllDay]=this.parent.activeCellsData.isAllDay,this.parent.activeViewOptions.group.resources.length>0){var i=e.element instanceof Array?e.element[0]:e.element,n=parseInt(i.getAttribute("data-group-index"),10);this.parent.resourceBase.setResourceValues(t,isNaN(n)?null:n)}return this.parent.eventBase.isBlockRange(t)},i.prototype.cellClick=function(t){var i=new Date(t.startTime.getTime());if(this.parent.showQuickInfo&&this.parent.eventSettings.allowAdding&&"MonthAgenda"!==this.parent.currentView&&!this.isCellBlocked(t)&&this.parent.isMinMaxDate(new Date(i.setHours(0,0,0,0)))){var n=(0,e.isNullOrUndefined)(t.event)?t.element:t.event.target;if(this.parent.isAdaptive){this.quickPopupHide();var r=this.parent.element.querySelector("."+ui);(0,e.isNullOrUndefined)(r)&&(r=(0,e.createElement)("div",{className:ui,innerHTML:'<div class="e-title">+ '+this.l10n.getConstant("newEvent")+"</div>"}));var a=(0,e.closest)(n,"."+ze+",."+Ue);a&&a.appendChild(r)}else{var s=(0,e.closest)(n,"."+ze+",."+Ue+",."+Qe);if(!(0,e.isNullOrUndefined)(s)&&!n.classList.contains(Ri))if(this.quickPopup.relateTo===s&&this.quickPopup.element.classList.contains(_e)){var o=this.quickPopup.element.querySelector("."+vn);o&&o.focus()}else{this.quickPopup.element&&this.destroyPopupButtons("quickPopup");var l={};l[this.parent.eventFields.startTime]=this.parent.activeCellsData.startTime,l[this.parent.eventFields.endTime]=this.parent.activeCellsData.endTime,l[this.parent.eventFields.isAllDay]=this.parent.activeCellsData.isAllDay;var p=(0,e.createElement)("div",{className:Hi});p.appendChild(this.getPopupHeader("Cell",l)),p.appendChild(this.getPopupContent("Cell",t,l)),p.appendChild(this.getPopupFooter("Cell",l)),this.quickPopup.element.setAttribute("aria-label",this.l10n.getConstant("newEvent"));var c=p.querySelector("."+vn);c&&xa.Input.createInput({element:c,properties:{placeholder:this.l10n.getConstant("addTitle")}}),(0,e.isNullOrUndefined)(this.parent.eventSettings.fields.subject.default)||(c.value=this.parent.eventSettings.fields.subject.default);var h=p.querySelector("."+Hn);h&&this.renderButton("e-flat e-round e-small",je+" "+Pn,!1,h,this.popupClose);var d=p.querySelector("."+Fi);d&&this.renderButton("e-flat","",!1,d,this.detailsClick);var u=p.querySelector("."+Ui);u&&this.renderButton("e-flat e-primary","",this.parent.activeViewOptions.readonly,u,this.saveClick),this.morePopup&&this.morePopup.hide(),this.quickPopup.content=p,this.quickPopup.relateTo=s,this.quickPopup.dataBind(),this.beforeQuickPopupOpen(s,this.parent.eventBase.getPageCoordinates(t.event))}}}else this.quickPopupHide()},i.prototype.isSameEventClick=function(t){if(this.quickPopup.relateTo===(0,e.closest)(t.element,"."+qt)&&this.quickPopup.element.classList.contains(_e)){var i=this.quickPopup.element.querySelector("."+In);if(i&&i.focus(),!this.parent.isAdaptive){var n=this.quickPopup.element.querySelector("."+Bi);n&&n.focus()}return!0}return!1},i.prototype.isQuickTemplate=function(e){return"Both"===this.parent.quickInfoTemplates.templateType||this.parent.quickInfoTemplates.templateType===e},i.prototype.eventClick=function(t){if(this.parent.eventTooltip&&this.parent.eventTooltip.close(),this.parent.showQuickInfo)if(this.parent.isAdaptive&&this.isMultipleEventSelect)this.updateTapHoldEventPopup((0,e.closest)(t.element,"."+qt));else{var i=this.isSameEventClick(t);if(this.parent.selectedElements=[],i)return;this.quickPopup.element&&this.destroyPopupButtons("quickPopup");var n=t.event,r=(0,e.createElement)("div",{className:Pi});r.appendChild(this.getPopupHeader("Event",n)),r.appendChild(this.getPopupContent("Event",t,n)),r.appendChild(this.getPopupFooter("Event",n)),this.quickPopup.element.setAttribute("aria-label",this.l10n.getConstant("editEvent"));var a=this.parent.activeViewOptions.readonly||n[this.parent.eventFields.isReadonly],s=!this.parent.eventSettings.allowEditing||a,o=!this.parent.eventSettings.allowDeleting||a,l=r.querySelector("."+In),p="e-flat e-round e-small";l&&this.renderButton(p,je+" "+Mn,s,l,this.editClick);var c=r.querySelector("."+kn);c&&this.renderButton(p,je+" "+Rn,o,c,this.deleteClick);var h=r.querySelector("."+Hn);h&&this.renderButton(p,je+" "+Pn,!1,h,this.popupClose);var d=r.querySelector("."+Bi);d&&this.renderButton("e-flat e-primary","",s,d,this.editClick);var u=r.querySelector("."+Wi);u&&this.renderButton("e-flat","",o,u,this.deleteClick),this.morePopup&&!(0,e.closest)(t.element,"."+Ji)&&this.morePopup.hide(),this.quickPopup.content=r,this.quickPopup.relateTo=this.parent.isAdaptive?document.body:(0,e.closest)(t.element,"."+qt),this.quickPopup.dataBind(),this.beforeQuickPopupOpen(t.element,this.parent.eventBase.getPageCoordinates(t.originalEvent))}},i.prototype.getPopupHeader=function(t,i){var n=(0,e.createElement)("div",{className:ji});if(this.isQuickTemplate(t)&&this.parent.quickInfoTemplates.header){var r=(0,e.extend)({},i,{elementType:t.toLowerCase()},!0),a=this.parent.element.id,s=[].slice.call(this.parent.getQuickInfoTemplatesHeader()(r,this.parent,"header",a+"_headerTemplate",!1));(0,e.append)([].slice.call(s),n)}else{var o=void 0,l=void 0;switch(t){case"Cell":o='<div class="'+Li+'"><button class="'+Hn+'" title="'+this.l10n.getConstant("close")+'"></button></div>';break;case"Event":l=this.getFormattedString(i),o='<div class="'+Li+'"><button class="'+In+" "+je+'" title="'+this.l10n.getConstant("edit")+'"></button><button class="'+kn+" "+je+'" title="'+this.l10n.getConstant("delete")+'"></button><button class="'+Hn+'" title="'+this.l10n.getConstant("close")+'"></button></div><div class="'+zt+'"><div class="'+vn+" "+zi+'" title="'+(l.eventSubject?l.eventSubject.replaceAll('"',"'"):l.eventSubject)+'"></div></div >'}var p=(0,e.createElement)("div",{innerHTML:o});if("Event"===t){var c=p.querySelector("."+vn);this.parent.sanitize(l.eventSubject,c)}(0,e.append)([].slice.call(p.childNodes),n)}return n},i.prototype.getPopupContent=function(t,i,n){var r=(0,e.createElement)("div",{className:"e-popup-content"});if(this.isQuickTemplate(t)&&this.parent.quickInfoTemplates.content){var a=(0,e.extend)({},n,{elementType:t.toLowerCase()},!0),s=this.parent.element.id,o=[].slice.call(this.parent.getQuickInfoTemplatesContent()(a,this.parent,"content",s+"_contentTemplate",!1));(0,e.append)([].slice.call(o),r)}else{var l=void 0,p=void 0,c=void 0,h=this.getResourceText(i,t.toLowerCase());switch(t){case"Cell":p=this.getFormattedString(n),l='<table class="e-popup-table"><tbody><tr><td><form class="'+hn+'" onsubmit="return false;"><input class="'+vn+' e-field" type="text" name="'+this.parent.eventFields.subject+'" /></form></td></tr><tr><td><div class="'+si+'"><div class="'+Qn+" "+je+'"></div><div class="'+qi+" "+zi+'">'+p.details+"</div></div>"+(this.parent.activeViewOptions.group.resources.length>0?'<div class="'+_n+'"><div class="'+Gn+" "+je+' "></div><div class="'+Xn+" "+zi+'"></div></div>':"")+"</td></tr></tbody></table>";break;case"Event":c=this.getFormattedString(n),l='<div class="'+si+'"><div class="'+Qn+" "+je+'"></div><div class="e-date-time-wrapper '+zi+'"><div class="'+qi+" "+zi+'">'+c.details+"</div>",n[this.parent.eventFields.recurrenceRule]&&(l+='<div class="e-recurrence-summary '+zi+'">'+this.getRecurrenceSummary(n)+"</div>"),l+="</div></div>",n[this.parent.eventFields.location]&&(l+='<div class="'+mn+'"><div class="e-location-icon '+je+'"></div><div class="'+fn+" "+zi+'"></div></div>'),(n[this.parent.eventFields.startTimezone]||n[this.parent.eventFields.endTimezone])&&(l+='<div class="'+un+'"><div class="e-time-zone-icon '+je+'"></div><div class="e-time-zone-details '+zi+'">'+this.getTimezone(n)+"</div></div>"),n[this.parent.eventFields.description]&&(l+='<div class="'+wn+'"><div class="e-description-icon '+je+'"></div><div class="'+Dn+" "+zi+'"></div></div>'),this.parent.resourceCollection.length>0&&(l+='<div class="'+_n+'"><div class="'+Gn+" "+je+'"></div><div class="'+Xn+" "+zi+'"></div></div>')}var d=(0,e.createElement)("div",{innerHTML:l});if(n[this.parent.eventFields.location]){var u=d.querySelector("."+fn);(0,e.isNullOrUndefined)(u)||this.parent.sanitize(n[this.parent.eventFields.location],u)}if(n[this.parent.eventFields.description]){var g=d.querySelector("."+Dn);(0,e.isNullOrUndefined)(g)||this.parent.sanitize(n[this.parent.eventFields.description],g)}if(h){var v=d.querySelector("."+Xn);(0,e.isNullOrUndefined)(v)||this.parent.sanitize(h,v)}(0,e.append)([].slice.call(d.childNodes),r)}return r},i.prototype.getPopupFooter=function(t,i){var n=(0,e.createElement)("div",{className:Ni});if(this.isQuickTemplate(t)&&this.parent.quickInfoTemplates.footer){var r=(0,e.extend)({},i,{elementType:t.toLowerCase()},!0),a=this.parent.element.id,s=[].slice.call(this.parent.getQuickInfoTemplatesFooter()(r,this.parent,"footer",a+"_footerTemplate",!1));(0,e.append)([].slice.call(s),n)}else{var o=void 0;switch(t){case"Cell":o='<button class="'+Fi+" "+zi+'" title="'+this.l10n.getConstant("moreDetails")+'">'+this.l10n.getConstant("moreDetails")+'</button><button class="'+Ui+" "+zi+'" title="'+this.l10n.getConstant("save")+'">'+this.l10n.getConstant("save")+"</button>";break;case"Event":o=this.parent.isAdaptive?"":'<button class="'+Bi+" "+zi+'" title="'+this.l10n.getConstant("edit")+'">'+this.l10n.getConstant("edit")+'</button><button class="'+Wi+" "+zi+'" title="'+this.l10n.getConstant("delete")+'">'+this.l10n.getConstant("delete")+"</button>"}var l=(0,e.createElement)("div",{innerHTML:o});(0,e.append)([].slice.call(l.childNodes),n)}return n},i.prototype.getResourceText=function(t,i){if(0===this.parent.resourceCollection.length)return null;var n="";if(0===this.parent.activeViewOptions.group.resources.length){var r=this.parent.resourceBase.resourceCollection.slice(-1)[0],a=r.dataSource;if("event"===i)for(var s=t.event,o=function(e){var t=s[r.field];if(t instanceof Array){if(t.indexOf(e[r.idField])>-1){var i=t[t.indexOf(e[r.idField])],o=a.filter((function(e){return e[r.idField]===i}))[0];n+=""===n?o[r.textField]:", "+o[r.textField]}}else e[r.idField]===t&&(n=e[r.textField].toString())},l=0,p=a;l<p.length;l++){o(p[l])}else n=a[0][r.textField].toString()}else if("event"===i){s=t.event,a=void 0;for(var c,h=this.parent.resourceBase.resourceCollection.length-1;h>=0;h--)if(a=s[this.parent.resourceBase.resourceCollection[parseInt(h.toString(),10)].field],!(0,e.isNullOrUndefined)(a)){c=this.parent.resourceBase.resourceCollection[parseInt(h.toString(),10)];break}Array.isArray(a)||(a=[a]);var d=[],u=c.dataSource;a.forEach((function(e){var t,i=we(u,c.idField,e);i>-1&&(t=u[parseInt(i.toString(),10)][c.textField]),t&&d.push(t)})),n=d.join(", ")}else{var g=t,v=(0,e.isNullOrUndefined)(g.groupIndex)?0:g.groupIndex,m=this.parent.resourceBase.lastResourceLevel[parseInt(v.toString(),10)];n=m.resourceData[m.resource.textField]}return n},i.prototype.getFormattedString=function(e){var t=this.parent.eventFields,i=e[t.subject]||this.l10n.getConstant("noTitle"),n=e[t.startTime],r=e[t.endTime],a=this.getDateFormat(n,"long"),s=e[t.isAllDay]&&0===r.getHours()&&0===r.getMinutes()?this.getDateFormat(pe(new Date(r.getTime()),-1),"long"):this.getDateFormat(r,"long"),o=this.parent.getTimeString(n),l=this.parent.getTimeString(r),p="",c=r.getDate()!==n.getDate()&&(r.getTime()-n.getTime())/36e5<24?1:0;return e[t.isAllDay]?(p=a+" ("+this.l10n.getConstant("allDay")+")",(Ce(r)-Ce(n))/G>1&&(p+="&nbsp;-&nbsp;"+s+" ("+this.l10n.getConstant("allDay")+")")):p=(Ce(r)-Ce(n))/G>=1||c>0?a+" ("+o+")&nbsp;-&nbsp;"+s+" ("+l+")":a+" ("+o+"&nbsp;-&nbsp;"+l+")",{eventSubject:i,details:p}},i.prototype.moreEventClick=function(t,i,n){var r=this;this.quickPopupHide(!0);var a=this.morePopup.element.querySelector("."+Zi);a&&(0,e.remove)(a);var s=t.date.getTime().toString(),o=(0,e.closest)(t.element,"."+Ri+",."+ze),l=this.parent.globalize.formatDate(t.date,{format:"E",calendar:this.parent.getCalendarMode()});this.morePopup.element.querySelector("."+Xi).innerHTML=xe(l,"single");var p,c=this.morePopup.element.querySelector("."+Qi);c.innerHTML=this.getDateFormat(t.date,"d"),c.setAttribute("data-date",s),c.setAttribute("data-end-date",i.getTime().toString()),(0,e.isNullOrUndefined)(n)||(c.setAttribute("data-group-index",n),p=this.parent.resourceBase.lastResourceLevel[parseInt(n,10)].groupOrder);var h=this.createMoreEventList(t.event,p,n);if(this.morePopup.element.querySelector("."+_i).appendChild(h),(0,e.removeClass)(this.morePopup.element.querySelector("."+Gi).childNodes,$e),se(t.date).getTime()===se(this.parent.getCurrentTime()).getTime()&&(0,e.addClass)(this.morePopup.element.querySelector("."+Gi).childNodes,$e),!this.parent.isAdaptive)if(-1!==this.parent.currentView.indexOf("Timeline")){var d=o.getAttribute("data-group-index"),u=new Date(parseInt(o.getAttribute("data-start-date"),10));u.setHours(u.getHours(),u.getMinutes(),0);var g=u.getTime().toString();if((0,e.isNullOrUndefined)(d))this.morePopup.relateTo=this.parent.element.querySelector("."+Qt+' tbody tr td[data-date="'+g+'"]');else if(this.morePopup.relateTo=this.parent.element.querySelector("."+Qt+' tbody tr td[data-group-index="'+d+'"][data-date="'+g+'"]'),(0,e.isNullOrUndefined)(this.morePopup.relateTo))for(var v=[].slice.call(this.parent.element.querySelectorAll("."+Qt+' tbody tr td[data-group-index="'+d+'"]')),m=0;m<v.length;m++){v[parseInt(m.toString(),10)].getAttribute("data-date")<g&&(this.morePopup.relateTo=v[parseInt(m.toString(),10)])}}else this.morePopup.relateTo=(0,e.closest)(o,"."+ze);this.parent.renderTemplates((function(){var e={type:"EventContainer",cancel:!1,element:r.morePopup.element,data:t};r.parent.trigger(D,e,(function(e){e.cancel||r.morePopup.show()}))}))},i.prototype.saveClick=function(e){this.applyFormValidation(),this.dialogEvent=e,this.isCrudAction=!0,this.quickPopupHide()},i.prototype.detailsClick=function(t){var i=this.quickPopup.element.querySelector("."+vn);i&&""!==i.value&&(0,e.extend)(this.parent.activeCellsData,{subject:i.value}),this.dialogEvent=t,this.isCrudAction=!1,this.fieldValidator.destroyToolTip(),this.quickPopupHide(),this.parent.eventWindow.openEditor(this.parent.activeCellsData,"Add")},i.prototype.editClick=function(t){this.dialogEvent=t,this.quickPopupHide(!0);var i=this.parent.activeEventData.event;this.parent.currentAction="EditSeries",(0,e.isNullOrUndefined)(i[this.parent.eventFields.recurrenceRule])?this.parent.eventWindow.openEditor(i,this.parent.currentAction):(this.parent.currentAction="EditOccurrence",this.openRecurrenceAlert())},i.prototype.deleteClick=function(e){this.dialogEvent=e,this.quickPopupHide(!0),this.parent.currentAction="Delete",this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule]?this.openRecurrenceAlert():this.openDeleteAlert()},i.prototype.updateMoreEventContent=function(){if(!this.morePopup.element.classList.contains("e-popup-close")){var t=this.morePopup.element.querySelector("."+Zi);t&&(0,e.remove)(t);var i,n,r=this.morePopup.element.querySelector("."+Qi),a=new Date(parseInt(r.getAttribute("data-date"),10)),s=new Date(parseInt(r.getAttribute("data-end-date"),10)),o=r.getAttribute("data-group-index");(0,e.isNullOrUndefined)(o)||(n=(i=this.parent.resourceBase.lastResourceLevel[parseInt(o,10)]).groupOrder);var l=this.parent.eventBase.filterEvents(a,s,this.parent.eventsProcessed,i),p=this.createMoreEventList(l,n,o);this.morePopup.element.querySelector("."+_i).appendChild(p)}},i.prototype.closeClick=function(e){this.dialogEvent=e,"Year"===this.parent.currentView&&this.parent.activeCellsData&&this.parent.activeCellsData.element&&this.parent.selectCell(this.parent.activeCellsData.element),this.quickPopupHide(),this.morePopup.hide()},i.prototype.dialogButtonClick=function(e){this.dialogEvent=e,this.quickDialog.hide();var t=e.target,i=this.quickDialog.element.querySelector("."+on),n=this.parent.activeEventData.event;if(t.classList.contains($i))switch(this.parent.currentAction="Delete"===this.parent.currentAction?"DeleteOccurrence":"EditOccurrence",this.parent.currentAction){case"EditOccurrence":this.parent.eventWindow.openEditor(n,this.parent.currentAction);break;case"DeleteOccurrence":this.parent.crudModule.deleteEvent(n,this.parent.currentAction)}else if(t.classList.contains(tn))switch(this.parent.currentAction="Delete"===this.parent.currentAction?"DeleteFollowingEvents":"EditFollowingEvents",this.parent.currentAction){case"EditFollowingEvents":this.parent.eventWindow.openEditor(n,this.parent.currentAction);break;case"DeleteFollowingEvents":this.parent.crudModule.deleteEvent(n,this.parent.currentAction)}else if(t.classList.contains(en))switch(this.parent.currentAction="Delete"===this.parent.currentAction?"DeleteSeries":"EditSeries",this.parent.currentAction){case"EditSeries":this.parent.eventWindow.openEditor(this.parent.eventBase.getParentEvent(n,!0),this.parent.currentAction);break;case"DeleteSeries":this.parent.crudModule.deleteEvent(n,this.parent.currentAction)}else t.classList.contains(rn)?this.parent.crudModule.deleteEvent(n,this.parent.currentAction):!i.classList.contains(Ne)&&(t.classList.contains(sn)||t.classList.contains(on)&&!i.classList.contains(an))&&(this.parent.uiStateValues.isIgnoreOccurrence=t.classList.contains(on),this.parent.eventWindow.eventSave(e,this.l10n.getConstant("ok")))},i.prototype.updateTapHoldEventPopup=function(t){var i=this.parent.eventBase.getSelectedEventElements(t);if(this.parent.activeEventData=this.parent.eventBase.getSelectedEvents(),i.length>0){var n=this.parent.eventBase.getEventByGuid(i[0].getAttribute("data-guid")),r=1===i.length?n[this.parent.eventFields.subject]||this.l10n.getConstant("noTitle"):"("+i.length+")&nbsp;"+this.l10n.getConstant("selectedItems");this.quickPopup.element.querySelector("."+vn).innerHTML=r,i.length>1?(0,e.addClass)([this.quickPopup.element.querySelector("."+Mn)],Nn):(0,e.removeClass)([this.quickPopup.element.querySelector("."+Mn)],Nn)}else this.parent.selectedElements=[],this.quickPopupHide()},i.prototype.getTimezone=function(e){var t="";return t+=e[this.parent.eventFields.startTimezone]||"",t+=""===t?"":" - ",t+=e[this.parent.eventFields.endTimezone]||""},i.prototype.getRecurrenceSummary=function(e){var t=this.parent.eventWindow.getRecurrenceEditorInstance();if(t){var i=t.getRuleSummary(e[this.parent.eventFields.recurrenceRule]);return i.charAt(0).toUpperCase()+i.slice(1)}return""},i.prototype.getDateFormat=function(e,t){return xe(this.parent.globalize.formatDate(e,{skeleton:t,calendar:this.parent.getCalendarMode()}),"single")},i.prototype.getDataFromTarget=function(e){if(e.classList.contains(qt))return this.parent.activeEventData.event;var t={startTime:this.parent.activeCellsData.startTime,endTime:this.parent.activeCellsData.endTime,isAllDay:this.parent.activeCellsData.isAllDay,groupIndex:this.parent.activeCellsData.groupIndex},i=this.parent.activeCellsData;return this.parent.eventWindow.convertToEventData(i,t),t},i.prototype.beforeQuickDialogClose=function(t){var i=this,n={event:t.event||this.dialogEvent,type:(0,e.isNullOrUndefined)(this.parent.activeEventData.event)?"ValidationAlert":(0,e.isNullOrUndefined)(this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule])?"DeleteAlert":"RecurrenceAlert",cancel:!1,data:this.parent.activeEventData.event,element:this.quickDialog.element};this.parent.trigger(b,n,(function(e){e.cancel||i.parent.eventBase.focusElement(!0)}))},i.prototype.beforeQuickPopupOpen=function(i,n){var r=this;this.parent.renderTemplates((function(){var a=r.quickPopup.element.querySelector("."+Pi),s=r.parent.isAdaptive?a?"ViewEventInfo":"EditEventInfo":"QuickInfo",o={type:s,cancel:!1,data:(0,e.extend)({},r.getDataFromTarget(i),null,!0),target:i,element:r.quickPopup.element};r.parent.trigger(D,o,(function(o){if(o.cancel)r.quickPopupHide(),r.destroyPopupButtons("quickPopup"),o.element.classList.contains(_e)&&r.quickPopupClose(),be(r.quickPopup.element),r.isMultipleEventSelect=!1;else{var l=r.quickPopup.element.style.display;if(r.quickPopup.element.style.display="block",r.parent.isAdaptive)r.quickPopup.element.removeAttribute("style"),r.quickPopup.element.style.display="block",r.quickPopup.element.style.height=(0,e.formatUnit)("EditEventInfo"===s?65:window.innerHeight);else{var p=r.parent.virtualScrollModule&&r.parent.virtualScrollModule.isHorizontalScroll&&!(0,e.isNullOrUndefined)((0,e.closest)(i,"."+We)),c=r.parent.element.querySelector("."+Qt+" table");r.quickPopup.offsetX=p&&!r.parent.enableRtl?J(c)+10:10,r.quickPopup.offsetY=r.parent.virtualScrollModule&&!r.parent.virtualScrollModule.isHorizontalScroll?r.quickPopup.offsetY:0,r.quickPopup.collision={X:r.parent.enableRtl?"flip":"none",Y:"fit"},r.quickPopup.position={X:r.parent.enableRtl?"left":"right",Y:r.parent.enableRtl?"bottom":"top"},r.quickPopup.dataBind(),r.quickPopup.refreshPosition(null,!0);var h=(0,t.isCollide)(r.quickPopup.element,r.parent.element);if(h.indexOf(r.parent.enableRtl?"left":"right")>-1)r.quickPopup.offsetX=-i.offsetWidth-10-r.quickPopup.element.offsetWidth,p&&!r.parent.enableRtl&&(r.quickPopup.offsetX=J(c)+r.quickPopup.offsetX),r.quickPopup.dataBind(),r.quickPopup.refreshPosition(null,!0),(0,t.isCollide)(r.quickPopup.element,r.parent.element).indexOf("left")>-1&&(r.quickPopup.position={X:"center",Y:"center"},r.quickPopup.collision={X:"fit",Y:"fit"},r.quickPopup.offsetX=-r.quickPopup.element.offsetWidth/2,r.quickPopup.dataBind());if(r.parent.virtualScrollModule&&!r.parent.virtualScrollModule.isHorizontalScroll&&(h.indexOf("top")>-1||h.indexOf("bottom")>-1)){var d=Z(c);r.quickPopup.offsetY=d,r.quickPopup.dataBind(),r.quickPopup.refreshPosition(null,!0)}if("center"===r.quickPopup.position.X&&"center"===r.quickPopup.position.Y&&!(0,e.isNullOrUndefined)(n)&&n.clientX&&n.clientY){var u=n.clientX,g=n.clientY,v=i.getBoundingClientRect(),m=n.offsetY||Math.ceil(g-v.y),f=r.quickPopup.offsetY,y=(0,t.isCollide)(r.quickPopup.element,i),T=r.quickPopup.element.getBoundingClientRect(),w=document.elementFromPoint(u,g);(y.indexOf("top")>-1||y.indexOf("bottom")>-1||(0,e.closest)(w,"."+Fn))&&(T.top<=g&&g<=T.top+T.height?(r.quickPopup.offsetY=f-T.height-10,r.quickPopup.dataBind(),(y=(0,t.isCollide)(r.quickPopup.element,r.parent.element)).indexOf("top")>-1&&(r.quickPopup.offsetY=f+m+10,r.quickPopup.dataBind())):(0,t.isCollide)(r.quickPopup.element,r.parent.element).indexOf("bottom")>-1&&(r.quickPopup.offsetY=f-m-Math.ceil(T.height)-10,r.quickPopup.dataBind()))}}a&&r.applyEventColor(),r.quickPopup.element.style.display=l,r.quickPopup.dataBind(),r.quickPopup.show()}}))}))},i.prototype.applyEventColor=function(){var e="";e="Agenda"===this.parent.currentView||"MonthAgenda"===this.parent.currentView?this.parent.enableRtl?"border-right-color":"border-left-color":"background-color";var t=this.parent.activeEventData.element.style[e];if(""!==t){var i=this.quickPopup.element.querySelector("."+ji),n=this.quickPopup.element.querySelector("."+Ni);n&&n.offsetParent&&(i=this.quickPopup.element.querySelector("."+vn))&&(i.style.borderLeftColor=t,t="rgba("+t.match(/\d+/g).join()+",0.3)"),i&&(i.style.backgroundColor=t)}},i.prototype.quickPopupOpen=function(){if(this.parent.isAdaptive)this.quickPopup.element.style.top="0px";else if(this.quickPopup.element.querySelector("."+Hi)){var e=this.quickPopup.element.querySelector("."+vn);e&&e.focus()}else{var t=this.quickPopup.element.querySelector("."+Bi);t&&t.focus();var i=this.quickPopup.element.querySelector("."+In);i&&i.focus()}},i.prototype.quickPopupClose=function(){this.parent.eventBase.focusElement(),this.quickPopup.relateTo="."+ze,this.fieldValidator.destroyToolTip(),this.quickPopup.element.querySelectorAll(".e-formvalidator").length&&this.fieldValidator.destroy(),this.destroyPopupButtons("quickPopup"),be(this.quickPopup.element)},i.prototype.morePopupOpen=function(){if(this.parent.isAdaptive)return this.morePopup.element.style.top="0px",this.morePopup.element.style.left="0px",void(this.morePopup.element.style.height=(0,e.formatUnit)(window.innerHeight));this.morePopup.element.querySelector("."+Qi).focus(),this.morePopup.refreshPosition()},i.prototype.morePopupClose=function(){var t=this.parent.element.querySelector("."+Ji);t&&(0,e.remove)(t)},i.prototype.popupClose=function(e){this.dialogEvent=e,this.isCrudAction=!1,this.quickPopupHide(!0)},i.prototype.quickPopupHide=function(e){var t=this;if(this.quickPopup.element.classList.contains(_e)){var i,n=this.quickPopup.element.querySelector("."+Hi);if(n){var r=this.quickPopup.element.querySelector(".e-formvalidator");if(this.isCrudAction&&r&&!r.ej2_instances[0].validate())return;var a=this.parent.eventFields,s=this.parent.eventWindow.getObjectFromFormData(Fn);this.parent.eventWindow.setDefaultValueToObject(s),s[a.id]=this.parent.eventBase.getEventMaxID(),s[a.startTime]=this.parent.activeCellsData.startTime,s[a.endTime]=this.parent.activeCellsData.endTime,s[a.isAllDay]=this.parent.activeCellsData.isAllDay,this.parent.resourceBase&&this.parent.resourceBase.setResourceValues(s),i=s}else i=this.parent.activeEventData.event;var o=this.quickPopup.element.querySelector("."+Pi),l={event:this.dialogEvent,type:this.parent.isAdaptive?o?"ViewEventInfo":"EditEventInfo":"QuickInfo",cancel:!1,data:i,element:this.quickPopup.element,target:n?this.parent.activeCellsData.element:this.parent.activeEventData.element};this.parent.trigger(b,l,(function(i){if(!i.cancel&&t.quickPopup.element.classList.contains("e-popup-open")){if(n&&t.isCrudAction&&(t.parent.currentAction="Add",t.parent.crudModule.addEvent(i.data)),e){var r=t.quickPopup.hideAnimation;t.quickPopup.hideAnimation=null,t.quickPopup.hide(),t.quickPopup.hideAnimation=r}else t.quickPopup.hide();t.isMultipleEventSelect=!1,t.isCrudAction=!1}}))}},i.prototype.navigationClick=function(t){var i=(0,e.closest)(t.target,"."+ni);if(!(0,e.isNullOrUndefined)(i)){var n=this.parent.getDateFromElement(t.currentTarget);(0,e.isNullOrUndefined)(n)||(this.closeClick(t),this.parent.setProperties({selectedDate:n},!0),this.parent.changeView(this.parent.getNavigateView(),t))}},i.prototype.documentClick=function(t){var i=t.event.target,n="."+Fn+",."+Qe+",."+Ue+",."+ze+",."+qt+",.e-popup",r=this.parent.element.querySelector("."+Fn);(r&&r.childElementCount>0&&!(0,e.closest)(i,n)||!(0,e.closest)(i,n))&&(this.quickPopupHide(),this.parent.removeNewEventElement());var a=this.parent.element.querySelector("."+ir);a&&a!==i&&this.parent.allowInline&&this.parent.inlineModule.documentClick(),(0,e.closest)(i,"."+qt+",."+Qe)&&this.parent.removeNewEventElement(),(0,e.closest)(i,"."+Yi)||!i.classList||i.classList.contains(Ri)||(0,e.closest)(i,"."+_e)||(0,e.closest)(i,"."+ze)||this.morePopup.hide()},i.prototype.onClosePopup=function(t){(0,e.isNullOrUndefined)(t)||(this.dialogEvent=t),this.quickPopupHide(),((0,e.isNullOrUndefined)(t)||!(0,e.isNullOrUndefined)(t)&&"escape"!==t.action||this.parent.inlineModule&&this.parent.element.querySelector("."+nr))&&this.parent.eventBase.focusElement()},i.prototype.addEventListener=function(){this.parent.on(r,this.cellClick,this),this.parent.on(m,this.eventClick,this),this.parent.on(W,this.documentClick,this),this.parent.on(j,this.updateMoreEventContent,this)},i.prototype.removeEventListener=function(){this.parent.off(r,this.cellClick),this.parent.off(m,this.eventClick),this.parent.off(W,this.documentClick),this.parent.off(j,this.updateMoreEventContent)},i.prototype.destroyPopupButtons=function(e){for(var t="quickPopup"===e?this.quickPopup:this.morePopup,i=0,n=[].slice.call(t.element.querySelectorAll(".e-control.e-btn"));i<n.length;i++){var r=n[i].ej2_instances[0];r&&r.destroy()}if("quickPopup"===e){var a=t.element.querySelector("input."+vn);a&&a.remove();var s=this.quickPopup.element.querySelector("form."+hn);s&&(be(s),s.remove()),this.parent.resetTemplates(["content","header","footer"])}},i.prototype.refreshQuickDialog=function(){this.destroyQuickDialog(),this.renderQuickDialog()},i.prototype.refreshQuickPopup=function(){this.destroyQuickPopup(),this.renderQuickPopup()},i.prototype.refreshMorePopup=function(){this.destroyMorePopup(),this.renderMorePopup()},i.prototype.destroyQuickDialog=function(){this.quickDialog.element&&(this.quickDialog.destroy(),(0,e.remove)(this.quickDialog.element),this.quickDialog=null)},i.prototype.destroyQuickPopup=function(){this.quickPopup.element&&(this.destroyPopupButtons("quickPopup"),this.quickPopup.destroy(),(0,e.remove)(this.quickPopup.element),this.quickPopup=null)},i.prototype.destroyMorePopup=function(){this.morePopup.element&&(this.destroyPopupButtons("morePopup"),this.morePopup.destroy(),(0,e.remove)(this.morePopup.element),this.morePopup=null)},i.prototype.destroy=function(){this.quickPopup.element.querySelectorAll(".e-formvalidator").length&&this.fieldValidator.destroy(),this.removeEventListener(),this.destroyQuickPopup(),this.destroyMorePopup(),this.destroyQuickDialog(),this.dialogEvent=null,this.parent=null,this.l10n=null,this.isCrudAction=null,this.fieldValidator=null,this.isMultipleEventSelect=null},i}(),Ia=function(){function i(e){this.parent=e,this.tooltipObj=new t.Tooltip({animation:{close:{effect:"FadeOut"}},content:"No title",position:"BottomRight",offsetY:10,mouseTrail:!this.parent.isAdaptive,showTipPointer:!1,cssClass:this.parent.cssClass+" e-schedule-event-tooltip",target:this.getTargets(),beforeRender:this.onBeforeRender.bind(this),beforeClose:this.onTooltipClose.bind(this),enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer}),this.tooltipObj.appendTo(this.parent.element)}return i.prototype.getTargets=function(){var e=[];return this.parent.activeViewOptions.group.headerTooltipTemplate&&e.push("."+mt),this.parent.eventSettings.enableTooltip&&e.push("."+qt),e.join(",")},i.prototype.onBeforeRender=function(t){if((0,e.isNullOrUndefined)(t.target.getAttribute("data-tooltip-id"))){if(t.target.classList.contains(mt)&&this.parent.activeViewOptions.group.resources.length>0){var i=void 0;if(this.parent.activeView.isTimelineView()){var n=parseInt(t.target.getAttribute("data-group-index"),10);i=this.parent.resourceBase.lastResourceLevel[parseInt(n.toString(),10)]}else{var r=t.target.parentNode.sectionRowIndex,a=t.target.cellIndex;i=this.parent.activeView.getColumnLevels()[parseInt(r.toString(),10)][parseInt(a.toString(),10)]}var s={resource:i.resource,resourceData:i.resourceData},o=(0,e.createElement)("div"),l=this.parent.element.id+"_headerTooltipTemplate",p=[].slice.call(this.parent.getHeaderTooltipTemplate()(s,this.parent,"headerTooltipTemplate",l,!1));return(0,e.append)(p,o),this.setContent(o),void this.parent.renderTemplates()}var c=this.parent.eventBase.getEventByGuid(t.target.getAttribute("data-guid"));if(!(0,e.isNullOrUndefined)(c)){if((0,e.isNullOrUndefined)(this.parent.eventSettings.tooltipTemplate)){var h=this.parent.globalize,d=this.parent.eventFields,u=new Date(""+c[d.startTime]),g=new Date(""+c[d.endTime]);g=0===g.getHours()&&0===g.getMinutes()?new Date(g.setMilliseconds(-1e3)):g;var v=se(new Date(""+u)),m=se(new Date(""+g)),f=c[d.subject]||this.parent.eventSettings.fields.subject.default||this.parent.localeObj.getConstant("addTitle"),y=(0,e.isNullOrUndefined)(c[d.location])?"":c[d.location],T="",w="",D="";T=h.formatDate(u,{type:"date",skeleton:"MMMd",calendar:this.parent.getCalendarMode()}),w=h.formatDate(u,{type:"date",skeleton:"medium",calendar:this.parent.getCalendarMode()}),D=h.formatDate(g,{type:"date",skeleton:"medium",calendar:this.parent.getCalendarMode()}),T=xe(T,"single"),w=xe(w,"single"),D=xe(D,"single");var b=this.parent.getTimeString(u),S=this.parent.getTimeString(g),C='<div><div class="e-subject">'+f+'</div><div class="e-location">'+y+'</div><div class="e-details">'+(v.getTime()===m.getTime()?xe(h.formatDate(u,{type:"date",skeleton:"long",calendar:this.parent.getCalendarMode()}),"single"):v.getFullYear()===m.getFullYear()?T+" - "+D:w+" - "+D)+'</div><div class="e-all-day">'+(c[d.isAllDay]?this.parent.localeObj.getConstant("allDay"):b+" - "+S)+"</div></div>";this.setContent((0,e.initializeCSPTemplate)((function(){return C})))}else{o=(0,e.createElement)("div"),l=this.parent.element.id+"_tooltipTemplate",p=[].slice.call(this.parent.getEventTooltipTemplate()(c,this.parent,"tooltipTemplate",l,!1));(0,e.append)(p,o),this.setContent(o)}this.parent.renderTemplates()}}},i.prototype.onTooltipClose=function(t){t.element&&((0,e.removeClass)([t.element],_e),(0,e.addClass)([t.element],"e-popup-close")),this.parent.resetTemplates(["tooltipTemplate","headerTooltipTemplate"])},i.prototype.setContent=function(e){this.tooltipObj.setProperties({content:e},!0)},i.prototype.close=function(){this.tooltipObj.close()},i.prototype.destroy=function(){this.tooltipObj.destroy(),(0,e.addClass)([this.parent.element],"e-control"),this.tooltipObj=null,this.parent=null},i}(),Ma=d(778),ka=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ra=function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},Ha="e-input-wrapper",Pa="e-input-wrapper-side",ja="e-repeat-element",La="e-repeat-interval",Na="e-interval",qa="e-days",Fa="e-non-week",Ua="e-year-expander",Ba="e-year-expander-element",Wa="e-month-expander",za="e-month-expander-element",Ya="e-month-expander-checkbox-wrapper",_a="e-form-left",Ga="e-form-right",Xa="e-month-day",Qa="e-month-expander-wrapper",Ka="e-month-pos",Za="e-month-week",Ja="e-end-on",$a="e-end-on-element",es="e-end-on-date",ts="e-until-date",is="e-end-on-count",ns="e-recurrence-count",rs="e-hide-recurrence-element",as="e-rtl",ss="e-primary",os="e-active",ls="e-recurrence-table",ps="e-repeat-content",cs="none",hs="daily",ds="weekly",us="monthly",gs="yearly",vs="never",ms="until",fs="count",ys="text",Ts="value",ws="repeat",Ds="BYDAY",bs="DAILY",Ss="WEEKLY",Cs="MONTHLY",Os="YEARLY",Es="SU",xs="MO",Vs="TU",As="WE",Is="TH",Ms="FR",ks="SA",Rs="=",Hs=";",Ps={none:"",daily:"days",weekly:"weeks",monthly:"months",yearly:"years"},js={sun:Es,mon:xs,tue:Vs,wed:As,thu:Is,fri:Ms,sat:ks},Ls=[qa,Fa,Ja,Na,Ua,Wa],Ns=[Fa],qs=[qa,Ua],Fs=[qa],Us=[qa,Fa,Ua,Wa],Bs=[es,is],Ws=[es],zs=[is],Ys=function(t){function i(e,i){var n=t.call(this,e,i)||this;return n.defaultLocale={none:"None",daily:"Daily",weekly:"Weekly",monthly:"Monthly",month:"Month",yearly:"Yearly",never:"Never",until:"Until",count:"Count",first:"First",second:"Second",third:"Third",fourth:"Fourth",last:"Last",repeat:"Repeat",repeatEvery:"Repeat every",on:"Repeat On",end:"End",onDay:"Day",days:"Day(s)",weeks:"Week(s)",months:"Month(s)",years:"Year(s)",every:"every",summaryTimes:"time(s)",summaryOn:"on",summaryUntil:"until",summaryRepeat:"Repeats",summaryDay:"day(s)",summaryWeek:"week(s)",summaryMonth:"month(s)",summaryYear:"year(s)",monthWeek:"Month Week",monthPosition:"Month Position",monthExpander:"Month Expander",yearExpander:"Year Expander",repeatInterval:"Repeat Interval"},n.renderStatus=!1,n.dayButtons=[],n.monthButtons=[],n}return ka(i,t),i.prototype.startState=function(e,t,i){this.showFormElement(),this.updateForm(e),this.freshOnEndForm(),this.updateEndOnForm(t),this.selectMonthDay(i),this.updateUntilDate(i),this.onMonthDay.setProperties({checked:!0})},i.prototype.preRender=function(){this.localeObj=new e.L10n(this.getModuleName(),this.defaultLocale,this.locale),this.calendarUtil=Gr(this.calendarMode)},i.prototype.applyCustomClass=function(t){t&&(0,e.addClass)([this.element],t.split(" "))},i.prototype.initialize=function(){(0,e.addClass)([this.element],"e-"+this.getModuleName()),this.renderComponent(),(0,e.isNullOrUndefined)(this.value)||""===this.value?((0,e.isNullOrUndefined)(this.repeatType.value)||(this.startState(this.repeatType.value.toString().toUpperCase(),this.endTypes[0],this.startDate),this.updateForm(this.repeatType.value.toString())),this.selectedType>0&&this.setProperties({value:this.getRecurrenceRule()},!1)):this.setRecurrenceRule(this.value),this.applyCustomClass(this.cssClass)},i.prototype.triggerChangeEvent=function(){var e=this;if(this.renderStatus){var t=this.getRecurrenceRule();this.trigger("change",{value:t},(function(t){return e.setProperties({value:t.value},!1)}))}},i.prototype.resetDayButton=function(){[].slice.call(this.element.querySelectorAll("."+qa+" button")).forEach((function(t){return(0,e.removeClass)([t],[os,ss])}))},i.prototype.daySelection=function(t){this.resetDayButton();var i=[0,1,2,3,4,5,6];this.rotateArray(i,this.firstDayOfWeek);var n=this.element.querySelector("."+qa+' button[data-index="'+i.indexOf(t)+'"]');n&&(0,e.addClass)([n],[os,ss])},i.prototype.rtlClass=function(t){t?(0,e.addClass)([this.element],as):(0,e.removeClass)([this.element],as)},i.prototype.updateUntilDate=function(e){var t=new Date(e.getTime());t.setDate(t.getDate()+60),this.untilDateObj.setProperties({value:t})},i.prototype.selectMonthDay=function(e){var t=["sun","mon","tue","wed","thu","fri","sat"];this.monthDate.setProperties({value:this.calendarUtil.getDate(e)}),this.monthWeekDays.setProperties({value:js[t[e.getDay()]]}),this.monthValue.setProperties({value:""+this.calendarUtil.getMonth(e)}),this.monthWeekPos.setProperties({value:this.getDayPosition(e)}),this.daySelection(e.getDay())},i.prototype.updateForm=function(t){var i=this;this.repeatType.setProperties({value:t});var n=this.element.querySelector("."+Ja);switch(t===hs?(0,e.classList)(n,[_a],[Ga]):(0,e.classList)(n,[Ga],[_a]),t){case cs:Ls.forEach((function(t){return(0,e.addClass)([i.element.querySelector("."+t)],rs)}));break;case ds:Ns.forEach((function(t){return(0,e.addClass)([i.element.querySelector("."+t)],rs)}));break;case us:qs.forEach((function(t){return(0,e.addClass)([i.element.querySelector("."+t)],rs)}));break;case gs:Fs.forEach((function(t){return(0,e.addClass)([i.element.querySelector("."+t)],rs)}));break;case hs:Us.forEach((function(t){return(0,e.addClass)([i.element.querySelector("."+t)],rs)}))}},i.prototype.updateEndOnForm=function(t){var i=this;switch(this.endType.setProperties({value:t}),t){case vs:Bs.forEach((function(t){return(0,e.addClass)([i.element.querySelector("."+t)],rs)}));break;case ms:zs.forEach((function(t){return(0,e.addClass)([i.element.querySelector("."+t)],rs)}));break;case fs:Ws.forEach((function(t){return(0,e.addClass)([i.element.querySelector("."+t)],rs)}))}},i.prototype.freshOnEndForm=function(){var t=this;Bs.forEach((function(i){var n=t.element.querySelector("."+i);n&&(0,e.removeClass)([n],rs)}))},i.prototype.showFormElement=function(){var t=this;Ls.forEach((function(i){var n=t.element.querySelector("."+i);n&&(0,e.removeClass)([n],rs)}))},i.prototype.renderDropdowns=function(){var e=this,t=this;this.repeatType=new Ma.DropDownList({dataSource:this.getRepeatData(),floatLabelType:"Always",enableRtl:this.enableRtl,index:this.selectedType,fields:{text:ys,value:Ts},placeholder:this.localeObj.getConstant(ws),htmlAttributes:{title:this.localeObj.getConstant(ws)},change:function(i){t.setProperties({selectedType:e.frequencies.indexOf(i.value)},!1),t.element.querySelector("."+ps).innerHTML=t.localeObj.getConstant(Ps[i.value]),t.showFormElement(),t.updateForm(i.value),t.resetFormValues(),t.triggerChangeEvent()}}),this.repeatType.appendTo(this.element.querySelector("."+ja)),this.endType=new Ma.DropDownList({dataSource:this.getEndData(),popupWidth:this.getPopupWidth(),floatLabelType:"Always",placeholder:this.localeObj.getConstant("end"),enableRtl:this.enableRtl,index:1,fields:{text:ys,value:Ts},change:function(e){t.freshOnEndForm(),t.updateEndOnForm(e.value),t.resetFormValues(),t.triggerChangeEvent()}}),this.endType.appendTo(this.element.querySelector("."+$a));var i=function(i){return new Ma.DropDownList({dataSource:i,popupWidth:e.getPopupWidth(),enableRtl:e.enableRtl,fields:{text:ys,value:Ts},index:1,change:function(e){t.onWeekDay.setProperties({checked:!0}),t.resetFormValues(),t.triggerChangeEvent()}})};this.monthWeekPos=i(this.getMonthPosData()),this.monthWeekPos.appendTo(this.element.querySelector("."+Ka)),this.monthWeekDays=i(this.getDayData("wide")),this.monthWeekDays.appendTo(this.element.querySelector("."+Za)),this.monthValue=new Ma.DropDownList({dataSource:this.getMonthData(),fields:{text:ys,value:Ts},enableRtl:this.enableRtl,index:7,change:function(e){t.resetFormValues(),t.triggerChangeEvent()}}),this.monthValue.appendTo(this.element.querySelector("."+Ba))},i.prototype.setDefaultValue=function(){for(var e=0,t=[].slice.call(this.element.querySelectorAll(".e-control .e-numerictextbox"));e<t.length;e++){var i=t[e].ej2_instances[0];i.element.classList.contains(La)?(i.value=1,i.dataBind()):i.element.classList.contains(ns)&&(i.value=10,i.dataBind())}},i.prototype.resetFormValues=function(){for(var e=0,t=[].slice.call(this.element.querySelectorAll('.e-control [type="text"]'));e<t.length;e++){var i=t[e],n=void 0;if(i.classList.contains("e-datepicker"))(n=i.ej2_instances[0]).value?(n.value=n.value,n.dataBind()):this.updateUntilDate(this.startDate);else if(i.classList.contains("e-dropdownlist"))(n=i.ej2_instances[0]).index=n.index||0,n.dataBind();else if(i.classList.contains("e-numerictextbox")){var r=void 0;r=(n=i.ej2_instances[0]).element.classList.contains(La)?1:n.element.classList.contains(ns)?10:this.startDate.getDate(),n.value=n.value||r,n.dataBind()}}},i.prototype.getPopupWidth=function(){return e.Browser.isDevice?"100%":"auto"},i.prototype.renderDatePickers=function(){var t=this;this.untilDateObj=new n.DatePicker({firstDayOfWeek:this.firstDayOfWeek,enableRtl:this.enableRtl,locale:this.locale,min:this.minDate,max:this.maxDate,format:(0,e.isNullOrUndefined)(this.dateFormat)?this.getFormat("dateFormats"):this.dateFormat,change:function(e){e.value&&t.triggerChangeEvent()}}),this.untilDateObj.appendTo(this.element.querySelector("."+ts))},i.prototype.getFormat=function(t){return"en"===this.locale||"en-US"===this.locale?(0,e.getValue)(t+".short",(0,e.getDefaultDateObject)(this.getCalendarMode())):(0,e.getValue)("main."+this.locale+".dates.calendars."+this.getCalendarMode()+"."+t+".short",e.cldrData)},i.prototype.dayButtonRender=function(){for(var t=this,i=[].slice.call(this.element.querySelectorAll("."+qa+" button")),n=this,r=0,a=i;r<a.length;r++){var s=a[r],o=new Ea.Button({isToggle:!0,enableRtl:this.enableRtl},s);this.dayButtons.push(o),e.EventHandler.add(s,"click",(function(i){var r=[].slice.call(t.element.querySelectorAll("."+qa+" button."+ss)),a=i.target;a.classList.contains(ss)?r.length>1&&((0,e.removeClass)([a],ss),n.triggerChangeEvent()):((0,e.addClass)([a],ss),n.triggerChangeEvent())}))}},i.prototype.radioButtonRender=function(){var e=this;this.onMonthDay=new Ea.RadioButton({label:this.localeObj.getConstant("onDay"),enableRtl:this.enableRtl,name:"monthType",value:"day",change:function(){e.resetFormValues(),e.triggerChangeEvent()}}),this.onMonthDay.appendTo(this.element.querySelector("."+za)),this.monthButtons.push(this.onMonthDay),this.onWeekDay=new Ea.RadioButton({label:this.localeObj.getConstant("monthExpander"),cssClass:"e-month-type",name:"monthType",enableRtl:this.enableRtl,value:"daypos",change:function(){e.resetFormValues(),e.triggerChangeEvent()}}),this.onWeekDay.appendTo(this.element.querySelector("."+Qa)),this.monthButtons.push(this.onWeekDay)},i.prototype.numericTextboxRender=function(){var e=this;this.recurrenceCount=new xa.NumericTextBox({value:10,format:"#",enableRtl:this.enableRtl,min:1,max:999,change:function(){e.triggerChangeEvent()}}),this.recurrenceCount.appendTo(this.element.querySelector("."+ns)),this.monthDate=new xa.NumericTextBox({value:1,format:"#",enableRtl:this.enableRtl,min:1,max:31,change:function(){e.onMonthDay.setProperties({checked:!0}),e.triggerChangeEvent()}}),this.monthDate.appendTo(this.element.querySelector("."+Xa)),this.repeatInterval=new xa.NumericTextBox({value:1,format:"#",min:1,max:999,enableRtl:this.enableRtl,floatLabelType:"Always",placeholder:this.localeObj.getConstant("repeatEvery"),change:function(){e.triggerChangeEvent()}}),this.repeatInterval.appendTo(this.element.querySelector("."+La))},i.prototype.renderComponent=function(){this.setTemplate(),this.renderDropdowns(),this.renderDatePickers(),this.dayButtonRender(),this.radioButtonRender(),this.numericTextboxRender()},i.prototype.rotateArray=function(e,t){for(var i,n=0;n<t;n++)i=e.shift(),e.push(i)},i.prototype.getEndData=function(){var e=this,t=[];return this.endTypes.forEach((function(i){t.push({text:e.localeObj.getConstant(i),value:i})})),t},i.prototype.getDayPosition=function(e){var t=new Date(e.getTime()),i=new Date(e.getTime()),n=e.getDay(),r=[];for(t=this.calendarUtil.getMonthStartDate(t),i=this.calendarUtil.getMonthEndDate(i);t<i;)t.getDay()===n&&r.push(t.getTime()),t.setDate(t.getDate()+1);return r.indexOf(e.getTime())===r.length-1?-1:r.indexOf(e.getTime())+1},i.prototype.getRepeatData=function(){var e=[],t=this;return this.frequencies.forEach((function(i){var n=i===cs?vs:i;e.push({text:t.localeObj.getConstant(n),value:i})})),e},i.prototype.getMonthPosData=function(){var e={first:1,second:2,third:3,fourth:4,last:-1},t=this,i=[];return["first","second","third","fourth","last"].forEach((function(n){i.push({text:t.localeObj.getConstant(n),value:e[""+n]})})),i},i.prototype.getDayData=function(t){var i,n=["sun","mon","tue","wed","thu","fri","sat"],r=[];if(this.rotateArray(n,this.firstDayOfWeek),"en"===this.locale||"en-US"===this.locale){var a="days.stand-alone.";i=(0,e.getValue)(a+t,(0,e.getDefaultDateObject)(this.getCalendarMode()))}else{a="main."+this.locale+".dates.calendars."+this.getCalendarMode()+".days.stand-alone."+t;i=(0,e.getValue)(a,e.cldrData)}for(var s=0,o=n;s<o.length;s++){var l=o[s],p=(0,e.getValue)(l,i);r.push({text:"narrow"===t?p:xe(p,"single"),value:js[""+l]})}return r},i.prototype.getMonthData=function(){var t,i=[];if("en"===this.locale||"en-US"===this.locale){var n="months.stand-alone.wide";t=(0,e.getValue)(n,(0,e.getDefaultDateObject)(this.getCalendarMode()))}else{n="main."+this.locale+".dates.calendars."+this.getCalendarMode()+".months.stand-alone.wide";t=(0,e.getValue)(n,e.cldrData)}for(var r=0,a=Object.keys(t);r<a.length;r++){var s=a[r];i.push({text:xe((0,e.getValue)(s,t),"single"),value:s})}return i},i.prototype.setTemplate=function(){var e=this.getDayData("narrow"),t=this.getDayData("wide");this.element.innerHTML='<div class="e-editor"><div class="'+Ha+" "+_a+'"><input type="text" tabindex="0" class="'+ja+'"label="'+ja.substr(2)+'" /></div><div class="'+Ha+" "+Na+" "+Ga+'"><table class="'+ls+' e-repeat-content-wrapper" role="none"><tr><td><input type="text" tabindex="0" id="'+this.element.id+"_"+La+'" class="'+La+'"title="'+this.localeObj.getConstant("repeatEvery")+'" /></td><td><span class="'+ps+'"></span></td></tr></table></div><div class="'+Pa+" "+qa+" "+_a+'"><div class=e-week-expander-label>'+this.localeObj.getConstant("on")+'</div><button type="button" class="e-round" data-index="0" title="'+t[0].text+'">'+e[0].text+'</button><button type="button" class="e-round" data-index="1" title="'+t[1].text+'">'+e[1].text+'</button><button type="button" class="e-round" data-index="2" title="'+t[2].text+'">'+e[2].text+'</button><button type="button" class="e-round" data-index="3" title="'+t[3].text+'">'+e[3].text+'</button><button type="button" class="e-round" data-index="4" title="'+t[4].text+'">'+e[4].text+'</button><button type="button" class="e-round" data-index="5" title="'+t[5].text+'">'+e[5].text+'</button><button type="button" class="e-round" data-index="6" title="'+t[6].text+'">'+e[6].text+'</button></div><div class="'+Pa+" "+Fa+" "+_a+'"><div class=e-month-expander-label>'+this.localeObj.getConstant("on")+'</div><div class="'+Ua+'"><input class="'+Ba+'" type="text" tabindex="0" title="'+this.localeObj.getConstant("yearExpander")+'"/></div><div class="'+Wa+'"><table class="'+ls+' e-month-expand-wrapper" role="none"><tr><td><div class="'+Ha+" "+Ya+'"><input class="'+za+'"title="'+this.localeObj.getConstant("monthExpander")+'" type="radio"></div></td><td colspan="2"><div class="'+Ha+' e-monthday-element"><input type="text" tabindex="0" id="'+this.element.id+"_"+Xa+'" class="'+Xa+'"title="'+this.localeObj.getConstant("on")+'" /></div></td></tr><tr><td><div class="'+Ha+" "+Ya+'" style="min-width: 30px;margin-bottom:18px;"><input class="'+Qa+'"title="'+this.localeObj.getConstant("monthExpander")+'" type="radio"></div></td><td><div class="'+Ha+' e-week-position" ><input type="text" tabindex="0" class="'+Ka+'"title="'+this.localeObj.getConstant("monthPosition")+'" /></div></td><td><div class="'+Ha+' e-day-position"><input type="text" tabindex="0" class="'+Za+'"title="'+this.localeObj.getConstant("monthWeek")+'" /></div></td></tr></table></div></div><div class="'+Pa+" "+Ja+" "+Ga+'"><div class="'+Ha+' e-end-on-left"><input type="text" tabindex="0" class="'+$a+'"title="'+this.localeObj.getConstant("end")+'" /></div><div class="'+Ha+" "+es+'" ><input type="text" tabindex="0" class="'+ts+'"title="'+this.localeObj.getConstant(ms)+'" /></div><div class="'+Ha+" "+is+'"><input type="text" tabindex="0" id="'+this.element.id+"_"+ns+'" class="'+ns+'"title="'+this.localeObj.getConstant(fs)+'" /></div></div></div></div>'},i.prototype.getSelectedDaysData=function(){var e=Ds+Rs,t=[].slice.call(this.element.querySelectorAll("."+qa+" button."+ss)),i=[Es,xs,Vs,As,Is,Ms,ks];this.rotateArray(i,this.firstDayOfWeek);for(var n=0;n<t.length;n++)e+=i[parseInt(t[parseInt(n.toString(),10)].getAttribute("data-index"),10)]+(n===t.length-1?"":",");return e+Hs},i.prototype.getSelectedMonthData=function(){return this.onWeekDay.checked?Ds+Rs+this.monthWeekDays.value+Hs+"BYSETPOS"+Rs+this.monthWeekPos.value+Hs:"BYMONTHDAY="+this.monthDate.value+Hs},i.prototype.getIntervalData=function(){return"INTERVAL="+this.repeatInterval.value+Hs},i.prototype.getEndOnCount=function(){return"COUNT="+this.recurrenceCount.value+Hs},i.prototype.getYearMonthRuleData=function(){return"BYMONTH="+this.monthValue.value+Hs},i.prototype.updateWeekButton=function(e){var t=[Es,xs,Vs,As,Is,Ms,ks];this.rotateArray(t,this.firstDayOfWeek);for(var i=0,n=this.dayButtons;i<n.length;i++){var r=n[i],a=parseInt(r.element.getAttribute("data-index"),10);-1!==e.indexOf(t[parseInt(a.toString(),10)])?r.setProperties({isPrimary:!0}):r.setProperties({isPrimary:!1})}},i.prototype.updateMonthUI=function(){if(this.ruleObject.monthDay.length)this.monthDate.setProperties({value:this.ruleObject.monthDay[0]}),this.onMonthDay.setProperties({checked:!0});else{this.onWeekDay.setProperties({checked:!0}),this.monthWeekPos.setProperties({value:this.ruleObject.setPosition});for(var e=0,t=Object.keys(js);e<t.length;e++){var i=t[e];if(js[""+i]===this.ruleObject.day[0]){this.monthWeekDays.setProperties({value:this.ruleObject.day[0]});break}}}},i.prototype.updateUI=function(e,t){switch(this.repeatInterval.setProperties({value:this.ruleObject.interval}),t){case ms:this.untilDateObj.setProperties({value:this.ruleObject.until});break;case fs:this.recurrenceCount.setProperties({value:this.ruleObject.count})}switch(e){case ds:this.updateWeekButton(this.ruleObject.day);break;case gs:this.monthValue.setProperties({index:this.ruleObject.month[0]-1}),this.updateMonthUI();break;case us:this.updateMonthUI()}},i.prototype.getUntilData=function(){return this.untilDateObj.value?"UNTIL="+va(this.untilDateObj.value)+Hs:""},i.prototype.destroyComponents=function(){this.recurrenceCount.isDestroyed||(this.recurrenceCount.destroy(),this.recurrenceCount=null),this.monthDate.isDestroyed||(this.monthDate.destroy(),this.monthDate=null),this.repeatInterval.isDestroyed||(this.repeatInterval.destroy(),this.repeatInterval=null),this.untilDateObj.isDestroyed||(this.untilDateObj.destroy(),this.untilDateObj=null),this.repeatType.isDestroyed||(this.repeatType.destroy(),this.repeatType=null),this.endType.isDestroyed||(this.endType.destroy(),this.endType=null),this.monthWeekPos.isDestroyed||(this.monthWeekPos.destroy(),this.monthWeekPos=null),this.monthWeekDays.isDestroyed||(this.monthWeekDays.destroy(),this.monthWeekDays=null),this.monthValue.isDestroyed||(this.monthValue.destroy(),this.monthValue=null),this.onMonthDay.isDestroyed||(this.onMonthDay.destroy(),this.onMonthDay=null),this.onWeekDay.isDestroyed||(this.onWeekDay.destroy(),this.onWeekDay=null),this.dayButtons.forEach((function(e){e.isDestroyed||e.destroy()})),this.dayButtons=[],this.monthButtons.forEach((function(e){e.isDestroyed||e.destroy()})),this.monthButtons=[]},i.prototype.resetFields=function(){this.startState(cs,this.endTypes[0],this.startDate),this.setDefaultValue()},i.prototype.updateRuleUntilDate=function(e){if(this.untilDateObj.value&&e){var t=this.untilDateObj.value,i=new Date(t.getFullYear(),t.getMonth(),t.getDate(),e.getHours(),e.getMinutes(),e.getMilliseconds());this.untilDateObj.setProperties({value:i})}},i.prototype.getCalendarMode=function(){return(0,e.isNullOrUndefined)(this.calendarMode)?"gregorian":this.calendarMode.toLowerCase()},i.prototype.getRuleSummary=function(e){return void 0===e&&(e=this.getRecurrenceRule()),yr(e,this.localeObj,this.locale,this.calendarMode)},i.prototype.getRecurrenceDates=function(t,i,n,r,a){return a=(0,e.isNullOrUndefined)(a)?this.startDate:a,wr(t,i,n,this.firstDayOfWeek,r,a,this.calendarMode)},i.prototype.getRecurrenceRule=function(){var e="FREQ=";switch(this.repeatType.value){case hs:e+=bs+Hs;break;case ds:e+=Ss+Hs+this.getSelectedDaysData();break;case us:e+=Cs+Hs+this.getSelectedMonthData();break;case gs:e+=Os+Hs+this.getSelectedMonthData()+this.getYearMonthRuleData();break;case cs:return""}switch(e+=this.getIntervalData(),this.endType.value){case ms:e+=this.getUntilData();break;case fs:e+=this.getEndOnCount()}return e},i.prototype.setRecurrenceRule=function(e,t){if(void 0===t&&(t=this.startDate),e){this.renderStatus=!1,this.ruleObject=Ur(e);var i=this.ruleObject.count?fs:this.ruleObject.until?ms:vs;switch(this.ruleObject.freq){case bs:this.startState(hs,i,t),this.updateUI(hs,i);break;case Ss:this.startState(ds,i,t),this.updateUI(ds,i);break;case Cs:this.startState(us,i,t),this.updateUI(us,i);break;case Os:this.startState(gs,i,t),this.updateUI(gs,i)}this.renderStatus=!0,this.triggerChangeEvent()}else this.repeatType.setProperties({value:cs})},i.prototype.detachInputs=function(){for(var t=0,i=[].slice.call(this.element.querySelectorAll("input"));t<i.length;t++){var n=i[t];(0,e.detach)(n)}},i.prototype.destroy=function(){if(!this.isDestroyed){this.destroyComponents(),t.prototype.destroy.call(this);var i=["e-"+this.getModuleName()];for(this.cssClass&&(i=i.concat(this.cssClass.split(" "))),(0,e.removeClass)([this.element],i),this.detachInputs();this.element.firstElementChild;)this.element.removeChild(this.element.firstElementChild)}},i.prototype.getModuleName=function(){return"recurrenceeditor"},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.render=function(){this.initialize(),this.rtlClass(this.enableRtl),this.renderStatus=!0,this.renderComplete()},i.prototype.onPropertyChanged=function(t,i){for(var n=0,r=Object.keys(t);n<r.length;n++){switch(r[n]){case"startDate":this.selectMonthDay(t.startDate),this.updateUntilDate(t.startDate),this.endType.setProperties({index:0});break;case"enableRtl":this.rtlClass(t.enableRtl);break;case"cssClass":i.cssClass&&(0,e.removeClass)([this.element],i.cssClass.split(" ")),t.cssClass&&(0,e.addClass)([this.element],t.cssClass.split(" "));break;case"selectedType":this.repeatType.setProperties({index:this.selectedType});break;case"minDate":this.untilDateObj.setProperties({minDate:this.minDate});break;case"maxDate":this.untilDateObj.setProperties({maxDate:this.maxDate});break;case"value":this.getRecurrenceRule()!==this.value&&this.setRecurrenceRule(this.value);break;case"calendarMode":this.calendarMode=t.calendarMode,this.calendarUtil=Gr(t.calendarMode);break;case"locale":case"frequencies":case"firstDayOfWeek":case"endTypes":this.refresh();break;case"dateFormat":this.untilDateObj.setProperties({format:t.dateFormat})}}},Ra([(0,e.Property)(["none","daily","weekly","monthly","yearly"])],i.prototype,"frequencies",void 0),Ra([(0,e.Property)(["never","until","count"])],i.prototype,"endTypes",void 0),Ra([(0,e.Property)(0)],i.prototype,"firstDayOfWeek",void 0),Ra([(0,e.Property)(new Date)],i.prototype,"startDate",void 0),Ra([(0,e.Property)()],i.prototype,"dateFormat",void 0),Ra([(0,e.Property)("Gregorian")],i.prototype,"calendarMode",void 0),Ra([(0,e.Property)()],i.prototype,"cssClass",void 0),Ra([(0,e.Property)()],i.prototype,"value",void 0),Ra([(0,e.Property)(new Date(1900,0,1))],i.prototype,"minDate",void 0),Ra([(0,e.Property)(new Date(2099,11,31))],i.prototype,"maxDate",void 0),Ra([(0,e.Property)(0)],i.prototype,"selectedType",void 0),Ra([(0,e.Event)()],i.prototype,"change",void 0),i=Ra([e.NotifyPropertyChanges],i)}(e.Component),_s="e-field",Gs="e-recurrence-container",Xs="e-hide",Qs=function(){function i(e){this.parent=e,this.l10n=this.parent.localeObj,this.fields=this.parent.eventFields,this.eventWindowTime={startTime:new Date,endTime:new Date},this.renderEventWindow()}return i.prototype.renderEventWindow=function(){this.element=(0,e.createElement)("div",{id:this.parent.element.id+"_dialog_wrapper"}),this.parent.element.appendChild(this.element);var i={animationSettings:{effect:"Zoom"},content:this.getEventWindowContent(),cssClass:cn,enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,height:this.parent.isAdaptive?"100%":"auto",minHeight:"300px",isModal:!0,showCloseIcon:!this.parent.isAdaptive,target:document.body,visible:!1,width:"500px",beforeOpen:this.onBeforeOpen.bind(this),beforeClose:this.onBeforeClose.bind(this)};this.parent.isAdaptive?(i.cssClass=cn+" "+Re,this.parent.editorHeaderTemplate||(i.header='<div class="e-title-header"><div class="e-back-icon e-icons"></div><div class="e-title-text">'+this.l10n.getConstant("newEvent")+'</div><div class="e-save-icon e-icons"></div></div>')):(this.parent.editorFooterTemplate||this.renderDialogButtons(i),this.parent.editorHeaderTemplate||(i.header='<div class="e-title-text">'+this.l10n.getConstant("newEvent")+"</div>")),this.dialogObject=new t.Dialog(i,this.element),this.dialogObject.element.querySelector(".e-dlg-closeicon-btn")&&this.dialogObject.element.querySelector(".e-dlg-closeicon-btn").setAttribute("title",this.l10n.getConstant("close")),this.addEventHandlers(),(0,e.addClass)([this.element.parentElement],cn+"-container"),e.EventHandler.add(this.dialogObject.element,"keydown",this.preventEventSave,this),this.applyFormValidation()},i.prototype.renderDialogButtons=function(e){e.buttons=[{buttonModel:{content:this.l10n.getConstant("deleteButton"),cssClass:Wi,disabled:!this.parent.eventSettings.allowDeleting||this.parent.readonly},click:this.eventDelete.bind(this)},{buttonModel:{content:this.l10n.getConstant("saveButton"),cssClass:"e-primary "+xn,isPrimary:!0,disabled:!this.parent.eventSettings.allowAdding||this.parent.readonly},click:this.eventSave.bind(this)},{buttonModel:{cssClass:En,content:this.l10n.getConstant("cancelButton")},click:this.dialogClose.bind(this)}]},i.prototype.addEventHandlers=function(){var t=this.element.querySelector(".e-back-icon"),i=this.element.querySelector("."+On);!this.parent.isAdaptive||(0,e.isNullOrUndefined)(t)||(0,e.isNullOrUndefined)(i)||(e.EventHandler.add(t,"click",this.dialogClose,this),e.EventHandler.add(i,"click",this.eventSave,this))},i.prototype.refresh=function(){this.destroy(!0),this.renderEventWindow()},i.prototype.refreshRecurrenceEditor=function(){if(this.recurrenceEditor){var e=this.recurrenceEditor.element;this.recurrenceEditor.destroy(),this.createRecurrenceEditor(e)}},i.prototype.setRecurrenceEditor=function(e){this.parent.editorTemplate&&(this.recurrenceEditor=e)},i.prototype.openEditor=function(t,i,n,r){if(this.parent.currentAction=i,this.parent.removeNewEventElement(),this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(!0),this.parent.inlineModule.removeInlineAppointmentElement(),"Add"===i){var a={};this.cellClickAction=!n,this.parent.activeCellsData=t;var s=t;this.cellClickAction?this.convertToEventData(s,a):(this.parent.activeCellsData={startTime:s.startTime||s[this.fields.startTime],endTime:s.endTime||s[this.fields.endTime],isAllDay:s.isAllDay||s[this.fields.isAllDay],element:s.element,groupIndex:s.groupIndex},a=s),t=a}switch((0,e.isNullOrUndefined)(this.parent.editorHeaderTemplate)||(this.parent.resetTemplates(["editorHeaderTemplate"]),this.parent.isAdaptive&&!this.parent.editorFooterTemplate?this.dialogObject.header=this.createAdaptiveHeaderElement(t):this.dialogObject.header=this.getDialogHeader(t)),(0,e.isNullOrUndefined)(this.parent.editorFooterTemplate)||(this.parent.resetTemplates(["editorFooterTemplate"]),this.dialogObject.footerTemplate=this.getDialogFooter(t)),(0,e.isNullOrUndefined)(this.parent.editorHeaderTemplate)&&(0,e.isNullOrUndefined)(this.parent.editorFooterTemplate)||(this.dialogObject.dataBind(),this.addEventHandlers()),(0,e.isNullOrUndefined)(this.parent.editorTemplate)||this.renderFormElements(this.element.querySelector(".e-schedule-form"),t),!this.parent.isAdaptive&&(0,e.isNullOrUndefined)(this.parent.editorTemplate)&&(0,e.removeClass)([this.dialogObject.element.querySelector(".e-recurrenceeditor")],Ne),this.recurrenceEditor&&(this.recurrenceEditor.firstDayOfWeek=this.parent.activeViewOptions.firstDayOfWeek),i){case"Add":this.onCellDetailsUpdate(t,r);break;case"Save":case"EditOccurrence":case"EditSeries":case"EditFollowingEvents":"EditOccurrence"===i&&!this.parent.isAdaptive&&(0,e.isNullOrUndefined)(this.parent.editorTemplate)&&(0,e.addClass)([this.dialogObject.element.querySelector(".e-recurrenceeditor")],Ne),this.cellClickAction=!1,this.onEventDetailsUpdate(t)}},i.prototype.setDialogContent=function(){this.dialogObject.content=this.getEventWindowContent(),this.dialogObject.dataBind(),this.applyFormValidation()},i.prototype.setDialogHeader=function(){(0,e.isNullOrUndefined)(this.parent.editorHeaderTemplate)?this.parent.isAdaptive?this.dialogObject.header='<div class="e-title-header"><div class="e-back-icon e-icons"></div><div class="e-title-text">'+this.l10n.getConstant("newEvent")+'</div><div class="e-save-icon e-icons"></div></div>':this.dialogObject.header='<div class="e-title-text">'+this.l10n.getConstant("newEvent")+"</div>":(this.parent.resetTemplates(["editorHeaderTemplate"]),this.parent.isAdaptive&&!this.parent.editorFooterTemplate?this.dialogObject.header=this.createAdaptiveHeaderElement():this.dialogObject.header=this.getDialogHeader()),this.dialogObject.dataBind(),this.addEventHandlers()},i.prototype.setDialogFooter=function(){(0,e.isNullOrUndefined)(this.parent.editorFooterTemplate)?!this.parent.isAdaptive&&(0,e.isNullOrUndefined)(this.parent.editorFooterTemplate)?this.renderDialogButtons(this.dialogObject):this.parent.isAdaptive&&(0,e.isNullOrUndefined)(this.parent.editorFooterTemplate)&&(this.dialogObject.footerTemplate=null):(this.parent.resetTemplates(["editorFooterTemplate"]),this.dialogObject.footerTemplate=this.getDialogFooter()),this.dialogObject.dataBind()},i.prototype.createAdaptiveHeaderElement=function(t){var i=(0,e.createElement)("div",{className:"e-title-header"}),n=(0,e.createElement)("div",{className:"e-back-icon e-icons"});i.appendChild(n);var r=this.getDialogHeader(t);i.appendChild(r);var a=(0,e.createElement)("div",{className:"e-save-icon e-icons"});return i.appendChild(a),i},i.prototype.getDialogHeader=function(t){var i,n=this.parent.element.id+"_editorHeaderTemplate",r=document.createElement("div");return i=[].slice.call(this.parent.getEditorHeaderTemplate()(t||{},this.parent,"editorHeaderTemplate",n,!1)),(0,e.append)(i,r),r},i.prototype.getDialogFooter=function(t){var i,n=this.parent.element.id+"_editorFooterTemplate",r=document.createElement("div");return i=[].slice.call(this.parent.getEditorFooterTemplate()(t||{},this.parent,"editorFooterTemplate",n,!1)),(0,e.append)(i,r),r},i.prototype.preventEventSave=function(e){this.parent&&!this.parent.allowKeyboardInteraction&&"Enter"===e.code&&(this.isEnterKey=!0)},i.prototype.onBeforeOpen=function(t){var i=this,n=this.eventData[this.fields.endTime].getTime(),r={type:"Editor",data:this.eventData,cancel:!1,element:this.element,target:this.cellClickAction?this.parent.activeCellsData.element:this.parent.activeEventData.element};this.cellClickAction&&(r.duration=this.getSlotDuration());var a=this.getInstance(xn);a&&(a.disabled=!(this.cellClickAction?this.parent.eventSettings.allowAdding:this.parent.eventSettings.allowEditing),a.dataBind());var s=this.getInstance(Wi);s&&(s.disabled=!this.parent.eventSettings.allowDeleting,s.dataBind());var o=new dr.Deferred;return this.parent.trigger(D,r,(function(r){if(t.cancel=r.cancel,i.duration=i.cellClickAction?r.duration:null,i.eventData[i.fields.endTime].getTime()!==n||i.cellClickAction||0!==i.eventData[i.fields.endTime].getHours()||0!==i.eventData[i.fields.endTime].getMinutes()||(i.eventData=(0,e.extend)({},i.eventData,null,!0),i.trimAllDay(i.eventData)),i.refreshDateTimePicker(i.duration),i.cellClickAction&&r.duration!==i.getSlotDuration()&&(0,e.isNullOrUndefined)(i.parent.editorTemplate)){var a=i.getInstance(yn),s=i.getInstance(Tn);s.value=new Date(a.value.getTime()+X*r.duration),s.dataBind()}i.parent.editorTemplate&&i.element.querySelector(".e-recurrenceeditor")&&!i.recurrenceEditor&&(i.recurrenceEditor=i.getInstance("e-recurrenceeditor")),o.resolve(t)})),o},i.prototype.onBeforeClose=function(e){var t=this;e.isInteracted&&(this.isCrudAction=!1);var i={type:"Editor",event:e.event||this.dialogEvent,data:this.eventCrudData,cancel:!1,element:this.element,target:this.cellClickAction?this.parent.activeCellsData.element:this.parent.activeEventData.element},n=new dr.Deferred;return this.parent.trigger(b,i,(function(i){e.cancel=i.cancel,i.cancel||(t.isCrudAction&&(e.cancel=t.processCrudActions(i.data),t.isCrudAction=e.cancel),t.isCrudAction||(t.resetForm(),t.parent.eventBase.focusElement(!0),t.eventCrudData=null)),n.resolve(e)})),n},i.prototype.getEventWindowContent=function(){var t=(0,e.createElement)("div",{className:"e-form-container"}),i=(0,e.createElement)("form",{id:this.parent.element.id+"EditForm",className:hn,attrs:{onsubmit:"return false;"}});return this.renderFormElements(i),t.appendChild(i),t},i.prototype.renderFormElements=function(t,i){var n=this;if((0,e.isNullOrUndefined)(this.parent.editorTemplate))t.appendChild(this.getDefaultEventWindowContent());else{if(i){this.fieldValidator&&(this.fieldValidator.destroy(),this.fieldValidator=null),this.recurrenceEditor&&(this.recurrenceEditor.destroy(),this.recurrenceEditor=null),this.destroyComponents();for(var r=0,a=[].slice.call(t.children);r<a.length;r++){var s=a[r];(0,e.remove)(s)}this.parent.resetTemplates(["editorTemplate"])}var o=this.parent.element.id+"_editorTemplate",l=[].slice.call(this.parent.getEditorTemplate()(i||{},this.parent,"editorTemplate",o,!1));(0,e.append)(l,t),this.parent.renderTemplates((function(){n.element&&(n.applyFormValidation(),n.eventCrudData&&(n.showDetails(n.eventCrudData),n.eventCrudData=null))}))}},i.prototype.getDefaultEventWindowContent=function(){var t=this.createDivElement("e-dialog-parent"),i=this.createDivElement("e-title-location-row");t.appendChild(i),i.appendChild(this.renderTextBox(vn)),i.appendChild(this.renderTextBox(mn));var n=this.createDivElement("e-start-end-row");t.appendChild(n),n.appendChild(this.renderDateTimePicker(yn,this.onTimeChange.bind(this))),n.appendChild(this.renderDateTimePicker(Tn));var r=this.createDivElement("e-all-day-time-zone-row");t.appendChild(r),r.appendChild(this.renderCheckBox(dn)),r.appendChild(this.renderCheckBox(un));var a=this.createDivElement(bn);t.appendChild(a),a.appendChild(this.renderDropDown(Sn)),a.appendChild(this.renderDropDown(Cn));var s=this.createDivElement("e-repeat-parent-row");t.appendChild(s);var o=this.renderCheckBox(gn),l=(0,e.createElement)("span",{className:Gs}),p=(0,e.createElement)("button",{className:"e-recurrence-edit-button",attrs:{type:"button",title:this.l10n.getConstant("editRecurrence")}});if(this.buttonObj=new Ea.Button({iconCss:"e-recurrence-edit e-icons",cssClass:"e-medium "+this.parent.cssClass}),l.appendChild(p),this.buttonObj.appendTo(p),o.appendChild(l),s.appendChild(o),this.parent.isAdaptive?e.EventHandler.add(p,"click",this.loadRecurrenceEditor,this):this.createRecurrenceEditor(t),this.parent.resourceCollection.length>0){for(var c=this.createDivElement("e-resources-row"),h=0,d=this.parent.resourceBase.resourceCollection;h<d.length;h++){var u=d[h];c.appendChild(this.renderResourceDetails(u))}t.appendChild(c)}var g=this.createDivElement(wn+"-row");g.appendChild(this.renderTextBox(wn)),t.appendChild(g);var v=(0,e.createElement)("button",{attrs:{type:"hidden",title:"submit",style:"display:none"}});return t.appendChild(v),t},i.prototype.createRecurrenceEditor=function(t){var i=(0,e.createElement)("div",{id:this.parent.element.id+"_recurrence_editor"});t.appendChild(i),this.recurrenceEditor=this.renderRecurrenceEditor(),this.recurrenceEditor.appendTo(i),this.updateMinMaxDateToEditor()},i.prototype.createDivElement=function(t){return(0,e.createElement)("div",{className:t})},i.prototype.createInputElement=function(t,i,n){return(0,e.createElement)(n||"input",{className:t,attrs:{type:"text",name:i,value:"",id:i}})},i.prototype.getSlotDuration=function(){return this.parent.activeViewOptions.timeScale.interval/this.parent.activeViewOptions.timeScale.slotCount},i.prototype.renderDateTimePicker=function(t,i){var r=this.createDivElement(t+"-container"),a=this.getFieldName(t),s=this.createInputElement(t+" "+_s,a);return r.appendChild(s),new n.DateTimePicker({change:i,firstDayOfWeek:this.parent.activeViewOptions.firstDayOfWeek,calendarMode:this.parent.calendarMode,min:this.parent.minDate,max:new Date(new Date(+this.parent.maxDate).setHours(23,59,59)),cssClass:this.parent.cssClass,enableRtl:this.parent.enableRtl,locale:this.parent.locale,floatLabelType:"Always",strictMode:!0,timeFormat:this.parent.activeViewOptions.timeFormat,format:((0,e.isNullOrUndefined)(this.parent.dateFormat)?this.getFormat("dateFormats"):this.parent.dateFormat)+" "+this.parent.activeViewOptions.timeFormat,placeholder:this.getFieldLabel(t),step:this.getSlotDuration(),width:"100%"}).appendTo(s),r},i.prototype.refreshDateTimePicker=function(e){for(var t="."+yn+",."+Tn,i=0,n=[].slice.call(this.element.querySelectorAll(t));i<n.length;i++){var r=n[i].ej2_instances[0];r.firstDayOfWeek=this.parent.activeViewOptions.firstDayOfWeek,r.timeFormat=this.parent.activeViewOptions.timeFormat,r.step=e||this.getSlotDuration(),r.dataBind()}},i.prototype.onTimeChange=function(){var t=this.getInstance(yn);if(t.element.parentElement.classList.contains("e-input-focus")){var i=this.getInstance(Tn),n=0;this.cellClickAction?(n=X*this.duration,this.eventWindowTime.startTime=t.value):n=this.eventData[this.fields.endTime].getTime()-this.eventData[this.fields.startTime].getTime();var r=(0,e.isNullOrUndefined)(t.value)?null:new Date(t.value.getTime()+n);this.cellClickAction&&(this.eventWindowTime.endTime=r),i.value=r,i.dataBind()}this.recurrenceEditor&&this.recurrenceEditor.updateRuleUntilDate(this.eventWindowTime.startTime)},i.prototype.renderResourceDetails=function(t){var i=t.field,n="e-"+i,r=t.title,a=this.createDivElement(n+"-container e-resources"),s=this.createInputElement(n+" "+_s,i);a.appendChild(s);var o=function(i){return e.SanitizeHtmlHelper.sanitize('<div class="e-resource-template"><div class="e-resource-color" style="background-color:'+i[t.colorField]+'"></div><div class="e-resource-text">'+i[t.textField]+"</div></div>")};((0,e.initializeCSPTemplate)(o,t),t.allowMultiple)?new Ma.MultiSelect({enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,cssClass:this.parent.cssClass||"",dataSource:t.dataSource,change:this.onMultiselectResourceChange.bind(this),itemTemplate:o,fields:{text:t.textField,value:t.idField},htmlAttributes:{name:i},floatLabelType:"Always",placeholder:r,popupHeight:"230px",popupWidth:"447px",mode:"Box"}).appendTo(s):new Ma.DropDownList({cssClass:this.parent.cssClass||"",change:this.onDropdownResourceChange.bind(this),dataSource:t.dataSource,enableRtl:this.parent.enableRtl,fields:{text:t.textField,value:t.idField},htmlAttributes:{name:i},floatLabelType:"Always",placeholder:r,popupHeight:"230px",popupWidth:"447px",itemTemplate:o}).appendTo(s);return a},i.prototype.renderDropDown=function(e){var t=this,i=this.getFieldName(e),n=this.createDivElement(e+"-container"),r=this.createInputElement(e+" "+_s,i);return n.appendChild(r),new Ma.DropDownList({allowFiltering:!0,change:this.onTimezoneChange.bind(this),cssClass:this.parent.cssClass||"",dataSource:this.parent.timezoneDataSource,enableRtl:this.parent.enableRtl,fields:{text:"Text",value:"Value"},filterBarPlaceholder:this.parent.localeObj.getConstant("searchTimezone"),noRecordsTemplate:this.parent.localeObj.getConstant("noRecords"),filtering:function(e){var i=new dr.Query;i=""!==e.text?i.where("Text","contains",e.text,!0):i,e.updateData(t.parent.timezoneDataSource,i)},htmlAttributes:{title:this.getFieldLabel(e),name:i},floatLabelType:"Always",placeholder:this.getFieldLabel(e),popupHeight:"230px"}).appendTo(r),n},i.prototype.onMultiselectResourceChange=function(t){if(t.value&&this.parent.activeViewOptions.group.byGroupID&&!(this.parent.resourceCollection.length<=1))for(var i=this.parent.resourceBase.resourceCollection,n=t.element.getAttribute("name")||this.getColumnName(t.element),r=0;r<i.length;r++)if(i[parseInt(r.toString(),10)].field===n&&r<i.length-1){for(var a=this.createInstance(r),s=[],o=function(n){var a=i[r+1],o=a.dataSource.filter((function(e){return e[a.groupIDField]===t.value[parseInt(n.toString(),10)]}))[0],p=(0,e.isNullOrUndefined)(o)?null:o[i[r+1].groupIDField],c=l.filterDatasource(r,p);s=s.concat(c)},l=this,p=0;p<t.value.length;p++)o(p);a.dataSource=s,a.dataBind()}},i.prototype.createInstance=function(e){var t=this.parent.resourceBase.resourceCollection[e+1],i=this.element.querySelector(".e-"+t.field).ej2_instances[0];return i.clear(),i},i.prototype.onDropdownResourceChange=function(e){if(e.value&&!(this.parent.resourceCollection.length<=1)&&this.parent.activeViewOptions.group.byGroupID)for(var t=e.element.getAttribute("name")||this.getColumnName(e.element),i=this.parent.resourceBase.resourceCollection,n=0;n<i.length;n++)if(n<i.length-1&&i[parseInt(n.toString(),10)].field===t){var r=this.createInstance(n),a=e.itemData[i[parseInt(n.toString(),10)].idField];r.dataSource=this.filterDatasource(n,a),r.dataBind();var s=r.dataSource.length>0?r.dataSource[0][i[n+1].idField]:null;r.value=i[n+1].allowMultiple?[s]:s,r.dataBind()}},i.prototype.filterDatasource=function(e,t){var i=this.parent.resourceBase.resourceCollection[e+1];return i.dataSource.filter((function(e){return e[i.groupIDField]===t}))},i.prototype.onTimezoneChange=function(e){if((e.element.getAttribute("name")||this.getColumnName(e.element))===this.parent.eventFields.startTimezone){var t=this.getInstance(Sn),i=this.getInstance(Cn);i.value=t.value,i.dataBind()}},i.prototype.renderCheckBox=function(e){var t=this.createDivElement(e+"-container"),i=this.getFieldName(e),n=this.createInputElement(e+" "+_s,i);t.appendChild(n);var r=new Ea.CheckBox({change:this.onChange.bind(this),cssClass:e+" "+this.parent.cssClass,enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,label:this.getFieldLabel(e)});return r.appendTo(n),n.setAttribute("name",i),"Repeat"===i&&(this.repeatStatus=r),t},i.prototype.renderTextBox=function(e){var t=this.createDivElement(e+"-container"),i=this.getFieldName(e),n=e===wn?"textarea":"input",r=this.createInputElement(e+" "+_s,i,n);return t.appendChild(r),xa.Input.createInput({element:r,floatLabelType:"Always",properties:{enableRtl:this.parent.enableRtl,placeholder:this.getFieldLabel(e)}}),t},i.prototype.getFieldName=function(e){var t="";switch(e){case vn:t=this.fields.subject;break;case mn:t=this.fields.location;break;case yn:t=this.fields.startTime;break;case Tn:t=this.fields.endTime;break;case wn:t=this.fields.description;break;case dn:t=this.fields.isAllDay;break;case Sn:t=this.fields.startTimezone;break;case Cn:t=this.fields.endTimezone;break;case un:t="Timezone";break;case gn:t="Repeat"}return t},i.prototype.getFieldLabel=function(e){var t="";switch(e){case vn:t=this.parent.editorTitles.subject;break;case mn:t=this.parent.editorTitles.location;break;case wn:t=this.parent.editorTitles.description;break;case yn:t=this.parent.editorTitles.startTime;break;case Tn:t=this.parent.editorTitles.endTime;break;case Sn:t=this.parent.editorTitles.startTimezone;break;case Cn:t=this.parent.editorTitles.endTimezone;break;case gn:t=this.parent.editorTitles.recurrenceRule;break;case dn:t=this.parent.editorTitles.isAllDay;break;case un:t=this.l10n.getConstant("timezone")}return t},i.prototype.onChange=function(t){if(t.event&&t.event.target){var i="."+dn+",."+un+",."+gn,n=(0,e.closest)(t.event.target,i);n.classList.contains(dn)?this.onAllDayChange(t.checked):n.classList.contains(un)?this.timezoneChangeStyle(t.checked):n.classList.contains(gn)&&this.onRepeatChange(t.checked)}},i.prototype.renderRepeatDialog=function(){var i=(0,e.createElement)("div");this.repeatDialogObject=new t.Dialog({header:this.l10n.getConstant("recurrence"),visible:!1,content:'<div class="e-rec-editor"></div>',closeOnEscape:!0,width:"90%",buttons:[{click:this.repeatSaveDialog.bind(this),buttonModel:{content:this.l10n.getConstant("save"),cssClass:"e-save",isPrimary:!0}},{click:this.repeatCancelDialog.bind(this),buttonModel:{cssClass:"e-cancel",content:this.l10n.getConstant("cancel")}}],target:this.element,animationSettings:{effect:"Zoom"},enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,isModal:!0,cssClass:"e-recurrence-dialog",open:this.repeatOpenDialog.bind(this)}),this.element.appendChild(i),this.repeatDialogObject.appendTo(i),this.createRecurrenceEditor(this.repeatDialogObject.element.querySelector(".e-rec-editor"))},i.prototype.loadRecurrenceEditor=function(){this.repeatDialogObject.show(),this.recurrenceEditor&&this.repeatRule&&this.recurrenceEditor.setRecurrenceRule(this.repeatRule)},i.prototype.onRepeatChange=function(t){if(t)this.repeatDialogObject||this.renderRepeatDialog(),this.recurrenceEditor.setProperties({startDate:this.repeatStartDate,selectedType:0}),this.loadRecurrenceEditor();else{this.repeatDialogObject&&this.repeatDialogObject.hide(),this.repeatRule="",this.recurrenceEditor&&(this.recurrenceEditor.setRecurrenceRule(this.repeatRule),this.updateRepeatLabel(this.repeatRule));var i=this.element.querySelector("."+Gs);(0,e.addClass)([i],Xs)}},i.prototype.repeatSaveDialog=function(){this.repeatRule=this.recurrenceEditor.getRecurrenceRule();var t=this.element.querySelector("."+Gs);this.recurrenceEditor.getRecurrenceRule()?(0,e.removeClass)([t],Xs):((0,e.addClass)([t],Xs),this.repeatStatus.setProperties({checked:!1})),this.updateRepeatLabel(this.repeatRule),this.closeRepeatDialog()},i.prototype.closeRepeatDialog=function(){this.repeatDialogObject.hide()},i.prototype.repeatCancelDialog=function(){this.closeRepeatDialog(),this.recurrenceEditor&&this.recurrenceEditor.setRecurrenceRule(this.repeatTempRule),this.repeatTempRule||this.repeatStatus.setProperties({checked:!1})},i.prototype.repeatOpenDialog=function(){this.repeatTempRule=this.recurrenceEditor.getRecurrenceRule()},i.prototype.onCellDetailsUpdate=function(t,i){if(this.parent.eventSettings.allowAdding){this.parent.isAdaptive&&i&&!this.repeatDialogObject&&this.renderRepeatDialog(),this.element.querySelector("."+hn).removeAttribute("data-id"),(0,e.isNullOrUndefined)(this.parent.editorHeaderTemplate)&&(this.element.querySelector("."+Vn).innerHTML=this.l10n.getConstant("newEvent")),t.Timezone=!1,this.repeatStartDate=t[this.fields.startTime],this.repeatRule="",(0,e.isNullOrUndefined)(this.parent.eventSettings.fields.subject.default)||(t[this.fields.subject]=this.parent.eventSettings.fields.subject.default),(0,e.isNullOrUndefined)(this.parent.eventSettings.fields.location.default)||(t[this.fields.location]=this.parent.eventSettings.fields.location.default),(0,e.isNullOrUndefined)(this.parent.eventSettings.fields.description.default)||(t[this.fields.description]=this.parent.eventSettings.fields.description.default),this.showDetails(t),t[this.fields.recurrenceRule]&&this.recurrenceEditor&&(this.recurrenceEditor.setRecurrenceRule(t[this.fields.recurrenceRule],t[this.fields.startTime]),this.repeatRule=t[this.fields.recurrenceRule]);var n=this.element.querySelector("."+Wi);if(n&&(0,e.addClass)([n],Ne),this.recurrenceEditor&&(this.recurrenceEditor.setProperties({startDate:t[this.fields.startTime],selectedType:(0,e.isNullOrUndefined)(i)?(0,e.isNullOrUndefined)(t[this.fields.recurrenceRule])?0:this.recurrenceEditor.selectedType:i}),this.repeatRule=this.recurrenceEditor.value),this.parent.isAdaptive&&(0,e.isNullOrUndefined)(this.parent.editorTemplate)){var r=this.element.querySelector("."+Gs);t[this.fields.recurrenceRule]||i?((0,e.removeClass)([r],Xs),this.repeatStatus.setProperties({checked:!0})):((0,e.addClass)([r],Xs),this.repeatStatus.setProperties({checked:!1})),this.updateRepeatLabel(this.repeatRule)}else{var a=this.element.querySelector("."+xn);this.disableButton(a,!1)}this.dialogObject.show()}},i.prototype.convertToEventData=function(e,t){e.subject&&(t[this.fields.subject]=e.subject),t[this.fields.startTime]=e.startTime,t[this.fields.endTime]=e.endTime,t[this.fields.isAllDay]=e.isAllDay,e.RecurrenceRule&&(t[this.fields.recurrenceRule]=e.RecurrenceRule),(this.parent.resourceCollection.length>0||this.parent.activeViewOptions.group.resources.length>0)&&this.parent.resourceBase.setResourceValues(t)},i.prototype.applyFormValidation=function(){var t=this.element.querySelector("."+hn);if(t){var i=function(e){return e&&Object.keys(e).length>0?e:void 0},n={},r=i(this.parent.eventSettings.fields.subject.validation);(0,e.isNullOrUndefined)(r)||(n[this.parent.eventSettings.fields.subject.name]=r);var a=i(this.parent.eventSettings.fields.location.validation);(0,e.isNullOrUndefined)(a)||(n[this.parent.eventSettings.fields.location.name]=a);var s=i(this.parent.eventSettings.fields.startTime.validation);(0,e.isNullOrUndefined)(s)||(n[this.parent.eventSettings.fields.startTime.name]=s);var o=i(this.parent.eventSettings.fields.endTime.validation);(0,e.isNullOrUndefined)(o)||(n[this.parent.eventSettings.fields.endTime.name]=o);var l=i(this.parent.eventSettings.fields.description.validation);(0,e.isNullOrUndefined)(l)||(n[this.parent.eventSettings.fields.description.name]=l),this.fieldValidator=new Va,this.fieldValidator.renderFormValidator(t,n,this.element,this.parent.locale)}},i.prototype.showDetails=function(t){this.eventData=this.eventCrudData?this.eventData:t;var i=(0,e.extend)({},t,null,!0),n=this.getFormElements(cn);if(this.parent.isReact&&n.length<1&&!this.cellClickAction)this.eventCrudData=i;else{this.cellClickAction&&(!this.cellClickAction||(0,e.isNullOrUndefined)(this.parent.editorTemplate))||0!==i[this.fields.endTime].getHours()||0!==i[this.fields.endTime].getMinutes()||this.trimAllDay(i);for(var r=Object.keys(i),a=0,s=n;a<s.length;a++){var o=s[a],l=o.name||this.getColumnName(o);(0,e.isNullOrUndefined)(l)||""===l||(-1!==r.indexOf(l)?this.setValueToElement(o,i[""+l]):this.setDefaultValueToElement(o))}if((0,e.isNullOrUndefined)(this.parent.editorTemplate)){this.onAllDayChange(i[this.fields.isAllDay]);var p=this.getInstance(un+"."+_s);(0,e.isNullOrUndefined)(i[this.fields.startTimezone])&&(0,e.isNullOrUndefined)(i[this.fields.endTimezone])||(p.checked=!0,p.dataBind()),this.timezoneChangeStyle(p.checked),delete i.Timezone}}},i.prototype.getColumnName=function(t){var i=t.getAttribute("data-name")||"";if(""===i){var n=!1,r="";t.classList.contains("e-dropdownlist")?(r="e-ddl",n=!0):t.classList.contains("e-multiselect")?(r="e-multiselect",n=!0):t.classList.contains("e-datetimepicker")?r="e-datetimepicker":t.classList.contains("e-datepicker")?r="e-datepicker":t.classList.contains("e-checkbox")&&(r="e-checkbox");var a=n?"."+r+":not(.e-control)":"."+r,s=(0,e.closest)(t,a)||t.querySelector("."+r);if(s){var o=s.querySelector("[name]");o&&(i=o.name)}}return i},i.prototype.onAllDayChange=function(t){var i,n=this.getInstance(yn),r=this.getInstance(Tn),a=this.element.querySelector(".e-time-zone-container");t?(i=(0,e.isNullOrUndefined)(this.parent.dateFormat)?this.getFormat("dateFormats"):this.parent.dateFormat,(0,e.addClass)(this.element.querySelectorAll(".e-time-icon"),An),(0,e.addClass)([a],Ne),this.element.querySelector("."+bn)&&(0,e.removeClass)([this.element.querySelector("."+bn)],Le),n.format=r.format=i):(i=(0,e.isNullOrUndefined)(this.parent.dateFormat)?this.getFormat("dateFormats")+" "+this.parent.activeViewOptions.timeFormat:this.parent.dateFormat+" "+this.parent.activeViewOptions.timeFormat,(0,e.removeClass)(this.element.querySelectorAll(".e-time-icon"),An),(0,e.removeClass)([a],Ne),this.element.querySelector(".e-checkbox-wrapper .e-time-zone").checked&&(0,e.addClass)([this.element.querySelector("."+bn)],Le),n.format=r.format=i),this.cellClickAction&&this.updateDateTime(t,n,r),n.dataBind(),r.dataBind(),(0,e.isNullOrUndefined)(this.recurrenceEditor)||this.recurrenceEditor.updateRuleUntilDate(n.value)},i.prototype.updateDateTime=function(e,t,i){var n,r;if(e)if(n=se(new Date(this.eventWindowTime.startTime.getTime())),this.parent.activeCellsData.isAllDay){var a=pe(new Date(this.eventWindowTime.endTime.getTime()),-1).getTime();r=+this.eventWindowTime.startTime>a?this.eventWindowTime.endTime:new Date(a)}else r=se(new Date(this.eventWindowTime.endTime.getTime()));else{var s=this.parent.activeCellsData.startTime;if((n=new Date(this.eventWindowTime.startTime.getTime())).setHours(s.getHours(),s.getMinutes(),s.getSeconds()),this.parent.activeCellsData.isAllDay){var o=this.parent.getStartEndTime(this.parent.workHours.start);n.setHours(o.getHours(),o.getMinutes(),o.getSeconds()),(r=new Date(n.getTime())).setMilliseconds(X*this.getSlotDuration())}else(r=new Date(n.getTime())).setMilliseconds(this.parent.activeCellsData.endTime.getTime()-this.parent.activeCellsData.startTime.getTime())}this.eventWindowTime={startTime:new Date(n.getTime()),endTime:new Date(r.getTime())},t.value=n,i.value=r,t.dataBind(),i.dataBind()},i.prototype.getFormat=function(t){return(0,e.isNullOrUndefined)(this.parent.locale)||"en"===this.parent.locale||"en-US"===this.parent.locale?(0,e.getValue)(t+".short",(0,e.getDefaultDateObject)(this.parent.getCalendarMode())):(0,e.getValue)("main."+this.parent.locale+".dates.calendars."+this.parent.getCalendarMode()+"."+t+".short",e.cldrData)},i.prototype.onEventDetailsUpdate=function(t){if(this.parent.eventSettings.allowEditing){if(!this.parent.isAdaptive&&(0,e.isNullOrUndefined)(this.parent.editorFooterTemplate)&&(0,e.removeClass)([this.element.querySelector("."+Wi)],Ne),(0,e.isNullOrUndefined)(this.parent.editorHeaderTemplate)&&(this.element.querySelector("."+Vn).innerHTML=this.l10n.getConstant("editEvent")),this.element.querySelector("."+hn).setAttribute("data-id",t[this.fields.id].toString()),(0,e.isNullOrUndefined)(this.parent.editorTemplate)){t=(0,e.extend)({},t,null,!0);var i=this.getInstance(un+"."+_s),n=void 0;t[this.fields.startTimezone]||t[this.fields.endTimezone]?(n=!0,this.parent.eventBase.timezoneConvert(t)):n=!1,t.Timezone=n,i.checked=n,i.dataBind()}if(this.showDetails(t),t[this.fields.recurrenceRule]&&this.recurrenceEditor?this.recurrenceEditor.setRecurrenceRule(t[this.fields.recurrenceRule],t[this.fields.startTime]):!this.parent.isAdaptive&&this.recurrenceEditor&&(this.recurrenceEditor.setProperties({startDate:t[this.fields.startTime]}),this.recurrenceEditor.setRecurrenceRule("")),this.repeatStartDate=t[this.fields.startTime],this.repeatRule="",t[this.fields.recurrenceRule]&&(this.recurrenceEditor&&this.recurrenceEditor.setRecurrenceRule(t[this.fields.recurrenceRule],t[this.fields.startTime]),this.repeatRule=t[this.fields.recurrenceRule]),this.parent.isAdaptive&&(0,e.isNullOrUndefined)(this.parent.editorTemplate)){var r=this.element.querySelector("."+Gs);t[this.fields.recurrenceRule]?((0,e.removeClass)([r],Xs),this.repeatStatus.setProperties({checked:!0})):((0,e.addClass)([r],Xs),this.repeatStatus.setProperties({checked:!1})),this.updateRepeatLabel(this.repeatRule)}var a=this.parent.readonly||t[this.fields.isReadonly];if(this.parent.isAdaptive){var s=this.element.querySelector("."+On);s&&(a?(0,e.addClass)([s],Zn):(0,e.removeClass)([s],Zn))}else{var o=this.element.querySelector("."+xn),l=this.element.querySelector("."+Wi);this.disableButton(o,a),this.disableButton(l,a)}this.dialogObject.show()}},i.prototype.disableButton=function(e,t){e&&(e.ej2_instances[0].disabled=t)},i.prototype.renderRecurrenceEditor=function(){return new Ys({calendarMode:this.parent.calendarMode,cssClass:this.parent.cssClass,dateFormat:this.parent.dateFormat,enableRtl:this.parent.enableRtl,firstDayOfWeek:this.parent.activeViewOptions.firstDayOfWeek,locale:this.parent.locale})},i.prototype.updateMinMaxDateToEditor=function(){var e=this.element.querySelector(".e-start"),t=this.element.querySelector(".e-end");if(e&&t){var i=e.ej2_instances[0],n=t.ej2_instances[0];i.min=this.parent.minDate,i.max=this.parent.maxDate,n.min=this.parent.minDate,n.max=this.parent.maxDate,i.dataBind(),n.dataBind()}if(this.recurrenceEditor){var r=this.recurrenceEditor.element.querySelector(".e-until-date");if(r){var a=r.ej2_instances[0];a.min=this.parent.minDate,a.max=this.parent.maxDate,a.dataBind()}}},i.prototype.updateRepeatLabel=function(e){this.parent.isAdaptive&&!this.repeatDialogObject&&this.renderRepeatDialog();var t=e?this.l10n.getConstant("repeats")+" "+this.recurrenceEditor.getRuleSummary(e):this.l10n.getConstant("repeat");this.repeatStatus.setProperties({label:t})},i.prototype.dialogClose=function(e){this.isEnterKey?this.isEnterKey=!1:(this.dialogEvent=e,this.isCrudAction=!1,this.parent.activeEventData={event:void 0,element:void 0},this.parent.currentAction=null,this.dialogObject.hide())},i.prototype.resetForm=function(){this.fieldValidator.destroyToolTip(),this.resetFormFields(),this.parent.isAdaptive||!this.recurrenceEditor||this.recurrenceEditor.isDestroyed||this.recurrenceEditor.resetFields()},i.prototype.timezoneChangeStyle=function(t){var i=this.element.querySelector("."+bn),n=this.parent.tzModule.getLocalTimezoneName();if(t){(0,e.addClass)([i],Le);var r=this.getInstance(Sn),a=this.getInstance(Cn),s=r.dataSource;if(!r.value||!this.parent.timezone)s.some((function(e){return e.Value===n}))||(s.push({Value:n,Text:n}),r.dataSource=s,a.dataSource=s,r.dataBind(),a.dataBind());r.value=r.value||this.parent.timezone||n,a.value=a.value||this.parent.timezone||n,r.dataBind(),a.dataBind()}else(0,e.removeClass)([i],Le)},i.prototype.resetFormFields=function(){for(var t=0,i=this.getFormElements(cn);t<i.length;t++){var n=i[t],r=n.name||this.getColumnName(n);(0,e.isNullOrUndefined)(r)||""===r||this.setDefaultValueToElement(n)}},i.prototype.eventSave=function(e,t){if(this.isEnterKey)this.isEnterKey=!1;else{var i=this.element.querySelector("."+hn);if(!i||!i.classList.contains("e-formvalidator")||i.ej2_instances[0].validate()){var n=this.getEventDataFromEditor();this.processEventValidation(n.tempData,t)||(this.eventCrudData=n.eventData,this.dialogEvent=e,this.isCrudAction=!0,this.dialogObject.hide())}}},i.prototype.getEventDataFromEditor=function(){var t=(0,e.extend)({},this.getObjectFromFormData(cn));t.Timezone||(t[this.fields.startTimezone]=null,t[this.fields.endTimezone]=null),delete t.Timezone,delete t.Repeat,this.setDefaultValueToObject(t),t[this.fields.recurrenceRule]=this.recurrenceEditor?this.recurrenceEditor.getRecurrenceRule()||null:void 0;var i=(0,e.extend)({},t,null,!0);return t[this.fields.isAllDay]&&(t[this.fields.startTime]=(0,e.isNullOrUndefined)(t[this.fields.startTime])?null:se(new Date(t[this.fields.startTime].getTime())),t[this.fields.endTime]=(0,e.isNullOrUndefined)(t[this.fields.endTime])?null:pe(se(new Date(t[this.fields.endTime].getTime())),1)),{eventData:t,tempData:i}},i.prototype.processEventValidation=function(t,i){var n;if((0,e.isNullOrUndefined)(this.parent.editorTemplate)){if(!t[this.fields.startTime]||!t[this.fields.endTime])return this.parent.quickPopup.openValidationError("invalidDateError"),!0;if(t[this.fields.startTime]>t[this.fields.endTime])return this.parent.quickPopup.openValidationError("startEndError"),!0}if(this.recurrenceEditor&&this.recurrenceEditor.value&&""!==this.recurrenceEditor.value){"EditOccurrence"!==this.parent.currentAction&&(n=this.recurrenceValidation(t[this.fields.startTime],t[this.fields.endTime],i));var r=!0;if("seriesChangeAlert"===n&&this.parent.uiStateValues.isIgnoreOccurrence&&(r=!1),!(0,e.isNullOrUndefined)(n)&&r&&(!this.parent.enableRecurrenceValidation&&"wrongPattern"===n||this.parent.enableRecurrenceValidation))return this.parent.quickPopup.openRecurrenceValidationAlert(n),!0}return!1},i.prototype.processCrudActions=function(t){var i=this;this.parent.uiStateValues.isBlock=!1;var n=this.getResourceData(t),r=(this.parent.activeViewOptions.group.resources.length>0||this.parent.resourceCollection.length>0)&&!this.parent.activeViewOptions.group.allowGroupEdit&&!(0,e.isNullOrUndefined)(n),a=this.getEventIdFromForm();if((0,e.isNullOrUndefined)(a))this.parent.currentAction="Add",r?this.resourceSaveEvent(t,this.parent.currentAction):(t[this.fields.id]=this.parent.eventBase.getEventMaxID(),this.parent.addEvent(t));else{var s="string"===this.parent.eventBase.getEventIDType()?a:parseInt(a,10),o=this.parent.eventsData.filter((function(e){return e[i.fields.id]===s}))[0];if((0,e.isNullOrUndefined)(o)&&(o=this.parent.blockData.filter((function(e){return e[i.fields.id]===s}))[0]),(t=(0,e.extend)({},o,t))[this.fields.isReadonly])return!1;var l=void 0;if(!(0,e.isNullOrUndefined)(o[this.fields.recurrenceRule])){if(l=this.parent.currentAction,t.Guid=this.parent.activeEventData.event.Guid,"EditOccurrence"===this.parent.currentAction&&(t[this.fields.recurrenceID]?(s=t[this.fields.recurrenceID],l=null):(t[this.fields.id]=this.parent.eventBase.getEventMaxID(),t.Guid=this.parent.activeEventData.event.Guid),this.parent.enableRecurrenceValidation&&this.editOccurrenceValidation(s,t)))return!0;"EditSeries"===this.parent.currentAction||t[this.fields.id]!==o[this.fields.id]?t[this.fields.recurrenceID]=o[this.fields.id]:"EditFollowingEvents"===this.parent.currentAction&&(t[this.fields.id]=this.parent.eventBase.getEventMaxID(),t[this.fields.followingID]=o[this.fields.id])}r?this.resourceSaveEvent(t,"Save",l):this.parent.saveEvent(t,l)}return this.parent.uiStateValues.isBlock},i.prototype.getResourceData=function(t){var i=null;!(0,e.isNullOrUndefined)(this.parent.resourceBase)&&!(0,e.isNullOrUndefined)(this.parent.resourceBase.resourceCollection)&&this.parent.resourceBase.resourceCollection.length>0&&(i=t[this.parent.resourceBase.resourceCollection.slice(-1)[0].field]);return i},i.prototype.getObjectFromFormData=function(t){for(var i={},n=0,r=this.getFormElements(t);n<r.length;n++){var a=r[n],s=a.name||this.getColumnName(a);(0,e.isNullOrUndefined)(s)||""===s||(i[""+s]=this.getValueFromElement(a))}return i},i.prototype.setDefaultValueToObject=function(t){(0,e.isNullOrUndefined)(t[this.fields.subject])||(t[this.fields.subject]=t[this.fields.subject]||this.parent.eventSettings.fields.subject.default||this.l10n.getConstant("addTitle")),(0,e.isNullOrUndefined)(t[this.fields.location])||(t[this.fields.location]=t[this.fields.location]||this.parent.eventSettings.fields.location.default),(0,e.isNullOrUndefined)(t[this.fields.description])||(t[this.fields.description]=t[this.fields.description]||this.parent.eventSettings.fields.description.default)},i.prototype.recurrenceValidation=function(t,i,n){var r,a=this.recurrenceEditor,s=this.getInstance("e-repeat-interval.e-numerictextbox").value;if(n!==this.l10n.getConstant("ok")){var o=this.parent.activeEventData.event,l=[];if(("EditSeries"===this.parent.currentAction||"EditFollowingEvents"===this.parent.currentAction)&&!(0,e.isNullOrUndefined)(o)){var p=o[this.parent.eventFields.startTime],c=this.parent.eventBase.getSeriesEvents(this.eventData,p);if(c.length>0)l=this.parent.eventBase.getEditedOccurrences(c,p);else{var h=this.parent.eventBase.getEventById(o[this.parent.eventFields.id]);l=this.parent.eventBase.getEditedOccurrences([h],p)}"EditSeries"!==this.parent.currentAction||(0,e.isNullOrUndefined)(this.eventData[this.parent.eventFields.recurrenceException])||l.push(this.eventData)}if(l.length>0&&(r="seriesChangeAlert"),"until"===this.getInstance("e-end-on-left .e-ddl .e-dropdownlist").value&&this.getInstance("e-end-on-date .e-datepicker").value<t&&(r="wrongPattern"),(0,e.isNullOrUndefined)(r)){var d=a.value.split(";")[1].split("=")[1].split(","),u={SU:0,MO:1,TU:2,WE:3,TH:4,FR:5,SA:6},g=[],v=[],m=void 0;switch(a.value.split(";")[0].split("=")[1]){case"DAILY":(i.getTime()-t.getTime())/36e5>24*s&&(r="createError");break;case"WEEKLY":d=a.value.split(";")[1].split("=")[1].split(",");for(var f=0;f<d.length*(s+1);f++)g[parseInt(f.toString(),10)]=d.length>f?u[d[parseInt(f.toString(),10)]]:g[f-d.length]+7*s;m=g.sort((function(e,t){return e-t}));for(f=1;f<m.length;f++)v.push(m[parseInt(f.toString(),10)]-m[f-1]);((i.getTime()-t.getTime())/36e5>=24*Math.min.apply(Math,v)||(0,e.isNullOrUndefined)(s))&&(r="createError");break;case"MONTHLY":i.getTime()>=new Date(+t).setMonth(t.getMonth()+s)&&(r="createError");break;case"YEARLY":i.getTime()>=new Date(+t).setFullYear(t.getFullYear()+s)&&(r="createError")}}}else i.getTime()>=new Date(+t).setMonth(t.getMonth()+s)&&(r="createError"),(0,e.isNullOrUndefined)(r)&&this.parent.quickPopup.quickDialog.hide();return(0,e.isNullOrUndefined)(s)&&(r="createError"),r},i.prototype.getRecurrenceIndex=function(e,t){for(var i,n=0;n<e.length;n++)if(t[this.fields.startTime].valueOf()===e[parseInt(n.toString(),10)][this.fields.startTime].valueOf()){i=n;break}return i},i.prototype.trimAllDay=function(e){if(e[this.fields.isAllDay]){var t=pe(new Date(+e[this.fields.endTime]),-1).getTime();e[this.fields.endTime]=+e[this.fields.startTime]>t?e[this.fields.endTime]:new Date(t)}},i.prototype.editOccurrenceValidation=function(t,i,n){var r=this;void 0===n&&(n=this.eventData);var a=this.parent.getOccurrencesByID(t),s=this.parent.eventsData.filter((function(e){return e[r.fields.recurrenceID]===t}));s.map((function(t){return a.push((0,e.extend)({},t))})),i=(0,e.extend)({},i),this.trimAllDay(i);for(var o=0,l=a;o<l.length;o++){var p=l[o];this.trimAllDay(p)}this.parent.eventBase.sortByTime(a);var c=this.getRecurrenceIndex(a,n);if((0,e.isNullOrUndefined)(c))return!1;var h,d,u=new Date(+i[this.fields.startTime]),g=new Date(+i[this.fields.endTime]);c!==a.length-1&&(h=new Date(+a[c+1][this.fields.startTime]),d=new Date(+a[c+1][this.fields.endTime]));var v=new Date(+a[a.length-1][this.fields.endTime]);if(0===c){if(!(0,e.isNullOrUndefined)(a[c+1])){if(!(h.getTime()>=g.getTime())&&se(v).getTime()>=se(u).getTime()||se(v).getTime()<se(u).getTime())return this.parent.quickPopup.openRecurrenceValidationAlert("occurrenceAlert"),!0;if(!(se(u).getTime()<se(h).getTime()))return this.parent.quickPopup.openRecurrenceValidationAlert("sameDayAlert"),!0}return!1}var m=new Date(+a[c-1][this.fields.startTime]),f=new Date(+a[c-1][this.fields.endTime]);if(c===a.length-1){if(se(new Date(+a[a.length-1-c][this.fields.startTime])).getTime()>se(u).getTime())return this.parent.quickPopup.openRecurrenceValidationAlert("occurrenceAlert"),!0;if(!(f.getTime()<=u.getTime()&&se(u).getTime()>se(m).getTime()))return this.parent.quickPopup.openRecurrenceValidationAlert("sameDayAlert"),!0}else{if(!(se(m).getTime()<se(u).getTime()||se(new Date(+a[0][this.fields.startTime])).getTime()>se(u).getTime())||!(se(h).getTime()>se(u).getTime()||v.getTime()<u.getTime()))return this.parent.quickPopup.openRecurrenceValidationAlert("sameDayAlert"),!0;if(!(f.getTime()<=u.getTime()&&h.getTime()>=g.getTime())||se(d).getTime()<se(u).getTime()||se(m).getTime()>se(g).getTime()||!(se(u).getTime()<se(h).getTime()))return this.parent.quickPopup.openRecurrenceValidationAlert("occurrenceAlert"),!0}return!1},i.prototype.resourceSaveEvent=function(t,i,n){var r=this,a=this.parent.resourceBase.resourceCollection.slice(-1)[0],s=t[a.field];s=s instanceof Array?s.reverse():[s].reverse();for(var o=this.parent.resourceBase.lastResourceLevel,l=[],p=function(p){var h=(0,e.extend)({},t,null,!0);h[c.fields.id]=c.parent.eventBase.getEventMaxID();var d=[],u=function(){if("Save"===i&&p===s.length-1)if(d.length>0){d[0][r.fields.id]=t[r.fields.id];for(var e=1;e<d.length;e++)d[parseInt(e.toString(),10)][r.fields.id]=r.parent.eventBase.getEventMaxID(p),l.push(d[parseInt(e.toString(),10)]),r.parent.saveEvent(d[0],n)}else h[r.fields.id]=t[r.fields.id],r.parent.saveEvent(h,n);else if(d.length>0)for(var a=0;a<d.length;a++)d[parseInt(a.toString(),10)][r.fields.id]=r.parent.eventBase.getEventMaxID(a),l.push(d[parseInt(a.toString(),10)]);else h[r.fields.id]=r.parent.eventBase.getEventMaxID(p),l.push(h)};if(c.parent.activeViewOptions.group.byGroupID&&!(0,e.isNullOrUndefined)(o)){var g=a.dataSource,v=c.parent.resourceCollection,m=void 0;if((m=v.length>1?we(g,a.idField,s[parseInt(p.toString(),10)],h,v):we(g,a.idField,s[parseInt(p.toString(),10)]))<0)return{value:void 0};for(var f=g[parseInt(m.toString(),10)][a.groupIDField],y=o.filter((function(e){return e.resourceData[a.idField]===s[parseInt(p.toString(),10)]})).filter((function(e){return e.resourceData[a.groupIDField]===f}))[0].groupOrder,T=0;T<c.parent.resourceBase.resourceCollection.length;T++){var w=c.parent.resourceBase.resourceCollection[parseInt(T.toString(),10)].field;h[""+w]=y[parseInt(T.toString(),10)]instanceof Array?y[parseInt(T.toString(),10)][0]:y[parseInt(T.toString(),10)]}u()}else{for(m=0;m<c.parent.resourceBase.resourceCollection.length-1;m++){w=c.parent.resourceBase.resourceCollection[parseInt(m.toString(),10)].field;if(h[""+w]instanceof Array&&h[""+w].length>1)for(var D=0;D<h[""+w].length;D++){var b=(0,e.extend)({},h,null,!0);b[""+w]=t[""+w][parseInt(D.toString(),10)],b[a.field]=s[parseInt(p.toString(),10)],d.push(b)}else if(0===d.length)h[""+w]=t[""+w]instanceof Array?t[""+w][0]:t[""+w],h[a.field]=s[parseInt(p.toString(),10)];else for(var S=0;S<d.length;S++)d[parseInt(S.toString(),10)][""+w]=t[""+w]instanceof Array?t[""+w][0]:t[""+w]}h[a.field]=s[parseInt(p.toString(),10)],u()}},c=this,h=0;h<s.length;h++){var d=p(h);if("object"==typeof d)return d.value}if(l.length>0){for(var u=0,g=l;u<g.length;u++){var v=g[u];v[this.fields.recurrenceException]=null,v[this.fields.recurrenceID]=null}this.parent.addEvent(l)}},i.prototype.getEventIdFromForm=function(){return this.element.querySelector("."+hn).getAttribute("data-id")},i.prototype.getFormElements=function(e){return e===cn?[].slice.call(this.element.querySelectorAll("."+_s)):[].slice.call(this.parent.element.querySelectorAll("."+e+" ."+_s))},i.prototype.getValueFromElement=function(t){return t.classList.contains("e-datepicker")||t.classList.contains("e-datetimepicker")||t.classList.contains("e-dropdownlist")||t.classList.contains("e-multiselect")?t.ej2_instances[0].value:t.classList.contains("e-checkbox")?t.ej2_instances[0].checked:"checkbox"===t.type?t.checked:this.parent.enableHtmlSanitizer?e.SanitizeHtmlHelper.sanitize(t.value):t.value},i.prototype.setValueToElement=function(e,t){if(e.classList.contains("e-datepicker"))(i=e.ej2_instances[0]).value=t,i.dataBind();else if(e.classList.contains("e-datetimepicker")){(i=e.ej2_instances[0]).element.classList.contains(yn)?this.eventWindowTime.startTime=new Date(""+t):this.eventWindowTime.endTime=new Date(""+t),i.value=t,i.dataBind()}else if(e.classList.contains("e-dropdownlist")){(i=e.ej2_instances[0]).value=t,i.dataBind()}else if(e.classList.contains("e-multiselect")){(i=e.ej2_instances[0]).value=[],i.value=t instanceof Array?t:[t],i.dataBind()}else if(e.classList.contains("e-checkbox")){var i;(i=e.ej2_instances[0]).checked=t,i.dataBind()}else"checkbox"!==e.type?e.value=t||"":e.checked=t},i.prototype.setDefaultValueToElement=function(e){if(e.classList.contains("e-datepicker"))(t=e.ej2_instances[0]).value=this.parent.getCurrentTime(),t.dataBind();else if(e.classList.contains("e-datetimepicker")){var t=e.ej2_instances[0],i=this.parent.getCurrentTime();this.eventWindowTime={startTime:i,endTime:i},t.value=i,t.dataBind()}else if(e.classList.contains("e-dropdownlist")){(t=e.ej2_instances[0]).value=null,t.dataBind()}else if(e.classList.contains("e-multiselect")){(t=e.ej2_instances[0]).value=[],t.dataBind()}else if(e.classList.contains("e-checkbox")){(t=e.ej2_instances[0]).checked=!1,t.dataBind()}else"checkbox"===e.type?e.checked=!1:e.value=""},i.prototype.getInstance=function(e){var t=this.element.querySelector("."+e);return t?t.ej2_instances[0]:null},i.prototype.eventDelete=function(t){if(this.isEnterKey)this.isEnterKey=!1;else{switch(this.parent.currentAction){case"EditOccurrence":(0,e.isNullOrUndefined)(this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule])?this.parent.currentAction="Delete":this.parent.currentAction="DeleteOccurrence";break;case"EditSeries":this.parent.currentAction="DeleteSeries";break;case"Save":this.parent.currentAction="Delete";break;case"EditFollowingEvents":(0,e.isNullOrUndefined)(this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule])||(this.parent.currentAction="DeleteFollowingEvents")}this.dialogEvent=t,this.isCrudAction=!1,this.dialogObject.hide(),this.parent.quickPopup.openDeleteAlert()}},i.prototype.getRecurrenceEditorInstance=function(){return this.parent.isAdaptive&&!this.repeatDialogObject&&this.renderRepeatDialog(),this.recurrenceEditor},i.prototype.destroyComponents=function(){for(var e=0,t=this.getFormElements(cn);e<t.length;e++){var i=t[e],n=void 0;(i.classList.contains("e-datetimepicker")||i.classList.contains("e-datepicker")||i.classList.contains("e-checkbox")||i.classList.contains("e-dropdownlist")||i.classList.contains("e-multiselect")||i.classList.contains("e-numerictextbox"))&&(n=i.ej2_instances),n&&n[0]&&n[0].destroy()}this.buttonObj&&this.buttonObj.destroy()},i.prototype.detachComponents=function(){for(var t=0,i=this.getFormElements(cn);t<i.length;t++){var n=i[t];(0,e.detach)(n)}},i.prototype.destroy=function(t){if(this.parent&&!this.parent.isDestroyed&&this.parent.resetTemplates(["editorTemplate","editorHeaderTemplate","editorFooterTemplate"]),this.destroyComponents(),this.recurrenceEditor&&(this.recurrenceEditor.destroy(),(0,e.detach)(this.recurrenceEditor.element),this.recurrenceEditor=null),this.fieldValidator&&(this.fieldValidator.destroy(),this.fieldValidator=null),this.repeatDialogObject&&(this.repeatDialogObject.destroy(),this.repeatDialogObject=null),this.detachComponents(),this.dialogObject){if(this.dialogObject.element){var i=this.dialogObject.element.querySelector("form");be(i),(0,e.detach)(i),e.EventHandler.remove(this.dialogObject.element,"keydown",this.preventEventSave)}this.dialogObject.destroy(),this.dialogObject=null}this.element&&((0,e.remove)(this.element),this.element=null),t||(this.l10n=null,this.parent=null,this.fields=null,this.buttonObj=null,this.repeatStatus=null,this.eventWindowTime=null,this.dialogEvent=null)},i}(),Ks=function(){function t(e){this.translateY=0,this.itemSize=60,this.bufferCount=3,this.renderedLength=0,this.averageRowHeight=0,this.startIndex=0,this.parent=e,this.addEventListener()}return t.prototype.addEventListener=function(){!this.parent||this.parent&&this.parent.isDestroyed||this.parent.on(F,this.virtualScrolling,this)},t.prototype.removeEventListener=function(){!this.parent||this.parent&&this.parent.isDestroyed||this.parent.off(F,this.virtualScrolling)},t.prototype.getRenderedCount=function(){this.setItemSize();var e=this.isHorizontalScroll?this.parent.element.clientWidth:this.parent.element.clientHeight;return this.renderedLength=Math.ceil(e/this.itemSize)+this.bufferCount,this.renderedLength},t.prototype.renderVirtualTrack=function(t){var i=(0,e.createElement)("div",{className:Kt});if(this.isHorizontalScroll){var n=this.parent.activeView.colLevels[this.parent.activeView.colLevels.length-1].length;i.style.width=n*this.itemSize+"px"}else i.style.height=this.parent.resourceBase.expandedResources.length*this.itemSize+"px";t.appendChild(i)},t.prototype.updateVirtualScrollHeight=function(){var e=this.parent.element.querySelector("."+Kt),t=this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1].groupIndex;if(this.parent.resourceBase.renderedResources[this.parent.resourceBase.renderedResources.length-1].groupIndex!==t){var i=this.parent.element.querySelector("."+We);this.renderedLength=i.querySelector("tbody").children.length,e.style.height=i.offsetHeight+(this.parent.resourceBase.expandedResources.length-this.renderedLength)*i.offsetHeight/this.renderedLength+"px";var n=this.parent.element.querySelector("."+Qt);n.scrollHeight-n.scrollTop<n.offsetHeight*this.bufferCount&&(e.style.height=parseInt(e.style.height,10)+n.offsetHeight*this.bufferCount+"px")}else e.style.height="";this.averageRowHeight=e.offsetHeight/this.parent.resourceBase.expandedResources.length},t.prototype.updateVirtualTrackHeight=function(e){var t=this.parent.resourceBase.renderedResources.length;if(t!==this.getRenderedCount()){e.style.height=this.parent.element.querySelector(".e-content-wrap").clientHeight+"px";var i=this.parent.element.querySelector("."+pt),n=this.parent.element.querySelector("."+Qt),r=this.parent.element.querySelector("."+st);this.translateY=0,this.setTranslate(i,n,r)}else{var a=this.parent.resourceBase.renderedResources[t-1].groupIndex,s=t+(this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1].groupIndex-a);s=s>this.parent.resourceBase.expandedResources.length?this.parent.resourceBase.expandedResources.length:s,e.style.height=s*this.itemSize+"px"}},t.prototype.setItemSize=function(){this.isHorizontalScroll?this.itemSize=K(this.parent.activeView.element,ze)||this.itemSize:this.itemSize=Q(this.parent.activeView.element,ze)||this.itemSize},t.prototype.refreshLayout=function(){var e=this.parent.uiStateValues.scheduleHeight;this.parent.uiStateValues.scheduleHeight=this.parent.element.offsetHeight;var t=this.renderedLength;if(this.parent.uiStateValues.scheduleHeight!==e){t<this.getRenderedCount()&&(this.isRemoteRefresh=!0);var i=this.parent.element.querySelector("."+pt),n=this.parent.element.querySelector("."+Qt),r=this.parent.element.querySelector("."+st),a=parseInt(i.querySelector("tbody td").getAttribute("data-group-index"),10),s=a+this.renderedLength;a=(a=s>this.parent.resourceBase.expandedResources.length?this.parent.resourceBase.expandedResources.length-this.renderedLength:a)<0?0:a,this.parent.resourceBase.renderedResources=this.parent.resourceBase.expandedResources.slice(a,s),this.parent.resourceBase.renderedResources.length>0&&this.updateContent(i,n,r,this.parent.resourceBase.renderedResources)}},t.prototype.renderEvents=function(){this.setTabIndex();var e=this.triggerScrollEvent(k);if(this.parent.activeViewOptions&&this.parent.activeViewOptions.enableLazyLoading&&this.parent.crudModule)return e.length>0?(this.parent.crudModule.refreshProcessedData(!0,e),void this.parent.hideSpinner()):void this.parent.crudModule.refreshDataManager();this.parent.crudModule&&this.parent.crudModule.refreshProcessedData(!0),"Month"!==this.parent.currentView&&this.parent.notify(N,{}),this.parent.hideSpinner()},t.prototype.virtualScrolling=function(){var t=this;this.parent.quickPopup&&(this.parent.quickPopup.quickPopupHide(),this.parent.quickPopup.morePopup.hide());var i=this.parent.element.querySelector("."+Qt);if(this.isHorizontalScroll)this.horizontalScrolling(i);else{var n=this.parent.element.querySelector("."+pt),r=this.parent.element.querySelector("."+st),a=this.parent.element.querySelector("."+bt),s=this.parent.element.querySelector("."+We);this.parent.rowAutoHeight||(0,e.addClass)([i,n],"e-transition"),this.renderedLength=n.querySelector("tbody").children.length;var o=parseInt(n.querySelector("tbody td").getAttribute("data-group-index"),10),l=this.parent.rowAutoHeight?s.offsetHeight-i.offsetHeight:this.bufferCount*this.itemSize,p=[];if(i.scrollTop-this.translateY<0?p=this.upScroll(i,o):i.scrollTop-this.translateY>l&&(p=this.downScroll(i,o)),!(0,e.isNullOrUndefined)(p)&&p.length>0){this.triggerScrollEvent(M);var c=this.parent.getSelectedCells();this.focusedEle=c[c.length-1]||this.focusedEle,this.updateContent(n,i,r,p),this.setTranslate(n,i,r,a),this.parent.dragAndDropModule&&"drag"===this.parent.dragAndDropModule.actionObj.action&&this.parent.dragAndDropModule.navigationWrapper(),window.clearTimeout(this.timeValue),this.timeValue=window.setTimeout((function(){t.renderEvents()}),250)}}},t.prototype.horizontalScrolling=function(t){var i=this,n=[],r=this.bufferCount*this.itemSize;if(Math.abs(t.scrollLeft)-Math.abs(this.translateY)<0?n=this.leftScroll(t):Math.abs(t.scrollLeft)-Math.abs(this.translateY)>r&&(n=this.rightScroll(t)),!(0,e.isNullOrUndefined)(n)&&n.length>0){if(this.parent.resourceBase.expandedResources.length!==n.length||this.parent.resourceBase.expandedResources[0]!==n[0]||this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1]!==n[n.length-1]){this.triggerScrollEvent(M);var a=this.parent.activeView.colLevels.slice(0);this.updateHorizontalContent(t,n),(0,e.setStyleAttribute)(t.querySelector("table"),{transform:"translateX("+this.translateY+"px)"}),this.parent.activeView.colLevels=a,this.parent.dragAndDropModule&&"drag"===this.parent.dragAndDropModule.actionObj.action&&this.parent.dragAndDropModule.navigationWrapper()}window.clearTimeout(this.timeValue),this.timeValue=window.setTimeout((function(){i.renderEvents()}),250)}},t.prototype.triggerScrollEvent=function(t){var i=this,n=[];if(!this.parent.activeView)return n;var r={startDate:this.parent.activeView.startDate(),endDate:this.parent.activeView.endDate(),startIndex:this.parent.resourceBase.renderedResources[0].groupIndex,endIndex:this.parent.resourceBase.renderedResources[this.parent.resourceBase.renderedResources.length-1].groupIndex,resourceData:this.parent.resourceBase.renderedResources.map((function(e){return e.resourceData})),name:t};return this.parent.trigger(t,r,(function(r){t===M?i.parent.showSpinner():t===k&&!(0,e.isNullOrUndefined)(r.eventData)&&r.eventData.length>0&&(n=r.eventData)})),n},t.prototype.upScroll=function(e,t){var i=0;i=~~(e.scrollTop/this.itemSize)+Math.ceil(e.clientHeight/this.itemSize)-this.renderedLength,this.parent.rowAutoHeight&&(i=i>t?t-this.bufferCount:i),i=i>0?i:0;var n=this.getBufferCollection(i,i+this.renderedLength);if(this.parent.resourceBase.renderedResources=n,0===t)this.translateY=e.scrollTop;else{var r=this.parent.rowAutoHeight?this.averageRowHeight:this.itemSize;r=r>0?r:this.itemSize,this.translateY=e.scrollTop-this.bufferCount*r>0?e.scrollTop-this.bufferCount*r:0}return n},t.prototype.downScroll=function(e,t){if(this.parent.resourceBase.renderedResources[this.parent.resourceBase.renderedResources.length-1].groupIndex===this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1].groupIndex)return null;var i=0;i=~~(e.scrollTop/this.itemSize),this.parent.rowAutoHeight&&(i=(i=~~((e.scrollTop-this.translateY)/this.averageRowHeight)+t)>t+this.bufferCount?i:t+this.bufferCount);var n=i+this.renderedLength;n=n>this.parent.resourceBase.expandedResources.length?i+(this.parent.resourceBase.expandedResources.length-i):n;var r=this.getBufferCollection(n-this.renderedLength,n);return this.translateY=e.scrollTop,r},t.prototype.leftScroll=function(e){var t=0;return t=(t=~~(Math.abs(e.scrollLeft)/this.itemSize)+Math.ceil(e.clientWidth/this.itemSize)-this.renderedLength)>0?t:0,this.getCollection(t,t+this.renderedLength)},t.prototype.rightScroll=function(e){var t=this.parent.activeView.colLevels[this.parent.activeView.colLevels.length-1],i=~~(Math.abs(e.scrollLeft)/this.itemSize)+this.renderedLength;return i=i>t.length-1?t.length-1:i,this.getCollection(i-this.renderedLength,i)},t.prototype.getCollection=function(e,t){this.translateY=e*this.itemSize;var i=this.getResCollection(e,t);return this.parent.enableRtl&&(this.translateY=-this.translateY),i},t.prototype.getResCollection=function(e,t){var i=this.parent.activeView.colLevels[this.parent.activeView.colLevels.length-1],n=[],r={startIndex:0,endIndex:0};if(this.parent.activeViewOptions.group.byDate){if(i[parseInt(e.toString(),10)].date.getTime()===this.parent.resourceBase.expandedResources[0].date.getTime()&&i[parseInt(t.toString(),10)].date.getTime()===this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1].date.getTime())return this.parent.resourceBase.expandedResources;n=this.getByDateCollection(i[parseInt(e.toString(),10)],i[parseInt(t.toString(),10)],r),this.setRenderedDates(n)}else{if(i[parseInt(e.toString(),10)].groupIndex===this.parent.resourceBase.expandedResources[0].groupIndex&&i[parseInt(t.toString(),10)].groupIndex===this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1].groupIndex)return this.parent.resourceBase.expandedResources;n=this.getByIdCollection(i[parseInt(e.toString(),10)],i[parseInt(t.toString(),10)],r)}return"Month"!==this.parent.currentView&&(this.startIndex=r.startIndex,n=i.slice(r.startIndex,r.endIndex)),this.translateY=r.startIndex*this.itemSize,n},t.prototype.getByDateCollection=function(e,t,i){var n=this.parent.activeView.colLevels[0].filter((function(i){return e.date.getTime()<=i.date.getTime()&&i.date.getTime()<=t.date.getTime()}));return this.setStartEndIndex(this.parent.activeView.colLevels[0],n[0],n[n.length-1],i),n},t.prototype.getByIdCollection=function(e,t,i){var n=this.parent.resourceBase.lastResourceLevel.filter((function(i){return e.groupIndex<=i.groupIndex&&i.groupIndex<=t.groupIndex}));return this.parent.resourceBase.renderedResources=n,this.setStartEndIndex(this.parent.resourceBase.lastResourceLevel,n[0],n[n.length-1],i),n},t.prototype.setStartEndIndex=function(e,t,i,n){var r=0;e.filter((function(e){t===e?n.startIndex=r:i===e&&(n.endIndex=r+e.colSpan),r+=e.colSpan})),t===i&&(n.endIndex=n.startIndex+i.colSpan)},t.prototype.updateContent=function(t,i,n,r){var a=t.querySelector("tbody").children.length;document.activeElement&&document.activeElement.classList.contains(mt)&&(this.isResourceCell=!0,this.parent.element.focus());for(var s=0;s<a;s++)(0,e.remove)(t.querySelector("tbody tr")),(0,e.remove)(i.querySelector("tbody tr")),(0,e.remove)(n.querySelector("div"));this.parent.resourceBase.renderedResources=r;var o=this.parent.resourceBase.getContentRows(r,!0),l=this.parent.activeView.getContentRows(),p=this.parent.activeView.getEventRows(r.length);(0,e.append)(o,t.querySelector("tbody")),(0,e.append)(l,i.querySelector("tbody")),(0,e.append)(p,n)},t.prototype.updateHorizontalContent=function(t,i){this.parent.resourceBase.expandedResources=i;var n=this.parent.getSelectedCells();this.focusedEle=n[n.length-1]||this.focusedEle;for(var r=t.querySelectorAll("tbody tr").length,a=0;a<r;a++)(0,e.remove)(t.querySelector("tbody tr"));if("Month"===this.parent.currentView){this.parent.activeViewOptions.group.byDate?this.parent.activeView.colLevels[0]=i:this.parent.activeView.colLevels[this.parent.activeView.colLevels.length-2]=i;var s=this.parent.activeView.getContentRows();(0,e.append)(s,t.querySelector("tbody"))}else{var o=[].slice.call(t.querySelector("colgroup").children);for(a=0;a<o.length;a++)(0,e.remove)(o[parseInt(a.toString(),10)]);this.parent.activeView.colLevels[this.parent.activeView.colLevels.length-1]=i;s=this.parent.activeView.getContentRows();var l=t.querySelector("table"),p=t.querySelector("thead"),c=t.querySelector("colgroup");i.forEach((function(){c.appendChild((0,e.createElement)("col"))})),p.appendChild(this.parent.eventBase.createEventWrapper("",this.startIndex>0?this.startIndex:0)),this.parent.activeViewOptions.timeScale.enable&&p.appendChild(this.parent.eventBase.createEventWrapper("timeIndicator")),(0,e.prepend)([p],l),(0,e.append)(s,t.querySelector("tbody"))}},t.prototype.getBufferCollection=function(e,t){return this.parent.resourceBase.expandedResources.slice(e,t)},t.prototype.setTranslate=function(t,i,n,r){(0,e.setStyleAttribute)(t.querySelector("table"),{transform:"translateY("+this.translateY+"px)"}),(0,e.setStyleAttribute)(i.querySelector("table"),{transform:"translateY("+this.translateY+"px)"}),(0,e.setStyleAttribute)(n,{transform:"translateY("+this.translateY+"px)"}),(0,e.isNullOrUndefined)(r)||(0,e.setStyleAttribute)(r,{transform:"translateY("+this.translateY+"px)"})},t.prototype.updateFocusedWorkCell=function(){if(this.focusedEle){var e=parseInt(this.focusedEle.getAttribute("data-date"),10),t=parseInt(this.focusedEle.getAttribute("data-group-index"),10),i=this.parent.element.querySelector("."+ze+'[data-date="'+e+'"][data-group-index="'+t+'"]');i&&this.parent.addSelectedClass([i],i,!0),this.focusedEle=null}},t.prototype.setRenderedDates=function(e){if("Month"!==this.parent.currentView){var t=e.map((function(e){return e.date}));this.parent.resourceBase.renderedResources.forEach((function(e){return e.renderDates=t}))}else{var i=e.map((function(e){return e.date.getDay()})),n=this.parent.activeView.renderDates.filter((function(e){return i.indexOf(e.getDay())>=0}));this.parent.resourceBase.renderedResources.forEach((function(e){return e.renderDates=n}))}},t.prototype.setTabIndex=function(){var e=this.parent.element.querySelector("."+pt),t=[].slice.call(this.parent.element.querySelectorAll("."+mt));t&&e&&t.forEach((function(t){t.getBoundingClientRect().top>=e.getBoundingClientRect().top&&t.setAttribute("tabindex","0")}));var i=this.parent.element.querySelector("."+mt+'[tabindex="0"]');this.isResourceCell&&i&&(i.focus(),this.isResourceCell=!1)},t.prototype.destroy=function(){this.removeEventListener(),this.focusedEle=null},t}(),Zs=function(){function t(e){this.parent=e}return t.prototype.render=function(e,t){void 0===t&&(t=!0),this.initializeLayout(e),this.parent.activeView&&t&&this.parent.crudModule.refreshDataManager()},t.prototype.initializeLayout=function(t){if(this.parent.activeView){var i=["cellTemplate","tooltipTemplate","majorSlotTemplate","minorSlotTemplate","headerTooltipTemplate","dateHeaderTemplate","dayHeaderTemplate","monthHeaderTemplate","headerIndentTemplate","resourceHeaderTemplate","cellHeaderTemplate","dateRangeTemplate"];this.parent.activeEventTemplates.length>0?(i=i.concat(this.parent.activeEventTemplates),this.parent.activeEventTemplates=[]):i.push("eventTemplate"),this.parent.resetTemplates(i),this.parent.activeView.removeEventListener(),this.parent.activeView.destroy()}switch(t){case"Day":this.parent.activeView=this.parent.dayModule;break;case"Week":this.parent.activeView=this.parent.weekModule;break;case"WorkWeek":this.parent.activeView=this.parent.workWeekModule;break;case"Month":this.parent.activeView=this.parent.monthModule;break;case"Year":this.parent.activeView=this.parent.yearModule;break;case"Agenda":this.parent.activeView=this.parent.agendaModule;break;case"MonthAgenda":this.parent.activeView=this.parent.monthAgendaModule;break;case"TimelineDay":this.parent.activeView=this.parent.timelineViewsModule,(0,e.isNullOrUndefined)(this.parent.activeView)||(this.parent.activeView.viewClass="e-timeline-day-view");break;case"TimelineWorkWeek":this.parent.activeView=this.parent.timelineViewsModule,(0,e.isNullOrUndefined)(this.parent.activeView)||(this.parent.activeView.viewClass="e-timeline-work-week-view");break;case"TimelineWeek":this.parent.activeView=this.parent.timelineViewsModule,(0,e.isNullOrUndefined)(this.parent.activeView)||(this.parent.activeView.viewClass="e-timeline-week-view");break;case"TimelineMonth":this.parent.activeView=this.parent.timelineMonthModule;break;case"TimelineYear":this.parent.activeView=this.parent.timelineYearModule}if((0,e.isNullOrUndefined)(this.parent.activeView)){var n=this.parent.viewCollections[0].option;if(n)return this.parent.setProperties({currentView:n},!0),this.parent.headerModule&&(this.parent.headerModule.updateActiveView(),this.parent.headerModule.setCalendarView()),console.warn('[WARNING] :: Module "'+t+'" is not available in Schedule component! You either misspelled the module name or forgot to load it.'),this.initializeLayout(n);throw Error("Inject required modules")}this.parent.uiStateValues.scheduleHeight=this.parent.element.offsetHeight,this.parent.activeView.viewIndex=this.parent.viewIndex,this.updateLabelText(t),this.parent.activeView.addEventListener(),this.parent.activeView.getRenderDates(),this.parent.uiStateValues.isGroupAdaptive=this.parent.activeViewOptions.group.resources.length>0&&(this.parent.enableAdaptiveUI&&!this.parent.isAdaptive||this.parent.isAdaptive&&this.parent.activeViewOptions.group.enableCompactView),this.parent.virtualScrollModule&&(this.parent.virtualScrollModule.destroy(),this.parent.virtualScrollModule=null),(-1===["Agenda","MonthAgenda","Year","TimelineYear"].indexOf(this.parent.currentView)||"TimelineYear"===this.parent.currentView&&"Vertical"===this.parent.activeViewOptions.orientation)&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(this.parent.virtualScrollModule=new Ks(this.parent),this.parent.activeView.isTimelineView()?this.parent.uiStateValues.top=0:(this.parent.virtualScrollModule.isHorizontalScroll=!0,this.parent.uiStateValues.left=0)),this.updateHeader(),this.parent.currentTimezoneDate=this.parent.getCurrentTime(),this.parent.activeView.renderLayout(et),this.parent.renderTemplates(),this.parent.eventTooltip&&(this.parent.eventTooltip.destroy(),this.parent.eventTooltip=null),(this.parent.eventSettings.enableTooltip||this.parent.activeViewOptions.group.resources.length>0&&this.parent.activeViewOptions.group.headerTooltipTemplate)&&(this.parent.eventTooltip=new Ia(this.parent))},t.prototype.updateHeader=function(){this.parent.headerModule&&(this.parent.headerModule.setDayOfWeek(this.parent.activeViewOptions.firstDayOfWeek),this.parent.activeViewOptions.readonly?(0,e.addClass)([this.parent.element],er):this.parent.element.classList.contains(er)&&(0,e.removeClass)([this.parent.element],er),this.parent.headerModule.updateDateRange(),this.parent.headerModule.updateHeaderItems("remove"))},t.prototype.updateLabelText=function(e){this.parent.element.setAttribute("role","application"),this.parent.element.removeAttribute("aria-labelledby"),this.parent.element.removeAttribute("aria-label"),"Year"===e?this.parent.element.setAttribute("aria-label",this.parent.activeView.getLabelText(e)):this.parent.element.setAttribute("aria-labelledby",this.parent.element.id+"_table")},t}(),Js=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),$s=function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},eo=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Js(i,t),$s([(0,e.Property)(!0)],i.prototype,"highlight",void 0),$s([(0,e.Property)("09:00")],i.prototype,"start",void 0),$s([(0,e.Property)("18:00")],i.prototype,"end",void 0),i}(e.ChildProperty),to=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),io=function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},no=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return to(i,t),io([(0,e.Property)(!0)],i.prototype,"enable",void 0),io([(0,e.Property)(60)],i.prototype,"interval",void 0),io([(0,e.Property)(2)],i.prototype,"slotCount",void 0),io([(0,e.Property)()],i.prototype,"minorSlotTemplate",void 0),io([(0,e.Property)()],i.prototype,"majorSlotTemplate",void 0),i}(e.ChildProperty),ro=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ao=function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},so=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ro(i,t),ao([(0,e.Property)("Both")],i.prototype,"templateType",void 0),ao([(0,e.Property)()],i.prototype,"header",void 0),ao([(0,e.Property)()],i.prototype,"content",void 0),ao([(0,e.Property)()],i.prototype,"footer",void 0),i}(e.ChildProperty),oo=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),lo=function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},po=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return oo(i,t),lo([(0,e.Property)()],i.prototype,"option",void 0),lo([(0,e.Property)()],i.prototype,"template",void 0),i}(e.ChildProperty),co=function(){function t(e){this.parent=e,this.crudObj={sourceEvent:null,targetEvent:null,isCrudAction:!1}}return t.prototype.getQuery=function(){var e=this.parent.activeView.startDate(),t=this.parent.activeView.endDate();return this.parent.dataModule.generateQuery(e,t)},t.prototype.getTable=function(){return this.parent.eventSettings.query?this.parent.eventSettings.query.clone().fromTable:null},t.prototype.refreshDataManager=function(){var e=this;if(this.parent.activeView){if(this.parent.uiStateValues&&this.parent.uiStateValues.isPreventEventRefresh)return this.parent.uiStateValues.isPreventEventRefresh=!1,this.parent.refreshEvents(!1),void this.parent.hideSpinner();var t=this.parent.activeView.startDate(),i=this.parent.activeView.endDate();this.parent.dataModule.getData(this.parent.dataModule.generateQuery(t,i)).then((function(t){return e.dataManagerSuccess(t)})).catch((function(t){return e.dataManagerFailure(t)}))}},t.prototype.dataManagerSuccess=function(t){var i=this;!this.parent||this.parent&&this.parent.isDestroyed||this.parent.trigger(T,t,(function(t){if(!t.cancel){var n=(0,e.extend)([],t.result,null,!0);i.parent.eventsData=n.filter((function(e){return!e[i.parent.eventFields.isBlock]})),i.parent.blockData=n.filter((function(e){return e[i.parent.eventFields.isBlock]})),i.refreshProcessedData(),i.parent.dragAndDropModule&&"drag"===i.parent.dragAndDropModule.actionObj.action&&i.parent.dragAndDropModule.navigationWrapper(),i.parent.trigger(w,null,(function(){i.parent.hideSpinner(),i.parent.isPrinting&&setTimeout((function(){i.parent.notify(P,{})}),100)}))}}))},t.prototype.dataManagerFailure=function(e){var t=this;!this.parent||this.parent&&this.parent.isDestroyed||this.parent.trigger(h,{error:e},(function(){return t.parent.hideSpinner()}))},t.prototype.refreshProcessedData=function(t,i){if(void 0===t&&(t=!1),this.parent.dragAndDropModule&&(this.parent.dragAndDropModule.actionObj.action="",(0,e.removeClass)([this.parent.element],"e-event-action")),this.parent.activeViewOptions&&this.parent.activeViewOptions.eventTemplate){var n=["eventTemplate"];if(this.crudObj.isCrudAction&&-1===["Agenda","MonthAgenda","Year","TimelineYear"].indexOf(this.parent.currentView)){n=[];for(var r=0,a=this.crudObj.sourceEvent.length;r<a;r++)n.push("eventTemplate_"+this.crudObj.sourceEvent[parseInt(r.toString(),10)].groupIndex),this.crudObj.targetEvent[parseInt(r.toString(),10)]&&this.crudObj.sourceEvent[parseInt(r.toString(),10)].groupIndex!==this.crudObj.targetEvent[parseInt(r.toString(),10)].groupIndex&&n.push("eventTemplate_"+this.crudObj.targetEvent[parseInt(r.toString(),10)].groupIndex)}n.length>0&&this.parent.resetTemplates(n)}if(t)this.parent.notify(j,{processedData:i?this.parent.eventBase.processData(i):this.parent.eventsProcessed});else{var s=this.parent.eventsData||[],o=this.parent.blockData||[],l=s.concat(o);this.parent.notify(j,{processedData:this.parent.eventBase?this.parent.eventBase.processData(l):[]})}},t.prototype.refreshData=function(t){var i=this,n={requestType:t.requestType,cancel:!1,data:t.data,addedRecords:t.editParams.addedRecords,changedRecords:t.editParams.changedRecords,deletedRecords:t.editParams.deletedRecords};if(this.parent.dragAndDropModule&&this.parent.dragAndDropModule.actionObj&&this.parent.dragAndDropModule.actionObj.element&&(this.parent.dragAndDropModule.actionObj.element.style.display="none"),this.parent.resizeModule&&this.parent.resizeModule.actionObj&&this.parent.resizeModule.actionObj.element&&(this.parent.resizeModule.actionObj.element.style.display="none"),this.parent.isSpecificResourceEvents()&&("eventCreated"===t.requestType||"eventRemoved"===t.requestType)){this.crudObj.isCrudAction=!0,this.crudObj.sourceEvent=[];for(var r=t.data instanceof Array?0===t.data.length&&"eventRemoved"===t.requestType?t.editParams.deletedRecords:t.data:"string"!=typeof t.data&&"number"!=typeof t.data||"eventRemoved"!==t.requestType?[t.data]:t.editParams.deletedRecords,a=function(i){s.crudObj.isCrudAction=!("eventRemoved"===t.requestType&&!(0,e.isNullOrUndefined)(i.parent));var n=s.parent.eventBase.getGroupIndexFromEvent(i);n>-1&&0===s.parent.crudModule.crudObj.sourceEvent.filter((function(e){return e.groupIndex===n})).length&&s.crudObj.isCrudAction&&s.crudObj.sourceEvent.push(s.parent.resourceBase.lastResourceLevel[parseInt(n.toString(),10)])},s=this,o=0,l=r;o<l.length;o++){a(l[o])}this.crudObj.targetEvent=this.crudObj.sourceEvent}this.parent.dataModule.dataManager.dataSource.offline?this.parent.trigger(c,n,(function(e){e.cancel||i.refreshDataManager()})):t.promise.then((function(){!i.parent||i.parent&&i.parent.isDestroyed||i.parent.trigger(c,n,(function(e){e.cancel||i.refreshDataManager()}))})).catch((function(e){!i.parent||i.parent&&i.parent.isDestroyed||i.parent.trigger(h,{error:e})}))},t.prototype.addEvent=function(t){var i=this;if(this.parent.eventSettings.allowAdding&&!this.parent.activeViewOptions.readonly){if(!this.isBlockEvent(t)&&this.parent.eventBase.isBlockRange(t))return void this.parent.quickPopup.openValidationError("blockAlert",t);var n=t instanceof Array?t:[t];if(0===n.length)return;var r={requestType:"eventCreate",cancel:!1,data:n,addedRecords:n,changedRecords:[],deletedRecords:[]};this.parent.trigger(p,r,(function(t){if(!t.cancel){var n=i.parent.eventFields,r={addedRecords:[],changedRecords:[],deletedRecords:[]},a=void 0;if(t.addedRecords instanceof Array){for(var s=0,o=t.addedRecords;s<o.length;s++){var l=o[s];l=i.parent.eventBase.updateEventDateTime(l);var p=(0,e.extend)({},i.parent.eventBase.processTimezone(l,!0),null,!0);r.addedRecords.push(p)}a=i.parent.dataModule.dataManager.saveChanges(r,n.id,i.getTable(),i.getQuery())}else{var c=i.parent.eventBase.processTimezone(t.addedRecords,!0);r.addedRecords.push(c),a=i.parent.dataModule.dataManager.insert(c,i.getTable(),i.getQuery())}var h={requestType:"eventCreated",cancel:!1,data:t.addedRecords,promise:a,editParams:r};i.refreshData(h)}}))}},t.prototype.saveEvent=function(t,i){var n=this;if(this.parent.eventSettings.allowEditing&&!this.parent.activeViewOptions.readonly){if("EditFollowingEvents"!==this.parent.currentAction&&!this.isBlockEvent(t)&&this.parent.eventBase.isBlockRange(t))return this.parent.quickPopup.openValidationError("blockAlert",t),void(this.parent.crudModule.crudObj.isCrudAction=!1);var r=t instanceof Array?t:[t];if(0===r.length)return;if(this.parent.currentAction=i,i)switch(i){case"Save":this.processSave(t);break;case"EditOccurrence":this.processOccurrences(t,i);break;case"EditFollowingEvents":this.processFollowSeries(t,i);break;case"EditSeries":this.processEntireSeries(t,i)}else{var a={requestType:"eventChange",cancel:!1,data:t,addedRecords:[],changedRecords:r,deletedRecords:[]};this.parent.trigger(p,a,(function(t){if(!t.cancel){var i=void 0,r=n.parent.eventFields,a={addedRecords:[],changedRecords:[],deletedRecords:[]};if(t.changedRecords instanceof Array){for(var s=0,o=t.changedRecords;s<o.length;s++){var l=o[s];l=n.parent.eventBase.updateEventDateTime(l);var p=(0,e.extend)({},n.parent.eventBase.processTimezone(l,!0),null,!0);a.changedRecords.push(p)}i=n.parent.dataModule.dataManager.saveChanges(a,r.id,n.getTable(),n.getQuery())}else{var c=n.parent.eventBase.processTimezone(t.changedRecords,!0);a.changedRecords.push(c),i=n.parent.dataModule.dataManager.update(r.id,c,n.getTable(),n.getQuery())}var h=(0,e.extend)({},t.changedRecords[t.changedRecords.length-1],null,!0);n.parent.eventBase.selectWorkCellByTime([n.parent.eventBase.processTimezone(h)]);var d={requestType:"eventChanged",cancel:!1,data:t.changedRecords,promise:i,editParams:a};n.refreshData(d)}}))}}},t.prototype.deleteEvent=function(e,t){var i=this;if(this.parent.eventSettings.allowDeleting&&!this.parent.activeViewOptions.readonly){this.parent.currentAction=t;var n=[];if(0===(n="string"==typeof e||"number"==typeof e?this.parent.eventsData.filter((function(t){return t[i.parent.eventFields.id]===e})):e instanceof Array?e:[e]).length)return;if(t)switch(t){case"Delete":this.processDelete(n);break;case"DeleteOccurrence":this.processOccurrences(n,t);break;case"DeleteFollowingEvents":this.processFollowSeries(n,t);break;case"DeleteSeries":this.processEntireSeries(n,t)}else{var r={requestType:"eventRemove",cancel:!1,data:e,addedRecords:[],changedRecords:[],deletedRecords:n};this.parent.trigger(p,r,(function(e){if(!e.cancel){var t=void 0,n=i.parent.eventFields,r={addedRecords:[],changedRecords:[],deletedRecords:[]};e.deletedRecords.length>1?(r.deletedRecords=r.deletedRecords.concat(e.deletedRecords),t=i.parent.dataModule.dataManager.saveChanges(r,n.id,i.getTable(),i.getQuery())):(r.deletedRecords.push(e.deletedRecords[0]),t=i.parent.dataModule.dataManager.remove(n.id,e.deletedRecords[0],i.getTable(),i.getQuery())),i.parent.eventBase.selectWorkCellByTime(e.deletedRecords);var a={requestType:"eventRemoved",cancel:!1,data:e.deletedRecords,promise:t,editParams:r};i.refreshData(a)}}))}}},t.prototype.processOccurrences=function(t,i){var n=this,r=[],a=!1;if(t instanceof Array)for(var s=0,o=t;s<o.length;s++){var l=o[s];r.push({occurrence:l,parent:this.getParentEvent(l)})}else r={occurrence:t,parent:this.getParentEvent(t)};var c={requestType:"EditOccurrence"===i?"eventChange":"eventRemove",cancel:!1,addedRecords:[],changedRecords:t instanceof Array?t:[t],deletedRecords:[]};c.data=r,this.parent.trigger(p,c,(function(t){if(!t.cancel){for(var s=n.parent.eventFields,o={addedRecords:[],changedRecords:[],deletedRecords:[]},l=r instanceof Array?r:[r],p=function(e,r){var p=t.changedRecords[parseInt(e.toString(),10)],c=l[parseInt(e.toString(),10)].parent,h=c[s.recurrenceException],d=void 0,u=void 0;switch(i){case"EditOccurrence":d=n.parent.eventsProcessed.filter((function(e){return e.Guid===p.Guid}))[0],(u=n.excludeDateCheck(d[s.startTime],h))!==c[s.recurrenceException]?(c[s.recurrenceException]=u,p[s.recurrenceException]=va(d[s.startTime]),p[s.recurrenceID]=c[s.id],p[s.followingID]=null,o.changedRecords.push(n.parent.eventBase.processTimezone(c,!0)),o.addedRecords.push(n.parent.eventBase.processTimezone(p,!0))):o.changedRecords.push(n.parent.eventBase.processTimezone(p,!0));break;case"DeleteOccurrence":p[s.recurrenceException]||(c[s.recurrenceException]=n.excludeDateCheck(p[s.startTime],h),o.changedRecords.push(n.parent.eventBase.processTimezone(c,!0))),p[s.id]!==c[s.id]&&(o.deletedRecords.push(p),a=!0)}},c=0,h=t.changedRecords.length;c<h;c++)p(c);var d=n.parent.dataModule.dataManager.saveChanges(o,s.id,n.getTable(),n.getQuery()),u=(0,e.extend)({},t.changedRecords[t.changedRecords.length-1],null,!0);n.parent.eventBase.selectWorkCellByTime("EditOccurrence"===i?[n.parent.eventBase.processTimezone(u)]:[u]);var g={requestType:"EditOccurrence"===i?"eventChanged":"eventRemoved",cancel:!1,data:a?t.deletedRecords:t.changedRecords,promise:d,editParams:o};n.refreshData(g)}}))},t.prototype.processFollowSeries=function(t,i){var n=this,r=[];if(t instanceof Array)for(var a=0,s=t;a<s.length;a++){var o=s[a];r.push({occurrence:o,parent:this.getParentEvent(o)})}else r={occurrence:t,parent:this.getParentEvent(t)};var l={requestType:"EditFollowingEvents"===i?"eventChange":"eventRemove",cancel:!1,addedRecords:[],changedRecords:t instanceof Array?t:[t],deletedRecords:[]};l.data=r,this.parent.trigger(p,l,(function(t){if(!t.cancel){for(var a=n.parent.eventFields,s={addedRecords:[],changedRecords:[],deletedRecords:[]},o=r instanceof Array?r:[r],l=function(e,r){var l=t.changedRecords[parseInt(e.toString(),10)],p=o[parseInt(e.toString(),10)].parent,c=n.parent.eventBase.getEventCollections(p,l),h=void 0;switch(i){case"EditFollowingEvents":if(n.processRecurrenceRule(p,l),h=!n.parent.eventBase.isFollowingEvent(p,l),l[a.followingID]=h?null:p[a.id],l[a.recurrenceID]=null,s.addedRecords.push(n.parent.eventBase.processTimezone(l,!0)),s.changedRecords.push(n.parent.eventBase.processTimezone(p,!0)),!n.parent.uiStateValues.isIgnoreOccurrence){if(l[a.recurrenceException]=null,c.occurrence.length>0){var d=c.occurrence.slice(-1)[0][a.recurrenceRule];-1===d.indexOf("COUNT")&&(l[a.recurrenceRule]=d)}c.follow.length>0&&(l[a.recurrenceRule]=c.follow.slice(-1)[0][a.recurrenceRule],s.deletedRecords=s.deletedRecords.concat(c.follow)),h&&(c.occurrence=c.occurrence.filter((function(e){return e[a.recurrenceID]===p[a.id]}))),s.deletedRecords=s.deletedRecords.concat(c.occurrence)}break;case"DeleteFollowingEvents":n.processRecurrenceRule(p,l[a.startTime]),s.changedRecords.push(n.parent.eventBase.processTimezone(p,!0)),s.deletedRecords=s.deletedRecords.concat(c.occurrence).concat(c.follow)}},p=0,c=t.changedRecords.length;p<c;p++)l(p);var h=n.parent.dataModule.dataManager.saveChanges(s,a.id,n.getTable(),n.getQuery()),d=(0,e.extend)({},t.changedRecords[t.changedRecords.length-1],null,!0);n.parent.eventBase.selectWorkCellByTime("EditFollowingEvents"===i?[n.parent.eventBase.processTimezone(d)]:[d]);var u={requestType:"EditFollowingEvents"===i?"eventChanged":"eventRemoved",cancel:!1,data:t.changedRecords,promise:h,editParams:s};n.refreshData(u)}}))},t.prototype.processEntireSeries=function(t,i){var n=this,r=[],a=!1;if(t instanceof Array)for(var s=0,o=t;s<o.length;s++){var l=o[s];r.push(this.getParentEvent(l,!0))}else r=this.getParentEvent(t,!0);var c={requestType:"EditSeries"===i?"eventChange":"eventRemove",cancel:!1,addedRecords:[],changedRecords:t instanceof Array?t:[t],deletedRecords:[]};c.data=r,this.parent.trigger(p,c,(function(t){if(!t.cancel){for(var s=n.parent.eventFields,o={addedRecords:[],changedRecords:[],deletedRecords:[]},l=r instanceof Array?r:[r],p=function(e,r){var p=t.changedRecords[parseInt(e.toString(),10)],c=l[parseInt(e.toString(),10)],h=n.parent.eventBase.getEventCollections(c),d=h.follow.concat(h.occurrence);switch(i){case"EditSeries":if(p[s.id]=c[s.id],p[s.recurrenceID]=null,p[s.followingID]=null,n.parent.uiStateValues.isIgnoreOccurrence&&p[s.recurrenceException]){var u=n.parent.eventsData.filter((function(e){return e[s.id]===p[s.id]}));u.length>0&&(p[s.recurrenceRule]=u[0][s.recurrenceRule])}else p[s.recurrenceException]=null,o.deletedRecords=o.deletedRecords.concat(d);o.changedRecords.push(n.parent.eventBase.processTimezone(p,!0)),n.parent.uiStateValues.isIgnoreOccurrence=!1;break;case"DeleteSeries":o.deletedRecords=o.deletedRecords.concat(d.concat(c)),a=!0}},c=0,h=t.changedRecords.length;c<h;c++)p(c);var d=n.parent.dataModule.dataManager.saveChanges(o,s.id,n.getTable(),n.getQuery()),u=(0,e.extend)({},t.changedRecords[t.changedRecords.length-1],null,!0);n.parent.eventBase.selectWorkCellByTime("EditSeries"===i?[n.parent.eventBase.processTimezone(u)]:[u]);var g={requestType:"EditSeries"===i?"eventChanged":"eventRemoved",cancel:!1,data:a?t.deletedRecords:t.changedRecords,promise:d,editParams:o};n.refreshData(g)}}))},t.prototype.processDelete=function(t){for(var i=this,n=[],r=0,a=t;r<a.length;r++){var s=a[r];s[this.parent.eventFields.recurrenceRule]?n.push({occurrence:s,parent:this.getParentEvent(s)}):n.push(s)}var o={requestType:"eventRemove",cancel:!1,addedRecords:[],changedRecords:[],deletedRecords:t};o.data=n,this.parent.trigger(p,o,(function(t){if(!t.cancel){for(var r=i.parent.eventFields,a={addedRecords:[],changedRecords:[],deletedRecords:[]},s=function(s,o){var l=(0,e.isNullOrUndefined)(t.deletedRecords[parseInt(s.toString(),10)][i.parent.eventFields.recurrenceRule]);if(!l){var p=n[parseInt(s.toString(),10)].parent,c=a.changedRecords.filter((function(e){return e[r.id]===p[r.id]})),h=t.deletedRecords[parseInt(s.toString(),10)][r.startTime];if(c.length>0){var d=c[0];d[r.recurrenceException]=i.excludeDateCheck(h,d[r.recurrenceException])}else p[r.recurrenceException]=i.excludeDateCheck(h,p[r.recurrenceException]);0===c.length&&a.changedRecords.push(i.parent.eventBase.processTimezone(p,!0)),l=t.deletedRecords[parseInt(s.toString(),10)][r.id]!==p[r.id]}l&&a.deletedRecords.push(t.deletedRecords[parseInt(s.toString(),10)])},o=0,l=t.deletedRecords.length;o<l;o++)s(o);var p=i.parent.dataModule.dataManager.saveChanges(a,r.id,i.getTable(),i.getQuery());i.parent.eventBase.selectWorkCellByTime(t.deletedRecords);var c={requestType:"eventRemoved",cancel:!1,data:t.deletedRecords,promise:p,editParams:a};i.refreshData(c)}}))},t.prototype.processSave=function(t){for(var i=this,n=t instanceof Array?t:[t],r=[],a=0,s=n;a<s.length;a++){var o=s[a];o[this.parent.eventFields.recurrenceRule]?r.push({occurrence:o,parent:this.getParentEvent(o)}):r.push(o)}var l={requestType:"eventChange",cancel:!1,addedRecords:[],changedRecords:n,deletedRecords:[]};l.data=r,this.parent.trigger(p,l,(function(t){if(!t.cancel){for(var n=i.parent.eventFields,r={addedRecords:[],changedRecords:[],deletedRecords:[]},a=0,s=t.changedRecords;a<s.length;a++){var o=s[a];if(!(0,e.isNullOrUndefined)(o[n.recurrenceRule])&&(0,e.isNullOrUndefined)(o[n.recurrenceException])){var l=va(o[n.startTime]),p=i.getParentEvent(o);p[n.recurrenceException]=(0,e.isNullOrUndefined)(p[n.recurrenceException])?l:p[n.recurrenceException].concat(","+l),o[n.id]=i.parent.getEventMaxID(),o[n.recurrenceException]=l,r.addedRecords.push(i.parent.eventBase.processTimezone(o,!0)),r.changedRecords.push(i.parent.eventBase.processTimezone(p,!0))}else r.changedRecords.push(i.parent.eventBase.processTimezone(o,!0))}var c=i.parent.dataModule.dataManager.saveChanges(r,n.id,i.getTable(),i.getQuery()),h=(0,e.extend)({},t.changedRecords[t.changedRecords.length-1],null,!0);i.parent.eventBase.selectWorkCellByTime([i.parent.eventBase.processTimezone(h)]);var d={requestType:"eventChanged",cancel:!1,data:t.changedRecords,promise:c,editParams:r};i.refreshData(d)}}))},t.prototype.getParentEvent=function(e,t){void 0===t&&(t=!1);var i=this.parent.eventBase.getParentEvent(e,t)||e;return(i[this.parent.eventFields.startTimezone]||i[this.parent.eventFields.endTimezone])&&this.parent.eventBase.timezoneConvert(i),i},t.prototype.excludeDateCheck=function(t,i){var n=this.parent.timezone||this.parent.tzModule.getLocalTimezoneName();n&&(t=this.parent.tzModule.remove(new Date(+t.getTime()),n));var r=va(t);return(0,e.isNullOrUndefined)(i)?i=r:-1===i.indexOf(r)&&(i=(0,e.isNullOrUndefined)(i)?r:i+","+r),i},t.prototype.processRecurrenceRule=function(e,t){var i,n=this.parent.eventFields,r=e[n.recurrenceRule];if(t instanceof Date)i=new Date(+t);else{i=new Date(+t[n.startTime]);var a=t[n.recurrenceRule];if(a){var s=e[n.startTime],o=wr(s,a,"DeleteFollowingEvents"===this.parent.currentAction?t[n.recurrenceException]:null,this.parent.activeViewOptions.firstDayOfWeek),l=new Date(o.slice(-1)[0]);l.setHours(i.getHours(),i.getMinutes(),i.getSeconds()),i.setHours(s.getHours(),s.getMinutes(),s.getSeconds()),t[n.recurrenceRule]=this.getUpdatedRecurrenceRule(a,new Date(+l),!1)}}e[n.recurrenceRule]=this.getUpdatedRecurrenceRule(r,pe(new Date(i.getTime()),-1),!0)},t.prototype.getUpdatedRecurrenceRule=function(e,t,i){for(var n="",r=0,a=e.split(";");r<a.length;r++){var s=a[r];if(""!==s){var o=s.split("=")[0],l=s.split("=")[1];"COUNT"!==o&&"UNTIL"!==o||(l=va(t),s=s.replace(s,"UNTIL="+l)),n+=s+";"}}return i&&-1===n.indexOf("UNTIL")&&(n+="UNTIL="+va(t)),n},t.prototype.isBlockEvent=function(e){for(var t=!1,i=0,n=e instanceof Array?e:[e];i<n.length;i++){t=n[i][this.parent.eventFields.isBlock]||!1}return t},t.prototype.destroy=function(){this.crudObj=null,this.parent=null},t}(),ho=function(){function t(t){this.parent=t,e.EventHandler.add(this.parent.element,"mouseover",this.onHover,this)}return t.prototype.cellMouseDown=function(e){this.isPreventAction(e)||this.parent.notify(z,{event:e})},t.prototype.cellClick=function(t){var i=this;if(!this.isPreventAction(t)){var n="."+ze+",."+Ue+",."+Qe,a=(0,e.closest)(t.target,n);if(!(0,e.isNullOrUndefined)(a))if((0,e.isNullOrUndefined)((0,e.closest)(t.target,"."+ui))){var s=a.classList.contains(ze)||a.classList.contains(Ue);this.parent.uiStateValues.isTapHold&&!this.parent.uiStateValues.action&&s&&(this.parent.uiStateValues.isTapHold=!1,this.parent.eventBase.removeSelectedAppointmentClass(),this.parent.selectedElements=[]);var o=(0,e.closest)(t.target,"."+ni),l=this.parent.getNavigateView(),p=this.parent.currentView===l;if((0,e.isNullOrUndefined)(o)||p||(0,e.isNullOrUndefined)(this.parent.viewOptions[l.charAt(0).toLowerCase()+l.slice(1)])){if(this.parent.activeViewOptions.readonly&&"MonthAgenda"!==this.parent.currentView)return void(this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide());if(this.parent.isAdaptive&&(t.target.classList.contains(Ri)||(0,e.closest)(t.target,"."+Ri)))return;if(s&&t.shiftKey&&1===t.which&&this.parent.keyboardInteractionModule)return void this.parent.keyboardInteractionModule.onMouseSelection(t);this.parent.activeCellsData=this.parent.getCellDetails(a);var c=(0,e.extend)(this.parent.activeCellsData,{cancel:!1,event:t,name:"cellClick"});this.parent.trigger(r,c,(function(e){if(e.cancel)i.parent.quickPopup&&i.parent.quickPopup.quickPopupHide();else if(s&&i.parent.selectCell(a),i.parent.allowInline){var t={element:e.element,groupIndex:e.groupIndex,type:"Cell"};i.parent.notify(A,t)}else i.parent.notify(r,e)}))}else{var h=this.parent.getDateFromElement(a);!(0,e.isNullOrUndefined)(h)&&this.parent.isMinMaxDate(h)&&(this.parent.setProperties({selectedDate:h},!0),this.parent.changeView(this.parent.getNavigateView(),t))}}else this.parent.eventWindow.openEditor(this.parent.activeCellsData,"Add")}},t.prototype.cellDblClick=function(t){var i=this,n="."+ze+",."+Ue+",."+Qe,r=(0,e.closest)(t.target,n);if(!(this.parent.activeViewOptions.readonly||this.isPreventAction(t)||(0,e.isNullOrUndefined)(r))){var s=(0,e.extend)(this.parent.activeCellsData,{cancel:!1,event:t,name:"cellDoubleClick"});this.parent.trigger(a,s,(function(e){var t=new Date(e.startTime.getTime());i.parent.isMinMaxDate(new Date(t.setHours(0,0,0,0)))&&(e.cancel||i.parent.eventWindow.openEditor(i.parent.activeCellsData,"Add"))}))}},t.prototype.onHover=function(t){var i="."+ze+",."+Tt+",."+Ue+",."+Qe+",."+mt+",."+qt+",."+Pt+",."+ei,n=(0,e.closest)(t.target,i);if(n){var r={element:n,event:t};this.parent.trigger(l,r)}},t.prototype.isPreventAction=function(t){if((0,e.closest)(t.target,"."+ni))return!1;if((0,e.closest)(t.target,"."+xt)&&!(0,e.closest)(t.target,"."+Ri))return!0;var i=(0,e.closest)(t.target,"."+qt+",."+ot);return!(0,e.isNullOrUndefined)(i)||(i=(0,e.closest)(t.target,"."+Qe),!(!this.parent.activeView||!this.parent.activeView.isTimelineView()||(0,e.isNullOrUndefined)(i)))},t.prototype.destroy=function(){e.EventHandler.remove(this.parent.element,"mouseover",this.onHover)},t}(),uo=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),go=function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},vo=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return uo(i,t),go([(0,e.Property)()],i.prototype,"name",void 0),go([(0,e.Property)()],i.prototype,"default",void 0),go([(0,e.Property)()],i.prototype,"title",void 0),go([(0,e.Property)({})],i.prototype,"validation",void 0),i}(e.ChildProperty),mo=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),fo=function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},yo=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return mo(i,t),fo([(0,e.Property)("Id")],i.prototype,"id",void 0),fo([(0,e.Property)("IsBlock")],i.prototype,"isBlock",void 0),fo([(0,e.Complex)({name:"Subject"},vo)],i.prototype,"subject",void 0),fo([(0,e.Complex)({name:"StartTime"},vo)],i.prototype,"startTime",void 0),fo([(0,e.Complex)({name:"EndTime"},vo)],i.prototype,"endTime",void 0),fo([(0,e.Complex)({name:"StartTimezone"},vo)],i.prototype,"startTimezone",void 0),fo([(0,e.Complex)({name:"EndTimezone"},vo)],i.prototype,"endTimezone",void 0),fo([(0,e.Complex)({name:"Location"},vo)],i.prototype,"location",void 0),fo([(0,e.Complex)({name:"Description"},vo)],i.prototype,"description",void 0),fo([(0,e.Complex)({name:"IsAllDay"},vo)],i.prototype,"isAllDay",void 0),fo([(0,e.Complex)({name:"RecurrenceID"},vo)],i.prototype,"recurrenceID",void 0),fo([(0,e.Complex)({name:"RecurrenceRule"},vo)],i.prototype,"recurrenceRule",void 0),fo([(0,e.Complex)({name:"RecurrenceException"},vo)],i.prototype,"recurrenceException",void 0),fo([(0,e.Property)("IsReadonly")],i.prototype,"isReadonly",void 0),fo([(0,e.Property)("FollowingID")],i.prototype,"followingID",void 0),i}(e.ChildProperty),To=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wo=function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},Do=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return To(i,t),wo([(0,e.Property)()],i.prototype,"template",void 0),wo([(0,e.Property)([])],i.prototype,"dataSource",void 0),wo([(0,e.Property)()],i.prototype,"query",void 0),wo([(0,e.Complex)({},yo)],i.prototype,"fields",void 0),wo([(0,e.Property)(!1)],i.prototype,"enableTooltip",void 0),wo([(0,e.Property)("AllDayRow")],i.prototype,"spannedEventPlacement",void 0),wo([(0,e.Property)(1)],i.prototype,"minimumEventDuration",void 0),wo([(0,e.Property)()],i.prototype,"tooltipTemplate",void 0),wo([(0,e.Property)()],i.prototype,"resourceColorField",void 0),wo([(0,e.Property)(!1)],i.prototype,"editFollowingEvents",void 0),wo([(0,e.Property)(!0)],i.prototype,"allowAdding",void 0),wo([(0,e.Property)(!0)],i.prototype,"allowEditing",void 0),wo([(0,e.Property)(!0)],i.prototype,"allowDeleting",void 0),wo([(0,e.Property)(!1)],i.prototype,"enableMaxHeight",void 0),wo([(0,e.Property)(!1)],i.prototype,"enableIndicator",void 0),wo([(0,e.Property)(!1)],i.prototype,"ignoreWhitespace",void 0),wo([(0,e.Property)()],i.prototype,"sortComparer",void 0),wo([(0,e.Property)()],i.prototype,"includeFiltersInQuery",void 0),i}(e.ChildProperty),bo=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),So=function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},Co=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return bo(i,t),So([(0,e.Property)(!1)],i.prototype,"byDate",void 0),So([(0,e.Property)(!0)],i.prototype,"byGroupID",void 0),So([(0,e.Property)(!1)],i.prototype,"allowGroupEdit",void 0),So([(0,e.Property)([])],i.prototype,"resources",void 0),So([(0,e.Property)(!0)],i.prototype,"enableCompactView",void 0),So([(0,e.Property)()],i.prototype,"headerTooltipTemplate",void 0),So([(0,e.Property)(!1)],i.prototype,"hideNonWorkingDays",void 0),i}(e.ChildProperty),Oo=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Eo=function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},xo=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Oo(i,t),Eo([(0,e.Property)()],i.prototype,"field",void 0),Eo([(0,e.Property)()],i.prototype,"title",void 0),Eo([(0,e.Property)()],i.prototype,"name",void 0),Eo([(0,e.Property)(!1)],i.prototype,"allowMultiple",void 0),Eo([(0,e.Property)([])],i.prototype,"dataSource",void 0),Eo([(0,e.Property)()],i.prototype,"query",void 0),Eo([(0,e.Property)("Id")],i.prototype,"idField",void 0),Eo([(0,e.Property)("Text")],i.prototype,"textField",void 0),Eo([(0,e.Property)("Expanded")],i.prototype,"expandedField",void 0),Eo([(0,e.Property)("GroupID")],i.prototype,"groupIDField",void 0),Eo([(0,e.Property)("Color")],i.prototype,"colorField",void 0),Eo([(0,e.Property)("StartHour")],i.prototype,"startHourField",void 0),Eo([(0,e.Property)("EndHour")],i.prototype,"endHourField",void 0),Eo([(0,e.Property)("WorkDays")],i.prototype,"workDaysField",void 0),Eo([(0,e.Property)("CssClass")],i.prototype,"cssClassField",void 0),i}(e.ChildProperty),Vo=function(){function n(e){this.resourceCollection=[],this.leftPixel=25,this.resourceDateTree=[],this.parent=e}return n.prototype.renderResourceHeaderIndent=function(t){var i=(0,e.createElement)("td",{className:"e-resource-left-td"}),n=(0,e.createElement)("div",{className:lt});if(this.parent.activeViewOptions.headerIndentTemplate){var r={className:[i.className],type:"emptyCells"};this.parent.renderHeaderIndentTemplate(r,i)}else i.appendChild(n);var a={elementType:"emptyCells",element:i};this.parent.trigger(v,a),t.appendChild(i)},n.prototype.hideResourceRows=function(t){if(!(this.resourceCollection.length<=1||this.parent.virtualScrollModule))for(var i=this.lastResourceLevel.length,n=0;n<i;n++){var r=this.lastResourceLevel[parseInt(n.toString(),10)].resourceData,a=this.lastResourceLevel[parseInt(n.toString(),10)].resource;if(r.ClassName===dt&&!r[a.expandedField]&&!(0,e.isNullOrUndefined)(r[a.expandedField])){var s=[].slice.call(t.children).slice(n+1,n+(parseInt(r.Count,10)+1));(0,e.addClass)(s,Nn)}}},n.prototype.createResourceColumn=function(){var t=this.resourceCollection,i=(0,e.createElement)("div",{className:pt}),n=this.parent.activeView.createTableLayout(ct);!this.parent.uiStateValues.isGroupAdaptive&&this.parent.rowAutoHeight&&this.parent.activeView.isTimelineView()&&this.parent.activeViewOptions.group.resources.length>0&&(0,e.addClass)([n],Jn);var r=n.querySelector("tbody"),a=this.generateTreeData(!0);if(this.countCalculation(t.slice(0,-2),t.slice(0,-1)),this.renderedResources=this.lastResourceLevel,this.parent.virtualScrollModule){var s=this.parent.virtualScrollModule.getRenderedCount();this.setExpandedResources(),a=this.expandedResources.slice(0,s),this.renderedResources=a}return(0,e.append)(this.getContentRows(a),r),this.hideResourceRows(r),n.appendChild(r),i.appendChild(n),i},n.prototype.setRenderedResources=function(){var e=this.resourceCollection;this.generateTreeData(!0);this.countCalculation(e.slice(0,-2),e.slice(0,-1)),this.renderedResources=this.lastResourceLevel},n.prototype.setExpandedResources=function(){for(var t=[],i=0;i<this.lastResourceLevel.length;i++){var n=this.lastResourceLevel[parseInt(i.toString(),10)].resourceData,r=n.Count;t.push(this.lastResourceLevel[parseInt(i.toString(),10)]);var a=n[this.lastResourceLevel[parseInt(i.toString(),10)].resource.expandedField];!(0,e.isNullOrUndefined)(a)&&!a&&r>0&&(i+=r)}this.expandedResources=t},n.prototype.getContentRows=function(t,i){for(var n,r,a=[],s=this.resourceCollection,o=(0,e.createElement)("tr"),l=(0,e.createElement)("td",{attrs:{tabindex:i?"-1":"0"}}),p=0;p<t.length;p++){var c=l.cloneNode();if((r=we(s,"name",t[parseInt(p.toString(),10)].resource.name))===s.length-1?((0,e.extend)(t[parseInt(p.toString(),10)].resourceData,{ClassName:ht}),this.renderedResources[parseInt(p.toString(),10)].className=[ht]):((0,e.extend)(t[parseInt(p.toString(),10)].resourceData,{ClassName:dt}),this.renderedResources[parseInt(p.toString(),10)].className=[dt]),n=r*this.leftPixel+"px",t[parseInt(p.toString(),10)].resourceData.ClassName===dt&&!(0,e.isNullOrUndefined)(t[parseInt(p.toString(),10)].resourceData.Count)&&t[parseInt(p.toString(),10)].resourceData.Count>0){var h=void 0;h=t[parseInt(p.toString(),10)].resourceData[s[parseInt(r.toString(),10)].expandedField]||(0,e.isNullOrUndefined)(t[parseInt(p.toString(),10)].resourceData[s[parseInt(r.toString(),10)].expandedField])?gt:ut;var d=(0,e.createElement)("div");(0,e.addClass)([d],[vt,h]),this.setMargin(d,n),c.appendChild(d),this.resourceCollection.length>1&&e.EventHandler.add(d,"click",this.onTreeIconClick,this)}this.parent.activeView.setResourceHeaderContent(c,t[parseInt(p.toString(),10)],lt),c.setAttribute("data-group-index",t[parseInt(p.toString(),10)].groupIndex.toString()),c.setAttribute("aria-label",t[parseInt(p.toString(),10)].resourceData[t[parseInt(p.toString(),10)].resource.textField]+" resource"),this.parent.activeViewOptions.resourceHeaderTemplate||this.setMargin(c.querySelector("."+lt),n);var u=[mt,t[parseInt(p.toString(),10)].resourceData.ClassName];(0,e.addClass)([c],u);var g={elementType:"resourceHeader",element:c,groupIndex:t[parseInt(p.toString(),10)].groupIndex};this.parent.trigger(v,g);var m=o.cloneNode();m.appendChild(c),a.push(m)}return a},n.prototype.setMargin=function(e,t){this.parent.enableRtl?e.style.marginRight=t:e.style.marginLeft=t},n.prototype.countCalculation=function(t,i){for(var n,r=0;r<t.length;r++){for(var a=t[t.length-(r+1)].dataSource,s=0;s<a.length;s++){var o=0;if(this.parent.activeViewOptions.group.byGroupID){var l=(new dr.Query).where(i[i.length-1].groupIDField,"equal",a[parseInt(s.toString(),10)][t[t.length-(r+1)].idField]);n=new dr.DataManager(i[i.length-1].dataSource).executeLocal(l)}else n=i[i.length-1].dataSource;for(var p=0;p<n.length;p++)o+=parseInt(n[parseInt(p.toString(),10)].Count,10);o+=parseInt(a[parseInt(s.toString(),10)].Count,10),(0,e.extend)(a[parseInt(s.toString(),10)],{Count:o})}i=i.slice(0,-1)}},n.prototype.onTreeIconClick=function(t){var i=this;this.parent.eventTooltip&&this.parent.eventTooltip.close();var n,r=t.target,a=(0,e.closest)(r,"."+dt).parentElement,s=parseInt(a.children[0].getAttribute("data-group-index"),10),o={cancel:!1,event:t,groupIndex:s,requestType:r.classList.contains(gt)?"resourceCollapse":"resourceExpand"};this.parent.trigger(p,o,(function(a){if(!a.cancel){r.classList.contains(gt)?((0,e.classList)(r,[ut],[gt]),n=!0):((0,e.classList)(r,[gt],[ut]),n=!1);for(var l=0,p=[].slice.call(i.parent.element.querySelectorAll("."+qt+",."+Ri));l<p.length;l++){var h=p[l];(0,e.remove)(h)}i.parent.virtualScrollModule?i.updateVirtualContent(s,n,t,r):i.updateContent(s,n);var d={cssProperties:i.parent.getCssProperties(),module:"scroll"};i.parent.notify(U,d),o={cancel:!1,event:t,groupIndex:s,requestType:r.classList.contains(gt)?"resourceExpanded":"resourceCollapsed"},i.parent.refreshEvents(!1),i.parent.trigger(c,o)}}))},n.prototype.updateContent=function(t,i){for(var n,r=[],a=[],s=[],o=this.lastResourceLevel[parseInt(t.toString(),10)].resourceData,l=[].slice.call(this.parent.element.querySelectorAll("."+pt+" tr")),p=[].slice.call(this.parent.element.querySelectorAll("."+Qt+" tbody tr")),c=[].slice.call(this.parent.element.querySelectorAll("."+Qt+" ."+Nt)),h=0;h<o.Count;h++)r.push(l[t+h+1]),a.push(p[t+h+1]),s.push(c[t+h+1]);for(var d=this.lastResourceLevel,u=0;u<r.length;u++){var g=!0;if(n=r[parseInt(u.toString(),10)].children[0].classList.contains(dt),d[parseInt(t.toString(),10)].resourceData[d[parseInt(t.toString(),10)].resource.expandedField]=!i,i){if(n)(v=r[parseInt(u.toString(),10)].querySelector("."+vt))&&(0,e.classList)(v,[ut],[gt]);r[parseInt(u.toString(),10)].classList.contains(Nn)||(0,e.addClass)([r[parseInt(u.toString(),10)],a[parseInt(u.toString(),10)],s[parseInt(u.toString(),10)]],Nn)}else{if(n){var v,m=r[parseInt(u.toString(),10)].rowIndex;if(d[parseInt(m.toString(),10)].resourceData[d[parseInt(m.toString(),10)].resource.expandedField]||(0,e.isNullOrUndefined)(d[parseInt(m.toString(),10)].resourceData[d[parseInt(m.toString(),10)].resource.expandedField])||(r.splice(u+1,parseInt(d[parseInt(m.toString(),10)].resourceData.Count,10)),a.splice(u+1,parseInt(d[parseInt(m.toString(),10)].resourceData.Count,10)),s.splice(u+1,parseInt(d[parseInt(m.toString(),10)].resourceData.Count,10)),g=!1),g)(v=r[parseInt(u.toString(),10)].querySelector("."+vt))&&(0,e.classList)(v,[gt],[ut])}r[parseInt(u.toString(),10)].classList.contains(Nn)&&(0,e.removeClass)([r[parseInt(u.toString(),10)],a[parseInt(u.toString(),10)],s[parseInt(u.toString(),10)]],Nn)}}},n.prototype.updateVirtualContent=function(t,i,n,r){this.lastResourceLevel[parseInt(t.toString(),10)].resourceData[this.lastResourceLevel[parseInt(t.toString(),10)].resource.expandedField]=!i,this.setExpandedResources();var a=this.parent.virtualScrollModule.getRenderedCount(),s=this.expandedResources.indexOf(this.renderedResources[0]);if(this.renderedResources=this.expandedResources.slice(s,s+a),this.renderedResources.length<a){var o=this.expandedResources.length-a;o=o>0?o:0,this.renderedResources=this.expandedResources.slice(o,this.expandedResources.length)}var l=this.parent.element.querySelector("."+Kt);this.parent.virtualScrollModule.updateVirtualTrackHeight(l);var p=this.parent.element.querySelector("."+pt+" table"),c=this.parent.element.querySelector("."+Qt+" table"),h=this.parent.element.querySelector("."+st);this.parent.virtualScrollModule.updateContent(p,c,h,this.renderedResources);var d=this.parent.element.querySelector("."+bt);(0,e.isNullOrUndefined)(d)||(d.style.height=this.parent.element.querySelector("."+We).offsetHeight+"px")},n.prototype.renderResourceHeader=function(){var t=(0,e.createElement)("div",{className:It});if(t.innerHTML='<div class="'+kt+'"><div class="'+Un+'"><div class="e-icons '+Bn+'"></div></div><div class="'+Wn+'"></div></div>',"MonthAgenda"===this.parent.currentView){var i=this.parent.activeView.getPanel().querySelector("."+Qt);i.insertBefore(t,i.querySelector("."+Lt))}else this.parent.element.insertBefore(t,this.parent.element.querySelector("."+qe));this.renderResourceHeaderText(),e.EventHandler.add(t.querySelector("."+Bn),"click",this.menuClick,this)},n.prototype.renderResourceTree=function(){this.popupOverlay=(0,e.createElement)("div",{className:zn});var n=(0,e.createElement)("div",{className:Yn+" e-popup-close"});if("MonthAgenda"===this.parent.currentView){var r=this.parent.activeView.getPanel().querySelector("."+Lt);r.insertBefore(n,r.children[0]),r.appendChild(this.popupOverlay)}else this.parent.element.querySelector("."+qe).appendChild(n),this.parent.element.querySelector("."+qe).appendChild(this.popupOverlay);var a=(0,e.createElement)("div",{className:"e-resource-tree"});n.appendChild(a),this.treeViewObj=new i.TreeView({cssClass:this.parent.cssClass,enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,fields:{dataSource:[].slice.call(this.generateTreeData()),id:"resourceId",text:"resourceName",child:"resourceChild"},nodeTemplate:this.parent.resourceHeaderTemplate,nodeClicked:this.resourceClick.bind(this),created:this.resourceTreeCreated.bind(this)}),this.treeViewObj.root=this.parent.root?this.parent.root:this.parent,this.treeViewObj.appendTo(a),this.treeViewObj.expandAll(),this.treePopup=new t.Popup(n,{targetType:"relative",actionOnScroll:"none",content:this.treeViewObj.element,relateTo:this.parent.element.querySelector("."+qe),enableRtl:this.parent.enableRtl,hideAnimation:{name:"SlideLeftOut",duration:500},showAnimation:{name:"SlideLeftIn",duration:500},viewPortElement:this.parent.element.querySelector("."+("MonthAgenda"===this.parent.currentView?Lt:qe))}),this.parent.on(W,this.documentClick,this)},n.prototype.resourceTreeCreated=function(){this.parent.activeViewOptions.resourceHeaderTemplate&&this.parent.portals&&this.treeViewObj.portals&&(this.parent.portals=this.parent.portals.concat(this.treeViewObj.portals),this.parent.renderTemplates())},n.prototype.generateTreeData=function(t){for(var i=this,n=[],r=[],a=0,s=function(s,l){var p=function(n,s,o){var l,c,h=i.resourceCollection[parseInt(s.toString(),10)];t?(c={type:"resourceHeader",resource:n.resource,resourceData:n.resourceData,groupIndex:a,groupOrder:n.groupOrder},r.push(c),a++):l={resourceId:o,resourceName:n.resourceData[h.textField],resource:n.resource,resourceData:n.resourceData},n.child.length>0&&!t&&(l.resourceChild=[]);for(var d=1,u=0,g=n.child;u<g.length;u++){var v=g[u];t?p(v,s+1,o+"-"+d):l.resourceChild.push(p(v,s+1,o+"-"+d)),d+=1}return t&&(0,e.extend)(c.resourceData,{Count:d-1}),l};t?p(o.resourceTreeLevel[parseInt(s.toString(),10)],0,(s+1).toString()):n.push(p(o.resourceTreeLevel[parseInt(s.toString(),10)],0,(s+1).toString()))},o=this,l=0,p=this.resourceTreeLevel.length;l<p;l++)s(l);return t?(this.lastResourceLevel=r,r):n},n.prototype.renderResourceHeaderText=function(){for(var t=this.lastResourceLevel[this.parent.uiStateValues.groupIndex],i=[],n=function(n,a){var s=r.resourceCollection[parseInt(n.toString(),10)],o=s.dataSource.filter((function(e){return e[s.idField]===t.groupOrder[parseInt(n.toString(),10)]})),l=(0,e.createElement)("div",{className:Yt});r.parent.sanitize(o[0][s.textField],l),i.push(l);var p=(0,e.createElement)("div",{className:"e-icons e-icon-next"});i.push(p)},r=this,a=0,s=t.groupOrder.length;a<s;a++)n(a);i.pop();var o=("MonthAgenda"===this.parent.currentView?this.parent.activeView.getPanel():this.parent.element).querySelector("."+Wn);be(o);for(var l=0,p=i;l<p.length;l++){var c=p[l];o.appendChild(c)}1===this.lastResourceLevel.length&&(0,e.addClass)([this.parent.element.querySelector("."+Un)],Ne)},n.prototype.menuClick=function(t){if(this.parent.element.querySelector("."+Yn).classList.contains(_e))this.treePopup.hide(),(0,e.removeClass)([this.popupOverlay],Le);else{var i=[].slice.call(this.treeViewObj.element.querySelectorAll(".e-list-item:not(.e-has-child)"));(0,e.removeClass)(i,"e-active"),(0,e.addClass)([i[this.parent.uiStateValues.groupIndex]],"e-active"),this.treePopup.show(),(0,e.addClass)([this.popupOverlay],Le)}},n.prototype.selectResourceByIndex=function(e){this.lastResourceLevel&&e>-1&&e<this.lastResourceLevel.length&&this.triggerEvents(e)},n.prototype.resourceClick=function(t){if(!t.node.classList.contains("e-has-child")){this.treePopup.hide(),(0,e.removeClass)([this.popupOverlay],Le);var i=[].slice.call(this.treeViewObj.element.querySelectorAll(".e-list-item:not(.e-has-child)")).indexOf(t.node);this.triggerEvents(i,t),t.event.preventDefault()}},n.prototype.triggerEvents=function(e,t){var i=this,n={cancel:!1,event:t?t.event:null,groupIndex:e,requestType:"resourceChange"};this.parent.trigger(p,n,(function(e){e.cancel||(i.parent.uiStateValues.groupIndex=e.groupIndex,i.parent.renderModule.render(i.parent.currentView),n={cancel:!1,event:t?t.event:null,groupIndex:i.parent.uiStateValues.groupIndex,requestType:"resourceChanged"},i.parent.adaptiveGroupIndex=i.parent.uiStateValues.groupIndex,i.parent.trigger(c,n))}))},n.prototype.documentClick=function(t){if(!(0,e.closest)(t.event.target,"."+Yn)){var i=this.parent.element.querySelector("."+Yn);i&&i.classList.contains(_e)&&(this.treePopup.hide(),(0,e.removeClass)([this.popupOverlay],Le))}},n.prototype.bindResourcesData=function(e){var t=this;this.parent.showSpinner();for(var i=[],n=0,r=this.parent.resources;n<r.length;n++){var a=r[n],s=new ur(this.parent,a.dataSource,a.query);i.push(s.getData(s.generateQuery()))}Promise.all(i).then((function(i){return t.dataManagerSuccess(i,e)})).catch((function(e){return t.parent.crudModule.dataManagerFailure(e)}))},n.prototype.dataManagerSuccess=function(e,t){if(!(!this.parent||this.parent&&this.parent.isDestroyed)){this.parent.resourceCollection=[];for(var i=0,n=e.length;i<n;i++){var r=this.parent.resources[parseInt(i.toString(),10)],a=this.getResourceModel(r,e[parseInt(i.toString(),10)].result);this.parent.resourceCollection.push(a)}this.refreshLayout(t)}},n.prototype.getResourceModel=function(e,t){return{field:e.field,title:e.title,name:e.name,allowMultiple:e.allowMultiple,dataSource:t||e.dataSource,idField:e.idField,textField:e.textField,groupIDField:e.groupIDField,colorField:e.colorField,startHourField:e.startHourField,endHourField:e.endHourField,workDaysField:e.workDaysField,expandedField:e.expandedField,cssClassField:e.cssClassField}},n.prototype.refreshLayout=function(t){!(0,e.isNullOrUndefined)(this.parent.uiStateValues.groupIndex)&&this.parent.enablePersistence||(this.parent.uiStateValues.groupIndex=0),this.parent.renderElements(t)},n.prototype.setResourceCollection=function(){var t=[];if(this.resourceCollection=[],this.colorIndex=null,this.parent.activeViewOptions.group.resources.length>0)for(var i=0,n=this.parent.activeViewOptions.group.resources;i<n.length;i++){var r=n[i],a=we(this.parent.resourceCollection,"name",r);a>=0&&t.push(this.parent.resourceCollection[parseInt(a.toString(),10)])}else this.parent.resourceCollection.length>0&&(t=this.parent.resourceCollection);for(var s=0,o=0,l=t;o<l.length;o++){r=l[o];var p=this.getResourceModel(r);r.name===this.parent.eventSettings.resourceColorField&&(this.colorIndex=s),s++,this.resourceCollection.push(p)}(0,e.isNullOrUndefined)(this.colorIndex)&&(this.colorIndex=this.resourceCollection.length-1)},n.prototype.generateResourceLevels=function(e,t){var i=this,n=this.resourceCollection,r=[],a=[],s=function(t,n,o,l,p){var c=[],h=t[0];if(h){var d=void 0;if(l&&i.parent.activeViewOptions.group.byGroupID){var u=l[o.idField];d=h.dataSource.filter((function(e){return e[h.groupIDField]===u}))}else d=h.dataSource;for(var g=0;g<d.length;g++){var v=[];p&&p.length>0&&(v=v.concat(p)),v.push(d[parseInt(g.toString(),10)][h.idField]);var m=s(t.slice(1),n+1,h,d[parseInt(g.toString(),10)],v);if(!(0===n&&0===m.length&&i.resourceCollection.length>1)){var f=[],y=i.parent.activeView.renderDates,T=void 0;if(!i.parent.activeViewOptions.group.byDate&&n+1===i.resourceCollection.length){var w=d[parseInt(g.toString(),10)][h.workDaysField],D=d[parseInt(g.toString(),10)][h.startHourField],b=d[parseInt(g.toString(),10)][h.endHourField];w&&w.length>0?(y=i.parent.activeView.getRenderDates(w),T=w,f=i.parent.activeView.getDateSlots(y,w)):(T=i.parent.activeViewOptions.workDays,f=e);var S=i.generateCustomHours(f,D,b,v);a=a.concat(S)}var C=d[parseInt(g.toString(),10)][h.cssClassField],O={type:"resourceHeader",className:["e-resource-cells"],resourceLevelIndex:n,groupOrder:v,resource:h,resourceData:d[parseInt(g.toString(),10)],colSpan:i.parent.activeViewOptions.group.byDate?1:f.length,renderDates:y,workDays:T,cssClass:C,child:m};c.push(O)}}return r[parseInt(n.toString(),10)]||(r[parseInt(n.toString(),10)]=[]),c.length>0&&r[parseInt(n.toString(),10)].push(c),c}return[]};return this.resourceTreeLevel=s(n,0),t?[]:this.generateHeaderLevels(r,a,e)},n.prototype.generateCustomHours=function(t,i,n,r){for(var a=(0,e.extend)([],t,null,!0),s=0,o=a;s<o.length;s++){var l=o[s];i&&(l.startHour=this.parent.getStartEndTime(i)),n&&(l.endHour=this.parent.getStartEndTime(n)),r&&(l.groupOrder=r)}return a},n.prototype.generateHeaderLevels=function(t,i,n){for(var r=[],a=t.length-1;a>=0;a--)for(var s=0,o=0,l=t[parseInt(a.toString(),10)];o<l.length;o++)for(var p=0,c=l[o];p<c.length;p++){var h=c[p];if(t[a+1]&&t[a+1].length>0){var d=t[parseInt((a+1).toString(),10)][parseInt(s.toString(),10)];if(!d)continue;for(var u=0,g=0,v=d;g<v.length;g++){var m=v[g];(!this.parent.activeViewOptions.group.byGroupID||this.parent.activeViewOptions.group.byGroupID&&m.resourceData[m.resource.groupIDField]===h.resourceData[h.resource.idField])&&(u+=m.colSpan)}h.colSpan=u}h.groupIndex=s,s++,r[h.resourceLevelIndex]=r[h.resourceLevelIndex]||[],r[h.resourceLevelIndex].push(h)}if(this.lastResourceLevel=r.slice(-1)[0]||[],!this.parent.activeViewOptions.group.byDate){for(var f=0,y=0,T=this.lastResourceLevel;y<T.length;y++){var w=T[y];for(a=0;a<w.colSpan;a++)i[parseInt(f.toString(),10)].groupIndex=w.groupIndex,f++}return r.push(i),r}var D=[],b=(0,e.extend)([],r,null,!0),S=[];if(this.parent.activeViewOptions.group.hideNonWorkingDays){for(var C=[],O=0,E=function(t){x.resourceDateTree[parseInt(O.toString(),10)]=[];for(var i=[],n=function(n){var r=x.lastResourceLevel[parseInt(n.toString(),10)].resourceData[x.lastResourceLevel[parseInt(n.toString(),10)].resource.workDaysField];if(r||(r=x.parent.activeViewOptions.workDays),-1!==r.indexOf(t.date.getDay())){var a=(0,e.extend)({},x.lastResourceLevel[parseInt(n.toString(),10)],null,!0);a.date=t.date,x.lastResourceLevel[parseInt(n.toString(),10)].workDays=r,a.startHour=x.parent.getStartEndTime(a.resourceData[a.resource.startHourField])||t.startHour,a.endHour=x.parent.getStartEndTime(a.resourceData[a.resource.endHourField])||t.endHour,x.resourceDateTree[parseInt(O.toString(),10)].push(a);for(var s=function(r){if(i[parseInt(r.toString(),10)]||(i[parseInt(r.toString(),10)]=[]),r===a.groupOrder.length-1){C[parseInt(n.toString(),10)]||(C[parseInt(n.toString(),10)]=[]);var s=a.renderDates.filter((function(e){return e.getDay()===t.date.getDay()}));return C[parseInt(n.toString(),10)]=C[parseInt(n.toString(),10)].concat(s),i[parseInt(r.toString(),10)].push(a),"continue"}var o=b[parseInt(r.toString(),10)].filter((function(e){return e.resourceData[e.resource.idField]===a.groupOrder[parseInt(r.toString(),10)]}));if(o&&o.length>0){var l=i[parseInt(r.toString(),10)].filter((function(e){return e.resourceData[e.resource.idField]===a.groupOrder[parseInt(r.toString(),10)]}));if(l&&l.length>0)l[0].colSpan+=1;else{var p=(0,e.extend)({},o[0],null,!0);p.colSpan=1,i[parseInt(r.toString(),10)].push(p)}}},o=0;o<a.groupOrder.length;o++)s(o)}},r=0;r<x.lastResourceLevel.length;r++)n(r);if(i.length>0){for(var a=0;a<b.length;a++)D[parseInt(a.toString(),10)]||(D[parseInt(a.toString(),10)]=[]),D[parseInt(a.toString(),10)]=D[parseInt(a.toString(),10)].concat(i[parseInt(a.toString(),10)]);t.colSpan=i[i.length-1].length,S.push(t)}O++},x=this,V=0,A=n;V<A.length;V++){E(P=A[V])}return this.resourceDateTree=this.resourceDateTree.filter((function(e){return e.length>0})),this.lastResourceLevel.forEach((function(e,t){C[parseInt(t.toString(),10)]&&(e.renderDates=C[parseInt(t.toString(),10)].sort((function(e,t){return e.getTime()-t.getTime()})))})),D.unshift(S),D}for(var I=0,M=0,k=b[0];M<k.length;M++){I+=k[M].colSpan}for(var R=0,H=n;R<H.length;R++){var P;(P=H[R]).colSpan=I,S.push(P);for(var j=(0,e.extend)([],b,null,!0),L=0,N=j.length;L<N;L++){if(L===j.length-1)for(var q=0,F=j[parseInt(L.toString(),10)];q<F.length;q++){var U=F[q];U.date=P.date,U.workDays=P.workDays,U.startHour=this.parent.getStartEndTime(U.resourceData[U.resource.startHourField])||P.startHour,U.endHour=this.parent.getStartEndTime(U.resourceData[U.resource.endHourField])||P.endHour}D[parseInt(L.toString(),10)]||(D[parseInt(L.toString(),10)]=[]),D[parseInt(L.toString(),10)]=D[parseInt(L.toString(),10)].concat(j[parseInt(L.toString(),10)])}}return D.unshift(S),D},n.prototype.setResourceValues=function(t,i){var n=this,r=function(e,i,r){n.resourceCollection[parseInt(e.toString(),10)].allowMultiple&&n.parent.activeViewOptions.group.allowGroupEdit?t[""+i]=[r]:t[""+i]=r};if(void 0===i&&(i=this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:this.parent.activeCellsData.groupIndex),this.parent.activeViewOptions.group.resources.length>0&&!(0,e.isNullOrUndefined)(i))for(var a=this.lastResourceLevel[parseInt(i.toString(),10)].groupOrder,s=0;s<this.resourceCollection.length;s++)r(s,this.resourceCollection[parseInt(s.toString(),10)].field,a[parseInt(s.toString(),10)]);else if(this.parent.resourceCollection.length>0)for(s=0;s<this.resourceCollection.length;s++){var o=this.resourceCollection[parseInt(s.toString(),10)].dataSource[0];o&&r(s,this.resourceCollection[parseInt(s.toString(),10)].field,o[this.resourceCollection[parseInt(s.toString(),10)].idField])}},n.prototype.getResourceColor=function(t,i){var n=!(0,e.isNullOrUndefined)(i)&&this.colorIndex>i.length-1?i.length-1:this.colorIndex,r=this.resourceCollection[parseInt(n.toString(),10)];if(!((0,e.isNullOrUndefined)(i)&&this.parent.activeViewOptions.group.allowGroupEdit&&r.allowMultiple)){var a=(0,e.isNullOrUndefined)(i)?t[r.field]:i[parseInt(n.toString(),10)],s=this.filterData(r.dataSource,r.idField,a);return s.length>0?s[0][r.colorField]:void 0}},n.prototype.getCssClass=function(e){var t=this.resourceCollection.slice(-1)[0];if(!this.parent.activeViewOptions.group.allowGroupEdit||!t.allowMultiple){var i=this.filterData(t.dataSource,t.idField,e[t.field]);return i.length>0?i[0][t.cssClassField]:void 0}},n.prototype.getResourceRenderDates=function(){var e=[].concat.apply([],this.lastResourceLevel.map((function(e){return e.renderDates}))),t=e.map((function(e){return e.getTime()})),i=e.filter((function(e,i){return t.indexOf(e.getTime())===i}));return i.sort((function(e,t){return e.getTime()-t.getTime()})),i},n.prototype.filterData=function(e,t,i){return e.filter((function(e){return e[""+t]===i}))},n.prototype.getResourceData=function(t,i,n){if(this.parent.activeViewOptions.group.allowGroupEdit){for(var r={},a=0,s=n;a<s.length;a++)for(var o=s[a],l=this.lastResourceLevel[parseInt(o.toString(),10)].groupOrder,p=0,c=l.length;p<c;p++){var h=this.resourceCollection[parseInt(p.toString(),10)].field;(0,e.isNullOrUndefined)(r[""+h])&&(r[""+h]=[]),r[""+h].push(l[parseInt(p.toString(),10)])}t=(0,e.extend)(t,r)}else{p=0;for(var d=this.resourceCollection.length;p<d;p++)this.lastResourceLevel[parseInt(i.toString(),10)]&&(t[this.resourceCollection[parseInt(p.toString(),10)].field]=this.lastResourceLevel[parseInt(i.toString(),10)].groupOrder[parseInt(p.toString(),10)])}},n.prototype.addResource=function(e,t,i){for(var n=e instanceof Array?e:[e],r=function(e){if(e.name===t)return n.forEach((function(t,n){return new dr.DataManager({json:e.dataSource}).insert(t,null,null,i+n)})),"break"},a=0,s=this.parent.resourceCollection;a<s.length;a++){if("break"===r(s[a]))break}this.refreshLayout(!0)},n.prototype.removeResource=function(e,t){for(var i=e instanceof Array?e:[e],n=function(e){if(e.name===t)return i.forEach((function(t){return new dr.DataManager({json:e.dataSource}).remove(e.idField,t)})),"break"},r=0,a=this.parent.resourceCollection;r<a.length;r++){if("break"===n(a[r]))break}this.refreshLayout(!0)},n.prototype.getIndexFromResourceId=function(t,i,n,r,a){if(i=i||this.parent.resourceCollection.slice(-1)[0].name,(0,e.isNullOrUndefined)(n)&&(n=this.resourceCollection.filter((function(e){return e.name===i}))[0],(0,e.isNullOrUndefined)(n)))return null;var s=n.dataSource.filter((function(e){return r&&e[n.idField]===t?e[n.groupIDField]===r[""+a]?e[n.idField]===t:null:e[n.idField]===t}))[0];return this.lastResourceLevel.map((function(e){return e.resourceData})).indexOf(s)},n.prototype.resourceExpand=function(e,t,i){var n=this.parent.resourceCollection.filter((function(e){return e.name===t?e:null}))[0],r=0,a=n.dataSource.filter((function(t){return t[n.idField]===e}))[0];r=this.parent.activeViewOptions.group.byGroupID?this.lastResourceLevel.map((function(e){return e.resourceData})).indexOf(a):this.getIndexFromResourceId(e,t,n);var s=this.parent.element.querySelector("."+pt+' [data-group-index="'+r+'"] .'+vt);s&&(s.classList.contains(ut)&&!i||s.classList.contains(gt)&&i)&&s.click()},n.prototype.resourceScroll=function(e,t){if(!(this.parent.isAdaptive||["Agenda","MonthAgenda"].indexOf(this.parent.currentView)>-1)){var i=t||this.parent.resourceCollection.slice(-1)[0].name,n=this.parent.resourceCollection.length-1,r=this.parent.resourceCollection.filter((function(e,t){return e.name===i?(n=t,e):null}))[0],a=this.parent.element.querySelector("."+Qt),s=0;if(this.parent.activeView.isTimelineView()){if(this.parent.activeViewOptions.group.byGroupID){var o=r.dataSource.filter((function(t){return t[r.idField]===e}))[0];s=this.lastResourceLevel.map((function(e){return e.resourceData})).indexOf(o)}else s=this.getIndexFromResourceId(e,i,r);if(this.parent.virtualScrollModule){var l=this.parent.element.querySelector("."+Kt),p=Math.round(l.offsetHeight/this.expandedResources.length);if(this.parent.rowAutoHeight&&(a.scrollTop=0,this.parent.virtualScrollModule.virtualScrolling()),a.scrollTop=s*p-(this.parent.virtualScrollModule.bufferCount-1)*p,this.parent.virtualScrollModule.virtualScrolling(),this.parent.rowAutoHeight)(c=this.parent.element.querySelector("."+ze+'[data-group-index="'+s+'"]'))&&!c.parentElement.classList.contains(Nn)&&(a.scrollTop=a.scrollTop<c.offsetTop?c.offsetTop:a.scrollTop+c.offsetTop);else a.scrollTop=s*p}else{var c;(c=this.parent.element.querySelector("."+ze+'[data-group-index="'+s+'"]'))&&!c.parentElement.classList.contains(Nn)&&(a.scrollTop=c.offsetTop)}}else{s=this.parent.activeViewOptions.group.byGroupID?i===this.parent.resourceCollection.slice(-1)[0].name?this.lastResourceLevel.map((function(e){return e.resourceData[r.idField]})).indexOf(e):r.dataSource.map((function(e){return e[r.idField]})).indexOf(e):this.getIndexFromResourceId(e,i,r);var h="Month"===this.parent.currentView?this.parent.element.querySelector("."+Ge+" tbody tr:nth-child("+(n+1)+")"):this.parent.element.querySelector("."+Oi+":nth-child("+(n+1)+")"),d=[].slice.call(h.children).map((function(e){return e.offsetLeft}));a.scrollLeft=d[parseInt(s.toString(),10)]}}},n.prototype.destroy=function(){if(this.parent.off(W,this.documentClick),this.treeViewObj){if(this.treeViewObj.portals&&this.treeViewObj.portals.length>0){var t=this.treeViewObj.portals.map((function(e){return e.propName}));t.length>0&&this.parent.resetTemplates(t)}this.treeViewObj.destroy(),this.treeViewObj=null}this.treePopup&&(this.treePopup.destroy(),this.treePopup=null,(0,e.remove)(this.parent.element.querySelector("."+Yn)),(0,e.remove)(this.parent.element.querySelector("."+zn)));var i=this.parent.element.querySelector("."+It);i&&(0,e.remove)(i)},n}(),Ao=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Io=function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},Mo=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ao(i,t),Io([(0,e.Property)("")],i.prototype,"id",void 0),Io([(0,e.Property)("")],i.prototype,"text",void 0),Io([(0,e.Property)("auto")],i.prototype,"width",void 0),Io([(0,e.Property)("")],i.prototype,"cssClass",void 0),Io([(0,e.Property)(!1)],i.prototype,"showAlwaysInPopup",void 0),Io([(0,e.Property)(!1)],i.prototype,"disabled",void 0),Io([(0,e.Property)("")],i.prototype,"prefixIcon",void 0),Io([(0,e.Property)("")],i.prototype,"suffixIcon",void 0),Io([(0,e.Property)(!0)],i.prototype,"visible",void 0),Io([(0,e.Property)("None")],i.prototype,"overflow",void 0),Io([(0,e.Property)("")],i.prototype,"template",void 0),Io([(0,e.Property)("Button")],i.prototype,"type",void 0),Io([(0,e.Property)("Both")],i.prototype,"showTextOn",void 0),Io([(0,e.Property)(null)],i.prototype,"htmlAttributes",void 0),Io([(0,e.Property)("")],i.prototype,"tooltipText",void 0),Io([(0,e.Property)("Left")],i.prototype,"align",void 0),Io([(0,e.Property)(-1)],i.prototype,"tabIndex",void 0),Io([(0,e.Property)("Custom")],i.prototype,"name",void 0),Io([(0,e.Event)()],i.prototype,"click",void 0),i}(e.ChildProperty),ko=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ro=function(e,t,i,n){var r,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},Ho=function(i){function n(e,t){var n=i.call(this,e,t)||this;return n.adaptiveGroupIndex=0,n}return ko(n,i),n.prototype.render=function(){var i=[],n=[];if(i.push(Me),this.enableRtl?i.push(ke):n.push(ke),this.isAdaptive?i.push(Re):n.push(Re),this.enableAdaptiveUI?i.push(He):n.push(He),this.allowMultiDrag?i.push(Pe):n.push(Pe),this.cssClass)for(var r=0,a=this.cssClass.split(" ");r<a.length;r++){var s=a[r];i.push(s)}(0,e.classList)(this.element,i,n),this.validateDate(),(0,t.createSpinner)({target:this.element}),this.scrollModule=new pr(this),this.scrollModule.setWidth(),this.scrollModule.setHeight(),this.renderModule=new Zs(this),this.eventBase=new ya(this),this.workCellAction=new ho(this),this.allowKeyboardInteraction&&(this.keyboardInteractionModule=new hr(this)),this.inlineModule=new Oa(this),this.initializeDataModule(),this.renderTableContainer(),this.activeViewOptions=this.getActiveViewOptions(),this.initializeResources(),this.wireEvents()},n.prototype.renderTableContainer=function(){this.element.querySelector("."+qe)||this.element.appendChild(this.createElement("div",{className:qe}))},n.prototype.getEventTemplateName=function(e){var t="eventTemplate_"+e;return this.activeEventTemplates.indexOf(t)<0&&this.activeEventTemplates.push(t),t},n.prototype.renderTemplates=function(e){this.isReact?this.renderReactTemplates(e):e&&e()},n.prototype.resetTemplates=function(e){(this.isAngular||this.isReact)&&this.clearTemplate(e)},n.prototype.sanitize=function(t,i){this.enableHtmlSanitizer?i.innerText=e.SanitizeHtmlHelper.sanitize(t):i.innerHTML=t},n.prototype.initializeResources=function(e){void 0===e&&(e=!1),this.resources.length>0?(this.resourceBase=new Vo(this),this.resourceBase.bindResourcesData(e)):(this.resourceBase=null,this.resourceCollection=[],this.renderElements(e))},n.prototype.destroyEditorWindow=function(){this.eventWindow&&(this.eventWindow.destroy(),this.eventWindow=null),this.eventWindow=new Qs(this)},n.prototype.renderElements=function(t){if(t)return this.initializeView(this.currentView),void this.eventWindow.refresh();this.destroyHeaderModule(),this.showHeaderBar&&(this.headerModule=new lr(this)),this.renderTableContainer(),(e.Browser.isDevice||e.Browser.isTouch)&&(this.scheduleTouchModule=new cr(this)),this.initializeView(this.currentView),this.destroyPopups(),this.isPrinting||this.initializePopups()},n.prototype.validateDate=function(t){void 0===t&&(t=this.selectedDate);var i=t instanceof Date?new Date(t.getTime()):new Date(t),n=(0,e.isNullOrUndefined)(this.minDate)?new Date(1900,0,1):this.minDate instanceof Date?new Date(this.minDate.getTime()):new Date(this.minDate),r=(0,e.isNullOrUndefined)(this.maxDate)?new Date(2099,11,31):this.maxDate instanceof Date?new Date(this.maxDate.getTime()):new Date(this.maxDate);if(!(n<=r))throw Error("minDate should be equal or less than maxDate");i<n&&(i=n),i>r&&(i=r),this.setProperties({selectedDate:new Date(""+i),minDate:new Date(""+n),maxDate:new Date(""+r)},!0),this.eventWindow&&this.eventWindow.updateMinMaxDateToEditor()},n.prototype.getViewIndex=function(e){for(var t=0;t<this.viewCollections.length;t++){if(this.viewCollections[parseInt(t.toString(),10)].option===e)return t}return-1},n.prototype.setViewOptions=function(t){if(void 0===t&&(t=!1),!(0,e.isNullOrUndefined)(this.views)&&0!==this.views.length){var i,n;this.viewOptions={},this.viewCollections=[];var r=this.viewIndex,a=0;this.viewIndex=-1;for(var s=0,o=this.views;s<o.length;s++){var l=o[s],p="string"!=typeof l;"string"==typeof l?(i=l,this.currentView===i&&(n=i,this.viewIndex=a)):(i=l.option,l.isSelected&&(n=i,this.viewIndex=a));var c=(0,e.extend)({option:i},p?l:{}),h=i.charAt(0).toLowerCase()+i.slice(1);c.cellHeaderTemplateName=c.cellHeaderTemplate?c.option:"",c.dateHeaderTemplateName=c.dateHeaderTemplate?c.option:"",c.dateRangeTemplateName=c.dateRangeTemplate?c.option:"",c.cellTemplateName=c.cellTemplate?c.option:"",c.dayHeaderTemplateName=c.dayHeaderTemplate?c.option:"",c.monthHeaderTemplateName=c.monthHeaderTemplate?c.option:"",c.resourceHeaderTemplateName=c.resourceHeaderTemplate?c.option:"",c.headerIndentTemplateName=c.headerIndentTemplate?c.option:"",c.eventTemplateName=c.eventTemplate?c.option:"",(0,e.isNullOrUndefined)(c.firstDayOfWeek)||0!==c.firstDayOfWeek||delete c.firstDayOfWeek,(0,e.isNullOrUndefined)(c.interval)||1!==c.interval||delete c.interval,this.viewCollections.push(c),(0,e.isNullOrUndefined)(this.viewOptions[""+h])?this.viewOptions[""+h]=[c]:this.viewOptions[""+h].push(c),a++}if(!t&&n&&this.setProperties({currentView:n},!0),-1===this.viewIndex){var d=this.getViewIndex(this.currentView);this.viewIndex="string"==typeof this.views[0]||(0,e.isNullOrUndefined)(r)||-1===r?-1===d?0:d:r}}},n.prototype.getActiveViewOptions=function(){var t={enable:this.timeScale.enable,interval:this.timeScale.interval,slotCount:this.timeScale.slotCount,majorSlotTemplate:this.timeScale.majorSlotTemplate,minorSlotTemplate:this.timeScale.minorSlotTemplate},i={byDate:!(this.viewCollections[this.viewIndex].option.indexOf("Year")>-1)&&this.group.byDate,byGroupID:this.group.byGroupID,allowGroupEdit:this.group.allowGroupEdit,resources:(0,e.isNullOrUndefined)(this.group.resources)?[]:this.group.resources,headerTooltipTemplate:this.group.headerTooltipTemplate,enableCompactView:this.group.enableCompactView,hideNonWorkingDays:["Day","Week","WorkWeek","Month"].indexOf(this.currentView)>-1&&this.group.hideNonWorkingDays},n=this.viewCollections[this.viewIndex].workDays?[]:this.workDays,r={dateFormat:this.dateFormat,endHour:this.endHour,isSelected:!1,option:null,readonly:this.readonly,startHour:this.startHour,allowVirtualScrolling:!1,cellHeaderTemplate:this.cellHeaderTemplate,dayHeaderTemplate:this.dayHeaderTemplate,monthHeaderTemplate:this.monthHeaderTemplate,cellTemplate:this.cellTemplate,eventTemplate:this.eventSettings.template,dateHeaderTemplate:this.dateHeaderTemplate,dateRangeTemplate:this.dateRangeTemplate,resourceHeaderTemplate:this.resourceHeaderTemplate,headerIndentTemplate:this.headerIndentTemplate,firstMonthOfYear:this.firstMonthOfYear,firstDayOfWeek:this.firstDayOfWeek,workDays:n,monthsCount:this.monthsCount,showWeekend:this.showWeekend,showWeekNumber:this.showWeekNumber,displayName:null,interval:1,timeScale:t,timeFormat:this.internalTimeFormat,group:i,headerRows:this.headerRows,orientation:"Horizontal",numberOfWeeks:0,displayDate:null,enableLazyLoading:!1},a=this.viewCollections[this.viewIndex],s=(0,e.extend)(r,a,void 0,!0);return 0!==this.firstDayOfWeek&&a.firstDayOfWeek&&this.firstDayOfWeek!==a.firstDayOfWeek&&(s.firstDayOfWeek=this.firstDayOfWeek),s.displayDate&&(s.displayDate=s.displayDate instanceof Date?new Date(s.displayDate.getTime()):new Date(s.displayDate)),s.enableLazyLoading&&!(0,e.isNullOrUndefined)(s.group.resources)&&s.group.resources.length>0&&(-1===["Agenda","MonthAgenda","Year","TimelineYear"].indexOf(s.option)||"TimelineYear"===s.option&&"Vertical"===s.orientation)&&(s.allowVirtualScrolling=!0),s},n.prototype.initializeDataModule=function(){this.eventFields={id:this.eventSettings.fields.id,isBlock:this.eventSettings.fields.isBlock,subject:this.eventSettings.fields.subject.name,startTime:this.eventSettings.fields.startTime.name,endTime:this.eventSettings.fields.endTime.name,startTimezone:this.eventSettings.fields.startTimezone.name,endTimezone:this.eventSettings.fields.endTimezone.name,location:this.eventSettings.fields.location.name,description:this.eventSettings.fields.description.name,isAllDay:this.eventSettings.fields.isAllDay.name,recurrenceID:this.eventSettings.fields.recurrenceID.name,recurrenceRule:this.eventSettings.fields.recurrenceRule.name,recurrenceException:this.eventSettings.fields.recurrenceException.name,isReadonly:this.eventSettings.fields.isReadonly,followingID:this.eventSettings.fields.followingID},this.setEditorTitles(),this.dataModule=new ur(this,this.eventSettings.dataSource,this.eventSettings.query),this.crudModule=new co(this)},n.prototype.setEditorTitles=function(){this.editorTitles={subject:this.eventSettings.fields.subject.title||this.localeObj.getConstant("title"),startTime:this.eventSettings.fields.startTime.title||this.localeObj.getConstant("start"),endTime:this.eventSettings.fields.endTime.title||this.localeObj.getConstant("end"),isAllDay:this.eventSettings.fields.isAllDay.title||this.localeObj.getConstant("allDay"),startTimezone:this.eventSettings.fields.startTimezone.title||this.localeObj.getConstant("startTimezone"),endTimezone:this.eventSettings.fields.endTimezone.title||this.localeObj.getConstant("endTimezone"),location:this.eventSettings.fields.location.title||this.localeObj.getConstant("location"),description:this.eventSettings.fields.description.title||this.localeObj.getConstant("description"),recurrenceRule:this.eventSettings.fields.recurrenceRule.title||this.localeObj.getConstant("repeat")}},n.prototype.initializeView=function(e){this.showSpinner(),this.activeViewOptions=this.getActiveViewOptions(),this.resourceBase&&this.resourceBase.setResourceCollection(),this.initializeTemplates(),this.renderModule.render(e)},n.prototype.initializeTemplates=function(){this.cellHeaderTemplateFn=this.templateParser(this.activeViewOptions.cellHeaderTemplate),this.dayHeaderTemplateFn=this.templateParser(this.activeViewOptions.dayHeaderTemplate),this.monthHeaderTemplateFn=this.templateParser(this.activeViewOptions.monthHeaderTemplate),this.cellTemplateFn=this.templateParser(this.activeViewOptions.cellTemplate),this.dateHeaderTemplateFn=this.templateParser(this.activeViewOptions.dateHeaderTemplate),this.dateRangeTemplateFn=this.templateParser(this.activeViewOptions.dateRangeTemplate),this.majorSlotTemplateFn=this.templateParser(this.activeViewOptions.timeScale.majorSlotTemplate),this.minorSlotTemplateFn=this.templateParser(this.activeViewOptions.timeScale.minorSlotTemplate),this.appointmentTemplateFn=this.templateParser(this.activeViewOptions.eventTemplate),this.resourceHeaderTemplateFn=this.templateParser(this.activeViewOptions.resourceHeaderTemplate),this.headerIndentTemplateFn=this.templateParser(this.activeViewOptions.headerIndentTemplate),this.headerTooltipTemplateFn=this.templateParser(this.activeViewOptions.group.headerTooltipTemplate),this.eventTooltipTemplateFn=this.templateParser(this.eventSettings.tooltipTemplate),this.editorTemplateFn=this.templateParser(this.editorTemplate),this.editorHeaderTemplateFn=this.templateParser(this.editorHeaderTemplate),this.editorFooterTemplateFn=this.templateParser(this.editorFooterTemplate),this.quickInfoTemplatesHeaderFn=this.templateParser(this.quickInfoTemplates.header),this.quickInfoTemplatesContentFn=this.templateParser(this.quickInfoTemplates.content),this.quickInfoTemplatesFooterFn=this.templateParser(this.quickInfoTemplates.footer)},n.prototype.initializePopups=function(){this.eventWindow=new Qs(this),this.quickPopup=new Aa(this)},n.prototype.getDayNames=function(t){var i,n=[],r="";(0,e.isNullOrUndefined)(this.locale)||"en"===this.locale||"en-US"===this.locale?(r="days.stand-alone.",i=(0,e.getValue)(r+t,(0,e.getDefaultDateObject)(this.getCalendarMode()))):(r="main."+this.locale+".dates.calendars."+this.getCalendarMode()+".days.format."+t,i=(0,e.getValue)(r,e.cldrData));for(var a=0,s=Object.keys(i);a<s.length;a++){var o=s[a];n.push((0,e.getValue)(o,i))}return n},n.prototype.setCldrTimeFormat=function(){(0,e.isNullOrUndefined)(this.timeFormat)?(0,e.isNullOrUndefined)(this.locale)||"en"===this.locale||"en-US"===this.locale?this.internalTimeFormat=(0,e.getValue)("timeFormats.short",(0,e.getDefaultDateObject)(this.getCalendarMode())):this.internalTimeFormat=(0,e.getValue)("main."+this.locale+".dates.calendars."+this.getCalendarMode()+".timeFormats.short",e.cldrData):this.internalTimeFormat=this.timeFormat},n.prototype.getCalendarMode=function(){return(0,e.isNullOrUndefined)(this.calendarMode)?"gregorian":this.calendarMode.toLowerCase()},n.prototype.getTimeString=function(e){return this.globalize.formatDate(e,{format:this.activeViewOptions.timeFormat,type:"time",calendar:this.getCalendarMode()}).toLocaleUpperCase()},n.prototype.getDateTime=function(e){return e instanceof Date?new Date(e.getTime()):new Date(e)},n.prototype.setCalendarMode=function(){"Islamic"===this.calendarMode?this.calendarUtil=new vr:this.calendarUtil=new gr},n.prototype.changeView=function(t,i,n,r){var a=this;if((0,e.isNullOrUndefined)(r)&&(r=this.getViewIndex(t)),!(!n&&r===this.viewIndex&&this.currentView===t||r<0)){var s=this.activeViewOptions?this.activeViewOptions.option:this.currentView,o={requestType:"viewNavigate",cancel:!1,event:i};this.trigger(p,o,(function(e){if(e.cancel)a.currentView=s;else{var n={action:"view",cancel:!1,currentDate:a.selectedDate,previousView:s,currentView:t,viewIndex:r};a.trigger(g,n,(function(e){if(e.cancel)a.currentView=s;else{var n=["Day","Week","WorkWeek"].indexOf(t)>-1&&["Day","Week","WorkWeek"].indexOf(s)<0;a.uiStateValues.isInitial=n||t.indexOf("Timeline")>-1||t.indexOf("Year")>-1,a.uiStateValues.top=t.indexOf("Timeline")>-1&&s.indexOf("Timeline")<0?0:a.uiStateValues.top,a.viewIndex=e.viewIndex,a.setProperties({currentView:t},!0),a.headerModule&&(a.headerModule.updateActiveView(),a.headerModule.setCalendarDate(a.selectedDate),a.headerModule.setCalendarView()),a.initializeView(a.currentView),a.animateLayout(),o={requestType:"viewNavigate",cancel:!1,event:i},a.trigger(c,o)}}))}}))}},n.prototype.changeDate=function(e,t){var i=this,n={requestType:"dateNavigate",cancel:!1,event:t};this.trigger(p,n,(function(r){if(!r.cancel){var a={action:"date",cancel:!1,previousDate:i.selectedDate,currentDate:e};i.trigger(g,a,(function(e){e.cancel||(i.uiStateValues.isInitial=i.activeView.isTimelineView()&&"TimelineYear"!==i.currentView,i.validateDate(e.currentDate),i.headerModule&&i.headerModule.setCalendarDate(e.currentDate),"MonthAgenda"===i.currentView&&i.monthAgendaModule&&(i.monthAgendaModule.monthAgendaDate=new Date(""+i.selectedDate)),i.initializeView(i.currentView),i.animateLayout(),n={requestType:"dateNavigate",cancel:!1,event:t},i.trigger(c,n))}))}}))},n.prototype.isMinMaxDate=function(t){void 0===t&&(t=this.selectedDate);var i=(0,e.isNullOrUndefined)(this.maxDate)?new Date(2099,11,31):this.maxDate,n=(0,e.isNullOrUndefined)(this.minDate)?new Date(1900,0,1):this.minDate;return t.getTime()>=n.getTime()&&t.getTime()<=i.getTime()},n.prototype.isSelectedDate=function(e){return e.setHours(0,0,0,0)===new Date(""+this.selectedDate).setHours(0,0,0,0)},n.prototype.getCurrentTime=function(e){return void 0===e&&(e=new Date),this.timezone?this.tzModule.convert(e,this.tzModule.getLocalTimezoneName(),this.timezone):e},n.prototype.getNavigateView=function(){return this.activeView.isTimelineView()?"TimelineMonth"===this.currentView||"TimelineYear"===this.currentView?"TimelineDay":"Agenda":"Day"},n.prototype.animateLayout=function(){this.activeView.element&&new e.Animation({duration:600,name:"FadeIn",timingFunction:"easeIn"}).animate(this.activeView.element)},n.prototype.requiredModules=function(){var e=[];this.setViewOptions(!0);for(var t=0,i=Object.keys(this.viewOptions);t<i.length;t++){var n=i[t];n="timelineDay"===n||"timelineWeek"===n||"timelineWorkWeek"===n?"timelineViews":n,e.push({member:n,args:[this]})}return this.allowDragAndDrop&&e.push({member:"dragAndDrop",args:[this]}),this.allowResizing&&e.push({member:"resize",args:[this]}),e.push({member:"excelExport",args:[this]}),e.push({member:"iCalendarExport",args:[this]}),e.push({member:"iCalendarImport",args:[this]}),e.push({member:"print",args:[this]}),e},n.prototype.preRender=function(){this.isAdaptive=e.Browser.isDevice||Ee(),this.globalize=new e.Internationalization(this.locale),this.tzModule=new mr,(this&&(0,e.isNullOrUndefined)(this.uiStateValues)||!this.enablePersistence)&&(this.uiStateValues={expand:!1,isInitial:!0,left:0,top:0,isGroupAdaptive:!1,isIgnoreOccurrence:!1,groupIndex:this.adaptiveGroupIndex,action:!1,isBlock:!1,isCustomMonth:!0,isPreventTimezone:!1}),this.currentTimezoneDate=this.getCurrentTime(),this.activeCellsData={startTime:new Date(this.currentTimezoneDate),endTime:new Date(this.currentTimezoneDate),isAllDay:!1},this.activeEventData={event:void 0,element:void 0},this.getDefaultLocale(),this.localeObj=new e.L10n(this.getModuleName(),this.defaultLocale,this.locale),this.setCldrTimeFormat(),this.setCalendarMode(),this.eventsData=[],this.eventsProcessed=[],this.blockData=[],this.blockProcessed=[],this.resourceCollection=[],this.currentAction=null,this.selectedElements=[],this.activeEventTemplates=[],this.setViewOptions()},n.prototype.getDefaultLocale=function(){this.defaultLocale={day:"Day",week:"Week",workWeek:"Work Week",month:"Month",year:"Year",agenda:"Agenda",weekAgenda:"Week Agenda",workWeekAgenda:"Work Week Agenda",monthAgenda:"Month Agenda",today:"Today",noEvents:"No events",emptyContainer:"There are no events scheduled on this day.",allDay:"All day",start:"Start",end:"End",more:"more",close:"Close",cancel:"Cancel",noTitle:"(No Title)",delete:"Delete",deleteEvent:"Delete Event",deleteMultipleEvent:"Delete Multiple Events",selectedItems:"Items selected",deleteSeries:"Entire Series",edit:"Edit",editSeries:"Entire Series",editEvent:"Edit Event",createEvent:"Create",subject:"Subject",addTitle:"Add title",moreDetails:"More Details",moreEvents:"More Events",save:"Save",editContent:"How would you like to change the appointment in the series?",deleteContent:"Are you sure you want to delete this event?",deleteMultipleContent:"Are you sure you want to delete the selected events?",newEvent:"New Event",title:"Title",location:"Location",description:"Description",timezone:"Timezone",startTimezone:"Start Timezone",endTimezone:"End Timezone",repeat:"Repeat",saveButton:"Save",cancelButton:"Cancel",deleteButton:"Delete",recurrence:"Recurrence",wrongPattern:"The recurrence pattern is not valid.",seriesChangeAlert:"Do you want to cancel the changes made to specific instances of this series and match it to the whole series again?",createError:"The duration of the event must be shorter than how frequently it occurs. Shorten the duration, or change the recurrence pattern in the recurrence event editor.",sameDayAlert:"Two occurrences of the same event cannot occur on the same day.",occurenceAlert:"Cannot reschedule an occurrence of the recurring appointment if it skips over a later occurrence of the same appointment.",editRecurrence:"Edit Recurrence",recurringEvent:"Recurring Event",repeats:"Repeats",alert:"Alert",startEndError:"The selected end date occurs before the start date.",invalidDateError:"The entered date value is invalid.",blockAlert:"Events cannot be scheduled within the blocked time range.",ok:"Ok",yes:"Yes",no:"No",of:"of",occurrence:"Occurrence",series:"Series",previous:"Previous",next:"Next",timelineDay:"Timeline Day",timelineWeek:"Timeline Week",timelineWorkWeek:"Timeline Work Week",timelineMonth:"Timeline Month",timelineYear:"Timeline Year",editFollowingEvent:"Following Events",deleteTitle:"Delete Event",editTitle:"Edit Event",beginFrom:"Begin From",endAt:"Ends At",expandAllDaySection:"Expand-all-day-section",collapseAllDaySection:"Collapse-all-day-section",searchTimezone:"Search Timezone",noRecords:"No records found"}},n.prototype.wireEvents=function(){e.EventHandler.add(window,"resize",this.onScheduleResize,this),e.EventHandler.add(window,"orientationchange",this.onScheduleResize,this),e.EventHandler.add(document,e.Browser.touchStartEvent,this.onDocumentClick,this)},n.prototype.removeSelectedClass=function(){for(var t=this.getSelectedCells(),i=0,n=t;i<n.length;i++){var r=n[i];"Year"!==this.currentView&&r.setAttribute("aria-selected","false"),r.removeAttribute("tabindex")}(0,e.removeClass)(t,Rt),this.keyboardInteractionModule&&this.keyboardInteractionModule.selectedCells.length>0&&(this.keyboardInteractionModule.selectedCells=[])},n.prototype.addSelectedClass=function(t,i,n){if("Year"!==this.currentView)for(var r=0,a=t;r<a.length;r++){a[r].setAttribute("aria-selected","true")}(0,e.addClass)(t,Rt),i&&(i.setAttribute("tabindex","0"),i.focus({preventScroll:n||!1}))},n.prototype.selectCell=function(e){this.removeSelectedClass(),this.addSelectedClass([e],e)},n.prototype.getAllDayRow=function(){return this.element.querySelector("."+Be)},n.prototype.getContentTable=function(){return this.activeView.element.querySelector("."+We+" tbody")},n.prototype.getTableRows=function(){return[].slice.call(this.element.querySelectorAll("."+We+" tbody tr:not(."+Nn+")"))},n.prototype.getWorkCellElements=function(){return[].slice.call(this.element.querySelectorAll("."+ze))},n.prototype.getIndexOfDate=function(e,t){return e.map(Number).indexOf(+t)},n.prototype.isAllDayCell=function(e){return!(!(["Month","TimelineMonth","TimelineYear","MonthAgenda"].indexOf(this.currentView)>-1||e.classList.contains(Ue)||e.classList.contains(Qe))&&this.activeViewOptions.timeScale.enable)||!!(this.activeView.isTimelineView()&&this.activeViewOptions.headerRows.length>0&&"Hour"!==this.activeViewOptions.headerRows.slice(-1)[0].option)},n.prototype.getDateFromElement=function(t){var i;if((0,e.isNullOrUndefined)(t)||(i=t.getAttribute("data-date")),!(0,e.isNullOrUndefined)(i)){var n=parseInt(i,10);return new Date(n)}},n.prototype.getTargetElement=function(e,t,i){var n,r=document.elementFromPoint(t,i);return r&&(n=r.closest(e)),n?[n]:null},n.prototype.getCellHeaderTemplate=function(){return this.cellHeaderTemplateFn},n.prototype.getDayHeaderTemplate=function(){return this.dayHeaderTemplateFn},n.prototype.getMonthHeaderTemplate=function(){return this.monthHeaderTemplateFn},n.prototype.getCellTemplate=function(){return this.cellTemplateFn},n.prototype.getDateHeaderTemplate=function(){return this.dateHeaderTemplateFn},n.prototype.getDateRangeTemplate=function(){return this.dateRangeTemplateFn},n.prototype.getMajorSlotTemplate=function(){return this.majorSlotTemplateFn},n.prototype.getMinorSlotTemplate=function(){return this.minorSlotTemplateFn},n.prototype.getAppointmentTemplate=function(){return this.appointmentTemplateFn},n.prototype.getEventTooltipTemplate=function(){return this.eventTooltipTemplateFn},n.prototype.getHeaderTooltipTemplate=function(){return this.headerTooltipTemplateFn},n.prototype.getEditorTemplate=function(){return this.editorTemplateFn},n.prototype.getEditorHeaderTemplate=function(){return this.editorHeaderTemplateFn},n.prototype.getEditorFooterTemplate=function(){return this.editorFooterTemplateFn},n.prototype.getQuickInfoTemplatesHeader=function(){return this.quickInfoTemplatesHeaderFn},n.prototype.getQuickInfoTemplatesContent=function(){return this.quickInfoTemplatesContentFn},n.prototype.getQuickInfoTemplatesFooter=function(){return this.quickInfoTemplatesFooterFn},n.prototype.getResourceHeaderTemplate=function(){return this.resourceHeaderTemplateFn},n.prototype.getHeaderIndentTemplate=function(){return this.headerIndentTemplateFn},n.prototype.getCssProperties=function(){return{border:this.enableRtl?"borderLeftWidth":"borderRightWidth",padding:this.enableRtl?"paddingLeft":"paddingRight",rtlBorder:this.enableRtl?"borderRightWidth":"borderLeftWidth",rtlPadding:this.enableRtl?"paddingRight":"paddingLeft"}},n.prototype.removeNewEventElement=function(){var t=this.element.querySelector("."+ui);(0,e.isNullOrUndefined)(t)||(0,e.remove)(t)},n.prototype.getStartEndTime=function(t){if(!(0,e.isNullOrUndefined)(t)&&""!==t){var i=se(new Date(this.currentTimezoneDate)||this.getCurrentTime()),n=t.split(":");return 2===n.length&&i.setHours(parseInt(n[0],10),parseInt(n[1],10),0),i}return null},n.prototype.onDocumentClick=function(e){this.notify(W,{event:e})},n.prototype.onScheduleResize=function(){if(!((0,e.isNullOrUndefined)(this.activeView)||(this.isAdaptive||Oe())&&document.activeElement&&document.activeElement.classList.contains(vn)||this.uiStateValues.isTapHold))if(this.virtualScrollModule&&this.activeView.isTimelineView()&&this.virtualScrollModule.refreshLayout(),this.activeViewOptions.timeScale.enable&&this.activeView&&this.activeView.highlightCurrentTime(),this.quickPopup&&this.quickPopup.onClosePopup(),Te(),"Month"===this.currentView||"Agenda"!==this.currentView&&"MonthAgenda"!==this.currentView&&!this.activeViewOptions.timeScale.enable||this.activeView.isTimelineView()){this.activeView.resetColWidth(),this.notify(U,{cssProperties:this.getCssProperties(),isPreventScrollUpdate:!0});var t=!1;this.activeViewOptions.enableLazyLoading&&this.virtualScrollModule&&this.virtualScrollModule.isRemoteRefresh&&(t=this.virtualScrollModule.isRemoteRefresh,this.virtualScrollModule.isRemoteRefresh=!1),this.refreshEvents(t)}else this.notify(N,{})},n.prototype.templateParser=function(t){if(t)try{return"function"==typeof t?(0,e.compile)(t):document.querySelectorAll(t).length?(0,e.compile)(document.querySelector(t).innerHTML.trim()):(0,e.compile)(t)}catch(i){return(0,e.compile)(t)}},n.prototype.getSelectedCells=function(){return[].slice.call(this.element.querySelectorAll("."+Rt))},n.prototype.getAnnouncementString=function(e,t){var i;if(this.quickPopup&&this.activeViewOptions.group.resources.length>0){i=this.quickPopup.getResourceText({event:e},"event")+'"s event - '}var n=t||e[this.eventFields.subject]||this.eventSettings.fields.subject.default,r=e[this.eventFields.location]||this.eventSettings.fields.location.default,a="full",s=this.globalize.formatDate(e[this.eventFields.startTime],{type:"dateTime",skeleton:a,calendar:this.getCalendarMode()}),o=this.globalize.formatDate(e[this.eventFields.endTime],{type:"dateTime",skeleton:a,calendar:this.getCalendarMode()}),l=n+" "+this.localeObj.getConstant("beginFrom")+" "+s+" "+this.localeObj.getConstant("endAt")+" "+o;return i&&(l=i+" "+l),r&&""!==r&&(l=l+" "+this.localeObj.getConstant("location")+" "+r),e[this.eventFields.recurrenceRule]&&""!==e[this.eventFields.recurrenceRule]&&e[this.eventFields.id]===e[this.eventFields.recurrenceID]&&(l=l+" "+this.localeObj.getConstant("recurringEvent")),l},n.prototype.boundaryValidation=function(e,t){var i={left:!1,right:!1,top:!1,bottom:!1},n=this.element.querySelector("."+Qt).getBoundingClientRect();return e<n.top+30+window.pageYOffset&&e>n.top+window.pageYOffset&&(i.top=!0),e>n.bottom-30+window.pageYOffset&&e<n.bottom+window.pageYOffset&&(i.bottom=!0),t<n.left+30+window.pageXOffset&&t>n.left+window.pageXOffset&&(i.left=!0),t>n.right-30+window.pageXOffset&&t<n.right+window.pageXOffset&&(i.right=!0),i},n.prototype.getWeekNumberContent=function(e){var t;if("FirstDay"===this.weekRule){var i=ee(e.slice(-1)[0],this.firstDayOfWeek);t=this.globalize.formatNumber(ne(i))}else if("FirstFourDayWeek"===this.weekRule){var n=re(r=$(e.slice(-1)[0],this.firstDayOfWeek),ee(e.slice(-1)[0],this.firstDayOfWeek));t=this.globalize.formatNumber(ne(n))}else if("FirstFullWeek"===this.weekRule){var r=$(e.slice(-1)[0],this.firstDayOfWeek);t=this.globalize.formatNumber(ne(r))}return t},n.prototype.renderHeaderIndentTemplate=function(t,i){if(this.activeViewOptions.headerIndentTemplate){var n=this.element.id+"_"+this.activeViewOptions.headerIndentTemplateName+"headerIndentTemplate",r=[].slice.call(this.getHeaderIndentTemplate()(t,this,"headerIndentTemplate",n,!1,void 0,void 0,this.root));(0,e.append)(r,i)}},n.prototype.isSpecificResourceEvents=function(){return this.activeViewOptions.group.resources.length>0&&!this.activeViewOptions.group.allowGroupEdit&&!this.rowAutoHeight&&!this.virtualScrollModule&&this.activeViewOptions.group.byGroupID},n.prototype.unWireEvents=function(){e.EventHandler.remove(window,"resize",this.onScheduleResize),e.EventHandler.remove(window,"orientationchange",this.onScheduleResize),e.EventHandler.remove(document,e.Browser.touchStartEvent,this.onDocumentClick)},n.prototype.getModuleName=function(){return"schedule"},n.prototype.getPersistData=function(){return this.addOnPersist(["currentView","selectedDate","scrollTop","scrollLeft","adaptiveGroupIndex"])},n.prototype.onPropertyChanged=function(t,i){if(!this.isReact||!(0,e.isNullOrUndefined)(this.activeView)){for(var n={isRefresh:!1,isResource:!1,isDate:!1,isView:!1,isLayout:!1,isDataManager:!1},r=0,a=Object.keys(t);r<a.length;r++){var s=a[r];switch(s){case"views":this.setViewOptions(),this.headerModule&&this.headerModule.updateItems(),n.isView=!0;break;case"currentView":n.isView=!0;break;case"minDate":case"maxDate":case"selectedDate":n.isDate=!0;break;case"dateFormat":this.activeViewOptions=this.getActiveViewOptions(),this.headerModule&&this.headerModule.updateDateRange();break;case"showHeaderBar":case"toolbarItems":this.destroyHeaderModule(),t.showHeaderBar&&(this.headerModule=new lr(this),this.headerModule.updateDateRange()),this.notify(U,{cssProperties:this.getCssProperties()}),this.activeView.isTimelineView()&&this.refreshEvents(!1);break;case"workDays":JSON.stringify(i.workDays)!==JSON.stringify(t.workDays)&&(n.isLayout=!0);break;case"showWeekend":case"startHour":case"endHour":case"workHours":case"readonly":case"headerRows":case"showWeekNumber":case"rowAutoHeight":n.isLayout=!0;break;case"locale":case"calendarMode":this.globalize=new e.Internationalization(this.locale),this.localeObj=new e.L10n(this.getModuleName(),this.defaultLocale,this.locale),this.setCldrTimeFormat(),this.setCalendarMode(),n.isRefresh=!0;break;case"firstDayOfWeek":this.activeViewOptions.firstDayOfWeek=t.firstDayOfWeek,this.eventWindow&&this.eventWindow.refreshRecurrenceEditor(),n.isLayout=!0;break;case"showTimeIndicator":this.activeViewOptions.timeScale.enable&&this.activeView&&this.activeView.highlightCurrentTime();break;case"cellHeaderTemplate":this.activeViewOptions.cellHeaderTemplate=t.cellHeaderTemplate,this.cellHeaderTemplateFn=this.templateParser(this.activeViewOptions.cellHeaderTemplate),n.isLayout=!0;break;case"cellTemplate":this.activeViewOptions.cellTemplate=t.cellTemplate,this.cellTemplateFn=this.templateParser(this.activeViewOptions.cellTemplate),n.isLayout=!0;break;case"dateHeaderTemplate":this.activeViewOptions.dateHeaderTemplate=t.dateHeaderTemplate,this.dateHeaderTemplateFn=this.templateParser(this.activeViewOptions.dateHeaderTemplate),n.isLayout=!0;break;case"dateRangeTemplate":this.activeViewOptions.dateRangeTemplate=t.dateRangeTemplate,this.dateRangeTemplateFn=this.templateParser(this.activeViewOptions.dateRangeTemplate),this.headerModule&&this.headerModule.updateDateRange();break;case"dayHeaderTemplate":this.activeViewOptions.dayHeaderTemplate=t.dayHeaderTemplate,this.dayHeaderTemplateFn=this.templateParser(this.activeViewOptions.dayHeaderTemplate),n.isLayout=!0;break;case"monthHeaderTemplate":this.activeViewOptions.monthHeaderTemplate=t.monthHeaderTemplate,this.monthHeaderTemplateFn=this.templateParser(this.activeViewOptions.monthHeaderTemplate),n.isLayout=!0;break;case"resourceHeaderTemplate":this.activeViewOptions.resourceHeaderTemplate=t.resourceHeaderTemplate,this.resourceHeaderTemplateFn=this.templateParser(this.activeViewOptions.resourceHeaderTemplate),n.isLayout=!0;break;case"timezone":this.eventBase.timezonePropertyChange(i.timezone),this.headerModule&&this.headerModule.setCalendarTimezone();break;case"enableRtl":this.setRtlClass(),n.isRefresh=!0;break;default:this.extendedPropertyChange(s,t,i,n)}}this.propertyChangeAction(n)}},n.prototype.propertyChangeAction=function(t){t.isRefresh?this.refresh():t.isResource?this.initializeResources(!0):t.isView?this.changeView(this.currentView,null,!0):t.isDate?((0,e.isNullOrUndefined)(this.selectedDate)&&this.setProperties({selectedDate:this.getCurrentTime()},!0),this.changeDate(this.selectedDate)):t.isLayout?(this.activeCellsData=null,this.initializeView(this.currentView)):t.isDataManager&&this.crudModule&&(this.dragAndDropModule&&(this.dragAndDropModule.actionObj.action="",(0,e.removeClass)([this.element],di)),this.crudModule.refreshDataManager())},n.prototype.allDayRowScrollUpdate=function(){var t=this.element.querySelector("."+Ge),i=this.element.querySelector("."+Be);if("auto"!==this.height&&this.enableAllDayScroll)t.classList.contains(sr)&&(0,e.removeClass)([t],sr),this.eventBase.allDayExpandScroll(t);else if((0,e.addClass)([t],sr),t.classList.contains(ar)&&(0,e.removeClass)([t],ar),this.uiStateValues.expand){var n=[].slice.call(this.element.querySelectorAll("."+Ue));n[0].style.height=i.style.height?i.style.height:n[1].style.height}this.uiStateValues.expand||(i.style.height="")},n.prototype.extendedPropertyChange=function(t,i,n,r){switch(t){case"width":case"height":case"enableAllDayScroll":["Day","Week","WorkWeek"].indexOf(this.currentView)>-1&&this.allDayRowScrollUpdate(),this.notify(B,{module:"scroll",properties:{width:i.width,height:i.height}});break;case"cssClass":n.cssClass&&(0,e.removeClass)([this.element],n.cssClass.split(" ")),i.cssClass&&(0,e.addClass)([this.element],i.cssClass.split(" "));break;case"hideEmptyAgendaDays":case"agendaDaysCount":this.activeViewOptions=this.getActiveViewOptions(),r.isView=!0;break;case"eventSettings":this.onEventSettingsPropertyChanged(i.eventSettings,n.eventSettings,r);break;case"allowKeyboardInteraction":this.keyboardInteractionModule&&(this.keyboardInteractionModule.destroy(),this.keyboardInteractionModule=null),i.allowKeyboardInteraction&&(this.keyboardInteractionModule=new hr(this));break;case"timezoneDataSource":this.eventWindow&&this.eventWindow.refresh();break;case"editorTemplate":(0,e.isNullOrUndefined)(this.editorTemplate)||(this.editorTemplateFn=this.templateParser(this.editorTemplate)),this.eventWindow&&this.eventWindow.setDialogContent();break;case"editorHeaderTemplate":(0,e.isNullOrUndefined)(this.editorHeaderTemplate)||(this.editorHeaderTemplateFn=this.templateParser(this.editorHeaderTemplate)),this.eventWindow&&this.eventWindow.setDialogHeader();break;case"editorFooterTemplate":(0,e.isNullOrUndefined)(this.editorFooterTemplate)||(this.editorFooterTemplateFn=this.templateParser(this.editorFooterTemplate)),this.eventWindow&&this.eventWindow.setDialogFooter();break;case"quickInfoTemplates":this.quickInfoTemplates.header&&(this.quickInfoTemplatesHeaderFn=this.templateParser(this.quickInfoTemplates.header)),this.quickInfoTemplates.content&&(this.quickInfoTemplatesContentFn=this.templateParser(this.quickInfoTemplates.content)),this.quickInfoTemplates.footer&&(this.quickInfoTemplatesFooterFn=this.templateParser(this.quickInfoTemplates.footer));break;case"group":this.onGroupSettingsPropertyChanged(i.group,n.group,r);break;case"resources":r.isResource=!0;break;case"timeScale":this.activeViewOptions.timeScale.interval=i.timeScale.interval||this.activeViewOptions.timeScale.interval,this.activeViewOptions.timeScale.slotCount=i.timeScale.slotCount||this.activeViewOptions.timeScale.slotCount,this.eventWindow&&this.eventWindow.refreshDateTimePicker(),r.isLayout=!0;break;case"allowDragAndDrop":case"allowResizing":case"eventDragArea":this.refreshEvents(!1);break;case"weekRule":r.isLayout=!0;break;case"firstMonthOfYear":this.activeViewOptions.firstMonthOfYear=i.firstMonthOfYear,this.viewIndex=this.activeView.viewIndex,r.isLayout=!0;break;case"monthsCount":this.activeViewOptions.monthsCount=i.monthsCount,this.viewIndex=this.activeView.viewIndex,r.isLayout=!0;break;case"timeFormat":this.internalTimeFormat=i.timeFormat||this.activeViewOptions.timeFormat,this.eventWindow&&this.eventWindow.refreshDateTimePicker(),r.isLayout=!0;break;case"enableAdaptiveUI":this.showHeaderBar&&this.headerModule&&(this.destroyHeaderModule(),this.headerModule=new lr(this),this.headerModule.updateDateRange()),r.isLayout=!0;break;case"headerIndentTemplate":this.activeViewOptions.headerIndentTemplate=i.headerIndentTemplate,this.headerIndentTemplateFn=this.templateParser(this.activeViewOptions.headerIndentTemplate),r.isLayout=!0}},n.prototype.setRtlClass=function(){this.enableRtl?(0,e.addClass)([this.element],"e-rtl"):(0,e.removeClass)([this.element],"e-rtl")},n.prototype.onGroupSettingsPropertyChanged=function(e,t,i){for(var n=0,r=Object.keys(e);n<r.length;n++){"headerTooltipTemplate"===r[n]?this.headerTooltipTemplateFn=this.templateParser(e.headerTooltipTemplate):(i.isLayout=!0,this.eventWindow&&this.eventWindow.refresh())}},n.prototype.onEventSettingsPropertyChanged=function(e,t,i){for(var n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"dataSource":case"query":case"fields":case"includeFiltersInQuery":this.initializeDataModule(),i.isDataManager=!0;break;case"template":this.activeViewOptions.eventTemplate=e.template,this.appointmentTemplateFn=this.templateParser(this.activeViewOptions.eventTemplate),i.isDataManager=!0;break;case"enableTooltip":this.eventTooltip&&(this.eventTooltip.destroy(),this.eventTooltip=null),e.enableTooltip&&(this.eventTooltip=new Ia(this));break;case"tooltipTemplate":this.eventTooltipTemplateFn=this.templateParser(this.eventSettings.tooltipTemplate);break;case"resourceColorField":this.resourceBase&&this.resourceBase.setResourceCollection(),i.isDataManager=!0;break;case"editFollowingEvents":this.quickPopup&&this.quickPopup.refreshQuickDialog();break;case"allowAdding":case"allowEditing":case"allowDeleting":this.showHeaderBar&&this.headerModule&&this.headerModule.updateAddIcon(),this.eventWindow&&this.eventWindow.refresh();break;case"spannedEventPlacement":case"minimumEventDuration":case"enableMaxHeight":case"enableIndicator":this.refreshEvents(!1);break;case"ignoreWhitespace":i.isLayout=!0}}},n.prototype.destroyHeaderModule=function(){this.headerModule&&(this.headerModule.destroy(),this.headerModule=null)},n.prototype.destroyPopups=function(){this.quickPopup&&(this.quickPopup.destroy(),this.quickPopup=null),this.eventWindow&&(this.eventWindow.destroy(),this.eventWindow=null)},n.prototype.showSpinner=function(){(0,t.showSpinner)(this.element)},n.prototype.hideSpinner=function(){(0,t.hideSpinner)(this.element)},n.prototype.setWorkHours=function(t,i,n,r){var a;a=this.getWorkHourCells(t,i,n,r),(0,e.addClass)(a,Ye)},n.prototype.resetWorkHours=function(t,i,n,r){if(void 0===t&&(t=this.activeView.renderDates),t&&i&&n){var a=this.getWorkHourCells(t,i,n,r);(0,e.removeClass)(a,Ye)}else{var s=[].slice.call(this.element.querySelectorAll("."+Ye));(0,e.removeClass)(s,Ye)}},n.prototype.getWorkHourCells=function(t,i,n,r){if(["Agenda","MonthAgenda","Month","TimelineMonth"].indexOf(this.currentView)>-1)return[];var a=this.getStartEndTime(i),s=this.getStartEndTime(n),o=this.getContentTable();if((0,e.isNullOrUndefined)(a)||(0,e.isNullOrUndefined)(s)||!o)return[];a.setMilliseconds(0),s.setMilliseconds(0);var l=this.activeView.getStartHour();a<l&&(a=l);var p=this.activeView.getEndHour();s>p&&(s=p);for(var c=this.activeViewOptions.timeScale.interval*X/this.activeViewOptions.timeScale.slotCount,h=(l.getTimezoneOffset()-a.getTimezoneOffset())*X,d=Math.round((a.getTime()-l.getTime()+h)/c),u=Math.ceil((s.getTime()-l.getTime()+h)/c),g=d,v=u,m=[],f=0,y=t;f<y.length;f++){var T=y[f];se(T=this.getDateTime(T));var w=this.activeView.renderDates;(0,e.isNullOrUndefined)(r)||!this.resourceBase||this.activeView.isTimelineView()||(w=this.resourceBase.lastResourceLevel[parseInt(r.toString(),10)].renderDates);var D=this.getIndexOfDate(w,T);if(D>=0){if(this.activeView.isTimelineView()){var b=Math.round((p.getTime()-l.getTime())/c);d=g+D*b,u=v+D*b}for(var S=d;S<u;S++)if(this.activeView.isTimelineView()){var C=(0,e.isNullOrUndefined)(r)?0:r;m.push(o.rows[parseInt(C.toString(),10)].cells[parseInt(S.toString(),10)])}else if((0,e.isNullOrUndefined)(r))m.push(o.rows[parseInt(S.toString(),10)].cells[parseInt(D.toString(),10)]);else{var O="."+ze+'[data-group-index="'+r+'"]',E=[].slice.call(o.rows[parseInt(S.toString(),10)].querySelectorAll(O));m.push(E[parseInt(D.toString(),10)])}}}return m},n.prototype.getCellDetails=function(t){var i=t instanceof Array?t:[t],n=(0,e.getElement)(i[0]),r=(0,e.getElement)(i.slice(-1)[0]),a=this.getDateFromElement(n),s=this.getDateFromElement(r);if(!(0,e.isNullOrUndefined)(a)&&!(0,e.isNullOrUndefined)(s)){var o=this.activeView.isTimelineView()&&!(0,e.isNullOrUndefined)(r.getAttribute("colSpan"))&&this.headerRows.length>0,l=o?parseInt(r.getAttribute("colSpan"),10):1,p={startTime:a,endTime:s=!this.activeViewOptions.timeScale.enable||o||r.classList.contains(Ue)||r.classList.contains(Qe)?pe(new Date(s.getTime()),l):this.activeView.getEndDateFromStartDate(s),isAllDay:this.isAllDayCell(n),element:t},c=n.getAttribute("data-group-index");return(0,e.isNullOrUndefined)(c)||(p.groupIndex=parseInt(c,10)),p}},n.prototype.getSelectedElements=function(){return this.keyboardInteractionModule&&this.keyboardInteractionModule.selectedCells.length>0?this.keyboardInteractionModule.selectedCells:this.getSelectedCells()},n.prototype.getResourceCollections=function(){return this.resourceCollection},n.prototype.setResourceCollections=function(e,t){void 0===t&&(t=!0),!t&&this.uiStateValues&&(this.uiStateValues.isPreventEventRefresh=!0),this.setProperties({resources:e},!1)},n.prototype.changeCurrentView=function(e,t){var i=this.getViewIndex(e),n=e.charAt(0).toLowerCase()+e.slice(1),r=this.viewOptions[""+n];r&&(i=this.viewCollections.indexOf(r[t||0])),-1!==i&&i!==this.viewIndex&&this.changeView(e,null,null,i)},n.prototype.getCurrentViewIndex=function(){return this.viewIndex},n.prototype.getResourcesByIndex=function(e){if(this.resourceBase&&this.resourceBase.lastResourceLevel){if(e<0||e>=this.resourceBase.lastResourceLevel.length)return;var t=this.resourceBase.lastResourceLevel[parseInt(e.toString(),10)],i={};return this.resourceBase.setResourceValues(i,e),{resource:t.resource,resourceData:t.resourceData,groupData:i}}},n.prototype.expandResource=function(e,t){this.activeView.isTimelineView()&&this.resourceBase&&this.resourceCollection.length>1&&this.resourceBase.resourceExpand(e,t,!1)},n.prototype.collapseResource=function(e,t){this.activeView.isTimelineView()&&this.resourceBase&&this.resourceCollection.length>1&&this.resourceBase.resourceExpand(e,t,!0)},n.prototype.scrollTo=function(t,i){this.activeView.scrollToDate&&(0,e.isNullOrUndefined)(t)&&i?this.activeView.scrollToDate(i):this.activeView.scrollToHour&&this.activeView.scrollToHour(t,i)},n.prototype.scrollToResource=function(e,t){this.resourceBase&&this.resourceBase.lastResourceLevel&&this.resourceBase.resourceScroll(e,t)},n.prototype.exportToICalendar=function(e,t){if(!this.iCalendarExportModule)throw console.warn('[WARNING] :: Module "ICalendarExport" is not available in Schedule component! You either misspelled the module name or forgot to load it.'),Error("Inject ICalendarExport module");this.iCalendarExportModule.initializeCalendarExport(e,t)},n.prototype.importICalendar=function(e){if(!this.iCalendarImportModule)throw console.warn('[WARNING] :: Module "ICalendarImport" is not available in Schedule component! You either misspelled the module name or forgot to load it.'),Error("Inject ICalendarImport module");this.iCalendarImportModule.initializeCalendarImport(e)},n.prototype.addEvent=function(e){this.crudModule.addEvent(e)},n.prototype.generateEventOccurrences=function(e,t){return this.eventBase?this.eventBase.generateOccurrence(e,t):[]},n.prototype.exportToExcel=function(e){if(!this.excelExportModule)throw console.warn('[WARNING] :: Module "ExcelExport" is not available in Schedule component! You either misspelled the module name or forgot to load it.'),Error("Inject ExcelExport module");this.excelExportModule.initializeExcelExport(e)},n.prototype.print=function(e){if(!this.printModule)throw console.warn('[WARNING] :: Module "Print" is not available in Schedule component! You either misspelled the module name or forgot to load it.'),Error("Inject Print module");this.printModule.print(e)},n.prototype.saveEvent=function(e,t){this.crudModule.saveEvent(e,t)},n.prototype.deleteEvent=function(e,t){this.crudModule.deleteEvent(e,t)},n.prototype.getEvents=function(e,t,i){var n=[];return n=i?this.eventBase.getProcessedEvents():this.eventsData,e&&(e=this.getDateTime(e)),t&&(t=this.getDateTime(t)),n=this.eventBase.filterEventsByRange(n,e,t)},n.prototype.getBlockEvents=function(e,t,i){var n=[];return n=i?this.eventBase.getProcessedEvents(this.blockData):this.blockData,e&&(e=this.getDateTime(e)),t&&(t=this.getDateTime(t)),n=this.eventBase.filterEventsByRange(n,e,t)},n.prototype.getOccurrencesByID=function(e){return this.eventBase.getOccurrencesByID(e)},n.prototype.getOccurrencesByRange=function(e,t){return e=this.getDateTime(e),t=this.getDateTime(t),this.eventBase.getOccurrencesByRange(e,t)},n.prototype.getCurrentViewDates=function(){return this.activeView?this.activeView.renderDates:[]},n.prototype.setRecurrenceEditor=function(e){this.eventWindow.setRecurrenceEditor(e)},n.prototype.getEventMaxID=function(){return this.eventBase.getEventMaxID()},n.prototype.getDeletedOccurrences=function(e){return this.eventBase.getDeletedOccurrences(e)},n.prototype.getCurrentViewEvents=function(){return this.eventsProcessed},n.prototype.refreshEvents=function(t){void 0===t&&(t=!0),t?(this.dragAndDropModule&&(this.dragAndDropModule.actionObj.action="",(0,e.removeClass)([this.element],di)),this.crudModule.refreshDataManager()):(this.uiStateValues&&(this.uiStateValues.isPreventTimezone=!0),this.crudModule&&this.crudModule.refreshProcessedData(),this.uiStateValues&&(this.uiStateValues.isPreventTimezone=!1))},n.prototype.refreshTemplates=function(e){switch(e?this.resetTemplates([e]):this.resetTemplates(),e){case"eventTemplate":this.appointmentTemplateFn=this.templateParser(this.activeViewOptions.eventTemplate),this.refreshEvents(!1);break;case"dateHeaderTemplate":this.dateHeaderTemplateFn=this.templateParser(this.activeViewOptions.dateHeaderTemplate),this.activeView.refreshHeader();break;case"dateRangeTemplate":this.dateRangeTemplateFn=this.templateParser(this.activeViewOptions.dateRangeTemplate),this.headerModule&&this.headerModule.refresh();break;case"resourceHeaderTemplate":this.resourceHeaderTemplateFn=this.templateParser(this.activeViewOptions.resourceHeaderTemplate),this.activeView.isTimelineView()?this.activeView.refreshResourceHeader():this.activeView.refreshHeader();break;case"quickInfoTemplates":this.quickPopup&&(this.quickPopup.destroy(),this.quickPopup=null),this.quickPopup=new Aa(this),this.quickInfoTemplatesHeaderFn=this.templateParser(this.quickInfoTemplates.header),this.quickInfoTemplatesContentFn=this.templateParser(this.quickInfoTemplates.content),this.quickInfoTemplatesFooterFn=this.templateParser(this.quickInfoTemplates.footer);break;case"editorTemplate":this.destroyEditorWindow(),this.editorTemplateFn=this.templateParser(this.editorTemplate);break;case"editorHeaderTemplate":this.destroyEditorWindow(),this.editorHeaderTemplateFn=this.templateParser(this.editorHeaderTemplate);break;case"editorFooterTemplate":this.destroyEditorWindow(),this.editorFooterTemplateFn=this.templateParser(this.editorFooterTemplate);break;case"tooltipTemplate":case"headerTooltipTemplate":this.eventTooltip&&(this.eventTooltip.destroy(),this.eventTooltip=null),this.eventTooltip=new Ia(this),this.eventTooltipTemplateFn=this.templateParser(this.eventSettings.tooltipTemplate),this.headerTooltipTemplateFn=this.templateParser(this.activeViewOptions.group.headerTooltipTemplate);break;default:this.initializeView(this.currentView)}},n.prototype.refreshLayout=function(){this.onScheduleResize(),this.headerModule&&this.headerModule.refresh(),this.eventWindow&&this.eventWindow.refresh()},n.prototype.getEventDetails=function(t){var i=(t=(0,e.getElement)(t)).getAttribute("data-guid");return i?this.eventBase.getEventByGuid(i):{}},n.prototype.isSlotAvailable=function(t,i,n){var r,a,s=this,o=this.activeEventData.event;if(t instanceof Date||"string"==typeof t?(r=t,a=i):(o=t,r=t[this.eventFields.startTime],a=t[this.eventFields.endTime],this.resourceBase&&(n=this.eventBase.getGroupIndexFromEvent(t))),(0,e.isNullOrUndefined)(r)||(0,e.isNullOrUndefined)(a))return!0;r=this.getDateTime(r),a=this.getDateTime(a);var l=this.eventBase.filterEvents(r,a);return!(0,e.isNullOrUndefined)(n)&&this.resourceBase&&this.resourceBase.lastResourceLevel.length>0&&(l=this.eventBase.filterEventsByResource(this.resourceBase.lastResourceLevel[parseInt(n.toString(),10)],l)),o&&(l=o.Guid?l.filter((function(e){return e.Guid!==o.Guid})):l.filter((function(e){return e[s.eventFields.id]!==o[s.eventFields.id]}))),!(l.length>0)},n.prototype.openEditor=function(t,i,n,r){"Add"!==i||n?(t[this.eventFields.startTime]=this.getDateTime(t[this.eventFields.startTime]),t[this.eventFields.endTime]=this.getDateTime(t[this.eventFields.endTime])):(t.startTime=this.getDateTime(t.startTime),t.endTime=this.getDateTime(t.endTime),(0,e.isNullOrUndefined)(t.element)||(t.element=(0,e.getElement)(t.element))),this.currentAction=i,"Add"!==i&&(this.activeEventData.event=t),this.eventWindow.openEditor(t,i,n,r)},n.prototype.closeEditor=function(){this.eventWindow&&this.eventWindow.dialogClose()},n.prototype.openQuickInfoPopup=function(t){var i=this;if("Year"!==this.currentView&&!(0,e.isNullOrUndefined)(t))if((0,e.isNullOrUndefined)(t[this.eventFields.id])){if("Agenda"===this.currentView||"MonthAgenda"===this.currentView||(0,e.isNullOrUndefined)(this.activeView))return;var n={startTime:this.activeCellsData.startTime=this.getDateTime(t[this.eventFields.startTime]),endTime:this.activeCellsData.endTime=this.getDateTime(t[this.eventFields.endTime]),isAllDay:this.activeCellsData.isAllDay=!(0,e.isNullOrUndefined)(t[this.eventFields.isAllDay])&&t[this.eventFields.isAllDay]},a=this.activeView.getAdjustedDate(new Date(n.startTime));if(a){var s="."+ze+'[data-date="'+a.getTime()+'"]';this.activeViewOptions.group.resources.length>0&&!this.uiStateValues.isGroupAdaptive&&this.resourceBase&&this.eventBase&&(n.groupIndex=this.eventBase.getGroupIndexFromEvent(t),s="."+ze+'[data-date="'+a.getTime()+'"][data-group-index="'+n.groupIndex+'"]');var o=this.element.querySelector(s);o&&(o.focus(),n.element=o,this.notify(r,n))}}else{var l=this.getCurrentViewEvents().filter((function(e){return t[i.eventFields.id]===e[i.eventFields.id]}));if(l.length<=0)return;var p=l[0];if(t[this.eventFields.recurrenceRule]){var c=l.filter((function(e){return e[i.eventFields.startTime].getTime()===t[i.eventFields.startTime].getTime()}));c.length>0&&(p=c[0])}var h=this.element.querySelector('div[data-guid="'+p.Guid+'"]');h&&(this.eventBase.removeSelectedAppointmentClass(),this.eventBase.addSelectedAppointments([h],!1),this.activeEventData={event:p,element:h},"Agenda"!==this.currentView&&"MonthAgenda"!==this.currentView||(0,e.addClass)([this.activeEventData.element],$t),this.notify(m,this.activeEventData))}},n.prototype.closeQuickInfoPopup=function(){this.quickPopup&&this.quickPopup.quickPopupHide(!0)},n.prototype.closeTooltip=function(){this.eventTooltip&&this.eventTooltip.close()},n.prototype.selectResourceByIndex=function(e){this.resourceBase&&this.uiStateValues.isGroupAdaptive&&this.resourceBase.selectResourceByIndex(e)},n.prototype.getIndexFromResourceId=function(e,t){return this.resourceBase?this.resourceBase.getIndexFromResourceId(e,t):null},n.prototype.addResource=function(e,t,i){this.resourceBase.addResource(e,t,i)},n.prototype.removeResource=function(e,t){this.resourceBase.removeResource(e,t)},n.prototype.destroy=function(){this.eventTooltip&&(this.eventTooltip.destroy(),this.eventTooltip=null),this.destroyPopups(),this.hideSpinner(),this.unWireEvents(),this.destroyHeaderModule(),this.eventBase&&(this.eventBase.destroy(),this.eventBase=null),this.workCellAction&&(this.workCellAction.destroy(),this.workCellAction=null),this.inlineModule&&(this.inlineModule.destroy(),this.inlineModule=null),this.keyboardInteractionModule&&(this.keyboardInteractionModule.destroy(),this.keyboardInteractionModule=null),this.scrollModule&&(this.scrollModule.destroy(),this.scrollModule=null),this.printModule&&this.printModule.destroy(),this.activeView&&(this.resetTemplates(),this.activeView.removeEventListener(),this.activeView.destroy(),this.activeView=null),this.scheduleTouchModule&&(this.scheduleTouchModule.destroy(),this.scheduleTouchModule=null),this.crudModule&&(this.crudModule.destroy(),this.crudModule=null),this.dataModule&&(this.dataModule.destroy(),this.dataModule=null),i.prototype.destroy.call(this);for(var t=0,n=["dayModule","weekModule","workWeekModule","monthModule","monthAgendaModule","yearModule","agendaModule","timelineViewsModule","timelineMonthModule","timelineYearModule","resizeModule","dragAndDropModule","excelExportModule","printModule","iCalendarExportModule","iCalendarImportModule","tzModule","eventsData","eventsProcessed","blockData","blockProcessed","uiStateValues","viewCollections","viewOptions","defaultLocale","localeObj","selectedElements","resourceCollection","editorTitles","eventFields","activeViewOptions","activeEventData","activeCellsData","renderModule"];t<n.length;t++){this[""+n[t]]=null}be(this.element);var r=[Me,ke,Re,Pe];this.cssClass&&(r=r.concat(this.cssClass.split(" "))),(0,e.removeClass)([this.element],r)},Ro([(0,e.Property)("auto")],n.prototype,"width",void 0),Ro([(0,e.Property)("auto")],n.prototype,"height",void 0),Ro([(0,e.Property)(!0)],n.prototype,"showHeaderBar",void 0),Ro([(0,e.Property)(!0)],n.prototype,"showTimeIndicator",void 0),Ro([(0,e.Property)(!0)],n.prototype,"allowSwiping",void 0),Ro([(0,e.Collection)([],Mo)],n.prototype,"toolbarItems",void 0),Ro([(0,e.Property)("Week")],n.prototype,"currentView",void 0),Ro([(0,e.Property)(["Day","Week","WorkWeek","Month","Agenda"])],n.prototype,"views",void 0),Ro([(0,e.Property)(new Date)],n.prototype,"selectedDate",void 0),Ro([(0,e.Property)(new Date(1900,0,1))],n.prototype,"minDate",void 0),Ro([(0,e.Property)(new Date(2099,11,31))],n.prototype,"maxDate",void 0),Ro([(0,e.Property)()],n.prototype,"dateFormat",void 0),Ro([(0,e.Property)("Gregorian")],n.prototype,"calendarMode",void 0),Ro([(0,e.Property)(!0)],n.prototype,"showWeekend",void 0),Ro([(0,e.Property)(0)],n.prototype,"firstDayOfWeek",void 0),Ro([(0,e.Property)("FirstDay")],n.prototype,"weekRule",void 0),Ro([(0,e.Property)([1,2,3,4,5])],n.prototype,"workDays",void 0),Ro([(0,e.Property)(12)],n.prototype,"monthsCount",void 0),Ro([(0,e.Property)("00:00")],n.prototype,"startHour",void 0),Ro([(0,e.Property)("24:00")],n.prototype,"endHour",void 0),Ro([(0,e.Property)(null)],n.prototype,"timeFormat",void 0),Ro([(0,e.Property)(!0)],n.prototype,"enableHtmlSanitizer",void 0),Ro([(0,e.Property)(!1)],n.prototype,"enableAllDayScroll",void 0),Ro([(0,e.Property)(!1)],n.prototype,"enableAdaptiveUI",void 0),Ro([(0,e.Property)(!0)],n.prototype,"allowResizing",void 0),Ro([(0,e.Complex)({},eo)],n.prototype,"workHours",void 0),Ro([(0,e.Complex)({},no)],n.prototype,"timeScale",void 0),Ro([(0,e.Property)(!0)],n.prototype,"allowKeyboardInteraction",void 0),Ro([(0,e.Property)(!0)],n.prototype,"allowDragAndDrop",void 0),Ro([(0,e.Property)()],n.prototype,"dateHeaderTemplate",void 0),Ro([(0,e.Property)()],n.prototype,"dateRangeTemplate",void 0),Ro([(0,e.Property)()],n.prototype,"cellHeaderTemplate",void 0),Ro([(0,e.Property)()],n.prototype,"dayHeaderTemplate",void 0),Ro([(0,e.Property)()],n.prototype,"monthHeaderTemplate",void 0),Ro([(0,e.Property)()],n.prototype,"cellTemplate",void 0),Ro([(0,e.Property)(!1)],n.prototype,"readonly",void 0),Ro([(0,e.Property)(!0)],n.prototype,"showQuickInfo",void 0),Ro([(0,e.Property)(!1)],n.prototype,"allowInline",void 0),Ro([(0,e.Property)(!0)],n.prototype,"allowMultiCellSelection",void 0),Ro([(0,e.Property)(!0)],n.prototype,"allowMultiRowSelection",void 0),Ro([(0,e.Property)(!1)],n.prototype,"quickInfoOnSelectionEnd",void 0),Ro([(0,e.Property)(!1)],n.prototype,"showWeekNumber",void 0),Ro([(0,e.Property)(!1)],n.prototype,"rowAutoHeight",void 0),Ro([(0,e.Property)(!1)],n.prototype,"allowMultiDrag",void 0),Ro([(0,e.Property)(0)],n.prototype,"firstMonthOfYear",void 0),Ro([(0,e.Property)()],n.prototype,"editorTemplate",void 0),Ro([(0,e.Property)()],n.prototype,"editorHeaderTemplate",void 0),Ro([(0,e.Property)()],n.prototype,"editorFooterTemplate",void 0),Ro([(0,e.Complex)({},so)],n.prototype,"quickInfoTemplates",void 0),Ro([(0,e.Property)(7)],n.prototype,"agendaDaysCount",void 0),Ro([(0,e.Property)(!0)],n.prototype,"hideEmptyAgendaDays",void 0),Ro([(0,e.Property)(!0)],n.prototype,"enableRecurrenceValidation",void 0),Ro([(0,e.Property)()],n.prototype,"timezone",void 0),Ro([(0,e.Complex)({},Do)],n.prototype,"eventSettings",void 0),Ro([(0,e.Property)(fr)],n.prototype,"timezoneDataSource",void 0),Ro([(0,e.Property)()],n.prototype,"resourceHeaderTemplate",void 0),Ro([(0,e.Property)()],n.prototype,"headerIndentTemplate",void 0),Ro([(0,e.Complex)({},Co)],n.prototype,"group",void 0),Ro([(0,e.Collection)([],xo)],n.prototype,"resources",void 0),Ro([(0,e.Collection)([],po)],n.prototype,"headerRows",void 0),Ro([(0,e.Property)()],n.prototype,"cssClass",void 0),Ro([(0,e.Property)()],n.prototype,"eventDragArea",void 0),Ro([(0,e.Event)()],n.prototype,"created",void 0),Ro([(0,e.Event)()],n.prototype,"destroyed",void 0),Ro([(0,e.Event)()],n.prototype,"cellClick",void 0),Ro([(0,e.Event)()],n.prototype,"cellDoubleClick",void 0),Ro([(0,e.Event)()],n.prototype,"moreEventsClick",void 0),Ro([(0,e.Event)()],n.prototype,"hover",void 0),Ro([(0,e.Event)()],n.prototype,"select",void 0),Ro([(0,e.Event)()],n.prototype,"actionBegin",void 0),Ro([(0,e.Event)()],n.prototype,"actionComplete",void 0),Ro([(0,e.Event)()],n.prototype,"actionFailure",void 0),Ro([(0,e.Event)()],n.prototype,"navigating",void 0),Ro([(0,e.Event)()],n.prototype,"renderCell",void 0),Ro([(0,e.Event)()],n.prototype,"eventClick",void 0),Ro([(0,e.Event)()],n.prototype,"eventDoubleClick",void 0),Ro([(0,e.Event)()],n.prototype,"eventRendered",void 0),Ro([(0,e.Event)()],n.prototype,"dataBinding",void 0),Ro([(0,e.Event)()],n.prototype,"popupOpen",void 0),Ro([(0,e.Event)()],n.prototype,"popupClose",void 0),Ro([(0,e.Event)()],n.prototype,"dragStart",void 0),Ro([(0,e.Event)()],n.prototype,"drag",void 0),Ro([(0,e.Event)()],n.prototype,"dragStop",void 0),Ro([(0,e.Event)()],n.prototype,"resizeStart",void 0),Ro([(0,e.Event)()],n.prototype,"resizing",void 0),Ro([(0,e.Event)()],n.prototype,"resizeStop",void 0),Ro([(0,e.Event)()],n.prototype,"virtualScrollStart",void 0),Ro([(0,e.Event)()],n.prototype,"virtualScrollStop",void 0),Ro([(0,e.Event)()],n.prototype,"dataBound",void 0),n=Ro([e.NotifyPropertyChanges],n)}(e.Component),Po=function(){function t(e){this.daysVariation=0,this.parent=e,this.actionObj={X:0,Y:0,groupIndex:0,cellWidth:0,cellHeight:0,slotInterval:0,interval:0,actionIndex:0,cloneElement:[],originalElement:[],action:null,isAllDay:null,excludeSelectors:null,index:0,navigationInterval:null,scrollInterval:null},this.scrollArgs={element:null,width:0,height:0},this.resizeEdges={left:!1,right:!1,top:!1,bottom:!1},this.scrollEdges={left:!1,right:!1,top:!1,bottom:!1}}return t.prototype.getChangedData=function(t){var i=this,n=(0,e.extend)({},this.actionObj.event,null,!0);if(n[this.parent.eventFields.startTime]=this.actionObj.start,n[this.parent.eventFields.endTime]=this.actionObj.end,(0,e.isNullOrUndefined)(this.actionObj.isAllDay)||(n[this.parent.eventFields.isAllDay]=this.actionObj.isAllDay),this.parent.activeViewOptions.group.resources.length>0){var r=this.getOriginalElement(this.actionObj.element);if(r){var a=r.map((function(e){return parseInt(e.getAttribute("data-group-index"),10)}));if(-1===a.indexOf(this.actionObj.groupIndex)||!(0,e.isNullOrUndefined)(t)&&t.length>0){var s=parseInt(this.actionObj.clone.getAttribute("data-group-index"),10);(a=a.filter((function(e){return e!==s}))).push(this.actionObj.groupIndex),t&&t.length>0?t.forEach((function(e){i.parent.resourceBase.getResourceData(e,i.actionObj.groupIndex,a)})):this.parent.resourceBase.getResourceData(n,this.actionObj.groupIndex,a)}}}return n},t.prototype.saveChangedData=function(e,t){var i;void 0===t&&(t=!1),this.parent.activeEventData.event=this.actionObj.event,this.parent.currentAction="Save";var n=[e.data];t&&(n=e.selectedData);for(var r=0,a=n;r<a.length;r++){var s=a[r],o=!(this.parent.activeViewOptions.group.resources.length>0)||parseInt(this.actionObj.element.getAttribute("data-group-index"),10)===this.actionObj.groupIndex;if(+s[this.parent.eventFields.startTime]==+this.actionObj.event[this.parent.eventFields.startTime]&&+s[this.parent.eventFields.endTime]==+this.actionObj.event[this.parent.eventFields.endTime]&&o)return void(this.parent.crudModule.crudObj.isCrudAction=!1);if(s[this.parent.eventFields.recurrenceRule]){var l=s[this.parent.eventFields.recurrenceID]||s[this.parent.eventFields.id];if(s[this.parent.eventFields.id]===s[this.parent.eventFields.recurrenceID]&&(s[this.parent.eventFields.id]=this.parent.eventBase.getEventMaxID(),i="EditOccurrence"),this.parent.enableRecurrenceValidation&&this.parent.eventWindow.editOccurrenceValidation(l,s,this.actionObj.event))return}else i=null;(s[this.parent.eventFields.startTimezone]||s[this.parent.eventFields.endTimezone])&&this.parent.eventBase.timezoneConvert(s),this.parent.crudModule.saveEvent(s,i)}},t.prototype.calculateIntervalTime=function(e){var t=new Date(+e);return t.setMinutes(Math.floor(t.getMinutes()/this.actionObj.interval)*this.actionObj.interval),t},t.prototype.getContentAreaDimension=function(){var e=this.parent.element.querySelector("."+Qt),t=[].slice.call(e.querySelector("tr").children);this.parent.activeView.isTimelineView()||!(this.parent.activeViewOptions.group.resources.length>0)||this.parent.isAdaptive||this.parent.enableAdaptiveUI||this.parent.virtualScrollModule||(t=this.getResourceElements(t));var i=t[0].getBoundingClientRect(),n=t.slice(-1)[0].getBoundingClientRect();return{bottom:e.scrollHeight-5,left:this.parent.enableRtl?n.left:i.left,right:this.parent.enableRtl?i.right:n.right,top:0,leftOffset:this.parent.enableRtl?n.right:i.right,rightOffset:this.parent.enableRtl?i.left:n.left}},t.prototype.getIndex=function(e){var t=[].slice.call(this.parent.getContentTable().querySelector("tr").children),i={minIndex:0,maxIndex:t.length-1};if("resize"===this.actionObj.action&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&!this.parent.activeView.isTimelineView()){var n=this.getResourceElements(t);i.minIndex=n[0].cellIndex,i.maxIndex=n.slice(-1)[0].cellIndex}return e<i.minIndex&&(e=i.minIndex),e>i.maxIndex&&(e=i.maxIndex),e},t.prototype.updateTimePosition=function(t,i){for(var n=0,r=0,a=this.actionObj.cloneElement;r<a.length;r++){var s=a[r].querySelector("."+_t);if(s){var o=this.actionObj.start,l=this.actionObj.end;i&&i.length>0&&(o=i[parseInt(n.toString(),10)][this.parent.eventFields.startTime],l=i[parseInt(n.toString(),10)][this.parent.eventFields.endTime]),s.innerHTML=this.parent.getTimeString(o)+" - "+this.parent.getTimeString(l)}n++}if(this.parent.activeViewOptions.timeScale.enable&&this.parent.isAdaptive&&"Month"!==this.parent.currentView&&"TimelineMonth"!==this.parent.currentView){var p=this.parent.element.querySelector("."+vi);if(!p){p=(0,e.createElement)("div",{className:vi});var c=this.parent.activeView.isTimelineView()?Ge:ft;this.parent.element.querySelector("."+c).appendChild(p)}p.innerHTML=this.parent.getTimeString(t);var h=0;if(this.parent.activeView.isTimelineView())if(this.parent.enableRtl){var d=parseInt(this.actionObj.clone.style.right,10);h="drag"===this.actionObj.action||this.resizeEdges.left?d+this.actionObj.clone.offsetWidth:d,p.style.right=(0,e.formatUnit)(h)}else{var u=parseInt(this.actionObj.clone.style.left,10);h="drag"===this.actionObj.action||this.resizeEdges.left?u:u+this.actionObj.clone.offsetWidth,p.style.left=(0,e.formatUnit)(h)}else h="drag"===this.actionObj.action||this.resizeEdges.top?this.actionObj.clone.offsetTop:this.actionObj.clone.offsetTop+this.actionObj.clone.offsetHeight,p.style.top=(0,e.formatUnit)(h)}},t.prototype.getResourceElements=function(e){var t=this;return e.filter((function(e){return parseInt(e.getAttribute("data-group-index"),10)===t.actionObj.groupIndex}))},t.prototype.getOriginalElement=function(t){var i,n=t.getAttribute("data-guid");if(t.offsetParent&&t.offsetParent.classList.contains(_i)||this.parent.activeView.isTimelineView()||"resize"!==this.actionObj.action&&this.parent.virtualScrollModule)i=[].slice.call(this.parent.element.querySelectorAll('[data-guid="'+n+'"]'));else{var r=(0,e.closest)(t,"tr");r&&(i=[].slice.call(r.querySelectorAll('[data-guid="'+n+'"]')))}return i},t.prototype.createCloneElement=function(t){var i=(0,e.createElement)("div",{innerHTML:t.outerHTML}).children[0],n=[gi];n.push("drag"===this.actionObj.action?mi:yi),"Month"!==this.parent.currentView&&"TimelineMonth"!==this.parent.currentView||n.push("e-month-event"),(0,e.addClass)([i],n),(0,e.addClass)([t],di),(0,e.isNullOrUndefined)(t.parentElement)||t.parentElement.appendChild(i),i.style.width=(0,e.formatUnit)(i.offsetWidth-2);var r=document.querySelector(this.parent.eventDragArea);return this.parent.eventDragArea&&"drag"===this.actionObj.action&&r&&r.appendChild(i),(0,e.setStyleAttribute)(i,{border:"0px"}),i},t.prototype.removeCloneElementClasses=function(){var t=this.actionObj.originalElement;"Month"!==this.parent.currentView&&"TimelineYear"!==this.parent.currentView&&"Day"!==this.parent.currentView&&"Week"!==this.parent.currentView&&"WorkWeek"!==this.parent.currentView||(t=[].slice.call(this.parent.element.querySelectorAll("."+di))),(0,e.removeClass)(t,di)},t.prototype.removeCloneElement=function(){this.actionObj.originalElement=[];for(var t=0,i=[].slice.call(this.parent.element.querySelectorAll(".e-dynamic-clone"));t<i.length;t++){var n=i[t];(0,e.remove)(n)}for(var r=0,a=this.actionObj.cloneElement;r<a.length;r++){var s=a[r];(0,e.isNullOrUndefined)(s.parentNode)||(0,e.remove)(s)}this.actionObj.cloneElement=[];var o=this.parent.element.querySelector("."+vi);o&&(0,e.remove)(o)},t.prototype.getCursorElement=function(e){var t=this.parent.eventBase.getPageCoordinates(e);return document.elementFromPoint(t.clientX,t.clientY)},t.prototype.autoScroll=function(){var e=this.parent.element.querySelector("."+Qt),t=e.offsetHeight<=e.scrollHeight,i=e.offsetWidth<=e.scrollWidth,n=t&&e.scrollTop>=0&&e.scrollTop+e.offsetHeight<=e.scrollHeight,r=i&&e.scrollLeft>=0&&e.scrollLeft+e.offsetWidth<=e.scrollWidth;if("resize"===this.actionObj.action&&this.scrollEdges.right&&e.scrollLeft+e.offsetWidth>e.scrollWidth){var a=[].slice.call(this.parent.getContentTable().querySelector("tr").children).length-1;r=Math.ceil((this.actionObj.clone.offsetLeft+this.actionObj.clone.offsetWidth)/this.actionObj.cellWidth)===a}n&&(this.scrollEdges.top||this.scrollEdges.bottom)&&(e.scrollTop+=this.scrollEdges.top?-this.actionObj.scroll.scrollBy:this.actionObj.scroll.scrollBy,"resize"===this.actionObj.action&&e.scrollHeight!==e.offsetHeight+e.scrollTop&&e.scrollTop>0&&(this.actionObj.Y+=this.scrollEdges.top?this.actionObj.scroll.scrollBy:-this.actionObj.scroll.scrollBy)),r&&(this.scrollEdges.left||this.scrollEdges.right)&&(e.scrollLeft+=this.scrollEdges.left?-this.actionObj.scroll.scrollBy:this.actionObj.scroll.scrollBy,"resize"===this.actionObj.action&&e.scrollWidth!==e.offsetWidth+e.scrollLeft&&e.scrollLeft>0&&(this.actionObj.X+=this.scrollEdges.left?this.actionObj.scroll.scrollBy:-this.actionObj.scroll.scrollBy))},t.prototype.autoScrollValidation=function(){if(!this.actionObj.scroll.enable)return!1;var e=this.parent.boundaryValidation(this.actionObj.pageY,this.actionObj.pageX);return this.scrollEdges=e,e.bottom||e.top||e.left||e.right},t.prototype.actionClass=function(t){"addClass"===t?(0,e.addClass)([this.parent.element],di):(0,e.removeClass)([this.parent.element],di)},t.prototype.updateScrollPosition=function(t){var i=this;this.scrollEventArgs=t,this.actionObj.scroll.enable&&(0,e.isNullOrUndefined)(this.actionObj.scrollInterval)&&(this.actionObj.scrollInterval=window.setInterval((function(){if(i.autoScrollValidation()&&!i.actionObj.clone.classList.contains(xi)){if(i.parent.activeView.isTimelineView()&&i.parent.activeViewOptions.group.resources.length>0&&i.actionObj.groupIndex<0)return;i.autoScroll(),"drag"===i.actionObj.action?i.parent.dragAndDropModule.updateDraggingDateTime(i.scrollEventArgs):i.parent.resizeModule.updateResizingDirection(i.scrollEventArgs)}}),this.actionObj.scroll.timeDelay))},t.prototype.updateOriginalElement=function(t){var i='[data-id="'+t.getAttribute("data-id")+'"]';this.parent.activeViewOptions.group.resources.length>0&&(i=i.concat('[data-group-index = "'+t.getAttribute("data-group-index")+'"]'));var n=[].slice.call(this.parent.element.querySelectorAll(i));(0,e.addClass)(n,di);var r=[].slice.call(this.parent.element.querySelectorAll("."+gi));(0,e.removeClass)(r,di)},t.prototype.getUpdatedEvent=function(e,t,i){var n=JSON.parse(JSON.stringify(i));return n[this.parent.eventFields.startTime]=e,n[this.parent.eventFields.endTime]=t,n},t.prototype.dynamicYearlyEventsRendering=function(t,i){if(void 0===i&&(i=!1),(0,e.isNullOrUndefined)(this.parent.eventDragArea)){var n,r=this.actionObj.cellWidth-7;if(i&&(this.resizeEdges.left||this.resizeEdges.right)&&(r=this.actionObj.cellWidth*t.count),!i&&"Horizontal"===this.parent.activeViewOptions.orientation&&0===this.parent.activeViewOptions.group.resources.length)(n=this.yearEvent.isSpannedEvent(t,t[this.parent.eventFields.startTime]))[this.parent.eventFields.startTime].getTime()===n[this.parent.eventFields.endTime].getTime()&&(n.isSpanned.count=1),r=n.isSpanned.count*this.actionObj.cellWidth;if(!i&&"Vertical"===this.parent.activeViewOptions.orientation&&0!==this.parent.activeViewOptions.group.resources.length)r=(n=this.yearEvent.isSpannedEvent(t,t[this.parent.eventFields.startTime])).isSpanned.count*this.actionObj.cellWidth;var a=this.createAppointmentElement(this.actionObj.groupIndex,t[this.parent.eventFields.subject]);a.setAttribute("drag","true"),(0,e.addClass)([a],gi),(0,e.setStyleAttribute)(a,{width:r+"px",border:"0px","pointer-events":"none",position:"absolute",overflow:"hidden",padding:"3px"}),""!==this.actionObj.clone.style.backgroundColor&&(0,e.setStyleAttribute)(a,{backgroundColor:this.actionObj.clone.style.backgroundColor});var s=se(t[this.parent.eventFields.startTime]).getTime(),o="."+ze+'[data-date="'+s+'"]';this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(o="."+ze+'[data-date="'+s+'"][data-group-index="'+this.actionObj.groupIndex+'"]');var l=this.parent.element.querySelector(o);if(!(0,e.isNullOrUndefined)(l)){if(i){var p=l.querySelector("."+ri),c=this.actionObj.cellHeight*t.count-(p?p.offsetHeight:0)-7;(this.resizeEdges.right||this.resizeEdges.left)&&(c=parseInt(this.actionObj.clone.style.height,10)),(0,e.setStyleAttribute)(a,{height:c+"px"})}this.renderDynamicElement(l,a,!0),this.actionObj.cloneElement.push(a)}}},t.prototype.renderDynamicElement=function(t,i,n){if(void 0===n&&(n=!1),t.querySelector("."+xt))t.querySelector("."+xt).appendChild(i);else{var r=(0,e.createElement)("div",{className:xt});r.appendChild(i),t.appendChild(r)}},t.prototype.createAppointmentElement=function(t,i){var n=(0,e.createElement)("div",{className:qt,innerHTML:i});return this.parent.activeViewOptions.group.resources.length>0&&n.setAttribute("data-group-index",t.toString()),n},t.prototype.dynamicEventsRendering=function(t){var i=this;if((0,e.isNullOrUndefined)(this.parent.eventDragArea)){var n,r=this.parent.activeView.renderDates,a=[].slice.call(this.parent.element.querySelectorAll("."+ze)),s=this.parent.activeViewOptions.workDays;if(this.parent.activeViewOptions.group.resources.length>0){var o=(this.parent.virtualScrollModule&&this.parent.virtualScrollModule.isHorizontalScroll?this.parent.resourceBase.renderedResources:this.parent.resourceBase.lastResourceLevel).filter((function(e){return e.groupIndex===i.actionObj.groupIndex}));r=o[0].renderDates;var l="."+ze+'[data-group-index="'+this.actionObj.groupIndex+'"]';a=[].slice.call(this.parent.element.querySelectorAll(l)),s=o[0].workDays,n=o[0].groupOrder}if(this.monthEvent.dateRender=r,this.monthEvent.getSlotDates(s),this.resizeEdges.left||this.resizeEdges.right)for(var p=0,c=[].slice.call(this.parent.element.querySelectorAll("."+gi));p<c.length;p++){var h=c[p];(0,e.remove)(h)}for(var d=0,u=this.monthEvent.splitEvent(t,r);d<u.length;d++){var g=u[d],v=this.parent.getIndexOfDate(r,se(g[this.monthEvent.fields.startTime])),m=g.data.count*this.actionObj.cellWidth-7,f=this.monthEvent.createAppointmentElement(g,this.actionObj.groupIndex,!0);f.setAttribute("drag","true"),(0,e.addClass)([f],gi),this.monthEvent.applyResourceColor(f,g,"backgroundColor",n),(0,e.setStyleAttribute)(f,{width:m+"px",border:"0px","pointer-events":"none"});var y=a[parseInt(v.toString(),10)];y&&(this.monthEvent.renderElement(y,f,!0),this.actionObj.cloneElement.push(f))}}},t.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed||(this.actionObj={},this.scrollArgs={},this.resizeEdges={left:!1,right:!1,top:!1,bottom:!1},this.scrollEdges={left:!1,right:!1,top:!1,bottom:!1})},t}(),jo=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Lo=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return jo(i,t),i.prototype.wireResizeEvent=function(t){for(var i=0,n=[].slice.call(t.querySelectorAll("."+fi));i<n.length;i++){var r=n[i];e.EventHandler.add(r,e.Browser.touchStartEvent,this.resizeStart,this)}},i.prototype.resizeHelper=function(){if(this.parent.activeViewOptions.group.resources.length>0&&this.parent.activeViewOptions.group.allowGroupEdit)for(var e=0,t=this.actionObj.originalElement.length;e<t;e++){var i=this.createCloneElement(this.actionObj.originalElement[parseInt(e.toString(),10)]);this.actionObj.cloneElement[parseInt(e.toString(),10)]=i,this.actionObj.element===this.actionObj.originalElement[parseInt(e.toString(),10)]&&(this.actionObj.clone=i)}else this.actionObj.element&&(this.actionObj.clone=this.createCloneElement(this.actionObj.element)),this.actionObj.cloneElement=[this.actionObj.clone],this.actionObj.originalElement=[this.actionObj.element]},i.prototype.resizeStart=function(t){var i=this;if(!t||"touchstart"!==t.type||this.parent.uiStateValues.isTapHold&&(0,e.closest)(t.target,"."+Bt)){this.actionObj.action="resize",this.actionObj.slotInterval=this.parent.activeViewOptions.timeScale.interval/this.parent.activeViewOptions.timeScale.slotCount,this.actionObj.interval=this.actionObj.slotInterval;var n=(0,e.closest)(t.target,"."+fi);this.actionObj.element=(0,e.closest)(n,"."+qt),this.actionObj.event=this.parent.eventBase.getEventByGuid(this.actionObj.element.getAttribute("data-guid"));var r=(0,e.extend)({},this.actionObj.event,null,!0),a={cancel:!1,data:r,element:this.actionObj.element,event:t,interval:this.actionObj.interval,scroll:{enable:!0,scrollBy:30,timeDelay:100}};this.parent.trigger(E,a,(function(a){if(!a.cancel){i.actionClass("addClass"),i.parent.uiStateValues.action=!0,i.resizeEdges={left:n.classList.contains(Ti),right:n.classList.contains(wi),top:n.classList.contains(Di),bottom:n.classList.contains(bi)},i.actionObj.groupIndex=i.parent.uiStateValues.isGroupAdaptive?i.parent.uiStateValues.groupIndex:0;var s=i.parent.element.querySelector("."+ze);i.actionObj.cellWidth=Ve(s),i.actionObj.cellHeight=Ae(s);var o=i.parent.activeViewOptions.headerRows.map((function(e){return e.option}));if(i.parent.activeView.isTimelineView()&&o.length>0&&["Date","Hour"].indexOf(o.slice(-1)[0])<0){for(var l=i.parent.getContentTable().querySelector("tr"),p=0,c=0,h=[].slice.call(l.children);c<h.length;c++){var d=h[c];p+=parseInt(d.getAttribute("colspan"),10)}var u=l.getBoundingClientRect();i.actionObj.cellWidth=u.width/p,i.actionObj.cellHeight=u.height}var g=i.parent.eventBase.getPageCoordinates(t);i.actionObj.X=g.pageX,i.actionObj.Y=g.pageY,i.actionObj.groupIndex=parseInt(i.actionObj.element.getAttribute("data-group-index")||"0",10),i.actionObj.interval=a.interval,i.actionObj.scroll=a.scroll,i.actionObj.start=new Date(r[i.parent.eventFields.startTime].getTime()),i.actionObj.end=new Date(r[i.parent.eventFields.endTime].getTime()),i.actionObj.originalElement=i.getOriginalElement(i.actionObj.element),"Month"===i.parent.currentView&&(i.daysVariation=-1,i.monthEvent=new ba(i.parent));var v=i.parent.element.querySelector("."+Qt);if(i.scrollArgs={element:v,width:v.scrollWidth,height:v.scrollHeight},["Month","TimelineYear"].indexOf(i.parent.currentView)<0){var m=Math.round(i.scrollArgs.width/i.actionObj.cellWidth)*i.actionObj.cellWidth;i.scrollArgs.width=i.scrollArgs.width<m?m:i.scrollArgs.width}e.EventHandler.add(document,e.Browser.touchMoveEvent,i.resizing,i),e.EventHandler.add(document,e.Browser.touchEndEvent,i.resizeStop,i)}}))}},i.prototype.resizing=function(t){if(t&&"touchmove"===t.type&&t.preventDefault(),this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(),0===this.parent.element.querySelectorAll("."+yi).length&&this.resizeHelper(),(0,e.isNullOrUndefined)(t.target)||!t.target.classList.contains(qn)){var i=this.parent.eventBase.getPageCoordinates(t);if("Month"===this.parent.currentView||"TimelineYear"===this.parent.currentView){var n=document.documentElement,r=(window.pageXOffset||n.scrollLeft)-(n.clientLeft||0),a=(window.pageYOffset||n.scrollTop)-(n.clientTop||0);this.actionObj.pageX=i.pageX-r,this.actionObj.pageY=i.pageY-a}else this.actionObj.pageX=i.pageX,this.actionObj.pageY=i.pageY;this.updateScrollPosition(t),this.updateResizingDirection(t);var s={cancel:!1,data:(0,e.extend)({},this.actionObj.event,null,!0),element:this.actionObj.element,event:t,startTime:this.actionObj.start,endTime:this.actionObj.end};this.parent.group.resources.length>0&&(s.groupIndex=this.actionObj.groupIndex),this.parent.trigger(x,s)}},i.prototype.updateResizingDirection=function(t){if("Month"!==this.parent.currentView&&"TimelineYear"!==this.parent.currentView){var i=this.resizeValidation(t);if(this.resizeEdges.left){if(i){var n=this.getLeftRightStyles(t,!0);if(parseInt(n.width,10)<1)return;for(var r=0,a=this.actionObj.cloneElement;r<a.length;r++){var s=a[r];(0,e.setStyleAttribute)(s,n),(0,e.addClass)([s],Ti)}}this.horizontalResizing(!this.parent.enableRtl)}if(this.resizeEdges.right){if(i){var o=this.getLeftRightStyles(t,!1);if(parseInt(o.width,10)<1)return;for(var l=0,p=this.actionObj.cloneElement;l<p.length;l++){s=p[l];(0,e.setStyleAttribute)(s,o),(0,e.addClass)([s],wi)}}this.horizontalResizing(this.parent.enableRtl)}if(this.resizeEdges.top){if(i){var c=this.getTopBottomStyles(t,!0);if(parseInt(c.height,10)<1)return;for(var h=0,d=this.actionObj.cloneElement;h<d.length;h++){s=d[h];(0,e.setStyleAttribute)(s,c),(0,e.addClass)([s],Di)}}this.verticalResizing(!0)}if(this.resizeEdges.bottom){if(i){var u=this.getTopBottomStyles(t,!1);if(parseInt(u.height,10)<1)return;for(var g=0,v=this.actionObj.cloneElement;g<v.length;g++){s=v[g];(0,e.setStyleAttribute)(s,u),(0,e.addClass)([s],bi)}}this.verticalResizing(!1)}}else this.monthResizing()},i.prototype.monthResizing=function(){if(this.removeCloneElement(),!(0,e.isNullOrUndefined)(this.actionObj.pageX)&&!(0,e.isNullOrUndefined)(this.actionObj.pageY)){var t=document.elementFromPoint(this.actionObj.pageX,this.actionObj.pageY);if(!(0,e.isNullOrUndefined)(t)){var i=this.parent.getDateFromElement(t),n=!(this.parent.activeViewOptions.group.resources.length>0)||parseInt(t.getAttribute("data-group-index"),10)===this.actionObj.groupIndex,r=new Date(this.actionObj.event[this.parent.eventFields.startTime].getTime()),a=new Date(this.actionObj.event[this.parent.eventFields.endTime].getTime());if(!this.parent.enableRtl&&this.resizeEdges.left||this.parent.enableRtl&&this.resizeEdges.right||this.resizeEdges.top?r=i:(!this.parent.enableRtl&&this.resizeEdges.right||this.parent.enableRtl&&this.resizeEdges.left||this.resizeEdges.bottom)&&(a=pe(i,1)),n&&r<a){this.actionObj.start=r,this.actionObj.end=a;var s=this.getUpdatedEvent(this.actionObj.start,this.actionObj.end,this.actionObj.event);"TimelineYear"===this.parent.currentView?this.yearEventsRendering(s):this.dynamicEventsRendering(s),this.updateOriginalElement(this.actionObj.clone)}}}},i.prototype.yearEventsRendering=function(t){for(var i=0,n=[].slice.call(this.parent.element.querySelectorAll("."+gi));i<n.length;i++){var r=n[i];(0,e.remove)(r)}var a=new Date(t[this.parent.eventFields.endTime]),s=0;0===this.parent.activeViewOptions.group.resources.length&&(s=this.getMonthDiff(t[this.parent.eventFields.startTime],pe(a,-1)));for(var o=0;o<=s;o++){var l=void 0;0===this.parent.activeViewOptions.group.resources.length?l=this.getEventCount(t,this.actionObj.start.getMonth()+o):(l=(0,e.extend)({},t,null,!0),a=this.resizeEdges.left||this.resizeEdges.right?pe(a,-1):a,l.count=this.getMonthDiff(t[this.parent.eventFields.startTime],a)+1),this.dynamicYearlyEventsRendering(l,!0)}},i.prototype.getMonthDiff=function(e,t){var i;return i=12*(t.getFullYear()-e.getFullYear()),i-=e.getMonth(),(i+=t.getMonth())<=0?0:i},i.prototype.getEventCount=function(t,i){var n=(0,e.extend)({},t,null,!0),r=n[this.parent.eventFields.startTime],a=n[this.parent.eventFields.endTime],s=new Date(this.parent.selectedDate.getFullYear(),i,1),o=pe(new Date(this.parent.selectedDate.getFullYear(),i+1,0),1),l=1;return r.getTime()<s.getTime()&&(n[this.parent.eventFields.startTime]=s),a.getTime()>o.getTime()&&(n[this.parent.eventFields.endTime]=o),0===this.parent.activeViewOptions.group.resources.length&&(l=Math.ceil((n[this.parent.eventFields.endTime].getTime()-n[this.parent.eventFields.startTime].getTime())/G)),n.count=l,n},i.prototype.resizeStop=function(t){var i=this;e.EventHandler.remove(document,e.Browser.touchMoveEvent,this.resizing),e.EventHandler.remove(document,e.Browser.touchEndEvent,this.resizeStop),clearInterval(this.actionObj.scrollInterval),this.actionObj.scrollInterval=null,this.removeCloneElementClasses(),this.removeCloneElement(),this.actionClass("removeClass"),this.parent.uiStateValues.action=this.parent.uiStateValues.isTapHold=!1;var n={cancel:!1,data:this.getChangedData(),element:this.actionObj.element,event:t};this.parent.trigger(V,n,(function(e){e.cancel||(i.parent.isSpecificResourceEvents()&&(i.parent.crudModule.crudObj.sourceEvent=[i.parent.resourceBase.lastResourceLevel[parseInt(e.element.getAttribute("data-group-index"),10)]],i.parent.crudModule.crudObj.targetEvent=i.parent.crudModule.crudObj.sourceEvent,i.parent.crudModule.crudObj.isCrudAction=!0),i.saveChangedData(e))}))},i.prototype.verticalResizing=function(t){var i=this.actionObj.clone.offsetTop;t||(i+=this.actionObj.clone.offsetHeight);var n=i/this.actionObj.cellHeight*this.actionObj.slotInterval,r=this.actionObj.clone.offsetParent;if(!(0,e.isNullOrUndefined)(r)){var a=se(this.parent.getDateFromElement(r));a.setHours(this.parent.activeView.getStartHour().getHours()),a.setMinutes(n+this.parent.activeView.getStartHour().getMinutes()),t?this.actionObj.start=this.calculateIntervalTime(a):this.actionObj.end=this.calculateIntervalTime(a),this.updateTimePosition(a)}},i.prototype.horizontalResizing=function(t){var i,n=new Date(this.actionObj.event[this.parent.eventFields.startTime].getTime()),r=new Date(this.actionObj.event[this.parent.eventFields.endTime].getTime()),a=!1,s=this.parent.currentView,o=["TimelineDay","TimelineWeek","TimelineWorkWeek"].indexOf(this.parent.currentView)>-1,l="TimelineMonth"===this.parent.currentView,p=l||o&&!this.parent.activeViewOptions.timeScale.enable;if(this.parent.activeView.isTimelineView()){var c=this.parent.getContentTable().querySelector("tr");if(this.parent.activeViewOptions.headerRows.length>0){var h=this.parent.activeViewOptions.headerRows.map((function(e){return e.option}));s=h.slice(-1)[0],l&&"Hour"===s&&(s=h.slice(-2)[0]||"Month")}i=t?n:r;var d=0,u=[].slice.call(c.children),g=!1,v=this.actionObj.cellWidth/(this.parent.activeViewOptions.timeScale.interval/this.parent.activeViewOptions.timeScale.slotCount),m=parseFloat(this.parent.enableRtl?this.actionObj.clone.style.right:this.actionObj.clone.style.left);if(m=Math.round(m/v)*v,-1!==["Year","Month","Week","Date"].indexOf(s)){for(var f=0,y=0,T=u;y<T.length;y++){var w=T[y];f+=parseInt(w.getAttribute("colspan"),10)}var D=this.parent.enableRtl?parseInt(this.actionObj.clone.style.right,10):parseInt(this.actionObj.clone.style.left,10);D=Math.round(D/this.actionObj.cellWidth)*this.actionObj.cellWidth,t||(D+=Ve(this.actionObj.clone)-this.actionObj.cellWidth),d=Math.floor(D/Math.floor(Ve(c)/f)),a=o&&"Date"===s,g=(d=t?d:l?d+1:d)===u.length,d=d<0?0:d>=f?f-1:d}else{var b=this.actionObj.cellWidth;if(d=t?Math.floor(m/this.actionObj.cellWidth):Math.ceil((m+(Ve(this.actionObj.clone)-b))/this.actionObj.cellWidth),this.parent.enableRtl){var S=0;"TimelineMonth"!==s&&(this.parent.activeViewOptions.timeScale.enable||l)||(S=this.actionObj.cellWidth);var C=Math.floor(m/this.actionObj.cellWidth)*this.actionObj.cellWidth+(t?0:Ve(this.actionObj.clone)-S);d=Math.floor(C/this.actionObj.cellWidth)}g=d===u.length,d=this.getIndex(d)}var O=void 0;if(O=-1!==["Year","Month","Week","Date"].indexOf(s)?new Date(this.parent.activeView.renderDates[parseInt(d.toString(),10)].getTime()):this.parent.getDateFromElement(c.children[parseInt(d.toString(),10)]),-1===["TimelineMonth","Year","Month","Week","Date"].indexOf(s)&&this.parent.activeViewOptions.timeScale.enable){t||(m+=Ve(this.actionObj.clone));var E=Math.ceil(this.actionObj.slotInterval/this.actionObj.cellWidth*(m-Math.floor(m/this.actionObj.cellWidth)*this.actionObj.cellWidth));E=g||!t&&0===E?this.actionObj.slotInterval:E,(i=new Date(O.getTime())).setMinutes(i.getMinutes()+E),this.updateTimePosition(i)}else i=new Date(O.setHours(i.getHours(),i.getMinutes(),i.getSeconds()))}else{var x=(0,e.closest)(this.actionObj.clone,"td").cellIndex,V=Math.ceil((t?Ve(this.actionObj.element):0)/this.actionObj.cellWidth)*this.actionObj.cellWidth,A=(f=Math.ceil((Ve(this.actionObj.clone)-V)/this.actionObj.cellWidth),c=(0,e.closest)(this.actionObj.clone,"tr"),t?x-f:x+f-1);A=this.getIndex(A),i=this.parent.getDateFromElement(c.children[parseInt(A.toString(),10)]),t?i.setHours(n.getHours(),n.getMinutes(),n.getSeconds()):i.setHours(r.getHours(),r.getMinutes(),r.getSeconds())}var I=-1!==["TimelineMonth","Year","Month","Week","Date"].indexOf(s)||!this.parent.activeViewOptions.timeScale.enable;if(t)r.getTime()-i.getTime()<=0&&(i=p?se(r):n),this.actionObj.start=I?i:this.calculateIntervalTime(i);else{var M=(!(o&&this.parent.activeViewOptions.timeScale.enable)||a||o&&["Week","Month","Year"].indexOf(s)>-1)&&0===i.getHours()&&0===i.getMinutes()?pe(i,1):i;p&&M.getTime()-n.getTime()<=0&&(M=pe(se(n),1)),this.actionObj.end=I?M:this.calculateIntervalTime(M)}},i.prototype.getTopBottomStyles=function(t,i){var n=this.parent.element.querySelector("."+Qt),r=this.actionObj.cellHeight/this.actionObj.slotInterval*this.actionObj.interval,a=i?this.actionObj.element.offsetHeight+(this.actionObj.Y-this.actionObj.pageY):this.actionObj.element.offsetHeight+(this.actionObj.pageY-this.actionObj.Y),s=i?this.actionObj.element.offsetTop-(this.actionObj.Y-this.actionObj.pageY):this.actionObj.clone.offsetTop;return a=s<0||this.actionObj.clone.offsetTop+this.actionObj.clone.offsetHeight>this.scrollArgs.height?this.actionObj.clone.offsetHeight:a,s=s<0?0:s,a=(s=i?Math.floor(s/r)*r:s)+a>=n.scrollHeight?n.scrollHeight-s:Math.ceil(a/r)*r,!i&&this.actionObj.clone.offsetTop+a>=this.parent.getContentTable().offsetHeight&&(a=this.parent.getContentTable().offsetHeight-this.actionObj.clone.offsetTop),{height:(0,e.formatUnit)(a<this.actionObj.cellHeight?Math.floor(a/r)*r:a),top:(0,e.formatUnit)(a<this.actionObj.cellHeight&&i?Math.ceil(s/r)*r:s),left:"0px",right:"0px",width:"100%"}},i.prototype.getLeftRightStyles=function(t,i){var n={},r=this.parent.activeView.isTimelineView(),a=["TimelineDay","TimelineWeek","TimelineWorkWeek"].indexOf(this.parent.currentView)>-1&&this.parent.activeViewOptions.timeScale.enable,s=this.actionObj.cellWidth/this.actionObj.slotInterval*this.actionObj.interval,o=i?this.actionObj.X-this.actionObj.pageX:this.actionObj.pageX-this.actionObj.X,l=r?Ve(this.actionObj.element)/this.actionObj.cellWidth*this.actionObj.cellWidth:"Month"===this.parent.currentView?Ve(this.actionObj.element):Math.ceil(Ve(this.actionObj.element)/this.actionObj.cellWidth)*this.actionObj.cellWidth,p=l+Math.ceil(o/this.actionObj.cellWidth)*this.actionObj.cellWidth,c=this.parent.enableRtl?parseInt(this.actionObj.element.style.right,10):this.actionObj.clone.offsetLeft;if(a){if(p=l+Math.ceil(o/s)*s,!i){var h=(+parseFloat(this.actionObj.element.style[this.parent.enableRtl?"right":"left"])).toFixed(1),d=Math.round(l/s)*s;h===c.toFixed(1)&&d===l||(p=Math.round((c+p)/s)*s-c)}this.actionObj.event[this.parent.eventFields.isAllDay]=!1}var u=!i&&p+this.actionObj.clone.offsetLeft>this.scrollArgs.width?Ve(this.actionObj.clone):(this.actionObj.cellWidth,p);if(this.parent.enableRtl){var g=r?parseInt(this.actionObj.element.style.right,10):-(p-this.actionObj.cellWidth);g=r?g:i||g>0?0:g,r&&!i&&(g-=Math.ceil((this.actionObj.pageX-this.actionObj.X)/s)*s)<0&&(g=parseInt(this.actionObj.clone.style.right,10),u=parseInt(this.actionObj.clone.style.width,10)),g=g>=this.scrollArgs.width?this.scrollArgs.width-this.actionObj.cellWidth:g,n.right=(0,e.formatUnit)(g),u=u+g>this.scrollArgs.width?Ve(this.actionObj.clone):u}else{var v=i?this.actionObj.element.offsetLeft-(this.actionObj.X-this.actionObj.pageX):this.parent.enableRtl?this.actionObj.element.offsetLeft:0;r&&(v=i?v:parseInt(this.actionObj.clone.style.left,10),v=this.parent.enableRtl?i?v:this.actionObj.pageX<this.actionObj.X-Ve(this.actionObj.clone)?parseInt(this.actionObj.clone.style.right,10):v:i&&this.actionObj.pageX>this.actionObj.X+Ve(this.actionObj.clone)&&Ve(this.actionObj.clone)===this.actionObj.cellWidth?parseInt(this.actionObj.clone.style.left,10):v);var m=v;(v=r?a?i?this.actionObj.element.offsetLeft-Math.ceil((this.actionObj.element.offsetLeft-v)/s)*s:v:Math.floor(v/this.actionObj.cellWidth)*this.actionObj.cellWidth:Math.ceil(Math.abs(v)/this.actionObj.cellWidth)*this.actionObj.cellWidth)<0&&(r&&i&&v%s?(v=parseInt(this.actionObj.clone.style.left,10),u=parseInt(this.actionObj.clone.style.width,10)):(v=0,u=Ve(this.actionObj.clone)));var f=Math.ceil(Ve(this.actionObj.clone)/this.actionObj.cellWidth)*this.actionObj.cellWidth;i&&(n.left=(0,e.formatUnit)(r?v:i?m<0?-v:Math.ceil((l-f)/this.actionObj.cellWidth)*this.actionObj.cellWidth:v))}return n.width=(0,e.formatUnit)(u),n},i.prototype.resizeValidation=function(e){var t=this.parent.eventBase.getPageCoordinates(e),i=this.getContentAreaDimension(),n=this.parent.activeView.isTimelineView()&&this.parent.activeViewOptions.timeScale.enable,r=this.actionObj.cellWidth,a=!1;return this.resizeEdges.left&&(t.pageX<i.leftOffset&&t.pageX>=i.left&&n&&(r=0),a=t.pageX-r>=i.left),this.resizeEdges.right&&(t.pageX>i.rightOffset&&t.pageX<=i.right&&n&&(r=0),a=t.pageX+r<=i.right),this.resizeEdges.top&&(a=this.actionObj.clone.offsetTop>=i.top),this.resizeEdges.bottom&&(a=this.actionObj.clone.offsetTop+this.actionObj.clone.offsetHeight<=this.scrollArgs.height),a},i.prototype.getModuleName=function(){return"resize"},i}(Po),No=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),qo=function(t){function i(e){var i=t.call(this,e,"day")||this;return i.isResource=!1,i}return No(i,t),i.prototype.renderAppointments=function(){this.parent.dragAndDropModule&&this.parent.dragAndDropModule.setDragArea(),this.fields=this.parent.eventFields;for(var t="Year"===this.parent.currentView?"."+qt:"."+xt+",."+Ri,i=0,n=[].slice.call(this.parent.element.querySelectorAll(t));i<n.length;i++){var r=n[i];(0,e.remove)(r)}this.renderedEvents=[],"Year"===this.parent.currentView?this.yearViewEvents():(this.removeCellHeight(),this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?(this.isResource=!0,this.timelineResourceEvents()):this.timelineYearViewEvents()),this.parent.renderTemplates(),this.parent.notify(N,{})},i.prototype.yearViewEvents=function(){for(var t=this.getMonths(),i=0,n=t;i<n.length;i++)for(var r=n[i],a=".e-month-calendar:nth-child("+(t.indexOf(r)+1)+") td.e-work-cells",s=[].slice.call(this.parent.element.querySelectorAll(a)),o=new Date(this.parent.selectedDate.getFullYear(),r,1),l=this.parent.calendarUtil.getMonthStartDate(new Date(o.getTime())),p=this.parent.calendarUtil.getMonthEndDate(new Date(o.getTime())),c=$(l,this.parent.firstDayOfWeek),h=pe(ee(p,this.parent.firstDayOfWeek),1),d=0;c.getTime()<h.getTime();d++){var u=se(new Date(c.getTime())),g=pe(new Date(u.getTime()),1);if(c=pe(new Date(c.getTime()),1),this.parent.isMinMaxDate(u))if(this.parent.eventBase.filterEvents(u,g).length>0){var v=s[parseInt(d.toString(),10)];v&&v.appendChild((0,e.createElement)("div",{className:qt}))}}},i.prototype.timelineYearViewEvents=function(){var t=this,i=this.parent.element.querySelector("."+ze+":not(."+Ze+")");this.cellWidth=Ve(i),this.cellHeader=De(i.querySelector("."+ri));var n=this.parent.element.querySelector("."+st);this.eventHeight=Q(n,qt);var r="."+tr+" tbody tr,."+ct+" tbody tr,."+We+" tbody tr";this.addCellHeight(r,this.eventHeight,2,this.cellHeader,this.moreIndicatorHeight);for(var a=[].slice.call(this.parent.element.querySelectorAll("."+Nt)),s=this.getMonths(),o=this.parent.activeViewOptions.group.resources.length>0&&this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:void 0,l=0;l<s.length;l++){var p=a[parseInt(l.toString(),10)],c=l+1,h=(0,e.createElement)("div",{className:xt});p.appendChild(h);var d=new Date(this.parent.selectedDate.getFullYear(),s[parseInt(l.toString(),10)],1),u=new Date(d.getFullYear(),d.getMonth()+1,0),g=d.getDay(),v=[];for("Horizontal"===this.parent.activeViewOptions.orientation&&(this.renderedEvents=[]);d.getTime()<=u.getTime();){var m=void 0,f=void 0;if("Vertical"===this.parent.activeViewOptions.orientation){var y=a[parseInt(g.toString(),10)];c=g+1,(h=y.querySelector("."+xt))||(h=(0,e.createElement)("div",{className:xt}),y.appendChild(h)),this.parent.enableRtl?f=l*this.cellWidth:m=l*this.cellWidth}else this.parent.enableRtl?f=(g+d.getDate()-1)*this.cellWidth:m=(g+d.getDate()-1)*this.cellWidth;var T=this.parent.element.querySelector(".e-content-wrap tr:nth-child("+c+") td");this.cellHeight=T.offsetHeight;var w=se(new Date(d.getTime())),D=pe(new Date(w.getTime()),1),b=void 0;this.parent.uiStateValues.isGroupAdaptive&&(b=this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]);var S=this.parent.eventBase.filterEvents(w,D,void 0,b);S=this.parent.eventBase.sortByDateTime(S);for(var C=function(t,i){var n=(0,e.extend)({},S[parseInt(t.toString(),10)],null,!0);O.updateSpannedEvents(n,w,D);var r=O.getIndex(w);n.Index=r;var a=O.cellHeader+O.eventHeight*(r+1)+2+O.moreIndicatorHeight,s=O.cellHeight-O.cellHeader-O.moreIndicatorHeight,p=Math.floor(s/(O.eventHeight+2)),c=O.parent.rowAutoHeight?1:O.parent.activeViewOptions.maxEventsPerRow,u=O.parent.activeViewOptions.maxEventsPerRow?i-c:i-p<=0?1:i-p;if("Horizontal"===O.parent.activeViewOptions.orientation){var y=O.renderedEvents.filter((function(e){return e.Guid===n.Guid})),b=v.filter((function(e){return e.Guid===n.Guid}));if(y.length>0&&y[0].MoreIndicator||b.length>0&&b[0].MoreIndicator){var C="Horizontal"===O.parent.activeViewOptions.orientation?l:g;return O.renderMoreIndicator(h,u,w,C,m,f,o),"continue"}if(y.length>0||b.length>0)return"continue"}var E=O.maxOrIndicator||r<c||O.cellHeight>a;if(O.parent.rowAutoHeight||E||O.cellHeight>a)O.renderEvent(h,n,l,m,f,d,g),(O.parent.rowAutoHeight||O.cellHeight>a)&&O.updateCellHeight(T,a),v.push(n);else{C="Horizontal"===O.parent.activeViewOptions.orientation?l:g;O.renderMoreIndicator(h,u,w,C,m,f,o),"Horizontal"===O.parent.activeViewOptions.orientation&&(n.MoreIndicator=!0,O.renderedEvents.push(n),v.push(n))}},O=this,E=0,x=S.length;E<x;E++)C(E,x);d=pe(new Date(d.getTime()),1),"Vertical"===this.parent.activeViewOptions.orientation&&(g++,this.renderedEvents=[])}}if(this.parent.rowAutoHeight&&"Vertical"===this.parent.activeViewOptions.orientation){var V=[].slice.call(this.parent.element.querySelectorAll("."+Nt)),A=[].slice.call(this.parent.element.querySelectorAll("."+We+" tbody tr"));V.forEach((function(e,i){var n=[].slice.call(e.querySelectorAll("."+qt)),r=A[parseInt(i.toString(),10)].offsetTop+t.cellHeader+2;n.forEach((function(e){var i=parseInt(e.getAttribute("data-index"),10);e.style.top=r+i*t.eventHeight+"px",e.removeAttribute("data-index")}))}))}},i.prototype.updateSpannedEvents=function(e,t,i){var n=this.isResource&&"Vertical"===this.parent.activeViewOptions.orientation||!this.isResource&&"Horizontal"===this.parent.activeViewOptions.orientation,r={isLeft:!0,isRight:!0,isBottom:!0,isTop:!0};t.getTime()<=e[this.fields.startTime].getTime()&&(n?r.isLeft=!1:r.isTop=!1),(i.getTime()>=e[this.fields.endTime].getTime()||n&&!this.isResource&&pe(i,-1).getMonth()===e[this.fields.endTime].getMonth()||n&&this.isResource&&i.getTime()<=e[this.fields.endTime].getTime())&&(n?r.isRight=!1:r.isBottom=!1),e.data=r},i.prototype.timelineResourceEvents=function(){var e=this,t=this.parent.element.querySelector("."+Qt),i=t.offsetWidth>t.clientWidth,n=this.parent.element.querySelector("."+ze);this.cellWidth=Ve(n),this.cellHeader=0;var r=this.parent.element.querySelector("."+st);this.eventHeight=Q(r,qt);var a="."+tr+" tbody tr,."+ct+" tbody tr,."+We+" tbody tr";this.addCellHeight(a,this.eventHeight,2,this.cellHeader,this.moreIndicatorHeight);var s=[].slice.call(this.parent.element.querySelectorAll("."+Nt)),o=this.parent.uiStateValues.isGroupAdaptive?[this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]]:this.parent.activeViewOptions.allowVirtualScrolling?this.parent.resourceBase.renderedResources:this.parent.resourceBase.lastResourceLevel,l=this.getMonths();if("Horizontal"===this.parent.activeViewOptions.orientation)for(var p=0;p<l.length;p++)for(var c=new Date(this.parent.selectedDate.getFullYear(),l[parseInt(p.toString(),10)],1),h=0,d=o.length;h<d;h++)this.renderedEvents=[],this.renderResourceEvent(s[parseInt(p.toString(),10)],o[parseInt(h.toString(),10)],p,h,c);else for(h=0,d=o.length;h<d;h++){this.renderedEvents=[];for(p=0;p<l.length;p++){c=new Date(this.parent.selectedDate.getFullYear(),l[parseInt(p.toString(),10)],1);this.renderResourceEvent(s[parseInt(h.toString(),10)],o[parseInt(h.toString(),10)],p,h,c)}}if(this.parent.rowAutoHeight&&!i&&t.offsetWidth>t.clientWidth){[].slice.call(this.parent.element.querySelectorAll("."+qt)).forEach((function(e){e.style.removeProperty("left"),e.style.removeProperty("right")}));var u=[].slice.call(this.parent.element.querySelectorAll("."+Nt)),g=this.parent.element.querySelector("."+We),v=[].slice.call(g.querySelectorAll("tbody tr"));u.forEach((function(t,i){var n=[].slice.call(t.children),r=v[parseInt(i.toString(),10)];n.forEach((function(t,i){var n=r.querySelector("td:nth-child("+(i+1)+")"),a=[].slice.call(t.children),s=Ve(n),o=n.offsetLeft;if(e.parent.enableRtl){var l=g.offsetWidth-o-n.offsetWidth;a.forEach((function(e){e.style.width=Math.floor(parseInt(e.style.width,10)/s)*s+"px",e.style.right=l+"px"}))}else a.forEach((function(e){e.style.width=Math.floor(parseInt(e.style.width,10)/s)*s+"px",e.style.left=o+"px"}))}))}))}},i.prototype.renderResourceEvent=function(t,i,n,r,a){var s=(0,e.createElement)("div",{className:xt});t.appendChild(s);var o=pe(ie(new Date(a.getTime())),1),l=this.parent.eventBase.filterEvents(a,o,void 0,i),p="Vertical"===this.parent.activeViewOptions.orientation?r:n,c=this.parent.element.querySelector(".e-content-wrap tr:nth-child("+(p+1)+") td");this.cellHeight=c.offsetHeight,this.groupOrder=i.groupOrder;for(var h=[],d=function(t){var i=l[parseInt(t.toString(),10)],o=void 0,p=(0,e.extend)({},i,null,!0);if(u.parent.activeViewOptions.group.resources.length>0){var d=u.isSpannedEvent(p,a);o=u.getIndex(d[u.fields.startTime]),p.Index=o}else o=u.getIndex(p[u.fields.startTime]),p.Index=o;var g=u.cellHeader+u.eventHeight*(t+1)+2+u.moreIndicatorHeight,v="Vertical"===u.parent.activeViewOptions.orientation?n*u.cellWidth:r*u.cellWidth;if(!u.parent.isMinMaxDate(p[u.fields.startTime]))return{value:void 0};if("Vertical"===u.parent.activeViewOptions.orientation&&u.parent.activeViewOptions.group.resources.length>0){var m=u.renderedEvents.filter((function(e){return e.Guid===p.Guid})),f=h.filter((function(e){return e.Guid===p.Guid}));if(m.length>0||f.length>0)return"continue"}if(!(u.parent.rowAutoHeight||u.cellHeight>g)){var y="Horizontal"===u.parent.activeViewOptions.orientation?n:r;if(u.renderMoreIndicator(s,l.length-t,a,y,v,v,r),"Horizontal"===u.parent.activeViewOptions.orientation)for(var T=r;T<l.length;T++)u.renderedEvents.push((0,e.extend)({},l[parseInt(T.toString(),10)],{Index:o+T},!0));return"break"}u.renderEvent(s,p,n,v,v,a,r),u.updateCellHeight(c,g),h.push(p)},u=this,g=0;g<l.length;g++){var v=d(g);if("object"==typeof v)return v.value;if("break"===v)break}},i.prototype.renderEvent=function(t,i,n,r,a,s,o){var l,p,c=this,h=this.isSpannedEvent(i,s),d=this.createEventElement(h);if(1===h.isSpanned.count){var u=pe(h[this.fields.endTime],-1);h[this.fields.endTime]=u>h[this.fields.startTime]?u:h[this.fields.endTime]}if(!(h[this.fields.startTime]>h[this.fields.endTime])){"Horizontal"===this.parent.activeViewOptions.orientation?(p=n+1,h[this.fields.startTime].getTime()===h[this.fields.endTime].getTime()&&(h.isSpanned.count=1),l=h.isSpanned.count*this.cellWidth):(p=o+1,l=this.isResource?h.isSpanned.count*this.cellWidth:this.cellWidth);var g=this.parent.element.querySelector(".e-content-wrap tr:nth-child("+p+") td").offsetTop+this.cellHeader+this.eventHeight*h.Index+2;(0,e.setStyleAttribute)(d,{width:l+"px",height:this.eventHeight+"px",left:r+"px",right:a+"px",top:g+"px"}),!this.isResource&&this.parent.rowAutoHeight&&"Vertical"===this.parent.activeViewOptions.orientation&&d.setAttribute("data-index",h.Index.toString());var v={data:h,element:d,cancel:!1,type:"event"};this.parent.trigger(y,v,(function(i){i.cancel||(t.appendChild(d),c.wireAppointmentEvents(d,h),(c.parent.activeViewOptions.group.resources.length>0||"Vertical"===c.parent.activeViewOptions.orientation||(h.isSpanned.isRight||h.isSpanned.isLeft)&&"Horizontal"===c.parent.activeViewOptions.orientation||!h.isSpanned.isRight)&&c.renderedEvents.push((0,e.extend)({},h,null,!0)))}))}},i.prototype.renderMoreIndicator=function(t,i,n,r,a,s,o){if(0!==this.parent.activeViewOptions.group.resources.length||!t.querySelector('[data-start-date="'+n.getTime()+'"]')){var l;l=this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?pe(ie(new Date(n.getTime())),1):pe(new Date(n.getTime()),1);var p=this.getMoreIndicatorElement(i,n,l),c=this.parent.element.querySelector(".e-content-wrap tr:nth-child("+(r+1)+")").offsetTop+(this.cellHeight-this.moreIndicatorHeight);a=Math.floor(a/this.cellWidth)*this.cellWidth,s=Math.floor(s/this.cellWidth)*this.cellWidth,(0,e.setStyleAttribute)(p,{width:this.cellWidth+"px",left:a+"px",right:s+"px",top:c+"px"}),(0,e.isNullOrUndefined)(o)||p.setAttribute("data-group-index",o.toString()),t.appendChild(p),e.EventHandler.add(p,"click",this.moreIndicatorClick,this)}},i.prototype.createEventElement=function(t){var i=t[this.fields.subject]||this.parent.eventSettings.fields.subject.default||this.parent.localeObj.getConstant("addTitle"),n=(0,e.createElement)("div",{className:qt,attrs:{"data-id":"Appointment_"+t[this.fields.id],"data-guid":t.Guid,role:"button",tabindex:"0","aria-disabled":this.parent.eventBase.getReadonlyAttribute(t),"aria-label":this.parent.getAnnouncementString(t)}});if(this.cssClass&&(0,e.addClass)([n],this.cssClass),t[this.fields.isReadonly]&&(0,e.addClass)([n],er),this.parent.activeViewOptions.group.resources.length>0){var r=this.getGroupIndexFromEvent(t);n.setAttribute("data-group-index",r.toString())}var a=[],s=(0,e.extend)({},t,null,!0);if(this.parent.activeViewOptions.eventTemplate){var o=this.parent.element.id+"_"+this.parent.activeViewOptions.eventTemplateName+"eventTemplate";a=this.parent.getAppointmentTemplate()(s,this.parent,"eventTemplate",o,!1,void 0,void 0,this.parent.root)}else{var l=t[this.fields.location]||this.parent.eventSettings.fields.location.default||"",p=(0,e.createElement)("div",{className:vn,innerHTML:i+(l?";&nbsp"+l:"")}),c=(0,e.createElement)("div",{className:_t+(this.parent.isAdaptive?" "+Ne:""),innerHTML:this.parent.getTimeString(s[this.fields.startTime])}),h=(0,e.createElement)("div",{className:_t+(this.parent.isAdaptive?" "+Ne:""),innerHTML:this.parent.getTimeString(s[this.fields.endTime])});(0,e.addClass)([p],"e-text-center"),t[this.fields.isAllDay]?a=[p]:s.isLeft||s.isRight?(s.isLeft||a.push(c),a.push(p),s.isRight||a.push(h)):a=[c,p,h]}var d=(0,e.createElement)("div",{className:Wt});return(0,e.append)(a,d),n.appendChild(d),this.parent.eventBase.renderSpannedIcon(n,t.isSpanned),this.renderResizeHandler(n,t.data,t[this.fields.isReadonly]),this.applyResourceColor(n,s,"backgroundColor",this.groupOrder),n},i.prototype.isSpannedEvent=function(t,i){var n=new Date(i.getFullYear(),i.getMonth(),1),r=pe(new Date(i.getFullYear(),i.getMonth()+1,0),1),a=(0,e.extend)({},t,null,!0),s=a[this.fields.startTime],o=a[this.fields.endTime],l={isLeft:!1,isRight:!1,count:1},p=new Date(this.parent.selectedDate.getFullYear(),this.parent.firstMonthOfYear,1),c=ce(p,this.parent.monthsCount);if(this.isResource&&this.updateSpannedEvents(t,n,r),"Vertical"===this.parent.activeViewOptions.orientation&&this.parent.activeViewOptions.group.resources.length>0){this.updateSpannedEventDetails(s,o,p,c,a,l);var h=a[this.fields.startTime],d=new Date(a[this.fields.endTime]-1);l.count=d.getMonth()-h.getMonth()+this.parent.monthsCount*(d.getFullYear()-h.getFullYear())+1}else if(this.updateSpannedEventDetails(s,o,n,r,a,l),0===this.parent.activeViewOptions.group.resources.length||this.parent.uiStateValues.isGroupAdaptive){var u=se(a[this.fields.endTime]).getTime(),g=se(a[this.fields.startTime]).getTime();(t[this.fields.isAllDay]&&u===t[this.fields.endTime].getTime()||l.isRight)&&(u=pe(new Date(u),-1).getTime()),l.count=Math.ceil((u-g)/G)+1}return a.isSpanned=l,se(s).getTime()<se(this.parent.minDate).getTime()&&(a[this.fields.startTime]=this.parent.minDate),se(o).getTime()>se(this.parent.maxDate).getTime()&&(a[this.fields.endTime]=this.parent.maxDate),a},i.prototype.updateSpannedEventDetails=function(e,t,i,n,r,a){e.getTime()<i.getTime()&&(r[this.fields.startTime]=i,a.isLeft=!0),t.getTime()>n.getTime()&&(r[this.fields.endTime]=n,a.isRight=!0)},i.prototype.getOverlapEvents=function(e,t){var i,n,r=[];if(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var a=this.parent.calendarUtil.getMonthStartDate(new Date(e.getTime())),s=pe(this.parent.calendarUtil.getMonthEndDate(new Date(e.getTime())),-1);i=se(new Date(a.getTime())).getTime(),n=se(new Date(s.getTime())).getTime()}else this.parent.rowAutoHeight?(i=se(new Date(e.getTime())).getTime(),n=pe(se(new Date(e.getTime())),1).getTime()):i=n=se(new Date(e.getTime())).getTime();for(var o=0,l=t;o<l.length;o++){var p=l[o],c=new Date(p[this.fields.startTime].getTime()),h=new Date(p[this.fields.endTime].getTime()),d=p[this.fields.isAllDay]?se(h).getTime()>i:se(h).getTime()>=i;(se(c).getTime()<=i&&d||se(c).getTime()>=i&&se(h).getTime()<=n||"Vertical"===this.parent.activeViewOptions.orientation&&se(c).getTime()>=i&&se(h).getTime()>=n)&&r.push(p)}return r},i.prototype.getMonths=function(){var e=this;return Array.apply(null,{length:this.parent.monthsCount}).map((function(t,i){return e.parent.firstMonthOfYear+i}))},i.prototype.removeCellHeight=function(){for(var e="."+tr+" tbody tr,."+ct+" tbody tr,."+We+" tbody tr",t=0,i=[].slice.call(this.element.querySelectorAll(e));t<i.length;t++){i[t].firstElementChild.style.height=""}},i.prototype.destroy=function(){t.prototype.destroy.call(this),this.parent=null},i}(Ca),Fo=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Uo=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.widthUptoCursorPoint=0,e.heightUptoCursorPoint=0,e.cursorPointIndex=0,e.isHeaderRows=!1,e.isTimelineDayProcess=!1,e.widthPerMinute=0,e.heightPerMinute=0,e.minDiff=0,e.isStepDragging=!1,e.isMorePopupOpened=!1,e.isAllDayDrag=!1,e.isMultiSelect=!1,e.multiData=[],e.updatedData=[],e.swagData=[],e.startTime=0,e.isAllDayTarget=!1,e.targetTd=null,e.isCursorAhead=!1,e}return Fo(i,t),i.prototype.wireDragEvent=function(t){new e.Draggable(t,{abort:"."+fi,clone:!0,isDragScroll:!0,enableTailMode:!!this.parent.eventDragArea,cursorAt:this.parent.eventDragArea?{left:-20,top:-20}:{left:0,top:0},dragArea:this.dragArea,dragStart:this.dragStart.bind(this),drag:this.drag.bind(this),dragStop:this.dragStop.bind(this),enableAutoScroll:!1,helper:this.dragHelper.bind(this),queryPositionInfo:this.dragPosition.bind(this)})},i.prototype.setDragArea=function(){var e=document.querySelector(this.parent.eventDragArea);this.dragArea=this.parent.eventDragArea&&e?e:this.parent.element.querySelector("."+We)},i.prototype.dragHelper=function(t){var i=this;if(t.sender&&"touchmove"===t.sender.type&&(!this.parent.uiStateValues.isTapHold||!t.element.classList.contains(Bt)))return null;this.setDragActionDefaultValues(),this.actionObj.element=t.element,this.actionObj.action="drag";var n=[];return!this.parent.allowMultiDrag||(0,e.isNullOrUndefined)(this.parent.selectedElements)||0===this.parent.selectedElements.length||this.parent.selectedElements.length>0&&-1===this.parent.selectedElements.indexOf(this.actionObj.element)?n=[t.element]:(n=this.parent.selectedElements,this.isMultiSelect=!0),n.forEach((function(t){var n=i.createCloneElement(t);t.getAttribute("data-guid")===i.actionObj.element.getAttribute("data-guid")&&(i.actionObj.clone=n,i.parent.eventDragArea||"Month"===i.parent.currentView||!i.parent.activeViewOptions.timeScale.enable||i.parent.activeView.isTimelineView()||i.actionObj.element.classList.contains(xi)||(0,e.setStyleAttribute)(i.actionObj.clone,{cursor:"move",left:"0%",right:"0%",width:"100%"}),i.actionObj.clone.style.top=(0,e.formatUnit)(i.actionObj.element.offsetTop)),i.actionObj.cloneElement.push(n),i.actionObj.originalElement.push(t)})),this.actionObj.clone},i.prototype.dragPosition=function(t){if(this.parent.eventDragArea)return{left:t.left,top:t.top};var i,n=this.actionObj.cellHeight/this.actionObj.slotInterval*this.actionObj.interval,r=(0,e.formatUnit)(0);"Month"===this.parent.currentView&&(r=t.left),i=this.isStepDragging?Math.ceil(this.actionObj.clone.getBoundingClientRect().right)+this.actionObj.interval:this.actionObj.clone.getBoundingClientRect().right;var a,s=this.parent.element.querySelector("."+Qt).getBoundingClientRect().right;if(!(this.parent.activeView.isTimelineView()&&"TimelineYear"!==this.parent.currentView&&!this.parent.enableRtl&&this.actionObj.pageX>i)||this.isMorePopupOpened||this.actionObj.pageX>s||(this.isCursorAhead=!0),this.parent.activeView.isTimelineView()&&(r=(0,e.formatUnit)(this.actionObj.clone.offsetLeft)),this.parent.activeView.isTimelineView()||!this.parent.timeScale.enable||!(0,e.isNullOrUndefined)(this.actionObj.clone.offsetParent)&&this.actionObj.clone.offsetParent.classList.contains(_i))a=(0,e.formatUnit)(this.actionObj.clone.offsetTop);else if("Month"===this.parent.currentView)a=(0,e.formatUnit)(0);else if(this.actionObj.clone.classList.contains(xi))a=(0,e.formatUnit)(this.parent.element.querySelector("."+Be).offsetTop),(0,e.setStyleAttribute)(this.actionObj.clone,{width:(0,e.formatUnit)(Math.ceil(this.actionObj.clone.offsetWidth/this.actionObj.cellWidth)*this.actionObj.cellWidth),right:this.parent.enableRtl&&(0,e.formatUnit)(0)});else{this.actionObj.element.classList.contains(xi)&&!this.actionObj.clone.classList.contains(xi)&&(0,e.setStyleAttribute)(this.actionObj.clone,{height:(0,e.formatUnit)(this.actionObj.cellHeight),width:(0,e.formatUnit)(this.actionObj.cellWidth-1),pointerEvents:"none"});var o=parseInt(t.top,10);o=o<0?0:o,a=(0,e.formatUnit)(Math.ceil(o/n)*n);var l=this.parent.element.querySelector(".e-content-wrap").scrollHeight,p=parseInt(a,10)+this.actionObj.clone.offsetHeight;p>l&&(a=parseInt(a,10)-(p-l)+"px")}return{left:r,top:a}},i.prototype.setDragActionDefaultValues=function(){this.actionObj.action="drag",this.actionObj.isAllDay=null,this.actionObj.slotInterval=this.parent.activeViewOptions.timeScale.interval/this.parent.activeViewOptions.timeScale.slotCount,this.actionObj.interval=this.actionObj.slotInterval;var e=this.parent.element.querySelector("."+ze);this.actionObj.cellWidth=e.offsetWidth,this.actionObj.cellHeight=e.offsetHeight},i.prototype.dragStart=function(t){var i=this,n=this.actionObj.element.getAttribute("data-guid");this.actionObj.event=this.parent.eventBase.getEventByGuid(n);var r=(0,e.extend)({},this.actionObj.event,null,!0);(0,e.isNullOrUndefined)(r)||(this.startTime=r[this.parent.eventFields.startTime].getTime());var a={cancel:!1,data:r,selectedData:this.getSelectedData(),event:t,excludeSelectors:null,element:this.actionObj.element,interval:this.actionObj.interval,navigation:{enable:!1,timeDelay:2e3},scroll:{enable:!0,scrollBy:30,timeDelay:100}};this.parent.trigger(S,a,(function(n){if(n.cancel||!(0,e.isNullOrUndefined)(i.actionObj.element)&&(0,e.isNullOrUndefined)(i.actionObj.element.parentElement)){var a=i.actionObj.element.ej2_instances[0];return(0,e.isNullOrUndefined)(a)||a.intDestroy(t.event),i.actionObj.action="",i.removeCloneElementClasses(),void i.removeCloneElement()}i.actionClass("addClass"),i.parent.uiStateValues.action=!0,i.actionObj.start=r[i.parent.eventFields.startTime],i.actionObj.end=r[i.parent.eventFields.endTime],i.actionObj.groupIndex=parseInt(i.actionObj.element.getAttribute("data-group-index")||"0",10),i.actionObj.interval=n.interval,i.actionObj.navigation=n.navigation,i.actionObj.scroll=n.scroll,i.actionObj.excludeSelectors=n.excludeSelectors;var s=i.parent.element.querySelector("."+Qt);if(i.scrollArgs={element:s,width:s.scrollWidth,height:s.scrollHeight},i.widthPerMinute=i.actionObj.cellWidth/i.actionObj.slotInterval*i.actionObj.interval,i.heightPerMinute=i.actionObj.cellHeight/i.actionObj.slotInterval*i.actionObj.interval,i.widthUptoCursorPoint=0,i.heightUptoCursorPoint=0,i.cursorPointIndex=-1,i.isHeaderRows=!1,i.isTimelineDayProcess=!1,i.minDiff=0,i.isMorePopupOpened=!1,i.daysVariation=-1,i.isAllDayTarget=i.actionObj.clone.classList.contains(xi),(i.parent.activeView.isTimelineView()||!i.parent.timeScale.enable)&&"TimelineYear"!==i.parent.currentView){!(0,e.isNullOrUndefined)(i.actionObj.clone.offsetParent)&&i.actionObj.clone.offsetParent.classList.contains(_i)&&(i.isMorePopupOpened=!0),i.actionObj.pageX=t.event.pageX;var o=i.parent.activeViewOptions.headerRows;i.isHeaderRows=o.length>0&&"Hour"!==o[o.length-1].option&&"Date"!==o[o.length-1].option,i.isTimelineDayProcess=!i.parent.activeViewOptions.timeScale.enable||i.isHeaderRows||"TimelineMonth"===i.parent.currentView||o.length>0&&"Date"===o[o.length-1].option,i.isStepDragging=!i.isTimelineDayProcess&&i.actionObj.slotInterval!==i.actionObj.interval,i.isTimelineDayProcess?i.timelineEventModule=new Ca(i.parent,"day"):i.timelineEventModule=new Ca(i.parent,"hour")}("TimelineYear"===i.parent.currentView&&(i.yearEvent=new qo(i.parent)),"Month"===i.parent.currentView&&(i.startTime=se(new Date(i.startTime)).getTime(),i.updateOriginalElement(i.actionObj.clone),i.monthEvent=new ba(i.parent)),"Day"===i.parent.currentView||"Week"===i.parent.currentView||"WorkWeek"===i.parent.currentView)&&(i.verticalEvent=new wa(i.parent),i.verticalEvent.initializeValues(),i.splitEvent(i.actionObj.event).forEach((function(t){var n='.e-day-wrapper[data-date="'+se(t[i.parent.eventFields.startTime]).getTime()+'"]';i.parent.activeViewOptions.group.resources.length>0&&(n=n.concat('[data-group-index = "'+i.actionObj.groupIndex+'"]'));var r=i.parent.element.querySelector(n);if(r){var a=r.querySelector('[data-id="'+i.actionObj.clone.getAttribute("data-id")+'"]');a&&(0,e.addClass)([a],di)}})))}))},i.prototype.getSelectedData=function(){if(this.isMultiSelect&&0===this.multiData.length&&this.parent.selectedElements.length>0)for(var t=0,i=this.parent.selectedElements;t<i.length;t++){var n=i[t].getAttribute("data-guid"),r=this.parent.eventBase.getEventByGuid(n);this.multiData.push((0,e.extend)({},r,null,!0))}return this.multiData},i.prototype.drag=function(t){if(t.event&&"touchmove"===t.event.type&&t.event.preventDefault(),this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(!0),(0,e.isNullOrUndefined)(t.target)||!t.target.classList||!t.target.classList.contains(qn)){var i=(0,e.extend)({},this.actionObj.event,null,!0),n=this.parent.eventBase.getPageCoordinates(t);if(this.actionObj.Y=this.actionObj.pageY=n.pageY,this.actionObj.X=this.actionObj.pageX=n.pageX,this.actionObj.target=t.target,this.widthUptoCursorPoint=0===this.widthUptoCursorPoint?Math.ceil(Math.abs(this.actionObj.clone.getBoundingClientRect().left-this.actionObj.X)/this.widthPerMinute)*this.widthPerMinute:this.widthUptoCursorPoint,this.widthUptoCursorPoint=this.isMorePopupOpened?this.actionObj.cellWidth:this.widthUptoCursorPoint,this.heightUptoCursorPoint=0===this.heightUptoCursorPoint?Math.ceil(Math.abs(this.actionObj.clone.getBoundingClientRect().top-this.actionObj.Y)/this.heightPerMinute)*this.heightPerMinute:this.heightUptoCursorPoint,this.isAllDayDrag=this.parent.activeViewOptions.timeScale.enable?this.actionObj.clone.classList.contains(xi):this.actionObj.event[this.parent.eventFields.isAllDay],this.isStepDragging&&0===this.minDiff&&this.calculateMinutesDiff(i),("Month"===this.parent.currentView||this.isAllDayDrag)&&this.daysVariation<0){var r=this.parent.getDateFromElement(this.actionObj.target);if((0,e.isNullOrUndefined)(r))this.daysVariation=0;else{var a=se(r),s=se(new Date(i[this.parent.eventFields.startTime].getTime()));this.daysVariation=(a.getTime()-s.getTime())/G}}else this.daysVariation=0;if(this.parent.eventDragArea){var o=n.target;this.actionObj.clone.style.top=(0,e.formatUnit)(o.offsetTop),this.actionObj.clone.style.left=(0,e.formatUnit)(o.offsetLeft),(0,e.closest)(o,"."+Me)?"Week"!==this.parent.currentView&&"WorkWeek"!==this.parent.currentView&&"Day"!==this.parent.currentView&&(this.actionObj.clone.style.width=(0,e.formatUnit)(this.actionObj.element.offsetWidth)):(this.actionObj.clone.style.height="",this.actionObj.clone.style.width="")}this.updateScrollPosition(t),this.updateNavigatingPosition(t),this.updateDraggingDateTime(t);var l={data:i,event:t,element:this.actionObj.element,startTime:this.actionObj.start,endTime:this.actionObj.end,selectedData:this.updatedData};this.parent.group.resources.length>0&&(l.groupIndex=this.actionObj.groupIndex),this.parent.trigger(C,l)}},i.prototype.calculateMinutesDiff=function(e){this.parent.enableRtl?this.minDiff=(this.actionObj.clone.offsetWidth-this.widthUptoCursorPoint)/this.widthPerMinute*this.actionObj.interval:this.minDiff=this.widthUptoCursorPoint/this.widthPerMinute*this.actionObj.interval;var t=e[this.parent.eventFields.startTime],i=de(this.parent.activeView.renderDates[0],this.parent.activeView.getStartHour(),this.parent.activeView.getEndHour());i.startHour.getTime()>t.getTime()&&(this.minDiff=this.minDiff+(i.startHour.getTime()-t.getTime())/X)},i.prototype.dragStop=function(t){var i=this;if(this.isCursorAhead=!1,this.removeCloneElementClasses(),this.removeCloneElement(),clearInterval(this.actionObj.navigationInterval),this.actionObj.navigationInterval=null,clearInterval(this.actionObj.scrollInterval),this.actionObj.scrollInterval=null,this.actionClass("removeClass"),this.parent.uiStateValues.action=this.parent.uiStateValues.isTapHold=!1,!this.isAllowDrop(t)){var n=t.target.classList&&!t.target.classList.contains("e-work-cells")&&this.parent.cellTemplate?(0,e.closest)(t.target,".e-work-cells"):t.target,r={cancel:!1,data:this.getChangedData(this.updatedData),selectedData:this.updatedData,event:t,element:this.actionObj.element,target:n};this.actionObj.action=null,this.parent.trigger(O,r,(function(e){if(!e.cancel){if(i.parent.isSpecificResourceEvents()){i.parent.crudModule.crudObj.isCrudAction=!0,i.parent.crudModule.crudObj.sourceEvent=[i.parent.resourceBase.lastResourceLevel[parseInt(r.element.getAttribute("data-group-index"),10)]];var t=parseInt(r.target.getAttribute("data-group-index"),10)||i.actionObj.groupIndex;i.parent.crudModule.crudObj.targetEvent=[i.parent.resourceBase.lastResourceLevel[parseInt(t.toString(),10)]]}i.saveChangedData(e,i.isMultiSelect)}})),this.updatedData=[],this.multiData=[],this.isMultiSelect=!1,this.parent.selectedElements=[]}},i.prototype.updateNavigatingPosition=function(t){var i=this;if(this.actionObj.navigation.enable){var n=this.parent.getCurrentTime();(0,e.isNullOrUndefined)(this.actionObj.navigationInterval)&&(this.actionObj.navigationInterval=window.setInterval((function(){if(n){var e=i.parent.getCurrentTime().getSeconds(),r=n.getSeconds()+i.actionObj.navigation.timeDelay/1e3;(r=r>=60?r-60:r)===e&&(n=i.parent.getCurrentTime(),i.viewNavigation(t),i.updateDraggingDateTime(t))}}),this.actionObj.navigation.timeDelay))}},i.prototype.updateDraggingDateTime=function(t){!(0,e.isNullOrUndefined)(this.actionObj.clone.offsetParent)&&this.actionObj.clone.offsetParent.classList.contains(_i)?this.morePopupEventDragging(t):this.parent.activeView.isTimelineView()&&"TimelineYear"!==this.parent.currentView?(this.timelineEventModule.dateRender=this.parent.activeView.renderDates,this.timelineEventModule.cellWidth=this.actionObj.cellWidth,this.timelineEventModule.getSlotDates(),this.actionObj.cellWidth=this.isHeaderRows?this.timelineEventModule.cellWidth:Ve(this.parent.element.querySelector("."+ze)),this.calculateTimelineTime(t)):"Month"===this.parent.currentView||"TimelineYear"===this.parent.currentView?this.calculateVerticalDate(t):this.calculateVerticalTime(t)},i.prototype.navigationWrapper=function(){if(this.parent.activeView.isTimelineView()){var t=void 0;if(t=this.parent.activeViewOptions.group.resources.length>0?this.parent.element.querySelectorAll(".e-appointment-container:not(.e-hidden)").item(this.actionObj.index):this.parent.element.querySelector("."+Nt),!(0,e.isNullOrUndefined)(t)){var i=t.querySelector("."+xt);i||(i=(0,e.createElement)("div",{className:xt}),t.appendChild(i)),this.actionObj.cloneElement.forEach((function(e){i.appendChild(e)}))}}else if("Month"!==this.parent.currentView&&this.parent.timeScale.enable){var n=this.actionObj.clone.classList.contains(xi)?"."+Ei:"."+xt;if(this.parent.element.querySelectorAll(n).item(this.actionObj.index).appendChild(this.actionObj.clone),n==="."+Ei){var r=this.getAllDayEventHeight(),a=[].slice.call(this.parent.element.querySelectorAll("."+Ue+":first-child"));if(a[0].offsetHeight<r)for(var s=0,o=a;s<o.length;s++){o[s].style.height=(r+2)/12+"em"}this.actionObj.clone.style.height=(0,e.formatUnit)(r)}this.actionObj.height=parseInt(this.actionObj.clone.style.height,10)}else{var l=[].slice.call(this.parent.element.querySelectorAll("."+ze));this.actionObj.index=this.parent.activeView.renderDates.length<this.actionObj.index?this.parent.activeView.renderDates.length-1:this.actionObj.index;var p=l[this.actionObj.index].querySelector("."+xt);p||(p=(0,e.createElement)("div",{className:xt}),l[this.actionObj.index].appendChild(p)),p.appendChild(this.actionObj.clone)}},i.prototype.viewNavigation=function(t){var i,n=this.parent.element.querySelector("."+Qt);n&&(!this.scrollEdges.top&&!this.scrollEdges.bottom||(0,e.closest)(this.actionObj.clone,"."+Ei))&&(0===n.scrollLeft&&Math.round(this.actionObj.X)<=Math.round(n.getBoundingClientRect().left+this.actionObj.cellWidth+window.pageXOffset)?i=this.parent.enableRtl?"next":"previous":Math.round(n.scrollLeft)+n.clientWidth===n.scrollWidth&&Math.round(this.actionObj.X)>=Math.round(n.getBoundingClientRect().right-this.actionObj.cellWidth+window.pageXOffset)&&(i=this.parent.enableRtl?"previous":"next"),i&&this.parent.changeDate(this.parent.activeView.getNextPreviousDate(i)))},i.prototype.morePopupEventDragging=function(t){if(!((0,e.isNullOrUndefined)(t.target)||t.target&&(0,e.isNullOrUndefined)((0,e.closest)(t.target,"td")))){var i=(0,e.extend)({},this.actionObj.event,null,!0),n=i[this.parent.eventFields.endTime].getTime()-i[this.parent.eventFields.startTime].getTime(),r=(0,e.closest)(t.target,"td");if("TimelineYear"!==this.parent.currentView||r.classList.contains(ze)&&!r.classList.contains(Ze)){var a=this.parent.getDateFromElement(r),s=new Date(a.getTime());s.setMilliseconds(n),this.parent.activeViewOptions.group.resources.length>0&&(this.actionObj.groupIndex=parseInt(r.getAttribute("data-group-index"),10)),this.actionObj.start=new Date(a.getTime()),this.actionObj.end=new Date(s.getTime()),this.actionObj.clone.style.top=(0,e.formatUnit)(r.offsetParent.offsetTop),this.actionObj.clone.style.left=(0,e.formatUnit)(r.offsetLeft),this.actionObj.clone.style.width=(0,e.formatUnit)(r.offsetWidth);var o,l=r;if(this.parent.activeView.isTimelineView()){var p=(0,e.closest)(r,"tr").rowIndex;l=this.parent.element.querySelectorAll(".e-appointment-container").item(p)}(o=l.querySelector("."+xt))||(o=(0,e.createElement)("div",{className:xt}),l.appendChild(o)),this.appendCloneElement(o)}}},i.prototype.calculateVerticalTime=function(t){var i=this;if(!((0,e.isNullOrUndefined)(this.actionObj.target)||this.actionObj.target&&(0,e.isNullOrUndefined)((0,e.closest)(this.actionObj.target,"tr")))&&((0,e.isNullOrUndefined)((0,e.closest)(this.actionObj.target,"td"))||(0,e.closest)(this.actionObj.target,"td").classList.contains(ze)||(0,e.closest)(this.actionObj.target,"td").classList.contains(Ue))){this.parent.activeViewOptions.timeScale.enable&&this.swapDragging(t);var n=this.parent.element.querySelector("."+Qt),r=(0,e.extend)({},this.actionObj.event,null,!0),a=r[this.parent.eventFields.startTime],s=Ce(r[this.parent.eventFields.endTime])-Ce(a),o=Math.floor(parseInt(this.actionObj.clone.style.top,10)/this.actionObj.cellHeight)*this.actionObj.cellHeight;o=o<0?0:o,(this.scrollEdges.top||this.scrollEdges.bottom)&&(o=this.scrollEdges.top?n.scrollTop-this.heightUptoCursorPoint+this.actionObj.cellHeight+window.pageYOffset:n.scrollTop+n.offsetHeight-this.actionObj.clone.offsetHeight+window.pageYOffset+(this.actionObj.clone.offsetHeight-this.heightUptoCursorPoint),o=Math.round(o/this.actionObj.cellHeight)*this.actionObj.cellHeight,n.scrollTop>0&&(this.actionObj.clone.style.top=(0,e.formatUnit)(o)));var l,p,c=this.parent.activeViewOptions.timeScale.enable?o/this.actionObj.cellHeight:0,h=this.actionObj.cellHeight/this.actionObj.slotInterval,d=parseInt(this.actionObj.clone.style.top,10)-o;if(this.isAllDayDrag)l=this.parent.element.querySelector("."+Be);else l=[].slice.call(this.parent.getContentTable().querySelectorAll("tr"))[parseInt(c.toString(),10)];(0,e.isNullOrUndefined)((0,e.closest)(this.actionObj.target,"td"))||!(0,e.closest)(this.actionObj.target,"td").classList.contains(ze)&&!(0,e.closest)(this.actionObj.target,"td").classList.contains(Ue)||(p=(0,e.closest)(this.actionObj.target,"td").cellIndex);var u=(0,e.isNullOrUndefined)(p)?(0,e.closest)(this.actionObj.clone,"td").cellIndex:p;if(this.actionObj.index=u,!(0,e.isNullOrUndefined)(l)){var g,v,m=l.children[parseInt(u.toString(),10)];if(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(this.actionObj.groupIndex=parseInt(m.getAttribute("data-group-index"),10)),this.parent.activeViewOptions.timeScale.enable&&!this.isAllDayDrag)this.appendCloneElement(this.getEventWrapper(u)),(g=this.parent.getDateFromElement(m)).setMinutes(g.getMinutes()+d/h),v=new Date(g.getTime()),this.actionObj.element.classList.contains(xi)?v.setMinutes(v.getMinutes()+this.actionObj.slotInterval):v.setMilliseconds(s);else{(g=this.parent.getDateFromElement(m)).setDate(g.getDate()-this.daysVariation),g.setHours(a.getHours(),a.getMinutes(),a.getSeconds()),(v=new Date(g.getTime())).setMilliseconds(s),!this.actionObj.element.classList.contains(xi)&&this.actionObj.clone.classList.contains(xi)&&(v=pe(se(v),1));var f=this.parent.activeViewOptions.group.byDate||this.parent.virtualScrollModule&&!this.parent.activeViewOptions.timeScale.enable?u:void 0;this.updateAllDayEvents(g,v,f)}this.actionObj.start=new Date(+g),this.actionObj.end=new Date(+v);for(var y=this.getUpdatedEvent(this.actionObj.start,this.actionObj.end,this.actionObj.event),T=0,w=[].slice.call(this.parent.element.querySelectorAll(".e-dynamic-clone"));T<w.length;T++){var D=w[T];(0,e.remove)(D)}if(this.multiData.length>0){if(this.isAllDayTarget&&this.isAllDayDrag&&!(0,e.isNullOrUndefined)(this.actionObj.isAllDay)&&!this.actionObj.isAllDay){var b=parseInt((0,e.closest)(this.actionObj.target,"td").getAttribute("data-date"),10);this.multiData.forEach((function(t){if(i.swagData.push((0,e.extend)({},t,null,!0)),t[i.parent.eventFields.isAllDay]){t[i.parent.eventFields.startTime]=new Date(t[i.parent.eventFields.startTime].getTime()+(b-i.startTime));var n=new Date(t[i.parent.eventFields.startTime]),r=new Date(n.setMinutes(n.getMinutes()+i.actionObj.slotInterval));t[i.parent.eventFields.endTime]=r,t[i.parent.eventFields.isAllDay]=!1}})),this.startTime=b}if(this.isAllDayTarget&&this.isAllDayDrag&&!(0,e.isNullOrUndefined)(this.actionObj.isAllDay)&&this.actionObj.isAllDay&&this.swagData.length>0){this.multiData=this.swagData,this.swagData=[];var S=(0,e.extend)({},this.actionObj.event,null,!0);this.startTime=S[this.parent.eventFields.startTime].getTime()}for(var C=y[this.parent.eventFields.startTime].getTime()-this.startTime,O=0;O<this.multiData.length;O++){this.updatedData[parseInt(O.toString(),10)]=this.updateMultipleData(this.multiData[parseInt(O.toString(),10)],C);var E=this.getDayIndex(this.updatedData[parseInt(O.toString(),10)]);if(E>=0){D=this.getEventWrapper(E,this.updatedData[parseInt(O.toString(),10)][this.parent.eventFields.isAllDay]);this.appendCloneElement(D,this.actionObj.cloneElement[parseInt(O.toString(),10)]),this.updateEventHeight(this.updatedData[parseInt(O.toString(),10)],O,E)}else(0,e.isNullOrUndefined)(this.actionObj.cloneElement[parseInt(O.toString(),10)].parentNode)||(0,e.remove)(this.actionObj.cloneElement[parseInt(O.toString(),10)])}}else this.updateEventHeight(y);this.updateTimePosition(this.actionObj.start,this.updatedData)}}},i.prototype.splitEvent=function(t){var i=this.parent.eventFields,n=[],r=t[i.startTime],a=t[i.endTime];if(se(new Date(r.getTime()))<se(new Date(a.getTime()))){for(var s=se(new Date(r.getTime())),o=new Date(s.getTime()),l=0;s<new Date(a.getTime());l++){o=new Date(o.setDate(s.getDate()+1));var p=(0,e.extend)({},t,null,!0);p[i.startTime]=new Date(s),p[i.endTime]=new Date(o),s=new Date(s.setDate(s.getDate()+1)),n.push(p)}var c=n.length-1;n[0][i.startTime]=r,n[parseInt(c.toString(),10)][i.endTime]=a}else n.push(t);return n},i.prototype.updateMultipleData=function(t,i){var n=(0,e.extend)({},t,null,!0);!(0,e.isNullOrUndefined)(this.actionObj.isAllDay)&&this.parent.activeViewOptions.timeScale.enable&&(this.isAllDayTarget&&n[this.parent.eventFields.isAllDay]||!this.isAllDayTarget&&!n[this.parent.eventFields.isAllDay])&&(n[this.parent.eventFields.isAllDay]=this.actionObj.isAllDay);var r=n[this.parent.eventFields.endTime].getTime()-n[this.parent.eventFields.startTime].getTime();if(n[this.parent.eventFields.isAllDay]){var a=Math.ceil(i/864e5),s=Math.ceil(r/864e5),o=new Date(n[this.parent.eventFields.startTime]);n[this.parent.eventFields.startTime]=se(new Date(o.setDate(o.getDate()+a))),n[this.parent.eventFields.endTime]=pe(n[this.parent.eventFields.startTime],s)}else n[this.parent.eventFields.startTime]=new Date(n[this.parent.eventFields.startTime].getTime()+i),n[this.parent.eventFields.endTime]=new Date(n[this.parent.eventFields.startTime].getTime()+r);return n},i.prototype.getDayIndex=function(t){var i=(0,e.extend)({},t,null,!0),n=se(i[this.parent.eventFields.startTime]);if(this.parent.activeViewOptions.timeScale.enable&&!i[this.parent.eventFields.isAllDay]){var r=this.parent.activeView.getStartHour();n.setMilliseconds(r.getTime()-se(r).getTime())}var a=n.getTime(),s="";return s="."+(this.parent.activeViewOptions.timeScale.enable&&i[this.parent.eventFields.isAllDay]?Ei:ze)+'[data-date="'+a+'"]',this.parent.activeViewOptions.group.resources.length>0&&(s=s+'[data-group-index="'+this.actionObj.groupIndex+'"]'),this.targetTd=this.parent.element.querySelector(s),(0,e.isNullOrUndefined)(this.targetTd)?-1:this.targetTd.cellIndex},i.prototype.updateEventHeight=function(t,i,n){this.verticalEvent.initializeValues();var r=this.verticalEvent.getStartCount();if(!this.parent.uiStateValues.isGroupAdaptive)for(var a=0;a<this.actionObj.groupIndex;a++)this.verticalEvent.dateRender[parseInt(a.toString(),10)]&&(r+=this.verticalEvent.dateRender[parseInt(a.toString(),10)].length);var s=this.parent.uiStateValues.isGroupAdaptive?r:this.actionObj.groupIndex;if(!(!this.parent.activeViewOptions.group.byDate||(0,e.isNullOrUndefined)(this.parent.getDateFromElement(this.actionObj.target)))||!this.parent.activeViewOptions.group.byDate){var o=-1,l=this.parent.activeViewOptions.group.byDate?this.parent.getIndexOfDate(this.verticalEvent.dateRender[parseInt(s.toString(),10)],se(this.parent.getDateFromElement((0,e.isNullOrUndefined)(i)?this.actionObj.target:this.targetTd))):(0,e.isNullOrUndefined)(i)?this.actionObj.index-r:n-r,p=this.splitEvent(t),c=this.parent.eventBase.isAllDayAppointment(t)||p.length>2||"TimeSlot"!==this.parent.eventSettings.spannedEventPlacement?[t]:p;for(a=0;a<c.length;a++){if(a>0){var h='.e-day-wrapper[data-date="'+se(c[parseInt(a.toString(),10)][this.parent.eventFields.startTime]).getTime()+'"]';this.parent.activeViewOptions.group.resources.length>0&&(h=h.concat('[data-group-index = "'+this.actionObj.groupIndex+'"]'));var d=this.parent.element.querySelector(h);d?(l+=1,o=d.cellIndex):l=-1}if(l>=0){var u=this.verticalEvent.isSpannedEvent(c[parseInt(a.toString(),10)],l,s),g=u[this.verticalEvent.fields.startTime],v=u[this.verticalEvent.fields.endTime],m=this.parent.activeViewOptions.timeScale.enable?this.verticalEvent.getHeight(g,v):this.actionObj.element.offsetHeight,f=this.parent.activeViewOptions.timeScale.enable?this.verticalEvent.getTopValue(g,l,s):this.actionObj.element.offsetTop;if((0,e.isNullOrUndefined)(i))0===a?(this.actionObj.clone.style.top=(0,e.formatUnit)(f),this.actionObj.clone.style.height=(0,e.formatUnit)(m)):this.renderSpannedEvents(u,o,f,m);else{var y=this.actionObj.cellWidth;if(t[this.parent.eventFields.isAllDay]){f=this.parent.element.querySelector("."+Be).offsetTop,m=this.getAllDayEventHeight();var T=t[this.parent.eventFields.endTime].getTime()-t[this.parent.eventFields.startTime].getTime(),w=Math.ceil(T/864e5);w>=0&&(y=w*this.actionObj.cellWidth)}this.actionObj.cloneElement[parseInt(i.toString(),10)]&&(0===a?(this.actionObj.cloneElement[parseInt(i.toString(),10)].style.top=(0,e.formatUnit)(f),this.actionObj.cloneElement[parseInt(i.toString(),10)].style.height=(0,e.formatUnit)(m),this.actionObj.cloneElement[parseInt(i.toString(),10)].style.width=(0,e.formatUnit)(y),this.actionObj.cloneElement[parseInt(i.toString(),10)].style.left=(0,e.formatUnit)(0)):this.renderSpannedEvents(u,o,f,m))}}}}},i.prototype.renderSpannedEvents=function(t,i,n,r){if(t[this.parent.eventFields.startTime].getTime()!==t[this.parent.eventFields.endTime].getTime()){var a=this.verticalEvent.createAppointmentElement(t,!1,t.isSpanned,this.actionObj.groupIndex);(0,e.addClass)([a],[gi,"e-dynamic-clone"]),(0,e.setStyleAttribute)(a,{width:"100%",height:r+"px",top:n+"px",border:"0px"}),[].slice.call(this.parent.element.querySelectorAll("."+xt))[parseInt(i.toString(),10)].appendChild(a)}},i.prototype.getRenderedDates=function(){var e,t,i=this,n=this.parent.activeView.renderDates;((e=this.parent.eventBase.slots).push.apply(e,this.parent.activeView.renderDates.map((function(e){return+e}))),this.parent.activeViewOptions.group.resources.length>0)&&(this.parent.eventBase.slots=[],n=this.parent.resourceBase.lastResourceLevel.filter((function(e){return e.groupIndex===i.actionObj.groupIndex}))[0].renderDates,(t=this.parent.eventBase.slots).push.apply(t,n.map((function(e){return+e}))));return n},i.prototype.updateAllDayEvents=function(t,i,n){this.parent.eventBase.slots=[];var r=this.getUpdatedEvent(t,i,this.actionObj.event),a=this.getRenderedDates(),s=this.parent.eventBase.splitEvent(r,a),o='.e-all-day-cells[data-date="'+s[0][this.parent.eventFields.startTime].getTime()+'"]';this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(o=o.concat('[data-group-index = "'+this.actionObj.groupIndex+'"]'));var l=[].slice.call(this.parent.element.querySelectorAll(o));if(l.length>0||!(0,e.isNullOrUndefined)(n)){var p=(0,e.isNullOrUndefined)(n)?l[0].cellIndex:n;this.appendCloneElement(this.getEventWrapper(p)),this.actionObj.clone.style.width=(0,e.formatUnit)(s[0].data.count*this.actionObj.cellWidth)}},i.prototype.swapDragging=function(t){var i=!(0,e.isNullOrUndefined)((0,e.closest)(this.actionObj.target,"td"))&&(0,e.closest)(this.actionObj.target,"td").cellIndex;if((0,e.closest)(this.actionObj.target,"."+Ge)&&!(0,e.closest)(this.actionObj.clone,"."+Ei)){(0,e.addClass)([this.actionObj.clone],xi),this.appendCloneElement(this.getEventWrapper(i)),this.actionObj.isAllDay=!0;var n=this.getAllDayEventHeight(),r=[].slice.call(this.parent.element.querySelectorAll("."+Ue+":first-child"));if(r[0].offsetHeight<n)for(var a=0,s=r;a<s.length;a++){s[a].style.height=(n+2)/12+"em"}(0,e.setStyleAttribute)(this.actionObj.clone,{width:(0,e.formatUnit)(this.actionObj.cellWidth),height:(0,e.formatUnit)(n),top:(0,e.formatUnit)(this.parent.element.querySelector("."+Be).offsetTop)})}if((0,e.closest)(this.actionObj.target,"."+ze)&&!(0,e.closest)(this.actionObj.clone,"."+At)){(0,e.removeClass)([this.actionObj.clone],xi),this.appendCloneElement(this.getEventWrapper(i)),this.actionObj.isAllDay=!1;var o=0===this.actionObj.element.offsetHeight?this.actionObj.height:this.actionObj.element.offsetHeight;(0,e.setStyleAttribute)(this.actionObj.clone,{left:(0,e.formatUnit)(0),height:(0,e.formatUnit)(o),width:(0,e.formatUnit)(this.actionObj.cellWidth)})}},i.prototype.calculateVerticalDate=function(t){if(!((0,e.isNullOrUndefined)(t.target)||t.target&&(0,e.isNullOrUndefined)((0,e.closest)(t.target,"tr"))||t.target&&"DIV"===t.target.tagName)){var i=(0,e.extend)({},this.actionObj.event,null,!0);(0,e.isNullOrUndefined)(this.parent.eventDragArea)&&this.removeCloneElement();var n=Ce(i[this.parent.eventFields.endTime])-Ce(i[this.parent.eventFields.startTime]),r=(0,e.closest)(this.actionObj.target,"td");if(!(0,e.isNullOrUndefined)(r)){var a=r.parentElement;this.actionObj.index=a.rowIndex*a.children.length+r.cellIndex,r=[].slice.call(this.parent.element.querySelectorAll("."+ze))[this.actionObj.index];var s=this.parent.getDateFromElement(r);if(!(0,e.isNullOrUndefined)(s)){this.parent.activeViewOptions.group.resources.length>0&&(this.actionObj.groupIndex=parseInt(r.getAttribute("data-group-index"),10));var o=new Date(s.setDate(s.getDate()-this.daysVariation)),l=new Date(o.getTime()),p=Ce(i[this.parent.eventFields.startTime])-Ce(se(new Date(+i[this.parent.eventFields.startTime])));l.setMilliseconds(p);var c=new Date(l.getTime());c.setMilliseconds(n),this.actionObj.start=new Date(l.getTime()),this.actionObj.end=new Date(c.getTime())}}var h=this.getUpdatedEvent(this.actionObj.start,this.actionObj.end,this.actionObj.event);if((0,e.isNullOrUndefined)(this.parent.eventDragArea))for(var d=0,u=[].slice.call(this.parent.element.querySelectorAll("."+gi));d<u.length;d++){var g=u[d];(0,e.remove)(g)}if(this.multiData&&this.multiData.length>0){var v=se(new Date(h[this.parent.eventFields.startTime]));p=v.getTime()-this.startTime;"TimelineYear"===this.parent.currentView&&this.parent.group.resources.length>0&&(p=12*(v.getFullYear()-new Date(this.startTime).getFullYear()),p-=new Date(this.startTime).getMonth(),p+=v.getMonth());for(var m=0;m<this.multiData.length;m++)this.updatedData[parseInt(m.toString(),10)]=this.updateMultipleVerticalDate(this.multiData[parseInt(m.toString(),10)],p),"TimelineYear"===this.parent.currentView?this.dynamicYearlyEventsRendering(this.updatedData[parseInt(m.toString(),10)]):this.dynamicEventsRendering(this.updatedData[parseInt(m.toString(),10)])}else"TimelineYear"===this.parent.currentView?this.dynamicYearlyEventsRendering(h):this.dynamicEventsRendering(h)}},i.prototype.updateMultipleVerticalDate=function(t,i){var n=(0,e.extend)({},t,null,!0),r=n[this.parent.eventFields.endTime].getTime()-n[this.parent.eventFields.startTime].getTime(),a=new Date(n[this.parent.eventFields.startTime]);if("TimelineYear"===this.parent.currentView&&this.parent.group.resources.length>0)n[this.parent.eventFields.startTime]=new Date(a.setMonth(a.getMonth()+i));else{var s=Math.ceil(i/G);n[this.parent.eventFields.startTime]=new Date(a.setDate(a.getDate()+s))}return n[this.parent.eventFields.endTime]=new Date(n[this.parent.eventFields.startTime].getTime()+r),n},i.prototype.calculateTimelineTime=function(t){var i,n=(0,e.extend)({},this.actionObj.event,null,!0),r=Ce(n[this.parent.eventFields.endTime])-Ce(n[this.parent.eventFields.startTime]),a=this.parent.enableRtl?Math.abs(this.actionObj.clone.offsetLeft)-this.actionObj.clone.offsetWidth:parseInt(this.actionObj.clone.style.left,10);a=Math.floor(a/Math.trunc(this.actionObj.cellWidth))*this.actionObj.cellWidth,this.parent.enableRtl&&(i=Math.abs(parseInt(this.actionObj.clone.style.right,10)),this.actionObj.clone.style.right=(0,e.formatUnit)(i)),a=this.getOffsetValue(a,i);var s=this.getColumnIndex(a),o=this.parent.element.querySelector("."+Qt),l=o.getBoundingClientRect().right,p=this.parent.activeView.isTimelineView()&&!this.parent.enableRtl&&this.actionObj.pageX>this.actionObj.clone.getBoundingClientRect().right&&!this.isMorePopupOpened&&!(this.actionObj.pageX>l),c=this.parent.eventDragArea?o.scrollLeft-o.offsetLeft:0;!this.isCursorAhead&&!p||this.isStepDragging||(this.isCursorAhead=!0);var h=Math.floor((this.actionObj.pageX-this.actionObj.clone.getBoundingClientRect().left+c)/this.actionObj.cellWidth);this.parent.enableRtl&&(h=Math.abs(Math.floor((this.actionObj.pageX-this.actionObj.clone.getBoundingClientRect().right)/this.actionObj.cellWidth))-1),this.cursorPointIndex<0&&this.cursorIndex(t,n,a,h);var d=this.parent.getContentTable().querySelector("tr"),u=this.getCursorCurrentIndex(s,h,d);u=u<0?0:u;var g=this.isHeaderRows?new Date(this.timelineEventModule.dateRender[parseInt(u.toString(),10)].getTime()):this.parent.getDateFromElement(d.children[parseInt(u.toString(),10)]);if(this.isStepDragging){var v=this.getWidthDiff(d,u);if(0!==v){var m=Math.ceil(v/this.widthPerMinute);if(g.setMinutes(g.getMinutes()+m*this.actionObj.interval),this.isCursorAhead||p)g.setMilliseconds(-r);else{g.setMinutes(g.getMinutes()-this.minDiff);var f=this.actionObj.interval*X;m=Math.abs(g.getTime()-this.actionObj.start.getTime())/f;var y=Math.trunc(m);y!==m&&(m=y*f*(g>this.actionObj.start?1:-1),g=new Date(this.actionObj.start.getTime()+m))}}else g=this.actionObj.start}else if(this.isCursorAhead||p){var T=this.isTimelineDayProcess?1440:this.actionObj.slotInterval;g.setMinutes(g.getMinutes()+T),g.setMilliseconds(-r),g.getTime()===se(g).getTime()&&0===g.getMinutes()&&0===r&&g.setMinutes(-T)}else g.setMinutes(g.getMinutes()-this.cursorPointIndex*(this.isTimelineDayProcess?1440:this.actionObj.slotInterval));if(this.isStepDragging||(g=this.calculateIntervalTime(g)),this.isTimelineDayProcess){var w=n[this.parent.eventFields.startTime];g.setHours(w.getHours(),w.getMinutes(),w.getSeconds())}if(this.parent.eventDragArea){var D=this.parent.getDateFromElement(t.target);if(!(0,e.isNullOrUndefined)(D))if(this.parent.activeViewOptions.timeScale.enable&&"TimelineMonth"!==this.parent.currentView)g=D;else{w=n[this.parent.eventFields.startTime];g=new Date(D.setHours(w.getHours(),w.getMinutes(),w.getSeconds()))}}var b=new Date(g.getTime());b.setMilliseconds(r);var S=[this.getUpdatedEvent(g,b,this.actionObj.event)];if(this.multiData.length>0){for(var C=S[0][this.parent.eventFields.startTime].getTime()-this.startTime,O=0;O<this.multiData.length;O++)this.updatedData[parseInt(O.toString(),10)]=this.updateMultipleData(this.multiData[parseInt(O.toString(),10)],C);S=this.updatedData}for(var E=0;E<S.length;E++){var x=this.multiData.length>0?this.actionObj.cloneElement[parseInt(E.toString(),10)]:this.actionObj.clone;if((0,e.isNullOrUndefined)(this.parent.eventDragArea)){var V=this.timelineEventModule.splitEvent(S[parseInt(E.toString(),10)],this.timelineEventModule.dateRender),A=V[0].data,I=this.timelineEventModule.getStartTime(V[0],A),M=this.timelineEventModule.getEndTime(V[0],A),k=this.timelineEventModule.getEventWidth(I,M,n[this.parent.eventFields.isAllDay],A.count),R=this.parent.getIndexOfDate(this.timelineEventModule.dateRender,se(new Date(I.getTime())));R=R<0?0:R;var H=this.timelineEventModule.getPosition(I,M,n[this.parent.eventFields.isAllDay],R);this.parent.enableRtl?x.style.right=(0,e.formatUnit)(H):x.style.left=(0,e.formatUnit)(H),this.isMorePopupOpened||(x.style.width=(0,e.formatUnit)(k))}this.parent.activeViewOptions.group.resources.length>0&&this.calculateResourceGroupingPosition(t,x),this.actionObj.start=new Date(g.getTime()),this.actionObj.end=new Date(b.getTime()),this.updateTimePosition(this.actionObj.start,this.updatedData)}},i.prototype.getOffsetValue=function(t,i){if(this.scrollEdges.left||this.scrollEdges.right){var n=this.parent.element.querySelector("."+Qt);this.parent.enableRtl?(i=n.offsetWidth-n.scrollLeft,this.scrollEdges.right?i=i-n.offsetWidth+this.actionObj.clone.offsetWidth-(this.actionObj.clone.offsetWidth-this.widthUptoCursorPoint):(i+=this.widthUptoCursorPoint)-this.widthUptoCursorPoint>=n.scrollWidth&&(this.actionObj.clone.style.width=(0,e.formatUnit)(this.actionObj.clone.offsetWidth-this.widthUptoCursorPoint+this.actionObj.cellWidth),i=n.scrollLeft-n.scrollWidth),(0,e.isNullOrUndefined)(this.parent.eventDragArea)&&(this.actionObj.clone.style.left=(0,e.formatUnit)(i))):(this.scrollEdges.left?(t=n.scrollLeft-this.widthUptoCursorPoint+this.actionObj.cellWidth,n.scrollLeft+n.offsetWidth>=n.offsetWidth?n.scrollLeft=n.scrollLeft-1:0===this.actionObj.clone.offsetLeft&&(t=n.scrollLeft)):t=n.scrollLeft+n.offsetWidth-this.actionObj.clone.offsetWidth+(this.actionObj.clone.offsetWidth-this.widthUptoCursorPoint),t=t<0?0:t,(0,e.isNullOrUndefined)(this.parent.eventDragArea)&&(this.actionObj.clone.style.left=(0,e.formatUnit)(t)))}return t},i.prototype.getWidthDiff=function(e,t){var i=this.scrollArgs.element.getBoundingClientRect();if(i.left<=this.actionObj.pageX&&i.right>=this.actionObj.pageX){var n=e.children[parseInt(t.toString(),10)].offsetLeft,r=this.actionObj.pageX-i.left;return this.parent.enableRtl?n+this.actionObj.cellWidth-(this.scrollArgs.element.scrollLeft+r):this.scrollArgs.element.scrollLeft+r-n}return 0},i.prototype.getColumnIndex=function(e){var t=Math.floor(e/Math.trunc(this.actionObj.cellWidth));return this.isHeaderRows?t:this.getIndex(t)},i.prototype.getCursorCurrentIndex=function(e,t,i){var n=e+t;if(this.isHeaderRows){var r=Math.floor(i.offsetWidth/this.actionObj.cellWidth);return n>r-1?r-1:n}return n>i.children.length-1?i.children.length-1:n},i.prototype.cursorIndex=function(t,i,n,r){var a=(0,e.closest)(t.target,".e-work-cells");if((0,e.isNullOrUndefined)(a)||this.isMorePopupOpened)this.cursorPointIndex=0;else{var s=this.parent.getDateFromElement(a);if(this.isHeaderRows){var o=Math.floor(n/this.actionObj.cellWidth);s=new Date(this.timelineEventModule.dateRender[o+r].getTime())}var l=s.getTime()-i[this.parent.eventFields.startTime].getTime();if(this.isTimelineDayProcess)this.cursorPointIndex=Math.abs(Math.ceil(l/G));else{var p=Math.floor(l/X/(this.actionObj.slotInterval/this.actionObj.cellWidth));this.cursorPointIndex=Math.floor(p/this.actionObj.cellWidth),this.cursorPointIndex=this.cursorPointIndex<0?0:this.cursorPointIndex}}},i.prototype.calculateResourceGroupingPosition=function(t,i){var n=this.parent.element.querySelector("."+Qt),r=[].slice.call(this.parent.element.querySelectorAll(".e-content-wrap .e-content-table tr:not(.e-hidden)")),a=Z(n.querySelector("table"));a=(0,e.isNullOrUndefined)(a)?0:a;var s=this.parent.rowAutoHeight?~~(n.querySelector("table").offsetHeight/r.length):this.actionObj.cellHeight,o=Math.floor(Math.floor(this.actionObj.Y+(n.scrollTop-a-(window.scrollY||window.pageYOffset))-Ie(n))/s);o=o<0?0:o>r.length-1?r.length-1:o,this.actionObj.index=o;var l=this.parent.element.querySelectorAll(".e-appointment-container:not(.e-hidden)").item(o),p=l.querySelector("."+xt);p||(p=(0,e.createElement)("div",{className:xt}),l.appendChild(p)),this.appendCloneElement(p,i);var c=(0,e.closest)(this.actionObj.target,"td");if(this.actionObj.groupIndex=c&&!isNaN(parseInt(c.getAttribute("data-group-index"),10))?parseInt(c.getAttribute("data-group-index"),10):this.actionObj.groupIndex,(0,e.isNullOrUndefined)(this.parent.eventDragArea)){var h=Ae(r[parseInt(o.toString(),10)])*o;if(this.parent.rowAutoHeight){var d=this.getCursorElement(t);d&&(h=d.classList.contains(ze)?d.offsetTop:d.offsetParent&&d.offsetParent.classList.contains(qt)?d.offsetParent.offsetTop:h)}i.style.top=(0,e.formatUnit)(h)}},i.prototype.appendCloneElement=function(t,i){void 0===i&&(i=null),i=(0,e.isNullOrUndefined)(i)?this.actionObj.clone:i;var n=document.querySelector(this.parent.eventDragArea);this.parent.eventDragArea&&n?n.appendChild(i):t.appendChild(i)},i.prototype.getEventWrapper=function(t,i){var n;if((0,e.isNullOrUndefined)(i)&&(i=this.actionObj.clone.classList.contains(xi)),this.parent.activeViewOptions.timeScale.enable){var r=i?"."+Ei:"."+xt;n=this.parent.element.querySelectorAll(r).item(t)}else{var a=this.parent.element.querySelectorAll("."+ze).item(t);(n=a.querySelector("."+xt))||(n=(0,e.createElement)("div",{className:xt}),a.appendChild(n))}return n},i.prototype.getAllDayEventHeight=function(){var t=(0,e.createElement)("div",{className:qt});this.parent.element.querySelector("."+Ei).appendChild(t);var i=t.offsetHeight;return(0,e.remove)(t),i},i.prototype.isAllowDrop=function(e){if(!this.actionObj.excludeSelectors)return!1;for(var t=!1,i=0,n=this.actionObj.excludeSelectors.split(",");i<n.length;i++){var r=n[i];if(e.target.classList.contains(r)){t=!0;break}}return t},i.prototype.getModuleName=function(){return"dragAndDrop"},i}(Po),Bo=function(){function t(e){this.previousNextAction="next",this.parent=e}return t.prototype.isTimelineView=function(){return-1!==this.parent.currentView.indexOf("Timeline")},t.prototype.getContentRows=function(){return[]},t.prototype.refreshHeader=function(){},t.prototype.refreshResourceHeader=function(){var t=this.element.querySelector("."+ct),i=Array.from(t.querySelectorAll("."+mt));i.forEach((function(t){Array.from(t.children).forEach((function(t){t.classList.contains(ut)||t.classList.contains(gt)||(0,e.remove)(t)}))}));var n=this.parent.resourceBase.renderedResources;if(!(0,e.isNullOrUndefined)(n)&&n.length>0)for(var r=0;r<i.length;r++){var a=i[parseInt(r.toString(),10)],s=n[parseInt(r.toString(),10)];!this.parent.activeView||(0,e.isNullOrUndefined)(a)||(0,e.isNullOrUndefined)(s)||parseInt(a.getAttribute("data-group-index"),10)!==s.groupIndex||this.parent.activeView.setResourceHeaderContent(a,s,lt)}this.parent.renderTemplates(),this.parent.notify(N,{})},t.prototype.getDayName=function(e){return this.parent.getDayNames("abbreviated")[e.getDay()]},t.prototype.getDate=function(e){return this.parent.globalize.formatDate(e,{format:"d",calendar:this.parent.getCalendarMode()})},t.prototype.getTime=function(e){return this.parent.isAdaptive?"HH:mm"===this.parent.activeViewOptions.timeFormat||"HH.mm"===this.parent.activeViewOptions.timeFormat?this.parent.globalize.formatDate(e,{format:"H",calendar:this.parent.getCalendarMode()}):this.parent.globalize.formatDate(e,{skeleton:"h",calendar:this.parent.getCalendarMode()}):this.parent.getTimeString(e)},t.prototype.getTimelineDate=function(e){return xe(this.parent.globalize.formatDate(e,{skeleton:"MMMd",calendar:this.parent.getCalendarMode()})+", "+this.parent.getDayNames("wide")[e.getDay()],"multiple")},t.prototype.createEventTable=function(t){var i=(0,e.createElement)("div",{className:st});return(0,e.append)(this.getEventRows(t),i),i},t.prototype.getEventRows=function(t){for(var i,n=[],r=0;r<t;r++)i=(0,e.createElement)("div",{className:Nt}),this.parent.resourceBase&&!this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.renderedResources&&i.setAttribute("data-group-index",this.parent.resourceBase.renderedResources[parseInt(r.toString(),10)].groupIndex.toString()),n.push(i);return n},t.prototype.collapseRows=function(e){this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(this.parent.resourceBase.hideResourceRows(e.querySelector("tbody")),this.parent.resourceBase.hideResourceRows(e.querySelector("."+st)))},t.prototype.createTableLayout=function(t){var i=t||"",n=(0,e.createElement)("table",{className:Fe+" "+i}),r=(0,e.createElement)("tbody");return n.appendChild(r),n},t.prototype.setAriaAttributes=function(e){e.setAttribute("role","grid"),"Year"!==this.parent.currentView&&e.setAttribute("id",this.parent.element.id+"_table"),e.setAttribute("aria-label",this.getLabelText(this.parent.currentView))},t.prototype.createColGroup=function(t,i){if(!(0,e.isNullOrUndefined)(i)){var n=i.length;i[0]&&i[0].colSpan&&(n=i.map((function(e){return e.colSpan})).reduce((function(e,t){return e+t})));for(var r=(0,e.createElement)("colgroup"),a=0;a<n;a++)r.appendChild((0,e.createElement)("col"));(0,e.prepend)([r],t)}},t.prototype.getScrollXIndent=function(e){return e.offsetHeight-e.clientHeight>0?ye():0},t.prototype.scrollTopPanel=function(e){this.getDatesHeaderElement().firstElementChild.scrollLeft=e.scrollLeft},t.prototype.scrollHeaderLabels=function(t){for(var i=this.element.querySelector(".e-date-header-wrap table"),n=i.offsetWidth/i.querySelectorAll("colgroup col").length,r=function(i,r){for(var a,s=0,o=0,l=r?-t.scrollLeft:t.scrollLeft,p=0,c=i;p<c.length;p++){var h=c[p];if((o+=parseInt(h.getAttribute("colSpan"),10))>Math.floor(l/n)){a=h;break}s+=h.offsetWidth}(0,e.isNullOrUndefined)(a)||(a.children[0].style[r?"right":"left"]=l-s+"px")},a=0,s=[".e-header-year-cell",".e-header-month-cell",".e-header-week-cell",".e-header-cells"];a<s.length;a++){var o=s[a],l=[].slice.call(this.element.querySelectorAll(o));if(l.length>0){for(var p=0,c=l;p<c.length;p++){c[p].children[0].style[this.parent.enableRtl?"right":"left"]=""}r(l,this.parent.enableRtl)}}},t.prototype.addAttributes=function(t,i){t.template&&(0,e.append)(t.template,i),t.colSpan&&i.setAttribute("colspan",t.colSpan.toString()),t.className&&(0,e.addClass)([i],t.className)},t.prototype.getHeaderBarHeight=function(){var e=2;if(this.parent.headerModule&&(e+=De(this.parent.headerModule.getHeaderElement())),this.parent.uiStateValues.isGroupAdaptive){var t=this.parent.element.querySelector("."+kt);t&&(e+=t.offsetHeight)}return e},t.prototype.renderPanel=function(t){t===tt?(0,e.prepend)([this.element],this.parent.element.querySelector("."+qe)):this.parent.element.querySelector("."+qe).appendChild(this.element)},t.prototype.setPanel=function(e){this.element=e},t.prototype.getPanel=function(){return this.element},t.prototype.getDatesHeaderElement=function(){return this.element.querySelector("."+Xe)},t.prototype.getDateSlots=function(e,t){return[]},t.prototype.generateColumnLevels=function(){return[]},t.prototype.getColumnLevels=function(){return this.colLevels},t.prototype.highlightCurrentTime=function(){},t.prototype.getStartDate=function(){return this.renderDates[0]},t.prototype.getEndDate=function(){return this.renderDates[this.renderDates.length-1]},t.prototype.startDate=function(){return this.renderDates[0]},t.prototype.endDate=function(){return pe(this.renderDates[this.renderDates.length-1],1)},t.prototype.getStartHour=function(){var t=this.parent.getStartEndTime(this.parent.activeViewOptions.startHour);return(0,e.isNullOrUndefined)(t)&&(t=new Date(2e3,0,0,0)),t},t.prototype.getEndHour=function(){var t=this.parent.getStartEndTime(this.parent.activeViewOptions.endHour);return(0,e.isNullOrUndefined)(t)&&(t=new Date(2e3,0,0,0)),t},t.prototype.isCurrentDate=function(e){return e.setHours(0,0,0,0)===new Date(this.parent.currentTimezoneDate).setHours(0,0,0,0)},t.prototype.isCurrentMonth=function(e){return this.parent.activeViewOptions.displayDate||this.parent.activeViewOptions.numberOfWeeks>0?this.parent.activeView.getStartDate().getTime()<=this.parent.getCurrentTime().getTime()&&this.parent.activeView.getEndDate().getTime()>=this.parent.getCurrentTime().getTime():e.getFullYear()===this.parent.getCurrentTime().getFullYear()&&e.getMonth()===this.parent.getCurrentTime().getMonth()},t.prototype.isWorkDay=function(t,i){return void 0===i&&(i=this.parent.activeViewOptions.workDays),!(0,e.isNullOrUndefined)(i)&&i.indexOf(t.getDay())>=0},t.prototype.isWorkHour=function(t,i,n,r){return!(0,e.isNullOrUndefined)(i)&&!(0,e.isNullOrUndefined)(n)&&(i.setMilliseconds(0),n.setMilliseconds(0),!(oe(t)<oe(i)||oe(t)>=oe(n)||!this.isWorkDay(t,r)))},t.prototype.getRenderDates=function(e){var t=[];if("Week"===this.parent.currentView||"TimelineWeek"===this.parent.currentView)for(var i=$(se(this.parent.selectedDate),this.parent.activeViewOptions.firstDayOfWeek),n=0,r=Y*this.parent.activeViewOptions.interval;n<r;n++)(this.parent.activeViewOptions.showWeekend||this.isWorkDay(i,e))&&t.push(i),i=pe(i,1);else if("WorkWeek"===this.parent.currentView||"TimelineWorkWeek"===this.parent.currentView){i=$(se(this.parent.selectedDate),this.parent.activeViewOptions.firstDayOfWeek),n=0;for(var a=Y*this.parent.activeViewOptions.interval;n<a;n++)this.isWorkDay(i,e)&&t.push(i),i=pe(i,1)}else{var s="Agenda"===this.parent.currentView?this.parent.agendaDaysCount:this.parent.activeViewOptions.interval;i=se(this.parent.selectedDate);do{(this.parent.activeViewOptions.showWeekend||this.isWorkDay(i,e))&&t.push(i),i=pe(i,1)}while(s!==t.length)}return e||(this.renderDates=t),this.parent.headerModule&&this.parent.headerModule.previousNextIconHandler(),t},t.prototype.getNextPreviousDate=function(e){if(this.previousNextAction=e,"Day"===this.parent.currentView||"TimelineDay"===this.parent.currentView){if(this.parent.activeViewOptions.showWeekend){var t=this.parent.activeViewOptions.interval;return pe(this.parent.selectedDate,"next"===e?t:-t)}var i=void 0;if("next"===e)for(i=pe(this.renderDates.slice(-1)[0],1);!this.isWorkDay(i);)i=pe(i,1);else{i=pe(this.renderDates[0],-1);var n=0;do{this.isWorkDay(i)&&(n+=1),this.parent.activeViewOptions.interval!==n&&(i=pe(i,-1))}while(this.parent.activeViewOptions.interval!==n)}return i}var r="next"===e?Y:-Y;return pe(this.parent.selectedDate,r*this.parent.activeViewOptions.interval)},t.prototype.formatViewLabel=function(e,t,i){var n={type:"date",skeleton:"full",calendar:this.parent.getCalendarMode()};return this.parent.localeObj.getConstant(e)+" "+this.parent.localeObj.getConstant("start")+" "+this.parent.globalize.formatDate(t,n)+" "+this.parent.localeObj.getConstant("endAt")+" "+this.parent.globalize.formatDate(i,n)},t.prototype.getLabelText=function(e){var t=e.charAt(0).toLowerCase()+e.substring(1);return"Year"===e||"TimelineYear"===e?this.formatViewLabel(t,this.parent.activeView.getStartDate(),this.parent.activeView.getEndDate()):this.renderDates.length>0?"Day"===this.parent.currentView||"TimelineDay"===this.parent.currentView?this.parent.localeObj.getConstant(t)+" of "+xe(this.parent.globalize.formatDate(this.parent.selectedDate,{type:"date",skeleton:"full",calendar:this.parent.getCalendarMode()}),"single"):this.formatViewLabel(t,this.renderDates[0],this.renderDates[this.renderDates.length-1]):""},t.prototype.getDateRangeText=function(){if(this.parent.isAdaptive){var e=this.parent.activeViewOptions.dateFormat?this.parent.activeViewOptions.dateFormat:"MMMM y";return xe(this.parent.globalize.formatDate(this.parent.selectedDate,{format:e,calendar:this.parent.getCalendarMode()}),"single")}return this.formatDateRange(this.renderDates[0],this.renderDates[this.renderDates.length-1])},t.prototype.formatDateRange=function(t,i){var n,r=this.parent.globalize,a=this.parent.getCalendarMode();if(t===i&&(i=null),!(0,e.isNullOrUndefined)(this.parent.activeViewOptions.dateFormat)){return xe(i?r.formatDate(t,{format:this.parent.activeViewOptions.dateFormat,calendar:a})+" - "+r.formatDate(i,{format:this.parent.activeViewOptions.dateFormat,calendar:a}):r.formatDate(t,{format:this.parent.activeViewOptions.dateFormat,calendar:a}),"multiple")}if(n=(0,e.isNullOrUndefined)(this.parent.locale)||"en"===this.parent.locale||"en-US"===this.parent.locale?(0,e.getValue)("dateFormats.long",(0,e.getDefaultDateObject)(a)):(0,e.getValue)("main."+this.parent.locale+".dates.calendars."+a+".dateFormats.long",e.cldrData),!i)return xe(r.formatDate(t,{format:n,calendar:a}),"single");var s=n.trim().toLocaleLowerCase();return xe("d"===s.substr(0,1)?t.getFullYear()===i.getFullYear()?t.getMonth()===i.getMonth()?r.formatDate(t,{format:"dd",calendar:a})+" - "+r.formatDate(i,{format:"dd MMMM yyyy",calendar:a}):r.formatDate(t,{format:"dd MMM",calendar:a})+" - "+r.formatDate(i,{format:"dd MMM yyyy",calendar:a}):r.formatDate(t,{format:"dd MMM yyyy",calendar:a})+" - "+r.formatDate(i,{format:"dd MMM yyyy",calendar:a}):"m"===s.substr(0,1)?t.getFullYear()===i.getFullYear()?t.getMonth()===i.getMonth()?r.formatDate(t,{format:"MMMM dd",calendar:a})+" - "+r.formatDate(i,{format:"dd, yyyy",calendar:a}):r.formatDate(t,{format:"MMM dd",calendar:a})+" - "+r.formatDate(i,{format:"MMM dd, yyyy",calendar:a}):r.formatDate(t,{format:"MMM dd, yyyy",calendar:a})+" - "+r.formatDate(i,{format:"MMM dd, yyyy",calendar:a}):r.formatDate(t,{format:n,calendar:a})+" - "+r.formatDate(i,{format:n,calendar:a}),"multiple")},t.prototype.getMobileDateElement=function(t,i){return(0,e.createElement)("div",{className:i,innerHTML:'<div class="e-m-date">'+this.parent.globalize.formatDate(t,{format:"d",calendar:this.parent.getCalendarMode()})+'</div><div class="e-m-day">'+xe(this.parent.globalize.formatDate(t,{format:"E",calendar:this.parent.getCalendarMode()}),"single")+"</div>"})},t.prototype.setResourceHeaderContent=function(t,i,n){if(void 0===n&&(n=zi),this.parent.activeViewOptions.resourceHeaderTemplate){var r={resource:i.resource,resourceData:i.resourceData},a=this.parent.element.id+"_"+this.parent.activeViewOptions.resourceHeaderTemplateName+"resourceHeaderTemplate",s=[].slice.call(this.parent.getResourceHeaderTemplate()(r,this.parent,"resourceHeaderTemplate",a,!1,void 0,void 0,this.parent.root));(0,e.append)(s,t)}else{var o=(0,e.createElement)("div",{className:n});this.parent.sanitize(i.resourceData[i.resource.textField],o),t.appendChild(o)}},t.prototype.renderResourceMobileLayout=function(){this.parent.resourceBase.lastResourceLevel&&this.parent.resourceBase.lastResourceLevel.length<=0||(this.parent.resourceBase.renderResourceHeader(),this.parent.resourceBase.renderResourceTree())},t.prototype.addAutoHeightClass=function(t){!this.parent.uiStateValues.isGroupAdaptive&&this.parent.rowAutoHeight&&this.isTimelineView()&&this.parent.activeViewOptions.group.resources.length>0&&(0,e.addClass)([t],Jn)},t.prototype.getColElements=function(){return[].slice.call(this.element.querySelectorAll("."+Qt+" col, ."+Ge+" col"))},t.prototype.setColWidth=function(t){if(this.isTimelineView()){var i=this.getColElements(),n=Ve(this.element.querySelector("."+We+" tbody"))/(i.length/2);if(t.offsetHeight!==t.clientHeight){var r=this.parent.element.querySelector("."+pt);(0,e.isNullOrUndefined)(r)||r.offsetHeight===t.clientHeight||(0,e.setStyleAttribute)(r,{height:(0,e.formatUnit)(t.clientHeight)})}var a="."+Qe+",."+Tt+",.e-header-week-cell,.e-header-month-cell,.e-header-year-cell";[].slice.call(this.element.querySelectorAll(a)).forEach((function(t){var i=(0,e.isNullOrUndefined)(t.getAttribute("colspan"))?"1":t.getAttribute("colspan"),r=parseInt(i,10);(0,e.setStyleAttribute)(t,{width:(0,e.formatUnit)(n*r)})}))}},t.prototype.resetColWidth=function(){for(var e=0,t=this.getColElements();e<t.length;e++){t[e].style.width=""}},t.prototype.getContentAreaElement=function(){return this.element.querySelector("."+Qt)},t.prototype.wireExpandCollapseIconEvents=function(){if(this.parent.resourceBase&&this.parent.resourceBase.resourceCollection.length>1)for(var t=0,i=[].slice.call(this.element.querySelectorAll("."+vt));t<i.length;t++){var n=i[t];e.EventHandler.clearEvents(n),e.EventHandler.add(n,"click",this.parent.resourceBase.onTreeIconClick,this.parent.resourceBase)}},t.prototype.scrollToDate=function(t){if(-1!==["Month","TimelineMonth"].indexOf(this.parent.currentView)&&!(0,e.isNullOrUndefined)(t)){var i=this.getContentAreaElement(),n=new Date(se(new Date(+t)).getTime()).getTime(),r=i.querySelector("."+ze+'[data-date="'+n+'"]');"Month"===this.parent.currentView&&r&&(i.scrollWidth>i.clientWidth&&(this.parent.enableRtl?i.scrollLeft=-(this.parent.getContentTable().offsetWidth-r.offsetLeft-r.offsetWidth):i.scrollLeft=r.offsetLeft),i.scrollTop=r.offsetTop),"TimelineMonth"===this.parent.currentView&&r&&(this.parent.enableRtl?i.scrollLeft=-(this.parent.getContentTable().offsetWidth-r.offsetLeft-r.offsetWidth):i.scrollLeft=r.offsetLeft)}},t.prototype.setPersistence=function(){if(this.parent.enablePersistence){var t=this.element.querySelector(".e-content-wrap");(0,e.isNullOrUndefined)(t)||(this.parent.scrollLeft=t.scrollLeft,this.parent.scrollTop=t.scrollTop)}},t.prototype.retainScrollPosition=function(){if(this.parent.enablePersistence){var t=this.parent.element.querySelector(".e-content-wrap");(0,e.isNullOrUndefined)(t)||(0,e.isNullOrUndefined)(this.parent.scrollLeft)||(0,e.isNullOrUndefined)(this.parent.scrollTop)||(t.scrollTop=this.parent.scrollTop,t.scrollLeft=this.parent.scrollLeft)}},t.prototype.getViewStartDate=function(){var e=this.renderDates[0];return this.parent.activeViewOptions.group.resources.length>0&&this.parent.resourceBase.lastResourceLevel.length>0&&(e=this.parent.resourceBase.getResourceRenderDates()[0]),e},t.prototype.getViewEndDate=function(){var e=pe(this.renderDates[this.renderDates.length-1],1);return this.parent.activeViewOptions.group.resources.length>0&&this.parent.resourceBase.lastResourceLevel.length>0&&(e=pe(this.parent.resourceBase.getResourceRenderDates().slice(-1)[0],1)),e},t.prototype.getAdjustedDate=function(e){return!this.parent.activeViewOptions.timeScale.enable||"Month"===this.parent.currentView||"TimelineYear"===this.parent.currentView&&0===this.parent.activeViewOptions.group.resources.length?new Date(e.setHours(0,0,0,0)):"TimelineYear"===this.parent.currentView&&this.parent.activeViewOptions.group.resources.length>0?(e.setHours(0,0,0,0),new Date(e.setDate(1))):null},t.prototype.resetColLevels=function(){this.parent.resourceBase.expandedResources=[];for(var e=this.parent.virtualScrollModule.getRenderedCount(),t=this.parent.activeViewOptions.group.byDate?this.colLevels[0]:this.parent.resourceBase.renderedResources,i=0,n=0;n<t.length&&!(i>=e);n++)i+=t[parseInt(n.toString(),10)].colSpan,this.parent.resourceBase.expandedResources.push(t[parseInt(n.toString(),10)]);this.parent.activeViewOptions.group.byDate?(this.colLevels[0]=this.parent.resourceBase.expandedResources,this.parent.virtualScrollModule.setRenderedDates(this.parent.resourceBase.expandedResources)):(this.colLevels[this.colLevels.length-2]=this.parent.resourceBase.expandedResources,this.parent.resourceBase.renderedResources=this.parent.resourceBase.expandedResources),"Month"!==this.parent.currentView&&(this.colLevels[this.colLevels.length-1]=this.colLevels[this.colLevels.length-1].slice(0,i),this.parent.resourceBase.expandedResources=this.colLevels[this.colLevels.length-1])},t.prototype.destroy=function(){this.element&&this.element.parentNode&&(0,e.remove)(this.element),this.element=null,this.renderDates=null,this.colLevels=null},t}(),Wo=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),zo=function(t){function i(e){var i=t.call(this,e)||this;return i.viewClass="e-day-view",i.isInverseTableSelect=!0,i.baseCssClass="e-vertical-view",i.appointment=null,i}return Wo(i,t),i.prototype.getModuleName=function(){return"verticalView"},i.prototype.addEventListener=function(){this.parent.on(U,this.scrollUiUpdate,this),this.parent.on(j,this.renderEvents,this)},i.prototype.removeEventListener=function(){this.parent&&(this.parent.off(U,this.scrollUiUpdate),this.parent.off(j,this.renderEvents))},i.prototype.renderEvents=function(){this.appointment=this.parent.activeViewOptions.timeScale.enable?new wa(this.parent):new ba(this.parent),this.appointment.renderAppointments(),this.parent.notify(L,{})},i.prototype.onContentScroll=function(t){this.parent.removeNewEventElement();var i=t.target;this.parent.notify(F,t),this.scrollLeftPanel(i),this.scrollTopPanel(i),this.parent.isAdaptive||(this.parent.uiStateValues.top=i.scrollTop),this.parent.uiStateValues.left=i.scrollLeft,(0,e.isNullOrUndefined)(this.parent.quickPopup)||this.parent.uiStateValues.isTapHold||this.parent.quickPopup.quickPopupHide(),this.setPersistence()},i.prototype.onAdaptiveMove=function(e){this.parent.uiStateValues.action&&e.preventDefault()},i.prototype.onAdaptiveScroll=function(e){this.parent&&!this.parent.isDestroyed&&(this.parent.removeNewEventElement(),this.parent.uiStateValues.top=e.target.scrollTop)},i.prototype.scrollLeftPanel=function(t){var i=this.getLeftPanelElement();(0,e.isNullOrUndefined)(i)||(i.scrollTop=t.scrollTop)},i.prototype.scrollUiUpdate=function(t){if(this.parent){var i=this.parent.element.querySelector("."+Ge),n=this.getHeaderBarHeight(),r=this.getLeftPanelElement(),a=this.getScrollableElement(),s=this.getDatesHeaderElement(),o=this.parent.element.offsetHeight-n-s.offsetHeight;this.setContentHeight(a,r,o),this.setColWidth(a);var l=ye();s.firstElementChild.style[t.cssProperties.rtlBorder]="",s.style[t.cssProperties.rtlPadding]="";var p=!this.parent.enableAllDayScroll||!(a.offsetWidth-a.clientWidth<=i.offsetWidth-i.clientWidth&&i.classList.contains("e-all-day-scroll"));a.offsetWidth-a.clientWidth>0&&p?(s.firstElementChild.style[t.cssProperties.border]=l>0?"1px":"0px",s.style[t.cssProperties.padding]=l>0?l-1+"px":"0px"):(s.firstElementChild.style[t.cssProperties.border]="",s.style[t.cssProperties.padding]=""),t.isPreventScrollUpdate||(this.parent.uiStateValues.isInitial?(this.parent.currentView.indexOf("Timeline")>-1&&(a.scrollTop=this.parent.uiStateValues.top),this.scrollToWorkHour(),this.parent.uiStateValues.isInitial=!1):(r&&(r.scrollTop=this.parent.uiStateValues.top),a.scrollTop=this.parent.uiStateValues.top,a.scrollLeft=this.parent.uiStateValues.left)),this.parent.activeViewOptions.timeScale.enable&&this.highlightCurrentTime(),this.retainScrollPosition(),(0,e.isNullOrUndefined)(r)||(0,e.isNullOrUndefined)(a)||r.scrollTop===a.scrollTop||(r.scrollTop=a.scrollTop)}},i.prototype.setContentHeight=function(t,i,n){this.parent.isAdaptive&&!this.isTimelineView()||(0,e.isNullOrUndefined)(i)||(i.style.height="auto"===this.parent.height?"auto":(0,e.formatUnit)(n-this.getScrollXIndent(t))),t.style.height="auto"===this.parent.height?"auto":(0,e.formatUnit)(n)},i.prototype.scrollToWorkHour=function(){if(this.parent.workHours.highlight){var e=this.element.querySelector("."+Ye);e&&(this.getScrollableElement().scrollTop=e.offsetTop,this.parent.uiStateValues.top=e.offsetTop,this.parent.uiStateValues.left=0)}},i.prototype.scrollToHour=function(t,i){var n=this.parent.getStartEndTime(t);if(!(0,e.isNullOrUndefined)(i)){var r=this.element.querySelector("."+Qe+'[data-date="'+new Date(se(i)).getTime()+'"]');if(r)if(this.parent.enableRtl){var a=this.element.querySelector("."+We);this.getScrollableElement().scrollLeft=-(a.offsetWidth-r.offsetLeft-r.offsetWidth)}else this.getScrollableElement().scrollLeft=r.offsetLeft}(0,e.isNullOrUndefined)(n)||(this.getScrollableElement().scrollTop=this.getTopFromDateTime(n))},i.prototype.scrollToDate=function(e){this.scrollToHour(null,e)},i.prototype.generateColumnLevels=function(){var e=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays),t=[];if(this.parent.activeViewOptions.group.resources.length>0){if(t=this.parent.resourceBase.generateResourceLevels(e),this.parent.activeViewOptions.group.hideNonWorkingDays)for(;0===t[0].length;)this.parent.setProperties({selectedDate:this.parent.activeView.getNextPreviousDate(this.previousNextAction)},!0),this.parent.activeView.getRenderDates(),this.parent.headerModule&&(this.parent.headerModule.setCalendarDate(this.parent.selectedDate),this.parent.headerModule.updateDateRange()),e=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays),t=this.parent.resourceBase.generateResourceLevels(e);if(this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.lastResourceLevel.length>0){var i=this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex],n=i.resourceData[i.resource.startHourField],r=i.resourceData[i.resource.endHourField];t=[this.getDateSlots(i.renderDates,i.workDays,n,r)]}}else t.push(e);return this.colLevels=t,t},i.prototype.getDateSlots=function(e,t,i,n){void 0===i&&(i=this.parent.workHours.start),void 0===n&&(n=this.parent.workHours.end);for(var r=[],a=this.parent.getStartEndTime(i),s=this.parent.getStartEndTime(n),o=0,l=e;o<l.length;o++){var p=l[o],c=[Qe];this.isCurrentDate(p)&&c.push(Je),r.push({date:p,type:"dateHeader",className:c,colSpan:1,workDays:t,startHour:new Date(+a),endHour:new Date(+s)})}return r},i.prototype.isWorkHourRange=function(e){return this.getStartHour().getTime()<=e.getTime()&&this.getEndHour().getTime()>=e.getTime()},i.prototype.highlightCurrentTime=function(){var t=this;if(!(this.parent.activeViewOptions.headerRows.length>0&&"Hour"!==this.parent.activeViewOptions.headerRows.slice(-1)[0].option)){var i=this.parent.getCurrentTime();if(this.parent.showTimeIndicator&&this.isWorkHourRange(i))if(this.getCurrentTimeIndicatorIndex().length>0){if([].slice.call(this.element.querySelectorAll("."+ze)).length>0&&this.changeCurrentTimePosition(),(0,e.isNullOrUndefined)(this.currentTimeIndicatorTimer)){var n=X-(1e3*i.getSeconds()+i.getMilliseconds());n<=X-1e3&&window.setTimeout((function(){(0,e.isNullOrUndefined)(t.currentTimeIndicatorTimer)||(t.clearCurrentTimeIndicatorTimer(),t.changeCurrentTimePosition(),t.updateCurrentTimeIndicatorTimer())}),n),this.updateCurrentTimeIndicatorTimer()}}else this.clearCurrentTimeIndicatorTimer();else this.clearCurrentTimeIndicatorTimer()}},i.prototype.getCurrentTimeIndicatorIndex=function(){var t=[];if(!(0,e.isNullOrUndefined)(this.parent.resourceBase)&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var i=0,n=se(this.parent.getCurrentTime());if(this.parent.virtualScrollModule&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.activeViewOptions.group.byDate)for(var r=0,a=this.parent.resourceBase.expandedResources;r<a.length;r++){se((l=a[r]).date).getTime()===n.getTime()&&t.push(i),i+=1}else for(var s=0,o=this.parent.resourceBase.renderedResources;s<o.length;s++){var l=o[s];if((c=this.parent.getIndexOfDate(l.renderDates,n))>=0){var p=this.parent.activeViewOptions.group.byDate?this.parent.resourceBase.lastResourceLevel.length*c+i:i+c;t.push(p)}i+=this.parent.activeViewOptions.group.byDate?1:l.renderDates.length}}else{var c,h=this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.lastResourceLevel.length>0?this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex].renderDates:this.renderDates;(c=this.parent.getIndexOfDate(h,se(this.parent.getCurrentTime())))>=0&&t.push(c)}return t},i.prototype.clearCurrentTimeIndicatorTimer=function(){(0,e.isNullOrUndefined)(this.currentTimeIndicatorTimer)||(window.clearInterval(this.currentTimeIndicatorTimer),this.currentTimeIndicatorTimer=null,this.removeCurrentTimeIndicatorElements())},i.prototype.updateCurrentTimeIndicatorTimer=function(){var e=this;this.currentTimeIndicatorTimer=window.setInterval((function(){e.changeCurrentTimePosition()}),X)},i.prototype.removeCurrentTimeIndicatorElements=function(){for(var t="."+St+",."+bt+",."+Dt,i=0,n=[].slice.call(this.element.querySelectorAll(t));i<n.length;i++){var r=n[i];(0,e.remove)(r)}},i.prototype.changeCurrentTimePosition=function(){if(!(!this.parent||this.parent&&this.parent.isDestroyed)){this.removeCurrentTimeIndicatorElements();var t=this.getCurrentTimeIndicatorIndex(),i=this.parent.getContentTable().rows[0],n=this.getTopFromDateTime(this.parent.getCurrentTime()),r=(0,e.formatUnit)(n),a=Math.floor(n/i.cells[0].offsetHeight),s=this.getLeftPanelElement(),o=[].slice.call(s.querySelectorAll("tr"));if(!(0,e.isNullOrUndefined)(a)&&!isNaN(a)&&a!==o.length){for(var l=[].slice.call(this.element.querySelectorAll("."+Et)),p=0,c=t[0];p<c;p++)l[parseInt(p.toString(),10)].appendChild((0,e.createElement)("div",{className:St,styles:"top:"+r}));for(var h=0,d=t;h<d.length;h++){var u=d[h];l[parseInt(u.toString(),10)].appendChild((0,e.createElement)("div",{className:bt,styles:"top:"+r}))}var g=(0,e.createElement)("div",{innerHTML:this.parent.getTimeString(this.parent.getCurrentTime()),className:Dt,styles:"top:"+r});a<=o.length&&((0,e.removeClass)(s.querySelectorAll("."+Ct),Ct),o[parseInt(a.toString(),10)]&&(0,e.addClass)([o[parseInt(a.toString(),10)].lastElementChild],Ct),(0,e.prepend)([g],s),g.style.top=(0,e.formatUnit)(g.offsetTop-g.offsetHeight/2))}}},i.prototype.getTopFromDateTime=function(e){var t=this.getStartHour();return(60*(e.getHours()-t.getHours())+(e.getMinutes()-t.getMinutes()))*this.getWorkCellHeight()*this.parent.activeViewOptions.timeScale.slotCount/this.parent.activeViewOptions.timeScale.interval},i.prototype.getWorkCellHeight=function(){return parseFloat(Ae(this.element.querySelector("."+ze)).toFixed(2))},i.prototype.getTdContent=function(t,i,n){var r,a=(0,e.createElement)("div"),s="",o=this.parent.element.id+"_";switch(i){case"dateHeader":if(this.parent.activeViewOptions.dateHeaderTemplate){s="dateHeaderTemplate";var l={date:t,type:i},p=this.parent.activeViewOptions.dateHeaderTemplateName;r=[].slice.call(this.parent.getDateHeaderTemplate()(l,this.parent,s,o+p+s,!1,void 0,void 0,this.parent.root))}else a.innerHTML=this.parent.activeView.isTimelineView()?'<span class="e-header-date e-navigate">'+this.getTimelineDate(t)+"</span>":'<div class="e-header-day">'+xe(this.getDayName(t),"single")+'</div><div class="e-header-date e-navigate" role="link">'+this.getDate(t)+"</div>",r=[].slice.call(a.childNodes);break;case"majorSlot":if(this.parent.activeViewOptions.timeScale.majorSlotTemplate){s="majorSlotTemplate";l={date:t,type:i};r=[].slice.call(this.parent.getMajorSlotTemplate()(l,this.parent,s,o+s,!1,void 0,void 0,this.parent.root))}else a.innerHTML="<span>"+this.getTime(t)+"</span>",r=[].slice.call(a.childNodes);break;case"minorSlot":if(this.parent.activeViewOptions.timeScale.minorSlotTemplate){s="minorSlotTemplate";l={date:t,type:i};r=[].slice.call(this.parent.getMinorSlotTemplate()(l,this.parent,s,o+s,!1,void 0,void 0,this.parent.root))}else r=[].slice.call(a.childNodes);break;case"alldayCells":if(this.parent.activeViewOptions.cellTemplate){p=this.parent.activeViewOptions.cellTemplateName;s="cellTemplate";l={date:t,type:i,groupIndex:n};r=[].slice.call(this.parent.getCellTemplate()(l,this.parent,s,o+p+s,!1,void 0,void 0,this.parent.root))}}return r},i.prototype.refreshHeader=function(){(0,e.remove)(this.element.querySelector("tbody tr")),this.renderHeader(),this.parent.notify(N,{});var t=this.element.querySelector("."+Ge);t&&(t.scrollLeft=this.parent.uiStateValues.left)},i.prototype.renderLayout=function(t){this.setPanel((0,e.createElement)("div",{className:Gt}));var i=[this.baseCssClass,this.viewClass];i.push(t),this.parent.activeViewOptions.group.byDate&&i.push("e-by-date"),this.parent.activeViewOptions.timeScale.enable||(0,e.addClass)([this.element],["e-timescale-disable",this.viewClass]),this.parent.activeViewOptions.allowVirtualScrolling&&!this.parent.uiStateValues.isGroupAdaptive&&i.push(Kn),this.parent.rowAutoHeight&&this.parent.eventSettings.ignoreWhitespace&&i.push($n),this.renderPanel(t),(0,e.addClass)([this.element],i),this.element.appendChild(this.createTableLayout(Xt)),this.element.querySelector("table").setAttribute("role","presentation"),this.colLevels=this.generateColumnLevels(),this.renderHeader(),this.renderContent(),this.parent.uiStateValues.isGroupAdaptive&&!this.parent.element.querySelector("."+It)&&this.renderResourceMobileLayout(),this.parent.notify(N,{})},i.prototype.renderHeader=function(){var t=(0,e.createElement)("tr"),i=(0,e.createElement)("td");if(i.appendChild(this.renderDatesHeader()),this.parent.activeViewOptions.timeScale.enable){var n=(0,e.createElement)("td",{className:rt});n.appendChild(this.renderLeftIndent()),t.appendChild(n)}t.appendChild(i),(0,e.prepend)([t],this.element.querySelector("tbody"))},i.prototype.renderContent=function(){this.parent.activeViewOptions.group.resources.length>0&&(this.parent.resourceBase.renderedResources=(0,e.extend)([],this.parent.resourceBase.lastResourceLevel,null,!0));var t=(0,e.createElement)("tr"),i=(0,e.createElement)("td");if(this.parent.isAdaptive){i.setAttribute("colspan",this.parent.activeViewOptions.timeScale.enable?"2":"1");var n=(0,e.createElement)("div",{className:Ot});this.parent.activeViewOptions.timeScale.enable&&n.appendChild(this.renderTimeCells()),n.appendChild(this.renderContentArea()),i.appendChild(n),e.EventHandler.add(n,"scroll",this.onAdaptiveScroll,this),e.EventHandler.add(n,e.Browser.touchMoveEvent,this.onAdaptiveMove,this),t.appendChild(i)}else{var r=this.colLevels.slice(0);this.parent.virtualScrollModule&&this.resetColLevels();var a=this.renderContentArea();if(i.appendChild(a),this.parent.activeViewOptions.timeScale.enable){var s=(0,e.createElement)("td");s.appendChild(this.renderTimeCells()),t.appendChild(s)}t.appendChild(i),this.parent.virtualScrollModule&&(this.colLevels=r,this.parent.virtualScrollModule.renderVirtualTrack(a))}this.element.querySelector("tbody").appendChild(t)},i.prototype.renderLeftIndent=function(){for(var t,i=(0,e.createElement)("div",{className:at}),n=this.createTableLayout(),r=(0,e.createElement)("tr"),a=this.colLevels.length,s=0;s<a;s++){var o=r.cloneNode(),l={className:[this.colLevels[parseInt(s.toString(),10)][0]&&this.colLevels[parseInt(s.toString(),10)][0].className[0]],type:"emptyCells"};if(this.parent.activeViewOptions.showWeekNumber&&-1!==l.className.indexOf(Qe)){l.className.push(Pt);var p=this.parent.getWeekNumberContent(this.renderDates);l.template=[(0,e.createElement)("span",{innerHTML:""+p,attrs:{title:this.parent.localeObj.getConstant("week")+" "+p}})]}t=this.createTd(l),this.parent.renderHeaderIndentTemplate(l,t),o.appendChild(t),n.querySelector("tbody").appendChild(o)}var c=r.cloneNode(),h=(0,e.createElement)("div",{attrs:{tabindex:"0",role:"list",title:this.parent.localeObj.getConstant("expandAllDaySection"),"aria-disabled":"false","aria-label":this.parent.localeObj.getConstant("expandAllDaySection")},className:Ii+" "+Mi+" "+je+" "+Ne}),d={className:[Ue],type:"emptyCells"};return(t=this.createTd(d)).appendChild(h),this.parent.renderHeaderIndentTemplate(d,t),c.appendChild(t),n.querySelector("tbody").appendChild(c),i.appendChild(n),i},i.prototype.renderDatesHeader=function(){var t=(0,e.createElement)("div",{className:Xe}),i=(0,e.createElement)("div",{className:Ge});t.appendChild(i);for(var n=this.createTableLayout(),r=(0,e.createElement)("tr",{className:Oi}),a=this.colLevels.length,s=this.colLevels[a-1],o=0;o<a;o++){for(var l=r.cloneNode(),p=this.colLevels[parseInt(o.toString(),10)],c=0;c<p.length;c++)l.appendChild(this.createTd(p[parseInt(c.toString(),10)]));n.querySelector("tbody").appendChild(l)}return this.createAllDayRow(n,s),this.createColGroup(n,s),i.appendChild(n),t},i.prototype.createAllDayRow=function(t,i){for(var n=(0,e.createElement)("tr",{className:Be}),r=0;r<i.length;r++){var a=(0,e.extend)({},i[parseInt(r.toString(),10)]);a.className=[Ue],a.type="alldayCells";var s=this.createTd(a);s.setAttribute("data-date",a.date.getTime().toString()),(0,e.isNullOrUndefined)(a.groupIndex)?this.parent.uiStateValues.isGroupAdaptive&&s.setAttribute("data-group-index",""+this.parent.uiStateValues.groupIndex):s.setAttribute("data-group-index",""+a.groupIndex),this.wireCellEvents(s),n.appendChild(s)}t.querySelector("tbody").appendChild(n);var o=(0,e.createElement)("thead");o.appendChild(this.parent.eventBase.createEventWrapper("allDay")),(0,e.prepend)([o],t)},i.prototype.createTd=function(t){var i=(0,e.createElement)("td");if(this.addAttributes(t,i),t.date&&t.type){var n=this.getTdContent(t.date,t.type,t.groupIndex);n&&n.length&&(0,e.append)(n,i)}this.parent.isMinMaxDate(se(new Date(""+t.date)))||(0,e.addClass)([i],qn),"resourceHeader"===t.type&&this.setResourceHeaderContent(i,t),"dateHeader"===t.type&&t.className.indexOf(Qe)>=0&&(i.setAttribute("data-date",t.date.getTime().toString()),(0,e.isNullOrUndefined)(t.groupIndex)||i.setAttribute("data-group-index",""+t.groupIndex),this.wireMouseEvents(i));var r={elementType:t.type,element:i,date:t.date,groupIndex:t.groupIndex};return this.parent.trigger(v,r),i},i.prototype.wireCellEvents=function(t){e.EventHandler.add(t,"mousedown",this.parent.workCellAction.cellMouseDown,this.parent.workCellAction),this.wireMouseEvents(t)},i.prototype.wireMouseEvents=function(t){e.EventHandler.add(t,"click",this.parent.workCellAction.cellClick,this.parent.workCellAction),this.parent.isAdaptive||e.EventHandler.add(t,"dblclick",this.parent.workCellAction.cellDblClick,this.parent.workCellAction)},i.prototype.renderTimeCells=function(){var t=this,i=(0,e.createElement)("div",{className:ft}),n=this.createTableLayout(),r=(0,e.createElement)("tr");return this.getTimeSlotRows((function(e){e.type=e.first?"majorSlot":"minorSlot",e.className=e.last?[yt,Tt]:[Tt];var i=r.cloneNode(),a={date:e.date,type:e.type,className:e.className};return i.appendChild(t.createTd(a)),n.querySelector("tbody").appendChild(i),e})),i.appendChild(n),i},i.prototype.renderContentArea=function(){var t=(0,e.createElement)("div",{className:Qt}),i=this.createTableLayout(We);return this.setAriaAttributes(i),this.addAutoHeightClass(i),this.renderContentTable(i),this.createColGroup(i,this.colLevels.slice(-1)[0]),t.appendChild(i),this.wireCellEvents(i.querySelector("tbody")),e.EventHandler.add(t,"scroll",this.onContentScroll,this),e.EventHandler.add(t,e.Browser.touchMoveEvent,this.onAdaptiveMove,this),t},i.prototype.renderContentTable=function(t){var i=t.querySelector("tbody");(0,e.append)(this.getContentRows(),i),this.renderContentTableHeader(t)},i.prototype.getContentRows=function(){var t=this,i=[],n=(0,e.createElement)("tr"),r=(0,e.createElement)("td",{attrs:{"aria-selected":"false"}});return this.getTimeSlotRows((function(e){for(var a=n.cloneNode(),s=0,o=t.colLevels[t.colLevels.length-1];s<o.length;s++){var l=o[s],p=t.createContentTd(l,e,r);a.appendChild(p)}return i.push(a),e})),i},i.prototype.createContentTd=function(t,i,n){var r=n.cloneNode();t.colSpan&&r.setAttribute("colspan",t.colSpan.toString());var a=this.getContentTdClass(i),s=se(t.date);this.parent.isMinMaxDate(s)||a.push(qn),s=new Date(s.setHours(i.date.getHours(),i.date.getMinutes(),i.date.getSeconds(),i.date.getMilliseconds()));var o="workCells";if(-1!==t.className.indexOf(dt)&&(a.push(ot),o="resourceGroupCells"),this.parent.workHours.highlight&&(this.parent.activeViewOptions.timeScale.enable&&this.isWorkHour(s,t.startHour,t.endHour,t.workDays)||!this.parent.activeViewOptions.timeScale.enable&&this.isWorkDay(s,t.workDays))&&a.push(Ye),(0,e.addClass)([r],a),this.parent.activeViewOptions.cellTemplate){var l={date:s,type:o,groupIndex:t.groupIndex},p=this.parent.element.id+"_"+this.parent.activeViewOptions.cellTemplateName+"cellTemplate",c=[].slice.call(this.parent.getCellTemplate()(l,this.parent,"cellTemplate",p,!1,void 0,void 0,this.parent.root));(0,e.append)(c,r)}r.setAttribute("data-date",s.getTime().toString());var h="full";if(this.parent.activeViewOptions.timeScale.enable){var d=this.parent.globalize.formatDate(s,{type:"dateTime",skeleton:h,calendar:this.parent.getCalendarMode()}),u=this.parent.globalize.formatDate(this.getEndDateFromStartDate(s),{type:"dateTime",skeleton:h,calendar:this.parent.getCalendarMode()});r.setAttribute("aria-label",d+" "+this.parent.localeObj.getConstant("endAt")+" "+u)}else{var g=this.parent.globalize.formatDate(t.date,{skeleton:h,calendar:this.parent.getCalendarMode()});r.setAttribute("aria-label",g)}if(!(0,e.isNullOrUndefined)(t.groupIndex)||this.parent.uiStateValues.isGroupAdaptive){var m=this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:t.groupIndex;r.setAttribute("data-group-index",""+m)}var f={elementType:o,element:r,date:s,groupIndex:t.groupIndex};return this.parent.trigger(v,f),r},i.prototype.getContentTdClass=function(e){return e.last?[ze]:[ze,wt]},i.prototype.renderContentTableHeader=function(t){var i=(0,e.createElement)("thead");i.appendChild(this.parent.eventBase.createEventWrapper()),this.parent.activeViewOptions.timeScale.enable&&i.appendChild(this.parent.eventBase.createEventWrapper("timeIndicator")),(0,e.prepend)([i],t)},i.prototype.getScrollableElement=function(){return this.parent.isAdaptive&&!this.isTimelineView()?this.element.querySelector("."+Ot):this.getContentAreaElement()},i.prototype.getLeftPanelElement=function(){return this.element.querySelector("."+ft)},i.prototype.getEndDateFromStartDate=function(e){var t=this.parent.activeViewOptions.timeScale.interval*X/this.parent.activeViewOptions.timeScale.slotCount,i=new Date(e.getTime());return i.setMilliseconds(i.getMilliseconds()+t),i},i.prototype.getStartEndHours=function(t){if(!(0,e.isNullOrUndefined)(t)&&""!==t){var i=new Date(2e3,0,0,0),n=t.split(":");return 2===n.length&&i.setHours(parseInt(n[0],10),parseInt(n[1],10),0),i}return new Date(2e3,0,0,0)},i.prototype.getTimeSlotRows=function(e){var t=[],i=this.getStartEndHours(this.parent.activeViewOptions.startHour),n=this.getStartEndHours(this.parent.activeViewOptions.endHour),r=this.parent.activeViewOptions.timeScale.interval*X,a=r/this.parent.activeViewOptions.timeScale.slotCount,s=Math.round(G/a),o=i.getTime(),l=n.getTime();if(o!==l){var p=i.getTimezoneOffset()!==n.getTimezoneOffset()?l-o-36e5:l-o;s=Math.round(p/a)}this.parent.activeViewOptions.timeScale.enable||(s=1);for(var c=this.parent.getStartEndTime(this.parent.workHours.start),h=this.parent.getStartEndTime(this.parent.workHours.end),d=0;d<s;d++){var u=new Date(o+a*d);if(Se(u)||new Date(o).getTimezoneOffset()!==u.getTimezoneOffset()){var g=new Date(o).getTimezoneOffset()-u.getTimezoneOffset();u=new Date(u.getTime()-6e4*g)}var v=d%(r/a),m={date:new Date(""+u),startHour:c,endHour:h,first:0===v,middle:v<this.parent.activeViewOptions.timeScale.slotCount-1,last:v===this.parent.activeViewOptions.timeScale.slotCount-1,type:""};e&&e(m),t.push(m)}return t},i.prototype.getAdjustedDate=function(e){if(!this.parent.activeViewOptions.timeScale.enable)return new Date(e.setHours(0,0,0,0));for(var t=this.getTimeSlotRows(),i=new Date(new Date(t[0].date.getTime()).setHours(e.getHours(),e.getMinutes(),e.getMilliseconds())),n=0;n<t.length;n++)if(t[parseInt(n.toString(),10)].date.getTime()>i.getTime())return e.setHours(t[n-1].date.getHours(),t[n-1].date.getMinutes(),t[n-1].date.getMilliseconds()),new Date(e);return null},i.prototype.destroy=function(){if(!(!this.parent||this.parent&&this.parent.isDestroyed)&&(this.clearCurrentTimeIndicatorTimer(),this.element)){this.appointment&&(this.appointment.destroy(),this.appointment=null);var i=this.getContentAreaElement();i&&(e.EventHandler.remove(i,"scroll",this.onContentScroll),e.EventHandler.remove(i,e.Browser.touchMoveEvent,this.onAdaptiveMove)),this.parent.resourceBase&&this.parent.resourceBase.destroy(),this.parent.scheduleTouchModule&&this.parent.scheduleTouchModule.resetValues(),t.prototype.destroy.call(this)}},i}(Bo),Yo=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_o=function(e){function t(t){var i=e.call(this,t)||this;return i.viewClass="e-day-view",i}return Yo(t,e),t.prototype.getModuleName=function(){return"day"},t}(zo),Go=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Xo=function(e){function t(t){var i=e.call(this,t)||this;return i.viewClass="e-week-view",i}return Go(t,e),t.prototype.startDate=function(){return this.getViewStartDate()},t.prototype.endDate=function(){return this.getViewEndDate()},t.prototype.getModuleName=function(){return"week"},t}(zo),Qo=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ko=function(e){function t(t){var i=e.call(this,t)||this;return i.viewClass="e-work-week-view",i}return Qo(t,e),t.prototype.startDate=function(){return this.getViewStartDate()},t.prototype.endDate=function(){return this.getViewEndDate()},t.prototype.getModuleName=function(){return"workWeek"},t}(zo),Zo=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Jo=function(t){function i(e){var i=t.call(this,e)||this;return i.dayNameFormat="wide",i.viewClass="e-month-view",i.isInverseTableSelect=!1,i.monthEvent=null,i.monthDates={},i}return Zo(i,t),i.prototype.addEventListener=function(){this.parent.on(U,this.onScrollUIUpdate,this),this.parent.on(j,this.onDataReady,this),this.parent.on(r,this.onCellClick,this)},i.prototype.removeEventListener=function(){this.parent&&(this.parent.off(U,this.onScrollUIUpdate),this.parent.off(j,this.onDataReady),this.parent.off(r,this.onCellClick))},i.prototype.onDataReady=function(e){this.monthEvent=new ba(this.parent),this.monthEvent.renderAppointments(),this.parent.notify(L,{})},i.prototype.onCellClick=function(e){},i.prototype.onContentScroll=function(e){this.parent.removeNewEventElement(),this.parent.notify(F,e),this.scrollTopPanel(e.target),this.scrollLeftPanel(e.target),this.parent.uiStateValues.top=e.target.scrollTop,this.parent.uiStateValues.left=e.target.scrollLeft,this.setPersistence()},i.prototype.scrollLeftPanel=function(e){var t=this.getLeftPanelElement();t&&(t.scrollTop=e.scrollTop)},i.prototype.getLeftPanelElement=function(){return this.element.querySelector("."+Ht)},i.prototype.onScrollUIUpdate=function(e){var t=this.getHeaderBarHeight(),i=this.getDatesHeaderElement(),n=this.getContentAreaElement(),r=this.parent.element.offsetHeight-t-i.offsetHeight,a=this.getLeftPanelElement();"auto"!==this.parent.height&&this.setContentHeight(n,a,r);var s=ye();if(i.firstElementChild.style[e.cssProperties.rtlBorder]="",i.style[e.cssProperties.rtlPadding]="",n.offsetWidth-n.clientWidth>0?(i.firstElementChild.style[e.cssProperties.border]=s>0?"1px":"0px",i.style[e.cssProperties.padding]=s>0?s-1+"px":"0px"):(i.firstElementChild.style[e.cssProperties.border]="",i.style[e.cssProperties.padding]=""),this.setColWidth(n),e.scrollPosition||!e.isPreventScrollUpdate&&"TimelineMonth"===this.parent.currentView){var o="TimelineMonth"===this.parent.currentView?this.parent.uiStateValues.top:e.scrollPosition.top;a&&(a.scrollTop=o),n.scrollTop=o,this.parent.uiStateValues.isInitial?(this.scrollToSelectedDate(),this.parent.uiStateValues.isInitial=!1):n.scrollLeft="TimelineMonth"===this.parent.currentView?this.parent.uiStateValues.left:e.scrollPosition.left}else this.scrollToSelectedDate();this.retainScrollPosition()},i.prototype.scrollToSelectedDate=function(){var t=this.element.querySelector("."+Qe+'[data-date="'+this.parent.selectedDate.getTime().toString()+'"]'),i=this.getContentAreaElement();(0,e.isNullOrUndefined)(t)?i.scrollLeft=0:i.scrollLeft=this.parent.enableRtl?-(this.parent.getContentTable().offsetWidth-t.offsetLeft-t.offsetWidth):t.offsetLeft,0===i.scrollLeft&&this.parent.uiStateValues.isInitial&&(this.parent.uiStateValues.left=0)},i.prototype.setContentHeight=function(t,i,n){t.style.height="auto","Month"===this.parent.currentView&&(t.style.height=(0,e.formatUnit)(n)),i&&("MonthAgenda"===this.parent.currentView&&(n=this.parent.activeViewOptions.interval>1?this.getContentAreaElement().firstElementChild.offsetHeight:this.element.querySelector("."+We).offsetHeight),i.style.height="auto",i.style.height=(0,e.formatUnit)(n-this.getScrollXIndent(t)))},i.prototype.generateColumnLevels=function(){var e=[],t=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays);if(this.parent.activeViewOptions.group.resources.length>0){if(e=this.parent.resourceBase.generateResourceLevels(t),"MonthAgenda"===this.parent.currentView&&(e=[t]),this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.lastResourceLevel.length>0){var i=this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex],n=this.getDateSlots(i.renderDates,i.workDays);if(this.parent.activeViewOptions.group.byDate&&this.parent.activeViewOptions.group.hideNonWorkingDays){var r=n.findIndex((function(e,t){return 0!==t&&e.date.getDay()===n[0].date.getDay()}));n=r>-1?n.slice(0,r):n}e=[n]}}else e.push(t);return this.colLevels=e,e},i.prototype.getDateSlots=function(e,t){for(var i=this.parent.activeViewOptions.showWeekend?Y:t.length,n=[],r=this.isCurrentMonth(this.parent.selectedDate),a=0;a<i;a++){var s=[Qe],o=e.slice(0,i).map((function(e){return e.getDay()}));r&&o.indexOf(this.parent.currentTimezoneDate.getDay())===a&&s.push(Je),n.push({date:e[parseInt(a.toString(),10)],type:"monthDay",className:s,colSpan:1,workDays:t})}return n},i.prototype.getDayNameFormat=function(){return this.parent.isAdaptive||this.parent.activeViewOptions.group.resources.length>0?"abbreviated":"wide"},i.prototype.renderLayout=function(t){this.dayNameFormat=this.getDayNameFormat(),this.setPanel((0,e.createElement)("div",{className:Gt}));var i=[this.viewClass];i.push(t),this.parent.activeViewOptions.group.byDate&&(i.push("e-by-date"),"Month"!==this.parent.currentView&&(this.parent.activeViewOptions.group.hideNonWorkingDays=!1)),this.parent.activeViewOptions.allowVirtualScrolling&&!this.parent.uiStateValues.isGroupAdaptive&&i.push(Kn),this.parent.rowAutoHeight&&this.parent.eventSettings.ignoreWhitespace&&i.push($n),(0,e.addClass)([this.element],i),this.renderPanel(t),this.element.appendChild(this.createTableLayout(Xt)),this.element.querySelector("table").setAttribute("role","presentation"),this.colLevels=this.generateColumnLevels(),this.renderHeader(),this.renderContent();var n="MonthAgenda"===this.parent.currentView?this.parent.activeView.getPanel():this.parent.element;this.parent.uiStateValues.isGroupAdaptive&&!n.querySelector("."+It)&&this.renderResourceMobileLayout(),this.parent.notify(N,{}),this.parent.uiStateValues.isCustomMonth&&(this.parent.uiStateValues.isCustomMonth=!1)},i.prototype.refreshHeader=function(){(0,e.remove)(this.element.querySelector("tbody tr")),this.renderHeader(),this.parent.notify(N,{});var t=this.element.querySelector("."+Ge),i=this.element.querySelector("."+Qt);t&&(t.scrollLeft=this.parent.uiStateValues.left),i&&(i.scrollLeft=this.parent.uiStateValues.left)},i.prototype.wireCellEvents=function(t){e.EventHandler.add(t,"mousedown",this.parent.workCellAction.cellMouseDown,this.parent.workCellAction),e.EventHandler.add(t,"click",this.parent.workCellAction.cellClick,this.parent.workCellAction),this.parent.isAdaptive||e.EventHandler.add(t,"dblclick",this.parent.workCellAction.cellDblClick,this.parent.workCellAction)},i.prototype.renderHeader=function(){var t=(0,e.createElement)("tr");this.renderLeftIndent(t);var i=(0,e.createElement)("td");i.appendChild(this.renderDatesHeader()),t.appendChild(i),(0,e.prepend)([t],this.element.querySelector("tbody"))},i.prototype.renderLeftIndent=function(t){this.parent.activeViewOptions.showWeekNumber&&t.appendChild((0,e.createElement)("td",{className:"e-left-indent"}))},i.prototype.renderContent=function(){this.parent.activeViewOptions.group.resources.length>0&&(this.parent.resourceBase.renderedResources=(0,e.extend)([],this.parent.resourceBase.lastResourceLevel,null,!0));var t=(0,e.createElement)("tr");this.parent.activeViewOptions.showWeekNumber&&t.appendChild(this.renderWeekNumberContent());var i=(0,e.createElement)("td"),n=this.colLevels.slice(0);this.parent.virtualScrollModule&&this.resetColLevels();var r=(0,e.createElement)("div",{className:Qt}),a=this.renderContentArea();if("Month"===this.parent.currentView)r.appendChild(a);else{var s=(0,e.createElement)("div",{className:qe});s.appendChild(a),r.appendChild(s)}e.EventHandler.add(r,"scroll",this.onContentScroll,this),i.appendChild(r),t.appendChild(i),this.parent.virtualScrollModule&&(this.colLevels=n,this.parent.virtualScrollModule.renderVirtualTrack(r)),this.element.querySelector("tbody").appendChild(t),this.renderAppointmentContainer()},i.prototype.renderWeekNumberContent=function(){var t=this.renderDates.map((function(e){return new Date(+e)})),i=(0,e.createElement)("td"),n=(0,e.createElement)("div",{className:Ht});i.appendChild(n);var r=this.createTableLayout();n.appendChild(r);for(var a=this.parent.activeViewOptions.showWeekend?Y:this.parent.activeViewOptions.workDays.length,s=0,o=this.renderDates.length/a;s<o;s++){var l=t.splice(0,a),p=this.parent.getWeekNumberContent(l);r.querySelector("tbody").appendChild(this.createWeekNumberElement(p))}return i},i.prototype.renderAppointmentContainer=function(){},i.prototype.renderDatesHeader=function(){var t=(0,e.createElement)("div",{className:Xe}),i=(0,e.createElement)("div",{className:Ge});t.appendChild(i);var n=this.createTableLayout();if("Month"===this.parent.currentView){var r=(0,e.createElement)("thead");r.appendChild((0,e.createElement)("tr")),(0,e.prepend)([r],n)}this.createColGroup(n,this.colLevels[this.colLevels.length-1]);for(var a=(0,e.createElement)("tr"),s=0;s<this.colLevels.length;s++){for(var o=this.colLevels[parseInt(s.toString(),10)],l=a.cloneNode(),p=0;p<o.length;p++){var c=o[parseInt(p.toString(),10)];l.appendChild(this.createHeaderCell(c))}n.querySelector("tbody").appendChild(l)}return i.appendChild(n),t},i.prototype.createHeaderCell=function(t){var i=(0,e.createElement)("td");if(this.addAttributes(t,i),"monthDay"===t.type){var n=(0,e.createElement)("span",{innerHTML:xe(this.parent.getDayNames(this.dayNameFormat)[t.date.getDay()],"single")});i.appendChild(n)}if("resourceHeader"===t.type&&this.setResourceHeaderContent(i,t),"dateHeader"===t.type){if((0,e.addClass)([i],ri),i.setAttribute("data-date",t.date.getTime().toString()),this.parent.activeViewOptions.dateHeaderTemplate){var r={date:t.date,type:t.type},a=this.parent.element.id+"_"+this.parent.activeViewOptions.dateHeaderTemplateName+"dateHeaderTemplate",s=[].slice.call(this.parent.getDateHeaderTemplate()(r,this.parent,"dateHeaderTemplate",a,!1,void 0,void 0,this.parent.root));s&&s.length&&(0,e.append)(s,i)}else{n=(0,e.createElement)("span",{className:ni});var o=this.parent.globalize.formatDate(t.date,{skeleton:"full",calendar:this.parent.getCalendarMode()});n.setAttribute("title",xe(o,"multiple"));var l=!this.parent.calendarUtil.isMonthStart(t.date)||this.isCurrentDate(t.date)||this.parent.isAdaptive?this.parent.globalize.formatDate(t.date,{skeleton:"d",calendar:this.parent.getCalendarMode()}):this.parent.globalize.formatDate(t.date,{format:"MMM d",calendar:this.parent.getCalendarMode()});n.innerHTML=xe(l,"single"),i.appendChild(n)}this.wireCellEvents(i)}var p={elementType:t.type,element:i,date:t.date,groupIndex:t.groupIndex};return this.parent.trigger(v,p),i},i.prototype.getContentSlots=function(){if(!this.colLevels[this.colLevels.length-1]||!this.colLevels[this.colLevels.length-1][0])return[];var e=[],t=function(t,i,n,r){var a={date:new Date(+i),groupIndex:n.groupIndex,workDays:n.workDays,type:"monthCells",className:r||[ze]};e[parseInt(t.toString(),10)]||(e[parseInt(t.toString(),10)]=[]),e[parseInt(t.toString(),10)].push(a)},i="MonthAgenda"!==this.parent.currentView&&this.parent.activeViewOptions.group.resources.length>0;if(!i||this.parent.uiStateValues.isGroupAdaptive||this.parent.activeViewOptions.group.byDate){u=this.renderDates.map((function(e){return new Date(+e)})),g=this.parent.activeViewOptions.showWeekend?Y:this.parent.activeViewOptions.workDays.length;var n=this.colLevels.slice(0,1)[0],r=this.renderDates.map(Number).indexOf(+n[0].date);for(v=0;v<this.renderDates.length/g;v++){m=u.splice(0,g);for(var a,s=r,o=function(e){var n=m[parseInt(s.toString(),10)];if(s++,i){var r=l.colLevels[l.colLevels.length-1],o=r.length/g,p=r.slice(0,o);if(l.parent.activeViewOptions.group.hideNonWorkingDays&&0===(p=r.filter((function(e){return e.date.getDay()===n.getDay()}))).length)return a=e-=1,"continue";for(var c=0;c<p.length;c++){var h=void 0;0!==c&&(h=[ze,"e-disable-date"]),t(v,n,p[parseInt(c.toString(),10)],h)}}else t(v,n,l.colLevels[l.colLevels.length-1][0]);a=e},l=this,p=r;p<this.colLevels[0].length+r&&p<m.length;p++)o(p),p=a}}else for(var c=0,h=this.colLevels[this.colLevels.length-2];c<h.length;c++)for(var d=h[c],u=d.renderDates.map((function(e){return new Date(+e)})),g=this.parent.activeViewOptions.showWeekend?Y:d.workDays.length,v=0;v<d.renderDates.length/g;v++)for(var m,f=0,y=m=u.splice(0,g);f<y.length;f++){var T=y[f];t(v,T,d)}return e},i.prototype.updateClassList=function(e){!this.isCustomMonth()&&this.isOtherMonth(e.date)&&e.className.push(Ze),this.parent.isMinMaxDate(e.date)||e.className.push(qn),this.updateSelectedCellClass(e)},i.prototype.updateSelectedCellClass=function(e){},i.prototype.isOtherMonth=function(e){return e.getTime()<this.monthDates.start.getTime()||e.getTime()>this.monthDates.end.getTime()},i.prototype.renderContentArea=function(){var t=this.createTableLayout(We);this.setAriaAttributes(t),this.addAutoHeightClass(t),"TimelineMonth"===this.parent.currentView&&this.createColGroup(t,this.colLevels[this.colLevels.length-1]);var i=new Date(this.parent.selectedDate.getTime());this.monthDates={start:this.parent.calendarUtil.firstDateOfMonth(i),end:this.parent.calendarUtil.lastDateOfMonth(ce(i,this.parent.activeViewOptions.interval-1))};var n=t.querySelector("tbody");return(0,e.append)(this.getContentRows(),n),this.wireCellEvents(n),t},i.prototype.getContentRows=function(){for(var t=[],i=(0,e.createElement)("tr"),n=(0,e.createElement)("td",{attrs:{"aria-selected":"false"}}),r=this.getContentSlots(),a=0;a<r.length;a++){for(var s=i.cloneNode(),o=0;o<r[parseInt(a.toString(),10)].length;o++){var l=this.createContentTd(r[parseInt(a.toString(),10)][parseInt(o.toString(),10)],n);s.appendChild(l)}t.push(s)}return t},i.prototype.createContentTd=function(t,i){var n=i.cloneNode();t.colSpan&&n.setAttribute("colspan",t.colSpan.toString()),this.updateClassList(t);var r=t.type;if(-1!==t.className.indexOf(dt)&&(t.className.push(ot),r="resourceGroupCells"),this.parent.workHours.highlight&&this.isWorkDay(t.date,t.workDays)&&t.className.push(Ke),this.isCurrentDate(t.date)&&t.className.push($e),(0,e.addClass)([n],t.className),n.setAttribute("data-date",t.date.getTime().toString()),!(0,e.isNullOrUndefined)(t.groupIndex)||this.parent.uiStateValues.isGroupAdaptive){var a=this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:t.groupIndex;n.setAttribute("data-group-index",""+a)}if(this.renderDateHeaderElement(t,n),this.parent.activeViewOptions.cellTemplate){var s={date:t.date,type:r,groupIndex:t.groupIndex},o=this.parent.element.id+"_"+this.parent.activeViewOptions.cellTemplateName+"cellTemplate",l=[].slice.call(this.parent.getCellTemplate()(s,this.parent,"cellTemplate",o,!1,void 0,void 0,this.parent.root));(0,e.append)(l,n)}var p={elementType:r,element:n,date:t.date,groupIndex:t.groupIndex};return this.parent.trigger(v,p),n},i.prototype.renderDateHeaderElement=function(t,i){if("TimelineMonth"!==this.parent.currentView){var n=(0,e.createElement)("div",{className:ri});if(this.parent.activeViewOptions.cellHeaderTemplate){var r={date:t.date,type:t.type,groupIndex:t.groupIndex},a=this.parent.element.id+"_"+this.parent.activeViewOptions.cellHeaderTemplateName+"cellHeaderTemplate",s=[].slice.call(this.parent.getCellHeaderTemplate()(r,this.parent,"cellHeaderTemplate",a,!1,void 0,void 0,this.parent.root));(0,e.append)(s,n)}else{var o=!this.parent.calendarUtil.isMonthStart(t.date)||this.isCurrentDate(t.date)||this.parent.isAdaptive?this.parent.globalize.formatDate(t.date,{skeleton:"d",calendar:this.parent.getCalendarMode()}):this.parent.globalize.formatDate(t.date,{format:"MMM d",calendar:this.parent.getCalendarMode()});n.innerHTML=xe(o,"single")}if(i.appendChild(n),"month"===this.getModuleName()){(0,e.addClass)([n],ni);var l=this.parent.globalize.formatDate(t.date,{skeleton:"full",calendar:this.parent.getCalendarMode()});i.setAttribute("aria-label",l)}}},i.prototype.getMonthStart=function(t){var i=$("Month"===this.parent.currentView&&!(0,e.isNullOrUndefined)(this.parent.activeViewOptions.displayDate)&&(this.parent.uiStateValues.isCustomMonth||this.isCustomRange())?this.parent.activeViewOptions.displayDate:this.parent.uiStateValues.isCustomMonth||this.isCustomRange()||!this.isCustomMonth()?this.parent.calendarUtil.firstDateOfMonth(t):t,this.parent.activeViewOptions.firstDayOfWeek);return new Date(i.getFullYear(),i.getMonth(),i.getDate())},i.prototype.getMonthEnd=function(e){if(this.isCustomMonth())return pe(this.getMonthStart(e),Y*(this.parent.activeViewOptions.numberOfWeeks>0?this.parent.activeViewOptions.numberOfWeeks:_)-1);var t=ce(e,this.parent.activeViewOptions.interval-1);return pe($(this.parent.calendarUtil.lastDateOfMonth(t),this.parent.activeViewOptions.firstDayOfWeek),Y-1)},i.prototype.isCustomRange=function(){var e=this.parent.getCurrentViewDates();if(e&&e.length>0){var t=se(this.parent.selectedDate).getTime(),i=$(e[e.length-1],this.parent.activeViewOptions.firstDayOfWeek);return!(t>=$(e[0],this.parent.activeViewOptions.firstDayOfWeek).getTime()&&t<=pe(i,6).getTime())}return!1},i.prototype.getRenderDates=function(e){var t=[],i=se(this.parent.selectedDate),n=this.getMonthStart(i),r=this.getMonthEnd(i);do{(this.parent.activeViewOptions.showWeekend||this.isWorkDay(n,e))&&t.push(n),(n=pe(n,1)).getHours()>0&&(n=se(n))}while(n.getTime()<=r.getTime());return e||(this.renderDates=t),this.parent.headerModule&&this.parent.headerModule.previousNextIconHandler(),t},i.prototype.getNextPreviousDate=function(e){if(this.isCustomMonth()){var t=this.parent.getCurrentViewDates();return pe($("next"===e?t[t.length-1]:t[0],this.parent.activeViewOptions.firstDayOfWeek),"next"===e?Y:-(this.parent.activeViewOptions.numberOfWeeks>0?this.parent.activeViewOptions.numberOfWeeks:_)*Y)}return ce(this.parent.selectedDate,("next"===e?1:-1)*this.parent.activeViewOptions.interval)},i.prototype.getStartDate=function(){return this.getMonthStart(this.parent.selectedDate)},i.prototype.getEndDate=function(){return this.getMonthEnd(this.parent.selectedDate)},i.prototype.getEndDateFromStartDate=function(e){return pe(new Date(e.getTime()),1)},i.prototype.getDateRangeText=function(){if(this.parent.isAdaptive||(0,e.isNullOrUndefined)(this.parent.activeViewOptions.dateFormat)){var t=this.parent.selectedDate,i=void 0,n=!1;if(this.isCustomMonth()){var r=this.parent.getCurrentViewDates();(n=r[0].getMonth()!==r[r.length-1].getMonth()||r[0].getFullYear()!==r[r.length-1].getFullYear())&&(t=r[0],i=r[r.length-1])}var a="Month"!==this.parent.currentView||!this.isCustomMonth();if(this.parent.activeViewOptions.interval>1&&a||n)return i=i||ce(ie(t),this.parent.activeViewOptions.interval-1),t.getFullYear()===i.getFullYear()?xe(this.parent.globalize.formatDate(t,{format:"MMMM",calendar:this.parent.getCalendarMode()})+" - "+this.parent.globalize.formatDate(i,{format:"MMMM ",calendar:this.parent.getCalendarMode()})+this.parent.globalize.formatDate(i,{skeleton:"y",calendar:this.parent.getCalendarMode()}),"single"):xe(this.parent.globalize.formatDate(t,{format:"MMMM",calendar:this.parent.getCalendarMode()})+" "+t.getFullYear()+" - "+this.parent.globalize.formatDate(i,{format:"MMMM ",calendar:this.parent.getCalendarMode()})+this.parent.globalize.formatDate(i,{skeleton:"y",calendar:this.parent.getCalendarMode()}),"single");var s=this.parent.activeViewOptions.dateFormat?this.parent.activeViewOptions.dateFormat:"MMMM y";return xe(this.parent.globalize.formatDate(t,{format:s,calendar:this.parent.getCalendarMode()}),"single")}return this.formatDateRange(this.parent.selectedDate)},i.prototype.getLabelText=function(e){var t=e.charAt(0).toLowerCase()+e.substring(1);return this.formatViewLabel(t,this.getStartDate(),this.getEndDate())},i.prototype.createWeekNumberElement=function(t){var i=(0,e.createElement)("tr"),n=(0,e.createElement)("td",{className:Pt,attrs:{title:t?this.parent.localeObj.getConstant("week")+" "+t:""},innerHTML:t||""});i.appendChild(n);var r={elementType:"weekNumberCell",element:n};return this.parent.trigger(v,r),i},i.prototype.unWireEvents=function(){var t=this.element.querySelector("."+Qt);t&&e.EventHandler.remove(t,"scroll",this.onContentScroll)},i.prototype.isCustomMonth=function(){return"Month"===this.parent.currentView&&(!(0,e.isNullOrUndefined)(this.parent.activeViewOptions.displayDate)||this.parent.activeViewOptions.numberOfWeeks>0)},i.prototype.getModuleName=function(){return"month"},i.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed||this.element&&(this.monthEvent&&(this.monthEvent.destroy(),this.monthEvent=null),this.unWireEvents(),this.parent.resourceBase&&this.parent.resourceBase.destroy(),this.parent.scheduleTouchModule&&this.parent.scheduleTouchModule.resetValues(),t.prototype.destroy.call(this))},i}(Bo),$o=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),el=function(t){function i(e){var i=t.call(this,e)||this;return i.viewClass="e-year-view",i.isInverseTableSelect=!1,i.yearEventModule=null,i}return $o(i,t),i.prototype.getModuleName=function(){return"year"},i.prototype.renderLayout=function(t){this.parent.resourceBase&&this.parent.resourceBase.generateResourceLevels([{renderDates:this.parent.activeView.renderDates}]),this.setPanel((0,e.createElement)("div",{className:Gt}));var i="Horizontal"===this.parent.activeViewOptions.orientation?"e-horizontal":"e-vertical";(0,e.addClass)([this.element],[this.viewClass,i,t]),this.renderPanel(t),this.parent.activeViewOptions.allowVirtualScrolling&&(0,e.addClass)([this.element],[Kn]);var n=this.createTableLayout(Xt);this.element.appendChild(n),this.element.querySelector("table").setAttribute("role","presentation");var r=n.querySelector("tbody");this.rowCount=this.getRowColumnCount("row"),this.columnCount=this.getRowColumnCount("column"),this.renderHeader(r),this.renderContent(r),"Year"!==this.parent.currentView&&this.parent.uiStateValues.isGroupAdaptive&&(this.generateColumnLevels(),this.renderResourceMobileLayout()),e.EventHandler.add(this.element.querySelector("."+Qt),"scroll",this.onContentScroll,this),this.parent.notify(N,{})},i.prototype.renderHeader=function(e){},i.prototype.renderContent=function(t){var i=(0,e.createElement)("tr");t.appendChild(i);var n=(0,e.createElement)("td");i.appendChild(n),this.element.querySelector("tbody").appendChild(i);var r=(0,e.createElement)("div",{className:Qt});n.appendChild(r);var a=this.createTableLayout("e-calendar-table");r.appendChild(a);var s=(0,e.createElement)("tr");a.querySelector("tbody").appendChild(s);var o=(0,e.createElement)("td");s.appendChild(o);var l=(0,e.createElement)("div",{className:"e-calendar-wrapper"});o.appendChild(l);for(var p=0,c=this.getMonths();p<c.length;p++){var h=c[p],d=new Date(this.parent.selectedDate.getFullYear(),h,1),u=(0,e.createElement)("div",{className:"e-month-calendar e-calendar",attrs:{"data-role":"calendar"}});u.appendChild(this.renderCalendarHeader(d)),u.appendChild(this.renderCalendarContent(d)),l.appendChild(u)}this.renderDates.splice(0,1)},i.prototype.renderCalendarHeader=function(t){var i=(0,e.createElement)("div",{className:"e-header e-month"}),n=(0,e.createElement)("div",{className:"e-day e-title"});if(this.parent.activeViewOptions.monthHeaderTemplate){var r={date:t,type:"monthHeader"};this.renderTemplates(this.parent.getMonthHeaderTemplate(),r,"monthHeaderTemplate",this.parent.activeViewOptions.monthHeaderTemplateName,n)}else n.innerHTML=this.getMonthName(t);return i.appendChild(n),this.parent.trigger(v,{elementType:"headerCells",element:n,date:t}),i},i.prototype.renderCalendarContent=function(t){var i=this.getMonthDates(t),n=(0,e.createElement)("div",{className:"e-content e-month"}),r=this.createTableLayout("e-calendar-table "+We);n.appendChild(r),this.setAriaAttributes(r);var a=(0,e.createElement)("thead",{className:"e-week-header"}),s=(0,e.createElement)("tr"),o=$(te(t),this.parent.firstDayOfWeek);this.parent.activeViewOptions.showWeekNumber&&s.appendChild((0,e.createElement)("th"));for(var l=0;l<Y;l++){if(this.parent.activeViewOptions.dayHeaderTemplate){var p=(0,e.createElement)("th"),c={date:o,type:"dayHeader"};this.renderTemplates(this.parent.getDayHeaderTemplate(),c,"dayHeaderTemplate",this.parent.activeViewOptions.dayHeaderTemplateName,p),s.appendChild(p)}else s.appendChild((0,e.createElement)("th",{innerHTML:this.parent.getDayNames("narrow")[o.getDay()]}));var h=new Date(o.getTime()+G);o=h.getDate()===o.getDate()?pe(h,1):h}a.appendChild(s),(0,e.prepend)([a],r);for(var d=r.querySelector("tbody");i.length>0;){var u=i.splice(0,Y),g=(0,e.createElement)("tr");if(this.parent.activeViewOptions.showWeekNumber){var m=this.parent.getWeekNumberContent(u),f=(0,e.createElement)("td",{className:"e-week-number",attrs:{title:this.parent.localeObj.getConstant("week")+" "+m},innerHTML:m});g.appendChild(f),this.parent.trigger(v,{elementType:"weekNumberCells",element:f})}for(var y=0,T=u;y<T.length;y++){var w=T[y];f=(0,e.createElement)("td",{className:"e-cell "+ze,attrs:{"data-date":w.getTime().toString()}});if(this.parent.activeViewOptions.cellHeaderTemplate){c={date:w,type:"monthCells"};this.renderTemplates(this.parent.getCellHeaderTemplate(),c,"cellHeaderTemplate",this.parent.activeViewOptions.cellHeaderTemplateName,f)}else{var D=(0,e.createElement)("span",{className:"e-day",innerHTML:this.parent.globalize.formatDate(w,{skeleton:"d",calendar:this.parent.getCalendarMode()}),attrs:{title:this.parent.globalize.formatDate(w,{type:"date",skeleton:"full"})}});f.appendChild(D)}if(this.parent.activeViewOptions.cellTemplate){c={date:w,type:"monthCells"};this.renderTemplates(this.parent.getCellTemplate(),c,"cellTemplate",this.parent.activeViewOptions.cellTemplateName,f)}var b=[];t.getMonth()!==w.getMonth()&&(b.push(Ze),f.firstElementChild&&!this.parent.activeViewOptions.cellTemplate&&f.firstElementChild.setAttribute("aria-disabled","true")),this.isCurrentDate(w)&&t.getMonth()===w.getMonth()&&(b=b.concat(["e-today","e-selected"])),b.length>0&&(0,e.addClass)([f],b),g.appendChild(f),t.getMonth()===w.getMonth()&&this.renderDates.push(new Date(w)),this.parent.isMinMaxDate(w)?(e.EventHandler.add(f,"click",this.onCellClick,this),this.parent.isAdaptive||e.EventHandler.add(f,"dblclick",this.parent.workCellAction.cellDblClick,this.parent.workCellAction)):(0,e.addClass)([f],qn),this.parent.trigger(v,{elementType:"workCells",element:f,date:w})}d.appendChild(g)}return n},i.prototype.createTableColGroup=function(t){for(var i=(0,e.createElement)("colgroup"),n=0;n<t;n++)i.appendChild((0,e.createElement)("col"));return i},i.prototype.getMonthName=function(e){return xe(this.parent.globalize.formatDate(e,{format:this.parent.activeViewOptions.dateFormat||"MMMM y",calendar:this.parent.getCalendarMode()}),"multiple")},i.prototype.generateColumnLevels=function(){var e=[],t=this.getDateSlots([this.parent.selectedDate],this.parent.activeViewOptions.workDays);if(this.parent.activeViewOptions.group.resources.length>0){if(e=this.parent.resourceBase.generateResourceLevels(t),this.parent.uiStateValues.isGroupAdaptive){var i=this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex];e=[this.getDateSlots([this.parent.selectedDate],i.workDays)]}}else e.push(t);return e.pop(),this.colLevels=e,e},i.prototype.getDateSlots=function(e,t,i,n){return void 0===i&&(i=this.parent.workHours.start),void 0===n&&(n=this.parent.workHours.end),[{date:e[0],type:"dateHeader",className:[Qe],colSpan:1,workDays:t,startHour:new Date(+this.parent.globalize.parseDate(i,{skeleton:"Hm"})),endHour:new Date(+this.parent.globalize.parseDate(n,{skeleton:"Hm"}))}]},i.prototype.getMonthDates=function(e){for(var t=$(te(e),this.parent.firstDayOfWeek),i=pe(new Date(+t),6*Y),n=[],r=t;r.getTime()<i.getTime();r=pe(r,1))n.push(se(new Date(r)));return n},i.prototype.getRowColumnCount=function(e){for(var t=this.getMonths(),i=this.parent.selectedDate.getFullYear(),n=[],r=0,a=t;r<a.length;r++){var s=a[r];n.push(new Date(i,s,1).getDay()+new Date(i,s+1,0).getDate())}var o=Math.max.apply(Math,n);return"row"===e?"Horizontal"===this.parent.activeViewOptions.orientation?t.length:o:"Horizontal"===this.parent.activeViewOptions.orientation?o:t.length},i.prototype.isCurrentDate=function(e){return se(new Date).getTime()===se(new Date(e.getTime())).getTime()},i.prototype.getMonths=function(){var e=this;return Array.apply(null,{length:this.parent.activeViewOptions.monthsCount}).map((function(t,i){return e.parent.firstMonthOfYear+i}))},i.prototype.renderTemplates=function(t,i,n,r,a){var s=this.parent.element.id+"_"+r+n,o=[].slice.call(t(i,this.parent,n,s,!1,void 0,void 0,this.parent.root));(0,e.append)(o,a)},i.prototype.onCellClick=function(t){var i=(0,e.closest)(t.target,"."+ze),n=this.parent.getDateFromElement(i);this.parent.activeCellsData=this.parent.getCellDetails(i);var a=n.getTime()<this.getStartDate().getTime();if(a||n.getTime()>this.getEndDate().getTime()){this.parent.changeDate(this.parent.activeView.getNextPreviousDate(a?"previous":"next"),t);var s=this.parent.activeCellsData.startTime.getTime(),o=s>=this.getStartDate().getTime()&&s<=this.getEndDate().getTime()?s:(a?this.getEndDate():this.getStartDate()).getTime(),l=this.parent.element.querySelector(":not(."+Ze+')[data-date="'+o+'"]');this.parent.selectCell(l),this.parent.activeCellsData=this.parent.getCellDetails(l)}else{var p=pe(new Date(n.getTime()),1),c={date:n,event:this.parent.eventBase.filterEvents(n,p),element:t.target};i.classList.contains(Ze)&&(i=this.parent.element.querySelector(":not(."+Ze+')[data-date="'+i.getAttribute("data-date")+'"]')),this.parent.activeCellsData=this.parent.getCellDetails(i);var h=(0,e.extend)(this.parent.activeCellsData,{cancel:!1,event:t,name:"cellClick"});this.parent.trigger(r,h),this.parent.quickPopup.moreEventClick(c,p)}},i.prototype.onContentScroll=function(e){var t=e.target,i=this.getDatesHeaderElement();this.parent.notify(F,e),i&&(i.firstElementChild.scrollLeft=t.scrollLeft);var n="."+tr+",."+pt,r=this.element.querySelector(n);r&&(r.scrollTop=t.scrollTop),this.parent.isAdaptive||(this.parent.uiStateValues.top=e.target.scrollTop),this.parent.uiStateValues.left=e.target.scrollLeft,this.setPersistence()},i.prototype.onScrollUiUpdate=function(t){var i=this.parent.element.offsetHeight-this.getHeaderBarHeight(),n=this.element.querySelector("."+Xe);n&&(i-=n.offsetHeight);var r=this.element.querySelector("."+Qt);if(r&&(r.style.height=(0,e.formatUnit)(i)),!this.parent.isAdaptive&&n){var a=ye();r.offsetWidth-r.clientWidth>0?(n.firstElementChild.style[t.cssProperties.border]=a>0?"1px":"0px",n.style[t.cssProperties.padding]=a>0?a-1+"px":"0px"):(n.firstElementChild.style[t.cssProperties.border]="",n.style[t.cssProperties.padding]="")}this.setColWidth(this.getContentAreaElement());var s="."+tr+",."+pt,o=this.element.querySelector(s);if(o){var l=r.scrollWidth>r.clientWidth;o.style.height=(0,e.formatUnit)(i-(l?17:0))}t.isPreventScrollUpdate||(this.parent.uiStateValues.isInitial?(this.parent.uiStateValues.isInitial=!1,this.parent.uiStateValues.top=this.parent.uiStateValues.left=0):(o&&(o.scrollTop=this.parent.uiStateValues.top),r.scrollTop=this.parent.uiStateValues.top,r.scrollLeft=this.parent.uiStateValues.left)),this.retainScrollPosition()},i.prototype.getStartDate=function(){return new Date(this.parent.selectedDate.getFullYear(),this.parent.firstMonthOfYear%12,1)},i.prototype.getEndDate=function(){return pe(ce(this.getStartDate(),this.parent.monthsCount),-1)},i.prototype.startDate=function(){return"Year"===this.parent.currentView?$(this.getStartDate(),this.parent.firstDayOfWeek):this.getStartDate()},i.prototype.endDate=function(){return"Year"===this.parent.currentView?pe(ee(this.getEndDate(),this.parent.firstDayOfWeek),1):pe(this.getEndDate(),1)},i.prototype.getEndDateFromStartDate=function(e){var t=new Date(e.getTime());return this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(t=ie(t)),pe(new Date(t.getTime()),1)},i.prototype.getNextPreviousDate=function(e){return he(this.parent.selectedDate,"next"===e?1:-1)},i.prototype.getDateRangeText=function(){var e=this.getStartDate(),t=this.getEndDate();return e.getFullYear()!==t.getFullYear()?this.parent.globalize.formatDate(e,{skeleton:"yMMM"})+" - "+this.parent.globalize.formatDate(t,{skeleton:"yMMM"}):this.parent.globalize.formatDate(this.parent.selectedDate,{skeleton:"y"})},i.prototype.addEventListener=function(){this.parent.on(U,this.onScrollUiUpdate,this),this.parent.on(j,this.onDataReady,this)},i.prototype.removeEventListener=function(){this.parent&&(this.parent.off(U,this.onScrollUiUpdate),this.parent.off(j,this.onDataReady))},i.prototype.onDataReady=function(e){this.yearEventModule=new qo(this.parent),this.yearEventModule.renderAppointments(),this.parent.notify(L,e)},i.prototype.scrollToDate=function(t){var i=+new Date(se(t)),n=this.element.querySelector("."+ze+":not(."+Ze+')[data-date="'+i+'"]');n&&(n=(0,e.closest)(n,".e-month-calendar"),this.getContentAreaElement().scrollTop=n.offsetTop)},i.prototype.destroy=function(){if(!(!this.parent||this.parent&&this.parent.isDestroyed)&&this.element){var i=this.element.querySelector("."+Qt);i&&e.EventHandler.remove(i,"scroll",this.onContentScroll),this.yearEventModule&&(this.yearEventModule.destroy(),this.yearEventModule=null),this.parent.resourceBase&&this.parent.resourceBase.destroy(),t.prototype.destroy.call(this)}},i}(Bo),tl=d(90),il=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),nl=function(t){function i(e){return t.call(this,e)||this}return il(i,t),i.prototype.createAgendaContentElement=function(t,i,n,r,a){var s,o=this,l=this.parent.eventFields;if("noEvents"===t){var p=[{subject:this.parent.localeObj.getConstant("noEvents")}];0===(s=tl.ListBase.createList(this.parent.createElement,p,{moduleName:"agenda",listClass:this.parent.activeView.viewClass,itemClass:this.parent.activeView.viewClass,template:'<div class="'+oi+'">'+this.parent.localeObj.getConstant("noEvents")+"</div>"})).querySelector(".e-agenda-item").children.length&&s.firstElementChild.appendChild((0,e.createElement)("div",{className:oi,innerHTML:this.parent.localeObj.getConstant("noEvents")}))}else{s=tl.ListBase.createList(this.parent.createElement,i,{moduleName:"agenda",listClass:this.parent.activeView.viewClass,itemClass:this.parent.activeView.viewClass}),[].slice.call(s.children).forEach((function(t,n){var s,p=(0,e.createElement)("div",{className:qt,attrs:{"data-id":"Appointment_"+i[parseInt(n.toString(),10)][""+o.parent.eventFields.id],"data-guid":i[parseInt(n.toString(),10)].Guid,role:"button",tabindex:"0","aria-disabled":o.parent.eventBase.getReadonlyAttribute(i[parseInt(n.toString(),10)]),"aria-label":o.parent.getAnnouncementString(i[parseInt(n.toString(),10)])}});if((0,e.isNullOrUndefined)(a)||p.setAttribute("data-group-index",a.toString()),o.parent.eventBase.applyResourceColor(p,i[parseInt(n.toString(),10)],"borderColor",r),(0,e.isNullOrUndefined)(o.parent.activeViewOptions.eventTemplate))s=o.createAppointment(i[parseInt(n.toString(),10)]);else{(0,e.addClass)([p],"e-template");var c=o.parent.element.id+"_"+o.parent.activeViewOptions.eventTemplateName+"eventTemplate";if(s=o.parent.getAppointmentTemplate()(i[parseInt(n.toString(),10)],o.parent,"eventTemplate",c,!1,void 0,void 0,o.parent.root),!(0,e.isNullOrUndefined)(i[parseInt(n.toString(),10)][l.recurrenceRule])){var h=i[parseInt(n.toString(),10)][l.id]===i[parseInt(n.toString(),10)][l.recurrenceID]?Si:Ci;p.appendChild((0,e.createElement)("div",{className:je+" "+h}))}}(0,e.append)([].slice.call(s),p),be(t),t.appendChild(p);var d={data:(0,e.extend)({},i[parseInt(n.toString(),10)],null,!0),element:t,cancel:!1};o.parent.trigger(y,d,(function(i){i.cancel&&(0,e.remove)(t)}))}))}return n.appendChild(s),("MonthAgenda"===this.parent.currentView&&this.parent.activeViewOptions.group.resources.length>0||"Agenda"===this.parent.currentView)&&(0,e.addClass)([n],ai),this.parent.renderTemplates(),n},i.prototype.createAppointment=function(t){var i=this.parent.eventFields,n=t[i.subject]||this.parent.eventSettings.fields.subject.default||this.parent.localeObj.getConstant("addTitle"),r=t[i.location]||this.parent.eventSettings.fields.location.default,a=(0,e.createElement)("div",{className:zt});(0,e.isNullOrUndefined)(r)||""===r||(n+=",");var s=(0,e.createElement)("div",{className:vn});if(this.parent.sanitize(n,s),a.appendChild(s),!(0,e.isNullOrUndefined)(r)&&""!==r){var o=(0,e.createElement)("div",{className:mn});this.parent.sanitize(r,o),a.appendChild(o)}if(!(0,e.isNullOrUndefined)(t[i.recurrenceRule])){var l=t[i.id]===t[i.recurrenceID]?Si:Ci;a.appendChild((0,e.createElement)("div",{className:je+" "+l}))}var p=t[i.startTime],c=t[i.endTime],h=t[i.isAllDay],d=this.parent.localeObj.getConstant("allDay"),u=this.parent.getTimeString(p)+" - "+this.parent.getTimeString(c);(0,e.isNullOrUndefined)(t.data)||(d=((c.getTimezoneOffset()!==p.getTimezoneOffset()?c.getTime()-p.getTime()+36e5:c.getTime()-p.getTime())/G>=1?d:u)+" ("+this.parent.localeObj.getConstant("day")+" "+t.data.index+"/"+t.data.count+")");var g=!(0,e.isNullOrUndefined)(t.data)||h?d:u;return[a,(0,e.createElement)("div",{className:si,innerHTML:g})]},i.prototype.processAgendaEvents=function(t){var i=[];if((0,e.isNullOrUndefined)(t))return i;for(var n=0,r=t;n<r.length;n++){var a=r[n],s=this.parent.eventBase.splitEventByDay(a);i=i.concat(s.length>1?s:a)}return i},i.prototype.wireEventActions=function(){for(var t=0,i=[].slice.call(this.parent.element.querySelectorAll("."+qt));t<i.length;t++){var n=i[t];this.parent.eventBase.wireAppointmentEvents(n,this.parent.getEventDetails(n),!0)}for(var r=0,a=[].slice.call(this.parent.element.querySelectorAll(".e-m-date"));r<a.length;r++){n=a[r];e.EventHandler.add(n,"click",this.parent.agendaModule.dayNavigationClick,this)}},i.prototype.calculateResourceTableElement=function(t,i,n,r){if(void 0===r&&(r=null),(0,e.isNullOrUndefined)(this.parent.resourceBase.lastResourceLevel)){var a=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays);this.parent.resourceBase.generateResourceLevels(a)}for(var s=pe(new Date(n.getTime()),i),o=this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView?i:1,l=this.parent.resourceBase.resourceCollection,p=this.parent.resourceBase.lastResourceLevel,c=n,h=n,d=this.parent.activeViewOptions.showWeekend,u=0;u<o;u++){var g=[],v=[],m=0,f=void 0,y=void 0,T=pe(h,u);if("Agenda"===this.parent.currentView&&this.parent.activeViewOptions.group.byDate&&this.parent.activeViewOptions.allowVirtualScrolling&&!d&&!this.isWorkDay(T)){do{if((T=pe(T,1))>=r)break}while(!this.isWorkDay(T)||this.parent.eventBase.filterEvents(T,pe(T,1)).length<1);if(T>=r)break;h=pe(T,-u),s=pe(T,1)}var w=this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView?pe(T,1):s,D=this.parent.eventBase.filterEvents(T,w);if(D.length>0||!this.parent.hideEmptyAgendaDays||"MonthAgenda"===this.parent.currentView){for(var b=0;b<p.length;b++){i=this.parent.activeViewOptions.group.byDate&&"MonthAgenda"!==this.parent.currentView?1:i;var S=[];n=T;var C=this.parent.eventBase.filterEvents(n,s,D,p[parseInt(b.toString(),10)]);if(C.length>0||!this.parent.hideEmptyAgendaDays||"MonthAgenda"===this.parent.currentView)for(var O=0;O<i;O++){var E=this.parent.eventBase.filterEvents(n,pe(n,1),C,void 0);if(((d||!d&&(this.parent.group.byDate?this.isWorkDay(n):this.isWorkDay(n,p[parseInt(b.toString(),10)].workDays)))&&(E.length>0||!this.parent.hideEmptyAgendaDays)||"MonthAgenda"===this.parent.currentView)&&(S.push(E[0]),f={rowSpan:1,type:"eventColumn",resource:l[l.length-1],groupIndex:p[parseInt(b.toString(),10)].groupIndex,groupOrder:p[parseInt(b.toString(),10)].groupOrder,resourceData:p[parseInt(b.toString(),10)].resourceData,eventData:E,date:n},y={rowSpan:1,type:"dateColumn",resource:l[parseInt((l.length-1).toString(),10)],groupOrder:p[parseInt(b.toString(),10)].groupOrder,resourceData:p[parseInt(b.toString(),10)].resourceData,date:n},g[parseInt(m.toString(),10)]||(g[parseInt(m.toString(),10)]=[]),g[parseInt(m.toString(),10)].push(f),g[parseInt(m.toString(),10)].push(y),m++),(n=pe(n,1)).getTime()>=s.getTime()||this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView){if(S.length>0){g[g.length-1][1].cssClass=ai;var x={rowSpan:S.length,type:"resourceColumn",resource:l[parseInt((l.length-1).toString(),10)],groupOrder:p[parseInt(b.toString(),10)].groupOrder.slice(0,-1),resourceData:p[parseInt(b.toString(),10)].resourceData,groupIndex:g.length-S.length,className:[Yt],date:n};g[parseInt((g.length-S.length).toString(),10)].push(x),v.push((0,e.extend)({},x,null,!0))}break}}}for(var V=l.slice(0,-1),A=[],I=0,M=0;M<V.length;M++){S=V[V.length-(M+1)].dataSource;for(var k=0;k<S.length;k++)for(var R=0,H=0;H<v.length;H++)v[parseInt(H.toString(),10)].groupOrder[V.length-(M+1)]===S[parseInt(k.toString(),10)][V[V.length-(M+1)].idField]&&(I+=v[parseInt(H.toString(),10)].rowSpan,A.push((0,e.extend)({},v[parseInt(H.toString(),10)],null,!0))),++R===v.length&&A.length>0&&(A[0].rowSpan=I,A[0].type="parentColumnLevel_"+(M+1),A[0].resource=V[V.length-(M+1)],A[0].resourceData=S[parseInt(k.toString(),10)],A[0].date=n,g[A[0].groupIndex].push(A[0]),A=[],I=0)}this.createResourceTableRow(g,t)}}0===this.parent.eventBase.filterEvents(c,s).length&&!this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.hideEmptyAgendaDays&&this.renderEmptyContent(t,c)},i.prototype.createResourceTableRow=function(t,i){var n,r,a,s=(0,e.createElement)("tr"),o=(0,e.createElement)("td"),l=0;if(this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView){for(var p=[],c=this.parent.resourceBase.resourceCollection.slice(0,-1),h=0;h<t.length;h++)p=p.concat(t[parseInt(h.toString(),10)]);a=c.length>0?"parentColumnLevel_"+c.length:"resourceColumn";for(var d=p.filter((function(e){return e.type===a})),u=0;u<d.length;u++)l+=d[parseInt(u.toString(),10)].rowSpan}for(var g=0;g<t.length;g++){n=s.cloneNode();for(var v=t[parseInt(g.toString(),10)].length-1;v>=0;v--){var m=t[parseInt(g.toString(),10)][parseInt(v.toString(),10)],f=o.cloneNode();if("dateColumn"===m.type){if(this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView){r=t[parseInt(g.toString(),10)][parseInt(v.toString(),10)];continue}f.setAttribute("data-date",m.date.getTime().toString()),f.appendChild(this.createDateHeaderElement(m.date));var y=[Zt,ii];m.cssClass&&y.push(m.cssClass),(0,e.addClass)([f],y),this.isCurrentDate(new Date(m.date.getTime()))&&(0,e.addClass)(f.childNodes,Jt),n.appendChild(f)}else if("eventColumn"===m.type){var T=0===m.eventData.length?"noEvents":"data";(f=this.createAgendaContentElement(T,m.eventData,f,m.groupOrder,m.groupIndex)).setAttribute("data-date",m.date.getTime().toString()),(this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView)&&(0,e.addClass)([f],[Zt,"e-day-padding"]),n.appendChild(f)}else f.setAttribute("rowspan",m.rowSpan.toString()),(0,e.addClass)([f],"e-resource-column"),this.setResourceHeaderContent(f,m,m.className[0]),n.appendChild(f)}if(this.parent.activeViewOptions.group.byDate&&0===g&&"MonthAgenda"!==this.parent.currentView){(f=o.cloneNode()).setAttribute("data-date",r.date.getTime().toString()),f.setAttribute("rowspan",l.toString()),f.appendChild(this.createDateHeaderElement(r.date)),(0,e.addClass)([f],[Zt,ii,"e-date-border"]);var w=ge(this.parent.selectedDate.getTime(),r.date.getTime());if(n.setAttribute("data-row-index",w.toString()),this.parent.element.querySelector('.e-agenda-view tr[data-row-index="'+w+'"]'))break;n.insertBefore(f,n.childNodes[0])}i.appendChild(n)}},i.prototype.createDateHeaderElement=function(t){var i;if(this.parent.activeViewOptions.dateHeaderTemplate){i=(0,e.createElement)("div",{className:ti});var n={date:t,type:"dateHeader"},r=this.parent.element.id+"_"+this.parent.activeViewOptions.dateHeaderTemplateName+"dateHeaderTemplate",a=[].slice.call(this.parent.getDateHeaderTemplate()(n,this.parent,"dateHeaderTemplate",r,!1,void 0,void 0,this.parent.root));(0,e.append)(a,i)}else i=this.getMobileDateElement(t,ti);return i},i.prototype.renderEmptyContent=function(t,i){var n=this.createTableRowElement(i,"noEvents"),r=n.children[0],a=(0,e.createElement)("div",{className:"e-empty-event",innerHTML:this.parent.localeObj.getConstant("noEvents")});r.appendChild(a),t.appendChild(n)},i.prototype.createTableRowElement=function(t,i){var n=ge(this.parent.selectedDate.getTime(),t.getTime()),r=(0,e.createElement)("tr",{attrs:{"data-row-index":n.toString()}}),a=(0,e.createElement)("td",{attrs:{class:"monthHeader"===i?ei:Zt,"aria-selected":"false","data-column-index":n.toString(),"data-date":t.getTime().toString()}}),s=a.cloneNode(),o=a.cloneNode();return r.appendChild(s),"noEvents"!==i&&r.appendChild(o),r},i.prototype.destroy=function(){t.prototype.destroy.call(this)},i}(Bo),rl=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),al=function(t){function i(e){var i=t.call(this,e)||this;return i.viewClass="e-agenda-view",i.isInverseTableSelect=!1,i.agendaDates={},i.virtualScrollTop=1,i}return rl(i,t),i.prototype.getModuleName=function(){return"agenda"},i.prototype.renderLayout=function(){this.agendaDates={},this.element=(0,e.createElement)("div",{className:Gt}),(0,e.addClass)([this.element],this.viewClass),this.element.appendChild(this.createTableLayout(Xt)),this.element.querySelector("table").setAttribute("role","presentation"),this.parent.element.querySelector("."+qe).appendChild(this.element);var t=(0,e.createElement)("tr");this.element.querySelector("tbody").appendChild(t);var i=(0,e.createElement)("td");t.appendChild(i);var n=(0,e.createElement)("div",{className:Qt});i.appendChild(n);var r=this.createTableLayout(We);this.setAriaAttributes(r),n.appendChild(r);var a=r.querySelector("tbody"),s=se(this.parent.selectedDate);this.renderEmptyContent(a,s),this.wireEvents(),this.parent.resourceBase&&this.parent.resourceBase.generateResourceLevels([{renderDates:this.parent.activeView.renderDates}]),this.parent.uiStateValues.isGroupAdaptive&&!this.parent.element.querySelector("."+It)&&this.renderResourceMobileLayout(),this.parent.notify(N,{})},i.prototype.eventLoad=function(t){this.dataSource=(0,e.extend)([],this.parent.eventsData,null,!0);for(var i=0,n=this.parent.eventsData;i<n.length;i++){delete n[i].generatedDates}var r=this.parent.activeViewOptions.allowVirtualScrolling?t.processedData:this.parent.eventsProcessed;if(this.parent.uiStateValues.isGroupAdaptive){var a=this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex];this.dataSource=this.parent.eventBase.filterEventsByResource(a,this.dataSource),r=this.parent.eventBase.filterEventsByResource(a,r)}this.parent.eventsProcessed=this.processAgendaEvents(r);var s=se(this.parent.selectedDate),o=this.element.querySelector("."+We+" tbody");be(o),this.renderInitialContent(o,s),this.wireEventActions(),(0,e.closest)(o,"."+Qt).scrollTop=1,this.parent.notify(L,{}),this.parent.activeViewOptions.allowVirtualScrolling||this.retainScrollPosition()},i.prototype.refreshEvent=function(t){for(var i=[],n=this.parent.eventFields,r=0,a=this.dataSource;r<a.length;r++){var s=a[r];(0,e.isNullOrUndefined)(s[n.recurrenceID])&&!(0,e.isNullOrUndefined)(s[n.recurrenceRule])&&!(0,e.isNullOrUndefined)(s.generatedDates)&&t>=s.generatedDates.end&&(i=i.concat(this.parent.eventBase.generateOccurrence(s,t)))}this.parent.eventsProcessed=this.parent.eventsProcessed.concat(this.processAgendaEvents(i))},i.prototype.refreshHeader=function(){var t=this.element.querySelector("."+We+" tbody");this.parent.activeViewOptions.group.byDate?be(t):(0,e.remove)(t.firstElementChild);var i=se(this.parent.selectedDate),n=(0,e.createElement)("tbody"),r=new Date(i.getTime()),a=this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.hideEmptyAgendaDays?this.getEndDateFromStartDate(r):pe(r,this.parent.agendaDaysCount);this.renderContent(n,r,a),(0,e.append)([].slice.call(n.childNodes),t)},i.prototype.renderInitialContent=function(t,i){var n=(0,e.createElement)("tbody"),r=new Date(i.getTime()),a=this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.hideEmptyAgendaDays?this.getEndDateFromStartDate(r):pe(r,this.parent.agendaDaysCount);if(this.renderContent(n,r,a),(0,e.append)([].slice.call(n.childNodes),t),this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.hideEmptyAgendaDays&&this.parent.eventsData.length>0)for(var s=this.getContentAreaElement(),o=s.querySelector(".e-content-table");s.offsetWidth<=s.clientWidth&&!(this.parent.isAdaptive&&o.offsetHeight>=s.clientHeight);){var l=(0,e.createElement)("tbody");if(r=pe(a=r,-this.parent.agendaDaysCount),this.renderContent(l,r,a),(0,e.prepend)([].slice.call(l.childNodes),t),r<=this.parent.minDate)break}t.childNodes.length<=0&&this.renderEmptyContent(t,i)},i.prototype.renderContent=function(t,i,n){var r,a=this.parent.eventFields,s=new Date(i.getTime()),o=this.appointmentFiltering(s,n);if(o.length>0&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.hideEmptyAgendaDays)if(this.parent.activeViewOptions.showWeekend||this.isAgendaWorkDay(o[0][a.startTime]))i=new Date(new Date(o[0][a.startTime].getTime()).setHours(0,0,0,0)),this.updateHeaderText(o[0][a.startTime]);else for(var l=0,p=o;l<p.length;l++){var c=p[l];if(this.isAgendaWorkDay(c[a.startTime])){i=new Date(new Date(c[a.startTime].getTime()).setHours(0,0,0,0)),this.updateHeaderText(c[a.startTime]);break}}if(!this.parent.hideEmptyAgendaDays||this.parent.agendaDaysCount>0&&o.length>0){if(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var h=i;this.parent.activeViewOptions.group.byDate||(this.parent.activeViewOptions.allowVirtualScrolling=!1,h=s,this.parent.headerModule&&(this.parent.headerModule.updateDateRange(),this.parent.headerModule.updateHeaderItems("remove"))),this.calculateResourceTableElement(t,this.parent.agendaDaysCount,h,n)}else for(var d=0;d<this.parent.agendaDaysCount;d++){var u=this.createTableRowElement(i,"data"),g=this.element.querySelector('tr[data-row-index="'+ +u.dataset.rowIndex+'"]');if(g||!this.parent.activeViewOptions.showWeekend&&!this.isAgendaWorkDay(i)){if(i=pe(i,1),!g&&this.parent.activeViewOptions.allowVirtualScrolling&&d--,i.getTime()>n.getTime())break}else{var v=u.children[0],m=u.children[1],f=this.appointmentFiltering(i);if(f.length>0||!this.parent.hideEmptyAgendaDays&&0===f.length){var y=this.parent.hideEmptyAgendaDays||0!==f.length?"data":"noEvents";v.appendChild(this.createDateHeaderElement(i)),u.appendChild(v);var T=this.createAgendaContentElement(y,f,m);u.appendChild(T),T.querySelectorAll("li").length>0&&t.appendChild(u)}else this.parent.activeViewOptions.allowVirtualScrolling&&d--;if(this.isCurrentDate(new Date(i.getTime()))&&(0,e.addClass)(v.childNodes,Jt),(i=pe(i,1)).getTime()>n.getTime())break}}r=new Date(i.getTime()-G)}this.agendaDates={start:s,end:r}},i.prototype.isAgendaWorkDay=function(e){return this.parent.uiStateValues.isGroupAdaptive&&!this.parent.group.byDate?this.isWorkDay(e,this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex].workDays):this.isWorkDay(e)},i.prototype.agendaScrolling=function(e){this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(),this.parent.activeViewOptions.allowVirtualScrolling&&this.virtualScrolling(e),this.parent.activeViewOptions.allowVirtualScrolling||this.setPersistence()},i.prototype.virtualScrolling=function(t){var i,n=t.target,r=n.scrollTop,a=n.scrollHeight,s=r+n.clientHeight,o=this.virtualScrollTop<r?"next":"previous",l=n.querySelector("tbody"),p=(0,e.createElement)("tbody"),c=this.getElementFromScrollerPosition(t),h=this.parent.getDateFromElement(c);if(0===r){if(i=this.getPreviousNextDate(pe(h,-1),o),this.appointmentFiltering(i.start,i.end).length>0||!this.parent.hideEmptyAgendaDays){this.renderContent(p,i.start,i.end),(0,e.prepend)([].slice.call(p.childNodes),l),this.wireEventActions();for(var d=0,u=l.children;d<u.length;d++)if(u[parseInt(d.toString(),10)].getAttribute("data-row-index")===c.getAttribute("data-column-index")){var g=u[parseInt(d.toString(),10)].offsetTop-this.element.querySelector(".e-agenda-item").offsetHeight;n.scrollTop=g;break}this.updateHeaderText(h)}}else s>=a-5?(i=this.getPreviousNextDate(pe(h,1),o),(this.appointmentFiltering(i.start,i.end).length>0||!this.parent.hideEmptyAgendaDays)&&(this.renderContent(p,i.start,i.end),(0,e.append)([].slice.call(p.childNodes),l),this.wireEventActions(),this.updateHeaderText(h))):this.updateHeaderText(h);this.virtualScrollTop=r;var v=this.parent.eventBase.getSelectedAppointments();v.length>0&&v[v.length-1].focus()},i.prototype.getElementFromScrollerPosition=function(t){var i,n,r=t.target,a=r.scrollTop,s=r.scrollHeight,o=a+r.clientHeight,l=[].slice.call(r.querySelectorAll(".e-agenda-item"));if(l.length>0)if(0===a)n=l[0],i=(0,e.closest)(n,"."+Zt);else if(o===s)n=l[l.length-1],i=(0,e.closest)(n,"."+Zt);else for(var p=0,c=l.length;p<c;p++)if((n=l[parseInt(p.toString(),10)]).getBoundingClientRect().top>=0){i=(0,e.closest)(n,"."+Zt);break}return i},i.prototype.updateHeaderText=function(e){this.parent.showHeaderBar&&this.parent.headerModule.updateDateRange(e)},i.prototype.getPreviousNextDate=function(e,t){var i=new Date(e.getTime()),n=this.getStartDateFromEndDate(e),r=this.getEndDateFromStartDate(e),a=0;do{if(this.parent.activeViewOptions.showWeekend||!this.parent.activeViewOptions.showWeekend&&this.isAgendaWorkDay(i))(this.appointmentFiltering(i).length>0||!this.parent.hideEmptyAgendaDays)&&a++;if((i=pe(i,"next"===t?1:-1))<n||i>r)break}while(a!==this.parent.agendaDaysCount);var s=pe(i,"next"===t?-1:1);return"next"===t?{start:e,end:pe(s,1)}:{start:s,end:pe(e,1)}},i.prototype.appointmentFiltering=function(t,i){var n,r;!(0,e.isNullOrUndefined)(t)&&(0,e.isNullOrUndefined)(i)?(n=se(new Date(t.getTime())),r=ae(new Date(n.getTime()),G)):(n=new Date(t.getTime()),r=new Date(i.getTime()));var a=this.parent.eventBase.filterEvents(n,r);return 0===a.length&&(this.refreshEvent(t),a=this.parent.eventBase.filterEvents(n,r)),a},i.prototype.getStartDateFromEndDate=function(e){var t,i=this.parent.eventFields;if(this.parent.eventsProcessed.length>0){var n=Math.min.apply(Math,this.parent.eventsProcessed.map((function(e){return e[i.startTime].getTime()})));t=this.parent.hideEmptyAgendaDays?new Date(n):this.parent.minDate}else t=this.parent.hideEmptyAgendaDays?ce(e,-1):this.parent.minDate;return se(t)},i.prototype.getEndDateFromStartDate=function(e){var t,i=this.parent.eventFields;if(this.parent.eventsProcessed.length>0){var n=Math.max.apply(Math,this.parent.eventsProcessed.map((function(e){return e[i.endTime].getTime()})));t=this.parent.hideEmptyAgendaDays?new Date(n):this.parent.maxDate}else t=this.parent.hideEmptyAgendaDays?ce(e,1):this.parent.maxDate;return se(pe(t,1))},i.prototype.getNextPreviousDate=function(e){var t="next"===e?1:-1;return pe(this.parent.selectedDate,t)},i.prototype.startDate=function(){return se(this.parent.selectedDate)},i.prototype.endDate=function(){return this.parent.activeViewOptions.allowVirtualScrolling?this.getEndDateFromStartDate(this.startDate()):pe(this.startDate(),this.parent.agendaDaysCount)},i.prototype.getDateRangeText=function(t){var i=this.parent.activeViewOptions.dateFormat?this.parent.activeViewOptions.dateFormat:"MMMM y";if(this.parent.activeViewOptions.allowVirtualScrolling||this.parent.isAdaptive){var n=(0,e.isNullOrUndefined)(t)?this.parent.selectedDate:t;return xe(this.parent.globalize.formatDate(n,{format:i,calendar:this.parent.getCalendarMode()}),"multiple")}var r=this.parent.selectedDate,a=pe(r,this.parent.agendaDaysCount-1);return this.formatDateRange(r,a)},i.prototype.dayNavigationClick=function(t){var i=(0,e.closest)(t.currentTarget,"."+Zt),n=this.parent.getDateFromElement(i);(0,e.isNullOrUndefined)(n)||this.parent.isAdaptive||!this.parent.isMinMaxDate(n)||(this.parent.setProperties({selectedDate:n},!0),this.parent.changeView("Day",t))},i.prototype.wireEvents=function(){e.EventHandler.add(this.element.querySelector("."+Qt),q,this.agendaScrolling,this)},i.prototype.unWireEvents=function(){e.EventHandler.remove(this.element.querySelector("."+Qt),q,this.agendaScrolling);for(var t=0,i=[].slice.call(this.element.querySelectorAll(".e-m-date"));t<i.length;t++){var n=i[t];e.EventHandler.remove(n,"click",this.dayNavigationClick)}},i.prototype.addEventListener=function(){this.parent.on(U,this.onAgendaScrollUiUpdate,this),this.parent.on(j,this.eventLoad,this)},i.prototype.removeEventListener=function(){this.parent&&(this.parent.off(U,this.onAgendaScrollUiUpdate),this.parent.off(j,this.eventLoad))},i.prototype.onAgendaScrollUiUpdate=function(){var t=this.getHeaderBarHeight();this.parent.headerModule&&(this.parent.activeViewOptions.allowVirtualScrolling?this.parent.headerModule.updateHeaderItems("add"):this.parent.headerModule.updateHeaderItems("remove"));var i=this.element.querySelector("."+Qt);"auto"!==this.parent.height&&(i.style.height=(0,e.formatUnit)(this.parent.element.offsetHeight-t))},i.prototype.scrollToDate=function(e){var t=new Date(+se(e));if(this.parent.activeViewOptions.allowVirtualScrolling)(!this.parent.hideEmptyAgendaDays||this.parent.getEvents(t,pe(t,1),!0).length>0)&&this.parent.changeDate(t);else{var i=this.element.querySelector("."+Zt+'[data-date="'+t.getTime()+'"]');i&&(this.getContentAreaElement().scrollTop=i.offsetTop)}},i.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed||this.element&&(this.unWireEvents(),this.parent.resourceBase&&this.parent.resourceBase.destroy(),this.parent.headerModule&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.headerModule.updateHeaderItems("remove"),t.prototype.destroy.call(this))},i}(nl),sl=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ol=function(t){function i(e){var i=t.call(this,e)||this;return i.dayNameFormat="narrow",i.viewClass="e-month-agenda-view",i.monthAgendaDate=new Date(""+e.selectedDate),i}return sl(i,t),i.prototype.getModuleName=function(){return"monthAgenda"},i.prototype.renderAppointmentContainer=function(){var t=this.getContentAreaElement(),i=(0,e.createElement)("div",{className:Lt});t.appendChild(i);var n=(0,e.createElement)("div",{className:jt});i.appendChild(n),this.appendAppContainer(n),this.setEventWrapperHeight()},i.prototype.getDayNameFormat=function(){return this.parent.isAdaptive?"narrow":"abbreviated"},i.prototype.updateSelectedCellClass=function(e){se(e.date).getTime()===se(this.monthAgendaDate).getTime()&&e.className.push(Rt)},i.prototype.setEventWrapperHeight=function(){var t=(this.parent.headerModule?this.parent.headerModule.getHeaderElement().offsetHeight:0)+2,i=this.parent.element.querySelector("."+kt);i&&(t+=i.offsetHeight);var n=this.getContentAreaElement().firstElementChild,r=this.element.querySelector("."+Ge),a=this.parent.element.offsetHeight-t-r.offsetHeight,s=this.parent.activeViewOptions.interval>1?Math.round(.8*a):n.offsetHeight,o=a-s,l=this.element.querySelector("."+Lt),p=this.element.querySelector("."+jt);"auto"!==this.parent.height&&(this.parent.activeViewOptions.interval>1&&(n.style.height=(0,e.formatUnit)(s),e.EventHandler.add(n,"scroll",this.onContentScroll,this)),l.style.height=p.style.height=(0,e.formatUnit)(o))},i.prototype.onDataReady=function(t){this.setEventWrapperHeight(),this.clearElements();var i=t.processedData;if(this.parent.uiStateValues.isGroupAdaptive){var n=this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex];i=this.parent.eventBase.filterEventsByResource(n,i)}this.agendaBase=this.getAgendaBase(),this.parent.eventsProcessed=this.agendaBase.processAgendaEvents(i);for(var r=0,a=0,s=this.renderDates;a<s.length;a++){var o=s[a],l=this.appointmentFiltering(o),p=this.element.querySelectorAll("."+ze)[parseInt(r.toString(),10)];l.length>0&&(p.querySelector("."+li)||p.appendChild((0,e.createElement)("div",{className:li})),o.getTime()===se(new Date(this.monthAgendaDate.getTime())).getTime()&&this.onEventRender(l,o)),r++}this.parent.notify(L,{})},i.prototype.onCellClick=function(e){this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide();var t=this.appointmentFiltering(e.startTime);this.onEventRender(t,e.startTime),this.parent.notify(L,{}),this.monthAgendaDate=new Date(""+e.startTime)},i.prototype.onEventRender=function(t,i){this.agendaBase=this.getAgendaBase();var n=this.element.querySelector("."+jt);if(be(n),0===this.parent.activeViewOptions.group.resources.length||this.parent.uiStateValues.isGroupAdaptive)if(t.length>0){var r=(0,e.createElement)("div",{className:Nt});n.appendChild(this.agendaBase.createAgendaContentElement("data",t,r))}else this.appendAppContainer(n);else if(t.length>0){var a=this.createTableLayout(),s=a.querySelector("tbody");this.agendaBase.calculateResourceTableElement(s,1,i),a.appendChild(s),n.appendChild(a)}else this.appendAppContainer(n);this.agendaBase.wireEventActions()},i.prototype.appointmentFiltering=function(e){var t=se(new Date(e.getTime())),i=ae(new Date(t.getTime()),G);return this.parent.eventBase.filterEvents(t,i)},i.prototype.clearElements=function(){for(var t=0,i=[].slice.call(this.element.querySelectorAll("."+li));t<i.length;t++){var n=i[t];(0,e.remove)(n)}this.appendAppContainer(this.element.querySelector("."+jt))},i.prototype.appendAppContainer=function(t){var i=(0,e.createElement)("div",{className:Nt});(0,e.addClass)([i],oi),i.innerHTML=this.parent.localeObj.getConstant("noEvents"),be(t),t.appendChild(i)},i.prototype.getNextPreviousDate=function(e){var t=this.parent.selectedDate,i="next"===e?this.parent.activeViewOptions.interval:-this.parent.activeViewOptions.interval,n=ce(this.parent.selectedDate,i),r="next"===e?2:0,a=new Date(t.getFullYear(),t.getMonth()+r,0).getDate(),s=a>=this.monthAgendaDate.getDate()?this.monthAgendaDate.getDate():a;return this.monthAgendaDate=new Date(n.getFullYear(),n.getMonth(),s),this.monthAgendaDate},i.prototype.getAgendaBase=function(){return this.agendaBase||new nl(this.parent)},i.prototype.destroy=function(){this.agendaBase&&(this.agendaBase.destroy(),this.agendaBase=null),t.prototype.destroy.call(this)},i}(Jo),ll=function(){function t(e,t){this.parent=e,this.renderDates=t}return t.prototype.groupByYear=function(e){for(var t={},i=0,n=e;i<n.length;i++){var r=n[i],a=r.getFullYear();t[parseInt(a.toString(),10)]=t[parseInt(a.toString(),10)]||[],t[parseInt(a.toString(),10)].push(r)}return t},t.prototype.groupByMonth=function(e){for(var t={},i=0,n=e;i<n.length;i++){var r=n[i],a=12*(r.getFullYear()-1970)+r.getMonth();t[parseInt(a.toString(),10)]=t[parseInt(a.toString(),10)]||[],t[parseInt(a.toString(),10)].push(r)}return t},t.prototype.groupByWeek=function(e){for(var t={},i=0,n=e;i<n.length;i++){var r=n[i],a=+new Date(1970,0,1),s=r.getTimezoneOffset()-new Date(1970,0,1).getTimezoneOffset(),o=Math.ceil(((+r-a-60*s*1e3)/G+new Date(a).getDay()+1)/7);this.parent.firstDayOfWeek&&this.parent.firstDayOfWeek>new Date(+r).getDay()&&(o-=1),t[parseInt(o.toString(),10)]=t[parseInt(o.toString(),10)]||[],t[parseInt(o.toString(),10)].push(r)}return t},t.prototype.generateSlots=function(t,i,n,r,a){for(var s=this,o=function(e,t){return s.parent.globalize.formatDate(e,{format:t,calendar:s.parent.getCalendarMode()})},l=[],p=Object.keys(t),c=0;c<p.length;c++){var h=t[p[parseInt(c.toString(),10)]],d=void 0;if(n.template){var u={date:h[0],type:a},g=this.parent.element.id+"_headerRowTemplate";d=[].slice.call(this.parent.templateParser(n.template)(u,this.parent,"template",g,!1))}else{var v=void 0;switch(n.option){case"Year":v='<span class="e-header-year">'+o(h[0],"y")+"</span>";break;case"Month":v='<span class="e-header-month">'+xe(o(h[0],"MMMM"),"single")+"</span>";break;case"Week":v='<span class="e-header-week">'+this.parent.getWeekNumberContent(h)+"</span>"}var m=(0,e.createElement)("div",{innerHTML:v});d=[].slice.call(m.childNodes)}l.push({date:h[0],type:a,className:[r],colSpan:h.length*i,template:d})}return l},t.prototype.generateColumnLevels=function(e,t){var i=[],n=this.parent.activeViewOptions.headerRows,r=1;"Hour"===n[n.length-1].option&&t.length>0&&(r=t.length/e.length);for(var a,s,o,l=[],p=0,c=n;p<c.length;p++){var h=c[p];switch(h.option){case"Year":a=this.groupByYear(this.renderDates),l=this.generateSlots(a,r,h,"e-header-year-cell","yearHeader"),i.push(l);break;case"Month":s=this.groupByMonth(this.renderDates),l=this.generateSlots(s,r,h,"e-header-month-cell","monthHeader"),i.push(l);break;case"Week":o=this.groupByWeek(this.renderDates),l=this.generateSlots(o,r,h,"e-header-week-cell","weekHeader"),i.push(l);break;case"Date":l=(l=e).map((function(e){return e.colSpan=r,e})),i.push(l);break;case"Hour":t.length>0&&i.push(t)}}return i},t}(),pl=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),cl=function(t){function i(e){var i=t.call(this,e)||this;return i.timelineAppointment=null,i.baseCssClass="e-timeline-view",i}return pl(i,t),i.prototype.getModuleName=function(){return"timelineViews"},i.prototype.getLeftPanelElement=function(){return this.element.querySelector("."+pt)},i.prototype.scrollTopPanel=function(e){t.prototype.scrollTopPanel.call(this,e),this.scrollHeaderLabels(e)},i.prototype.scrollToWorkHour=function(){var t=this.parent.getStartEndTime(this.parent.workHours.start),i=this.isWorkDay(this.parent.selectedDate)&&this.parent.workHours.highlight&&!(0,e.isNullOrUndefined)(t)?new Date(+this.parent.selectedDate).setHours(t.getHours(),t.getMinutes(),0,0):new Date(+this.parent.selectedDate).setHours(0,0,0,0),n='[data-date="'+new Date(i).getTime().toString()+'"]',r=this.element.querySelector(n);r&&(this.getContentAreaElement().scrollLeft=this.parent.enableRtl?-(this.parent.getContentTable().offsetWidth-r.offsetLeft-r.offsetWidth):r.offsetLeft)},i.prototype.scrollToHour=function(t,i){var n,r,a;if(i&&(r=this.parent.getIndexOfDate(this.renderDates,se(i)))>=0&&(n=i,!(0,e.isNullOrUndefined)(t))){var s=t.split(":");2===s.length&&(n=new Date(i.setHours(parseInt(s[0],10),parseInt(s[1],10),0)))}(n=(0,e.isNullOrUndefined)(i)?this.parent.getStartEndTime(t):n,(0,e.isNullOrUndefined)(n))||(a=(0,e.isNullOrUndefined)(t)||!this.parent.activeViewOptions.timeScale.enable?r*Ve(this.element.querySelector(".e-work-cells")):(0,e.isNullOrUndefined)(i)?this.getLeftFromDateTime(null,n):this.getLeftFromDateTime([r],n),this.getScrollableElement().scrollLeft=this.parent.enableRtl?-a:a)},i.prototype.generateColumnLevels=function(){var e=[],t=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays);e.push(t),this.parent.activeViewOptions.group.resources.length>0&&this.parent.resourceBase.generateResourceLevels(t,!this.parent.uiStateValues.isGroupAdaptive);var i=[];(this.parent.activeViewOptions.timeScale.enable&&(i=this.generateTimeSlots(e[e.length-1]),e.push(i)),this.parent.activeViewOptions.headerRows.length>0)&&(e=new ll(this.parent,this.renderDates).generateColumnLevels(t,i));return e},i.prototype.generateTimeSlots=function(t){for(var i=this,n=this.getTimeSlotRows((function(e){return e.type=e.first?"majorSlot":"minorSlot",e.className=e.first?[Tt]:[Tt,yt],e.workDays=i.parent.activeViewOptions.workDays,e})),r=[],a=0,s=t;a<s.length;a++){var o=s[a];o.colSpan=n.length;for(var l=0,p=(0,e.extend)([],n,null,!0);l<p.length;l++){var c=p[l],h=se(new Date(""+o.date));c.date=ae(h,oe(c.date)),r.push(c)}}return r},i.prototype.changeCurrentTimePosition=function(){if(!(!this.parent||this.parent&&this.parent.isDestroyed)){this.removeCurrentTimeIndicatorElements();var t=this.getCurrentTimeIndicatorIndex(),i=this.getLeftFromDateTime(t,this.parent.getCurrentTime()),n=this.element.querySelector("."+We).offsetHeight,r=this.element.querySelector("."+Ge);if(this.element.querySelector("."+Qt).appendChild((0,e.createElement)("div",{className:bt,styles:(this.parent.enableRtl?"right":"left")+":"+(0,e.formatUnit)(i)+"; height:"+(0,e.formatUnit)(n)})),this.parent.virtualScrollModule){var a=this.parent.element.querySelector("."+bt),s=this.parent.element.querySelector("."+Qt+" table");(0,e.setStyleAttribute)(a,{transform:s.style.transform})}var o=(0,e.createElement)("div",{innerHTML:this.parent.getTimeString(this.parent.getCurrentTime()),className:Dt});r.appendChild(o),o.style[this.parent.enableRtl?"right":"left"]=(0,e.formatUnit)(i-o.offsetWidth/2)}},i.prototype.getLeftFromDateTime=function(t,i){var n=this.getStartHour(),r=0,a=60*(i.getHours()-n.getHours())+(i.getMinutes()-n.getMinutes());if(!(0,e.isNullOrUndefined)(t)&&0!==t[0]){var s=this.parent.activeView.colLevels.findIndex((function(e){return"dateHeader"===e[0].type}));if(this.parent.activeView.colLevels[parseInt(s.toString(),10)]&&this.parent.activeView.colLevels[parseInt(s.toString(),10)][0].colSpan)r=t[0]*this.parent.activeView.colLevels[parseInt(s.toString(),10)][0].colSpan*Ve(this.element.querySelector(".e-work-cells"));else{var o=this.getEndHour(),l=0===o.getHours()?24:o.getHours();a+=t[0]*(60*(l-n.getHours())+(o.getMinutes()-n.getMinutes()))}}return r+a*Ve(this.element.querySelector(".e-work-cells"))*this.parent.activeViewOptions.timeScale.slotCount/this.parent.activeViewOptions.timeScale.interval},i.prototype.renderHeader=function(){var t=(0,e.createElement)("tr");this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.renderResourceHeaderIndent(t);var i=(0,e.createElement)("td");i.appendChild(this.renderDatesHeader()),t.appendChild(i),(0,e.prepend)([t],this.element.querySelector("tbody"))},i.prototype.createAllDayRow=function(e,t){},i.prototype.getCurrentTimeIndicatorIndex=function(){var e=[],t=this.parent.getIndexOfDate(this.renderDates,se(this.parent.getCurrentTime()));return t>=0&&e.push(t),e},i.prototype.renderContent=function(){var t=(0,e.createElement)("tr");if(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var i=(0,e.createElement)("td");i.appendChild(this.parent.resourceBase.createResourceColumn()),t.appendChild(i)}var n=(0,e.createElement)("td"),r=this.renderContentArea();r.appendChild(this.createEventTable(this.getRowCount())),this.collapseRows(r),n.appendChild(r),t.appendChild(n),this.parent.virtualScrollModule&&this.parent.virtualScrollModule.renderVirtualTrack(r),this.element.querySelector("tbody").appendChild(t)},i.prototype.getRowCount=function(){return this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?this.parent.resourceBase.renderedResources.length:1},i.prototype.getResourceTdData=function(e,t){var i=this.parent.resourceBase.renderedResources[parseInt(e.toString(),10)],n=i.resourceData[i.resource.startHourField]||this.parent.workHours.start,r=i.resourceData[i.resource.endHourField]||this.parent.workHours.end;return t.startHour=this.parent.getStartEndTime(n),t.endHour=this.parent.getStartEndTime(r),t.workDays=i.resourceData[i.resource.workDaysField]||this.parent.workDays,t.className=i.className,t.groupIndex=i.groupIndex,t.groupOrder=i.groupOrder,t},i.prototype.renderContentTable=function(t){var i=t.querySelector("tbody");(0,e.append)(this.getContentRows(),i)},i.prototype.getContentRows=function(){for(var t=[],i=(0,e.createElement)("tr"),n=(0,e.createElement)("td",{attrs:{"aria-selected":"false"}}),r=this.getRowCount(),a=0;a<r;a++){for(var s=i.cloneNode(),o=0,l=this.colLevels[this.colLevels.length-1];o<l.length;o++){var p=l[o];this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(p=this.getResourceTdData(a,p));var c=this.createContentTd(p,p,n);s.appendChild(c)}t.push(s)}return t},i.prototype.getContentTdClass=function(e){return e.first||!this.parent.activeViewOptions.timeScale.enable?[ze]:[ze,wt]},i.prototype.renderEvents=function(){this.timelineAppointment=new Ca(this.parent,this.parent.activeViewOptions.timeScale.enable?"hour":"day"),this.timelineAppointment.renderAppointments(),this.parent.notify(L,{})},i.prototype.getAdjustedDate=function(e){if(!this.parent.activeViewOptions.timeScale.enable)return new Date(e.setHours(0,0,0,0));for(var t=this.colLevels[this.colLevels.length-1],i=0;i<t.length;i++)if(t[parseInt(i.toString(),10)].date.getTime()>e.getTime())return t[i-1].date;return null},i.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed||(this.timelineAppointment&&(this.timelineAppointment.destroy(),this.timelineAppointment=null),t.prototype.destroy.call(this))},i}(zo),hl=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),dl=function(t){function i(e){var i=t.call(this,e)||this;return i.viewClass="e-timeline-month-view",i.isInverseTableSelect=!0,i.appointment=null,i}return hl(i,t),i.prototype.getModuleName=function(){return"timelineMonth"},i.prototype.onDataReady=function(){this.appointment=new Ca(this.parent,"day"),this.appointment.renderAppointments(),this.parent.notify(L,{})},i.prototype.getLeftPanelElement=function(){return this.element.querySelector("."+pt)},i.prototype.scrollTopPanel=function(e){t.prototype.scrollTopPanel.call(this,e),this.scrollHeaderLabels(e)},i.prototype.setContentHeight=function(t,i,n){i&&(i.style.height=(0,e.formatUnit)(n-this.getScrollXIndent(t))),t.style.height=(0,e.formatUnit)(n)},i.prototype.getDateSlots=function(e,t){for(var i=[],n=0,r=e;n<r.length;n++){var a=r[n],s=[Qe];this.isCurrentDate(a)&&s.push(Je),i.push({date:a,type:"dateHeader",className:s,colSpan:1,workDays:t})}return i},i.prototype.renderLeftIndent=function(e){this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.renderResourceHeaderIndent(e)},i.prototype.renderContent=function(){var t=(0,e.createElement)("tr");if(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var i=(0,e.createElement)("td");i.appendChild(this.parent.resourceBase.createResourceColumn()),t.appendChild(i)}var n=(0,e.createElement)("td");this.element.querySelector("tbody").appendChild(t);var r=(0,e.createElement)("div",{className:Qt});r.appendChild(this.renderContentArea()),r.appendChild(this.createEventTable(this.getRowCount())),this.collapseRows(r),e.EventHandler.add(r,"scroll",this.onContentScroll,this),n.appendChild(r),this.parent.virtualScrollModule&&this.parent.virtualScrollModule.renderVirtualTrack(r),t.appendChild(n)},i.prototype.getRowCount=function(){return this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?this.parent.resourceBase.renderedResources.length:1},i.prototype.getContentSlots=function(){for(var e=[],t=0;t<this.getRowCount();t++)for(var i=0,n=this.colLevels[this.colLevels.length-1];i<n.length;i++){var r=n[i];if(r.className=[ze],this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var a=this.parent.resourceBase.renderedResources[parseInt(t.toString(),10)];r.workDays=a.resourceData[a.resource.workDaysField]||this.parent.workDays,r.className=r.className.concat(a.className),r.groupIndex=a.groupIndex,r.groupOrder=a.groupOrder}var s={date:new Date(+r.date),colSpan:r.colSpan,groupIndex:r.groupIndex,workDays:r.workDays,type:"monthCells",className:r.className};e[parseInt(t.toString(),10)]||(e[parseInt(t.toString(),10)]=[]),e[parseInt(t.toString(),10)].push(s)}return e},i.prototype.updateClassList=function(e){this.parent.isMinMaxDate(e.date)||e.className.push(qn)},i.prototype.unWireEvents=function(){e.EventHandler.remove(this.getContentAreaElement(),"scroll",this.onContentScroll)},i.prototype.getMonthStart=function(e){var t=this.parent.calendarUtil.firstDateOfMonth(se(e));return new Date(t.getFullYear(),t.getMonth(),t.getDate())},i.prototype.getMonthEnd=function(e){var t=this.parent.calendarUtil.firstDateOfMonth(se(e));return this.parent.calendarUtil.lastDateOfMonth(ce(new Date(+t),this.parent.activeViewOptions.interval-1))},i.prototype.generateColumnLevels=function(){var e=[],t=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays);e.push(t),this.parent.activeViewOptions.group.resources.length>0&&this.parent.resourceBase.generateResourceLevels(t,!this.parent.uiStateValues.isGroupAdaptive);this.parent.activeViewOptions.headerRows.length>0&&(e=new ll(this.parent,this.renderDates).generateColumnLevels(t,[]));return this.colLevels=e,e},i.prototype.getAdjustedDate=function(e){for(var t=this.colLevels[this.colLevels.length-1],i=0;i<t.length;i++)if(t[parseInt(i.toString(),10)].date.getTime()>e.getTime())return t[i-1].date;return null},i.prototype.destroy=function(){if(!(!this.parent||this.parent&&this.parent.isDestroyed)){if(this.element){var i=this.element.querySelector("."+Qt);i&&e.EventHandler.remove(i,"scroll",this.onContentScroll)}this.appointment&&(this.appointment.destroy(),this.appointment=null),t.prototype.destroy.call(this)}},i}(Jo),ul=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),gl=function(t){function i(e){var i=t.call(this,e)||this;return i.viewClass="e-timeline-year-view",i.isInverseTableSelect=!0,i}return ul(i,t),i.prototype.getModuleName=function(){return"timelineYear"},i.prototype.renderHeader=function(t){var i=(0,e.createElement)("tr");if(t.appendChild(i),"Vertical"===this.parent.activeViewOptions.orientation&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive)this.parent.resourceBase.renderResourceHeaderIndent(i);else{var n=(0,e.createElement)("td",{className:rt});i.appendChild(n),n.appendChild(this.renderResourceHeader(at))}var r="Horizontal"===this.parent.activeViewOptions.orientation,a=this.parent.activeViewOptions.group.resources.length>0;this.isInverseTableSelect=!(r&&!a);var s=(0,e.createElement)("td");i.appendChild(s);var o=(0,e.createElement)("div",{className:Xe});if(s.appendChild(o),"Horizontal"===this.parent.activeViewOptions.orientation&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive)o.appendChild(this.renderResourceHeader(Ge)),this.columnCount=this.colLevels.slice(-1)[0].length;else{var l=(0,e.createElement)("div",{className:Ge});o.appendChild(l);var p=this.createTableLayout();l.appendChild(p),p.appendChild(this.createTableColGroup(this.columnCount));var c=(0,e.createElement)("tr");p.querySelector("tbody").appendChild(c);for(var h=this.getMonths(),d=this.getMonthDates(new Date(this.parent.selectedDate.getFullYear(),h[0],1)),u=0;u<this.columnCount;u++){var g=new Date(this.parent.selectedDate.getFullYear(),h[parseInt(u.toString(),10)],1),m=(0,e.createElement)("td",{className:Qe});"Horizontal"===this.parent.activeViewOptions.orientation?this.parent.dayHeaderTemplate?(0,e.append)(this.renderDayMonthHeaderTemplate(d[parseInt(u.toString(),10)],u,"dayHeaderTemplate"),m):m.innerHTML="<span>"+this.parent.getDayNames("abbreviated")[u%7]+"</span>":(this.parent.monthHeaderTemplate?(0,e.append)(this.renderDayMonthHeaderTemplate(g,h[parseInt(u.toString(),10)],"monthHeaderTemplate"),m):m.innerHTML="<span>"+this.getMonthName(g)+"</span>",m.setAttribute("data-date",g.getTime().toString())),c.appendChild(m),this.parent.trigger(v,{elementType:"headerCells",element:m})}}},i.prototype.renderResourceHeader=function(t){var i=(0,e.createElement)("div",{className:t}),n=this.createTableLayout();i.appendChild(n);var r=(0,e.createElement)("tr");if(this.parent.activeViewOptions.group.resources.length>0)this.colLevels=this.generateColumnLevels();else{var a=[{className:[Qe],type:"headerCell"}];this.colLevels=[a]}for(var s=0,o=this.colLevels;s<o.length;s++){for(var l=o[s],p=r.cloneNode(),c=0,h=t===Ge?l:[l[0]];c<h.length;c++){var d=h[c],u=(0,e.createElement)("td");d.className&&(0,e.addClass)([u],d.className),t===Ge&&(d.template&&(0,e.append)(d.template,u),d.colSpan&&u.setAttribute("colspan",d.colSpan.toString()),d.groupIndex>-1&&u.setAttribute("data-group-index",d.groupIndex.toString()),this.setResourceHeaderContent(u,d)),t===at&&this.parent.renderHeaderIndentTemplate(d,u);var g={elementType:d.type,element:u,date:d.date,groupIndex:d.groupIndex};this.parent.trigger(v,g),p.appendChild(u)}n.querySelector("tbody").appendChild(p)}return t===Ge&&n.appendChild(this.createTableColGroup(this.colLevels.slice(-1)[0].length)),i},i.prototype.renderContent=function(t){var i=(0,e.createElement)("tr");t.appendChild(i);var n,r=(0,e.createElement)("td"),a=(0,e.createElement)("td"),s=[];if("Vertical"===this.parent.activeViewOptions.orientation&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive)s.push(r),r.appendChild(this.parent.resourceBase.createResourceColumn()),this.rowCount=this.parent.resourceBase.renderedResources.length;else{s.push(r);var o=(0,e.createElement)("div",{className:tr});r.appendChild(o),o.appendChild(this.createTableLayout()),n=o.querySelector("tbody")}s.push(a),(0,e.append)(s,i);var l=(0,e.createElement)("div",{className:Qt});a.appendChild(l);var p=this.createTableLayout(We);this.setAriaAttributes(p),l.appendChild(p);var c=(0,e.createElement)("div",{className:st});l.appendChild(c),this.parent.virtualScrollModule&&this.parent.virtualScrollModule.renderVirtualTrack(l);var h=p.querySelector("tbody");if(this.parent.rowAutoHeight){var d=[p],u=this.parent.element.querySelector("."+tr+" ."+Fe);u&&d.push(u),(0,e.addClass)(d,Jn)}if(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var g="Horizontal"===this.parent.activeViewOptions.orientation?this.colLevels.slice(-1)[0].length:this.columnCount;p.appendChild(this.createTableColGroup(g)),this.renderResourceContent(c,n,h)}else p.appendChild(this.createTableColGroup(this.columnCount)),this.renderDefaultContent(c,n,h)},i.prototype.renderDefaultContent=function(t,i,n){for(var r=this.getMonths(),a=this.getMonthDates(new Date(this.parent.selectedDate.getFullYear(),r[0],1)),s=0;s<this.rowCount;s++){t.appendChild((0,e.createElement)("div",{className:Nt}));var o=new Date(this.parent.selectedDate.getFullYear(),r[parseInt(s.toString(),10)],1),l=this.parent.calendarUtil.getMonthStartDate(new Date(o.getTime())),p=this.parent.calendarUtil.getMonthEndDate(new Date(o.getTime())),c=(0,e.createElement)("tr"),h=c.cloneNode();i.appendChild(h);var d=c.cloneNode();n.appendChild(d);var u=(0,e.createElement)("td",{className:ei});"Horizontal"===this.parent.activeViewOptions.orientation?(this.parent.monthHeaderTemplate?(0,e.append)(this.renderDayMonthHeaderTemplate(l,s,"monthHeaderTemplate"),u):u.innerHTML="<span>"+this.getMonthName(o)+"</span>",u.setAttribute("data-date",o.getTime().toString())):this.parent.dayHeaderTemplate?(0,e.append)(this.renderDayMonthHeaderTemplate(a[parseInt(s.toString(),10)],s,"dayHeaderTemplate"),u):u.innerHTML="<span>"+this.parent.getDayNames("abbreviated")[s%7]+"</span>",h.appendChild(u),this.parent.trigger(v,{elementType:"leftHeaderCells",element:u});for(var g=new Date(l.getTime()),m=0;m<this.columnCount;m++){var f=void 0;if("Vertical"===this.parent.activeViewOptions.orientation){o=new Date(this.parent.selectedDate.getFullYear(),r[parseInt(m.toString(),10)],1),l=this.parent.calendarUtil.getMonthStartDate(new Date(o.getTime())),p=this.parent.calendarUtil.getMonthEndDate(new Date(o.getTime()));var y=s-l.getDay()+1;g=new Date(this.parent.selectedDate.getFullYear(),r[parseInt(m.toString(),10)],y),f=y>0&&g.getTime()<p.getTime()}else f=m>=l.getDay()&&g.getTime()<p.getTime();var T=this.parent.globalize.formatDate(g,{skeleton:"full",calendar:this.parent.getCalendarMode()}),w=(0,e.createElement)("td",{className:ze,attrs:{"aria-selected":"false","aria-label":T}});d.appendChild(w);var D=(0,e.createElement)("div",{className:ri+" "+ni,innerHTML:f?this.parent.globalize.formatDate(g,{skeleton:"d",calendar:this.parent.getCalendarMode()}):""});if(f){var b=[w],S=[];this.parent.activeViewOptions.workDays.indexOf(g.getDay())>-1&&S.push(Ke),this.parent.isMinMaxDate(g)||(0,e.addClass)([w],qn),this.isCurrentDate(g)&&(S.push(Je),"Horizontal"===this.parent.activeViewOptions.orientation?b.push(this.element.querySelector("."+Qe+":nth-child("+(m+1)+")")):b.push(this.element.querySelectorAll("."+ei).item(s))),S.length>0&&(0,e.addClass)(b,S)}else(0,e.addClass)([w],Ze),this.parent.isMinMaxDate(g)||(0,e.addClass)([w],qn);w.classList.contains(Ze)||(this.renderDates.push(new Date(g)),w.appendChild(D),f&&(w.setAttribute("data-date",g.getTime().toString()),this.wireEvents(w)),this.renderCellTemplate({date:g,type:"workCells"},w),this.parent.trigger(v,{elementType:"workCells",element:w,date:g}),f&&"Horizontal"===this.parent.activeViewOptions.orientation&&(g=pe(new Date(g.getTime()),1)))}}this.renderDates.splice(0,1)},i.prototype.getContentRows=function(){for(var t=[],i=this.getMonths(),n=0;n<this.parent.resourceBase.renderedResources.length;n++){var r=(0,e.createElement)("tr");t.push(r);var a=void 0;this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(a=this.parent.resourceBase.renderedResources[parseInt(n.toString(),10)]);for(var s=new Date(this.parent.selectedDate.getFullYear(),i[parseInt(n.toString(),10)],1),o=this.parent.calendarUtil.getMonthStartDate(new Date(s.getTime())),l=0;l<this.columnCount;l++){var p=[],c=a.groupIndex;(p=p.concat(a.className)).indexOf(dt)>-1?p.push(ot):p.push(Ke),s=new Date(this.parent.selectedDate.getFullYear(),i[parseInt(l.toString(),10)],1),o=this.parent.calendarUtil.getMonthStartDate(new Date(s.getTime()));var h=(0,e.createElement)("td",{className:ze,attrs:{"aria-selected":"false","data-date":o.getTime().toString()}});(0,e.addClass)([h],p),h.setAttribute("data-group-index",c.toString()),this.renderCellTemplate({date:o,type:"resourceGroupCells",groupIndex:c},h),this.wireEvents(h),this.parent.trigger(v,{elementType:"resourceGroupCells",element:h,date:o}),r.appendChild(h)}}return t},i.prototype.renderResourceContent=function(t,i,n){for(var r=this.getMonths(),a=0;a<this.rowCount;a++){t.appendChild((0,e.createElement)("div",{className:Nt}));var s=(0,e.createElement)("tr");n.appendChild(s);var o=void 0;"Vertical"===this.parent.activeViewOptions.orientation&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(o=this.parent.resourceBase.renderedResources[parseInt(a.toString(),10)]);var l=new Date(this.parent.selectedDate.getFullYear(),r[parseInt(a.toString(),10)],1),p=this.parent.calendarUtil.getMonthStartDate(new Date(l.getTime()));if("Horizontal"===this.parent.activeViewOptions.orientation){var c=s.cloneNode();i.appendChild(c);var h=(0,e.createElement)("td",{className:ei,attrs:{"data-date":p.getTime().toString()}});this.parent.monthHeaderTemplate?(0,e.append)(this.renderDayMonthHeaderTemplate(l,a,"monthHeaderTemplate"),h):h.innerHTML="<span>"+this.getMonthName(l)+"</span>",c.appendChild(h)}for(var d=0;d<this.columnCount;d++){var u=[],g=void 0;"Vertical"===this.parent.activeViewOptions.orientation?(g=o.groupIndex,(u=u.concat(o.className)).indexOf(dt)>-1?u.push(ot):u.push(Ke),l=new Date(this.parent.selectedDate.getFullYear(),r[parseInt(d.toString(),10)],1),p=this.parent.calendarUtil.getMonthStartDate(new Date(l.getTime()))):(g=this.colLevels.slice(-1)[0][parseInt(d.toString(),10)].groupIndex,u.push(Ke));var m=this.parent.globalize.formatDate(p,{type:"dateTime",skeleton:"full",calendar:this.parent.getCalendarMode()}),f=this.parent.globalize.formatDate(this.parent.calendarUtil.getMonthEndDate(new Date(l.getTime())),{type:"dateTime",skeleton:"full",calendar:this.parent.getCalendarMode()}),y=(0,e.createElement)("td",{className:ze,attrs:{"aria-selected":"false","data-date":p.getTime().toString(),"aria-label":m+" "+this.parent.localeObj.getConstant("endAt")+" "+f}});(0,e.addClass)([y],u),y.setAttribute("data-group-index",g.toString()),this.renderCellTemplate({date:p,type:"resourceGroupCells",groupIndex:g},y),this.wireEvents(y),s.appendChild(y),this.parent.trigger(v,{elementType:"resourceGroupCells",element:y,date:p})}}"Vertical"===this.parent.activeViewOptions.orientation&&this.collapseRows(this.parent.element.querySelector("."+Qt))},i.prototype.renderDayMonthHeaderTemplate=function(e,t,i){var n={date:e,type:"dayHeaderTemplate"===i?"dayHeader":"monthHeader"},r="schedule_"+this.parent.activeViewOptions.dayHeaderTemplateName+"dayHeaderTemplate",a="schedule_"+this.parent.activeViewOptions.dayHeaderTemplateName+"monthHeaderTemplate";return"dayHeaderTemplate"===i?(n.day=this.parent.getDayNames("wide")[t%7],[].slice.call(this.parent.getDayHeaderTemplate()(n,this.parent,"dayHeaderTemplate",r,!1,void 0,void 0,this.parent.root))):[].slice.call(this.parent.getMonthHeaderTemplate()(n,this.parent,"monthHeaderTemplate",a,!1,void 0,void 0,this.parent.root))},i.prototype.renderCellTemplate=function(t,i){if(this.parent.activeViewOptions.cellTemplate&&!i.classList.contains(Ze)){var n={date:t.date,type:t.type};t.groupIndex&&(n.groupIndex=t.groupIndex);var r=this.parent.element.id+"_"+this.parent.activeViewOptions.cellTemplateName+"cellTemplate",a=[].slice.call(this.parent.getCellTemplate()(n,this.parent,"cellTemplate",r,!1,void 0,void 0,this.parent.root));(0,e.append)(a,i)}},i.prototype.scrollToDate=function(e){var t;t=null!==this.parent.activeViewOptions.group.resources&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?+new Date(se(te(e))):+new Date(se(e));var i=this.element.querySelector('[data-date="'+t+'"]');if(i){var n=this.getScrollableElement();if(this.parent.enableRtl){var r=this.element.querySelector("."+We);n.scrollLeft=-(r.offsetWidth-i.offsetLeft-i.offsetWidth)}else n.scrollLeft=i.offsetLeft;n.scrollTop=i.offsetTop}},i.prototype.getScrollableElement=function(){return this.parent.isAdaptive&&!this.isTimelineView()?this.element.querySelector("."+Ot):this.getContentAreaElement()},i.prototype.wireEvents=function(t){e.EventHandler.add(t,"mousedown",this.parent.workCellAction.cellMouseDown,this.parent.workCellAction),e.EventHandler.add(t,"click",this.parent.workCellAction.cellClick,this.parent.workCellAction),this.parent.isAdaptive||e.EventHandler.add(t,"dblclick",this.parent.workCellAction.cellDblClick,this.parent.workCellAction)},i}(el),vl=function(){function t(e){this.parent=e}return t.prototype.initializeCalendarExport=function(e,t){var i=this.getCalendarString(e,t);this.download(i,e)},t.prototype.getCalendarString=function(t,i){var n=this,r=i||(0,e.extend)([],this.parent.eventsData,null,!0);r=this.parent.eventBase.sortByTime(r);var a=-1!==navigator.appVersion.indexOf("Win")?"\r\n":"\n",s=[],o=[],l=this.parent.timezone||this.parent.tzModule.getLocalTimezoneName(),p=this.parent.eventFields;return r.forEach((function(t){var i=t[p.id]||t.Guid||n.parent.eventBase.generateGuid(),c=[];if(t[p.recurrenceID]){var h=n.filterEvents(o,p.id,t[p.recurrenceID]);i=h.length>0?h[0].UID:i}if(!t[p.recurrenceID]&&t[p.recurrenceRule]&&t[p.recurrenceException]){var d=t[p.recurrenceException].split(",");n.filterEvents(r,p.recurrenceID,t[p.id]).forEach((function(e){c.push(va(e[p.startTime]))}));var u=d.filter((function(e){return-1===c.indexOf(e)}));t[p.recurrenceException]=u.length>0?u.join(",")+",":""}var g=t[p.startTimezone]||l,v=t[p.endTimezone]||l,m=!!t[p.isReadonly]&&t[p.isReadonly],f=["BEGIN:VEVENT","LOCATION:"+(t[p.location]||""),"SUMMARY:"+(t[p.subject]||""),"UID:"+i,"DESCRIPTION:"+(t[p.description]||""),"ISREADONLY:"+m,"END:VEVENT"];if(t[p.isAllDay]?(f.splice(4,0,"DTEND;VALUE=DATE:"+n.convertDateToString(t[p.endTime],!0)),f.splice(4,0,"DTSTART;VALUE=DATE:"+n.convertDateToString(t[p.startTime],!0))):t[p.isAllDay]||t[p.recurrenceRule]?(f.splice(4,0,'DTEND;TZID="'+v+'":'+n.convertDateToString(t[p.endTime])),f.splice(4,0,'DTSTART;TZID="'+g+'":'+n.convertDateToString(t[p.startTime]))):(f.splice(4,0,"DTEND:"+n.convertDateToString(t[p.endTime])),f.splice(4,0,"DTSTART:"+n.convertDateToString(t[p.startTime]))),t[p.recurrenceRule]&&f.splice(4,0,"RRULE:"+t[p.recurrenceRule]),t[p.recurrenceException]){d=t[p.recurrenceException].split(",");for(var y=0;y<d.length-1;y++)f.splice(5,0,"EXDATE:"+n.convertDateToString(Dr(d[parseInt(y.toString(),10)]),t[p.isAllDay]))}t[p.recurrenceID]&&f.splice(4,0,'RECURRENCE-ID;TZID="'+g+'":'+n.convertDateToString(t[p.startTime],t[p.isAllDay]));var T=n.customFieldFilter(t,p);T.length>0&&T.forEach((function(e){return f.splice(4,0,e+":"+(t[""+e]||""))}));var w=(0,e.extend)({},t);w.UID=i,o.push(w),s.push(f.join(a))})),["BEGIN:VCALENDAR","PRODID:-//Syncfusion Inc//Scheduler//EN","VERSION:2.0","CALSCALE:GREGORIAN","METHOD:PUBLISH","X-WR-CALNAME:"+(t||"Calendar"),"X-WR-TIMEZONE:"+l].join(a)+a+s.join(a)+a+"END:VCALENDAR"},t.prototype.customFieldFilter=function(e,t){var i=Object.keys(t).map((function(e){return t[""+e]}));return Object.keys(e).filter((function(e){return-1===i.indexOf(e)&&"Guid"!==e}))},t.prototype.convertDateToString=function(e,t){var i=("0000"+e.getFullYear().toString()).slice(-4),n=("00"+(e.getMonth()+1).toString()).slice(-2),r=("00"+e.getDate().toString()).slice(-2),a=("00"+e.getHours().toString()).slice(-2),s=("00"+e.getMinutes().toString()).slice(-2),o=("00"+e.getSeconds().toString()).slice(-2);return t?i+n+r:i+n+r+"T"+a+s+o},t.prototype.download=function(e,t){var i=new Blob([e],{type:"data:text/calendar;charset=utf8"});if(t=(t||"Calendar")+".ics",navigator.msSaveBlob)navigator.msSaveBlob(i,t);else{var n=document.createElementNS("http://www.w3.org/1999/xhtml","a");n.download=t,n.href=URL.createObjectURL(i);var r=document.createEvent("MouseEvent");r.initEvent("click",!0,!0),n.dispatchEvent(r),setTimeout((function(){URL.revokeObjectURL(n.href),n.href=void 0}))}},t.prototype.filterEvents=function(e,t,i){return e.filter((function(e){return e[""+t]===i}))},t.prototype.getModuleName=function(){return"iCalendarExport"},t.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed||(this.parent=null)},t}(),ml=function(){function t(e){this.allDay=!1,this.parent=e}return t.prototype.initializeCalendarImport=function(e){var t=this;if(e&&e instanceof Blob){var i=new FileReader;i.onload=function(){var e=i.result;t.iCalendarParser(e)},i.readAsText(e,"UTF-8")}else e&&"string"==typeof e&&this.iCalendarParser(e)},t.prototype.iCalendarParser=function(t){var i,n,r={isEvent:!1,curEvent:null,id:this.parent.eventBase.getEventMaxID(),count:0,events:[],key:null},a=t.length,s=t.search(/[^ \t]/),o=s;do{0===(o=t.indexOf("\n",s)+1)?(o=a,n=0):n=o>1&&"\r"===t[o-2]?2:1;var l=t.charAt(s);" "===l||"\n"===l||"\t"===l?i+=t.slice(s+1,o-n):(i&&(r=this.updateEventData(i,r)),i=t.slice(s,o-n)),s=o}while(o!==a);(i=i.trim()).length&&(r=this.updateEventData(i,r));var p=(0,e.extend)([],r.events,null,!0);this.parent.addEvent(this.processOccurrence(p,r.id))},t.prototype.updateEventData=function(t,i){var n=this.parent.eventFields,r=i.id,a=i.events,s=i.isEvent,o=i.count,l=i.curEvent,p=i.key;if(s||"BEGIN:VEVENT"!==t||(s=!0,l={}),s&&"END:VEVENT"===t&&(s=!1,a.push(l),l=null),s){var c=t.indexOf(":"),h=t.substring(0,c).replace(/^\s\s*/,"").replace(/\s\s*$/,""),d=t.substring(c+1,t.length).replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(-1!==t.indexOf("SUMMARY")&&(h="SUMMARY"),-1!==t.indexOf("DTSTART"))l[n.startTime]=this.dateParsing(t),l[n.isAllDay]=this.allDay,this.allDay=!1;else if(-1!==t.indexOf("DTEND"))l[n.endTime]=this.dateParsing(t);else if(-1!==t.indexOf("EXDATE"))d=va(this.dateParsing(t)),l[n.recurrenceException]=(0,e.isNullOrUndefined)(l[n.recurrenceException])?d:l[n.recurrenceException]+","+d;else if(-1!==t.indexOf("RECURRENCE-ID"))d=va(this.dateParsing(t)),l[n.recurrenceException]=d,l[n.recurrenceID]=d;else switch(p=h||p){case"BEGIN":break;case"UID":l[""+h]=d,"number"==typeof r?(l[n.id]=parseInt(d,10),isNaN(l[n.id])&&(l[n.id]=r+o,o++)):l[n.id]=d;break;case"SUMMARY":l[n.subject]=this.getFormattedString(d);break;case"LOCATION":l[n.location]=this.getFormattedString(d);break;case"DESCRIPTION":l[n.description]?l[n.description]=this.getFormattedString(l[n.description]+"\r\n"+d):l[n.description]=this.getFormattedString(d);break;case"ISREADONLY":l[n.isReadonly]=d.indexOf("true")>-1;break;case"RRULE":l[n.recurrenceRule]=d;break;default:if(this.parent.resourceCollection.length>0){var u=this.parent.resourceCollection.filter((function(e){return e.field===h}));l[""+h]=u.length>0&&"number"==typeof u[0].dataSource[0][u[0].idField]?parseInt(d,10):d}else l[""+h]=d}}return{isEvent:s,curEvent:l,id:r,count:o,events:a,key:p}},t.prototype.processOccurrence=function(t,i){var n=this,r=[],a="UID",s=this.parent.eventFields,o=[];return this.parent.eventsData.forEach((function(e){o.push(e[s.id])})),t.forEach((function(l){var p,c;if(l.hasOwnProperty(s.recurrenceID)||(p=l,c=l[s.id]),o.indexOf(l[s.id])<0){var h=t.filter((function(e){return e.UID===l[""+a]}));if(h.length>1&&(0,e.isNullOrUndefined)(l[s.recurrenceID])){c="number"==typeof i?i++:c;for(var d=0;d<h.length;d++)if(h[parseInt(d.toString(),10)].hasOwnProperty(s.recurrenceID)){var u=h[parseInt(d.toString(),10)][s.recurrenceID];h[parseInt(d.toString(),10)][s.id]="number"==typeof i?i++:n.parent.eventBase.generateGuid(),h[parseInt(d.toString(),10)][s.recurrenceID]=c,h[parseInt(d.toString(),10)][s.recurrenceException]=null,p[s.recurrenceException]=n.getExcludeDateString(p[s.recurrenceException],u),delete h[parseInt(d.toString(),10)][""+a],r.push(h[parseInt(d.toString(),10)])}delete p[""+a],p[s.id]=c,r.push(p)}else l.hasOwnProperty(s.recurrenceID)||(delete l[""+a],l[s.id]="number"==typeof i?i++:c,r.push(l))}})),r},t.prototype.getExcludeDateString=function(t,i){if((0,e.isNullOrUndefined)(t))return i;if((0,e.isNullOrUndefined)(i))return t;var n=t.split(",").map((function(e){return e.split("T")[0]})),r=i.split(",").map((function(e){return e.split("T")[0]}));return n.filter((function(e){return r.indexOf(e)>-1})).length>0?t:t+","+i},t.prototype.getFormattedString=function(e){return(e=e||"").replace(/\\\,/g,",").replace(/\\\;/g,";").replace(/\\[nN]/g,"\n").replace(/\\\\/g,"\\")},t.prototype.dateParsing=function(e){var t=e.split(":"),i=t[t.length-1],n=new Date(this.getFormattedString(i));if(e&&(e.indexOf("VALUE=DATE")>-1||e.indexOf("RECURRENCE-ID;TZID")>-1)){var r=/^(\d{4})(\d{2})(\d{2})$/.exec(i);null!==r&&(n=new Date(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10))),e.indexOf("DTSTART")>-1&&(this.allDay=!0)}var a=/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})(Z)?$/.exec(i);return null!==a&&(n="Z"===a[7]?new Date(Date.UTC(parseInt(a[1],10),parseInt(a[2],10)-1,parseInt(a[3],10),parseInt(a[4],10),parseInt(a[5],10),parseInt(a[6],10))):new Date(parseInt(a[1],10),parseInt(a[2],10)-1,parseInt(a[3],10),parseInt(a[4],10),parseInt(a[5],10),parseInt(a[6],10))),n},t.prototype.getModuleName=function(){return"iCalendarImport"},t.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed},t}(),fl=d(437),yl=function(){function t(e){this.parent=e}return t.prototype.initializeExcelExport=function(t){void 0===t&&(t={});var i,n,r=this.getExportColumns(t),a=t.fileName||"Schedule",s=t.exportType||"xlsx",o=t.includeOccurrences||!1;(0,e.isNullOrUndefined)(t.separator)||","===t.separator||(i=t.separator),n=t.customData?o?this.parent.eventBase.getProcessedEvents(t.customData):t.customData:o?this.parent.eventsProcessed:this.parent.eventsData,this.processWorkbook(r,a,s,n,i)},t.prototype.processWorkbook=function(t,i,n,r,a){var s=this,o=[],l=[],p=[];t.forEach((function(e,t){o.push({index:t+1,width:"Id"===e.name?50:150})}));var c={fontSize:12,borders:{color:"#E0E0E0"},bold:!0};t.forEach((function(e,t){p.push({index:t+1,value:e.text,style:c})})),l.push({index:1,cells:p}),r.forEach((function(i,n){var r=[];t.forEach((function(t,n){var a={index:n+1,value:i[t.name]||""};if(t.name===s.parent.eventFields.startTime||t.name===s.parent.eventFields.endTime){a=(0,e.extend)({},a,{style:{fontSize:12,numberFormat:"m/d/yyyy h:mm AM/PM"}},!0)}r.push(a)})),l.push({index:n+2,cells:r})}));var h=[{columns:o,rows:l}];new fl.Workbook({worksheets:h},n,this.parent.locale,void 0,a).save(i+"."+n)},t.prototype.getExportColumns=function(e){var t=this,i=e.fieldsInfo||[];0===i.length&&(e.fields||Object.keys(this.parent.eventFields).map((function(e){return t.parent.eventFields[""+e]}))).forEach((function(e){i.push({name:e,text:e})}));return i},t.prototype.getModuleName=function(){return"excelExport"},t.prototype.destroy=function(){this.parent=null},t}(),Tl=function(){function t(e){this.parent=e}return t.prototype.print=function(t){(0,e.isNullOrUndefined)(t)?this.printScheduler():this.printSchedulerWithModel(t)},t.prototype.printScheduler=function(){var t=this.parent.element.cloneNode(!0);t.id=this.parent.element.id+"_print",document.body.appendChild(t);for(var i="MonthAgenda"===this.parent.currentView?".e-appointment-wrap":".e-content-wrap",n=this.parent.element.querySelector(i),r="",a=0,s=[].slice.call(document.getElementsByTagName("head")[0].querySelectorAll("link, style"));a<s.length;a++){r+=s[a].outerHTML}var o=(0,e.createElement)("div");t.style.width=this.parent.element.offsetWidth+"px";var l=100*Math.round(parseInt(t.style.width,10)/100);o.appendChild(t);var p=window.open("","print","height=550,width="+l+",tabbar=no");p.document.write("<!DOCTYPE html><html><head>"+r+"</head><body>"+o.innerHTML+"<script>(function() { window.ready = true; })();<\/script></body></html>"),p.document.close(),p.focus(),setTimeout((function(){if(p.ready&&n){n.scrollLeft=n.scrollLeft,n.scrollTop=n.scrollTop;var e=p.document.querySelector(".e-date-header-wrap");e&&(e.scrollLeft=n.scrollLeft);var t=p.document.querySelector(".e-time-cells-wrap");t&&(t.scrollTop=n.scrollTop);var r=p.document.querySelector(i);r&&(r.scrollLeft=n.scrollLeft,r.scrollTop=n.scrollTop),p.print(),p.close()}}),500)},t.prototype.printSchedulerWithModel=function(t){var i=(0,e.createElement)("div",{id:this.parent.element.id+"_print",className:"e-print-schedule"});document.body.appendChild(i),Ho.Inject(_o,Xo,Ko,Jo,al,ol,cl,dl,el,gl),this.printInstance=new Ho(this.getPrintScheduleModel(t)),this.printInstance.isPrinting=!0,this.printInstance.root=this.parent.root?this.parent.root:this.parent,this.printInstance.appendTo(i),this.printInstance.on(P,this.contentReady,this),this.printWindow=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),this.printWindow.moveTo(0,0),this.printWindow.resizeTo(screen.availWidth,screen.availHeight)},t.prototype.getPrintScheduleModel=function(t){for(var i,n,r,a,s={},o=["cellHeaderTemplate","dayHeaderTemplate","monthHeaderTemplate","cellTemplate","dateHeaderTemplate","dateRangeTemplate","eventTemplate","resourceHeaderTemplate","headerIndentTemplate"],l=["actionBegin","actionComplete","actionFailure","created","dataBinding","dataBound","destroyed","eventRendered","moreEventsClick","navigating","popupOpen","popupClose","renderCell"],p=0,c=["agendaDaysCount","calendarMode","cssClass","currentView","dateFormat","enableRtl","endHour","eventSettings","firstDayOfWeek","firstMonthOfYear","group","height","locale","maxDate","minDate","readonly","resources","rowAutoHeight","selectedDate","showHeaderBar","showTimeIndicator","showWeekNumber","showWeekend","startHour","timeFormat","timeScale","timezone","views","width","workDays","workHours","dateHeaderTemplate","dateRangeTemplate","cellHeaderTemplate","dayHeaderTemplate","monthHeaderTemplate","cellTemplate","resourceHeaderTemplate","headerIndentTemplate","actionBegin","actionComplete","actionFailure","created","dataBinding","dataBound","destroyed","eventRendered","moreEventsClick","navigating","popupOpen","popupClose","renderCell"];p<c.length;p++){var h=c[p];switch(h){case"eventSettings":(i=Object.assign({},this.parent.eventSettings.properties)).dataSource=this.parent.eventsData;var d=(0,e.isNullOrUndefined)(t.eventSettings)||(0,e.isNullOrUndefined)(t.eventSettings.template)?i.template:t.eventSettings.template;i.template=this.parent.isAngular||"function"!=typeof d?d:null,s.eventSettings=i;break;case"group":(n=(0,e.isNullOrUndefined)(t.group)?this.parent.group:t.group).headerTooltipTemplate=null,s.group=n;break;case"timeScale":r=(0,e.isNullOrUndefined)(t.timeScale)?this.parent.timeScale:t.timeScale,this.parent.isAngular||(r.majorSlotTemplate="function"==typeof r.majorSlotTemplate?null:r.majorSlotTemplate,r.minorSlotTemplate="function"==typeof r.minorSlotTemplate?null:r.minorSlotTemplate),s.timeScale=r;break;case"views":if(a=(0,e.isNullOrUndefined)(t.views)?this.parent.views:t.views,!this.parent.isAngular&&a&&a.length>0&&"object"==typeof a[0])for(var u=function(t){o.forEach((function(i){(0,e.isNullOrUndefined)(t[""+i])||(t[""+i]="function"==typeof t[""+i]?null:t[""+i])}))},g=0,v=a;g<v.length;g++){u(v[g])}s.views=a;break;default:if(o.indexOf(h)>-1){s[""+h]=(0,e.isNullOrUndefined)(t[""+h])?this.parent.isAngular||"function"!=typeof this.parent[""+h]?this.parent[""+h]:null:this.parent.isAngular||"function"!=typeof t[""+h]?t[""+h]:null;break}if(l.indexOf(h)>-1){s[""+h]=t[""+h];break}s[""+h]=(0,e.isNullOrUndefined)(t[""+h])?this.parent[""+h]:t[""+h]}}return s},t.prototype.contentReady=function(){var t=this;this.printWindow=(0,e.print)(this.printInstance.element,this.printWindow),this.printWindow.onbeforeunload=function(){t.printInstance.off(P,t.contentReady),t.printInstance.element.remove(),t.printInstance.destroy(),t.printInstance=null,t.printWindow=null}},t.prototype.getModuleName=function(){return"print"},t.prototype.destroy=function(){this.parent=null},t}()})(),u})()));