{"version":3,"sources":["webpack:///./node_modules/@syncfusion/ej2-schedule/src/schedule/base/css-constant.js","webpack:///./node_modules/@syncfusion/ej2-schedule/src/schedule/base/resource.js","webpack:///./node_modules/@syncfusion/ej2-schedule/src/schedule/base/schedule.js","webpack:///./node_modules/@syncfusion/ej2-schedule/src/schedule/base/util.js","webpack:///./node_modules/@syncfusion/ej2-schedule/src/schedule/base/constant.js"],"names":["ROOT","RTL","DEVICE_CLASS","MULTI_DRAG","ICON","ENABLE_CLASS","DISABLE_CLASS","TABLE_CONTAINER_CLASS","SCHEDULE_TABLE_CLASS","ALLDAY_CELLS_CLASS","HEADER_POPUP_CLASS","HEADER_CALENDAR_CLASS","ALLDAY_ROW_CLASS","CONTENT_TABLE_CLASS","WORK_CELLS_CLASS","WORK_HOURS_CLASS","POPUP_OPEN","DATE_HEADER_WRAP_CLASS","DATE_HEADER_CONTAINER_CLASS","HEADER_CELLS_CLASS","HEADER_WEEK_CELLS_CLASS","HEADER_MONTH_CELLS_CLASS","HEADER_YEAR_CELLS_CLASS","OTHERMONTH_CLASS","CURRENT_DAY_CLASS","CURRENTDATE_CLASS","CURRENT_PANEL_CLASS","PREVIOUS_PANEL_CLASS","NEXT_PANEL_CLASS","PREVIOUS_DATE_CLASS","NEXT_DATE_CLASS","TRANSLATE_CLASS","LEFT_INDENT_CLASS","LEFT_INDENT_WRAP_CLASS","EVENT_TABLE_CLASS","RESOURCE_LEFT_TD_CLASS","RESOURCE_GROUP_CELLS_CLASS","RESOURCE_TEXT_CLASS","RESOURCE_COLUMN_WRAP_CLASS","RESOURCE_COLUMN_TABLE_CLASS","RESOURCE_CHILD_CLASS","RESOURCE_PARENT_CLASS","RESOURCE_EXPAND_CLASS","RESOURCE_COLLAPSE_CLASS","RESOURCE_TREE_ICON_CLASS","RESOURCE_CELLS_CLASS","TIME_CELLS_WRAP_CLASS","TIME_CELLS_CLASS","TIME_SLOT_CLASS","ALTERNATE_CELLS_CLASS","CURRENT_TIME_CLASS","CURRENT_TIMELINE_CLASS","PREVIOUS_TIMELINE_CLASS","HIDE_CHILDS_CLASS","SCROLL_CONTAINER_CLASS","TIMELINE_WRAPPER_CLASS","APPOINTMENT_WRAPPER_CLASS","DAY_WRAPPER_CLASS","TOOLBAR_CONTAINER","RESOURCE_TOOLBAR_CONTAINER","HEADER_TOOLBAR","RESOURCE_HEADER_TOOLBAR","SELECTED_CELL_CLASS","WEEK_NUMBER_WRAPPER_CLASS","WEEK_NUMBER_CLASS","WRAPPER_CONTAINER_CLASS","APPOINTMENT_CONTAINER_CLASS","APPOINTMENT_CLASS","BLOCK_APPOINTMENT_CLASS","BLOCK_INDICATOR_CLASS","APPOINTMENT_BORDER","APPOINTMENT_DETAILS","SUBJECT_WRAP","RESOURCE_NAME","APPOINTMENT_TIME","TABLE_WRAP_CLASS","OUTER_TABLE_CLASS","CONTENT_WRAP_CLASS","VIRTUAL_TRACK_CLASS","AGENDA_CELLS_CLASS","AGENDA_CURRENT_DAY_CLASS","AGENDA_SELECTED_CELL","MONTH_HEADER_CLASS","AGENDA_HEADER_CLASS","AGENDA_RESOURCE_CLASS","AGENDA_DATE_CLASS","NAVIGATE_CLASS","DATE_HEADER_CLASS","AGENDA_DAY_BORDER_CLASS","DATE_BORDER_CLASS","AGENDA_DAY_PADDING_CLASS","DATE_TIME_CLASS","DATE_TIME_WRAPPER_CLASS","AGENDA_EMPTY_EVENT_CLASS","AGENDA_NO_EVENT_CLASS","EVENT_INDICATOR_CLASS","EVENT_ICON_UP_CLASS","EVENT_ICON_DOWN_CLASS","EVENT_ICON_LEFT_CLASS","EVENT_ICON_RIGHT_CLASS","EVENT_ACTION_CLASS","NEW_EVENT_CLASS","DRAG_CLONE_CLASS","EVENT_RESIZE_CLASS","RESIZE_CLONE_CLASS","LEFT_RESIZE_HANDLER","RIGHT_RESIZE_HANDLER","TOP_RESIZE_HANDLER","BOTTOM_RESIZE_HANDLER","EVENT_RECURRENCE_ICON_CLASS","EVENT_RECURRENCE_EDIT_ICON_CLASS","HEADER_ROW_CLASS","ALLDAY_APPOINTMENT_WRAPPER_CLASS","ALLDAY_APPOINTMENT_CLASS","EVENT_COUNT_CLASS","ROW_COUNT_WRAPPER_CLASS","ALLDAY_APPOINTMENT_SECTION_CLASS","APPOINTMENT_ROW_EXPAND_CLASS","APPOINTMENT_ROW_COLLAPSE_CLASS","MORE_INDICATOR_CLASS","CELL_POPUP_CLASS","EVENT_POPUP_CLASS","MULTIPLE_EVENT_POPUP_CLASS","POPUP_HEADER_CLASS","POPUP_HEADER_ICON_WRAPPER","POPUP_CONTENT_CLASS","POPUP_FOOTER_CLASS","DATE_TIME_DETAILS_CLASS","RECURRENCE_SUMMARY_CLASS","QUICK_POPUP_EVENT_DETAILS_CLASS","EVENT_CREATE_CLASS","EDIT_EVENT_CLASS","DELETE_EVENT_CLASS","TEXT_ELLIPSIS","MORE_POPUP_WRAPPER_CLASS","MORE_EVENT_POPUP_CLASS","MORE_EVENT_HEADER_CLASS","MORE_EVENT_DATE_HEADER_CLASS","MORE_EVENT_HEADER_DAY_CLASS","MORE_EVENT_HEADER_DATE_CLASS","MORE_EVENT_CLOSE_CLASS","MORE_EVENT_CONTENT_CLASS","MORE_EVENT_WRAPPER_CLASS","QUICK_DIALOG_CLASS","QUICK_DIALOG_OCCURRENCE_CLASS","QUICK_DIALOG_SERIES_CLASS","QUICK_DIALOG_FOLLOWING_EVENTS_CLASS","FOLLOWING_EVENTS_DIALOG","QUICK_DIALOG_DELETE_CLASS","QUICK_DIALOG_CANCEL_CLASS","QUICK_DIALOG_ALERT_OK","QUICK_DIALOG_ALERT_CANCEL","QUICK_DIALOG_ALERT_FOLLOWING","QUICK_DIALOG_ALERT_BTN_CLASS","EVENT_WINDOW_DIALOG_CLASS","FORM_CONTAINER_CLASS","FORM_CLASS","EVENT_WINDOW_ALLDAY_TZ_DIV_CLASS","EVENT_WINDOW_ALL_DAY_CLASS","TIME_ZONE_CLASS","TIME_ZONE_ICON_CLASS","TIME_ZONE_DETAILS_CLASS","EVENT_WINDOW_REPEAT_DIV_CLASS","EVENT_WINDOW_REPEAT_CLASS","EVENT_WINDOW_TITLE_LOCATION_DIV_CLASS","SUBJECT_CLASS","LOCATION_CLASS","LOCATION_ICON_CLASS","LOCATION_DETAILS_CLASS","EVENT_WINDOW_START_END_DIV_CLASS","EVENT_WINDOW_START_CLASS","EVENT_WINDOW_END_CLASS","EVENT_WINDOW_RESOURCES_DIV_CLASS","DESCRIPTION_CLASS","DESCRIPTION_ICON_CLASS","DESCRIPTION_DETAILS_CLASS","EVENT_WINDOW_TIME_ZONE_DIV_CLASS","EVENT_WINDOW_START_TZ_CLASS","EVENT_WINDOW_END_TZ_CLASS","EVENT_WINDOW_BACK_ICON_CLASS","EVENT_WINDOW_SAVE_ICON_CLASS","EVENT_WINDOW_CANCEL_BUTTON_CLASS","EVENT_WINDOW_SAVE_BUTTON_CLASS","EVENT_WINDOW_DIALOG_PARENT_CLASS","EVENT_WINDOW_TITLE_TEXT_CLASS","EVENT_WINDOW_ICON_DISABLE_CLASS","EDIT_CLASS","EDIT_ICON_CLASS","DELETE_CLASS","DELETE_ICON_CLASS","CLOSE_CLASS","CLOSE_ICON_CLASS","ERROR_VALIDATION_CLASS","EVENT_TOOLTIP_ROOT_CLASS","ALLDAY_ROW_ANIMATE_CLASS","TIMESCALE_DISABLE","HIDDEN_CLASS","DISABLE_DATES","POPUP_WRAPPER_CLASS","POPUP_TABLE_CLASS","RESOURCE_MENU","RESOURCE_MENU_ICON","RESOURCE_LEVEL_TITLE","RESOURCE_TREE","RESOURCE_TREE_POPUP_OVERLAY","RESOURCE_TREE_POPUP","RESOURCE_CLASS","RESOURCE_ICON_CLASS","RESOURCE_DETAILS_CLASS","DATE_TIME_ICON_CLASS","VIRTUAL_SCROLL_CLASS","ICON_DISABLE_CLASS","AUTO_HEIGHT","IGNORE_WHITESPACE","EVENT_TEMPLATE","READ_ONLY","INLINE_SUBJECT_CLASS","INLINE_APPOINTMENT_CLASS","SCROLL_HIDDEN","ALLDAY_APPOINTMENT_SCROLL","ALLDAY_APPOINTMENT_AUTO","ResourceBase","parent","this","resourceCollection","leftPixel","resourceDateTree","prototype","renderResourceHeaderIndent","tr","resColTd","className","resColDiv","activeViewOptions","headerIndentTemplate","data","type","renderHeaderIndentTemplate","appendChild","args","elementType","element","trigger","hideResourceRows","tBody","length","virtualScrollModule","trCount","lastResourceLevel","i","resData","parseInt","toString","resourceData","res","resource","ClassName","expandedField","trCollection","slice","call","children","slicedCollection","Count","createResourceColumn","resColl","resDiv","tbl","activeView","createTableLayout","uiStateValues","isGroupAdaptive","rowAutoHeight","isTimelineView","group","resources","querySelector","generateTreeData","countCalculation","renderedResources","resourceCount","getRenderedCount","setExpandedResources","expandedResources","getContentRows","setRenderedResources","count","push","isExpanded","isVirtualScroll","left","rIndex","resRows","td","attrs","tabindex","ntd","cloneNode","util","name","iconClass","iconDiv","setMargin","add","onTreeIconClick","setResourceHeaderContent","setAttribute","groupIndex","textField","resourceHeaderTemplate","classCollection","ntr","value","enableRtl","style","marginRight","marginLeft","parentCollection","wholeCollection","collection","y","dataSource","x","totalCount","byGroupID","query","where","groupIDField","idField","executeLocal","z","e","_this","eventTooltip","close","hide","target","trElement","parentElement","index","getAttribute","cancel","event","requestType","classList","contains","actionArgs","eventElements","querySelectorAll","_i","eventElements_1","updateVirtualContent","updateContent","cssProperties","getCssProperties","module","notify","refreshEvents","pNode","rowCollection","workCellCollection","headerRowCollection","clickedRes","contentRows","eventRows","j","clonedCollection","expanded","trElem","rowIndex","splice","expand","startIndex","indexOf","sIndex","virtualTrack","updateVirtualTrackHeight","resTable","contentTable","eventTable","timeIndicator","height","offsetHeight","renderResourceHeader","resourceWrapper","innerHTML","currentView","getPanel","insertBefore","renderResourceHeaderText","menuClick","renderResourceTree","popupOverlay","treeWrapper","resourceTree","treeViewObj","cssClass","enableHtmlSanitizer","fields","id","text","child","nodeTemplate","nodeClicked","resourceClick","bind","created","resourceTreeCreated","appendTo","expandAll","treePopup","targetType","actionOnScroll","content","relateTo","hideAnimation","duration","showAnimation","viewPortElement","on","documentClick","portals","concat","renderTemplates","isTimeLine","treeCollection","resTreeColl","_loop_1","len","treeHandler","treeLevel","levelId","treeArgs","resObj","groupOrder","resourceId","resourceName","resourceChild","_a","tree","this_1","resourceTreeLevel","headerCollection","_loop_2","resourceLevel","this_2","resourceText","filter","sanitize","levelIcon","pop","headerWrapper","headerCollection_1","header","treeNodes","show","selectResourceByIndex","triggerEvents","node","preventDefault","renderModule","render","bindResourcesData","isSetModel","showSpinner","promises","dataModule","getData","generateQuery","Promise","all","then","dataManagerSuccess","catch","crudModule","dataManagerFailure","isDestroyed","length_1","resourceObj","getResourceModel","result","refreshLayout","field","title","allowMultiple","colorField","startHourField","endHourField","workDaysField","cssClassField","renderElements","setResourceCollection","requiredResources","colorIndex","index_1","_b","requiredResources_1","eventSettings","resourceColorField","generateResourceLevels","innerDates","resTreeGroup","lastColumnDates","prevResource","prevResourceData","prevOrder","resTree","id_1","items","dateCol","renderDates","resWorkDays","byDate","workDays","resStartHour","resEndHour","getRenderDates","getDateSlots","dateSlots","generateCustomHours","resCssClass","slotData","resourceLevelIndex","colSpan","generateHeaderLevels","startHour","endHour","dateSlots_1","dateSlot","getStartEndTime","headerDates","headerLevels","temp","currentLevelChilds","currentLevelChilds_1","currentLevelChild","nextLevelChilds","_c","nextLevelChilds_1","nextLevelChild","_d","_e","lastLevelResource","dateHeaderLevels","levels","datesColumn","hideNonWorkingDays","renderDates_1","dateIndex","_loop_3","headerDate","this_3","currentDateLevels","_loop_4","date","getDay","resTd_1","_loop_5","k","filterDates","currentLevel","filteredResource","existedResource","filteredTd","l","_f","headerDates_1","forEach","sort","a","b","getTime","unshift","dateColSpan","_g","_h","firstRowTd","_j","headerDates_2","resGroup","length_2","_k","_l","resTd","setResourceValues","eventObj","setValues","allowGroupEdit","activeCellsData","getResourceColor","colorFieldIndex","filterData","getCssClass","getResourceRenderDates","resourceDates","apply","map","removeDuplicateDates","dateColl","dates","dateObj","getResourceData","groupEditIndex","groupEditIndex_1","level","length_3","fieldName","length_4","addResource","Array","_loop_6","addObj","json","insert","state_1","removeResource","_loop_7","removeObj","remove","state_2","getIndexFromResourceId","parentField","resourceExpand","click","resourceScroll","isAdaptive","levelName","levelIndex","scrollElement","virtual","averageRowHeight","Math","round","scrollTop","virtualScrolling","bufferCount","offsetTop","offsetTarget","offset","offsetLeft","scrollLeft","destroy","off","treeViewTemplates","propName","resetTemplates","resToolBarEle","__extends","extendStatics","d","Object","setPrototypeOf","__proto__","p","hasOwnProperty","__","constructor","create","__decorate","decorators","key","desc","c","arguments","r","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","_super","Schedule","options","addClasses","removeClasses","allowMultiDrag","split","cssClass_1","cls_1","validateDate","scrollModule","setWidth","setHeight","eventBase","workCellAction","allowKeyboardInteraction","keyboardInteractionModule","inlineModule","initializeDataModule","renderTableContainer","getActiveViewOptions","initializeResources","wireEvents","createElement","callback","isReact","renderReactTemplates","templates","isAngular","clearTemplate","innerText","resourceBase","isLayoutOnly","initializeView","eventWindow","refresh","destroyHeaderModule","showHeaderBar","headerModule","isDevice","isTouch","scheduleTouchModule","destroyPopups","isPrinting","initializePopups","selectedDate","Date","minDate","maxDate","Error","setProperties","updateMinMaxDateToEditor","getViewIndex","viewName","item","viewCollections","checkIndex","option","setViewOptions","isModuleLoad","selectedView","viewOptions","prevIndex","viewIndex","views","view","isOptions","isSelected","obj","fieldViewName","charAt","toLowerCase","cellHeaderTemplateName","cellHeaderTemplate","dateHeaderTemplateName","dateHeaderTemplate","dateRangeTemplateName","dateRangeTemplate","cellTemplateName","cellTemplate","dayHeaderTemplateName","dayHeaderTemplate","monthHeaderTemplateName","monthHeaderTemplate","resourceHeaderTemplateName","headerIndentTemplateName","eventTemplateName","eventTemplate","firstDayOfWeek","interval","currentIndex","timeScale","enable","slotCount","majorSlotTemplate","minorSlotTemplate","isYearView","headerTooltipTemplate","enableCompactView","scheduleOptions","dateFormat","readonly","allowVirtualScrolling","template","firstMonthOfYear","monthsCount","showWeekend","showWeekNumber","displayName","timeFormat","internalTimeFormat","headerRows","orientation","numberOfWeeks","displayDate","viewsData","undefined","eventFields","isBlock","subject","startTime","endTime","startTimezone","endTimezone","location","description","isAllDay","recurrenceID","recurrenceRule","recurrenceException","isReadonly","followingID","setEditorTitles","editorTitles","localeObj","getConstant","initializeTemplates","cellHeaderTemplateFn","templateParser","dayHeaderTemplateFn","monthHeaderTemplateFn","cellTemplateFn","dateHeaderTemplateFn","dateRangeTemplateFn","majorSlotTemplateFn","minorSlotTemplateFn","appointmentTemplateFn","resourceHeaderTemplateFn","headerIndentTemplateFn","headerTooltipTemplateFn","eventTooltipTemplateFn","tooltipTemplate","editorTemplateFn","editorTemplate","quickInfoTemplatesHeaderFn","quickInfoTemplates","quickInfoTemplatesContentFn","quickInfoTemplatesFooterFn","footer","quickPopup","getDayNames","cldrObj","culShortNames","nameSpace","locale","getCalendarMode","keys","setCldrTimeFormat","calendarMode","getTimeString","time","globalize","formatDate","format","calendar","toLocaleUpperCase","getDateTime","setCalendarMode","calendarUtil","changeView","muteOnChange","previousView","navArgs","action","currentDate","navigationArgs","isVertical","isInitial","top","updateActiveView","setCalendarDate","setCalendarView","animateLayout","changeDate","previousDate","monthAgendaModule","monthAgendaDate","isMinMaxDate","isSelectedDate","setHours","getCurrentTime","timezone","tzModule","convert","getLocalTimezoneName","getNavigateView","timingFunction","animate","requiredModules","modules","member","allowDragAndDrop","allowResizing","preRender","isIgnoreOccurrence","isCustomMonth","isPreventTimezone","currentTimezoneDate","activeEventData","getDefaultLocale","getModuleName","defaultLocale","eventsData","eventsProcessed","blockData","blockProcessed","currentAction","selectedElements","day","week","workWeek","month","year","agenda","weekAgenda","workWeekAgenda","monthAgenda","today","noEvents","emptyContainer","allDay","start","end","more","noTitle","delete","deleteEvent","deleteMultipleEvent","selectedItems","deleteSeries","edit","editSeries","editEvent","createEvent","addTitle","moreDetails","save","editContent","deleteContent","deleteMultipleContent","newEvent","repeat","saveButton","cancelButton","deleteButton","recurrence","wrongPattern","seriesChangeAlert","createError","sameDayAlert","occurenceAlert","editRecurrence","repeats","alert","startEndError","invalidDateError","blockAlert","ok","yes","no","occurrence","series","previous","next","timelineDay","timelineWeek","timelineWorkWeek","timelineMonth","timelineYear","editFollowingEvent","deleteTitle","editTitle","beginFrom","endAt","expandAllDaySection","collapseAllDaySection","searchTimezone","noRecords","window","onScheduleResize","document","touchStartEvent","onDocumentClick","removeSelectedClass","selectedCells","getSelectedCells","selectedCells_1","cell","removeAttribute","addSelectedClass","cells","focusCell","isPreventScroll","cells_1","focus","preventScroll","selectCell","getAllDayRow","getContentTable","getTableRows","getWorkCellElements","getIndexOfDate","Number","isAllDayCell","getDateFromElement","dateString","dateInMS","getTargetElement","selector","targetElement","elementFromPoint","closest","getCellHeaderTemplate","getDayHeaderTemplate","getMonthHeaderTemplate","getCellTemplate","getDateHeaderTemplate","getDateRangeTemplate","getMajorSlotTemplate","getMinorSlotTemplate","getAppointmentTemplate","getEventTooltipTemplate","getHeaderTooltipTemplate","getEditorTemplate","getQuickInfoTemplatesHeader","getQuickInfoTemplatesContent","getQuickInfoTemplatesFooter","getResourceHeaderTemplate","getHeaderIndentTemplate","cssProps","border","padding","rtlBorder","rtlPadding","removeNewEventElement","eventClone","startEndTime","startEndDate","timeString","activeElement","highlightCurrentTime","onClosePopup","resetColWidth","isPreventScrollUpdate","trim","error","getAnnouncementString","constantText","getResourceText","recordSubject","default","skeleton","startDateText","endDateText","announcementString","boundaryValidation","pageY","pageX","autoScrollDistance","scrollEdges","right","bottom","viewBoundaries","getBoundingClientRect","pageYOffset","pageXOffset","getWeekNumberContent","weekNumber","weekRule","weekNumberDate","formatNumber","weekFirstDate","weekLastDate","weekMidDate","scheduleId","templateId","indentTemplate","isSpecificResourceEvents","unWireEvents","getPersistData","addOnPersist","onPropertyChanged","newProp","oldProp","state","isRefresh","isResource","isDate","isView","isLayout","isDataManager","prop","updateItems","updateDateRange","JSON","stringify","refreshRecurrenceEditor","timezonePropertyChange","setCalendarTimezone","setRtlClass","extendedPropertyChange","propertyChangeAction","dragAndDropModule","actionObj","refreshDataManager","allDayRowScrollUpdate","dateHeader","allDayRow","enableAllDayScroll","allDayExpandScroll","allDayCells","properties","width","onEventSettingsPropertyChanged","setDialogContent","onGroupSettingsPropertyChanged","refreshDateTimePicker","enableTooltip","refreshQuickDialog","updateAddIcon","hideSpinner","setWorkHours","getWorkHourCells","resetWorkHours","workHourCells","tableEle","setMilliseconds","viewStartHour","getStartHour","viewEndHour","getEndHour","msMajorInterval","msInterval","endIndex","ceil","tempStartIndex","tempEndIndex","dates_1","colIndex","slotsPerDay","rows","tds","getCellDetails","tdCol","firstTd","lastTd","endDateFromColSpan","getEndDateFromStartDate","getSelectedElements","getResourceCollections","setResourceCollections","resourceCol","changeCurrentView","getCurrentViewIndex","getResourcesByIndex","groupData","expandResource","collapseResource","scrollTo","hour","scrollDate","scrollToDate","scrollToHour","scrollToResource","groupName","exportToICalendar","fileName","customData","iCalendarExportModule","initializeCalendarExport","importICalendar","fileContent","iCalendarImportModule","initializeCalendarImport","addEvent","generateEventOccurrences","startDate","generateOccurrence","exportToExcel","excelExportOptions","excelExportModule","initializeExcelExport","print","printOptions","printModule","saveEvent","getEvents","endDate","includeOccurrences","eventCollections","getProcessedEvents","filterEventsByRange","getBlockEvents","getOccurrencesByID","eventID","getOccurrencesByRange","getCurrentViewDates","setRecurrenceEditor","recurrenceEditor","getEventMaxID","getDeletedOccurrences","recurrenceData","getCurrentViewEvents","isRemoteRefresh","refreshProcessedData","refreshTemplates","templateName","refreshHeader","refreshResourceHeader","getEventDetails","guid","getEventByGuid","isSlotAvailable","eventStart","eventEnd","getGroupIndexFromEvent","eventCollection","filterEvents","filterEventsByResource","Guid","openEditor","isEventData","repeatType","closeEditor","dialogClose","openQuickInfoPopup","cellData","getAdjustedDate","workCell","app","selectEvent","occurence","removeSelectedAppointmentClass","addSelectedAppointments","closeQuickInfoPopup","quickPopupHide","closeTooltip","removeEventListener","modules_1","WEEK_LENGTH","MS_PER_DAY","MS_PER_MINUTE","getElementHeightFromClass","container","elementClass","el","visibility","position","getElementWidthFromClass","getTranslateY","getComputedStyle","WebKitCSSMatrix","webkitTransform","m42","getTranslateX","m41","getWeekFirstDate","date1","setDate","getDate","getWeekLastDate","weekFirst","weekLast","getFullYear","getMonth","firstDateOfMonth","lastDateOfMonth","getWeekNumber","valueOf","dayOfYear","getWeekMiddleDate","setTime","tzOffsetBefore","getTimezoneOffset","tzOffsetDiff","resetTime","getDateInMs","localOffset","dateOffset","timezoneOffset","getDateCount","addDays","noOfDays","addMonths","noOfMonths","setMonth","min","getMaxDays","getStartEndHours","getHours","setMinutes","getMinutes","setSeconds","getSeconds","date2","getDaysCount","strTime","getDateFromString","match","replace","getScrollBarWidth","divNode","cssText","body","ratio","devicePixelRatio","toFixed","floor","offsetWidth","clientWidth","removeChild","findIndexInData","field_1","join","includes","getOuterHeight","marginTop","marginBottom","removeChildren","elementChildren","elementChildren_1","elementChild","isDaylightSavingTime","jan","jul","max","getUniversalTime","hours","minutes","seconds","milliseconds","getMilliseconds","UTC","isMobile","navigator","userAgent","isIPadDevice","capitalizeFirstWord","inputString","substring","array","cellClick","cellDoubleClick","moreEventsClick","select","hover","actionBegin","actionComplete","actionFailure","navigating","renderCell","eventClick","eventRendered","dataBinding","dataBound","popupOpen","popupClose","inlineClick","cellSelect","dataReady","eventsLoaded","contentReady","scroll","virtualScroll","scrollUiUpdate","uiUpdate","cellMouseDown"],"mappings":"0HAAA,6qPAIO,IAAIA,EAAO,aAEPC,EAAM,QAENC,EAAe,WAEfC,EAAa,eAEbC,EAAO,UAEPC,EAAe,WAEfC,EAAgB,YAEhBC,EAAwB,oBAExBC,EAAuB,mBAEvBC,EAAqB,kBAErBC,EAAqB,iBAErBC,EAAwB,oBAExBC,EAAmB,gBAEnBC,EAAsB,kBAEtBC,EAAmB,eAEnBC,EAAmB,eAEnBC,EAAa,eAIbC,EAAyB,qBAEzBC,EAA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AAS,SAETC,EAAgB,iBAEhBC,EAAiB,mBAEjBC,EAAW,YAEXt6B,EAAgB,iBAEhBu6B,EAAgB","file":"js/chunk-vendors~9a110f65.8eab58a4.4.2.0.js","sourcesContent":["/**\n * CSS Constants\n */\n/** @private */\nexport var ROOT = 'e-schedule';\n/** @private */\nexport var RTL = 'e-rtl';\n/** @private */\nexport var DEVICE_CLASS = 'e-device';\n/** @private */\nexport var MULTI_DRAG = 'e-multi-drag';\n/** @private */\nexport var ICON = 'e-icons';\n/** @private */\nexport var ENABLE_CLASS = 'e-enable';\n/** @private */\nexport var DISABLE_CLASS = 'e-disable';\n/** @private */\nexport var TABLE_CONTAINER_CLASS = 'e-table-container';\n/** @private */\nexport var SCHEDULE_TABLE_CLASS = 'e-schedule-table';\n/** @private */\nexport var ALLDAY_CELLS_CLASS = 'e-all-day-cells';\n/** @private */\nexport var HEADER_POPUP_CLASS = 'e-header-popup';\n/** @private */\nexport var HEADER_CALENDAR_CLASS = 'e-header-calendar';\n/** @private */\nexport var ALLDAY_ROW_CLASS = 'e-all-day-row';\n/** @private */\nexport var CONTENT_TABLE_CLASS = 'e-content-table';\n/** @private */\nexport var WORK_CELLS_CLASS = 'e-work-cells';\n/** @private */\nexport var WORK_HOURS_CLASS = 'e-work-hours';\n/** @private */\nexport var POPUP_OPEN = 'e-popup-open';\n/** @private */\nexport var POPUP_CLOSE = 'e-popup-close';\n/** @private */\nexport var DATE_HEADER_WRAP_CLASS = 'e-date-header-wrap';\n/** @private */\nexport var DATE_HEADER_CONTAINER_CLASS = 'e-date-header-container';\n/** @private */\nexport var HEADER_CELLS_CLASS = 'e-header-cells';\n/** @private */\nexport var HEADER_WEEK_CELLS_CLASS = 'e-header-week-cell';\n/** @private */\nexport var HEADER_MONTH_CELLS_CLASS = 'e-header-month-cell';\n/** @private */\nexport var HEADER_YEAR_CELLS_CLASS = 'e-header-year-cell';\n/** @private */\nexport var WORKDAY_CLASS = 'e-work-days';\n/** @private */\nexport var OTHERMONTH_CLASS = 'e-other-month';\n/** @private */\nexport var CURRENT_DAY_CLASS = 'e-current-day';\n/** @private */\nexport var CURRENTDATE_CLASS = 'e-current-date';\n/** @private */\nexport var CURRENT_PANEL_CLASS = 'e-current-panel';\n/** @private */\nexport var PREVIOUS_PANEL_CLASS = 'e-previous-panel';\n/** @private */\nexport var NEXT_PANEL_CLASS = 'e-next-panel';\n/** @private */\nexport var PREVIOUS_DATE_CLASS = 'e-prev';\n/** @private */\nexport var NEXT_DATE_CLASS = 'e-next';\n/** @private */\nexport var TRANSLATE_CLASS = 'e-translate';\n/** @private */\nexport var LEFT_INDENT_CLASS = 'e-left-indent';\n/** @private */\nexport var LEFT_INDENT_WRAP_CLASS = 'e-left-indent-wrap';\n/** @private */\nexport var EVENT_TABLE_CLASS = 'e-event-table';\n/** @private */\nexport var RESOURCE_LEFT_TD_CLASS = 'e-resource-left-td';\n/** @private */\nexport var RESOURCE_GROUP_CELLS_CLASS = 'e-resource-group-cells';\n/** @private */\nexport var RESOURCE_TEXT_CLASS = 'e-resource-text';\n/** @private */\nexport var RESOURCE_COLUMN_WRAP_CLASS = 'e-resource-column-wrap';\n/** @private */\nexport var RESOURCE_COLUMN_TABLE_CLASS = 'e-resource-column-table';\n/** @private */\nexport var RESOURCE_CHILD_CLASS = 'e-child-node';\n/** @private */\nexport var RESOURCE_PARENT_CLASS = 'e-parent-node';\n/** @private */\nexport var RESOURCE_EXPAND_CLASS = 'e-resource-expand';\n/** @private */\nexport var RESOURCE_COLLAPSE_CLASS = 'e-resource-collapse';\n/** @private */\nexport var RESOURCE_TREE_ICON_CLASS = 'e-resource-tree-icon';\n/** @private */\nexport var RESOURCE_CELLS_CLASS = 'e-resource-cells';\n/** @private */\nexport var TIME_CELLS_WRAP_CLASS = 'e-time-cells-wrap';\n/** @private */\nexport var TIME_CELLS_CLASS = 'e-time-cells';\n/** @private */\nexport var TIME_SLOT_CLASS = 'e-time-slots';\n/** @private */\nexport var ALTERNATE_CELLS_CLASS = 'e-alternate-cells';\n/** @private */\nexport var CURRENT_TIME_CLASS = 'e-current-time';\n/** @private */\nexport var CURRENT_TIMELINE_CLASS = 'e-current-timeline';\n/** @private */\nexport var PREVIOUS_TIMELINE_CLASS = 'e-previous-timeline';\n/** @private */\nexport var HIDE_CHILDS_CLASS = 'e-hide-childs';\n/** @private */\nexport var SCROLL_CONTAINER_CLASS = 'e-scroll-container';\n/** @private */\nexport var WRAPPER_CLASS = 'e-wrapper';\n/** @private */\nexport var TIMELINE_WRAPPER_CLASS = 'e-timeline-wrapper';\n/** @private */\nexport var APPOINTMENT_WRAPPER_CLASS = 'e-appointment-wrapper';\n/** @private */\nexport var DAY_WRAPPER_CLASS = 'e-day-wrapper';\n/** @private */\nexport var TOOLBAR_CONTAINER = 'e-schedule-toolbar-container';\n/** @private */\nexport var RESOURCE_TOOLBAR_CONTAINER = 'e-schedule-resource-toolbar-container';\n/** @private */\nexport var HEADER_TOOLBAR = 'e-schedule-toolbar';\n/** @private */\nexport var RESOURCE_HEADER_TOOLBAR = 'e-schedule-resource-toolbar';\n/** @private */\nexport var SELECTED_CELL_CLASS = 'e-selected-cell';\n/** @private */\nexport var WEEK_NUMBER_WRAPPER_CLASS = 'e-week-number-wrapper';\n/** @private */\nexport var WEEK_NUMBER_CLASS = 'e-week-number';\n/** @private */\nexport var APPOINTMENT_WRAP_CLASS = 'e-appointment-wrap';\n/** @private */\nexport var WRAPPER_CONTAINER_CLASS = 'e-wrapper-container';\n/** @private */\nexport var APPOINTMENT_CONTAINER_CLASS = 'e-appointment-container';\n/** @private */\nexport var APPOINTMENT_CLASS = 'e-appointment';\n/** @private */\nexport var BLOCK_APPOINTMENT_CLASS = 'e-block-appointment';\n/** @private */\nexport var BLOCK_INDICATOR_CLASS = 'e-block-indicator';\n/** @private */\nexport var APPOINTMENT_BORDER = 'e-appointment-border';\n/** @private */\nexport var APPOINTMENT_DETAILS = 'e-appointment-details';\n/** @private */\nexport var SUBJECT_WRAP = 'e-subject-wrap';\n/** @private */\nexport var RESOURCE_NAME = 'e-resource-name';\n/** @private */\nexport var APPOINTMENT_TIME = 'e-time';\n/** @private */\nexport var TABLE_WRAP_CLASS = 'e-table-wrap';\n/** @private */\nexport var OUTER_TABLE_CLASS = 'e-outer-table';\n/** @private */\nexport var CONTENT_WRAP_CLASS = 'e-content-wrap';\n/** @private */\nexport var VIRTUAL_TRACK_CLASS = 'e-virtual-track';\n/** @private */\nexport var AGENDA_CELLS_CLASS = 'e-agenda-cells';\n/** @private */\nexport var AGENDA_CURRENT_DAY_CLASS = 'e-current-day';\n/** @private */\nexport var AGENDA_SELECTED_CELL = 'e-active-appointment-agenda';\n/** @private */\nexport var MONTH_HEADER_CLASS = 'e-month-header';\n/** @private */\nexport var AGENDA_HEADER_CLASS = 'e-day-date-header';\n/** @private */\nexport var AGENDA_RESOURCE_CLASS = 'e-resource-column';\n/** @private */\nexport var AGENDA_DATE_CLASS = 'e-date-column';\n/** @private */\nexport var NAVIGATE_CLASS = 'e-navigate';\n/** @private */\nexport var DATE_HEADER_CLASS = 'e-date-header';\n/** @private */\nexport var AGENDA_DAY_BORDER_CLASS = 'e-day-border';\n/** @private */\nexport var DATE_BORDER_CLASS = 'e-date-border';\n/** @private */\nexport var AGENDA_DAY_PADDING_CLASS = 'e-day-padding';\n/** @private */\nexport var DATE_TIME_CLASS = 'e-date-time';\n/** @private */\nexport var DATE_TIME_WRAPPER_CLASS = 'e-date-time-wrapper';\n/** @private */\nexport var AGENDA_EMPTY_EVENT_CLASS = 'e-empty-event';\n/** @private */\nexport var AGENDA_NO_EVENT_CLASS = 'e-no-event';\n/** @private */\nexport var APPOINTMENT_INDICATOR_CLASS = 'e-appointment-indicator';\n/** @private */\nexport var EVENT_INDICATOR_CLASS = 'e-indicator';\n/** @private */\nexport var EVENT_ICON_UP_CLASS = 'e-up-icon';\n/** @private */\nexport var EVENT_ICON_DOWN_CLASS = 'e-down-icon';\n/** @private */\nexport var EVENT_ICON_LEFT_CLASS = 'e-left-icon';\n/** @private */\nexport var EVENT_ICON_RIGHT_CLASS = 'e-right-icon';\n/** @private */\nexport var EVENT_ACTION_CLASS = 'e-event-action';\n/** @private */\nexport var NEW_EVENT_CLASS = 'e-new-event';\n/** @private */\nexport var CLONE_ELEMENT_CLASS = 'e-schedule-event-clone';\n/** @private */\nexport var MONTH_CLONE_ELEMENT_CLASS = 'e-month-event';\n/** @private */\nexport var CLONE_TIME_INDICATOR_CLASS = 'e-clone-time-indicator';\n/** @private */\nexport var DRAG_CLONE_CLASS = 'e-drag-clone';\n/** @private */\nexport var EVENT_RESIZE_CLASS = 'e-event-resize';\n/** @private */\nexport var RESIZE_CLONE_CLASS = 'e-resize-clone';\n/** @private */\nexport var LEFT_RESIZE_HANDLER = 'e-left-handler';\n/** @private */\nexport var RIGHT_RESIZE_HANDLER = 'e-right-handler';\n/** @private */\nexport var TOP_RESIZE_HANDLER = 'e-top-handler';\n/** @private */\nexport var BOTTOM_RESIZE_HANDLER = 'e-bottom-handler';\n/** @private */\nexport var EVENT_RECURRENCE_ICON_CLASS = 'e-recurrence-icon';\n/** @private */\nexport var EVENT_RECURRENCE_EDIT_ICON_CLASS = 'e-recurrence-edit-icon';\n/** @private */\nexport var HEADER_ROW_CLASS = 'e-header-row';\n/** @private */\nexport var ALLDAY_APPOINTMENT_WRAPPER_CLASS = 'e-all-day-appointment-wrapper';\n/** @private */\nexport var ALLDAY_APPOINTMENT_CLASS = 'e-all-day-appointment';\n/** @private */\nexport var EVENT_COUNT_CLASS = 'e-appointment-hide';\n/** @private */\nexport var ROW_COUNT_WRAPPER_CLASS = 'e-row-count-wrapper';\n/** @private */\nexport var ALLDAY_APPOINTMENT_SECTION_CLASS = 'e-all-day-appointment-section';\n/** @private */\nexport var APPOINTMENT_ROW_EXPAND_CLASS = 'e-appointment-expand';\n/** @private */\nexport var APPOINTMENT_ROW_COLLAPSE_CLASS = 'e-appointment-collapse';\n/** @private */\nexport var MORE_INDICATOR_CLASS = 'e-more-indicator';\n/** @private */\nexport var CELL_POPUP_CLASS = 'e-cell-popup';\n/** @private */\nexport var EVENT_POPUP_CLASS = 'e-event-popup';\n/** @private */\nexport var MULTIPLE_EVENT_POPUP_CLASS = 'e-multiple-event-popup';\n/** @private */\nexport var POPUP_HEADER_CLASS = 'e-popup-header';\n/** @private */\nexport var POPUP_HEADER_ICON_WRAPPER = 'e-header-icon-wrapper';\n/** @private */\nexport var POPUP_CONTENT_CLASS = 'e-popup-content';\n/** @private */\nexport var POPUP_FOOTER_CLASS = 'e-popup-footer';\n/** @private */\nexport var DATE_TIME_DETAILS_CLASS = 'e-date-time-details';\n/** @private */\nexport var RECURRENCE_SUMMARY_CLASS = 'e-recurrence-summary';\n/** @private */\nexport var QUICK_POPUP_EVENT_DETAILS_CLASS = 'e-event-details';\n/** @private */\nexport var EVENT_CREATE_CLASS = 'e-event-create';\n/** @private */\nexport var EDIT_EVENT_CLASS = 'e-event-edit';\n/** @private */\nexport var DELETE_EVENT_CLASS = 'e-event-delete';\n/** @private */\nexport var TEXT_ELLIPSIS = 'e-text-ellipsis';\n/** @private */\nexport var MORE_POPUP_WRAPPER_CLASS = 'e-more-popup-wrapper';\n/** @private */\nexport var MORE_EVENT_POPUP_CLASS = 'e-more-event-popup';\n/** @private */\nexport var MORE_EVENT_HEADER_CLASS = 'e-more-event-header';\n/** @private */\nexport var MORE_EVENT_DATE_HEADER_CLASS = 'e-more-event-date-header';\n/** @private */\nexport var MORE_EVENT_HEADER_DAY_CLASS = 'e-header-day';\n/** @private */\nexport var MORE_EVENT_HEADER_DATE_CLASS = 'e-header-date';\n/** @private */\nexport var MORE_EVENT_CLOSE_CLASS = 'e-more-event-close';\n/** @private */\nexport var MORE_EVENT_CONTENT_CLASS = 'e-more-event-content';\n/** @private */\nexport var MORE_EVENT_WRAPPER_CLASS = 'e-more-appointment-wrapper';\n/** @private */\nexport var QUICK_DIALOG_CLASS = 'e-quick-dialog';\n/** @private */\nexport var QUICK_DIALOG_OCCURRENCE_CLASS = 'e-quick-dialog-occurrence-event';\n/** @private */\nexport var QUICK_DIALOG_SERIES_CLASS = 'e-quick-dialog-series-event';\n/** @private */\nexport var QUICK_DIALOG_FOLLOWING_EVENTS_CLASS = 'e-quick-dialog-following-events';\n/** @private */\nexport var FOLLOWING_EVENTS_DIALOG = 'e-following-events-dialog';\n/** @private */\nexport var QUICK_DIALOG_DELETE_CLASS = 'e-quick-dialog-delete';\n/** @private */\nexport var QUICK_DIALOG_CANCEL_CLASS = 'e-quick-dialog-cancel';\n/** @private */\nexport var QUICK_DIALOG_ALERT_OK = 'e-quick-alertok';\n/** @private */\nexport var QUICK_DIALOG_ALERT_CANCEL = 'e-quick-alertcancel';\n/** @private */\nexport var QUICK_DIALOG_ALERT_FOLLOWING = 'e-quick-alertfollowing';\n/** @private */\nexport var QUICK_DIALOG_ALERT_BTN_CLASS = 'e-quick-dialog-alert-btn';\n/** @private */\nexport var EVENT_WINDOW_DIALOG_CLASS = 'e-schedule-dialog';\n/** @private */\nexport var FORM_CONTAINER_CLASS = 'e-form-container';\n/** @private */\nexport var FORM_CLASS = 'e-schedule-form';\n/** @private */\nexport var EVENT_WINDOW_ALLDAY_TZ_DIV_CLASS = 'e-all-day-time-zone-row';\n/** @private */\nexport var EVENT_WINDOW_ALL_DAY_CLASS = 'e-all-day';\n/** @private */\nexport var TIME_ZONE_CLASS = 'e-time-zone';\n/** @private */\nexport var TIME_ZONE_ICON_CLASS = 'e-time-zone-icon';\n/** @private */\nexport var TIME_ZONE_DETAILS_CLASS = 'e-time-zone-details';\n/** @private */\nexport var EVENT_WINDOW_REPEAT_DIV_CLASS = 'e-repeat-parent-row';\n/** @private */\nexport var EVENT_WINDOW_REPEAT_CLASS = 'e-repeat';\n/** @private */\nexport var EVENT_WINDOW_TITLE_LOCATION_DIV_CLASS = 'e-title-location-row';\n/** @private */\nexport var SUBJECT_CLASS = 'e-subject';\n/** @private */\nexport var LOCATION_CLASS = 'e-location';\n/** @private */\nexport var LOCATION_ICON_CLASS = 'e-location-icon';\n/** @private */\nexport var LOCATION_DETAILS_CLASS = 'e-location-details';\n/** @private */\nexport var EVENT_WINDOW_START_END_DIV_CLASS = 'e-start-end-row';\n/** @private */\nexport var EVENT_WINDOW_START_CLASS = 'e-start';\n/** @private */\nexport var EVENT_WINDOW_END_CLASS = 'e-end';\n/** @private */\nexport var EVENT_WINDOW_RESOURCES_DIV_CLASS = 'e-resources-row';\n/** @private */\nexport var DESCRIPTION_CLASS = 'e-description';\n/** @private */\nexport var DESCRIPTION_ICON_CLASS = 'e-description-icon';\n/** @private */\nexport var DESCRIPTION_DETAILS_CLASS = 'e-description-details';\n/** @private */\nexport var EVENT_WINDOW_TIME_ZONE_DIV_CLASS = 'e-time-zone-row';\n/** @private */\nexport var EVENT_WINDOW_START_TZ_CLASS = 'e-start-time-zone';\n/** @private */\nexport var EVENT_WINDOW_END_TZ_CLASS = 'e-end-time-zone';\n/** @private */\nexport var EVENT_WINDOW_BACK_ICON_CLASS = 'e-back-icon';\n/** @private */\nexport var EVENT_WINDOW_SAVE_ICON_CLASS = 'e-save-icon';\n/** @private */\nexport var EVENT_WINDOW_CANCEL_BUTTON_CLASS = 'e-event-cancel';\n/** @private */\nexport var EVENT_WINDOW_SAVE_BUTTON_CLASS = 'e-event-save';\n/** @private */\nexport var EVENT_WINDOW_DIALOG_PARENT_CLASS = 'e-dialog-parent';\n/** @private */\nexport var EVENT_WINDOW_TITLE_TEXT_CLASS = 'e-title-text';\n/** @private */\nexport var EVENT_WINDOW_ICON_DISABLE_CLASS = 'e-icon-disable';\n/** @private */\nexport var EDIT_CLASS = 'e-edit';\n/** @private */\nexport var EDIT_ICON_CLASS = 'e-edit-icon';\n/** @private */\nexport var DELETE_CLASS = 'e-delete';\n/** @private */\nexport var DELETE_ICON_CLASS = 'e-delete-icon';\n/** @private */\nexport var CLOSE_CLASS = 'e-close';\n/** @private */\nexport var CLOSE_ICON_CLASS = 'e-close-icon';\n/** @private */\nexport var ERROR_VALIDATION_CLASS = 'e-schedule-error';\n/** @private */\nexport var EVENT_TOOLTIP_ROOT_CLASS = 'e-schedule-event-tooltip';\n/** @private */\nexport var ALLDAY_ROW_ANIMATE_CLASS = 'e-animate';\n/** @private */\nexport var TIMESCALE_DISABLE = 'e-timescale-disable';\n/** @private */\nexport var DISABLE_DATE = 'e-disable-date';\n/** @private */\nexport var HIDDEN_CLASS = 'e-hidden';\n/** @private */\nexport var DISABLE_DATES = 'e-disable-dates';\n/** @private */\nexport var POPUP_WRAPPER_CLASS = 'e-quick-popup-wrapper';\n/** @private */\nexport var POPUP_TABLE_CLASS = 'e-popup-table';\n/** @private */\nexport var RESOURCE_MENU = 'e-resource-menu';\n/** @private */\nexport var RESOURCE_MENU_ICON = 'e-icon-menu';\n/** @private */\nexport var RESOURCE_LEVEL_TITLE = 'e-resource-level-title';\n/** @private */\nexport var RESOURCE_TREE = 'e-resource-tree';\n/** @private */\nexport var RESOURCE_TREE_POPUP_OVERLAY = 'e-resource-tree-popup-overlay';\n/** @private */\nexport var RESOURCE_TREE_POPUP = 'e-resource-tree-popup';\n/** @private */\nexport var RESOURCE_CLASS = 'e-resource';\n/** @private */\nexport var RESOURCE_ICON_CLASS = 'e-resource-icon';\n/** @private */\nexport var RESOURCE_DETAILS_CLASS = 'e-resource-details';\n/** @private */\nexport var DATE_TIME_ICON_CLASS = 'e-date-time-icon';\n/** @private */\nexport var VIRTUAL_SCROLL_CLASS = 'e-virtual-scroll';\n/** @private */\nexport var ICON_DISABLE_CLASS = 'e-icon-disable';\n/** @private */\nexport var AUTO_HEIGHT = 'e-auto-height';\n/** @private */\nexport var IGNORE_WHITESPACE = 'e-ignore-whitespace';\n/** @private */\nexport var EVENT_TEMPLATE = 'e-template';\n/** @private */\nexport var READ_ONLY = 'e-read-only';\n/** @private */\nexport var MONTH_HEADER_WRAPPER = 'e-month-header-wrapper';\n/** @private */\nexport var INLINE_SUBJECT_CLASS = 'e-inline-subject';\n/** @private */\nexport var INLINE_APPOINTMENT_CLASS = 'e-inline-appointment';\n/** @hidden */\nexport var SCROLL_HIDDEN = 'e-scroll-hidden';\n/** @private */\nexport var ALLDAY_APPOINTMENT_SCROLL = 'e-all-day-scroll';\n/** @private */\nexport var ALLDAY_APPOINTMENT_AUTO = 'e-all-day-auto';\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable max-len */\nimport { extend, isNullOrUndefined, createElement, EventHandler, addClass, append, removeClass, remove, closest, classList } from '@syncfusion/ej2-base';\nimport { DataManager, Query } from '@syncfusion/ej2-data';\nimport { TreeView } from '@syncfusion/ej2-navigations';\nimport { Popup } from '@syncfusion/ej2-popups';\nimport { Data } from '../actions/data';\nimport * as cls from '../base/css-constant';\nimport * as events from '../base/constant';\nimport * as util from '../base/util';\nvar ResourceBase = /** @class */ (function () {\n function ResourceBase(parent) {\n this.resourceCollection = [];\n this.leftPixel = 25;\n this.resourceDateTree = [];\n this.parent = parent;\n }\n ResourceBase.prototype.renderResourceHeaderIndent = function (tr) {\n var resColTd = createElement('td', { className: cls.RESOURCE_LEFT_TD_CLASS });\n var resColDiv = createElement('div', { className: cls.RESOURCE_TEXT_CLASS });\n if (this.parent.activeViewOptions.headerIndentTemplate) {\n var data = { className: [resColTd.className], type: 'emptyCells' };\n this.parent.renderHeaderIndentTemplate(data, resColTd);\n }\n else {\n resColTd.appendChild(resColDiv);\n }\n var args = { elementType: 'emptyCells', element: resColTd };\n this.parent.trigger(events.renderCell, args);\n tr.appendChild(resColTd);\n };\n ResourceBase.prototype.hideResourceRows = function (tBody) {\n if (this.resourceCollection.length <= 1 || this.parent.virtualScrollModule) {\n return;\n }\n var trCount = this.lastResourceLevel.length;\n for (var i = 0; i < trCount; i++) {\n var resData = this.lastResourceLevel[parseInt(i.toString(), 10)].resourceData;\n var res = this.lastResourceLevel[parseInt(i.toString(), 10)].resource;\n if (resData.ClassName === cls.RESOURCE_PARENT_CLASS && !resData[res.expandedField] &&\n !isNullOrUndefined(resData[res.expandedField])) {\n var trCollection = [].slice.call(tBody.children);\n var slicedCollection = trCollection.slice(i + 1, i + (parseInt(resData.Count, 10) + 1));\n addClass(slicedCollection, cls.HIDDEN_CLASS);\n }\n }\n };\n ResourceBase.prototype.createResourceColumn = function () {\n var resColl = this.resourceCollection;\n var resDiv = createElement('div', { className: cls.RESOURCE_COLUMN_WRAP_CLASS });\n var tbl = this.parent.activeView.createTableLayout(cls.RESOURCE_COLUMN_TABLE_CLASS);\n if (!this.parent.uiStateValues.isGroupAdaptive && this.parent.rowAutoHeight && this.parent.activeView.isTimelineView()\n && this.parent.activeViewOptions.group.resources.length > 0) {\n addClass([tbl], cls.AUTO_HEIGHT);\n }\n var tBody = tbl.querySelector('tbody');\n var resData = this.generateTreeData(true);\n this.countCalculation(resColl.slice(0, -2), resColl.slice(0, -1));\n this.renderedResources = this.lastResourceLevel;\n if (this.parent.virtualScrollModule) {\n var resourceCount = this.parent.virtualScrollModule.getRenderedCount();\n this.setExpandedResources();\n resData = this.expandedResources.slice(0, resourceCount);\n this.renderedResources = resData;\n }\n append(this.getContentRows(resData), tBody);\n this.hideResourceRows(tBody);\n tbl.appendChild(tBody);\n resDiv.appendChild(tbl);\n return resDiv;\n };\n ResourceBase.prototype.setRenderedResources = function () {\n var resColl = this.resourceCollection;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var temp = this.generateTreeData(true);\n this.countCalculation(resColl.slice(0, -2), resColl.slice(0, -1));\n this.renderedResources = this.lastResourceLevel;\n };\n ResourceBase.prototype.setExpandedResources = function () {\n var resources = [];\n for (var i = 0; i < this.lastResourceLevel.length; i++) {\n var resource = this.lastResourceLevel[parseInt(i.toString(), 10)].resourceData;\n var count = resource.Count;\n resources.push(this.lastResourceLevel[parseInt(i.toString(), 10)]);\n var isExpanded = resource[this.lastResourceLevel[parseInt(i.toString(), 10)].resource.expandedField];\n if (!isNullOrUndefined(isExpanded) && !isExpanded && count > 0) {\n i = i + count;\n }\n }\n this.expandedResources = resources;\n };\n ResourceBase.prototype.getContentRows = function (resData, isVirtualScroll) {\n var resRows = [];\n var left;\n var rIndex;\n var resColl = this.resourceCollection;\n var tr = createElement('tr');\n var td = createElement('td', { attrs: { tabindex: isVirtualScroll ? '-1' : '0' } });\n for (var i = 0; i < resData.length; i++) {\n var ntd = td.cloneNode();\n rIndex = util.findIndexInData(resColl, 'name', resData[parseInt(i.toString(), 10)].resource.name);\n if (rIndex === resColl.length - 1) {\n extend(resData[parseInt(i.toString(), 10)].resourceData, { ClassName: cls.RESOURCE_CHILD_CLASS });\n this.renderedResources[parseInt(i.toString(), 10)].className = [cls.RESOURCE_CHILD_CLASS];\n }\n else {\n extend(resData[parseInt(i.toString(), 10)].resourceData, { ClassName: cls.RESOURCE_PARENT_CLASS });\n this.renderedResources[parseInt(i.toString(), 10)].className = [cls.RESOURCE_PARENT_CLASS];\n }\n left = (rIndex * this.leftPixel) + 'px';\n if (resData[parseInt(i.toString(), 10)].resourceData.ClassName === cls.RESOURCE_PARENT_CLASS\n && !isNullOrUndefined(resData[parseInt(i.toString(), 10)].resourceData.Count) && (resData[parseInt(i.toString(), 10)].resourceData.Count > 0)) {\n var iconClass = void 0;\n if (resData[parseInt(i.toString(), 10)].resourceData[resColl[parseInt(rIndex.toString(), 10)].expandedField] ||\n isNullOrUndefined(resData[parseInt(i.toString(), 10)].resourceData[resColl[parseInt(rIndex.toString(), 10)].expandedField])) {\n iconClass = cls.RESOURCE_COLLAPSE_CLASS;\n }\n else {\n iconClass = cls.RESOURCE_EXPAND_CLASS;\n }\n var iconDiv = createElement('div');\n addClass([iconDiv], [cls.RESOURCE_TREE_ICON_CLASS, iconClass]);\n this.setMargin(iconDiv, left);\n ntd.appendChild(iconDiv);\n if (this.resourceCollection.length > 1) {\n EventHandler.add(iconDiv, 'click', this.onTreeIconClick, this);\n }\n }\n this.parent.activeView.setResourceHeaderContent(ntd, resData[parseInt(i.toString(), 10)], cls.RESOURCE_TEXT_CLASS);\n ntd.setAttribute('data-group-index', resData[parseInt(i.toString(), 10)].groupIndex.toString());\n ntd.setAttribute('aria-label', resData[parseInt(i.toString(), 10)].resourceData[resData[parseInt(i.toString(), 10)].resource.textField] + ' resource');\n if (!this.parent.activeViewOptions.resourceHeaderTemplate) {\n this.setMargin(ntd.querySelector('.' + cls.RESOURCE_TEXT_CLASS), left);\n }\n var classCollection = [cls.RESOURCE_CELLS_CLASS, resData[parseInt(i.toString(), 10)].resourceData.ClassName];\n addClass([ntd], classCollection);\n var args = { elementType: 'resourceHeader', element: ntd, groupIndex: resData[parseInt(i.toString(), 10)].groupIndex };\n this.parent.trigger(events.renderCell, args);\n var ntr = tr.cloneNode();\n ntr.appendChild(ntd);\n resRows.push(ntr);\n }\n return resRows;\n };\n ResourceBase.prototype.setMargin = function (element, value) {\n if (!this.parent.enableRtl) {\n element.style.marginLeft = value;\n }\n else {\n element.style.marginRight = value;\n }\n };\n ResourceBase.prototype.countCalculation = function (parentCollection, wholeCollection) {\n var collection;\n for (var y = 0; y < parentCollection.length; y++) {\n var data = parentCollection[parentCollection.length - (y + 1)].dataSource;\n for (var x = 0; x < data.length; x++) {\n var totalCount = 0;\n if (this.parent.activeViewOptions.group.byGroupID) {\n var query = new Query().where(wholeCollection[wholeCollection.length - 1].groupIDField, 'equal', data[parseInt(x.toString(), 10)][parentCollection[parentCollection.length - (y + 1)].idField]);\n collection = new DataManager(wholeCollection[wholeCollection.length - 1].dataSource).executeLocal(query);\n }\n else {\n collection = wholeCollection[wholeCollection.length - 1].dataSource;\n }\n for (var z = 0; z < collection.length; z++) {\n totalCount = totalCount + parseInt(collection[parseInt(z.toString(), 10)].Count, 10);\n }\n totalCount = totalCount + parseInt(data[parseInt(x.toString(), 10)].Count, 10);\n extend(data[parseInt(x.toString(), 10)], { Count: totalCount });\n }\n wholeCollection = wholeCollection.slice(0, -1);\n }\n };\n ResourceBase.prototype.onTreeIconClick = function (e) {\n var _this = this;\n if (this.parent.eventTooltip) {\n this.parent.eventTooltip.close();\n }\n var target = e.target;\n var hide;\n var trElement = closest(target, '.' + cls.RESOURCE_PARENT_CLASS)\n .parentElement;\n var index = parseInt(trElement.children[0].getAttribute('data-group-index'), 10);\n var args = {\n cancel: false, event: e, groupIndex: index,\n requestType: !target.classList.contains(cls.RESOURCE_COLLAPSE_CLASS) ? 'resourceExpand' : 'resourceCollapse'\n };\n this.parent.trigger(events.actionBegin, args, function (actionArgs) {\n if (!actionArgs.cancel) {\n if (target.classList.contains(cls.RESOURCE_COLLAPSE_CLASS)) {\n classList(target, [cls.RESOURCE_EXPAND_CLASS], [cls.RESOURCE_COLLAPSE_CLASS]);\n hide = true;\n }\n else {\n classList(target, [cls.RESOURCE_COLLAPSE_CLASS], [cls.RESOURCE_EXPAND_CLASS]);\n hide = false;\n }\n var eventElements = [].slice.call(_this.parent.element.querySelectorAll('.' + cls.APPOINTMENT_CLASS + ',.' + cls.MORE_INDICATOR_CLASS));\n for (var _i = 0, eventElements_1 = eventElements; _i < eventElements_1.length; _i++) {\n var element = eventElements_1[_i];\n remove(element);\n }\n if (_this.parent.virtualScrollModule) {\n _this.updateVirtualContent(index, hide, e, target);\n }\n else {\n _this.updateContent(index, hide);\n }\n var data = { cssProperties: _this.parent.getCssProperties(), module: 'scroll' };\n _this.parent.notify(events.scrollUiUpdate, data);\n args = {\n cancel: false, event: e, groupIndex: index,\n requestType: target.classList.contains(cls.RESOURCE_COLLAPSE_CLASS) ? 'resourceExpanded' : 'resourceCollapsed'\n };\n _this.parent.refreshEvents(false);\n _this.parent.trigger(events.actionComplete, args);\n }\n });\n };\n ResourceBase.prototype.updateContent = function (index, hide) {\n var rowCollection = [];\n var workCellCollection = [];\n var headerRowCollection = [];\n var pNode;\n var clickedRes = this.lastResourceLevel[parseInt(index.toString(), 10)].resourceData;\n var resRows = [].slice.call(this.parent.element.querySelectorAll('.' + cls.RESOURCE_COLUMN_WRAP_CLASS + ' ' + 'tr'));\n var contentRows = [].slice.call(this.parent.element.querySelectorAll('.' + cls.CONTENT_WRAP_CLASS + ' ' + 'tbody tr'));\n var eventRows = [].slice.call(this.parent.element.querySelectorAll('.' + cls.CONTENT_WRAP_CLASS + ' .' + cls.APPOINTMENT_CONTAINER_CLASS));\n for (var j = 0; j < clickedRes.Count; j++) {\n rowCollection.push(resRows[index + j + 1]);\n workCellCollection.push(contentRows[index + j + 1]);\n headerRowCollection.push(eventRows[index + j + 1]);\n }\n var clonedCollection = this.lastResourceLevel;\n for (var i = 0; i < rowCollection.length; i++) {\n var expanded = true;\n pNode = rowCollection[parseInt(i.toString(), 10)].children[0].classList.contains(cls.RESOURCE_PARENT_CLASS);\n clonedCollection[parseInt(index.toString(), 10)].resourceData[clonedCollection[parseInt(index.toString(), 10)].resource.expandedField] = !hide;\n if (hide) {\n if (pNode) {\n var trElem = rowCollection[parseInt(i.toString(), 10)].querySelector('.' + cls.RESOURCE_TREE_ICON_CLASS);\n if (trElem) {\n classList(trElem, [cls.RESOURCE_EXPAND_CLASS], [cls.RESOURCE_COLLAPSE_CLASS]);\n }\n }\n if (!rowCollection[parseInt(i.toString(), 10)].classList.contains(cls.HIDDEN_CLASS)) {\n addClass([rowCollection[parseInt(i.toString(), 10)], workCellCollection[parseInt(i.toString(), 10)], headerRowCollection[parseInt(i.toString(), 10)]], cls.HIDDEN_CLASS);\n }\n }\n else {\n if (pNode) {\n var rowIndex = rowCollection[parseInt(i.toString(), 10)].rowIndex;\n if (!clonedCollection[parseInt(rowIndex.toString(), 10)].resourceData[clonedCollection[parseInt(rowIndex.toString(), 10)].resource.expandedField]\n && !isNullOrUndefined(clonedCollection[parseInt(rowIndex.toString(), 10)].resourceData[clonedCollection[parseInt(rowIndex.toString(), 10)].resource.expandedField])) {\n rowCollection.splice(i + 1, (parseInt(clonedCollection[parseInt(rowIndex.toString(), 10)].resourceData.Count, 10)));\n workCellCollection.splice(i + 1, (parseInt(clonedCollection[parseInt(rowIndex.toString(), 10)].resourceData.Count, 10)));\n headerRowCollection.splice(i + 1, (parseInt(clonedCollection[parseInt(rowIndex.toString(), 10)].resourceData.Count, 10)));\n expanded = false;\n }\n if (expanded) {\n var trElem = rowCollection[parseInt(i.toString(), 10)].querySelector('.' + cls.RESOURCE_TREE_ICON_CLASS);\n if (trElem) {\n classList(trElem, [cls.RESOURCE_COLLAPSE_CLASS], [cls.RESOURCE_EXPAND_CLASS]);\n }\n }\n }\n if (rowCollection[parseInt(i.toString(), 10)].classList.contains(cls.HIDDEN_CLASS)) {\n removeClass([rowCollection[parseInt(i.toString(), 10)], workCellCollection[parseInt(i.toString(), 10)], headerRowCollection[parseInt(i.toString(), 10)]], cls.HIDDEN_CLASS);\n }\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ResourceBase.prototype.updateVirtualContent = function (index, expand, e, target) {\n this.lastResourceLevel[parseInt(index.toString(), 10)].resourceData[this.lastResourceLevel[parseInt(index.toString(), 10)].resource.expandedField] = !expand;\n this.setExpandedResources();\n var resourceCount = this.parent.virtualScrollModule.getRenderedCount();\n var startIndex = this.expandedResources.indexOf(this.renderedResources[0]);\n this.renderedResources = this.expandedResources.slice(startIndex, startIndex + resourceCount);\n if (this.renderedResources.length < resourceCount) {\n var sIndex = this.expandedResources.length - resourceCount;\n sIndex = (sIndex > 0) ? sIndex : 0;\n this.renderedResources = this.expandedResources.slice(sIndex, this.expandedResources.length);\n }\n var virtualTrack = this.parent.element.querySelector('.' + cls.VIRTUAL_TRACK_CLASS);\n this.parent.virtualScrollModule.updateVirtualTrackHeight(virtualTrack);\n var resTable = this.parent.element.querySelector('.' + cls.RESOURCE_COLUMN_WRAP_CLASS + ' ' + 'table');\n var contentTable = this.parent.element.querySelector('.' + cls.CONTENT_WRAP_CLASS + ' ' + 'table');\n var eventTable = this.parent.element.querySelector('.' + cls.EVENT_TABLE_CLASS);\n this.parent.virtualScrollModule.updateContent(resTable, contentTable, eventTable, this.renderedResources);\n var timeIndicator = this.parent.element.querySelector('.' + cls.CURRENT_TIMELINE_CLASS);\n if (!isNullOrUndefined(timeIndicator)) {\n timeIndicator.style.height =\n this.parent.element.querySelector('.' + cls.CONTENT_TABLE_CLASS).offsetHeight + 'px';\n }\n };\n ResourceBase.prototype.renderResourceHeader = function () {\n var resourceWrapper = createElement('div', { className: cls.RESOURCE_TOOLBAR_CONTAINER });\n resourceWrapper.innerHTML = '
' +\n '
';\n if (this.parent.currentView === 'MonthAgenda') {\n var target = this.parent.activeView.getPanel().querySelector('.' + cls.CONTENT_WRAP_CLASS);\n target.insertBefore(resourceWrapper, target.querySelector('.' + cls.WRAPPER_CONTAINER_CLASS));\n }\n else {\n this.parent.element.insertBefore(resourceWrapper, this.parent.element.querySelector('.' + cls.TABLE_CONTAINER_CLASS));\n }\n this.renderResourceHeaderText();\n EventHandler.add(resourceWrapper.querySelector('.' + cls.RESOURCE_MENU_ICON), 'click', this.menuClick, this);\n };\n ResourceBase.prototype.renderResourceTree = function () {\n this.popupOverlay = createElement('div', { className: cls.RESOURCE_TREE_POPUP_OVERLAY });\n var treeWrapper = createElement('div', { className: cls.RESOURCE_TREE_POPUP + ' e-popup-close' });\n if (this.parent.currentView === 'MonthAgenda') {\n var target = this.parent.activeView.getPanel().querySelector('.' + cls.WRAPPER_CONTAINER_CLASS);\n target.insertBefore(treeWrapper, target.children[0]);\n target.appendChild(this.popupOverlay);\n }\n else {\n this.parent.element.querySelector('.' + cls.TABLE_CONTAINER_CLASS).appendChild(treeWrapper);\n this.parent.element.querySelector('.' + cls.TABLE_CONTAINER_CLASS).appendChild(this.popupOverlay);\n }\n var resourceTree = createElement('div', { className: cls.RESOURCE_TREE });\n treeWrapper.appendChild(resourceTree);\n this.treeViewObj = new TreeView({\n cssClass: this.parent.cssClass,\n enableRtl: this.parent.enableRtl,\n enableHtmlSanitizer: this.parent.enableHtmlSanitizer,\n fields: {\n dataSource: [].slice.call(this.generateTreeData()),\n id: 'resourceId',\n text: 'resourceName',\n child: 'resourceChild'\n },\n nodeTemplate: this.parent.resourceHeaderTemplate,\n nodeClicked: this.resourceClick.bind(this),\n created: this.resourceTreeCreated.bind(this)\n });\n this.treeViewObj.appendTo(resourceTree);\n this.treeViewObj.expandAll();\n this.treePopup = new Popup(treeWrapper, {\n targetType: 'relative',\n actionOnScroll: 'none',\n content: this.treeViewObj.element,\n relateTo: this.parent.element.querySelector('.' + cls.TABLE_CONTAINER_CLASS),\n enableRtl: this.parent.enableRtl,\n hideAnimation: { name: 'SlideLeftOut', duration: 500 },\n showAnimation: { name: 'SlideLeftIn', duration: 500 },\n viewPortElement: this.parent.element.querySelector('.' + (this.parent.currentView === 'MonthAgenda' ?\n cls.WRAPPER_CONTAINER_CLASS : cls.TABLE_CONTAINER_CLASS))\n });\n this.parent.on(events.documentClick, this.documentClick, this);\n };\n ResourceBase.prototype.resourceTreeCreated = function () {\n if (this.parent.activeViewOptions.resourceHeaderTemplate && this.parent.portals && this.treeViewObj.portals) {\n this.parent.portals = this.parent.portals.concat(this.treeViewObj.portals);\n this.parent.renderTemplates();\n }\n };\n ResourceBase.prototype.generateTreeData = function (isTimeLine) {\n var _this = this;\n var treeCollection = [];\n var resTreeColl = [];\n var groupIndex = 0;\n var _loop_1 = function (i, len) {\n var treeHandler = function (treeLevel, index, levelId) {\n var resource = _this.resourceCollection[parseInt(index.toString(), 10)];\n var treeArgs;\n var resObj;\n if (!isTimeLine) {\n treeArgs = {\n resourceId: levelId,\n resourceName: treeLevel.resourceData[resource.textField],\n resource: treeLevel.resource,\n resourceData: treeLevel.resourceData\n };\n }\n else {\n resObj = {\n type: 'resourceHeader', resource: treeLevel.resource,\n resourceData: treeLevel.resourceData, groupIndex: groupIndex,\n groupOrder: treeLevel.groupOrder\n };\n resTreeColl.push(resObj);\n groupIndex++;\n }\n if (treeLevel.child.length > 0 && !isTimeLine) {\n treeArgs.resourceChild = [];\n }\n var count = 1;\n for (var _i = 0, _a = treeLevel.child; _i < _a.length; _i++) {\n var tree = _a[_i];\n if (!isTimeLine) {\n treeArgs.resourceChild.push(treeHandler(tree, index + 1, levelId + '-' + count));\n }\n else {\n treeHandler(tree, index + 1, levelId + '-' + count);\n }\n count += 1;\n }\n if (isTimeLine) {\n extend(resObj.resourceData, { Count: count - 1 });\n }\n return treeArgs;\n };\n if (!isTimeLine) {\n treeCollection.push(treeHandler(this_1.resourceTreeLevel[parseInt(i.toString(), 10)], 0, (i + 1).toString()));\n }\n else {\n treeHandler(this_1.resourceTreeLevel[parseInt(i.toString(), 10)], 0, (i + 1).toString());\n }\n };\n var this_1 = this;\n for (var i = 0, len = this.resourceTreeLevel.length; i < len; i++) {\n _loop_1(i, len);\n }\n if (isTimeLine) {\n this.lastResourceLevel = resTreeColl;\n return resTreeColl;\n }\n else {\n return treeCollection;\n }\n };\n ResourceBase.prototype.renderResourceHeaderText = function () {\n var resource = this.lastResourceLevel[this.parent.uiStateValues.groupIndex];\n var headerCollection = [];\n var _loop_2 = function (i, len) {\n var resourceLevel = this_2.resourceCollection[parseInt(i.toString(), 10)];\n var resourceText = resourceLevel.dataSource.filter(function (resData) {\n return resData[resourceLevel.idField] === resource.groupOrder[parseInt(i.toString(), 10)];\n });\n var resourceName = createElement('div', { className: cls.RESOURCE_NAME });\n this_2.parent.sanitize(resourceText[0][resourceLevel.textField], resourceName);\n headerCollection.push(resourceName);\n var levelIcon = createElement('div', { className: 'e-icons e-icon-next' });\n headerCollection.push(levelIcon);\n };\n var this_2 = this;\n for (var i = 0, len = resource.groupOrder.length; i < len; i++) {\n _loop_2(i, len);\n }\n headerCollection.pop();\n var target = (this.parent.currentView === 'MonthAgenda') ? this.parent.activeView.getPanel() : this.parent.element;\n var headerWrapper = target.querySelector('.' + cls.RESOURCE_LEVEL_TITLE);\n util.removeChildren(headerWrapper);\n for (var _i = 0, headerCollection_1 = headerCollection; _i < headerCollection_1.length; _i++) {\n var header = headerCollection_1[_i];\n headerWrapper.appendChild(header);\n }\n if (this.lastResourceLevel.length === 1) {\n addClass([this.parent.element.querySelector('.' + cls.RESOURCE_MENU)], cls.DISABLE_CLASS);\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ResourceBase.prototype.menuClick = function (event) {\n if (this.parent.element.querySelector('.' + cls.RESOURCE_TREE_POPUP).classList.contains(cls.POPUP_OPEN)) {\n this.treePopup.hide();\n removeClass([this.popupOverlay], cls.ENABLE_CLASS);\n }\n else {\n var treeNodes = [].slice.call(this.treeViewObj.element.querySelectorAll('.e-list-item:not(.e-has-child)'));\n removeClass(treeNodes, 'e-active');\n addClass([treeNodes[this.parent.uiStateValues.groupIndex]], 'e-active');\n this.treePopup.show();\n addClass([this.popupOverlay], cls.ENABLE_CLASS);\n }\n };\n ResourceBase.prototype.selectResourceByIndex = function (groupIndex) {\n if (this.lastResourceLevel && groupIndex > -1 && groupIndex < this.lastResourceLevel.length) {\n this.triggerEvents(groupIndex);\n }\n };\n ResourceBase.prototype.resourceClick = function (event) {\n if (!event.node.classList.contains('e-has-child')) {\n this.treePopup.hide();\n removeClass([this.popupOverlay], cls.ENABLE_CLASS);\n var treeNodes = [].slice.call(this.treeViewObj.element.querySelectorAll('.e-list-item:not(.e-has-child)'));\n var groupIndex = treeNodes.indexOf(event.node);\n this.triggerEvents(groupIndex, event);\n event.event.preventDefault();\n }\n };\n ResourceBase.prototype.triggerEvents = function (groupIndex, event) {\n var _this = this;\n var args = { cancel: false, event: (event) ? event.event : null, groupIndex: groupIndex, requestType: 'resourceChange' };\n this.parent.trigger(events.actionBegin, args, function (actionArgs) {\n if (!actionArgs.cancel) {\n _this.parent.uiStateValues.groupIndex = actionArgs.groupIndex;\n _this.parent.renderModule.render(_this.parent.currentView);\n args = {\n cancel: false, event: (event) ? event.event : null, groupIndex: _this.parent.uiStateValues.groupIndex, requestType: 'resourceChanged'\n };\n _this.parent.trigger(events.actionComplete, args);\n }\n });\n };\n ResourceBase.prototype.documentClick = function (args) {\n if (closest(args.event.target, '.' + cls.RESOURCE_TREE_POPUP)) {\n return;\n }\n var treeWrapper = this.parent.element.querySelector('.' + cls.RESOURCE_TREE_POPUP);\n if (treeWrapper && treeWrapper.classList.contains(cls.POPUP_OPEN)) {\n this.treePopup.hide();\n removeClass([this.popupOverlay], cls.ENABLE_CLASS);\n }\n };\n ResourceBase.prototype.bindResourcesData = function (isSetModel) {\n var _this = this;\n this.parent.showSpinner();\n var promises = [];\n for (var _i = 0, _a = this.parent.resources; _i < _a.length; _i++) {\n var resource = _a[_i];\n var dataModule = new Data(this.parent, resource.dataSource, resource.query);\n promises.push(dataModule.getData(dataModule.generateQuery()));\n }\n Promise.all(promises).then(function (e) { return _this.dataManagerSuccess(e, isSetModel); })\n .catch(function (e) { return _this.parent.crudModule.dataManagerFailure(e); });\n };\n ResourceBase.prototype.dataManagerSuccess = function (e, isSetModel) {\n if (!this.parent || this.parent && this.parent.isDestroyed) {\n return;\n }\n this.parent.resourceCollection = [];\n for (var i = 0, length_1 = e.length; i < length_1; i++) {\n var resource = this.parent.resources[parseInt(i.toString(), 10)];\n var resourceObj = this.getResourceModel(resource, e[parseInt(i.toString(), 10)].result);\n this.parent.resourceCollection.push(resourceObj);\n }\n this.refreshLayout(isSetModel);\n };\n ResourceBase.prototype.getResourceModel = function (resource, resourceData) {\n var resourceObj = {\n field: resource.field,\n title: resource.title,\n name: resource.name,\n allowMultiple: resource.allowMultiple,\n dataSource: resourceData || resource.dataSource,\n idField: resource.idField,\n textField: resource.textField,\n groupIDField: resource.groupIDField,\n colorField: resource.colorField,\n startHourField: resource.startHourField,\n endHourField: resource.endHourField,\n workDaysField: resource.workDaysField,\n expandedField: resource.expandedField,\n cssClassField: resource.cssClassField\n };\n return resourceObj;\n };\n ResourceBase.prototype.refreshLayout = function (isSetModel) {\n if (isNullOrUndefined(this.parent.uiStateValues.groupIndex) || !(this.parent.enablePersistence)) {\n this.parent.uiStateValues.groupIndex = 0;\n }\n this.parent.renderElements(isSetModel);\n };\n ResourceBase.prototype.setResourceCollection = function () {\n var requiredResources = [];\n this.resourceCollection = [];\n this.colorIndex = null;\n if (this.parent.activeViewOptions.group.resources.length > 0) {\n for (var _i = 0, _a = this.parent.activeViewOptions.group.resources; _i < _a.length; _i++) {\n var resource = _a[_i];\n var index_1 = util.findIndexInData(this.parent.resourceCollection, 'name', resource);\n if (index_1 >= 0) {\n requiredResources.push(this.parent.resourceCollection[parseInt(index_1.toString(), 10)]);\n }\n }\n }\n else if (this.parent.resourceCollection.length > 0) {\n requiredResources = this.parent.resourceCollection;\n }\n var index = 0;\n for (var _b = 0, requiredResources_1 = requiredResources; _b < requiredResources_1.length; _b++) {\n var resource = requiredResources_1[_b];\n var resources = this.getResourceModel(resource);\n if (resource.name === this.parent.eventSettings.resourceColorField) {\n this.colorIndex = index;\n }\n index++;\n this.resourceCollection.push(resources);\n }\n if (isNullOrUndefined(this.colorIndex)) {\n this.colorIndex = this.resourceCollection.length - 1;\n }\n };\n ResourceBase.prototype.generateResourceLevels = function (innerDates, isTimeLine) {\n var _this = this;\n var resources = this.resourceCollection;\n var resTreeGroup = [];\n var lastColumnDates = [];\n var group = function (resources, index, prevResource, prevResourceData, prevOrder) {\n var resTree = [];\n var resource = resources[0];\n if (resource) {\n var data = void 0;\n if (prevResourceData && _this.parent.activeViewOptions.group.byGroupID) {\n var id_1 = prevResourceData[prevResource.idField];\n data = resource.dataSource.filter(function (e) {\n return e[resource.groupIDField] === id_1;\n });\n }\n else {\n data = resource.dataSource;\n }\n for (var i = 0; i < data.length; i++) {\n var groupOrder = [];\n if (prevOrder && prevOrder.length > 0) {\n groupOrder = groupOrder.concat(prevOrder);\n }\n groupOrder.push(data[parseInt(i.toString(), 10)][resource.idField]);\n var items = group(resources.slice(1), index + 1, resource, data[parseInt(i.toString(), 10)], groupOrder);\n // Here validate child item empty top level resource only\n if (index === 0 && items.length === 0 && _this.resourceCollection.length > 1) {\n continue;\n }\n var dateCol = [];\n var renderDates = _this.parent.activeView.renderDates;\n var resWorkDays = void 0;\n if (!_this.parent.activeViewOptions.group.byDate && index + 1 === _this.resourceCollection.length) {\n var workDays = data[parseInt(i.toString(), 10)][resource.workDaysField];\n var resStartHour = data[parseInt(i.toString(), 10)][resource.startHourField];\n var resEndHour = data[parseInt(i.toString(), 10)][resource.endHourField];\n if (workDays && workDays.length > 0) {\n renderDates = _this.parent.activeView.getRenderDates(workDays);\n resWorkDays = workDays;\n dateCol = _this.parent.activeView.getDateSlots(renderDates, workDays);\n }\n else {\n resWorkDays = _this.parent.activeViewOptions.workDays;\n dateCol = innerDates;\n }\n var dateSlots = _this.generateCustomHours(dateCol, resStartHour, resEndHour, groupOrder);\n lastColumnDates = lastColumnDates.concat(dateSlots);\n }\n var resCssClass = data[parseInt(i.toString(), 10)][resource.cssClassField];\n var slotData = {\n type: 'resourceHeader', className: ['e-resource-cells'],\n resourceLevelIndex: index, groupOrder: groupOrder,\n resource: resource, resourceData: data[parseInt(i.toString(), 10)],\n colSpan: _this.parent.activeViewOptions.group.byDate ? 1 : dateCol.length,\n renderDates: renderDates, workDays: resWorkDays, cssClass: resCssClass,\n child: items\n };\n resTree.push(slotData);\n }\n if (!resTreeGroup[parseInt(index.toString(), 10)]) {\n resTreeGroup[parseInt(index.toString(), 10)] = [];\n }\n if (resTree.length > 0) {\n resTreeGroup[parseInt(index.toString(), 10)].push(resTree);\n }\n return resTree;\n }\n return [];\n };\n this.resourceTreeLevel = group(resources, 0);\n return (isTimeLine) ? [] : this.generateHeaderLevels(resTreeGroup, lastColumnDates, innerDates);\n };\n ResourceBase.prototype.generateCustomHours = function (renderDates, startHour, endHour, groupOrder) {\n var dateSlots = extend([], renderDates, null, true);\n for (var _i = 0, dateSlots_1 = dateSlots; _i < dateSlots_1.length; _i++) {\n var dateSlot = dateSlots_1[_i];\n if (startHour) {\n dateSlot.startHour = this.parent.getStartEndTime(startHour);\n }\n if (endHour) {\n dateSlot.endHour = this.parent.getStartEndTime(endHour);\n }\n if (groupOrder) {\n dateSlot.groupOrder = groupOrder;\n }\n }\n return dateSlots;\n };\n ResourceBase.prototype.generateHeaderLevels = function (resTreeGroup, lastColumnDates, headerDates) {\n var headerLevels = [];\n for (var i = resTreeGroup.length - 1; i >= 0; i--) {\n var temp = 0;\n for (var _i = 0, _a = resTreeGroup[parseInt(i.toString(), 10)]; _i < _a.length; _i++) {\n var currentLevelChilds = _a[_i];\n for (var _b = 0, currentLevelChilds_1 = currentLevelChilds; _b < currentLevelChilds_1.length; _b++) {\n var currentLevelChild = currentLevelChilds_1[_b];\n if (resTreeGroup[i + 1] && resTreeGroup[i + 1].length > 0) {\n var nextLevelChilds = resTreeGroup[parseInt((i + 1).toString(), 10)][parseInt(temp.toString(), 10)];\n if (!nextLevelChilds) {\n continue;\n }\n var colSpan = 0;\n for (var _c = 0, nextLevelChilds_1 = nextLevelChilds; _c < nextLevelChilds_1.length; _c++) {\n var nextLevelChild = nextLevelChilds_1[_c];\n if (!this.parent.activeViewOptions.group.byGroupID || (this.parent.activeViewOptions.group.byGroupID &&\n nextLevelChild.resourceData[nextLevelChild.resource.groupIDField] ===\n currentLevelChild.resourceData[currentLevelChild.resource.idField])) {\n colSpan += nextLevelChild.colSpan;\n }\n }\n currentLevelChild.colSpan = colSpan;\n }\n currentLevelChild.groupIndex = temp;\n temp++;\n headerLevels[currentLevelChild.resourceLevelIndex] = headerLevels[currentLevelChild.resourceLevelIndex] || [];\n headerLevels[currentLevelChild.resourceLevelIndex].push(currentLevelChild);\n }\n }\n }\n this.lastResourceLevel = headerLevels.slice(-1)[0] || [];\n if (!this.parent.activeViewOptions.group.byDate) {\n var index = 0;\n for (var _d = 0, _e = this.lastResourceLevel; _d < _e.length; _d++) {\n var lastLevelResource = _e[_d];\n for (var i = 0; i < lastLevelResource.colSpan; i++) {\n lastColumnDates[parseInt(index.toString(), 10)].groupIndex = lastLevelResource.groupIndex;\n index++;\n }\n }\n headerLevels.push(lastColumnDates);\n return headerLevels;\n }\n var dateHeaderLevels = [];\n var levels = extend([], headerLevels, null, true);\n var datesColumn = [];\n if (this.parent.activeViewOptions.group.hideNonWorkingDays) {\n var renderDates_1 = [];\n var dateIndex = 0;\n var _loop_3 = function (headerDate) {\n this_3.resourceDateTree[parseInt(dateIndex.toString(), 10)] = [];\n var currentDateLevels = [];\n var _loop_4 = function (j) {\n var workDays = this_3.lastResourceLevel[parseInt(j.toString(), 10)].resourceData[this_3.lastResourceLevel[parseInt(j.toString(), 10)].resource.workDaysField];\n if (!workDays) {\n workDays = this_3.parent.activeViewOptions.workDays;\n }\n if (workDays.indexOf(headerDate.date.getDay()) !== -1) {\n var resTd_1 = extend({}, this_3.lastResourceLevel[parseInt(j.toString(), 10)], null, true);\n resTd_1.date = headerDate.date;\n this_3.lastResourceLevel[parseInt(j.toString(), 10)].workDays = workDays;\n resTd_1.startHour = this_3.parent.getStartEndTime(resTd_1.resourceData[resTd_1.resource.startHourField]) ||\n headerDate.startHour;\n resTd_1.endHour = this_3.parent.getStartEndTime(resTd_1.resourceData[resTd_1.resource.endHourField]) ||\n headerDate.endHour;\n this_3.resourceDateTree[parseInt(dateIndex.toString(), 10)].push(resTd_1);\n var _loop_5 = function (k) {\n if (!currentDateLevels[parseInt(k.toString(), 10)]) {\n currentDateLevels[parseInt(k.toString(), 10)] = [];\n }\n if (k === resTd_1.groupOrder.length - 1) {\n if (!renderDates_1[parseInt(j.toString(), 10)]) {\n renderDates_1[parseInt(j.toString(), 10)] = [];\n }\n var filterDates = resTd_1.renderDates.filter(function (x) { return x.getDay() === headerDate.date.getDay(); });\n renderDates_1[parseInt(j.toString(), 10)] = renderDates_1[parseInt(j.toString(), 10)].concat(filterDates);\n currentDateLevels[parseInt(k.toString(), 10)].push(resTd_1);\n return \"continue\";\n }\n var currentLevel = levels[parseInt(k.toString(), 10)];\n var filteredResource = currentLevel.filter(function (data) {\n return data.resourceData[data.resource.idField] === resTd_1.groupOrder[parseInt(k.toString(), 10)];\n });\n if (filteredResource && filteredResource.length > 0) {\n var existedResource = currentDateLevels[parseInt(k.toString(), 10)].filter(function (data) {\n return data.resourceData[data.resource.idField] === resTd_1.groupOrder[parseInt(k.toString(), 10)];\n });\n if (existedResource && existedResource.length > 0) {\n existedResource[0].colSpan += 1;\n }\n else {\n var filteredTd = extend({}, filteredResource[0], null, true);\n filteredTd.colSpan = 1;\n currentDateLevels[parseInt(k.toString(), 10)].push(filteredTd);\n }\n }\n };\n for (var k = 0; k < resTd_1.groupOrder.length; k++) {\n _loop_5(k);\n }\n }\n };\n for (var j = 0; j < this_3.lastResourceLevel.length; j++) {\n _loop_4(j);\n }\n if (currentDateLevels.length > 0) {\n for (var l = 0; l < levels.length; l++) {\n if (!dateHeaderLevels[parseInt(l.toString(), 10)]) {\n dateHeaderLevels[parseInt(l.toString(), 10)] = [];\n }\n dateHeaderLevels[parseInt(l.toString(), 10)] = dateHeaderLevels[parseInt(l.toString(), 10)].concat(currentDateLevels[parseInt(l.toString(), 10)]);\n }\n headerDate.colSpan = currentDateLevels[currentDateLevels.length - 1].length;\n datesColumn.push(headerDate);\n }\n dateIndex++;\n };\n var this_3 = this;\n for (var _f = 0, headerDates_1 = headerDates; _f < headerDates_1.length; _f++) {\n var headerDate = headerDates_1[_f];\n _loop_3(headerDate);\n }\n this.resourceDateTree = this.resourceDateTree.filter(function (data) { return data.length > 0; });\n this.lastResourceLevel.forEach(function (x, index) {\n if (renderDates_1[parseInt(index.toString(), 10)]) {\n x.renderDates = renderDates_1[parseInt(index.toString(), 10)].sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n });\n dateHeaderLevels.unshift(datesColumn);\n return dateHeaderLevels;\n }\n var dateColSpan = 0;\n for (var _g = 0, _h = levels[0]; _g < _h.length; _g++) {\n var firstRowTd = _h[_g];\n dateColSpan += firstRowTd.colSpan;\n }\n for (var _j = 0, headerDates_2 = headerDates; _j < headerDates_2.length; _j++) {\n var headerDate = headerDates_2[_j];\n headerDate.colSpan = dateColSpan;\n datesColumn.push(headerDate);\n var resGroup = extend([], levels, null, true);\n for (var k = 0, length_2 = resGroup.length; k < length_2; k++) {\n if (k === resGroup.length - 1) {\n for (var _k = 0, _l = resGroup[parseInt(k.toString(), 10)]; _k < _l.length; _k++) {\n var resTd = _l[_k];\n resTd.date = headerDate.date;\n resTd.workDays = headerDate.workDays;\n resTd.startHour = this.parent.getStartEndTime(resTd.resourceData[resTd.resource.startHourField]) ||\n headerDate.startHour;\n resTd.endHour = this.parent.getStartEndTime(resTd.resourceData[resTd.resource.endHourField]) ||\n headerDate.endHour;\n }\n }\n if (!dateHeaderLevels[parseInt(k.toString(), 10)]) {\n dateHeaderLevels[parseInt(k.toString(), 10)] = [];\n }\n dateHeaderLevels[parseInt(k.toString(), 10)] = dateHeaderLevels[parseInt(k.toString(), 10)].concat(resGroup[parseInt(k.toString(), 10)]);\n }\n }\n dateHeaderLevels.unshift(datesColumn);\n return dateHeaderLevels;\n };\n ResourceBase.prototype.setResourceValues = function (eventObj, groupIndex) {\n var _this = this;\n var setValues = function (index, field, value) {\n if (_this.resourceCollection[parseInt(index.toString(), 10)].allowMultiple && _this.parent.activeViewOptions.group.allowGroupEdit) {\n eventObj[\"\" + field] = [value];\n }\n else {\n eventObj[\"\" + field] = value;\n }\n };\n if (groupIndex === void 0) {\n groupIndex = this.parent.uiStateValues.isGroupAdaptive ? this.parent.uiStateValues.groupIndex :\n this.parent.activeCellsData.groupIndex;\n }\n if (this.parent.activeViewOptions.group.resources.length > 0 && !isNullOrUndefined(groupIndex)) {\n var groupOrder = this.lastResourceLevel[parseInt(groupIndex.toString(), 10)].groupOrder;\n for (var index = 0; index < this.resourceCollection.length; index++) {\n setValues(index, this.resourceCollection[parseInt(index.toString(), 10)].field, groupOrder[parseInt(index.toString(), 10)]);\n }\n }\n else if (this.parent.resourceCollection.length > 0) {\n for (var index = 0; index < this.resourceCollection.length; index++) {\n var data = this.resourceCollection[parseInt(index.toString(), 10)].dataSource[0];\n if (data) {\n setValues(index, this.resourceCollection[parseInt(index.toString(), 10)].field, data[this.resourceCollection[parseInt(index.toString(), 10)].idField]);\n }\n }\n }\n };\n ResourceBase.prototype.getResourceColor = function (eventObj, groupOrder) {\n var colorFieldIndex = (!isNullOrUndefined(groupOrder) &&\n this.colorIndex > groupOrder.length - 1) ? groupOrder.length - 1 : this.colorIndex;\n var resource = this.resourceCollection[parseInt(colorFieldIndex.toString(), 10)];\n if (isNullOrUndefined(groupOrder) && this.parent.activeViewOptions.group.allowGroupEdit && resource.allowMultiple) {\n return undefined;\n }\n var id = isNullOrUndefined(groupOrder) ? eventObj[resource.field] : groupOrder[parseInt(colorFieldIndex.toString(), 10)];\n var data = this.filterData(resource.dataSource, resource.idField, id);\n if (data.length > 0) {\n return data[0][resource.colorField];\n }\n return undefined;\n };\n ResourceBase.prototype.getCssClass = function (eventObj) {\n var resource = this.resourceCollection.slice(-1)[0];\n if (this.parent.activeViewOptions.group.allowGroupEdit && resource.allowMultiple) {\n return undefined;\n }\n var data = this.filterData(resource.dataSource, resource.idField, eventObj[resource.field]);\n if (data.length > 0) {\n return data[0][resource.cssClassField];\n }\n return undefined;\n };\n ResourceBase.prototype.getResourceRenderDates = function () {\n // eslint-disable-next-line prefer-spread\n var resourceDates = [].concat.apply([], this.lastResourceLevel.map(function (e) { return e.renderDates; }));\n var removeDuplicateDates = function (dateColl) { return dateColl.filter(function (date, index, dates) {\n return dates.map(function (dateObj) { return dateObj.getTime(); }).indexOf(date.getTime()) === index;\n }); };\n var renderDates = removeDuplicateDates(resourceDates);\n renderDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n return renderDates;\n };\n ResourceBase.prototype.filterData = function (dataSource, field, value) {\n return dataSource.filter(function (data) { return data[\"\" + field] === value; });\n };\n ResourceBase.prototype.getResourceData = function (eventObj, index, groupEditIndex) {\n if (this.parent.activeViewOptions.group.allowGroupEdit) {\n var resourceObj = {};\n for (var _i = 0, groupEditIndex_1 = groupEditIndex; _i < groupEditIndex_1.length; _i++) {\n var groupIndex = groupEditIndex_1[_i];\n var resourceLevel = this.lastResourceLevel[parseInt(groupIndex.toString(), 10)].groupOrder;\n for (var level = 0, length_3 = resourceLevel.length; level < length_3; level++) {\n var fieldName = this.resourceCollection[parseInt(level.toString(), 10)].field;\n if (isNullOrUndefined(resourceObj[\"\" + fieldName])) {\n resourceObj[\"\" + fieldName] = [];\n }\n resourceObj[\"\" + fieldName].push(resourceLevel[parseInt(level.toString(), 10)]);\n }\n }\n eventObj = extend(eventObj, resourceObj);\n }\n else {\n for (var level = 0, length_4 = this.resourceCollection.length; level < length_4; level++) {\n if (this.lastResourceLevel[parseInt(index.toString(), 10)]) {\n eventObj[this.resourceCollection[parseInt(level.toString(), 10)].field] = this.lastResourceLevel[parseInt(index.toString(), 10)].groupOrder[parseInt(level.toString(), 10)];\n }\n }\n }\n };\n ResourceBase.prototype.addResource = function (resources, name, index) {\n var resourceCollection = (resources instanceof Array) ? resources : [resources];\n var _loop_6 = function (resource) {\n if (resource.name === name) {\n resourceCollection.forEach(function (addObj, i) {\n return new DataManager({ json: resource.dataSource }).insert(addObj, null, null, index + i);\n });\n return \"break\";\n }\n };\n for (var _i = 0, _a = this.parent.resourceCollection; _i < _a.length; _i++) {\n var resource = _a[_i];\n var state_1 = _loop_6(resource);\n if (state_1 === \"break\")\n break;\n }\n this.refreshLayout(true);\n };\n ResourceBase.prototype.removeResource = function (resourceId, name) {\n var resourceCollection = (resourceId instanceof Array) ? resourceId : [resourceId];\n var _loop_7 = function (resource) {\n if (resource.name === name) {\n resourceCollection.forEach(function (removeObj) {\n return new DataManager({ json: resource.dataSource }).remove(resource.idField, removeObj);\n });\n return \"break\";\n }\n };\n for (var _i = 0, _a = this.parent.resourceCollection; _i < _a.length; _i++) {\n var resource = _a[_i];\n var state_2 = _loop_7(resource);\n if (state_2 === \"break\")\n break;\n }\n this.refreshLayout(true);\n };\n ResourceBase.prototype.getIndexFromResourceId = function (id, name, resourceData, event, parentField) {\n name = name || this.parent.resourceCollection.slice(-1)[0].name;\n if (isNullOrUndefined(resourceData)) {\n resourceData = this.resourceCollection.filter(function (e) { return e.name === name; })[0];\n if (isNullOrUndefined(resourceData)) {\n return null;\n }\n }\n var resource = resourceData.dataSource.filter(function (e) {\n if (event && e[resourceData.idField] === id) {\n if (e[resourceData.groupIDField] === event[\"\" + parentField]) {\n return e[resourceData.idField] === id;\n }\n return null;\n }\n else {\n return e[resourceData.idField] === id;\n }\n })[0];\n return (this.lastResourceLevel.map(function (e) { return e.resourceData; }).indexOf(resource));\n };\n ResourceBase.prototype.resourceExpand = function (id, name, hide) {\n var resource = this.parent.resourceCollection.filter(function (e) {\n if (e.name === name) {\n return e;\n }\n return null;\n })[0];\n var index = 0;\n var resourceData = resource.dataSource.filter(function (e) { return e[resource.idField] === id; })[0];\n if (!this.parent.activeViewOptions.group.byGroupID) {\n index = this.getIndexFromResourceId(id, name, resource);\n }\n else {\n index = this.lastResourceLevel.map(function (e) { return e.resourceData; }).indexOf(resourceData);\n }\n var target = this.parent.element.querySelector('.' + cls.RESOURCE_COLUMN_WRAP_CLASS + ' ' + (\"[data-group-index=\\\"\" + index + \"\\\"]\") +\n ' ' + '.' + cls.RESOURCE_TREE_ICON_CLASS);\n if (target) {\n if (target.classList.contains(cls.RESOURCE_EXPAND_CLASS) && !hide) {\n target.click();\n }\n else if (target.classList.contains(cls.RESOURCE_COLLAPSE_CLASS) && hide) {\n target.click();\n }\n }\n };\n ResourceBase.prototype.resourceScroll = function (id, name) {\n if (this.parent.isAdaptive || ['Agenda', 'MonthAgenda'].indexOf(this.parent.currentView) > -1) {\n return;\n }\n var levelName = name || this.parent.resourceCollection.slice(-1)[0].name;\n var levelIndex = this.parent.resourceCollection.length - 1;\n var resource = this.parent.resourceCollection.filter(function (e, index) {\n if (e.name === levelName) {\n levelIndex = index;\n return e;\n }\n return null;\n })[0];\n var scrollElement = this.parent.element.querySelector('.' + cls.CONTENT_WRAP_CLASS);\n var index = 0;\n if (this.parent.activeView.isTimelineView()) {\n if (!this.parent.activeViewOptions.group.byGroupID) {\n index = this.getIndexFromResourceId(id, levelName, resource);\n }\n else {\n var resourceData = resource.dataSource.filter(function (e) {\n return e[resource.idField] === id;\n })[0];\n index = this.lastResourceLevel.map(function (e) { return e.resourceData; }).indexOf(resourceData);\n }\n if (this.parent.virtualScrollModule) {\n var virtual = this.parent.element.querySelector('.' + cls.VIRTUAL_TRACK_CLASS);\n var averageRowHeight = Math.round(virtual.offsetHeight / this.expandedResources.length);\n if (this.parent.rowAutoHeight) {\n scrollElement.scrollTop = 0;\n this.parent.virtualScrollModule.virtualScrolling();\n }\n scrollElement.scrollTop = (index * averageRowHeight) - (((this.parent.virtualScrollModule.bufferCount - 1) * averageRowHeight));\n this.parent.virtualScrollModule.virtualScrolling();\n if (this.parent.rowAutoHeight) {\n var td = this.parent.element.querySelector(\".\" + cls.WORK_CELLS_CLASS + \"[data-group-index=\\\"\" + index + \"\\\"]\");\n if (td && !td.parentElement.classList.contains(cls.HIDDEN_CLASS)) {\n scrollElement.scrollTop =\n (scrollElement.scrollTop < td.offsetTop) ? td.offsetTop : scrollElement.scrollTop + td.offsetTop;\n }\n }\n else {\n scrollElement.scrollTop = (index * averageRowHeight);\n }\n }\n else {\n var td = this.parent.element.querySelector(\".\" + cls.WORK_CELLS_CLASS + \"[data-group-index=\\\"\" + index + \"\\\"]\");\n if (td && !td.parentElement.classList.contains(cls.HIDDEN_CLASS)) {\n scrollElement.scrollTop = td.offsetTop;\n }\n }\n }\n else {\n if (!this.parent.activeViewOptions.group.byGroupID) {\n index = this.getIndexFromResourceId(id, levelName, resource);\n }\n else {\n if (levelName === this.parent.resourceCollection.slice(-1)[0].name) {\n index = this.lastResourceLevel.map(function (e) { return e.resourceData[resource.idField]; }).indexOf(id);\n }\n else {\n index = resource.dataSource.map(function (e) { return e[resource.idField]; }).indexOf(id);\n }\n }\n var offsetTarget = this.parent.element.querySelector(\".\" + cls.HEADER_ROW_CLASS + \":nth-child(\" + (levelIndex + 1) + \")\");\n var offset = [].slice.call(offsetTarget.children).map(function (node) { return node.offsetLeft; });\n scrollElement.scrollLeft = offset[parseInt(index.toString(), 10)];\n }\n };\n ResourceBase.prototype.destroy = function () {\n this.parent.off(events.documentClick, this.documentClick);\n if (this.treeViewObj) {\n if (this.treeViewObj.portals && this.treeViewObj.portals.length > 0) {\n var treeViewTemplates = this.treeViewObj.portals.map(function (x) { return x.propName; });\n if (treeViewTemplates.length > 0) {\n this.parent.resetTemplates(treeViewTemplates);\n }\n }\n this.treeViewObj.destroy();\n this.treeViewObj = null;\n }\n if (this.treePopup) {\n this.treePopup.destroy();\n this.treePopup = null;\n remove(this.parent.element.querySelector('.' + cls.RESOURCE_TREE_POPUP));\n remove(this.parent.element.querySelector('.' + cls.RESOURCE_TREE_POPUP_OVERLAY));\n }\n var resToolBarEle = this.parent.element.querySelector('.' + cls.RESOURCE_TOOLBAR_CONTAINER);\n if (resToolBarEle) {\n remove(resToolBarEle);\n }\n };\n return ResourceBase;\n}());\nexport { ResourceBase };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Component, Property, Event, Animation, Collection, append } from '@syncfusion/ej2-base';\nimport { EventHandler, Browser, Internationalization, getDefaultDateObject, cldrData, L10n } from '@syncfusion/ej2-base';\nimport { getValue, compile, extend, isNullOrUndefined, NotifyPropertyChanges, Complex } from '@syncfusion/ej2-base';\nimport { getElement, removeClass, addClass, classList, remove, SanitizeHtmlHelper } from '@syncfusion/ej2-base';\nimport { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';\nimport { HeaderRenderer } from '../renderer/header-renderer';\nimport { Scroll } from '../actions/scroll';\nimport { ScheduleTouch } from '../actions/touch';\nimport { KeyboardInteraction } from '../actions/keyboard';\nimport { Data } from '../actions/data';\nimport { EventBase } from '../event-renderer/event-base';\nimport { InlineEdit } from '../event-renderer/inline-edit';\nimport { QuickPopups } from '../popups/quick-popups';\nimport { EventTooltip } from '../popups/event-tooltip';\nimport { EventWindow } from '../popups/event-window';\nimport { Render } from '../renderer/renderer';\nimport { WorkHours } from '../models/work-hours';\nimport { TimeScale } from '../models/time-scale';\nimport { QuickInfoTemplates } from '../models/quick-info-templates';\nimport { HeaderRows } from '../models/header-rows';\nimport { Crud } from '../actions/crud';\nimport { WorkCellInteraction } from '../actions/work-cells';\nimport { EventSettings } from '../models/event-settings';\nimport { Group } from '../models/group';\nimport { Resources } from '../models/resources';\nimport { Gregorian, Islamic } from '../../common/calendar-util';\nimport { ResourceBase } from '../base/resource';\nimport { Timezone, timezoneData } from '../timezone/timezone';\nimport * as events from '../base/constant';\nimport * as cls from '../base/css-constant';\nimport * as util from '../base/util';\n/**\n * Represents the Schedule component that displays a list of events scheduled against specific date and timings,\n * thus helping us to plan and manage it properly.\n * ```html\n *
\n * ```\n * ```typescript\n * \n * ```\n */\nvar Schedule = /** @class */ (function (_super) {\n __extends(Schedule, _super);\n /**\n * Constructor for creating the Schedule widget\n *\n * @param {ScheduleModel} options Accepts the schedule model properties to initiate the rendering\n * @param {string | HTMLElement} element Accepts the DOM element reference\n */\n function Schedule(options, element) {\n return _super.call(this, options, element) || this;\n }\n /**\n * Core method that initializes the control rendering.\n *\n * @returns {void}\n * @private\n */\n Schedule.prototype.render = function () {\n var addClasses = [];\n var removeClasses = [];\n addClasses.push(cls.ROOT);\n if (this.enableRtl) {\n addClasses.push(cls.RTL);\n }\n else {\n removeClasses.push(cls.RTL);\n }\n if (this.isAdaptive) {\n addClasses.push(cls.DEVICE_CLASS);\n }\n else {\n removeClasses.push(cls.DEVICE_CLASS);\n }\n if (this.allowMultiDrag) {\n addClasses.push(cls.MULTI_DRAG);\n }\n else {\n removeClasses.push(cls.MULTI_DRAG);\n }\n if (this.cssClass) {\n var cssClass = this.cssClass.split(' ');\n for (var _i = 0, cssClass_1 = cssClass; _i < cssClass_1.length; _i++) {\n var cls_1 = cssClass_1[_i];\n addClasses.push(cls_1);\n }\n }\n classList(this.element, addClasses, removeClasses);\n this.validateDate();\n createSpinner({ target: this.element });\n this.scrollModule = new Scroll(this);\n this.scrollModule.setWidth();\n this.scrollModule.setHeight();\n this.renderModule = new Render(this);\n this.eventBase = new EventBase(this);\n this.workCellAction = new WorkCellInteraction(this);\n if (this.allowKeyboardInteraction) {\n this.keyboardInteractionModule = new KeyboardInteraction(this);\n }\n this.inlineModule = new InlineEdit(this);\n this.initializeDataModule();\n this.renderTableContainer();\n this.activeViewOptions = this.getActiveViewOptions();\n this.initializeResources();\n this.wireEvents();\n };\n Schedule.prototype.renderTableContainer = function () {\n if (!this.element.querySelector('.' + cls.TABLE_CONTAINER_CLASS)) {\n this.element.appendChild(this.createElement('div', { className: cls.TABLE_CONTAINER_CLASS }));\n }\n };\n /**\n * Method to render react templates\n *\n * @param {Function} callback - Specifies the callBack method\n * @returns {void}\n * @private\n */\n Schedule.prototype.renderTemplates = function (callback) {\n if (this.isReact) {\n this.renderReactTemplates(callback);\n }\n else if (callback) {\n callback();\n }\n };\n /**\n * Method to reset react templates\n *\n * @param {string[]} templates Accepts the template ID\n * @returns {void}\n * @private\n */\n Schedule.prototype.resetTemplates = function (templates) {\n if (this.isAngular || this.isReact) {\n this.clearTemplate(templates);\n }\n };\n /**\n * This method renders untrusted strings and scripts securely by sanitizing them first.\n *\n * @param {string} value - A string value representing the HTML string value to be sanitized.\n * @param {HTMLElement} element - An HTML element to which the sanitized or unsanitized HTML string will be assigned.\n * @returns {void}\n * @private\n */\n Schedule.prototype.sanitize = function (value, element) {\n if (this.enableHtmlSanitizer) {\n element.innerText = SanitizeHtmlHelper.sanitize(value);\n }\n else {\n element.innerHTML = value;\n }\n };\n Schedule.prototype.initializeResources = function (isSetModel) {\n if (isSetModel === void 0) { isSetModel = false; }\n if (this.resources.length > 0) {\n this.resourceBase = new ResourceBase(this);\n this.resourceBase.bindResourcesData(isSetModel);\n }\n else {\n this.resourceBase = null;\n this.resourceCollection = [];\n this.renderElements(isSetModel);\n }\n };\n /**\n * Method to render the layout elements\n *\n * @param {boolean} isLayoutOnly Accepts the boolean value to render layout or not\n * @returns {void}\n * @private\n */\n Schedule.prototype.renderElements = function (isLayoutOnly) {\n if (isLayoutOnly) {\n this.initializeView(this.currentView);\n this.eventWindow.refresh();\n return;\n }\n this.destroyHeaderModule();\n if (this.showHeaderBar) {\n this.headerModule = new HeaderRenderer(this);\n }\n this.renderTableContainer();\n if (Browser.isDevice || Browser.isTouch) {\n this.scheduleTouchModule = new ScheduleTouch(this);\n }\n this.initializeView(this.currentView);\n this.destroyPopups();\n if (!this.isPrinting) {\n this.initializePopups();\n }\n };\n Schedule.prototype.validateDate = function (selectedDate) {\n if (selectedDate === void 0) { selectedDate = this.selectedDate; }\n // persist the selected date value\n var date = selectedDate instanceof Date ? new Date(selectedDate.getTime()) : new Date(selectedDate);\n var minDate = this.minDate instanceof Date ? new Date(this.minDate.getTime()) : new Date(this.minDate);\n var maxDate = this.maxDate instanceof Date ? new Date(this.maxDate.getTime()) : new Date(this.maxDate);\n if (minDate <= maxDate) {\n if (date < minDate) {\n date = minDate;\n }\n if (date > maxDate) {\n date = maxDate;\n }\n this.setProperties({ selectedDate: new Date('' + date), minDate: new Date('' + minDate), maxDate: new Date('' + maxDate) }, true);\n if (this.eventWindow) {\n this.eventWindow.updateMinMaxDateToEditor();\n }\n }\n else {\n throw Error('minDate should be equal or less than maxDate');\n }\n };\n Schedule.prototype.getViewIndex = function (viewName) {\n for (var item = 0; item < this.viewCollections.length; item++) {\n var checkIndex = this.viewCollections[parseInt(item.toString(), 10)].option;\n if (checkIndex === viewName) {\n return item;\n }\n }\n return -1;\n };\n Schedule.prototype.setViewOptions = function (isModuleLoad) {\n if (isModuleLoad === void 0) { isModuleLoad = false; }\n this.viewOptions = {};\n this.viewCollections = [];\n var viewName;\n var selectedView;\n var prevIndex = this.viewIndex;\n var count = 0;\n this.viewIndex = -1;\n for (var _i = 0, _a = this.views; _i < _a.length; _i++) {\n var view = _a[_i];\n var isOptions = (typeof view === 'string') ? false : true;\n if (typeof view === 'string') {\n viewName = view;\n if (this.currentView === viewName) {\n selectedView = viewName;\n this.viewIndex = count;\n }\n }\n else {\n viewName = view.option;\n if (view.isSelected) {\n selectedView = viewName;\n this.viewIndex = count;\n }\n }\n var obj = extend({ option: viewName }, isOptions ? view : {});\n var fieldViewName = viewName.charAt(0).toLowerCase() + viewName.slice(1);\n obj.cellHeaderTemplateName = obj.cellHeaderTemplate ? obj.option : '';\n obj.dateHeaderTemplateName = obj.dateHeaderTemplate ? obj.option : '';\n obj.dateRangeTemplateName = obj.dateRangeTemplate ? obj.option : '';\n obj.cellTemplateName = obj.cellTemplate ? obj.option : '';\n obj.dayHeaderTemplateName = obj.dayHeaderTemplate ? obj.option : '';\n obj.monthHeaderTemplateName = obj.monthHeaderTemplate ? obj.option : '';\n obj.resourceHeaderTemplateName = obj.resourceHeaderTemplate ? obj.option : '';\n obj.headerIndentTemplateName = obj.headerIndentTemplate ? obj.option : '';\n obj.eventTemplateName = obj.eventTemplate ? obj.option : '';\n if (!isNullOrUndefined(obj.firstDayOfWeek) && obj.firstDayOfWeek === 0) {\n delete obj.firstDayOfWeek;\n }\n if (!isNullOrUndefined(obj.interval) && obj.interval === 1) {\n delete obj.interval;\n }\n this.viewCollections.push(obj);\n if (isNullOrUndefined(this.viewOptions[\"\" + fieldViewName])) {\n this.viewOptions[\"\" + fieldViewName] = [obj];\n }\n else {\n this.viewOptions[\"\" + fieldViewName].push(obj);\n }\n count++;\n }\n if (!isModuleLoad && selectedView) {\n this.setProperties({ currentView: selectedView }, true);\n }\n if (this.viewIndex === -1) {\n var currentIndex = this.getViewIndex(this.currentView);\n this.viewIndex = ((typeof this.views[0] !== 'string') && (!isNullOrUndefined(prevIndex) && prevIndex !== -1)) ? prevIndex :\n (currentIndex === -1) ? 0 : currentIndex;\n }\n };\n Schedule.prototype.getActiveViewOptions = function () {\n var timeScale = {\n enable: this.timeScale.enable,\n interval: this.timeScale.interval,\n slotCount: this.timeScale.slotCount,\n majorSlotTemplate: this.timeScale.majorSlotTemplate,\n minorSlotTemplate: this.timeScale.minorSlotTemplate\n };\n var isYearView = this.viewCollections[this.viewIndex].option.indexOf('Year') > -1;\n var group = {\n byDate: isYearView ? false : this.group.byDate,\n byGroupID: this.group.byGroupID,\n allowGroupEdit: this.group.allowGroupEdit,\n resources: this.group.resources,\n headerTooltipTemplate: this.group.headerTooltipTemplate,\n enableCompactView: this.group.enableCompactView,\n hideNonWorkingDays: ['Day', 'Week', 'WorkWeek', 'Month'].indexOf(this.currentView) > -1 ? this.group.hideNonWorkingDays : false\n };\n var workDays = this.viewCollections[this.viewIndex].workDays ? [] : this.workDays;\n var scheduleOptions = {\n dateFormat: this.dateFormat,\n endHour: this.endHour,\n isSelected: false,\n option: null,\n readonly: this.readonly,\n startHour: this.startHour,\n allowVirtualScrolling: false,\n cellHeaderTemplate: this.cellHeaderTemplate,\n dayHeaderTemplate: this.dayHeaderTemplate,\n monthHeaderTemplate: this.monthHeaderTemplate,\n cellTemplate: this.cellTemplate,\n eventTemplate: this.eventSettings.template,\n dateHeaderTemplate: this.dateHeaderTemplate,\n dateRangeTemplate: this.dateRangeTemplate,\n resourceHeaderTemplate: this.resourceHeaderTemplate,\n headerIndentTemplate: this.headerIndentTemplate,\n firstMonthOfYear: this.firstMonthOfYear,\n firstDayOfWeek: this.firstDayOfWeek,\n workDays: workDays,\n monthsCount: this.monthsCount,\n showWeekend: this.showWeekend,\n showWeekNumber: this.showWeekNumber,\n displayName: null,\n interval: 1,\n timeScale: timeScale,\n timeFormat: this.internalTimeFormat,\n group: group,\n headerRows: this.headerRows,\n orientation: 'Horizontal',\n numberOfWeeks: 0,\n displayDate: null\n };\n var viewOptions = this.viewCollections[this.viewIndex];\n var viewsData = extend(scheduleOptions, viewOptions, undefined, true);\n if (this.firstDayOfWeek !== 0 && viewOptions.firstDayOfWeek && this.firstDayOfWeek !== viewOptions.firstDayOfWeek) {\n viewsData.firstDayOfWeek = this.firstDayOfWeek;\n }\n if (viewsData.displayDate) {\n viewsData.displayDate = viewsData.displayDate instanceof Date ? new Date(viewsData.displayDate.getTime()) :\n new Date(viewsData.displayDate);\n }\n return viewsData;\n };\n Schedule.prototype.initializeDataModule = function () {\n this.eventFields = {\n id: this.eventSettings.fields.id,\n isBlock: this.eventSettings.fields.isBlock,\n subject: this.eventSettings.fields.subject.name,\n startTime: this.eventSettings.fields.startTime.name,\n endTime: this.eventSettings.fields.endTime.name,\n startTimezone: this.eventSettings.fields.startTimezone.name,\n endTimezone: this.eventSettings.fields.endTimezone.name,\n location: this.eventSettings.fields.location.name,\n description: this.eventSettings.fields.description.name,\n isAllDay: this.eventSettings.fields.isAllDay.name,\n recurrenceID: this.eventSettings.fields.recurrenceID.name,\n recurrenceRule: this.eventSettings.fields.recurrenceRule.name,\n recurrenceException: this.eventSettings.fields.recurrenceException.name,\n isReadonly: this.eventSettings.fields.isReadonly,\n followingID: this.eventSettings.fields.followingID\n };\n this.setEditorTitles();\n this.dataModule = new Data(this, this.eventSettings.dataSource, this.eventSettings.query);\n this.crudModule = new Crud(this);\n };\n Schedule.prototype.setEditorTitles = function () {\n this.editorTitles = {\n subject: this.eventSettings.fields.subject.title || this.localeObj.getConstant('title'),\n startTime: this.eventSettings.fields.startTime.title || this.localeObj.getConstant('start'),\n endTime: this.eventSettings.fields.endTime.title || this.localeObj.getConstant('end'),\n isAllDay: this.eventSettings.fields.isAllDay.title || this.localeObj.getConstant('allDay'),\n startTimezone: this.eventSettings.fields.startTimezone.title || this.localeObj.getConstant('startTimezone'),\n endTimezone: this.eventSettings.fields.endTimezone.title || this.localeObj.getConstant('endTimezone'),\n location: this.eventSettings.fields.location.title || this.localeObj.getConstant('location'),\n description: this.eventSettings.fields.description.title || this.localeObj.getConstant('description'),\n recurrenceRule: this.eventSettings.fields.recurrenceRule.title || this.localeObj.getConstant('repeat')\n };\n };\n Schedule.prototype.initializeView = function (viewName) {\n this.showSpinner();\n this.activeViewOptions = this.getActiveViewOptions();\n if (this.resourceBase) {\n this.resourceBase.setResourceCollection();\n }\n this.initializeTemplates();\n this.renderModule.render(viewName);\n };\n Schedule.prototype.initializeTemplates = function () {\n this.cellHeaderTemplateFn = this.templateParser(this.activeViewOptions.cellHeaderTemplate);\n this.dayHeaderTemplateFn = this.templateParser(this.activeViewOptions.dayHeaderTemplate);\n this.monthHeaderTemplateFn = this.templateParser(this.activeViewOptions.monthHeaderTemplate);\n this.cellTemplateFn = this.templateParser(this.activeViewOptions.cellTemplate);\n this.dateHeaderTemplateFn = this.templateParser(this.activeViewOptions.dateHeaderTemplate);\n this.dateRangeTemplateFn = this.templateParser(this.activeViewOptions.dateRangeTemplate);\n this.majorSlotTemplateFn = this.templateParser(this.activeViewOptions.timeScale.majorSlotTemplate);\n this.minorSlotTemplateFn = this.templateParser(this.activeViewOptions.timeScale.minorSlotTemplate);\n this.appointmentTemplateFn = this.templateParser(this.activeViewOptions.eventTemplate);\n this.resourceHeaderTemplateFn = this.templateParser(this.activeViewOptions.resourceHeaderTemplate);\n this.headerIndentTemplateFn = this.templateParser(this.activeViewOptions.headerIndentTemplate);\n this.headerTooltipTemplateFn = this.templateParser(this.activeViewOptions.group.headerTooltipTemplate);\n this.eventTooltipTemplateFn = this.templateParser(this.eventSettings.tooltipTemplate);\n this.editorTemplateFn = this.templateParser(this.editorTemplate);\n this.quickInfoTemplatesHeaderFn = this.templateParser(this.quickInfoTemplates.header);\n this.quickInfoTemplatesContentFn = this.templateParser(this.quickInfoTemplates.content);\n this.quickInfoTemplatesFooterFn = this.templateParser(this.quickInfoTemplates.footer);\n };\n Schedule.prototype.initializePopups = function () {\n this.eventWindow = new EventWindow(this);\n this.quickPopup = new QuickPopups(this);\n };\n /**\n * Method to get day names\n *\n * @param {string} type Accepts the day name\n * @returns {string[]} Returns the collection of day names\n * @private\n */\n Schedule.prototype.getDayNames = function (type) {\n var culShortNames = [];\n var cldrObj;\n var nameSpace = '';\n if (this.locale === 'en' || this.locale === 'en-US') {\n nameSpace = 'days.stand-alone.';\n cldrObj = (getValue(nameSpace + type, getDefaultDateObject(this.getCalendarMode())));\n }\n else {\n nameSpace = 'main.' + '' + this.locale + '.dates.calendars.' + this.getCalendarMode() + '.days.format.' + type;\n cldrObj = (getValue(nameSpace, cldrData));\n }\n for (var _i = 0, _a = Object.keys(cldrObj); _i < _a.length; _i++) {\n var obj = _a[_i];\n culShortNames.push(getValue(obj, cldrObj));\n }\n return culShortNames;\n };\n Schedule.prototype.setCldrTimeFormat = function () {\n if (!isNullOrUndefined(this.timeFormat)) {\n this.internalTimeFormat = this.timeFormat;\n return;\n }\n if (this.locale === 'en' || this.locale === 'en-US') {\n this.internalTimeFormat = (getValue('timeFormats.short', getDefaultDateObject(this.getCalendarMode())));\n }\n else {\n this.internalTimeFormat = (getValue('main.' + '' + this.locale + '.dates.calendars.' + this.getCalendarMode() + '.timeFormats.short', cldrData));\n }\n };\n /**\n * Method to get calendar mode\n *\n * @returns {string} Returns the calendar mode\n * @private\n */\n Schedule.prototype.getCalendarMode = function () {\n return this.calendarMode.toLowerCase();\n };\n /**\n * Method to get time in string\n *\n * @param {Date} date Accepts the date object\n * @returns {string} Returns the time in string\n * @private\n */\n Schedule.prototype.getTimeString = function (date) {\n var time = this.globalize.formatDate(date, {\n format: this.activeViewOptions.timeFormat,\n type: 'time', calendar: this.getCalendarMode()\n });\n return time.toLocaleUpperCase();\n };\n /**\n * Method to get date object\n *\n * @param {Date} date Accepts the date object\n * @returns {Date} Returns the date object\n * @private\n */\n Schedule.prototype.getDateTime = function (date) {\n return date instanceof Date ? new Date(date.getTime()) : new Date(date);\n };\n Schedule.prototype.setCalendarMode = function () {\n if (this.calendarMode === 'Islamic') {\n this.calendarUtil = new Islamic();\n }\n else {\n this.calendarUtil = new Gregorian();\n }\n };\n /**\n * Method to change the current view\n *\n * @param {View} view Accepts the view name\n * @param {Event} event Accepts the event object\n * @param {boolean} muteOnChange Accepts the value to enable or disable mute on change\n * @param {number} index Accepts the index value\n * @returns {void}\n * @private\n */\n Schedule.prototype.changeView = function (view, event, muteOnChange, index) {\n var _this = this;\n if (isNullOrUndefined(index)) {\n index = this.getViewIndex(view);\n }\n if (!muteOnChange && index === this.viewIndex && this.currentView === view || index < 0) {\n return;\n }\n var previousView = this.activeViewOptions ? this.activeViewOptions.option : this.currentView;\n var args = { requestType: 'viewNavigate', cancel: false, event: event };\n this.trigger(events.actionBegin, args, function (actionArgs) {\n if (!actionArgs.cancel) {\n var navArgs = {\n action: 'view', cancel: false, currentDate: _this.selectedDate, previousView: previousView, currentView: view, viewIndex: index\n };\n _this.trigger(events.navigating, navArgs, function (navigationArgs) {\n if (!navigationArgs.cancel) {\n var isVertical = ['Day', 'Week', 'WorkWeek'].indexOf(view) > -1 && ['Day', 'Week', 'WorkWeek'].indexOf(previousView) < 0;\n _this.uiStateValues.isInitial = isVertical || view.indexOf('Timeline') > -1 || view.indexOf('Year') > -1;\n _this.uiStateValues.top = view.indexOf('Timeline') > -1 && previousView.indexOf('Timeline') < 0 ? 0 : _this.uiStateValues.top;\n _this.viewIndex = navigationArgs.viewIndex;\n _this.setProperties({ currentView: view }, true);\n if (_this.headerModule) {\n _this.headerModule.updateActiveView();\n _this.headerModule.setCalendarDate(_this.selectedDate);\n _this.headerModule.setCalendarView();\n }\n _this.initializeView(_this.currentView);\n _this.animateLayout();\n args = { requestType: 'viewNavigate', cancel: false, event: event };\n _this.trigger(events.actionComplete, args);\n }\n else {\n _this.currentView = previousView;\n }\n });\n }\n else {\n _this.currentView = previousView;\n }\n });\n };\n /**\n * Method to change the view date\n *\n * @param {Date} selectedDate Accepts the selected date\n * @param {Event} event Accepts the event object\n * @returns {void}\n * @private\n */\n Schedule.prototype.changeDate = function (selectedDate, event) {\n var _this = this;\n var args = { requestType: 'dateNavigate', cancel: false, event: event };\n this.trigger(events.actionBegin, args, function (actionArgs) {\n if (!actionArgs.cancel) {\n var navArgs = {\n action: 'date', cancel: false, previousDate: _this.selectedDate, currentDate: selectedDate\n };\n _this.trigger(events.navigating, navArgs, function (navigationArgs) {\n if (!navigationArgs.cancel) {\n _this.uiStateValues.isInitial = _this.activeView.isTimelineView() && _this.currentView !== 'TimelineYear';\n _this.validateDate(navigationArgs.currentDate);\n if (_this.headerModule) {\n _this.headerModule.setCalendarDate(navigationArgs.currentDate);\n }\n if (_this.currentView === 'MonthAgenda' && _this.monthAgendaModule) {\n _this.monthAgendaModule.monthAgendaDate = new Date('' + _this.selectedDate);\n }\n _this.initializeView(_this.currentView);\n _this.animateLayout();\n args = { requestType: 'dateNavigate', cancel: false, event: event };\n _this.trigger(events.actionComplete, args);\n }\n });\n }\n });\n };\n /**\n * Method to validate min and max date\n *\n * @param {Date} date Accepts the date object\n * @returns {boolean} Returns the boolean result to validate the min and max date\n * @private\n */\n Schedule.prototype.isMinMaxDate = function (date) {\n if (date === void 0) { date = this.selectedDate; }\n return ((date.getTime() >= this.minDate.getTime()) && (date.getTime() <= this.maxDate.getTime()));\n };\n /**\n * Method to validate the selected date\n *\n * @param {Date} date Accepts the date object\n * @returns {boolean} Returns the boolean value for given date is selected date or not\n * @private\n */\n Schedule.prototype.isSelectedDate = function (date) {\n return date.setHours(0, 0, 0, 0) === new Date('' + this.selectedDate).setHours(0, 0, 0, 0);\n };\n /**\n * Method to get the current time\n *\n * @param {Date} date Accepts the date object\n * @returns {Date} Returns the date object after performing the timezone conversion\n * @private\n */\n Schedule.prototype.getCurrentTime = function (date) {\n if (date === void 0) { date = new Date(); }\n if (this.timezone) {\n return this.tzModule.convert(date, this.tzModule.getLocalTimezoneName(), this.timezone);\n }\n return date;\n };\n /** Method to get navigate view\n *\n * @returns {View} Return the navigate view name\n * @private\n */\n Schedule.prototype.getNavigateView = function () {\n if (this.activeView.isTimelineView()) {\n return this.currentView === 'TimelineMonth' || this.currentView === 'TimelineYear' ? 'TimelineDay' : 'Agenda';\n }\n return 'Day';\n };\n Schedule.prototype.animateLayout = function () {\n if (!this.activeView.element) {\n return;\n }\n new Animation({ duration: 600, name: 'FadeIn', timingFunction: 'easeIn' }).animate(this.activeView.element);\n };\n /**\n * To provide the array of modules needed for control rendering\n *\n * @returns {ModuleDeclaration[]} Returns the declared modules\n * @private\n */\n Schedule.prototype.requiredModules = function () {\n var modules = [];\n this.setViewOptions(true);\n for (var _i = 0, _a = Object.keys(this.viewOptions); _i < _a.length; _i++) {\n var view = _a[_i];\n view = (view === 'timelineDay' || view === 'timelineWeek' || view === 'timelineWorkWeek') ? 'timelineViews' : view;\n modules.push({ member: view, args: [this] });\n }\n if (this.allowDragAndDrop) {\n modules.push({ member: 'dragAndDrop', args: [this] });\n }\n if (this.allowResizing) {\n modules.push({ member: 'resize', args: [this] });\n }\n modules.push({ member: 'excelExport', args: [this] });\n modules.push({ member: 'iCalendarExport', args: [this] });\n modules.push({ member: 'iCalendarImport', args: [this] });\n modules.push({ member: 'print', args: [this] });\n return modules;\n };\n /**\n * Initializes the values of private members.\n *\n * @returns {void}\n * @private\n */\n Schedule.prototype.preRender = function () {\n this.isAdaptive = Browser.isDevice || util.isIPadDevice();\n this.globalize = new Internationalization(this.locale);\n this.tzModule = new Timezone();\n if (this && isNullOrUndefined(this.uiStateValues) || !(this.enablePersistence)) {\n this.uiStateValues = {\n expand: false, isInitial: true, left: 0, top: 0, isGroupAdaptive: false,\n isIgnoreOccurrence: false, groupIndex: 0, action: false, isBlock: false, isCustomMonth: true, isPreventTimezone: false\n };\n }\n this.currentTimezoneDate = this.getCurrentTime();\n this.activeCellsData = { startTime: new Date(this.currentTimezoneDate), endTime: new Date(this.currentTimezoneDate), isAllDay: false };\n this.activeEventData = { event: undefined, element: undefined };\n this.getDefaultLocale();\n this.localeObj = new L10n(this.getModuleName(), this.defaultLocale, this.locale);\n this.setCldrTimeFormat();\n this.setCalendarMode();\n this.eventsData = [];\n this.eventsProcessed = [];\n this.blockData = [];\n this.blockProcessed = [];\n this.resourceCollection = [];\n this.currentAction = null;\n this.selectedElements = [];\n this.setViewOptions();\n };\n Schedule.prototype.getDefaultLocale = function () {\n this.defaultLocale = {\n day: 'Day',\n week: 'Week',\n workWeek: 'Work Week',\n month: 'Month',\n year: 'Year',\n agenda: 'Agenda',\n weekAgenda: 'Week Agenda',\n workWeekAgenda: 'Work Week Agenda',\n monthAgenda: 'Month Agenda',\n today: 'Today',\n noEvents: 'No events',\n emptyContainer: 'There are no events scheduled on this day.',\n allDay: 'All day',\n start: 'Start',\n end: 'End',\n more: 'more',\n close: 'Close',\n cancel: 'Cancel',\n noTitle: '(No Title)',\n delete: 'Delete',\n deleteEvent: 'Delete Event',\n deleteMultipleEvent: 'Delete Multiple Events',\n selectedItems: 'Items selected',\n deleteSeries: 'Entire Series',\n edit: 'Edit',\n editSeries: 'Entire Series',\n editEvent: 'Edit Event',\n createEvent: 'Create',\n subject: 'Subject',\n addTitle: 'Add title',\n moreDetails: 'More Details',\n save: 'Save',\n editContent: 'How would you like to change the appointment in the series?',\n deleteContent: 'Are you sure you want to delete this event?',\n deleteMultipleContent: 'Are you sure you want to delete the selected events?',\n newEvent: 'New Event',\n title: 'Title',\n location: 'Location',\n description: 'Description',\n timezone: 'Timezone',\n startTimezone: 'Start Timezone',\n endTimezone: 'End Timezone',\n repeat: 'Repeat',\n saveButton: 'Save',\n cancelButton: 'Cancel',\n deleteButton: 'Delete',\n recurrence: 'Recurrence',\n wrongPattern: 'The recurrence pattern is not valid.',\n seriesChangeAlert: 'Do you want to cancel the changes made to specific ' +\n 'instances of this series and match it to the whole series again?',\n createError: 'The duration of the event must be shorter than how frequently it occurs. ' +\n 'Shorten the duration, or change the recurrence pattern in the recurrence event editor.',\n sameDayAlert: 'Two occurrences of the same event cannot occur on the same day.',\n occurenceAlert: 'Cannot reschedule an occurrence of the recurring appointment if it skips over ' +\n 'a later occurrence of the same appointment.',\n editRecurrence: 'Edit Recurrence',\n repeats: 'Repeats',\n alert: 'Alert',\n startEndError: 'The selected end date occurs before the start date.',\n invalidDateError: 'The entered date value is invalid.',\n blockAlert: 'Events cannot be scheduled within the blocked time range.',\n ok: 'Ok',\n yes: 'Yes',\n no: 'No',\n occurrence: 'Occurrence',\n series: 'Series',\n previous: 'Previous',\n next: 'Next',\n timelineDay: 'Timeline Day',\n timelineWeek: 'Timeline Week',\n timelineWorkWeek: 'Timeline Work Week',\n timelineMonth: 'Timeline Month',\n timelineYear: 'Timeline Year',\n editFollowingEvent: 'Following Events',\n deleteTitle: 'Delete Event',\n editTitle: 'Edit Event',\n beginFrom: 'Begin From',\n endAt: 'Ends At',\n expandAllDaySection: 'Expand-all-day-section',\n collapseAllDaySection: 'Collapse-all-day-section',\n searchTimezone: 'Search Timezone',\n noRecords: 'No records found'\n };\n };\n Schedule.prototype.wireEvents = function () {\n EventHandler.add(window, 'resize', this.onScheduleResize, this);\n EventHandler.add(window, 'orientationchange', this.onScheduleResize, this);\n EventHandler.add(document, Browser.touchStartEvent, this.onDocumentClick, this);\n };\n /**\n * Method to remove selected class\n *\n * @returns {void}\n * @private\n */\n Schedule.prototype.removeSelectedClass = function () {\n var selectedCells = this.getSelectedCells();\n for (var _i = 0, selectedCells_1 = selectedCells; _i < selectedCells_1.length; _i++) {\n var cell = selectedCells_1[_i];\n if (this.currentView !== 'Year') {\n cell.setAttribute('aria-selected', 'false');\n }\n cell.removeAttribute('tabindex');\n }\n removeClass(selectedCells, cls.SELECTED_CELL_CLASS);\n if (this.keyboardInteractionModule && this.keyboardInteractionModule.selectedCells.length > 0) {\n this.keyboardInteractionModule.selectedCells = [];\n }\n };\n /**\n * Method to add selected class\n *\n * @param {HTMLTableCellElement[]} cells Accepts the collection of elements\n * @param {HTMLTableCellElement} focusCell Accepts the focus element\n * @param {boolean} isPreventScroll Accepts the boolean value to prevent scroll\n * @returns {void}\n * @private\n */\n Schedule.prototype.addSelectedClass = function (cells, focusCell, isPreventScroll) {\n if (this.currentView !== 'Year') {\n for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {\n var cell = cells_1[_i];\n cell.setAttribute('aria-selected', 'true');\n }\n }\n addClass(cells, cls.SELECTED_CELL_CLASS);\n if (focusCell) {\n focusCell.setAttribute('tabindex', '0');\n focusCell.focus({ preventScroll: isPreventScroll || false });\n }\n };\n /**\n * Method to select cell\n *\n * @param {HTMLElement | HTMLTableCellElement} element Accepts the select element\n * @returns {void}\n * @private\n */\n Schedule.prototype.selectCell = function (element) {\n this.removeSelectedClass();\n this.addSelectedClass([element], element);\n };\n /**\n * Method to get all day row element\n *\n * @returns {Element} Returns the all day row element\n * @private\n */\n Schedule.prototype.getAllDayRow = function () {\n return this.element.querySelector('.' + cls.ALLDAY_ROW_CLASS);\n };\n /**\n * Method to get content table element\n *\n * @returns {HTMLElement} Returns the content table element\n * @private\n */\n Schedule.prototype.getContentTable = function () {\n return this.activeView.element.querySelector('.' + cls.CONTENT_TABLE_CLASS + ' tbody');\n };\n /**\n * Method to get all content table rows\n *\n * @returns {HTMLElement[]} Returns the content table rows\n * @private\n */\n Schedule.prototype.getTableRows = function () {\n return [].slice.call(this.element.querySelectorAll('.' + cls.CONTENT_TABLE_CLASS + ' tbody tr:not(.' + cls.HIDDEN_CLASS + ')'));\n };\n /**\n * Method to get work cell elements\n *\n * @returns {Element[]} Returns the all work cell elements\n * @private\n */\n Schedule.prototype.getWorkCellElements = function () {\n return [].slice.call(this.element.querySelectorAll('.' + cls.WORK_CELLS_CLASS));\n };\n /**\n * Method to get the index from date collection\n *\n * @param {Date[]} collection Accepts the collections of date\n * @param {Date} date Accepts the date object\n * @returns {number} Returns the index compared date with date collections\n * @private\n */\n Schedule.prototype.getIndexOfDate = function (collection, date) {\n return collection.map(Number).indexOf(+date);\n };\n /**\n * Method to find all day cell\n *\n * @param {Element} td Accepts the DOM Element\n * @returns {boolean} Returns the boolean value\n * @private\n */\n Schedule.prototype.isAllDayCell = function (td) {\n if (['Month', 'TimelineMonth', 'TimelineYear', 'MonthAgenda'].indexOf(this.currentView) > -1 ||\n td.classList.contains(cls.ALLDAY_CELLS_CLASS) ||\n td.classList.contains(cls.HEADER_CELLS_CLASS) || !this.activeViewOptions.timeScale.enable) {\n return true;\n }\n if (this.activeView.isTimelineView() && this.activeViewOptions.headerRows.length > 0 &&\n this.activeViewOptions.headerRows.slice(-1)[0].option !== 'Hour') {\n return true;\n }\n return false;\n };\n /**\n * Method to get date from element\n *\n * @param {Element} td Accepts the DOM element\n * @returns {Date} Returns the date object\n * @private\n */\n Schedule.prototype.getDateFromElement = function (td) {\n var dateString;\n if (!isNullOrUndefined(td)) {\n dateString = td.getAttribute('data-date');\n }\n if (!isNullOrUndefined(dateString)) {\n var dateInMS = parseInt(dateString, 10);\n var date = new Date(dateInMS);\n return date;\n }\n return undefined;\n };\n /**\n * Method to get target element from given selector\n *\n * @param {string} selector Accepts the element selector\n * @param {number} left Accepts the pageX value\n * @param {number} top Accepts the pageY value\n * @returns {Element[]} Returns the collection of elements based on the given selector\n * @private\n */\n Schedule.prototype.getTargetElement = function (selector, left, top) {\n var element = document.elementFromPoint(left, top);\n var targetElement;\n if (element) {\n targetElement = element.closest(selector);\n }\n return (targetElement) ? [targetElement] : null;\n };\n /**\n * Method to process cell header template\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getCellHeaderTemplate = function () {\n return this.cellHeaderTemplateFn;\n };\n /**\n * Method to process cell header template in year view.\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getDayHeaderTemplate = function () {\n return this.dayHeaderTemplateFn;\n };\n /**\n * Method to process cell header template in year view.\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getMonthHeaderTemplate = function () {\n return this.monthHeaderTemplateFn;\n };\n /**\n * Method to process cell template\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getCellTemplate = function () {\n return this.cellTemplateFn;\n };\n /**\n * Method to process date header template\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getDateHeaderTemplate = function () {\n return this.dateHeaderTemplateFn;\n };\n /**\n * Method to process date range template\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getDateRangeTemplate = function () {\n return this.dateRangeTemplateFn;\n };\n /**\n * Method to process major slot template\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getMajorSlotTemplate = function () {\n return this.majorSlotTemplateFn;\n };\n /**\n * Method to process minor slot template\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getMinorSlotTemplate = function () {\n return this.minorSlotTemplateFn;\n };\n /**\n * Method to process appointment template\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getAppointmentTemplate = function () {\n return this.appointmentTemplateFn;\n };\n /**\n * Method to process appointment tooltip template\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getEventTooltipTemplate = function () {\n return this.eventTooltipTemplateFn;\n };\n /**\n * Method to process header tooltip template\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getHeaderTooltipTemplate = function () {\n return this.headerTooltipTemplateFn;\n };\n /**\n * Method to process editor template\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getEditorTemplate = function () {\n return this.editorTemplateFn;\n };\n /**\n * Method to process quick info header template\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getQuickInfoTemplatesHeader = function () {\n return this.quickInfoTemplatesHeaderFn;\n };\n /**\n * Method to process quick info content template\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getQuickInfoTemplatesContent = function () {\n return this.quickInfoTemplatesContentFn;\n };\n /**\n * Method to process quick info footer template\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getQuickInfoTemplatesFooter = function () {\n return this.quickInfoTemplatesFooterFn;\n };\n /**\n * Method to process resource header template\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getResourceHeaderTemplate = function () {\n return this.resourceHeaderTemplateFn;\n };\n /**\n * Method to process indent template\n *\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.getHeaderIndentTemplate = function () {\n return this.headerIndentTemplateFn;\n };\n /**\n * Method to get dynamic CSS properties\n *\n * @returns {ScrollCss} Returns the CSS properties dynamically\n * @private\n */\n Schedule.prototype.getCssProperties = function () {\n var cssProps = {\n border: this.enableRtl ? 'borderLeftWidth' : 'borderRightWidth',\n padding: this.enableRtl ? 'paddingLeft' : 'paddingRight',\n rtlBorder: this.enableRtl ? 'borderRightWidth' : 'borderLeftWidth',\n rtlPadding: this.enableRtl ? 'paddingRight' : 'paddingLeft'\n };\n return cssProps;\n };\n /**\n * Method to remove new event element in adaptive mode\n *\n * @returns {void}\n * @private\n */\n Schedule.prototype.removeNewEventElement = function () {\n var eventClone = this.element.querySelector('.' + cls.NEW_EVENT_CLASS);\n if (!isNullOrUndefined(eventClone)) {\n remove(eventClone);\n }\n };\n /**\n * Method to get start end time from string\n *\n * @param {string} startEndTime Accepts the start end time string value\n * @returns {Date} Returns the date object\n * @private\n */\n Schedule.prototype.getStartEndTime = function (startEndTime) {\n if (!isNullOrUndefined(startEndTime) && startEndTime !== '') {\n var startEndDate = util.resetTime(new Date(this.currentTimezoneDate) || this.getCurrentTime());\n var timeString = startEndTime.split(':');\n if (timeString.length === 2) {\n startEndDate.setHours(parseInt(timeString[0], 10), parseInt(timeString[1], 10), 0);\n }\n return startEndDate;\n }\n return null;\n };\n Schedule.prototype.onDocumentClick = function (args) {\n this.notify(events.documentClick, { event: args });\n };\n Schedule.prototype.onScheduleResize = function () {\n if (isNullOrUndefined(this.activeView) || ((this.isAdaptive || util.isMobile()) && document.activeElement\n && document.activeElement.classList.contains(cls.SUBJECT_CLASS))) {\n return;\n }\n if (this.activeViewOptions.timeScale.enable && this.activeView) {\n this.activeView.highlightCurrentTime();\n }\n if (this.quickPopup) {\n this.quickPopup.onClosePopup();\n }\n if (this.currentView === 'Month' || ((this.currentView !== 'Agenda' && this.currentView !== 'MonthAgenda')\n && !this.activeViewOptions.timeScale.enable) || this.activeView.isTimelineView()) {\n this.activeView.resetColWidth();\n this.notify(events.scrollUiUpdate, { cssProperties: this.getCssProperties(), isPreventScrollUpdate: true });\n this.refreshEvents(false);\n }\n else {\n this.notify(events.contentReady, {});\n }\n };\n /**\n * Method to process the templates\n *\n * @param {string} template Accepts the template in string\n * @returns {CallbackFunction} Returns the callback function\n * @private\n */\n Schedule.prototype.templateParser = function (template) {\n if (template) {\n try {\n if (document.querySelectorAll(template).length) {\n return compile(document.querySelector(template).innerHTML.trim());\n }\n else {\n return compile(template);\n }\n }\n catch (error) {\n return compile(template);\n }\n }\n return undefined;\n };\n /**\n * Retrieves the selected cells.\n *\n * @returns {Element[]} The elements of currently selected cells will be returned.\n * @private\n */\n Schedule.prototype.getSelectedCells = function () {\n return [].slice.call(this.element.querySelectorAll('.' + cls.SELECTED_CELL_CLASS));\n };\n /**\n * Method to generate the announcement string\n *\n * @param {Object} event Accepts the event object\n * @param {string} subject Accepts the subject text\n * @returns {string} Returns the announcement string\n * @private\n */\n Schedule.prototype.getAnnouncementString = function (event, subject) {\n var resourceName;\n if (this.quickPopup && this.activeViewOptions.group.resources.length > 0) {\n var constantText = '\"s event - ';\n resourceName = this.quickPopup.getResourceText({ event: event }, 'event') + constantText;\n }\n var recordSubject = (subject || (event[this.eventFields.subject] || this.eventSettings.fields.subject.default));\n var skeleton = 'full';\n var startDateText = this.globalize.formatDate(event[this.eventFields.startTime], {\n type: 'dateTime', skeleton: skeleton, calendar: this.getCalendarMode()\n });\n var endDateText = this.globalize.formatDate(event[this.eventFields.endTime], {\n type: 'dateTime', skeleton: skeleton, calendar: this.getCalendarMode()\n });\n var announcementString = recordSubject + ' ' + this.localeObj.getConstant('beginFrom') + ' '\n + startDateText + ' ' + this.localeObj.getConstant('endAt') + ' ' + endDateText;\n if (resourceName) {\n announcementString = resourceName + ' ' + announcementString;\n }\n return announcementString;\n };\n /**\n * Method to process the element boundary validation\n *\n * @param {number} pageY Accepts the pageY value\n * @param {number} pageX Accepts the pageX value\n * @returns {ResizeEdges} Returns the boundary validation object\n * @private\n */\n Schedule.prototype.boundaryValidation = function (pageY, pageX) {\n var autoScrollDistance = 30;\n var scrollEdges = { left: false, right: false, top: false, bottom: false };\n var viewBoundaries = this.element.querySelector('.' + cls.CONTENT_WRAP_CLASS).getBoundingClientRect();\n if ((pageY < viewBoundaries.top + autoScrollDistance + window.pageYOffset) &&\n (pageY > viewBoundaries.top + window.pageYOffset)) {\n scrollEdges.top = true;\n }\n if ((pageY > (viewBoundaries.bottom - autoScrollDistance) + window.pageYOffset) &&\n (pageY < viewBoundaries.bottom + window.pageYOffset)) {\n scrollEdges.bottom = true;\n }\n if ((pageX < viewBoundaries.left + autoScrollDistance + window.pageXOffset) &&\n (pageX > viewBoundaries.left + window.pageXOffset)) {\n scrollEdges.left = true;\n }\n if ((pageX > (viewBoundaries.right - autoScrollDistance) + window.pageXOffset) &&\n (pageX < viewBoundaries.right + window.pageXOffset)) {\n scrollEdges.right = true;\n }\n return scrollEdges;\n };\n /**\n * Method to get the week number.\n *\n * @param {Date[]} dates Accepts the date collections\n * @returns {number} Returns the week number\n * @private\n */\n Schedule.prototype.getWeekNumberContent = function (dates) {\n var weekNumber;\n if (this.weekRule === 'FirstDay') {\n var weekNumberDate = util.getWeekLastDate(dates.slice(-1)[0], this.firstDayOfWeek);\n weekNumber = this.globalize.formatNumber(util.getWeekNumber(weekNumberDate));\n }\n else if (this.weekRule === 'FirstFourDayWeek') {\n var weekFirstDate = util.getWeekFirstDate(dates.slice(-1)[0], this.firstDayOfWeek);\n var weekLastDate = util.getWeekLastDate(dates.slice(-1)[0], this.firstDayOfWeek);\n var weekMidDate = util.getWeekMiddleDate(weekFirstDate, weekLastDate);\n weekNumber = this.globalize.formatNumber(util.getWeekNumber(weekMidDate));\n }\n else if (this.weekRule === 'FirstFullWeek') {\n var weekFirstDate = util.getWeekFirstDate(dates.slice(-1)[0], this.firstDayOfWeek);\n weekNumber = this.globalize.formatNumber(util.getWeekNumber(weekFirstDate));\n }\n return weekNumber;\n };\n /**\n * Method to render the header indent template.\n *\n * @param {TdData} data Accepts the td data\n * @param {Element} td Accepts the td element\n * @returns {void}\n * @private\n */\n Schedule.prototype.renderHeaderIndentTemplate = function (data, td) {\n if (this.activeViewOptions.headerIndentTemplate) {\n var scheduleId = this.element.id + '_';\n var viewName = this.activeViewOptions.headerIndentTemplateName;\n var templateId = scheduleId + viewName + 'headerIndentTemplate';\n var indentTemplate = [].slice.call(this.getHeaderIndentTemplate()(data, this, 'headerIndentTemplate', templateId, false));\n append(indentTemplate, td);\n }\n };\n /**\n * Method to check for refreshing the targeted resource row events.\n *\n * @returns {boolean} Returns the boolean value\n * @private\n */\n Schedule.prototype.isSpecificResourceEvents = function () {\n return this.activeViewOptions.group.resources.length > 0 && !this.activeViewOptions.group.allowGroupEdit &&\n !this.rowAutoHeight && !this.virtualScrollModule && this.activeViewOptions.group.byGroupID;\n };\n Schedule.prototype.unWireEvents = function () {\n EventHandler.remove(window, 'resize', this.onScheduleResize);\n EventHandler.remove(window, 'orientationchange', this.onScheduleResize);\n EventHandler.remove(document, Browser.touchStartEvent, this.onDocumentClick);\n };\n /**\n * Core method to return the component name.\n *\n * @returns {string} Returns the module name\n * @private\n */\n Schedule.prototype.getModuleName = function () {\n return 'schedule';\n };\n /**\n * Returns the properties to be maintained in the persisted state.\n *\n * @returns {string} Returns the persistance data\n * @private\n */\n Schedule.prototype.getPersistData = function () {\n return this.addOnPersist(['currentView', 'selectedDate', 'scrollTop', 'scrollLeft']);\n };\n /**\n * Called internally, if any of the property value changed.\n *\n * @returns {void}\n * @private\n */\n Schedule.prototype.onPropertyChanged = function (newProp, oldProp) {\n if (this.isReact && isNullOrUndefined(this.activeView)) {\n return;\n }\n var state = {\n isRefresh: false, isResource: false, isDate: false, isView: false, isLayout: false, isDataManager: false\n };\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'views':\n this.setViewOptions();\n if (this.headerModule) {\n this.headerModule.updateItems();\n }\n state.isView = true;\n break;\n case 'currentView':\n state.isView = true;\n break;\n case 'minDate':\n case 'maxDate':\n case 'selectedDate':\n state.isDate = true;\n break;\n case 'dateFormat':\n this.activeViewOptions = this.getActiveViewOptions();\n if (this.headerModule) {\n this.headerModule.updateDateRange();\n }\n break;\n case 'showHeaderBar':\n this.destroyHeaderModule();\n if (newProp.showHeaderBar) {\n this.headerModule = new HeaderRenderer(this);\n this.headerModule.updateDateRange();\n }\n this.notify(events.scrollUiUpdate, { cssProperties: this.getCssProperties() });\n if (this.activeView.isTimelineView()) {\n this.refreshEvents(false);\n }\n break;\n case 'workDays':\n if (JSON.stringify(oldProp.workDays) !== JSON.stringify(newProp.workDays)) {\n state.isLayout = true;\n }\n break;\n case 'showWeekend':\n case 'startHour':\n case 'endHour':\n case 'workHours':\n case 'readonly':\n case 'headerRows':\n case 'showWeekNumber':\n case 'rowAutoHeight':\n state.isLayout = true;\n break;\n case 'locale':\n case 'calendarMode':\n this.globalize = new Internationalization(this.locale);\n this.localeObj = new L10n(this.getModuleName(), this.defaultLocale, this.locale);\n this.setCldrTimeFormat();\n this.setCalendarMode();\n state.isRefresh = true;\n break;\n case 'firstDayOfWeek':\n this.activeViewOptions.firstDayOfWeek = newProp.firstDayOfWeek;\n if (this.eventWindow) {\n this.eventWindow.refreshRecurrenceEditor();\n }\n state.isLayout = true;\n break;\n case 'showTimeIndicator':\n if (this.activeViewOptions.timeScale.enable && this.activeView) {\n this.activeView.highlightCurrentTime();\n }\n break;\n case 'cellHeaderTemplate':\n this.activeViewOptions.cellHeaderTemplate = newProp.cellHeaderTemplate;\n this.cellHeaderTemplateFn = this.templateParser(this.activeViewOptions.cellHeaderTemplate);\n state.isLayout = true;\n break;\n case 'cellTemplate':\n this.activeViewOptions.cellTemplate = newProp.cellTemplate;\n this.cellTemplateFn = this.templateParser(this.activeViewOptions.cellTemplate);\n state.isLayout = true;\n break;\n case 'dateHeaderTemplate':\n this.activeViewOptions.dateHeaderTemplate = newProp.dateHeaderTemplate;\n this.dateHeaderTemplateFn = this.templateParser(this.activeViewOptions.dateHeaderTemplate);\n state.isLayout = true;\n break;\n case 'dateRangeTemplate':\n this.activeViewOptions.dateRangeTemplate = newProp.dateRangeTemplate;\n this.dateRangeTemplateFn = this.templateParser(this.activeViewOptions.dateRangeTemplate);\n if (this.headerModule) {\n this.headerModule.updateDateRange();\n }\n break;\n case 'dayHeaderTemplate':\n this.activeViewOptions.dayHeaderTemplate = newProp.dayHeaderTemplate;\n this.dayHeaderTemplateFn = this.templateParser(this.activeViewOptions.dayHeaderTemplate);\n state.isLayout = true;\n break;\n case 'monthHeaderTemplate':\n this.activeViewOptions.monthHeaderTemplate = newProp.monthHeaderTemplate;\n this.monthHeaderTemplateFn = this.templateParser(this.activeViewOptions.monthHeaderTemplate);\n state.isLayout = true;\n break;\n case 'resourceHeaderTemplate':\n this.activeViewOptions.resourceHeaderTemplate = newProp.resourceHeaderTemplate;\n this.resourceHeaderTemplateFn = this.templateParser(this.activeViewOptions.resourceHeaderTemplate);\n state.isLayout = true;\n break;\n case 'timezone':\n this.eventBase.timezonePropertyChange(oldProp.timezone);\n this.headerModule.setCalendarTimezone();\n break;\n case 'enableRtl':\n this.setRtlClass();\n state.isRefresh = true;\n break;\n default:\n this.extendedPropertyChange(prop, newProp, oldProp, state);\n break;\n }\n }\n this.propertyChangeAction(state);\n };\n Schedule.prototype.propertyChangeAction = function (state) {\n if (state.isRefresh) {\n this.refresh();\n }\n else if (state.isResource) {\n this.initializeResources(true);\n }\n else if (state.isView) {\n this.changeView(this.currentView, null, true);\n }\n else if (state.isDate) {\n this.changeDate(this.selectedDate);\n }\n else if (state.isLayout) {\n this.activeCellsData = null;\n this.initializeView(this.currentView);\n }\n else if (state.isDataManager && this.crudModule) {\n if (this.dragAndDropModule) {\n this.dragAndDropModule.actionObj.action = '';\n removeClass([this.element], cls.EVENT_ACTION_CLASS);\n }\n this.crudModule.refreshDataManager();\n }\n };\n Schedule.prototype.allDayRowScrollUpdate = function () {\n var dateHeader = this.element.querySelector('.' + cls.DATE_HEADER_WRAP_CLASS);\n var allDayRow = this.element.querySelector('.' + cls.ALLDAY_ROW_CLASS);\n if (this.height === 'auto' || !this.enableAllDayScroll) {\n addClass([dateHeader], cls.ALLDAY_APPOINTMENT_AUTO);\n if (dateHeader.classList.contains(cls.ALLDAY_APPOINTMENT_SCROLL)) {\n removeClass([dateHeader], cls.ALLDAY_APPOINTMENT_SCROLL);\n }\n if (this.uiStateValues.expand) {\n var allDayCells = [].slice.call(this.element.querySelectorAll('.' + cls.ALLDAY_CELLS_CLASS));\n allDayCells[0].style.height = (allDayRow.style.height) ? allDayRow.style.height : allDayCells[1].style.height;\n }\n }\n else {\n if (dateHeader.classList.contains(cls.ALLDAY_APPOINTMENT_AUTO)) {\n removeClass([dateHeader], cls.ALLDAY_APPOINTMENT_AUTO);\n }\n this.eventBase.allDayExpandScroll(dateHeader);\n }\n if (!this.uiStateValues.expand) {\n allDayRow.style.height = '';\n }\n };\n Schedule.prototype.extendedPropertyChange = function (prop, newProp, oldProp, state) {\n switch (prop) {\n case 'width':\n case 'height':\n case 'enableAllDayScroll':\n if (['Day', 'Week', 'WorkWeek'].indexOf(this.currentView) > -1) {\n this.allDayRowScrollUpdate();\n }\n this.notify(events.uiUpdate, { module: 'scroll', properties: { width: newProp.width, height: newProp.height } });\n break;\n case 'cssClass':\n if (oldProp.cssClass) {\n removeClass([this.element], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n addClass([this.element], newProp.cssClass.split(' '));\n }\n break;\n case 'hideEmptyAgendaDays':\n case 'agendaDaysCount':\n this.activeViewOptions = this.getActiveViewOptions();\n state.isView = true;\n break;\n case 'eventSettings':\n this.onEventSettingsPropertyChanged(newProp.eventSettings, oldProp.eventSettings, state);\n break;\n case 'allowKeyboardInteraction':\n if (this.keyboardInteractionModule) {\n this.keyboardInteractionModule.destroy();\n this.keyboardInteractionModule = null;\n }\n if (newProp.allowKeyboardInteraction) {\n this.keyboardInteractionModule = new KeyboardInteraction(this);\n }\n break;\n case 'timezoneDataSource':\n if (this.eventWindow) {\n this.eventWindow.refresh();\n }\n break;\n case 'editorTemplate':\n if (!isNullOrUndefined(this.editorTemplate)) {\n this.editorTemplateFn = this.templateParser(this.editorTemplate);\n }\n if (this.eventWindow) {\n this.eventWindow.setDialogContent();\n }\n break;\n case 'quickInfoTemplates':\n if (this.quickInfoTemplates.header) {\n this.quickInfoTemplatesHeaderFn = this.templateParser(this.quickInfoTemplates.header);\n }\n if (this.quickInfoTemplates.content) {\n this.quickInfoTemplatesContentFn = this.templateParser(this.quickInfoTemplates.content);\n }\n if (this.quickInfoTemplates.footer) {\n this.quickInfoTemplatesFooterFn = this.templateParser(this.quickInfoTemplates.footer);\n }\n break;\n case 'group':\n this.onGroupSettingsPropertyChanged(newProp.group, oldProp.group, state);\n break;\n case 'resources':\n state.isResource = true;\n break;\n case 'timeScale':\n this.activeViewOptions.timeScale.interval = newProp.timeScale.interval || this.activeViewOptions.timeScale.interval;\n this.activeViewOptions.timeScale.slotCount = newProp.timeScale.slotCount || this.activeViewOptions.timeScale.slotCount;\n if (this.eventWindow) {\n this.eventWindow.refreshDateTimePicker();\n }\n state.isLayout = true;\n break;\n case 'allowDragAndDrop':\n case 'allowResizing':\n case 'eventDragArea':\n this.refreshEvents(false);\n break;\n case 'weekRule':\n state.isLayout = true;\n break;\n case 'firstMonthOfYear':\n this.activeViewOptions.firstMonthOfYear = newProp.firstMonthOfYear;\n this.viewIndex = this.activeView.viewIndex;\n state.isLayout = true;\n break;\n case 'monthsCount':\n this.activeViewOptions.monthsCount = newProp.monthsCount;\n this.viewIndex = this.activeView.viewIndex;\n state.isLayout = true;\n break;\n case 'timeFormat':\n this.internalTimeFormat = newProp.timeFormat || this.activeViewOptions.timeFormat;\n if (this.eventWindow) {\n this.eventWindow.refreshDateTimePicker();\n }\n state.isLayout = true;\n break;\n case 'enableAdaptiveUI':\n if (this.showHeaderBar && this.headerModule) {\n this.destroyHeaderModule();\n this.headerModule = new HeaderRenderer(this);\n this.headerModule.updateDateRange();\n }\n state.isLayout = true;\n break;\n case 'headerIndentTemplate':\n this.activeViewOptions.headerIndentTemplate = newProp.headerIndentTemplate;\n this.headerIndentTemplateFn = this.templateParser(this.activeViewOptions.headerIndentTemplate);\n state.isLayout = true;\n break;\n }\n };\n Schedule.prototype.setRtlClass = function () {\n if (this.enableRtl) {\n addClass([this.element], 'e-rtl');\n }\n else {\n removeClass([this.element], 'e-rtl');\n }\n };\n Schedule.prototype.onGroupSettingsPropertyChanged = function (newProp, oldProp, state) {\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n if (prop === 'headerTooltipTemplate') {\n this.headerTooltipTemplateFn = this.templateParser(newProp.headerTooltipTemplate);\n }\n else {\n state.isLayout = true;\n if (this.eventWindow) {\n this.eventWindow.refresh();\n }\n }\n }\n };\n Schedule.prototype.onEventSettingsPropertyChanged = function (newProp, oldProp, state) {\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'dataSource':\n case 'query':\n case 'fields':\n case 'includeFiltersInQuery':\n this.initializeDataModule();\n state.isDataManager = true;\n break;\n case 'template':\n this.activeViewOptions.eventTemplate = newProp.template;\n this.appointmentTemplateFn = this.templateParser(this.activeViewOptions.eventTemplate);\n state.isDataManager = true;\n break;\n case 'enableTooltip':\n if (this.eventTooltip) {\n this.eventTooltip.destroy();\n this.eventTooltip = null;\n }\n if (newProp.enableTooltip) {\n this.eventTooltip = new EventTooltip(this);\n }\n break;\n case 'tooltipTemplate':\n this.eventTooltipTemplateFn = this.templateParser(this.eventSettings.tooltipTemplate);\n break;\n case 'resourceColorField':\n if (this.resourceBase) {\n this.resourceBase.setResourceCollection();\n }\n state.isDataManager = true;\n break;\n case 'editFollowingEvents':\n if (this.quickPopup) {\n this.quickPopup.refreshQuickDialog();\n }\n break;\n case 'allowAdding':\n case 'allowEditing':\n case 'allowDeleting':\n if (this.showHeaderBar && this.headerModule) {\n this.headerModule.updateAddIcon();\n }\n if (this.eventWindow) {\n this.eventWindow.refresh();\n }\n break;\n case 'spannedEventPlacement':\n case 'minimumEventDuration':\n case 'enableMaxHeight':\n case 'enableIndicator':\n this.refreshEvents(false);\n break;\n case 'ignoreWhitespace':\n state.isLayout = true;\n break;\n }\n }\n };\n Schedule.prototype.destroyHeaderModule = function () {\n if (this.headerModule) {\n this.headerModule.destroy();\n this.headerModule = null;\n }\n };\n Schedule.prototype.destroyPopups = function () {\n if (this.quickPopup) {\n this.quickPopup.destroy();\n this.quickPopup = null;\n }\n if (this.eventWindow) {\n this.eventWindow.destroy();\n this.eventWindow = null;\n }\n };\n /**\n * Allows to show the spinner on schedule at the required scenarios.\n *\n * @function showSpinner\n * @returns {void}\n */\n Schedule.prototype.showSpinner = function () {\n showSpinner(this.element);\n };\n /**\n * When the spinner is shown manually using `showSpinner` method, it can be hidden using this `hideSpinner` method.\n *\n * @function hideSpinner\n * @returns {void}\n */\n Schedule.prototype.hideSpinner = function () {\n hideSpinner(this.element);\n };\n /**\n * Sets different working hours on the required working days by accepting the required start and end time as well as the date collection\n * as its parameters.\n *\n * @function setWorkHours\n * @param {Date} dates Collection of dates on which the given start and end hour range needs to be applied.\n * @param {string} start Defines the work start hour.\n * @param {string} end Defines the work end hour.\n * @param {number} groupIndex Defines the resource index from last level.\n * @returns {void}\n */\n Schedule.prototype.setWorkHours = function (dates, start, end, groupIndex) {\n var cells = [];\n cells = this.getWorkHourCells(dates, start, end, groupIndex);\n addClass(cells, cls.WORK_HOURS_CLASS);\n };\n /**\n * Removes or resets different working hours on the required working days by accepting the required start and end time as well as the\n * date collection as its parameters.\n * if no parameters has been passed to this function, it will remove all the work hours.\n *\n * @param {Date} dates Collection of dates on which the given start and end hour range need to be applied.\n * @param {string} start Defines the work start hour.\n * @param {string} end Defines the work end hour.\n * @param {number} groupIndex Defines the resource index from last level.\n * @returns {void}\n */\n Schedule.prototype.resetWorkHours = function (dates, start, end, groupIndex) {\n if (dates === void 0) { dates = this.activeView.renderDates; }\n if (dates && start && end) {\n var cells = this.getWorkHourCells(dates, start, end, groupIndex);\n removeClass(cells, cls.WORK_HOURS_CLASS);\n }\n else {\n var workHourCells = [].slice.call(this.element.querySelectorAll('.' + cls.WORK_HOURS_CLASS));\n removeClass(workHourCells, cls.WORK_HOURS_CLASS);\n }\n };\n Schedule.prototype.getWorkHourCells = function (dates, start, end, groupIndex) {\n if (['Agenda', 'MonthAgenda', 'Month', 'TimelineMonth'].indexOf(this.currentView) > -1) {\n return [];\n }\n var startHour = this.getStartEndTime(start);\n var endHour = this.getStartEndTime(end);\n var tableEle = this.getContentTable();\n if (isNullOrUndefined(startHour) || isNullOrUndefined(endHour) || !tableEle) {\n return [];\n }\n startHour.setMilliseconds(0);\n endHour.setMilliseconds(0);\n var viewStartHour = this.activeView.getStartHour();\n if (startHour < viewStartHour) {\n startHour = viewStartHour;\n }\n var viewEndHour = this.activeView.getEndHour();\n if (endHour > viewEndHour) {\n endHour = viewEndHour;\n }\n var msMajorInterval = this.activeViewOptions.timeScale.interval * util.MS_PER_MINUTE;\n var msInterval = msMajorInterval / this.activeViewOptions.timeScale.slotCount;\n var startIndex = Math.round((startHour.getTime() - viewStartHour.getTime()) / msInterval);\n var endIndex = Math.ceil((endHour.getTime() - viewStartHour.getTime()) / msInterval);\n var tempStartIndex = startIndex;\n var tempEndIndex = endIndex;\n var cells = [];\n for (var _i = 0, dates_1 = dates; _i < dates_1.length; _i++) {\n var date = dates_1[_i];\n date = this.getDateTime(date);\n util.resetTime(date);\n var renderDates = this.activeView.renderDates;\n if (!isNullOrUndefined(groupIndex) && this.resourceBase && !this.activeView.isTimelineView()) {\n renderDates = this.resourceBase.lastResourceLevel[parseInt(groupIndex.toString(), 10)].renderDates;\n }\n var colIndex = this.getIndexOfDate(renderDates, date);\n if (colIndex >= 0) {\n if (this.activeView.isTimelineView()) {\n var slotsPerDay = Math.round((viewEndHour.getTime() - viewStartHour.getTime()) / msInterval);\n startIndex = tempStartIndex + (colIndex * slotsPerDay);\n endIndex = tempEndIndex + (colIndex * slotsPerDay);\n }\n for (var i = startIndex; i < endIndex; i++) {\n if (this.activeView.isTimelineView()) {\n var rowIndex = (!isNullOrUndefined(groupIndex)) ? groupIndex : 0;\n cells.push(tableEle.rows[parseInt(rowIndex.toString(), 10)].cells[parseInt(i.toString(), 10)]);\n }\n else {\n if (!isNullOrUndefined(groupIndex)) {\n var selector = '.' + cls.WORK_CELLS_CLASS + '[data-group-index=\"' + groupIndex + '\"]';\n var tds = [].slice.call(tableEle.rows[parseInt(i.toString(), 10)].querySelectorAll(selector));\n cells.push(tds[parseInt(colIndex.toString(), 10)]);\n }\n else {\n cells.push(tableEle.rows[parseInt(i.toString(), 10)].cells[parseInt(colIndex.toString(), 10)]);\n }\n }\n }\n }\n }\n return cells;\n };\n /**\n * Retrieves the start and end time information of the specific cell element.\n *\n * @function getCellDetails\n * @param {Element | Element[]} tdCol Accepts the single or collection of elements.\n * @returns {CellClickEventArgs} Object An object holding the startTime, endTime and all-day information along with the target HTML element will be returned.\n */\n Schedule.prototype.getCellDetails = function (tdCol) {\n var td = (tdCol instanceof Array) ? tdCol : [tdCol];\n var firstTd = getElement(td[0]);\n var lastTd = getElement(td.slice(-1)[0]);\n var startTime = this.getDateFromElement(firstTd);\n var endTime = this.getDateFromElement(lastTd);\n if (isNullOrUndefined(startTime) || isNullOrUndefined(endTime)) {\n return undefined;\n }\n var endDateFromColSpan = this.activeView.isTimelineView() && !isNullOrUndefined(lastTd.getAttribute('colSpan')) &&\n this.headerRows.length > 0;\n var duration = endDateFromColSpan ? parseInt(lastTd.getAttribute('colSpan'), 10) : 1;\n if (!this.activeViewOptions.timeScale.enable || endDateFromColSpan || lastTd.classList.contains(cls.ALLDAY_CELLS_CLASS) ||\n lastTd.classList.contains(cls.HEADER_CELLS_CLASS)) {\n endTime = util.addDays(new Date(endTime.getTime()), duration);\n }\n else {\n endTime = this.activeView.getEndDateFromStartDate(endTime);\n }\n var data = {\n startTime: startTime,\n endTime: endTime,\n isAllDay: this.isAllDayCell(firstTd),\n element: tdCol\n };\n var groupIndex = firstTd.getAttribute('data-group-index');\n if (!isNullOrUndefined(groupIndex)) {\n data.groupIndex = parseInt(groupIndex, 10);\n }\n return data;\n };\n /**\n * Retrieves the selected cell elements.\n *\n * @function getSelectedElements\n * @returns {Element[]} The elements of currently selected cells will be returned.\n */\n Schedule.prototype.getSelectedElements = function () {\n if (this.keyboardInteractionModule && this.keyboardInteractionModule.selectedCells.length > 0) {\n return this.keyboardInteractionModule.selectedCells;\n }\n return this.getSelectedCells();\n };\n /**\n * To get the resource collection\n *\n * @function getResourceCollections\n * @returns {ResourcesModel[]} Returns the resource collections\n */\n Schedule.prototype.getResourceCollections = function () {\n return this.resourceCollection;\n };\n /**\n * To set the resource collection\n *\n * @function setResourceCollections\n * @param {ResourcesModel[]} resourceCol Accepts the resource collections in ResourcesModel type\n * @returns {void}\n */\n Schedule.prototype.setResourceCollections = function (resourceCol) {\n this.setProperties({ resources: resourceCol }, false);\n };\n /**\n * Current View could be change based on the provided parameters.\n *\n * @function changeCurrentView\n * @param {View} viewName Accept the view in the viewCollections.\n * @param {number} viewIndex Accept the viewIndex in the viewCollections.\n * @returns {void}\n */\n Schedule.prototype.changeCurrentView = function (viewName, viewIndex) {\n var index = this.getViewIndex(viewName);\n var view = viewName.charAt(0).toLowerCase() + viewName.slice(1);\n var viewOptions = this.viewOptions[\"\" + view];\n if (viewOptions) {\n index = this.viewCollections.indexOf(viewOptions[viewIndex || 0]);\n }\n if (index === -1 || index === this.viewIndex) {\n return;\n }\n this.changeView(viewName, null, null, index);\n };\n /**\n * Return the current view Index.\n *\n * @function getCurrentViewIndex\n * @returns {number} Returns the view index\n */\n Schedule.prototype.getCurrentViewIndex = function () {\n return this.viewIndex;\n };\n /**\n * Retrieves the resource details based on the provided resource index.\n *\n * @param {number} index index of the resources at the last level.\n * @returns {ResourceDetails} Object An object holding the details of resource and resourceData.\n */\n Schedule.prototype.getResourcesByIndex = function (index) {\n if (this.resourceBase && this.resourceBase.lastResourceLevel) {\n if (index < 0 || index >= this.resourceBase.lastResourceLevel.length) {\n return undefined;\n }\n var data = this.resourceBase.lastResourceLevel[parseInt(index.toString(), 10)];\n var groupData = {};\n this.resourceBase.setResourceValues(groupData, index);\n return { resource: data.resource, resourceData: data.resourceData, groupData: groupData };\n }\n return undefined;\n };\n /**\n * This method allows to expand the resource that available on the scheduler.\n *\n * @function expandResource\n * @param {string | number} resourceId Accepts the resource id in either string or number type\n * @param {string} name Accepts the name of the resource collection\n * @returns {void}\n */\n Schedule.prototype.expandResource = function (resourceId, name) {\n if (this.activeView.isTimelineView() && this.resourceBase && this.resourceCollection.length > 1) {\n this.resourceBase.resourceExpand(resourceId, name, false);\n }\n };\n /**\n * This method allows to collapse the resource that available on the scheduler.\n *\n * @function collapseResource\n * @param {string | number} resourceId Accepts the resource id in either string or number type\n * @param {string} name Accepts the name of the resource collection\n * @returns {void}\n */\n Schedule.prototype.collapseResource = function (resourceId, name) {\n if (this.activeView.isTimelineView() && this.resourceBase && this.resourceCollection.length > 1) {\n this.resourceBase.resourceExpand(resourceId, name, true);\n }\n };\n /**\n * Scrolls the Schedule content area to the specified time.\n *\n * @function scrollTo\n * @param {string} hour Accepts the time value in the skeleton format of 'Hm'.\n * @param {Date} scrollDate Accepts the date object value.\n * @returns {void}\n */\n Schedule.prototype.scrollTo = function (hour, scrollDate) {\n if (this.activeView.scrollToDate && isNullOrUndefined(hour) && scrollDate) {\n this.activeView.scrollToDate(scrollDate);\n }\n else if (this.activeView.scrollToHour) {\n this.activeView.scrollToHour(hour, scrollDate);\n }\n };\n /**\n * This method allows scroll to the position of the any resources that available on the scheduler.\n * This method is applicable for without Agenda and Month agenda views of the schedule.\n *\n * @function scrollToResource\n * @param {string | number} resourceId Accepts the resource id in either string or number type\n * @param {string} groupName Accepts the name of the resource collection\n * @returns {void}\n */\n Schedule.prototype.scrollToResource = function (resourceId, groupName) {\n if (this.resourceBase && this.resourceBase.lastResourceLevel) {\n this.resourceBase.resourceScroll(resourceId, groupName);\n }\n };\n /**\n * Exports the Scheduler events to a calendar (.ics) file. By default, the calendar is exported with a file name `Calendar.ics`.\n * To change this file name on export, pass the custom string value as `fileName` to get the file downloaded with this provided name.\n *\n * @function exportToICalendar\n * @param {string} fileName Accepts the string value.\n * @param {Object[]} customData Accepts the collection of objects.\n * @returns {void}\n */\n Schedule.prototype.exportToICalendar = function (fileName, customData) {\n if (this.iCalendarExportModule) {\n this.iCalendarExportModule.initializeCalendarExport(fileName, customData);\n }\n else {\n throw Error('Inject ICalendarExport module');\n }\n };\n /**\n * Imports the events from an .ics file downloaded from any of the calendars like Google or Outlook into the Scheduler.\n * This method accepts the blob object or string format of an .ics file to be imported as a mandatory argument.\n *\n * @function importICalendar\n * @param {Blob | string} fileContent Accepts the file object or string format of an .ics file.\n * @returns {void}\n */\n Schedule.prototype.importICalendar = function (fileContent) {\n if (this.iCalendarImportModule) {\n this.iCalendarImportModule.initializeCalendarImport(fileContent);\n }\n else {\n throw Error('Inject ICalendarImport module');\n }\n };\n /**\n * Adds the newly created event into the Schedule dataSource.\n *\n * @function addEvent\n * @param {Object | Object[]} data Single or collection of event objects to be added into Schedule.\n * @returns {void}\n */\n Schedule.prototype.addEvent = function (data) {\n this.crudModule.addEvent(data);\n };\n /**\n * Generates the occurrences of a single recurrence event based on the provided event.\n *\n * @function generateEventOccurrences\n * @param {Object} event Accepts the parent recurrence event from which the occurrences are generated.\n * @param {Date} startDate Accepts the start date for the event occurrences. If not provided, the event's start date will be used.\n * @returns {Object[]} Returns the collection of occurrence event objects.\n */\n Schedule.prototype.generateEventOccurrences = function (event, startDate) {\n return (this.eventBase) ? this.eventBase.generateOccurrence(event, startDate) : [];\n };\n /**\n * Allows the Scheduler events data to be exported as an Excel file either in .xlsx or .csv file formats.\n * By default, the whole event collection bound to the Scheduler gets exported as an Excel file.\n * To export only the specific events of Scheduler, you need to pass the custom data collection as\n * a parameter to this `exportToExcel` method. This method accepts the export options as arguments such as fileName,\n * exportType, fields, customData, and includeOccurrences. The `fileName` denotes the name to be given for the exported\n * file and the `exportType` allows you to set the format of an Excel file to be exported either as .xlsx or .csv.\n * The custom or specific field collection of event dataSource to be exported can be provided through `fields` option\n * and the custom data collection can be exported by passing them through the `customData` option. There also exists\n * option to export each individual instances of the recurring events to an Excel file, by setting true or false to the\n * `includeOccurrences` option, denoting either to include or exclude the occurrences as separate instances on an exported Excel file.\n *\n * @function exportToExcel\n * @param {ExportOptions} excelExportOptions The export options to be set before start with exporting the Scheduler events to an Excel file.\n * @returns {void}\n */\n Schedule.prototype.exportToExcel = function (excelExportOptions) {\n if (this.excelExportModule) {\n this.excelExportModule.initializeExcelExport(excelExportOptions);\n }\n else {\n throw Error('Inject ExcelExport module');\n }\n };\n /**\n * Method allows to print the scheduler.\n *\n * @function print\n * @param {ScheduleModel} printOptions The export options to be set before start with exporting\n * the Scheduler events to the print window.\n * @returns {void}\n */\n Schedule.prototype.print = function (printOptions) {\n if (this.printModule) {\n this.printModule.print(printOptions);\n }\n else {\n throw Error('Inject Print module');\n }\n };\n /**\n * Updates the changes made in the event object by passing it as an parameter into the dataSource.\n *\n * @function saveEvent\n * @param {Object | Object[]} data Single or collection of event objects to be saved into Schedule.\n * @param {CurrentAction} currentAction Denotes the action that takes place either for editing occurrence or series.\n * The valid current action names are `EditOccurrence` or `EditSeries`.\n * @returns {void}\n */\n Schedule.prototype.saveEvent = function (data, currentAction) {\n this.crudModule.saveEvent(data, currentAction);\n };\n /**\n * Deletes the events based on the provided ID or event collection in the argument list.\n *\n * @function deleteEvent\n * @param {string | number | Object | Object[]} id Accepts the ID as string or number type or single or collection of the event object which needs to be removed from the Schedule.\n * @param {CurrentAction} currentAction Denotes the delete action that takes place either on occurrence or series events.\n * The valid current action names are `Delete`, `DeleteOccurrence` or `DeleteSeries`.\n * @returns {void}\n */\n Schedule.prototype.deleteEvent = function (id, currentAction) {\n this.crudModule.deleteEvent(id, currentAction);\n };\n /**\n * Retrieves the entire collection of events bound to the Schedule.\n *\n * @function getEvents\n * @param {Date} startDate Accepts the start date.\n * @param {Date} endDate Accepts te end date.\n * @param {boolean} includeOccurrences Accepts the boolean value to process the occurrence from recurrence series.\n * @returns {Object[]} Returns the collection of event objects from the Schedule.\n */\n Schedule.prototype.getEvents = function (startDate, endDate, includeOccurrences) {\n var eventCollections = [];\n if (includeOccurrences) {\n eventCollections = this.eventBase.getProcessedEvents();\n }\n else {\n eventCollections = this.eventsData;\n }\n if (startDate) {\n startDate = this.getDateTime(startDate);\n }\n if (endDate) {\n endDate = this.getDateTime(endDate);\n }\n eventCollections = this.eventBase.filterEventsByRange(eventCollections, startDate, endDate);\n return eventCollections;\n };\n /**\n * Retrieves the entire collection of block events bound to the Schedule.\n *\n * @function getBlockEvents\n * @param {Date} startDate Accepts the start date.\n * @param {Date} endDate Accepts te end date.\n * @param {boolean} includeOccurrences Accepts the boolean value to process the occurrence from recurrence series.\n * @returns {Object[]} Returns the collection of block event objects from the Schedule.\n */\n Schedule.prototype.getBlockEvents = function (startDate, endDate, includeOccurrences) {\n var eventCollections = [];\n if (includeOccurrences) {\n eventCollections = this.eventBase.getProcessedEvents(this.blockData);\n }\n else {\n eventCollections = this.blockData;\n }\n if (startDate) {\n startDate = this.getDateTime(startDate);\n }\n if (endDate) {\n endDate = this.getDateTime(endDate);\n }\n eventCollections = this.eventBase.filterEventsByRange(eventCollections, startDate, endDate);\n return eventCollections;\n };\n /**\n * Retrieves the occurrences of a single recurrence event based on the provided parent ID.\n *\n * @function getOccurrencesByID\n * @param {number} eventID ID of the parent recurrence data from which the occurrences are fetched.\n * @returns {Object[]} Returns the collection of occurrence event objects.\n */\n Schedule.prototype.getOccurrencesByID = function (eventID) {\n return this.eventBase.getOccurrencesByID(eventID);\n };\n /**\n * Retrieves all the occurrences that lies between the specific start and end time range.\n *\n * @function getOccurrencesByRange\n * @param {Date} startTime Denotes the start time range.\n * @param {Date} endTime Denotes the end time range.\n * @returns {Object[]} Returns the collection of occurrence event objects that lies between the provided start and end time.\n */\n Schedule.prototype.getOccurrencesByRange = function (startTime, endTime) {\n startTime = this.getDateTime(startTime);\n endTime = this.getDateTime(endTime);\n return this.eventBase.getOccurrencesByRange(startTime, endTime);\n };\n /**\n * Retrieves the dates that lies on active view of Schedule.\n *\n * @function getCurrentViewDates\n * @returns {Date[]} Returns the collection of dates.\n */\n Schedule.prototype.getCurrentViewDates = function () {\n return this.activeView ? this.activeView.renderDates : [];\n };\n /**\n * Set the recurrence editor instance from custom editor template.\n *\n * @function setRecurrenceEditor\n * @param {RecurrenceEditor} recurrenceEditor instance has passed to fetch the instance in event window.\n * @returns {void}\n */\n Schedule.prototype.setRecurrenceEditor = function (recurrenceEditor) {\n this.eventWindow.setRecurrenceEditor(recurrenceEditor);\n };\n /**\n * Get the maximum id of an event.\n *\n * @function getEventMaxID\n * @returns {number | string} Returns the maximum ID from scheduler data collections.\n */\n Schedule.prototype.getEventMaxID = function () {\n return this.eventBase.getEventMaxID();\n };\n /**\n * Get deleted occurrences from given recurrence series.\n *\n * @function getDeletedOccurrences\n * @param {string | number | Object} recurrenceData Accepts the parent ID of the event object or parent event object\n * @returns {Object[]} Returns the collection of deleted occurrence events.\n */\n Schedule.prototype.getDeletedOccurrences = function (recurrenceData) {\n return this.eventBase.getDeletedOccurrences(recurrenceData);\n };\n /**\n * Retrieves the events that lies on the current date range of the active view of Schedule.\n *\n * @function getCurrentViewEvents\n * @returns {Object[]} Returns the collection of events.\n */\n Schedule.prototype.getCurrentViewEvents = function () {\n return this.eventsProcessed;\n };\n /**\n * Refreshes the event dataSource. This method may be useful when the events alone in the schedule needs to be re-rendered.\n *\n * @function refreshEvents\n * @param {boolean} isRemoteRefresh Accepts the boolean to refresh data from remote or local\n * @returns {void}\n */\n Schedule.prototype.refreshEvents = function (isRemoteRefresh) {\n if (isRemoteRefresh === void 0) { isRemoteRefresh = true; }\n if (isRemoteRefresh) {\n if (this.dragAndDropModule) {\n this.dragAndDropModule.actionObj.action = '';\n removeClass([this.element], cls.EVENT_ACTION_CLASS);\n }\n this.crudModule.refreshDataManager();\n }\n else {\n if (this.uiStateValues) {\n this.uiStateValues.isPreventTimezone = true;\n }\n if (this.crudModule) {\n this.crudModule.refreshProcessedData();\n }\n if (this.uiStateValues) {\n this.uiStateValues.isPreventTimezone = false;\n }\n }\n };\n /**\n * Method to refresh the given Schedule templates\n *\n * @param {string} templateName Accepts the template name\n * @returns {void}\n */\n Schedule.prototype.refreshTemplates = function (templateName) {\n if (templateName) {\n this.resetTemplates([templateName]);\n }\n else {\n this.resetTemplates();\n }\n switch (templateName) {\n case 'eventTemplate':\n this.appointmentTemplateFn = this.templateParser(this.activeViewOptions.eventTemplate);\n this.refreshEvents(false);\n break;\n case 'dateHeaderTemplate':\n this.dateHeaderTemplateFn = this.templateParser(this.activeViewOptions.dateHeaderTemplate);\n this.activeView.refreshHeader();\n break;\n case 'dateRangeTemplate':\n this.dateRangeTemplateFn = this.templateParser(this.activeViewOptions.dateRangeTemplate);\n if (this.headerModule) {\n this.headerModule.refresh();\n }\n break;\n case 'resourceHeaderTemplate':\n this.resourceHeaderTemplateFn = this.templateParser(this.activeViewOptions.resourceHeaderTemplate);\n if (this.activeView.isTimelineView()) {\n this.activeView.refreshResourceHeader();\n }\n else {\n this.activeView.refreshHeader();\n }\n break;\n case 'quickInfoTemplates':\n if (this.quickPopup) {\n this.quickPopup.destroy();\n this.quickPopup = null;\n }\n this.quickPopup = new QuickPopups(this);\n this.quickInfoTemplatesHeaderFn = this.templateParser(this.quickInfoTemplates.header);\n this.quickInfoTemplatesContentFn = this.templateParser(this.quickInfoTemplates.content);\n this.quickInfoTemplatesFooterFn = this.templateParser(this.quickInfoTemplates.footer);\n break;\n case 'editorTemplate':\n if (this.eventWindow) {\n this.eventWindow.destroy();\n this.eventWindow = null;\n }\n this.eventWindow = new EventWindow(this);\n this.editorTemplateFn = this.templateParser(this.editorTemplate);\n break;\n case 'tooltipTemplate':\n case 'headerTooltipTemplate':\n if (this.eventTooltip) {\n this.eventTooltip.destroy();\n this.eventTooltip = null;\n }\n this.eventTooltip = new EventTooltip(this);\n this.eventTooltipTemplateFn = this.templateParser(this.eventSettings.tooltipTemplate);\n this.headerTooltipTemplateFn = this.templateParser(this.activeViewOptions.group.headerTooltipTemplate);\n break;\n default:\n this.initializeView(this.currentView);\n break;\n }\n };\n /**\n * Refreshes the Schedule layout without re-render.\n *\n * @function refreshLayout\n * @returns {void}\n */\n Schedule.prototype.refreshLayout = function () {\n this.onScheduleResize();\n if (this.headerModule) {\n this.headerModule.refresh();\n }\n if (this.eventWindow) {\n this.eventWindow.refresh();\n }\n };\n /**\n * To retrieve the appointment object from element.\n *\n * @function getEventDetails\n * @param {Element} element Denotes the event UI element on the Schedule.\n * @returns {Object} Returns the event details.\n */\n Schedule.prototype.getEventDetails = function (element) {\n element = getElement(element);\n var guid = element.getAttribute('data-guid');\n if (guid) {\n return this.eventBase.getEventByGuid(guid);\n }\n return {};\n };\n /**\n * To check whether the given time range slots are available for event creation or already occupied by other events.\n *\n * @function isSlotAvailable\n * @param {Date | Object} startTime Denotes the start time of the slot.\n * @param {Date} endTime Denotes the end time of the slot.\n * @param {number} groupIndex Defines the resource index from last level.\n * @returns {boolean} Returns true, if the slot that lies in the provided time range does not contain any other events.\n */\n Schedule.prototype.isSlotAvailable = function (startTime, endTime, groupIndex) {\n var _this = this;\n var eventStart;\n var eventEnd;\n var eventObj = this.activeEventData.event;\n if (startTime instanceof Date || typeof (startTime) === 'string') {\n eventStart = startTime;\n eventEnd = endTime;\n }\n else {\n eventObj = startTime;\n eventStart = startTime[this.eventFields.startTime];\n eventEnd = startTime[this.eventFields.endTime];\n if (this.resourceBase) {\n groupIndex = this.eventBase.getGroupIndexFromEvent(startTime);\n }\n }\n if (isNullOrUndefined(eventStart) || isNullOrUndefined(eventEnd)) {\n return true;\n }\n eventStart = this.getDateTime(eventStart);\n eventEnd = this.getDateTime(eventEnd);\n var eventCollection = this.eventBase.filterEvents(eventStart, eventEnd);\n if (!isNullOrUndefined(groupIndex) && this.resourceBase && this.resourceBase.lastResourceLevel.length > 0) {\n eventCollection =\n this.eventBase.filterEventsByResource(this.resourceBase.lastResourceLevel[parseInt(groupIndex.toString(), 10)], eventCollection);\n }\n if (eventObj) {\n if (eventObj.Guid) {\n eventCollection = eventCollection.filter(function (event) { return event.Guid !== eventObj.Guid; });\n }\n else {\n eventCollection = eventCollection.filter(function (event) {\n return event[_this.eventFields.id] !== eventObj[_this.eventFields.id];\n });\n }\n }\n return (eventCollection.length > 0) ? false : true;\n };\n /**\n * To manually open the event editor on specific time or on certain events.\n *\n * @function openEditor\n * @param {Object} data It can be either cell data or event data.\n * @param {CurrentAction} action Defines the action for which the editor needs to be opened such as either for new event creation or\n * for editing of existing events. The applicable action names that can be used here are `Add`, `Save`, `EditOccurrence`\n * and `EditSeries`.\n * @param {boolean} isEventData It allows to decide whether the editor needs to be opened with the clicked cell details or with the\n * passed event details.\n * @param {number} repeatType It opens the editor with the recurrence options based on the provided repeat type.\n * @returns {void}\n */\n Schedule.prototype.openEditor = function (data, action, isEventData, repeatType) {\n if (action === 'Add' && !isEventData) {\n data.startTime = this.getDateTime(data.startTime);\n data.endTime = this.getDateTime(data.endTime);\n if (!isNullOrUndefined(data.element)) {\n data.element = getElement(data.element);\n }\n }\n else {\n data[this.eventFields.startTime] = this.getDateTime(data[this.eventFields.startTime]);\n data[this.eventFields.endTime] = this.getDateTime(data[this.eventFields.endTime]);\n }\n this.currentAction = action;\n if (action !== 'Add') {\n this.activeEventData.event = data;\n }\n this.eventWindow.openEditor(data, action, isEventData, repeatType);\n };\n /**\n * To manually close the event editor window\n *\n * @function closeEditor\n * @returns {void}\n */\n Schedule.prototype.closeEditor = function () {\n if (this.eventWindow) {\n this.eventWindow.dialogClose();\n }\n };\n /**\n * To manually open the quick info popup based on cell or event details.\n *\n * @param {object} data Defines the cell or event data. If the data contains valid ID, it will open event quick info popup,\n * otherwise cell quick info popup displayed.\n * @returns {void}\n */\n Schedule.prototype.openQuickInfoPopup = function (data) {\n var _this = this;\n if (this.currentView === 'Year' || isNullOrUndefined(data)) {\n return;\n }\n if (isNullOrUndefined(data[this.eventFields.id])) {\n if (this.currentView === 'Agenda' || this.currentView === 'MonthAgenda' || isNullOrUndefined(this.activeView)) {\n return;\n }\n var cellData = {\n startTime: this.activeCellsData.startTime = this.getDateTime(data[this.eventFields.startTime]),\n endTime: this.activeCellsData.endTime = this.getDateTime(data[this.eventFields.endTime]),\n isAllDay: this.activeCellsData.isAllDay =\n !isNullOrUndefined(data[this.eventFields.isAllDay]) ? data[this.eventFields.isAllDay] : false\n };\n var startTime = this.activeView.getAdjustedDate(new Date(cellData.startTime));\n if (startTime) {\n var query = '.' + cls.WORK_CELLS_CLASS + '[data-date=\"' + startTime.getTime() + '\"]';\n if (this.activeViewOptions.group.resources.length > 0 && !this.uiStateValues.isGroupAdaptive\n && this.resourceBase && this.eventBase) {\n cellData.groupIndex = this.eventBase.getGroupIndexFromEvent(data);\n query = '.' + cls.WORK_CELLS_CLASS + '[data-date=\"' + startTime.getTime() + '\"][data-group-index=\"' + cellData.groupIndex + '\"]';\n }\n var workCell = this.element.querySelector(query);\n if (workCell) {\n workCell.focus();\n cellData.element = workCell;\n this.notify(events.cellClick, cellData);\n }\n }\n }\n else {\n var app = this.getCurrentViewEvents().filter(function (item) {\n return data[_this.eventFields.id] === item[_this.eventFields.id];\n });\n if (app.length <= 0) {\n return;\n }\n var selectEvent = app[0];\n if (data[this.eventFields.recurrenceRule]) {\n var occurence = app.filter(function (x) {\n return x[_this.eventFields.startTime].getTime() === data[_this.eventFields.startTime].getTime();\n });\n if (occurence.length > 0) {\n selectEvent = occurence[0];\n }\n }\n var element = this.element.querySelector('div[data-guid=\"' + selectEvent.Guid + '\"]');\n if (element) {\n this.eventBase.removeSelectedAppointmentClass();\n this.eventBase.addSelectedAppointments([element], false);\n this.activeEventData = { event: selectEvent, element: element };\n if (this.currentView === 'Agenda' || this.currentView === 'MonthAgenda') {\n addClass([this.activeEventData.element], cls.AGENDA_SELECTED_CELL);\n }\n this.notify(events.eventClick, this.activeEventData);\n }\n }\n };\n /**\n * To manually close the quick info popup\n *\n * @function closeQuickInfoPopup\n * @returns {void}\n */\n Schedule.prototype.closeQuickInfoPopup = function () {\n if (this.quickPopup) {\n this.quickPopup.quickPopupHide(true);\n }\n };\n /**\n * Closes the tooltip.\n * For example, when the context menu is opened for an event,\n * the tooltip can be closed by calling this method.\n *\n * @function closeTooltip\n * @returns {void}\n */\n Schedule.prototype.closeTooltip = function () {\n if (this.eventTooltip) {\n this.eventTooltip.close();\n }\n };\n /**\n * Select the resource based on group index in mobile mode.\n *\n * @param {number} groupIndex Defines the resource index based on last level.\n * @returns {void}\n */\n Schedule.prototype.selectResourceByIndex = function (groupIndex) {\n if (this.resourceBase && this.uiStateValues.isGroupAdaptive) {\n this.resourceBase.selectResourceByIndex(groupIndex);\n }\n };\n /**\n * Select the resources to the based on id.\n *\n * @param {string | number} id id of the resource defined in resources collection.\n * @param {string} name Name of the resource defined in resources collection.\n * @returns {number} Returns the group index\n */\n Schedule.prototype.getIndexFromResourceId = function (id, name) {\n if (this.resourceBase) {\n return this.resourceBase.getIndexFromResourceId(id, name);\n }\n return null;\n };\n /**\n * Adds the resources to the specified index.\n *\n * @param {Object | Object[]} resources Accepts the resource data in single or collection of data.\n * @param {string} name Name of the resource defined in resources collection.\n * @param {number} index Index or position where the resource should be added.\n * @returns {void}\n */\n Schedule.prototype.addResource = function (resources, name, index) {\n this.resourceBase.addResource(resources, name, index);\n };\n /**\n * Removes the specified resource.\n *\n * @param {string | string[] | number | number[]} resourceId Specifies the resource id to be removed.\n * @param {string} name Specifies the resource name from which the id should be referred.\n * @returns {void}\n */\n Schedule.prototype.removeResource = function (resourceId, name) {\n this.resourceBase.removeResource(resourceId, name);\n };\n /**\n * Destroys the Schedule component.\n *\n * @function destroy\n * @returns {void}\n */\n Schedule.prototype.destroy = function () {\n if (this.eventTooltip) {\n this.eventTooltip.destroy();\n this.eventTooltip = null;\n }\n this.destroyPopups();\n this.hideSpinner();\n this.unWireEvents();\n this.destroyHeaderModule();\n if (this.eventBase) {\n this.eventBase.destroy();\n this.eventBase = null;\n }\n if (this.workCellAction) {\n this.workCellAction.destroy();\n this.workCellAction = null;\n }\n if (this.inlineModule) {\n this.inlineModule.destroy();\n this.inlineModule = null;\n }\n if (this.keyboardInteractionModule) {\n this.keyboardInteractionModule.destroy();\n this.keyboardInteractionModule = null;\n }\n if (this.scrollModule) {\n this.scrollModule.destroy();\n this.scrollModule = null;\n }\n if (this.printModule) {\n this.printModule.destroy();\n }\n if (this.activeView) {\n this.resetTemplates();\n this.activeView.removeEventListener();\n this.activeView.destroy();\n this.activeView = null;\n }\n if (this.scheduleTouchModule) {\n this.scheduleTouchModule.destroy();\n this.scheduleTouchModule = null;\n }\n if (this.crudModule) {\n this.crudModule.destroy();\n this.crudModule = null;\n }\n if (this.dataModule) {\n this.dataModule.destroy();\n this.dataModule = null;\n }\n _super.prototype.destroy.call(this);\n var modules = [\n 'dayModule', 'weekModule', 'workWeekModule', 'monthModule', 'monthAgendaModule', 'yearModule', 'agendaModule',\n 'timelineViewsModule', 'timelineMonthModule', 'timelineYearModule', 'resizeModule', 'dragAndDropModule',\n 'excelExportModule', 'printModule', 'iCalendarExportModule', 'iCalendarImportModule', 'tzModule', 'eventsData',\n 'eventsProcessed', 'blockData', 'blockProcessed', 'uiStateValues', 'viewCollections', 'viewOptions', 'defaultLocale',\n 'localeObj', 'selectedElements', 'resourceCollection', 'editorTitles', 'eventFields', 'activeViewOptions',\n 'activeEventData', 'activeCellsData', 'renderModule'\n ];\n for (var _i = 0, modules_1 = modules; _i < modules_1.length; _i++) {\n var module = modules_1[_i];\n this[\"\" + module] = null;\n }\n util.removeChildren(this.element);\n var removeClasses = [cls.ROOT, cls.RTL, cls.DEVICE_CLASS, cls.MULTI_DRAG];\n if (this.cssClass) {\n removeClasses = removeClasses.concat(this.cssClass.split(' '));\n }\n removeClass([this.element], removeClasses);\n };\n __decorate([\n Property('auto')\n ], Schedule.prototype, \"width\", void 0);\n __decorate([\n Property('auto')\n ], Schedule.prototype, \"height\", void 0);\n __decorate([\n Property(true)\n ], Schedule.prototype, \"showHeaderBar\", void 0);\n __decorate([\n Property(true)\n ], Schedule.prototype, \"showTimeIndicator\", void 0);\n __decorate([\n Property(true)\n ], Schedule.prototype, \"allowSwiping\", void 0);\n __decorate([\n Property('Week')\n ], Schedule.prototype, \"currentView\", void 0);\n __decorate([\n Property(['Day', 'Week', 'WorkWeek', 'Month', 'Agenda'])\n ], Schedule.prototype, \"views\", void 0);\n __decorate([\n Property(new Date())\n ], Schedule.prototype, \"selectedDate\", void 0);\n __decorate([\n Property(new Date(1900, 0, 1))\n ], Schedule.prototype, \"minDate\", void 0);\n __decorate([\n Property(new Date(2099, 11, 31))\n ], Schedule.prototype, \"maxDate\", void 0);\n __decorate([\n Property()\n ], Schedule.prototype, \"dateFormat\", void 0);\n __decorate([\n Property('Gregorian')\n ], Schedule.prototype, \"calendarMode\", void 0);\n __decorate([\n Property(true)\n ], Schedule.prototype, \"showWeekend\", void 0);\n __decorate([\n Property(0)\n ], Schedule.prototype, \"firstDayOfWeek\", void 0);\n __decorate([\n Property('FirstDay')\n ], Schedule.prototype, \"weekRule\", void 0);\n __decorate([\n Property([1, 2, 3, 4, 5])\n ], Schedule.prototype, \"workDays\", void 0);\n __decorate([\n Property(12)\n ], Schedule.prototype, \"monthsCount\", void 0);\n __decorate([\n Property('00:00')\n ], Schedule.prototype, \"startHour\", void 0);\n __decorate([\n Property('24:00')\n ], Schedule.prototype, \"endHour\", void 0);\n __decorate([\n Property(null)\n ], Schedule.prototype, \"timeFormat\", void 0);\n __decorate([\n Property(true)\n ], Schedule.prototype, \"enableHtmlSanitizer\", void 0);\n __decorate([\n Property(false)\n ], Schedule.prototype, \"enableAllDayScroll\", void 0);\n __decorate([\n Property(false)\n ], Schedule.prototype, \"enableAdaptiveUI\", void 0);\n __decorate([\n Property(true)\n ], Schedule.prototype, \"allowResizing\", void 0);\n __decorate([\n Complex({}, WorkHours)\n ], Schedule.prototype, \"workHours\", void 0);\n __decorate([\n Complex({}, TimeScale)\n ], Schedule.prototype, \"timeScale\", void 0);\n __decorate([\n Property(true)\n ], Schedule.prototype, \"allowKeyboardInteraction\", void 0);\n __decorate([\n Property(true)\n ], Schedule.prototype, \"allowDragAndDrop\", void 0);\n __decorate([\n Property()\n ], Schedule.prototype, \"dateHeaderTemplate\", void 0);\n __decorate([\n Property()\n ], Schedule.prototype, \"dateRangeTemplate\", void 0);\n __decorate([\n Property()\n ], Schedule.prototype, \"cellHeaderTemplate\", void 0);\n __decorate([\n Property()\n ], Schedule.prototype, \"dayHeaderTemplate\", void 0);\n __decorate([\n Property()\n ], Schedule.prototype, \"monthHeaderTemplate\", void 0);\n __decorate([\n Property()\n ], Schedule.prototype, \"cellTemplate\", void 0);\n __decorate([\n Property(false)\n ], Schedule.prototype, \"readonly\", void 0);\n __decorate([\n Property(true)\n ], Schedule.prototype, \"showQuickInfo\", void 0);\n __decorate([\n Property(false)\n ], Schedule.prototype, \"allowInline\", void 0);\n __decorate([\n Property(true)\n ], Schedule.prototype, \"allowMultiCellSelection\", void 0);\n __decorate([\n Property(true)\n ], Schedule.prototype, \"allowMultiRowSelection\", void 0);\n __decorate([\n Property(false)\n ], Schedule.prototype, \"quickInfoOnSelectionEnd\", void 0);\n __decorate([\n Property(false)\n ], Schedule.prototype, \"showWeekNumber\", void 0);\n __decorate([\n Property(false)\n ], Schedule.prototype, \"rowAutoHeight\", void 0);\n __decorate([\n Property(false)\n ], Schedule.prototype, \"allowMultiDrag\", void 0);\n __decorate([\n Property(0)\n ], Schedule.prototype, \"firstMonthOfYear\", void 0);\n __decorate([\n Property()\n ], Schedule.prototype, \"editorTemplate\", void 0);\n __decorate([\n Complex({}, QuickInfoTemplates)\n ], Schedule.prototype, \"quickInfoTemplates\", void 0);\n __decorate([\n Property(7)\n ], Schedule.prototype, \"agendaDaysCount\", void 0);\n __decorate([\n Property(true)\n ], Schedule.prototype, \"hideEmptyAgendaDays\", void 0);\n __decorate([\n Property(true)\n ], Schedule.prototype, \"enableRecurrenceValidation\", void 0);\n __decorate([\n Property()\n ], Schedule.prototype, \"timezone\", void 0);\n __decorate([\n Complex({}, EventSettings)\n ], Schedule.prototype, \"eventSettings\", void 0);\n __decorate([\n Property(timezoneData)\n ], Schedule.prototype, \"timezoneDataSource\", void 0);\n __decorate([\n Property()\n ], Schedule.prototype, \"resourceHeaderTemplate\", void 0);\n __decorate([\n Property()\n ], Schedule.prototype, \"headerIndentTemplate\", void 0);\n __decorate([\n Complex({}, Group)\n ], Schedule.prototype, \"group\", void 0);\n __decorate([\n Collection([], Resources)\n ], Schedule.prototype, \"resources\", void 0);\n __decorate([\n Collection([], HeaderRows)\n ], Schedule.prototype, \"headerRows\", void 0);\n __decorate([\n Property()\n ], Schedule.prototype, \"cssClass\", void 0);\n __decorate([\n Property()\n ], Schedule.prototype, \"eventDragArea\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"destroyed\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"cellClick\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"cellDoubleClick\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"moreEventsClick\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"hover\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"select\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"actionBegin\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"actionComplete\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"actionFailure\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"navigating\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"renderCell\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"eventClick\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"eventRendered\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"dataBinding\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"popupOpen\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"popupClose\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"dragStart\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"drag\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"dragStop\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"resizeStart\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"resizing\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"resizeStop\", void 0);\n __decorate([\n Event()\n ], Schedule.prototype, \"dataBound\", void 0);\n Schedule = __decorate([\n NotifyPropertyChanges\n ], Schedule);\n return Schedule;\n}(Component));\nexport { Schedule };\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { createElement, remove, isNullOrUndefined } from '@syncfusion/ej2-base';\n/**\n * Schedule common utilities\n */\nexport var WEEK_LENGTH = 7;\nexport var DEFAULT_WEEKS = 6;\nexport var MS_PER_DAY = 86400000;\nexport var MS_PER_MINUTE = 60000;\n/**\n * Method to get height from element\n *\n * @param {Element} container Accepts the DOM element\n * @param {string} elementClass Accepts the element class\n * @returns {number} Returns the height of the element\n */\nexport function getElementHeightFromClass(container, elementClass) {\n var height = 0;\n var el = createElement('div', { className: elementClass }).cloneNode();\n el.style.visibility = 'hidden';\n el.style.position = 'absolute';\n container.appendChild(el);\n height = el.getBoundingClientRect().height;\n remove(el);\n return height;\n}\n/**\n * Method to get width from element\n *\n * @param {Element} container Accepts the DOM element\n * @param {string} elementClass Accepts the element class\n * @returns {number} Returns the width of the element\n */\nexport function getElementWidthFromClass(container, elementClass) {\n var width = 0;\n var el = createElement('div', { className: elementClass }).cloneNode();\n el.style.visibility = 'hidden';\n el.style.position = 'absolute';\n container.appendChild(el);\n width = el.getBoundingClientRect().width;\n remove(el);\n return width;\n}\n/**\n * Method to get translateY value\n *\n * @param {HTMLElement | Element} element Accepts the DOM element\n * @returns {number} Returns the translateY value of given element\n */\nexport function getTranslateY(element) {\n var style = getComputedStyle(element);\n return window.WebKitCSSMatrix ?\n new WebKitCSSMatrix(style.webkitTransform).m42 : 0;\n}\n/**\n * Method to get translateX value\n *\n * @param {HTMLElement | Element} element Accepts the DOM element\n * @returns {number} Returns the translateX value of given element\n */\nexport function getTranslateX(element) {\n var style = getComputedStyle(element);\n return window.WebKitCSSMatrix ?\n new WebKitCSSMatrix(style.webkitTransform).m41 : 0;\n}\n/**\n * Method to get week first date\n *\n * @param {Date} date Accepts the date object\n * @param {number} firstDayOfWeek Accepts the first day of week number\n * @returns {Date} Returns the date object\n */\nexport function getWeekFirstDate(date, firstDayOfWeek) {\n var date1 = new Date(date.getTime());\n firstDayOfWeek = (firstDayOfWeek - date1.getDay() + 7 * (-1)) % 7;\n return new Date(date1.setDate(date1.getDate() + firstDayOfWeek));\n}\n/**\n * Method to get week last date\n *\n * @param {Date} date Accepts the date object\n * @param {number} firstDayOfWeek Accepts the first day of week number\n * @returns {Date} Returns the date object\n */\nexport function getWeekLastDate(date, firstDayOfWeek) {\n var weekFirst = getWeekFirstDate(date, firstDayOfWeek);\n var weekLast = new Date(weekFirst.getFullYear(), weekFirst.getMonth(), weekFirst.getDate() + 6);\n return new Date(weekLast.getTime());\n}\n/**\n * Method to get first date of month\n *\n * @param {Date} date Accepts the date object\n * @returns {Date} Returns the date object\n */\nexport function firstDateOfMonth(date) {\n return new Date(date.getFullYear(), date.getMonth(), 1);\n}\n/**\n * Method to get last date of month\n *\n * @param {Date} date Accepts the date object\n * @returns {Date} Returns the date object\n */\nexport function lastDateOfMonth(date) {\n return new Date(date.getFullYear(), date.getMonth() + 1, 0);\n}\n/**\n * Method to get week number\n *\n * @param {Date} date Accepts the date object\n * @returns {number} Returns the week number\n */\nexport function getWeekNumber(date) {\n var date1 = new Date(date.getFullYear(), 0, 1).valueOf();\n var currentDate = new Date(date.getFullYear(), date.getMonth(), date.getDate()).valueOf();\n var dayOfYear = ((currentDate - date1 + MS_PER_DAY) / MS_PER_DAY);\n return Math.ceil(dayOfYear / 7);\n}\n/**\n * Method to get week middle date\n *\n * @param {Date} weekFirst Accepts the week first date object\n * @param {Date} weekLast Accepts the week last date object\n * @returns {Date} Returns the date object\n */\nexport function getWeekMiddleDate(weekFirst, weekLast) {\n return new Date(weekLast.valueOf() - ((weekLast.valueOf() - weekFirst.valueOf()) / 2));\n}\n/**\n * Method to set time to date object\n *\n * @param {Date} date Accepts the date object\n * @param {number} time Accepts the milliseconds\n * @returns {Date} Returns the date object\n */\nexport function setTime(date, time) {\n var tzOffsetBefore = date.getTimezoneOffset();\n var d = new Date(date.getTime() + time);\n var tzOffsetDiff = d.getTimezoneOffset() - tzOffsetBefore;\n date.setTime(d.getTime() + tzOffsetDiff * MS_PER_MINUTE);\n return date;\n}\n/**\n * Method the reset hours in date object\n *\n * @param {Date} date Accepts the date object\n * @returns {Date} Returns the date object\n */\nexport function resetTime(date) {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\n}\n/**\n * Method to get milliseconds from date object\n *\n * @param {Date} date Accepts the date object\n * @returns {number} Returns the milliseconds from date object\n */\nexport function getDateInMs(date) {\n var localOffset = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0).getTimezoneOffset();\n var dateOffset = date.getTimezoneOffset();\n var timezoneOffset = dateOffset - localOffset;\n return ((date.getTime() - new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0).getTime())\n - (timezoneOffset * 60 * 1000));\n}\n/**\n * Method to get date count between two dates\n *\n * @param {Date} startDate Accepts the date object\n * @param {Date} endDate Accepts the date object\n * @returns {number} Returns the date count\n */\nexport function getDateCount(startDate, endDate) {\n return Math.ceil((endDate.getTime() - startDate.getTime()) / MS_PER_DAY);\n}\n/**\n * Method to add no of days in date object\n *\n * @param {Date} date Accepts the date object\n * @param {number} noOfDays Accepts the number of days count\n * @returns {Date} Returns the date object\n */\nexport function addDays(date, noOfDays) {\n date = new Date('' + date);\n return new Date(date.setDate(date.getDate() + noOfDays));\n}\n/**\n * Method to add no of months in date object\n *\n * @param {Date} date Accepts the date object\n * @param {number} noOfMonths Accepts the number of month count\n * @returns {Date} Returns the date object\n */\nexport function addMonths(date, noOfMonths) {\n date = new Date('' + date);\n var day = date.getDate();\n date.setDate(1);\n date.setMonth(date.getMonth() + noOfMonths);\n date.setDate(Math.min(day, getMaxDays(date)));\n return date;\n}\n/**\n * Method to add no of years in date object\n *\n * @param {Date} date Accepts the date object\n * @param {number} noOfYears Accepts the number of month count\n * @returns {Date} Returns the date object\n */\nexport function addYears(date, noOfYears) {\n date = new Date('' + date);\n var day = date.getDate();\n date.setDate(1);\n date.setFullYear(date.getFullYear() + noOfYears);\n date.setDate(Math.min(day, getMaxDays(date)));\n return date;\n}\n/**\n * Method to get start and end hours\n *\n * @param {Date} date Accepts the date object\n * @param {Date} startHour Accepts the start hour date object\n * @param {Date} endHour Accepts the end hour date object\n * @returns {Object} Returns the start and end hour date objects\n */\nexport function getStartEndHours(date, startHour, endHour) {\n var date1 = new Date(date.getTime());\n date1.setHours(startHour.getHours());\n date1.setMinutes(startHour.getMinutes());\n date1.setSeconds(startHour.getSeconds());\n var date2 = new Date(date.getTime());\n if (endHour.getHours() === 0) {\n date2 = addDays(date2, 1);\n }\n else {\n date2.setHours(endHour.getHours());\n date2.setMinutes(endHour.getMinutes());\n date2.setSeconds(endHour.getSeconds());\n }\n return { startHour: date1, endHour: date2 };\n}\n/**\n * Method to get month last date\n *\n * @param {Date} date Accepts the date object\n * @returns {number} Returns the month last date\n */\nexport function getMaxDays(date) {\n return lastDateOfMonth(date).getDate();\n}\n/**\n * Method to get days count between two dates\n *\n * @param {Date} startDate Accepts the date object\n * @param {Date} endDate Accepts the date object\n * @returns {number} Returns the days count\n */\nexport function getDaysCount(startDate, endDate) {\n var strTime = resetTime(new Date(startDate));\n var endTime = resetTime(new Date(endDate));\n return Math.round((endTime.getTime() - strTime.getTime()) / MS_PER_DAY);\n}\n/**\n * Method to get date object from date string\n *\n * @param {string} date Accepts the date string\n * @returns {Date} Returns the date object\n */\nexport function getDateFromString(date) {\n return date.indexOf('Date') !== -1 ? new Date(parseInt(date.match(/\\d+/g).toString(), 10)) :\n date.indexOf('T') !== -1 ? new Date(date) : new Date(date.replace(/-/g, '/'));\n}\n/**\n * Method to get scrollbar width\n *\n * @returns {number} Returns the scrollbar width\n * @private\n */\nexport function getScrollBarWidth() {\n var divNode = createElement('div');\n var value = 0;\n divNode.style.cssText = 'width:100px;height: 100px;overflow: scroll;position: absolute;top: -9999px;';\n document.body.appendChild(divNode);\n var ratio = (devicePixelRatio) ? (devicePixelRatio.toFixed(2) === '1.10' || devicePixelRatio <= 1) ?\n Math.ceil(devicePixelRatio % 1) : Math.floor(devicePixelRatio % 1) : 0;\n value = (divNode.offsetWidth - divNode.clientWidth - ratio) | 0;\n document.body.removeChild(divNode);\n return value;\n}\n/**\n * Method to find the index from data collection\n *\n * @param {Object} data Accepts the data as object\n * @param {string} field Accepts the field name\n * @param {string} value Accepts the value name\n * @param {Object} event Accepts the data as object\n * @param {Object[]} resourceCollection Accepts the data collections\n * @returns {number} Returns the index number\n */\n// eslint-disable-next-line max-len\nexport function findIndexInData(data, field, value, event, resourceCollection) {\n for (var i = 0, length_1 = data.length; i < length_1; i++) {\n if (data[parseInt(i.toString(), 10)][\"\" + field] === value) {\n if (event) {\n var field_1 = resourceCollection.slice(-2)[0].field;\n var res = (event[\"\" + field_1] instanceof Array ? event[\"\" + field_1] : [event[\"\" + field_1]]);\n var resData = res.join(',');\n if (resData.includes(data[parseInt(i.toString(), 10)][resourceCollection.slice(-1)[0].groupIDField])) {\n return i;\n }\n }\n else {\n return i;\n }\n }\n }\n return -1;\n}\n/**\n * Method to get element outer height\n *\n * @param {HTMLElement} element Accepts the DOM element\n * @returns {number} Returns the outer height of the given element\n */\nexport function getOuterHeight(element) {\n var style = getComputedStyle(element);\n return element.offsetHeight + (parseInt(style.marginTop, 10) || 0) + (parseInt(style.marginBottom, 10) || 0);\n}\n/**\n * Method to remove child elements\n *\n * @param {HTMLElement | Element} element Accepts the DOM element\n * @returns {void}\n */\nexport function removeChildren(element) {\n var elementChildren = [].slice.call(element.children);\n for (var _i = 0, elementChildren_1 = elementChildren; _i < elementChildren_1.length; _i++) {\n var elementChild = elementChildren_1[_i];\n element.removeChild(elementChild);\n }\n}\n/**\n * Method to check DST is present or not in date object\n *\n * @param {Date} date Accepts the date object\n * @returns {boolean} Returns the boolean value for either DST is present or not\n */\nexport function isDaylightSavingTime(date) {\n var jan = new Date(date.getFullYear(), 0, 1);\n var jul = new Date(date.getFullYear(), 6, 1);\n return date.getTimezoneOffset() < Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset());\n}\n/**\n * Method to get UTC time value from date\n *\n * @param {Date} date Accepts the date\n * @returns {number} Returns the UTC time value\n */\nexport function getUniversalTime(date) {\n var year = date.getFullYear();\n var month = date.getMonth();\n var day = date.getDate();\n var hours = date.getHours();\n var minutes = date.getMinutes();\n var seconds = date.getSeconds();\n var milliseconds = date.getMilliseconds();\n return Date.UTC(year, month, day, hours, minutes, seconds, milliseconds);\n}\n/**\n * Method to check the device\n *\n * @returns {boolean} Returns the boolean value for either device is present or not.\n */\nexport function isMobile() {\n return window.navigator.userAgent.toLowerCase().indexOf('mobi') > -1;\n}\n/**\n * Method to check the IPad device\n *\n * @returns {boolean} Returns the boolean value for either IPad device is present or not.\n */\nexport function isIPadDevice() {\n return window.navigator.userAgent.toLowerCase().indexOf('ipad') > -1;\n}\n/**\n * Method to capitalize the first word in string\n *\n * @param {string} inputString Accepts the string value\n * @param {string} type Accepts the string type\n * @returns {string} Returns the output string\n */\nexport function capitalizeFirstWord(inputString, type) {\n if (type === 'multiple') {\n inputString = inputString.split(' ').map(function (e) { return e.charAt(0).toLocaleUpperCase() + e.substring(1); }).join(' ');\n }\n else if (type === 'single') {\n if (inputString[0] >= '0' && inputString[0] <= '9') {\n var array = inputString.match(/[a-zA-Z]/);\n inputString = isNullOrUndefined(array) ? inputString :\n inputString.slice(0, array.index) + inputString[array.index].toLocaleUpperCase() + inputString.slice(array.index + 1);\n }\n inputString = inputString[0].toLocaleUpperCase() + inputString.slice(1);\n }\n return inputString;\n}\n","/**\n * Constants\n */\n/** @private */\nexport var cellClick = 'cellClick';\n/** @private */\nexport var cellDoubleClick = 'cellDoubleClick';\n/** @private */\nexport var moreEventsClick = 'moreEventsClick';\n/** @private */\nexport var select = 'select';\n/** @private */\nexport var hover = 'hover';\n/** @private */\nexport var actionBegin = 'actionBegin';\n/** @private */\nexport var actionComplete = 'actionComplete';\n/** @private */\nexport var actionFailure = 'actionFailure';\n/** @private */\nexport var navigating = 'navigating';\n/** @private */\nexport var renderCell = 'renderCell';\n/** @private */\nexport var eventClick = 'eventClick';\n/** @private */\nexport var eventRendered = 'eventRendered';\n/** @private */\nexport var dataBinding = 'dataBinding';\n/** @private */\nexport var dataBound = 'dataBound';\n/** @private */\nexport var popupOpen = 'popupOpen';\n/** @private */\nexport var popupClose = 'popupClose';\n/** @private */\nexport var dragStart = 'dragStart';\n/** @private */\nexport var drag = 'drag';\n/** @private */\nexport var dragStop = 'dragStop';\n/** @private */\nexport var resizeStart = 'resizeStart';\n/** @private */\nexport var resizing = 'resizing';\n/** @private */\nexport var resizeStop = 'resizeStop';\n/** @private */\nexport var inlineClick = 'inlineClick';\n/** @private */\nexport var cellSelect = 'cellSelect';\n/**\n * Specifies schedule internal events\n */\n/** @private */\nexport var initialLoad = 'initial-load';\n/** @private */\nexport var initialEnd = 'initial-end';\n/** @private */\nexport var print = 'print';\n/** @private */\nexport var dataReady = 'data-ready';\n/** @private */\nexport var eventsLoaded = 'events-loaded';\n/** @private */\nexport var contentReady = 'content-ready';\n/** @private */\nexport var scroll = 'scroll';\n/** @private */\nexport var virtualScroll = 'virtual-scroll';\n/** @private */\nexport var scrollUiUpdate = 'scroll-ui-update';\n/** @private */\nexport var uiUpdate = 'ui-update';\n/** @private */\nexport var documentClick = 'document-click';\n/** @private */\nexport var cellMouseDown = 'cell-mouse-down';\n"],"sourceRoot":""}